Being a big fan of esoterical languages, I recently ran into a precious piece of insanity called Stacked Brain****
. I even started writing an interpreter for it in D. There are more bf-inspired languages with stack (Brainstack and Stackf*ck), but the first rather misses the idea of minimalism by having both cells and a stack (inc. commands for both), and the latter still has a memory cell and simply pushed/pops this cell.
Suddenly, the thought the this idea could be taken further emerged... a single stack - no (accessable) other memory - and only 8 commands of vanishingly small power to operate on it.
St*ck was fathered, and now I'd appreciate some comments on what I figured out so far, so the child may be born without malformations.
One note on turing completeness: I don't have any idea, but as the semantics are rather close to bf, just with a stack instead of a tape, it may be turing-complete.
St*ck has a single Stack. If this stack is limited, what the limit is, and what size each item has, is up to the implementation. As with traditional brain****, formatting and non-command characters are ignored. So far, the commands are as following:
Command | Meaning
^ | push previously popped value, or 0
v | pop (remember for subsequent push)
+ | increment top item
- | decrement top item
. | output top item as ASCII char (peek, i.e. do not pop)
, | push input
[ | jump past matching ] if top item == 0 (peek)
] | jump back to matching [ if top item != 0 (peek)
As said, any feedback is welcome.