!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

721 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org144 Servers

Load older messages


SenderMessageTime
10 Feb 2025
@alexfmpe:matrix.orgalexfmpe9.10 payload sizes I think?22:05:51
@alexfmpe:matrix.orgalexfmpebut that build doesn't need to be 8.10 ghcjs right?22:08:37
@maralorn:maralorn.demaralornBy the way throwing flakes, the new js backend, haskell.nix, nixops and jsaddle-warp together sounds a bit like FUD to me. I get the sentiment, but no one is forcing you to use haskell.nix or flakes and this is all orthogonal to deployment. If you say, that you are currently using ghcjs in nixpkgs and that there are specific things missing for you to switch to the new backend, that is a very valuable data point.22:10:38
@dmjio:matrix.org@dmjio:matrix.org

maralorn: three things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:00
@dmjio:matrix.org@dmjio:matrix.org *

maralorn: three 4 things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:13
@dmjio:matrix.org@dmjio:matrix.org *

maralorn: three 4 things particular

  1. Linking (JS file concatenation) can cause OOMs (still) in CI servers - I think this has always been a problem though.
  2. The optimizer that typically runs was disabled (I'm not sure if they fixed that upstream, but modifications to it caused them to rethink)
  3. Closure compiler support stopped working and payload size got much larger
  4. Newer versions of nix don't work with miso's default version of nixpkgs on Darwin. ld: file not found: /usr/lib/system/libcache.dylib for architecture x86_64
22:12:38
@dmjio:matrix.org@dmjio:matrix.orghttps://github.com/ghcjs/ghcjs/issues/821#issuecomment-112938836622:13:14
@alexfmpe:matrix.orgalexfmpe
  1. This is the thing that got disabled in 8.10 I believe. I seem to recall in #ghc-js-backend:matrix.org them telling me that thing in particular was still disabled, but a ton of other optimizations had been done that probably maked up for it
    One of the reasons I was getting miso-examples building in nixpkgs was to peek at the resulting sizes but I'm a bit confused on whether I have the right output due to some "undefined" errors when running.
    FWIW, here's what I got so far on my branch (no closure compiler AFAICT)
> l $(NIXPKGS_ALLOW_BROKEN=1 nix-build -A pkgsCross.ghcjs.haskell.packages.ghc912.miso-examples)/bin
total 110M
dr-xr-xr-x 1 root root  160 jan  1  1970 .
dr-xr-xr-x 1 root root   16 jan  1  1970 ..
-r-xr-xr-x 2 root root 9.3M jan  1  1970 canvas2d
-r-xr-xr-x 2 root root 9.6M jan  1  1970 compose-update
-r-xr-xr-x 2 root root 9.7M jan  1  1970 file-reader
-r-xr-xr-x 2 root root 9.7M jan  1  1970 mario
-r-xr-xr-x 2 root root 9.2M jan  1  1970 mathml
-r-xr-xr-x 2 root root  12M jan  1  1970 router
-r-xr-xr-x 2 root root  11M jan  1  1970 svg
-r-xr-xr-x 2 root root 9.4M jan  1  1970 threejs
-r-xr-xr-x 2 root root  11M jan  1  1970 todo-mvc
-r-xr-xr-x 2 root root  11M jan  1  1970 websocket
-r-xr-xr-x 2 root root  11M jan  1  1970 xhr
22:15:31
@maralorn:maralorn.demaralornkk. I know 1, I don’t know how problematic that is. 2. is not completely solved but the new backend is better than ghcjs 8.10 afaict. 3. I thought that closure compiler works with the new backend (see: https://blog.haskell.org/case-study-foreign-integration-js-browser/).22:15:33
@alexfmpe:matrix.orgalexfmpeso that's ~10MB pre closure compiler and pre-compression22:16:15
@alexfmpe:matrix.orgalexfmpewhich doesn't sound too big given I've reached 100MB on 8.10 at that stage hhe22:16:41
@alexfmpe:matrix.orgalexfmpe* which doesn't sound too big given I've reached 100MB on 8.10 at that stage heh22:16:45
@maralorn:maralorn.demaralornBut if 2. is really a problem for you, does that mean you are still on ghcjs 8.6? If yes, then you are currently not on a working nixpkgs and us dropping 8.10 wouldn’t make a difference, would it?22:16:56
@maralorn:maralorn.demaralorn* But if 2. is really a problem for you, does that mean you are still on ghcjs 8.6? If yes, then you are currently not on an up-to-date nixpkgs and us dropping 8.10 wouldn’t make a difference, would it?22:17:26
@dmjio:matrix.org@dmjio:matrix.orgWell yes and no, if you don't keep in lockstep with the community eventually everything bitrots to the point where it can't be built. That's why nix has been great so far, but the critical mass of the community is converging around tooling that introduces imo significant regression22:17:57
@maralorn:maralorn.demaralornI would understand that. We are on 8.6 at work exactly for this reason. That is why we don’t care about dropping 8.10 its useless to use anyway.22:18:06
@dmjio:matrix.org@dmjio:matrix.org I'm personally not, but other people I know who use miso at work do use 8.10 22:18:29
@dmjio:matrix.org@dmjio:matrix.orgOk then we're in the same boat22:18:48
@alexfmpe:matrix.orgalexfmpeIsn't miso's nixpkgs pin ~2 years old? The same goes for reflex-platform which is why we had been assuming everyone would jump from old nixpkgs with 8.x ghcjs to new nixpkgs with 9.12+22:19:21
@alexfmpe:matrix.orgalexfmpethe question is whether anyone needs a new nixpkgs with a 8.x ghcjs22:19:38
@maralorn:maralorn.demaralornAnyway we can’t do anything about flakes. And we in this channel generally don’t want to switch to haskell.nix. The bitrotting of ghcjs is sad, but that’s why it is awesome that there is the new backend.22:20:04
@maralorn:maralorn.demaralorn* I would understand that. We are on 8.6 at work exactly for this reason. That is why we don’t care about dropping 8.10 its useless to us anyway.22:20:13
@dmjio:matrix.org@dmjio:matrix.org6 years old22:21:07
@rosscomputerguy:matrix.orgTristan Ross
In reply to @dmjio:matrix.org
6 years old
That's a little scary
22:21:20
@alexfmpe:matrix.orgalexfmpewow22:21:35
@maralorn:maralorn.demaralornAnd the authors of the old and the new backend (which are largely the same people) told me that the new backend is already much better than the old one.22:21:48
@maralorn:maralorn.demaralornOur pin at work is roughly the same age. 😄22:22:00
@dmjio:matrix.org@dmjio:matrix.org yea, but the cache makes it work well. Users end up building w/ two differrent compilers, and do code sharing w/ simple types. But we did have an issue where FromJSON changed. 22:22:29
@dmjio:matrix.org@dmjio:matrix.org * yea, but the cache makes it work well. Users end up building w/ two differrent compilers, and do code sharing w/ simple types. But we did have an issue where a FromJSON instance changed. 22:22:42
@alexfmpe:matrix.orgalexfmpecan you easily look at the pre-closure pre-compressed payload sizes for miso-examples with your 8.6 pin and compare to these? because if they're similar, then 2 at least isn't a problem yet22:23:19

Show newer messages


Back to Room ListRoom Version: 6