Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bakkdoor/stackd
A Factor-like simple Stack language implemented in Ruby
https://github.com/bakkdoor/stackd
Last synced: 1 day ago
JSON representation
A Factor-like simple Stack language implemented in Ruby
- Host: GitHub
- URL: https://github.com/bakkdoor/stackd
- Owner: bakkdoor
- License: gpl-3.0
- Created: 2009-08-30T14:06:46.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2009-10-05T19:57:20.000Z (about 15 years ago)
- Last Synced: 2023-04-11T18:18:22.733Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 127 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
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
* InheritanceWhat'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 FactorSome 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.: <>, , 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
--------------------------------
================================