Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
yoklov
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
51 ms
·
481.
▲
by
yoklov
11y ago
Are you sure you were using floating point math? Compiling 1.0 / 0.0 should not give errors or warnings. 1 / 0 will, on the other hand.
482.
▲
by
yoklov
11y ago
It is a buffer (so is any array in C or C++), but it's usage is entirely different from the style described in the article.
483.
▲
by
yoklov
11y ago
Not a bad article but it misses a style that used to be (and still is, depending on where you look) common on game development: Arena based allocation. Use lots of arenas. A per frame arena, a per level arena, each subsystem gets its own ar
484.
▲
by
yoklov
11y ago
Its extremely subjective though. For the first few years after starting, I thought that large functions were bad and should be split up unless theres a clear reason not to. Now, I feel that it should be the other way. Most of the time you w
485.
▲
by
yoklov
11y ago
RM vs IM is entirely about where the name (id, pointer, whatever) of the widgets comes from. In RM it comes from the library, and is typically a pointer to some data that represents the 'widget', and in IM it comes from the user a
486.
▲
by
yoklov
11y ago
Not really. I wouldn't say it's more common in C++ than in anything else I've used. Usually the people who do it mix tabs/spaces in every language.
487.
▲
by
yoklov
11y ago
Worth keeping in mind that you don't always want to split something into a separate function. When you split out a function, you should be asking yourself if you're actually simplifying something, or if you're just sweeping t
488.
▲
by
yoklov
11y ago
I didn't take what he said to mean that solving the problem wasn't important, but that the quality of your solution (in terms of how 'elegant' or 'idiomatic' it is) wasn't important.
489.
▲
by
yoklov
11y ago
B isn't universally true. Most of what I do on a given day does not fall into that category, really at all. Same applies for most people I interview, with few exceptions.
490.
▲
by
yoklov
11y ago
You might. That's it's default configuration. I'm not really an expert on the differences between msys and cygwin, but i believe msys solves a subset of the problems solved by cygwin, while remaining much closer to how the OS
491.
▲
by
yoklov
11y ago
Do you do anything in msysgit? You can configure it to launch a gitbash shell instead of a cmd.exe one.
492.
▲
by
yoklov
11y ago
Cmder is awesome. I use it as a better interface to msysgit (I don't find myself needing to actually work in `cmd.exe` much anymore). I switched to it from Console2 pretty recently (last week, actually) and only have good things to say
493.
▲
by
yoklov
11y ago
This is great. Reminds me of Game Dev Tycoon's developers releasing a cracked version of the game onto torrent sites where you'd always lose due to players pirating your game [0]. When I heard what they did I sort of thought it wa
494.
▲
by
yoklov
11y ago
My understanding is you typically bootstrap the runtime for C/C++ when you write an OS. This is a significantly larger task for Go, to the point where I'd say it's probably infeasible (Is it possible to write the Go runtime i
495.
▲
by
yoklov
11y ago
And I'd rather see them written in native code, using a native API that doesn't require awkwardly traveling through Java. Such is life.
496.
▲
by
yoklov
11y ago
I'm not against it in principal, but leaving alignment to the editor sounds like the kind of thing that could be coding standard unfriendly (unless it were done quite well, or was solely visual).
497.
▲
by
yoklov
12y ago
I just meant iostream. std::strings work fine with cstdio via std::string::c_str(). (e.g. printf("%s\n", some_string.c_str() works fine). That said, I tend to avoid std::string as well, due to other performance issues (you tend to
498.
▲
by
yoklov
12y ago
Or where performance is a priority, in my experience. iostream is both slow and bloated. ... I don't like it's API either (it's a horrible abuse of operator<<, and is the exact kind of thing you tell people not to do wi
499.
▲
by
yoklov
12y ago
Quad trees are popular because they're fairly easy to understand and implement, but they don't actually perform that well in practice for broadphase. (Its really more for LOD) If you want a tree that does perform well and is simil
500.
▲
by
yoklov
12y ago
Still takes a lot less time to use VS than to use the XCode debugger IMO. Having to expand anon struct/union members makes debugging in some codebases a real pain.
501.
▲
by
yoklov
12y ago
Angelo Pesce (aka c0de517e) has written about using it as a rendering engineer on his blog[0]. I've heard of others using it in similar scenerios as well, but don't have a link to provide for them. [0]: http://c0de517e.
502.
▲
by
yoklov
12y ago
Frequently the second problem is exacerbated by cache misses. Every operation becomes (much!) slower, but nothing stands out. Not a popular opinion here, but excessive modularity like that is practically the definition of bad, hard to follo
503.
▲
by
yoklov
12y ago
I could probably survive not using most of the standard library (I might try to do this anyway to avoid issues with deployment, as I have done in the past in C++). I'm not a huge fan of closures in many cases (if they outlive the scope
504.
▲
by
yoklov
12y ago
Well, a couple things about it make me nervous, but CTFE and a not horribly broken compilation model might make it worth trying out next weekend...
505.
▲
by
yoklov
12y ago
I'm always on the look out for improvements to C++, and it's been a while since I looked at D... Hope you don't mind if I ask you a couple questions. Can you still turn off the GC? Lets say I don't like exceptions, and t
506.
▲
by
yoklov
12y ago
Agreed. None of this would be an issue with good support for normal compile-time metaprogramming, in the same language that the rest of the code is in, without restrictions (or, with as few restrictions as is possible). But thats obviously
507.
▲
by
yoklov
12y ago
> instead have a genuine compile-time macro language Yep. Jesus christ why didn't they do this. Going further, D (or more recently, JAI) style CTFE would have been great. But no such luck.
508.
▲
by
yoklov
12y ago
> Why do people react to C++ this way and not other languages? Probably because stuff like boost::mpl (and so many awful half-implementations of it) exists. Sadly, if there's a perceived use for a C++ feature, it will be used, no ma
509.
▲
by
yoklov
12y ago
This is somewhat subjective... I'm not sure I find either more fun than the other.
510.
▲
by
yoklov
12y ago
C++'s runtime is small and ubiquitous. Depending on how the software is written (if it allows disabling exceptions and rtti), it might be the same size as C's runtime, which is practically (but not totally) nonexistant. I'm n
More ›