News for hackers. Stuff that matters.
Re:What Is IO Monad? (2018) [video] by _query on Thursday March 10, 2022 @01:30AM (#30623780)
Haskell is a bit famous for being very academic and being only for language enthusiasts and researchers. But that image is outdated by now.

The Haskell ecosystem has improved quite a lot in recent years: E.g. there's now Haskell Language Server which provides very nice autocompletion in Editors like VSCode. Very recently support for dot-notation has been added, so you can now write `someValue.someField` as in other languages. In the web dev space we now have IHP, which is Haskell's take of Laravel/Rails/Django https://ihp.digitallyinduced.com/ (Disclaimer: I'm founder of the company that makes IHP)

So if you have checked out Haskell in the past already, you might want to give it another try! :)

Re:What Is IO Monad? (2018) [video] by blahblarblar on Thursday March 10, 2022 @01:46AM (#30623836)
Did they fix strings?
Re:What Is IO Monad? (2018) [video] by _query on Thursday March 10, 2022 @01:49AM (#30623844)
Yes, there's now `Data.Text` https://hackage.haskell.org/package/text-2.0/docs/Data-Text.... which is widely supported
Re:What Is IO Monad? (2018) [video] by nextaccountic on Thursday March 10, 2022 @04:05AM (#30624803)
The real fix will happen when Data.Text moves from UTF-16 to UTF-8:

https://discourse.haskell.org/t/hf-tech-proposal-1-utf-8-enc...

Fortunately this proposal has been accepted, but I don't know the timeline for its implementation in GHC.

Until then, working with UTF-8 is kind of convoluted

https://serokell.io/blog/haskell-with-utf8

Also: libraries need to be fixed to accept Data.Text instead of String. IsString helps (it's a typeclass that contains all string types) but only if APIs take it instead of defaulting to String. Adding random string conversions to cope with legacy APIs is very annoying.

Re:What Is IO Monad? (2018) [video] by tome on Thursday March 10, 2022 @04:57AM (#30625137)
> The real fix will happen when Data.Text moves from UTF-16 to UTF-8:

This work was completed a while ago.

https://hackage.haskell.org/package/text-2.0/changelog

> I don't know the timeline for its implementation in GHC.

Data.Text is a library, not a compiler feature, so completing it was not tied to GHC.

Re:What Is IO Monad? (2018) [video] by sekun on Thursday March 10, 2022 @11:56AM (#30629146)
UTF-8 as the de facto for `text` was merged a few months ago. It's in >=2.0.
Re:What Is IO Monad? (2018) [video] by carterschonwald on Thursday March 10, 2022 @07:45AM (#30626272)
The most recent release is utf8
Re:What Is IO Monad? (2018) [video] by misja111 on Thursday March 10, 2022 @03:11AM (#30624439)
Huh, Data.Text has been around forever. And the datatype that you will find in almost any Haskell tutorial is still 'String'.

It is really a pain that any beginner in the Haskell language is learning what seems the obvious datatype for strings, i.e. String, and later has to unlearn that again.

Re:What Is IO Monad? (2018) [video] by stingraycharles on Thursday March 10, 2022 @03:38AM (#30624630)
It’s been a while since I worked with Haskell. What’s the issue with Strings, I’m guessing it must be Unicode-related?
Re:What Is IO Monad? (2018) [video] by mylvinta on Thursday March 10, 2022 @03:46AM (#30624668)
Strings are linked lists of characters, so they perform quite badly