Re:The Evolution of a Haskell Programmer (2010)
by the_af on Wednesday March 06, 2024 @09:14AM
(#39616143)
It's a funny joke (I love that post), but it's mostly for people looking from outside in. It says nothing about actually doing IO with Haskell using monads, which is practical and done, and not particularly difficult.
We shouldn't mistake memes for actual insight.
Re:The Evolution of a Haskell Programmer (2010)
by tempodox on Wednesday March 06, 2024 @10:50AM
(#39617205)
> and not particularly difficult.
Wait until you want debug output in a deeply nested function that isn't already in the IO monad.
Re:The Evolution of a Haskell Programmer (2010)
by jaspervdj on Wednesday March 06, 2024 @11:11AM
(#39617401)
You can use trace for that which is part of the base library:
https://hackage.haskell.org/package/base-4.19.1.0/docs/Debug...
Re:The Evolution of a Haskell Programmer (2010)
by pyrale on Wednesday March 06, 2024 @11:40AM
(#39617739)
Unrelated, but many thanks for organizing Zurihac year after year.
Re:The Evolution of a Haskell Programmer (2010)
by the_af on Wednesday March 06, 2024 @11:53AM
(#39617902)
Debugging output, or just plain debugging, is often difficult regardless of the programming language. I wouldn't say this sets Haskell apart.
Re:The Evolution of a Haskell Programmer (2010)
by bazoom42 on Thursday March 07, 2024 @12:50PM
(#39632123)
Yeah as long as you understand how to use monads IO is easy.
This is why Haskell tutorials tend to have 100 pages of dense type-theory before getting to “hello world”, while other languages have that on the first page.
Re:The Evolution of a Haskell Programmer (2010)
by tome on Thursday March 07, 2024 @05:53PM
(#39635622)
I'm not sure which tutorials you're thinking of. Not this one I guess
https://wiki.haskell.org/Haskell_in_5_steps#Write_your_first...
or this one
https://riptutorial.com/haskell/example/898/hello--world-
Can you link to the one that has 100 pages before getting to “hello world”?
Re:The Evolution of a Haskell Programmer (2010)
by bazoom42 on Friday March 08, 2024 @05:56AM
(#39639900)
Learn you a Haskell gets to Hello World at page 128.
Re:The Evolution of a Haskell Programmer (2010)
by tome on Friday March 08, 2024 @11:08AM
(#39642398)
Yeah, but that's not because the first 127 pages are "dense type theory". It's because that's the first time it teaches about compiled programs rather than the REPL. Besides, "Hello world" also appears on page 14.
Re:The Evolution of a Haskell Programmer (2010)
by the_af on Thursday March 07, 2024 @10:22PM
(#39637457)
This is simply untrue. You can do IO without understanding what a monad is, simply taking it as "there is this keyword and this syntax I need to use".
No Haskell tutorials that I know of take long to reach "hello world", which is in fact a shorter program in Haskell than in some mainstream programming languages.
1990 - A committee formed by Simon Peyton-Jones, Paul Hudak, Philip Wadler, Ashton Kutcher, and People for the Ethical Treatment of Animals creates Haskell, a pure, non-strict, functional language. Haskell gets some resistance due to the complexity of using monads to control side effects. Wadler tries to appease critics by explaining that "a monad is a monoid in the category of endofunctors, what's the problem?"
https://james-iry.blogspot.com/2009/05/brief-incomplete-and-...