| 2 Aug 2022 |
Alyssa Ross | Oh that's interesting. | 13:29:41 |
infinisil | Oh yeah, I wanted to go into that too | 13:29:50 |
Sandro 🐧 | the verbosity https://git.savannah.gnu.org/cgit/mediagoblin.git/tree/guix-env.scm#n191 | 13:29:52 |
infinisil | Similarly, nix-shell is also bash-specific, it runs some bash stdenv hook stuff by default | 13:30:03 |
Sandro 🐧 | nix-shell more or less opens a stdenv shell | 13:30:24 |
kevincox | I would love to "fix" that. I frequently use nix-shell ... --run zsh | 13:31:14 |
Sandro 🐧 | 🌚 switch to bash | 13:31:42 |
infinisil | In reply to @sandro:supersandro.de the verbosity https://git.savannah.gnu.org/cgit/mediagoblin.git/tree/guix-env.scm#n191 inherit in Nix fixes this at least | 13:31:47 |
infinisil | I guess guix scheme doesn't have something like that | 13:32:12 |
infinisil | Is the reason guix uses a scheme because they can easily serialize functions for the daemon to read and execute? | 13:41:43 |
infinisil | * Is the reason guix uses a scheme because this allows them to easily serialize functions for the daemon to read and execute? | 13:41:52 |
infinisil | Um, I mean s/scheme/lisp | 13:42:38 |
infinisil | Yeah looks like it, this section is very interesting: https://guix.gnu.org/en/manual/devel/en/guix.html#G_002dExpressions | 13:48:22 |
infinisil |
To describe a derivation and its build actions, one typically needs to embed build code inside host code. It boils down to manipulating build code as data, and the homoiconicity of Scheme—code has a direct representation as data—comes in handy for that. But we need more than the normal quasiquote mechanism in Scheme to construct build expressions.
| 13:48:47 |
Alyssa Ross | I think the reason Guix uses Lisp is that it's a GNU project, and Lisp is intended to be the scripting/etc language of the GNU system | 13:52:51 |
infinisil | Above-linked section does give a good reason for why guix specifically benefits from it being lisp though | 13:53:55 |
infinisil | homoiconicity is the keyword | 13:55:14 |
profpatsch | kevincox: Not to be too offtopic, but in fish I just have an alias like with foobar which puts foobar on PATH https://gist.github.com/Profpatsch/037e4f527e37ecfcf0b6e365b78b917d | 13:56:43 |
profpatsch | And for using my own shell for nix-shell environments, direnv works like a charm | 13:56:58 |
infinisil | Hmm, so as far as I can see, if we want something as nice as Guix, only needing a single language for both evaluation and building, we need a "homoiconic" language. The only somewhat popular class of languages that are homoiconic is lisps though, which I don't think is viable because it's lisp | 13:58:34 |
profpatsch | infinisil: fwiw the homowhatever stuff is just a fancy way of saying “macros”, and in my experience macros make code really hard to read & understand | 13:58:56 |
infinisil | Also it would require switching away from bash and Nix | 13:59:04 |
profpatsch | as opposed to plain old functions | 13:59:08 |
profpatsch | infinisil: homoiconic just means that the syntax is the AST | 13:59:31 |
infinisil | profpatsch: I don't think that's what matters | 13:59:38 |
profpatsch | which is only useful if you want macros | 13:59:43 |
profpatsch | i.e. functions from code to code | 13:59:56 |
Alyssa Ross | Why would we need macros? | 14:00:04 |
Alyssa Ross | Lisp people are very fond of insisting everything needs macros, IME. | 14:00:18 |
profpatsch | I don’t think you need them in a lazy language without compilation pass | 14:00:18 |