Live data from Hacker News

Ask HN: Going low-level – what to learn next?

news.ycombinator.com

41–50 of 59 posts

Re: Ask HN: Going low-level – what to learn next?

#41
https://godbolt.org/

Not only will it show you how C/C++/Rust, etc... language statements map to CPU instructions, but it can also show you how CPUs execute those instructions! There are advanced views that show the various pipeline stages, execution ports, etc...

E.g.: https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename...

The right-most tab should show you the CPU execution pipeline

Re: Ask HN: Going low-level – what to learn next?

#42
Read through Understanding Software Dynamics by Richard Sites and work through the example problems in the book.

He discusses exactly what you're describing (L1/2/3 cache hit rates, their performance implications, how compiler optimizations can fool us into thinking we have a good hit rate, etc).

Also take a look into Intel VTune and Processor Tracing to understand how performance counters like Instructions per Cycle are calculated.

Re: Ask HN: Going low-level – what to learn next?

#43
post #22

What do you want low programming for? I learned assembly so I could disassemble and understand programs. I learned C so I could use all the libraries that people had made and their frameworks than later because C++, Objective C, C#, java, python and other derivatives. I wanted to manipulate images, speech and video and using high level programming language was so inefficient so I continued using C. I learned FPFGAs a…

While there are a ton of replies here with great ideas, you make the most important point: most of the best work (across disciplines) is done when you have an objective. Find an issue in need of a solution (or better solution) and use the tools available (or make better ones) to accomplish the task at hand.

My suggestion would be to find something that can be improved on in daily life and then learn the skills necessary to make that improvement, to include the trades more physical in nature, such as woodworking, 3D printing, etc. Then, combine those skills with, say, programming embedded devices, etc. or whatever else is needed to accomplish the task.

This ultimately provides a diverse skill-set, feeds the desire to learn, and provides legitimate improvements to quality of life - both tangible and intangible.

Re: Ask HN: Going low-level – what to learn next?

#44
Low level is mostly not about processing core even if you are using assembly language. Yes, you can reach guru level in assembly language of some target platform but to do something really useful at the lower level you need to know and be able to use the peripheral.

And the hardest things are in peripheral.

Any modern microcontroller it will give you the opportunity to learn a lot of useful things about peripheral devices. You can start with any really good modern 8-bits micro like Microchip's 2nd generation of ATTiny, so you'll have in your hands a lot of very powerful interesting smart peripherals: hardware event system, small programmable logic, different timers, good ADC etc.

The only rational additional consideration here is that your target platform should be popular, well documented and supported by the manufacturer.

Then will be time for some Cortex-M0 device with DMA.

Then you'll decide where to go further :)

Re: Ask HN: Going low-level – what to learn next?

#48
It's nowhere near all the way down to the bottom of the stack*, but it is a lot closer... try out Nand2Tetris[1], where you start with a fairly low level construct... the NAND logic gate, and work your way up to a CPU, Memory, and make a virtual PC, then write an assembler and programs for it.

[1] https://www.nand2tetris.org/

* - Lower levels include transistor logic, analog electronics, electromagnetism, chemistry and the equilibrium equation (how transistors work), quantum mechanics (how atoms and chemistry works).

Re: Ask HN: Going low-level – what to learn next?

#50
> I'm just interested in how it all works under the hood.

Learn everything there is to learn about the Tillitis TKey. It's the most open-source software and hardware USB security token there is. It is FPGA-based, and contains a tiny RISC-V core.

Full disclosure: I'm involved in the project.

Post reply on HN