skysight-inc/HackerNews huggingface dataset:
I agree with all your arguments. The function pointer <-> void pointer conversion in particular is an excellent example. But the very last example, unsigned -> signed conversion, is not a good illustration of the point you are making then.

unsigned -> signed conversion is already “implementation-defined behavior” (as opposed to “undefined behavior”). The standard does not guarantee how it behaves but forces compilers to make a choice and to stick to it.

A different example, of a behavior that is really undefined, would be signed arithmetic overflow:

int detect_max(int x)
{
return x+1 < x;
}

The function above branchlessly detects that its argument is INT_MAX, and returns 1 in this case thanks to 2's complement representation.

Except that it doesn't. The command “gcc -O2” compiles it into “return 0;”. GCC can do this, because signed arithmetic overflow is undefined behavior. The compiler is only taking advantage of undefined behavior in a way locally convenient.

Now that two's complement is (almost) everywhere, making it the standard for signed arithmetic overflows is the sort of bold choice I would like to see, but it won't happen (it would break GCC's existing optimization).
Stavrosk,

If what you want is to only classify the stories in the front page and classify them based on a preset of categories, that's actually pretty simple to do.

I been working on a similar concept for personal project. Here are my recommendations:

- Be sure to remove stopwords from the titles before using the classifier.
- The ankusa gem will help you greatly https://github.com/bmuller/ankusa

Ankusa is a naive bayesian text classifier that will come really handy for the task you are trying to achieve.

Also make sure your training data sets are pretty clean and with little overlapping as possible.

Finally have fun and let us knows how it goes!!

Cheers and let me know if you have more questions or if you want a hand coding this thing.
Only a small fraction of Googlers work on ads optimization. The money made from ads allows the vast majority of the rest to go work on other problems.
But we all can't work there. Not only are there not enough jobs at That One Company That's Changing The World, someone needs to provide the tools and services the business is built on; all the ancillary things that allow Us to make progress (computers, operating systems ... vehicles and their fuel ... food for the humans ... waste receptacles and their sanitation ... etc)

How am I changing the world? A) By educating a future generation (my own children) in the ways of the world, by supporting their dreams and showing them how the world must function so they can realize their dreams; and B) by working for a company that provides services to its customers to use to make their employees more productive to grease the wheels of innovation and creativity so their own lives are enriched and their own dreams (and their children's dreams) can be realized.
Essentially he's asking why person-hours are expended on things that make the most money rather than things that are important, for some definition of important.

There are several answers to that.

1. The most obvious is that people need to make a living. People can and do work at some discount in order to work on things they think are important, but it rarely stretches as much as 10x. I expect most workers either don't care or can't afford to.

2. A lot of people do work for nonprofits (the biggest of which is the government), but the number of such jobs is constrained by the amount of money nonprofits can raise.

3. The number of people employed on frivolous things seems larger than it is, because e.g. things designed for entertainment are by their nature more visible than infrastructure. So it is dangerous to draw conclusions based on anecdotal evidence.
I'm typing this reply on an X230 right now. There were some really annoying issues with Fedora 17 and Ubuntu 12.04; the iwlwifi driver would lock up and bring the machine down with it randomly under Fedora, and the Linux 3.2 kernel from Ubuntu would just randomly hard-lock for no discernible reason. After upgrading to Ubuntu 12.10, though, everything seems to be really solid. I haven't had any random kernel crashes or lockups since the upgrade.

The keyboard, though, is flawless. I like it a LOT better than the Apple keyboards - I'd been using various different MacBooks for the past few years, including pretty much every model of Air, 13" and 15" Pro. The X230 keyboard is way better. I can't compare with the keyboard on the X220 since I don't have one, but I certainly have no complaints. (I wish there were a laptop with Cherry keyswitches, or buckling springs, but apparently nobody else thinks it would be worth the massive cost increase.)
Isn't the treatment paid by the patients?
I love Feynman, but these aren't that good.
They didn't "save" anything by "Paying into the system". They directly supported retirees of the past, as today's workers support them now.

Don't put priorities in my mouth.
They might be overestimating the capabilities of the 65+ crowd. A lot of them aren't capable of working. I used to work in a call center where I talked to AARP members, and a lot of them aren't even capable of leaving the house. I know this because they told me. You may not have been aware of this because they don't talk to anybody but call center workers.

I don't have the numbers but I'll bet there are more people whose working days are behind them at that age than most people think, because those people don't get out much, or at all.

Of those who can still work, they are probably a lot who are good for a few shifts a week but couldn't work a full time job with benefits and a living wage.
Apparently all of society needs to be devoted to fixing diabetes before we do anything else. Meh. This article kinda sucks, as does the sentiment behind it.
>Just because he's drunk and in a saloon doesn't mean he's wrong, just boorish.

Just out of curiosity, can you identify the actual point in time when you came to believe that self-awareness of bad behavior makes that bad behavior acceptable?
I spent last night looking at Elixir and I really like it (at least as far as I could see in one evening).

I like Erlang and I wouldn't say Elixir is there to replace it. I see a use of Elixir for scripting or creating DSL. Also it gets a huge bonus by running on BEAM. As far as internal design (and I am speaking as an amateur here), BEAM is far superior to JVM from the reliability and concurrency point of view. So having Elixir around is helping Erlang team, kind of like many see Scala and Clojure as a way to make the Java ecosystem appealing and exciting again.
So Sweden is ranked as the "most innovative" country, with the USA coming in seventh. Switzerland and Singapore beat the US also.

Yet I can't think of a single innovation I've seen from them. Good governments, great fashion, cheap furniture, sure. But what is the innovation they speak of?

Fwiw, Iceland was number one last year. Was it for their constitution?

My point is that I don't think you really have to look into history for "when American was dominant in innovation". (And this is coming from a major cynic of current affairs in the US!)
I never got that impression from that comic. It's not funny because some people are idiots, it's funny because it's revealing a language barrier. The punchline is about typing discipline wars, not about camp B's fragile ego.
This is an important point that people often misunderstand in internet arguments. Attacking or insulting someone is probably not a good idea in general, but it doesn't constitute an "ad hominem" and doesn't affect the rest of the argument presented unless it's being argued that the other person is wrong because e.g. they smell bad. If it's just mentioned that they smell bad and they're wrong for other reasons, it's not that fallacy.
As much as I agree that it can be a pain to edit a document or watch a video or, god forbid, write a computer program on a netbook, I can't help but feel that it would be more difficult on an iPod Shuffle.
What does bloodsugar management entail though? Just mapping/graphing bloodsugar measurements vs. insulin injections? Is the missing piece the ability to take into account foods eaten, body mass, etc?
Is this not unlike one yelling at a toy maker for not using his clever engineering to create "more useful" products?
I'm sure the toy maker would tell you that making a child smile is as useful and satisfying as a product can be.
you don't need a degree in physics chemistry or biology to do great things.

And you don't need to be at google, to be qualified as a great mind. But people may not call you that then.

So what
Why the Moon Landings Could Have Never EVER Been Faked: The Definitive Proof
"History will judge us very harshly for what we have all allowed to happen in north korea."

History isn't judging "us" harshly for Rwanda, Somalia, etc, so I doubt it will judge "us" harshly for the DPRK. It will likely judge those directly responsible, however, for example the army of the DPRK.

The reason is that they they are keeping their population in a developmental limbo that benefits no one except the the elite.
I don't see the error he's making, would you mind pointing it out?
Note: legally I cant "launch" these because I am just some guy but if you would like to see full working versions or my entire portfolio please email me. email is on profile.

[edit] "Why can't you launch them as some guy? I see people giving diet advice all the time"

I am dealing with medical records not just diet recommendations, I take this very seriously and refuse to take a cavalier attitude toward the health and medical information of other people.
Whether or not people should use static typing is not really a question for type theory, but a question of human factors and target area. Programming languages address a range of needs: collaboration or maintenance, performance, ease of expression in problem domain, cost of error, etc.

Programming languages sit at the mind/machine interface, I don't think it is very useful to evaluate them solely from a PLT standpoint.
You really misunderstand the role of HTTPS in the composition of a secure web page, namely securing the components from MITM against any of the active components which could result in a compromise of the entire page rendering. I have zero faith in the security of your solution if you don't or can't understand this.
Yup I specifically mentioned that this was only an issue with older kernels.

Regarding the keyboard I'd happily take a 10th gen (or however many iterations Lenovo/IBM has done on their keyboards) over their 1st gen chiclet-style. Might be just as good, might be better or might be worse, I'll gladly go with the thing that has a load more reviews and also received many awards being cited the "industry gold standard".
Yelling at a television in a saloon may or may not be acceptable, I suspect it depends on the saloon. Self-awareness has nothing to do with it. Now if you're trying to suggest that it is unacceptable for me to voice opinions on a blog, we need to talk.

I invite you to criticize my words. If your intent is to criticize my speaking my words, I defy you.
Very easy for all but MATTEL. For MATTEL I went with the one which was kerned better, and no surprise, it was Helvetica!
Right. Cutting off the level of support for "old" people doesn't mean cutting off support for a 65. For example, why isn't social security structured as a 20 year term (the distance from 65 to average expectancy) , to be claimed whenever someone decides to retire?
And yet, the story about them in Surely You're Joking is so charming.
This sounds like a counter-surveillance technique.

If you're an island nation with one cable for all your traffic you are very susceptible to a variety of state actor attacks: traffic analysis, mitm, protocol downgrades etc.

If your traffic goes out one way and back in via a totally divergent link these kinds of techniques become significantly harder to pull off and much easier to detect their use.

Passive undersea fiber monitoring is well within the means of more than a few intelligence operations and quite popular. They're in international water, unguarded, unrealistic to regularly inspect and they can be modified to leak just enough light to see every bit while being pretty difficult to detect.

A cable strung between Venezuela and Cuba would be impossible to resist for anyone in the region with a highly advanced signals intelligence program and spent 40+ years defined by communism/socialism as public enemy number one.

A year delay in lighting at all suggests to me very strongly that they had direct evidence or strong indicators that their cable had been split/bent or their DWDM repeaters / inline terminals or other equipment came into question - most of it is made by companies pretty cozy with large state actors.

After traffic snooping your second big intelligence concern these days is data exfiltration. The classic radio bug is way more trouble and effort than malware mics & cams, keyloggers and mobile phones. Even more popular is just files - grab it all and see whats good. Mostly that's very hard to catch leaving the country because there are so many paths and the data volume is so large.

But if you've previously built a monitoring system for your only route out, and it's slow enough you can do a credible job of traffic analysis then you're probably loathe to give up on it. In comparison, the kind of gear needed to do DPI, anomaly detection, key weakening etc. at a 100G+ is very pricey and probably covered by export bans anyway.

Asymmetric internet works pretty well anyway. Most commercial service is tuned that way because thats what the use looks like, way more in than out. Sat latency ain't a ball of joy but for bulk data and web pages it's probably pretty decent service especially when compared to what it's replacing.
Funnily enough, this is exactly why I gave up on software development and went to study a degree in the biosciences.

Ten years of fixing crappy websites, writing dull database interfaces, troubleshooting bugs in shit code written by people who didn't give a damn -- and for what purpose? The paycheck was good but money is not everything. It felt like such a colossal waste of life.

My mind is my best asset - I want to apply it to something that will actually make a difference and help people. And it isn't going to happen in software or IT.

Anyway, I'm well on my way to working in biomedical research as a career, so this has really paid off. Already interned in a lab for a while and it was amazing, just the feeling of finding out something new and real, even if it takes months, is such a rush. The previous software experience came in very useful too.
All of the PhDs working on machine-learning and self-driving cars at Google are ADHD kids rushing for cash. Good to know...
The trackpoint is also amazing, and I know exactly what you mean. I have never really been able to use trackpads so have always stayed near laptops that have trackpoints.

The X1 carbon is the first laptop where I enjoy using the trackpad. It is odd for me too. I still often use the trackpoint, but for scrolling around web pages I often end up using the trackpad (sometimes with the trackpoint buttons which are right above it).

Toshiba and Thinkpad seem to be the only vendors that seem to still include trackpoints.
Who made the promise? I promise you a million dollars, to be paid by some dude who hasn't been born yet.
Yes, thanks for pointing out the fully rugged CF-31. Have an upvote.
Thanks for your answer! What I'm thinking of making is basically separating posts into two categories, things that interest me and things that don't. Then, I want to receive emails at intervals I specify. This is so I no longer have the urge to check HN frequently, but still stay up t date.

The actual classification is probably the easy part, the hard part is training the model, which is why I wanted to ask if anyone had done it before. Have you managed to train anything to recognize your tastes, or is it objective categories? How well does it work?
When the US was dominant, was it truly because of the quality of output, or because of an advantage of not being leveled by WWII?
Is there a way to detect it dynamically, e.g. by running C code under a debug mode or in an interpreter that errors out when undefined behavior is encountered? I've occasionally wanted to have something like that to use in tests, so I could ensure that at least my common code paths aren't relying on undefined behavior. I know about gcc's -ftrapv and a few other options, but nothing comprehensive.
And yet, if Google didn't make money, we wouldn't have such a great search engine to use. Think about how much Google has helped scientific research, both for academics and ordinary people.

Clicking ads is literally what supports Google.
I wonder if the drought and dryness is causing the Flu Epidemic in the USA this year.

A lot of time and money is lost in dealing with the flu each year. So if the owners of big buildings, public spaces, & mass transit installed humidifiers to combat the flu, I wonder how much of a difference would it make...
We also don't need the government telling adults what kinds of contractual agreements they can or can't enter into. "Caveat Emptor" and all that. People are, at the end of the day, responsible for the outcome of their own actions. Interestingly enough, this is still true even if we DO have a nanny state and an FDA and all the accompanying B.S.

Spin the FDA off as a non government agency, with no force of law behind it, let it create a voluntary approval process (something akin to the UL process for approving home electrical devices, for example) and let it be.
I would challenge that... Julian Assange has faced a lot more isolation, much larger potential charges... And still lives...
It must be a "Valley" thing (and the associated cost of living), because depend on one's location, 100k would be a good figure for a project manager. Someone straight out of school? Not a chance.
Why to fuck do you think that overweight people are the real problem, I would think endless wars and poverty and living on this planet without destroying it would be real problems.

I agree that masses of people are working on ridiculous problems, it is like those people in wall street working on how to squeeze out few pennies more during a trade. In part, it is because we live in capitalism and money is only measure of success, so if you make 40K and i make 60K, I am better then you and 150% better to be precise :).

Plus, these other problems are really hard and if you start tackling them you really stir up things.

I believe Elon Musk is, for example, a guy who is trying to work on real problems.
Now you are talking like a communist. The robots will earn money for the owners of the capital that invested in their construction. You can work in the shale fields scrubbing motor oil out of rocks until you die of lung cancer.
> "That said, Mega's also claims that their service saves room on its over-burdened servers by keeping a single copy of identical files How do they do that if they don't know their users' password? Good question. We don't know the answer."

Can anyone shed some light on how this might be possible, given the files are encrypted?
Playing Go with Clojure (video)
I do think a lot of good minds are being wasted on pretty meaningless endeavors - simply to make investors happy. But that is capitalism in a nutshell. Money talks, everything else walks. Don't get me wrong, I'm not bashing capitalism, everything has it's pros and cons. That said, I personally feel that only certain aspects of medicine are a good investment.

OTOH, just because you don't have a career in a basic science doesn't mean you can't change the world. IMO, the biggest challenges facing us are in the field of computer science and computer/electrical engineering.

We need to make computers more efficient and we need to find a way to power the future expansion of data centers around the globe. Less than half of the world's population is taking part in the information economy, and already our data centers are using about 2% of the electrical supply. And all we are doing with those is Siri, Maps, and facebook.

If we want our cloud computing resources to do the heavy lifting in the future, we are going to need massive amounts of computing power and a way to supply electricity to that.
The basics of a well reviewed cipher do not apply to a random experimental cypher you've chosen instead. Why would you not use AES? It's the best understood cipher in the world right now. "more than safe" just doesn't make sense. Please read all of parent's posts in this thread and do not use their product.
This is true on a computer, but on a mobile device I suspect you're in the extreme minority; typing an app's name on an onscreen keyboard is an order of magnitude or two more complex than tapping its icon after a swipe or two, especially when familiar with the layout.
i was at microsoft at the time, and i can confirm this was done inside microsoft by one of it's marketing teams.

i don't remember which team now, but it was shown at one of the company meetings.
You could, but that comes at a cost. That's why libraries like the STL in C++ provide std::vector::operator[] and std::vector::at() - so the user can freely choose whether to pay the extra cost for the bounds check, or not. That's why C provides both malloc() and calloc() - so the user can freely choose whether memory is zero-initialized, or not.

One of the major design decisions for C/C++ is that you don't pay for what you don't use. This is what makes them so flexible and performant across a wide range of systems and applications, but also leaves these safety choices up to the user. Some languages make that tradeoff, but it's not always the right decision.
Is that really true? I imagine a world in which people never drove to see friends or acquaintances would be a world with fewer fatal car crashes, but I don't think it's a world I would prefer to the one I live in.
> That said, Mega's also claims that their service saves room on its over-burdened servers by keeping a single copy of identical files How do they do that if they don't know their users' password? Good question. We don't know the answer.

How can they do this and still keep information about the file unavailable?
I'm sorry to hear. That he experienced so much pain and suffering, and that you lost him so young, is exactly the reason I can't feel sorry for myself (and no other diabetic should either).

Awesome that his hacker spirit lives on in you...
I thought about giving you a quick list, but in 2013, it's far easier to just show you. (Or rather, let you show yourself.) Install VirtualBox and give Mint with the MATE desktop environment a spin, `apt-get install` any dev tools or new versions (what version of Python does OS X ship with these days?) that aren't already there. (Mint is a better Ubuntu than Ubuntu currently is, in my opinion: http://www.linuxmint.com/download.php)
No Lenovo, it just sucks. Some friend of mine and I have Lenovo devices, most of them got problems in short. Maybe it just happens in China, but all I want to say is "lenovo sucks"!
Seems ASUS Ubuntu Netbook fits you most, but I prefer Macbook Air+Mint Cinnomon.
That's because, as engineers, we believe there is one true answer to everythingTM. Since there is one true answer, there is no room for shades of gray. This is one of the things I've noticed most changes as engineers age: the world becomes less black and white and much more full of color.

I don't miss the "I know he right answer" egotism I had in my 20s!
I have a whole house humidifier like this http://www.amazon.com/gp/product/B0002U3654/ref=wms_ohs_prod...

Took an hour or so to install myself and needs a new $10 pad every year, which takes all of 5 minutes to swap out, but is otherwise maintenance-free.
I've never heard of that, but sure, do (9!)!. Since the problem as stated by the OP (not the article itself) specifies that only 9s are limited, it doesn't make a difference.