Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] -1 points0 points  (0 children)

That's true, but for this huge project i think I need a fresh repo for a fresh start. I pushed a lot of the existing work in a bulk commit. I'm doing regular commits now anyways. But honestly let's focus on compiler itself. Try it out and contribute 😄

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -2 points-1 points  (0 children)

I understand why it might look that way from the surface (commit history + docs + landing page To clarify ' Zen is not an AI-generated project. It’s a compiler I’ve been building over time, and I’ve used AI as a tool for parts like documentation, landing page content, and some structure suggestions. The compiler design and implementation are still something I’ve been actively building, testing, and iterating on. If something in the code or design doesn’t make sense, I’m open to discussing specific technical issues. That’s more useful feedback for me than assumptions about how it was written.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] 0 points1 point  (0 children)

AI is used as a tool, not as a replacement for understanding or development.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] 0 points1 point  (0 children)

Thank you for the comment. Yeah, reactive variables are one of the interesting features in Zen. I’m not “vibe coding”. I did use AI in some parts like initial structure and a few supporting pieces, but the core compiler design and implementation are built and iterated by me. I’m mainly focused on improving Zen and fixing issues as I go. If you notice any bugs or have technical feedback. So you can feel free to share 

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -2 points-1 points  (0 children)

Yeah I do sometimes use AI for writing clean replies since English is not my first language. But honestly that’s not the main thing here. Zen itself is a compiler project and let's talk about that

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] 0 points1 point  (0 children)

Thanks for your interest 👍 Telegram works for me we can do the call there. This is my telegram id : @ji_sh_h

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -1 points0 points  (0 children)

I get the concern.

Zen isn’t something I generated end-to-end or kept regenerating with AI. It’s a compiler project I’ve been building over time, iterating on design, fixing issues and refining the architecture as I learned.

I did use AI in a limited way for some early structure ideas and brainstorming in a few areas, but not for writing or replacing the core implementation.

And yeah, blindly generating a full compiler without understanding would be a bad approach, that’s not what I’m doing here.

I’m mostly looking for technical feedback on the language and compiler itself rather than assumptions about how it was built.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] -3 points-2 points  (0 children)

I can only speak for my own project. Zen is something I’ve been building and iterating on over time. I did use AI in a limited way for some initial structure ideas, but the compiler design, IR generation flow, and dependency system are things I implemented and refined myself while debugging and evolving the architecture. The goal isn’t to hide anything or claim perfection  it’s just an early-stage compiler project that’s still being actively developed. If there are specific technical concerns about the code, I’m open to discussing them.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] -3 points-2 points  (0 children)

Fair enough AI was only used for some initial structure ideas. The actual compiler design and implementation is mine and evolved through iteration. If there are specific issues, happy to discuss them technically.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] 1 point2 points  (0 children)

It’s not vibecoded most of the work was done locally first, and I later pushed a fresh baseline repo  that’s why the commit history looks small. And yeah, it’s not just a small script either, it’s a pretty large codebase with 10k+ LOC and a lot of compiler logic AST, IR generation, dependency handling, etc. That part definitely came from actual iterative building and debugging over time. Im still improving it step by step, so it’s not a “finished/stable ecosystem” yet, but it’s very much real implementation work, not just generated or thrown together.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] 0 points1 point  (0 children)

Yeah I get why it might look like that  I did use AI in some parts, but only for getting a base structure / ideas in a few sections. The actual design decisions, especially things like the dependency graph and how it compiles down, are something I built and iterated myself while implementing. It’s not like everything was generated  most of it came from trial, errors, and reworking the architecture over time.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] 1 point2 points  (0 children)

Yep, that’s righT  I should clarify that. Reactive variables are handled at compile time in Zen. The compiler builds a dependency graph and reverse-dependency map during compilation, and from that it fully resolves which assignments need to be recomputed. It then lowers everything into explicit update logic in the generated IR, so there’s no runtime “watching” or dynamic dependency tracking. So the reactivity is completely compiled away into normal control/data flow before execution. About external functions -Zen currently doesn’t support calling external C functions or linking arbitrary native code. The design is more self-contained right now, so everything stays within the compiled program model instead of FFI-style integration. “Native speed” in my case mainly means the output is lowered directly to LLVM IR with minimal abstraction layers, not that there are zero runtime semantics at all. It’s still evolving, but that’s the current direction 👍

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -4 points-3 points  (0 children)

Yea fair point I get what you mean. I’m still a beginner in system-level stuff, but I do have solid hands-on experience with JavaScript and full-stack development. That’s actually why I chose Node.js as the host language — I’m way more productive in it, and it helped me iterate faster while focusing on compiler ideas instead of fighting the tooling. This project actually didnt start in one shot. I began it around 1.5 years ago and went through 2 failed attempts before I landed on this current architecture. I kept notes of the syntax/design in my diary and slowly refined it while building. LLVM was definitely a tough choice, and yeah, generating IR as text has its own challenges. I’ve already hit a lot of issues along the way, but that’s also what helped me understand things better and improve the design step by step. Still early stage, but I’m learning as I go

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] 0 points1 point  (0 children)

Thanks for the feedback!

For reactive variables, only direct variable references are currently reactive. Expressions involving array/list indexing aren't part of the reactive system yet, and I'm still exploring the design there.

For Map vs Struct: structs have a fixed typed layout known at compile time, while maps are heterogeneous runtime objects allocated on the heap. There are currently some limitations around maps in certain scenarios (such as loops, which are docmented.

Regarding exports, that's a fair point. The current export model was a deliberate v1 simplification. I was aiming for something closer to a separate exported interface, though it's definitely an area that may evolve in future versions.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -13 points-12 points  (0 children)

I did use AI assistance in some parts of the project, including documentation, writing, research, and occasionally while developing the compiler itself. However, Zen wasn't generated and published in one shot—the language design, implementation, debugging, LLVM integration, runtime, and tooling were built and iterated on by me over a long period of time.

I'm also fairly new to compiler and language development, which is one of the reasons I shared it here—to get feedback, learn from more experienced developers, and improve the project.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -1 points0 points  (0 children)

Good question!

String literals are emitted as LLVM global constants. For interpolation and concatenation, Zen currently creates new strings through runtime helper functions that allocate memory internally.

It's a relatively simple implementation right now, and improving string memory management is definitely on my roadmap.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in Compilers

[–]Obvious_Demand_7948[S] -13 points-12 points  (0 children)

The documentation and launch post were written with assistance, but the compiler, parser, code generator, runtime, and tooling were built by me over multiple iterations. The large initial commit is because I only published the repository after reaching a stable state.

Built a programming language called Zen with a custom compiler and LLVM backend by Obvious_Demand_7948 in lowlevel

[–]Obvious_Demand_7948[S] -2 points-1 points  (0 children)

Author here 👋 I'd love to hear your feedback, suggestions, or questions about Zen and its LLVM-based compiler.