11 ms·
Why Reddit switched to Python (2005)
- turbulence 15y agoThe article is from 2005?
- lordlicorice 15y ago> After spending the entire summer working entirely in Lisp, it's nearly impossible to work in another language and not say to myself, "If only this were Lisp..." Lisp has many goodies that make programming in it a joy: the REPL, macros and the lack of syntax are some. I won't go into the details, but rest assured, it's cool. People become Lisp zealots for a reason. I honestly don't understand this sentiment. For me it's nearly impossible to work in lisp and not think "If only this were some other language..." The baseline functionality I'm used to from other languages, like even type checking, is absent. It's like writing in assembly just for the degree of control you have as compared to managed code. I mean yeah writing something in assembly can be fun in its own way, but the result will almost certainly be awful, and you'll solve problems that have built-in solutions in other languages.
- waqf 15y agoI guess you code in ML/OCaml/Haskell the rest of the time.
- deleted 15y ago[deleted]
- zachbeane 15y agoCommon Lisp has type checking.
- SeanLuke 15y agoCome on, we all know what he meant.
- zachbeane 15y agoI don't really know what he meant, with the references to managed code and assembly language in relation to Lisp, but what he actually wrote is wrong when it comes to Common Lisp.
- jbester 15y agoPerhaps he's referring to the batteries included feel of other platforms. Every other platform (i.e. .NET/java/ruby/python) have gobs of built-in functionality in the standard library - everything from parsing, to different I/O models (NIO in java), to frameworks (WSGI, WS consumption and production, etc). Lisps diverge fundamentally (e.g., the threading model) if it isn't specified in CLtL or ANSI CL. CL seem hamstrung by those documents. Concrete Example: 7 years ago I couldn't (using available libraries) reliably parse in lisp a DB dump in XML (~8GB), select some records based on a set of calculations, and convert it to CSV. Most libraries insisted on needing the whole document in memory, some libraries leaked like a sieve and caused heap exhaustion, others couldn't handle UTF8. In the end, I could do it python (couple hours to develop and took 45-60 minutes to run), I could do it in java (several hours to develop and ran in ~8min), but I couldn't do it in LISP without writing a custom XML parser or delving into FFI. Maybe it was an abnormal case, maybe not. I miss macros and the expressiveness; I miss the community; I don't miss the insanity.
- zachbeane 15y agoWell, it's not like that any more. There are portable ways to work with threads, there are multiple XML libraries, some of which do not read the whole document in memory, and all implementations support UTF-8. These things happened because some people decided to improve CL (both implementations and libraries) instead of using something else.
- jbester 15y agoIt may be worth retrying as an experiment to see how lisp fairs now.
- 15y ago
- rbanffy 15y agoStop thinking about writing programs and start thinking about building a language to write your program in. That's Lisp. If you approach Lisp the same way you'd approach C or Python, you'll fail.
- zachbeane 15y agoThings are a bit different now. SBCL works great nearly everywhere, Clozure CL does too, and there are more libraries that are easier to install than ever before.
- jgw 15y agoAs someone who is really, really new to Lisp (worked through the Little Schemer, now in Seibel's "PCL", just started learning about this QuickLisp thing that you might have heard about... ;)), I've been wondering about the whys and wherefores of the Reddit switch. Do you think that if Reddit developers were faced with the same decision today, that the progress you mention might indeed push the pendulum the other way?
- zachbeane 15y agoI don't know. There are still a lot of things for which CL has no well-tested, widely-used, out-of-the-box solution, and someone looking for a reason to use another system can pretty easily find it. The situation is improving, though, and will continue to improve as long as people scratch CL itches instead of switching to something else.
- mark_l_watson 15y agoI agree Zach, it is a different world now. This really hit me in the article: "my choices of threaded Lisp implementations was limited to OpenMCL, and in FreeBSD it's CMUCL". As another poster mentioned, SBCL and Clozure run on many platforms providing multithreading. Obviously, your QuickLisp package manager now helps find and install useful libraries: I used to install all dependencies into each of my Common Lisp projects, which I don't do anymore. I also wonder if the Reddit team's decision might have been Clojure if Clojure had been mature when they developed Reddit. Clojure is roughly 1/3 as fast as Common Lisp and takes just 2 or 3 times the memory for a typical application (my experience) - a good alternative depending on the application.
- eliben 15y agoYes, but the Python eco-system didn't remain standing in one place either. Lots more libraries, more stable and feature-full releases, and great support for bindings for well known libraries/frameworks/APIs all across the board, as Python has clearly emerged as the favorite hacker language for general purpose programming.
- homosaur 15y agoI like how they refer to reddit as a "FreeBSD box." My guess is that it's something much, much larger now.
- baddox 15y agoHe also says "the reddit code itself is not incredibly complex," which I imagine is less true now.
- Splenivore 15y agoThere’s no need to leave it to imagination: https://github.com/reddit/reddit https://github.com/reddit/reddit
- baddox 15y agoRight, but I don't know how complex it was at that time in the past.
- xxpor 15y agoDoes EC2 offer FreeBSD?
- getsat 15y agoNot officially. cperciva (HN username), FreeBSD security guy, maintains some AMIs for it: http://www.daemonology.net/freebsd-on-ec2/ http://www.daemonology.net/freebsd-on-ec2/
- jedberg 15y agoYes, it is different. At the time he wrote that, there was literally one hosted FreeBSD box running all of reddit. It was called... 1.reddit.com. Eventually the database had to be moved to a separate machine called... 2.reddit.com. reddit now runs on a few hundred Ubuntu EC2 instances.
- deleted 15y ago[deleted]
- nickbauman 15y agoThis is an example of the Lisp Curse. http://www.winestockwebdesign.com/Essays/Lisp_Curse.html http://www.winestockwebdesign.com/Essays/Lisp_Curse.html This is the reason why the Clojure community is taking libraries very, very seriously.
- edwinnathaniel 15y agoWhen it comes to programming languages/framework debate, there are a few interesting tidbits: 1) Geeks _love_ to debate languages, especially one they _know better_ 2) Geeks also love to trash languages that they don't know that well 3) There's always the claim of N-increase of productivity without any scientific backing (yet we always stress out that we should measure everything...seems like a paradox eh?) 4) This is how we do politics: debating languages, tools, frameworks. Use whatever you like. That's the bottom line. Joel used ASP.NET for FogBugz, ASP.NET MVC w/o ORM for SO. LinkedIN, TripAdvisor, Jive, some Google properties are using Java. Facebook, Flickr, WikiPedia use PHP. You are far more productive using the tools you know. If someone just picked up Node.JS (and a novice JavaScript developer) yesterday and claimed he/she got 10x productivity boost, ask him/her to show how they go about and code the solution a'la Notch (live-stream how you code or from pre-recorded coding session). Building products require more than just a syntax. Libraries, Tools: build tools, packaging tools, deployment tools, documentation tools, etc are all as important as the programming language itself. It's about time we ask for proofs, not just a blog post claim.
- damagednoob 15y ago> Joel used ASP.NET for FogBugz To be pedantic, that's not true. As I understand it, FogBugz was originally written in VBScript (Classic ASP) and then ported to Wasabi, FogCreek's own compiler. Wasabi then spat out PHP and VBScript. http://www.joelonsoftware.com/items/2006/09/01b.html http://www.joelonsoftware.com/items/2006/09/01b.html However, I still agree with your point and this probably makes it an even stronger argument.
- edwinnathaniel 15y agoDoh, you are correct. How did I forget about Wasabi! It created a bit of controversy too back then when he criticized rails.
- elangoc 15y agoI came back to this PG essay on identity a couple of days ago. The essay discusses the points you mentioned and a compelling explanation for them: http://www.paulgraham.com/identity.html http://www.paulgraham.com/identity.html
- prodigal_erik 15y ago"Translated very easily" suggests they didn't create a domain-specific language for their problem, which to me seems to be missing the point of Lisp. The exotic features of Lisp and Python don't overlap much at all, so the intersection of the two isn't a particularly powerful language. They probably could have ported to any Blub just as readily.
- gbog 15y agoWhy, maybe there are problems that do not require a domain-specific language! Doing something like reddit.com probably require a simple and readable codebase that can be extended and optimized easily. It is not likely that the domain is so complex that it needs macros and all the "clever" stuff.
- elangoc 15y agoIf there are any Lispers who lament the Lisp Curse, or some idiosyncracies of your favorite dialect of Lisp, and you have an open mind to give something new a shot, consider checking out Clojure. I don't want to become one of those diehard __-advocates, but I'm pretty impressed with Clojure. Speaking from experience, I think it solves quite a few of the pitfalls mentioned in the OP. I wrote up an extensive post on how to learn Clojure, and veteran Lispers can jump to the end and catch the links of Clojure for Lispers: http://www.elangocheran.com/blog/2012/03/the-newbies-guide-learning-clojure/ http://www.elangocheran.com/blog/2012/03/the-newbies-guide-l...