5 ms·
GHC error messages and needless category theory and algebra jargon are the two worst aspects of programming in Haskell. You eventually get used to both of them
by voidhorse 5y ago
GHC error messages and needless category theory and algebra jargon are the two worst aspects of programming in Haskell. You eventually get used to both of them and, once you do, you become even more productive. Everything else about the language is magnificent....until you need to improve performance hotspots.
- whateveracct 5y agoHaskell performance ime is actually super easy. I'd say I've run into performance issues professionally 5-10 times. None took more than a day to resolve.
- voidhorse 5y agoThat's great. It's been rare for me too, but I'm currently trying to solve an issue where it seems like we've inadvertently built up some kind of mega thunk that's making performance absolutely horrible for large inputs. The hotspot in question currently implemented as big recursive loop, so it's proving hard to untangle. Normally shortcut fusion and laziness make it a non-issue but it seems like we hit a thunk chain here or something.
- whateveracct 5y agoHave you tried the various profiling modes to hint at where it is? Other than that, wolf-fencing it down is a good way to go usually.
- User23 5y agoA monad is just a monoid in the category of endofunctors, what's the problem?
- whateveracct 5y agohaha funny but my comment consisted of 1) straight-up language tooling (profiling that breaks down heap usage in various ways) 2) wolf-fencing, which has nothing to do with haskell
- User23 5y agoIt’s too bad that the humorless are downvoting us both. In any event wolf-fencing very much appears to be Haskell specific based on some web searching. Or perhaps it’s a home improvement product? Several search results appear to indicate that[1]. [1] https://www.wolfhomeproducts.com/wolfrailing https://www.wolfhomeproducts.com/wolfrailing
- whateveracct 5y agoIt's apparently not very SEO'd. But it's a debugging technique. http://coreygoldberg.blogspot.com/2008/12/wolf-fence-debugging.html http://coreygoldberg.blogspot.com/2008/12/wolf-fence-debuggi... It's universally applicable. I've done it in C, Scala, Go, Java, Haskell..everything. Perf-debugging wise - you basically remove parts of your computation and perform binary search to hone in on the parts that are on the critical path. I agree that a lot of Haskellers come off as "what's the problem?" (including myself). But Haskell is a small, niche, weird language. You kinda need that attitude to dive deep into it.
- ImprobableTruth 5y agoWolf fencing = Using the bisection method/binary search to find errors. Essentially what people intuitively do.
- ParetoOptimal 5y agoI think people intuitively start with bisection and binary search but quickly lapse into magical thinking rather than adhering to the process.
- josephcsible 5y agoHow can wolf-fencing be Haskell-specific when it's 8 years older than Haskell is? https://doi.org/10.1145/358690.358695 https://doi.org/10.1145/358690.358695
- tome 5y agoIf it's open source please post a link. I'll take a look.
- BoardsOfCanada 5y agoA bit OT, but what about executable size? I installed shellcheck (using brew on macos) that is written in Haskell and the executable is over 70 MiB.
- pbowyer 5y agoThey're bad. I've only compiled one small Haskell program and even after stripping had to resort to upx to compress the binary and make it easy to distribute. https://dixonary.co.uk/blog/haskell/small https://dixonary.co.uk/blog/haskell/small was most helpful
- unhammer 5y agobrew might not be stripping it? The ubuntu apt package is 17M (you can upx it down to 3.4M)
- ParetoOptimal 5y ago> needless category theory and algebra jargon Examples? Sometimes there is a need for precising definitions.