Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Most of the following screenshots were taken using the SDL backend.
This is a literate programming example that shows many different domains mixed.
How to write tests
This example shows how could one mix tests and code in literate programming.
The graphics domain supports the usual graphical primitives such as point, line, rectangle, circle, polygon, text, image, etc.
The JSON domain supports the well-known JSON data types: null, true, false, numbers, strings, arrays and objects. Notice how the editor knows what is under the mouse. Also remember that the underlying data structure is not text even if it seems to be so.
The XML domain supports elements, attributes and text. Syntax highlight and automatic indentation is based on the domain specific document data structure.
The book domain supports books, chapters nested into each other, paragraphs, ordered lists, etc. along with automatic word wrapping.
The Java domain supports only a limited set of Java code. These include among others: method declarations, method arguments, qualifiers, types, expressions, function applications, constants, etc. Syntax highlight is based on the input document data structure instead of the parser.
The Common Lisp domain supports only a limited set of Common Lisp code. These include among others: function definitions, function arguments, a few special forms, function applications, constants, etc. Syntax highlight is based on the input document data structure instead of the parser.
This example demonstrates a generic projection that can convert any object into a table. In fact the object shown is part of the document shown in the XML example.
This example document shows a mixed document data structure. The document contains Common Lisp code mixed with JSON and XML simultaneously. Syntax highlight, automatic indentation and other features play nicely together. Notice how the editor still knows what is what when the tooltip pops up at the mouse.
This example demonstrates how different domains can be put together in the same table.
This is the most complex document and projection example. It shows how you could mix all the previously mentioned domains into a single book with chapters, tables, code, etc. Note that the editor still provides automatic indentation, syntax highlight, automatic separators and delimiters, etc. Editing any part of that document should still be possible with highly context sensitive editing operations. This gives a new meaning to literate programming.
This example shows how the SLIME backend displays the output of the mixed domain example.