Rewriting Reddit (2005)
aaronsw.com
aaronsw.com
It should be noted that Django has since fixed that issue.
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
Also just as anemic as the last one. Oh well.
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.
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.
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.
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.
>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...
A single-file web application in Django: https://github.com/mstepniowski/microdjango/blob/master/poll...
Django has definitely come a long way!
That still looks very complicated compared to most microframeworks I've used, including web.py.
And all that django-specific logic that needs to be in there makes it harder to read unless you're familiar with the django ecosystem.
What "django-specific" logic? Those are standard imports and a few helper objects, the kind of which you'll find in any web framework.
[edit: importants => imports]
All these things, when compared to a true microframework, contribute in legibility of the code.
Until they are. Then you go ahead and implement an ad-hoc settings scheme.
from django.conf import settings
settings.configure(ROOT_URLCONF='polls')
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
You lose some of the Django niceties (like being able to provide your own custom settings on the command-line) but flask doesn't have them anyway.However, now that I'm more experienced, I can relate a little to what Aaron is saying here. Learning all of this boilerplate stuff is annoying! Recently, I started contributing to a friend's rails app and I found the process of learning how to use each separate little tool tiresome.
This is why I like Pyramid - it starts off dirt simple. Hello World is almost as short in Pyramid as it is in Flask. As you grow, you can start organizing and adding different things as you need them. It has absolutely 0 magic. I find Pyramid to be a happy medium between Flask's minimalism and Django's extensibility.
Now that I get it though, it seems like an interesting framework but not a productive one. I've only dabbled in Pyramid with my free time and have never built a serious project with it, but I can't imagine building anything large scale with it.
(I'm a .NET developer BTW, MVC is what I work with in my day job)
I also know http://www.cars.com/ is heavily powered by Pyramid.
Django doesn't need the magic, it's just annoyingly presented that way.
That must have ended as a huge success, because as we all know the important thing behind a website is the backend language...
I recall reading a more scathing post from spez at one point about frustrations with web.py, but I don't seem to see it now. It may have been removed. In any case, Flask seems to be the inheritor of the "write webapps in Python" description.
Flask definitely fills that role for me. It's very simple to get up and going with it, and deploys easily.
The current github page is here: https://github.com/webpy/webpy
If you are looking to get up and running quickly, I would recommend forking this skeleton: https://github.com/jzellman/webpy-skeleton
Finally, the built in database framework is a bit simplistic. I like to pair this with Peewee (included in the webpy-skeleton).
The router block at the top plus:
class MyResource:
def GET(self,...): ...
def POST(self,...): ...
def PUT(self,...): ...
def DELETE(self,...): ...
Looks really nice. Haven't tried serving or rendering templates from it, so never tested that code.Pretty sure flask is currently the front runner in "python microframeworks".
Generally refers to "how many people can continue to develop/support this software if original maintainer (and close co-developers) get hit by a bus."
The number of developers that can be suddenly and totally lost from a project (e.g., by being hit by a bus) without the project itself becoming unable to proceed effectively.
Likely consumed by meta-patterns, like every other project who's primary reason to exist is to be a LISP clone of something.
The discussion was not about writing a new Lisp or Lisp-like language, but a clone of Reddit.
The fact that HN is a site that performs a function very similar to Reddit, and happens to be written in a dialect of Lisp is completely coincidental :-D (unless there has been some comment by pg about his motivations for making HN that I missed, but I kind of doubt it).
Yep, spot-on. It's the same with those guys who wanted to make a Facebook clone focused on privacy or whatever. Lots of talk and then you never hear about the project again.
Is the project really dead though? I have no personal experience, but these stats show a growing number of active users: http://pods.jasonrobinson.me/
I believe pg stated that HN was supposed to be what reddit was originally.
http://www.pyvideo.org/video/234/pycon-2009--keynote--reddit...
25m 40s
Before web.py, we were on a scary Tornado implementation. The API was rewritten to web.py in a week with a minimal delta. We won't be on web.py forever, and gevent sometimes kicks up minor fusses, but I think web.py has given us a nice malleable form that helped us get out of a terrible place, and we can easily hop off once we decide where we want to be.
RIP aaronsw.
Selective memory I guess.
In my experience though, I've worked on teams with developers who criticize frameworks for those reasons, choose a minimal or no framework at all, and spend a ton of extra, unnecessary time reinventing a worse version of a framework they decided 'sucked' once they realize they need security, error handling, form processing, an ORM etc... Over-engineering is an epidemic.
The thought process is: If I have to spend precious development time converting all my std::strings to and from YourStrings, then I can bet that there is plenty more un-necessary cleverness and complexity waiting to bite me once your framework gets its claws into my code.
Judging a C++ framework by whether it implements its own string type probably isn't a good idea. C++ is inherently limited, and a string type is often the only way to have certain design guarantees. In a performance-critical context, it's sometimes crucial to control the exact pattern of allocation. And not just how they're allocated in memory, but also how often they're allocated. You can control std::string's pattern of allocation by using a custom allocator, but you can't control how often std::strings are created, for example, because std::string implements an interface which is guaranteed to construct temporary strings. This normally isn't a problem, but in contexts where every millisecond is crucial (like gaming) this can be disastrous, since it's very hard to optimize the performance characteristics of std::string once it becomes pervasively used throughout your codebase.
Another reason to make your own string type is for proper unicode support. Maybe C++11 or C++14 added features to help with that, so maybe this is less valid nowadays. I haven't kept up.
That's a pretty low bar...
If you're using Clojure, ring + tomcat, etc...
I'm just wondering why it seems this story is quickly getting upvoted on the front page of HN, when it seems there are no other frontpage stories remotely related to Django, Reddit, or Lisp?
That may be true about Django, but not the other two.
Reddit being a YC-backed company, it always has been a hot topic here on HN. Maybe less now than a few years back but the same HNers are still here.
And as for Lisp, it has always been a hot topic on HN too. Many people know HN via PG who they discovered for his Lisp writings. HN is itself written in a Lisp dialect. And Lisp related stories appear monthly on the frontpage, maybe weekly if we take all Scheme and Emacs related links into account. Just take a look at the search results for the past week with any Lisp related keyword.
Wow.
What drama?
said all the other frameworks's authors a few months before him that are now churning out deprecated headers just like that one will in a couple months, while gallantly trying to protect the user from handling headers.