Search Haskell Channel Logs

Monday, February 20, 2017

#haskell channel featuring kosmikus, c_wraith, Cale, gfixler, Cooler, clmg,

kosmikus 2017-02-19 20:45:53
jvliwanag: do you have questions about generics-sop?
c_wraith 2017-02-19 20:47:39
clmg: it looks like you should be using lookupExtent in appStartEvent and/or appHandleEvent
c_wraith 2017-02-19 20:47:57
clmg: since those are required to be in EventM anyway
clmg 2017-02-19 20:48:12
c_wraith: ah I see. thanks.
c_wraith 2017-02-19 20:48:42
clmg: if you need the extent data elsewhere, I guess you need to throw it into your state value.
clmg 2017-02-19 20:49:05
c_wraith: I think that's whats going to have to happen :-(
lpaste_ 2017-02-19 20:52:58
threshold pasted "example" at http://lpaste.net/352752
threshold 2017-02-19 20:53:36
Ignore ^
Cooler 2017-02-19 20:59:12
i have been following this https://youtu.be/RDalzi7mhdY?t=2699 video on parser combinators
Cooler 2017-02-19 20:59:39
how do you deal with recursive definitions for the parser?
Cooler 2017-02-19 21:00:08
in the json spec http://www.json.org/ an object parser needs a value parser and so does an array parser
Cooler 2017-02-19 21:00:23
but a value parser needs an object and an array parser
Cale 2017-02-19 21:04:23
Cooler: You just use recursion.
Cooler 2017-02-19 21:05:18
Cale, well i am actually doing this in javascript but in a functional way
Cooler 2017-02-19 21:05:21
https://plnkr.co/edit/eppjircbxmwL47lLlMsR?p=preview
Cooler 2017-02-19 21:05:42
i am building parsers for various things
Cooler 2017-02-19 21:06:00
basically that means returning functions that take a string as input
Cooler 2017-02-19 21:09:31
so in order to build a value parser i need an object and array parser
Cooler 2017-02-19 21:09:54
but in order to build those i need a value parser
Cooler 2017-02-19 21:10:04
so its gonna go into an infinite loop
cocreature 2017-02-19 21:12:50
Cooler: that's not an infinite loop, that's mutual recursion
cocreature 2017-02-19 21:13:08
it can of course turn into an infinite "loop" if you have no basecase
gfixler 2017-02-19 21:38:15
Bartosz keeps talking about C x C -> C in his bifunctors video, but I don't get why it's not C x D -> E
Cooler 2017-02-19 21:41:44
any ideas?
Cale 2017-02-19 21:41:56
gfixler: It could be, but maybe he's just not interested in bifunctors of that sort
gfixler 2017-02-19 21:42:19
Cooler: I feel like he just took everything from C, D, and E, and smooshed them into one category C
gfixler 2017-02-19 21:42:26
and that's a cartesian category...?
gfixler 2017-02-19 21:42:52
oh, I found it
Cale 2017-02-19 21:43:01
gfixler: If he's talking about Haskell, there's practically only one category we're usually concerned with anyway
gfixler 2017-02-19 21:43:04
he says "Because we're talking Haskell, it will be a category of C with itself"
gfixler 2017-02-19 21:43:08
Cale: yep
gfixler 2017-02-19 21:43:28
I must have dozed off @35:00
gfixler 2017-02-19 21:43:40
I did like that C x C -> C looked monoidal
gfixler 2017-02-19 21:43:51
and at the end of the talk he mentions something about its monoidalness
gfixler 2017-02-19 21:44:17
this answers a question I had earlier in the talk
gfixler 2017-02-19 21:44:44
which was "But aren't all of these the same category in Haskell?"