An in progress JavaScript port of the slope programming language
Go to file
2024-06-18 12:16:27 -07:00
examples/canvas Bug fixes + new game 2024-06-13 16:20:32 -07:00
libs Adds an example file 2024-06-09 21:13:20 -07:00
slope Adds button for breakout 2024-06-13 20:34:56 -07:00
canvas.css Adds demo buttons to canvas help menu 2024-06-12 19:53:33 -07:00
canvas.html Adds button for breakout 2024-06-13 20:34:56 -07:00
canvas.js Adds 'pixel-match?' proc 2024-06-18 12:16:27 -07:00
console.css Adds assoc as a concept, backed by objects 2024-06-05 21:26:23 -07:00
console.html Moves console to its own thing, canvas to its own thing, and adds an index linking to both. Also adds more docs for canvas 2024-06-09 20:10:12 -07:00
console.js Fixes unsafe loading 2024-06-04 17:15:18 -07:00
index.html Moves console to its own thing, canvas to its own thing, and adds an index linking to both. Also adds more docs for canvas 2024-06-09 20:10:12 -07:00
LICENSE Lots of stuff. Too much to remember. I should commit more frequently on personal projects. 2024-06-04 16:07:36 -07:00
README.md Lots of stuff. Too much to remember. I should commit more frequently on personal projects. 2024-06-04 16:07:36 -07:00
todo.md Separates concerns better, adds libs, updates css for portrait view (when needed) 2024-06-02 22:57:44 -07:00

slopeJs

This repo represents two things:

  1. A JavaScript-based port of the Slope programming language, as a tree walk interpreter. It should stand alone and can be embedded. It is found from the repo base dir: ./slope/slopejs.js
  2. A console/repl implementation using said interpreter (./index.html, ./console.js, ./console.css)

There are also some libraries that exist as separate files that could be included (or not) into a given project found in the ./lib folder.

At present this is a major work in progress. It can do some basic things, but has a long way to go. It does not support macros, symbols, or quoting yet. File handles work differently, given the web environment, but can be highly customized. There is a sort of foreign function interface in the js procedure (it will eval a string of JavaScript and return the result)... which can be used to create lots of cool stuff. However, could be less than desirable for a user facing interpreter. So use with caution (I will likely move it to its own module eventually, so that it can be brought in only where appropriate).

The console/repl has a fun retro feel and a few quality of life things. There is a help button to get the couple of shortcut keys that have been added and a bit more background info.

In the long run I see these two things (the interpreter and the console) being split into two separate repositories).