TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Reading OpenBSD source code daily

386 pointsby mulanderalmost 8 years ago

14 comments

sqsalmost 8 years ago
Completely agree. But the tools don&#x27;t make this very easy.<p>Back in college I was working on patches to OpenSSL, Chrome, Firefox, Apache, etc., to add support for TLS-SRP, and it was a huge pain to jump into these massive codebases and try to understand them. I was using Emacs and had all of the various language support modes configured, but go-to-definition and cross-references barely worked. Searching was slow, and if I wanted to discuss a piece of code with my CS lab partners, I couldn&#x27;t just share a link.<p>A friend felt the same pain but then went to work at Google for a bit. At Google, they have some pretty amazing code reading&#x2F;searching tools (see <a href="https:&#x2F;&#x2F;static.googleusercontent.com&#x2F;media&#x2F;research.google.com&#x2F;en&#x2F;&#x2F;pubs&#x2F;archive&#x2F;43835.pdf" rel="nofollow">https:&#x2F;&#x2F;static.googleusercontent.com&#x2F;media&#x2F;research.google.c...</a>), and these tools helped Google build a culture of thoroughly reading and reviewing code. The causality is bidirectional, but having good tools certainly played a role in Google&#x27;s success.<p>That friend and I ended up building a product, Sourcegraph, initially for ourselves to make code reading easier. We&#x27;ve now built a successful business out of it with the help of an amazing team. Here it is pulling in the OpenBSD sources: <a href="https:&#x2F;&#x2F;sourcegraph.com&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;-&#x2F;blob&#x2F;lib&#x2F;libutil&#x2F;bcrypt_pbkdf.c?q=bcrypt_pbkdf#L98-98:13" rel="nofollow">https:&#x2F;&#x2F;sourcegraph.com&#x2F;github.com&#x2F;openbsd&#x2F;src&#x2F;-&#x2F;blob&#x2F;lib&#x2F;li...</a>. Sourcegraph has advanced features for several languages; see <a href="https:&#x2F;&#x2F;sourcegraph.com&#x2F;github.com&#x2F;mholt&#x2F;caddy&#x2F;-&#x2F;blob&#x2F;caddyhttp&#x2F;httpserver&#x2F;https.go#L22:23$references" rel="nofollow">https:&#x2F;&#x2F;sourcegraph.com&#x2F;github.com&#x2F;mholt&#x2F;caddy&#x2F;-&#x2F;blob&#x2F;caddyh...</a>, for example. If you love to read code (or want to), we hope you&#x27;ll love our product. Email me if you have any feedback&#x2F;requests.
评论 #14523353 未加载
评论 #14523216 未加载
评论 #14523777 未加载
评论 #14523253 未加载
评论 #14522471 未加载
评论 #14522524 未加载
评论 #14527110 未加载
评论 #14523333 未加载
评论 #14522597 未加载
peatmossalmost 8 years ago
I love this idea in part because it&#x27;s the very opposite of the way I tend to work, which is to drive very hard to get a surface understanding of a thing in order to make a very targeted change. I learn lots along the way with this approach, but don&#x27;t often get the deep, wholistic understanding of existing systems that only comes with repeated exposure over a long time.<p>Some kinds of understanding involve a no shortcuts grind. That sort of a grind is a big commitment though.
评论 #14522462 未加载
评论 #14522035 未加载
评论 #14522860 未加载
评论 #14523123 未加载
kfrzcodealmost 8 years ago
I&#x27;ve been using Typing.io as a platform for reading source code (working my way through Gitlab now) and practicing typing with the right fingers. I have a few minor bad habits to correct, and I want to familiarize myself with the codebase, it&#x27;s a good way to warm up for the day.
VMGalmost 8 years ago
Great idea. What other code bases are there that lend themselves to this?<p>Some kind of curated genius.com for source code would be interesting.
评论 #14522164 未加载
评论 #14522342 未加载
评论 #14525038 未加载
评论 #14521901 未加载
评论 #14521998 未加载
评论 #14522314 未加载
评论 #14523174 未加载
评论 #14522882 未加载
评论 #14522061 未加载
评论 #14522169 未加载
aomixalmost 8 years ago
I&#x27;ve fallen into doing something similar. I read the mailing lists regularly try to look over the source for something that gets a proposed patch. Because OpenBSD boils down their software to the essentials and tries to make their APIs impossible to misuse I find it pretty easy reading even though I&#x27;m not very experienced with C.
brynetalmost 8 years ago
Here&#x27;s the latest daily chat transcript, from Jun 9th: The topic was OpenBSD nc(1) and libtls, but it wandered over to pledge(2) and other code fixes from new participants eager to contribute.<p><a href="https:&#x2F;&#x2F;junk.tintagel.pl&#x2F;openbsd-daily-nc.txt" rel="nofollow">https:&#x2F;&#x2F;junk.tintagel.pl&#x2F;openbsd-daily-nc.txt</a>
评论 #14525753 未加载
评论 #14527886 未加载
topspinalmost 8 years ago
Anyone have a good exemplar React application for this purpose? I&#x27;m building small experimental stuff and now I need to level up and see how real applications are being built.
sn41almost 8 years ago
I read the emacs lisp source code in site-lisp&#x2F; every day. The goal is to understand one file about a week or so. It has made my emacs and lisp knowledge better, and made me aware of several nice emacs features (align-regexp, for example).
ianaialmost 8 years ago
I wonder where best to start for people who haven&#x27;t taken an OS class before?
评论 #14522391 未加载
评论 #14521942 未加载
评论 #14521914 未加载
评论 #14521801 未加载
评论 #14523124 未加载
carlmungzalmost 8 years ago
I started doing this the other day for a JS framework I&#x27;m using. Cannot recommend this practice highly enough. You learn so much.
评论 #14525702 未加载
z3t4almost 8 years ago
What I love about the web is that you can just right click and view source. See something cool ? Just click and see how they did it.
评论 #14525329 未加载
err4ntalmost 8 years ago
This is fantastic! I&#x27;ve recently decided to begin reading web browser source code, even though I understand very little of it at the moment.<p>For now, what&#x27;s been fun is to load up the same file in both Chromium and Firefox source, and compare the two and how both browsers work.<p>Chromium source: <a href="https:&#x2F;&#x2F;cs.chromium.org&#x2F;chromium&#x2F;src&#x2F;third_party&#x2F;WebKit&#x2F;Source&#x2F;core&#x2F;" rel="nofollow">https:&#x2F;&#x2F;cs.chromium.org&#x2F;chromium&#x2F;src&#x2F;third_party&#x2F;WebKit&#x2F;Sour...</a><p>Firefox source: <a href="https:&#x2F;&#x2F;dxr.mozilla.org&#x2F;mozilla-central&#x2F;source&#x2F;" rel="nofollow">https:&#x2F;&#x2F;dxr.mozilla.org&#x2F;mozilla-central&#x2F;source&#x2F;</a>
评论 #14522412 未加载
irundebianalmost 8 years ago
How about using a static security source code analyzer and going through all findings? The very good ones, the commercial ones, are free to use for open source projects. That would be real benefit to the project I think.
评论 #14521921 未加载
lbillalmost 8 years ago
This is a smart thing to do! I might do it eventually... not right now though, because of &lt;insert whatever reason you can think of here&gt;, and stuff, you know.