Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

2401.

Ask HN: What is difference between C++ Concepts and Protocol programming?

1 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

I can highly recommend the book "Ravens in Winter" that shows just how complex and advanced the social structure is of these birds.

2403.

Ask HN: What is difference between C++ Concepts and Protocol programming?

2 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

The implementation of variant in C++17 is very different than in Boost. The Boost variant has a double buffer for the entire variant, and one of these buffers is always kept on the heap even if your variant is on the stack! This acts as a safety net incase the changing of the variant's value were to throw, you can get the old value back.

This implementation did not fly for C++'s goal of being high performance, and thus the new standardized variant is done quite differently.

comment 10y ago · link · parent

Bolding and capitalization are not wasting words, however.

comment 10y ago · link · parent

Compare these two versions of the first 2 paragraphs. The second version actually emphasizes the point better, without saying "it is important to emphasize."

Original:

We learned yesterday evening that NHTSA is opening a preliminary evaluation into the performance of Autopilot during a recent fatal crash that occurred in a Model S. This is the first known fatality in just over 130 million miles where Autopilot was activated. Among all vehicles in the US, there is a fatality every 94 million miles. Worldwide, there is a fatality approximately every 60 million miles. It is important to emphasize that the NHTSA action is simply a preliminary evaluation to determine whether the system worked according to expectations.

Following our standard practice, Tesla informed NHTSA about the incident immediately after it occurred. What we know is that the vehicle was on a divided highway with Autopilot engaged when a tractor trailer drove across the highway perpendicular to the Model S. Neither Autopilot nor the driver noticed the white side of the tractor trailer against a brightly lit sky, so the brake was not applied. The high ride height of the trailer combined with its positioning across the road and the extremely rare circumstances of the impact caused the Model S to pass under the trailer, with the bottom of the trailer impacting the windshield of the Model S. Had the Model S impacted the front or rear of the trailer, even at high speed, its advanced crash safety system would likely have prevented serious injury as it has in numerous other similar incidents.

Simple edit to one sentence:

We learned yesterday evening that NHTSA is opening a preliminary evaluation into the performance of Autopilot during a recent fatal crash that occurred in a Model S. This is the first known fatality in just over 130 million miles where Autopilot was activated. Among all vehicles in the US, there is a fatality every 94 million miles. Worldwide, there is a fatality approximately every 60 million miles.

The NHTSA action is simply a preliminary evaluation to determine whether the system worked according to expectations.

Following our standard practice, Tesla informed NHTSA about the incident immediately after it occurred. What we know is that the vehicle was on a divided highway with Autopilot engaged when a tractor trailer drove across the highway perpendicular to the Model S. Neither Autopilot nor the driver noticed the white side of the tractor trailer against a brightly lit sky, so the brake was not applied. The high ride height of the trailer combined with its positioning across the road and the extremely rare circumstances of the impact caused the Model S to pass under the trailer, with the bottom of the trailer impacting the windshield of the Model S. Had the Model S impacted the front or rear of the trailer, even at high speed, its advanced crash safety system would likely have prevented serious injury as it has in numerous other similar incidents.

comment 10y ago · link · parent

> Try replacing "It is important to emphasize that" with "NOTE:" and "It is important to note that" with "IMPORTANT:".

That would be an equal problem as the original and not how a good writer should solve the wording.

Compare this to, for example, the press releases by a major news organization when it admits it got something important quite wrong. There are many ways to use our language as it was designed without getting meta.

comment 10y ago · link · parent

The Wikipedia policy is just an example, of course, not a suggestion that we follow that site's editing guidelines. But it does show good practice.

comment 10y ago · link · parent

I don't think this has anything to due with legality. A legal contract, for example, doesn't need this phrase anywhere for the words to be legally binding: after all, they are in the contract itself, therefore don't need any special modifier.

comment 10y ago · link · parent

> It is important to note

> It is important to emphasize

I am getting so disappointed by how widespread this wasteful use of the English language has become. The phrase is just filler and means nothing, yet it is used everywhere, nearly every HN thread has someone who uses it. If you need to note something, then note it. By putting it into words, you have said "this is important enough to actually say it." Further saying that it is important is a crutch.

This is probably why copy editors get so frustrated when technical people write things, because the idiom is particularly pervasive in the tech blogosphere.

We all need to do a service to the value of our words and see [0 ... 3]

[0] https://en.wikipedia.org/wiki/Wikipedia:It_should_be_noted

[1] http://womeninwetlands.blogspot.nl/2013/12/it-is-important-t...

[2] https://en.wikipedia.org/wiki/Wikipedia:%22Note_that%22_is_u...

[3] http://english.stackexchange.com/questions/266529/similar-ph...

comment 10y ago · link · parent

Great tip about uBlock Origin. I am using ABP and it didn't do that, but now both are running together, actually. What's strange is that the number of ads they claim to block is different with each.

comment 10y ago · link · parent

So many sites now won't serve you content unless you turn off the ad-blocker. I have done so for those sites, but now I'm thinking of just boycotting those sites. CBS News is one of them, and I think it is a bit insulting to tell users not to protect their computer when they visit your website.

comment 10y ago · link · parent

That is not at all how the market works.

comment 10y ago · link · parent

> If you're right 51% of the time when you invest you're going to get rich.

Sorry, but this is completely incorrect.

The approximate formula for success in investing or trading is "percentage right" * "average win profit" - "percentage wrong" * "average loss" = overall profit.

Many traders are correct only 20% of the time (I'm looking at you, stock options traders) but make fortunes because they understand this formula.

You can also lose a lot of money even if you are right 90% of the time because you fail to manage a big loss properly.

comment 10y ago · link · parent

Wow that site's UI needs some work. Just the wordings are confusing with no explanation.

comment 10y ago · link · parent

> Lambdas roamed the earth long before templates.

I'm talking about C++ lambdas, in particular, which are templates under the hood.

comment 10y ago · link · parent

>only if you carefully constrain yourself to certain subsets of the language

I'm curious which subsets are included in this?

comment 10y ago · link · parent

Yes, but the distractions of C are just as inconvenient, though wholly different. The amount of extra low-level work you must do in a C program considerably adds to the time you need to make it work, time that could be spent thinking about more interesting things. I'd rather reach for a C++ vector and just let it manage the memory for me (or unique_ptr or many other easy tools) while I'm crafting my program logic then spend a nontrivial fraction of my time making sure my memory handling is correct.

comment 10y ago · link · parent

It's easy to dislike or hate C++ due to its immense complexity, and programmers like to be able to keep simple abstractions in their head so they can concentrate their energies on their problem domain without worrying about language confusion. With C and many other languages, this is possible as they are smaller languages. C++ on the other hand: is there any language with widespread use that is so deep and complex? However, there are undeniable conveniences to C++ (safety, a good library, much more -- especially functional-style programming with lambdas now) that can speed up your work process, and if you can accept that you will never know the entire language and can just use those bits that make things easier, it is possible to have a healthy relationship with the language. And it offers tremendous room to grow as you get more and more comfortable with it. Few languages allow you to just keep diving in deeper and deeper as you desire, while still letting you get to work right away without being a master. Even template metaprogramming alone is gigantic area of ongoing research -- the stuff you can do with it is mind-bending and unavailable in nearly all other languages. Templates are, after all, one of very very few wholly functional, immutable languages out there. And template instantiation is the underlying force behind many of the modern features like lambdas that allow you to access that power without actually knowing templates well. It's a powerful language for which you must accept its character flaws in return for its abilities.

It's doesn't hurt either that the libraries available in C++ are really cool.

2420.

My God, It's Full of Stars(github.com ↗)

2 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

It really is full of yaks! [0]

[0] https://github.com/search?q=yak&type=Code&utf8=%E2%9C%93

2422.

Seeing color for the first time: These high-tech lenses can fix color blindness(cnbc.com ↗)

2 points · by hellofunk · 10y ago · 1 comment

comment 10y ago · link · parent

I tried emacs Live and found it way to distracting to use for development work. It's like having an MTV video on your screen while you code.

comment 10y ago · link · parent

Without any reasons for your statement, it's just an empty contribution. Care to explain why?

comment 10y ago · link · parent

> * No more JVM!

You're just trading one VM for another, though. How does having a Beam VM environment differ from a JVM environment?

comment 10y ago · link · parent

Fortran is actually still in major widespread use, particularly in the scientific and engineering fields. This is partly because it has unparalleled speed in some domains, better even than C or C++.

comment 10y ago · link · parent

If I had a choice, I'd prefer 4 shirts and 3 pairs of trousers.

comment 10y ago · link · parent

Is this the legal version of "don't shoot the messenger" ?
1
808182
110