| 1 |
-------------------------------- |
| 2 |
The Stackd programming language |
| 3 |
-------- Version 0.1.0 --------- |
| 4 |
|
| 5 |
Stackd is a concatenative programming language, much like Factor and Forth. |
| 6 |
It's somewhat an attempt to write a Factor implementation in Ruby. |
| 7 |
In contrast to Factor, Stackd is interpreted and not compiled. |
| 8 |
It's still in an early development phase, so many things aren't yet supported. |
| 9 |
|
| 10 |
|
| 11 |
Here's a small list of features, that currently work already: |
| 12 |
|
| 13 |
* Word definitions |
| 14 |
* Most of Factors core words |
| 15 |
(still some missing, but shouldn't be hard to implement) |
| 16 |
* Literals for |
| 17 |
* Booleans |
| 18 |
* Numbers (Integer & Float) |
| 19 |
* Strings |
| 20 |
* Arrays |
| 21 |
* Symbols (as in Ruby) |
| 22 |
* Quotations (e.g. first-class 'functions') |
| 23 |
* Regular Expressions (as in Ruby) |
| 24 |
* Hashtables (as in Ruby) |
| 25 |
* Two stacks to work with: |
| 26 |
* Data stack |
| 27 |
(used implicitly and most of the time) |
| 28 |
* Retain stack |
| 29 |
(used for temporarily storing values with predefined words |
| 30 |
e.g.: dip, keep etc.) |
| 31 |
* Very lean and simple syntax (as in Factor) |
| 32 |
* A simple REPL (see bin/repl) |
| 33 |
* Support for debug output via: bin/stackd filename.stackd --debug |
| 34 |
-> Outputs the parsed AST |
| 35 |
|
| 36 |
What's partially implemented: |
| 37 |
* A generic object system (as in Factor) |
| 38 |
* Support for: |
| 39 |
* Generic Words & Methods |
| 40 |
* Inheritance |
| 41 |
|
| 42 |
What's still missing (and never might be implemented): |
| 43 |
* Private / read-only slots on objects / classes (and probably more) |
| 44 |
* Nice development tools, as Factor has them |
| 45 |
* Real debugger or walker |
| 46 |
* Many more features, you'll find in Factor |
| 47 |
|
| 48 |
Some basic syntax rules: |
| 49 |
* All expressions / statements need to end with a semicolon (';') |
| 50 |
* Word definitions start with a colon (':') |
| 51 |
* Words can be named almost anything (as in Factor) |
| 52 |
e.g.: <<name>>, <a,b>, empty?, >!< etc. |
| 53 |
* For more information, have a look at: |
| 54 |
http://concatenative.org/ |
| 55 |
|
| 56 |
Example code: |
| 57 |
* You can find some example code within the examples/ directory. |
| 58 |
|
| 59 |
--------- Dependencies --------- |
| 60 |
- Treetop for the parser: |
| 61 |
http://treetop.rubyforge.org |
| 62 |
-------------------------------- |
| 63 |
|
| 64 |
================================ |
| 65 |
----------- License ------------ |
| 66 |
Stackd is licensed under the GNU GPL v3. |
| 67 |
It is heavily influenced by the Factor programming language. |
| 68 |
Factor is (C) Slava Pestov. Some parts of Stackd's core library |
| 69 |
is taken from Factor's. |
| 70 |
See http://www.factorcode.org for more information about Factor. |
| 71 |
|
| 72 |
For more information on copying & distribution take a look at the |
| 73 |
LICENSE file. |
| 74 |
|
| 75 |
(C) 2009 Christopher Bertels |
| 76 |
http://www.adztec-independent.de |
| 77 |
-------------------------------- |
| 78 |
================================ |