Present HN: JWEB (a recent implementation of the CWEB Literate Programming intention)

Present HN: JWEB (a recent implementation of the CWEB Literate Programming intention)

JWEB is a recent, simplified implementation of the CWEB intention of literate programming.

Program texts are written in Markdown with fenced code blocks as an alternate of TeX.

ctangle has been re-applied as jtangle which has been enhanced to toughen the Javascript and Typescript languages to boot to to the usual ctangle toughen for C and C++.

jtangle is written in JWEB, so it is self-constructed.

Since TeX is never any longer broken-down no re-implementation of cweave modified into once required.

The procedure it indubitably works

Write your program as a Markdown doc consisting of sections of descriptive text alongside with fenced code blocks formatted the utilize of CWEB protect a watch on codes and portion texts.

Language Specifier

The output language is indicated by this Markdown entrance-matter:

where is the language specifier that would possibly per chance be appended to the output filename. e.g. (c, cpp, js, ts).

Peep cwebman.pdf in docs for the CWEB syntax, and peep and the examples folder for JWEB offer examples.

Producing a purpose offer file

jtangle accepts WEB files as enter, so any existing CWEB (*.w) file would possibly per chance even be processed into a program offer file.

The squawk line syntax for jtangle is somewhat of deal of to that of ctangle. i.e.

jtangle [options] webfile[.w] {changefile[.ch]|-} outlang outfile

where outlang is the aim language extension and outfile is the filename with out language extension.

When constructing from a Markdown offer an intermediate WEB file must be generated earlier than calling jtangle. A construct script construct.js is equipped to fully course of a Markdown file.

The markdown file is remodeled into a WEB file by concatenating all the fenced code blocks collectively and adding CWEB portion protect a watch on codes.

Then the WEB file is passed into jtangle to maintain the aim offer file.

Peep equipment.json for examples of calling construct.js for jtangle and the examples.

While you leer this instrument precious please deem making a contribution to toughen the pattern of free and open instrument:


Be half of the pack! Be half of 8000+ others registered customers, and glean chat, glean groups, post updates and glean chums around the sector!



Hey! look, i give tutorials to all my users and i help them!

you're currently offline