Strela
A static strongly typed object oriented programming language with focus on composition
Install / Use
/learn @sunverwerth/StrelaREADME
Strela programming language
Strela is a static and strongly typed object oriented programming language with heavy focus on composition and language assisted delegation.
Development status is pre-pre-pre-alpha! Here be dragons!
Setup
git clone git@github.com:sunverwerth/strela.git
cd strela
make test && make install-home
The included MSVC project file has been tested with Visual Studio Community 2017.
Basic usage
strela [options] input-file
where input-file is either a .strela module or a module compiled to strela bytecode.
Command line options
--dump dumps decompiled bytecode to stdout and exits.
--pretty pretty-prints the parsed code to stdout and exits.
--timeout <sec> kills the running program after <sec> seconds.
--search <path> sets additional search path <path> for imports.
--write-bytecode <file> writes compiled bytecode to <file> and exits.
Examples
Hello.strela
module Hello {
import Std.IO.println;
function main(): int {
println("Hello, world!");
return 0;
}
}
Fib.strela
module Fib {
import Std.IO.println;
function fib(n: int): int {
if (n < 2) {
return n;
}
else {
return fib(n - 1) + fib(n - 2);
}
}
function main(): int {
println(fib(40));
return 0;
}
}
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate 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
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
