Web.py, a python micro framework(webpy.org)
webpy.org
Web.py, a python micro framework
http://webpy.org/
7 comments
I figured if the url was posted before the dupe filter would catch it, apologies.
Also, and this is something that keeps coming up here, we did not all sign up to HN on the same day, so we do not all know what has gone before.
Lastly, what is not useful to you may be useful to someone else, I think that if people here would apply your "If you're posting to inform us of the existence of something, assume we already know." rule that a lot of very interesting content would not make the cut.
Also, and this is something that keeps coming up here, we did not all sign up to HN on the same day, so we do not all know what has gone before.
Lastly, what is not useful to you may be useful to someone else, I think that if people here would apply your "If you're posting to inform us of the existence of something, assume we already know." rule that a lot of very interesting content would not make the cut.
[ I should preface this all with a giant In My Humble Opinion. I think that this rule has the potential to be a hack that solves a problem, so I'm arguing for it -- it's not a rule that's been adopted, just something that seems promising to me. This should in no way be construed as criticism of the poster, particularly since web.py is very hackerly. ]
Your objection is not only valid, but correct! "A lot of very interesting content would not make the cut."
I think that's a feature, not a bug.
That's the point of HN! It's Hacker News, not Hacker Stuff.
For instance: did someone write an interesting article talking about their experience with actually using web.py, in a way that is likely to be benefit other python hackers?
Then that would be news, and it would qualify! And much more so if they were your own experiences.
But to inform us of the existence of things that are not new -- no offense, but we could all just noodle around in Wikipedia and post interesting, hackerly content until the sun went cold.
Your objection is not only valid, but correct! "A lot of very interesting content would not make the cut."
I think that's a feature, not a bug.
That's the point of HN! It's Hacker News, not Hacker Stuff.
For instance: did someone write an interesting article talking about their experience with actually using web.py, in a way that is likely to be benefit other python hackers?
Then that would be news, and it would qualify! And much more so if they were your own experiences.
But to inform us of the existence of things that are not new -- no offense, but we could all just noodle around in Wikipedia and post interesting, hackerly content until the sun went cold.
From the guidelines:
"On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity."
I fail to spot the word 'news' in there.
Also, and this is as pointed as I'll make this I find it a little disconcerting to see a guy who has posted exactly one 'Ask HN' in approximately three years here tell others what they should / should not post.
"On-Topic: Anything that good hackers would find interesting. That includes more than hacking and startups. If you had to reduce it to a sentence, the answer might be: anything that gratifies one's intellectual curiosity."
I fail to spot the word 'news' in there.
Also, and this is as pointed as I'll make this I find it a little disconcerting to see a guy who has posted exactly one 'Ask HN' in approximately three years here tell others what they should / should not post.
Heh, well, the last bit aside -- obviously, there's certainly nothing wrong with your posting of web.py; the existing guidelines make that clear enough.
Which is neither here nor there, as I'm not proposing the rule as a criticism of your actions, but as a proposed answer to a question very like, "Is there a simple social rule that could prevent these kind of collisions from becoming increasingly common as HN grows?"
I think that the rule I propose has merit as an idea, so I'm arguing for it, not criticizing your actions. ;)
Which is neither here nor there, as I'm not proposing the rule as a criticism of your actions, but as a proposed answer to a question very like, "Is there a simple social rule that could prevent these kind of collisions from becoming increasingly common as HN grows?"
I think that the rule I propose has merit as an idea, so I'm arguing for it, not criticizing your actions. ;)
Fair enough, but then you probably should pick your words with a bit more care.
As for the rule, I think it is a bad one. The simplest solution would be a technical one: If a user has not seen a url because it was posted before that user became a member then he/she will see it, otherwise it gets rendered invisible. That way you get to have your cake and I can eat mine too.
As for the rule, I think it is a bad one. The simplest solution would be a technical one: If a user has not seen a url because it was posted before that user became a member then he/she will see it, otherwise it gets rendered invisible. That way you get to have your cake and I can eat mine too.
Okay so first, web.py is sort of old news.
That being said, shouldn't the inherent nature of HN filter "old news" itself? If 14 people (at this time) found this link interesting enough to up vote then who are we to say its not newsworthy?
The slope gets a bit slippery. The other day someone posted a link to the Sinatra framework, which I've heard of but never looked at until it it made the front page here.
I think the democratic nature of HN should do the filtering for us. and _that_ being said I'd still like a downvote button ;-)
(and why are you being downvoted? is this too meta HN? I'm not sure where else to discuss these topics)
That being said, shouldn't the inherent nature of HN filter "old news" itself? If 14 people (at this time) found this link interesting enough to up vote then who are we to say its not newsworthy?
The slope gets a bit slippery. The other day someone posted a link to the Sinatra framework, which I've heard of but never looked at until it it made the front page here.
I think the democratic nature of HN should do the filtering for us. and _that_ being said I'd still like a downvote button ;-)
(and why are you being downvoted? is this too meta HN? I'm not sure where else to discuss these topics)
Right, the democratic component (and inability to do digg-style burying that results) is what makes the news on these kinds of sites better than other options.
The danger, of course, is: how is HN different from reddit.com/r/programming ?
How does it stay different? I think it's clear that we would want it to retain a distinctive flavor, but it seems almost inevitable that it would morph into proggit -- unless, perhaps, pg made the user interface purposely difficult. ;)
Suggested solutions are sometimes code, sometimes convention.
Code: longer time limits on deeply nested conversations. Like this one.
Convention: no blog spam wrapping other people's content. (Filters fail here because it's worth a human's time to write just enough almost-relevant 'content' to surround a link, so humans are essential).
Different communities can adopt different conventions, and those can shape and inform the voting going forward -- which may be one of the only things that let different democratic news sites retain their distinctive characteristics.
So, meh. Heh, it was just an idea. /grumble
The danger, of course, is: how is HN different from reddit.com/r/programming ?
How does it stay different? I think it's clear that we would want it to retain a distinctive flavor, but it seems almost inevitable that it would morph into proggit -- unless, perhaps, pg made the user interface purposely difficult. ;)
Suggested solutions are sometimes code, sometimes convention.
Code: longer time limits on deeply nested conversations. Like this one.
Convention: no blog spam wrapping other people's content. (Filters fail here because it's worth a human's time to write just enough almost-relevant 'content' to surround a link, so humans are essential).
Different communities can adopt different conventions, and those can shape and inform the voting going forward -- which may be one of the only things that let different democratic news sites retain their distinctive characteristics.
So, meh. Heh, it was just an idea. /grumble
But people still like to read this stuff (and vote it up), because some subset will always be discovering it, and it gives the rest of us a chance to talk about it as a community. That said, you're right: it isn't news, and so it doesn't quite belong here.
"Hacker Stuff" would make a great sister site, though. Same community (shared login), but rather than a steady, chronological influx, it would be a (categorized?) list of "the most interesting-to-hackers stuff of all time," with comment threads to discuss it. I imagine it's also where perennial topics of discussion, such as "Music to hack to" would migrate.
"Hacker Stuff" would make a great sister site, though. Same community (shared login), but rather than a steady, chronological influx, it would be a (categorized?) list of "the most interesting-to-hackers stuff of all time," with comment threads to discuss it. I imagine it's also where perennial topics of discussion, such as "Music to hack to" would migrate.
Someone suggested a Hacker Canon during the spate of "hey, Arduino exists" threads.
I tried using web.py on multiple occasions and found that it never quite fit the bill. I'd love a framework that is in between this and django, but I'm afraid that django is just probably the way to go regardless... There's too many benefits of the (almost) reusable apps, and of course the admin for quick data prototyping, and sometimes production admin console.
Web.py reminds me greatly of Sinatra http://www.sinatrarb.com/, a minimalistic very agile ruby web framework.
These sort of frameworks are ideal for developing APIs or stand alone (RESTFUL) services, anything that does not rely heavily on forms or a proper UI experience. Sinatra for example can only have one controller, so any app you develop will naturally do one thing (and do it well).
They're also perfect for prototyping ideas!
These sort of frameworks are ideal for developing APIs or stand alone (RESTFUL) services, anything that does not rely heavily on forms or a proper UI experience. Sinatra for example can only have one controller, so any app you develop will naturally do one thing (and do it well).
They're also perfect for prototyping ideas!
I like web.py's approach to templates. A few simple uses of $, if I remember correctly. A minimalist aesthetic. A typical Python framework's templating system is contrived and looks ugly by comparison.
Django's template system is the sexiest I've seen (mostly because of the simple syntax and inheritance). I've been meaning to check out web.py for a while now, will have to see how web.py templating compares.
Sorry; when I see those
Also, it's bizarre to use a language (Python) that uses indentation instead of endif's, closing braces, etc., and then turn around and require endif's and endfor's in your templating system. web.py's templates get that right: just use the Python style.
{% %} {{ }}
I feel nauseated.Also, it's bizarre to use a language (Python) that uses indentation instead of endif's, closing braces, etc., and then turn around and require endif's and endfor's in your templating system. web.py's templates get that right: just use the Python style.
Odd... it's personal preference here then. In my opinion python's style shouldn't be mixed with HTML at all. Again, I still need to look further into web.py's templating, but the endifs/endfors mix with HTML much better than python's style to me.
Especially when they run together, like this:
{% block title %}{{ section.title }}{% endblock %}Mako's the best I've found. Templetor looks nice but is awful because (of all things) whitespace is significant! That's a no-go for a template system.
The best I've ever seen (though I haven't seen an implementation for Python) is straight up x-expessions (sexps) with unquoting and unquote-splicing.
One step up would be CherryPy.
I'm using CherryPy for a project right now, and it certainly has some weirdness to it -- it tries to abstract HTTP just a little bit too much, and ends up doing some seriously stupid shit:
By default all exposed methods can be called as GET or POST, with keyword arguments found appropriately.
cherrypy.engine keeps a bunch of static state internally -- once you've started it, you can't restart it (or even catch an exception in start() and retry) with different settings -- you have to start over again in a new process (as you can't unload modules in cpython).
By default all exposed methods can be called as GET or POST, with keyword arguments found appropriately.
cherrypy.engine keeps a bunch of static state internally -- once you've started it, you can't restart it (or even catch an exception in start() and retry) with different settings -- you have to start over again in a new process (as you can't unload modules in cpython).
Google AppEngine's 'webapp' is web.py done right.
I'm surprised this has never been mentioned. web.py is my first choice for small ad-hoc websites these days over PHP - the Python standard lib is a huge plus and I've noticed that Python scales better than PHP on a small VPS.
The foundation of web.py itself is pretty solid, so even after you replace the ORM with SQLAlchemy, and Templetor with Mako, you have a nimble, functional framework. I wish they figured out what to do with the globals though, that make scripts feel messy.
The foundation of web.py itself is pretty solid, so even after you replace the ORM with SQLAlchemy, and Templetor with Mako, you have a nimble, functional framework. I wish they figured out what to do with the globals though, that make scripts feel messy.
It has been mentioned a few times - the creator (aaronsw) is a YC alum and occasionally stops by this forum.
It's fine for small ad-hoc websites, but it tends to run out of gas with larger, more complicated sites. The globals are a big issue, and you frequently end up writing wrappers around base web.py classes to fill in missing functionality. Might as well just start with Django and get the missing functionality to begin with.
It's fine for small ad-hoc websites, but it tends to run out of gas with larger, more complicated sites. The globals are a big issue, and you frequently end up writing wrappers around base web.py classes to fill in missing functionality. Might as well just start with Django and get the missing functionality to begin with.
Django unfortunately forces you into a restrictive architecture.
Many people would argue that's a good thing.
I've been busy learning django/python for a few weeks now and I'm reading pretty much all day. Someone on a forum somewhere mentioned this as a solution for some of the frustration a couple of people felt while working with django.
My own personal list of bad stuff to date (about django, not web.py):
There is a lot of 'magic' going on, in other words there are lots of things that have to be done 'just so' or it will not work and you'll get a totally meaningless error message (in fact the error messages are some of the worst I've ever seen).
Simple things (like extending the user model) are done pretty kludgy and not standardized as part of the framework, which I really think they should be. It would be easy enough to 'augment' the user table in a documented manner for instance.
Pretty much all of the documentation seems to teach you how to set up your applications in a non-portable way, in other words the application has to live in the named directory that it was conceived in.
I'm definitely going to play around with webpy under wsgi as soon as I have a little bit of time.
My own personal list of bad stuff to date (about django, not web.py):
There is a lot of 'magic' going on, in other words there are lots of things that have to be done 'just so' or it will not work and you'll get a totally meaningless error message (in fact the error messages are some of the worst I've ever seen).
Simple things (like extending the user model) are done pretty kludgy and not standardized as part of the framework, which I really think they should be. It would be easy enough to 'augment' the user table in a documented manner for instance.
Pretty much all of the documentation seems to teach you how to set up your applications in a non-portable way, in other words the application has to live in the named directory that it was conceived in.
I'm definitely going to play around with webpy under wsgi as soon as I have a little bit of time.
That's the problem with most frameworks. The Auth looks nice but is a pain to implement just right...Profiles are painful enough in Django. I've noticed that in the end you usually have to rewrite the core components, so it's better to choose software that anticipates this. Django is great for run-of-the-mill sites, just like Rails -- I love generic views. I'm more likely to use Drupal for that class of website though.
Drupal is a total pain to upgrade though. That is, if you can do it. Plenty of times you find that going from one major release to the next you might as well rewrite the whole thing.
But what do you actually rewrite? Module upgrades, if done properly, are straightforward, and the phptemplate API is stable (themes).
If your modules are going to be ported to the new version you're in luck. Upgrades are usually only supported for 'core', major revision upgrades of modules more often than not simply fail to convert the data to whatever backwards incompatible format they've come up with this time around.
On the whole drupal feels extremely immature, in spite of having gone through 6 major releases.
On the whole drupal feels extremely immature, in spite of having gone through 6 major releases.
It's been mentioned a bunch of times, it just falls out of the dupe filter after some amount of time.
http://searchyc.com/web.py
Web.py's author (aaronsw) posts here occasionally.
http://searchyc.com/web.py
Web.py's author (aaronsw) posts here occasionally.
...
Ah, no. Hmm. Well, I've proposed this before(http://news.ycombinator.com/item?id=750998), but what do you guys think about the adoption of this rule:
"If you're posting to inform us of the existence of something, assume we already know."
Details and examples in the post linked above.
Assume that we know about web.py, especially since its creator is from the first set of YC startups.