r/ProgrammingLanguages 20d ago

Requesting criticism [PussyLang] A minimal scripting language with bytecode VM and AOT C backend! NSFW

Hi everyone,

I've been working on a language called PussyLang (yes, funny). It started small but grew into something I'd like to share and get feedback on.

What it is

Dynamically typed, imperative, C‑like syntax. Compiles to bytecode that runs on a custom Java VM. Also supports ahead‑of‑time compilation to native executables by transpiling the bytecode to C and compiling with gcc.

func factorial(n) {
    if (n <= 1) return 1;
    return n * factorial(n - 1);
}
print factorial(5);

var arr = [10, "hello", true];
arr[1] = "world";
print arr[0];

Expandability and Customization

One thing I'm proud of is how easy it is to extend or modify PussyLang. I built it with the idea that users (or myself) might want to add new native functions, change the syntax, or even replace parts of the compilation pipeline.

  • Adding native functions: In the Java VM, you just implement a class that implements NativeFunction and register it in NativeRegistry.registerAll(). In the C AOT backend, you add a function with a Value signature and an entry in native_table.
  • Changing the bytecode or VM: The compiler, VM, and bytecode format are decoupled. You can add new OpCode values and implement them in both Java and C without breaking existing code.
  • Lexer/parser: The lexer and parser are short. Adding a new keyword or operator is straightforward.

The whole thing is MIT licensed fork it, change it, use it in your own projects.

I made it this way because I wanted a language that could evolve with who uses it. If someone wants to add a for loop or a new built‑in networking protocol, they can do it.

What I'd Like Feedback On

  1. The type system — only number, bool, string, array, bytes, function, null. Is that enough for most scripting tasks?
  2. The C AOT backend — it's a lot of extra code. Worth maintaining? Or just stick with the Java VM?
  3. Any obvious missing features that would make the language more practical without bloating it?

Links

4 Upvotes

24 comments sorted by

View all comments

27

u/Ifeee001 19d ago

Well, definitely won't have issues with gaining publicity

-4

u/Solid_Statement6313 19d ago

Exactly idk why ppl arguee about the name :p

0

u/Inconstant_Moo 🧿 Pipefish 15d ago

Even if you don't understand why, you could notice that this is the case, and act accordingly.