Hacker News new | ask | show | jobs
by cmm 1102 days ago
I know quite well what Guile and Scheme are; I was asking about the specific DSL/library/whatever combo that Guix is programmed in. The code snippets on the page which this thread is about, for example, mostly use macros that seem to mimic their Nix equivalents very closely but are marginally more verbose. I would very much like to see a compelling example where the fact that Guile has macros makes a practical difference.

(Note that Nix's laziness is not an unalloyed good either, for example it is notoriously difficult to debug. But let's limit ourselves to pure expressiveness for now)

1 comments

Well I mean look at the docs. To each their own but I find Guile much more palatable than Nix. Moreover, I would rather spend time learning Guile than an obscure language like Nix. But for you Nix is a perfect DSL so i think we would probably be bashing our heads against the wall debating which is better.

As regards macros, Guile allows you to write your own macros in a pretty straight forward way that is just not the case in Nix

I'm not trying to "debate" anything here.

I do note that those Guix people that are feeling competitive towards Nix for whatever reason tend to over-rely on two arguments that just do not work too well when examined closely.

The first is "Nix is obscure the way Guile is not". I would argue both are equally obscure and neither is obscure enough for its quality or UX to suffer for it. And does expertise in Guile (base Scheme is trivial) carry over anywhere interesting?

The second is "Macros!", where the implied idea is that unrestricted syntactic extensibility is Good. Well, I like Lisp (more partial to CL then Scheme, but who cares at this resolution), and I find unrestricted syntactic extensibility to be more of a hazard than a benefit; plus the expressivity of a non-strict FP language really gets you close enough for practical purposes.

> does expertise in Guile (base Scheme is trivial) carry over anywhere interesting?

If you ever want to embed a dynamic language in a native code program for configuring/scripting the latter, Guile is a great choice.

It is, but there already are other choices that are not worse and that are more established
What, for example? The only other one I can think of is Lua and IMO it’s quite debatable whether that is more established than Guile.
please compare:

https://archlinux.org/packages/extra/x86_64/lua/#pkgreqs

https://archlinux.org/packages/core/x86_64/guile/#pkgreqs

(lua at least is under-counted as there is luajit, lua51, and various packages which embed their own version, e.g. pandoc)

It is at least used outside of the GNU Project...
Besider Guix, Guile is also the default extension language for the GNU project. Moreover by learning Guile you learn a lisp which some people find quite enlightening. What do you gain from learning Nix, asside from Nix?

Moreover, "macros are good" in the sense that they are powerful and grant the user freedom to construct software in ways that are just not possible with languages that try to herd their users into a specific mode of behavioir. It is the old freedom and responsibility problem. Again, I believe it is a matter of choice and personal preference

Oh boy.

> Guile is also the default extension language for the GNU project.

AFAIK Guix is the only project that uses Guile and has any actual users (I'm not counting Shepherd because outside GuixSD it is nothing). Guile is like 30 years old, and has been envisioned as "the default extension language for the GNU project" all that time (I was an active contributor for a while, so I should know). Guile is not even used by Emacs; Guile extensibility support in GDB is not even commonly built by distros. Guile is a nice and very competent Scheme implementation and I'd love for it to be useful outside Guix, but that's just not the case, and repeating that slogan won't change it. Seriously, just stop.

> It is the old freedom and responsibility problem

No, it is not. Software development is a social and technical field, not a branch of philosophy.

> AFAIK Guix is the only project that uses Guile and has any actual users

TeXmacs (https://texmacs.org) uses Guile, Gimp uses a Scheme, and learning Guile for Guix should be transferable with little changes to other Schemes.

Oh boy, you didn't even answer my question about Nix. I guess you can't in a way that doesn't concede to my point - guile is definitely not obscure in the sense that nix is.

For what its worth, here is at least one recent funded project that is using Guile:

https://spritely.institute/goblins/

You also seem to think that I am some kind of Guix/Guile evangelist. No (I actually also prefer CL). I just happen to think that Guix is a better solution than Nix and that it uses a much better language.

> No, it is not. Software development is a social and technical field, not a branch of philosophy.

And I guess you get to say what's good and bad in field? Lol

> you didn't even answer my question about Nix.

Your question was basically "is this DSL generally useful outside the domain it's been designed for?", so I thought it was rhetorical. That said, the domain of building, configuring and packaging software is not exactly tiny and is only getting bigger as time goes on (which is more bad than good in itself, but beside the point)!

How useful is the DSL implemented by Guix outside Guix itself? What's the comparative mental footprint of that vs. base Guile? Things get interesting when you think them through honestly and avoid stale slogans.

regardless of who is right, the fervent opinions and bless-your-hearts in this thread tell me that I'm better off using neither. Purity tests are fucking dumb, escalating goalposts are fucking dumb, worrying about how others compute is fucking dumb. We're all nerds here, there's no need for this level of emotional investment into other people's opinions..
You're absolutely right, but if that makes you not try something you might be missing out. For example, Rust is probably my favorite programming language (definitely my favorite native-code-producing one) even though I find some of the community extremely off-putting.
> What do you gain from learning Nix, asside from Nix?

Nix is a small and approachable lazy pure-functional language. You can learn a fair bit of functional programming by reading nixpkgs, which is frequently recommended even if you never use it in the real world.

> by learning Guile you learn a lisp which some people find quite enlightening.

By learning nix you learn a FP language which some people find quite enlightening.

Personally I can't find any software which I would want to contribute to or extend which uses guile (except GDB which can also be extended with python), so the "you ain't gonna need it" argument holds for guix too.

It's just such an odd argument for a relatively minor difference between the two ecosystems.

What you say would be the case if Nix uses Haskell or Guix uses some obscure purpouse made lisp
again, you said

> by learning Guile you learn a lisp which some people find quite enlightening

so learning a lisp is enlightening, but learning a FP language is not

> Moreover by learning Guile you learn a lisp which some people find quite enlightening. What do you gain from learning Nix, asside from Nix?

This thread is baffling. cmm is asking a fairly simple question. He's not trying to make a point. If people don't have the answer, they need not respond! There are so many responses to him - none answering his question.

lol everyone seems to be baffled in this thread. i am just adressing his claim that guile and nix are equally obscure. which to me is just plain silly
If you're into Lisp/Scheme, it sounds silly.

If you're part of the 99% who know little of Lisp languages, he is correct. There's not much of a difference between 0.001% and 0.01%, when you're working in numbers like 20+%.