Search Haskell Channel Logs

Thursday, March 9, 2017

#haskell channel featuring sdrodge, bennofs, Cale, glguy, kuribas, ongy,

glguy 2017-03-09 07:06:49
very little of lens is about fancy extensions to records
ongy 2017-03-09 07:07:26
then I am at the point where I have no idea what lens is :)
kuribas 2017-03-09 07:08:16
lens is a traverse generalized to any structure and part.
kuribas 2017-03-09 07:08:51
traverse on steroids
tommd 2017-03-09 07:08:54
It's a way to peg your CPU for longer during compilation. It's also about structure traversal or even monadic actions that are structure-specific (ex: state).
bennofs 2017-03-09 07:10:24
tommd: i think the CPU pegging part is called "template haskell" :)
sdrodge 2017-03-09 07:37:40
I still struggle a lot with knowing when to use lazy variants of various data structures/monads, and when its a good idea to add strictness annotations. Does anyone know of a good write up on this topic?
sdrodge 2017-03-09 07:37:46
(better than the wiki, that is)
sdrodge 2017-03-09 07:38:22
Or is the approach in "real" Haskell programs to actually just write everything using one default or the other and then do profiling to fix it?
sdrodge 2017-03-09 07:38:46
Perhaps I'm overestimating the extent to which practitioners know the answer to this question.
sdrodge 2017-03-09 07:40:05
Or perhaps I'm overestimating how often this impacts performance significantly.
sdrodge 2017-03-09 07:43:29
To make this more concrete: would any strictness annotations in this programming be an obviously good idea? https://hastebin.com/oweyizopax.hs
sdrodge 2017-03-09 07:46:23
*thi program
sdrodge 2017-03-09 07:46:48
*this program
Cale 2017-03-09 07:52:21
sdrodge: I suspect using IM.insertWith' may improve things.