News for hackers. Stuff that matters.
Re:Computer Science Curriculum in 1000 YouTube Videos by konjin on Wednesday January 13, 2021 @07:51AM (#25761357)
They don't transform memory, they load memory into registers, transform the registers and (maybe) store the registers values back into the memory. The difference is profound and until you code in assembly you have no idea why (or that) string operations are so expensive.
Re:Computer Science Curriculum in 1000 YouTube Videos by koolba on Wednesday January 13, 2021 @08:15AM (#25761552)
Again, the point is not to have an real language for any efficient real world usage. The point is to have a simplified language that represents a series of commands operating on a bank of memory. Like this:

    SET 1 100  # Set memory[1] = 100
    SET 2 500  # Set memory[2] = 500
    ADD 3 1 2  # Set memory[3] = memory[1] + memory[2]
It's easy to explain what each individual step is meant to do and you can build up to more complicated instructions. It allows children to see the persistent effects of running the program, mutating the state of the memory, eventually introducing the instruction counter itself as a state variable.
Re:Computer Science Curriculum in 1000 YouTube Videos by konjin on Wednesday January 13, 2021 @09:40AM (#25762485)
>eventually introducing the instruction counter itself as a state variable.

If you're going to be talking about the IP register than you need to talk about the IR register. So we should avoid talking about registers by talking about registers?

You're not selling this registerless assembly very well.

Re:Computer Science Curriculum in 1000 YouTube Videos by koolba on Wednesday January 13, 2021 @10:04AM (#25762797)
It doesn't have to be a register. Just a labeled piece of memory.

It works great with children and you don't even need a computer. You can do it all on a pen and paper.