r/AIprogrammingLanguage • • Sep 01 '26

Working on the IDE

4 Upvotes

So for the past week or so I've been working on an IDE for madc which is actually written in madc.

Part of the idea for the madc language is to build everything to be modular, reusable and exposed to the language itself, so madc is not just a language of its own, it's also an embeddable language, but also much of the machinery can be used outside of madc, and also madc can call upon its own machinery, including embedding madc into itself (since it is c/c++), etc. So it makes this all very possible.

So this also means the features and functionality to create an IDE are also reusable components of the language, as I started with a text editor as an "example program", and the UI module actually first started with a simple text (dumb terminal) implementation of Colossal Cave Adventure, and that same UI module was extended to support TUI (Terminal User Interface), which is what was used for the text editor, and that text editor was extended into the madc IDE (madcide).

In the current develop branch the editor is working with basic IDE functionality, and with a few different editor key mapping flavours (pico, joe, emacs and vim).

I'm doing a bit more cleanup and polishing before the next master release, but wanted to chat about what's in progress and where it is going.

I've talked a little bit in here before about my idea of the future of AI coding, and that the current method of LLMs using text based shell tools and scripts (sed, awk, grep, and python mostly) to edit code seems archaic and problematic, and what I've been thinking would be useful would be to provide a "nexus" API/MCP of sorts that gives the LLM direct access to the current "live" code, at a lower level than the typical LSP layer provided by things like VSCode, and the same API would funnel gated access to the revision history, as well as the project management layer, and both of those would be configurable external connectors, so that the IDE was just providing a simple, unified entry point to the code.

So my idea with the IDE is that it would fit into this model so that there would be these various layers of a user session (or sessions), accessing this state of the union so to speak, and allowing a real collaboration between developers and LLM agents to the same live project.

I think eventually this live code nexus would be its own running server that you would connect IDE clients and LLM agents to, and you could access it from the CLI, including simple shell CLI access, a TUI interface IDE, or GUI interface IDE, remote, local, it doesn't matter.

It's something I'm playing with, and while it's primarily c/c++ based, madc itself has polyglot leanings so the door is open for fully parsing and supporting other languages.

Any thoughts?


r/AIprogrammingLanguage • • Aug 30 '26

Klyn 0.1.5

Post image
4 Upvotes

r/AIprogrammingLanguage • • Aug 23 '26

madc v0.95.2 released — faster startup, faster FP code, and less ceremony

4 Upvotes

I just released madc v0.95.2, with updated binaries for Linux, Windows, and macOS (Intel + Apple Silicon).

A few highlights since v0.92.1:

  • Much faster startup — an 11-file JIT project dropped from roughly 829 ms to around 150 ms.

  • Floating-point-heavy code is ~2.8× faster after a MIR x86-64 codegen fix; donut.c now slightly beats GCC -O0 in the test case.

  • Added std::print, std::println, and std::format

  • Array literals and var are more convenient: var values = { 1, 2, 3 }; values.push(4);

  • Polyglot utility functions from PHP, Python, Perl, Ruby, JavaScript, and Rust now work more naturally with var and C strings.

  • Multi-file project support has been improved, with fixes around globals, initialization, overload handling, and shared state.

  • Several MIR code-generation fixes landed, including fixes for higher optimization levels and Apple Silicon.

  • The release includes a madc adaptation of Colossal Cave Adventure, based on Eric S. Raymond's Open Adventure port and modified to demonstrate madc features. It remains fully playable while matching all 94 reference transcripts byte-for-byte.

The goal remains:

C and C++ without the ceremony — convenient enough for scripting, while still producing and interoperating with native code.

https://github.com/derekbsnider/madc


r/AIprogrammingLanguage • • Aug 19 '26

demoniC takes the dynamic-JIT lineage of HolyC, the vectorized math of Julia, the slicing ergonomics of Python, and the memory discipline of Rust. Arena memory, value-typed tensors, zero-copy views, and shapes checked at compile time.

Thumbnail
github.com
4 Upvotes

r/AIprogrammingLanguage • • Aug 17 '26

madc v0.82.0: Linux, macOS and Windows now supported

4 Upvotes

I just released madc v0.82.0, and this is probably the biggest portability milestone for the project so far.

madc already supported Linux, and v0.76.0 added the first public macOS builds. With v0.82.0, Windows joins them, and all three platforms now ship together from the same source tree:

  • Linux

  • macOS — Apple Silicon and Intel

  • Windows 11 / Win64

Public binaries are now available for all three.

A few highlights from this release:

  • Three-platform releases from one tree — Linux, macOS and Windows are now built and validated together.

  • Headerless operation on Linux, MacOS and Windows — madc can compile programs using its own embedded standard-library corpus even when there are no system headers or development tools installed.

  • JIT and native AOT work on all three platforms

  • Lots of various bugfixes along the way


r/AIprogrammingLanguage • • Aug 15 '26

Raku++ — an interpreter and compiler of Raku in C++

4 Upvotes

Hi,

Andrey's here. I'd like to introduce my recently created implementation of the Raku programming language. I am an enthusiastic fan of this language since the very beginning, and the time came when you can create a compiler yourself with no external human help.

So, let me introduce Raku++ — this is a self-sufficient interpreter and compiler of Raku. It's written fully in C++ with Claude. Its current state is reached after about 1.5 months of daily work.

The main goal was to make a tool that can run Raku programs really fast. So, here're some of the most bright features of what I managed to deliver:

  • Startup time 2 ms

  • In many cases, it's faster than a reference implementation (see BENCHMARKS)

  • Interpreter by default + REPL

  • You can compile the same Raku program to a self-sufficient binary file that runs natively

  • Covers 90%+ of the official test suite + passes a corpus of my own Raku programs

  • Built-in linter, profiler, and syntax highlighter

  • Available on macOS (both Apple Silicon and Intel), Windows (including MinGW), Linux, OpenBSD; there are also GNU Guix and Nix configurations options

On a separate note, I'd like to mention that the WebAssembly version runs in a browser, and the most exciting things here are:

  • The playground allows you to code Live, so to say: you type and see the result immediately

  • As a showcase shop, I prepared a few Raku programs that parse other programming languages (using Raku grammars), not only Lisp or Forth, but also Python, Perl, and JavaScript/TypeScript.

The on-going work is to make Raku++ to understand more corner-case constructs, which are not explicitly written out neither in the official test suite nor in the official documentation. For that, I am creating a matrix grid of atomic tests. Here, dogfooding takes place in full speed: all the helper generators are run in Raku++.

A brief list of the most important milestones:

  • 1.0.0 — 90% of Roast passing

  • 1.1.0 — 100% of the Unicode support

  • 1.5.1 — even faster: the hottest tests are 10-15% faster

  • 1.5.2 — external modules pass their own tests

  • 1.7.0 — another 10% off for the hottest test cases

  • 2.0.0 — 50 of the most popular Raku modules fully pass

  • 3.0.0 — no GIL, pure concurrency

  • 3.1.0 — Raku++ can be linked to/from external programs

  • 3.14.0 — slimmer binaries

So, basically, that's that much fascinating and it's really difficult to cope with all the ideas that pop up while working on the project with the help of AI.


r/AIprogrammingLanguage • • Aug 14 '26

Announcing Raptor, a Perl5 subset of Raku

Thumbnail
reddit.com
4 Upvotes

r/AIprogrammingLanguage • • Aug 11 '26

madc v0.76.0: macOS support joins Linux — Apple Silicon + Intel

4 Upvotes

I just released madc v0.76.0, which adds the project's first official macOS support alongside the existing Linux support.

madc has already been running on Linux; this release brings the same general experience to Macs, with prebuilt releases for both arm64 (Apple Silicon) and x86_64.

The macOS tarballs are designed to work even on a header-less Mac. madc carries its packed C/C++ standard-library environment with it, so things like <string>, containers, streams, and <algorithm> can compile directly from the embedded image.

A few highlights:

  • Existing Linux support, now joined by macOS

  • Prebuilt macOS binaries for Apple Silicon and Intel

  • JIT compilation works on macOS

  • Native AOT executable generation works for both C and C++

  • madc -o prog prog.mad can produce a runnable Mach-O executable

  • C++ standard-library headers are available from madc's embedded frozen forest

  • --emit=c11 output can be compiled with the system compiler using the included libmadc_rt

  • A major AArch64 ABI fix now correctly handles C++ objects returned by value

  • Several additional libc++ and macOS compatibility fixes landed along the way

  • The integration test suite has grown to 1,019 tests, with the primary JIT, EXE, OBJ, packed, and release lanes all passing

One of the more interesting parts of getting macOS working was discovering how many assumptions that are fine on x86-64 stop being true on Apple Silicon. In particular, AArch64 handles the hidden return pointer for larger C++ objects differently, so madc now lets the target ABI decide where that parameter belongs instead of assuming the x86 convention.

For me, the bigger milestone is that madc is becoming something you can simply download and try on either Linux or macOS as a lightweight C/C++ scripting environment, rather than first treating it as a compiler project you need to build and configure yourself.

Recent releases have also added things like var dynamic variables, URI-based channels for files/TCP/processes, streaming data support, and substantially faster loading of C++ headers.

The direction I'm aiming for is essentially:

keep C/C++ available underneath, but make writing small programs feel much closer to scripting.

v0.76.0 is the release that brings Mac users into that experience too (Windows coming soon).


r/AIprogrammingLanguage • • Aug 07 '26

MeScript (A musical programming language inspired by Strudel and SuperCollider)

Thumbnail reddit.com
4 Upvotes

r/AIprogrammingLanguage • • Aug 07 '26

MadC v0.69 Release

4 Upvotes

I've just released v0.69 of MadC, with a bunch of bug fixes, as well as libc++ support (previously only supported libstdc++), which means that it should be fully functional on MacOS as well.

I only say "should" because I have yet to make the actual MacOS builds -- I should have those ready in a day or two.

So, what's new in the v0.69 release beyond MacOS support? Well, a lot of little fixes to some things:

  • defer and := now work properly in "script mode"

  • multi-return now supports more than just integer types

  • the documentation was bought up to date

  • bugs were resolved in the auto-include and auto-namespace resolving

Well, check it out if you can. I've included Linux packages. MacOS coming soon, and also eventually Windows EXE version.


r/AIprogrammingLanguage • • Oct 13 '26

Klyn 0.2.0

Post image
3 Upvotes

r/AIprogrammingLanguage • • Oct 12 '26

How should an Objective-C-inspired language decide which new constructs use an @ prefix?

3 Upvotes

Background

I'm designing a statically compiled programming language called Jeti. Its syntax is inspired by Objective-C, and its compiler translates Jeti source code into C99 before compiling it with Clang.

One of my design goals is to preserve Objective-C's recognizable syntax while introducing modern language features. I also want Jeti to remain a strict superset of C99, so existing C identifiers should ideally remain valid in Jeti code.

I'm currently unsure how to decide which new language features should use an @ prefix and which should use ordinary keywords.

Current syntax

Jeti retains several Objective-C constructs:

  • @ interface and @implementation for class declarations and implementations.

  • @ property for properties.

  • @ protocol for protocols.

  • @ selector for selectors.

  • @ try, @ catch, @ finally, and @ throw for exception handling.

  • @ autoreleasepool for autorelease pool management.

It also introduces new features with different syntax conventions:

  • async appears in return-type positions, as in - (async int)fetchUser:(int)uid;.

  • await is a prefix operator, as in await [self fetchUser:uid].

  • @ throws(NPString *) declares the exception types a method may throw.

  • @ defer { ... } introduces deferred execution.

  • @ namespace, @ using, and @ endnamespace provide namespace-related functionality.

  • @ noarc { ... } marks a region where ARC is disabled.

  • Pattern matching extends case with forms such as case NPString *s: and case > 100:.

  • Generic types use forms such as Box<NPString *>, with constraints such as T : Proto.

This leaves me with a mixture of ordinary keywords and @-prefixed constructs.

A possible design principle

One possible principle is to distinguish features by their grammatical role.

Features that occupy existing grammatical positions could use ordinary keywords. For example, async modifies a method's return type, while await acts as an expression operator.

Features that introduce new language constructs could use the @ prefix. For example, @ defer introduces a new statement-like construct, and @ namespace introduces a new declaration construct.

However, I'm not sure whether this is a meaningful and consistent distinction or merely an arbitrary convention.

Three possible designs

Design A: Keep the current mixture

Use async and await without @, but retain @ throws.

For example, a method declaration would use - (async int)fetchUser:(int)uid @ throws(NPString *);, and an asynchronous call would use await [self fetchUser:uid].

The advantage is that async fits naturally into the return-type position, and await reads naturally as an expression operator. However, @ throws looks inconsistent with the other two features, even though all three belong to the same general family of asynchronous and error-handling functionality.

Design B: Use ordinary keywords for all three

Use async, await, and throws without @.

For example, the method declaration would be - (async int)fetchUser:(int)uid throws(NPString *);, and the asynchronous call would be await [self fetchUser:uid].

This provides consistent spelling for the three features, but it raises questions about how they fit into Objective-C-inspired syntax and whether they conflict with existing C identifiers.

Design C: Use the @ prefix for all three

Use @ async, @ await, and @throws.

For example, the method declaration would be - (@async int)fetchUser:(int)uid @ throws(NPString *);, and the asynchronous call would be @ await [self fetchUser:uid].

This gives the three features a consistent visual convention and avoids treating their names as ordinary C keywords. However, @ async in a return-type position looks unusual, and @ await as a general expression operator may feel less natural than @await.

C99 compatibility

The C99 compatibility requirement complicates this decision.

If @async, @await, or @throws becomes a reserved keyword, existing C code that uses one of those words as an identifier may no longer be valid Jeti code. Using @async, @await, and @throws avoids that particular conflict because the @ prefix distinguishes these tokens from ordinary C identifiers.

On the other hand, requiring the @ prefix for every new feature may make the syntax less natural, especially when a feature occupies an established grammatical position.

It may also be possible to use context-sensitive parsing or another mechanism to preserve existing C identifiers, but I'm not sure whether that would be a good language-design choice.

Questions

  1. Is there a principled reason to distinguish new features by grammatical role, using ordinary keywords for features that fit existing grammatical positions and @ prefixes for features that introduce new constructs? Or is this distinction too arbitrary to be useful?

  2. Should related features use the same spelling convention? In particular, should async, await, and throws all use the @ prefix for consistency with one another and with Objective-C's existing exception-handling constructs, or is it reasonable to treat them differently based on their grammatical roles?

  3. Are there useful precedents in Objective-C or other languages for deciding when a language extension should introduce a new keyword versus a specially prefixed construct? I'm particularly interested in examples involving new statement or expression syntax, rather than declaration annotations or attributes.

  4. What is the best way to preserve strict C99 compatibility while adding features such as asynchronous functions and exception specifications? Would prefixed forms such as @async, @await, and @throws be preferable to ordinary keywords, or would context-sensitive parsing be a better solution?

I'm interested in both the consistency of the language's syntax and the practical consequences for parsing, compatibility, and readability.

I’d especially appreciate input from experienced Objective-C developers, particularly those who are also familiar with a modern high-level language that supports async/await. 🙏

Jeti’s source code and development are available on GitHub: https://github.com/3shine123/jeti-lang


r/AIprogrammingLanguage • • Sep 25 '26

Klyn 0.1.8

Post image
3 Upvotes

r/AIprogrammingLanguage • • Sep 12 '26

I benchmarked my capability-declaring language against Deno and Python on 63 AI-written scripts — here's what it missed

3 Upvotes

I've been building a language where a function's signature declares which effects it may perform, and a runtime refuses anything outside a budget you grant. The obvious question is whether that catches anything real, so I built a benchmark.

63 programs — 56 dangerous, 7 harmless controls — each written three times in Velaris, Python and JavaScript, doing the same thing. Eleven categories: effects hidden in helpers, division by user input, off-by-one reads, integer overflow, ignored failures, infinite loops, runaway memory, dangerous modules, scoped-budget escapes.

Results across the 56 dangerous ones — caught before running / during / missed:

Velaris 42 / 12 / 2. Deno 5 / 27 / 24. Python 0 / 28 / 28. Zero false positives on the controls for all three.

The first column is the interesting one. Deno's permission model works, it just works at the moment of the call — nothing in deno check or deno lint reads a file write as a problem.

What mine missed: one computes the wrong answer and promises nothing, so there's no contract to check against. The other prints the string rm -rf / — it doesn't run anything, and flagging it would mean flagging any program that prints text resembling a command.

And four cases where the prover fell short and only the runtime check caught it, named by ID in the write-up: a division on n - 1 with n from a checked parse, the same on an unguarded path when another path guards it, a remainder inside a loop body, and a read at i + 1 in a loop bounded by length(xs).

Full write-up, methodology and the reproduce command: https://dev.to/gowrishankar-dev/i-tested-my-sandbox-against-deno-and-plain-python-on-63-ai-written-scripts-1llp


r/AIprogrammingLanguage • • Sep 10 '26

RFC: What is Nyx actually supposed to mean?

Thumbnail reddit.com
3 Upvotes

r/AIprogrammingLanguage • • Sep 09 '26

Klyn 0.1.6

Post image
3 Upvotes

r/AIprogrammingLanguage • • Sep 06 '26

madc v0.98.0 released — now with an IDE written in madc

3 Upvotes

It took longer than expected, but I just released madc v0.98.0, with updated builds for Linux, Windows, and macOS.

A few of the more interesting additions since v0.95.2:

  • madc now ships with madcide — a terminal IDE written in madc itself, with the distributed binary compiled by madc.

  • The IDE uses the running compiler directly: it can parse, build and run the code in the editor, including unsaved changes, without shelling out to another compiler.

  • JOE/WordStar-style keybindings are the default, with a full vi-style mode also included.

  • Cooperative multitasking is now built into the language with go, await, channels and structured scope blocks.

  • var has much better literal support, including keyed values and nested structures:

   var user = { "name": "Alice", "score": 42 }; 
  • The C++ front end received another substantial compatibility pass, particularly from running the complete test suite against libc++ on macOS.

  • Apple Silicon support has matured considerably, including SIMD/NEON and additional ABI work.

  • The entire madc test suite now passes on both Apple Silicon and Intel macOS, alongside the existing Linux and Windows validation.

  • Release packages are now built automatically by CI, including .deb, .rpm, Linux tarball, Windows zip, and both macOS architectures.

The direction remains C and C++ without the ceremony — but with v0.98, madc is also starting to demonstrate that it can be used to build its own development tools.

https://github.com/derekbsnider/madc/releases/tag/v0.98.0


r/AIprogrammingLanguage • • Sep 05 '26

Rapid! — a new general-purpose language that compiles to native x86-64 code, built to be easy to learn

3 Upvotes

I've been working on Rapid! for the past few months — a modern, general-purpose language aimed at being fast and easy to learn, built on top of a real compiler pipeline.

Code compiles straight down to a native x86-64 Linux ELF binary — no VM, no interpreter, no garbage-collected runtime sitting underneath:

.rapid → Flex (lexer) → Bison (parser) → AST → Semantic Check → QBE IL → qbe → cc → ELF64

Why I built it: most hobby languages either stay stuck in an AST interpreter or get buried in LLVM's complexity. I wanted something in between — one that actually produces native code, but where the compiler itself stays understandable. QBE fills that gap perfectly.

A quick taste of the language:

use "mathlib.rapid";

efn square(x) => x * x

fn main() {
    var name: string = io::in();
    io::out("Hello, {}! square(5) = {}", name, square(5));

    list<int> xs = [1, 2, 3];
    push(xs, 4);
    for (x in xs) {
        io::out(x);
    }
}

What's there so far:

  • Classic control flow (if/else, while, for, switch), block scoping

  • efn for one-line functions with inferred return types

  • First-class function values (no closures, but they carry around like a function pointer)

  • Fixed-size arrays plus a growable list<int>

  • Fixed-width integer types, real float/double (IEEE-754)

  • A module system (use, aliased imports, private visibility)

  • Systems programming primitives (alloc/free/syscall)

  • An FFI layer I actually took seriously: extern fn to call C functions directly, link to pull in libraries, and a keyword shortcut that expands purely at the text level without touching the compiler's source at all — I can even flatten signatures that can't be expressed directly (like T**) through a C shim pattern, for libraries like sqlite3 or libcurl

Repo's here: https://github.com/musabX44/Rapid-Programming-Language

Would love to hear your thoughts/criticism on the design — especially the FFI approach or the general syntax.


r/AIprogrammingLanguage • • Sep 04 '26

[RFC] Working on Nyx RC.2 (Wasm pipeline & DOM integration). What features or ergonomics would you expect?

3 Upvotes

Hey everyone,

First off, huge thanks to everyone who checked out the repo, left comments, and starred the project after my previous post. The feedback and discussions around systems language trade-offs were genuinely invaluable.

I'm currently designing and mapping out Nyx RC.2, with a heavy emphasis on making WebAssembly a first-class, seamless target rather than just an afterthought backend.

What's currently being integrated for RC.2:

  1. Zero-friction TypeScript / JS Interop: When compiling to Wasm, the compiler will automatically emit .d.ts type definition files alongside the .js glue wrapper, allowing Nyx Wasm modules to be imported directly into React/Next.js/Node projects with full IntelliSense.

  2. Deterministic Memory & Cleanup: Continuing to refine the Typed HIR pipeline so that linear memory allocation, defer, and RAII semantics remain memory-safe without requiring a heavy runtime or a complex borrow checker.

  3. Cross-Platform Tooling & "Tour of Nyx": Refactoring our interactive terminal learning suite (tour) to be fully portable across Windows, macOS, and Linux without environment assumptions.

  4. Web / DOM Bindings Exploration: Exploring minimal, zero-overhead DOM and WebGL/WebGPU hooks directly from the language.

I'd love to hear your thoughts:

  • For those who work with Wasm or build compilers: What is currently the most painful part of your Wasm workflow that you wish a language solved out-of-the-box?

  • Are there specific language ergonomics, stdlib modules, or tooling features you'd love to see in RC.2?

  • Any edge-cases or architectural pitfalls in Wasm/C++20 lowering I should watch out for?

Repo is available here if you want to inspect the current codebase: https://github.com/justsomeone-e/nyx

Appreciate any critiques, feature requests, or sanity checks!


r/AIprogrammingLanguage • • Aug 05 '26

Vex Language Announcement

3 Upvotes

It's been awhile since I finished v0.1.1 of this project, but I am ready to announce it. This language is Vex, a programming language designed for readability, scalability, and usability. Here is a simple breakdown:

Vex is a language designed to fit in all sorts of areas. It can be a small as an embedded system in a website to as large as a whole graphical application. It features a syntax that is meant to be as close to English as possible.

The part that makes Vex special is its Environments skill. This allows for a program to use a Vex Environment, which sets limits on what it can do. These limits can include CPU percent usage limits, RAM usage limits, and disallowed parts of syntax. This is what makes Vex scalable.

Vex is usable because it features roughly only 20 syntax commands (depending on what you count as syntax). It also has the ability to add libraries straight from the VexLibC repository.

More information regarding Vex is available at https://sites.google.com/view/vexlang

Example code (kind of sucks, it was pulled straight from my documentation:

if (username = “John”)
  globalvar isJohnHere = True
  print(“Welcome, John!”)

if (isJohnHere or username = “John”)
  globalvar unlockHouse = True
  print(“You house is now unlocked!”)

else if (not isJohnHere)
  globalvar unlockHouse = False
  print(“You aren’t John!”)

r/AIprogrammingLanguage • • Oct 08 '26

The Unfair Benchmark: What is your language unfairly good at?

2 Upvotes

I'm thinking about a small community challenge for experimental, new, and AI-driven programming languages.

The idea is simple:

Every language gets to choose its superpower.

«What is your language unfairly good at?»

A few superpowers I had in mind:

- Runtime performance

- Memory efficiency

- Code density / expressiveness

- Build / compilation speed

- Parallelism / concurrency

- Compile-time computation

- Preventing errors before runtime — e.g. formal verification, proofs, dependent types, contracts

- Metaprogramming

- Hardware / SIMD / GPU utilization

- Developer feedback loop

- Something completely different?

But I don't want to define the categories all by myself.

This is the first step of the game: choose your language's superpower.

Tell me what you think your language is exceptionally good at — even if it doesn't fit any of the categories above.

How we measure it comes later. We can figure that out together.

Right now, I'm much more interested in hearing what you believe your language can do unusually well.

P.S. to the non-AI languages: Don't worry, you're allowed to play too. We believe in inclusion. 😉

And yes, you're absolutely encouraged to use AI to code the benchmark. ;-)

So: What's your language's superpower?


r/AIprogrammingLanguage • • Aug 05 '26

Desi v0.1.0 — Python-ish syntax, no GC, and three optimisations that made it slower

Thumbnail reddit.com
2 Upvotes

r/AIprogrammingLanguage • • Aug 05 '26

What tools are you using?

2 Upvotes

I'm curious what tools everyone is using to improve their agentic development flow?

I'll go first... I'm using both Codex (CLI) and Claude Code (CLI) to work on madc, which is written in C++ using g++ (and clang++) with no real other tools (currently), beyond AGENTS.md, CLAUDE.md, and various rules file.

I have another project which I have implemented my own project tracking through an MCP server that is part of the project itself, where the primary development agent is Claude Code, but through the MCP it triggers Codex CLI agents to do code reviews using Forgejo for the git repository.

I'm planning to move the MadC project into this platform, but just haven't quite gotten around to it yet. The idea is that I can use one agent as a master orchestrator, and have it select other agents to do some work as they have capacity and usage remaining.

The main problem I've been running into (regardless of orchestration method) is task fragmentation and tangential plan overload. Like I have an overall roadmap, and it is broken down into stages, but what I'm noticing is that as a project grows in complexity, each subsequent stage not only takes longer to implement, it inevitably fragments into ever smaller slices.

Those slices will get sliced into subsequentially smaller slices, and the next thing I know my agents are grinding endlessly on never-ending numbered tasks.

The other main problem is post-compaction drift, where before the compaction, the agent will be quite certain in what is supposed to be tackled next, but after the compaction, the agent takes things in a completely different direction.

Other issues involve outright deception, where an agent will vastly overstate the completion of a task, where later investigation reveals something that could not have possibly passed unit testing.


r/AIprogrammingLanguage • • Aug 04 '26

Tyre - a programming language infrastructure

2 Upvotes

Many years ago I came up with a vague idea of how I want a programming language:

  1. Multiple layers

  2. T - C-level language, only C level features, no generics, no name mangling

  3. Ty - Rust/C++-level language, mostly Rust-like features

  4. Tyr - High level, inspired by natural language (still not exactly sure what I want from this)

  5. Multiple generic syntaxes: The user can create

  6. S-expressions as intermediate representation for macros

Have a look!

This repo contains a full AI generated documentation. And the script to generate the documentation ensures that all the examples compile.

One of the first things after I got into using coding agents was implementing this language. I got the first two layers working within maybe two days. (my first two weeks of using coding agents were so crazy, this language was only a side project, and doing it myself, it would have taken me weeks to months to get at this state, if not longer; feel free to check the git history)

How the languages were created?

At first, I let it implement my basic features, a documentation that contains many important examples, and I looked at all examples to see if I actually like them.

After a while, I created example projects:

I didn't look at the generated code a lot. I think I looked at most of the tests a few times to see if something can be improved. And I also looked at the programs.

I had these agents:

  • 1 cooordinator

  • 1 agent per language (3 in total)

  • 1 agent per project

I had some multi agent task setup for the main repo. If one of the language specific agents needed some feature that affects both languages, it wrote a task for the coordinator.

If the agents for the projetcs needed some feature, they also added it to the list, and then the agents for the specific language decided which features to implement.

Sometimes they decided to implement it in the most generic way, that's what AI is good at after all. And most of the time, that's what I wanted anyway. But in some cases, I wanted my language to be unique.

So I don't know every little detail about the language. Most of the features were just what other AI agents needed. And this also was my first project where I realized that this is actually a good approach.

Nowadays, when I create a library, I only know what the library is about, and then I have a bunch of programs which use that library, that create feedback.

The fact that agents were able to create such complex software using my languages means that it's already at a good state.

I also asked agents how they liked workin with the language. One thing I realized was that error messages.

Also the compiler turned out to be very strict. Every lints is a hard error. "x = x + 1" is forbidden. You have to use "x += 1". I turned on strict lints in Rust, even before I used coding agents. And with coding agents, I quickly added more and stricter lints. So I thought that the language could just have inbuilt lints for everything, so the code is always elegant. I even enforced a maximum line count per file.

State

T is basically finished. Ty still needs some advanced features, especially the borrow checker is still missing. Tyr is just a weird prototype, not really created by AI.

2 syntaxes are supported, a C like syntax, and a Lisp like Syntax. I also considered supporting visual representation and markdown inspired syntax.

I'm not really actively working on this language anymore. Once in a while I just start an AI agent to work on the remaining features.

One of the last features I've been working on was a Macro Compiler to Rust, so that you could import Ty in Rust and get Rust code at compile time. I have no idea if this feature already works.

I also don't know what I will use this language for. Maybe I'll just migrate all of my software to this new langugae one day.

Feedback

Human feedback might be another way to know if something about the languge has to be changed.

It's a type focused language, and this can still be the most annoying part if coding by hand. You have to create a bunch of types yourself before you can do anything meaningful.

Feel free to provide some feedback.

And maybe you just want to use these languges for your projects because they already contain features that are better than other low level languages.


r/AIprogrammingLanguage • • Aug 03 '26

AI-friendly programming language design

2 Upvotes

So when developing a new programming language using AI (or enhancing an existing one), it seems to make sense to design the language not only to be convenient for humans to use, but likewise for AI agents.

What Would an “AI-Friendly” Programming Language Actually Look Like?

There has been a great deal of discussion about making programming languages easier for AI systems to use. Usually, this means making code easier for large language models to generate: simpler syntax, fewer punctuation rules, less boilerplate and more predictable formatting.

But code generation is only a small part of software development.

An autonomous programming agent must also be able to understand an unfamiliar codebase, identify the consequences of a change, modify the program without breaking unrelated behaviour, verify that the result is correct and explain what it has done.

That suggests a much broader definition:

The goal should not merely be to make programs easier for AI to write. It should be to make programs easier for both humans and machines to understand, modify and verify.

Source Code Should Not Be the Only Representation

Most programming languages treat source text as the authoritative representation of a program. Compilers parse that text into abstract syntax trees, symbol tables, control-flow graphs and other structures, but these are usually treated as temporary implementation details.

An AI-friendly language could instead expose a stable semantic representation of the program.

Humans might continue to work primarily with readable source code, while tools and AI agents interact with the same program as a structured semantic graph containing:

  • Symbols and their identities

  • Types and relationships

  • Data ownership

  • Function contracts

  • Side effects

  • Dependencies

  • Call graphs

  • Tests

  • Access permissions

  • Source locations

  • Documentation

Source code would remain important, but it would become one view of the program rather than the only usable representation.

An AI agent should not need to rediscover the meaning of a program by repeatedly parsing text, searching filenames and inferring relationships from naming conventions.

Programs Should Be Locally Understandable

One of the greatest difficulties in maintaining a large codebase is that the meaning of a small section of code may depend on information scattered throughout the repository.

A module might rely on global state, build flags, initialization order, implicit imports, runtime configuration or code-generation steps that are not visible locally.

This is difficult for humans and even more difficult for AI agents operating with limited context windows.

An AI-friendly language should encourage modules to explicitly declare:

  • What they export

  • What they import

  • What state they own

  • What resources they require

  • What external systems they access

  • What assumptions they make

  • What invariants they guarantee

For example:

module Accounts

exports:
    User
    update_email

requires:
    Database
    EmailService

owns:
    UsersTable

guarantees:
    User.email is normalized
    User.email is unique

The purpose is not necessarily to make source files more verbose. Much of this information could be inferred by the compiler and displayed through tooling.

The important part is that the information exists in a structured and queryable form.

A programming agent should be able to ask:

describe module Accounts

and receive a bounded, reliable summary of the module without examining the entire application.

Types Should Describe Meaning, Not Just Storage

Many programming languages describe data primarily in terms of its storage representation.

A program may represent all of the following as strings:

first_name
email_address
postal_code
country_code
birth_date
telephone_number

Although these values share a storage representation, they do not share a meaning.

A language designed for machine reasoning should support semantic types such as:

PersonName
EmailAddress
PostalCode
CountryCode
BirthDate
TelephoneNumber
CurrencyAmount
TimeZone

These types could carry information about:

  • Valid values

  • Normalization

  • Comparison

  • Serialization

  • Privacy

  • Localization

  • Appropriate user-interface controls

  • Database representation

  • Safe conversions

A value of type EmailAddress would not merely be a string whose purpose is explained in a comment. Its meaning would be available directly to the compiler, development tools and AI agents.

This reduces the need to infer domain knowledge from variable names and scattered validation code.

Effects Should Be Part of Function Signatures

Traditional type systems tell us what values a function accepts and returns, but often say very little about what the function can do.

Consider a function such as:

update_email(user, address)

Does it modify memory? Write to a database? Send an email? Update an audit log? Access the network? Throw an exception? Trigger an event?

An AI agent should not need to inspect the implementation and every transitive function call to answer these questions.

An effect-aware declaration might look something like this:

function update_email(user_id, new_address)
    returns Result

    reads:
        User.id
        User.email

    writes:
        User.email
        AuditLog

    uses:
        Database
        EmailService

    may:
        send_email
        fail_with ValidationError
        fail_with DuplicateEmailError

This creates a machine-readable description of the function’s blast radius.

An agent proposing a modification could ask:

show effects of update_email

or:

will this change introduce network access?

The compiler could provide a reliable answer.

Authority Should Be Explicit

Most programs execute with ambient authority. Any code running within the process may be able to access the filesystem, environment variables, network, database or global application state.

That is convenient, but dangerous when code is being produced or executed by an autonomous agent.

A more AI-friendly language would use capabilities: explicit values representing permission to access particular resources.

For example:

function load_config(config_directory)

The function could access only the directory represented by the capability it receives. It would not automatically inherit access to the entire filesystem.

Similarly:

function update_customer(read_write_customers_database, customer_id)

could write to the customer database but not to the payroll database.

This would allow an AI agent to operate within a restricted environment where accidental or malicious actions are structurally impossible.

The agent could be given:

  • Read access to one repository

  • Write access to one module

  • A temporary filesystem

  • A test database

  • No network access

  • A limited memory and execution budget

Security boundaries would become part of the program rather than an external policy layered on top of it.

Contracts Should Be First-Class

Comments can explain what a function is intended to do, but comments are not normally checked by the compiler.

An AI-friendly language should make preconditions, postconditions and invariants first-class program elements.

For example:

function transfer(source, destination, amount)

requires:
    amount > 0
    source.balance >= amount

ensures:
    source.balance =
        previous(source.balance) - amount

    destination.balance =
        previous(destination.balance) + amount

    source.balance + destination.balance =
        previous(source.balance + destination.balance)

These contracts could serve several purposes:

  • Human documentation

  • Static analysis

  • Runtime checks during development

  • Test generation

  • Formal verification

  • Agent acceptance criteria

Instead of guessing whether an implementation is correct, an AI agent could ask the compiler whether the implementation satisfies its declared contract.

Contracts would also make tasks easier to define.

Rather than telling an agent:

a task could be expressed as:

Modify transfer so that contract
AccountTransferPreservesTotalBalance
is satisfied.

The desired outcome becomes concrete and machine-verifiable.

Inference Should Be Predictable and Inspectable

Inference can make a language substantially easier to use. Type inference, automatic imports, generic specialization and implicit conversions can remove large amounts of repetitive code.

However, inference becomes dangerous when it hides meaningful decisions.

A useful rule might be:

Automatic behaviour may be reasonable when:

  • A conversion is exact

  • Ownership remains unchanged

  • No persistent state is modified

  • No external resource is accessed

  • Execution remains deterministic

Explicit syntax should be required when an operation:

  • Loses information

  • Transfers ownership

  • Performs network access

  • Blocks or becomes asynchronous

  • Writes persistent state

  • Escalates privilege

  • Introduces nondeterminism

  • Has significant computational cost

An AI agent should also be able to inspect every inferred decision.

For example:

explain expression:
    total = price + tax

might produce:

price has type Currency<USD>
tax has type Currency<USD>

selected operation:
    Currency.add

conversion:
    none

effects:
    none

possible failures:
    CurrencyOverflow

The language could remain concise while the toolchain exposes the full semantic interpretation.

The Language Should Have a Canonical Form

Formatting tools create a consistent textual style, but an AI-friendly language would benefit from a deeper canonical representation.

The compiler could normalize:

  • Resolved names

  • Inferred types

  • Selected overloads

  • Implicit conversions

  • Generic arguments

  • Default arguments

  • Effects

  • Ownership decisions

Human-written code might say:

user.balance += payment

The canonical semantic form might record:

read field User.balance

convert Payment
    to CurrencyAmount
    using exact conversion

invoke CurrencyAmount.add

write result
    to field User.balance

This form would not necessarily be shown during normal programming. It would be available to tools, reviewers and agents when precise interpretation is required.

It would also allow code written in different stylistic forms to be compared semantically rather than textually.

Symbols Should Have Stable Identities

Programming tools often identify symbols using names and source locations. Both are fragile.

Names change during refactoring, and source locations change whenever lines are inserted or removed.

An AI-friendly language could assign stable identities to program entities:

symbol:
    User.email

stable_id:
    field:7f2a81c4

aliases:
    email
    email_address
    contact_email

Humans could use whichever names are appropriate in source code or user interfaces, while tools and agents refer to the canonical identity.

This becomes especially important when a language supports aliases, localization, schema evolution or generated interfaces.

An agent should be able to rename a symbol without losing track of its identity or confusing it with another similarly named symbol.

Changes Should Be Semantic, Not Merely Textual

AI coding tools currently make changes largely through text patches. This works, but it is fragile.

A line-based patch may fail because:

  • The file was reformatted

  • Another change shifted the lines

  • A symbol was renamed

  • Similar code appears elsewhere

  • The surrounding context has changed

  • The patch applies cleanly but to the wrong location

A semantic patch could instead express intent:

rename symbol:
    User.birthdate
to:
    User.birth_date

or:

add parameter:
    Logger

to function:
    process_order

position:
    after Database

or:

replace implementation of:
    Account.transfer

only if:
    function signature is unchanged
    semantic hash matches 4e720
    no new callers have been introduced

The compiler or development environment could translate the semantic change into ordinary source-code edits and Git-compatible diffs.

The repository would still contain readable text, but agents would operate on program structure rather than guessing where to insert characters.

Diagnostics Should Be Structured Data

Compiler errors are generally written as prose for humans:

Cannot convert argument 2 from nullable string
to email address.

An agent then has to parse that prose and infer an appropriate repair.

A structured diagnostic might contain:

diagnostic_code:
    TYPE_ARGUMENT_MISMATCH

function:
    update_email

parameter:
    new_address

expected:
    EmailAddress

received:
    Nullable<String>

cause:
    nullability mismatch

possible_repairs:
    validate non-null value
    provide default value
    change parameter type

automatic_repairs:
    none

The human-readable message could still be generated from this data.

The compiler should clearly distinguish between:

  • A repair that is known to preserve semantics

  • A probable repair requiring review

  • Multiple ambiguous alternatives

  • A condition for which no valid repair is known

This would make compiler interaction far more reliable for autonomous agents.

Relationships Should Be Declarative

Many applications define the same relationship repeatedly across:

  • Database schemas

  • Object models

  • API definitions

  • Validation code

  • User interfaces

  • Serialization formats

  • Access-control rules

An AI agent must then determine whether these duplicated definitions are consistent.

A more declarative language might express the relationship once:

entity Order

fields:
    id: OrderId
    customer: relation to Customer
    items: many OrderItem
    total: CurrencyAmount

derivation:
    total = sum(items.price)

The language now knows:

  • customer refers to another entity

  • items is a collection

  • total is derived

  • Changing an item may change the total

  • total should not normally be edited directly

  • Storage and user-interface tools can represent these fields appropriately

This greatly reduces the amount of detective work required to understand the application.

State Changes Should Be Transactional and Inspectable

AI-generated operations should be easy to preview, sandbox and reverse.

A language or runtime could make state-changing operations transactional:

transaction UpdateEmail

set:
    user.email = new_email

append:
    audit_log = email_changed

send:
    confirmation_email

Before committing, an agent or human could request:

preview transaction UpdateEmail

The runtime might report:

database changes:
    Users.email modified for user 1842
    AuditLog row inserted

external effects:
    one email would be sent

invariants checked:
    email is valid
    email is unique

result:
    transaction may commit

The runtime could also support:

  • Snapshots

  • Rollback

  • Deterministic replay

  • Resource limits

  • Mutation logs

  • Simulated external services

  • Reversible development environments

An agent should be able to demonstrate what would change before being permitted to change it.

Tests Should Be Connected to Program Semantics

Tests are usually organized as source files and function names. Their relationship to the code they verify is often informal.

An AI-friendly language could associate tests with symbols, contracts and invariants:

test transfer_preserves_total

verifies:
    Account.transfer

covers:
    AccountTransferPreservesTotalBalance

The toolchain could then answer:

which tests verify Account.transfer?


which public behaviours changed?


which contracts have no tests?


what is the smallest sufficient test set
for this patch?

This last question is particularly important for autonomous agents. Running every test after every small change may be expensive, while running too few tests is unsafe.

Semantic test relationships could allow the compiler to select a targeted verification set and then expand it when uncertainty remains.

The Compiler Should Expose an Agent Protocol

The most important feature may not be part of the language syntax at all.

A language designed for AI-assisted development should provide an official interface through which agents can query and modify programs.

That interface might support operations such as:

describe(symbol)

find_references(symbol)

explain(expression)

show_effects(function)

show_contracts(function)

show_invariants(type)

calculate_change_impact(patch)

create_semantic_patch(request)

validate_patch(patch)

find_relevant_tests(patch)

run_tests(test_set)

preview_transaction(operation)

apply_patch(patch)

rollback(change)

Today, AI coding agents often interact with a repository using little more than shell commands, text search, a language server and compiler output.

A compiler-native protocol would give them a much more precise and constrained environment.

The compiler could even generate a compact task-specific context package:

task:
    modify email validation

relevant symbols:
    User.email
    EmailAddress
    update_email
    UserRepository.save

required invariants:
    email must be normalized
    email must be unique

allowed modules:
    Identity
    Accounts

forbidden effects:
    database schema changes
    network access

required verification:
    EmailAddress contracts
    identity email tests

This would help prevent agents from becoming lost in large repositories or long-running plans.

AI-Friendly Does Not Necessarily Mean Verbose

Many of these ideas may sound as though they would produce an extremely ceremonial language.

That does not have to be the case.

Humans should be able to write concise code while the compiler derives and records the richer semantic model.

For example:

function add_item(order, item):
    order.items.append(item)

The compiler might infer:

  • order is mutated

  • item is read

  • order.total must be recalculated

  • The operation may fail if the order is finalized

  • The database transaction touches two tables

  • Three invariants must be rechecked

  • Four tests are directly relevant

The source code remains readable. The additional information exists because the language and toolchain understand the operation.

The principle should be:

Human-Friendly and AI-Friendly Design Are Closely Related

Most of the features that would make a language safer for AI agents would also make it easier for humans to maintain:

  • Explicit module boundaries

  • Meaningful types

  • Predictable conversions

  • Structured effects

  • First-class contracts

  • Better diagnostics

  • Semantic refactoring

  • Transaction previews

  • Clear test coverage

  • Stable symbol identities

AI agents amplify the importance of these features because they expose weaknesses that humans have historically worked around through experience, intuition and institutional knowledge.

A human developer may remember that a particular field is updated by a hidden database trigger. An AI agent may not discover that fact until something breaks.

The better solution is not necessarily to train the agent to guess more accurately. It is to make the dependency explicit.

A Possible Definition

A genuinely AI-friendly programming language would not merely be one whose syntax appears frequently in training data.

It would be a language in which a program is:

  • Readable as source code

  • Understandable as a semantic graph

  • Divided into bounded cognitive domains

  • Explicit about authority and side effects

  • Modifiable through structured operations

  • Testable against declared contracts

  • Executable in sandboxed transactions

  • Verifiable using compiler-supported evidence

The central design goal might be summarized as:

Such a language would not eliminate programming mistakes, hallucinations or unsafe changes. It would, however, give both humans and AI agents much stronger tools for detecting those problems before they reach production.

The result would not simply be a language that AI can generate.

It would be a language in which AI can operate with bounded authority, explicit understanding and evidence that its work is correct.