Anyone got any insight into why python was chosen?.
https://web.archive.org/web/20060206185841/http://reddit.com...
Why they moved away from CL:
"If Lisp is so great, why did we stop using it? One of the biggest issues was the lack of widely used and tested libraries. Sure, there is a CL library for basically any task, but there is rarely more than one, and often the libraries are not widely used or well documented. Since we're building a site largely by standing on the shoulders of others, this made things a little tougher. There just aren't as many shoulders on which to stand."
And why Python was chosen:
"So why Python?
We were already familiar with Python. It's fast, development in Python is fast, and the code is clear. In most cases, the Lisp code translated very easily into Python. Lots of people have written web applications in Python, and there's plenty of code from which to learn. It's been fun so far, so we'll see where it takes us."
So, basically, they were happy with CL except for lack of libraries, and because they also knew Python already, and they knew there were more libraries for Python, they picked it. Simple as that.
Initial release of NodeJS was May 27, 2009; 14 years ago.
Swartz was involved in the development of Reddit until he departed from the company in 2007.
And we know that parts of the Python code for Reddit was written by Swartz.
But I contributed a tiny bit of code to reddit back when it was open source and chatted with reddit engineers on IRC, so I do know the official justification (as of 2010ish) for reddit sticking with python:
Websites are mostly IO bound anyway. The hot parts like markdown formatting and templating are already c modules. So the performances gain for rewriting in a compiled language aren't large enough to justify it.
Visual noise is like inflation. A constant tax on what you do. But you barely notice it. But it accumulates because it is constantly leading to slightly worse and more complex code. Since it is harder to focus on a noisy something in front of you, you make slightly worse decisions. Over time this accumulates. And similar to how Warren Buffet noticed that a Dollar of his youth is not even worth a penny these days, over time, exponentially more effort is needed to develop the more and more complex system.
So over a longer timeframe, a visually more elegant language wins by a long shot.
Python is the visually most elegant language.
Having program login buried in a nauseating amount of boilerplate doesn’t feel very “visually elegant” :-P
For a company complaining about infrastructure costs for a product that has been cloned many times over, and which is large enough to hire offshore devs, the cost equation favours rewriting in something like Go, Rust or even Java. These are quite tailored towards Reddit’s current use case and many companies including Twitter did that rewrite.
The performance critical part is the database, and that at least used to be written in Java (cassandra db).
Writing the bit of glue code between your high performance database and your fronted in cpp would introduce all kinds of really bad potential bugs, scary remote code execution bugs.
CPU usage of that glue code might take up 10% of your hardware budget worst case, even with a "slow" language. It's just not a concern.
Well, given complaints how much 3rd party apps cost them, they’d better off optimize their crap first.
That myth came from a few posts by a person who was a huge proponent of Lisp, in an era were web (front and backend) development was much easier, and web-related libraries were lacking in all languages (so it wasn't like Lisp's smaller popularity would hurt you there).
It's an example of one.
If they didn't get lucky and Yahoo! bought some other company in the same domain in their place (they already have a few competitors) the whole "Lisp as a secret weapon" would be moot.
Statistically speaking, 99.9% of succesful startups were written not in any Lisp, and 0.1% of them in Lisp. Not the biggest 0.1% either, more towards the bottom, in the context of web company deals during the ramp up to the dot-com bust. Viaweb was sold for $50 million. For context, Yahoo! bought Broadcast.com a year later for 5 billion and doc.com startups of the era routinely raising and burning $50-$100 million for fun - heck, Razorfish (a design consultancy) built websites for clients like Levis, Sony, Mercedes Benz, etc. for $20-$40 million (and that's late-90s era websites, nothing especially fancy).
Of course all that's irrelevant to whether Viaweb was written in Lisp. Which is my point, exactly. What's more, Yahoo! even scrapped all their Lisp code soon after.
Now, writing your startup code in a productive language, that doesn't slow down the development team, allows for easy+quality hires, and so on - even if it's not the best for when you get huge, is a benefit. That hardly requires Lisp.
I think the point that PG was making wasn't that P(lisp|success) > P(blub|success) is what's key but that P(success|lisp) > P(success|blub)
> What's more, Yahoo! even scrapped all their Lisp code soon after.
I'm hardly a PG fanboy, but I have to say this is exactly what's expected in PG's original post on the subject[0]. It's precisely because big companies will only stick to blub languages that Lisp becomes an advantage for a startup.
The point of "Beating the Averages" isn't that you must use Lisp but that small groups of elite hackers can use more powerful tools than larger organizations can't get away with because they generally have lower skilled, only comfortable with blub, programmers.
The reason we don't see many startups following this advice now isn't because it's wrong (necessarily), but because since that essay was written, the vast majority of the startup ecosystem has come to resemble large companies. We've had a pipeline churning out devs for many years now. The ones that are great at leetcode and playing the game go to FAANG, the ones that aren't go to startups. It's not even about where the higher skilled devs are because that hasn't played a factor in most companies success in a long time.
With rare exceptions, startups are no longer created by brilliant hackers looking to change how things are, but by business minded people looking to take advantage of the easy VC money in the last decade. Interviewing at startups used to be exciting, now the vast majority feel like they're run by people who couldn't manage to get a director role at a FAANG.
For example, one thing we were told when choosing to write in a lisp was that we’d have problems finding developers. It turned out to be true in that we received fewer applications, but compared to the same process with a more mainstream language, I’d say the applicants were on average of higher quality. So by the final step, we were approximately considering the same number of résumés in both cases.
But in the end, the language is not what has made the biggest impact. It’s been other, more universally applicable things, such as team dynamics and communication, clarity of vision and consistency in execution, process and planning, and a ton of other things where the particular language is not a factor.
1) Developers who like Lisp tend to be really smart, well-read, and well-educated.
2) Lisp streamlines these developers' thought processes, allowing them to get more done with less, fast.
For example, the early Naughty Dog games written in GOOL/GOAL take clever advantage of asset data to produce effects close to the very edge of what the PlayStation/PlayStation 2 can do. No feature in these Lisp languages made this possible where C or C++ could not, but working in Lisp enabled the developers to iterate quickly, experiment, and arrive at interesting innovative solutions within the required time frame.
I can echo this statement with Rust. Same story. Our comparison was Python to Rust. Same app. Big leap, i know.
In all of my career, it’s not those who know who have been good. It’s those who know how to learn new things fast that are good. It’s people who problem solve that make good engineers.
In the inverse. If somebody has a negative reaction to lisp, it’s a sign of a poor engineer.
that said a language can push you to the moon or help you crash faster, team culture and fit will matter more IMO
Too obscure and weird for me, but quite interesting. :)
I was going to make snarky comment about how between spez and PG, Lisp must actually be extended-release brain poison for people in executive management positions; now I wonder if spez just knows PG personally and takes his advice.
"We took a wrong turn w/ software."
... apparently.
Save your energy and check out the repo instead.
I don't totally blame the guy though. If you want to play the stupid Twitter game, you have to add a trite but provocative hot take to every post you make, lest your writings languish in obscurity. The only way to win is not to play, truly.
The first non reddit team submissions were some very dry comp sci papers and tech manuals .. the cats came not long after.
Those were more interesting and especially more vibrant times when it came to the web. Granted, the money was not as abundant as it is now.
The first Reddit drama was when Paul Graham was caught having a sock puppet account to defend his arguments :)
Do you have a link to this thread?
Most of the information about columns and tables could be recovered from data.lisp and view-defs.lisp. Maybe also old.lisp
Require:
CommonLisp (tested on SBCL)
PostgreSQL
memcached
smtp server
CL-USER> (reddit:startup-reddit)
#<HUNCHENTOOT:EASY-ACCEPTOR (host *, port 8000)>
Writing a CL web app today is definitely doable. You won't find a framework with bells and whistles (yet), but all the required building blocks: web servers (Hunchentoot or Clack, like WSGI for Python), choice in templating engines (Djula is Django-like and I like it a lot), etc.To replace JS a maximum I use HTMX which is language and framework agnostic, life is beautiful.
In the end, you can build a static binary with all the static assets, send it to your server and run it.
- https://github.com/fukamachi/clack
And why does that matter? Whatever turns one on.
Nothing is wrong with this. There are crapload of languages and very little benefit from a practical standpoint for a single person to use them all. They're just tools. Some are better, some are worse and some are highly specialized. What is being built is important, not how.
I didn't say the are *no* shoulders to stand on. There are
just fewer.
Without a doubt, Edi Weitz single-handedly made reddit
possible. He's an army-of-one producing good Lisp
libraries. The issues that made it really hard to stick
with Lisp weren't particularily Lispy.
The biggest trouble that plagued us was that we could never
quite get Lisp reddit stable enough to sleep at night.
There were weird threading issues that would bring the site
to its knees a couple times a day and required constant
monitoring.
Another comment, from Paul Graham: > One can argue that they betrayed the worth of a
> philosophy merely for cheap money.
Ye gods, enough with the conspiracy theories already. Y
Combinator didn't know Reddit was going to use Lisp when
we funded them. And the reason they switched (or at least,
the last straw) was all too mundane: some thread bug in
CMUCL that made the site keep crashing.
1. http://lemonodor.com/archives/001301.htmlSo it is funny to see this now popping up as a news item. Shows, how long this is in the past and how much reddit has grown in size.
Hope they changed that password!