MarcelineVQ 2017-02-01 02:46:57
I was shown http://hackage.haskell.org/package/base-4.9.1.0/docs/Control-Concurrent-QSem.html and http://hackage.haskell.org/package/base-4.9.1.0/docs/Control-Concurrent-QSemN.html recently, not sure how applicable to your problem it is
MarcelineVQ 2017-02-01 02:47:06
*merijn:
merijn 2017-02-01 02:49:02
MarcelineVQ: Yeah, I was already using that to rate-limit outgoing requests, now I'm wondering whether I should bother at all or just spawn a thread per task under the assumption that I got plenty of memory anyway :p
systadmin 2017-02-01 02:54:41
ey
jophish 2017-02-01 03:09:53
Talking about my "coworkers" never fails to make me chuckle
MarcelineVQ 2017-02-01 03:10:51
can some of them be categorized as proworkers?
kmelva 2017-02-01 03:11:26
Axman6: thanks for the (x~y) thing you said previously... it works now! I tried puting the constraint in the wrong place, thats why it didn't work...
noan 2017-02-01 03:14:22
https://wikimedia.org/api/rest_v1/media/math/render/svg/6b454127c5336ff7d580ca43f6ce231d6161c405
noan 2017-02-01 03:14:36
What does the => symbol here mean? trying to learn some cat theory.
noan 2017-02-01 03:14:46
I read it as g1 after f equals g2 after f something g1 equals g2
cocreature 2017-02-01 03:14:59
noan: "implies"
cocreature 2017-02-01 03:15:28
noan: if the thing on the left side is true, the thing on the right side is also true
noan 2017-02-01 03:16:02
so I should read it as such... g1 after f being equal to g2 after f implies g1 is equal to g2?
cocreature 2017-02-01 03:16:24
noan: yep
noan 2017-02-01 03:16:46
That the morphisms g1 and g2 can be viewed as... I think the word is isomorphic? as a consequence of first equivalence?
noan 2017-02-01 03:17:33
It's like learning a whole new language
noan 2017-02-01 03:21:07
anyone have a good article on organising and structuring modules in haskell? I'm coming from the ole mvc ruby and the like style for web projects, which doesn't translate so well probably
merijn 2017-02-01 03:25:07
Did Lennart's proposal to turn (::Int) into a function ever make it into GHC? If so, which version?
jophish 2017-02-01 03:25:33
signature sections or something?
ongy 2017-02-01 03:25:37
what would be the type of such a function?
opqdonut 2017-02-01 03:25:47
ongy: it would be id :: Int -> Int I guess
jophish 2017-02-01 03:25:50
(Int -> Int)
jophish 2017-02-01 03:26:08
https://ghc.haskell.org/trac/ghc/wiki/SignatureSections
merijn 2017-02-01 03:26:27
ongy: id specialised
merijn 2017-02-01 03:27:08
awww, punted from 8.2 :(
ongy 2017-02-01 03:27:43
so (:: a) would be a shortcut for (id :: a -> a) ?
merijn 2017-02-01 03:28:02
ongy: Yes, so you could write, for example "show . (::Int) . read"
MarcelineVQ 2017-02-01 03:28:15
is that perhaps subsumed by TypeApplications?
merijn 2017-02-01 03:28:43
MarcelineVQ: No, because, see my example, which would be a lot more annoying with TypeApplications
merijn 2017-02-01 03:28:57
I'm not a fan of TypeApplications anyway
jophish 2017-02-01 03:29:50
merijn: why, out of interest?
merijn 2017-02-01 03:30:15
jophish: Brittle and ugly syntax
MarcelineVQ 2017-02-01 03:30:37
more annoying? it's just show . read @Int yeah?
ongy 2017-02-01 03:30:43
was TypeApplications the extension that overloads @?
jophish 2017-02-01 03:31:03
merijn: what does brittle mean here?
merijn 2017-02-01 03:31:20
jophish: The order of your type variables is now part of the API
jophish 2017-02-01 03:31:27
I assume the difference between (forall a b.) and (forall b a.)
jophish 2017-02-01 03:31:44
I thought that would be an issue too, but it's not cropped up once
jophish 2017-02-01 03:32:04
Nearly all the time we use it with Proxy or SNat
jophish 2017-02-01 03:32:23
SNat @3 is much nicer than SNat :: SNat 3
ongy 2017-02-01 03:33:58
even more fun with lists of maps of lists
mbrock 2017-02-01 03:35:45
is it kind of underrated as a source of Haskell horror? at least the huge JSON blobs you get in the Node REPL are indented...
jophish 2017-02-01 03:36:36
mbrock: check out ppsh
jophish 2017-02-01 03:36:49
it indents the output of derived show instances
jophish 2017-02-01 03:36:58
https://hackage.haskell.org/package/pretty-show
Welkin 2017-02-01 03:37:02
huh?
Welkin 2017-02-01 03:37:06
you mean pretty printed?
jophish 2017-02-01 03:37:19
yeah, it's amazing
Welkin 2017-02-01 03:37:21
of course, if you just serialize to json, there is no whitespace
Welkin 2017-02-01 03:37:29
that is a waste of data
Welkin 2017-02-01 03:37:43
if oyu want to pretty print, just use the appropriate function o.o.
jophish 2017-02-01 03:37:45
in fact, I've found that the tool formats a couple of other file formats pretty well. Nix derivations for example
mbrock 2017-02-01 03:38:06
jophish: thanks! if there was a GHCi plugin of some sort too, that'd be even more amazing
jophish 2017-02-01 03:38:19
mbrock: ooh, what a good idea
MarcelineVQ 2017-02-01 03:39:38
merijn: I'm not able to find stats for total threads, the closest in the rts I can find is some debug printing which loops through the current capabilities and counts their individual thread queues by pointer-chasing. in addition it checks gc'd threads afterwards. printAllThreads in Threads.c if you're interested
merijn 2017-02-01 03:40:13
MarcelineVQ: Yeah, but that's a bit hacky for my usecase :)
mbrock 2017-02-01 03:40:22
now that I think about it, I wouldn't mind if GHCi had its own value inspection thing aside from Show
MarcelineVQ 2017-02-01 03:40:30
well ideally there's a route to it through rtsapi but I agree