No description
  • JavaScript 78.1%
  • HTML 13.6%
  • Lua 3.9%
  • Vim Script 1.7%
  • CSS 1.5%
  • Other 1.2%
Find a file
2026-01-24 10:39:01 -07:00
deps Shuffling things around 2025-11-30 13:54:15 -07:00
editors/vim A bit of work on the web ide 2026-01-24 10:39:01 -07:00
examples Cleaning up project layout some 2026-01-18 12:50:18 -07:00
games/spirograph Get things in place for a better site generator setup 2026-01-18 15:50:23 -07:00
lib A bit of work on the web ide 2026-01-24 10:39:01 -07:00
original_notes Cleaning up project layout some 2026-01-18 12:50:18 -07:00
scrap Stdlib work 2025-12-05 00:39:58 -07:00
sites/stk.junglecoder.com A bit of work on the web ide 2026-01-24 10:39:01 -07:00
cli.js Cleaning up project layout some 2026-01-18 12:50:18 -07:00
install.stk Cleaning up project layout some 2026-01-18 12:50:18 -07:00
nstk.sh Added basic stk installer 2026-01-16 10:18:05 -07:00
package.json Add package.json for less error 2025-11-30 15:20:08 -07:00
project.stk Cleaning up project layout some 2026-01-18 12:50:18 -07:00
qcli.js Shaking things up a little 2026-01-02 00:18:21 -07:00
qstk.sh Shaking things up a little 2026-01-02 00:18:21 -07:00
README.md Get things in place for a better site generator setup 2026-01-18 15:50:23 -07:00
stkweb.js Working on a StackTalk web IDE 2026-01-21 14:37:27 -07:00
stvm.js A bit of work on the web ide 2026-01-24 10:39:01 -07:00
test Made a little spirograph program 2025-12-23 03:53:43 -07:00

StackTalk

This is a prototype for a language I'm calling StackTalk

The core's core ideas are as follows:

  • Quotations, aka code as lists of symbols, that are runtime editable
  • Objects, the main contents of which are multiple named stacks
  • A global* value stack
  • A global* "me" stack, for the current object

The limbs around that core look liek this:

  • A handful of syntax sugars that make it easy to write most common shapes of program, nota
    • word[ code ] becomes [ code ] word, which gives more options w/r/t ordering things
    • word[ some code :or some other code ] produces an object that has some code as quotation in the proc stack and some other code in the or stack. This allows writing programs with named and/or optional parts much more easily than in many quotation-based stack languages.

The end result ends up looking like a cross between Io, Smalltalk and Factor:

Account: is-obj[
    0.0 >balance
    deposit: fn[ balance: += ] 
    show: fn[ "Account balance: $" balance + /nl + Io .write ]
]

"Initial: " Io .write
Account .show

"Depositing $10" Io .println
Account .[ 10.0 deposit ]

"Final: " Io .write
Account .show

* Global being "global to a given interpreter state".

Trying it out

If you just want to try out a little bit of StackTalk, there's a playground at https://stk.junglecoder.com/playground.html.

Getting started locally

To run stacktalk locally, I recommend using node 22 or a compatible JS runtime. Then you should be able to run ./nstk.sh install.stk to install StackTalk to /home/$USER/.stacktalk, which you can then add to your $PATH to get access to stk on posix systems.

REPL

You can run stk -e repl to get a basic stacktalk REPL going.

Projects

If you want to make utility scripts for a given project/folder

TODOS

  • Clean up error handling. Make it possible to request a stack trace?