#My programming language: Oxid

3 messages · Page 1 of 1 (latest)

lofty oracle
#

For the last 2 months I've been writing a new programming language. I would really love to get some feedback from others to see what you guys think of it. I know the codebase is messy right now and I'm working on tidying up the error handler rn so any advice on ways improve the error handling is greatly appreciated.

Why?
Why yet another interpreted language with rust-like syntax? Before rust I was a TypeScript developer and still is. It's just something about the speed at which I can write programs in ts. I remember I could get a fully fledged proxy server up and running in like 15 minutes in ts with like 20 lines of code. I can't imagine how long that would taken me in rust. I got started learning Rust last summer and this is my first large project I've worked on so this project is a really valuable learning experience for me.

How does it differ from rust?
First of all it's interpreted but like ts it throws errors on parse time instead of runtime. That way if you try to read from a variable that doesn't exist it throws before anything is run unlike js that starts running the program until it crashes. I want it to be designed to be very modular. That means you will be able to use the interpreter in pretty much any environment you choose as you can just write your own std and have your own custom builtin functions. So it could be ran in a web browser just as well as running it as a command line program.

Simple program running the childrens game FizzBuzz

for i in 1..51 {
    let mut out = "";

    if i % 3 == 0 { out += "Fizz"; };
    if i % 5 == 0 { out += "Buzz"; };

    if out == "" { out = i; };

    print(out);
}

out = i should not actually work but there is no to_string method yet so deal with it

https://github.com/ludverse/oxid

GitHub

An interpreted language blending Rust's powerful syntax with high level-like flexibility. - ludverse/oxid

#

My programming language: Oxid

frozen atlas
#

Impressive work. not easy to conceptualize and implement something like that.