Live data from Hacker News

I'm 17 and wrote this guide on how CPUs run programs

github.com

291–300 of 327 posts

Re: I'm 17 and wrote this guide on how CPUs run programs

#291

Earlier quoted context omitted.

Yes. The author is, like me, a male trans woman.

Why do you think there are so many of you fellows in this industry, compared to the general population? It's a noticeable skew that has always baffled me.

We tend to be introverted (for reasons), and if you can code you're more likely to have the socioeconomic status to be able to transition, or rather the same conditions are correlated with both abilities. It's also a non-public-facing industry in general, which makes it less likely we'll be discriminated against in hiring or employment. So part of it is predisposition and part of it is simply greater visibility.

Re: I'm 17 and wrote this guide on how CPUs run programs

#293
Great job! I'm an expert but you were right: I learned some things from Chapter 3.

A couple of very minor points:

"The first mass-produced CPU was the Intel 4004, designed in the late 60s by an Italian physicist and engineer named Federico Faggin."

The first microprocessor (CPU on a single chip) was Faggin's Intel 4004, but mass-produced CPUs existed before that. Earlier CPUs were built from multiple chips, and before that multiple individual transistors, and before that multiple vacuum tubes, and before that multiple relays (although it's fair to say that relay computers were never mass-produced).

"The CPU stores an instruction pointer which points to the location in RAM where it’s going to fetch the next instruction."

This is also called the Program Counter or PC outside the Intel universe. This is confusing as "PC" also stands for "Personal Computer" but people who learned computing in the days before Intel became popular still call it the PC register.

Re: I'm 17 and wrote this guide on how CPUs run programs

#295

Hi! I'm Lexi, I wrote this article/mini-book. There's a classic question of "what happens when you load a website?", but I've always been more interested in "what happens when you run a program?". About 3 months ago, I was really annoyed at myself for not knowing how to answer that question so I decided to teach myself. I taught myself everything else I know in programming, so this should be easy, right? NOPE! Appare…

Having read the first couple of pages, my only feedback is a strong suggestion to drop the cutesy language. >The central processing unit (CPU) of a computer is in charge of all computation. It’s the big cheese. The shazam alakablam. It starts chugging as soon as you start your computer, executing instruction after instruction after instruction. Given the context, that would read much better as: >The central processin…

Heavily disagree. The tone has the same charm as Kingdom of Loathing. One could view it as an excellent alternative to or first draft of a more dry/academic text if the author chose to reiterate.

Re: I'm 17 and wrote this guide on how CPUs run programs

#296
post #23

Congrats on completing this guide. > There aren't many comprehensive systems resources if you aren't going to college, so I had to sift through tons of different sources of varying quality and sometimes conflicting information. The absolutely best resource you will find is Charles Petzold's Code: The Hidden Language of Computer Hardware and Software . The 2nd edition was just released. https://codehiddenlanguage.com/

I read and loved that book however nowadays I highly recommend playing the game “Turing Complete” instead.

It does a fantastic job taking you from nand gates all the way to function calls but in a delightfully interactive way. Instead of just imagining how it all must work in ur head as u read, u get to build it.

I went so far as to build a little simd/gpu that drives an led matrix with my own cpu assembly and programmable shader language.

Re: I'm 17 and wrote this guide on how CPUs run programs

#297
post #129

Earlier quoted context omitted.

> However, the details of modern branch predictors are proprietary, so we don’t have authoritative sources on them. I focused on Computer Architecture for a masters degree and now I work on a CPU design team. While I cannot say what we use due to NDA, I will say that it is not proprietary. Very nearly everything, including the branch predictors, in modern CPUs can be found in academic research. Many of these secrets…

I’m not related to academia. I don’t design CPUs. I don’t write operating systems and I don’t care about these side channel attacks. I simply write user-mode software, and I want my code to be fast. The academic research used or written by CPU designers being public doesn’t help me, because I only care about the implementation details of modern CPUs like Intel Skylake and newer, AMD Zen 2 and newer. These details hav…

"Neural networks" just mean perceptrons.

Practically, the only thing that matters is that branch prediction assumes that history repeats itself, and that past patterns of a branch being taken in certain conditions will impact it being taken again.

So that means that conditions that are deterministic and relatively constant throughout the lifetime of the program will most likely be predicted correctly, and that rare events will most likely not be predicted correctly. That's all you need to know to write reasonably optimized code.

Re: I'm 17 and wrote this guide on how CPUs run programs

#300

Earlier quoted context omitted.

Facts. What I wonder is if everyone else wants to believe or really just doesn't care. For some reason, I really hate being lied to.

It honestly isn’t important, so I can see why people don’t care. But it is interesting, at least to me. :)

I find it interesting because of just how over the top feminine it is. Basically, the most feminine people on the planet are men too.
Post reply on HN