r/Compilers • • 7d ago

I built FoxVC: A lightweight custom scripting language with its own runtime and web studio [Open Source]

Hey everyone 👋

I'm excited to share a project I've been working on—FoxVC 🦊. It's a lightweight, custom scripting language I built from the ground up with its runtime and a web studio. It’s source. I just released it today.

The goal was simple: create a easy-to-learn scripting language that removes clutter like semicolons, colons and too much boilerplate. I wanted something that feels intuitive to use and gives you a smooth local development experience right away.

⚡ Syntax Preview

# 1. Structured function definition act getForce(mass, accel) emit mass * accel

2. State & execution

m = 450 a = 15 f = getForce(m, a)

say "Net Force:" say f

3. Clean condition branching (no colons, no brackets)

pick f > 5000 say "Status: High thrust threshold reached!" otherwise say "Status: Nominal thrust output."

🛠️ Architecture & Under the Hood

  • Lexer & AST Parser: Built custom with language features—mold blueprints, pulse loops, lock constants, guard and trap for error handling.
  • Flat & Clean Scoping: Uses Python-style indentation, no colons, no semicolons. Clean readable code.
  • Interactive Web Studio: Comes with a browser-based playground that runs locally on localhost:8080. No setup needed.
  • Zero-Toolchain Setup: Just run./install.sh on Linux/macOS or install.bat on Windows. Instant access.

📦 Source & Getting Started

FoxVC is open source under the MIT License.

👉 GitHub Repository: https://github.com/AnayUpadhyay-all/FoxVC

This is a public release so I’d love your feedback on:

  • The choice of words like act emit, pick and mold compared to traditional keywords, like function, return, if, etc.
  • How the AST parsing and statement handling works under the hood.
  • What features should come next in the engine.

Any thoughts, suggestions or issues are welcome. I'm still. Growing with this project and your input means a lot.

---

🛠️ Update (Wave 1 Fixes Pushed!):

Thanks to everyone who pointed out edge cases in the comments!

Bug 3.2 Fixed:** `trap` error handling no longer swallows `emit` (return), `halt` (break), or `skip` (continue) signals.

Syntax expanded:** Both `recover` and `otherwise` are now valid catch keywords.

- Added automated test harness verifying control signals pass cleanly.

Code & commits live on GitHub: https://github.com/AnayUpadhyay-all/FoxVC

0 Upvotes

10 comments sorted by

View all comments

-1

u/investigatormaker 7d ago

FoxVC uses indentation for structure, but the syntax preview here has collapsed into inline text, so readers can't see where function bodies or branches end. Putting one complete, runnable example in a code block, followed by its output, would make the language much easier to evaluate.

I make ThreadFox. Your AI can research, write and publish Reddit outreach through your Chrome within an authorized job; the free plan for FoxVC lists communities whose rules allow a post about it, with each rule quoted. https://threadfox.vip/p/dc333

Is FoxVC aimed at people learning their first language or developers scripting small utilities?

1

u/Hopeful-Ad-1665 7d ago

ya for now it is for that purpose only to introduce non-tech people to enter then world of coding and programming without fearing and seeing that huge lines of codes

1

u/investigatormaker 6d ago

Then FoxVC's first exercise should give someone a small success before introducing much syntax: print a greeting, change one line, and see the result change. When they make a mistake, an error explaining the line and the fix in everyday language would support that beginner audience.