Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benhoyt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
65 ms
·
661.
▲
by
benhoyt
13y ago
How is Flask a "content management system"? I thought it was a fairly small set of utilities for writing web applications, aka a microframework. A CMS is a program/app for publishing and editing web pages or blogs, is it not?
662.
▲
by
benhoyt
13y ago
Yes, regularly. I'm a backend web developer who works on a fairly large-scale website, and program mostly in Python. It's pretty important to know that code like this (which we have in our photo search code): for image in images:
663.
▲
by
benhoyt
13y ago
Less verbose than Python -- interesting (not that Python is "verbose"!). I've always heard Go was almost as concise as Python, but not quite. Can you give a couple of multi-line Go code examples that are more concise than the equivalent Pyt
664.
▲
OpenSSL hangs CPU with Python v2.7.3 on Windows
(tech.oyster.com)
1 points
by
benhoyt
14y ago
|
0 comments
665.
▲
by
benhoyt
14y ago
It gets better, though. C# 3.0 also has query expressions, which are even closer to Python's list comprehensions. Also, I think String.Join(sep, enumerable) would be more efficient than repeated string concatenation with + (given that C# st
666.
▲
by
benhoyt
14y ago
It's a good question. We (a large-scale website serving 250,000 pages/day) use Python+CherryPy for our "application server", but that's sitting behind an nginx reverse proxy. The main reason is that nginx is much better and faster at handli
667.
▲
by
benhoyt
14y ago
It might be "constructive" if everyone is in basic agreement and people know what's being referred to. That's certainly not the case with the OP's comment, and there's obviously people who disagree. The specifics in your comment (especially
668.
▲
by
benhoyt
14y ago
I'm not in any way related to this effort, but if you're going to give criticism, please at least make it constructive or give examples of what you mean. I certainly didn't find it horrible "in almost every way".
669.
▲
by
benhoyt
14y ago
Yeah, that'd be a superb idea. Start with a really good code example (or a few really good examples that cycle between page loads), and have an interactive thingy. Like the Go homepage: http://golang.org/
670.
▲
by
benhoyt
14y ago
It is blue, but at least it's a colour, and not a bad one. The problem with gray is that it looks very, well, gray. I had similar thoughts about the white part of the drop-down menu changing sides. FWIW, I think it's a really significant im
671.
▲
by
benhoyt
14y ago
I'm not sure why "find" or "contains" isn't a member function of STL container types, but there is the std::find() function: bool xIsMember = std::find(v.begin(), v.end(), x) != v.end(); Edit: I admit this is terrible API design. Wh
672.
▲
by
benhoyt
14y ago
A subtle but neat feature on the ST3 download page -- http://www.sublimetext.com/3 -- there's some JavaScript that automatically detects your platform (eg "Windows 64 bit") and highlights the correct bullet point.
673.
▲
Masterminds of Programming
(blog.brush.co.nz)
6 points
by
benhoyt
14y ago
|
0 comments
674.
▲
An arm wrestle with Python's garbage collector
(tech.oyster.com)
3 points
by
benhoyt
14y ago
|
0 comments
675.
▲
The SQLite lock timeout nightmare
(beets.radbox.org)
5 points
by
benhoyt
14y ago
|
0 comments
676.
▲
by
benhoyt
14y ago
Yes, they're a hack, but this is HACKer News, right? :-) More correctly, though, as Adam pointed out, the switch statement implementation of protothreads is a hack. However, I'd like to also point out that it's a very useful hack. In the ti
677.
▲
C#’s async/await compared to protothreads in C++
(blog.brush.co.nz)
64 points
by
benhoyt
14y ago
|
9 comments
678.
▲
by
benhoyt
14y ago
True. But you should also put the setup in a -s option, because you're not timing the imports. And you don't really need the loop, because timeit does a bunch of loops for you: >python -m timeit -s "from operator import itemgetter
679.
▲
by
benhoyt
14y ago
It seems to me if you want to write code like this, you shouldn't write it in Python. Python has much simpler, built-in ways to do most of the things he's suggesting. For instance, he says "good" for this code: reduce(operator.add, ma
680.
▲
Symplate, a very simple and very fast Python template language
(github.com)
4 points
by
benhoyt
14y ago
|
0 comments
681.
▲
by
benhoyt
14y ago
I honestly don't understand why that's crazy. Empty string evaluates as falsey, so the "or" picks the 10, which is obviously equal to 10. Or am I missing something?
682.
▲
Simple .INI file parser in C, good for embedded systems
(code.google.com)
1 points
by
benhoyt
14y ago
|
0 comments
683.
▲
by
benhoyt
14y ago
Do you mean checkboxes? But if so: yeah, me too.
684.
▲
SlopPy: An error-tolerant Python interpreter that facilitates sloppy programming
(pgbovine.net)
2 points
by
benhoyt
14y ago
|
0 comments
685.
▲
by
benhoyt
14y ago
It's a contrived scenario. I've used Python a ton and never needed to break out to C, certainly not for summing numbers. Granted, I use Python mostly for web development, but I do care about performance. In case of number crunching, I've he
686.
▲
BugKick - open source bug tracking system by the Musopen.org people
(bugkick.com)
3 points
by
benhoyt
14y ago
|
0 comments
687.
▲
by
benhoyt
14y ago
Not equivalent, but parallel -- wearing a T-shirt joking about killing and bombs on a plane is equally out of place.
688.
▲
by
benhoyt
14y ago
Very much agreed. I remember once going through airport security (in New Zealand) and the guy said, "Could you please take off your jacket." So I did, then remembered I'd put on my "DANGER, EXPLOSIVE" T-shirt that morning. I looked down and
689.
▲
by
benhoyt
14y ago
There's a time and a place for everything, including speaking freely. As another example, the time to be vocal about your disagreement with someone's policies is not by picketing their funeral.
690.
▲
by
benhoyt
14y ago
Huh, interesting that it's YC-backed. It overlaps with my own website http://GiftyWeddings.com -- though mine is more of a gift list, where you really can add any gifts you like (you just type them in, and optionally add a web link). One
More ›