Guides
Internal pages for writing SPL fluently—types, scope, imports, classes
(OOP), keymaps & custom string sort, null & enums, optional lib/ modules (allTypes, newMath, newRandom), sample code, and pitfalls.
- Data types & literals Lists, hashes, sets, tuples, booleans, null
- Scoping Global, function, and block frames
-
Modules &
use.spl, Python, C/C++, Java libraries -
Errors & exceptions
error.try/error.except - Program structure Statements, blocks, functions, style tips
-
Arrow & question mark
<-,?( ) <- run:,<- code: -
One-line blocks
Same-line
:bodies for if / while / functions / … - Classes & OOP classDefine, methods, inherit, class.createObj
-
Keymaps & custom string sort
keymap.createKeyMap,keymapDefine,string.sorted -
Null & library enums
null.coalesce,test.isNull,enum.createEnum -
allTypes library
AllTypesprint / return, typed dispatch -
newMath library
lib/newMath.spl— pi, e, power, gcd, … -
newRandom library
lib/newRandom.spl— PRNG helpers - Sample scripts Hello world, loops, functions, try/except, use
- Common errors Typical failures and how to fix them
Static site — open index.html in a
browser or serve this folder locally. For Codespace and Practice (Run), use
./spl-web or
python3 -m someProgrammingLanguage.web_server after
pip install, or deploy static and use in-browser Pyodide (see README; PyPI must ship the py3-none-any wheel for Pyodide; spl-site tries ≥0.7.0 then falls back to ≥0.6.2).
Reference table
20 entries per page. Use search and class filter, then flip pages below
the table. To validate js/reference-data.js (syntax and row shape), run
node someProgrammingLanguage/spl_site/scripts/validate-reference.mjs
from the repository root.
| Class & syntax | What it does |
|---|
Codespace
On a static host (e.g. Netlify), the first Run loads
Pyodide and installs SPL from PyPI in your browser (large download; needs internet).
With spl-web or a deployed server, Run uses the same-origin API instead (usually faster).
Write SPL and run it in the interpreter. Same-origin POST /api/run is used when available; otherwise the in-browser path above.
./spl-web
Output
Practice
Same as Codespace: static hosting uses Pyodide for checks when there is no
/api/practice-check server (first load can be slow).
35 challenges — each session picks problems at random. Run runs 100 trials (20 seeded edge cases plus 80 random) in the interpreter (browser or server) and compares your output to the reference each time (may take ~25–45 seconds). Some tasks use user.ask with piped stdin. Use Give up to reveal the reference solution, then Next problem after you pass or give up.
Your run output