Take the 2-minute tour ×

I was (casually) researching semantic / ontology based approaches to technical documentation, when I stumbled upon this gem:

Literate Programming and the Semantic Web are ideas from different times, which do have a connection.

The linked paper, Literate Programming in XML by Norman Walsh, discusses XML technologies that are central to semantic web, however I fail to see the conceptual connection between literate programming and the semantic web or ontology based documentation. Help?

share|improve this question
add comment

3 Answers

Literate programming and the semantic web are both concerned with meaning.

The semantic web seeks to make the Internet more intelligent by adding what I call "conceptual metadata" (i.e. topical information) to web pages. Pages so annotated become more than just randomly linked bits of text; they become conceptual frameworks of information (i.e. ontologies).

Literate programming seeks to develop software in programming languages that more closely models the thought process of humans, rather than the thought process of machines. The "declarative over imperative" movement is part of this gestalt; rather than telling the machine how to do something, you tell it what you want done, and the machine figures out the how.

share|improve this answer
add comment

Both concepts appear to target the point where human reading meets computer execution.

In literate programming, human readable part is represented by the idea of writing programs like in an ordinary human language, much like the text of an essay. Respective part in semantic web is that it targets human-readable web pages.

Computer execution aspect in literate programming is that, unlike the classic text, it is targeted also at computer execution. Respective part in semantic web is represented by the notion of data that can be processed directly and indirectly by machines

The connection looks quite profound, like approaching the same target, only from different angles.

The guy who groked this seems pretty smart. Connection looks clear to me now that it was laid out right before my nose but I'll be damned if I've seen that connection before. Another striking point about this observation is that it helped me better understand both concepts (have to admit I had trouble with that before).


  • Literate programming - Wikipedia article

    The literate programming paradigm, as conceived by Knuth, represents a move away from writing programs in the manner and order imposed by the computer, and instead enables programmers to develop programs in the order demanded by the logic and flow of their thoughts. Literate programs are written as an uninterrupted exposition of logic in an ordinary human language, much like the text of an essay, in which macros which hide abstractions and traditional source code are included.
    Literate programming tools are used to obtain two representations from a literate source file: one suitable for further compilation or execution by a computer, the "tangled" code, and another for viewing as formatted documentation, which is said to be "woven" from the literate source.[3] While the first generation of literate programming tools were computer language-specific, the later ones are language-agnostic and exist above the programming languages.

  • Semantic Web - Wikipedia article

    Semantic Network Model... a form to represent semantically structured knowledge. It extends the network of hyperlinked human-readable web pages by inserting machine-readable metadata about pages and how they are related to each other, enabling automated agents to access the Web more intelligently and perform tasks on behalf of users.
    Tim Berners-Lee... oversees the development of proposed Semantic Web standards. He defines the Semantic Web as "a web of data that can be processed directly and indirectly by machines."

share|improve this answer
add comment

It feels like a weak connection at best. The key to the semantic web is strict adherence to the idea that HTML's primary role is to describe and model content. By (almost) completely separating your behavior and presentation layers in different languages (JS, CSS), HTML acts like a springboard for the other two to act on, I suppose.

But in web dev, HTML is more the focal point where everything comes together, including back end technologies. Literate programming sounds more like a way of describing a wide variety of application concerns in XML (edit: or other declarative language) and then having compatible frameworks sort out the details of actually programming the app. They're almost diametrically opposed. One isolates a specific concern. The other establishes a plan for an entire app.

No offense, but I find the idea clumsy and horrifying.

share|improve this answer
Literate programming has nothing to do with XML, it's an approach to programming introduced by Don Knuth in the 70s, long before the web, the semantic web and XML. The paper describes how XML could be utilized in literate programming, nothing more. –  Yannis Rizos May 17 '12 at 5:41
Well, XML or any other format. You still have a static language informing or incorporating a framework. I like an intuitively overloaded method. As I can tell you from many phonecalls with AT&T, I dislike describing the nature of my problem to an automated solution. –  Erik Reppen May 17 '12 at 5:54
Semantic Web and Semantic HTML are two different and fairly unrelated things. –  tdammers May 17 '12 at 6:15
@Erik You are getting downvotes because you misunderstand what literate programming is. I suggest you at least read Wikipedia's article. –  Andres F. May 17 '12 at 12:18
It's true. I think I read the wrong article at first. And fail on the semantic web. Jebus H. –  Erik Reppen May 17 '12 at 13:58
add comment

Your Answer


