HNHacker News
TopNewBestAskShowJobs

EricWF

16 karma · joined May 26, 2017

submissionscomments
EricWF··on Google gets away almost scot-free in US search antitrust case
What about the special access granted by many websites to the Google scraper?
EricWF··on Coroutines are now in Clang trunk, libc++
The changes literally landed in the past three days; The implementation is theoretically perfect, but once it's (seriously) observed by users it will decay into bugs. That's just basic quantum CS. :-)
EricWF··on Coroutines are now in Clang trunk, libc++
Libc++ coroutines are production ready!

But seriously, the library implementation for coroutines is just a shallow wrapper around compiler builtins.

Therefore libc++ is probably bug free, but Clang certainly isn't.

EDIT: "probably bug free" == famous last words.

EricWF··on Coroutines are now in Clang trunk, libc++
If you understand the internals they're anything but pythonic. Coroutines can be a zero overhead abstraction in the some cases.

For example here is a test that verifies the optimized output for a simple (and misnamed) integer generator compiled at -O2. Notice the arguments to `print` are integer literals. (https://github.com/GorNishanov/clang/blob/Experiments/test/C...)

I'm no python expert, but I suspect C++ optimizes this code better.