Search Haskell Channel Logs

Thursday, March 2, 2017

#haskell channel featuring ertes, glguy, Ptival, dmj`, lambdabot, mniip, and 7 others.

ertes 2017-03-02 12:45:25
vtomole: other compilers like JHC or UHC technically still work, but they aren't that useful, because you can forget most of hackage (haste has the same problem and is becoming obsolete – GHCJS)
kuribas 2017-03-02 12:45:30
mniip: I force the expression, but after :step ghci still goes into it...
glguy 2017-03-02 12:45:33
It's not enough to force an arbitrary expression, you need to force a particular variable
kuribas 2017-03-02 12:45:34
mniip: very annoying
kuribas 2017-03-02 12:45:44
glguy: I force _result
kuribas 2017-03-02 12:46:37
since it's already evaluated, why does it "enter" the expression again?
mniip 2017-03-02 12:47:02
1488498153 [02:42:33] Ch3ck: in fact it's specific to the GHC *compiler*
mniip 2017-03-02 12:47:07
that still creates a black hole
mniip 2017-03-02 12:47:13
just that it doesn't error out
mniip 2017-03-02 12:47:28
the thread subscribes to its own blackhole and everything goes into sleep
Ch3ck 2017-03-02 12:48:20
mniip, ertes I see
Ch3ck 2017-03-02 12:48:37
I'm still learning functional programming. I decided to take on haskell since I hear it's the core
Ch3ck 2017-03-02 12:49:04
Alot of my friends have told me stories about "monads" and "contextual structures"
Ch3ck 2017-03-02 12:49:18
Just interesting to find out how "hard" they are to understand ;-)
ertes 2017-03-02 12:49:55
Ch3ck: depends on how well you can deal with symbolic/algebraic thinking =)
mniip 2017-03-02 12:49:56
depends on what level of understanding you're aiming for
mniip 2017-03-02 12:50:27
haskell (and abstract algebra) is one of those things where being able to reason about, and understanding, are two very different thing
mniip 2017-03-02 12:50:28
s
kuribas 2017-03-02 12:51:00
mniip, glguy: it isn't supposed to do that, is it?
Ch3ck 2017-03-02 12:51:49
mniip, I see
ertes 2017-03-02 12:52:04
Ch3ck: it helps to look at simpler structures first, like monoids, but try to accept that they are really just a set of mathematical axioms
Ch3ck 2017-03-02 12:52:07
I'm not at that point yet, just installed the GHC and sifting my way through
glguy 2017-03-02 12:52:10
kuribas: I don't know how _result is supposed to work, but if _result isn't a variable in your original program then it doesn't seem surprising that evaluating it might not affec your original program
glguy 2017-03-02 12:52:21
Maybe put the code and terminal session on lpaste?
kuribas 2017-03-02 12:52:39
ok
kuribas 2017-03-02 12:53:10
glguy: _result is the result of the expression that is under focus by ghci.
kuribas 2017-03-02 12:54:45
glguy: so after forcing it, it wouldn't need to descend into the expression, at least that's my understanding.
kuribas 2017-03-02 12:55:27
I'll paste something next time...
glguy 2017-03-02 12:55:31
or it's just a new name created with a copy of the expression that is under focus
kuribas 2017-03-02 12:55:52
glguy: if so, how do I make ghci skip that expression?
glguy 2017-03-02 12:57:24
I don't know. GHCi's debugger isn't part of my workflow
Ptival 2017-03-02 12:58:34
what do I need to do to be able to import `test/Foo.hs` from `test/Bar.hs`?
robkennedy 2017-03-02 12:59:33
Ptival: if your cabal file says "hs-source-dir: test" it should work
Ptival 2017-03-02 12:59:42
robkennedy: thanks
dmj` 2017-03-02 13:26:12
Ptival: you might need to start ghc with -itest as well
dmj` 2017-03-02 13:29:38
ghci*
robkennedy 2017-03-02 13:31:20
Just checking this
robkennedy 2017-03-02 13:31:47
:t \x y -> x / y
lambdabot 2017-03-02 13:31:49
Fractional a => a -> a -> a
Koterpillar 2017-03-02 13:32:56
robkennedy: FYI, /msg lambdabot :t "This works too"
metalbot 2017-03-02 13:41:21
anyone know the authors of "Real World Haskell"?
metalbot 2017-03-02 13:41:37
there's a bizarre chapter of their book being sold on Amazon by a different author...
Clint 2017-03-02 13:42:01
is it one that's not completely out of date?
metalbot 2017-03-02 13:42:21
no - it's literally the text of their chapter on monads republished under a new name
metalbot 2017-03-02 13:43:18
https://www.amazon.com/Monads-Programming-World-Haskell-Ellis/dp/1542739640
monochrom 2017-03-02 13:43:42
They don't come to IRC often these days. (They used to.)
monochrom 2017-03-02 13:44:01
But I bet O'Reilly is eager to know too, and more influential in taking action.
glguy 2017-03-02 13:44:14
That's got a pretty sweet title going for it
metalbot 2017-03-02 13:44:30
oreilly isn't on IRC either, and i'm pretty damn lazy...
glguy 2017-03-02 13:44:43
Oh well, it was a good effort