Hacker Newsnew | past | comments | ask | show | jobs | submit | more thestoicattack's commentslogin

(1999)

> Published in the May 1999 issue of "The C/C++ Users Journal"


The article does mention at least one advantage, so it's not as if the ladder is being pulled up for no reason.


As a note,

    find . -type f -exec grep stuff {} \;
will also invoke a new grep process for every file, which can be slow. If you think find is going to return a lot of files, it is often better to use

    find . -type f -exec grep stuff {} +  # note plus sign
which will replace {} with as many filenames as allowed (all correctly quoted, etc).


Ah, yes, the other reason not to use that form: remembering to use + instead of ; for efficiency! No point removing xargs just to add in many more invocations of the target command.


I can't remember my terminal emulator ever crashing, much less crashing due to memory corruption. Maybe I've just been lucky.


I'm glad his memoir, "Carrying the Fire", got mentioned. It's one of the best astronaut memoirs.


I believe it was his book where he describes the moon hanging there as they were closing in on it. This massive, plaster-of-paris sphere almost filling his view.

His description (ignore mine above) made me realize just how remarkable that must have been to see. The Earth diminishing to a ball is one thing, but this atmosphere-less, white desert, Little-Prince-like, moon bearing down on you sounds like something else entirely.


I'm half-way through reading this at the moment and I cannot recommend it highly enough. In the prologue he talks of being able to turn to any page and find something interesting to read. He's not wrong.


Carrying The Fire is my favourite astronaut memoir and I've read a few, it reads beautifully. Highly recommended to anyone with an interest.


Wow, I just finished reading Carrying the Fire three days ago. Good writer and a great ambassador for the space program.


Definitively!


House seat changes by state:

    (+2) TX
    (+1) CO, FL, MT, NC, OR
    (-1) CA, IL, MI, NY, OH, PA, WV
     (0) everyone else



You could, but the raison d'être of these operators-as-types is their usefulness in metaprogramming.


We do have such a digit-extraction algorithm: https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%9...


std::move_iterator was my first thought too, but I'm not sure if it works, since the key type for std::unordered_map is defined to be const, so you may have to make a copy anyway.

Maybe use a vector-of-pointer-to-pair, since we're leaving the map around and we don't really need the vector to own anything.


good point about the string being const! There are ways around that, but none pretty.


That's basically modern C++, if you cut out all the things that aren't slices, destructors, and copy/move semantics.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: