Lisp is sin


Over the last few days, there has been one thought running in my head – ‘All roads lead to Lisp’. I’ve tried to get it out of my head but like a tune from the radio, it has firmly lodged itself into my head and refuses to let go. Why this state? Call it a confluence of several items. In particular, these 3.

– Joel Spolsky goes off and writes one of his best articles ever called ‘The Perils of Java Schools‘ which talks about the perils of not learning Lisp. As someone who has been playing catch-up with functional programming since I wasn’t taught Lisp at college, I definitely agree. I forwarded that article to some senior folks internally – which in turn lead to some interesting conversations

– I’ve been working on a prototype of something at work – where I started off the usual imperative programming style. Realizing that this wasn’t going to scale, I rewrote it in functional style making full use of C#’s anonymous delegates and iterators. When I had to make a major change, it was *so much* easier to add in extra functionality since I was just passing closures around.

– After 2 hectic work-filled weeks, I took advantage of a long weekend to curl up with a book which has been called the best book on programming ever – Peter Norvig’s Paradigms of Artificial Intelligence Programming – Case Studies in Common Lisp. I have read SICP but the 300 or so pages I’ve read of Norvig’s book have left a greater impression on me than SICP. Norvig’s book is definitely one of those ‘stay awake all night thinking about it’ books. For one, the Lisp code is much easier to read than the code in Paul Graham’s books (which is partially due to my lack of Lisp knowledge, of course).

This post is an attempt to put all my thoughts about Lisp in one place so that I can refer people to it when they ask me my opinion on whether they should write something in Lisp or Scheme. I swear that when I thought of this title, I didn’t mean it in connection with Don Box’s article called ‘Scheme is love’ :-). Though there’s a disclaimer link, I want to call this out explicitly – these rants are mine alone and not Microsoft’s opinion. So don’t assume they are!

Love and Hate

I have a love/hate relationship with Lisp and Scheme. Over the last 2 years, I’ve tried to convince myself to move to Lisp and Scheme away from Python as my primary language for doing ‘fun stuff’. However, every time I have done so, I’ve run into blockers – almost always the same ones the folks ran into – the lack of libraries which work across Lisp implementations (though the Lisp folks are working on fixing some of the issues – issues like the one mentioned in the last para here).

The first time I used or rather tried using Lisp was when I wrote a crawler back in college. I wound up writing it in Python because of the sheer difference in ‘impedance’ to do web programming. By ‘impedance’, I mean the amount of disjointed knowledge that you need to wrap your head around before you can write your code. In Python, it was just a question of importing urllib2 and a couple of other libraries and I was good to go. I eventually wound up using .Net to make use of Lucene.Net.1

After struggling to resolve the million and 1 Lisp dialects out there, I went another path – the Scheme way. This came about due to the after effects of reading of SICP (a few conversations with Roshan also had something to do with it). I installed Dr Scheme and had a lot of fun. I remember writing Scheme code in college class for fun when the lectures got boring (which they were almost all the time).

My dabblings with Scheme lead me to another path – the implementation of virtual machines which eventually lead to Smoke – but that’s a story for another day. However, as a result, I moved away from Scheme and to the land of VirtualAlloc and C++.

After joining Microsoft, I have played around with Lisp and Scheme on and off – usually inspired after spotting Paul Graham’s book on my shelf or after a conversation with Vishnu about his Lisp experiences.

At work, code is in C# or C++ – the day when Visual Studio is written in functional programming is far away 2 :-). So it was inevitable that I would experience functional cravings from time to time when writing code. I’ve written very little code that ships inside Whidbey but a lot of prototyping, etc – and most times, this craving would be satisfied by C# 2.0. Though the syntax wasn’t as nice and clean, it would usually get the job done. Of course, most times I just wanted map/filter and closures – all of which you can do using anonymous delegates (which are close enough to closures for me). And in recent times, Linq has kept me happy.

I could never quite make up my mind about Lisp – I used to oscillate between “Wow – I love the way my brain hurts. This is so much fun” to “Normal people will find this too tough. Lisp weenies!”.

The one where Google’s director of research influences a Microsoft employee

After a long wait, Norvig’s book wound up on my table a few days back. Due to work, I couldn’t get started on it till a couple of days ago – and since then, I’ve spent almost all of my free time reading it.

What grabbed me was not the Lisp usage in the book. The code could have been written in Intercal (well -maybe not) – but the beauty doesn’t lie in the language – it lies in the style that the language promotes. The sheer beauty of it is dazzling.

 I remember reading the following piece somewhere about Lisp and it struck a chord back then in me. Its about the progression of a Lisp programmer – the newbie realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code.

Nowhere is this more apparent than the way Norvig tackles the General Problem Solver. I thought for a second as to how I would have tackled this in C# (or Python). I would never have gone for the data driven approach that Norvig uses – I would have gone for a more imperative approach with a bigger distinction with the data that makes up the individual ops and the code that executes it.

In The Practice of Programming, Rob Pike says something akin to ‘document your data structures rather than your algorithms’. In Norvig’s work, I could see the code flow out of the data structures. It really is a new way of thinking (at least for me) – to let your data drive your program rather than the other way about. I use the word ‘grok’ sparingly but this is something you need to ‘grok’ to truly understand. But when you do, the ‘plop’ that goes off inside your brain makes it hurt a lot. And expands it at the same time too.

Why does Lisp encourage this kind of programming? S-expressions. Since your code is data in itself, you find it easier to jump between the two. Your code *is* data – so you can change your code at runtime and you are in fact, encouraged to do so. Now, the same thing is possible in other languages as well – self-modifying programs are possible in C++ (and with some hackery, in .NET as well without using Reflection or LCG). However, getting them working, debugging and maintaining them is a feat in itself. 3

 Joel hits the nail on the head when he says that today’s students are missing out by not having their heads hurt due to Lisp. He talks about Microsoft lagging behind Google and though he doesn’t directly say it, one comment I’ve heard from folks is that Google are better suited to do Lisp-style programming due to having people like Peter Norvig. I’m not sure I agree – with folks like Patrick Dussud 4 architecting the CLR, we have sufficient Lisp influence ๐Ÿ™‚

If you want to be a programmer and if you don’t know Lisp, you’re missing out on something. The sad part is – most people do not even realize this. And the fault isn’t even theirs…

Lisp and the common man

Here’s the part that’ll get me flames. This is not a laundry list of things that are wrong with Lisp – I won’t even pretend to be good enough something like that. This is a list of things that have blocked me and people I know from Lisp. Of course, the real reason may be just that we are not smart enough but my ego won’t permit me to consider that an option ๐Ÿ™‚

In Visual Studio, we look at 3 distinct categories of programmers. We call them Mort, Elvis and Einstein – the 3 personas we take into consideration whenever we create any developer technology. What is difficult for some of us geeks to comprehend sometimes is – all 3 of them are equally important. When you look at technology like Windows Workflow Foundation, one of the driving forces was to let non-geeks build software. Not everyone needs to be a Raymond Chen or a Dave Cutler. Not everyone needs to understand the difference between the various GC algorithms. However, everyone needs the ability to be productive. And everyone needs to be able to get software working without needing a CS degree.

In a way, this is a rebuttal to Joel Spolsky’s post on Java schools and an extension of this post from my past life. We cannot afford to restrict software development only to those who know Windows kernel internals or those who can understand what a continuation is. It’s not that other people are not smart – they just have better things to do. That’s the key piece of understanding I find missing sometimes.5

I frequently see on Slashdot “Windows is designed for stupid users”.  That is quite insulting to the millions of moms and dads, teachers and laywers and people from other walks of life who use Windows or even the Mac. If we mandated that every new user understand Windows’ command line syntax or Emacs, we would have failed as an industry – we would have locked out the rest of the world.

Where am I going with all this? Lisp *sometimes* tends to ignore the common man – favoring giving the true hacker power rather than making it easy for the Morts of the world. I understand how it came about – when you write tools for yourself, you are the only user you have in mind – you and people like you. Joel talks about Java schools making it easy for students. However, look at the other side – if you don’t make it easy for these students, they would never be exposed to the wonderful world of programming. I can attest that most of my college classmates wouldn’t have touched CS with a pole if it had involved the stuff Joel talks about.

That’s a hard problem to solve. What would you rather go for? An elite few armed with the knowledge to write great software? Or enabling the masses by making it simpler for them? A cop-out would be to say ‘Find a middle way’. I’m not sure whether there is a middle way.

Python’s battle cry of ‘batteries included’ is worthy of emulation by the makers of other programming systems 6. .Net provides similar functionality but we don’t have such a catchy tag-line :-). A close competitor would be the presence of standards (defacto, ECMA/ANSI/ISO blessed) for Python, Ruby and .Net. If you write a piece of code against a library, you can be sure it works across versions and variants. I know that if I write a C# program today that it can be called by a Boo program which in turn can be called by IronPython. In Lisp, it is often a challenge to find a) libraries that work across dialects b) libraries for common tasks which suit you. Scheme  solves the dialects problem – however, though it is incredibly fun to code in and despite the presence of stuff like the SRFIs, it doesn’t seem to enjoy the popularity of CL. I’m not sure why that is though – maybe it would be a good thing if that changed. A language with such a short specification is a true work of art ๐Ÿ™‚

The good news is that the Lisp community seems to be awoken to some of these issues – the incident seems to have been the proverbial straw. By looking at stuff  like this which involves McCarthy himself, perhaps change is imminent.  I definitely look forward to the day when I can write defun within Visual Studio and have the full blown support of .net and the IDE. Slime+ XEmacs are just not for me ๐Ÿ™‚

The new Lisp

Paul Graham says in ‘On Lisp’ “The question is not whether Lisp..but rather ‘when'”. He also talks about Python and how Lisp features have made their way into Python. This brings forth an interesting question – will the next Lisp be Lisp itself? Or some other language? If you take a look at the programming language landscape, Python seems to be the frontrunner now in terms of bringing Lisp features to mainstream programming.

However, there are 2 little programming languages which may well prove to be the dark horses in this race. They are C# and VB and with folks like Anders Hejlsberg working on them, I wouldn’t bet against them. Take a look at C# 2.0 anonymous delegates or Linq – they bring to millions of programmers what was once only available to Lispers (and in some cases, like Linq, stuff that Lispers wouldn’t have had without some major effort).

After looking at Norvig’s implementation of memoization in his book, I set out today to do the same in C# 2.0. Here’s what I wound up with after 10 minutes.

public delegate TReturn Function<TParam, TReturn>(TParam param);

static Function<TParam, TReturn> Memoize<TParam, TReturn> (Function<TParam, TReturn> func)

Dictionary<TParam,TReturn> memoDict = new Dictionary<TParam,TReturn>();
return delegate(TParam arg)

    TReturn result = default(TReturn);

        result = memoDict[arg];
        result = func(arg);
        memoDict[arg] = result;
    return result;



Is it as pretty as the Lisp counterpart? Probably not. But I’m willing to bet that a lot more developers will be able to understand this since this is in a programming language they understand well. And it gets the job done in most cases.

Maybe C# is the next Lisp. That would be a sight to behold ๐Ÿ™‚

Lisp – The Temptation

I was on vacation a couple of weeks ago at my parents’ house in Chennai. My dad and I share a love for James Bond movies so my dad had bought a set of DVDs containing all the Bond movies in existence. I can’t help but strike a politically incorrect analogy – Lisp is like the villainesses present in the Bond movies. It seduces you with its sheer beauty and its allure is irresistible. A fleeting encounter plays on your mind for a long,long time. However, it may not be the best choice if you’re looking for a long term commitment. But in the short term, it sure is fun! In that way, Lisp is…sin.


1. I took a look at Lupy and PyLucene and liked neither. However, I hear PyLucene has made great strides – Mitch Kapor’s Chandler uses it if I remember correctly. So – any college students out there, don’t trust anything I say.

2. A lot of people have asked me what language is used to write Visual Studio. The short answer is – COM filled C++ and C# form most of the code. However, our internal tools use a mix of batch scripting, Perl, etc. I was permanently mentally scarred the first time I saw an entire program written in batch file syntax – it makes Perl look elegant!

3, In AOCP, Don Knuth talks about a self modifying random number generator – which later turned out to be buggy!

4. Patrick Dussud worked on TI’s Explorer project and with Richard Gabriel on Lucid. He caused a bit of a stir sometime back with his talk to the Lisp community entitled ‘Re-inventing Lisp for Ubiquity’. Review here. Another source of information on Patrick is from Richard Gabriel’s book ‘Patterns of Software’ which you can read at Even if you don’t care about Patrick, do read the book – it is an awesome piece of work covering everything from the quality missing in software to Lucent, the story of XEmacs and the rise of Jamie Zawinski.

5. I find that in some of Paul Graham’s writings – like at  I love his work – but I sure would love to see him work in Apple or on the VB team . Something that people don’t take into consideration is that the ‘pointy haired boss’ has to think of finding people to maintain your code – and when the company grows, finding more people to work on it. Paul’s rebuttal to that is at – I would like to see that updated after reddit.

6. I’m not sure what the right word is for programming language + libraries+ tools+community so I’m using ‘system’ as a substitute.


[Updated: Fixed a couple of typos – Lucent -> Lucid and -> ]

Comments (51)

  1. Aarthi says:

    Awesome post!

    >>Maybe C# is the next Lisp. That would be a sight to behold ๐Ÿ™‚

    Disagree, you know why ๐Ÿ™‚

    Also reminds me that I have to dust off my Lisp books and get them to my table.

  2. vivek says:

    Some of these points are really very valid, but you have to understand that there will always be two paradigms for programmers : Work and Play. I’d group things like C# , Delphi , Java , PHP , Ruby , Python etc in the "Work" side.

    LISP, Scheme, Perl, C etc are examples of "Play" things. It may seem odd, but things made purely for playing around with have much more impact than anything. K & R wrote UNIX for fun, Linus did the same with linux, I doubt that anyone ever envisioned that lisp would be anything more than a formally analysable notation for algorithms back in the 50s. Its very simple, work sucks, but play is fun. Just look at the innovations in the private space industry on shoestring budgets. Could nasa ever have done that? The whole automotive industry bowed down to Smokey Yunnick. Burt Rutan taught aero manufacturers a thing or two.If pure efficieny in getting stuff done quickly were all there was to programming, itll be dull and boring.

    (India specific example)Admitted that a Hero honda will get you the cheapest and easiest way to the destination, but then why do people (like me) ride Royal Enfields?

    A day will never come when there will be an international Obfuscated C# contest. So C# as the next LISP? Thanks, but No thanks.

  3. eloop says:


  4. Goncha says:


  5. Tukra says:

    Your example of memoize is C# shows that templates and such make some things possible but to claim that this is therefore within the grasp of your average C# programer does not follow.

    I think one would have a much easier time teching this concept to an average programer in lisp where you can see the concept through the code. Your C# example is a perfect example of the crazy hoops one must jump through in a langauge where these concepts are not the design goal. When I was a C++ progammer I found that most of my peers could not even follow fairly simple templating examples.

  6. Jeswin P says:

    The best option for a .Net programmer to do functional style coding is using F# or Nemerle.

    The F# compiler and VS integration is remarkably solid, for something that isn’t really out of the labs.

  7. Steve says:

    I know you know this already, but PLT Scheme has an implementation for Windows, Unix and Mac which includes threading and sockets, etc. I spent about 6 months learning CL, then switched to PLT using How To Design Programs and SICP. A cross-platform, full-featured Lisp is here: it’s PLT, and it’s fun, powerful, and beautiful.

  8. gozh2002 says:

    great post. I very agree with you that C# looks more prmising to support the FP style paradigm in next version, look at what all those haskell people do in microsoft research.

    I looked at Cw recently. What is fantastic to me is its threading support syntax, simple and powerful, also I can feel they are using styles from haskell.

    What I wondered is in next version of C#, I see LINQ but is there any major sytax upgrade for concurrency?

  9. dp says:

    I have been programming in lisp for longer than most of the people in the industry have been alive. I even got paid to do so for more than 15 years.

    Some general observations:

    An old saying – lisp is a ball of mud – You can glom more stuff onto it, and it still looks the same. Anything you write looks acts, and parses just like the "built in" stuff. A lot of it started that way, with someone coming up with a construct, and it later moving into the core language.

    The most obvious example is the object system – the initial design happend while a couple of MIT types were in line waiting for ice cream — thats why the lisp machine system was called "Flavors", and the method combination feature was called "mixins".

    As a result the language is huge – the language spec is well over 1,000 pages. Some of it is historical oddity, but most of it is just the resulte of decades of acretion. (yes, decades. Lisp as a language is about 6 months younger than fortran) While the learning curve does have a few steep spots its problem is one of length. But you can start small, somewhere I have a copy of a "comic book" text – something like 40 pages might be called "the little lisper" – was used as the text for a one semester "programming for poets" class in the mid 70’s.

    But I will make a closing comment – Lisp can be a developers "secret advantage". Partly the language partly that lisp systems tended to have very powerful development tool suites.. But I was able to develop large products with a tenth the staff that comparable "conventional" implementations would need. (example: buidling a whole IC cad system from scratch, including routing, automated device layout, "live schematic", functional simulators, and lots of etc.. with less than 20 man years of development investment – and several of them were learing the language at the start…)

    There are lisp implemented products out there the association of lisp users has some examples. The ones I was involved with got a lot more done, and had a much more reliable deliverable than did the conventional programming teams could manage…

  10. Sriram:

    I have also been stuyding lisp lately, but my thoughts led me to a different metaphor: lisp is a curse.

    Specifically, lisp is like the curse of the Pharaoes. It is an ancient incantation (40 years old, for a _computer language_), written in strange alien hieroglyphics (all those parentheses), which attracts only the best and the brightest (the first Egyptologist were true scholars and romatnics), and which, inexorably, causes these brilliant men to go mad.

    I can’t believe the Pharaoes’ curse merely kills you — I see it working more more insidiously. Once you have read the papyrus carrying the curse, the symbols stick in your mind. You find you are spending more and more time contemplating them, trying to unriddle them. First it’s in the back of your mind. Then it’s what you think about for hours of the day. Eventually you spend every waking moment mumbling its strange words to yourself, words which create a private world in your own mind, a world that you lose yourself in. Eventually, you are no longer a man.

    So too with lisp. Its lyrical beauty reaches out only to certain people, and it destroys them.

    In the last few days I’ve been wondering about lisp for a web application. I was put in touch with a friend of a friend, an old-timer who used lisp on PHP project. How did he do this? He decided to implement an entire lisp interpreter in PHP. Now he is implementing a lisp interpreter in javascript.

    Why? Because lisp is a curse.

  11. fiobio says:

    Good post indeed. But I must say that in your C# memoization example you’re cheating ๐Ÿ˜‰ Your example is actually a translation of MEMO function from Norvig’s book. Correct me if I’m wrong, but I think that in order

    to implement MEMOIZE function some very

    bad IL tricks would be necessary. Also,

    DEFUN-MEMO macro is entirely impossible without

    additional code processing tools. Probably

    the problem can be worked around by adding

    some [Memoized()] attribute to specific

    methods that can guide IL-based memoization,

    but all this is just too hard to implement

    compared to the Lisp way.

  12. sriram says:

    Fibio – you’re right. Wrong naming on my part! ๐Ÿ™‚ As for Memoize, you probably dont need bad IL tricks. With static extensions in Linq, this *might* be possible. My bad, anyway

  13. This one is for stumbing tongue ๐Ÿ™‚

    I just exchanged some emails with Sriram and in one of them I pointed him to to page in the

    SICP book he refers to in this Blog take look into . Take a look and you’ll know why its important to know LISP and why it not important whether you can create a web-application with it…..

  14. Yuvi says:

    Well Sriram, it’s your influence that I now have Python, Ruby, Perl, Lua, TCL & Prolog on my System. With this, I think I’d try LISP as well, though I’m goanna follow up only on Ruby and Lua….

  15. Yuvi says:

    Well Sriram, it’s your influence that I now have Python, Ruby, Perl, Lua, TCL & Prolog on my System. With this, I think I’d try LISP as well, though I’m goanna follow up only on Ruby and Lua….

  16. Vishnu Vyas says:

    1. I would kill to have your bookshelf!!

    Ok.. I partly agree with joel on why java or any language for the Morts is bad or rather pointless.. thats better..

    Here, In India people take computer science not because of the love of it, but because it gives you jobs.. and you get average joes, and java suits them fine, but for the occasional guy who ends up being a hacker, would have gone the scheme/Lisp way evantually. So, all your good cs hackers get to scheme or lisp anyway.

    And secondly, I personally believe that instead of breeding more Morts and Elvis’s (Maybe its ok to have Elvis’s around), wouldn’t it be better to have more einsteins around? Agreed, that for a "business", a mort is as important as an Einstien, but in the long run, its better to have more einstiens than morts around, or we might miss out on General Relativity.

    So, shouldn’t education endeavour to create more einsteins by "hurting their brains"?. I guess thats what joel’s point was all about. It aws about the "perils of java schools" and not about the "perils of java shops", Not about companys. (btw, If I were a for-profit company trying to build something like, morts would be highly important coz they are simply more in number..)

    Thirdly, Indian education, esp CS is so screwed up beyond hope, we end up having our younger demographic answering phone calls all through the night with a fake accent, that we need something like (as strong as) lisp to get back all that we are losing.

    2. About maintainable code, after my recent experiences at CAIR, is only a matter of discipline, not the language. Language would make not more than 5% of difference to the maintainability of code.

    Its about getting the right amount of layers (abstractions) in your code right. Its something you don’t expect novices, or even Elvis’s to get right in the first try. (btw, some C++ code here can give you nightmares for sometime..)

    Now, about the schemers part, I guess scheme when you take in numbers, is as popular as lisp, just that it doesn’t get talked about much. We have pg who goes about with Lisp propoganda, we don’t have equivalent people for scheme.

    Infact, personally, if it weren’t for slime "send code to repl" feature, I would put Dr.Scheme at no.1 (its at no.2). And secondly I guess that most lispers are schemers as well, just that it isn’t well known or don’t talk about it.

    On an avg, (when i was not working) I was scheming as much as lisping.

    And about standards.. Python not having a standard (for the language) is such a huge drawback that makes CL look so good as on option for things I want done.

    All said and done, having a written and published standard is so important (including aspects of maintainability) that "BDFL" stuff doesn’t cut it. (at all..). [ btw, some people tend to disagree about this view on a/c of plausible deniability, i.e standards are something to blame ].

    Any way, nice post.. good respite from trying to maintain horrible C++ code ๐Ÿ™‚

  17. Vishnu Vyas says:

    After putting down the morts, etc.. I think simple programming languages are highly important, not for fellow cs people, the software developers, but there are a whole lot of other people who need to get stuff done without worrying about things like pointers, heirachichal memory organisation, or how to flip a list in O(n) time.

    Infact, I work with these kind of people day in and day out. And no, they are not your morts, they are the EINSTIENS. These are some of the smartest mathematicians and physicisits and signal processing people that I know. And their time is better spent on getting their "X-ray telescope" simulation to work, rather than worrying about things like "Is the function call there getting inlined or not?".

    This is where any language that doesn’t get in your way goes a Long Long way. python fills this niche perfectly.. but guess what? Neither C++ nor lisp fits it. This is the niche where simple, easy to learn, languages make their mark. Making "non-programmers" productive in programming.

    So, if you are a programmer, starting out and staying in something like java or python is "SIN". And lisp is not. you will never learn "computer science" without lisp, the same way you will never learn coordinate-geometry without graphs.

    But, if you are programming only because you need to get something else done, then java is just as good as any of the dialects of lisp out there.

  18. OneProgrammer says:

    Please, if Microsoft "borrows" Lisp and Scheme ideas so heavily as you mention in your blog, at least give proper credit to Scheme and Lisp and guys that did the hard part of programming languages research (including Guy Steele). Maybe he works for Sun which is Microsoft competition, but that doesn’t matter – being large and rich like Microsoft doesn’t mean you can freely take smaller kids’ stuff and call it yours.

    It’s not about your personally, I like your appreciation of Lispy things.

  19. Sanjay Pande says:

    Hi Sriram,

    Any Scheme dialect is *much* easier to learn than Java, C# or anything else that descended from there. The reason that Scheme is a favourite with AI professors is that they can teach the language in 2-3 classes and then focus on the hard problems that are to be solved. It is clean, beautiful and powerful. Anything that is syntax based cannot look the same even if it lets you do the same things.

    Common Lisp is very different from Scheme. Very practical and one of the most powerful things I have seen. It does have its drawbacks but that does not have to do with the design of the language but more with the implementations.

    Another language that is beautiful is Smalltalk and again extremely easy to understand to both a child as well as an esoteric hacker. You folks will never get that.

    I find programming in lisp dead easy and using anything like C#, Java etc hard and boring.

  20. Matt says:

    This is the best article I’ve read all month! ๐Ÿ™‚

  21. Lisp gave me motivation in spikes. I wish it could sustain. I’m considering it again.

    btw, PCL makes me sick. That book is slow to my ‘pace’. So I’m seeking a different book, that is _available_.

  22. Martin says:

    I’m also falling more and more in love with LISP, but I learned LISP via hacking Emacs for more than 10 years rather than studying Scheme in school. I must admit that acquiring knowledge of Python has made my LISP better, and rekindled a vivid interest in it, to the extent that I’m reading or re-reading the same books you mention in your post these days.

    Now, I keep wondering, if LISP is only lacking good standard libraries, and Python has them, using Python 2.5’s AST work, could we easily build a program that would generate a decent enough translation of those Python libraries into LISP packages? Of course, the result would need to get LISPified to take advantage of the more powerful paradigms there, but as a first step, wouldn’t that sort-of kickstart a great new era?

    If think that if I could find a LISP that has all the std libraries that Python has and a decent community around it, I would probably switch to that tomorrow for many of my projects.


  23. Hemanth P.S. says:

    I read this is in a blog; I am not able to recall who said this. Paraphrasing it, "A major problem with lack of Lisp’s popularity/practicality is not to do with the language itself. But that the Lisp community is hostile towards newbies and as long as the lisp community suffers from this social problem, Lisp cannot succeed". I tend to sort of agree with this. My feeling is that I haven’t found the Lisp community as friendly as the Python community.

    –Hemanth P.S.

  24. RighteousAnger says:

    It’s funny how these Microsoft bas…rds rip off everything nice in computer science, not giving anything in return. What they give us instead is broken operating system that only gradually gets Unix scripting abilities, they also just "invented" text config files in ISS 5.0 – veery clever, that’s what unix guys knew 30 years ago, broken internet browser that can’t even parse html comments properly, obfuscated APIs like MS Exchange one which is basically uglish COM wrap around email protocols.

  25. Pyotr says:

    I don’t share radical language of my predecessor, however, Sriram, isn’t it interesting that you, MS guy, read a book written by Google director, current No. 1 Microsoft enemy (kind of)?

    On the other hand, do you read books written by Microsoft directors? To me, they are just generic MBA bull… ehm tales that we programmers despise and loath. Books written by company directors express company culture pretty nicely.

    So, fair enough, Google culture seems more appropriate for a computer science geek and lisper like you… i am not working neither recruting for Google, just giving yoy a neat little disturbing idea.

    Good luck


  26. Jon says:

    Have you seen L Sharp – ?

    Wouldn’t it be great if you could hack Lisp from Visual Studio ?

  27. jope says:

    Both Lisp and C# are anachronism really, though Lisp has definitely a lot more modern language design features and a lot less madness in it than C#. All languages that build on the crime that C and C++ were should be eradicated from the face of this planet, because all the do is teach programmers how not to do things.

    Have a look at Ocaml, take the time to actually use it for some time and you will see what a language *can* achieve and how good design makes it not only easy to implement your algorithms, but also hard to commit errors that can get serious during runtime.

  28. Tim says:

    I would have thought something like XSLT & XML would be the place that the ‘new Lisp’ would spring from. S-expressions == tags, code & data intermingling etc.

    Some way of making [XSLT|Lisp] look more like the syntax of C# would be a winner. The parentheses in both make ones eyes go funny… Maybe python whitespace?

  29. Sidharth says:

    Lisp’s great strength is in macros. I think thats also the one bit that most other mainstream languages are going to stay the farthest from.

    Fortress( has some sort of language extention mechanism but I’m guessing that’s limited to/focused on scientific computing requirements and won’t be anywhere near as complete as lisp macros.

    Nice post btw.

  30. Marcin says:

    I made a similar point about the environment for lisp in a comment on lemonodor: Lisp lacks a single turnkey solution, like the JDK, which comes with copious libraries and rational documentation. The creation is not especially a technical problem: It just needs some people to step forward and make themselves the defacto centre of the new lisp universe. Also, this system should not use ASDF, because ASDF has too many incompatible versions, and too many things go wrong, like with all packaging systems.

  31. Roshan says:

    "I remember reading the following piece somewhere about Lisp and it struck a chord back then in me. Its about the progression of a Lisp programmer – the newbie realizes that the difference between code and data is trivial. The expert realizes that all code is data. And the true master realizes that all data is code."

    This part of the intro for Dan Friedman’s Essentials of Programming Language. It is true.

    I would recommend scheme to you beacuse of continuations. In time, you may realise, that this is related some deep ideas in computation.

    Finally, if you have to stick wth one Scheme, stick with Chez Scheme. Also, I hope you know Common Larceny exists.

  32. ja23 says:

    Here’s something sinful:

    Their demo server needs no registration.

    They call it a "knowledge operating system"… whatever that means. I think that it’s just an online Lisp thing, plus a bunch of data and tools.

  33. Anand Sathe says:

    Hmm – you are close to the promised land – the logical next of in-step step to Lisp would be Smalltalk.

    been reading your blog for a year or so – based on what I have read, something tells me you would fall in love with it. Can talk some more if you are interested

  34. I agree with you, Lisp surely is quite seductive, but when you look at it from a very practical viewpoint it doesn’t fit in at all.

    First, is the question of code maintainability, second, is the ability for a developer to carry their skills forward.

  35. Tage Stabell-Kulø says:

    I use Lisp because it is based on a model that has proven to be rather useful: van Neumann. It is not Lisp that makes code and data looks the same, it is van Neumann. If your language resembles Turing (code cast in stone) you should ask yourself why Turing machines are on paper only. In theory, the expressive power of Turing and von Neumann is equal, as is the power of aassembly and C# and Lisp. But in practice there is a difference, And this difference has value. At least to me.

  36. Adhemar says:

    I really hope one day the mixed imperative-functional (object oriented) languages are going to break through.

    Personnally, I really like Nemerle [1], although it’s still just a research language. Itโ€™s kind of C# with functional additions. It allows you to think functional when it makes sense, and imperative when it doesnโ€™t. Together with the macros itโ€™s quite powerful.

    I think thatโ€™s the direction programming languages should go. Find the best of two worlds.



  37. For comparison, here’s a Common Lisp version of memoize, from Paul Graham’s "On Lisp". Note that it handles functions of an arbitrary number of parameters.

    (defun memoize (fn)

    (let ((cache (make-hash-table :test #’equal)))

    #'(lambda (&rest args)

    (multiple-value-bind (val win) (gethash args cache)

    (if win


    (setf (gethash args cache)

    (apply fn args)))))))

  38. A basic memoization function in Perl is pretty self-explanatory (I assume this applies to Python and Ruby as well); certainly much, much easier to read for a casual observer than the C# example is. Much less intimidating than the Lisp version, as well โ€“ Syntax Matters.

    Now, Perl 6 will come with continuations, coroutines, hyperoperators and real Lisp-style macros.

    Not only that, but the language will be defined in terms of its own revamped pattern match syntax, which is really an honest-to-goodness grammar language with first-class language citizen status right alongside other control structures, so that you will be able to *modify* the language grammar *while* the code is being parsed. This is the ultimate eval(): all the power of Lisp, but with actual syntax.

    (Itโ€™ll also clean up OO and add stuff like traits and multimethods. And do a whole host of other spring cleaning.)

    I know where Iโ€™m putting my money for what the next Lisp will be.

  39. Someone with Taste says:

    I think I’m going to throw up!

  40. Rukaiya says:

    Damn good post!

  41. Joel Spolsky has a great essay on the perils of JavaSchools, those programs that adopt Java (or .Net, to be fair) because it is easy for students to learn. In it, he sings the praises of learning Scheme. Without…

  42. newlisp says:

    newLISP is a good alternative for quick scripting stuff!

  43. newlisp says:

    newLISP is a good alternative for quick scripting stuff!

  44. Greg says:

    Lisp is a sin, ML is a virtue!

  45. Some of my CodeBetter neighbors have been posting and arguing about the relative merits of Rapid Application…

  46. ya bi siktirin gidin says:

    ebenzin amฤฑna eลŸลŸek yarraฤŸฤฑ girsin

  47. Marc says:

    Great article and lots of interesting links. Thanks!

  48. trouble says:

    I have experimented with as many languages that i could get to work on one of my computers. I will have to say this much about lisp. Lisp like any language is only as good as the person can express themselves. I can say things in romainian that do not translate and vice versa. The problem with lisp is not the language per say. It the fact that we are taught that C++ and java is the way to go to start off with.

  49. rape stories says:

    Best of the text i read about a problem.