Wow, this article wasn’t what I expected it to be, but far far deeper. If anyone is skipping over it based on the title, this takes the python “Hello World,” plows through everything happening within Python to make that happen, then continues digging deeper into what’s going on in the OS itself to actually display the text. I can’t imagine how long it took to put this together.
Brooks Davis did a good one of these for the C version. The canonical version of C ‘hello world’ uses printf, which requires basically all of C to implement. When I started working on clang back in 2008, the implementation of printf was the only C function where I saw miscompilations.
When I was doing some work with Java on a 100 MHz FPGA softcore, I used the Java printf. Running my tests took a minute and it turned out that 50 seconds of that was the first printf call. The Java printf uses the class loader to load locales, allocates a load of short-lived objects that require garbage collection and requires pretty much every part of the JVM to be working correctly to work.
It always amazes me that most language implementations end up with a ‘hello world’ that works as a stress-test of the entire run-time environment.
I wish someone had exposed me to something like this decades ago when first learning to program. I plan on trying to work through the explanations with my older children today or this weekend.
Wow, this article wasn’t what I expected it to be, but far far deeper. If anyone is skipping over it based on the title, this takes the python “Hello World,” plows through everything happening within Python to make that happen, then continues digging deeper into what’s going on in the OS itself to actually display the text. I can’t imagine how long it took to put this together.
Brooks Davis did a good one of these for the C version. The canonical version of C ‘hello world’ uses
printf
, which requires basically all of C to implement. When I started working on clang back in 2008, the implementation ofprintf
was the only C function where I saw miscompilations.When I was doing some work with Java on a 100 MHz FPGA softcore, I used the Java
printf
. Running my tests took a minute and it turned out that 50 seconds of that was the firstprintf
call. The Javaprintf
uses the class loader to load locales, allocates a load of short-lived objects that require garbage collection and requires pretty much every part of the JVM to be working correctly to work.It always amazes me that most language implementations end up with a ‘hello world’ that works as a stress-test of the entire run-time environment.
I wish someone had exposed me to something like this decades ago when first learning to program. I plan on trying to work through the explanations with my older children today or this weekend.