8 ms·
The myth of the Lisp genius
- algoshift 15y agoI'll take this up a few notches and proclaim that almost all commonly used languages offer "high impedance" when it comes to the jump from thought to the expression of that thought for a machine to execute. This does not mean that they are not useful. It does mean that they are very primitive in many ways. My life as a programmer and hardware designer started when I hand-built (wire wrapped) my first 8080-based computer way-back-when. Coding was done typing in hex codes into a hexadecimal keypad. Pretty amazing what you could write that way. Wanting more, I wrote a simple version of Forth. Wow! The productivity gain was impressive. Meanwhile, in College, we had to take FORTRAN. I hated it for some reason. Then my Physics professor offered an alternative: If you signed-up for his APL class you could get equivalent credit. Out went FORTRAN, in with APL. I would not learn C until three years later. The fact that my real programming life started with exposure to the extremes represented by hand-coded hex, Forth and APL probably made me think very differently once I got to C and other languages. APL allows you to think and translate those thoughts and ideas to computer instructions with very little to distract you. The process of programming in C-like languages can be very mechanism oriented rather than problem oriented. By this I mean that you spend a log of time working on how to get the mechanics of the thing to work rather than focusing on the problem domain. I learned and programmed in Lisp extensively later in life. It was the AutoCAD version of Lisp. I wrote all sort of tools and utilities for AutoCAD and can say that I enjoyed using the language. In terms of productivity and the ability to quickly express ideas, I think it did pretty well. Is it the realm of geniuses? Nothing is.
- tom_b 15y agoI suspect there may be something to the idea of Lisp supporting multiple paradigms of development. If (and this is a big if) you had enough exposure to the virtues of imperative, functional, and declarative programming styles and (second big if) enough "taste" to apply them in tandem with each other, that Lisp may have been one of the few places to leverage that as a skill. But maybe a better question would be how often you would be better mixing those types of development in a single program.
- Tichy 15y agoEven if you are not a superprogrammer, if you work your way through SCIP you'll have greatly improved your skills. Maybe you can still become a superprogrammer. I doubt it would be possible to become a superprogrammer by coding Java because you would be too busy trying to comply with all the specifications.
- lisper 15y agohttp://rondam.blogspot.com/2011/04/is-it-lisp-or-is-it-me.html http://rondam.blogspot.com/2011/04/is-it-lisp-or-is-it-me.ht...
- abecedarius 15y ago"I think of Donald Knuth writing TeX in Pascal, and a very conservative least-common-denominator subset of Pascal at that. He may have been able to develop TeX faster using a more powerful language, but perhaps not much faster." Knuth himself said he didn't think he could have written TeX without his literate programming tools, right? Which fits the pattern of Lispers extolling metaprogramming, though without their built-in support. (Despite which, I don't in fact think Lisp makes you a genius, or even significantly better than with other popular languages -- though it was a different story back in the 80s when I learned it.)
- pohl 15y agoLisp imposes almost no structure, I'm a lisp novice, but doesn't it impose functional composition? And isn't that some mighty structure?
- sedachv 15y agoOne of my favorite things about Common Lisp is that it has gotos and stack unwinding to dynamically (at runtime) determined points: http://www.lispworks.com/documentation/HyperSpec/Body/s_go.htm http://www.lispworks.com/documentation/HyperSpec/Body/s_go.h... http://clhs.lisp.se/Body/s_tagbod.htm http://clhs.lisp.se/Body/s_tagbod.htm http://www.lispworks.com/documentation/HyperSpec/Body/s_throw.htm http://www.lispworks.com/documentation/HyperSpec/Body/s_thro...
- pdelgallego 15y agoCLisp, for example, is not a functional language in the sense of ML language or Haskell. CLisp is a multi-paradigm language. You can use it in a OOP or a functional style. You can even use its OO features in a functional way and viceversa. E.g Objects are poor's people closures. [1] [1] http://c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent http://c2.com/cgi/wiki?ClosuresAndObjectsAreEquivalent
- jpr 15y agoAlso, CLisp is not a language, it's an implementation of a language named Common Lisp: http://www.gnu.org/software/clisp/ http://www.gnu.org/software/clisp/ (It's common misconception, and a confusing name)
- xyzzyz 15y agoHate to be pedantic, but there is no such language as CLisp. There is Common Lisp language, commonly abbreviated to CL, and CLisp is the name of one of its implementations -- the other popular ones are SBCL, Clozure CL, Allegro CL, to name a few. One should not identify Common Lisp the language with CLisp the implementation, especially since it is not the fastest or the most pleasant one.
- francoisdevlin 15y ago
- bambax 15y ago> If one person does a job in half the time of another, maybe it can be attributed to their choice of programming languages. If one does it in 1% of the time of another, it’s probably a matter of talent. This has been discussed many times (recently, somebody attributed a significant difference in productivity among programmers to... the ability to touch type). Anyway, why different tools could in principle not be able to generate wildly different productivity outcomes? "If you only have a hammer" can be reversed: if you don't have a hammer, then planting nails becomes incredibly difficult and takes a great amount of time (and ingenuity). A (not too practical-oriented) friend of mine once called me because he had spent an hour and a half trying to screw together a simple Ikea bookshelf (where the documentation said it could be done in less than 10 minutes). Turned out he was trying to screw the big bolts with pliers, and that's really hard.
- rbanffy 15y ago>> If one does it in 1% of the time of another, it’s probably a matter of talent. The original article seems to base this on the flawed assumption talent and choice of tools are not related. edit: should have phrased the above as "this statement seems based". It's not the entire article.
- losvedir 15y ago>> The original article seems to base this on the flawed assumption talent and choice of tools are not related. The article does say they could be related: "Another possibility is that super-programmers are attracted to Lisp." That would be a strong correlation. However, the article is about causality, though. If the truth is that Programming talent -> Choose Lisp Then it is not necessarily the case that Choose Lisp -> Programming talent
- rbanffy 15y agoSorry for the poorly thought out post. Anyway, as was pointed out elsewhere, someone can write a web CRUD in Rails in 1% of the time it would take to write it in C with Apache modules (or ISAPI DLLs). Choosing the wrong tool can have disproportionate effects. Having a large tool set is one of the hallmarks of the great programmer. One example off the top of my head: a friend of mine was struggling for a week to deliver a simple J2ME (it was 2002 or 2003) app using Eclipse. I directed him towards NetBeans. The product was ready that same afternoon. The IDE support in NetBeans was so complete his job was more a fill-in-the-blanks than anything else.
- quinndupont 15y agoThis article scares me. My mediocre programming skills will never be able to handle Lisp. Damn.
- SoftwarePatent 15y agoI definitely support the "grab a beer and relax" step 1. Download a scheme (I like mit-scheme) and solve some problems from Project Euler. No worries if you make no progress, you're just goofing around.
- cturner 15y agoNever give up on goals you still care about. Get a beer and some notepaper. Write down some notes about how you can be a better programmer. Think about topics slightly out of the domain - how you represent ideas, how you explain ideas to people, how you try to understand ideas that are explained to you, how you read code. Think about how you can improve. Think about some deliberate practice exercises. Take what's useful from doubters and ignore the rest. You'll get there.
- reginaldo 15y agoAlso you can watch the lectures by Abelson and Sussman themselves[1], also on MIT OpenCourseWare. [1] http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussma... [2] http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/ http://ocw.mit.edu/courses/electrical-engineering-and-comput...
- quinndupont 15y agoThanks, maybe I'll give it a go (I like the idea with the beer and notepaper!)
- dragonquest 15y agoDon't be. The Lisp family of languages is not as scary or difficult as some people make out of it. I personally found it less mind bending than Haskell (which is a different beast altogether). I'd suggest you to give Scheme a try, its more minimal than Common Lisp and IMHO simpler to start off with. All you have to keep in mind is that syntax in Scheme is both uniform and minimal. What you also need to remember is that Scheme is probably unlike any other language you have encountered (The Algol family), so you must not try to program in Scheme the way you do in say C or Pascal.
- oconnore 15y ago[Meta] What is it about Lisp that makes it the subject of so many blog posts by people who almost certainly don't use it on a day to day basis? Is it some sort of insecurity about their current environment? Is it just a go to topic when you can't think of anything better? Why don't Haskell and Erlang attract the same attention, though both make big claims too (e.g. the type system makes programs correct, the actor model solves concurrency...) Lisp has some unique features. Some people like them, and feel more productive using them. Other people don't, and prefer other languages. Can we move on now?
- jerrya 15y agoThat was my question as well. It's pretty clear from searching lisp on this guy's blog and looking at his resume and list of software projects that he has actually never used lisp.
- eliben 15y agoI think that "insecurity about their current environment" is spot on. Or at least this has been my experience. Lisp is hailed as something close to perfection gurus (like Paul Graham, etc) use. Before I discovered Python I was drawn back to Lisp once a year on average, only to find out again that it's not quite there for real-life use. Luckily, with Python I defeated the insecurity in my tools and could happily move on.
- silentbicycle 15y agoLisp has had some extremely vocal advocates. Paul Graham, certainly. "Beating the Averages" has attracted a lot of attention, outside its typical niches. Also, Lisp has been around for a while - it's been a couple decades ahead of its time for fifty years! Much great research literature has come out of its culture. Besides, Haskell certainly gets plenty of "blog posts by people who almost certainly don't use it on a day to day basis". Erlang's culture seems to favor ugly pragmatism over "avoiding success at all costs", though.
- mattgreenrocks 15y agoHave you noticed how many articles are about C around here? As I said in another thread, there's too many benefits to discussing C/Lisp/Git: strong opinions (thus, traffic), karma, and illusory in-group status. If we want to fix Hacker News, we need a way to stop these sorts of karmic feedback loops from setting themselves up, because they are echo chambers. (Also, it'd be nice if bloggers didn't measure post success by traffic, but we all know that isn't going to change.)
- cpr 15y agoOthers (e.g., PG) have written more elegantly about this topic, but I really do think the key is the complete malleability that Lisp gives you: you're free to recast the problem in your own terms, using whatever DSL makes the most sense, and program in those higher-level forms. Other languages force you into specific toolsets (objects, functions, etc.) and thwart pure expression of the problem.
- apl 15y ago> Other languages force you into specific toolsets > (objects, functions, etc.) and thwart pure expression of > the problem. Pure expression and complete malleability are decidedly non-intrinsic goods. Sure, you're free to reshape your language according to the requirements of the task at hand, but that process takes tremendous amounts of experience and care and foresight. If you lack these qualities, Lisp isn't going to get you anywhere. Even worse: it may end up being counterproductive. Graham made such successful use of Lisp because he was a highly competent engineer, and thoroughly familiar with CLisp. Firing up SBCL doesn't grant you these abilities qua choice of language. So I'm glad that some people still offer counterpoints to the Lisp cargo cult around here.
- cpr 15y agoI think you've just restated his "Blub" position exactly.
- apl 15y agoPossible, but irrelevant given that I'm not arguing against Graham's stance. I'm sure he's right about "blub" and so on: Lisp is a tremendously useful tool in the right hands. What I find increasingly annoying are the countless acolytes that ignore the actual point and simply repeat "MACROS! MALLEABILITY! DSL!" like a vacuous mantra.
- noahl 15y agoBut there's another effect: using a language as malleable as Lisp forces you to consider how you want to mold your program. After a few mistakes, this will teach you good program design, thus actually making you a better programmer. (Yes, of course there are exceptions. But I think in general that having this freedom will make you consider how to use it, which will make you consider alternate ways to code the same thing, which is ultimately how you learn.)
- agentultra 15y agoI terribly dislike the hypothetical Lisp creature described by the Bipolar Lisp Programmer. It has little basis in reality and is probably the greatest straw-man argument I've seen. Though calling it an argument on my part is a kindness; it's more of a soap-box. There are just genius programmers. Lisp just happens to be a pretty good language. The two are quite orthogonal to one another.
- sokoloff 15y agoI wouldn't expect a genius programmer to end up with a random choice of language, especially after a few years and exposure to a variety of languages. If you agree (as I do) that there are differences in "power" of language, I would expect that genius programmers would be far more likely than average to choose a language of above-average power. Thought experiment: How many genius programmers do you know that use VB6 by choice?
- agentultra 15y agoI'm not sure I know any genius people let alone programmers. And I definitely do not know of anyone who programs in VB6. However, I am some what familiar with John Carmack. I would consider him a genius programmer. Yet he uses C++ almost exclusively. You would have to ask him if he thinks it's the most powerful language available to him. However, I would hazard a guess that his choice of C++ was incidental (http://rome.ro/smf/index.php?topic=3086.0 http://rome.ro/smf/index.php?topic=3086.0) -- it just happened to be the de facto lingua franca for developing graphics intensive video games. By orhtogonality I mean to imply that attributes of one are not affected by the other. Lisp is and will continue to be a powerful language with or without genius programmers using it. In fact, if genius programmers are exceptional and rare as we say then I would imagine Lisp has developed over the last fifty years almost exclusively without the help of geniuses. Similarily, not all geniuses will think to use Lisp; yet they will still be exceptional programmers and produce exceptional software. Update: Included link to thread about an alleged response from Carmack to an email asking about C++. Apparently he uses it and has used it since Doom3.
- 15y ago
- nickik 15y agoHow about shouting up about the lisp this or that and just think of it as a normal programming language with some features that most programmers dont understand because the never learned them in school job. These lisp geniuses are just programmer that grew up in a time where lisp was often used. So the are "just" programming geniuses. Lisp does not make medicore programmers 10x better. Its just a very good programming language. P.S. Back then it did make you much more productive because all other languages where way behind not like knowdays.
- rbanffy 15y ago> Lisp does not make medicore programmers 10x better. No language will. OTOH, no mediocre programmer will grok Lisp.
- Typhon 15y agoDepends on what you mean by "grokking Lisp". If it means a full exploitation of all the language's possibility, I agree, but it seems a bit obvious that a mediocre programmer would be unable to do that. If it merely means being able to program in the language, that's not true.
- michaelochurch 15y agoLisp is good, and every good programmer needs to be familiar with it-- if nothing else, in order to know what she's missing in other languages-- but I find that a lot of Lisp people start using Lisp (in a humorous reversal) as their own Blub. To them, it's Lisp-versus-Shit. I find this mentality incredibly short-sighted. Strong, static typing is really great. It may not be appropriate to every problem, but it saves a lot of time in the long run. Just as every programmer ought to spend a year in Lisp, every programmer should spend a year in a Hindley-Milner static-typing language. My feeling about dynamic typing is that it test-drives really well, but it's not great for a 6,000-mile road trip. Lisp definitely beats Haskell and Ocaml in the former regard, and for small projects, I don't think there's any language that can be faster. On the other hand, for a large project with 5 developers, experience has led me to conclude that I'd much rather be using a statically-typed language.
- brlewis 15y agoIf you're right about Lisp's suitability for small projects and Haskell and Ocaml's suitability for long projects, then that answer's oconnore's question about why the strongly-typed academic (as of 2011; not inherently academic) languages don't attract the same mythology: Seeing something get done in half an hour that you expect to take all day leaves a much stronger impression than seeing something get done in a month that you expect to take six months.
- michaelochurch 15y agoCorrect. Another problem languages like Ocaml and Haskell have is this: most programmers have a very predictable trajectory through increasingly more powerful languages: C++, then Java (garbage collection), then Python or Ruby (more abstraction and power), then Lisp, which has the aura of being the pinnacle of languages, one that removes all the accidental complexity and leaves programmers able to tackle the intrinsic complexity of the problem. Strong, static typing seems like a step backward-- some seatbelt that was thrown away at the Java-to-Python transition. It's not, and Hindley-Milner type inference ensures that the static typing doesn't even eat up much developer time, but the benefits of static typing don't appear until you work on a larger project where debugging and testing become major concerns. The difference between a 40% and an 80% debug/test overhead is enormous, but aren't going to show up on a 500-line project. Strong static typing is an awesome tool that the language forces you to use. Lispers don't like being "forced" to do anything. However, on a project of sufficient size, the relatively minor drawbacks of static typing are more than paid off by the reduced test/debug overhead.
- zwieback 15y agoI learned C and Lisp at exactly the same time, during a six month internship in 1988. I wrote a program to interpret hand sketched input on a tablet and turn it into a CAD model. Before I started I only knew Basic and a little Fortran but the project I worked on required me to learn these two new languages, C for the low-level code that interfaced to a graphics tablet and the display driver, Lisp for the code that did some analysis on the lines and geometric shape drawn by the user. I remember that on days I was working on the Lisp code I was happy and things seemed in harmony. On C days I often ended the day worried and headachy. However, I couldn't have written the C portion in Lisp and writing the Lisp portion in C seemed unreasonable at the time as well. What I take from the experience is that, to some extent, Lisp seems so much more productive is that it's typically chosen for programming tasks that don't deal with the ugliness and "hardness" of things like drivers or other low-level code. Not sure about GUIs but that's another area where programming becomes tedious and unfun, at least for me. So, I don't think that Lisp is chosen for easier tasks but definitely for tasks where a solid grounding in CS and an ability to think abstractly is more important and there's some level of self-selection going on in those areas.
- Jach 15y ago> Not sure about GUIs but that's another area where programming becomes tedious and unfun, at least for me. When I have problems with UIs it's because there's a lack of separation in structure, design, and scripting that you get with HTML+JS or MXML+ActionScript which both make UI dev really easy and fun. In contrast, I think Swing, AWT, WxWidgets, Tkinter, GTK, Windows API, .NET, and even Qt make graphics programming a pain in the neck (some more than others). But once you get toward a more web-approach of UI, s-expressions are a perfectly fine way of representing XML too. Tags are functions, Perl realized that as well. My own experience with writing low level software is that without a good support library you're going to be doing assembly that may be painful depending on the microcontroller and what you're interfacing with. (ARM stuff is pretty good.) If there are good bindings for higher languages like Lisp, programming in Lisp becomes nice again. PyGame is a great example of porting a (in my view) somewhat ugly C library that is SDL and making it nice and neat to use in the higher level Python. I know a team in Colorado who are using Flex to build a multi-touch application on a USB tablet. In the face of no good library though, C is definitely a great choice and it's useful for augmenting assembly. If I want to worry about memory and pointers, C's my goto language.
- swannodette 15y agoThe myth is also bolstered by some of greatest book on the craft of programming ever written: * The Structure and Interpretation of Computer Programs * Paradigms of Artificial Intelligence * Art of the Metaobject Protocol * The Schemer Series (Little, Seasoned, Reasoned) * Essentials of Programming Languages * Lisp in Small Pieces Few programming languages have such an abundance of truly deep gems. One has to wonder if there's a reason.
- RodgerTheGreat 15y agoThe Art of Computer Programming, on the other hand, uses Assembly. One has to wonder if there's a reason.
- swannodette 15y agoAn idealized assembly. And I certainly agree that Knuth's texts are of the caliber of the books in the above list.
- sedachv 15y agoI think one of the more interesting examples of great Lisp books is Sussman and Wisdom's Structure and Interpretation of Classical Mechanics. From reviews (haven't read it yet - it's on my to-read list), it's highly praised by physicists exactly for its computational approach to classical mechanics and its use of Scheme as notation. You certainly get the notation feeling reading SICP. Allen's Anatomy of Lisp is the best introduction to language formal semantics I've seen. Too bad it's out of print, but it is a bit dated by now. Now if you're actually talking about the craft of programming, the two best books ever are Graham's On Lisp and Hoyte's Let Over Lambda. Lisp macros are the best programming tool available today, and those are the only books that go in-depth on macros.
- rbanffy 15y ago> One has to wonder if there's a reason. Cost is one. These books would be ten times as big had they used Java examples. ;-) Seriously now: Lisp has a very unobtrusive syntax. It seems a good fit for teaching a lot of concepts.
- jpr 15y agoI would like to say one thing to anyone who considers using Lisp: It's perfectly okay to use Lisp just like you would use any other language. It's better designed and more consistent than most others, and has good implementations. It makes sense to use Lisp as just a regular language without any wizardry.
- mark_l_watson 15y agoI think a lot of the Lisp hype stems from the development environment. I was too tired on a cross country flight last night to do customer work, but I did work on two of my own projects: one using Java, IntelliJ, and the excellent Play! framework (dynamically compiles code while editing - fairly agile environment) and later another project in Common Lisp. Using Emacs + Slime + Common Lisp, at least for what I was working on (NLP stuff), just felt great. Two nice environments, but the Lisp environment was just more comfortable.
- Jd 15y agoThere definitely is something psychological as well as practical. First, it is an issue of social dynamics. Very intelligent people frequently develop means by which they congregate without the less intelligent. Elite academic institutions facilitate this. The corporate world does not. As far as I can tell, lisp was the anti-blub when there was only blub, which allowed people to distinguish themselves from their peers -- a bit like going to Mensa meetings. This need seems to be less pronounced in the younger generation since there are other distinguishing languages in fairly common use. Second, there is current research in neurobiology that indicates that the evolution of the brain (perhaps responding to its environment) has a naturally recursive structure and there is a growing field in the study of religion and philosophy that indicates that the growth of many systems has a fractal structure. In fact, Mandelbrot commented on this himself in response to Lovejoy's Great Chain of Being, although he never applied it to the correlative systems of the East, nor the syncretist projects of the Renaissance. These are frequently associated with genius for good reason. I suspect Lisp is popular because of how it "clicks" with something mentally. Third, it is not quite clear how any of this relates back to programming as a craft. Philosophers can create their own discrete systems. Mathematicians, even if they don't deal well with other people, are, at least ostensibly, dealing with reality. Lispers, on the other hand, frequently must deal with real products for real people. Realistically this means that products must have significant scope, which almost invariably means more than one person working on them (actually products are rarely brilliant, though inventions may be). Which is to say, the "inventive" aspect, which may be contained and individual, is likely distinct from the practical aspect, which is collective. Obviously certain features (e.g. static typing, immediate comprehensibility when viewing method/class names, etc.) would seem to be preferable for large collaborative projects. In conclusion, although it is said "real artists ship," it is often the case (e.g. Van Gogh, Schopenhauer) that real artists languish unacknowledged, their brilliance unappreciated in their own time. Art, when pursued for its own sake, rarely can deal with practical considerations -- which may good for the increase of knowledge generally or the field of computer science, but bad for business (insofar as business is making money right now).
- kaffiene 15y agoLisp was one of the first programming languages I learned. I like it a lot. I believe that everyone should learn Lisp or a functional language like Haskell. I think that smart people often do learn lots of different kinds of languages. I absolutely disagree with and abhor the offensive attitude that if anyone programs with Java or VB or whatever other language isn't cool, they're a moron or at the very least, cannot be a 'great' programmer. You use the right tool for the job. No programming language is the right tool for every job.