4 ms·
Disappointed that this wasn't actually a workshop for families. Cambridge used to use (still uses?) ML as a first language for CS undergrads, making its obscuri
by theoh 12y ago
Disappointed that this wasn't actually a workshop for families. Cambridge used to use (still uses?) ML as a first language for CS undergrads, making its obscurity a strength (it is a new experience for most students).
I see one of the abstracts talks about a "classless society" as a pun relating to object orientation. This makes me groan a bit, as there seems to be a general tendency in FP to make superficial quips, puns or observations like this while the community of FP programmers remains totally divorced from reality.
A good example is the notorious video interview
https://www.youtube.com/watch?v=iSmkqocn0oQ https://www.youtube.com/watch?v=iSmkqocn0oQ
in which Simon Peyton Jones laments the fact that pure functional programming languages just make the CPU heat up and nothing else (i.e. they have no useful side effects.) He probably wasn't being completely ingenuous but it comes across as a lack of self-awareness: FP is all about calculation and expressions, the program is an input and the value it evaluates to is the output... That's all you can expect. You need some other paradigm to "do" things, IO monads notwithstanding.
Conan Elliot has a fun blog post on the c preprocessor which dances around this issue a bit:
http://conal.net/blog/posts/the-c-language-is-purely-functional http://conal.net/blog/posts/the-c-language-is-purely-functio...
- ZenoArrow 12y ago"A good example is the notorious video interview https://www.youtube.com/watch?v=iSmkqocn0oQ https://www.youtube.com/watch?v=iSmkqocn0oQ in which Simon Peyton Jones laments the fact that pure functional programming languages just make the CPU heat up and nothing else (i.e. they have no useful side effects.)" You're not the first person I've seen that's misunderstood this video, I can only guess at why... One thing it's probably worth remembering is that Haskell has been a research platform for many years, and some of the Haskell features that people take for granted today did not exist in earlier versions. SPJ is not saying that Haskell is useless now, but it was close to useless for creating programs for a number of years. As a case in point, try to imagine Haskell without monads. Hopefully knowing that Haskell did not have monads at one point helps you understand the historical context of this discussion.
- theoh 12y agoAre you saying the video predates the IO monad? I don't think that's true. In any case, I don't think I have misunderstood: I just don't agree with his notion that a hypothetical purely functional language is "useless", as I explained.
- kenko 12y agoI must have missed that explanation. What would the use of a really pure functional programming language be? One with no side-effects, not even printing to a console? (How are you going to get the answer to your computation back out?)
- theoh 12y agoOK, maybe I didn't make myself clear. Basically I am just saying that a "useless" pure functional language as characterised by Peyton Jones is equivalent to a souped-up desk calculator. You type an expression in (a form of IO provided by the runtime), you press Enter, and you get a value back. This is far from useless, nothing to he ashamed of. A "classic" bit of functional programming like Hutton's solution of the Countdown problem requires nothing more. http://www.cs.nott.ac.uk/~gmh/bib.html#countdown http://www.cs.nott.ac.uk/~gmh/bib.html#countdown I reckon a lot of people want to use that kind of machine, though it rules out systems programming. See for example the requirements expressed in this article: http://www.americanscientist.org/issues/pub/calculemus http://www.americanscientist.org/issues/pub/calculemus
- kenko 12y agoHe was obviously not being ingenuous and it's amazing to me that anyone can watch the video and think there's any question about it; he's describing the fact that they had to figure how to do side-effects. And indeed, they did figure out a way to do side-effects.
- lindig 12y agoThe "classless society" was mentioned by Andreas Rossberg, the author of the talk. He works at Google on the JavaScript V8 engine as a compiler engineer and is on the JavaScript (ECMAScript) language committee. I'd call this pretty well grounded in reality.
- theoh 12y agoI was calling him out on the frivolous and unfunny quip, not implying he isn't a serious programmer. And I don't mean to single him out for criticism in particular, I was just reminded of the Foozles phenomenon: https://wiki.hh.se/wg211/images/5/58/Foozles.pdf https://wiki.hh.se/wg211/images/5/58/Foozles.pdf For me the context here is that Cambridge is a massively elitist centre of frivolous intellectual pursuits, in a country with the highest levels of inequality in Europe. http://www.theguardian.com/society/2014/aug/28/closed-shop-deepy-elitist-britain http://www.theguardian.com/society/2014/aug/28/closed-shop-d... Perhaps I have a chip on my shoulder about this, but I actually did my undergraduate CS degree in Cambridge before I knew anything about the world so I am at least somewhat qualified to comment on that milieu, from a political point of view. It's cosy but relevance to the everyday life of the masses is not a strong point. I don't have any comment on whether JavaScript implementation details have political consequences.
- lindig 12y agoThe V8 engine is implemented in C++ and so I'm sure Andreas has a good grasp of the relative benefits of FP and OO. In the context of your observation about inequality in the UK I find the "classless society" actually funny.
- samth 12y agoAndreas' comment is not about OO at all. It's about the second-class status of modules in ML, where the 1ML design that he described in the talk makes modules first-class values. And is your claim really that people in the functional programming community shouldn't make jokes in their talks until FP lives up to your notion of practicality? How many banks need to use Haskell, how many switches need to run on Erlang, etc etc, until you're satisfied?
- theoh 12y agoActually, for what it's worth, it's the widely accepted status of FP as a kind of elite ghetto that I was alluding to, rather than its practicality. I'm not the first to comment on that, and not the best placed to know how to fix it, but, you know, I was musing on what it might be like to have an ML family event involving kids learning functional programming. Something a bit "soft" rather than relentless logic and category theory.
- samth 12y agoActually, there was no category theory at the ML workshop. And the particular complaints you made were based on misunderstanding Andreas' joke, and on being annoyed that FP people are playful while being an "elite ghetto". The particular example of someone who makes a joke, Simon Peyton-Jones, has spent the last several years pushing computing into every elementary school in the UK.