Re: [Nix-dev] Nix 1.2 released

2012-12-13 Thread Florian Friesdorf
Andres Loeh ks...@andres-loeh.de writes: Why don't you just try it? $ echo 'let lib = import nixpkgs/pkgs/lib/default.nix; in lib.elem 1 [1 2 (throw boo)]' | nix-instantiate --eval-only - true $ echo 'let lib = import nixpkgs/pkgs/lib/default.nix; in lib.elem 2 [1 2 (throw boo)]' |

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 02:30 AM, Mathijs Kwik wrote: On Wed, Dec 12, 2012 at 3:38 AM, Shea Levy s...@shealevy.com wrote: On 12/11/2012 09:28 PM, Florian Friesdorf wrote: Hi Eelco, great work! Eelco Dolstra eelco.dols...@logicblox.com writes: * Nix no longer sets the immutable bit on files in

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Eelco Dolstra
Hi, On 12/12/12 03:28, Florian Friesdorf wrote: * New primops: concatLists, elem, elemAt and filter. The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy enough: elem = builtins.elem or

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 11:07 AM, Eelco Dolstra wrote: Hi, On 12/12/12 03:28, Florian Friesdorf wrote: * New primops: concatLists, elem, elemAt and filter. The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Eelco Dolstra
Hi, On 12/12/12 17:15, Shea Levy wrote: The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy enough: elem = builtins.elem or (x: list: fold (a: bs: x == a || bs) false list);

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 11:20 AM, Eelco Dolstra wrote: Hi, On 12/12/12 17:15, Shea Levy wrote: The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy enough: elem = builtins.elem or (x:

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Eelco Dolstra
Hi, On 12/12/12 17:24, Shea Levy wrote: Huh? I didn't change the argument order, this is still a left fold. this just short-circuits the eval of (x == a) when bs is true. fold is actually a right fold :-) -- Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 11:30 AM, Eelco Dolstra wrote: Hi, On 12/12/12 17:24, Shea Levy wrote: Huh? I didn't change the argument order, this is still a left fold. this just short-circuits the eval of (x == a) when bs is true. fold is actually a right fold :-) Oh, right. Sorry for the noise.

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Florian Friesdorf
Eelco Dolstra eelco.dols...@logicblox.com writes: Hi, On 12/12/12 17:15, Shea Levy wrote: The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy enough: elem = builtins.elem or (x:

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 01:12 PM, Florian Friesdorf wrote: Eelco Dolstra eelco.dols...@logicblox.com writes: Hi, On 12/12/12 17:15, Shea Levy wrote: The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy

Re: [Nix-dev] Nix 1.2 released

2012-12-12 Thread Shea Levy
On 12/12/2012 01:12 PM, Florian Friesdorf wrote: Eelco Dolstra eelco.dols...@logicblox.com writes: Hi, On 12/12/12 17:15, Shea Levy wrote: The elem library function evaluates all list elements instead of returning true after finding a matching element. Sure about that? This seems lazy

Re: [Nix-dev] Nix 1.2 released

2012-12-11 Thread Florian Friesdorf
Hi Eelco, great work! Eelco Dolstra eelco.dols...@logicblox.com writes: * Nix no longer sets the immutable bit on files in the Nix store. Instead, the recommended way to guard the Nix store against accidental modification on Linux is to make it a read-only bind mount, like this:

Re: [Nix-dev] Nix 1.2 released

2012-12-11 Thread Shea Levy
On 12/11/2012 09:28 PM, Florian Friesdorf wrote: Hi Eelco, great work! Eelco Dolstra eelco.dols...@logicblox.com writes: * Nix no longer sets the immutable bit on files in the Nix store. Instead, the recommended way to guard the Nix store against accidental modification on Linux

Re: [Nix-dev] Nix 1.2 released

2012-12-08 Thread Marc Weber
Excerpts from Eelco Dolstra's message of Fri Dec 07 17:03:58 +0100 2012: So change your script... :-) I mean, you could make the same argument about the out variable. Yes / no. lib is a very common name RUBYLIB PERLLIB etc. I have never seen RUBYOUT or the like. For the same reason why does

[Nix-dev] Nix 1.2 released

2012-12-07 Thread Eelco Dolstra
Hi, I'm pleased to announce the availability of a new stable release of the Nix package manager. Release 1.2 can be found at http://hydra.nixos.org/release/nix/nix-1.2 This release has the following improvements and changes: * Nix has a new binary substituter mechanism: the binary cache.

Re: [Nix-dev] Nix 1.2 released

2012-12-07 Thread Mathijs Kwik
Nice, just 2 days late for a sinterklaas-present :P On Fri, Dec 7, 2012 at 2:31 PM, Eelco Dolstra eelco.dols...@logicblox.comwrote: Hi, I'm pleased to announce the availability of a new stable release of the Nix package manager. Release 1.2 can be found at

Re: [Nix-dev] Nix 1.2 released

2012-12-07 Thread Marc Weber
Thank you all for those improvements * Nix has a new binary substituter mechanism: the binary cache. A binary cache contains pre-built binaries of Nix packages. Whenever Nix wants to build a missing Nix store path, it will check a set of binary caches to see if any of them has

Re: [Nix-dev] Nix 1.2 released

2012-12-07 Thread Shea Levy
On 12/07/2012 10:24 AM, Marc Weber wrote: Thank you all for those improvements * Nix has a new binary substituter mechanism: the binary cache. A binary cache contains pre-built binaries of Nix packages. Whenever Nix wants to build a missing Nix store path, it will check a set of

Re: [Nix-dev] Nix 1.2 released

2012-12-07 Thread Ludovic Courtès
Hi! Congrats on the release. :-) Eelco Dolstra eelco.dols...@logicblox.com skribis: * Store optimisation (replacing identical files in the store with hard links) can now be done automatically every time a path is added to the store. This is enabled by setting the configuration