|
Project Information
|
An extensible extension programmable programming language written in Go, for Go. The syntax is simple and minimal, as is the execution model. Gelo can be thought of as a very low level language for a very high level machine with an extensible instruction set (via WritingAlienCommands). Gelo provides a few simple rules for rewriting and executing an expression. The language's initial state has zero commands and can run no programs. Adding built in commands is simple and writing new commands to integrate Gelo into your application is easy. Since there are no commands built into the language and must be bound to a namespace, to be used, and the names are stored in UTF-8, the language can be fully localized with the rest of your application. This control allows Gelo to be used as a simple configuration language, an executable specification for your web apps routing table, an easy-to-use macro language for that text editor you're writing, a DSL to describe your app's workflow, a full-fledged language for writing plugins and extensions, or even a complete programming language in its own right. Gelo has no dependencies beyond the Go standard library; and even those are kept to a minimum. The syntax of Gelo is very similiar to that of Tcl but execution is more like a Lisp/Scheme language. The RewritingMetaphor for execution lets you build a domain-specific language by layering small commands of increasing abstraction, similiar to a Forth system, and obviates many of the situations where a macro facility would be used. There are some examples of actual Gelo code in src/examples. src/tools has the code for the file intepreter, the REPL, and a quick and dirty turtle graphics program. The last may be the easiest to understand as it does the least. The wiki page on UsingTheVM is a handy reference when reading the code. For writing Gelo commands in Go, the entire standard library in gelo/commands is a reference. |