4 ms·
Thanks for this - I think you are on to something when you mention the low level architecture, on reflection this is where I need to fully understand the concep
by aphrax 5y ago
Thanks for this - I think you are on to something when you mention the low level architecture, on reflection this is where I need to fully understand the concepts - I'm messing around in this area with the usual (Nand to Tetris) type info/tutorials. I'll then come back to this manual I'm sure. Like I say - I've enjoyed it quite a bit. Its certainly me lacking - not the book!
- argvargc 5y agoSomething that might help is understanding a very fundamental thing about computers: they are very, very stupid. Essentially, they don't/can't know anything about anything, at the most fundamental levels of their construction, and have to be hand-held every tiny step of the way. A computer is essentially a highly complex arrangement of on/off switches - there's little else fundamentally in there doing anything at all other than something causing the first switch to cycle between on and off states and cascade to all the rest (this isn't entirely accurate but it's close enough to make te point). This gives rise to situations where in order to create greater levels of complexity, lots of unintuitive, and seemingly even pointless things need to be done. For example: assigning letterbox addresses to every discrete portion of memory. Then things like "I want to read the values from this part of memory up to this part" require laboriously adding 1 to a value (a pointer) that tracks which address the computer is currently "thinking" about. It's so stupid it needs to remember where it is all the time like this, or it can't do anything. Because C is very close to this mundane and laborious fundamental architecture, it (usefully in that case) deals with concepts like "pointers". In languages at just a bit higher level, the language internals deal with pointers so that we as programmers don't have to.
- dave84 5y agoOne tool I use with my own students to visually demonstrate C pointer code is CTutor from PythonTutor. http://pythontutor.com/c.html#mode=edit http://pythontutor.com/c.html#mode=edit If you click down to the bottom and choose from the examples "Pointer Levels" you'll get a good idea of the tools powers.