Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
riobard
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
89 ms
·
841.
▲
by
riobard
17y ago
> It's tiring fighting against a community and a (benevolent) dictator that disagree with you. That summarizes the problem I guess :D
842.
▲
by
riobard
17y ago
> You'll be thrilled (lol) to know that the lambda-tuple syntax isn't in python 3 Now you know why many people like me are gradually pissed off by Python and start the exile ... currently trying Scala and it seems a nice language (with
843.
▲
by
riobard
17y ago
[NOTE: copied from another branch for easy reading for others] A saner map/filter/product version: map(lambda (w,s,l): {'widget': w, 'sprocket': s, 'location': l} filter(lambda (w,s,l): l.hasInStock(w) and l.hasInStock(s) and
844.
▲
by
riobard
17y ago
Maybe it's just me ... Every time I see something like [fn(x) for x in xs for xs in xss if cond(xs)] I always think it's a loop, then an inner loop (and loops -> procedure ... then get confused which is inner and which is outer
845.
▲
by
riobard
17y ago
I'm not so sure if set notation is higher level, but for the example in your longer comment, map/filter/product is not that bad if you use it wisely. Here is my version: map(lambda (w,s,l): {'widget': w, 'sprocket': s, 'location': l}
846.
▲
by
riobard
17y ago
Python's lambda sucks, but that does not necessarily mean map/filter sucks with it too. Of course there are cases where list comprehensions are more convenient and more powerful (esp. if they are more like their "real" counterparts in Haske
847.
▲
by
riobard
17y ago
Well, FP is mostly about nesting, but it's uniform and people get used to thinking that way. List comprehensions, on the other hand, are more like procedure code (conceptually), and it sucks to nest them. Nesting aside, it's the different l
848.
▲
by
riobard
17y ago
Yeah I know. Maybe "force" is not the right word ... probably "discourage"? Actually only one line of code is enough for each of map/filter: def map(fn, seq): return [fn(each) for each in seq] def filter(cond: seq): return [each f
849.
▲
by
riobard
17y ago
> Python's list comprehension is much more readable than using map/filter/reduce - at least for Python programmers For simple cases, yes. But I wouldn't say [each for each in [expensive_call(x) for x in seq] if cond(each)] is m
850.
▲
by
riobard
17y ago
Modern Chinese nouns, esp. in technical fields, tend to be word-by-word translation of their original/English terms. It's crazy to invent a new set of terms for the same thing. Unfortunately most Chinese translation of computer science/prog
851.
▲
by
riobard
17y ago
Unlike computer languages, constructed human languages seem never to gain enough mass to carry on. Too many people have invested too much time and money in English currently, so it's wiser to reuse that (or any other language provided it is
852.
▲
by
riobard
17y ago
Ah, no ... but from another "socialist country" (China) :O Actually I'm currently in Germany so I was quite surprised by that. Seems it was quite some time ago, though. Sorry, my fault :|
853.
▲
by
riobard
17y ago
Even now? Then better bring gold back into the market ...
854.
▲
by
riobard
17y ago
A single, non-nested list comprehension or generator exp is basically map(filter). You need nesting to get filter(map). e.g. map(expensive_call, filter(cond, seq)) equals [expensive_call(each) for each in seq if cond(each)]
855.
▲
by
riobard
17y ago
I'm native Chinese. Here's my translation of the forementioned features: "completely object-oriented, cross-platform, support Unicode, multithreading, GC, (type) reflection, statically compiled, dynamic type loading, etc" I believe "dynamic
856.
▲
by
riobard
17y ago
The price for dedicated servers in Germany is just crazy ... a friend of mine is using this one too and I also have an account. If price is a concern (for testing and personal purposes), find a friend or two to share a baseline dedicated se
857.
▲
by
riobard
17y ago
This will be off topic, but ... what if he makes two lies in a class? :D
858.
▲
by
riobard
17y ago
"JVM, doesn't completely support Non-Blocking IO" Isn't java.nio supposed to provide non-blocking IO (at least for socket)?
859.
▲
by
riobard
17y ago
I thought doing "http server programming" is pretty much in the same category as doing "web programming"?
860.
▲
by
riobard
17y ago
Learning Scala right now. Seems it fits nicely as the NBL according to Steve Yegge's criteria: #1 C-like syntax (might be closer to Ruby actually) #2 Static-typing but feels pretty dynamic due to extremely good type inference #3 Perform on
861.
▲
by
riobard
17y ago
Most of the time I only need SSH into a server to do any dev. I have the idea that an iPhone attached to an external screen (via its dock -- there seems to be a cable for that) and a Bluetooth keyboard will probably be cool.
862.
▲
by
riobard
17y ago
Alan Kay is right again: "People who are really serious about software should make their own hardware". That explains Mac and iPhone's success I guess
863.
▲
by
riobard
17y ago
This is pretty useless for anyone not using Picasa. I cannot "sync" my iPhoto library easily. The Picasa Web Album Uploader sucks. Still hope they can give us gDrive ...
864.
▲
by
riobard
17y ago
"The project is named pysistence because most of the data structures it implements are persistent. This doesn’t mean persistent in the sense that they are stored in a database or the file system. Rather, it means the data structures may onl
865.
▲
by
riobard
17y ago
The article is a little bit too harsh, but I get the idea. Let me explain ... First, the title is wrong. Ubuntu is absolutely making Linux MUCH friendlier to use than ever before. In fact I would seriously doubt if Linux could be as popular
866.
▲
by
riobard
17y ago
remember to check the LCD monitor for high frequency noise, too. recently i came across several samsung monitors with this issue :|
867.
▲
by
riobard
17y ago
The DPI of the 27" iMac display is 108 vs 133 on the 17" MBP. It's closer to the 110 DPI on 15" MBP. I use a 13" with 113 DPI and feel the text size is not that bad.
868.
▲
by
riobard
17y ago
I'd like the option to use SSD too. Aside from the performance improvement, it would make the machine completely quite (fan not running and no CD spinning, though) at night :)
869.
▲
by
riobard
17y ago
I really love the screen. And consider that it is 2560x1440 at 16:9 and only 160 pixel "shorter" than the 30" Cinema HD (2560x1600 at 16:10), and the $100 CHEAPER with LED backlight --- guess what a pleasure it would be to code on it! :)
870.
▲
by
riobard
17y ago
So this is a mistake ...
More ›