5 ms·
If you're going to call your article "at scale", the least you can do is give examples that can't already be found everywhere on the Internet explaining monoids
by zak_mc_kracken 12y ago
If you're going to call your article "at scale", the least you can do is give examples that can't already be found everywhere on the Internet explaining monoids, monads, applicatives and functors. Reading from the terminal doesn't qualify as an "at scale" example of Haskell.
Explain how to make HTTP requests, query databases, load balance web servers or write GUI's. And then explain how equational reasoning can be useful there.
My personal experience is that equational reasoning quickly falls apart as soon as you go beyond toy examples such as the ones shown in this article, but I'm dying to be proven wrong.
- Gabriel439 12y agoIf you are interested in a GUI example then you might like the post I wrote just before this one: http://www.haskellforall.com/2014/06/spreadsheet-like-programming-in-haskell.html http://www.haskellforall.com/2014/06/spreadsheet-like-progra... That shows a spreadsheet that you assemble using Applicative and Monoid operations that is built on top of several abstraction layers, and the correctness proof of each layer buulds on the previous proofs.
- codygman 12y agohttps://news.ycombinator.com/item?id=8061295 https://news.ycombinator.com/item?id=8061295
- axman6 12y agoI personally feel that this post has missed a huge opportunity to show how to do much more complex things from smaller pieces with trivial proofs providing high assurance. I wish the example application had been something far more interesting and useful; at the moment it's a poor implementation of tee. Too much theory without any discussion of how it's actually useful (which it definitely is! it's just not articulated).
- Gabriel439 12y agoI do plan on writing up a longer example, but I wanted to get the basic idea out there first so that I could just link to it in the follow-up post. The example I'm building up to is quite long and would have easily tripled the size of the post if I had included the entire thing inline.