





































































Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!






































































This book is for sale at http://leanpub.com/lisphackers
This version was published on 2013-06-
This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3. Unported License
The idea of this series came to my mind after European Common Lisp Meeting 2011¹ where I had had a chance to meet in person some of those mythical 100x more productive programmers. And the points I wanted to make were:
This book is a collection of short interviews with 14 prominent individuals from different parts of the world, from Australia to Canada, and of different occupations, from low-level programmers to physicists and musicians, asking them a more-or-less similar set of questions on the following topics:
Overall, this should give an insight into why people use Lisp, as well as help the readers gain some new experience and improve as programmers.
How were these individuals chosen? I looked for people who possess at least 2 of the following 3 essential qualities:
Definitely, not all of the hackers I’d like to interview are here. For various reasons. There are lots more interesting Lisp people with fascinating experiences worth sharing, and, hopefully, this will happen in the future in one form or the other. Yet, here are these 14 unique lispers with their stories, world views and insights. Enjoy!
P.S. As a bonus you’ll find some interesting bits of history of SBCL and Slime, the two most important open-source Common Lisp tools, told by their main developers.
¹http://weitz.de/eclm2011/
A Few Quotes 3
It’s also very easy to turn Common Lisp REPL code into unit tests, which I tend to do a lot. That is something that’s very hard to do with object-oriented code, which is why idiotic things like dependency injection and Test-Driven Development have to be invented.
There’s a clear difference between the Lisp workflow where you change the state of your image interactively to get the code into working shape very quickly (and then later try to remember what it was you did) and the more scripted approach of test- driven development in Ruby where you put everything (code, test setup, assertions) in files that you reload from disk on each run.
When I’m trying to understand someone else’s code I tend to find the best way is to refactor or even rewrite it. I start by just formatting it to be the way I like. Then I start changing names that seem unclear or poorly chosen. And then I start mucking with the structure.
The greatest thing about Common Lisp is that the standardization process drew from years and years of experience and organic growth. This makes the language feel singularly solid and practical. Most languages feel immature compared to CL.
We don’t use Lisp, but much of our software is built on ideas borrowed from Lisp. We don’t use it because we needed low level control — most of the code is written in C++, even with some bits of assembly. But we’ve borrowed an enormous number of ideas from Lisp. In fact, if we weren’t Lispers, we would have built a very different (and I think significantly more inferior) product.
On the upside, we certainly have been able to write quite advanced software that we might not have otherwise managed. A million lines of Lisp code, including its fair share of macros and DSLs, would be so many more million lines of code without the syntactic abstraction made possible by Lisp. However hard and expensive it was with Lisp, I can only imagine how many times worse it would have been with anything else.
A Few Quotes 4
I think we would all be better off if we hadn’t balkanised the different systems that we program for — and Lisp is one of the few programming languages with the flexibility to serve in all these roles.
The language itself is somewhat good enough and anyway Common Lisp makes it really easy to change most of itself to add the new and cool stuff or ideas of the day.
Zach Beane (USA) 6
In some cases, where it isn’t a good fit for the final product, I use Lisp to prototype ideas before writing a final thing in some other language, e.g. C or Perl. But I even use CL to generate data and code in other languages, so it’s still in the mix, still a part of my workflow.
Paul Graham’s “Beating the Averages¹³” describes a really exciting way to use an uncommon tool to great advantage. That got me interested in how I could do the same thing. I started off with some stuff in Scheme because I thought CL was old and crufty and gross, but when I started using SBCL I found it was a great, practical tool, and I never stopped using CL after that. I continue to use CL because it has a great mix of features (object system, first-class functions, fast compiled code, multiple implementations, a fantastic standard, etc, etc) and it works well in my favorite working environment, Emacs on Linux. I feel like I know it well and I can see quickly how to use it to explore and solve new problems.
Making graphics with Lisp for wigflip.com¹⁴. It’s always fun to have an idea about some kind of visual toy and then tinker with it until it’s right. It’s also fun to do something fast. A few years ago I got a project to fill out some PDF forms automatically. The project started with a few days scheduled to research third- party solutions, but in those few days I had a working prototype that used CL-PDF¹⁵ and CLSQL¹⁶.
There are a lot of negative perceptions about Common Lisp that are reinforced by current and former Common Lisp users. I can accept that CL is not for everyone, but some of the criticism is just years (sometimes decades) of moaning and nitpicking about decisions made in the distant past that are not really up for review right now. I wish the people who are vocally, chronically dissatisfied with CL would go off and do their own thing and stop bothering people that are happy with Common Lisp. There are some remarkable trolls that like to pick on CL, but they’re not usually taken seriously by anyone, but “insiders” who complain about CL are perceived to be giving some sort of genuine insight. It’s very annoying. ¹³http://paulgraham.com/avg.html ¹⁴http://wigflip.com/ ¹⁵http://www.fractalconcept.com/asp/cl-pdf ¹⁶http://clsql.b9.com/
Zach Beane (USA) 7
Quicklisp has been very rewarding. There’s a lot of positive feedback from people who feel it really helped them use CL more easily. More generally, the whole CL ecosystem has been a lot of fun. I enjoy trying new libraries, sending feedback and bug reports, helping people get started, and all that stuff. Common Lisp has a lot of smart, helpful, friendly people who share a lot of knowledge, and I feel lucky to get to learn from them and to try to share what I know, too.
For typical projects I feel like I’m building more tools into my REPL workbench. I don’t write scripts that I call from the command line, I write functions that I call from the REPL, and use the slime and Emacs environment to create and interact with data, whether it’s data from a file, from a computation, from the web, a database, etc. I find it really helps to have small, focused functions that are easy to follow and that do one thing and do it well. The fine granularity of testing, tracing, intermediate values, etc. can help wire together a very useful set of behaviors from a small core of simple functions. Some productivity ideas… Knock the rough edges off your working environment. Write code to automate stuff. Make it easy to repetitively do complicated but boring stuff. For example, I used to be afraid of the hassle of making new releases of my projects, but recently wrote a CL program that does everything for me, from PGP-signing the tarballs to uploading them along with the documentation to my website. Now I don’t care if I make ten project releases in a day, it’s just a few function calls. Customize your environment to make it comfortable. Make it easy to look up info in the hyperspec or in other documentation sources. Make it easy to create new projects. I use quickproject¹⁷ a lot for that, but I also have some Emacs templates that put some boilerplate into my files automatically. Make a program do your work for you.
I can get up and running in a new environment very quickly now. Before Quicklisp, I could usually build up a set of libraries that were comfortable and useful, but it could
¹⁷http://www.xach.com/lisp/quickproject/
Edi Weitz doesn’t need to be introduced in the Lisp community. His vast contributions to open source Lisp, made during the last decade, collectively known as Ediware, include the indispensable regex library CL-PPCRE¹⁸, written on a bet in Hamburg café, and a whole stack of web-related libraries with the most widely used Lisp application server Hunchentoot¹⁹ and HTTP client Drakma²⁰. Together with Arthur Lemmens²¹ he co-organizes European Common Lisp Meeting²².
Well, I’ll leave it to someone else to tell you what’s interesting about me. I’ll rather tell you what I find interesting in addition to Common Lisp: I collect photo books and I’m doing a bit of photography myself²³. I like to listen to the music of Frank Zappa and to Jazz. I read a lot. I’m interested in mathematics, especially in set theory²⁴.
I’m a professor for mathematics and computer science at the University of Applied Sciences²⁵ in Hamburg. I started this job in September 2011. Before that, I was a freelance hacker for about 13 years.
In my new job, I’ve been using CL in my math lectures a couple of times and will continue to do so. In my old job, I’ve been using CL exclusively for the last six or seven years. As I was working freelance, this was kind of easy — I either had projects where the customer didn’t care about the programming language that I used as long as I got the job done, or I was hired specifically for my CL skills. ¹⁸http://weitz.de/cl-ppcre/ ¹⁹http://weitz.de/hunchentoot/ ²⁰http://weitz.de/drakma/ ²¹https://twitter.com/alemmens ²²http://weitz.de/eclm2013/ ²³http://www.flickr.com/photos/hunchentoot/ ²⁴http://www.springer.com/birkhauser/mathematics/book/978-3-7643-6124- ²⁵http://www.haw-hamburg.de/
Edi Weitz (Germany) 10
I came to Lisp via Emacs Lisp in 1999 or so. What got me hooked was the wonderful book “Writing GNU Emacs Extensions²⁶” by Bob Glickstein. It opened my mind for the beauty of the Lisp language family — something I had missed the first time I had encountered Lisp (in university, a few years earlier). The two CL books by Paul Graham and Norvig’s PAIP²⁷ then paved the way for Common Lisp. What holds me is that I haven’t found a better programming language so far — and I don’t expect to find one very soon.
I don’t know if “exciting” is the right word, but it makes me happy that so many people use “The Regex Coach²⁸” and like it. I stopped keeping track, but there must have been at least half a million downloads since 2003. I’m also kind of proud that some of my open source libraries are used by various commercial and research projects around the world. But probably the most awe-inspiring encounters I had with Lisp were the few occasions when I played around with Genera or watched someone else using it. I think this OS really was a work of art.
There’s nothing I really dislike about Common Lisp. There are a few warts here and there, but so far I’ve found nothing that was serious enough to prevent me from being productive.
Working on the Windows port of Piano²⁹ — an extremely impressive application which has been around for almost 20 years and has been used by almost every aircraft manufacturer in the world. Dimitri Simos, Piano’s main author, has been the most enjoyable client I’ve worked with so far. ²⁶http://www.emacs.uniyar.ac.ru/doc/O’Reilly_Emacs/Writing%20GNU%20Emacs%20Extensions.PDF ²⁷http://norvig.com/paip.html ²⁸http://weitz.de/regex-coach/ ²⁹http://www.piano.aero/
Slava Akhmechet published several enlightening essays at his website defmacro.org³⁰, of which one I often recommend to people, interested in learning about Lisp: The Nature of Lisp³¹. He also created a continuation-based Lisp web-framework — Weblocks³², backed by a delimited continuations library cl-cont³³. Other then that he is a co-founder of a startup company RethinkDB, of which he tells a bit in the interview.
For a long time I thought that human achievement is all about science and technology. In the past few years I realized how misled I was. Hamlet is as important an achievement as discovering penicillin. I wish I’d figured out earlier that science, for all its usefulness, is very limiting if one adopts it as an article of faith.
I’m a founder at RethinkDB³⁴. We spent three years building a distributed database system that we’re about to open source and release in the next two weeks. The system allows people to easily create clusters of machines, partition data in a click of a button, and run advanced, massively parallelized, distributed queries using a very comfortable query language we’ve designed. The product is really delightful to use — we were just playing with it today to analyze census data for the upcoming presidential election in the U.S. and using it to play with the data is a real joy. I’m very proud of what we’ve done here — I hope it will make lots of people’s jobs easier and let them do things they couldn’t have done before. My job here is to do the most important thing at any given time. Sometimes it means fixing bugs, sometimes it means demoing the product to customers, and sometimes it means driving to buy supplies so our developers can get their jobs done. ³⁰http://defmacro.org ³¹http://www.defmacro.org/ramblings/lisp.html ³²http://common-lisp.net/project/cl-weblocks/ ³³http://common-lisp.net/project/cl-cont/ ³⁴http://www.rethinkdb.com/
Slava Akhmechet (USA) 13
We don’t use Lisp, but much of our software is built on ideas borrowed from Lisp. We don’t use it because we needed low level control — most of the code is written in C++, even with some bits of assembly. But we’ve borrowed an enormous number of ideas from Lisp. In fact, if we weren’t Lispers, we would have built a very different (and I think significantly more inferior) product.
A guy named bishop_pass on gamedev.net forums about fifteen years ago. He was a really good advocate and I respected his opinions because of other subjects, so I decided to check Lisp out. I enjoyed it immensely, and spent years hacking in it. Today the only Lisp I still use is Emacs Lisp. I honestly don’t know if I’ll program in Lisp again (other than for fun, of course), but the ideas behind it will be with me forever.
I built cl-cont — a macro that converts Lisp code to continuation passing style. I honestly think I learned more about programming from that experience than from anything else I’ve done before or after.
Probably the arrogance of the community that surrounds it. Knowing Lisp certainly doesn’t make one a better person, nor even necessarily a better programmer.
Definitely RethinkDB. We took a really complex subject (real-time distributed systems) and made them extremely accessible and super-easy to use. I love the product both because we made the user experience a joy, and because of the really advanced technology that goes inside to make that happen (from low-level assembly hacks, all the way up to abstract mathematics).
Pascal Costanza is a researcher, and an active Common Lisp programmer and community enthusiast:
In the interview Pascal shares a lot if insight into his main topic of interest — programming language design — grounded in his experience with Lisp, Java, C++ and other languages.
His twitter is @infoxpascal⁴⁰
I share a birthday with Sylvester Stallone and George W. Bush. I have been a DJ for goth and industrial music in the Bonn/Cologne area in Germany in the past. I once played a gay Roman emperor in comedic theatre play. I played a few live shows with a band called “Donner über Bonn” (“Thunder over Bonn”). My first rock concert I ever attended was Propaganda in Cologne in 1985. The first programming language I really liked was Oberon. I often try to hide pop culture references in my scientific work, and I wonder if anybody ever notices. My first 7” single was “Major Tom” by Peter Schilling, my first 12” single was “IOU” by Freeez, my first vinyl album was “Die Mensch-Maschine” by Kraftwerk, and my first CD album was “Slave to the Rhythm” by Grace Jones. I don’t remember what my first CD single was. ³⁵http://common-lisp.net/project/closer/closer-mop.html ³⁶http://common-lisp.net/project/closer/contextl.html ³⁷http://www.cliki.net/Filtered%20Functions ³⁸http://cdr.eurolisp.org/ ³⁹http://www.p-cos.net/lisp/guide.html ⁴⁰https://twitter.com/infoxpascal
Pascal Costanza (Germany - Belgium) 16
I currently work for Intel, a company whose primary focus is on producing CPUs, but that also does business in a lot of other hardware and software areas. (Unfortunately, Intel’s legal department requires me to mention that the views expressed in this interview are my own, and not those of my employer.) I work in a project that focuses on exascale computing, that is, high-performance computers with millions of cores that will be on the market by the end of the decade, if everything goes well. I am particularly involved in developing a scheduler for parallel programs that can survive hardware failures, which due to the enormous scale of such machines cannot be solved by hardware alone anymore, but also need to be dealt with at the software level. The scheduler is based on Charlotte Herzeel⁴¹’s PhD thesis, and you can find more information about it in a paper about her work⁴² and at http://www.exascience.com/cobra/.
At Intel, I do all software prototyping in Lisp. The scheduler I mentioned above is completely developed and tested in Lisp, before we port it to C++, so that other people in the same project and outside can use it as well. It didn’t require a major effort to convince anybody to do this in Lisp. It is actually quite common in the high- performance computing world that solutions are first prototyped in a more dynamic and flexible language, before they are ported to what is considered a “production” language. Other languages that are used in our project are, for example, MATLAB, Python and Lua. (Convincing people to use Lisp beyond prototyping would probably be much harder, though.) The implementation we use for prototyping is LispWorks, which is really excellent. It provides a really complete, well-designed and efficient API for parallel programming, which turns LispWorks into one of the best systems for parallel programming of any language, not just in the Lisp world. The only other system that is more complete that I am aware of is Intel’s Threading Building Blocks for C++.
I have participated in one of the first Feyerabend workshops, organized by Richard Gabriel⁴³, one of the main drivers behind the original Common Lisp effort. I have also
⁴¹http://soft.vub.ac.be/soft/members/charlotteherzeel ⁴²http://dl.acm.org/citation.cfm?doid=1869459. ⁴³http://www.dreamsongs.com/