21 Oct 2024 |
emily | In reply to @kfears:matrix.org I'm pretty sure map or mapAttrs wasn't always in builtins, it was only in NixLang, but it got added later so now we have builtins.map and lib.map and it's the same thing but different perf no?? | 22:04:53 |
emily | lib just re-exports stuff from builtins
| 22:05:10 |
KFears (tragedy arc) | Oh, that makes sense | 22:05:41 |
mjm | yeah lib.map should be identical to builtins.map | 22:05:43 |
KFears (tragedy arc) | Yeah basically that's why stdlib is confusing | 22:06:08 |
mjm | what is confusing about it | 22:06:59 |
emily | you usually should not have to think about builtins at all | 22:08:41 |
emily | just use lib | 22:08:45 |
Judson | Anyone have an idea about why myYarnPackage would fail on missing executables that should be provided by the package.json devDependencies? | 22:08:46 |
emily | what is implemented as a primitive should be of no concern | 22:09:00 |
mjm | In reply to @emilazy:matrix.org just use lib this is the way | 22:09:02 |
KFears (tragedy arc) | In reply to @mjm:midna.dev what is confusing about it Two namespaces that are grouped based on history and performance rather than some logical grouping | 22:09:25 |
KFears (tragedy arc) | In reply to @emilazy:matrix.org just use lib Also I was always using builtins when possible :/ | 22:09:55 |
KFears (tragedy arc) | Even when operating entirely in the scope of Nixpkgs | 22:10:04 |
mjm | lib literally re-exports everything in builtins I think | 22:10:02 |
KFears (tragedy arc) | The more you learn, I guess | 22:10:14 |
mjm | so you don’t actually need to care | 22:10:22 |
emily | it's more like builtins is an implementation detail | 22:10:36 |
emily | In reply to @mjm:midna.dev lib literally re-exports everything in builtins I think maybe not stuff like unsafeGetAttrPos? or maybe it does | 22:10:58 |
emily | but the stuff it doesn't re-export is precisely the stuff you shouldn't use normally | 22:11:16 |
emily | if it exists | 22:11:18 |
mjm | In reply to @emilazy:matrix.org maybe not stuff like unsafeGetAttrPos? or maybe it does yeah not 100% sure. Certainly nothing I’ve tried to actually use in practice | 22:12:27 |
KFears (tragedy arc) | In reply to @emilazy:matrix.org it's more like builtins is an implementation detail Maybe that's a good way to think about it | 22:16:26 |
KFears (tragedy arc) | I've been bamboozled one too many times to believe I can use Nix without thinking of what is implementation detail and what's not and what the detail is | 22:17:02 |
KFears (tragedy arc) | And in this case I'm probably actually wrong | 22:17:13 |
KFears (tragedy arc) | So thanks for the tip, I'll use lib a lot more liberally now | 22:17:21 |
Sami Liedes | In reply to @kfears:matrix.org And in this case I'm probably actually wrong How often have you thought this way and been bitten by having been wrong about having been wrong? | 22:24:57 |
KFears (tragedy arc) | In the case of Nix, I think that's around the 3rd time in total? Not quite sure | 22:26:44 |
KFears (tragedy arc) | Usually, I've been thinking "this sounds pretty complex" and the details about how complex it actually is made me despair :/ | 22:30:09 |
Sami Liedes | TBH I think it's hard to count how many times you've been wrong if you've first thought something, then thought you're wrong and then realize you weren't after all. I think there's some way to hide Gödel there. | 22:30:24 |