00:38
globin has joined #nix-lang
02:03
rajivr has joined #nix-lang
03:56
infinisil has quit [Ping timeout: 246 seconds]
03:56
infinisil has joined #nix-lang
06:26
Dotz0cat has quit [Ping timeout: 252 seconds]
06:28
evanjs has quit [Ping timeout: 252 seconds]
06:34
mpickering has quit [Ping timeout: 250 seconds]
06:34
davidtwco has quit [Ping timeout: 246 seconds]
06:36
mpickering has joined #nix-lang
06:36
davidtwco has joined #nix-lang
07:44
evanjs has joined #nix-lang
08:01
evanjs has quit [Read error: Connection reset by peer]
08:05
evanjs has joined #nix-lang
09:27
__monty__ has joined #nix-lang
09:44
ris has quit [Ping timeout: 260 seconds]
09:50
ris has joined #nix-lang
10:52
Dotz0cat has joined #nix-lang
10:55
Dotz0cat_ has joined #nix-lang
10:56
Dotz0cat has quit [Ping timeout: 240 seconds]
17:00
rajivr has quit [Quit: Connection closed for inactivity]
20:00
WilliButz has quit [Remote host closed the connection]
20:01
<
infinisil >
(continued from #nixos-chat)
20:01
<
infinisil >
pie_: Nope
20:02
<
infinisil >
You could, nixlisp is nix in the end
20:02
WilliButz has joined #nix-lang
20:02
<
infinisil >
So you could do `let myfun = args: builtins.elemAt args 0 + 1; in`
20:02
<
infinisil >
I think
20:02
<
pie_ >
thats what i tried and i dont think its workng
20:02
<
infinisil >
Show code?
20:03
<
pie_ >
tracer just ends up tracing the ast node
20:10
<
infinisil >
pie_: Ah yeah, that's kind of expected, because it's lisp :P
20:11
<
infinisil >
Well, some form of crooked lisp
20:11
<
infinisil >
Since I don't actually know any lisp
20:11
<
infinisil >
But `n` is just that, a symbol
20:11
<
infinisil >
Functions like `(plus n 1)` actually evaluate the symbol to its value before adding something
20:13
<
infinisil >
Lemme see how this is possible..
20:20
<
pie_ >
hm, i cant tracer a higher node
20:20
<
pie_ >
or my code is just bad
20:20
<
pie_ >
but : error: 'functionArgs' requires a function, at /nix/store/b44y8fqa9523hcs3krlq4qarsw6nqgxy-nixos-21.05pre275822.916ee862e87/nixos/lib/trivial.nix:334:42
20:20
<
pie_ >
i guess it makes sense that i cant pull this off if everything is just AST and functions get looked up from a scope by name
20:21
<
infinisil >
Yeah I'm starting to suspect that too
20:21
<
pie_ >
oh you know what
20:22
<
pie_ >
the funcitonargs problem is probably because i only remove the functor attr at the top
20:22
<
pie_ >
im not actually sure why it breaks if i dont do that
20:28
<
pie_ >
<sterni> I reverted this five minutes later though because it doesn't work
20:28
<
pie_ >
<pie_> damnit
20:29
<
sterni >
yeah builtins.tryEval is useless :p
20:29
<
sterni >
you can upgrade to nixUnstable it has it fixed
20:29
<
pie_ >
and ive been ranting about it for years
20:29
<
pie_ >
i was surprised you mentioned it and thought it matched the one use case where it does work
20:30
<
sterni >
idk for what it was introduced initially
20:30
<
sterni >
you can probably evaluate nixpkgs using it if you're careful
20:30
<
sterni >
but it's a pain
20:31
<
pie_ >
i wanted it for running tests. of course, it was useless
20:31
<
infinisil >
This allows you to do `(lift builtins.trace n n)`
20:31
<
sterni >
pie_: depends on what your tests do :p
20:32
<
sterni >
this works for certain usecases at least
20:35
aaronjanse has joined #nix-lang
20:37
<
pie_ >
infinisil: im making a guess that this should also allow me to defun the lift
20:37
<
pie_ >
or, def rather?
20:38
<
infinisil >
This can't be done in nixlisp itself
20:38
<
infinisil >
What do you mean by "defun the lift"?
20:38
<
infinisil >
pie_: ^
20:39
<
pie_ >
something like (defun tracer (lift _tracer))
20:39
<
pie_ >
idk what the right keyword would be but you get the idea
20:39
<
pie_ >
basically bindings lol
20:41
<
infinisil >
Yeah, with `(defun tracer (n) (lift _tracer n) (...))`
20:41
<
pie_ >
yeah explicitly passing the args is ez
20:45
<
pie_ >
infinisil: now you can use builtin folds and junk? :P
20:45
<
pie_ >
gotta go fast
20:46
<
infinisil >
Hehe yeah
20:47
<
pie_ >
you could do what emscripten did for js
20:47
<
pie_ >
or asmjs or what
20:48
<
pie_ >
(well nix doesnt have a JIT)
20:48
<
pie_ >
(though im not actually sure what those did other than pick a fast subset of the language or something)
21:09
<
pie_ >
infinisil: this is great even seq works
21:09
<
pie_ >
i didnt check the source but it was not evident offhand if you had anything for sequences of stuff
21:50
__monty__ has quit [Quit: leaving]
21:52
pingiun has quit [Quit: Bye!]
21:54
pingiun has joined #nix-lang