| 17 Jan 2025 |
Profpatsch | Originally, this used the same idea with dhall-to-nix, but dhall is kind of a lost cause ino | 15:47:59 |
Profpatsch | *imo | 15:48:01 |
Profpatsch | purescript is not great, but works better | 15:48:15 |
Profpatsch | I’d just advise strongly against trying to compile the purescript stdlib to nix | 15:48:37 |
Profpatsch | and instead use it as a very simple nix frontend with typing | 15:48:48 |
Profpatsch | e.g. all of these are just pkgs.lib functions passed through from the nix side verbatim with type annotations https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/purs/XdgOpen.purs#L6 | 15:49:20 |
Profpatsch | I really like that you can just foreign-import named versions of + and ++ from the nix side and then create infix operators on the purescript side again | 15:50:48 |
Profpatsch | nrs-status: A major unsolved problem I have is that there’s no real way to pass things from outside to the foreign-import mechanism so far | 15:52:07 |
Profpatsch | e.g. https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/purs/XdgOpen.nix | 15:52:11 |
Profpatsch | I do an import <nixpkgs> {}; here which is super wasteful | 15:52:22 |
Profpatsch | that’s a hard blocker | 15:52:25 |
Profpatsch | i.e. would need to patch purs-to-nix to deal with this | 15:52:45 |
Profpatsch | In this case it was ~somwhat okay because I used only lib functions and no packages | 15:53:36 |
Profpatsch | well, I guess I worked around it by having main be a function which takes everything it needs, but that’s not very ergonomic cause then I can’t use any of the foreign import system for that | 15:54:53 |
thirdofmay18081814goya | hmm thanks a lot for the comments I can't totally parse yet, I'll begin reading source a bit and come back | 15:56:36 |
thirdofmay18081814goya | * hmm thanks a lot for the comments I can't totally parse this yet, I'll begin reading source a bit and come back | 15:56:44 |
Profpatsch | :) | 16:02:22 |
Profpatsch | have fun | 16:02:25 |
sterni (he/him) | alexfmpe: HLS also has the problem that we track what versions are supported in two different places, we need to clean that up at some point. | 16:04:52 |
alexfmpe | When I am king, there will be a tax on non DRY | 16:06:54 |
alexfmpe | It will kill the likes of Go | 16:07:45 |
sterni (he/him) | it's not super obvious where to put it, the problem is mainly that you need to access it from two jobset definitions, so just putting it in a passthru attribute doesn't work super well | 16:08:36 |
sterni (he/him) | you don't really want them to parse hackage-packages.nix another time if you can help it | 16:09:21 |
sterni (he/him) | pkgs.haskell-language-server.passthru would be possible ig? | 16:09:57 |
sterni (he/him) | bit weird | 16:10:00 |
alexfmpe | We can always add some stupid new file with constants no? | 16:14:07 |
alexfmpe | # my silly file
defaultPackageSet = "98"
defaultHLSSupport = [defaultPackageSet, maybeOthers...] | 16:16:29 |
Profpatsch | sternenseemann: project-wide search&replace on unique names >>> DRY | 16:21:50 |
Profpatsch | :P | 16:21:53 |
chreekat | DRY is in frequent conflict with YAGNI | 17:38:01 |