| Name | Description |
|---|
| API.Anthropic | Anthropic Messages API client (Claude). Plain and multi-turn chat with a system prompt, tool use, streaming over server-sent events, structured (JSON) output through a forced tool, and extended-thinking blocks. Responses and errors follow the other AI client libraries: a failed call returns Nil and EndPoint->GetLastError() says why. The key comes from SetApiKey, the ANTHROPIC_API_KEY environment variable, or anthropic_api_key.dat in the working directory. Requests go over HTTPS. Compile with -lib anthropic. |
| API.Google.Gemini | Google Gemini API client. Supports text generation, multimodal inputs (image, audio, video), chat sessions, function calling, and caching. Set GOOGLE_API_KEY before use. Compile with -lib gemini. |
| API.Google.Gemini.Corpus | Google Gemini corpus APIs (-lib gemini) |
| API.Google.Gemini.Tuning | Google Gemini support for tuned models (-lib gemini) |
| API.Inference | Client for HTTP model-inference servers. Sends tensors to a running server and reads tensors back, so a model trained in TensorFlow, PyTorch, ONNX or scikit-learn can be used from Objeck without a native binding for each runtime.
Two wire protocols, because no single one covers the field:
- OPEN_INFERENCE is the KServe v2 protocol, spoken by NVIDIA Triton, KServe, OpenVINO Model Server, Seldon MLServer and others. Triton alone serves TensorFlow, ONNX, PyTorch, TensorRT and OpenVINO behind it, so this one protocol reaches most servers and most runtimes. It is the default.
- TF_SERVING is TensorFlow Serving's own REST API, which does not implement KServe v2 and so needs its own request shape.
The difference is confined to Client: a Tensor is the same object either way. Choosing the protocol rather than the server is the whole point -- a client written against one server's API reaches one server.
This is a client, not a runtime. The server is a separate process the user runs; nothing here loads a model. For in-process inference without a server, API.Onnx runs models directly. Compile with -lib inference. |
| API.Models | The types an inference backend shares, so calling code names a backend once rather than at every call site.
`API.Onnx` runs a model in-process; `API.Inference` sends it to a server. They answer the same question and neither is right for every deployment: ONNX needs a model file and a runtime for the architecture, a server is the only GPU path today, and a model that will not convert to ONNX reaches Objeck no other way (docs/INFERENCE_ENGINES_PLAN.md).
This bundle exists because both previously defined their own `Tensor`. That was deliberate and temporary -- the generic ONNX run shipped before a shared library existed -- and two near-identical classes drift. They are one class now.
Compile with -lib models. |
| API.Ollama | Ollama local LLM client. Runs models (Llama, Mistral, Phi, Qwen, etc.) locally via the Ollama server. Supports text generation, chat sessions with tool calling, structured (JSON schema) output, thinking models, images, batch embeddings and model management. Every request completes before returning -- responses are not streamed, so a long generation produces nothing until it finishes. Compile with -lib ollama. |
| API.Onnx | ONNX Runtime inference library for running pre-trained models. Supports object detection (YOLO), image classification (ResNet), segmentation (DeepLab), pose estimation (OpenPose), face recognition, and Phi-3 text generation. Compile with -lib onnx. |
| API.OpenAI | OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai. |
| API.OpenAI.Audio | Support for OpenAI audio APIs (-lib openai) |
| API.OpenAI.Chat | Support for legacy OpenAI chat APIs (-lib openai) |
| API.OpenAI.Responses | Support for OpenAI responses APIs (-lib openai) |
| API.OpenAI.Tuning | Support for fine-tuning models (-lib openai) |
| API.OpenCV | OpenCV computer vision library. Image supports loading, saving, resizing, color conversion, blurring, edge detection, cropping, and drawing. VideoCapture reads from files or camera streams. Compile with -lib opencv. |
| Cipher | Cryptographic utilities including AES-256 encryption/decryption, SHA-1/256/512 and MD5 hashing, HMAC signing, and Base64 encoding/decoding. Compile with -lib cipher. |
| Collection | Generic collections library: Vector (dynamic array), List (linked list), Map (ordered binary tree, O(log n)), Hash (hash table), Set, HashSet, SetHash, MultiMap, MultiHash, Stack, Queue, and Pair. Provides typed iteration, sorting, filtering, and functional operations (Reduce, Any, All). Compile with -lib gen_collect. |
| Collection.Tuple | Typed tuple classes (Pair, Triple, Quad) for grouping related values without defining a class. Immutable by design; use as map keys or return values. Compile with -lib gen_collect. |
| Data.CSV | CSV reading and writing. CsvTable parses delimited text (RFC 4180: quoted fields may hold the delimiter, line breaks and doubled quotes) into CsvRow records and CsvColumn values, reports the first malformed row through GetError(), and writes CSV back out with ToString() or CsvTable->FormatRow(). The delimiter defaults to a comma and can be set per table. Compile with -lib csv. |
| Data.JSON | JSON parsing and building library. JsonParser reads JSON strings into a JsonElement tree; JsonBuilder constructs JSON documents using a stack-based API. Compile with -lib json. |
| Data.JSON.RPC | JSON-RPC 2.0 client and server. Client sends method calls to a remote endpoint and returns typed results; Server dispatches incoming requests to registered handlers. Compile with -lib json_rpc. |
| Data.JSON.Scheme | Support for e JSON Schema metadata (-lib json) |
| Data.JSON.Stream | Streaming JSON parser for processing large documents without loading the full tree into memory. Reads tokens sequentially via a cursor-based API. Compile with -lib json. |
| Data.XML | XML parsing and building library. XmlParser reads XML into an XmlElement tree with attribute and child-node navigation; XmlBuilder constructs XML documents. Compile with -lib xml. |
| Database.ODBC | ODBC database access layer. Connection manages database sessions; Statement and ParameterStatement execute SQL queries; ResultSet iterates over rows and extracts typed column values. Compile with -lib odbc. |
|
| Game.Framework | SDL2-based game framework with sprite management, collision detection, tilemaps, camera, and scene graph. Builds on sdl2.obl for structured 2D game development. Compile with -lib sdl2. |
| Game.OpenGL | OpenGL 3.3 core rendering on top of SDL2. Builds on sdl2.obl for the window and context; this bundle is the GL side. Compile with -lib sdl2.
Layers, thinnest first: GLWindow (window and context), GL (state), Shader, Mesh, Texture2D, Light, RenderTarget, Material, Frustum, ShadowMap, PointShadow, Overlay, Transform, and Box/Scene. All public, so nothing is capped.
Targets the 3.3 core profile, forward-compatible: the highest common denominator across the desktop platforms Objeck ships, since macOS caps at 4.1 core. GLES-only hardware is out of scope by construction.
See docs/opengl.md for setup, a minimal program, why the calls are coarse-grained, and how to add one. |
| Game.SDL2 | SDL2 multimedia library for 2D graphics, input handling, audio playback, and window management. Core types: Window, Renderer, Texture, Surface, Event, and Mixer. Compile with -lib sdl2. |
| Game.SDL2.Aux | MP3 encoding library wrapping LAME. Converts raw PCM audio data to MP3 byte streams. Suitable for audio recording and streaming applications. Compile with -lib lame. |
| Query.RegEx | Regular expression matching and replacement. RegEx compiles a pattern once and supports full match, substring search, numbered capture groups, and global replacement. Link with -lib regex. |
| Query.Structured | In-memory query engine over typed columns. Tables are filled row by row or loaded from sources (CSV files, folders, the program's own objects) and queried with SQL-like statements; aggregates, Describe() and Finder (file search) are included. Compile with -lib query. |
|
|
|
|
| System | Core runtime library providing primitive types (Bool, Byte, Char, Int, Float, String), the Ref wrappers and array helpers, and system utilities (console, files, threads, sockets). Collections are not here: they are in gen_collect.obl. Every Objeck program links against this bundle automatically via lang.obl. |
| System.AI | Classic AI algorithms: graph search, adversarial game search, optimization and tabular reinforcement learning (-lib ai) |
| System.AI.Hub | Model downloads from the Hugging Face Hub, into a local cache that later runs, and offline runs, read from: a model by name, as Python's from_pretrained does, with no Python. Compile with -lib gen_collect,cipher,json,net,ai_hub. |
| System.API | System API Bundle |
| System.Concurrency | System support for threads and runtime concurrency |
| System.Diagnostics | Static analysis and language-server support. Analyzer parses Objeck source files and returns symbols, diagnostics, hover info, completions, references, and definitions for IDE tooling. Compile with -lib diags. |
| System.IO | File and console I/O primitives. FileReader and FileWriter handle sequential file access; Console provides stdin/stdout operations. Included in lang.obl — no extra -lib flag needed. |
| System.IO.Filesystem | Supports filesystem operations |
| System.IO.Net | Provides network support |
| System.IO.Net.OAuth | OAuth client (-lib net_server) |
| System.Introspection | Allow programmers to introspect the runtime elements |
| System.ML | Core machine learning types: the seedable Random generator, Matrix2D linear algebra and activations, matrix reference holders, the NeuralNetwork and CSV-backed MatrixReader. Compile with -lib ml. |
| System.ML.Clip | Image embeddings from an exported CLIP image encoder, and the plumbing to score face-verification pairs with them: the preprocessing CLIP was trained with, an encoder that runs an ONNX image tower, and a reader for LFW-style pair lists.
ClipPreprocessor does what Hugging Face's CLIPImageProcessor does: resize the shortest side to 224 with a bicubic filter, centre-crop 224 x 224, read the pixels as RGB, scale to 0..1 and normalise with the CLIP mean (0.48145466, 0.4578275, 0.40821073) and standard deviation (0.26862954, 0.26130258, 0.27577711), as a float tensor in CHW order. The default resize reproduces Pillow's bicubic filter bit for bit (its antialiasing support scaling and its 8-bit fixed-point arithmetic, written in Objeck, so no native code is added). OpenCV's INTER_CUBIC does not antialias when it shrinks an image and uses a different kernel, so it gives pixels that differ by up to a few grey levels; it is available as a mode and measured against the default in docs/AI.md.
ClipEncoder opens a CLIP image ONNX model (input pixel_values, output the embedding), embeds one image or a batch, and optionally L2-normalises. It scores pairs by cosine similarity, embedding every distinct image once. FacePairs reads the standard LFW pair lists (pairs.txt and friends) or a plain CSV.
Models are exported from the Hugging Face checkpoints, for example with torch.onnx.export of CLIPModel.get_image_features; the text tower is not needed. Nothing here ends the program on bad input: a call that cannot do what it was asked returns Nil or false and the object keeps the reason, read with GetError(), which is "" when there is nothing to report. A model that fails to open is not an error at construction (see IsOpen). Not thread-safe: use one object per thread. Compile with -lib ml_clip,ml_verify,opencv,onnx,models,cipher,json,gen_collect. |
| System.ML.Cnn | Convolutional neural networks on the CPU: layers with forward and backward passes, the Adam and SGD optimizers, an image dataset with train, validation and test splits and on-the-fly augmentation, and a training loop that records the metrics of every epoch. The layers are native (libobjk_ml, Eigen plus a small thread pool); this library holds the model API, the dataset and the trainer. Compile with -lib ml_cnn,ml,ml_lab,opencv,csv,json,cipher,gen_collect. Design, validation and measurements: docs/AI.md, "Convolutional networks (System.ML.Cnn)". |
| System.ML.Lab | Experiment support for a parameter sweep: a deterministic stratified hold-out split, class-ratio resampling of the training half against a fixed test set, a wall-clock stopwatch and label helpers. Compile with -lib ml,ml_lab,csv,json, or with the ai alias group. Design: docs/ML_LAB_SUPPORT_DESIGN.md. |
| System.ML.Report | What a student needs to turn a study into a hand-in: Replicates collects the value of each metric per seed and per setting and reports the count, mean, sample standard deviation, range and a t confidence interval, with a paired comparison of two settings; ResultTables converts between a System.ML.Lab ResultTable and the other results (replicates, an OLS fit, t-tests, a grid of strings); Report builds one document with numbered sections, tables, figures, code and notes, written as Markdown or as one self-contained HTML file with a print stylesheet that prints cleanly to PDF from a browser.
No call here ends the program on bad input: a call that cannot do what it was asked returns false (or Nil) and the object keeps the reason, read with GetError(), which is "" when there is nothing to report. Output is deterministic: the same calls give the same bytes, and nothing reads a clock. Compile with -lib ml_report,ml_lab,ml,stats,plot,csv,json,gen_collect. |
| System.ML.VectorSearch | A local vector index for retrieval: store embedding vectors under string ids and ask for the nearest ones. Search is exact (a scan of every vector) for cosine similarity, dot product and Euclidean distance. Compile with -lib ml_vector,gen_collect; it needs nothing from System.ML. Design and measurements: docs/AI.md, "Local vector search". |
| System.ML.Verification | Verification metrics for a system that decides whether two things match: a face or voice verifier, a signature checker, a duplicate detector. The input is one similarity score per pair (higher means more alike) and a label per pair, true when the two really are the same (a genuine pair) and false when they are not (an impostor pair).
A pair is accepted when its score is greater than or equal to the threshold. Three rates describe a threshold:
- FAR, the false acceptance rate: impostor pairs accepted, divided by impostor pairs.
- FRR, the false rejection rate: genuine pairs rejected, divided by genuine pairs.
- accuracy: pairs decided correctly, divided by all pairs. Raising the threshold lowers FAR and raises FRR. The equal error rate (EER) is the value where the two are equal.
The curve. Verification->Evaluate sorts the distinct scores v0 < v1 < ... < v(k-1) and reports one operating point per threshold v(j), then a last point at +Infinity that accepts nothing (FAR 0, FRR 1). The first point (threshold v0) accepts everything (FAR 1, FRR 0). So there are k + 1 points, thresholds ascending, FAR never increasing and FRR never decreasing. Pairs that share a score share a point, so a tie is never split.
The EER and its interpolation rule. Let d(j) = FAR(j) - FRR(j); d is 1 at the first point and -1 at the last, and never increases. The EER is read at the first point j with d(j) <= 0. When d(j) is 0 the EER is FAR(j) and the threshold is v(j). Otherwise the two rates cross between point j-1 and point j, and both the EER and the threshold are linearly interpolated along that segment at lambda = d(j-1) / (d(j-1) - d(j)): EER = FAR(j-1) + lambda * (FAR(j) - FAR(j-1)), threshold = v(j-1) + lambda * (v(j) - v(j-1)). When the crossing lies after the highest score (the segment ends at +Infinity) the threshold reported is the highest score, and the EER is still interpolated. The same rule is what scipy's interp1d over a ROC curve gives, which is how the regression test checks it.
No call here ends the program on bad input. Evaluate returns a result whose IsValid() is false and whose GetError() says why (a size mismatch, an empty input, a NaN or infinite score, no genuine pair or no impostor pair); every number in it is then NaN. The single-number functions return NaN for the same input; call Verification->Check to read the reason. GetError() is "" when there is nothing to report. Needs only gen_collect: compile with -lib ml_verify,gen_collect. |
| System.Math | Arbitrary-precision and exact arithmetic.
Objeck's `Int` is 64-bit and wraps silently rather than trapping, so a calculation that exceeds it produces a plausible wrong answer with no diagnostic. `BigInt` is exact at any size instead, bounded only by memory. `Rational` is an exact fraction on `BigInt`, and `Complex` a complex number with `Float` parts.
Compile with `-lib math`. |
| System.NLP | Natural language processing toolkit. Provides tokenization, text preprocessing, TF-IDF vectorization, cosine similarity, and sentiment analysis. Works with plain strings — no external model required. Compile with -lib nlp. |
| System.NLP.Onnx | Sentence embeddings from a pretrained BERT-family encoder exported to ONNX: the text is tokenized with WordPieceTokenizer, run through API.Onnx, and pooled into one vector per text.
A library of its own because it needs both System.NLP and API.Onnx, and the compiler resolves every class a linked library names: an embedder inside onnx.obl would make every ONNX program link nlp too, and one inside nlp.obl would make every NLP program need ONNX Runtime (docs/ML_BERT_DESIGN.md). Compile with -lib models,opencv,cipher,json,onnx,nlp,nlp_onnx. |
| System.NLP.Topics | Topic modeling for text (System.NLP.Topics): the pieces that turn a MongoDB BSON dump or a list of strings into the bag-of-words corpus that the LDA model (nlp_topics_lda.obs) trains on, with the same steps as a Gensim workflow: decode, tokenize, remove stopwords, build a dictionary, filter infrequent tokens, build the corpus. Compile with -lib nlp_topics,json,plot,gen_collect. |
| System.Plot | A matplotlib-like plotting library: scatter, histogram, line and bar charts, subplots, as standalone SVG. A Figure holds one or more Axes; drawing the figure builds a PlotScene, an ordered list of pixel-space drawing primitives (lines, polylines, polygons, rects, circles, text), and a backend turns the scene into output. The SVG backend writes SVG 1.1 with no script and no external font, one decimal for every coordinate, so the same data gives the same bytes on every platform. Compile with -lib plot,gen_collect; it needs nothing else and draws without a display. Design: docs/PLOT_DESIGN.md. Examples: docs/AI.md, "Plotting". |
| System.Plot.SDL | The SDL2 backend of System.Plot: it draws the same PlotScene the SVG writer does, to a window you can zoom, pan and hover, or to a PNG file. Compile with -lib plot_sdl,plot,sdl2,gen_collect. Saving a PNG needs no window and no display; a window needs one. Not available in the web playground. Design: docs/PLOT_DESIGN.md. |
| System.Stats | Classical statistics for small analyses: descriptive statistics, the Student t, normal, chi-square and F distributions, t-tests with confidence intervals and effect sizes, Pearson correlation with a p-value, and an ordinary least squares fit with the full summary table (standard errors, t statistics, p values, confidence intervals, F test, R-squared, AIC and BIC). Compile with -lib stats,gen_collect; it needs nothing from System.ML.
No call here ends the program on bad input. A function that returns a Float returns NaN, and a function that returns a result object returns one whose IsValid() is false and whose GetError() says why. Design and verification notes: docs/AI.md, "Statistics". |
| System.Time | Date, time, and elapsed-timer utilities. Date provides current date/time and arithmetic (AddDays, AddHours). Timer measures wall-clock elapsed time. Included in lang.obl. |
| System.Utility | Miscellaneous utilities: a string tokenizer (Parser), a console spinner (Spinner) and a source code formatter (CodeFormatter). Built as misc.obl, not part of lang.obl: compile with -lib misc. |
| Web.HTTP | Shared networking types used across all HTTP libraries: Url (parsing and construction), Response (status code, headers, body), Cookie, and WebDownloader for streaming downloads. Compile with -lib net. |
| Web.HTTP.Server | HTTP server framework. WebServer registers route handlers for GET/POST/PUT/DELETE, parses query params and multipart form data, and supports OAuth token exchange. Compile with -lib net_server. |
| Web.HTTP.Server.MCP | MCP server support (-lib net_server) |
| Web.RSS | RSS feed reader. RSSReader fetches and parses RSS 2.0 feeds from a URL or string; RSSChannel and RSSPost expose title, description, link, and publication date. Compile with -lib rss. |
| Web.Server | Lightweight embedded web server. Handles inbound HTTP requests with typed access to method, path, headers, and body; Response supports content-type, compression, redirects, and cookies. Compile with -lib net_server. |