On syntax, in Haskell and Lisp

Yes, but not so much simplicity of syntax. I’m misled here by a superficial resemblance between the cultures of Haskell and Lisp. Both cultures are obsessed with mechanically processing code, and therefore want the language core to be as simple as possible. Since a minimal core is impractical to program in, both expect a larger, more useful language to be defined by translation to the core, so its complexity can be mechanically eliminated. And both consider the representation of code as text to be separate, at least in principle, from the core. So at first glance, it seems as if they should have the same attitude to syntactic complexity.

But they treat it quite differently. Lisp’s culture considers syntax unimportant, and therefore tries to make it as simple and transparent as possible, so it won’t prevent humans from seeing through it — because code is much more interesting than its textual representation. But Haskell’s culture considers syntax safely separate from the language core, and is therefore willing to tolerate complexity in it. Since it goes away without inflicting any complexity on the core, why shouldn’t it include whatever features are convenient?

Nit-picking languages

It’s that (too frequent) time again … when I anxiously (and full of fickleness) wonder what language to increase familiarity with.

The last year, I learnt quite a bit of common lisp, or atleast enough to write a lot of exploratory code in, working with libraries, timing, profiling, improving, and so on.

I had a rude shock when I learnt from one of my Scheme heroes that he really just prefers…

View On WordPress

Nit-picking languages

It’s that (too frequent) time again … when I anxiously (and full of fickleness) wonder what language to increase familiarity with.

The last year, I learnt quite a bit of common lisp, or atleast enough to write a lot of exploratory code in, working with libraries, timing, profiling, improving, and so on.

I had a rude shock when I learnt from one of my Scheme heroes that he really just prefers Haskell now. WTF? But seriously, he makes good points, chief among which is the lack of confidence in refactoring existing lisp code.

But both have the same “lack of libraries” barrier (sure, you’d say, why don’t you build your own — but that’s not the point).

So I’ve been moving around among these, toying with some web-development style languages (and always recoiling from JS), when I suddenly realized that I have absolutely zero experience with any of the .Net languages.

So, (just thinking out loud here) why not learn me some F#, and kill two birds with one stone?

Calculating, Scheming, and Paul Graham

Calculating, Scheming, and Paul Graham

I came across [this paper] recently, and it challenged some of the thoughts/assumptions that had been building in my mind for a while (it discusses Scheme vs Miranda, but you can imagine Lisp vs Haskell instead).

It also mirrors a short email exchange I had with someone who I expected to be a Scheme/Lisp “champion”, but who gently led me down from my gas balloon of hype.

Yes, S-expressions are…

View On WordPress

Calculating, Scheming, and Paul Graham

I came across [this paper] recently, and it challenged some of the thoughts/assumptions that had been building in my mind for a while (it discusses Scheme vs Miranda, but you can imagine Lisp vs Haskell instead).

It also mirrors a short email exchange I had with someone who I expected to be a Scheme/Lisp “champion”, but who gently led me down from my gas balloon of hype.

Yes, S-expressions are great, and one can fall in love with them, and the notion of “building material” for a language to build an application or solve a problem, but there’s no point being dogmatic about them.

Also, another tangential perspective: people consider Paul Graham a big advocate of Lisp, but in my opinion there is no one who has harmed the cause of Common Lisp more than Paul Graham.

Instead of praising the language that allowed him to build his own “killer app”, or teaching the specific details of his implementation, or his own work with the language, what did he proceed to do instead? Ask everyone to wait for his “perfect language” (i.e. stop using Common Lisp!!), and write inflated, abstract articles attracting only language lawyers and the my-language-is-longer-than-yours crowd. Sheesh.

If you want to learn Common Lisp, read The Land of Lisp or PAIP or PCL instead, or browse the sources of Hunchentoot or gendl (or some of the other well-used open-source libraries out there).

Trying out Haskell again

Because, you know, every once in a while …

Clear out existing stuff

rm ~/.ghc ~/.cabal

Get basic stuff

sudo apt-get update
sudo apt-get install ghc cabal-install

Set up cabal

cabal update
cabal install cabal-install

Set up misc recommended packages

cabal install happy alex
cabal install ghc-mod structured-haskell-mode stylish-haskell

Some half dozen persons have written technically on combinatory logic, and most of these, including ourselves, have published something erroneous.

Since some of our fellow sinners are among the most careful and competent logicians on the contemporary scene, we regard this as evidence that the subject is refractory.

Thus fullness of exposition is necessary for accuracy; and excessive condensation would be false economy here, even more than it is ordinarily.

Haskell B. Curry and Robert Feys, Preface to “Combinatory Logic”