HNHacker News
TopNewBestAskShowJobs

aap_

1,187 karma · joined May 22, 2013

submissionscomments
aap_··on Is Fortran easier to optimize than C for heavy calculations?
This is down to convention though. You decide how you interpret your data in C.
aap_··on Books for Game Developers
> I've never understood them and I'm convinced every definition I've read was written by someone who also didn't understand them

This seems about correct. The book in the list also seems to fall into that category.

Quaternions are actually really simple and pretty once you understand them. The idea is that you specify and axis and an angle. The axis alone gives you a 180° rotation. 1 is the identity and gives you no rotation. If you interpolate between those on a circle (cos/sin) you can get any rotation around that axis.

One may wonder why one needs the sandwich product to rotate a vector when simple multiplication is enough for complex numbers. The reason is that in 2D there is only one plane of rotation and all vectors lie in it. In higher dimensions vectors can be decomposed into a part that lies in the plane of rotation and a part that's orthogonal to it (parallel to the axis in 3D) that is untouched by the rotation. With the sandwich product the quaternions cancel out for the orthogonal part but combine for the part in the plane. This also makes it obvious you have to take half the angle.

Finding the quaternion that rotates between two vectors is also easy. You just multiply them, then take the square root to get the half-angle. Taking the square-root is extremely simple: assuming your quaternion is normalized, you just add 1 and renormalize! Obviously this doesn't work if that quaternion is -1 (can't normalize 0), but it makes sense geometrically: a 360° rotation (-1) is the same around any axis so no axis can be recovered, but for its square root (180°) you have to pick one. It's just not well defined.

Of course all of the above can be shown with a few lines of algebra, and with geometric algebra the whole thing becomes even cooler.

aap_··on The Development of the C Language (2003)
What's fascinating is that I recently found some code that I believe was written in NB [1]. It's compiled to threaded code (like B) but knows about chars (like C). It doesn't quite match the story, but I don't know what else it could be

[1] https://inbox.vuxu.org/tuhs/ZKyl8drfW%2FBs1LVa@minnie.tuhs.o...

aap_··on Modern genetic data suggests pre-humans were a group of only 1,280 individuals
Imagine this: watch two years of the life of every human alive today. You'll need more time than the age of the universe (as far as we know).
aap_··on Why did it take psychedelics so long to become popular?
That's funny. I have met exactly one person who I know is a Taylor Swift fan. That is much less than the number of people who I know have taken psychedelics.
aap_··on PDP-10 Incompatible Timesharing System emulator
> first release 1970, according to wikipedia.

Under that name. It goes back to the PDP-6 monitor, 1964.

aap_··on The Development of the C Language (1993)
> People who still write C, honest question: Why?

It was my first programming language and I still think it's a simple and fun language. Also many things have a native C interface so it's a natural choice in those cases. It's certainly not the only language I use, but for many things my default. What's nice is that I don't have to consciously think much about the language when I use it because I know it well.

aap_··on Why use Pascal?
- no struct/record type

- call by name instead of call by reference

- no bitwise operators

- probably a lot more, I'm not too familiar with the language

The quote may have been closer to the truth at some point, but certainly not today. And while begin/end syntax may be a matter of taste I don't think it's coincidence it's not very common anymore.

aap_··on The myth of machine consciousness makes Narcissus of us all
The author seems to assume that human consciousness needs more than computation. Certainly a valid point of view, but what is the evidence? If you're not even touching upon the question what consciousness actually is, how can you say a machine can't ever be conscious? I can't even be sure that other humans other than me are conscious (the p-zombie idea), how can we sure about machines?

Ironically I think the narcistic idea here is that only complex organic entities (in particular humans) can ever be conscious.

aap_··on Modern language models refute Chomsky’s approach to language
Of course this getting into the whole philosophy of AI and consciousness and whatnot. But for practical purposes I would say: yes
aap_··on Modern language models refute Chomsky’s approach to language
It sure is an interesting time for linguistics now. For the first time there now is a second entity that can understand and produce language. Will be exciting to see how the field will transform.
aap_··on SectorC: A C Compiler in 512 bytes
The paper is the original paper on LISP by McCarthy "Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I". It has the original definition of LISP in LISP.
aap_··on 50 Years in Filesystems: 1974 Unix V7
A bit strange to talk about 1974 but look at code from v7 (1979).
aap_··on Ancient Greek terms worth reviving
βαίνω and Bein are completely unrelated. "kommen" (and english "come") are related to βαίνω.
aap_··on Sony PlayStation 2 Development Kit (2020)
That's really interesting. Was the emulator called SKY by any chance? And do you know if it survived in any way? As a PS2 fan I'd so much love to see it.
aap_··on The GTK+3 port of GIMP is officially finished
Ah too bad. The file chooser after GTK2 became absolutely unusable.
aap_··on The early days of Linux
There's an anecdote that they answered the phone in the UNIX room with "eunuchs room" in a high pitched voice.
aap_··on Why don't we define “imaginary” numbers for every “impossibility”? (2012)
Square roots of negative numbers came up when solving cubic equations, even if the final solutions were all real. This meant the square root of a negative number was not something nonsensical the way you might claim for x^2 = -1, but actually...real in some sense.
aap_··on Saying Goodbye to GitHub
You can find the Windows XP source code publicly on github right now. So I'm not sure how serious MS actually is about this...
aap_··on Unix Edition Zero (1971)
I actually didn't know about n.out before. It wasn't mentioned in the v1 manual so they must have gotten rid of it by then. However it seems that it is just a symbol table that's generated by the assembler. B code is eventually also passed to the assembler so it would just contain whatever symbols were in the assembly i suppose.
aap_··on Unix Edition Zero (1971)
The interpreter is part of the binary yes. I have reversed what was available here: http://squoze.net/B/ and written my own B compiler that generates the same threaded code as well: https://github.com/aap/b
aap_··on Unix Edition Zero (1971)
You can run the PDP-7 version and an early slightly frankenstein'ed PDP-11 version in simh: https://github.com/DoctorWkt/pdp7-unix https://github.com/DoctorWkt/unix-jun72
aap_··on Unix Edition Zero (1971)
> no C yet, just B, but evidently the B compiler was already generating native code instead of stack bytecode

No, B always generated interpreted/threaded code on UNIX, certainly on the PDP-7. We have the runtime and B library from that time.

aap_··on I use C when I believe in memory safety
Pretty sure it came from n-gate.com
aap_··on C was not created as an abstract machine
v4 was the first kernel written in C, and the assembly kernel before that already ran on a PDP-11. I doubt anyone even considered using B for this.
aap_··on Sauce that survived Italy’s war on pasta
> pasta sauce made with fresh tomatoes taste like tomatoes

That probably only works if you live in a country blessed with actual tomatoes. In Germany e.g. it's not easy to find tomatoes that taste like tomatoes.

aap_··on Calculus they won't teach you [video]
But nand2tetris doesn't have a historical approach if i'm not mistaken.
aap_··on MIPS announces its first RISC-V chip designs are now available for licensing
I wonder if this is a MIPSism? I've seen I$ and D$ a lot in PS2 docs.
aap_··on Unix's special way of marking login shells goes back to V2 Unix (at least)
Oh I bet fun also played a role. But I don't even know what exactly you are comparing against the PDP-11 here or and what point, because UNIX development happened on 11s for at least a decade. UNIX first ran on a PDP-11 in 1971 or so and a decade earlier there was only CTSS perhaps to compare it to, which had more memory than a PDP-11 at the time. Later timesharing systems like Multics and TOPS-10 also ran on bigger machines. And let's not forget it all began on a PDP-7, which was even smaller.
aap_··on “A damn stupid thing to do” – The origins of CPL, BCPL, and C (2020)
Sure, somebody admitted to doing something stupid, but the title is clearly meant to attract all the C bashers by pretending the quote is from someone who was involved in the development of C.
← PreviousPage 5 of 14Next →