skysight-inc/HackerNews huggingface dataset:
From our experience using Python, structure through indentation when coupled with the ability to mix tabs and spaces creates many troubles. Getting rid of tabs was a small price to pay to eliminate these issues.
Hey there. Just wrote down a few things that came to my mind after seeing this. Don't see it as criticism, but as a few hints/remarks what has to be covered by a websocket (or any other protocol) implementation. Imho the high performance part isn't too hard to achieve and shouldn't be the highest rated. The important thing is that such a server should be rock solid in implementation, otherwise it's worthless.

Some things that you should answer if you are offering this as a C++ websocket library, and which are currently not covered in the header file:

- Whats the threading model of the library?
- Will server.run() start a singlethreaded eventloop (I guess so from taking a supershort peek into the code and seeing libuv) and everything is running inside there or will it start multiple worker threads?
- Based on the last question, from which thread[s] are the other callbacks called.
- If multiple threads are used, is the library threadsafe for sending messages from other threads
- Is it integratable in other eventloops? Most applications already have a mainloop or something like this, libraries which only work with their own mainloop are not very useful. Normally applications also have to deal with other application logic besides responding to websocket messages.

Besides that a few general questions that you should be able to answer for a websocket implementation:

- What's the sending behavior of socket.send?
- Will it block until all data was sent? This can cause problems with slow receivers in singlethreaded environments.
- Will it copy all data and buffer it internally until it can be sent? This provides no means for backpressure and slow receivers (or non-receivers) can exhaust the servers memory.
- Does it handle connection close properly? This is unfortunatly not too easy in websockets.
- And are there timers in place for force closing the connection if the shutdown sequence is not completed properly? Or if the initial handshake is not completed in a given timeframe?
- Does ist handle control frames? And will it merge control frames (PONGs) if multiple are queued before they are sent? And will it stop sending them after close connection is initiated?
This is not specific to technology and can essentially be traced back to capitalism for every industry. Businesses have nothing to gain by making product decisions around "will this help the customers well being". If it does not help them sell more, do more, make more it does not matter. All consumer facing companies apps, games, food, travel they are all gamified to grow the business regardless of whether there is a government agency to influence them. I'm all for making product and business decisions around these ideas but these psychological tricks have been applied to consumers for decades long before the Internet.
The small size for a movie theater soda often starts at about 24oz. Getting less than that is not an option. There's been studies that when you put more food or drink in front of someone, they'll consume, even if they aren't particularly hungry or thirsty. Hence, the inflated soda sizes were adding thousands of extra calories that people otherwise wouldn't have wanted.
The broken window fallacy isn't concerned with the local economic benefit for the app developer but the total economic benefit of society. A user who is addicted to an app may be using that app far past the actual utility they are deriving from it -- the app developer is encouraging them to mismanage their opportunity costs and in aggregate creates negative productivity across the total body of all users. It might be good for the VCs, but is it good for society?
It is quite fair to blame hippies for ignoring science. Propaganda works on everyone. It is nobody's job but your own to do due diligence.

Yes, the media, politicians and so on has a tendency to proclaim falsehoods as facts - nutrition advice and policy being a great example - but our legal system requires a modicum of intent to assign liability, just as society accepts that requirement for blame. (Blah blah criminal negligence other exceptions I fucking hate how defensively I have to write on the internet these days just to get a point across without leaving a tiny detail open for someone to slam for karma).

>But your fact is just another one's opinion.

That is a very dangerous perspective. Our understanding of the universe is always changing. But eschewing accepted science without a compelling alternative because it could be wrong is a path to nowhere but President Trump.
Well, they can start by fixing their localization. I'm currently in Amsterdam and thought I would try it just now, but I get "country.price.1 country.currency" listed under subscription cost.
I don't mean people are getting brain washed, just that they may not be expressing their views freely. Being willing to complain to strangers has huge cultural significance.
Documents are the new Email
Thanks for trying it out. We'll make a note to point out the restrictions on tab characters earlier.
> You can use // to get integer division more consistently

Exactly. / in Python 3 now consistently means "real" division. If you intend integer division, you can explicitly say that with //.

Apart from breaking compatibility with Python 2, I don't see any reason why this isn't 100% better/clearer/more consistent.
How to Create a Sticky Product Like Facebook and Evernote
> Is there any other dedicated button

If you go for a 122-key or 127-key keyboard like these:

* http://casasbahia.com.br/Informatica/AcessoriosePerifericos/...

* http://buscapro.com.br/Teclado-Multimidia-Usb-Abnt2-Portugue...

... then the dedicated buttons are the "forward" and "back" keys on the top row.

In 554 comments discussing "power users" and "people who use keyboards for absolutely everything" I think this to be the first mention of the forward and back keys on "multimedia"/"internet" keyboards. Do "power users" not lust after keyboards with lots of keys any more? (-:

Here's one with a telephone, as well as "forward" and "back" keys for WWW browsing:

* http://www.compulogic.com.ar/catalog/product_info.php?cPath=...

Historical aside: The "Space Cadet" keyboard actually had fewer keys than these.
The existence of alternative browsers. If your company is relying on Flash, Chrome just put itself out of the running for being your enterprise's solution. By all means, use the browsers you need to get your work done.

The fact this is a price Chrome is willing to pay indicates just how dead Flash is, and how much browser vendors are willing to kill it.
I don't think you're correct. If you, the designer, made those operands, you should expect them to be int() or float() because of how you created them. int() and float() have lots of other differences beyond just how they're treated by division.
Airbus unit unveils 3D-printed electric motorcycle
> One basic travesty not covered in these comments is that a jury of people who have zero clue what software is or how they work are being asked to judge an entire industry on a topic they can't possibly understand.

No, they aren't being asked to "judge an entire industry on a topic they can't possibly understand". They are being asked to answer fairly narrow questions of fact about specific actions of specific firms.

> Sadly in civil cases the concept of a jury of your peers is not a right. In reality a jury of software engineers and the like would make more sense since they at least understand how software is put together.

To the extent that a "jury of your peers" is a right anywhere in the US (the phrase isn't directly used in the Constitution at all, though the right to trial by jury is held to extend to it), it is, in fact, a right in most federal civil lawsuits with more than a trivial amount at stake. But the concept of a "jury of your peers" never meant people of like specific profession, it originally (in the Magna Carta) meant specifically rather than arbitrary justice of the king, nobles had the right to be tried by fellow nobles, and came to extend to the idea that other defendants have the right to be tried by a jury of the general citizenry. Which is the case with modern jury trials in the US today.

> But that won't ever happen in our system because of the complexity of defining a peer in what might be an arcane specialty (not software but other things).

No, it'll never happen today because that's never what a jury of peers meant in the first place, not because the concept is difficult to extend to arcane specialties.
Ask HN: CRM – Which one do you use?
We're a small startup. Currently we are using Pipedrive but as far as I can tell, they don't offer insightful reporting. We don't want to break the bank and move over to Salesforce just yet.

What would you recommend?
Dying PS4 and Xbox Get New Lease on Life
Startups typically have a lower age average. Younger people have a different drinking culture. Startups reflect that culture.

When the founders themselves have just dropped out of college (or graduated from it) and most employees are of a similar age with a similar background, it shouldn't be a surprise to anyone when those companies have a culture that strongly resembles that of college life.

External funding magnifies this phenomenon (because if you don't have to sustain the company by being profitable you can get away with behaviour that would otherwise seriously impact your profitability).

This is nothing new and it's not about drinking. Look at startups during the dot-com bubble: at Netscape some people actually lived in the office (at least during some critical periods of the company). Only a few years ago there was a large concern over "brogrammers" who introduced a sexualised, physical fitness oriented "bro" culture into programming communities (especially Ruby, because a lot of startups were heavily invested in Rails).

I'm not saying this is good or bad. I'm not saying excessive drinking (or sexism) isn't a problem. I just don't think looking at it as an isolated startup problem only gives an incomplete perspective.

And I'm saying that as someone from a country that considers America's frat and "spring break" tradition extremely weird (beer is 16+ in Germany and student loans don't exist to the same degree as in the US, so "spring break" usually just means working a lot).
He had me until the end.

"People’s time is valuable." True

"And we should protect it with the same rigor as privacy and other digital rights." LOLOLOLOL
I find the outrage about 'yet another chat app / why did you start over from scratch / why not replace Hangouts' interesting relative to this statement from the article:

> Allo is fundamentally different in this way than Hangouts or Gchat.

So either Google can merge Hangouts/Gchat into Allo, and this Vice author gets upset, or Google debuts 'yet another chat app' but then everyone's confused/annoyed there's so many chat apps from Google.
I also miss JavaFX Script.

In my head it was destroyed by trying to improve it.

IIRC the first versions just worked and was amazing with live scripting etc. I even made an applet that was popular for a while.

Newer versions added more and more complexity before you could get anything done (again IIRC).

Feels a lot like Symfony: started small and focused and ended up as multiple smaller projects including a dependency inversion container but at some point along the road the magic was lost.
Or, he might be being sarcastic about how paranoid today's generation is, we'd never know without an explanation.
List of Cognitive Biases
the author doesn't seem to know much about how the internet works, quite frankly. they assume that there's some inherent level of privacy in any chat that isn't e-to-e encrypted. for instance, with FB:

"With M, you are speaking one-on-one with a bot, the bot isn’t monitoring every single thing you say to your friends."

how is that even relevant in this context? you're not comparing Allo to M in isolation, you have to compare it to both M and the Messenger product. in that case, FB is obviously harvesting data from your conversations. even if it is just to train M on how to communicate (a very big if) they would be insane not to.

the author doesn't understand much about the ecosystem as a whole (and considers Allo to be a market leader before launch). lazy reporting, and quite disappointing.
The manager in the first story is absolutely egregious, passive aggressive and should probably be reported to HR
Functionally, Chrome is "paid for" by userbase. Google has plenty of signal to figure out if this change is going to turn people off from using it.

Looks like they also have signal to suggest it's a gamble worth taking.
Yes. I understand that.
This is extremely cool, however the source code does look a little different than the output (the output only has '#' chars, but the source has letters and other chars besides #). Does that still count as a quine? (don't really care though... this is very cool).

Any idea how this works? It's just to much for my mind to bear I think.
Many TV shows are not on Youtube at all except as unauthorized uploads. Should Fox be unable to issue a takedown on an episode of the Simpsons that's been uploaded since before they uploaded a copy into ContentID?
Is there a standard way of doing HTML5 audio?

By which I mean, a standard that works cross-browser? ;)
Hey man, don't let them troll you.

When reading your comments and code on the web, it seems like you're really an awesome dev, but you give in to hate comments by such people too easily.
It's not "technology" that is hijacking people's minds, it's specific companies who are doing it. You don't blame the magician's hat for fooling you.

The problem, as usual, is that technology is slave to the boring, insipid demands of capital to get us to click on ads and purchase more snow-pants.
Yes! You're correct. But its not the same as, "If you default on you credit cards or other debt, your life is ruined."
I agree. And if you're into numerical Python, sticking with Python 2.7 is standard. Why would you migrate to Python3 when there is no performance benefit in numerical computing? If you're going to migrate may as well migrate to what will improve performance on the non-numpy bits (pypy) than a migration just for the sake of migrating (py3).
Germany’s Energiewende: The intermittency problem remains
This kind of thing doesn't work. "Don't use X" is not advice most people are equipped to follow, and most of us who aren't trying to avoid prosecution from a state actor mostly end up wanting to talk to other people and so follow the herd no matter what our own preferences may be.

What's the solution? Instead of writing "Don't use X," write "Use Y." Don't use X, on its own, isn't actionable advice. Use Y can be.
this! and i wont have to update flash every few days because of its terrible security.
> Glen[sic] Beck represents the more 'religious' aspect of the far-right

The article linked is not based on a religious view. In fact, the only mention of religion is a comment intended to ridicule the comments of others at the table from the right who Beck implies are being morally inconsistent.
It has been said posting code on HN a literal "Trial By Fire",

But reading the comments in this thread this has gone overboard....to the point I, as a casual observer, had to say something.

I agree, "clearly written by someone who doesn't know the language well", _IS_ a direct attack on the developer and not the code. And I couldn't comprehend the mental gymnastics it would take to explain otherwise.

There is a major difference between:

"Why did you implement your own Queue here?"
and
"This guy doesn't understand C++. Don't use his code."

Don't let them win by giving into replying with a "Redditor" form of rebuttal filled with snark.
You only use it to meet the spending requirements for the signup bonus. For example the Slickdeals home page has the Chase Sapphire right now: "50k Bonus Points ($625 towards travel) w/ $4000 Spent in First 3 Months of Account". Other cards have similar spending requirements.
Red herring. Has that happened yet? Can we talk about it when it does?

Making the bullying of homosexuals (esp in the workplace) "not cool" is one of the proudest achievements of the "SJW's" you so derisively mention. The message is pretty consistent. Don't punch down.

P.S: "maybe some tech CEOs that supported prism-like initiatives should also be ousted",
I would love it if that happens, unfortunately, supporting prism-like initiatives might make them more money. Board's voting against making money doesn't make sense. Maybe if we could create strong a loud dis-incentive against this, the board would react as we expect but then again Glenn Beck doesn't like this kind of corporate shaming.
If you are looking for an excellent book about what Robert Moses did for/to New York, I would recommend the Power Broker by Robert Caro (who is also known for his (ongoing) definitive biography of Lyndon Johnson):

https://en.wikipedia.org/wiki/The_Power_Broker
Alternatively, 7 centuries without new lasting wealth / dynasty's. Clearly, some groups understand how to maintain wealth, but for most newly wealthy it's easy come easy go.
It's the "there's nothing more intolerant than an open-minded liberal" problem...
Well, he states in the article that supporting both makes his job as a library writer more difficult. That seems entirely reasonable.
Sure we do. Cap and trade. Boom.
Game Accessibility Ratings
Have you considered that the manipulation of people's minds in consumer societies might actually be part of the reason why there is so much exploitation of people in more vulnerable communities?
Ask HN: How can this online resume be improved?
Can you do a multi-page on this? Like having one link to another page and parsing another jason?
That's not my point, but close to it.

The ransomware, while still in silent mode, will decrypt the data before the backup software sees it, so that the backup software doesn't see any changed data.

The ransomware could, however, know about a fixed set of backup programs, and, when it detects one is running, silently encrypt (parts of) backups of old data.

Things will get complicated for the ransomware, though. While in stealth mode, it must be smart enough to discriminate between files it encrypted and those that it didn't encrypt (yet). Otherwise, a test restore could fail. I would use an extended file attribute or a separate database (would be a single point of failure, but hey, it would not be _my_ data) for that, but from what I read here, lots of ransomware just encrypts everything in a target directory and then uses 'everything under directory foo is encrypted' (that should be done in a transaction, but ransomware writers wouldn't be too concerned about that)
As a new user my first post got deleted?
It looks like my first post disappeared or became invisible as soon as I posted it.

I'm not trying to be a spammer! I just asked a legit question, though maybe a boring one.

What did I do wrong, and how can I do better next time?
That's brilliant, thanks for the reply!

Good call on getting something out the door quickly and waiting for feedback. Not sure you need to support both YAML and Hjson, just one human-friendly format would be enough, especially as the conversion is easy enough to automate.
Previous discussion about Taleb's view on this:
https://news.ycombinator.com/item?id=7064435
You obviously have strong options about this. That said let me offer you a bit of advice.

I don't care how good your code/framework is if you blow up on just a minor bit of criticism. This is a great example where some comments in code could help teach people who don't know better.

Long gone are the days where the solo programmer could make important software without interacting with the rest of the outside world. Knowing when to check your ego at the door is just as important as getting the technical bits right.
timewellspent.io contains a perfect example of indirectly hijacking our agency: the video play button.

That little triangle has almost become impossible to resist. My two-year-old can spy it from across the room and he runs over and begs me to click it.

What if we stopped using icons that have programmed our brains?
I'm glad you posted this. It is all about trying to drive habits just like cigarettes which are specially engineered.
Or sarcasm. One or the other...
That is true. But they are in a position of incredible power.

They have control over a lot of what people see online, by virtue of controlling what people find when they search. They're so ingrained in society that they're a verb. Their staff have had remarkable access to the White House and other government institutions.

No, not a monopoly...but they're not far from potentially becoming one.
"Open Web" includes online commerce. It's still open even though people use HTTPS-encrypted data streams, for example.
No it hasn't. It's just been a demand from media execs that distribution networks are forced to implement.

Netflix is competing with free and winning -- they've created something that's actually more convenient than piracy. I can already download everything on Netflix from my friendly local piracy site, but I don't because the eight bucks a month is worth less than the time I would waste pirating it.

Hell, Netflix could put a download button next to all their content and I bet it wouldn't affect piracy. The value isn't in the content but the distribution network that's so good even pirates can't compete with it.
"you, the designer" may not have created the operands, just taken them as function arguments. Sure, you should have written tests for different types of input, but if you didn't, it may surprise you later.
If credit card processing fees are so high as to encourage small businesses to refuse payment by credit cards unless the total exceeds a minimum sum, I would hardly call that revenue "negligible." Otherwise, there would be no reason to offer (paltry) "rewards" points.

Not to mention, people who regularly pay off their card in full are more able to spend far more than than their credit limit in a given month.
Google CEO Sundar Pichai Confirms 'Area 120' Corporate Incubator
I'm not sure what you're talking about. The output is the entire source with the central globe rotated by a user-selectable number of degrees, including 0. The output isn't just the globe in the center.

Edit: Ah, nvm. It looks like this is a Javascript port of a famous Ruby quine from 2010, the Qlobe[1].

[1]: http://d.hatena.ne.jp/ku-ma-me/20100905/p1
I remember when this one was released and we were passing the link around on e-mail threads in the office. It's pretty amazing and insane.
That doesn't necessarily contradict the proverb. It's saying that somebody who starts out poor and then rises is still likely to have descendants who are poor. That is actually a statement that social classes are sticky.
Yes, hate crimes are generally defined by the perpetrators motivations.
What equations are Google Docs "Insert Equation" feature incapable of? As for Microsoft taking your privacy more seriously are you implying that Google doesn't because I seem to recall Microsoft being the first company to sign up for a NSA membership in 2007.
Seneca on Drunkenness: https://en.wikisource.org/wiki/Moral_letters_to_Lucilius/Let...
> I plan on porting what I have over when 3 actually gets over the hump but not before.

Don't you think that mentality is part of the problem?
For dense city cores I'd prefer parking at the edges (part of the city) and forms of people movers (think caves of steel / tomorrow land belts).

For other places I agree that eliminating street parking is ideal, but believe that more underground/in-building parking is necessary, with enough space for useful vehicles to park safely.
I'm fairly sure `#!./quine` will cause an error because there's a limit of 5 recursive checks to find the interpreter of a script (fs/binfmt_script.c).
Even seatbelts kill people, but we still wear them because it's more likely that you'll be killed by not wearing one.