4 ms·
I tried twice to get started with Haskell. I understand the language well enough, but the standard prelude gave me problems. I forget the details, but the first
by jbritton 6y ago
I tried twice to get started with Haskell. I understand the language well enough, but the standard prelude gave me problems. I forget the details, but the first attempt involved reading ASCII strings from file. I had some issue with the standard string type and after a bunch of searching and trying other things, nothing worked. The second time I tried to use sockets. After a few days, I discovered sockets were both broken and deprecated.
Haskell needs to replace the standard prelude and burn the old documentation.
I have used dozens of languages and never really had any problems.
But the simplest of tasks in Haskell immediately put up roadblocks.
I’m sure if I had sufficient reason I could get passed these problems, but when easy things are not easy one loses interest fast.
- kqr 6y agoThere's some amount of truth to this. The I/O facilities that ship with Haskell are in many regards lacking. Fortunately, the community has created some fantastic libraries to help do I/O much better. It was a while since I was involved in that space, but at the time, you had things like the Text library to properly handle human text, ByteString to handle plain 8-bit arrays, Conduit and Pipes as two libraries to do streaming I/O (both network and file) with resource usage guarantees.
- develop7 6y agoFirst, there's a number of preludes around: rio, foundation, relude to name a few. The standard prelude, OTOH, isn't going anywhere anytime soon, because throwing it away would break too much existing code. I'd love to help you with the roadblocks, but I need more specifics to do that.
- gilmi 6y agoThere are alternative preludes you could use instead that provide a much better experience. I recommend taking a look at relude [0]. Could you share a bit about your experience with sockets in haskell? I had the chance to use sockets in haskell on multiple occasions and they worked as expected. [0]: https://kowainik.github.io/projects/relude https://kowainik.github.io/projects/relude
- tome 6y agoThere does seem to be a issue with discoverability in Haskell. I'm cooking up a plan to try to improve the situation: https://github.com/tomjaguarpaw/tilapia/issues/13 https://github.com/tomjaguarpaw/tilapia/issues/13 > I discovered sockets were both broken and deprecated. Just in case anyone gets the wrong end of the stick, "Haskell sockets" are both working and supported (quotation marks because there is no single blessed implementation: sockets are just a (few) library(ies)). When people want help choosing a library, I point them to https://haskelliseasy.readthedocs.io/en/latest/ https://haskelliseasy.readthedocs.io/en/latest/, which is an opinionated, curated list.
- mrkeen 6y ago> I had some issue with the standard string type and after a bunch of searching and trying other things, nothing worked Post some code!