Skip to content

objeck/objeck-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

37,090 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Object-oriented β€’ JIT-compiled β€’ AI-native β€’ Network-complete
Modern programming language β€” from HTTP/3 to GPT-4, it's all standard library


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

No installation needed - write, compile, and run Objeck code directly in your browser:

πŸ‘‰πŸ½ Interactive playground with 33 demo programs across 7 categories with Monaco editor and syntax highlighting.

Quick Start

# Install (example for macOS/Linux)
curl -LO https://github.com/objeck/objeck-lang/releases/download/v2026.5.0/objeck-linux-x64_2026.5.0.tgz
tar xzf objeck-linux-x64_2026.5.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

Web Playground β€” Try Objeck in your browser. Code runs in sandboxed Docker containers on a dedicated server. Includes 33 demos covering the language basics, OOP, algorithms, collections, data processing, and more.

v2026.5.1

  • HTTP/2 client β€” Http2Client with persistent TLS connections, custom headers, GET/POST/PUT/DELETE, and QuickGet/QuickPost one-liners (nghttp2 + ALPN)
  • HTTP/3 / QUIC client β€” Http3Client over UDP with connection reuse and the same Quick* API (ngtcp2 + nghttp3 + GnuTLS)
  • HTTP/1.1 improvements β€” PATCH method, redirect handling fixes, retry parity across HttpClient/HttpsClient
  • OpenAI Moderation β€” Moderation->Check() returns per-category flags and confidence scores
  • OpenAI Batch β€” Batch->Create()/Get() for async 50%-cost batch requests (up to 50k at a time)
  • Gemini Files API β€” upload, list, get, and delete files via FileManager
  • Gemini Context Caching β€” CachedContent->Create() for server-side prompt caching with configurable TTL
  • Gemini Search Grounding β€” Model->GenerateContentWithGrounding() anchors responses in live Google Search results
  • Gemini Batch Embeddings β€” Model->BatchEmbedContent() embeds multiple texts in one round-trip
  • WebSocket hardening β€” 8 bug fixes + bulk ReadBuffer I/O replacing per-byte reads
  • MCP server fixes β€” hang on shutdown and crash-on-stop resolved; regression tests added
  • Socket reliability β€” SO_REUSEADDR on TCPSocketServer::Bind() survives TIME_WAIT; IPSocket::Open() falls through to next address on socket() failure
  • Security hardening β€” LSP concurrent-request mutex; scrfd tensor bounds check; conf_threshold NaN/range guard; WinWriteWide DWORD truncation guard
  • MSVC optimizations β€” Release build improvements for VM and compiler

v2026.5.0 βœ…

  • Face recognition β€” new FaceSession API with SCRFD 10G-KPS detector + ArcFace R50 512-dim embeddings (InsightFace buffalo_l). Cross-platform: DirectML (Windows), CPU/CUDA (Linux), CoreML (macOS). No extra native libs required.
  • Windows emoji β€” full Unicode supplementary plane output (emoji and other non-BMP characters) now works correctly in cmd.exe and Windows Terminal via WriteConsoleW
  • LSP enhancements β€” typeHierarchy, selectionRange, workspace/symbol, foldingRange, documentHighlight, go-to-type-definition; hover correctness and non-determinism fixes
  • ARM64 JIT β€” fixed EXT_LIB_FUNC_CALL crash; macOS ONNX build and CodeQL fixes
  • OBJECK_JIT_DISABLE β€” new boolean env var for cleanly disabling auto-JIT at startup

v2026.4.3 βœ…

  • DAP debugger hover β€” hovering an object shows ClassName { field=val, ... } with one-level instance field expansion via FormatObjectForDap
  • DAP instance/class variable scopes β€” Variables pane now shows separate Locals, Instance, and Class scopes with correct memory mapping
  • DAP stepping + crash fixes β€” fixed step-into crash, step-over/step-out scoping, stdout corruption, disconnect access violation, and variable display
  • Editor setup refresh β€” updated VS Code, Sublime Text, and gvim/Vim DAP+LSP setup for Windows, Linux, and macOS
  • LSP crash fixes β€” null guards for textDocument/codeAction with inferred locals, hover position fix (1-based to 0-based)
  • Configurable JIT threshold β€” auto-JIT invocation count can now be tuned
  • Fixed JIT S2F callback param count causing segfault on String:ToFloat
  • Hardened HTTPS client against null ReadLine on connection failures

v2026.4.2

  • JIT local variable register cache (AMD64 + ARM64) β€” keeps values in registers after store, avoids redundant reloads, evicts on demand when register pool is exhausted
  • Hardened JSON, JSON stream, and XML parsers against malformed input
  • DTLS (Datagram TLS) support β€” new DTLSSocket and DTLSSocketServer classes for secure UDP communication (IoT, VoIP, gaming)
  • Link-time optimization β€” added -flto=auto across all GCC Makefiles (AMD64 and ARM64)
  • ARM64 native CPU tuning β€” -mcpu=native auto-detects RPi5 (Cortex-A76) and Jetson Orin (Cortex-A78AE)
  • Fixed all MSVC and GCC compiler warnings
  • Fixed doc generator error on @hidden tag

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

Downloads

Latest Release: v2026.5.0

Platform Architecture Download
Windows x64 MSI Installer / ZIP
Windows ARM64 MSI Installer / ZIP
Linux x64 TGZ Archive
Linux ARM64 TGZ Archive
macOS ARM64 (M1/M2/M3) 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

Platform Support

Libraries

AI & Machine Learning β€” πŸ“– Full AI Guide

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