Solstice
A programming language focused on ease of use.
Features
Small and fast
Solstice's entire stack is ~10,000 lines of C, and produces a ~300kb binary when stripped.
Speeds are high compared to other interpreters, and approach compiled languages depending on the task.
Strict scoping rules
Solstice uses a unique scoping system, where state captured by a function remains constant, which allows functions to appear pure.
Only when you need global mutable state you get it, ensuring predictable behaviour.
Simple syntax
Solstice feels familiar, but light. There's no quirks in the syntax, just pure bliss.
It feels like a mix of Python, Go, and C, as well as a unique touch.
Strict, static type system
Solstice does not allow any type to be unknown. All types are known at any time.
If the code doesn't immediately cause an error, rest assured that there won't be any runtime type errors.
Easy extensibility
Solstice uses Ground under the hood as an execution backend. Ground makes it easy to extend functionality with wrapper libraries, which can be written in a small amount of C.
Portable
Solstice has no dependencies once built statically with Ground, meaning it should run anywhere a POSIX-compatible system is avaliable.
Examples
Simple Socket
use socket
use box
// The Box type allows you to use
// global mutable state, only
// where you need
message = new Box[string]
message.set("Hi there!")
def myCallback(string in) string {
if (in == "get") {
return message.get() + "\n"
}
retval = message.get()
message.set(in)
return retval + "\n"
}
socket_Listen(myCallback, 8080)
Guess The Password
use io
accessNotGranted = true
while accessNotGranted {
password = input("Password: ")
if password == "dingus" {
accessNotGranted = false
}
if password != "dingus" {
puts "Incorrect password!"
}
}
puts "Welcome!"
Count to 100,000
number = 0
while number < 100000 {
number = number + 1
puts number
}
Getting Solstice
Solstice is an in-development language, and you can find the latest code on the Git repository. At present, the stability of Solstice is questionable, so don't trust it to handle your nuclear codes or anything like that yet.
This script will automatically build and install Solstice and Ground from source for you, or update them if they are already installed.
bash -c "$(curl -fsSL https://sols.dev/install.sh)"
If you find any issues while trying Solstice, please report them here! Solstice needs all the help it can get.
Stable-ish builds are avaliable in the releases tab of the Git repository. These builds are likely to be more stable, but don't treat them as a stable branch yet.
Once you've installed, read the docs to get started.