Search Haskell Channel Logs

Friday, February 17, 2017

#haskell channel featuring Sinestro, jle`, `Guest05, EvanR,

EvanR 2017-02-17 16:50:01
`Guest05: i would try lazy bytestrings, but ultimately you will need to try both and profile them to see which is better
`Guest05 2017-02-17 17:31:20
hmmmmmmm
`Guest05 2017-02-17 17:31:30
idiom brackets for records
Sinestro 2017-02-17 17:31:36
How does one implement primitives in an cofree comonad AST? I can't figure out a way to combine the naïeve method (for use when interpreted, at least) of just using functions `AST -> AST`. :/
`Guest05 2017-02-17 17:32:42
[| Constructor { field1 = getWord8, field2 = getWord16le, field3 = getRemainingLazyByteString } |]
`Guest05 2017-02-17 17:33:16
why no IdiomBrackets yet in GHC...
EvanR 2017-02-17 17:39:05
how would that work
EvanR 2017-02-17 17:39:14
force you to write the fields in order?
jle` 2017-02-17 17:44:13
Sinestro: there should be some lifting functions in the library ou're using
Sinestro 2017-02-17 17:46:18
Lifting? I don't get the relevance. The issue is that `a -> a` over the recursive type doesn't permit a functor instance, which is required.
jle` 2017-02-17 17:49:37
can you give a concrete example?
`Guest05 2017-02-17 17:49:59
EvanR: equivalent to [| (\f1 f2 f3 -> Constructor { field1 = f1, field2 = f2, field3 = f3 }) getWord8 getWord16le getRemainingLazyByteString |]
EvanR 2017-02-17 17:59:39
equivalent to liftA4 Constructor getWord8 getWord16le getRemainingLazyByteString
EvanR 2017-02-17 17:59:48
er, liftA3
`Guest05 2017-02-17 18:08:51
EvanR: no, fields may have different order!