172 karma · joined Aug 2, 2011 (15y ago) · 121 submissions
comment 13y ago · link · parent
I don't get this at all... Harvard fellow uses MIT's network surreptitiously to violate the terms of service to download a nonprofit's entire database and then give it away for free, putting them out of business. Gets busted and charged with crimes. Where's the problem here?
Ok the prosecutor may have been overzealous, but we do have an adversarial system and it was Swartz's bad decisions that brought the hammer down. They didn't plant drugs on him. He wasn't doing it to feed his family. Sorry to all the people here that knew him personally, and to whom this is a personal tragedy, but this is not the kind of travesty of justice that you are making it out to be.
comment 13y ago · link · parent
Something like this would work even better:
result = src.asyncMap { |e| dowork(e) };
Except Google Go returns several values instead of tuples, so you can't just collect all the results as-is. And with no generics it would be annoying to actually use e and the result, since they would need casts. Too bad.comment 14y ago · link · parent
I haven't actually used IE10 yet, but I think you'll find this new architecture makes overall browsing more responsive and smoother than Chrome.
comment 14y ago · link · parent
Take OpenSSL for example... it's almost easier to learn the crypto than to figure out the API. Here's a good one: an SSL read/write operation can fail with more than one error, and if you don't clear or loop through all the errors then the next operation will fail because of the previous errors -- even if it succeeded. Or just try getting it to work with non-blocking sockets, you finally believe it is working and surprise it fails only once the network gets saturated. Or hours later when it renegotiates the crypto.
And you still have to know all the crypt terms to use it. What's a PEM? A BIO? PKCS? DHparams? What's "ASCII armor"? X509? Did SSL_library_init() add weak algorithms? Why do I have to know this just to create a secure connection?
Most of blame for crypto problems belongs to the libraries not the developers using them.
comment 14y ago · link · parent
Seems to me memory getting 10x more bandwidth and cache getting 8x larger probably accounts for the majority of the performance differences between these processors not instructions per cycle, which I think has gone up by more like 2x.
So a Pentium 4 with current memory and cache would need to be more like 8 Ghz if it scaled linearly like that (P4 had ~3 instructions per cycle, i7 ~7-8).
comment 14y ago · link · parent
- Samsung slavishly copying Apple's designs
- The Judge issuing a order designed to embarrass Apple
- Apple posting a snarky letter of the law notice
- Hacker News posters like in this thread
...these things are childish and immature. Grow up.
comment 14y ago · link · parent
> Depending on what you mean by "do" ...
Oh, I don't know, maybe dynamic code loading or secure sandboxing of code? For instance you can compile a custom Google Go without disk IO, but you can't have an app that loads plugins much less one where the app can do IO but the plugin can't.
These may not be the wisest or most useful of features for "systems" programming, but you have to admit that there are real things Java can do that Google Go cannot.
I think Google Go advocates put blinders on like agentS because if they actually objectively looked at the situation they would have the same thing to say as others do about Google Go: "meh".
comment 14y ago · link · parent
TypeScript:
typescript.org
click "Get the source code"
click "Download"
Dart: dartlang.org
click "Download now"
click "Check out" the source code
click PreparingYourMachine
wget http://src.chromium.org/svn/trunk/src/build/install-build-deps.sh
bash install-build-deps.sh
install 32-bit dev libraries
svn co http://src.chromium.org/svn/trunk/tools/depot_tools
export PATH=$PATH:`pwd`//depot_tools
install jdk 1.6
gclient config http://dart.googlecode.com/svn/branches/bleeding_edge/deps/all.deps
gclient sync
Seriously just to get the source you have to run two downloaded programs, any linux besides Ubuntu requires extra work, and even still it comes with some pre-built 32-bit binaries which apparently are compiled as part of another project. It's madness.They say it's so complicatd because Dart is part of Chromium, but Firefox has a direct hg link -plus- hg bundles (repository snapshot).
comment 14y ago · link · parent
- Reddit has best conversation because the red envelope tells you of replies.
- Hacker News has the best audience.
If these were combined into one site it would be hella cool, but unless HN evolves the tech I can tell you what site I won't expect to be around many years from now. Blacklisting unsavory contributors and deleting posts is only going to work to maintain standards for so long.
comment 14y ago · link · parent
That was actually the point. You have the same space considerations. Being coroutine instead of native thread is just a small constant factor... if this factor is important then you are almost certainly doing it wrong.
comment 14y ago · link · parent
Yeah not really. C threads normally have a fixed-size contiguous virtual memory space allocated to them, but the space they don't use is not actually consumed. You can even call madvise() to release memory on returning from a deep stack so you only actually "use" 4k of memory afterwards. The only significant resource consumed is virtual address space, which is effectively unlimited on 64-bit systems (why design a new language around 32-bits systems?). For that matter "C threads" could use segmented stacks as well if they wanted to.
But "goroutines" also have to be concerned with the total stack space they may use. For example, suppose those 100,000 goroutines were network servers and a hostile client could manipulate the connection to block the routine while it was consuming 400 KiB of stack. Now an attacker (or random confluence of events) can cause your program that normally averages 1% memory to use 100x as much as normal and run out of memory.
Space is almost never a reason to use coroutines over threads.
comment 14y ago · link · parent
You know, maybe Apple is in the wrong here, but without actual evidence I don't think it's safe to say which company is the greater evil.
comment 14y ago · link · parent
comment 14y ago · link · parent
if err := datastore.Get(c, key, record); err != nil {
return &appError{err, "Record not found", 404}
}
This is pretty typical Google Go error handling, where errors are only actually used as boolean flags. Errors are universally returned as type 'error' so to actually do anything with the error you have to first cast it to some specific type. But that type isn't part of the method signature so you have to dig around in the source or, if you are very lucky, it was documented someplace. You end up having actual error handling plus even more error handling for if you got the error type wrong.For instance if datastore could return 'record not found' or 'io error' then they would usually be treated the same way by the code because to do otherwise would be even that more of a hassle.
comment 14y ago · link · parent
Clearly not. For one thing you just don't erase a working drive with your data on it until the repair is successful. If it's some warranty thing and they are going to take the drive then you at least make a 1:1 image of it using dd or equivalent block copy first. If they are replacing it with the same size just dd the image back for that matter.
The worst part is this repair is trivial for anybody that knows what he's doing. You just order a replacement drive from newegg (or wherever), mount the new and old drives using target disk mode or external enclosure, and copy the disk. Then you swap the drives. This wasn't an Air or something difficult, just unscrew the case and replace the drive. Or if you really don't want to take it apart yourself have the repairman do the swap.
It's really easy, especially with a second Apple available. I did it just a few weeks ago for a family member, the only actual time investment is opening the case to swap the drives.
comment 14y ago · link · parent
There is one way Apple's maps already surpass Google's: no advertising.
For instance the iOS 5 Youtube app never showed ads, whereas the new app store one shows tons of them. Sometimes 1/4th of the screen is advertisement.
I'm sure it will be the same way for maps. Looking up a bus route, looking for used cars for cheap? Oh you are walking someplace, wouldn't you like a bicycle? There's five StarBucks® on your route!
No thanks. If I need the better features in Google Maps then I'll use it, but I'll go with the ad-free version if it works well enough.
comment 14y ago · link · parent
That's natural language for you, but if you try to understand what the assumptions are behind a statement then you have a good chance of coming to an agreement.
"It's a nice day today"
"Actually, a day is a unit of time it's the weather that is nice"
That's what you are doing.
comment 14y ago · link · parent
Actually implementations are not fast (or slow) either, hardware is. Not like that matters. When somebody says a language is 'slow' they mean on typical hardware, under some common operating system, using the implementations available, and so on.
Everybody knows this. You're dissembling because your favorite language is slow.