skysight-inc/HackerNews huggingface dataset:
lost your object? rehash to the rescue!

jruby-1.6.8 :068 > h = {}
=> {}
jruby-1.6.8 :069 > l = [1, 2]
=> [1, 2]
jruby-1.6.8 :071 > h[l] = 1
=> 1
jruby-1.6.8 :072 > h[l]
=> 1
jruby-1.6.8 :073 > h[l] = 3
=> 3
jruby-1.6.8 :074 > h[l]
=> 3
jruby-1.6.8 :075 > l[1] = 3
=> 3
jruby-1.6.8 :076 > h[l]
=> nil
jruby-1.6.8 :077 > h.rehash
=> {[1, 3]=>3}
jruby-1.6.8 :078 > h[l]
=> 3

see http://www.ruby-doc.org/core-1.9.3/Hash.html#method-i-rehash :

Rebuilds the hash based on the current hash values for each key. If values
of key objects have changed since they were inserted, this method will
reindex hsh.

On one side I must admit that the behavior is a bit surprising I haven't ever encountered in the wild. It's not that easy to get hold of a hash key at a random point in the code where you don't know that it is a hash key.
> One. It is a very serious mistake to deny someone the right to believe the correctness of their own opinions.

This becomes very tricky when you have the power to enforce your opinions on other people.

I think that knowing the letter of the law is not enough and people who work as judges or prosecutors should also have profound sense of justice - without it, any law can be twisted and tortured into unjust persecution when there is a will. Even the best humanly possible law is not immune to that. It's always easy to find a stick when you really want to beat the dog.

The way I see it, if Cameron Ortiz were to prosecute herself the same way she apparently prosecuted others, she would be facing death penalty right now. But I'm sure she would be offered some 'acceptable' deal.
Meh, orange do the same.

I was at a music festival last summer and wanted to lookup the program on the festival website to see what was on in the afternoon. Blocked as adult content. They block all sorts of weird stuff.

I have no qualms about requesting 'adult content' when 'adult content' includes political satire and festival websites. It renders the whole idea of people being shamed into not requesting 'porn' access moot, because everyone knows it's really not just porn, it's all sorts of content someone has arbitrarily added to a list.

These are good examples to bring up when someone makes the (dumb) suggestion that we should all have mandatory or opt-out blocking on our home connections.

The end of my little story is that to find out what bands were on that afternoon, I had to install Tor (orbot).
It's not correct to label this "The Problem with Kickstarter".

It's a rant about how complicated it is to finish hardware projects.

Kickstarter does movies (I didn't know that, I learned it here in the Kickstarter 2012 retrospective), lots of software, comics, publishing, etc.

So please rename to: "The problem with Kickstarter hardware projects" or something.

Kickstarter needs praise and applause because it is great and bringing joy to many backers and founders. Not criticism because one type of project have a 75% failure rate.
I think £6 is more than reasonable.
Blockbuster goes into administration
For some naive reason I never thought someone would get a life sentence for spying on one of their closest allies.
Next Made-in-China Boom: College Graduates
Thank you. I'll correct that.
thanks for the explanation Dmitri - enjoyed the past meetings - see you at the Boys school end of the month
For the same reason private methods are called private, even though you can still access them with `send`. Ruby does not allow one programmer to handcuff another; it only allows you to put up warning signs. "I don't expect you to redefine this reference, and you shouldn't depend on the stability of this internal method."
I think giving geeks a quiet space to work in with little distractions is the most important aspect.

Most companies fail at doing this though, usually offices are geared towards the extrovert, so huge sprawling open plan desks with people coming/going all the time.

An ideal solution would be everyone gets their own office, a practical solution would be to provide laptops and allow remote working or the option to work anywhere in the building with carefully designed areas to that are quiet and comfortable.

Most corporates don't understand this though and just put everyone on a desk/cubicle in a huge room with 80 others and blindly hope some productivity will happen
PunditTracker: Bringing Accountability to the Prediction Industry
An interesting side-effect of "cloud browsers" (browsers that proxy your traffic through their servers and compress the data on the mobile data end) like Opera Mini and Amazon Silk is they completely bypass these filters.
> Its just that geeks are more likely to stand up to a manager (They respect ideas, not authority)

How much of this is inherit in "geeks" and how much is just because we're lucky enough to be in one of the strongest job markets around? Many people would be ecstatic to have the problem of recruiter spam.
Everyone who is moderately well read knows this is not a problem, see http://en.wikipedia.org/wiki/Autoignition_temperature
The secret behind inspiring designers to make beloved gadgets
Most likely not unless the user compiles it (or finds it on somewhere like xda-developers from someone else who compiled) and flashes it. The problem with that though is if Android updates break compatibility with any of the proprietary drivers it may come with in the future. The device could also be made by one of those shady OEMs that don't comply with releasing the kernel source under GPL. Either one of those things happening just made compiling the latest version of Android much much harder as well as certain components not working or having full functionality.

Even with that though, the kernel not getting updates and continued patches makes it harder to keep things built for an end user, but I'm not sure if that is so much of an issue past the Linux 2.x to 3.0 jump with Android devices.

Updates for anything Android outside of Nexus devices that Google maintains are generally far from automatic or dependable.
It's incredibly accurate.

"In 2011, 96% of Google's revenue was derived from its advertising programs. For the 2006 fiscal year, the company reported $10.492 billion in total advertising revenues and only $112 million in licensing and other revenues."
The only time I've "needed" to do it is at places that limit their wifi connection times.

For example, the Panera Breads in my area all limit their connection times to 30 minutes during lunchtime. If you spoof your MAC address every 30 minutes, you can keep going.
ReactiveMongo Roadmap: The Non-Blocking Scala Driver for Mongo on its way to 1.0
Unregulated Fracking Operations :)
She forgot to say "allegedly".
Case is "Recycled pressed cardboard with high-grade aluminum", so I'm guessing the paper is just on the outside of the real case.
You sure about that? I'm willing to bet the Samsung Chromebox outsells this several times over.
Boring in terms of routine is not bad. Routine frees your mind for the important things.

Boring can be bad, though. Maybe I would like to do $INTERESTING, but the boring things do not leave enough time. Sure, the common answer is to "make free time in small steps". Nevertheless, family and sickness can eat up all the free time, so you are happy when you get some sleep.
It's certainly reasonable to admit that you lack the time and/or expertise to evaluate a piece of software, but I don't understand how you translate that into a justification for obvious FUD like "their installers install more like a malware than like clean projects."
Yes, trusting binaries is a little scary. But for open source projects like Firefox, you should be able to compile a bit-identical release to what Mozilla provides.

With Chrome, that isn't possible. It is based on Chromium, but includes non-open source code, and so you cannot immediately build it.

However, in the end, they're just executables. Looking at assembly isn't quite the same as looking at source code, but we could examine the additional components and try to identify any malicious parts. At least in theory -- the work involved would be quite big.
Cardboard's ignition point is above 400C. Computer components don't do well running above 80C. Something would have to go horribly wrong for a computer to ignite cardboard. Cardboard just seems easy to ignite because it's commonly burned with a butane lighter that burns at over 400C as well.
They're a no-tether operator aren't they?

I don't often tether but I do like the ability to do it.
There are lots of people worse off. Doesn't me good-off individuals shouldn't try to improve their lives.
Fracking scares me. Watched the movie Gasland, makes me depressed.
Is this block only for PAYG users? There doesn't seem to be any block on my 3UK Pay Monthly deal.
Being rejected by Kickstarter doesn't make Kickstarter the problem.
Facebook Graph Search: Not a giant-killer, nor should it be
Can vegans stomach the unpalatable truth about quinoa?
jQuery UI Bootstrap Theme - Bootstrap v2.X's Theme For jQuery UI
Allow me to disagree. While I myself use Ubuntu as my main desktop PC, I can totally see how Android makes more sense for a lot of customers.

Don't forget who this is aimed for. Alas, Ubuntu is still mostly for folks above some level of computer proficiency. Android, on the other hand, is probably one of the most "familiar" experiences for people using smartphones, and the (huge) amount of applications is easily accessible through the Play store with lots of reviews and hence high quality. You just don't get that for Ubuntu.
I am I can assure you, but when an option comes calling, I certainly will not turn it down.
Voice activated Lego Mindstorm concept to help quadriplegics
Microsoft App Store for Mac
Show HN:  Discretio - GPL'd secure VOIP (Limited beta test accounts available)
It's just another tool.. If you're comfortable with PuTTY keep using it, nobody is stopping you.

I believe having another option could be handy.
I'm saddened by the recent shift of HN discussions to Reddit-isms. For Reddit, we have Reddit. Please, stop wasting others' time.
How a Football Manager Game Can Help You Develop Real Career Skills
every day drillers in North Dakota burn off enough gas to heat half a million homes

Oh that will end well. We should definitely let them drill in the arctic.

And note how it's not reducing the cost of gas, it's massively profitable because gas prices are so high. [1]

So all those "drill baby drill" chants, well there you have it. Prices as high as ever and destroy the environment as a bonus.

Let taxpayers pay to clean it up in a decade after they've burnt out the state, simply dissolve the corporation so there is no responsibility, just like the toxic ash piles the coal industry leaves behind.

1. http://i.imgur.com/FFof4.png
Did he actually distribute anything?
Shouldn't it be forced to store gas for future use instead if burning it? Underground storage wouldn't be that expensive and we will probably need that gas at profitable prices in the next 20 years.
Yeah, no more crazy law and no bargaining on future lives.
I've looked to buy land in the past and it always said the purchase doesn't include mineral rights. That always seemed pretty sucky to me.
"He broke the law"

The prosecutor's case was pretty tenuous. Basically, by accessing a network that intentionally has no real access control in an unusual way, and accessing JSTOR in an unusual way through that network -- a network for which a JSTOR subscription is available -- Aaron supposedly committed a crime (or was it 13 crimes? Or 4 crimes?). Unless you want to make the argument that doing strange things is criminal, it is hard to see how exactly any law was broken here.

"If you seriously think that he shouldn't be charged with breaking the law because 'he didn't deserve it', 'he did not have malicious intentions' or 'the law is dumb', then by extension no one should be convicted of any crime, because there will always be some point of view where you could think that of anyone."

If you think every violation of the law should be prosecuted, prepare yourself for some jail time; it is a near certainty that you have committed at least one felony offense in your life, and it is likely that you have committed more. Can you seriously claim not to be a criminal -- have you actually read all laws that you are expected to follow?

This conservative "the law is right and absolute" perspective is truly scary. Laws are passed by people, and are often severely flawed. Laws are often misapplied -- laws meant to protect banks and the government from hackers are applied to people who download too much knowledge, laws meant to protect children from pedophiles are applied to comic book collectors, etc. The far-right law-and-order attitude is the reason America is the world leader in both arresting people and imprisoning them -- not just per-capita, but on raw numbers, we arrest and imprison more people than China, and that even accounts for the recent decline in the prison population.
It doesn't change the fact that Aaron was not convicted of breaking the law. Being charged with a crime does not make you a criminal.
>And worse, the `?` postfix in Ruby normally means the method returns an actual boolean, not a "boolean context"

That's not true. Predicates methods returns Truthy or Falsey values. Not necessarily booleans. See http://blog.leshill.org/blog/2012/03/25/a-question-of-truth....
The average, or even more-complex-than-average, alternative language. He's right, the grammar is a complete pig.
Correct me if I'm wrong, but I don't see the ability to delete a vsee account on their website either.

EDIT: And it doesn't even have a linux client either. Really?
FAIL.
i wonder how this relates to the numbers behind the peak oil predictions?

but, i agree completely that simply burning off excess is amazingly shortsighted and stupid. they could use the natural gas to power their own operations, right there. or just the AC for the workers. have their fleet of vehicles run on it.

it's the same with refineries, driving by you always see the large torches blazing. why not use this energy for something?
"Mutable objects have a hash method and can go in Hashes. Why!"

This is indeed terrible. It is broken beyond repair and it's probably because they thought Java doing something similar with their hashcode() method was "smart".

It is not that mutability is "evil". It is that contracts provided by the language / APIs on top of mutability definitely is evil, because it's impossible to obey / respect the contracts.

It is probably one of the biggest source of hard-to-find / hard-to-reproduce / hard-to-debug bugs.

The problem goes way further than that in Java that said: the very presence of "hashcode()" and "equals()" at the very top of the hierarchy (in the Object class) is fundamentally broken. Even if you are using immutable objects in Java, you are still deeply fcked if your classes are non-final. Even if you classes are* only allowing to create immutable objects and are final, you are still deeply fcked if you use composition.

Because it is impossible* to extend a class (or use composition) and satisfy the hashcode/equals contract.

This was explained in "Effective Java" back in the days.

Now it may even be possible that this very equals/hashcode/mutability SNAFU is, unconsciously for a lot people, at the heart of the current backlash and hatred towards mutability.

The fact that it is so broken (and provably broken: the contracts CANNOT, as in RFC2119, be respected) may be the reason while functional programming is making a comeback.

It certainly is for me and I'm not looking back.
This is we like the selfstarter model. Backers don't get charged until the product is ready. And project creators are incentivised to use efficient techniques that get their product to market quickly.

There are flaws with this too, which I touched upon in the post. I think this is an opportunity.
"Doing her job and obeying the law" is not an excuse. "Doing her job" would have been to tell MIT (or whoever was responsible for this affair to end up on her desk) to go away. Even though I am aware that's not how becoming a "career prosecutor" in the US justice system works.

Remains the fact that none of the bright minds that congregate under news.ycombinator.com seems to have the slightest idea how "attacking the laws" is supposed to work. Apart from maybe a vague theory of erosion that appears far less convincing than pretty much anything most people here would dare to argue in the context of, say, a business plan.
It doesn't help either that Apple markets itself as premium quality hardware rather than cheap junk. If you were buying cheap chinese knock-offs, you wouldn't gain much sympathy when they didn't honour the two-year minimum, but when you buy 'the premium brand', it's a different story.
I hate labels like these.

Why can't I be a developer? Does the author have such endearing terms for people in sales or marketing?
In London you almost always have a set of meetings in the same interest groups to choose from - particularly popular: last Wednesdays, Thursdays of the month.
Secret Nuclear Redesign Will Keep U.S. Subs Running Silently for 50 Years
Or his actions could have spread the wealth of information to many who lack access to it, facilitating further progress.

The notion that publicly funded research works are behind paywalls is absurd.

In any case, we will never know, because he never got around to actually distributing or doing anything with the downloaded products of public funding.
I was speaking to one of the Sweet.js developers about this, and apparently the only obstacle is that Sweet.js doesn't have the ability to make whitespace significant. Other than that, it should be entirely possible.
>Attacking a single prosecutor who was doing her job and obeying the law won't change anything.

I disagree, if Ortiz was looking for a future in politics, she's finished. At the very least, she'll have to change her party affiliation. This is a good thing. Otherwise she could've possibly carried on at a higher level.

Although the various public reactions have yet to make any change in law; recent events may discourage similar prosecutions, at least in the near term. Also, a good thing.
Pretty much every Android device I have encountered phone or tablet wise could at least chroot and allow the user to partition off and install some other version of Linux along side Android. So, though it comes with Android, you could probably get Debian, Fedora or whatever running on there as well.
Yeah, my comment is really more aimed at the schools that are teaching language design as if it was 1971.

And you can always get a copy of TAPL,

Types and Programming Languages
Benjamin C. Pierce
February 1, 2002
ISBN-10: 0262162091

---

And there's a typo above, Nilsson should be "Nielson", as in:

"Flemming Nielson and Hanne Riis Nielson.
Two-Level Functional Languages.
Cambridge University Press, 1992.

The Pfenning paper I was thinking of was the S4 stuff:

A Modal Analysis of Staged Computation
Rowan Davies and Frank Pfenning, 1996
Stop deflecting. Ruby is a piece of shit next to Java.
As a foreigner (French) I'm surprised that Americans apparently don't get that mixing a career in politic with a career in justice is the open door to abuse, demagogy or conflicts of interests. This should not be allowed or even possible.
Maybe its just me, but I always see people who claim their profession needs more respect don't have a good understanding of _others_ professions. I will tell you now from my perspective designers do amazing things and I have a very high level of respect for what they do. I can't do it, my designs suck. In the same way designers I work with tell me what I do is amazing. I don't think what I do is amazing ,and I get the vibe they have the same feeling towards their profession. When someone starts complaining that they don't get enough credit or respect for what their doing it tells me they think they are awesome and better then everyone else and somehow they need more acknowledgement for their work then the rest of the disciplines that go into making a functioning product.
This project took 2 years for me to accomplish. I'm pretty excited to share the results. Thanks for looking!
This public library installed Raspbian on it and uses it as a catalogue terminal...
http://apc.io/blog/2012/11/26/white-plains-public-library-cr...
Speaking of mineral rights, if say a barn is right over where the company needs to drill, will the pay the farmer for the barn?
Hitler talking about Twitter API strategy
The docket suggests that 300,000 of those files were out of copyright. He downloaded over 4 million, didn't he?

The prosecution did in fact offer evidence that Aaron knew he was trespassing. The closet didn't have a sign, but the building had many.
what about defined_as

(i agree that within ruby's conventions (weak typing) defined? is not that bad)
see http://news.ycombinator.com/item?id=5072183 for comments by the organizers on the charge
"My favourite weird Ruby thing (is on the list, anyway) is that CONSTANTS can be changed..."

That and relying on hashes made from mutable thing...

Taking a note to never ever try Ruby
It's all part of AR-10/15 design, which has one very big issue, gas is injected directly into the receiver (not where you want cruft), but also some big virtues: fewer moving parts and potentially lighter in weight overall, inherently the most accurate semi-auto design (much less is moving before the bullet exits the barrel, and it's all behind the barrel, not parallel with it), and the front is lightweight since the center of gravity is moved backwards compared to piston designs.

I'm told AR-15 pattern rifles rule in 3 gun competitions (pistol, shotgun, and rifle/carbine) because of the weight distribution, which of course also is a virtue in close quarters combat/battle (CQB).

I can't remember this feature in any other designs, but there are very possibly some ones that I'm not interested in and haven't learned the details of. Almost every other design puts a piston forward, which naturally incorporates the recoil spring. There's also the roller locking recoil designs, the ones that I'm familiar with (G3/HK 91, StG 57) have their piston forward as well, although that's not strictly required by the mechanism.
for those of you who missed it yesterday on HN

http://en.wikipedia.org/wiki/If-by-whiskey
There is some such thing - that page lists an EU-mandated free warranty period of two years for some defects.
As damage control goes, Ortiz's statement is inadequate. There is a well-supported petition calling her out by name to be fired. There are major media outlets openly questioning not only her actions, but the fitness of the entire Justice Department to act appropriately. Not one or two media outlets, but dozens. The situation seems very serious indeed. This is the bloodless, half-assed kind of statement she makes in response? I don't get it.
Enterprise Software Lessons: Forget About Virality and Focus on Network Effects
>First, because many people will be unaware that this kind of "mature content" censorship is taking place at all, and therefore won't ask for it to be stopped.

You get a huge interstitial page telling you that the site is being blocked and telling you what you need to do to have it turned off.

I agree that the block should be off by default. Sellers could ask the customer if they wanted the block turned on when the phone is bought. I agree that the blocks are too broad.

T-Mobile didn't ask for any ID. I guess I'm pretty obviously over 18. They did ask for my name and address.
US Incarceration Rates Are Out of Control
The Reluctant Dictator
Good list. There is some more great tips at http://stackoverflow.com/questions/155964/what-are-best-prac... .
So when are you starting your manned space program?
Pixelapse: Github for Designers
In this case Ortiz "I'm just following orders" warrants a reference to Nuremberg. It's insightful to realise that things can get badly out of hand, even if you follow the letter of the law. Aaron's case proves the point.