News for hackers. Stuff that matters.
Re:Reading OpenBSD source code daily by VMG on Friday June 09, 2017 @10:56AM (#14521819)
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.

Re:Reading OpenBSD source code daily by thomas11 on Friday June 09, 2017 @11:42AM (#14522164)
The 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/ and clicking on a function name shows the source.

Re:Reading OpenBSD source code daily by kampsy on Saturday June 10, 2017 @04:26AM (#14526604)
I 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.
Re:Reading OpenBSD source code daily by Baeocystin on Friday June 09, 2017 @12:07PM (#14522342)
Doom 3's source code is a pleasure to read, and this overview is very well done.

http://fabiensanglard.net/doom3/index.php

Re:Reading OpenBSD source code daily by joshvm on Friday June 09, 2017 @06:20PM (#14525038)
I'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.

Re:Reading OpenBSD source code daily by wolfgke on Friday June 09, 2017 @11:07AM (#14521901)
For operating systems I would recommend xv6:

> https://pdos.csail.mit.edu/6.828/2016/xv6.html

Re:Reading OpenBSD source code daily by masklinn on Friday June 09, 2017 @11:10AM (#14521936)
With the caveat that xv6 is more artificial, it's a codebase for teaching not a living one.
Re:Reading OpenBSD source code daily by wolfgke on Friday June 09, 2017 @11:19AM (#14522003)
In 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.
Re:Reading OpenBSD source code daily by nickpsecurity on Friday June 09, 2017 @11:21AM (#14522013)
masklinn'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.
Re:Reading OpenBSD source code daily by noshbrinken on Friday June 09, 2017 @11:18AM (#14521998)
John Resig used Genius to annotate the jQuery source code. Seems to be broken now.

https://genius.it/johnresig.com/files/jquery-original.html

Re:Reading OpenBSD source code daily by mhh__ on Friday June 09, 2017 @12:03PM (#14522314)
The 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.

Re:Reading OpenBSD source code daily by AstralStorm on Friday June 09, 2017 @02:06PM (#14523160)
Libc++ is quite readable. Libstdc++, not as much.

I've recently hit more than 5 stacked bugs in older version of libstdc++ on bionic libc...

Re:Reading OpenBSD source code daily by fasquoika on Friday June 09, 2017 @02:08PM (#14523174)
I've heard good things about the sources for musl and lua, if you're interested in reading C
Re:Reading OpenBSD source code daily by RUG3Y on Friday June 09, 2017 @01:30PM (#14522882)
If you're into Python, the Flask source is just awesome. I've learned a lot from that code.
Re:Reading OpenBSD source code daily by joshvm on Friday June 09, 2017 @06:13PM (#14525002)
Reading 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.
Re:Reading OpenBSD source code daily by RUG3Y on Sunday June 11, 2017 @07:37PM (#14534407)
I've just put it on my list to read the Python source.
Re:Reading OpenBSD source code daily by joshvm on Tuesday June 13, 2017 @10:26AM (#14544905)
Re:Reading OpenBSD source code daily by kruhft on Friday June 09, 2017 @11:27AM (#14522061)
v7x86[1] has some phenomenal x86 assembly code by Robert Nordier.

[1] http://emma.nfshost.com/v7x86/index.html

Re:Reading OpenBSD source code daily by pikachuaintcool on Friday June 09, 2017 @11:43AM (#14522169)