HackerTrans
TopNewTrendsCommentsPastAskShowJobs

squiggleblaz

no profile record

comments

squiggleblaz
·4 months ago·discuss
>My package really does depend on the latest patch release!

> Even in the event that your packages code is only correct with a specific patch release, I still think its wrong to put that version in the go directive unless it cannot be compiled with any other version.

I'm not a go user, but this strikes me as an over-reaction. If your code is only correct with a specific patch release, then it really is your business to make that so. If someone downstream wants to use library_method_broadly_correct and not library_method_correct_only_with_latest, then downstream should patch your source to allow them to do something unsupported. That becomes their problem. If this is likely to be a significant problem that will affect many users, then this is a codesmell warning you that you've probably got two libraries which you're just jumbling together into one: the solution isn't to falsely gate a safe function behind a high dependency version, nor to falsely release a function to people who can't use it safely, but to publish each with its own requirements expressly stated.
squiggleblaz
·4 months ago·discuss
`One reason to set `mutableUsers = false`: https://mynixos.com/nixpkgs/option/users.mutableUsers.`

That doesn't help. Mutable users is about the lifecycle of the /etc/passwd file. What's I'm referring to is /var/lib/nixos/uid-map.
squiggleblaz
·4 months ago·discuss
Not the greatest fan of python, but when I've got to run a python script, I do `nix-shell -p 'python3.withPackages (ps: [ps.requests])' --command 'python3 your-script.py'` Note that there is one argument to -p and one argument to --command -- both are quoted. The argument to -p is a nix expression that will provide a python3 command, referring to a python3 with the requests package. The argument to --command is a bash script that will run python3 with the argument "your-script.py" i.e. it will run your-script.py with the python3 that has the requests package.

I think there's ways you can autoderive a python3 with specific packages from python dependency files, but I can't help you there. I do find AI to be reasonably helpful for answering questions like this: it just might sometimes require a bit of help that you want to understand the answer rather than receive a perfect packaged shell.nix file.
squiggleblaz
·4 months ago·discuss
Yes I just replied to your other comment with the same observation. It reminds me of an article by Paul Graham, I forget which, who expressed the difficulty of explaining to programmers who lack an abstraction just how good the abstraction is. Anything you can do with NixOS, you can do with any distribution, because it isn't magic. But somehow, more stuff becomes possible because it gives you a better way to think.

(As for why the docs are so bad, I think it's because of the lack of good canonical documentation. There's too many copies of it. Search engines ignore the canonical version because it's presented as one giant document. Parts of the system aren't documented at all and you have to work out what you've got by reading the code. The result is that you have no idea what to do if you want to improve the situation - it seems like your best option is to create new documentation. And now you have the same basic level of documentation that didn't help the first hundred times it was rewritten. And I don't really think submitting a PR to nixpkgs is exactly userfriendly, so it probably discourages people from doing the "I'm just trying to understand this, so I'll fix up the documentation as I learn something" thing.)
squiggleblaz
·4 months ago·discuss
yes i think you've hit the nail on the head. I tend to view NixOS not as a distribution, but as a distribution framework. The system configuration is the sources for an immutable distribution as much as it as system configuration.

You're in no way bound by decisions of the nixpkgs contributors: as you say, we can add a patch. Or we can also decide we totally disapprove of the way they've configured such-and-such a service and write our own systemd service to run it.

Anyone can write a local debian package which adds a patch, and build and install it. And anyone can write a systemd service and use it instead of the distribution's systemd service. But on NixOS, these are equal to the rest of the system rather than outside it. Nixpkgs is just a library which your configuration uses to build a system.
squiggleblaz
·4 months ago·discuss
While nix might be free of side effects, activating a nixos configuration isn't as free as you imply. As an example, nixos keeps state around regarding user id/username mappings, to avoid giving the same user id to different users across time. So a fresh install of nixos might leave services unable to read their data files, because the file might be owned by a different user id. And if you activate and enable incus, for instance, it will probably create a bridge device: the device will remain in place after you remove incus, which will have implications for how your network/firewall works that your configuration will depend on but will not enforce or be able to reproduce.

Not an argument against using NixOS - I think the bridge device issue could reasonably be regarded as a bug rather than a fundamental design issue, and the user id/username mapping is a totally reasonable design decision which can be taken into account by forcing the user id numbers anyway.
squiggleblaz
·4 months ago·discuss
I'm not OP but that's basically right. With NixOS, nix generates the system configuration as well as making sure the packages are available. If you pin your dependencies using something like nix flakes and rely on git as your source of truth, you can get GitOps for the operating system.

But it isn't necessary. You can certainly make a change and apply it without committing it to git or relying on a CI/CD pipeline to deploy it. And it isn't necessary to use input pinning - if you don't, you can wind up making it at best archaeological work to rollback. Most people recommend flakes nowadays though, whose input pinning and purity rules should prevent any need for archaeology if you do commit before applying.
squiggleblaz
·5 years ago·discuss
> The dot behavior, however, is weird. Nobody does it that way, 'cept Google.

I think it makes good sense for a free email provider. You don't want to distinguish bobsmith@... from Bob.Smith@.... It will just cause misdelivered emails.
squiggleblaz
·5 years ago·discuss
I suppose you mean zero runtime dependencies? It seems to have few dozen build dependencies.

Runtime dependencies create a nuisance as you have to update several things together. On the other hand, they can allow components with separate update cycles and responsibilities to be update separately.

Build dependencies create maintainability and security problems. They can also solve maintainability and security problems. It depends on what your consideration is. But as a matter of practice, many developers seem too concerned with possible behavioral/API breakage, that they like to pin to specific versions of their dependencies, which now means that you aren't getting any security fixes.

(Technically, Althttpd doesn't achieve zero runtime dependencies in comparison to a modern http server that does HTTPS, because it requires a separate program to terminate TLS. But these connect through general mechanisms that are much easier to combine and update separately.)

Everyone has to make a judgement about how they maintain their own systems, but being excited about "zero (runtime) dependencies!" isn't the way the judgement concludes.
squiggleblaz
·5 years ago·discuss
I don't know of any other well-known web server with the same featureset. For instance, it has no configuration file, it's run from xinetd statelessly/single-threaded, it runs itself in a chroot and it's short enough to be readable without specific effort.

It also isn't brand new: it's been around since 2004. So that probably narrows the range of possible competitors even more.

If you can find a webserver that meets all of those constraints, please let us know.
squiggleblaz
·7 years ago·discuss
Well, that's not the cost of using Linux. It's one possible cost. I haven't ever done either because I use the primary selection (select is automatically copied, middle click dumps it at the pointer).

And when I can't or don't want to do that, I right click and choose Copy.

If I want to use another operating system - Windows or MacOS, it drives me batty that I have to keep going around copy pasting things.

I tend to agree with you that having a difference between Ctrl and Command is nice. But it doesn't actually solve the problem - it works _because_ MacOS is a minority, the last holdout.

In your web browser, Cmd-A will select all the available text but Ctrl-A will move your cursor to the start of the line. In your terminal, perhaps Cmd-A will select all the visible text but Ctrl-A will increment the number under the pointer (since you're running VIM in it).

If the Meta key hadn't died of death and Linux developers had kept expecting it to be around, there could also be clashes between Cmd and Meta.
squiggleblaz
·7 years ago·discuss
I didn't use Windows XP or anything since. I'm now using Windows 10 due to a work situation. But seriously. The Update Ritual happens out-of-ours when you're not using your computer. It seems to take a few days longer than it needs to (why not do it tonight? why must you ask me for days and days, and then finally do it overnight?). But it's generally quite reasonable.

I don't fully understand why Linux is able to do its system updates as one of several tasks, but Windows has to take over the computer to do it though. Is it just that if a Linux box gets stuffed during update, the user is probably able to recover, so the relative risks are different?
squiggleblaz
·7 years ago·discuss
My wife has my old 2012 MacBook Retina for some hobby iOS development. Apparently all her friends are envious because it's the last Mac that doesn't suck. I don't know if it's true or not - but I replaced that one with a Dell because, as I always do when I buy a new machine, I consider my needs, the cost, and the benefits of the hardware, and for the first time in a decade Apple didn't come up on top. So maybe I agree with them too.