Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
bdarnell
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
151.
▲
by
bdarnell
15y ago
PyPy has higher memory usage than CPython for two main reasons: A) JIT-generated code, B) pure garbage collection lets dead objects live longer than CPython's refcount/GC hybrid. Neither of these is going to go away, although it's reasona
152.
▲
by
bdarnell
15y ago
In the long term I think we need both 2to3 and 3to2, but for now 2to3 is more important. As long as both my dependencies and the users of my library are mostly on 2.x, I want that to be my primary development platform. If the only way to
153.
▲
by
bdarnell
15y ago
A lot of the recent discussion around python3 has been about how 2to3 is slow and inconvenient, so this seems like a good time to plug my attempt to improve the process. https://github.com/bdarnell/auto2to3 uses an import hook to run 2t
154.
▲
Auto2to3: Faster and easier cross-Python (2.x/3.x) development
(github.com)
2 points
by
bdarnell
15y ago
|
0 comments
155.
▲
by
bdarnell
15y ago
No, PEP 3333 is just an adaptation of the old WSGI interface (PEP 333) to Python 3 (mostly bytes/unicode issues). PEP 444 will be the next version of WSGI and will include some asynchronous functionality.
156.
▲
by
bdarnell
15y ago
Impressive! Is python 2.5 still supported? In my experience (with Tornado) it's difficult to get a single codebase to work on 2.x and 3.x without using some of the features introduced in 2.6.
157.
▲
by
bdarnell
15y ago
20% of survey respondents reported using it in february: http://dl.dropbox.com/u/19694335/tornado/Tornado%20usage%20s...
158.
▲
by
bdarnell
15y ago
The impact of an occasional slow query is mitigated by the fact that you're running multiple processes. You need multiple processes anyway because of the GIL, so just run a few more to make sure you're able to keep the CPU busy. An async
159.
▲
by
bdarnell
15y ago
tornado.database has no real ties to the rest of the system; you can (and I usually do) use SQLAlchemy or another database layer instead. You can also call another template engine if you prefer, but you're sort of stuck with the url routin
160.
▲
by
bdarnell
15y ago
I think you could do something manageable with yield alone (at least with python-style generators). I've been meaning to try something like this with tornado. The general idea is that yielding would either immediately produce a callback o
161.
▲
by
bdarnell
15y ago
This is a great post, but it's odd that he says that catching bugs is the "least valuable" reason to do code review, and then that the reason you do code reviews is for correctness rather than "whether it's what the reviewer would have writ
162.
▲
Tornado 2.0 released
(groups.google.com)
98 points
by
bdarnell
15y ago
|
29 comments
163.
▲
by
bdarnell
15y ago
The heapq change was just last week and has not yet been in any release, so that's a perfectly reasonable omission. :) But yes, this is about a pre-1.0 release, so I would encourage anyone interested in exploring tornado internals to check
164.
▲
by
bdarnell
15y ago
Agreed. If requests per second is the metric you're optimizing for, then threads are a perfectly fine solution (see e.g. Paul Tyma's presentations about how threads are superior to event-driven approaches in Java). The strongest case for
165.
▲
by
bdarnell
15y ago
most_common(n) takes an optional argument, which makes a difference. With no arguments, you're just sorting the list, but when you just want the first N, you don't have to sort the entire list first. However, the partial-sorting optimizat
166.
▲
by
bdarnell
16y ago
When I tested cjson (~6 months ago?) it had bugs with escaping - strings containing quotes and/or backslashes would be encoded/decoded incorrectly. Not recommended, unless there have been fixes since then.
167.
▲
Auto2to3: Development workflow to support python2 and python3 from one codebase
(github.com)
2 points
by
bdarnell
16y ago
|
0 comments
168.
▲
by
bdarnell
16y ago
This has been fixed in the just-released Tornado 1.1.1.
169.
▲
by
bdarnell
16y ago
Ah, that makes a big difference. Thanks for the correction.
170.
▲
by
bdarnell
16y ago
Wow, didn't expect this to make the front page of HN. There's more context in the groups thread ( http://groups.google.com/group/python-tornado/browse_thread/... ), but the short version is that a change to abstract away some error handlin
171.
▲
by
bdarnell
16y ago
That's often true, but doesn't appear to be the case here. This was a simple case of making invasive changes without quantifying the performance effects.
172.
▲
by
bdarnell
16y ago
Right-hand-only pain is likely to be mouse-related rather than keyboard-related (assuming you mouse right-handed). Try different pointing devices and see what feels best for you. I switched to a trackball (currently a Kensington "Expert M
173.
▲
by
bdarnell
16y ago
Google Reader's folders do allow for tag-like multiple categorization. If you use drag and drop then it acts like folders (and removes the feed from its previous location), but if you use the "Feed settings" dropdown in the blue bar you ca