nSquirrel
Squirrel on Ti-Nspire
Last release version (v1.0.1) : https://github.com/Eiyeron/squirrel/releases/tag/nsquirrel_1.0.1 (includes documentation, which the binary linked to this post doesn't)
Project repository : https://github.com/Eiyeron/squirrel/
nSquirrel (interpreter + n2SDLib) branch : https://github.com/Eiyeron/squirrel/tree/nSquirrel
"Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games."
(Translation : it's a lightweight script language destined to be embedded in programs like Lua does.)
[spoiler=Base language features]
Although Squirrel offers a wide range of features like:
nSquirrel is a fork of this language destined for Ti-Nspires. The core language will be easily embeddable into Ndless projects as the project offers libraries and API to mess with it. Thus, it's included with bindings to n2DLib to allow playing with the screen and the keyboard.
Instructions :
- Download the archive containing the program (sq.tns) and if wanted, the example scripts.
- Install your sq.tns on your calc's nspire folder
- Now you can launch the interpreter for an interactive session ( quit() to exit it) or launch a .nut script (only after running the exectuable once). NOte that thanks to nspireio, you have to press twice Enter to validate your input.
- The interpreter registering itself to open .nut files, to execute such scripts, you will just have to click on them.
Notes
- For further versions, I'll probably provide two versions of the binaries, ones to compile nSquirrel's interpreter (which uses Nspire-IO) and one to be included in projects.
Squirrel on Ti-Nspire
Last release version (v1.0.1) : https://github.com/Eiyeron/squirrel/releases/tag/nsquirrel_1.0.1 (includes documentation, which the binary linked to this post doesn't)
Project repository : https://github.com/Eiyeron/squirrel/
nSquirrel (interpreter + n2SDLib) branch : https://github.com/Eiyeron/squirrel/tree/nSquirrel
"Squirrel is a high level imperative, object-oriented programming language, designed to be a light-weight scripting language that fits in the size, memory bandwidth, and real-time requirements of applications like video games."
(Translation : it's a lightweight script language destined to be embedded in programs like Lua does.)
[spoiler=Base language features]
Although Squirrel offers a wide range of features like:
- - Open Source MIT licence
- dynamic typing
- delegation
- classes & inheritance
- higher order functions
- lexical scoping
- generators
- cooperative threads(coroutines)
- tail recursion
- exception handling
- automatic memory management (CPU bursts free; mixed approach ref counting/GC)
- both compiler and virtual machine fit together in about 7k lines of C++ code and add only around 100kb-150kb the executable size.
- optional 16bits characters strings
- powerful embedding api
- eg. function/classes can be defined by scripts or in C
- eg. objects can fully exist in the VM or be bound to native code
- eg. classes created in C can be extended by scripts or vice-versa
- and more
nSquirrel is a fork of this language destined for Ti-Nspires. The core language will be easily embeddable into Ndless projects as the project offers libraries and API to mess with it. Thus, it's included with bindings to n2DLib to allow playing with the screen and the keyboard.
Instructions :
- Download the archive containing the program (sq.tns) and if wanted, the example scripts.
- Install your sq.tns on your calc's nspire folder
- Now you can launch the interpreter for an interactive session ( quit() to exit it) or launch a .nut script (only after running the exectuable once). NOte that thanks to nspireio, you have to press twice Enter to validate your input.
- The interpreter registering itself to open .nut files, to execute such scripts, you will just have to click on them.
Notes
- For further versions, I'll probably provide two versions of the binaries, ones to compile nSquirrel's interpreter (which uses Nspire-IO) and one to be included in projects.