Abstract:
In this paper we introduce G-expressions, a new syntax based on the
S-expression syntax utilized by most Lisp family languages. We have
implemented a new homoiconic language, Ginger, based on this syntax
and a Smalltalk inspired object system. Like the Scheme language,
Ginger employs only a few special forms and observes a minimalist
discipline allowing users to define functions that act like the
primitive forms in many Algol-like languages. But unlike Scheme,
G-expressions allow Ginger to emulate the aesthetic feel of an
Algol-like language syntax. While fundamentally a dialect of Lisp,
Ginger implements an attractive modern syntax which can superficially
resemble Python or Ruby. This syntactic flexibility exemplifies
Ginger’s true power as a tool for developing task or domain-specific
micro-languages.
Reimagining Literate Programming
http://ging3r.org/learn/onward-palmer.pdf
Abstract:
In this paper we describe Ginger, a new language with first class
support for literate programming. Literate program- ming refers to a
philosophy that argues computer programs should be written as
literature with human readability and understanding of paramount
importance. While the intent of literate programming is to make
understanding computer programs simpler, most literate programming
systems are quite complex and consist of three different languages
corre- sponding to 1) an implementation language, 2) a documenta- tion
language, and 3) a literate programming glue language. In Knuth’s
original implementation these were Pascal, TEX, and WEB respectively.
Antithetical to the goals that literate programming espouses, this
three language paradigm creates a truly challenging environment for
new programmers. In this paper we reimagine literate programming as a
core programming language feature and describe a novel system for
literate programming based on G-expression transforma- tions. We show
that Ginger code can be used to naturally represent code, prose, and
literate connections, which in turn unifies, simplifies and
significantly extends the literate programming experience.
--
Thiago Silva
Computer Science
M.Sc. Candidate at Federal University of Pernambuco
jabber/gtalk: tsi...@jabber-br.org
http://blog.sourcecraft.info