Skip to content

objeck/objeck-lang

Object-oriented β€’ JIT-compiled β€’ AI-native β€’ Robust APIs


GitHub CodeQL CI Build Release Build Latest Release

Why Objeck?

Built for modern development:

  • πŸš€ JIT-compiled for performance (ARM64/AMD64)
  • πŸ€– AI-native: OpenAI, Gemini, Ollama, ONNX, OpenCV β€” no third-party packages
  • 🌐 Network-complete: HTTP/1.1 Β· HTTP/2 Β· HTTP/3/QUIC Β· WebSocket Β· DTLS β€” all standard library
  • πŸ’» Developer-friendly: REPL shell, LSP plugins for VSCode/Sublime/Kate, DAP debugger
  • 🌍 Cross-platform: Linux, macOS, Windows (x64 + ARM64/RPI)
  • πŸ”§ Full-featured: Threads, generics, closures, reflection, serialization

Perfect for: AI/ML prototyping β€’ Computer vision β€’ Web services β€’ Real-time applications β€’ Game development

Try It Online

πŸ‘‰πŸ½ Playground β€” 33 demos across 7 categories, Monaco editor, no install required.

Quick Start

# Install (example for macOS/Linux)
curl -LO https://github.com/objeck/objeck-lang/releases/download/v2026.6.0/objeck-linux-x64_2026.6.0.tgz
tar xzf objeck-linux-x64_2026.6.0.tgz
export PATH=$PATH:./objeck-lang/bin
export OBJECK_LIB_PATH=./objeck-lang/lib

# Hello World
echo 'class Hello {
  function : Main(args : String[]) ~ Nil {
    "Hello World"->PrintLine();
  }
}' > hello.obs

# Compile and run (modern syntax)
obc hello && obr hello

πŸ“– Full docs: objeck.org πŸ’‘ Examples: github.com/objeck/objeck-lang/programs

What's New

v2026.6.1 βœ…

  • String interpolation β€” expressions, format specifiers, and String->Format β€” "{$...}" now accepts arbitrary expressions ("{$i + 1}", "{$a * b - c}", "{$x > y}"), not just variables and method calls. Inline format specifiers use Python/.NET colon syntax for precision, width, alignment, and radix β€” "{$pi:.2}", "{$n:05}", "{$s:<10}", "{$v:x}", "{$v:b}" β€” and the new String->Format("{0} = {1}", a, b) adds positional templating with {{/}} escaping. See string features β†’
  • Generics β€” bounds, compound/F-bounds, and variance β€” type parameters gain compound bounds T : A & B (a concrete argument must satisfy every bound), F-bounded constraints T : Compare<T>, and declaration-site variance: out T (covariant, e.g. Producer<Dog> usable as Producer<Animal>) and in T (contravariant). Variance is checked soundly in both directions and preserved across the .obl library boundary; the stdlib's read-only iterators are now covariant. Existing invariant generics and syntax are unchanged (out stays a usable identifier), and generic type-mismatch errors now print readable types like Hash<String, IntRef>
  • Multithreaded garbage collection β€” the generational collector is now cooperative stop-the-world: mutator threads park at safepoints (interpreter dispatch, JIT loop back-edges on AMD64 and ARM64, allocation, and blocking join/sleep/socket I/O) so the collector always marks a complete, stable root set. Fixes freed-live-object corruption and use-after-free under heavy thread churn, plus a JIT-loop collector deadlock; single-threaded programs never park
  • Debugger overhaul β€” command line and VS Code β€” the obd debugger gains frame navigation (frame/up/down) with locals to inspect any caller's variables, live editing (set x = 5), breakpoints by method (b Class->Method), temporary and conditional breakpoints with ignore counts, data breakpoints (watch), and run-to-line (until). The VS Code adapter (DAP) adds editing variables from the panel, function breakpoints, logpoints, in-process restart, and exception breakpoints. CLI conditional breakpoints (b file:line if <expr>) now parse correctly, and variables after a Float slot read the right value
  • Secure sockets verify certificates by default β€” TLS and DTLS clients (TCP, HTTP/2, HTTP/3, DTLS) now validate the certificate chain and hostname by default instead of accepting any certificate; set OBJECK_TLS_INSECURE_SKIP_VERIFY=1 to opt into self-signed/dev servers
  • Serialization correctness β€” 64-bit Int values and Int[] elements (standalone and object-nested) no longer truncate to 32 bits or drop half the array; function-reference object fields now (de)serialize without desyncing the fields after them. Note: the serialized integer wire format widened to 8 bytes
  • Memory-safety hardening β€” object deserializers bounds-check attacker-supplied lengths/offsets and 64-bit sizes before reading; fixed a heap overflow in the Char[] read traps (file/stdin/pipe/socket/SSL/DTLS) reachable from ordinary code via a large offset
  • Compiler fixes β€” constant propagation no longer keeps a stale literal after a slot is reassigned from a non-constant expression; LICM no longer hoists integer divide/modulo out of a zero-trip loop (which turned a never-evaluated division into a divide-by-zero trap)
  • New Web.Server library (-lib web_server) β€” a lightweight HTTP server bundle for simple request/response and multipart handling
  • ONNX β€” on macOS the compiled CoreML model is cached across runs (~/Library/Caches/objeck-onnx), cutting cold session loads from seconds to milliseconds (~35Γ— faster warm starts); fixed a dangling TypeInfo that could mis-detect a model's input dtype/shape
  • macOS launcher β€” portable app bundles now resolve their own location instead of trusting the working directory, so they launch correctly from Finder or any directory
  • Reproducible builds β€” compiling unchanged library source now produces byte-identical .obl files (deterministic anonymous-class naming), and Windows/ARM64 build warnings and a NativeCode ODR violation were cleared

v2026.6.0

  • New System.AI library (-lib ai or @ai) β€” classic AI in the standard library: graph search (Dijkstra, AStar, BreadthFirst, DepthFirst), adversarial game search (Minimax with alpha-beta, MonteCarloTreeSearch), metaheuristics (GeneticAlgorithm, SimulatedAnnealing, HillClimbing) and tabular RL (QLearning, Sarsa, MarkovDecisionProcess value iteration); all stochastic algorithms seeded for reproducible runs
  • System.ML overhaul β€” 13 new estimators (RidgeRegression/LassoRegression/ElasticNet, Perceptron, SVM, PCA, GaussianNaiveBayes, AdaBoost, DBSCAN, GaussianMixture, KDTree, RegressionTree, GradientBoostedTrees); real recursive DecisionTree and voting RandomForest; k-means++ KMeans; NeuralNetwork hidden/output bias (clean XOR convergence); seedable System.ML.Random; uniform Fit/Predict/Score/IsFitted/Store/Load API across every estimator. Breaking: RandomForest->Train is now Fit; stored NeuralNetwork model files must be regenerated
  • record types β€” record Point { @x : Int; @y : Int; } generates the constructor and accessors; record : readonly : omits setters and the compiler rejects field assignment outside constructors; supports generics, inheritance and user-defined member overrides
  • VM/JIT fix β€” traps reading interpreter locals (Serializer->Write, Date->New, file-time queries) crashed once a method crossed the auto-JIT threshold; such methods now stay interpreted on AMD64 and ARM64
  • Compiler fixes β€” bool array literals after the first in a program no longer receive the first literal's data (broken literal-pool comparator); literal dedup now works for all array types; array dimensions capped at 8 with a proper diagnostic
  • XML library improvements β€” truncated/malformed documents are now rejected instead of parsing as success; &apos; decoding fixed; new EncodeText, SetEncodedContent, GetDecodedContent and GetDecodedValue conveniences
  • Library aliases documented β€” -lib @std/@ml/@game and the new @ai group, user-editable via lib/configobjk.ini; AI/ML developer guide gains System.ML and System.AI sections with runnable examples
  • CI hardening β€” vcpkg installs retry on transient CDN failures; mcp_server_test validates JSON-RPC bodies before accepting

v2026.5.4

  • Debugger test reliability β€” Windows CI debugger tests fixed; .obe/.obl format detection now correctly handles the edge case where a new-format size-header LSB collides with the 0x78 zlib CMF byte
  • LSP shell script permissions β€” all tools/lsp/ shell scripts now have execute bit set in git, fixing Permission denied in release CI
  • Release workflow β€” git checkout -f master prevents dirty-tree abort when committing api.zip from a tag-based build

πŸ“‹ Full changelog β€’ πŸ—ΊοΈ Roadmap β€’ πŸ“ Editor & IDE setup

Downloads

Latest Release: v2026.6.0

Platform Architecture Download
Windows x64 MSI Installer / ZIP
Windows ARM64 MSI Installer / ZIP
Linux x64 TGZ Archive
Linux ARM64 TGZ Archive
macOS ARM64 TGZ Archive
LSP All platforms ZIP Archive

πŸ“¦ Alternative: Sourceforge β€’ πŸ“š API Docs: objeck.org/api/latest

Note: All Windows installers are digitally signed. Releases are fully automated via CI/CD and built on GitHub Actions runners.

See It In Action

HTTP/2 Client

use Web.HTTP;

# Persistent connection β€” multiple requests share one TLS session
client := Http2Client->New("httpbin.org");
resp := client->Get("/get");
"Status: {$resp->GetCode()}"->PrintLine();    # Status: 200

body := "{\"lang\":\"objeck\"}"->ToByteArray();
resp2 := client->Post("/post", body, "application/json");
client->Close();

# One-liner for quick requests
resp := Http2Client->QuickGet(Url->New("https://httpbin.org/get"));

HTTP/3 / QUIC Client

use Web.HTTP;

# QUIC over UDP β€” zero round-trip connection on repeat visits
client := Http3Client->New("quic.nginx.org");
resp := client->Get("/");
"Status: {$resp->GetCode()}"->PrintLine();    # Status: 200
client->Close();

# One-liner
resp := Http3Client->QuickGet(Url->New("https://quic.nginx.org/"));

AI Integration

# OpenAI Realtime API - get text AND audio
response := Realtime->Respond("How many James Bond movies?",
                              "gpt-4o-realtime-preview", token);
text := response->GetFirst();
audio := response->GetSecond();
Mixer->PlayPcm(audio->Get(), 22050, AudioFormat->SDL_AUDIO_S16LSB, 1);

Face Recognition

# SCRFD detector + ArcFace R50 embeddings (InsightFace buffalo_l)
session := FaceSession->New("det_10g.onnx", "w600k_r50.onnx");
r1 := session->Recognize(img1_bytes, 0.5);
r2 := session->Recognize(img2_bytes, 0.5);
faces1 := r1->GetResults(); faces2 := r2->GetResults();
sim := FaceSession->Compare(faces1[0]->GetEmbedding(), faces2[0]->GetEmbedding());
"Same person: {$(sim > 0.35)}"->PrintLine();

Computer Vision

# OpenCV face detection
detector := FaceDetector->New("haarcascade_frontalface_default.xml");
faces := detector->Detect(image);
faces->Size()->PrintLine();  # "5 faces detected"

Natural Language Processing

# Sentiment analysis and TF-IDF
text := "This product is absolutely wonderful!";
sentiment := SentimentAnalyzer->Classify(text);  # "positive"

# Train TF-IDF on documents
docs := ["cats are pets", "dogs are pets", "birds can fly"];
tfidf := TF_IDF->New();
tfidf->Fit(docs);
vector := tfidf->Transform("cats and dogs");  # [0.47, 0.0, 0.47, ...]

🎯 More examples

Language Features

Object-Oriented

  • Inheritance, interfaces, generics
  • Type inference and boxing
  • Reflection and dependency injection
  • See OOP examples β†’

Functional

Strings & Formatting

  • Interpolation with expressions: "{$i + 1}", "{$obj->M()}"
  • Format specifiers: "{$pi:.2}", "{$n:05}", "{$v:x}"
  • Positional templates: String->Format("{0} = {1}", a, b)
  • See string features β†’

Platform Support

Libraries

AI & Machine Learning β€” πŸ“– AI Developer Guide Β· GitHub source Β· πŸ€– Getting Models

  • OpenAI β€” chat, vision, realtime audio, image generation, embeddings, moderation, batch
  • Gemini β€” chat, vision, search grounding, files, context caching, batch embeddings
  • Ollama β€” local LLM chat, vision, and embeddings; recommended models: llama3.2, phi3, llava (get models β†’)
  • NLP β€” tokenization, TF-IDF, text similarity, sentiment analysis
  • OpenCV β€” computer vision: detection, transforms, video
  • ONNX Runtime β€” local ML inference: YOLO, ResNet, DeepLab, OpenPose, Phi-3, face recognition (get models β†’)
  • Face Recognition β€” SCRFD detector + ArcFace R50 (InsightFace buffalo_l)
  • Phi-3 / Phi-3 Vision β€” local SLM text and multimodal inference

Web & Networking

Data

Other

Development

Modern tooling and practices:

  • πŸ€– Claude Code for pair programming, debugging, and refactoring
  • πŸ”„ CI/CD: Fully automated build, test, sign, and release pipeline (GitHub Actions)
    • βœ… Every push triggers multi-platform builds (Windows, Linux, macOS)
    • βœ… Automated code signing for Windows installers
    • βœ… One-tag releases: git tag v2026.2.1 β†’ automated distribution in 60 minutes
    • βœ… Parallel builds across 6 platforms (x64/ARM64)
    • πŸ“– Release Process Documentation β€’ CI/CD Architecture β€’ System Architecture
  • πŸ” Quality: Coverity static analysis + CodeQL security scanning
  • πŸ§ͺ Testing: 350+ tests across 3 suites (regression, comprehensive, deploy)
    • Regression suite: 10 focused tests for critical functionality
    • Comprehensive suite: 323+ tests for full language validation
    • Deploy suite: 17 real-world usage examples
    • Full cross-platform coverage (Windows/Linux/macOS, x64/ARM64)

Editor Support:

πŸ“š Testing Documentation β€’ πŸ§ͺ Regression Tests β€’ πŸ“Š Performance & Benchmarks

Resources

About

Lightweight object-oriented and functional programming language. Designed to be intuitive, small, cross-platform, and fast. The language emphasizes portability, scalability, and robust API support.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors