News for hackers. Stuff that matters.
Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @01:39PM (#8516914)
web.py never really worked well, so we ended up rewriting it again. The interesting thing was that Django still wasn't up to the task when we did that, mostly because it's templating engine was too slow. So we chose Pylons instead.

It should be noted that Django has since fixed that issue.

Re:Rewriting Reddit (2005) by swartkrans on Monday October 27, 2014 @01:47PM (#8516968)
Was there one specific problem with web.py or multiple issues? Was there ever a write up about what you guys learned from trying web.py? Would be an interesting read.
Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @03:25PM (#8517598)
Keysersosa answered this better below, but basically maintainability. There was no writeup, I guess because doing write-ups about internal software switches wasn't really a thing back then. :)
Re:Rewriting Reddit (2005) by keysersosa on Monday October 27, 2014 @03:28PM (#8517621)
Yeah I think that post dates from a time where you still heard people refer to them as "weblogs".

Edit: Found it. It was the 14th post on our blog a time, but definitely light on the implementation details. http://www.redditblog.com/2005/12/on-lisp.html

Re:Rewriting Reddit (2005) by nrao123 on Monday October 27, 2014 @11:32PM (#8519420)
Thanks for sharing this post!

About this: ===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.===

If Clojure was available back then and if you had written it in Clojure instead of Lisp (and given that Clojure can leverage JVM based libraries) - would you still have continued using Clojure?

I know this is an extremely hypothetical question but I am trying to figure out if Lisp is finally getting ready for "mainstream" adoption because Clojure is bootstrapped of the libraries of Java.

Re:Rewriting Reddit (2005) by danenania on Tuesday October 28, 2014 @12:01AM (#8519480)
Clojure is a beautiful language and its web ecosystem is improving rapidly, but breadth of, depth of, and support for libraries is still its main weakness next to the likes of rails and django. Clojure's a lot better for solving hard problems, but you'll also spend a lot more time getting tripped up by things that seem like they should be easy and reinventing wheels. Fortunately, it seems a near certainty that this will eventually no longer be true.
Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @04:17PM (#8517918)
I think OP meant a writeup about the switch from web.py to Pylons. I'm not sure we ever wrote that one down.
Re:Rewriting Reddit (2005) by keysersosa on Monday October 27, 2014 @05:22PM (#8518260)
Point! I think I found it http://www.redditblog.com/2007/08/its-slow-its-unstable-its-...

Also just as anemic as the last one. Oh well.

Re:Rewriting Reddit (2005) by raldi on Monday October 27, 2014 @08:47PM (#8518973)
I dunno; the ending's pretty good.
Re:Rewriting Reddit (2005) by Igglyboo on Monday October 27, 2014 @01:49PM (#8516976)
Do you guys wish you were using Django right now?
Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @01:57PM (#8517034)
I don't work there so I don't really know, but I do know that I usually don't use Django for the reasons listed in the blog post -- namely that you have to live in their world view to write Django.
Re:Rewriting Reddit (2005) by aquilaFiera on Monday October 27, 2014 @02:36PM (#8517259)
No, the reddit project itself is still based on Pylons. However redditgifts (the reddit marketplace) is based in on Django so reddit does have Django.
Re:Rewriting Reddit (2005) by thalesfc on Monday October 27, 2014 @02:49PM (#8517339)
Do you guys know what they felt about Flask?
Re:Rewriting Reddit (2005) by keysersosa on Monday October 27, 2014 @03:06PM (#8517448)
At the time that we switched to pylons and decided to punt django, flask didn't exist. I believe it was some time on '07 or '08. I'd check, but I also think it predates our switching to git from subversion...

Personally I like flask a lot and it's come a long way. Also, when spez and I moved on to hipmunk we started using tornado.

Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @03:23PM (#8517583)
The switch to Git happened one day before we open sourced on June 17, 2008, I remember that day well :) So yeah, the history of when we switched to Pylons is probably lost forever sadly. But yes it was right around when I started in March '07 that you guys started working on the transition.
Re:Rewriting Reddit (2005) by rdtsc on Monday October 27, 2014 @01:52PM (#8516996)
Do you recall what didn't work? So far web.py looks like a really nice rest-ful api backed framework. I rather like it.

http://webpy.org/

Re:Rewriting Reddit (2005) by keysersosa on Monday October 27, 2014 @03:14PM (#8517498)
A lot of the decisions made in designing web.py were also carried over to tornado's web framework (which not coincidentally is also a web.py).

At the time (and I have to admit my memory is a little foggy as it was 7 years ago), I believe we mostly switched away from it for maintainability reasons. It wasn't under active development, and we were in the middle of a complete MVC rewrite to impose some order on some otherwise organically grown code.

Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @01:55PM (#8517012)
That version of web.py has little relation to the one that Aaron wrote. The current version looks pretty good but I have no idea what it's scalability and modularity story is.
Re:Rewriting Reddit (2005) by mattmanser on Monday October 27, 2014 @02:10PM (#8517109)
As a slight aside, what do you usually do to stress test a new framework to see if it's scalable?
Re:Rewriting Reddit (2005) by jedberg on Monday October 27, 2014 @03:20PM (#8517547)
Ask the community. :)

That's a little glib, but basically I ask other people with experience. You can throw as much fake traffic as you want at a framework but there is nothing like a real world test.

Re:Rewriting Reddit (2005) by TylerE on Monday October 27, 2014 @10:18PM (#8519229)
Django templating is still pretty slow.... the last time I benchmarked it (maybe 6 months ago) it was a fairly large amount slower than Jinja2 (3-4x maybe?)
Re:Rewriting Reddit (2005) by Spiritus on Tuesday October 28, 2014 @07:44AM (#8520434)
Did you make sure to enable to cached template loader[1]?

>Enabling the cached template loader often improves performance drastically, as it avoids compiling each template every time it needs to be rendered.

[1] https://docs.djangoproject.com/en/dev/ref/templates/api/#dja...

Re:Rewriting Reddit (2005) by TylerE on Tuesday October 28, 2014 @03:04PM (#8522875)
That helps, but it's still well below parity.
Re:Rewriting Reddit (2005) by dangayle on Tuesday October 28, 2014 @04:40AM (#8519994)
What's cool is that there is a legitimate push to make Jinja a first class citizen in Django, with other third party templating engines being available via a new API.
Re:Rewriting Reddit (2005) by general_failure on Monday October 27, 2014 @02:40PM (#8517287)
Since you guys rewrote over the weekend, I don't understand why anything cannot work well...