skysight-inc/HackerNews huggingface dataset:
A power adapter which can't handle a short is dangerous, period. Handling a short should be a part of the design of the power supply. Break open a low-quality third-party power supply for the last generation of iPhone and you'll see some downright dangerous, possibly lethal stuff. These dangers aren't really even mitigated by putting a shield around the plug.

http://www.arcfn.com/2012/03/inside-cheap-phone-charger-and-...

And a picture of what it should look like:

http://www.arcfn.com/2012/05/apple-iphone-charger-teardown-q...

Notice that on the shoddy power supply, the isolation between mains voltages and the other side is about 1mm. Manufacturing tolerances and component faults could easily bridge that gap and electrify the entire low-voltage side with lethal 240V mains -- shield and all.

Idiot-proofing low-voltage plug design doesn't help, because you've already lost if you let idiots design anything that plugs into the wall. Okay, shorting the plug might blow out your knockoff power supply and possibly start a fire, if the current limiting circuitry fails (which it shouldn't). But that knockoff was going to electrocute you anyway, at least if it lights on fire you still have the chance to run.
A simple change to Rails error messages that helps thousands of devs
Plus Sqlite.
>> Microsoft, on the other hand, worked out that going through $70,000 of unnecessary power by running "giant heaters" would put them in the clear and save $140,000 from the $210,000 fine.

Times must be pretty tough at Microsoft if they are prepared to do something as stupid as this to make a minuscule $140,000.00 in savings.
"I could reply by pointing out similar behaviour in countries all over the world, it is a common human trait, not something that is somehow peculiar to China."

Maybe, maybe not. I see no reason to give the privileged position of "default" to the belief that all large populations of human beings are, on average, the same as all other large populations of human beings. Women and men are inherently different. Asians and Arabs are inherently different. All groups of people are very similar to one another, yes, but there's no reason to believe that they're the same, or that they'd be the same if not for environmental factors. Why would you believe such a thing?
Shooting, Rifles, films, and Photographs.
I believe the whole point of that set of sentences was "We have no earthly idea. Things could suddenly change or things could never change; but the trend has been in these other countries for things to change, and for them to change suddenly"
Getting a Job Abroad
So I am a fourth year CS major in a 5 year program with mandatory coops/internships. I've already done a 6 month coop at Oracle doing mostly web dev, with a little bit of back end work in java. And I really want to get an internship abroad but I have no idea how to go about this and my school's advisers have been less than helpful. Any advice or tips on ways to start my search or companies to look into? I have passable German ability but am not too picky on location. I was looking into places like London, New Zealand and Australia as well. Any help would be appreciated. Thanks
SEO toolkit
> to uncatchable signals like SEGV in unix and uncaught exceptions in C++ or Java.

SEGV can be caught. There are only 3 uncatchable signals: KILL, STOP and CONT.
When you trade it you trade CNY with a note saying please settle in Hong Kong, you cannot use the CNH symbol...
The Do Over
... And the blue is now back: http://news.ycombinator.com/item?id=4560768
This is a leaked old version. The new cut will be released in theaters and cheap download ala Louis CK very soon.
If you read this article http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&obj... he specifically states "Prime Minister John Key has revealed the GCSB was acting without his sign-off".
I suggest that the issue at hand is that all we see is shadow play - we have incomplete data, which hints at many different ways the ground reality may be moving.

Even if we had complete data, with a country like China there are many actors pulling ground reality in different directions, so being able to arrive at a binary state for the country seems unlikely.

The requirements of violent revolt are pretty extensive - most people endured generations of hardship, and for them to overthrow the system the leadership and hardship requirements are steep.
"Minimum wages are going up by double digits in cities around the country and many workers are receiving social insurance payments for the first time." - from linked article

The article linked to by parent is interesting, although the vocabulary is leftist.

You know how Western economies generate around 70 to 80% of gdp from activity within their borders (exceptions being Canada and NZ because of extraction industries). When China gets near that percentage, will they need this cheap assembly and fabrication work?
Odersky's first week's Functional Programming with Scala lecture notes
That doesn't mean anything. You need a real study (placebo works great you know). crntaylor is right. The sleep stages differs a lot between individuals. You need to analyze brain waves in order to be more precise (you could also try to detect movements like the "Sleep as android" app on android. But that's far from perfect.)
At least in Oakland, tenants have a practically unlimited right to sublease (caveat, that's based on my reading of the just cause eviction law) -- the landlord may only object under a few specific circumstances, and if the subtenant agrees to be bound by all the rules to which the main tenant is bound, almost no reasonable objection is possible.

I would not expect Oakland to be more liberal than SF in this regard, but I could be wrong.

See: http://www2.oaklandnet.com/oakca/groups/ceda/documents/polic...
"The Chinese citizens are certainly socially notably different from Western nations; it has nothing to do with race and everything to do with culture..."

Probably not. Why would it be 100% cultural and 0% biological? Because it makes you uncomfortable to admit any other possibility? I'm sorry, but reality doesn't care about your comfort level. It could be 100% cultural and 0% biological, or 90/10, or 50/50, or 20/80. I don't believe that the 100/0 scenario is very likely, because--despite your baseless assertion to the contrary--there are in fact real biological differences between East Asians and Europeans (or East Asians and South Asians, or any other racial group).
My point is that whether it's "A() error" or "A() (int, error)", whether it calls one function or three, what it's doing with the error is throwing it up the line, rather than handling it locally. Exactly as if it had said "throw err". So yeah, your version is what I'd shorten it to in practise, it just wasn't quite so illustrative.
this is in Germany, so might not help you personally, but another small startup in this field is doxter (http://www.doxter.de/)
I prefer vundle.
Is there a single source for data like this? Lists countries, currencies, timezones, dictionary words.

A Wiki for massive amounts of data that is basically common knowledge.
The web site launch toolkit (http://whattouse.com/toolkit/web-site-launch-toolkit) got a very positive response so this time I tried an SEO one. Any suggestions for other toolkits people would like to see?
How Google Stays on Top by Acquiring Startups
> Countries that ceased to exist are not listed

Where I work, we have a very thoroughly compiled list of countries for our user profile "Country" dropdown. It never ceases to amuse me that people signing up for our services are given choices such as:

- Neutral Zone
- Union of Soviet Socialist Republics
- Unknown or Invalid Region

I think it's from the framework we use or something. I suppose it is somewhat reassuring that we're prepared if the USSR ever re-emerges or another Gulf War breaks out.

We have a similarly thorough list of possible languages for another dropdown which is used to indicate the language of the things our users create. If SignWriting ever gets absorbed into Unicode, we'll be prepared with our "Sign Language" dropdown option.
Resolved Question: What is the meaning of the Universe?
This kind of comment kind of misses the point. The monadic style of threading error values is perfectly compatible with imperative programming if only language designers knew about it.
What you're missing is that I'm showing how error throwing and error returning are functionally the same, when you have a standard error type, multiple valued return, and an idiom of returning errors you chose not to handle.
and other locations all over the world that could be sold
to a new country

My understanding is that relatively few if any countries will sell federal land. The interesting thing about international waters is that by definition they don't belong to any country.

You can't just ignore idiots and insane leaders. You have
to fight them and you have to win.

But it would arguably have been better for everyone (American and especially Iraqi) in terms of net deaths if we had ignored Saddam Hussein in 2003. I'm not sold on the idea that need to fight with every country that has an idiot or insane leader. If they attack us, sure, but that's now a much smaller set.

But you're assuming that you would end up in the country
that Does The Right Thing

I guess the idea would be more that you would move from the country if it wasn't doing the right thing, in the same way you leave a neighborhood or a job or a little league group if you have evidence that things are really going in the wrong direction. Tongue in cheek: this does presume less of a role for patriotism in one's decisions, but if immigration is unpatriotic then most patriotic Americans are descended from unpatriotic people :)

and that the other countries will leave you alone. What
about the country...

I may not understand why these issues relate to seasteading. Are you arguing that new countries are particularly likely to do such things, more so than old ones? For what it's worth, the way in which new countries have been created over the last few centuries has heavily enriched for founders who started and/or won wars. This would seem to be at least one argument in favor of the concept that seasteading founders would be less militant.

it's just running away and hoping the blast radius on the
explosion you leave behind isn't large enough to hit you

Most of our ancestors left their home countries to come to the US. I think you may be overstating the impact of their emigration on their home countries. Poland did not go supernova because millions of Poles emigrated to the US in search of a better life. The UK didn't burn down when the Puritans left for the US. No?
Get yourself a stubby holder, BOOM!
I attribute that more to having direction. Sometimes when learning things one simply meanders through a field, absorbing knowledge as they find it, and figuring out how to use it.

When you have a concrete goal (I want X to happen), you can (usually!) figure out what you need to learn in order to make X happen.
Python doesn't have defer/panic, but it does have "with" statements which solve this issue in a RAII-like style:

with open('foo') as f:
# do stuff
There's a pretty nice transport app called TripView that replaces the horrible cityrail.info and sydneybuses.info timetabling information.

Available on Android and iPhone it's pretty much mandatory for anyone in Sydney who catches public transport.

http://www.grofsoft.com/tripview.php

Disclaimer: I have no relation with the author, I just think TripView is awesome.
Ad your last Python example - the preferred method of doing resource cleanup in Python is the 'with' mechanism:

with open("x.txt") as f:
#do stuff with f

That's it. Obviously, compared to 'defer', it hides stuff - the actual magic happens in special methods __enter__ and __exit__ of the object passed to 'with'.
One very noteworthy thing from the article: They claim to be able to read back configuration from a otherwise erased device by changing the reference voltage of the read-sense amplifiers "used by the backdoor" (=the undocumented command that allows reading back the supposedly write-only configuration data). (pg15, top paragraph)
I'm not sure how, C doesn't have multiple return values either. I also don't really understand the second part. How is that any worse than the current situation of not checking the error side and reading an undefined (or whatever it is?) value?
From Cray:

The CRAY T94 mainframe is 5 ft wide, 3 ft deep, and 4 ft high (1.5 m x 1 m x 1.5 m). It has a dry weight of 2000 lbs (909 kg).[1]

So only 120 times thicker than an iPhone 5, but 8,000 times more massive.

[1] https://cug.org/5-publications/proceedings_attendee_lists/19...
Python 3.3 is coming with easier porting between 2.x and 3.x
Typical Kiwis. Years behind the Aussies.
Josh Waitzkin (of chess movie fame) wrote this one:

http://www.amazon.com/The-Art-Learning-Journey-Performance/d...
nice, and I would add: set noprocast on in HN (or setup an arduino project to give you an electric shock whenever you are typing comments at 3:31am instead of going to sleep)
In Australia cans and bottles sold in those stores just had 'mate' or 'boss' on them, there were only named ones in supermarkets and stores that had a lot of them horizontally iirc. I presume they did this for precisely that reason.
Coruscating Lucubrations: More Golang adventures
Hmm? It feels like Google's been around forever ... the pre-Google past seems almost mythical...
That link says the local time is "4 AM" .. am? What is AM? :)

Timeanddate gets it right..
> The closest to "objective purpose" that humans can understand is survival.

No, that's not an answer to a question about meaning, it's another unanswered question: "what is the meaning of survival?" Survival is not itself a meaning, it is a means to an end, but it leaves unanswered the question of what end survival serves.

The existence of the universe, and the fact of human survival, are equally uninformative by themselves.

It's circular to answer a question about the universe with the "explanation" that it's about survival.

This is why philosophy isn't either a science or a suitable activity for grownups.
Apple customers use public transport?
Didn't Jobs want Apple to work on a car next?
I never thought I'd get to a time where web browser milestones began to make me feel old.
I think that, except for the pure functional case, code can't be read without running it with a debugger. In imperative and oo there is too much "spooky action from a distance": with global variables, dependency injection or, god forbid, aspect oriented design, things seems to always happen elsewhere. Oh, and the solution to this problem is the same to the "cat -v considered harmful" problem: every program should do one thing and do it correctly, programs should be easy to compose, and interfaces between programs should be easy to inspect.

It is a vicious cycle: if a program source code is bloated, i won't be able to read it and understand it. If I don't understand it, I won't be able to use. Being not able to use it, I will reimplement its functionality in my program. Then, my program becomes bloated.
I love Haskell too, but I always run into problems with distributing my compiled haskell binaries to other systems that don't have a GHC compiler available to them.

For example, if I compile a binary on my Ubuntu machine and SCP it to a server running centOS Linux, the binary just fails to run because of shared lib issues.

Even if you try and compile the binary statically I still run into similar problems.

This is in stark contrast to any Go/D/C/C++ binary which works fine
> The default behavior for an error in a programing language with exceptions is to crash. This gets your program back to a known state (i.e. not running). It's impossible for code to blindly continue when something bad happens.

In Smalltalk, the default behavior for an error is pretty much business as usual, because exception handling is mostly just Smalltalk code running normally. In some Smalltalks, you can override the "top level handler" and ensure that an app never crashes. (An infinitely growing collection will exhaust heap and crash the program that way.)
That's exactly how it sounds.
What keeps a bicycle upright?
For one thing I never said same, I said similar. I think that the evidence strongly supports the notion that the differences between large populations is generally miniscule when compared to the differences within those populations and that if you compare individuals across populations you can find people who are far more similar to each other than they are to the average of their respective populations.

As for my specific claim that the behaviour of attacking as a mob without good information is a common human trait rather than being something peculiar to Chinese culture, I am not saying that it is a universal human trait as there certainly seem to be individuals who do not tend to do this, but I know of no large culture in which this does not happen.

[edit] Also, your example of women and men being inherently different is not as good a one as you may suspect. Hermaphrodites exist and somewhat confuse any attempt at a clear delineation.
Carp Fishing
I quite like Apple's new connector - particularly the new bi-directional insertion. However, I've never had an issue with MicroUSB, inserting or removing. Care to elaborate? I've used them on at least 20 devices, if not more.
I read on the other thread the Cray-1 being caracterized as an important piece of history.

What important computations were made on those machines, i.e., what did they make possible? (Honest question)
The Author set me up big time; I was expecting his 'Orientalism' to presage some kind of reconciliation of his anti-war preconceptions with an understanding of war informed by his time spent teaching cadets.

Anyone else frustrated that he didn't use Che Guevara as an object lesson?

1. We don't want people to kill us. But some do.

2. We want to disarm those people.

3. One way is to kill them, another is to kill their will to fight.

4. Read Che Guevara, why does he fight?

5. Read between the lines, find his weaknesses. What can you use against him?

Warning to cadets: you all have similarities to Che, but you are all similar to him in different ways. Be careful discussing this work with others because the vulnerabilities you see in Che probably also exist in you, and so can also be used to destroy your will to fight.
If it may help, here is a list of world countries in CSV, XML and JSON formats.

https://github.com/mledoze/countries
FriendlyChains
Hello, we've launched a new project http://friendlychains.com. It helps people in solving problems and promoting ideas with a help from their friends.
We noticed, that on many sites/forums/chats it's often hard to get the right answer or you just can't trust it.
We solve this problem by providing users a possibility to ask their friends from several social networks and get answers from them or their friends, which can take part in a discussion by a chain.
We would like to hear from you what you think about it. Join us and share your impressions.
>> when a Left value is accidentally read as a Right one, you don't get a "random" bit pattern due to type punning, but a correct (albeit meaningless) value such as NULL

> How is that any worse than the current situation of not checking the error side and reading an undefined (or whatever it is?) value?

You get deterministic failure modes instead of dragons flying out of your nose.

Also assigning error in a variable ignoring it
sticks out a lot more. The single-return value C
version doesn't tell you if it can return failure or not.

edit: fixed quoting
> Grains is proven to be suboptimal, causing inflammation in the intestines and the rest of the body (http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2821887/).

From the study, it is refined grains that are problematic, while whole grains are recommended:

"In conclusion, whole grain consumption may be related to lower circulating plasma concentrations of PAI-1 and CRP, which in turn could lower the risk of type 2 diabetes and cardiovascular disease. These findings suggest that the protectiveness of whole grains in relation to type 2 diabetes and cardiovascular disease may be due to an effect on plasma inflammatory protein concentrations and reinforces the public health recommendations that whole grains be consumed daily as part of a healthy diet. Refined grain intakes were positively associated with PAI-1 concentrations, indicating that refined grain intake could have proinflammatory effects."
Critical responses to NYT story on datacenter energy waste
What I want to see (and somewhat of a prediction) is for CocaCola to have a campaign where users connect with Facebook, CocaCola collects all of their information - for good purposes of course ;) ...and then print personalized labels with the user's actual Facebook profile pic. They'd know the user's location, so they'd just need to workout how to distribute those bottles to local distributors.

If people are stupid enough to search for a common name on a coke bottle, then they'll go apeshit searching their local retailers for their actual Facebook picture (and those of their friends).

Coke should give me a royalty for this :)
I'm very scientifically bent, but yeah, nutrition science seems to amount to roughly superstition at this point. A little bit of knowledge combined with an ironclad belief in rationality is a dangerous thing - our gut instinct seems to work much better in this case. Unfortunately, the FDA can't admit that they have no idea how things work.
> Error codes that need checking and aborting by hand at every function call boundary are a poor fit for replacing exceptions, because they optimize for the case where the error can be handled, rather than the usual case for exceptions, where the error cannot be handled.

From what I understand, the Go language team wanted to write robust servers, thus they wanted to "optimize for the case where the error can be handled."
Wasn't the country Russia still Russia, just within the Union?
Linking to cultofmac with this sensationalized headline? For a moment I thought I was on reddit instead of hn.

http://daringfireball.net/linked/2008/10/21/cult-of-mac
I've always said we won't create the first strong AI, we'll just wake it up.

I hope its friendly. The selection pressures we're putting on its ancestors (to systematically weed out the people who aren't valuable to us) aren't instilling me with a great deal of confidence.
Juggling, guitarr playing, programming, sailing, backpacking, trekking and african drumming.
> Meanwhile, 3/4 of the land area is plastered with low-density bungalows and low-rise apartment buildings -- and that's never going to change. San Francisco is zoned like a beachside village.

True. Shockingly retarded, but true.
Wait, I thought the anti-poaching agreements are no longer in effect, per the Department of Justice's request in 2010?
http://mashable.com/2010/09/24/doj-anticompetitive-employee-...