News for hackers. Stuff that matters.

NotThe1Pct

The creator of C++ Bjarne Stroustrup has been banned from Reddit

Apparently the creator of C++ Bjarne Stroustrup had his account suspended by Reddit for unclear reasons. At this point his account displays the "This account has been suspended" message and no further information is available. The account in question does indeed belong to Stroustrup, which in a different occasion has done an AMA (Ask Me Anything) on the subreddit /r/denmark. Link:...

( Read More... | no comments | 7 points | on HN )
Re:Just how smart is an octopus? on Monday January 09, 2017 @12:43PM (#13358064)
3x smarter than a managing director
Re:What was their crime? Feeding the homeless in a park on Sunday January 08, 2017 @03:53PM (#13351953)
Insurance is an imperialist construct of the patriarchal white capitalists. Not a thing for these ideology champions.
Re:What was their crime? Feeding the homeless in a park on Sunday January 08, 2017 @03:41PM (#13351864)
If you feed people in a public setting you need a perm, which is fairly easy to get. My guess they didn't even bother to comply with local ordinances.

So lame I think this was made just to trigger a police reaction for political gain and web hits.

Re:Car allergic to vanilla ice cream (2000) on Saturday January 07, 2017 @10:56PM (#13348156)
I read this story 15 years ago and always cite it.

Pleased to see it again

Re:Tesla Rolling Out Autopilot Software Updates to 1000 Cars on Tuesday January 03, 2017 @05:09PM (#13313613)
For a good reason - safety
Re:Tesla Rolling Out Autopilot Software Updates to 1000 Cars on Monday January 02, 2017 @11:44AM (#13302205)
You dont make 'over-the-air' updates on avionics buddy
Re:Ask HN: Password manager recommendation? on Monday January 02, 2017 @01:13AM (#13299409)
keepassx
Re:Tesla Rolling Out Autopilot Software Updates to 1000 Cars on Sunday January 01, 2017 @11:51PM (#13299121)
BSOD is now literally a scary real possibility

It gives a new meaning to the word "crash"

Now that hedge funds ran out of things to manipulate, the swamp drained itself.
So what I was saying is "Allah has more experience"?
And don't shout "Alahu Akhbar" on a plane as well. That tends to upset people for some reason.
Re:IQ is only a minor factor in success on Friday December 23, 2016 @03:23AM (#13243632)
Willingness to cross the line between crime and honesty appears to be the major factor behind success, to me.

Every successful company has a dark side.

I couldnt really find anything useful in there...
Re:Yes, You Have Been Writing SPSC Queues Wrong on Thursday December 15, 2016 @08:38PM (#13190391)
Quite frankly I wrote this more like an exercise. I have never used it in practice other than the github test. I saw people picking up on the other post and didn't really like the indices going unbounded. Then I spent a few minutes thinking how to solve it.

While I think the implementation per se is not that useful (I agree with you), I believe the actual trick can be reused in a different situation or type of container.

Check out the github repo now, I added a choice of allocator. That is nice because the main use of this kind of tool is when you have a slab of mapped memory that you go partitioning.

Re:Yes, You Have Been Writing SPSC Queues Wrong on Thursday December 15, 2016 @05:41PM (#13189320)
You could use the alignas(64) specifier

http://en.cppreference.com/w/cpp/language/alignas

Re:Yes, You Have Been Writing SPSC Queues Wrong on Thursday December 15, 2016 @05:39PM (#13189306)
Yes, it's not meant to be production ready. Still, the padding you added is particular to Intel/AMD CPUs and this article is more about constrained memory/embedded.

On Intel you would not care about the missing slot when you have 256GB memory available.

I've added the atomic<> in the github and updated the article as well.

However with atomic<> it adds an mfence instruction which is not really necessary and might add a ton of latency.

Re:Yes, You Have Been Writing SPSC Queues Wrong on Thursday December 15, 2016 @01:23PM (#13186796)
My $10/mo shared host is already spinning with ycomb+linkedin traffic. I shall upgrade...
Re:I've been writing ring buffers wrong all these years on Thursday December 15, 2016 @06:40AM (#13183906)
Me too, back in 2005 we were already doing all this. Also there is an easy hack that solves the overflow part.
Re:Ask HN: Senior developers, what would you tell a younger you? on Wednesday December 14, 2016 @08:25PM (#13181524)
I find that refreshing. But for 50% of liberal arts majors, under and unemployment is a hard reality.

http://www.theatlantic.com/business/archive/2012/04/53-of-re...

The problem is not intrinsically the content of the degrees but the fact that there is probably 2x as much graduates being thrown in the market than there are jobs.

DO NOT TALK TO RECRUITERS.

They hate you because you have skills and they usually failed in their careers (or have a liberal arts degree, which is even worse).

They will record and make public whatever you told in private.

They will blanket spam your CV to every corner of the world.

They will lie to you to make you sign it.

They will make you feel worthless so you can accept a lower package.

Re:A Taste of Haskell on Monday October 24, 2016 @08:12PM (#12784065)
I tried haskell queues a while ago - under the advice of a friend and compared with a straightforward C++ queue - it was about 100x slower. Abandoned the idea.
I have used lambdas heavily in the past and then stopped. Getting away from the rabbit hole that are lambdas + SFINAE + variadics increases productivity immensely.