r/Compilers • • 3d 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

2

u/AustinVelonaut 3d ago

The choice of keywords seems to be different for different's sake. When designing a new programming language, you only have a small budget for "weirdness", and it is best to use that for key new ideas.

What is the purpose of the Pulse statement? It appears to be an infinite timed loop that triggers every 0.016 seconds? Why that magic constant?

1

u/Moogly2021 2d ago

Could have focused on a new BASIC dialect to be fair

2

u/Fragrant-Cancel-1650 3d ago

For a new language, I’d prioritize error messages, debugging, modules and a small standard library before adding lots of syntax. Those will probably matter more once people start building real scripts

1

u/Hopeful-Ad-1665 3d ago

check github for new updates

-1

u/investigatormaker 3d 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 3d 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 2d 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.

0

u/Hopeful-Ad-1665 3d ago

I am so much happy to see all of your comments and helping me and foxvc to grow I will definitely look after it for any problems you all were facing