[Nix-dev] Anyone care to review my post on the Nix expression language?

Wout Mertens wout.mertens at gmail.com
Wed Oct 8 18:50:20 CEST 2014


Hi James,

great reading, I learned a few things! (like that let is a recursive
definition, doh :) )

Nix does support the / operator, but it needs spaces or it will be
recognized as a path:
 $ nix-instantiate --eval --expr '4/3'
/Users/wmertens/4/3
 $ nix-instantiate --eval --expr '6 / 3'
2

https://github.com/NixOS/nix/blob/b6809608cc467925db44b1eb435095c37e433255/src/libexpr/parser.y#L347

Wout.

PS: (You know that the default-values example is still marked TODO, right?)



On Wed, Oct 8, 2014 at 11:31 AM, Ellis Whitehead <ellis.whitehead at gmail.com>
wrote:

> Hi James.  For what it's worth: I haven't finished it yet, but I've
> enjoyed the reading so far.
>
> On Wed, Oct 8, 2014 at 12:21 AM, James Harrison Fisher
> <jameshfisher at gmail.com> wrote:
> > Hi all,
> >
> > I’ve written up what turned out to be a quite extensive post on the Nix
> expression language:
> >
> >     https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
> >
> > I was hoping that someone with more knowledge than me could read it and
> comment on inaccuracies. I’m sure there will be some, since I’m learning
> while writing.
> >
> > Any and all comments appreciated!
> >
> > Best,
> >
> > James
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141008/ab40ad00/attachment-0001.html 


More information about the nix-dev mailing list