6 ms·
So scheme is not a purely functional language - I take that to mean Guix will not be as well? It will be more like "Unix as emacs"? Saddens me, because NixOS d
by hkjgkjy 10y ago
So scheme is not a purely functional language - I take that to mean Guix will not be as well? It will be more like "Unix as emacs"?
Saddens me, because NixOS does all I want - except having s-expressions...
- codemac 10y agoThe packaging is functional, the scripting is not. Guix still uses a fork of the nix-daemon, and thus derivations. The "functional packages, no side effects" part is still guaranteed in the build & install part. I'd say it's largely what you want, minus probably some GNU-isms in their packaging choices.
- chriswarbo 10y agoTo be fair, a huge part of the functionality in nixpkgs and NixOS is provided by a ton of bash code, both standalone files and big strings in .nix files. Replacing that with Scheme sounds like a long-term win to me; although in the short term I imagine it makes packaging the contents of a bash-dominated world more frustrating.
- ue_ 10y agoNixOS is missing some things for me personally, such as multilib support (I play a game that's only available using 32-bit libraries). Unfortunately I didn't read the documentation and arrived at a situation where I couldn't install my game. I ended up re-installing Debian. It sounds trivial, but unfortunately it was a deal-breaker for me. I really liked the centralised configuration and package management offered by NixOS.
- ambrop7 10y agoIt is most definitely possible to plan 32-bit games (at least via Steam) on NixOS. The only things not to forget is to enable "hardware.opengl.driSupport32Bit" and "hardware.pulseaudio.support32Bit". Other than that, just installing the Steam package usually should work.
- rnhmjoj 10y agoIt's possible to build FHS environments with multilib [1]. In fact it's what I use to run games and other binary only software: It works perfectly for me. I will share my setup. The expression `games.nix` [2] I use for my games builds a chroot environment with both 32bit and 64bit /lib and a command `start-game` to launch games from the environment. I store them in ~/game/$gamename, with a `$gamename/start.sh`, which is a slightly tweaked or cleaned up version of what it's usually found in gogs and humble bundle games. To use it you do `nix-env -if games.nix` to install it the first time and the just `start-game $gamename` to play. To fiddle around uncomment the trailing `#.env`, run `nix-shell games.nix` and you will land in the chroot environment with everything you need. Most of Nix features like this one are not really documented but fortunately there's github search and folks in #nixos are always available. [1]: https://nixos.org/wiki/FHS_environments https://nixos.org/wiki/FHS_environments [2]: https://hastebin.com/fopelaseyo.nix https://hastebin.com/fopelaseyo.nix
- davexunit 10y agoNix and Guix don't need multilib support because every build is isolated, unlike in other package managers that stuff everything in /usr which is the reason multilib exists in the first place. You can just build the package for the desired architecture and run it.
- agumonkey 10y agoI thought Guix reimplemented nix the purely functional language in scheme.
- rekado 10y agoNo, Guix uses a DSL for packages that's embedded in Guile. Pretty much everything else is also written in Guile with the current exception of the Nix daemon (C++). The DSL is mostly declarative. Here's an example: (define metal (package (name "metal") (version "2011-03-25") (source (origin (method url-fetch) (uri (string-append "http://csg.sph.umich.edu/abecasis/Metal/" "download/generic-metal-" version ".tar.gz")) (sha256 (base32 "1bk00hc0xagmq0mabmbb8bykl75qd4kfyirba869h4x6hmn4a0f3")))) (build-system gnu-build-system) (arguments `(#:tests? #f #:make-flags (list (string-append "INSTALLDIR=" (assoc-ref %outputs "out") "/bin") "all") #:phases (modify-phases %standard-phases (delete 'configure)))) (inputs `(("zlib" ,zlib))) (home-page "http://csg.sph.umich.edu/abecasis/Metal") (synopsis "Facilitate meta-analysis of large datasets") (description "METAL is a tool for meta-analysis genomewide association scans. ...") (license license:bsd-3))) The stuff that's in the "arguments" field is a quoted expression, which is evaluated on the builder's side, at build time. We make use of code staging in several places, which seems like a perfect fit for Scheme. Note that the `,zlib` thing means that the value bound to the variable name "zlib" is injected as is. All package expressions are "live" values in Scheme and can be inspected in a REPL.
- rekado 10y agoThe subset of Scheme that we use in Guix is mostly functional. (It's quite unlikely to find things like `set!` in the code for package expressions, for example.) Then there's patching of sources (e.g. to replace shebangs to point to the actual location of the interpreter). Obviously, you want to have side effects there, so that's not purely functional. That's unrelated to Scheme as a language or the DSL we use to describe packages (Nix does something similar because without patching functional package management wouldn't quite work).
- ris 10y ago"So scheme is not a purely functional language" No language is purely purely functional, otherwise it wouldn't be able to have inputs/outputs.