!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

722 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/145 Servers

Load older messages


SenderMessageTime
17 Jan 2025
@profpatsch:augsburg.oneProfpatsche.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#L615:49:20
@profpatsch:augsburg.oneProfpatschI 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 again15:50:48
@profpatsch:augsburg.oneProfpatschnrs-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 far15:52:07
@profpatsch:augsburg.oneProfpatsche.g. https://github.com/openlab-aux/vuizvui/blob/master/pkgs/profpatsch/xdg-open/purs/XdgOpen.nix15:52:11
@profpatsch:augsburg.oneProfpatsch I do an import <nixpkgs> {}; here which is super wasteful 15:52:22
@profpatsch:augsburg.oneProfpatschthat’s a hard blocker15:52:25
@profpatsch:augsburg.oneProfpatschi.e. would need to patch purs-to-nix to deal with this15:52:45
@profpatsch:augsburg.oneProfpatschIn this case it was ~somwhat okay because I used only lib functions and no packages15:53:36
@profpatsch:augsburg.oneProfpatsch 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
@nrs-status:matrix.orgthirdofmay18081814goyahmm thanks a lot for the comments I can't totally parse yet, I'll begin reading source a bit and come back15:56:36
@nrs-status:matrix.orgthirdofmay18081814goya* hmm thanks a lot for the comments I can't totally parse this yet, I'll begin reading source a bit and come back15:56:44
@profpatsch:augsburg.oneProfpatsch:)16:02:22
@profpatsch:augsburg.oneProfpatschhave fun16:02:25
@sternenseemann:systemli.orgsterni (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:matrix.orgalexfmpeWhen I am king, there will be a tax on non DRY16:06:54
@alexfmpe:matrix.orgalexfmpeIt will kill the likes of Go16:07:45
@sternenseemann:systemli.orgsterni (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 well16:08:36
@sternenseemann:systemli.orgsterni (he/him) you don't really want them to parse hackage-packages.nix another time if you can help it 16:09:21
@sternenseemann:systemli.orgsterni (he/him) pkgs.haskell-language-server.passthru would be possible ig? 16:09:57
@sternenseemann:systemli.orgsterni (he/him)bit weird16:10:00
@alexfmpe:matrix.orgalexfmpeWe can always add some stupid new file with constants no?16:14:07
@alexfmpe:matrix.orgalexfmpe# my silly file defaultPackageSet = "98" defaultHLSSupport = [defaultPackageSet, maybeOthers...]16:16:29
@profpatsch:augsburg.oneProfpatschsternenseemann: project-wide search&replace on unique names >>> DRY 16:21:50
@profpatsch:augsburg.oneProfpatsch:P16:21:53
@b:chreekat.netchreekatDRY is in frequent conflict with YAGNI17:38:01
@bowuigi---now-more-based:kde.org@bowuigi---now-more-based:kde.orgYAGNI?17:38:43
18 Jan 2025
@b:chreekat.netchreekat @bowuigi---now-more-based:kde.org: you aren't gonna need it 08:47:05
@b:chreekat.netchreekat= avoid early abstraction as you would avoid early optimization 08:48:05
@bowuigi---now-more-based:kde.org@bowuigi---now-more-based:kde.orgAh, yeah those seem in conflict08:50:58
@alex:tunstall.xyzAlex
In reply to @b:chreekat.net
DRY is in frequent conflict with YAGNI

DRY: don't write the same thing twice
YAGNI: don't define something you don't (yet) need

I can see how they conflict when applied loosely, but applying DRY carefully should be OK.

13:27:32

Show newer messages


Back to Room ListRoom Version: 6