6 ms·
Great idea. What other code bases are there that lend themselves to this? Some kind of curated genius.com for source code would be interesting.
by VMG 9y ago
Great idea. What other code bases are there that lend themselves to this?
Some kind of curated genius.com for source code would be interesting.
- wolfgke 9y agoFor operating systems I would recommend xv6: > https://pdos.csail.mit.edu/6.828/2016/xv6.html https://pdos.csail.mit.edu/6.828/2016/xv6.html
- masklinn 9y agoWith the caveat that xv6 is more artificial, it's a codebase for teaching not a living one.
- wolfgke 9y agoIn the past every two years a new version was released - so I would not call it "not living". By personal correspondence with one of the xv6 authors concerning a somewhat larger patch for xv6 (which he liked), he told me that they consider to release a new version in fall 2017, which would be one year after the previous release.
- nickpsecurity 9y agomasklinn's claim still rings true. There's a difference between codebases designed mostly for being easy to understand and codebases designed to be optimal in performance, consistency with an existing style (esp if old), and portability. Getting used to reading one might not transfer well to the other kind since the patterns are different. Probably best to use one of its intended goal (learning how OS's work) and look at examples of the other kind when trying to absorb patterns seen in real-world codebases.
- noshbrinken 9y agoJohn Resig used Genius to annotate the jQuery source code. Seems to be broken now. https://genius.it/johnresig.com/files/jquery-original.html https://genius.it/johnresig.com/files/jquery-original.html
- kruhft 9y agov7x86[1] has some phenomenal x86 assembly code by Robert Nordier. [1] http://emma.nfshost.com/v7x86/index.html http://emma.nfshost.com/v7x86/index.html
- thomas11 9y agoThe Go standard library is very well written and depending on which parts you read you can learn about lots of things like file operations, HTTP, crypto, etc. It's easy to read it all on the web, the docs are here: https://golang.org/pkg/ https://golang.org/pkg/ and clicking on a function name shows the source.
- kampsy 9y agoI totally agree with you. The Go standard library's is fun to read. I end up opening multiple tabs of different packages. Lots of fun.
- pikachuaintcool 9y agohttp://programming.reddit.com/info/63hth/comments/ http://programming.reddit.com/info/63hth/comments/
- mhh__ 9y agoThe D standard library's Algorithms and ranges are nice. Realistically, most production code for things people depend on is quite well done: e.g. LLVM is pretty easy to read. Opposite of this: STL implementations come to mind.
- AstralStorm 9y agoLibc++ is quite readable. Libstdc++, not as much. I've recently hit more than 5 stacked bugs in older version of libstdc++ on bionic libc...
- Baeocystin 9y agoDoom 3's source code is a pleasure to read, and this overview is very well done. http://fabiensanglard.net/doom3/index.php http://fabiensanglard.net/doom3/index.php
- RUG3Y 9y agoIf you're into Python, the Flask source is just awesome. I've learned a lot from that code.
- joshvm 9y agoReading through Python itself is quite interesting, there's actually a MOOC somewhere that does this (ie they hack with the interpreter in the lectures), but I can't remember what it's called unfortunately.
- fasquoika 9y agoI've heard good things about the sources for musl and lua, if you're interested in reading C
- joshvm 9y agoI've been diving into OpenCV recently. It's a very popular library and generally pretty readable (although the code can get quite messy because they use vectorisation a lot). Since it's about as close as we have to a standard, fast, vision library, it's interesting to see how stuff gets implemented. There are loads of little things that could be improved, so it's also a nice codebase for contributing to. In general I think you should pick something that you use every day. There's no point reading OpenBSD for the sake of reading OpenBSD, you'll get far more value out of something familiar.