skysight-inc/HackerNews huggingface dataset:
@malkia, jerf, smeterdemon bluGill

Ok first thing first.

Like I said for some specicial resource constrained system abort() can be a viable solution, or if you just don't want to deal with any resource allocation failures.

In general though if you have a std::vector and a push_back throws bad_alloc, that bad_alloc really only pertains to that particular vector using that particular allocator.

If you assume that a bad_alloc coming from anywhere indicates some kind of system/process wide condition you're assuming too much. UNLESS you've designed the system, i.e. in this case the allocators and such and know this assumption to be true, otherwise no.

Additionally consider a case where your code is for example reading some data off a disk in a loop and the Nth iteration and push_back throws, the stack is unwound, the vector is destroyed and the memory it consumed before is released. In a "normal" application the bad_alloc can propagate up the stack until it's handled by whatever strategy that the application uses for general resource failures.

The two takeaways here are that bad_alloc doesn't really indicate any system wide condition (unless you know that it does), so don't assume such.

Secondly bad_alloc is just like any other resource allocation failure. If your application aborts() when it cannot open a socket, that's fine. But if it doesn't, then why would it abort on memory allocation failure?

And I really want to stress here that bad_alloc doesn't mean same as OOM for example from the kernel's perspective.

It really only pertains to a particular allocator, UNLESS you KNOW otherwise.
"Eat the Frog First"

Knock out the most daunting/hardest/most stressful task first. For me that usually involves phone calls (yay social anxiety). First thing I do every morning is make sure all my phone correspondence is taken care of, that way I don't keep putting it off all day.

For general focus trouble - meditation works wonders. After getting the basics down you will be able to clear unwanted thoughts from your brain as easy as you swipe-up to close iphone apps.

Also this is personal so YMMV, but I realized my morning coffee was more habit than useful. Since I started skipping my morning cup I'm less jittery, less tired after noon, and the one cup I do drink makes a much bigger difference.
https://news.ycombinator.com/item?id=14423813
More Power? (2011)
Isn't that what the traditional 3d visualization of a hypercube is? e.g. https://en.m.wikipedia.org/wiki/Hypercube#/media/File%3AHype...
Let me correct this, the idea of forcing checks is a horrible idea mostly because it only hurts the people that have done nothing, and is a massive invasion of privacy
They do, it's referenced at https://blog.codinghorror.com/your-password-is-too-damn-shor... which linked in this post.
GNU is more than a collection of programs; it's an operating system:

https://www.gnu.org/gnu/thegnuproject.html
There's actually two 1-bit things going on with CNTK 2.0.

One is the 1-bit SGD that has long been in CNTK and has been criticized for its weird license. I am not a lawyer, but my understanding is it says something like you cannot use this unless you call it from inside CNTK. The terms are not that bad and you don't have to use 1-bit SGD if you don't like them.

CNTK 2.0 has another 1-bit thing going on as well which is binary convolution. This uses the Halide compiler to generate code that is 10x faster than optimized 32-bit convolution. This still seems to be at a proof of concept stage.

Disclaimer: I work at Microsoft.
Will this be based on Azure notebooks or otherwise cloud based + free?
https://link.springer.com/chapter/10.1007%2F978-3-540-28628-...

https://link.springer.com/content/pdf/10.1007%2F978-3-540-28...

Abstract:

"In this paper, we study the existence of multicollisions in iterated hash functions. We show that finding multicollisions, i.e. r-tuples of messages that all hash to the same value, is not much harder than finding ordinary collisions, i.e. pairs of messages, even for extremely large values of r. More precisely, the ratio of the complexities of the attacks is approximately equal to the logarithm of r. Then, using large multicollisions as a tool, we solve a long standing open problem and prove that concatenating the results of several iterated hash functions in order to build a larger one does not yield a secure construction. We also discuss the potential impact of our attack on several published schemes. Quite surprisingly, for subtle reasons, the schemes we study happen to be immune to our attack."
So I accidentally wrote a linux security module
What Really Happened with Vista
I absoultely agree that this is a horrible ivasion of privacy and that thinking of this happening sounded crazy months ago, yet now i wouldnt be surprised, my appologies if my tone was off in the original comment, the point i was making is that this is only going to hurt the people who have done no actual harm
For point 1, if you're writing a multi-tenant app it's good practice to put the tenant id on every table and always filter on it. This lets you be doubly sure of fetching the correct user's data, leaking user data is worse than a bit of overhead. The alternative is always joining back to a table with a user id.

As a plus in with DBMS that allow you to set the physical ordering on disk (MS SQL Server's clustered index for example) you might actually improve performance by distributing rights to multiple pages and improved locality of data for per-user aggregations. It depends though.

For point 2, sometimes these things happen. Through mistakes, design or just bad design. Best to protect yourself against cross-user data leaks.
all right, fixed, sorry about that
Interesting that he doesn't mention the Higgs.
For this kinds of thing, I am thinking that it might be worth it to do a "web browser" mode which uses 128-bit vectors and a "web server" mode which use 256-bit.
The next major of Tableau should be implementing NLP in similar fashion.
Valve Announces $100 Steam Direct Publishing Fee
In most places, they literally can't offer lower compensation without breaking minimum wage laws.
Yes. I'd love to play around with that in a sandbox.
I agree, and thats horroble, the idea of this requierment is only going to hurt the people that have done nothing wrong is the badly worded point I was trying to make
This is a fine "long answer" to the question how do I write C++ on bare metal?. The short answer is don't, medium is if you don't know why every major operating system at every size is written in C, then you have a lot of learning to do.
Learn to be a convincing liar. Once you're "in", go back to your mindset.
is Argon2 ready for prime time and tested?
Show HN: Single product variations in your WooCommerce product archives
the problem is once you get to 10+ char passwords the common password list gets really tiny
I was being a touch sarcastic. Everyone does this to enforce the laws in their jurisdiction.
> Going forward, I’ve asked that every injury be reported directly to me, without exception. I’m meeting with the safety team every week and would like to meet every injured person as soon as they are well, so that I can understand from them exactly what we need to do to make it better. I will then go down to the production line and perform the same task that they perform.

This is brilliant. Better make sure you were actually hurt before reporting something to the boss, so the numbers go down. And if there actually is a problem, its sure as heck going to get fixed before or while the CEO has to do the same task. I like this guy :)
Why a box and not a hyperbox?
Some of my favorite issues are the ones with ultra hard IQ tests, the LAIT, Mega Test, and Titan Test, which appeared in 1979, 1985, and 1990, always in April. Some info on those tests is available at miyaguchi.4sigma.org (or simply 4sigma.org).

Sample question from the Mega Test: What is the maximum number of completely bounded volumes that can be formed by three interpenetrating cubes, considering only the surfaces of the cubes as bounds and counting only volumes that are not further subdivided?
It works! I compiled it with `gcc j.c -m32 -o j` and it runs now. Awesome.

Thanks for the helpful example program.

EDIT: Sort of. `5+10` crashes, as does `a=5 \n b=10`. But single digit numbers work, so this is pretty cool.
I asked HN about changing my handle which I made long back, they said something similar to "we dont have the technical expertise to change it". If an HN moderator is reading this. Well its for you.
Is walmart not proof that the answer to your question is quite a long time?
We've asked you before to stop posting unsubstantive comments. If you keep doing it, we're going to end up banning your account.

We detached this comment from https://news.ycombinator.com/item?id=14470829 and marked it off-topic.
I agree, thats why this is a horrible way to check intent as its purely subjective 90% of the time, this is really only going to hurt the people that have done nothing wrong
Very cool! You're the last one here? http://s3.bslabs.net/wwdc/1997/401%20Web%20Server%20Programm...
California law requires companies not expose their employees to such things...
I've run a French company for almost a decade now. Their efforts to have a "European" company are nice, but perhaps naive.

The main reason to incorporate in a particular country is because you have employees there. You book the revenue in that country, charge VAT in that country, pay employees there, and pay taxes there.

When you incorporate in one country, but have employees in another one, it just makes life difficult for everyone.

For small companies, the simplest solution is to have "out of country" people be contractors. If the company gets large enough (2-3 people in a country), it's worth creating a subsidiary.

And yes, the subsidiary and parent have to exchange contracts, invoices, etc., just as if they were independent companies.

Europe just isn't set up to have an "EU" company, with "EU" employees. I don't even know what that would look like, as each country is in charge of it's own social programs, taxes, etc.
"Do you mean from the young to the old?"

I'm thinking of wealth as the claim on productive assets such as stocks, bonds and property. Pensions are a structured transfer of wealth from the old to the young and of labor from the young to the old.

"I can't think of the mechanism..."

Inadequate savings can create structural problems that result in temporary mismatches between the desire to work and the desire to consume.

For example if retirees are worried that savings or pensions are inadequate they may delay consumption which can create temporary high unemployment.
Toyblocks: A toy blockchain implementation in Python
I wrote this tiny toy blockchain code to help myself understand blockchains, based largely on the UI at https://anders.com/blockchain/ by Anders Brownworth.
So, keep in mind that my experience with Go is not at a professional level. Take this example:

https://gobyexample.com/channel-buffering

As far as my understanding is concerned, channels are a way for goroutines to pass data between one another, correct? Yet in this particular case, the channel `messages` is operating in the same manner as a generator or array. So, am I creating goroutines by passing messages to the channel or am I just using the channel as a simple buffer?

This example helps as well: https://gobyexample.com/channel-directions

Am I implicitly creating goroutines by using channels or am I simply creating a buffer?

Sorry I don't have any of my own code to share as I deleted all of my Go practice stuff.
That depends on how big the available labor force with no better offers is, and what the rate is at which people from outside that group move into it; potentially indefinitely, under the right (or very wrong, depending on your perspective) conditions.
Did you read the article? She finds that the typical pattern of men dating younger women is true, merely that there are more exceptions than one might expect, and that older women have decent success rates with younger men. Note that "younger men respond better to older women than older men do" doesn't in the slightest imply that younger men prefer older women to younger women, or even that older women prefer older men. Despite the headline, it's not shocking. And since OkCupid publishes lots of these "response rates by category" blog articles, I'd imagine they have the math down by now. (Not that they're exactly doing statistical validation on this, but still.)
Dynamic allocation is banned for many bare metal applications. Dynamic allocations make it harder to reason about worst-case memory usage, especially with fragmentation.

I find the improved initializers in C++11 a very nice addition for such usecases. One can use a struct for the application state (with struct/std::array members etc), and initialize it statically in one statement. Nicely declarative, space/code efficient, and with good type-safety.
Please see my reply to __ph__.
On a happier note, also don't forget 'Star Bright', by Mark Clifton (1952), online here: http://www.astraeasweb.net/politics/starbright.html
I'm not sure how modern hashes fare in this regard, but one issue is that hashing a hash reduces your input space from all possible passwords to all possible hashes of the first hasher.
What else do they have other than itunes (which only exists to sell iphones, ipads etc)?
I don't think RAII is a concept complex enough to write a book about it... Probably a blog post or Wikipedia page is enough to explain it fully.
> Without exceptions most of your STL containers become unsable, unless aborting is an option when otherwise bad_alloc would get thrown.

On bare-metal, you probably want to be using std::array<> most often (Thanks C++11), which I don't believe have any errors or allocations.

Dynamic Memory is useful in application code, but under bare metal... its often less useful than carefully managed static allocations. Or perhaps... carefully managed static allocations (std::array) are easier to "prove" that edge-cases won't happen.

---------

Something like std::vector or std::unordered_map which reallocate themselves and moves all around memory seems like a huge, unnecessary complication in memory-restricted situations that warrant bare-metal coding.

I guess with a proper std::Allocator class, std::vector and std::unordered_map would be useful. But... that gets complicated. And not very many C++ programmers are aware of how to use "Placement New" or other allocator features. Its probably best to just stick to the simple std::array and avoid dynamic memory.
If you want Walmart to pay a "living wage" for the bottom 50% of their employees - then you're asking Walmart to fire a million people in the next decade.

Walmart's net income has been declining for years. Their sales have topped out. Their margins are razor thin. Amazon is beginning to cut deeply into their business. Some non-trivial percentage of Amazon's growth over the next ten years must come directly from Walmart.

Walmart is in trouble, Sears style circa 1990. And you want them to raise wages significantly when they already can't afford the employee base they have. Good luck.

How does this sound instead? Fire a million workers, try to get the sales to employee ratio closer to Costco by automating anything and everything they can. Then raise the salaries modestly of the remaining million employees that are higher value labor. Then the fired million people become 100% subsidized by tax payers because there are no jobs for them and are not going to be. Nothing can stop some variation of that scenario from happening, the only thing slowing it down is the low cost of the labor in question. Raise that cost, Walmart will be forced to accelerate the employee reduction as their net income continues to contract.

Your sole choice re Walmart & a living wage, is full government subsidization of the low skill employees, or partial. Besides, Canada, Australia and every European welfare state uses a public subsidization system for low value labor: the top 50% pay for the welfare (healthcare et al) for the bottom 50% that do not earn much (who do you think is paying for the welfare costs of France's perpetually high unemployment rate?). If you take a job in the UK making minimum wage, you are not covering the cost of all of your benefits such as healthcare, and the UK has a relatively low corporate income tax rate, who do you think is subsidizing that low pay rate on the labor? This is common all over the developed world.
NO EXCUSE a Way of Life for Founders and Entrepreneurs
http://jabberwockland.blogspot.com/2007/03/mimsy-were-borogo...

My favorite short story of that era. Still have not watched the movie out of sheer fear they didn't get it and I don't want it wrecked. (Still have no idea how that even made it out...)
>Rich countries don't have more babies than poor ones, its the opposite.

Rich countries are market democracies. They have the proper social constraints.

In a market democracy it's more like you described, but not entirely, there are plenty of people who abuse the welfare systems to have as many children as possible for the tax credits and other benefits.
>The Jews can still pretend that running a wire loop around an area of town changes the rules inside it?

Lol, definitely. I love when people try that stuff. Advanced metaphysical special pleading for the win!
Thanks for summarizing. I completely see your point, but I want to explain in a little more detail. Wasn't trying to insult anyone!

> A. You assume young people are "really good individual contributors" and older people aren't, which is very often exactly backwards.

Not my assumption. But, as someone ages, if they are an excellent individual contributor, they often find themselves in management roles. There are exceptions, but the real problem is that as people age, they want to be called "people managers". And, startups don't need people managers, they need contributors so there is a mismatch.

If an older person only wants to be an individual contributor, there are of course places for them, but my contention is that the cross section is extremely small. I can see why it seemed insulting, that isn't want I meant.

> B. It has been my experience that startups often hire people with management experience as they scale.

Sure, they do, but more often than not, they are hiring their strongest individual contributors from within. Only a small percentage of people hired are hired from very senior roles.

> C. Your assertion that young people don't want to manage old people is unsupported and pretty much just sounds bitter.

I have worked in 3 large organizations and 2 small organizations, it is extremely rare for a younger person to hire someone older than them. I cannot imagine that there is evidence counter to this claim. I have seen it repeatedly.
This is a common sentiment, but it's misplaced. Cities don't speak with a single voice; it only takes one or two malcontents to make a statement that hits the news. They don't speak for everyone, or a majority, or even necessarily a significant minority.

I've traveled pretty widely and experienced a small amount of mistreatment. In Oaxaca, some faceless person threw a rock at me from a building across the street (missed, fortunately). That doesn't change the fact that almost everyone I met in Oaxaca was wonderful and I look forward to going back.

I've been to Barcelona recently. I have friends who live there. It's a pretty great place to be a tourist! Although personally, I'd recommend the north (especially Pamplona & Logroño) because the wine is better and cheaper :-)
Why is it our job to determine how much time they chose to spend working? It seems kind of condescending to say that we shouldn't give them the choice to make a bit more money because we think they should spend more time with their families.
Microsoft.com News: Mac
No matter what you're replying to, it never helps to post uncivilly like this. In particular, the claim that HN is full of <derogatory partisan flamebait term> is the worst kind of unsubstantive tedium.
> Theoretical physics cannot be separated from that

Sure, but books on theoretical physics seem to rarely mention empirical verification. It's mostly math, and I am not sure what is left if you remove it (as known).
Mine too! Though some have accused me of bias in that regard...
"I’m meeting with the safety team every week and would like to meet every injured person as soon as they are well so that I can understand from them exactly what we need to do to make it better. I will then go down to the production line and perform the same task that they perform."

Whether it's true or not, once again Elon's genius shows in a solution that makes him a PR dream for his companies and a titan leader for his employees.
THIS.
As someone always dealing with data, I agree that getting to the point of a regression plot is where all the work is at.
I don't live in Barcelona, but the well-being of a city residents is more important then the well-being of its visitors.

They are the ones that have to live with the consequences.
A -quite old[1]- estimate puts it in 20-40% of the total time should be spent writing documentation. If you find any newer reference please let me know, I'd love to quote it in my project to write project's documentation [2].

[1] http://www.techrepublic.com/blog/10-things/10-things-you-can...

[2] https://documentation.agency/
>Some of the smartest people in the world work hard to make the site more addictive.

This is a truth most people seem naively oblivious to, they seem to have this idea in their mind that they are immune to persuasion. It is simply not the case, if you are human you are suceptible to unconscious and conscious persuasion.

A famous result concerning this is the 1984 book "Influence: The Psychology of Persuasion" by Robart Cialdini.

https://www.goodreads.com/book/show/28815.Influence
The problem with The Mythical Man Month is that it contains brilliant observations about software development in general, as well as brilliant observations about developing huge mainframe operative systems at IBM in the 70s.

It's hard for most non-professionals to tell what's what.

I would have liked to write a readers guide or something, but I don't think it'd be as good...
Show HN: Hotbar interface for the web! (ideas/feedback welcome)
Windows is well known to have portions of the kernel written in C++, and MacOSX has huge portions written in ObjectiveC. The greater part of Android is Java-based.

Only Linux is really purely C-based, since Linus really hates C++ with a passion. But there's a reason why even the GCC project has moved over to C++.

http://lordjeb.com/2013/09/19/modern-c-in-the-windows-kernel...
By the way, this is Gary Bernhardt's personal site. His
lightning talk "Wat"[1] from CodeMash 2012 was one of my all time favorite talks, witty and right on!

[1] https://www.destroyallsoftware.com/talks/wat
That just isn't true at all. In fact, it's patently false.

https://well.blogs.nytimes.com/2015/12/24/the-doctor-as-moon...
30 year old men do not very often prefer 65 year old women.