Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
eliben
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
63 ms
·
631.
▲
by
eliben
13y ago
http://www.chevrolet.com/spark-ev-electric-vehicle.html says 7 hours
632.
▲
by
eliben
13y ago
It's somewhat sad. I really hope Better Place's demise happens because battery-swapping lost to just-keep-the-battery-in-the-car-and-charge-it strategy; not because oil-is-still-more-economical. :-/ But seriously, how will we ever be able t
633.
▲
by
eliben
13y ago
Wow, that's awesome. Imagine your photo collection of 1000s of photos, and you remember "the one with that cat" but how do you dig through the photos to actually find it? This can go a long way to a much more meaningful photo library manage
634.
▲
by
eliben
13y ago
What does it mean for an individual to go bankrupt? [genuinely curious]
635.
▲
by
eliben
13y ago
> Most people do it, regardless of their income. Really - how does this work? If you consistently live beyond your means, do you just die with a huge debt or do you repay it somewhere along the way?
636.
▲
by
eliben
13y ago
An interesting story. One observation: "[...] At 29 years old, I was the oldest of the three GitHubbers, and had accumulated a proportionally larger amount of debt and monthly expenditure. I was used to my six digit lifestyle. [...]" Now,
637.
▲
by
eliben
13y ago
The Python project has a special "mentorship program" designed to increase the amount of core contributors to Python. See - http://pythonmentors.com/
638.
▲
by
eliben
13y ago
> which is one of the most widely deployed RDBMS's in the world Being inside Chrome, Android, Firefox, Skype and other places ( http://www.sqlite.org/famous.html ), I'd argue that SQLite is by far the most widely deployed RDBMS in the
639.
▲
by
eliben
13y ago
That's good to hear :-) As you see, there's quite a bit of interest in such articles. I presume you can give a lot of additional details without exposing any IP.
640.
▲
by
eliben
13y ago
It is a shame there aren't more technical details in that post though.
641.
▲
by
eliben
13y ago
It's perfectly fine to be using more than one tool. Starting with Python can be a good idea because of the rapid development and turnaround while experimenting. If Python ends up being fast enough, that's great. But if it doesn't, then it's
642.
▲
by
eliben
13y ago
Why would I want to script a hash table from a programming language?
643.
▲
by
eliben
13y ago
Is this a buzzword-laden way to describe a serializable hash table? [I'm asking seriously]
644.
▲
by
eliben
13y ago
Ah nostalgia... I recall wondering about this myself back in the early days of my career. However, that was before the current wave of document-based DBs (Redis, Couch, Mongo etc.) so the meaning of a "database" was more targeted at RDBMSs.
645.
▲
by
eliben
13y ago
There are many advantages. Here are some: >>> class MyEnum(Enum): ... VALUE_ONE, VALUE_TWO, VALUE_THREE = range(3) ... >>> v = MyEnum.VALUE_ONE >>> v == 0 False >>> v == MyE
646.
▲
by
eliben
13y ago
That's not an entirely fair way to put it, Raymond. Yes, some folks said that maybe Python doesn't need enums at all. But many more said Enums should get into Python, including Guido. The issue was sealed in a face-to-face discussion duri
647.
▲
by
eliben
13y ago
All the same ways were chosen for the Enum functional API, by the way (list, dict, string separated with either spaces or commas). In general, the functional API was inspired mostly by namedtuple. It's not that the namedtuple syntax is pret
648.
▲
by
eliben
13y ago
You're right, this can be done without changing the Python syntax and in fact there was a proposal (with implementation) on the table for a long time. But eventually it was deemed to be too error prone and the more explicit approach was cho
649.
▲
by
eliben
13y ago
And yet most large Python projects reinvent the concept of enums in one way or another. This includes Python itself, where enums could be used in many places in the stdlib. Actually, one of the main reasons IntEnum is part of the implementa
650.
▲
by
eliben
13y ago
If you can't distinguish between enumerations and named tuples, I think you have a bigger problem than you think. I mean this in full seriousness. Conceptually, the two constructs have completely different uses. That you can twist and bend
651.
▲
by
eliben
13y ago
Every point raised by this post was discussed and rehashed multiple times, debated, argued over, complete with emotions. The end result was something that feels right to the vast majority of the discussion participants (give or take a few m
652.
▲
by
eliben
13y ago
It makes me sad how prone programmers are to condescension and dismissing attitude towards other programmers. Especially leads of open-source projects. Something about having all that influence gets into people's heads.
653.
▲
by
eliben
13y ago
That syntax is a bit unusual, but it has the clear advantage of being far less verbose. Consider this: * The functional API is mostly for short code snippets and experiments in the shell. For real programs, the standard class syntax is pref
654.
▲
by
eliben
13y ago
We expect the implementation will be committed in the next few weeks, and you'll be able to give it a try using Python's tip revision ("trunk"). It will actually _ship_ with Python 3.4
655.
▲
by
eliben
13y ago
It's possible by using a __prepare__ method in the metaclass of Enum, which allows to return an essentially ordered dict for the __dict__ of enumeration classes.
656.
▲
by
eliben
13y ago
What disgusts you about it, in particular?
657.
▲
by
eliben
13y ago
Yes, I noticed that curiosity :-) Not intentional! Luckily there's no need for more permutations - this PEP was accepted. I expect PEPs 534 and 543 to surface at some point, but it isn't likely they will deal with enums.
658.
▲
by
eliben
13y ago
Enum values don't have to be ints, they can have any value you want. The explicit values are there because Python's "explicit is better than implicit" zen, and the functional API gives you a way to create enums without assigning explicit va
659.
▲
by
eliben
13y ago
Read the PEP motivation :-) It's still useful to have mnemonic names for special values, with nice string representations and some guarantees on what is equal to what.
660.
▲
by
eliben
13y ago
flufl.enum was the initial candidate for PEP 435, but the current approach changed and uses implementation techniques not available in Python 2.7 We may create a almost-compliant back-port for 2.7 as an external library though
More ›