HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
jostylr
literate-programming-lib
JavaScript2015–2015
jostylr / literate-programming-lib

literate-programming-lib

The library component of literate-programming

2Distinct people
5Mentions
0Explicit recommenders
36GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

The library component of literate-programming

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week5 dated mentions

Observed mentions: 2015-02-09 06:39:29 UTC to 2015-08-17 01:35:00 UTC. Weeks start Monday, UTC.

0122015-02-09 00:00:00 UTC to 2015-02-16 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 92015-02-16 00:00:00 UTC to 2015-02-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-02-23 00:00:00 UTC to 2015-03-02 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-02 00:00:00 UTC to 2015-03-09 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-09 00:00:00 UTC to 2015-03-16 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-16 00:00:00 UTC to 2015-03-23 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-23 00:00:00 UTC to 2015-03-30 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-30 00:00:00 UTC to 2015-04-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-06 00:00:00 UTC to 2015-04-13 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2015-04-13 00:00:00 UTC to 2015-04-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-20 00:00:00 UTC to 2015-04-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-04-27 00:00:00 UTC to 2015-05-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-04 00:00:00 UTC to 2015-05-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-11 00:00:00 UTC to 2015-05-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 112015-05-18 00:00:00 UTC to 2015-05-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-05-25 00:00:00 UTC to 2015-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-01 00:00:00 UTC to 2015-06-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-08 00:00:00 UTC to 2015-06-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-15 00:00:00 UTC to 2015-06-22 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2015-06-22 00:00:00 UTC to 2015-06-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-06-29 00:00:00 UTC to 2015-07-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-06 00:00:00 UTC to 2015-07-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-13 00:00:00 UTC to 2015-07-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-20 00:00:00 UTC to 2015-07-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-07-27 00:00:00 UTC to 2015-08-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-08-03 00:00:00 UTC to 2015-08-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-08-10 00:00:00 UTC to 2015-08-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-08-17 00:00:00 UTC to 2015-08-24 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsAug 17

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Feb 92015-02-09 00:00:00 UTC2015-02-16 00:00:00 UTC101
Feb 162015-02-16 00:00:00 UTC2015-02-23 00:00:00 UTC000
Feb 232015-02-23 00:00:00 UTC2015-03-02 00:00:00 UTC000
Mar 22015-03-02 00:00:00 UTC2015-03-09 00:00:00 UTC000
Mar 92015-03-09 00:00:00 UTC2015-03-16 00:00:00 UTC000
Mar 162015-03-16 00:00:00 UTC2015-03-23 00:00:00 UTC000
Mar 232015-03-23 00:00:00 UTC2015-03-30 00:00:00 UTC000
Mar 302015-03-30 00:00:00 UTC2015-04-06 00:00:00 UTC000
Apr 62015-04-06 00:00:00 UTC2015-04-13 00:00:00 UTC101
Apr 132015-04-13 00:00:00 UTC2015-04-20 00:00:00 UTC000
Apr 202015-04-20 00:00:00 UTC2015-04-27 00:00:00 UTC000
Apr 272015-04-27 00:00:00 UTC2015-05-04 00:00:00 UTC000
May 42015-05-04 00:00:00 UTC2015-05-11 00:00:00 UTC000
May 112015-05-11 00:00:00 UTC2015-05-18 00:00:00 UTC000
May 182015-05-18 00:00:00 UTC2015-05-25 00:00:00 UTC000
May 252015-05-25 00:00:00 UTC2015-06-01 00:00:00 UTC000
Jun 12015-06-01 00:00:00 UTC2015-06-08 00:00:00 UTC000
Jun 82015-06-08 00:00:00 UTC2015-06-15 00:00:00 UTC000
Jun 152015-06-15 00:00:00 UTC2015-06-22 00:00:00 UTC202
Jun 222015-06-22 00:00:00 UTC2015-06-29 00:00:00 UTC000
Jun 292015-06-29 00:00:00 UTC2015-07-06 00:00:00 UTC000
Jul 62015-07-06 00:00:00 UTC2015-07-13 00:00:00 UTC000
Jul 132015-07-13 00:00:00 UTC2015-07-20 00:00:00 UTC000
Jul 202015-07-20 00:00:00 UTC2015-07-27 00:00:00 UTC000
Jul 272015-07-27 00:00:00 UTC2015-08-03 00:00:00 UTC000
Aug 32015-08-03 00:00:00 UTC2015-08-10 00:00:00 UTC000
Aug 102015-08-10 00:00:00 UTC2015-08-17 00:00:00 UTC000
Aug 172015-08-17 00:00:00 UTC2015-08-24 00:00:00 UTC101

What Hacker News says

5 sources
1) It ain't dead yet. 2) Tooling/syntax is a big part of it. I like literate programming, but most syntaxes for it turn me off. Some of it also seems very tied to particular languages. None of that helped for a concept that was always going to be a hard sell. 3) I wrote, and am refining, a version of literate programming: https://github.com/jostylr/literate-programming-lib It uses markdown where headers are the section headers, code blocks in markdown are the code blocks to sew together, and _"header name" is the block syntax. It has a bunch of other features, but that's the core. My hope is that this might eventually help this style to catch on in some quarters. 4) I am just a hobbyist programmer, but what I enjoy about it is the ability to organize my code in any fashion I like. In particular, I can keep chunks to a screen size. Bracke
Read the rest
ts never go beyond a page. And I can stub out anything I like real easy. Now in many programming languages, small chunks are easy to achieve in the terms of functions or objects or modules or even just variables. That is, one of the most important in-the-now useful parts of literate programming is implemented in a good-enough version, particularly with good naming conventions and decent commenting. And good enough is what keeps many from using optimal practices. Or rather, and this is important, optimal from one perspective, e.g., literate-programming can easily rub up against "no premature optimization". On the other hand, I like not using functions for code management. I want functions to be used when a function is really needed. But that's just my preference. I also like being able to see the whole construct in the compiled code put in one place instead of having to trace it out through function calls. But I have never been big on debugging tools; if I was, this would probably be less of an issue. 5) Updating does tend to be a problem in that with the excitement of a new feature or a bug fix, it is real easy to leave bad documentation there. But that would be true of any documentation. Here at least one can quickly look at the code and see that it seems off. 6) One key feature that I like about my system is the management of multiple files, really, a kind of literate project management. I do not know if the other systems did that. This is a game changer for me. When I open a foreign code base, I have a hard time knowing where to start. In any particular file, I can see what is going on, but getting the global perspective is what is missing. Literate project management can tell you what all these files do, do pre and post compiling options (linting, concatenating, minimizing, testing, dev vs production branching, etc.), and allow a true global organization of where you want the code to be. You can have all code, styling, content for a widget all in one place. Or not. There are no constraints to your organization and that is awesome. It is also a downside. Constraints are powerful tools and when you have a system that allows you to do anything, it can lead to severe issues, particularly (ironically), of communication. I could see teams benefiting greatly from this if they agree on organizational principles and if not, I can see this exacerbating the conflicts. 7) The hurdle to get over is "Is it going to make it quicker to get my code done?" And I don't think previous tools have done this. I am hoping my tool will do this for the web stack. That stack is a mess and we need organization for it. For other programming languages and tasks, I don't think this is as glaring a need. It often feels a lot like just reversing the comments as literate-coffeescript seems to be. In the hands of a master, such as Knuth, a literate programming is a gem of wonder. But for most, including me, it is a different beast and may not be that pretty. 8) Programmers may have an irrational fear of writing. As a mathematician, I see many adults, even programmers, fear math for no reason whatsoever. The same may be true of prose, at least sufficiently so to discourage the desire to use this. Note that I think they could do it, but that they think they cannot. But I am an optimist.
In Ask HN: Why did literate programming not catch on?
I agree that functions are not usually a good one-to-one fit for abstraction. If they were, we wouldn't need variables, loops, blocks etc. Now you could argue that we don't, we should just write code in lambda calculus -- but we don't do that. Especially for languages like assembler and C-like languages, it can be very nice to single out smaller sections of code. And while for eg: C, or I suppose a macro assembler, one might be able to in-line a lot of such blocks -- having to stay at the "block-semantic"-level of the host language can make some things pretty hard to communicate to the human reader in a good way. Ruby might actually be a good candidate for "simple" literate programming, in the sense that one probably could, and perhaps sometimes should, program ruby much like smalltalk -- no method/function longer than five lines or so, e
Read the rest
xcept for the most exceptional circumstances. Even then, I think one would find patterns that would make sense to abstract out of the "function level", or "language level". At the other end of the spectrum is too much magic, just as with any meta-programming technique, such as proper macros. I had a most peculiar experience trying to write some (mostly procedural) java with noweb. It was typical intro programming stuff, basically some very simple data structures/algorithms. It was a very nice fit for literate programming, but not such a good fit for java -- while the literate program read nicely, and was well structured, the mangled java code was unwieldy -- it turned out I'd ended up generating a java program that did what I wanted. Now, that's not really a problem, we generate assembly programs that are unwieldy all the time -- but the point is it took some discipline and thought to write a literate program that was also readable in it's tangled form. Only an issue if people are expected to read/modify it in that state, obviously. And they are, as they'll have to debug it at some point ;-) > I think the code is not incidental That was a bit tongue-in-cheek -- I meant more in the sense that comments are incidental to code in most programming languages. > https://github.com/jostylr/literate-programming-lib Very nice, thank you for sharing.
In Show HN: Servasm – Literate web server in x86 assembler
One functional feature that is missing is that of having blocks in different order. Jeremy Ashkenas argues that because of functions, we do not need that reordering. I disagree with that. I do think a large part of what makes literate programming powerful is that one can easily sculpt the order of the presentation. It elevates the code and comment to telling a story for humans. I think the code is not incidental, but is part of the aspect of the story, much like in a fictional story one has descriptive passages and dialog passages. If one updates the story, both may change or perhaps just one of them. My take on literate programming, using markdown: * minimal client at https://www.npmjs.com/package/litpro * core library and docs at https://github.com/jostylr/literate-programming-lib
In Show HN: Servasm – Literate web server in x86 assembler
I wrote a markdown based version of literate-programming that allows one to write it with lots of comments and organize the code in anyway you wish. But then when compiled, you can see all the code without all the long comments. You can still have normal programming comments in there, of course, but the detailed thinking (the why and an overview of relations to other parts) can be taken away. https://github.com/jostylr/literate-programming-lib
In John Resig annotates original jQuery source code
I wrote a literate-programming compiler to deal with JavaScript programming (any language works, but js is the one I use the most); it use markdown as the language in which the code is embedded. For me, prototype setup and async stuff seemed to naturally lead me to want to differ in the ordering between how I write and how the program is laid out. I find it quite liberating to not care what order I write the code in, dashing off a substitution section to deal with later. I know functions can be used to chunk out code in different orders, but I like the interplay of having it ordered in the writing in a sensible fashion while still getting the compiled view of it in the programmatic ordering. Plus my version allows for a lot of finely tuned hacking on the language. That is, one can reduce a lot of boiler-plate setup with processing small c
Read the rest
hunks of code. Having said all that, I would not use Knuth's original version for js. I think what was particularly attractive was a simple language like markdown for embedding code in a natural and simple way. My main repo is https://github.com/jostylr/literate-programming though I am currently rewriting the engine behind it to allow for more asynchronous compiling https://github.com/jostylr/literate-programming-lib
In Annotated code: Circles bouncing off lines

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.