3 ms·
Developer exercise is still lacking in Haskell ecosystem. Slow build times, deployment to Linux when developing on macos still pain. Deployment is pain special
by faangguyindia 5mo ago
Developer exercise is still lacking in Haskell ecosystem.
Slow build times, deployment to Linux when developing on macos still pain. Deployment is pain specially on commodity VPS.
Go is very easy to cross compile and deploy.
But Haskell is better for a few things, but I've hardtime deploying it
- frogulis 5mo ago> Deployment is pain specially on commodity VPS. Oh? Why is that?
- sshine 5mo agoI can only think of memory usage during compilation. That’s why I had to precompile binaries, which means cross-compile. Then if you add cross-OS, bundling a properly linked or statically linked binary is not that easy.
- isatty 5mo agoYou can use the GHC musl container: benz0li/ghc-musl:9.8.4 to create static binaries. I've specialized that into -arm64 and -amd64 containers for forgejo actions. Anytime I push to my Haskell repos my actions automatically create static binaries for installation on my nodes.
- internet_points 5mo agoCross compilation could definitely be easier :-/ I tend to just use github actions and compile from whatever architecture it should run on, so that's a workaround. I long for a day when I can just `cabal build --platform=amd64` etc. and it Just Works without having to download and compile a horde of foreign libs or set up a vm
- instig007 5mo ago> cabal build --platform=amd64 It's almost a one-liner + a nix derivation import, works within a minute on incremental builds even on large projects: https://input-output-hk.github.io/haskell.nix/tutorials/cross-compilation.html https://input-output-hk.github.io/haskell.nix/tutorials/cros...
- faangguyindia 5mo agobut does it require installing nix on mac? also many people are not familiar with nix and brew does all i need.
- instig007 5mo ago> but does it require installing nix on mac? yes: sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) https://nixos.org/download/ https://nixos.org/download/ > also many people are not familiar with nix and brew does all i need it's a good reason to learn Nix then: it will completely replace your brew and offer an ultimate build tool suitable for any software stack moving forward. And you'll get cross-platform and static Haskell builds.
- pjmlp 5mo agoGHCi exists, embrace the REPL.