infinisil changed the topic of #nix-lang to: Channel for discussing Nix as a language - https://nixos.org/nix/manual/#chap-writing-nix-expressions - Logs: https://logs.nix.samueldr.com/nix-lang/
pie_ has quit [Remote host closed the connection]
pie_ has joined #nix-lang
jtojnar has quit [Remote host closed the connection]
__monty__ has joined #nix-lang
pie_ has quit [Ping timeout: 258 seconds]
Synthetica has joined #nix-lang
pie_ has joined #nix-lang
pie___ has joined #nix-lang
pie_ has quit [Ping timeout: 244 seconds]
<infinisil> pie__: How could that not be ambiguous?
<pie___> infinisil, I haven't thought of anything.
<infinisil> Ah
<pie___> obviously you couldnt just do ghidra.extend (import /home/nixos/stuff/fiddb/nix/plugin.nix).withPlugins (p: with p; [ ghidra-scala-loader ])
<Taneb> forthnix
<pie___> i really should try forth, ENOTIME, not sure id like it though
<pie___> i probably do lik to have a bit of syntax
<pie___> its nice if data flows left to right sometimes yknow? :P
<Taneb> It's certainly something I want to mess around with
<pie___> Try All The Programming Paradigms
jtojnar has joined #nix-lang
<Taneb> Absolutely
<pie___> the reason i feel like this might make some sense is when youre basically transforming sets
<pie___> which doesnt sound unreasonable in nix
pie_ has joined #nix-lang
pie___ has quit [Ping timeout: 276 seconds]
<infinisil> I did once write a hacky compose function
<infinisil> > :v composeHack
<{^_^}> composeHack = a: if lib.isFunction a then b: if lib.isFunction b then composeHack (x: a (b x)) else a b else a
<infinisil> > composeHack (x: x + 1) (x: x * 2) 3
<{^_^}> 7
<infinisil> > composeHack (x: x + 1) (x: x * 2) (x: x + 10) (x: x * 3) 3
<{^_^}> 39
<infinisil> That seems relevant
<infinisil> Also you could use an even hackier construct
<infinisil> > (function 1 2 3 4).args
<{^_^}> [ 1 2 3 4 ]
<infinisil> > (function 1 2 3 4 6 7).args
<{^_^}> [ 1 2 3 4 6 7 ]
<infinisil> > :v function
<{^_^}> function = { __functor = self: arg: self // { args = self.args ++ [ arg ]; }; args = []; }
pie_ has quit [Remote host closed the connection]
pie___ has joined #nix-lang
pie___ has quit [Remote host closed the connection]
pie___ has joined #nix-lang
pie_ has joined #nix-lang
pie___ has quit [Ping timeout: 250 seconds]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nix-lang
jtojnar_ is now known as jtojnar
Synthetica has quit [Quit: Connection closed for inactivity]
<pie_> ok this is kind of weird
<pie_> > let f = pls: baseNameOf "asd/wat.dic"; baseNameOf = (f: f); in f 1
<{^_^}> "asd/wat.dic"
<pie_> but
<pie_> > f = pls: baseNameOf "asd/wat.dic"
<{^_^}> f defined
<pie_> > let baseNameOf = (f: f); in f 1
<{^_^}> "wat.dic"
<pie_> why doesnt the first one work like the second one
<__monty__> In the first one you redefine a name in a mutually recursive scope. In the third you happen to shadow baseNameOf from the outer scope but f's already closed over that and you shadow f in the body but that doesn't come into play.
<pie_> oh the shadowing f was a coincidence oops
pie___ has joined #nix-lang
pie_ has quit [Ping timeout: 245 seconds]
pie___ has quit [Ping timeout: 258 seconds]
srhb has quit [Quit: ZNC 1.7.3 - https://znc.in]
srhb has joined #nix-lang
pie_ has joined #nix-lang
__monty__ has quit [Quit: leaving]
ddellacosta has joined #nix-lang
kyren has quit [Quit: ZNC 1.7.2 - https://znc.in]
kyren has joined #nix-lang
ddellacosta has quit [Ping timeout: 276 seconds]
n_db has joined #nix-lang