| 18 Oct 2025 |
| turbio joined the room. | 00:22:00 |
| @kevincox:matrix.org left the room. | 10:22:56 |
| uvla changed their display name from Uv La to uvla. | 13:51:48 |
| Belligerent Engine joined the room. | 17:32:07 |
| Devon joined the room. | 22:57:11 |
| 19 Oct 2025 |
| cedricgc joined the room. | 03:36:39 |
| @azahi:azahi.cc left the room. | 15:47:15 |
| 20 Oct 2025 |
| flax changed their profile picture. | 04:36:57 |
| @perpetrator1:matrix.org changed their profile picture. | 11:19:01 |
| @vlmutolo:matrix.org left the room. | 15:54:23 |
| 21 Oct 2025 |
| @perpetrator1:matrix.org left the room. | 03:20:00 |
| adam (moved to @adam:matrix.system72.dev) joined the room. | 11:47:17 |
| 22 Oct 2025 |
| 0xcafca changed their profile picture. | 10:21:40 |
| 0xcafca changed their profile picture. | 10:23:21 |
emily | is there a practical way to enumerate what builtins are available at the top-level scope? | 15:09:44 |
emily | i.e. something that detects true but not tryEval | 15:09:55 |
emily | (preferably within-language, otherwise just… nix eval --expr foo works) | 15:10:06 |
emily | I guess the list is small enough to special-case | 15:10:30 |
| sebaguardian joined the room. | 15:52:28 |
| ramram.ink joined the room. | 15:57:02 |
Philip Taron (UTC-8) | When I did this, @emily, I did it like this:
$ for n in $(nix-instantiate --strict --eval --json --expr 'builtins.attrNames builtins' | jq -r '.[]'); do nix-instantiate --parse --expr "$n" 2>/dev/null; done
abort
baseNameOf
break
builtins
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
| 16:49:20 |
Philip Taron (UTC-8) | When I did this, @emily , I did it like this:
$ for n in $(nix-instantiate --strict --eval --json --expr 'builtins.attrNames builtins' | jq -r '.[]'); do nix-instantiate --parse --expr "$n" 2>/dev/null; done
abort
baseNameOf
break
builtins
derivation
derivationStrict
dirOf
false
fetchGit
fetchMercurial
fetchTarball
fetchTree
fromTOML
import
isNull
map
null
placeholder
removeAttrs
scopedImport
throw
toString
true
| 16:49:33 |
emily | it turns out you can use :env in the debugger | 16:49:39 |
emily | though it's not very nice structured output | 16:49:45 |
Philip Taron (UTC-8) | Yeah, I wanted to get something that I could run across Nix versions, so I biased towards "knowing" that builtins was the source of the top-level names. | 16:50:56 |
Philip Taron (UTC-8) | Yeah, I wanted to get something that I could run across Nix versions, so I biased towards "knowing" that builtins was the source of the top-level names. And definitely didn't need a pseudo-terminal, etc. | 16:51:15 |
Philip Taron (UTC-8) | $ echo ':env' | nix eval --debugger --expr 'break 1'
info: breakpoint reached
Nix 2.31.2 debugger
Type :? for help.
Env level 0
builtins true false null fromTOML fetchTree fetchTarball fetchGit fetchMercurial scopedImport import isNull break abort throw derivationStrict placeholder baseNameOf dirOf removeAttrs map toString derivation
error:
… while calling the 'break' builtin
at «string»:1:1:
1| break 1
| ^
error: breakpoint reached
huh | 16:53:09 |
Philip Taron (UTC-8) | $ echo ':env' | nix eval --debugger --expr 'break 1' 2>/dev/null | rg 'Env level 0' -A1 | tail -1
builtins true false null fromTOML fetchTree fetchTarball fetchGit fetchMercurial scopedImport import isNull break abort throw derivationStrict placeholder baseNameOf dirOf removeAttrs map toString derivation
| 16:53:58 |
emily | now can you explain why break isn't in there? 😆 | 19:15:19 |
emily | oh it is | 19:15:23 |