Modu banner

Modu

18 devlogs
31h 21m 52s

Updated Project: Modu is a simple and fast interpreted programming language. It has been rewritten from scratch to fix major issues in the parser, while also introducing new features like way better error messages

This project uses AI

gh copilot for debugging and inline completions

Loading README...

Cyteon

Implemented the http package again, along with the json package. You can already see advantages of the new parser, with the long chained expressions as seen in the bottom of the screenshot. Also implemented objects/json again, and made the functions a little better. Like instead of json.stringify(obj) its obj.to_string()

Attachment
0
Cyteon

Implemented:

  • File imports
  • Internal packages (uuid, time, os, encoding and partially math)
  • AST: modules, property accesses and improving calls, so you can do stuff like abc.abc() or abc()(), etc
Attachment
0
Cyteon

Implemented:

  • Infinite loops and for n = x..y loops, with break statements
  • If statements, now supporting an else branch
Attachment
0
Cyteon

Implemented blocks, functions and returns. And made return error if its outside an block. Blocks will also be used for loops and if-statements

Attachment
0
Cyteon

Reimplemented math with the new parser

Attachment
0
Cyteon

Implemented more types and an functions system. Also added one internal function for print

Attachment
0
Cyteon

Because the parser for modu is kinda shit, i have begun the rewrite. Currently it can parse “let x = 1;” or any other int or identifier. But i also added really fancy error messages.

Attachment
1

Comments

Local Estradiol Dealer Gizzy

absolute modu

Cyteon

Shipped this project!

This ship is for modu v1.1.0 - v1.3.0.
Contains a lot of improvements, bug fixes and some new packages

Cyteon

So i was originally just gonna implement some package improvements, but i found so much wrong in the language. I ended up:

  • Add examples for all math functions, and add all to docs
  • Add UUIDv7 to UUID package
  • Add some missing things to the vscode syntax highlighting
  • Properly implement arrays in the AST, instead of an cursed package someone made an PR for a while ago
  • Added MD5 to cryptography package
  • Deprecated time.now and added time.now_unix, time.now_utc, time.now_local, time.to_rfc_2822 and time.to_utc_date_time
  • Fixed context not being passed to basically every function in the math package, which was essentially bricking it
  • Removed the “line” property from a lot of AST elements that didnt need it
  • Made the lexer include string data, int data, float data and bool data, instead of me doing lexer.slice()… everywhere
  • Fixed an bug on the docs where the sidebar was scuffed
Attachment
0
Cyteon

Implemented encoding and cryptography,

Encoding:

  • Base64
  • Base16

Cryptography:

  • SHA2-256
  • SHA2-512
  • BLAKE3
  • Bcrypt
  • Argon2
  • Scrypt
Attachment
0
Cyteon

Implemented for loops, and infinite loops, along with break to stop infinite loops and to prematurely exit for loops.

Infinite loops are as easy as

loop {
    print("kaboom");
}

And for loops are as easy as

for n = 1...5 {
    print(n);
}
Attachment
0
Cyteon

Shipped this project!

Hours: 7.85
Cookies: 🍪 189
Multiplier: 24.04 cookies/hr

Updated to modu 1.0.0
Primarily added an http client, and way better ffi support.
Also did a bunch of bugfixing and standardizing some stuff

Cyteon

Just did a bunch of bug fixes and some QoL stuff (support numbers like 1_000_000, make syntax highlighting support \n \t etc, etc). Released Modu v1.0.0!!!

Attachment
1

Comments

Cyteon

Overhauled FFI to be way better

  • Cleaner support in modu
  • Supports strings, integers, floats, ints and null arguments (only strings before)
  • Supports string, integers, floats, ints and null returns (only strings before)

Old:

import "ffi" as ffi;

ffi.call(path, "hello_world");
print(ffi.call(path, "one"));
print(ffi.call(path, "add", 5, 2));
print(ffi.call(path, "string"));
ffi.call(path, "print", "test");

New:

import "ffi" as ffi;
let lib = ffi.load(path);

lib.hello_world();
print(lib.one());
print(lib.add(2, 5));
print(lib.string());
lib.print("test");
Attachment
1

Comments

Local Estradiol Dealer Gizzy

figma balls

Cyteon
  • Fixed some bugs in importing files
  • Fixed packages not being able to import files from the package itself
  • Made “modu run” work without an file argument, and will run main.modu if it exists
Attachment
0
Cyteon
  • Added post requests to http client, and wrote docs for it
  • Fixed some minor parsing bugs, breaking some function nesting stuff
  • Standardized all examples and docs to use semicolons
  • Added new and better testing
Attachment
0
Cyteon

Add an built-in basic http client, i will add more functions to it soon

Attachment
0
Cyteon

Did some cleanup on the website, and did some minor design changes

Attachment
0
Cyteon

Set up a new instance of modu packages, and fixed the cli to use the new api.
Also cleaned up a lot of my wack code.
Released version v0.6.2

Attachment
0
Cyteon

I have decided to revive this old ass project! Started by fixing a couple of bugs, updating packages, and releasing that as v0.6.1

Attachment
1

Comments

tathya is aweomse

MODUUUUUUUUUUUUU YESS CYTEON I NEED THIS THANK YOUUUUUU