skysight-inc/HackerNews huggingface dataset:
My explanation for why is the following sentence:

> If a function could fail, the function must return an error as its last return value. The caller should immediately check for errors from that function.

In practice, in idiomatic code it is quite rare for a function that returns a `(* Something, error)` to return `(nil, nil)`, which are the cases where a nil pointer dereference would most often happen. The other case is not _immediately_ checking errors. I would say both of these cases are not idiomatic Go. (Yes, there are exceptions.)

The other cases where I've seen nil dereferences pop up most often:

(1) the zero value for maps is nil, and a nil map is mostly not usable. `m[50] = "foo"` will panic with a nil dereference if you've not initialized `m`. This is one of the most annoying things about Go.

(2) not checking for presence when pulling out of a map. If you have `map[string]* Something` and do `x := m["nonexistent"]` and try to use `x`, it'll blow up. Always use the `x, ok := m["nonexistent"]` form instead, and deal with stuff when `ok == false`.

(3) nil receivers. `var x *Something`, then `x.Method()` -- the `Method()` method _can_ deal when `x == nil`, but most code does not.

My reasons for citing C and Java:

C doesn't have multiple return values, and kinds of C code deals with errors differently. Lots of stuff just returns `NULL` and all too often things don't check for it. (`malloc()` is a perfect example of this -- it rarely fails but a _lot_ of code doesn't check for errors. Now extrapolate that to everything :)

For Java, it's because the try-catch control structure complicates program flow. If you have a large block of code in a try-catch, it is very easy for a different line of code to throw an exception than you expected, and as a result an object you attempt to dereference later is null and you get an NPE. There are ways to deal with this, of course, but in my experience most people are pretty lazy about the non-happy path.

EDIT: formatting. how can a site about programming have such terrible support for typing in code
I've invested in BAT during their ICO and today I feel like I'm hustling my investment a little bit. :-)

I mostly use Brave on my phone because it makes the browsing experience faster and removes most ads by default. I won't change to another browser on the iPhone anytime soon. Having said this, I haven't used the payments feature outside of web3 (Ethereum DApps).

I don't watch ads with any interest or attention in general, but I often have Youtube playing some live concert on the background while I work and ads cut midway forcing me to change tabs so I can skip them. The idea that instead of breaking my concentration to stop an add playing I can simply let them and that _that_ could be a little money generating activity seems appealing.

(edit a word)
> Are you sure it's true that Trump's entire political franchise has had zero good ideas?

You're not wrong in that its important to hear both sides, but its also important to hear an appropriate amount from each side corresponding to the acceptableness of the ideas. Minority voices are important. When we find ourselves in the majority, we should be responsible for ensuring that those minority voices have a way to be heard. But not that they should automatically be heard equally to majority voices in all spaces.

Trump is a minority voice. The election results and polling are clear on that. So the question becomes more about how much weight we, as the majority, should give to those ideas. And like, I hate to be that guy, but... not much. He doesn't actually seem to have any substantive policies to debate, its just slogans and ideas. The substantive stuff either gets mentioned and then forgotten by the next news cycle (what happened to the national emergency on opioids?), changes on a whim, or is just him talking and other people in his administration (or party) ignoring him and doing whatever they wanted.

I just don't see the value in spending a lot of time/cognitive load considering that perspective on a regular basis, though I do venture into T_D sometimes to see what they are thinking. The current dichotomy of /r/politics vs /r/the_donald seems to have balanced itself out pretty well, I think.
Not generally, but it has happened. And the Brave business model of "block ads, then show our own ads instead" combined with this type of advertising is probably a clearer target than "some guy making uBlock for free".
GH::watch GitHub Notifications app gets Bundled notifications for android N
On the Quora page they explained the main reason behind dropping the product was that fact that users had to install a browser extension to get the CC number, which put people off.

Surely they could have very easily sent the CC details to the users by email or SMS (security risks) or better still they could obtain the details by logging into their PayPal account.

Seems odds that the execs axed the product over this when they were so many solutions to the problem.
If you really believe there is no evidence, you just aren't looking, or you are very selectively deciding what qualifies as evidence. The reality is that Russia is run by a guy who assassinates political opponents and whose glory days were those of the USSR.

This is a long-running conflict with Russia. There really are issues in the US that need to be fixed (as the Soviets gladly pointed out about Jim Crow in the 1950s/1960s), but Russia is also geopolitically smart enough to attack those vulnerabilities. If you just sit down and consider why and what advantages Russia would have in spreading propaganda, it is hard to believe they aren't doing it.
Of course he still has the legal right to do it. The US hasn't gone so far yet, as other western countries have, to ban "hate" speech, and he hedged his arguments well enough that it would be hard to ban that kind of talk outright without exposing that you really don't care about the arguments, but that it's really about that he's daring to make them at all. That's why, in my opinion, he draws so much seething hatred - he was too careful about hedging and inviting discussion for the left to be able to dismiss him easily as a dumb retrograde hate monger, but they didn't want to address the arguments on the merits either (yes, I'm aware that there were exceptions, no need to list them, this is about the left as a whole). His speech has been effectively banned because he's been made a pariah and dismissed.

Of course the left hasn't completely won yet, so he's found a home in some parts of the right. But that's not the point, it's about what the left ultimately wants, and what we should expect if it wins. This serves as an example - the left is happy and comfortable when certain controversial points are suppressed and their advocates exiled.

"Would you force Googlers to work with someone they disagree with so strongly that they cannot be civil?"

Why can't they be civil? Is there a line where uncivil behavior is permitted because someone's thoughts offend you?
Someone needs to re-read the penny gap.

People HATE being nickel and dimed. Exactly zero people want to have to think to themselves "is this news article worth 5 cents?" every time they load a web page.
Ad-blockers not. But Brave profits by replacing website ads with its own ads.
There are clearly already sub-cultures within HN, having tags/filters would make it easier to find content.

What should be unified is the rules for contributing to HN.
>In the Caymans, your service provider, a local law firm, will offer a choice of cookie cutter plans with layers of trusts and corporations in other secrecy jurisdictions, which will make it impossible for the tax man to pin down who actually owns the account.

The IRS just asks you if you have offshore holdings, in which you either tell the truth or perjure yourself.

As far as I can tell, a lot of the labyrinthine layers are designed so that maybe you can lie to them without actually lying. Or at least say that to yourself.

I bet a lot of the nouveau riche from developing countries use a service like this not to avoid taxes, but to avoid their shaky government from nationalizing their bank accounts.
I suspect Tesla's advantage is in linear acceleration. Those internal combustion cars need a gearbox so the initial acceleration is very high in that first gear. This the same reason the Navy wants to go from steam to electric catapults: you get the plane to the same speed off the cat, but the acceleration curve is straight, so there's lower peak load on the airframe, so your planes last longer. Similarly, the Tesla can keep linear acceleration with gear shifts.
You probably don't know but there are NLP and computer vision methods to detect "blood, violence, gore and porn" automatically and stop ads on those pages (subreddits).
Too bad it requires an invite code. Do you have one for us? :)

I use privacy.com for something similar, but it's a debit card (so it just connects to your bank account) rather than a credit card and doesn't offer any rewards.
Pretty much the same with HOA's in my opinion.

You can opt out with the US government as well - it's just a bit more complicated to do so.
Show HN: Run PyAnnotate in your pytest test suite, autogenerate type annotations
> Are you sure it's true that Trump's entire political franchise has had zero good ideas?

there was dropping the tpp... maybe. that's probably good, but i have mixed feelings. anything else?
It was a stated goal of GWT to produce different JS files, one per browser, so that it could generate the right JS dialect for each browser. (And so that the browser didn't have to download "if" statements containing code for other browsers that it was never going to run, meaning a smaller downloaded, also relevant then.) That always worked perfectly for me, but I only used it for about 6 months, on a small project.

Also, it had a debugging version where it actually ran the client code in a JVM, and you could step through it with Eclipse etc. Of course that didn't help if the bug only happened after the Java-to-Javascript compilation process, but in my short experience with it I never had such a bug.

Of course Javascript and the browsers have caught up, but I would have expected these features to be gladly embraced by the development community at the time, as they really did help. But they weren't.
Here one item of the Brave-FAQ:

Why build a browser and not extensions for top browsers?

Extensions face API and performance limits. Our own browser lets us put our best foot forward on speed and deep integration of private ad-tech. We may do extensions if our users find themselves browsing in other browsers often.

=> give them feedback if you’re interested
That looks like opt-out (it's named "telemetry.enableTelemetry" and has "'default': true").
Flask (python) very minimalistic but quick and nice documentation .
If you believe lobbying is a flaw. I'll play devil's advocate to that.

China has to routinely purge extraordinary numbers of people from their political system (tens of thousands), because most of their corruption occurs behind closed doors, shadow dealings, hidden bribes, and so on. Is that better or worse than instead having a strictly defined system of public lobbying? For emphasis I'll point out that the US lobbying system is extremely tightly regulated, there are very well defined laws for it, they will put you in prison if you break those laws.

Systems without US-style open lobbying are not lacking in common corruption, there has always been plenty of that in nations such as Japan, France, Italy, Spain, England, South Korea, China, Russia, Argentina, Venezuela, Mexico, Greece, Poland, South Africa, Indonesia, India, etc.

The world is flooded with political corruption practically everywhere, with most of that world not utilizing a system like US lobbying. It'd be easy to say that one would rather eg AT&T not try to influence politics at all, that's wildly unrealistic as it pertains to human nature and history. So is it better to have a public system that AT&T lobbies in, such that you know where they're lobbying and for how much. And if so, is there a better version of that than the US system (and what would that be).
From a security standpoint, if your standard I/O implementation has a bug in its `fputs`, it is broken on such a fundamental level that you should print it, delete it and burn the printed copy. Better to find this out with something relatively trivial with a minimal surface for errors like puts than through an obscure format string.

`printf` gives the caller more opportunities to accidentally cause bugs. The difference in LOC when comparing for example FreeBSD `puts` to `printf` variants is so great that if you had any reason to doubt the implementation of the standard library you would be better off writing your own formatting functions and print everything with puts/putc because that would likely be easier to test and verify than identifying all the edge cases in `printf` flag parsing.

Personally, I think either way to do it is fine, but since we're seemingly all in the mood to be picky about code smell, security and such, I thought I'd join in. In reality the examples mentioned are not production code, and they are likely to be used with GNU libc, not Cheap Chip Factory libc 0.0.1 alpha. In most cases, the standard library is well exercised because its use is ubiquitous. If that can not be assumed, and you're somehow stuck with a broken standard library, I'd rather go ahead and verify puts, and let you dig into the `vsprintf` parser and make sure it works in all the cases it gives the caller an opportunity to create :)
Yeah, my above comment was not using a text search, hence no "relevant" option (i.e. if you just drilled down the department hierarchy to, say, the TVs department).

> the core need, is that you want control over the model that Amazon is using to sort what you see and to have some input on what that looks like

Indeed, but I'm not even looking to have that much granular control over it. I just want "sort by rating, but toss out all the obscure crap that has 1 or 2 ratings, because that rating is meaningless."
Ipcpipeline: Splitting a GStreamer pipeline into multiple processes
Your assessment of this as naked politics is purely subjective, and while you're free to voice your opinion on submission quality beyond just hiding it, realize that by policing it with your comment, you're exerting your own politics on HN to an extent.

IMO, this topic has huge intersections with modern tech. From attitudes about US tax reform in the tech community, to means of creating transparency in wealth with tech, to means of aggregating and distributing investigative journalism about such large and complex matters with tech.
Ford and GM can absolutely do this. Tesla is "hot", but Ford is successful.

People underestimating the big players and cars aren't thinking about the economics right. Ford markets are almost two orders of magnitude more than Tesla is producing. If Ford sees the global opportunity to sell 10-20 million EVs a year they'll build the crap out of them.
What's the word on using this with emacs?
He's not totally wrong, but casting it as a 100% clear-cut decision -- with the RPC version as the obviously bad, "highly damaging" choice -- is just wilfully stupid and dishonest. It's clearly a tradeoff.
Do the majority of customers even care if they have the latest version? Heck even on iOS, I don't recall the last time anyone outside tech even discussed the version of the OS. Pretty much in line with my experience of what happens on the desktop.
it's a reddit sub so i don't have any expectation, but fwiw, "balance" implies neither "unbiased" nor "objective".
Having everything in one place helps to ameliorate the filter bubble effect.
You're probably placing too much emphasis on the name.

Subreddits are reflective of the moderators and readers. There is no objectively higher criteria to determine whether a subreddit is or should be "free from bias", only that they should reflect the makeup their membership, which they do.
"being paid" is here used to point out that they are part of the duties of the job covered by the contract. If they aren't part of your contracted work, you're not being paid for it.

There's nothing to go further into - these are very straight-forward issues when they are presented to you as a part of your duties. They are less so if you on personal initiative decide to keep additional notes for your own use, but the context here is a presentation to employees presenting instructions for how to carry out this work duty, so that hardly applies in this case.
Do these people not understand that what they are basically saying is "a few children must be sacrificed so that local governments wake up". Also this assumes that the local governments have enough resources (or ever will) which may totally not be the case.
Sure, but that's not something you can rely on, is it?
I'm sure you're joking, but in case you're not, an FYI: this fundamentally misunderstands the reason people use and abuse drugs, and especially why they don't get clean. It's definitely not that they don't have sufficient incentive.
>This feels like an absurd criticism. Couldn't it apply to absolutely every negative thing written about Google, ever? Why should Google be immune from criticism?

I think this is more a direct attack on WSJ's questionable neutrality rather than a strong defense of Google's behavior.
OP and author here. This work extends Dropbox's recently-published PyAnnotate tool by making it super easy to run as part of your tests.

It's as easy as:

pip install pytest-annotate

py.test --annotate-output ./annotations.json
Your reply says a lot about you.
I would argue that not moderating content is what would make you lose advertising money:
There was a huge push back from YouTube ads after it was revealed big advertisers were shown on violent/extremist content, or videos about catastrophes ("Buy Kellogg's cereals!"... 400 killed in ____) ;

YouTube has since improved their detection algorithm (even if it has more false positive, likely) to keep advertisers on the platform. It they didn't do this, the only alternative would be to WHITELIST advertisers, which would mean that nobody would pick you and only the big names would get revenue.
The Story of WorkFlowy (YC S10): From $0 to $800,000 a Year with Jesse Patel
They learned a 'big word' and they use it to feel smart. It's like the time Peter Griffin learned the phrase 'shallow and pedantic'.

https://youtu.be/yetwdpsiM8Q
Prove in the Cloud with SPARK Ada
Orcas have learned how to drown great white sharks
When someone you like gets in trouble.
There’s a Digital Media Crash, But No One Will Say It
...ba-dum-tss...
This would be sensible if profits were being paid in each country. The double Irish functions to siphon profits from Europe and Asia to tax havens like Burmuda. This is a world wide scandal.
> I don't think Niantic was responsible for the decline but just the game itself was.

They re-skinned their previous game and only added a gym fighting minigame. It's entirely their fault. Even today the game doesn't have all the features shown in the trailer. Their game has no end-game content either so even the core demographic lost any reason to play.
To build my first app. I have been learning React -> Redux -> and currently learning React native to finish my mobile application. So happy I decided to learn it. I am a backend engineer and the concept of redux is what a joy
"2 Balances pH: Lemons are an incredibly alkaline food, believe it or not. Yes, they are acidic on their own, but inside our bodies they're alkaline (the citric acid does not create acidity in the body once metabolized"

That's what I get in the answer box. Wow.

I think it absolutely is Google's job to be the woo police in the privileged answer box. They can just choose not to display it for answers they're not confident in owning and leave you with the general search results.

It probably needs to be a whitelist. Most of the time it's wikipedia anyway (a whole other can of worms, but at least it won't tell you that lemons are alkaline or feed your conspiracy theories)
Strawman. You clearly aren't awake to the corporate cancer that has metastasized through corrupt political-media-corporate complex that controls America with manufactured libertarian propaganda and consent.
> If a group of users come together and upvote content they individually agree with, is it "an agenda", or is it "consensus"?

Shareblue literally pays staffers to post content there en-masse...
https://www.reviewboard.org/ is nice, imo.
Gearing and friction losses can be fairly small.

Consider that at ~0mph and ~0rpm, producing any kind of torque at all is done with ~0% efficiency, all just resistive losses as the back-EMF is effectively zero. (Note this is no different for an internal combustion engine, although the heat generated is in the clutch or similar such device...)

Friction losses don't change much as a proportion of power as you increase speed. For aerodynamic drag, however, your losses do proportionally increase with speed, so "windage" (i.e. drag from spinning parts of the motor) needs to be cleverly reduced by making the rotor aerodynamic if you're planning on operating at high rpm.

EDIT: for properly designed electric motors (i.e. thin wire windings, iron core optimized for low eddy current losses), coil resistance usually dominates even at high rpms.
The difference between /r/politics and /r/the_donald, is that positive comments about Trump on /r/politics get down voted into oblivion but still are capable of being read and seen, on /r/the_donald, they simply get removed and the user is banned.

To imply that those two are equal, is disingenuous.
So... what were the actually bad things that actually happened because of Trump (i.e. because of something he did)? In my view, much like with Brexit, the fearmongering is way exaggerated compared to reality.
I used to work for an on-demand content streaming company, so I'm biased, but the cataloging, searching, and quality of content are big scaling issues for the average user.
Go-Pex, a permissions system for Go structs
> For example, you cannot say anything positive about Trump on /r/politics. Nothing.

Not true. There was positive commentary about Trump's speech in South Korea. I think you just misestimate how often the thing he does is perceived by the general public as bad.
It's fascinating to read everyone's responses. Mine are:

- mobile devices with extremely long battery life (weeks)

- mobile devices that can be put into a dishwasher and do not need to be treated gently.

- HashCash

- non-ai personal assistant/concierge services

- Theranos-like tech

- Teledildonics
And yet isn't all you have to show for that his tweets.?

Which of his actions shows that he is that bad.

You don't have to be a Trump supporter to see that you are proving the parents' point.
It'd be nice if it was just insisted that the politics stuff has some bearing on tech. Net Neutrality stuff, SOPA, that's "politics" but its very impact on tech.

Tax avoidance, not so much.
He made a joke about his own experiences as a young gay man on the Joe Rogan podcast. He has continually distanced himself from the Alt-Right and neo-Nazis. He has also recently married his fiance, who is a person of colour.
Have you actually used a computer from that era for any significant amount of time?
> there's a very small and tiny layer of C at the bottom [...]

That layer of C is hardly "tiny." Everything from font drivers to process management to a lisp interpreter to window and buffer code, to overlays, and a lot more.
So to extrapolate, you believe that she was reasonably concerned that the Guardian might be a right wing tabloid that would twist her words?
Yeah, Twitter fucked up IMO. They wanted the check mark to mean verification, not endorsement, and ironically after removing the checkmark from people they don't like, its back to square one.
Some politics, yes. But tax avoidance by individuals... I don't know about that one.
Vimdiff does the job for me. Needless to say, to use it effectively you should have some proficiency in vim.