6 ms·
In addition to this, I highly recommend just reading the codebase. I haven't written C since college and it's remarkably readable. I once tried to catalogue al
by eximius 5y ago
In addition to this, I highly recommend just reading the codebase. I haven't written C since college and it's remarkably readable.
I once tried to catalogue all the stdlib operations which release the GIL, meaning if you use only those (well, only those "heavy" bits, you can still use other small blocking glue bits), you can do "real" multithreading.
It was a fun exercise!
- dharmab 5y agoAgreed. CPython makes readability and maintainability a priority.
- riazrizvi 5y agoAnd it helps much more in the actual job of writing software than in say, practicing coding puzzles
- matheusmoreira 5y ago> I highly recommend just reading the codebase Me too. When I used to write Ruby I read a lot of CRuby source code. I achieved a much deeper understanding of the language that way. Even answered some really fun stackoverflow questions. Now the first thing I do when I see a new language is read its source code.
- jamesfinlayson 5y agoYep, when I was writing PHP I found myself digging into php-src on a regular basis to see what exactly was going on. PHP's documentation is good but the code is much more explicit.
- hultner 5y agoThere's a really nice (although old now) walk through of the cpython code base on YouTube. I watched it on a long 24 hour flight between Canada and Sweden a couple of years back. Edit: Found it! You're in for about 9 hours of quality watching. https://youtube.com/playlist?list=PLwyG5wA5gIzgTFj5KgJJ15lxq5Cv6lo_0 https://youtube.com/playlist?list=PLwyG5wA5gIzgTFj5KgJJ15lxq...
- submeta 5y agoExcellent, thanks for sharing!
- matheusmoreira 5y agoThat's amazing. Wish there was something similar for the JVM and V8.