[Haskell-cafe] mistaken post

Neil Mayhew neil_mayhew at users.sourceforge.net
Sat Feb 10 00:05:15 UTC 2018


Doug,

Although I was puzzled about the context, I loved reading your paper! So 
it was a happy mistake as far as I'm concerned :-)

I found it fascinating to realize the equivalence between processes 
connected by pipes and lazy lists with function composition. And I'll 
definitely be adding that two-liner to my repertoire of cool examples 
that I use when trying to explain the virtues of lazy functional 
programming to others. The other one that I use is the fairly well-known 
recursive Fibonacci generation: fibonacci = 1 : 1 : zipWith (+) 
fibonacci (tail fibonacci).

By the way, for your Try It section, you might want to consider using 
codepad.org <http://codepad.org>, "an online compiler/interpreter, and a 
simple collaboration tool. It's a pastebin that executes code for you. 
You paste your code, and codepad runs it and gives you a short URL you 
can use to share it." For example, through something written here a few 
days ago, I came across a fascinating generator of rational 
approximations to pi written in Haskell, and the author used codepad.org 
<http://codepad.org> to show both the code and the results. The code is 
at http://codepad.org/C2IVTlCC and the explanation is at 
https://www.quora.com/What-is-the-best-rational-approximation-of-pi-Let-best-be-the-difference-between-the-number-of-digits-used-to-represent-the-rational-and-the-number-of-accurate-digits-in-the-decimal-expansion/answer/Anders-Kaseorg

Understandably, the implementation of codepad.org <http://codepad.org> 
is careful about setting resource limits, so it would be interesting to 
see how well it handles your shell and C programs, both of which are 
effectively fork-bombs.

—Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180209/16337ece/attachment.html>


More information about the Haskell-Cafe mailing list