S
Stack Builders
stackbuilders.com · Company blog · on HN since 2012
Stack Builders is a software consultancy whose blog covers Haskell, Idris, ATS, PureScript, and microservices.
What HN saysHN links its Haskell tutorials, such as GHC fusion and Idris proofs; one commenter says the Idris reverse proof shows only limited correctness.
20HN people shared it
7linked it in comments
74stories submitted
409story points
4 months agolast shared
2012people per year2026
Most-shared posts
- 1Maintainable web endpoints with Haskell and ATS2 people · 36 points · first shared 2015 · discussion on HN
- 2From Type Theory to Haskell in 10 Minutes2 people · 27 points · first shared 2014 · discussion on HN
- 3A tutorial on connecting a Haskell back end to a PureScript front end2 people · 8 points · first shared 2017 · discussion on HN
- 4GHC optimization and fusion2 people · 8 points · first shared 2016 · discussion on HN
- 5Welcome Deno Does this mean goodbye to Node.js?2 people · 5 points · first shared 2020 · discussion on HN
- 6The Hidden Costs of Microservices2 people · 5 points · first shared 2015 · discussion on HN
- 7Reverse, Reverse: Theorem Proving with Idris2 people · 4 points · first shared 2015 · discussion on HN
- 8Concurrent Haskell in the real world1 people · 99 points · first shared 2016 · 18 comments on HN
- 9The Uncommon Advantage from Training in Unpopular Programming Languages1 people · 32 points · first shared 2023 · 14 comments on HN
- 10Can Haskell power the next Ruby on Rails?1 people · 29 points · first shared 2014 · 5 comments on HN
- 11GHC Generics Explained1 people · 8 points · first shared 2017 · discussion on HN
- 12Dr. Hakyll: Create a GitHub Page with Hakyll and CircleCI1 people · 6 points · first shared 2015 · discussion on HN
- 13Stack Builders' Haskell Hangout with Eric Jones Part 11 people · 5 points · first shared 2014 · discussion on HN
- 14Having fun with Emacs in Haskell1 people · 5 points · first shared 2015 · 1 comments on HN
- 15The Rise of the ETA Stack1 people · 5 points · first shared 2016 · discussion on HN
What HN people wrote when they linked it
Merovius · 2017-10-02
> For example I can prove my my string reverse works in Idris (https://www.stackbuilders.com/news/reverse-reverse-theorem-p...).
This article basically demonstrates GP point, though. It proves that `reverse` is self-inverse, but there are lots and lots of functions that are self-inverse (for example, `x -> x` is self-inverse. As would be the function that swaps any odd-index element with the one following it).
The claim was a difficulty of how to encode the actual correctness into your type-system. That this article doesn't actually encode correctness of reverse, seems like pretty good for that difficulty.
jsl · 2012-12-01
Stack Builders is hiring Ruby and Clojure developers in NYC and Colombia, South America.
http://stackbuilders.com
marcosdumay · 2022-08-25
There are a lot of people claiming they did it with Haskell (e.g. https://www.stackbuilders.com/blog/wasm-and-cloudflare-workers/). But the compilers don't claim to support it.
I am still to make sense of it.
externalreality · 2019-03-15
I wrote some things a few years ago on ATS. Its introductory but real world: https://www.stackbuilders.com/news/specific-endpoints. Generally ATS is good for verifying pure algorithms. It has code generators which can compile ATS to C and JS and the like. So if you have a very crucial piece of code and you want to do some formal verification of the process then you can try to use ATS. Other than that its completely a research language. I used ATS to write some stuff for my arduino 5 or so years ago.
ekr · 2017-11-16
Luckily for haskellers, GHC does a thing called fusion, which is an optimization that pipes together different operations on data, and avoids allocating intermediate results.
(https://www.stackbuilders.com/tutorials/haskell/ghc-optimization-and-f…
zbobet2012 · 2017-10-02
It depends on your type system. In new languages like Idris or F* you can encode in the type the correctness of an algorithm and it will not compile if the compiler can not prove that correctness.
For example I can prove my my string reverse works in Idris (https://www.stackbuilders.com/news/reverse-reverse-theorem-proving-wit… Or I could prove that my function squares all elements in a list. Etc.
Now a big part of the problem is expressing with sufficient accuracy what the properties of the algorithm you want to prove are. For example for string reverse I may want to show more than that `reverse (reverse s) = s`. Since after all if reverse does nothing that would still be true. I would probably want to express that the first and last chars swap when I just call reverse xs.
olvy0 · 2022-06-11
Just an idea: this or something similar could be utilized to generate test vectors, for property based testing [0]. Also for model-based testing, if you consider the model to be a vector of actions [1]
Currently, AFAIK, property based testing relies on mostly random generation of input vectors. It's possible to "shape" those vectors into other data structures such as trees [2] and it's the way it's usually done, but it's difficult and error-prone for more complex inputs.
There's also the option to filter each vector before running, or, after running, by performing the shrinking algorithm to produce the minimal input vector that reproduces the problem.
When I tried using property based testing for my use-case, as a model-based testing, I had to write code to filter most of the random test vectors since they weren't relevant, they didn't make sense.
So it might be possible to guide the generation of the input vectors so they'll be less random, and save time during run.
[0] https://typeable.io/blog/2021-08-09-pbt
[1] https://fscheck.github.io/FsCheck/StatefulTesting.html
[2] https://www.stackbuilders.com/blog/a-quickcheck-tutorial-generators/