r/VibeCodedLanguages • u/kindredseer • Aug 05 '26
What tools are you using?
r/VibeCodedLanguages • u/antonation • May 28 '26
Here it is: https://github.com/antonsynd/sharpy
You can also try the transpiler to C# in the browser without installing anything: Try Sharpy Online (Blazor WASM playground).
I'm one of those people who wants to work on something, and then ends up building something to work on that something, which is completely unproductive. In this case, I wanted to make a game in Unity, but I didn't want to use C# 'cause reasons. I figured, why not create a Pythonic language that transpiles to C#? The object model and memory models are similar enough. (I had an earlier attempt to do the same but targeting C++ for a separate reason, but I quickly ran into hard decisions about wrapping everything in shared_ptr's and things looking kind of awful).
I'm aware that Boo was a thing, but one of the things that irked me about it was the retention of PascalCase access to .NET APIs. For a Pythonic language, access to .NET should look Pythonic.
There is a compiler (using Roslyn), a standard library of the Python modules you expect most: json, os, re, numpy (sort of), sqlite3 (sort of), requests (sort of), itertools, etc., a language server with a VS Code extension, and support for multi-file projects via *.spyproj files (akin to *.csproj files).
Sharpy is statically-typed, so no dynamic features are available (yet, or maybe ever). However, there are some things that make static typing more ergonomic:
x = 5 # obviously an `int`, specifically `int32`
# (`int` is an alias)
x: str = str(x) # reassignment with a type annotation is shadowing
x: auto = [x] # `auto` type infers and simplifies the type
# annotation for cumbersome types. here it is
# inferred to be `list[str]`. this also shadows.Sharpy supports nullable types AND true optionals. Nullable types are annotated as T | None, and optional types are T?. The reason both exist: .NET APIs return nullables, so Sharpy needs to interop with those, but for Sharpy-native code, true optionals (tagged unions under the hood) are safer and pattern-matchable. T? gets the short syntax because I wanted to promote optionals as the default choice. Null-aware operators work on both, e.g. ?. (safe navigation/optional chaining) and ?? (null-coalescing).
To make working with .NET and nullable APIs easier, you can use maybe in front of a nullable expression to auto-wrap the expression value in a true optional:
x: int | None = some_function_returning_nullable_int()
y: int? = maybe some_function_returning_nullable_int()
match y:
case Some(v):
print(v)
case None():
print("no value")Sharpy also has a result type, with a similar keyword try for auto-wrapping throwing expressions in the result type, with optional type annotation to change the exception type in the result.
x: str !Exception = try some_throwing_function()
y: int !ValueError = try[ValueError] int(x.unwrap_or(""))Since Sharpy has both true optionals and result types, Sharpy predictably has ADTs/tagged unions (a la Rust):
union HttpResponse:
case Success(body: str, status_code: int)
case Redirect(location: str, permanent: bool)
case ClientError(message: str, code: int)
case ServerError(message: str, code: int)
def categorize(response: HttpResponse) -> str:
match response:
case Success(body, status_code):
return f"ok: {body}"
case Redirect(loc, permanent):
return "moved" if permanent else "found"
case ClientError(msg, code):
return f"error {code}: {msg}"
case ServerError(msg, code):
return f"server error {code}: {msg}"As mentioned before, I believe access to .NET APIs and other PascalCase libraries should be Pythonic looking. So, there is name mangling of symbols to PascalCase for lookup:
from system import Console # Note lowercase namespace
def main():
Console.write_line("Hello World!") # Note the snake_case
print("Hello World!") # You can also just do this,
# don't worryThe compiler preserves original CLR names through the discovery pipeline, so interop just works: you write snake_case, the generated C# uses the correct PascalCase name, and the .NET runtime sees what it expects.
For cases (har-har) where you don't want name mangling to occur, you can use backticks to block this and let the compiler treat the symbol name as you wrote it:
from `System.Collections.Generic` import HashSet
def main():
h = HashSet()Leading underscores on type members and methods lead to default access levels being applied. _foobar defaults to C# protected, and __foobar defaults to C# private. You can override this by using the associated access modifier "decorator"/attribute:
class Foobar:
_something_protected: int
__something_private: str
@public
__something_public_because_of_decorator: bool
@private
_something_private_because_of_decorator: float
# Exception: dunders are public by default
def __init__(self):
passDunder methods exist in Sharpy, but they are not real methods. Instead, they are treated by the compiler as an instruction to generate another method(s) to fit in the .NET ecosystem. Some are obvious like, __init__ is a constructor, whose body becomes the constructor's body, and __str__ becomes public string ToString().
Others are not as obvious like operators which create static operators (because that's how they work in .NET's runtime), __enter__ and __exit__ for context managers map to a compiler-generated C# IDisposable implementation, etc. Some are flat out not supported like __pow__ because ** is not an operator nor is it an overloadable method in .NET.
This was tough to reconcile, but I think I landed on something that is acceptable without being too jarring for Python developers.
Sharpy has a built-in @test decorator that maps to xUnit under the hood. You write tests that look like pytest, and the compiler emits [Fact], [Theory], [InlineData], and xUnit lifecycle plumbing:
@test
def addition_works():
assert 1 + 1 == 2
@test.parametrize([(1, 2, 3), (4, 5, 9)])
def addition_parametrize(a: int, b: int, expected: int):
assert a + b == expected
@test.skip("not implemented yet")
def todo_test():
passThere's also @test.fixture for shared setup/teardown and @test.collection for grouping.
The standard library has 31 modules. Some highlights:
numpy: NdArray[T] with broadcasting, slicing, linalg, FFT, and random (backed by Math.NET Numerics)
sqlite3: Connection, Cursor, Row with parameterized queries
requests: Python-compatible HTTP API
json: typed deserialization with json.loads[T](), custom encoders/decoders
re, os, itertools, functools, collections: the usual suspects
15 of these modules are themselves written in Sharpy (.spy files compiled to .dll).
There's a bunch of stuff in here, it's a bit much to write about exhaustively. Some quick hits:
Late-bound defaults (PEP 671): def f(x, y => len(x))
@lru_cache / @cache: compiler-innate functools memoization
Source generators: user-defined compile-time code generation
Inline out declarations: out name: type for .NET interop
Incremental compilation: content-hash caching with transitive dependency tracking
I hope you'll play with it and look at the file-based integration test fixtures for working examples. There's also a language server + VS Code extension (not submitted to the marketplace yet, but you can load it locally) with syntax highlighting, doc/type on-hover tooltips, inline argument names, rename support, go-to-definition, and semantic token highlighting. There are probably bugs in the highlighting and stuff, but it works enough to make me happy.
Honestly, if it wasn't for Claude, this project would've taken me at least 3 years, optimistically. I didn't use AI in the beginning; I hand-wrote a chunk of the standard library, tried to write the parser with ANTLR, and so on, but I got impatient and ran into tougher parts of the compiler that discouraged me. So almost a year later, I leaned into AI-accelerated development with some guardrails: a hand-written language specification, three axioms that govern almost every design decision (modulo my personal preference), and a growing suite of file-based integration test fixtures and property tests.
I think of my role as the "orchestrator", deciding what the language should be, writing the spec, reviewing the output, and steering corrections. Yeah, I didn't learn the nitty gritty of writing a compiler or language server, but it left me room to think about higher-level language design: do these features make sense, do they compose well, do they feel right? I know not everyone in the compiler/programming language space is happy with this direction, but I feel a lot more empowered to implement ideas this way.
The implement-eval/test loop is much faster, and you can validate ideas quickly. At the same time, without oversight, AI can take a language feature in a different direction or implement something narrowly. It's very difficult with the velocity and volume of code generation to keep up as a solo human reviewer. The spec and axioms help, but I'll be honest, there's a degree of blind faith that AI-generated tests aren't hiding poor decisions in the actual implementation. I guess I'll find out when I actually use it for my Unity game.
Unity plugin: hooking the Sharpy compiler into the Unity build flow, which was the whole point of this project
Rounding out the stdlib: filling gaps in existing modules, potentially adding more
Actually making the game lol
Hope this has been educational, happy to answer any questions!
r/VibeCodedLanguages • u/kindredseer • Aug 03 '26
r/VibeCodedLanguages • u/kindredseer • 23d ago
r/VibeCodedLanguages • u/antonation • May 23 '26
Hey everyone, I'm u/antonation, the founding mod for r/VibeCodedLanguages.
This is a home for all things related to developing programming languages and compilers using AI.
What to Post
Post anything that you think the community would find interesting, helpful, or inspiring. It could your progress, your workflow (MCPs, testing frameworks, etc.), or questions if you're looking to get started.
Community Vibe
This is a friendly, constructive, and inclusive space. I believe AI is here to stay and welcome AI-driven development (which is of course, why you're here).
How to Get Started
Introduce yourself in the comments below.
Post something today, anything you're working on, challenges you run into, etc.
If you know someone who would love this community, invite them to join.
Interested in helping out? I'll be looking for additional mods at some point, so feel free to reach out to me if you're interested.
Thanks for joining and I hope we can all learn from each other.
r/VibeCodedLanguages • u/VermicelliSmooth1183 • Sep 09 '26
I’ve been working on the next stage of Nyx’s compiler architecture after v5.
Nyx already has a canonical Typed HIR and multiple output targets, but I don’t want every backend to slowly become its own slightly different interpretation of the language. The current work introduces a lower-level MIR between Typed HIR and the backends:
Nyx source
↓
AST
↓
Canonical Typed HIR
↓
Verified MIR
↓
Target legalization
↓
C++ / LLVM / Wasm / Rust / JavaScript / Python / C17This is being developed with heavy agent assistance, so I’m deliberately separating implemented and tested work from architectural plans.
What is currently implemented:
M0 — Canonical contracts: the language surface, diagnostics, backend capabilities, standard-library availability and semantic policies are recorded in machine-readable contracts.
M1 — MIR foundation: a serializable and verifiable CFG-based MIR with functions, locals, basic blocks, places, operands and explicit terminators.
M2 — Scalar and control-flow lowering: variables, calls, branches, loops, break, continue, strict evaluation order, wrapping 64-bit arithmetic and division traps.
M3 — Semantic control flow: lexical defer cleanup chains, Result propagation with ?, guards, ranges, match lowering and try/catch/throw edges.
M4 — Values, memory and ABI: arrays, structs, payload enums, projected places, copy/move operands, use-after-move and double-drop checks, explicit x64/wasm32 layouts, calling-convention classification and checked C adapter contracts.
Bundle ABI v1 remains unchanged while a possible ABI v2 is only documented as a draft.
The completed milestones have focused regression suites, including execution through a reference MIR interpreter and selected C++/LLVM oracle comparisons.
What is not finished:
MIR is still experimental and is not yet Nyx’s default compilation route.
The existing Typed HIR backends remain the production path and parity oracle.
M5 backend migration is in progress. C++ is the first MIR consumer; LLVM, Wasm, Rust, JavaScript, Python and C17 still need to be migrated one at a time.
A backend must eventually publish exactly which MIR operations, types, effects, runtime calls and ABI forms it accepts.
Unsupported operations must produce stable diagnostics before reaching an emitter. There must be no silent or approximate fallback.
The ownership analysis is currently a conservative MIR validation model, not a claim that Nyx has a Rust-equivalent borrow checker.
C17 and direct LLVM emission remain experimental.
Cross-platform CI, artifact-level ABI fixtures and full differential parity are still required before MIR can replace the existing path.
The detailed architecture document explains the representation boundaries, layout model, ABI plan, legalization rules, migration order and later language-surface work:
https://github.com/justsomeone-e/nyx/blob/main/docs/internals/NYX_DEEP_COMPILER_ARCHITECTURE.md
I’d especially appreciate feedback on three questions:
Is the Typed HIR → MIR boundary placed at the right semantic level?
Should legalization transform target-independent MIR into a second target-specific MIR, or is a strict legality pass before emission sufficient?
Which ABI/layout fixtures would you consider mandatory before trusting native and Wasm aggregate interoperability?
I’m interested in criticism of the actual contracts and failure modes, not just the number of planned backends.
r/VibeCodedLanguages • u/kindredseer • Oct 09 '26
r/VibeCodedLanguages • u/PacsfuryTemp • Aug 01 '26
r/VibeCodedLanguages • u/miku_claus • Sep 29 '26
Hey everyone!
I wanted to share an ongoing language design project I’ve been building: VBX (Visual Basic X).
Instead of a one-shot prototype or another interpreted toy running inside Python, the goal was to build a real, production-capable procedural language that compiles to standalone native binaries with zero runtime dependencies.
Compiler Host (Go) -> Target (C99):
The compiler itself is written in pure Go without external packages, leveraging the standard library for AST construction, multi-pass type inference, and process orchestration.
Emits clean, standard C99 code and invokes the system toolchain (GCC/Clang) with -O2 optimizations.
Solving the Runtime Memory Problem (Ring-Buffer Pool):
Naive transpilation of string operations inside tight loops (s = s & "x") typically floods malloc without high-level deallocation.
We implemented a fixed static ring-buffer memory pool (vbx_alloc_str with 256 rotating slots of 4KB) directly in the emitted C runtime. Tested under 10,000 continuous iterations with zero heap leaks and flat memory usage.
Language Syntax & Semantics:
Visual Basic-inspired syntax: Dim, Const, If/ElseIf/Else, For/Next, While/Wend, Do/Loop, Select Case (supporting both string and numeric comparisons natively via chained branches), Sub, Function, and 1D fixed arrays.
Built-in primitives: Native OS dialogs (MsgBox, InputBox), standard File I/O, and string manipulation routines.
Testing & Tooling:
42 integration and unit test suites running via go test ./....
Complete multi-editor support repository: official VS Code extension (available on Visual Studio Marketplace), plus packages for Sublime Text, JetBrains, Vim/Neovim, Notepad++, Emacs, and Micro.
Currently designing Phase 2: a dedicated desktop IDE with a visual form designer (vbx-studio).
Repository: https://github.com/M5Devs/vbx Editors: https://github.com/M5Devs/vbx-editors
Would love to discuss the language design trade-offs, transpiler architecture, and experiences building full-scale compilers using modern agentic workflows!
r/VibeCodedLanguages • u/kindredseer • Oct 16 '26
r/VibeCodedLanguages • u/kindredseer • Aug 17 '26
r/VibeCodedLanguages • u/kindredseer • Aug 20 '26
r/VibeCodedLanguages • u/kindredseer • Aug 23 '26
r/VibeCodedLanguages • u/kindredseer • Aug 11 '26
r/VibeCodedLanguages • u/dyanos • 3d ago
Hi! Someone suggested I share this here. Tessera is an experimental, tensor-first language for numerical computing and data analysis. It compiles to native code through LLVM, and it was built by me together with AI coding agents.
GitHub: https://github.com/dyanos/csec-
(The repo name csec- and the compiler binary csec++ are historical names; the language is Tessera.)
Me, by hand (late 2024 to early 2026): the language concept and design, the first lexer and parser, the AST, LLVM IR generation, constructors, C++ name mangling, external functions, and the early LaTeX-style math syntax.
OpenAI Codex: the native runtime, tensor and simulation features, native library interop, templates, and the first self-hosting bootstrap.
Claude (Claude Code): the ownership and move checker, async/await, Erlang-style microthreads, most of the standard library, support for LLVM 18 through 23, Parquet/CSV data frames, and import aliases. About 110 of the ~200 commits are co-authored with Claude.
Tests are the real spec. The agents are very productive but will confidently break things. I keep positive and negative fixture suites, ownership suites, and concurrency and stdlib tests, and the same suites run through two compilers: the C++ one and a self-hosted one.
Self-hosting is a great lie detector. A second compiler written in Tessera has to compile itself and reproduce the same output (a fixed point). A codegen bug the agent "fixed" often shows up only one stage later, and the fixed-point check catches it.
My job changed. I went from writing code to deciding semantics, reviewing diffs, and designing verification. Design decisions such as strict-by-default ownership and tensors as a core type stayed with me. The agents were best at the large, well-specified implementation work.
Agents make the same subtle mistakes repeatedly. Examples are an LLVM API that changed behavior silently between versions, and build tools that didn't notice changed header files. Writing these down as project notes for the agent helped a lot.
// Tensors are a core type, with the shape in the type
def affine(x: Tensor<Double, 1, 3>,
w: Tensor<Double, 3, 2>,
b: Tensor<Double, 1, 2>): Tensor<Double, 1, 2> {
return (x @ w) + b;
}
// Strict-by-default ownership: explicit move `<-` and borrow `&`
val acct: Account = new Account(100);
peek(&acct); // borrow, acct still usable
close(<- acct); // move
// using acct now -> compile error: "use of moved value 'acct'"
// Erlang-style microthreads
import std.microthread
def main(): Int {
val parent = self();
val worker = spawn([=]() -> {
val n = receive();
send(parent, n * 2);
return 0;
});
send(worker, 21);
return receive(); // 42
}Other features: arbitrary-precision Nat, built-in Complex/Rational/Quaternion, a symbolic algebra module, async/await, OS threads with channels, pipes, shared memory, and [@DllImport] for calling native libraries. A parallel wc -l written in Tessera runs at about 92% of a hand-written C++ mmap+SIMD version.
It's experimental. Right now I'm working on performance, starting with std.dataframe. The tensor codegen is still the first, straightforward version: shapes are read at runtime instead of being used at compile time, there's no loop fusion, and some temporaries aren't freed yet. Fixing that is next.
How do you verify AI-written compiler code? Do you use self-hosting, differential testing, or something else?
Where do you keep design authority, and where do you let the agent decide?
Thanks for reading!
r/VibeCodedLanguages • u/VermicelliSmooth1183 • Sep 21 '26
r/VibeCodedLanguages • u/ViolentSciolist • Aug 16 '26
r/VibeCodedLanguages • u/kindredseer • Oct 12 '26
r/VibeCodedLanguages • u/VermicelliSmooth1183 • Sep 29 '26
r/VibeCodedLanguages • u/Pattinathar • Aug 17 '26
The idea: I wanted a language where you can trust a function just by reading its first line. So the signature says what effects it uses (a function without "uses net" can't touch the network), whether it can fail (ignoring that doesn't compile), and any promises it makes about its result.
Those promises get checked by the Z3 theorem prover before the program runs. If your code breaks one, it tells you the exact input that breaks it: error[E700] promise cannot be kept: 'discount' ensures result >= 0 proven without running the program: price = 5 gives result = -5
The part I'm most pleased with is the float handling. It proves in real IEEE-754 rather than pretending floats are perfect decimals, so it refuses to certify x + 0.1 + 0.1 == x + 0.2 and hands you the exact number where it breaks. A lot of tools would just "prove" that and be wrong.
Playground, runs in your browser, nothing to install:
https://gowrishankar-infra.github.io/velaris-lang/playground.html
Repo: https://github.com/gowrishankar-infra/velaris-lang
Built with a lot of AI help over 40+ releases. It's got a REPL, editor support, a standard library written in itself, CI, and one-file downloads for Windows/Mac/Linux. Happy to answer anything. Thank you
r/VibeCodedLanguages • u/VermicelliSmooth1183 • Sep 04 '26
Hey everyone,
First off, huge thanks to everyone who checked out the repo, left comments(No one did ngl), and starred the project(2 Stars still thanks!) 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.
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.
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.
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.
Web / DOM Bindings Exploration: Exploring minimal, zero-overhead DOM and WebGL/WebGPU hooks directly from the language.
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!