Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
matrss
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
91.
▲
by
matrss
2y ago
> particularly because it also allows for non-Python dependencies (one of my recent projects involved a browser automation solution, and I chose to install Firefox in a conda env You could just as well install it either globally with pix
92.
▲
by
matrss
2y ago
Pixi is installable under the same conditions and uses the same repositories as conda, so unless you are specifically allowed to use conda and forbidden to use anything else this isn't an argument for conda.
93.
▲
by
matrss
2y ago
What are you using each of them for in that workflow? I've found that there really only are two kinds of packages I want to install: those I want globally (e.g. CLI tools like git, git-annex, DataLad, whatever shell enhancing you want,
94.
▲
by
matrss
2y ago
For the future, please pick a package manager that can give you a lock file alongside your code, so that you have a definitive record of the dependencies. Even if you have all versions as of the time of the last modification to the code, yo
95.
▲
by
matrss
2y ago
Yes, the entire workflow of conda/mamba is a liability. Having environments detached from directories encourages bad practices (reusing environments for unrelated things, installing everything into the same environment and getting very
96.
▲
by
matrss
2y ago
There definitely doesn't need to be truncation. A upper limit yes, to avoid the potential for DoS, but no truncation. That limit should be reasonably large, 1000 characters or something maybe. I've seen a service whose registratio
97.
▲
by
matrss
2y ago
> What happens when it's no longer fun, but 150,000 people depend on it for their job? Then someone else can take over, or not, depending on how important it really is to those 150000. From the perspective of a business, using open
98.
▲
by
matrss
2y ago
> That said, I usually prefer the changing bit at the end. So something like GlobalScopeForWorker, GlobalScopeForWorklet. But then that's clunky, so we're back at WorkerGlobalScope and WorkletGlobalScope again. I wouldn't
99.
▲
by
matrss
2y ago
> In the same vein, let's only write tests for the places where bugs will actually be. Sounds like a good idea, actually. These places being the entire surface of your code that is exposed to the real world. So not unlike what I hav
100.
▲
by
matrss
2y ago
I mean, if you really want to start every function with multiple `assert true == true` statements, feel free to do so. But I will question its usefulness. Do you have any particular example in mind that is not superfluous and really can not
101.
▲
by
matrss
2y ago
> In a good program, most of those checks are not coverable from the public interfaces. If they aren't then you are defending against situations that can never occur. In that case the check seems unnecessary, and I at least wouldn&#
102.
▲
by
matrss
2y ago
I don't fully agree. Yes, employ as many testing approaches as possible (e2e tests, property-based testing, golden tests, whatever), but only test for behavior that you expose and want to guarantee will stay as-is. Otherwise you will g
103.
▲
by
matrss
2y ago
This is good advice not just for compilers, but for any kind of software. Test the behavior of the public interface, not of the internals. Doing the latter too much will just unnecessarily lock you into one implementation of your software,
104.
▲
by
matrss
2y ago
So, contrary to your own point, you did indeed put in some time and learned one of the ways you can fix a "fucked" repo, because it is more convenient to just 'git reset --hard main' than to delete and re-clone. There ar
105.
▲
by
matrss
2y ago
Its worth keeping this (from their readme) in mind though: > However, at present SSHFS does not have any active, regular contributors, and there are a number of known issues (see the bugtracker). Not that it is unusable or anything, it i
106.
▲
by
matrss
2y ago
I find it to be a good default when writing a script, but yes, it can get noisy and potentially leak stuff, if that is what your script deals with. That hasn't been a concern in the settings I usually use it, though. I am not sure how
107.
▲
by
matrss
2y ago
Oh wow, I didn't know that. I am pretty sure I had a sh trip up on it just recently, so I thought it still was bash only. Yes, use it everywhere possible.
108.
▲
by
matrss
2y ago
I can recommend starting every bash script with set -euxo pipefail The "u" has basically the same effect as the question mark, but for every variable usage.
109.
▲
by
matrss
2y ago
The solver might be deterministic if you take some sufficiently large global state into account, but the process of apt install bar from a users view is not. It can have a different result depending on what is already installed, or
110.
▲
by
matrss
2y ago
That is an orthogonal issue. Guix has first-class support for versions (where "version" means the version string of the source code), while nixpkgs uses the same naming-based approach as Debian. The important part is being able to
111.
▲
by
matrss
2y ago
I think install time dependency resolution was a bad idea and needs to be removed entirely. Packages for package managers that do it are untestable by design, because their runtime behavior cannot be known at build time. "Functional pa
112.
▲
by
matrss
2y ago
> think Ansible, but imperative For basically all purposes ansible is imperative.
113.
▲
by
matrss
2y ago
I agree with you, your declarative abstraction has to have an imperative implementation underneath that will do all the dirty work. Ansible presents this declarative interface at the module level (if the module is implemented properly, most
114.
▲
by
matrss
2y ago
> I’m not sure how “I don’t have to actually think about any of the separation” meshes with the fact that you explicitly setup multiple users and configured file and group permissions accordingly. You clearly put a lot of thought into it
115.
▲
by
matrss
2y ago
Yes, this is debating state management. For full declarativity some form of state management for the parts of the system that should be under declarative control (like terraform) or a stateless but very holistic view of the system (like Nix
116.
▲
by
matrss
2y ago
Ansible playbooks are usually a list of steps to execute in order (imperative). Those steps may try to present a declarative interface to what they are supposed to do, but many fail to fulfill the definition of "declarative" that
117.
▲
by
matrss
2y ago
Or you go the functional package management route and strip out these global paths entirely. nix and guix do this. Every package that needs python is built against a specific version of python (where a "version" is defined by its
118.
▲
by
matrss
3y ago
> And finally finally, replace android with GrapheneOS. The irony of which is that it only runs on Google's phones.
119.
▲
by
matrss
3y ago
I find it useful to keep in mind that LLMs are essentially "just" random generators based on the probability distribution of some language (or more accurately a sample of that distribution in the form of a finite amount of text, a
120.
▲
by
matrss
3y ago
https://hedgedoc.org/
More ›