Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Factor-like simple Stack language implemented in Ruby
Ruby
Branch: master
Failed to load latest commit information.
bin
core fixed core.ruby#const_get
doc
examples
runtime
LICENSE
README

README

--------------------------------
The Stackd programming language
-------- Version 0.1.0 ---------

Stackd is a concatenative programming language, much like Factor and Forth.
It's somewhat an attempt to write a Factor implementation in Ruby.
In contrast to Factor, Stackd is interpreted and not compiled.
It's still in an early development phase, so many things aren't yet supported.


Here's a small list of features, that currently work already:

  * Word definitions
  * Most of Factors core words 
    (still some missing, but shouldn't be hard to implement)
  * Literals for
    * Booleans
    * Numbers (Integer & Float)
    * Strings
    * Arrays
    * Symbols (as in Ruby)
    * Quotations (e.g. first-class 'functions')
    * Regular Expressions (as in Ruby)
    * Hashtables (as in Ruby)
  * Two stacks to work with:
    * Data stack
      (used implicitly and most of the time)
    * Retain stack
      (used for temporarily storing values with predefined words
       e.g.: dip, keep etc.)
  * Very lean and simple syntax (as in Factor)
  * A simple REPL (see bin/repl)
  * Support for debug output via: bin/stackd filename.stackd --debug
    -> Outputs the parsed AST
  
What's partially implemented:
  * A generic object system (as in Factor)
    * Support for: 
      * Generic Words & Methods
      * Inheritance

What's still missing (and never might be implemented):
  * Private / read-only slots on objects / classes (and probably more)
  * Nice development tools, as Factor has them
  * Real debugger or walker
  * Many more features, you'll find in Factor

Some basic syntax rules:
  * All expressions / statements need to end with a semicolon (';')
  * Word definitions start with a colon (':')
  * Words can be named almost anything (as in Factor)
    e.g.: <<name>>, <a,b>, empty?, >!< etc.
  * For more information, have a look at: 
    http://concatenative.org/

Example code:
  * You can find some example code within the examples/ directory.

--------- Dependencies ---------
- Treetop for the parser:
  http://treetop.rubyforge.org
--------------------------------

================================
----------- License ------------
Stackd is licensed under the GNU GPL v3.
It is heavily influenced by the Factor programming language.
Factor is (C) Slava Pestov. Some parts of Stackd's core library
is taken from Factor's.
See http://www.factorcode.org for more information about Factor.

For more information on copying & distribution take a look at the
LICENSE file.

(C) 2009 Christopher Bertels
http://www.adztec-independent.de
--------------------------------
================================
Something went wrong with that request. Please try again.