Better HN
topnewbestaskshowjobs
Log inSign up

chaosemer

5 karma · joined Nov 1, 2015 (11y ago) · 3 submissions

Submissions

comment 10y ago · link · parent

Simplifying things a bit, git is what you did before you learned about using version control. That's right, it's just the old copy/paste the entire project folder for each revision and give it a name like "Project v1", "Project v2", etc. Branches and tags are then just symlinks to a specific folder.

In this world, when you commit, you're doing two things: 1. Creating a new top level folder, e.g. "Project v42". 2. Updating the branch symlink you are on to point to that new folder.

I'm actually not simplifying things that much here, the main git addition is that each folder (revision) also has a list of previous folders (revisions) and that the folders (revisions) are not named sequentially, they are named based on a hash of their contents.

comment 11y ago · link · parent

Even worse, foo(a,b) could call bar(a,b,c) which calls foo(b,a), all without otherwise looking at a or b. This could get really bad really fast.

But that feels like the wrong way to analyze this. Even though a full solution isn't practical, a limited one may be.

comment 11y ago · link · parent

Detecting collisions between two convex hulls isn't that hard, but it is slow-ish. The Separating Axis Theorem (or its more general and WAY COOLER SOUNDING Hyperplane Separation Theorem) lets you do a dot-product per face and if they all come out positive, there's no collision.

https://en.wikipedia.org/wiki/Hyperplane_separation_theorem