by qwertyuiop924 · 10y ago · 0 comments
They don't handle functions or infinite datastructures though.
- Guix refuses to integrate proprietary software so its usability is diminished compared to Nix (and Guix has less software packaged than Nix in the first place, AFAIK).
- Nix is a pretty good language for the task.
But this language is not a DSL, but a general purpose language that has pattern matchers, HTTP libraries, XML parsers, data structure implementations, etc.
>Guix refuses to integrate proprietary software so its usability is diminished compared to Nix (and Guix has less software packaged than Nix in the first place, AFAIK).
Guix is younger, thus has less software packaged, but the number of new packages introduced with each Guix release continues to increase. I have all the packages most important to me and have been using GuixSD exclusively for at least a year now.
>Nix is a pretty good language for the task.
The problem with any DSL is that is not very extensible and developers must spend time maintaining parsers, compilers, etc. for a one-off language. Guix is achieving its velocity in good part thanks to using an existing general purpose language that new languages can be embedded within.
I'm not expressing this as a criticism that I have, but for some people what you described is not a feature but a bug. :)
I don't know, I rather like Nix's language, maybe I am just not a Lisp person.
More practically, I can't think of anything that I wanted that Scheme offers but the nix expression language doesn't.
It may have a smaller stdlib than scheme (but I doubt it). But it's very hard to be simpler than scheme semantically.
As for what I want from scheme that nix doesn't provide, a simple, regular, syntax that I already know is what I want. I understand that that doesn't apply to everybody.
Yes, I mean the semantics of the language. Scheme is indisputably more complex. There isn't really much a standard library for the Nix Expression Language either.
> As for what I want from scheme that nix doesn't provide, a simple, regular, syntax that I already know is what I want. I understand that that doesn't apply to everybody.
off the top of my head:
Scheme-Simplified ::= <Item>*
Items ::= (define (<Id>*) <Expr>)
| (define <Id> <Expr>)
Expr ::= (<Expr> <Expr>*)
| (set! <Id> <Expr>)
| (lambda (<Id>*) <Expr>)
Nix-Expr ::= <Pattern> : <Nix-Expr>
| with <Nix-Expr>; <Nix-Expr>
| { <Nix-Item>* }
| let <Nix-Item>* in <Expr>
| <Expr> <ArithOp> <Expr>
| <Expr>.<Id>
| <Expr>.<String-Lit>
| <Expr> ? <Id>
| <Expr> ? <Id> or <Nix-Expr>
Nix-Item ::= <Id> = <Nix-Expr>;
| <StringLit> = <Nix-Expr>;
| inherit <Expr>;
| inherit (<Nix-Expr>) <Nix-Expr>;Using pre-compiled binaries means that builds aren't reproducible, a goal of both Nix and Guix.
Binaries can be signed to prove that the chain of trust is unbroken between the vendor (who maybe you trust enough to run their software on your systems) and you. In the case of a system with reproducible builds, that signature also says, "if you were to build this yourself, you'd end up with the same binary I am sending you."
Edit: I am beginning to realize that when davexunit says "pre-compiled binaries" they are not talking about an OS vendor (like Guix) distributing a binary package (with source available). They are talking about binary blobs provided by third parties, and in a form that is not reproducible, such as an nvidia driver kernel blob. This has led to me assuming davexunit is nuts, but apparently it is just that neither of us has been speaking very clearly to each other, and thus we've seemingly been talking past each other.
[0] https://reproducible-builds.org/
[1] https://www.gnu.org/software/guix/manual/html_node/Bootstrap...
For example, the Haskell toolchain in nixpkgs downloads pre-compiled binaries of old GHC versions (7.0.4 and 7.4.2) which it uses to bootstrap the newer versions.
The binaries are checksummed to ensure reproducibility.
https://github.com/genenetwork/guix-bioinformatics
and
https://github.com/Ecogenomics/ace-guix
I'm not sure how easy it is to maintain a system with extra packages like this, but it'd be nice to be able to use an "overlay" repo as you can in Gentoo for personal/custom packages.
Would love to ping davexunit to see if he can elaborate, because I don't see any specific way to add repositories from the documentation.
Is something similar/comparable planned to be added?
Orrr should someone step forward and volunteer to add it as a feature...?
(Don't worry, it's just a tiny toy gun.)
Although I do think that programmers often tend to try to solve problems with the kind of tools that they like to make, rather than ones that would be appropriate for the user -- and that's why the *nix open source world has so many incompatible programming languages and configuration formats, and so few good GUIs.
Use TOML, JSON, or YAML. If you need something general purpose, use Scheme. It works well embedded.