Better HN
topnewbestaskshowjobs
Log inSign up

0xABADC0DA

172 karma · joined Aug 2, 2011 (15y ago) · 121 submissions

Hellbanned for a +6 point comment.
Submissions

comment 13y ago · link · parent

> The people responsible are representatives (in one way or another) of the United States of America. Land of the free. Home of the brave.

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

If you think you can do asyncMap in Google Go, without casts and without manually collecting multiple return values, by all means show us the code. I would find that really interesting.

comment 13y ago · link · parent

Even so why would you write that boilerplate code out each time?

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

In IE10 the JavaScript is multithreaded... there's a separate thread for JS parsing, compiling, and garbage collection. As far as I know this is the only browser with a threaded JavaScript VM. So the skipping frames is probably because the rendering can be done independently from running JavaScript, and the core in use is probably some quirk like the benchmark creating a few objects on a timer, causing the GC to run on another thread -- that kind of thing can be fixed pretty easily, either by tweaking the benchmark (if it were publicly available) or by Microsoft fixing IE.

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

The real problem is the software libraries are just as hard.

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

> P4 would have to be running at over 20GHz to match what the i7 is doing on a per-core basis.

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).

http://en.wikipedia.org/wiki/Instructions_per_second

comment 14y ago · link · parent

The only actual proper thing in this whole affair was Apple's lawsuit. As Samsung was copying them right down to the shape of the charger Apple felt they had a real case. They lost, but disputes are supposed to be settled in court when the parties can't come to an understanding.

- 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

> Sure you can. Spawn a child process ...

This is exactly what I was talking about. You can't even admit facts like that Java has dynamic loading and a security model and that Google Go does not. You're simply delusional in this respect.

comment 14y ago · link · parent

> > On the other hand, there are plenty of things you can do in Java that are simply impossible to do in Go.

> 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

Thanks for the help. I see now you can get the URL by using the source browser then clicking 'checkout' to get the svn checkout URL.

I just wanted to check out the source, but setting up an Ubuntu VM to isolate gclient and that other nonsense was way too much work.

comment 14y ago · link · parent

I don't get it why they make it so difficult to get the source code.

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

- Slashdot has the best moderation to show you the best posts.

- 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

Yes. Your filter bubble won't let you know that anybody else finds it creepy. "If you like, you can repeat the search with the omitted results included."

comment 14y ago · link · parent

How would this be different in a different concurrency model?

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

But remember that this is in contrast to C threads, where 64 kB is a tiny stack and 1-4MB is more common.

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

Why do you think this is Apple's fight? The iOS 6 comes out 5 years after the original iPhone. That's a nice round number and it's highly likely that there was a 5 year contract and Google simply refused to license Maps to Apple at any reasonable rate (take for instance people moving to open street maps instead of Google Maps because of the recent rate hikes). Hell they bought a whole company for what $15 billion seemingly just to sue over patents.

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

I think this is exactly the point. You have to read the comment to get the error types (isn't compiler accessible), it doesn't list what all the possible error types are (doesn't say the ones documented are exhaustive), and the code returns a singleton error (no state) presumably so the caller doesn't have to do a bunch of casts..

comment 14y ago · link · parent

It's actually worse than that. The blog has error handling code like:

    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

Interesting in that when it comes to computers, he [Rob Pike] knows what he's doing.

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

Apple's maps will never reach Google's.

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

So when somebody says a language is "slow" ... he picks arbitrary and unspecified parameters fitting what he wants the result to be, and then declares he was right?

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

Languages are not fast (or slow), implementations are.

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.

comment 14y ago · link · parent

Bookmarklet to turn on/off style sheets:

javascript:(function(){var%20s=document.styleSheets;for(var%20i%20in%20s){s[i].disabled=!!!s[i].disabled;}})();

Makes pretty much any page readable, but combine with noscript/adblock to keep the content from changing.

12345