Palladium
A Python-esque language meant to be used with the Iridium VM
Install / Use
/learn @fhaynes/PalladiumREADME
Intro
Hey there! This README will give you an overview of Palladium.
What is it?
Palladium is a high-level programming language intended to be run on the Iridium VM (https://gitlab.com/subnetzero/iridium). In terms of syntax, it mimics Python as much as possible. In terms of functionality, it mimics Erlang as much as possible.
Main Function
Unlike in Python, your program must contain a function named main. This is optional in Python, but required in Palladium. This is where execution of your program will start.
Modules
A package in Palladium is defined at the directory level. When importing modules, Palladium will look at directories in the same level as the file containing the main function, and recurse down into directories.
Import Statements
Import statements
Typing
Palladium is a strongly typed and dynamically typed language. This means that types can change, but will not change without being explicitly converted. For example:
foo = "Test"
Creates a variable of type str. This is not a valid Palladium program:
foo = "Test"
bar = 1
foo + bar
In many weakly typed languages, bar would be converted to "1". In Palladium, you must be explicit about this:
foo = "Test"
bar = 1
bar = str(bar)
foo + bar
Actors and Classes
Palladium does not support classes. It instead supports Actors, and enforces the Actor concurrency pattern. An Actor has the following characteristics:
- Can only send and receive messages to other Actors
- Only an Actor can alter it's internal state, usually in response to a message from another Actor
- An Actor can spawn children, monitor them, and restart them if needed
- Has a
receive(msg)function to check for messages from other Actors
Sample Actor
class Cat:
def receive(msg):
print("Received: {}", msg)
Actor Scheduling
Because each Actor is self-contained and shares no mutable state with other Actors, they can be scheduled across all CPU cores. This allows for easy horizontal scaling across any number of cores.
Garbage Collection
Garbage collection is done on a per Actor basis. This allows the Iridium VM, like the BEAM VM, to avoid Stop the World pauses.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
