Live data from Hacker News

Ask HN: What's the best source code you've read?

news.ycombinator.com

171–180 of 271 posts

Re: Ask HN: What's the best source code you've read?

#171
post #71

I haven’t read all of it, but the Principia source code has a comprehensive units system and makes effective use of Unicode: https://github.com/mockingbirdnest/Principia/ https://github.com/mockingbirdnest/Principia/blob/master/ast... is a decent example of both: // We compute the mean rate (slope) of the mean anomaly M(t), the mean // argument of latitude u(t), and the longitude of the ascending node Ω(t). … Product…

Using Unicode symbols wisely in mathematical code is a godsend. I regularly use Julia, which favors this style, and find that this feature improves the readability of code enormously.

Re: Ask HN: What's the best source code you've read?

#175
post #56

Nobody has mentioned Knuth’s corpus of work in Pascal-Web for the TeX ecosystem. This is code written for an era where there wasn’t an ecosystem of libraries for common tasks and even things like being able to access a file in random access order couldn’t be counted on. Even 7-bit ASCII couldn’t be counted on as a given (EBCDIC-based IBM mainframes were a significant element of the computing landscape still). Against…

> although sadly, literate programming seems all but dead now

It seems alive and well in the data-science community to me. Look at jupyter notebooks if you aren't aware of what I am talking about.

Re: Ask HN: What's the best source code you've read?

#176
post #175
post #56

Nobody has mentioned Knuth’s corpus of work in Pascal-Web for the TeX ecosystem. This is code written for an era where there wasn’t an ecosystem of libraries for common tasks and even things like being able to access a file in random access order couldn’t be counted on. Even 7-bit ASCII couldn’t be counted on as a given (EBCDIC-based IBM mainframes were a significant element of the computing landscape still). Against…

> although sadly, literate programming seems all but dead now It seems alive and well in the data-science community to me. Look at jupyter notebooks if you aren't aware of what I am talking about.

It’s not really literate programming. It’s just editable/executable code intertwined with text. There’s no tangle and weave, or code reuse.

Re: Ask HN: What's the best source code you've read?

#178
post #175

Earlier quoted context omitted.

> although sadly, literate programming seems all but dead now It seems alive and well in the data-science community to me. Look at jupyter notebooks if you aren't aware of what I am talking about.

It’s not really literate programming. It’s just editable/executable code intertwined with text. There’s no tangle and weave, or code reuse.

What about this https://observablehq.com/@tomlarkworthy/redis-backend-1

Re: Ask HN: What's the best source code you've read?

#179
post #56

Nobody has mentioned Knuth’s corpus of work in Pascal-Web for the TeX ecosystem. This is code written for an era where there wasn’t an ecosystem of libraries for common tasks and even things like being able to access a file in random access order couldn’t be counted on. Even 7-bit ASCII couldn’t be counted on as a given (EBCDIC-based IBM mainframes were a significant element of the computing landscape still). Against…

I think LSP language server protocol and literate programming are a match made in heaven.

A simple syntax like noweb and a LSP dispatcher which only handles the noweb syntax elements and dispatches both text and code chunks to respective back ends; the LP LSP Server tangles the code chunks and presents the tangled code to the code specific LSP servers and does the mapping forth and back of the position-in-nw vs position-in-$code while passing all other communication through.

especially now that we have DAP something like this would really make sense, wouldn't it?

Re: Ask HN: What's the best source code you've read?

#180
post #79

Earlier quoted context omitted.

I have not read it in a while but it would be interesting to debate what essays are no longer relevant. I'll be grabbing it off the shelf next to my original copy of the Byte issue on C mentioned yesterday and having a look for expired relevancy.

There are some sections about physical copies of documentation and managing the logistics of that when I read it.

wouldn't wikis be good the contemporary successors of that section? it's about documentation being disconnected from code, about co-evolving and providing both in an economical way, in contrast to being inefficient or even ineffective in documenting technology.
Post reply on HN