Top
Best
New

Posted by cosmic_quanta 9 hours ago

A technical vision for the Haskell ecosystem(discourse.haskell.org)
171 points | 78 commentspage 2
origini 8 hours ago|
Sooo they are fixing how you install Haskell? :D
rafaelRiv 8 hours ago|
How this was ever a problem ? and today we have ghcup, stack and nix
itishappy 8 hours ago||
That's the problem!

If I'm on NixOS, should I be installing via ghcup, stack, or nix?

Buttons840 7 hours ago|||
The Haskell ecosystem seems obsessed with NixOS in a way I haven't seen anywhere else.

I recall wanting to use Haskell packages that were only available in Nix, but nobody had bothered to make just a normal package.

petra 5 hours ago||
If you want to create an ecosystem optimized towards correctness, you'll have to curate what you let inside, and drop many things. And Nix is probably the best package manager for correctness.

That of course hurts market share.

Buttons840 2 hours ago||
There is no correct, only pros and cons. How you weight the pros and cons will not be the same as everyone else.
wasted_intel 8 hours ago|||
To be fair, that’s a general problem on NixOS (and other OSes), and one that tools like devenv have tried to solve. You can take what’s included with OS packages, but then you’re stuck with whatever version that is.
chriswarbo 6 hours ago||
> You can take what’s included with OS packages, but then you’re stuck with whatever version that is.

It's pretty easy to override things in Nixpkgs though, whether at the system level, or for one application, or just a particular dependency deep in the tree of one script.

Nixpkgs has a bunch of powerful functions to make this easier, e.g. callCabal2nix, makePackageSet, etc.

https://nixos.org/manual/nixpkgs/stable/#haskell-overriding-...

https://github.com/NixOS/nixpkgs/blob/master/pkgs/developmen...

jimbokun 7 hours ago||
Is it even possible for Haskell to have compilation times similar to Go, given the language semantics?
jose_zap 4 hours ago|
It is definitely possible for incremental compilation, but requires more work in that area. It is possible today in interpreter mode.
galacticaactual 6 hours ago||
In before a certain defense tech engineer in 3...2...1
smitty1e 4 hours ago||
> Beginners: the onboarding experience must be our benchmark for usability

OK, so I put this into Gemini: "show me a non-trivial haskell function and type signature with at least five distinct arguments"

And I get:

---

processRecord :: (a -> b) -> Maybe c -> [d] -> (e -> Bool) -> (b, c, [d], e) -> Either String (b, c, [d], e)

processRecord transform mVal items pred (bVal, cVal, dList, eVal)

  | pred eVal = Right (transform (const bVal undefined) mVal, cVal, dList, eVal) -- simplified example logic

  | otherwise = Left "Predicate failed on the fifth argument"
---

My brain just crashes after the "::".

For the beginner, there isn't enough syntax on offer to discern who's doing what to whom here.

Is there a "function signatures for dummys" somewhere?

kccqzy 4 hours ago||
Your brain crashes just because of unfamiliarity with the syntax. Just mentally translate it into C++ or Rust syntax.

    template<typename A, typename B, typename C, typename D, typename E>
    std::variant<std::string, std::tuple<B, C, std::vector<D>, E> processRecord(std::function_ref<B(A const&)>, std::optional<C> const&, std::span<D>, std::function_ref<bool(E const&)>, std::tuple<B, C, std::vector<D>, E>);
This familiarity can be gained in frankly a day or two of trying, and afterwards you’ll find it to be clear and information dense. The example doesn’t even involve anything truly mind blowing for a beginner yet, like the Traversable class, the lens/traversal/prism signatures, or polymorphic recursion.
lambdas 4 hours ago|||
Huh? How would that be a good criteria - how many languages exist where a non-user can easily grok non trivial functions with at least five distinct arguments?

If someone told me German was easy to learn, I wouldn’t get an LLM to generate me a complex sentence with two clauses and three adjectives and then be like “sure about that?”

`processRecord :: (a -> b) -> Maybe c -> [d] -> (e -> Bool) -> (b, c, [d], e) -> Either String (b, c, [d], e)`

Says: “ give me: 1) a function of a to b, 2) a ‘c’ wrapped in a Maybe, 3) a list of d’s, 4) a function of e to a Bool, 5) a 4 tuple of a, b, list of d’s, and an e

And I will give you either a String or your original tuple back”

It doesn’t really do anything so there’s not much more to explain

the_af 2 hours ago|||
If you read the most introductory guide of Haskell, or ask your LLM to explain, you'll find there's nothing mystifying about the syntax you quoted. You're just unfamiliar with it because you didn't do the bare minimum effort.

If I ask my grandma what she thinks of the supposedly easy Python syntax, or C-style curly braces, her brain would similarly crash. Unless she read an intro to Python or C first.

In other words, do not confuse "I'm unfamiliar with this because it doesn't resemble what I know" with "hard to understand".

Jtsummers 4 hours ago|||
> For the beginner, there isn't enough syntax on offer to discern who's doing what to whom here.

If you throw a beginner at any non-trivial code in any language without teaching them anything about the language, then, yeah, it'll be hard for them to figure it out. That says nothing about the language itself, though. That's pretty obvious to everybody.

> Is there a "function signatures for dummys" somewhere?

Yeah, of course. There's actual beginner material, here's one example:

https://learnyouahaskell.github.io/types-and-typeclasses.htm...

Not hard to find, and not the only introduction to the language that covers this material. I guess you never bothered to look, or even to ask Gemini.

nurumaik 4 hours ago||
-- Show me a non-trivial function

-- Here you go

-- Oh my god, it's non-trivial

pandinus 8 hours ago||
[flagged]
goodmythical 8 hours ago|
>https://github.com/jgm/pandoc

>Languages

>Haskell 81.9%

semiinfinitely 8 hours ago|
[flagged]
platinumrad 8 hours ago||
Did you mean to post this on X, the everything app?
rafaelRiv 8 hours ago||
Try to do a web server in lean4 and we will talk after
itishappy 8 hours ago|||
https://lean-lang.org/doc/api/Std/Http/Server.html

https://leangineer.com/blog/realworld-in-lean/

https://news.ycombinator.com/item?id=50088748

cmrx64 7 hours ago||||
https://github.com/emberian/dragons-net ok. or what about https://github.com/emberian/fn (runs in either lean or lisp!)
carterschonwald 8 hours ago|||
yeah ive never heard anyone say they like doing productive coinduction in lean. agda almost has a story, but the ergonomics and semantics arent trivial.

though i have thought about it.