Thursday, February 26, 2009

ANN: VIDEO SCREENING, A taste of Haskell (tutorial), Sat, Feb 28, 13:00-15:00, UEC, Kiev

To re-post a message from the LtU-Kiev maililng list, there will be a screening of Simon P. Jones' video tutorial A Taste of Haskell together with slides. Free entrance for up to 20 people, RSVP at the LtU-Kiev mailing list. Saturday, Feb 28, 2009. 13:00-15:00. Ukrainian Education Center, Kyiv, Ukraine. More about the venue here (eng).

LtU-Kiev mailing list

Haskell users in Kiev, Ukraine, wanted to start a user group (HUG), but it turns out there are not too many practicioners yet, so the group ended up being open to all who love and use functional languages. The common denominator is Lambda the Ultimate readership! Hence the name: LtU-Kiev.

R Language

R language (or S) is something I occasionally deal with. It is known for good libraries for statistics, but its core is a rather general programming language; it is far from being as specialized as advertised. R had even been mentioned on LtU a couple of times. R has a lot of Lisp hidden behind a C-like syntax. Lexical scoping, lambdas, lists. Something I learned today is Recall and call. The latter is not unlike a (quote)..
fac <- function (n) if (n == 0) { 1 } else { Recall(n-1) * n };
fac(10)
eval(call(fac, 10))
The downside is that the implementation is very slow. Since most operations vectorized, the argument is that it does not matter. Realistically, nobody is going to do anything about it. In terms of inter-op with libraries, would it not have been much better to have it (and its wonderful libraries) run on top of a more widely accepted runtime, or even a Scheme or CL.. UPDATE: here is a nice blog on function argument handling semantics in R, which turns out to be pretty complicated. UPDATE: I finally found the draft of the R Language Definition. The section on evaluation and argument matching is particularly interesting.

SML vs OCaml - excellent reference sheet

SML vs. OCaml. Skimming through, just found out about guards in OCaml. And F# too! Very neat. TODO: translate the reference sheet to Haskell and F#, if nobody did yet.

Lambdas in PHP

Next PHP is coming with closures and a functional programming library. Will it help? That may make it a slightly better compilation target. It is unlikely that it will change the way experienced PHP developers program.

Does Visual Studio Rot the Mind?

Does Visual Studio Rot the Mind? Rather a lengthy talk, barely worth a look, but some valid points there. IntelliSense affects the way people program and design programs. In a negative way, I grant you. One more reason to use Emacs.

Wednesday, February 25, 2009

JavaScript 1.8 starts to look like R: expression closures

I was surprised to see this work in my Firefox:
(function(x) x+1)(1)
These are expression closures in JavaScript 1.8. return is gone, good riddance. Now if only we could write fun or \ instead of function! The code would work in R, and my wish applies to that language as well.