merijn 2017-02-24 03:45:12
Unboxed tuples exist, but they're not what you'd naively expect
merijn 2017-02-24 03:45:29
unboxed tuples don't exist at runtime at all, they pass results in registers
kuribas 2017-02-24 03:46:17
merijn: I want to calculate two values, but not create a closure.
kuribas 2017-02-24 03:46:50
merijn: should I use seq instead?
merijn 2017-02-24 03:47:02
kuribas: Right, sounds like unboxed tuples might work for you
merijn 2017-02-24 03:47:17
It requires a bit of messy wrapping, though
kuribas 2017-02-24 03:47:32
merijn: Can I map them over a vector?
merijn 2017-02-24 03:47:46
Well, the thing is you have to reuse them immediately
merijn 2017-02-24 03:47:55
They don't exist in the sense of values
merijn 2017-02-24 03:48:19
So you can't, say, compute a vector of them
kuribas 2017-02-24 03:48:23
maybe I should just use seq with a normal tuple, to make sure both are evaluated...
merijn 2017-02-24 03:48:32
Or define a custom type?
kuribas 2017-02-24 03:49:12
merijn: that will get messy with Vector
kuribas 2017-02-24 03:59:20
Got a 8x performance increase by strictifying my function. Who said lazyness is good for performance?
dminuoso 2017-02-24 04:02:19
Hi there. Im coming from a decent C++ and strong Ruby background and just compiled my first Haskell program and would like to get a serious taste. Is there a good book list you folks can recommend? Something akin to the Stroustrups TC++PL ?
kuribas 2017-02-24 04:06:06
dminuoso: dead tree book? Or also online material?
dminuoso 2017-02-24 04:08:07
kuribas: I want to get some quality book, not a random "Learn what a Haskell monad is in 9 days" :)
dminuoso 2017-02-24 04:08:17
That is unless there's a really excellent online resource.
lambdafan 2017-02-24 04:08:25
does that book exist?
kuribas 2017-02-24 04:08:27
dminuoso: there is
lambdafan 2017-02-24 04:08:57
There's no better introduction right now other than the purple book
lambdafan 2017-02-24 04:09:03
but it's going to cost you
kuribas 2017-02-24 04:09:06
dminuoso: https://github.com/bitemyapp/learnhaskell
dminuoso 2017-02-24 04:09:20
lambdafan: Im willing to spend money, if it's a quality book.
lambdafan 2017-02-24 04:09:24
oh yeah that's the same guy that does the book I am talking about
dminuoso 2017-02-24 04:10:08
lambdafan: Do you mean this book? http://haskellbook.com/
lambdafan 2017-02-24 04:10:08
http://haskellbook.com/
dminuoso 2017-02-24 04:10:12
Heh.
lambdafan 2017-02-24 04:10:13
that's the one
kuribas 2017-02-24 04:10:17
dminuoso: I haven't used it, but I heard many positive things about that course.
dminuoso 2017-02-24 04:10:26
Boy that looks cheap.
dminuoso 2017-02-24 04:10:35
The way you phrased it I was expecting 100+ dollars.
dminuoso 2017-02-24 04:10:56
Which I have paid for my dragon book a while ago, so I wasn't scared. :P
lambdafan 2017-02-24 04:11:03
well, for what you get it's a bargain
lambdafan 2017-02-24 04:12:00
what I know about haskell is from patchwork sources, and so I have missing pieces. This book solidifies my knowledge.
kuribas 2017-02-24 04:12:19
is that $59 for an ebook?
lambdafan 2017-02-24 04:12:22
yep
dminuoso 2017-02-24 04:13:17
I wonder whether there's a hard copy.
lambdafan 2017-02-24 04:14:12
it's comprehensive, and well-done
kuribas 2017-02-24 04:14:12
At least I hope it goes to the authors, not to a publisher.
lambdafan 2017-02-24 04:14:12
that may be a future plan, I'm not sure about now
lambdafan 2017-02-24 04:14:12
oh yes the authors are self-publishing from what I can tell.
kuribas 2017-02-24 04:14:12
dminuoso: I learned from "Real World Haskell", but that's a long time ago, and they didn't update it.
kuribas 2017-02-24 04:14:12
which is a shame
lambdafan 2017-02-24 04:14:12
yeah "Real World Haskell" has some traps for you because it's outdated.
lambdafan 2017-02-24 04:14:12
but if it is not your first book, you can see the traps and avoid them
dminuoso 2017-02-24 04:14:59
lambdafan: Alright, it looks like they have a fairly extensive sample from the beginning (the first 4 chapters), Ill just try it and if it feels good Ill just buy the hard copy then. :)
dminuoso 2017-02-24 04:15:10
Though I can't find where to buy said hard copy.
lambdafan 2017-02-24 04:15:14
oh there's a hard copy? Nice!
lambdafan 2017-02-24 04:15:31
I don't think there is one, I was suprised to think so.
lambdafan 2017-02-24 04:16:18
the purple book was made by people who understand pedagogy.
lambdafan 2017-02-24 04:16:38
real world haskell was not, although the authors of that book are clearly experts in haskell, they are not in teaching haskell.
lambdafan 2017-02-24 04:16:47
you can tell by the nature of the exercises
lambdafan 2017-02-24 04:16:52
compare the two books
lambdafan 2017-02-24 04:17:04
the exercises in the purple book clearly build on each other
dminuoso 2017-02-24 04:17:23
I just hope they don't give me the LSD trip kind of feeling that Haskell programs have invoked in me when staring at some complicated source code.
dminuoso 2017-02-24 04:17:26
:-)
lambdafan 2017-02-24 04:17:29
I asked one of the authors of RWH about their exercise choices, and they said they didn't put much thought into it.
tapirus 2017-02-24 04:17:36
ha
lambdafan 2017-02-24 04:18:11
ha?
shapr 2017-02-24 04:18:59
lambdafan: RWH was a huge improvement over the books that were published before.
kuribas 2017-02-24 04:19:13
lambdafan: uh, I disagree. I think RWH is well written.
lambdafan 2017-02-24 04:19:24
shapr: no arguement there. And perhaps there would have been no purple book without it
shapr 2017-02-24 04:19:27
lambdafan: Before that, most coders didn't think Haskell had real world applications.
shapr 2017-02-24 04:19:31
lambdafan: Yes, I think so.
glguy 2017-02-24 04:19:40
dminuoso: "Programming in Haskell" is good
lambdafan 2017-02-24 04:19:54
that was the book that put the idea in my head, that haskell had practical application.
shapr 2017-02-24 04:19:54
Mind you, I much prefer "Haskell from First Principles" these days.
glguy 2017-02-24 04:19:59
and has been recently revised, and is available in hard copy
robertkennedy 2017-02-24 04:20:06
Parallel and Concurrent Programming in Haskell by Simon Marlow is amazing imo
shapr 2017-02-24 04:20:15
Oh yeah, I want to read the second edition of graham hutton's book.
lambdafan 2017-02-24 04:20:17
it's not a first book though
shapr 2017-02-24 04:20:26
oh, and I just started on Richard Bird's recent Haskell book.
lambdafan 2017-02-24 04:20:32
I mean the Marlow book
tapirus 2017-02-24 04:20:32
lambdafan: sorry, it just seemed like a strange thing to come from an author's mouth, it wasn't intended as snark or disbelief towards you :)
shapr 2017-02-24 04:21:12
Of course, I think #haskell is the best of all the options ;-)
lambdafan 2017-02-24 04:21:19
tapirus: oh he meant the order in which they were presented. I always appreciate exercises that build on prior work, and the exercises seemed individually useful but patchwork in their order.
robertkennedy 2017-02-24 04:21:33
Oh yeah sorry I missed that it was for someone that fresh
tapirus 2017-02-24 04:21:35
ah right
lambdafan 2017-02-24 04:21:36
so the author was referring to the order of the exercises, and their relationship to each other
tapirus 2017-02-24 04:22:00
that's a bit less extreme then :) rather than "we had a 2 hour brainstorming session and came up with some fizz buzz problems"
shapr 2017-02-24 04:22:10
I do think haskellbook.com has much better exercise ordering, and gradiations in difficulty
tapirus 2017-02-24 04:22:26
or whatever the real world equivalent of fizz buzz is..."read a file and parse a list of numbers"
lambdafan 2017-02-24 04:23:58
"make a crud app in yesod" <- real world fizzbuzz
robertkennedy 2017-02-24 04:36:46
Making a crud app in yesod was my first big Haskell project lol
lambdafan 2017-02-24 04:37:24
robertkennedy: I mean the simplest version of such.
Aku 2017-02-24 04:41:13
How to get started with IRC channel?
Tuplanolla 2017-02-24 04:42:21
Observe it quietly until you feel confident enough that you can pretend you've always been around, Aku.
jackhill 2017-02-24 04:42:44
Aku: welcome. I don't think you have much more to do to get started, you can feel free to ask questions or comment on what others say.
shapr 2017-02-24 04:42:48
Aku: although I like your approach by asking directly how to get started :-D
shapr 2017-02-24 04:43:14
Aku: Have you written any Haskell code recently?
Aku 2017-02-24 04:43:25
Guys it feels friendly here!
Aku 2017-02-24 04:43:55
Ya reading Learn you a Haskell
mlehmk 2017-02-24 04:44:01
of course it is friendly here
Aku 2017-02-24 04:44:17
I keep getting parse Errors
Aku 2017-02-24 04:44:26
How do I go about it?
mlehmk 2017-02-24 04:44:47
examine it, also mind; sometimes whitespace is important
shapr 2017-02-24 04:45:09
Aku: you go to lpaste.net, paste in the code that has an error, click "public" and then share the link here in the channel.