skysight-inc/HackerNews huggingface dataset:
1. Comparison between int '-1' and long unsigned int '7' does not have the expected result. this is because

"Binary operations between different integral types are performed within a "common" type defined by so called usual arithmetic conversions (see the language specification, 6.3.1.8). In your case the "common" type is unsigned int. This means that int operand (your b) will get converted to unsigned int before the comparison, as well as for the purpose of performing subtraction." [1]

Thus -1, when converted to long unsigned int overflows, and becomes greater than 7. The loop exits immediately.

_______

2. error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘-’ token
void OS_HP-UX_print()
^

a '-' in the function name is illegal

_______

3. continue triggers the while(false) condition, exits the loop.

_______

4. the stdout output is buffered. Adding a newline after the fprintf statement does the trick. see [2]

_______

5. In C macros the octothorpe turns what follows it into a string. It does so without expanding the expression.
Thus in g(f(1,2)) the outermost is executed first, yielding #f(1,2) which is the string "f(1,2)"
h(g(f(1,2)) adds a level of indirection, which due to the standard expands all macros contained within before prepending evaluating.

"After the arguments for the invocation of a function-like macro have been identified, argument substitution takes place. A parameter in the replacement list, unless preceded by a # or ## preprocessing token or followed by a ## preprocessing token (see below), is replaced by the corresponding argument after all macros contained therein have been expanded. Before being substituted, each argument’s preprocessing tokens are completely macro replaced as if they formed the rest of the preprocessing file; no other preprocessing tokens are available"

see [3]

_______

6. Typo "defau1t" -> "default"

_______

7. https://news.ycombinator.com/item?id=12921707

_______

[1] http://stackoverflow.com/questions/2084949/arithmetic-operat...

[2] http://stackoverflow.com/questions/14784367/cs-printf-and-fp...

[3] http://stackoverflow.com/questions/3323231/argument-preceded...
Not trying to defend the president (or anyone else), but - how else can one get elected? If voters carefully consider facts before voting then it makes sense for candidates to stick to facts and tell the truth and tell what is possible etc. But it doesn't happen, does it?
> start draining the atmosphere of CO2

Make oil and put it back in the ground?
The good thing is, Trump is actually the most pro-LGBTQ President-elected ever.

https://twitter.com/ChrisRBarron/status/793070427442667521
When they fail, it's like "return err"; that is, they just return the error value.

You can only make it return up the call stack, that's it. It's for recoverable errors, not fatal ones. And the calling function would check for the error case and re-try if that's the behavior it wants.
FB would need to abandon the algo-driven feed altogether. yes, manual forwarding is bad, but that existed in the email days.

nowadays you get all that suggested content which is driven by your past behavior, acting as a giant amplifier.

to go back to something idlewords is harping about - all of that is possible because of the persistent storage of user data. kill the deep profiles, kill the tracking, only use what the user directly, willingly entered.

in SV speak: utter heresy.
I think there's much more to it than just climate change.
It's a whole host of issues caused by humans.

For one, we're over-fishing the oceans and putting massive strain on the ocean ecosystem. Mix that with polluting the oceans and rivers.

Mix that, with massively transforming the landscape around the world. Building roads/cities, damning rivers, and chopping down vast areas of the rain forest. Disrupting natural animal migration patterns. Leading to a mass extinction event.

Plus on top of all of that, climate change. The world can only take so much abuse. Yet, we seem hell bent on pushing that as far as we possibly can. Very dangerous game to play in my opinion. By hey, the economy.
Thanks for the detailed answer, that's very helpful.
>we have to find some other reason for why EVERYONE ELSE, was completely WRONG

>and the people have spoken

Trump lost the popular vote, so this isn't true. He got about 25% of the total voting population overall.
This is the same as reddit. As social platforms get larger they starts diverging from their original userbase (programmers/geeks for reddit, college students for facebook) to apply to a wider and wider audience. Eventually the wider audience starts to look a whole lot like the demographics of a whole country (or maybe the world), and it becomes a platform with as many arguments as society in general.

The solution to not becoming a battleground which is inherantly destabilizing to the platform is to not grow, or only grow in a single direction. State up front what your targeted user base is and keep to them. NeoGAF as a "gamers only" forum will survive a very long time, for instance.

Facebook has sidestepped it by becoming a personal community for each user, but whenever they try to connect that personal community to the wider world through "shared" news, "shared" trends etc that are not personalized it causes a big ruckus.
Not obviously. For example, all of those languages mangle names differently.
Not GP but my view is that Go excels in "split-backends" where you kind of have a front-end server and a back-end server where the front-end is taking in requests and passing them to a queue or interacting with services representing the "backend's backend". In this regard you're usually building for scale and high optimizing your code to be incredibly concise and to the point. An ORM doesn't belong here because you've already decided software quality > developer productivity within such an important capacity-driven system.
>However they were pushed to that by accusations of bias in the right-wing media.

As per my previous comments on this subject. The sources that got "censored" _happened_ to be conservative. They were unreliable sources, and stories that turned out to be not true. But people still moaned about it.

The fact that more conservative sources report false information seems like a problem conservatives should want to fix, instead of crying censorship. We have too much false information flying around; it's yellow journalism.
Bloomberg should examine itself a little more thoroughly in the wake of their candidate's defeat.
Why You Can’t Help but Act Your Age
I find the Go version to be easier to debug though.
If it's small and sent by ePacket (assuming you are in the US), then it will arrive fairly quickly
For people outside the USA who may naively conflate "elected" with "the majority of the voters voted for", I feel the need to point out that this is not what happened.
Sure, and that's the higher-order problem. If we could make machines that solve any problem the way we do, we'd be a lot closer to AGI, but for now, it's still science fiction for a computer to have beliefs, and understand information in the context of those beliefs.
Nothing keeping you from using the same approach(or even some of the really nice mapping functions), it just lets you get rid of the boilerplate that you see there when you want to.
> It does not appear to be changing any time soon, no matter the party in power.

Curious, would you agree or disagree with the statement that a majority of this is driven by the primary process, fundraising requirements, and the political media industry?

If so, those seem like tractable problems we can absolutely work on.
Is that how you function?
The ? operator is a blanket "return from the current function if error, otherwise produce successful value." If you wanted to have conditional logic to handle the error within the current function, you'd use a match:

let foo_ok = foo()?;

let bar_ok = match foo_ok.bar() {
Ok(bar_ok) => {} // conditional logic here
Err(bar_err) => return Err(bar_err),
};

bar_ok.baz()
I'm not really arguing the relative merit of free trade in terms of local effects. I'm questioning your premise that, in order to oppose tariffs, one must be somehow bought by corporate interests.
That's true I guess but I couldn't figure out a better word to describe how he is seemingly unable to separate truth from obvious fabrication.
tmall.hk is Taobao, OP is saying he manages IT for an account based in Germany on tmall.hk
Apple is working so hard for us to not buy from them anymore. It's incredible.
Can't this charge be leveled at the NYTimes?

Misinformation is not a right-wing phenomenon, as much as it appears to be a comfort food for the Left these days.

It's very telling that the "obvious" solution for the defeated party is a more powerful stranglehold on the flow of information, to appoint the "right" people to curate reality for those who cannot be trusted with it.

In which case, it's going to be a long sojourn in the wilderness my friends...
> Last week Buzzfeed reported on an entire cottage industry of web users in Macedonia generating fake news stories related to Trump vs Clinton in order to inject them into Facebook’s Newsfeed as a way to drive viral views and generate ad revenue from lucrative US eyeballs.

Does anyone else find this incredibly ironic? Buzzfeed ratting out others doing clickbait?
I would definitely classify them as terrible and oppressive not "good". It has (had?) reached a point where you could literally lose your job for saying on Twitter that you support Trump. You would certainly be punished professionally for it. The media and our university system are very much at fault for creating such a culture of intolerance.
But the other person is dead regardless of the length of your sentence. No matter how harsh the punishment, he's not coming back. So I don't get that argument.
The LLVM IR doesn't define an ABI - in particular, most of the ABI is already "burned in" at the point where LLVM IR exists.
Irrelevant. This is a republic, not a democracy.

If you want to cherry pick small percentages by comparing to the voting age population.

Clinton got 25.5% and Trump got 25.4%

Voting population 235,248,000

99% reporting per Google Polls.

Trump
47%
59,821,874

Clinton
48%
60,122,876
So do all the functions have to have the same error type as the function that is calling them? I don't know rust, but in haskell notation, if a function returns "Either x y" would it then only be able to use the "?" notation on functions that themselves return "Either x z", and not on functions that return "Either a b" (so, failure sides have to match, but success sides are flexible)?

EDIT:
Answering my own question: https://github.com/rust-lang/rfcs/blob/master/text/0243-trai... makes it pretty clear; the error types must be the same. Which completely makes sense.
No More Microsoft Security Bulletins After January 2017
I hope so, because it is more subject to accidental copy-paste bugs.
I taught an introductory computing course for incoming freshman while I was at university. I once had a student's mother call the department head to complain about her child's grades and the "needless difficulty" of the class.

Fortunately, my boss was[1] fantastic and told that parent to piss off, not-quite-politely explaining that her son is now a grown-ass man, and that if he weren't doing well in the course then it was his own damn fault, and that it's pretty pathetic that as an adult, he was still having his mother fight his battles for him, and furthermore pathetic that his mother was complicit in such. She also put a few kind words toward my abilities as a teacher, which had me feeling pretty chuffed ;)

Seriously, that class was quite likely the single easiest course required by the college of engineering, and anyone who failed it was either too lazy to do the work or they simply didn't have what it takes to be an engineer (either way, most of the failures wound up dropping out of the college of engineering within a year or two; a few came back ready to take it more seriously in round two; one of my students took my class three times, and he failed every time, finally dropping out of engineering after three semesters).

All in all, it was pretty sad.

[1]: She's still fantastic, though she's no longer my boss :)
Actually it resembles a skit by Richard Pryor describing someone on coke.

Nixon? Shit, man? Who's that? Nixon? Shiiiiit.
State of the startup pitching on Russia’s TechCrunch
Alibaba Earnings AlphaGraph
Alibaba Earnings AlphaGraph Q2 2017 Highlights. http://alph.st/bb918775
Clinton did not get the majority by that much. A very significant portion of the public voted for this leader and the party espousing similar anti-science position all the way down the ticket.
I've been thinking about this... I still don't think he was referring to her vagina, but I admit that I could be wrong.

However, even if he was, or let's make it clearer, even if he directly said "she was so mean because she had PMS/her period", that would still not make it sexism. Sexism is discrimination on the basis of sex. Trump wasn't discriminating against her, he was insulting her because he disliked her (which he's free to do, of course).

For insults to be effective, they have to be tailored. You won't call "gay" an obviously gay guy, because that's not an insult, that's the truth! The insult "gay" would only be effective towards someone who's masculine and exaggerates a bit, making you believe that he's actually insecure of his masculinity and would be hurt and offended when being called "gay". That doesn't mean you're homophobic, it just means you're good at insulting people.

Trump was simply tailoring his insults to her, and if he meant something in connection with her sex, that's no worse than insulting any other part of her. He's obviously not discriminating - he's been insulting pretty much everyone, and his insults are always highly tailored ("low energy" Jeb, "crooked" Hillary, ...).
If you need more complex logic, you simply wouldn't use `try!()`. Try! is intended for those `if error then return` checks, just like with Go's `if err != nil { return err }`.

If the error needs to be checked for a specific type (like a timeout) and then retried X times, you don't use the simple `if err != nil {...}`, you hand write something:

let barRes = try!(foo()).bar();
match barRes {
Err(MyError::Timeout(_)) => // .. some retry code
}

Note that the above code is woefully incomplete (i'm not checking all possible match values, for example), but it should give you the gist of the idea.

edit: Man, the guy (or wo-guy) has a problem and we all pounce :)
Aliexpress is US-based sellers with US-based warehousing so you get it directly in the US. The better deals are on alibaba outright for Chinese consumers.
To extend on this there's also a ton of great error mapping/handling functions as a part of Result.

https://doc.rust-lang.org/book/error-handling.html goes into it in great depth. It's a fair bit to grok but really shows how thorough the options Rust has when dealing with errors.
> Package management and easier error handling are the only ones that doesn't roll up into safety or performance, and I dispute that Rust's error handling is easier than Go's.

Generics, pattern matching, functional features, modules, easy FFI, are productivity features! They have nothing to do with safety and performance (although they are incidentally used to implement some speed/safety features, because why not). Inline assembly and FFI are useful for platform interop: again, these are not safety features.

> Granted, but that's not "pushing back" on my point, because important though those libraries may be, they still don't constitute a majority of applications.

I suspect the numbers are like: 95% of applications are best in scripting languages. 4% are best in managed languages (Java, C#, Go, etc.). 1% are best in low-level languages like Rust. If you want me to concede that point, fine. But in terms of importance of projects, which correlates with the number of developers you need on the project, the numbers look very different.
I can totally believe that, but I think it's less a matter of hours, and more about goals and environment and motivation.

Personally, I find it much easier to put in long hours on side projects and on my own company than it is to put in long hours for someone else'e company. And if the environment is bad at a company, long hours can be excruciating.

The most successful people I know work for themselves, or carve out a niche in their companies that allows them to do the things they want to do. And I suspect that enables the conditions under which long hours are easy to put in, and success is easy to achieve.
Nobody can predict the future, but if the past is any indicator then I'm pretty confident.
The most optimistic predictions (as of July when I last checked in on it) have us hitting emissions targets with room to spare before the changes become irreversible. Most of the realistic ones had us barely making it, but still squeaking by. With this week's revelations, not sure that will be possible anymore... but to say the only reasonable plan involves genocide is ignorant. Renovating emissions-producing buildings, riding more bikes, motorcycles, and efficient vehicles, efficient appliances, iterating on renewable energy sources until they are cheaper than oil - all possible within 30 years if we can focus hard enough on making such a lifestyle palatable to consumers.
Well, the original source was in support of calling myself and President Trump racists. If you read the article or do some studying on the subject, there are very few actual facts. None of which support the claim that I am racist or Donald Trump is racist. It is tenuous, at best, to link racist business practices of some employees to the business owner.

I can't answer all of your questions, but I believe most Americans are tired of being called, racist, sexist, homophobic, bigot, etc., when they take PAINS to avoid any personal racism or appearance of such. That is why Donald Trump just won the election. It's Americans saying we don't care what you call us any more, and we don't actually care to find common ground with people like you(and by you, I'm talking about cancerous Social Justice people).
> On the technical side, the APIs are astonishingly bad. I suppose this is the result of building this very quickly, and it has grown ever since. I don't know how they manage to maintain it.

I visited Alibaba HQ last month. People seemed pretty worked and driven by deadlines which can decrease their code quality. The teams I talked to didn't do much testing.
Thank you for showing the "simple is beautiful" in favor of GO.
> ... more trustworthy than backroom hand counting by party insiders

Aren't vote (re)counting efforts publicly scrutable?

Given active malevolent actors and the stakes at hand, the "perfect system" sounds very difficult indeed. Just take a look at how much Google's search algorithm is gamed/tweaked to see the arms race involved.

Give me pen&paper, and a transparent, well understood process over some unicorn-rainbow perfect system.
Tesla Motors
$TSLA Tesla Motors Earnings AlphaGraph: Q3 2016 Highlights. http://alph.st/b5f9c746
I'm not sure I get this argument. Of course artists would rather be paid for product than time, and of course they want the aberration to continue.

The world of tech would be pretty different if the "aberration" of stock options were eliminated, and everyone was paid only by the hour.

But it goes further than ISOs to actual product revenues - I would be pretty sad (and much less well off) if I could only charge by the hour for writing software vs collecting revenues for software I already wrote.
I agree with another comment here, you are not supposed to love pair programming. It's an attempt to put pressure on you. Just never do it, talk to your manager. If they are not happy with your decision, leave, as you are the one to suffer the consequences, not them.
I don't think you're ever going to detect truth correctly, but you can absolutely detect falsehood.

Compare "{Candidate} up over 5000% in polls" vs "{Candidate} up over 15% in polls".

Baby steps. PageRank wasn't built in a day.
your microbiota are primed at birth, then over life they change at each stage of development, around 6, around 13, around 26, around 40 and later in life, they impact your microbiome which effects the way you feel profoundly as well as the function of your immune system, the clinical research is out there to support this. http://www.nature.com/articles/srep23075
You're very welcome, and thanks to you as well.

And, seriously, thinking about it, after today/right now! I should just steer clear of all things Clinton until the pardons are handed out, or not, and focus on the future. They've been "living rent free in my brain" for ... 24 years now !?!!?!!!!

Another reason I'm happy Trump put two political dynasties in the ash heap of history this year, add 4 to 12 years for the Bushes....
They have to be convertible to the type that's being returned. You'd need an implementation of y -> z. It will call the conversion function for you.

use std::fs::File;

enum MyError {
OhNo(String),
}

fn foo() -> Result<File, MyError> {
Ok(File::open("foo.txt")?)
}

With only the above code, we get an error:

the trait bound `MyError: std::convert::From<std::io::Error>` is not satisfied

So by implementing it...

use std::convert::From;
use std::io;

impl From<io::Error> for MyError {
fn from(e: io::Error) -> MyError {
// do some sort of conversion
MyError::OhNo(String::from("some error"))
}
}

Now `?` does the coercion automatically.
I think they are implying that the domain name and site are localized for the region.

For example:
ebay.com,ebay.com.hk
amazon.com,amazon.com.hk
tmall.com,tmall.hk
So child molesters and murders will get out of prison before someone who commits a lot of petty crimes. That doesn't sound very logical to me.
I understand.

They claimed to have donated $20,000 to Hillary. The website claimed the claim is false.

We will never know, but more importantly, the voters didn't really care who the KKK was supporting, as the election results have shown.
Indeed, my Ubuntu recently created multiple 22G log files several days in a row (some USB issue or other fixed by updating kernel). Wouldn't have been an issue but the disk was nearly full.
Well, I disagree that having keys be trivially verifiable by the voter is a problem. That's a selling point - you can be sure that your vote wasn't altered in-transit. In fact that's largely the point of the system.

This is a general problem with absentee/mail voting, though, and it's a strong argument. If your boss/spouse/etc is being an asshole there's little to stop them from coercing you to show your paper absentee ballot, marking it in for you, etc. Yes, it's illegal, but what are you going to do about it after your at-will employment is terminated without cause next month? In the privacy of a voting booth, you can vote however you want and nobody will ever know. It's real easy.

I think you can still keep votes secret if you have in-person voting. Just have the secret key never leave the polling place, it's equivalent to collecting the ballot after tabulation (we have paper ballots that are run through a ScanTron machine, we don't get to keep the ballots). You get a printout of the hash values you selected (but not the key) and can validate that the hash exists on the blockchain afterwards (signed by the polling place's private key), but there's no proof as to what the particular hash values actually indicated.

Really though you have to trust that people will treat their electronic ballot with just as much import as their paper ballot. I don't think an electronic works without some kind of secret key/token.
Just a reminder that anyone in the UK or with an interest in UK politics should subscribe to Private Eye.

Ian Hislop likely has the distinction of being the most-sued person in English legal history - almost entirely by people seeking libel writs in attempts to bury the truth.

There is a podcast and selected content online. Funnily enough, it's the only periodical in the UK that has seen a rise in readership.