I used web.py heavily in the early days on many small websites and one large website at work (well after it was relatively unmaintained). It was an early "microframework" that was really nice to use, and simple to hack on as needed. I liked its KISS approach to pretty much everything, including database handling (a thin, Pythonic wrapper around SQL, not an ORM). It was quirky in places, though -- I suppose not unlike its original author.
I'd probably use Bottle now, for equivalent simplicity and hackability, or maybe Flask (though that's significantly larger).
Currently building on Flask and truly love the easy of integration, the massive libraries, and overall the performance.
... hope that doesn't spawn a religious debate.
It says a lot about the quality of that lisp code and the clarity it enables that a rewrite could be done effectively over a weekend. Normally the "Big Rewrite" is a story of total failure.
Even if they decided not to go with lisp long term this story is definitely a good advertisement for prototyping in lisp and sticking with it until there is an actual reason to change.
As a lisper, I’ve gone through the code of the original site ( https://github.com/reddit-archive/reddit1.0 ) and it’s not surprising to me that they had to rewrite it: it does a bunch of interesting environment-dependent things during compilation and loading that make it really hard to even attempt to run.
I’m also fairly certain that rewriting in lisp would have been nearly as successful: the benefit came more from learning about the problem space than from switching languages.
>the benefit came more from learning about the problem space than from switching languages.
They said they had some Lisp dependencies that weren't as reliable so a hypothetical rewrite in Lisp again really doesn't change that (unless they wanted to NIH-Not-Invented-Here-rewrite the Lisp libraries themselves). Therefore, the Python ecosystem with more tested libraries was a motivation.
>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.
Original article says "My friends over at reddit.com rewrote their site" and seven years later it was changed to "Over at reddit.com, we rewrote the site".
That article is exactly from when the merge was happening, and one of the reasons to onboard Aaron was to help with web.py. I don't see anything surprising from changing their->we, when he edited it to address the new state of art in Python web frameworks.
>One assumed it must have been divine intervention, since “there seems to be no other reason for switching to an inferior language.” Another figured something else must be going on: “Could this be…a lie? To throw off competition? It’s not as though Paul Graham hasn’t hinted at this tactic in his essays…” Another chimed in: “I decided it was a prank.” Another suggested the authors simply wanted more “cut corners, hacks, and faked artisanship.”
yc circle 15 years ago was apprently something different, something that reading about it now screams `wtf?`
It's a topic that attracts a lot of people who don't know much. Discussing the fine points of program architecture is hard and requires knowledge. Shilling your favorite language is fun and requires nothing more than faith.
Or in the case of Haskell, obvious superiority!!
That was a joke. I'm still learning Haskell but it's a lot of fun.
> The Python version had less code that ran faster and was far easier to read and maintain.
I'm surprised by the "ran faster" part. Does anyone has an explanation? My guess would be that part of it is a better understanding of the problem, part of it may be better libraries, and part of it may be that the FOSS Common Lisp compilers in 2005 were not as good as now, but that's just a guess.
26 comments
[ 3.0 ms ] story [ 68.0 ms ] threadRewriting Reddit (2005) - https://news.ycombinator.com/item?id=8516331 - Oct 2014 (114 comments - top comment has later story)
Rewriting Reddit (2005) - https://news.ycombinator.com/item?id=4797599 - Nov 2012 (35 comments)
I'd probably use Bottle now, for equivalent simplicity and hackability, or maybe Flask (though that's significantly larger).
https://sanic.readthedocs.io/en/stable/
Even if they decided not to go with lisp long term this story is definitely a good advertisement for prototyping in lisp and sticking with it until there is an actual reason to change.
I’m also fairly certain that rewriting in lisp would have been nearly as successful: the benefit came more from learning about the problem space than from switching languages.
They said they had some Lisp dependencies that weren't as reliable so a hypothetical rewrite in Lisp again really doesn't change that (unless they wanted to NIH-Not-Invented-Here-rewrite the Lisp libraries themselves). Therefore, the Python ecosystem with more tested libraries was a motivation.
(The Lisp dependency they don't refer to by name may have been the Lisp web server TBNL : http://edicl.github.io/hunchentoot/)
Excerpt from: https://archive.md/Nz9Mu#selection-297.0-297.439
>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.
Aaron was so sensitive about not actually being a founder of reddit that he thought it necessary to rewrite his own history to erase that fact.
But what exactly would be the more charitable interpretation of him changing the article from "them" to "us" seven years after publication?
Edit: I don't see the same change I guess? The main difference I see is the removal of "friends".
yc circle 15 years ago was apprently something different, something that reading about it now screams `wtf?`
feels like religious community
I don't know what it is about languages that make them attract these dogmatic communities, but it seems to be ever present.
Or in the case of Haskell, obvious superiority!! That was a joke. I'm still learning Haskell but it's a lot of fun.
I'm surprised by the "ran faster" part. Does anyone has an explanation? My guess would be that part of it is a better understanding of the problem, part of it may be better libraries, and part of it may be that the FOSS Common Lisp compilers in 2005 were not as good as now, but that's just a guess.