skysight-inc/HackerNews huggingface dataset:
To the second link

"Bubble sort always performs n-1 passes through the data (where n is the amount of elements), and it always performs (n-1)+(n-2)+...+1 comparisons regardless of how the data is organized to begin with."

That is just false. 1 pass and n-1 comparisons then stops for already sorted data is what you get. An implementation that doesn't show that characteristic has been either deliberately or accidentally pessimized to behave poorly. You can gimp any algo to make it look bad. Quicksort without randomization on a pathological case is O(n^2) for example and nobody cares for the overwhelming majority of practical purposes. If your definition of bubble sort is that it must be O(n^2) always then we're not using "bubble sort" to mean the same thing and it's pointless to continue the discussion.

Bubble sort is usually operates on data in place. I don't know how to do an efficent in-place selection sort for mostly sorted data, maybe it's possible? You pay for additional copies in both space and cpu cycles. 2xn space for selection usually - but maybe this can be avoided without paying a very high time overhead, (eg find the spot, ripple all data below the spot down to the hole where you selected to open a slot for insert or similar).

Count the memory operations, ie number of memory reads and number of memory writes for a given set of data comparing the two algorithms.

Suggestions: Write 50 odd lines of C code to see the actual effect in cpu cycles. Craft data to make each algorithm dominate the other, it's really interesting to see.

I'm disinclined to say "Never uses algo X, always use algo Y!" Because it's really hard for that to be sensible given all the various shapes and sizes input data takes. Know your data is always really, really good advice.
Here's the thing: tough shit. I am super tired of the "it costs too much", "it's too hard to do" excuses. You've built your business off of my data. Not yours. Mine. I dictate how it is used and who has it. You keeping my data can actually be a threat to my security and livelihood.

We have swung way too far into a regime where personal information is irresponsibly slung around the internet with no accountability and no consequences when that data is misused.

> If each single customer who decides they don't want to deal with you any more can require you to remove any reference to them from anything you currently store or have ever stored, please describe a technically and commercially viable strategy for reliably cleansing your backups.

That's not my job to do. That's "your" job as a responsible technologist to figure out, based on your knowledge of your systems and processes. I'm in the midst of preparing to be GDPR compliant at my employer, and I'm not saying it's easy, but all these problems are tractable. Would I rather be focused 100% on building new products and features? Sure, who wouldn't? But part of being a professional developer is taking responsibility for the software you write, which includes handling customer data with respect. GDPR is a step in the right direction for that.
if(foo) <- js can insert semicolon there

if(foo) { <- js cannot insert semicolon there

Edit: add this comment you have provided approximately nothing in support of your assertion, you can and should do better. I note this thread is JS and a whole lot of this kind of thing going on here I don't usually see elsewhere on HN. It's a shame, discussion is useful to learn things I don't already know. "Nyer, your wrong" not so useful to me, you or anyone else.
Compare the values of these function bodies:

return {
};

and

return
{
};
Bitdefender to Deliver Cross-Platform Cyber Security to Enterprises
>On the USB-A port thing, what reason does anyone have for plugging their phone into their computer anymore, though?

I'm a mobile dev. Also to charge it.
> World of Warcraft numbers are rapidly dwindling so a WoW start will pretty much have to start from scratch in another game or quit streaming as a career move.

It seems you are conflating Twitch streaming with e-sports, they are two very different things. Becoming a successful Twitch streamer doesn't necessarily require extraordinary skills in terms of playing a given game; switching to a new game wouldn't be that big of a deal and some streamers switch regularly on a weekly or daily basis (e.g. my favourite streamer, who is a full-time Twitch streamer and has 175k followers, plays more or less regularly at least 5-6 different games).

I agree with you on the "big brother" part, but then again this is a characteristic of any career path that can potentially lead to notoriety (acting, pro sports, etc).
I took "clang/llvm may be reckless, but they're fast and have UBsan", to which I replied "gcc is still faster".
And all the code pens are also slow. Between clicking the "run" button and the actual script running there's somewhat of a 3 second gap.

Which kind of puts the opening paragraph into question:

> I’m passionate about image performance optimisation and making images load fast on the web.

Like, ok, why aren't you using a simpler blog engine to post? As a plus, if you were in control of everything on the page, you wouldn't even need to use codepen; just include the javascript directly in your page.
We asked about papers from universities in mainland China. You posted 7 papers. One of them had a second author from Shanghai Jiao Tong, and another had a second author from Tsinghua. The rest were from industry, MSR, and western universities.

So, we had someone from another field go searching for examples of good research from mainland Chinese universities, and come up empty-handed. I think this counts as further evidence for mainland Chinese universities being paper farms. :)

And, what do you know? Kaiming He did his Ph. D. in Hong Kong, not mainland China.
shame it cost us 120 million effing bucks to do something they should have effing known was a forgone conclusion and the only human effing decision to make.

what a waste of money. bunch of 1st class political wankers they are... the whole lot of them.
Ask HN: How to get a job when you have a disability and thus can't drive?
I have a vision disability, so I can't drive. I have lived my entire life next to NYC, and have always relied on the public transportation.

I graduated a while ago with CS degree. My university was located in an inconvenient spot. I tried to get an internship, and was denied several times due to not having a car. Practically every company that recruited was local, so I couldn't get any internships.

After graduation, I've had to reject an offer due to lack of public transit within a 2-hour distance. Most recently, a company cancelled my on-site after I told them I had no car, even though they were an hour commute by train away. Finally, I recently finished two final interviews for two different teams at a company, and I was given a verbal offer for another company. I'm afraid of what will happen if I pass, since the location is in the middle of no where. I haven't visited them, so the commute could end being horrible or impossible.

I've had no luck with companies at large cities, and fear my unemployment is scaring them away. People think I can't get a job due to reasons, when it's actually due to my disability.
A negative number of changes is nonsensical, so the programmer doesn’t need to defend against it.
We went through a FODMAP elimination diet to try resolving some food intolerance issues that our kids were having. After the initial inconvenience, it's really not that big of a deal adhering to a (reasonably) strict FODMAP diet. Garlic-infused oils in cooking instead of chopped garlic, rolled oats instead of toast, bananas instead of apples. You get used to switching ingredients pretty quickly. We now tend to cook most meals from scratch instead of processed/prepared, so I feel like it's been a net positive change for the whole family.
Methinks the NFL politicized itself, without realizing what potential consequences their actions would bring about.
There's enough volatility to make it extremely profitable.

Coins are going up and down 10-30% for no "real" reasons.

https://www.cryptocompare.com/coins/#/usd
But then why only gluten/wheat products, and not other crops treated with glyphosate?
Perhaps in part, yes. But cowboy does have a very powerful REST handler built into it that does a lot of the same things: https://ninenines.eu/docs/en/cowboy/2.1/guide/rest_flowchart...
EngineerMode: so I fired this up on my OnePlus5 (and subsequently rooted my device). Fun times. Can anyone explain all the features in Engineer Mode?
* DDR Aging Test: Some sort of DRAM physical memory test?
* SUPL Tool: Tries to connect to supl.google.com:7276 ??
* Network set >> RAT Mode?
.... other features test your screen, colors, backlight, NFC, Wifi, etc - would still be helpful if someone with a bit more background could give some color.
Am I the only one who found the thing awkward and offputting?
It does look like an alien language to me; I wonder what Latin or Cyrillic script would look like to someone for whom that was perfectly legible.
Does the bot try to maximize $ value or total ETH? It could be a terrible bot and he could still be up $ wise purely because the value of ETH went up.
I'd like Markdown support, too. We'll put it on the list. :)

I can tell you've got real passion and enthusiasm for what we're doing, otherwise the critiques wouldn't be as detailed and pointed. We want to get this right, so if you're game, drop me a line at anil@fogcreek.com and we'll find some time to talk through what you expect and what'll keep you excited about where we're headed with Manuscript.
“The Pragmatic Programmer” refers to this idea as “select() is broken.”
Many years ago I found a bug in GCC. Reported it, it got fixed, I got thanked.
Finding library bugs, though, is routine. Most languages today come with a large collection of libraries, most of which work for the common cases. In an API with a thousand calls, probably at least 5% of them have major bugs.
How to Land Your First Paid Speaking Gig
Middlebury Optical Flow Dataset
> Are you sure?

Yes. A quick google for "foregone conclusion doctrine" will turn up a bunch of fairly-recent news about this.

> It's the same problem with encryption keys. Just because you had it yesterday doesn't mean you have it today. People actually lose or forget things, especially under stress.

Yes, and that's part of the problem. I'm not saying I agree with how all this works, just stating that's how it is.

There are limits, of course. If the court cannot establish that you know (or at least knew) the password/phrase/key. "I forgot" can certainly be a legitimate defense, but it of course depends on whether or not a judge believes you. If we could use "I don't remember" as an unquestioned excuse, we could get away with anything.

> That's one of the main purposes of protection against self-incrimination -- so that the government can't claim you know something that you don't and then hold you in contempt for not telling them.

That's not what we're talking about here. We're talking about things the government affirmatively knows that you either have or know. Unfortunately, of you no longer have or know that thing, the burden is on you to prove that you don't, which is difficult.
Oh, I thought the GP was accusing GCC devs of reckless optimizations. But UBSan is a clang project, so maybe you're interpretation makes more sense. Very confusing thread. :)
> If you are serious about fighting climate change, what is the single most effective place to spend money?

No where, to fight climate change the single best thing to do is curb your consumption and save money. Don't buy new gadgets every year, don't go on holidays far away, don't buy expensive meat, take public transport if possible, don't buy a huge house, don't use air-con. Do all that and you've prevented more carbon emissions than a small African village will ever produce and you'll save money.
That is a better example, thanks. I make no claims to JS guru-dom!
> But it's impossible to make affordable and below-market housing profitable unless the underlying issues, land acquisition costs and zoning, are addressed.

Totally agree. Developers don't want to build affordable housing because they in some cases actually stand to lose money when doing so. SF's byzantine planning process makes it that way, and that's not going to change without some heavy reform there.
Arguably, PUBG's success is completely attributable to it being a spectacularly fun game to watch and therefore RIDICULOUSLY popular on Twitch.

I don't think it's anywhere near as popular without the Twitch streams
Very cool. Every time one of these interactive fiction stories comes up, it reminds me I really ought to get back into Inform 6.

I've really been tempted lately to try embedding a z-machine interpreter in the Microsoft Bot framework. It'd be neat to play Zork in Teams or Slack
The Apple Watch Can Accurately Detect Hypertension and Sleep Apnea
Not related to anything in the post, but does it bother anyone else that those are called "diamond" shapes and not squares?
I made a little BTC price ticker on an OLED with and arduino. I used BeautifulSoup to get the data. Went from knowing nothing about web scraping to getting the thing working pretty quick. Very easy to use.
The Data Infrastructure That Powers Buzzfeed (Interview)
Hey HN!

Chhota is essentially a mirror for goo.gl.

Why? So that you can get URL shortening on your own domain for free, instead of paying bit.ly $100 every month.

It is completely front end, and uses data after `#` to get the redirection url - Because of this, I couldn't get `meta` tags working.

Check it out :)
only on incompatible MP plugins.

however I've just ran nightly and although it says vimfx will work as a legacy plugin it's not working, so the deal's off. I shall not use my mouse!
I use these https://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3... to alleviate the 'sticking out' problem.
Why on Earth do we need a language that we can't use safely without "understanding of the way arguments to unprototyped functions are automatically promoted"?

Backwards compatibility and uses that are niche but vital. Programmers insist on using parts of languages long after they're discovered to be bad ideas, or when they're included in the language for very specific use cases that aren't relevant to 99% of programmers. Those parts of languages are catnip for "real" programmers.

"You'd be foolish to use this technique, and you'd have to be stupid to need it for this application."

"That's a matter of opinion, but it's fact that I'd have to be clever to make it work."

Can't argue with someone who thinks like that.
Coal, oil, and even gas are dirty and dangerous. But they are investable and insurable, with less (but definitely not zero) government support.

I'm all for pricing-in the externalities. And if that makes nuclear a relatively better investment, hurrah! If new technologies turn nuclear into something supportable in normal capital markets, hurrah! But there is no proof-of-concept yet.
* 2015
cf. http://www-cs-faculty.stanford.edu/~knuth/diamondsigns/CJ1.h...
Seconded. For our situation, it was fructans and polyols (to a lesser extent). Gluten seems to be a non-issue for us, except that wheat products also tend to be high in fructose and oligosaccharides. If you're reasonably diligent about keeping to the diet restriction and only reintroducing one food group at a time, it's possible to be quite precise about identifying what compounds might be a problem.
Isn’t this just Proof of Stake?
Perhaps they don't want to worry about deploying a simpler blog engine ?
What’s surprising for you might be hardly surprising for someone else. Intuitively `0.1+0.2==0.3` should be true in every language. Now fire up REPLs and test that and the number of common languages where that is actually true can be counted with just one hand.
Getting involved in only narrowly technical issues won't do.

What if your boss asks you to build a database to help the government track Muslims/illegal immigrants etc and you're uncomfortable with that?

If you supported the FSF, that might improve your chances of being able to build the database using free software.

Whereas if you unionized, that might improve your chances of being able to refuse to build the database in the first place.

And what if you're uncomfortable with much of the revenue you generate for your company going to the idle shareholders rather than your fellow workers?

Unionizing can help there too. Imagine if software companies were owned by workers themselves. That could be a reality if more of us unionized.
It's not practiced in ND out anywhere else. The export market won't accept it and it's not deliverable against spring wheat futures so it's not marketable and never has been.
I know you mean you say that injustice should not be compartmentalized away, but it's worth making this explicit.

History tells us unequivocally that it absolutely can be.
Just like the good old days with sites built in Flash :)
This is brilliant. The main question, however, is how to do the random draw without collusion with whoever is making the random draw?
Trump, Breaking with Precedent, Won't Meet with U.S. Nobel Recipients
How is that even remotely the point? If you have a huge prison population, your society is unhealthy. Full stop. Even if those people "deserve" to be in prison. If they do, that's the society's failing in successfully educating and raising people to be productive members of that society. It's rotten to the core.
Firefox AGAIN became my favorite. Allows me to control my privacy to the level I want. Great improvements. I believe there is more to come. YAY !!
I don't think he's conflating the two at all. He's just pointing out that the vast majority of streamers start out by building a following around a single game, and very few succeed enough to make decent money and jump from game to game like your favourite streamer does.
Sorry that happened to you. It's insane to yell at a toddler like that, and your parents should have defended you.
There is an app which might be useful for anyone undertaking or starting a FODMAP elimination diet called Monash Uni Low FODMAP Diet. No affiliation; we just found it very helpful to classify ingredients and for recipe ideas while we were new to the process.
> What anti-theft service does ME provide?

"Some of the other modules include ... a system for location tracking and remote wiping of laptops for anti-theft purposes." [1] (link to Igor Skochinsky slides).

[1] https://www.eff.org/deeplinks/2017/05/intels-management-engi...
I think there is a certain inconsiderateness, or like a "fuck you got mine" vibe reflected in things like crowding to get into a subway, or cutting people in line (I hate queueing in China).

I'm not sure I chalk up the lack of TP towards that as much as there being no expectation of offering free TP so nobody does it. For instance there are also toilets in Japan where you have to buy the TP in a vending machine but people there are exceptionally considerate. In many places in Europe you usually have to pay to use restrooms in public places too. Just a different norm.
Have a go at the pomodoro technique.
Blackmail, they get a dick pic and threaten to send it to all your contacts unless you pay up.
Fair question. I could not have done better. But still.
The NEW Front-End Checklist, Dynamic and with Reports
Maybe it would be, but it's generally considered folly to ignore community norms. Based on your response, clearly you know what people actually mean here, but it sounds like you're arguing out of some desire for pedantry, which is not something that goes over well here.
Hey! I just got a couple X62s last weekend.

Quality control is an issue, but only kind of. There's a warranty and the 51nb people are super cool and helpful. Some people go all out with the backlight mod etc, but the only reason I'd do that is improved battery life; the regular backlight suits me fine.

Other than that, it's an amazing machine. I used an X60 for years and it's just like that, but better in basically every way. And relative to other comparable machines they're pretty cheap too.
I'm in too!
Fundamentally a token is good for helping to bootstrap a network effect. In my opinion Token 2.0 models should work as follows. Initial token distribution which seeds the initial network user base, and provides funding for development of the network. Then the token inflation rate should be proportional to network usage rate, where those that add value to the network get a portion of the generated tokens. This is a very general concept, but more concretely works in a model like STEEM as mentioned in the article. Content creation earns you tokens, but I believe the inflation rate is fixed as opposed to proportional to network activity.

The biggest fundamental which I think most people agree on is that Token Value is Proportional to Network Usage Rate. The minting of new tokens needs to reflect this value
Bullying is not racism.

Sure bullying is wrong and leaves victims hurt very badly. For most people bullying ends after a while, when they grow up.

Racism on the other hand is superset of things, of which bullying is a part. In a racist set up you have to deal with discrimination day in and out, even if not physical assault, you still have to deal with lost opportunities, economic hardships and social problems for no mistake of yours.
Absolutely shocked, shocked there is such a dearth of understanding, let alone endorsement of an organizing push in the tech sector on HN. fwiw I'm actually farther to the left of mace, and I disagree substantially with some of his positions, but there are few issues in such dire need of exposure and support. Here's to another year of work and a deeper foundation laid. Cheers to those of you doing this work, you are noticed, your work is not in vain.
I signed up for proxycrawl, used the javascript api to access a SPA website written in React and it just show a blank page. https://api.proxycrawl.com/?token=aDcC1lB-NZ5_r4vMSN-L3A&url... (I don't mind my token is exposed)
Australia's same-sex marriage postal survey: 61.6% yes, 38.4% no
Ha! This is the number 1 reason why I left Facebook too. People just don't realize how much personal data is stored by FB with no way to delete it. You can only archive it.

My ex's new boyfriend shared a bunch of our FB messages with a group of friends because he was jealous.

No amount of security could have prevented that. It's a social hack.

But I've heard of many many cases where Facebook message history has been used to defame someone. They should have incognito channels like snapchat so things just go poof.

You can trust someone now but no guarantee for future trust.
Inside NumPy: how it works and how we can make it better [video]
> "Not being political" in the workplace is a political stance in itself - it's taking the position that the current state of politics is perfectly agreeable to you.

No, not being political in the workplace means someone values their stable income more than they value the need to talk about their opinions.

Even though their opinions might almost completely agree with what their peers think, it's abundantly clear that deviating even slightly from the orthodoxy within tech can be disastrous to one's ability to pay for their home and food.

edit: I can no longer delete this, but I would if I could. I'm not defending nor condemning any partisan stance. I am not stating my own opinion on any matter at hand. I'm giving what I think could be a reason for someone not wanting to be politically active.
I know. The bizarre conflation between advocating for a free market and advocating anarchy is surprisingly common any time the topic of cryptocurrency comes up.
laguinitas? Great brewery; now only if they'd distribute that on the east coast...
Damore wasn't fired for political beliefs. That's a narrative spread by conservatives because it gets people riled up and lets then act like victims.

He was fired because he made statements that pissed off a fair number of his coworkers, and that were not in line with the companies views.