HackerTrans
TopNewTrendsCommentsPastAskShowJobs

canyp

no profile record

Submissions

The C++ Documentary Won't Show You a Number. I Will

hftuniversity.com
7 points·by canyp·w zeszłym miesiącu·1 comments

comments

canyp
·26 dni temu·discuss
You could have elaborated the way you did here to begin with.

> shame on you if it's your website, given that you've previously submitted content from there

How do you jump to such a conclusion without evidence? Has somebody hurt your feelings on the Internet?
canyp
·27 dni temu·discuss
Not to take away from the post, but "everyone is not" should probably be "not everyone is".
canyp
·27 dni temu·discuss
The math alone doesn't do it justice anyway because the context switch is terrible. Why can't I just think about the play that just unfolded and discuss with others? Basketball has the same clock mechanics too and it is nowhere near as tainted with ads.

For reference, soccer matches have traditionally been 45 min half, 15 min commercials, 45 min second half.
canyp
·27 dni temu·discuss
Somewhere in the docs they state that they must also recreate whatever bugs the API has, otherwise applications written with those bugs as an (implicit) assumption could misbehave.
canyp
·27 dni temu·discuss
I have always joked the Super Bowl was a long commercial with football breaks in between.

Guess they're going for soccer this time too.
canyp
·27 dni temu·discuss
Unlike your comment, which is the pinnacle of human thought?

You are also wrong.
canyp
·27 dni temu·discuss
I'm not sure about the standard part, but it does call out MS' STL in the sentence prior to what you quoted.

And why is the latter nonsense? lists have had terrible cache performance for decades now and vector is the better default choice of container.
canyp
·27 dni temu·discuss
<format> doesn't require iostream.
canyp
·28 dni temu·discuss
My codebase uses a fairly dumbed down version of C++, but I would have liked to see more depth in this post. As it is, it is not very useful.

There are many more things to avoid than just iostream. HFT university has a good recap: https://hftuniversity.com/post/the-c-standard-library-has-be...

The point on exceptions I think is also misleading. Compilers typically make throwing an exception the expensive part, and the happy path inexpensive (not more expensive than a branch checking for errors, which should be the baseline for comparison, not an implementation with zero error checking.) So to say that they are "expensive" doesn't really make a useful argument.

And there are more things that could be done in this camp, like proposing a set of compiler flags, and a linter to enforce the subset you are subscribing to. Unfortunately the post offers none of that.
canyp
·w zeszłym miesiącu·discuss
It is the point, precisely.
canyp
·w zeszłym miesiącu·discuss
Indeed. It is rare to encounter a webgl/gpu visualization that doesn't rev up the fans at 100% while sitting idle, let alone to have this low latency handling input. Virtually all web demos I have seen run terribly because literally 0 attention is paid to actual rendering. The other day somebody submitted one here and admitted they didn't know backface culling was a thing. They also almost universally have no sort of frame pacing.
canyp
·w zeszłym miesiącu·discuss
It may as well be outside our bounds and unverifiable, but that doesn't mean it doesn't matter or that it shouldn't be part of "practical" discussion, whatever you consider "practical" there. You still have a brain to think about these things.

I do personally believe the latter part. I did not mean to suggest the before/after experience was going to look anything like your current one.
canyp
·w zeszłym miesiącu·discuss
I believe the fact that it is night time does a lot to it, since we're just wired for a healthy fear of the dark. Coupled with consciousness fading into sleep, it seems to open up a lot of dread.
canyp
·w zeszłym miesiącu·discuss
Being a materialist and claiming that everything is the consequence of physical phenomena is great, but then you have a lot of homework to do. So I see no more strength in its claims than in the contrarian ones.
canyp
·w zeszłym miesiącu·discuss
I go through that exercise of visualizing the void and it is fascinating and terrifying at the same time, especially if you do it before going to sleep.

That being said, you can't just assume that existence is bounded by your living memories. You might as well have been everything instead of nothing prior to being spawned and you just don't remember it.
canyp
·w zeszłym miesiącu·discuss
Makes sense, thank you.
canyp
·w zeszłym miesiącu·discuss
Ironically, the image showing the graph that does that transformation could have gone through the pipeline as well.

I'd be curious to know in more detail what exactly is going on there. I guess the box sharpening is where most of the beef is.
canyp
·w zeszłym miesiącu·discuss
I don't even know what GP is smoking, but real fights are measured in milliseconds.
canyp
·w zeszłym miesiącu·discuss
Possibly, but always check the assembly.

The even faster version, opts aside, would be to initialize the pointer at y*screenRect.w and ++ at every loop to avoid the addressing arithmetic.
canyp
·w zeszłym miesiącu·discuss
I still don't get what is the advantage over an unsigned integer. Yes, fp64 has unused bits. But why are you going to involve the FPU at all when a uint64 does the trick as well? Plus with a uint64 you get all the flexibility of what bits to dedicate to the address vs metadata.

Edit: I guess one advantage is that, if we later treat the handle like a pointer, NaN math gets you NaN again, whereas the uint64 math might get you an invalid address, or you'd need extra logic to check that the uint64 is not a valid handle?