r/Compilers • • 45m ago

System Architecture & Subsystem Pipelines for a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Memory Manager & End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager

Thumbnail gallery
0 Upvotes

Title:

End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager

Description:

Here is an exhaustive, granular breakdown of the architectural pipeline mapped out in the subsystem flowcharts for OCHR-X, detailing how abstract symbolic reduction bridges directly down to physical memory allocation and native executable emission[span_0](start_span)[span_0](end_span)[span_1](start_span)[span_1](end_span)[span_2](start_span)[span_2](end_span):

1. Lambda Symbols & Intermediate Representation (IR) Pipeline (lambda_symbols_IR_new)

* Execution Entry & Initialization: The runtime environment boots via `Start proc()`, systematically resolving target offsets and initializing the core event handler (`event handler()`)[span_3](start_span)[span_3](end_span). Argument vectors are ingested and split into value handles (`argv[val]_a_handle`) and character passes (`argv[char]-pass`) for precise parsing[span_4](start_span)[span_4](end_span).

* Symbolic Management & Import: The Intermediate Representation Generation Management unit (IRGM) acts as the central coordinator, interfacing directly with a dedicated `symb importer` and the `lambda IR symbols library` to pull raw tokens into the pipeline[span_5](start_span)[span_5](end_span).

* Evaluation & Error Correction Loop: The parsed structures are passed into the `Symbolic IR generator` and routed directly to GIREVL (the IR Evaluator)[span_6](start_span)[span_6](end_span). The evaluation block continuously validates structural integrity via an explicit conditional check (`if GIR is correct?`)[span_7](start_span)[span_7](end_span). Valid states immediately trigger code generation (`generate IR`), while non-conforming states are safely funneled into IRGERC (Intermediate Representation Generation Error Corrector) to resolve symbolic divergence before re-evaluation[span_8](start_span)[span_8](end_span).

2. Memory Allocator & FFI Pipeline (memory_allocator_manager)

* Program Entry & Header Binding: Execution begins by ingesting command-line arguments and binding compiler functions directly from header references (`pass args to compiler and call functions from in r.h (header)`), feeding straight into the primary compiler driver[span_9](start_span)[span_9](end_span).

* Monotonic Arena Memory Management (PMA): Rather than leaning on standard dynamic heap allocation, the architecture routes memory requests through a specialized PMA / arena memory allocator & mgmt module[span_10](start_span)[span_10](end_span). This coordinates zero-overhead bump pointer allocations and phase resets (`std::pmr::monotonic_buffer_resource`-style dynamics) to eliminate garbage collection latency[span_11](start_span)[span_11](end_span)[span_12](start_span)[span_12](end_span)[span_13](start_span)[span_13](end_span).

* Foreign Function Interface (FFI) & IMACA Evaluation: Foreign function interfaces are transpiled via `FFI (transpiler) via gtms p` and evaluated under IMACA (Intermediate Memory & Scope/Den Evaluation Architecture), generating low-level intermediate representations across control flow graphs, abstract syntax trees, static single assignment (SSIR), or directed acyclic graphs (DAGs) before passing to the library manager (`librmanger`)[span_14](start_span)[span_14](end_span)[span_15](start_span)[span_15](end_span).

* Linker, Emission & Leak Verification: The compiled modules are routed through the system `linker`, generating native object files (`.obj` or `.o`) and assembling a fully realized `executable`[span_16](start_span)[span_16](end_span). Before final output emission, automated validation checks run to confirm memory integrity and detect leaks (`check for memory leaks`)[span_17](start_span)[span_17](end_span).

Thought I’d share the complete structural blueprint for anyone working on custom compiler backends, explicit term-graph substitution engines, or bare-metal runtime architectures. Happy to discuss the interaction between the GIREVL evaluation loops and the memory manager if anyone is exploring similar low-level optimizations!


r/Compilers • • 10h ago

Building a compiler from scratch for a programming language I've been designing

3 Upvotes

Hello guys!

I've been designing a new programming language from scratch for the last six months.

It all started with a lifelong desire: **"If C had this..."**

Over time, the specifications evolved considerably and are now mostly finalized, sufficiently mature to move into compiler implementation.

Alongside language design, I've also been developing the compiler from scratch in C.

It's a hand-built compiler. The lexer, error system, and main parser logic are implemented and working. I'm now working through the compiler subsystems one by one.

It's a long journey, but an interesting one!

I'd love to connect with people interested in programming language design, compiler development, and systems programming.

Here is a small snippet of my language.

I'm currently writing small, medium, and large sample programs to test the language design — to test where the langauge design breaks and where it shines, and where improvements are needed.

Over the coming months, I intend to write hundreds of sample programs, designing them from scratch according to the language's rules.

The goal is to put the language through real programming scenarios before moving further with compiler development.

.module tfunc_demo

string char[100] Name

tfunc Name(char[] ptr name open-pass) // generic pointer which can be passed on

strcopy(obj, name) => _

endtfunc

static Name myName("Ghufran Ustad") alias-readonly open-pass

func start;

    ss.con.print("Name: ", myName)

endfunc


r/Compilers • • 13h ago

Mystique - An x86 Metamorphic Compiler

Thumbnail phrack.org
3 Upvotes

r/Compilers • • 13h ago

Building a compiler from scratch for a programming language I've been designing

0 Upvotes

Hello guys!

I've been designing a new programming language from scratch for the last six months.

It all started with a lifelong desire: **"If C had this..."**

Over time, the specifications evolved considerably and are now mostly finalized, sufficiently mature to move into compiler implementation.

Alongside language design, I've also been developing the compiler from scratch in C.

It's a hand-built compiler. The lexer, error system, and main parser logic are implemented and working. I'm now working through the compiler subsystems one by one.

It's a long journey, but an interesting one!

I'd love to connect with people interested in programming language design, compiler development, and systems programming.

Here is a small snippet of my language.

I'm currently writing small, medium, and large sample programs to test the language design — to test where the langauge design breaks and where it shines, and where improvements are needed.

Over the coming months, I intend to write hundreds of sample programs, designing them from scratch according to the language's rules.

The goal is to put the language through real programming scenarios before moving further with compiler development.

.module tfunc_demo

string char[100] Name

tfunc Name(char[] ptr name open-pass) // generic pointer which can be passed on

strcopy(obj, name) => _

endtfunc

static Name myName("Ghufran Ustad") alias-readonly open-pass

func start;

ss.con.print("Name: ", myName)

endfunc


r/Compilers • • 14h ago

[Hiring] GPU Compiler Engineer – Intel Graphics Compiler (LLVM), Santa Clara, CA (hybrid)

29 Upvotes

Hi r/Compilers,

My team at Intel is hiring a full-time **GPU Compiler Engineer** in Santa Clara, CA (hybrid: part on site, part remote). We build the LLVM-based compilers behind Intel GPUs, used for AI, HPC and data-center workloads.

**What you'd work on**

- Compilers for OpenCL, OpenMP, C for Metal and SYCL / Data Parallel C++

- New compiler features, and code generation and optimization for Intel GPU architectures

- Finding and fixing performance bottlenecks, together with the hardware and architecture teams

- Tooling and automation (Python/shell, CMake, GitHub, Jira) on Linux and Windows

**Minimum qualifications**

- A Master's in CS, CE, EE or a related field plus 3 years of experience, **or** a PhD (completed or expected by May 2028)

- Strong C/C++

- Compiler development: optimizations, front-end translation and back-end code generation

- Computer and graphics architecture

**Nice to have**

- LLVM experience (a big plus)

- GPGPU programming models

**How to apply**

Email **hou-jen.ko@intel.com** with your resume attached as a PDF. Please use exactly this subject line so your application doesn't get missed:

`[GPU Compiler Engineer] Your Name`

A few lines on the compiler work you're proudest of (projects, papers, upstream LLVM patches) are very welcome.

Thanks!


r/Compilers • • 19h ago

Performance of a formally-verified C compiler vs. gcc -O2

Thumbnail ut-infraai.github.io
16 Upvotes

r/Compilers • • 19h ago

Automatic Checking of Compiler Correctness with E-Graphs

Thumbnail stng.substack.com
19 Upvotes

r/Compilers • • 23h ago

Together Compiler: Continual Compilation for AI Inference

Thumbnail arxiv.org
0 Upvotes

r/Compilers • • 23h ago

Last year we built megakernels. This year we deleted them: The road to Together Compiler

Thumbnail together.ai
0 Upvotes

r/Compilers • • 23h ago

System Architecture & Subsystem Pipelines for a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Memory Manager & End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager

1 Upvotes

Title:

End-to-End Architectural Blueprints: Subsystem Topology of a Zero-Abstraction Lambda Calculus Transpiler & Monotonic Arena Manager

Description:

Here is an exhaustive, granular breakdown of the architectural pipeline mapped out in the subsystem flowcharts for OCHR-X, detailing how abstract symbolic reduction bridges directly down to physical memory allocation and native executable emission[span_0](start_span)[span_0](end_span)[span_1](start_span)[span_1](end_span)[span_2](start_span)[span_2](end_span):

1. Lambda Symbols & Intermediate Representation (IR) Pipeline (lambda_symbols_IR_new)

* Execution Entry & Initialization: The runtime environment boots via `Start proc()`, systematically resolving target offsets and initializing the core event handler (`event handler()`)[span_3](start_span)[span_3](end_span). Argument vectors are ingested and split into value handles (`argv[val]_a_handle`) and character passes (`argv[char]-pass`) for precise parsing[span_4](start_span)[span_4](end_span).

* Symbolic Management & Import: The Intermediate Representation Generation Management unit (IRGM) acts as the central coordinator, interfacing directly with a dedicated `symb importer` and the `lambda IR symbols library` to pull raw tokens into the pipeline[span_5](start_span)[span_5](end_span).

* Evaluation & Error Correction Loop: The parsed structures are passed into the `Symbolic IR generator` and routed directly to GIREVL (the IR Evaluator)[span_6](start_span)[span_6](end_span). The evaluation block continuously validates structural integrity via an explicit conditional check (`if GIR is correct?`)[span_7](start_span)[span_7](end_span). Valid states immediately trigger code generation (`generate IR`), while non-conforming states are safely funneled into IRGERC (Intermediate Representation Generation Error Corrector) to resolve symbolic divergence before re-evaluation[span_8](start_span)[span_8](end_span).

2. Memory Allocator & FFI Pipeline (memory_allocator_manager)

* Program Entry & Header Binding: Execution begins by ingesting command-line arguments and binding compiler functions directly from header references (`pass args to compiler and call functions from in r.h (header)`), feeding straight into the primary compiler driver[span_9](start_span)[span_9](end_span).

* Monotonic Arena Memory Management (PMA): Rather than leaning on standard dynamic heap allocation, the architecture routes memory requests through a specialized PMA / arena memory allocator & mgmt module[span_10](start_span)[span_10](end_span). This coordinates zero-overhead bump pointer allocations and phase resets (`std::pmr::monotonic_buffer_resource`-style dynamics) to eliminate garbage collection latency[span_11](start_span)[span_11](end_span)[span_12](start_span)[span_12](end_span)[span_13](start_span)[span_13](end_span).

* Foreign Function Interface (FFI) & IMACA Evaluation: Foreign function interfaces are transpiled via `FFI (transpiler) via gtms p` and evaluated under IMACA (Intermediate Memory & Scope/Den Evaluation Architecture), generating low-level intermediate representations across control flow graphs, abstract syntax trees, static single assignment (SSIR), or directed acyclic graphs (DAGs) before passing to the library manager (`librmanger`)[span_14](start_span)[span_14](end_span)[span_15](start_span)[span_15](end_span).

* Linker, Emission & Leak Verification: The compiled modules are routed through the system `linker`, generating native object files (`.obj` or `.o`) and assembling a fully realized `executable`[span_16](start_span)[span_16](end_span). Before final output emission, automated validation checks run to confirm memory integrity and detect leaks (`check for memory leaks`)[span_17](start_span)[span_17](end_span).

Thought I’d share the complete structural blueprint for anyone working on custom compiler backends, explicit term-graph substitution engines, or bare-metal runtime architectures. Happy to discuss the interaction between the GIREVL evaluation loops and the memory manager if anyone is exploring similar low-level optimizations!


r/Compilers • • 1d ago

sdinthrough: a programming challenge about implementing a tokenizer, parser, and AST transformations

6 Upvotes

Hi r/compilers!

Over the past year, as a hobby project, I've built a programming challenge around sdin, my own JSON-like configuration language. You implement a tokenizer, a parser, and then a series of AST manipulations and transformations, guided by 600+ test cases that you pass one at a time. It's long; I expect it to take weeks to solve without AI.

The feedback loop is tight: the judge runs locally (go run github.com/ypsu/sdinthrough@latest yoursolution) and re-evaluates your solution every time you save. Solutions can be in any language that reads stdin and writes stdout.

On the language side, I aimed for a simple AST while keeping the language pleasant to edit by hand: it has comments, unquoted keys, multiline/raw strings, bare tokens for enums (without the Norway problem), protobuf-style repeated fields for lists, dotted-notation structs for keeping nesting shallow, etc. The AST preserves comments and formatting, so it's easy to write tools that manipulate sdin files without mangling them. It also supports forms, function-like expressions that mix structs and lists, which make it simple to express complex concepts without complicating the AST.

Implementing my own config language is something I always wanted to do, and the programming challenge format made me pour a bit more effort into it. :) I'm curious to hear people's thoughts on the tradeoffs I made between features and implementation simplicity. Did I end up with something too complex to implement?


r/Compilers • • 1d ago

Safescript: compiling a Turing-incomplete functional language to static data-flow and complexity graphs

0 Upvotes

Whole-program taint analysis and complexity inference get ugly fast in general-purpose languages. The moment you allow unbounded loops, general recursion, dynamic property keys, and computed host strings, exact data-flow edges become undecidable and you end up falling back to runtime sandboxes or conservative approximations full of false positives.

Safescript (MIT) takes the opposite trade: drop Turing-completeness so the compiler can compute exact capability, taint, and complexity signatures before a single operation runs.

Top-level declarations have no evaluation order and resolve to a flat call graph where cycles are rejected at parse time. Iteration is restricted to map, filter, and reduce over finite arrays, with no closures mutating outer bindings and no dynamic host dispatch. HTML and UI tag expressions (<Card>, <Table>, fragments, attribute spreads) desugar in the parser straight into static View AST objects ({ tag, attrs, on, children }), so UI trees go through the exact same pass as backend handlers.

Three static passes fall out cleanly from that restriction:

  1. Field-level taint projection (ValueShape): Instead of tracking flat boolean taint per variable, object and array expressions carry structured per-field label shapes (db:customers.company vs db:customers.email). Field access (c.email), pick(), merge(), if/else joins, and higher-order map/filter/reduce preserve per-column provenance, collapsing to a wildcard (db:customers.*) only when an unprojected row or dynamic index crosses an op boundary:

     pingSlack = () => {
       rows = dbQuery("customers").items
       emails = map((c) => c.email, rows).join(", ")
       return httpRequest({
         url: "https://hooks.slack.com/services/T00/B00",
         method: "POST",
         body: emails
       })
     }

    Even when hooks.slack.com is an allowed host on the program and db:customers.company -> hooks.slack.com is permitted, the signature emits host:hooks.slack.com <- {db:customers.email} and rejects the program at compile time.

  2. Symbolic polynomial complexity bounds: Every expression carries a symbolic size and step polynomial over input dimensions (ComplexityExpr). Mapping an O(1) body over a query result infers O(n); nesting a second map over the same input multiplies the symbolic polynomials to O(n^2), letting a host reject super-linear or high-degree programs (maxComplexityDegree) statically without runtime gas metering.
  3. Client/server graph cut: Operations declare static effect manifests (readSecret, dbTransact, httpRequest). Taint from server-only ops partitions the call graph into server RPC nodes and client view nodes automatically, proving at compile time that no secret label (secret:STRIPE_KEY) ever reaches the client bundle or return sink.

The compiler (lexer -> parser -> signature -> TS/JS/Python transpilers) is ~10k lines of functional TypeScript (zod is the only runtime dependency) with zero Node builtins so mod.ts bundles straight into browsers and edge Workers.

Repo (MIT): https://github.com/uriva/safescript Docs & language spec: https://safescript.cc


r/Compilers • • 1d ago

Scoping a first native backend for Blyx, an experimental language implemented in Rust

0 Upvotes

I'm Rahul, the creator of Blyx, an experimental language implemented in Rust. I'd welcome compiler-engineering feedback on a deliberately small first native-backend milestone.

Current state: the README documents a tree-walking interpreter with integers, booleans, strings, bindings/assignment, direct function calls, bounded recursion, conditionals, loops, and printing. check currently parses syntax only; build validates syntax but does not emit an executable. The repository has a BIR/SSA-oriented architecture, but there is not yet a complete native pipeline.

Issue #10 asks for a focused RFC covering the backend boundary, first host target, initial BIR constructs to lower, unsupported-construct diagnostics, end-to-end fixtures, and reproducible artifact validation.

A possible starting scope to critique—not an implemented feature or settled decision—is one host target and an integer/boolean subset with arithmetic, comparisons, branches, and direct calls. Strings, concurrency, tensor/GPU work, and AI primitives could remain outside that first milestone.

The questions I'd like help with are:

  1. What semantic/type-checking and IR invariants would you require before starting code generation, given the current syntax-only check command?
  2. For that scope, how would you weigh emitting C against an LLVM or Cranelift backend? I'm interested in the maintenance and correctness trade-offs more than peak performance.
  3. Which tests would you insist on before calling the milestone usable? Comparing interpreter and compiled results seems useful, but I don't want shared bugs to become the only correctness oracle.

If this interests you, design notes, focused test cases, and small PRs are welcome. Please discuss substantial changes in the issue first. The project is MIT / Apache-2.0; the contribution guide has the process.

Disclosure: development is AI-assisted, and AI helped prepare this post. The aim here is independent scrutiny of the implementation and a realistic next milestone.


r/Compilers • • 1d ago

Update: Fixed warp32 emulation and unbounded while loops. Looking for AMD hardware to test.

1 Upvotes

A few days ago I posted about UniversalGPU, my open-source CUDA-to-x86/PTX/GCN compiler. The top comment asked: "Does --warp-size=64 preserve two separate 32-lane groups for shfl.sync, or change their semantics?"

I fixed it. The --warp-size=64 path now wraps every shfl.sync in an scf.if that only executes if the source lane is in the same 32-lane half. Here is the generated MLIR:

%lane_2 = arith.remsi %tx, %c32 : index

%half_3 = arith.divsi %tx, %c32 : index

%src_half_4 = arith.divsi %iv, %c32 : index

%same_half_5 = arith.cmpi eq, %half_3, %src_half_4 : index

%1 = scf.if %same_half_5 -> (f32) {

%shfl_6 = nvvm.shfl.sync.down %c4294967295, %0, %iv : f32

scf.yield %shfl_6 : f32

} else {

scf.yield %0 : f32

}

I also fixed 5 other compiler bugs from a stress test: modulo operator, compound assignment to memory, unique loop variables, unbounded while loops (now correctly lowered to scf.while with iter_args), and switch case stores.

What I need now: someone with an AMD GPU (MI200, MI300, or RX 7000) to test the warp32 emulation on real hardware. I don't have AMD hardware, and I can't validate the emulation without it. If you have a GPU and 10 minutes, I'd love your help.

Repo: https://github.com/7636-lochan/UniversalGPU


r/Compilers • • 1d ago

PRISM v2: a syntax-only call-graph resolver that picks precision over soundness (97.7% edge precision on 24 projects, 8 languages, checked against compiler tooling)

1 Upvotes

Hey, I wanted to share an algorithm I built for cheap call-graph approximation. It's called PRISM (Polyglot Resolution via Inverted Symbol Map), and it's the call-graph resolver in libeulix, a Rust library that parses C, C++, Go, Java, JavaScript, PHP, Python, Rust and TypeScript with Tree-sitter. v2 trades soundness for precision, and I'd like this sub's take on that.

Why precision

  • Most call graphs aim to be sound: include every edge that could happen, accept the false positives. That's right for compilers and verification.
  • PRISM is used by people navigating multi-million-LOC codebases, and by LLMs. Eulix (the parent repo) uses the graph to pick which code goes into a coding agent's context. A false edge wastes context, and the model treats it as a real relationship. A missed edge is cheaper, since the agent usually finds that code another way (text search, symbol lookup, a follow-up query).
  • So v2 only emits an edge it can justify. If it can't work out a receiver's type, it emits nothing. v1 guessed by unique method name.

How it resolves (no type checker, no build)

  • Locals shadow imports, imports shadow globals. A call to the caller's own parameter never binds to a global of the same name.
  • Method calls resolve from the receiver. In Go and Java the type comes from the declaration (field, parameter, var x T, new T()).
  • Calls through an interface or base class link to the project's implementations (CHA-style).
  • Unknown receiver, no edge.

Results

24 pinned open-source projects, three per language, compared against each language's own tooling: go/types (gin, chi, cobra), javac (gson, jsoup, commons-cli), jedi (flask, click, requests), rust-analyzer LSIF (ripgrep, serde_json, fd), the TypeScript checker (class-validator, class-transformer, immer, plus axios, markdown-it and mocha with allowJs), and libclang (cJSON, zlib, Lua, tinyxml2, pugixml, yaml-cpp). Numbers are pooled per language.

Languagev2 precisionv2 recallv1 precision
Go100.0%72.6%67.5%
TypeScript100.0%82.7%93.7%
C99.8%84.9%99.8%
Java99.7%94.2%62.3%
Python99.5%79.5%68.7%
Rust99.1%38.3%39.5%
JavaScript92.7%66.9%95.4%
C++75.3%56.1%64.6%

Overall: 17,784 of 18,199 v2 edges are correct (97.7%), vs 64.9% for v1. Pooled recall is 69.8%.

Weak spots

  • C++: yaml-cpp alone gives 288 of the 415 wrong edges (66.1% precision) from overload confusion. The other 23 projects are at 90+%.
  • Recall drops wherever a receiver's type must be inferred. Rust finds 38% of calls because let x = foo(); has no annotation. Go on chi is 57% (locals assigned from calls). class-transformer is 39%, where v1 got 87% by guessing.
  • JavaScript is the one language where v1 was more precise: some method calls on built-ins get linked to project methods with the same name.

Use of AI

I used AI, but only in the recent commits. I didn't know how to code with AI before, and as a fresher, not learning it felt like a mistake since it's here to stay whether we like it or not. It helped build the bench harness, fix Go and Java method calls, add a C/C++ ifdef branch checker to pick the right header files, and with smaller things like docs, comments and finding bugs.

Questions

  1. Cheapest way to recover Rust and Go method recall without becoming a type checker? I'm thinking of propagating return types one hop, for locals assigned from a call whose callee declares a return type.
  2. Any prior work treating call-graph construction as precision-first for retrieval/IR?
  3. Problems with the scoring? Methodology, TP/FP/FN definitions and per-call-kind tables: Call-Graph Accuracy

Repo: https://github.com/Nurysso/eulix (Apache-2.0). Harness is in bench/callgraph; make bench-callgraph reproduces the numbers.


r/Compilers • • 1d ago

Rust: Enabling the parallel frontend on nightly

Thumbnail blog.rust-lang.org
4 Upvotes

r/Compilers • • 1d ago

Cross-compiling Haskell: running Template Haskell on the build machine

3 Upvotes

Cross-compiling a Haskell library becomes more complicated when compiling it also means executing Haskell. A small deriveJSON splice can turn an otherwise ordinary cross build into a job that needs a target interpreter, an emulator, or access to a device.

The experiment in template-haskell-cross explores another arrangement: execute Template Haskell with a native compiler on the build machine, then pass its results to the cross compiler. The implementation combines a GHC plugin, a native worker process, a binary protocol, and Nix helpers. It has been used to build a Haskell library with generated FFI exports for an Android application.

This article follows that experiment: why the usual execution model makes cross builds difficult, how the alternative works, what broke along the way, and which parts could inform GHC itself.

https://serokell.io/blog/cross-compiling-haskell-with-template-haskell


r/Compilers • • 2d ago

Fast C++ Compiler Update

7 Upvotes

I shared some initial results for my C++ compiler a couple of weeks ago. I got a number of great questions, mostly around compiler quality. I have since added additional evidence to support quality and speedup claims:

  1. There are now extensive compliance tests for C++11, including the GCC and Clang C+11 compliance suites.
  2. I dramatically expanded the performance testing suite and it shows equivalent or better performance against GCC and Clang across a wide range of code shapes.
  3. I added a WebAssembly backend and put together a demo where you can compile c++ code with cppgm and Clang in the browser to see the speed difference yourself: https://incpption.com
  4. Cppgm can round-trip through LLVM (cppgm compiles LLVM and LLVM compiles cppgm). You can do this yourself in the browser and timing shows better performance at all optimization levels.
  5. I've put together a compile time analysis of the parts that cppgm does faster than Clang and GCC.

I hope this information is useful. Once again, I appreciate any thoughts or questions.


r/Compilers • • 2d ago

Got placed, have 6 months before joining. Should I explore Linux kernel development, GPU programming or stick with AI/ML?

0 Upvotes

I'm a final-year engineering student in India from a non-CS background. I've recently secured an offer at an AI/analytics services company, and I have around 6 months before joining.

I've been exploring different areas of computer science, and I've realized that I'm increasingly interested in low-level programming and understanding how systems work internally.

MY BACKGROUND:

I've independently learned programming, ML/DL and worked on projects involving: computer vision , RAG , agentic AI

However, I dont want to spend my career primarily working with high-level AI frameworks and application development. because when i developed these projects , i didnt feel anything developing it , no satisaction at all

AREAS I'M CONSIDERING:

  1. Linux and Red Hat ecosystem:
  2. 2. GPU Programming:
  3. 3. Systems Programming
  4. 4. AI Infrastructure:

I find the idea of understanding what happens beneath the abstractions much more interesting than simply using existing libraries.

WHAT I'M CONFUSED ABOUT:

I have six months before joining my company, and I don't want to waste that time jumping between technologies.

I'd appreciate advice from people working in systems engineering, Linux, kernel development, GPU programming or related fields.

  1. Is low-level systems programming a good career direction in 2026?
  2. Between Linux kernel development, GPU programming and general systems programming, which would be a better starting point?
  3. Is CUDA/GPU programming a niche with good long-term opportunities, particularly with the growth of AI?
  4. What fundamentals should I master before attempting serious projects? C, C++, OS, computer architecture, networking, compilers?
  5. Would contributing to the Linux kernel or other open-source systems projects actually help me get shortlisted?

r/Compilers • • 2d ago

Transpiler for simplified C++

7 Upvotes

Since a few years I am thinking about the creation of a "simpler" and more lightweight version of C++, which just gets rid of a few "annoyances" such as:

  • header files
  • declaration before usage
  • template syntax

So the idea is to have a 99% syntax identical version of c++, which just allows to use definitions which are defined after in the same file/compilation unit, having module-import instead of header files etc.

My questions are:

  1. is this is generally frowned upon? Does someone else find such a thing useful? Just stick with C++ basically, no need for a new language, but a small "transpiler-layer" which gets rid of some not-so-nice things in a language, which I am mostly totally fine with!
  2. I believe this is much smaller in scope and complexity than writing a compiler from scratch - or am I overlooking a few traps and rabbitholes which I might fall into? Underestimating the effort still :) ?

Thank you!


r/Compilers • • 2d ago

Pooka language update: a testing library, a lexer generator, and a small Lisp lexer

2 Upvotes

A small update on Pooka, my statically typed language for the BEAM, with a compiler written in Gleam.

Recently I’ve been working on the tools around the language. Two libraries are now released:

  • Poke is a testing library with assertions, property tests, regression tests, and snapshots. Snapshot changes go through a terminal reviewer where you can inspect the diff and accept, reject, or skip them. Pooka handles test discovery and reporting; Poke supplies the checks.
  • Lexie generates typed Pooka lexers from TOML specifications. It supports configurable token rules, source spans, and syntax highlighting. The generated lexer needs only the standard library.

I wrote a walkthrough building a small Lisp lexer with Lexie, including punctuation-heavy symbols, comments, strings, and tests for source positions. The Lisp has acquired parentheses. Their meaning remains somebody else’s problem.

Building libraries in Pooka has also been a useful way to find compiler bugs. Small compiler tests can pass quite happily while a real library finds the cupboard you forgot to finish.

Next I’m continuing with libraries, editor support, and bugs discovered through using the language.

Website · Compiler source · Cookbook

I’d be interested to hear how others here test their compilers against larger programs. Do you maintain a separate collection of real projects, or keep those cases in the compiler’s own test suite?


r/Compilers • • 2d ago

Built a low-level systems programming language from scratch to crush concurrency bottlenecks—benchmarks inside.

Post image
0 Upvotes

r/Compilers • • 2d ago

We rewrote the Solidity compiler in Zig because our builds took 12 minutes. Then we ended up writing a Lean model of the language too

Thumbnail github.com
5 Upvotes

Our contracts took 709 seconds to build with solc. We tried tuning the build for a while, gave up, and wrote our own compiler.

oksolc is a reimplementation of solc 0.8.36 in Zig. Around 156K lines, no C++. It only does the optimized via-IR pipeline through Standard JSON, because that's what we ship with. For Foundry you just point FOUNDRY_SOLC at it.

The frontend is still sequential. The Yul optimizer and EVM codegen run per contract in a thread pool, which works because contracts barely depend on each other after the frontend.

The bigger win for day to day work is the persistent session. Each source file gets a semantic fingerprint, so editing a comment or reformatting doesn't invalidate anything. Import cycles are handled as SCCs and invalidate together. Artifacts are cached per phase in SQLite with HMAC-SHA256 on the entries, so a tampered cache can't hand you bytecode. oksolc serve --stdio keeps the whole thing warm between builds.

solc vs oksolc with 4 jobs:

Uniswap V4, full build: 59.0s vs 11.2s (5.3x) Pendle V2, incremental: 38.9s vs 1.4s (27.6x) Chainwall, full build: 709.8s vs 138.4s (5.1x)

The benchmark script is in the oksolc repo (test/benchmarks/external-compare.sh) if you want to rerun them.

The thing I didn't expect going in is how much time we'd spend on what Solidity actually means. There's no formal spec. The language is whatever solc does. We run a weekly fuzz job that diffs our bytecode against solc on a public corpus, and CI builds OpenZeppelin, Uniswap v4, Pendle and Solady and pins the hashes. When the two compilers disagree, the diff shows you they differ but there's nothing that says which one is correct. We ended up with 9 places where we do something different from solc on purpose, and every one of those was an argument from the docs and from what the feature is obviously meant to do.

For most languages that's annoying. For this one it's worse, since the output can't be patched after deployment and often holds a lot of money. A compiler bug stays on chain. And fuzzing only covers the programs the fuzzer happened to generate, so at some point you want proofs, and you can't prove anything against a language with no definition.

So we started writing the definition. Solidity Spec is an executable formal model of Solidity in Lean. You can run real programs through it and compare with compiler output, and you can state properties about the semantics and get them machine checked. There's a paper, and machine-checked proofs for explicitly defined parts of the model. Coverage is still growing.

The long term goal is checking a compiler's output against a definition of the language, the way CompCert did for C and CakeML did for ML, instead of against another compiler.

If your Solidity builds are slow, try it. And if you work on semantics or verified compilers, I'd really like to know where the Lean model is wrong.

oksolc: https://github.com/okcontract/oksolc Solidity Spec: https://github.com/okcontract/solidity-spec

Give us a follow for more updates: x.com/okcontract


r/Compilers • • 2d ago

FOXVC : Now completely update with v1.0.0 and engine version 0.6.0 alpha done .

Thumbnail github.com
0 Upvotes

visit and help this language grow this is will be genuinely a good language to contribute I am working day and night on it . But being a solo dev it's getting hard for me to make it better and good . I need You all guys .

Anay Upadhyay - solo dev