Raycasting
deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX)) deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY))
Posts that commenters keep linking to, ranked by how many different people have cited them in Hacker News comments. 2,232 posts.
deltaDistX = sqrt(1 + (rayDirY * rayDirY) / (rayDirX * rayDirX)) deltaDistY = sqrt(1 + (rayDirX * rayDirX) / (rayDirY * rayDirY))
Eric Lippert notes the perils of programming in C++: I often think of C++ as my own personal Pit of Despair Programming Language. Unmanaged C++ makes it so easy to fall into traps. Think buffer overruns, memory leaks, double frees, mismatch between allocator and deallocator, using freed memory, umpteen dozen
[coined in a paper by T.H. Myer and I.E. Sutherland On the Design of Display Processors , Comm. ACM, Vol. 11, no. 6, June 1968)] Term used to refer to a well-known effect whereby function in a computing system family is migrated out to special-purpose peripheral hardware for speed, then the peripheral evolves toward…
Every ops team has some manual procedures that they haven’t gotten around to automating yet. Toil can never be totally eliminated. Very often, the biggest toil center for a team at a growing …
You've finished this book and have decided to continue with programming. Maybe it will be a career for you, or maybe it will be a hobby. You'll need some advice to make sure you continue on the right path and get the most enjoyment out of your newly chosen activity.
Musings of a Computer Scientist.
This post is the first of many to come on Apache Arrow, pandas, pandas2, and the general trajectory of my work in recent times and into the foreseeable future. This is a bit of a read and overall fairly technical, but if interested I encourage you to take the time to work through it.
A couple weeks ago, I took the plunge and switched to vim (MacVIM, to be precise). It wasn't the first time I tried to make the switch, and I had pretty much written it off entirely. Why? Because the past few times I tried switching to vim, I took
I have started code reading groups at the last two companies I’ve worked at, Etsy and Twitter, and some folks have asked for my advice about code reading and running code reading groups. Tl;dr: don’t start a code reading group. What you should start instead I’ll get to in a moment but first I need to explain how I…
This is a psuedo-transcript for a talk given at Deconstruct 2019. To make this accessible for people on slow connections as well as people using screen readers, the slides have been replaced by in-line text (the talk has ~120 slides; at an average of 20 kB per slide, that's 2.4 MB. If you think that's trivial…
When I get stressed out and have too much to do, I have this paradoxical reaction where I escape from that by coming up with another thing to do. Usually it’s a tiny self-contained program that I can write and finish.
For those who don’t follow Swift’s development, ABI stability has been one of its most ambitious projects and possibly it’s defining feature, and it finally shipped in Swift 5 . The result is something I find endlessly fascinating, because I think Swift has pushed the notion of ABI stability farther than any language…
You're only given a little spark of madness. You mustn't lose it. Robin Williams
Paul Khuong's personal blog. Some Lisp, some optimisation, mathematical or computer.
Dylan? C# 3? Perl 6? Does it have deterministic destructors, even as blocks like Python 2.5? Generics? A powerful macro system? Even as described it sounds like magic, but not a moment too soon.
From the highly eclectic blog of Mark Dominus
Whenever I see code that asks what the native byte order is, it's almost certain the code is either wrong or misguided. And if the native b...
I'm no graphics expert, but appreciate why square roots are useful. The Pythagorean theorem computes distance between points, and dividing by distance helps…
Go's interfaces—static, checked at compile time, dynamic when asked for—are, for me, the most exciting part of Go from a language design point of view. If I could export one feature of Go into other languages, it would be interfaces.
Making performant dynamic manual memory management in C feel almost like garbage collection.
This book and its on-line version are distributed under the terms of the Creative Commons Attribution-NoDerivs 1.0 license, with the additional proviso that the right to publish it on paper for sale or other for-profit use is reserved to Pearson Education, Inc. A reference copy of this license may be found at…
Packages that need to read cdb files should incorporate the necessary portions of the cdb library rather than relying on an external cdb library.
Algorithms, circle mazes, hex grids, masking, weaving, braiding, 3D and 4D grids, spheres, and more!