fish2000 | 8 years ago | on: Report of Active Shooter at YouTube HQ
fish2000's comments
fish2000 | 8 years ago | on: Apache Arrow and the “Things I Hate About Pandas”
fish2000 | 8 years ago
… I build all of my C++ projects with Clang and link them against libc++, so I don’t know if I am dodging a very high-caliber bullet (so to speak) or if the other shoe will drop at some point, and I will find myself going down the OP’s rabbit-hole of library-bug investigation.
fish2000 | 9 years ago | on: Principles for C programming
Do not use macros. — Absolutely I agree: I involuntarily grimace whenever I look at and/or things like Boost MPL, or the wartier corners of the Python C-API’s underbelly, etc. I only use macros as straight-up batched ⌘-C-⌘-V:
#define DECLARE_IT(type, value) extern const type{ value }
DECLARE_IT(int, 0);
DECLARE_IT(int, 1);
DECLARE_IT(float, 0.0f); // etc
#undef DECLARE_IT
Do not use typedefs to hide pointers […]
— I cannot stand it when people do this. That asterisk is as syntactically valuable to you, the programmer, as it is essential to your program’s function. If the standard library can slap asterisks on file and directory handles than so can you (and by “you” I specifically include whoever wrote the `gzip` API among other things).[…] or to avoid writing “struct” — Huh, actually I feel the opposite, I think all those “struct” identifiers are clutterific, much like excessive “typename” id’s in C++ template declarations. But so aside from the points where I totally disagree with the author, I absolutely feel the same way 100%.
fish2000 | 9 years ago
fish2000 | 9 years ago | on: Why your startup should be a Delaware C-Corp, not an LLC
Specifically, this makes it easier if we want to sell ”My Company’s App“ to a Facebook- or Google-class buyer entity. The LLC can also incorporate a bank, if ”My Company’s App“ needs to start conducting transactions that necessitate the use of (say) a Federal Reserve client (á la Venmo or Stripe).
fish2000 | 9 years ago
fish2000 | 9 years ago
I dislike exceptions too, but in a difference-of-opinion way where I can be like “OK, that otherwise legible and reasonable code uses exceptions, unlike mine” and it doesn’t make me grimace like I involuntarily do for RTTI… I’d love to be mistaken tho, anyone with an inspiring counterexample, do share.
fish2000 | 9 years ago
Just sayin. Frankly I like how it's not Wikipedianishly drowning in citations and/or demands for same -- but how does it get updated? I immediately tried to expand on those two issues I mentioned but there was no sort of UX recourse for my pedantic urges (FWIW)
fish2000 | 9 years ago
fish2000 | 9 years ago
fish2000 | 9 years ago
fish2000 | 9 years ago
fish2000 | 10 years ago
fish2000 | 10 years ago
Personally I spent enough time writing Python to acquire significant coding OCD about things like whitespace, file/directory layout, documentation. When I write C++ I have two prime directives: 1, keep it compulsively tight and legible; 2, use the idioms of C++ to sort out other peoples’ APIs (as opposed to reinventing wheels). I stick to these rules like they’re a diet, it is easy to let your mind wander and find that you’ve spent half the day writing a framework instead of solving your problem; metaphorically this is the equivalent of forgetting to go to the gym and then ordering pizza for dinner. Along these lines I give myself one premature optimization a week, like as a cheat.
I find it is most productive when you are using C++ “against” something. For example I just wrote a bunch of templates that eliminate like 90% of the requisite API boilerplate the Python C API calls for – that was simultaneously satisfying in both the “I totally solved that specific problem” and “dogg check out this clever snippet I wrote” senses of ‘satisfying’. Contrastingly, the last time I created a class hierarchy it was a sprawling regrettable mess – I am more “structure-oriented”, versus “object-oriented”, but still.
fish2000 | 10 years ago
fish2000 | 10 years ago
fish2000 | 10 years ago | on: Background on Futurist Programming (1994)
In the interest of not spoiling I leave it as an exercise to the reader to click through and scroll down
fish2000 | 10 years ago
For those interested in seeing examples of LLVM hacking in action, I would recommend reading the source for Halide – https://github.com/halide/Halide – which is an image-processing DSL implemented in C++ and piggybacking on LLVM. I myself learned a lot about LLVM this way.
fish2000 | 10 years ago
holler ("Preposterous fd value %d", fd);
(I just had to debug a descriptor mess and this style of freewheeling 90’s-style documentation rejuvenated me w/r/t all of that, hah)