ertes 2017-02-07 08:45:31
Phyx-: is it "idle" or "blocking"? they look the same from outside
ertes 2017-02-07 08:45:48
Phyx-: try moving waitForProcess to the end
ertes 2017-02-07 08:46:20
(side note: "_ <- c" is the same thing as "c"
ertes 2017-02-07 08:46:21
)
Phyx- 2017-02-07 08:46:23
let's see
Phyx- 2017-02-07 08:46:42
no it's not, GHC will warn that you're ignoring the value
ertes 2017-02-07 08:46:53
ah, you're using -Wall =)
Phyx- 2017-02-07 08:47:00
yes :)
Phyx- 2017-02-07 08:47:09
recompiling
nitrix 2017-02-07 08:47:55
Does async has known issues with bounded threads on windows?
dolio 2017-02-07 08:47:57
`_ <- c` is also potentially less efficient. Thanks Wall.
ertes 2017-02-07 08:48:24
it's a good set of non-annoying warnings
ertes 2017-02-07 08:49:08
the only warning i would add to -W would be shadowing
Phyx- 2017-02-07 08:49:38
right, that worked, thanks ertes
ertes 2017-02-07 08:50:00
Phyx-: now that you have working code, here is what you should do: import Control.Exception, then use 'bracket'
ertes 2017-02-07 08:50:37
bracket (createProcess_ …) (\(_, _, _, ph) -> waitForProcess ph) …
jmnoz[m] 2017-02-07 08:51:13
Building code with bitbucket pipelines, they don't have a cache option. for e.g. ~/.stack. What would you do
monochrom 2017-02-07 08:52:15
Hmm, -W is not -Wall?
ertes 2017-02-07 08:52:48
monochrom: -Wall is a lot more picky
geekosaur 2017-02-07 08:52:50
no, -W typically is a subset, -Wall should be everything (sometimes "almost everything", gcc has been known to pull that one)
monochrom 2017-02-07 08:53:23
Ah I found it in the user guide.
MarcelineVQ 2017-02-07 08:53:28
it's in the almost case afaik
monochrom 2017-02-07 08:53:50
GHC also says -Wall is "almost all"
Tuplanolla 2017-02-07 08:53:51
Clang has `-Weverything` for literally every warning.
Tuplanolla 2017-02-07 08:54:16
GCC does not and they don't even document all the flags.
ertes 2017-02-07 08:54:41
BTW, is "_ <- c" really less efficient? GHC could totally optimise that away
monochrom 2017-02-07 08:54:46
The crowning achievement is that we also have -Wcompat "enable future compatibility warnings"
monochrom 2017-02-07 08:55:02
(I so want to rename it to "enable future-proof warnings" :) )
ertes 2017-02-07 08:55:20
-Wfuture # warn about the future
Tuplanolla 2017-02-07 08:56:38
After you do some `-funsafe-math` and `-vomit-frame-pointer`, you can get yourself a `-Wombat`.
Tuplanolla 2017-02-07 08:57:04
Who even started this naming convention?
ertes 2017-02-07 08:57:25
`catch` (\(SyntaxError moduleName) -> …)
monochrom 2017-02-07 08:57:39
You know, "omit" and "vomit" are opposites, too...
ertes 2017-02-07 08:57:56
-eat-frame-pointer
monochrom 2017-02-07 08:59:00
Tuplanolla: I think someone hierarchically minded did. There are the -W hierarchy, the -f hierarchy, the -d hierarchy, etc.
MarcelineVQ 2017-02-07 09:00:07
actually there is a flag without a dual that should have one, -ddump-to-file
Tuplanolla 2017-02-07 09:01:58
...and then there is `-fwarn-unsafe`.
ertes 2017-02-07 09:02:21
-Wbeginner would be in order
ertes 2017-02-07 09:02:39
warn about things like 'head', 'read', 'openFile', 'getContents', etc.
kadoban 2017-02-07 09:03:01
-Wbeginner would be really cool
kubbe 2017-02-07 09:10:46
Hello! mniip are you in here? I have some more advanced questions for you. I have got an assignment from school where I am supposed to create this huffman tree. But I got stuck on the priorityqueue-thing. Got a few minutes over for some questions?
kubbe 2017-02-07 09:13:40
or anyone else if they are willing to help me some with this
ongy 2017-02-07 09:13:55
I may be able to help, if you post the question
kubbe 2017-02-07 09:17:51
Yes! Okey: So as said, my assignment is to create a huffman tree and everything that is connected to it. Let me post the code I have so you can check what I am talking about.
Ptival 2017-02-07 09:18:48
what's the 2017-approved Haskell unit testing library?
kubbe 2017-02-07 09:19:34
http://pastebin.com/Fedz7RsJ
kadoban 2017-02-07 09:19:35
I use hunit (and quickcheck and tasty to bring it all together) and it seems to work fine
Ptival 2017-02-07 09:20:10
I was thinking of HUnit+QuickCheck, was wondering about whether Hspec was something to look into
Ptival 2017-02-07 09:20:21
did not know tasty, will look
kadoban 2017-02-07 09:20:44
I don't know much about hspec, I think it's instead of tasty, from overhearing things. Couldn't say much what the difference are.
kubbe 2017-02-07 09:20:49
onyg, here we believe that we create the tree under "data Tree", which is polymorphic. It is supposed to show us both the character and the Int (rank) in the tree. But it is giving us error on the empty-function for some reason
kubbe 2017-02-07 09:22:40
So my question: What should the type PrioQ a be equal to so it wont give me errors?
sternmull 2017-02-07 09:23:12
Documentation of seq says "The value of seq a b is bottom if a is bottom, and otherwise equal to b.". What the hell is "bottom"?
kadoban 2017-02-07 09:24:01
sternmull: Bottom is undefined/error "something" or computations that loop forever, or otherwise don't complete.
sternmull 2017-02-07 09:25:07
kadoban: Ah, thank you.
kadoban 2017-02-07 09:27:11
That documentation is a little ... hard to understand the first time, at least it was for me. The more intelligible description would probably be something like ... a `seq` b means evaluate 'a' before you evaluate 'b'. Though that's not exactly 100% rigorous or correct.
cocreature 2017-02-07 09:27:53
Ptival: fwiw I really like hspec
jle` 2017-02-07 09:28:26
@tell erisco there's a lot you can do with lists
lambdabot 2017-02-07 09:28:26
Consider it noted.
jle` 2017-02-07 09:28:52
@tell erisco working with lists and working with nat's is actually pretty similar, structurally. Nats are just [()]
lambdabot 2017-02-07 09:28:52
Consider it noted.
jle` 2017-02-07 09:29:41
@tell so you can use a lot of what you learned working with nats and generalize it directly to working with lists
lambdabot 2017-02-07 09:29:41
Consider it noted.
byorgey 2017-02-07 09:30:50
jle`: you know you just @told that second sentence to the nick 'so'
sternmull 2017-02-07 09:31:46
kadoban: What was a bit surprising is that "seq a b does not guarantee that a will be evaluated before b.". But it probably only means i should read the documentation very carefully before i use stuff.
byorgey 2017-02-07 09:33:35
sternmull: right, it only guarantees that a *will* be evaluated before the value of b is returned. But that doesn't say anything about the order of evaluation.
byorgey 2017-02-07 09:34:38
sternmull: if you really care about the evaluation order (for example, if you are doing something with parallelism), you can use 'pseq'
sternmull 2017-02-07 09:35:20
byorgey: yes, that is even mentioned in the documentation of seq.
byorgey 2017-02-07 09:35:42
ah, so it is
ph88 2017-02-07 09:36:19
can someone talk to me about my parser code? i'm getting stuck on how to organize my code and abstractions
sshine 2017-02-07 09:37:19
ph88, sure. link?
spikefoo 2017-02-07 09:37:58
kubbe: you used 'type' to define PriorityQueue, which makes it an alias of [Heap a]. So a PriorityQueue is the same as [Heap a], and the definition of empty would be 'empty = []'
sternmull 2017-02-07 09:37:59
is there a kind of "cheat sheet" for all the popular operators? As a beginner i find myself constantly checking out the types of >> >>= and so on to remember what their purpose was. It will take me a while before i can decide quickly when to use which one.
ph88 2017-02-07 09:37:59
sshine, can i query you ?
spikefoo 2017-02-07 09:38:32
kubbe: but you probably wanted to use 'data' to define a new type: 'data PriorityQueue a = ...', which will make your definition of empty correct
Tuplanolla 2017-02-07 09:38:44
Send an email and ask if you can email him, ph88.
sshine 2017-02-07 09:38:51
ph88, okay, but I'd prefer if you posted a link to a pastebin here. :)
kubbe 2017-02-07 09:41:33
Oh, okey! I changed it now. I saw a few "hints" we got. Check this out: http://pastebin.com/v9C86V2f
kubbe 2017-02-07 09:41:58
It works for empty now. Now I am planning on attacking the next part: With the insert.