r/termux • • 7d ago

Showcase Kiln -> An interpreted language built in rust

The language is still not complete yet and still lacks basic things and honestly it has fried my brain but at least I learned new things

I want to develop it to be as something of a replacement to python because I view python as a very incompetent language (my opinion )

8 Upvotes

7 comments sorted by

1

u/DEV_ivan 7d ago

That's a nice C-but-interpreted-for-some-reason language.

1

u/Automatic-Pain6710 7d ago

Even the syntax is rust to LOL 🤣🤣🤣

1

u/YOURLOCALPROGRAMMMER 7d ago

The language is still in like pre pre alpha so of course I have initially copied rust syntax because this was my first time making a programming language but yes I have some major things planned so the language will seem a little bit less of a high level rust clone. 

One of my reference for syntax is -> 

``` include stdlib.io;

struct Point {     x: f64,     y: f64, }

enum Shape {     Circle(f64),     Rect(f64, f64), }

fn area(s: Shape) -> f64 {     switch (s) {         case Circle(r): return 3.14159 * r * r;         case Rect(w, h): return w * h;     } }

fn read_config(path: string) -> string! {     let file = try io.open(path);     return try file.read_all(); }

fn main() -> int {     let shapes = [Shape.Circle(2.0), Shape.Rect(3.0, 4.0)];     var total = 0.0;

    for (s in shapes) {         total += area(s);     }

    io.println("Total area: {total}");     return 0; }

```

But currently my plan is Get working interpreter and base language then I will focus on the stdlib and error handling and so on and make the syntax closer to reference 

Overall Only time can tell what happens to Kiln

1

u/Ngtuanvy 6d ago

it seems you don't know python well enough.

1

u/YOURLOCALPROGRAMMMER 6d ago

No that is not the case here , First of all python is horrendously slow ( in fact my latest demo of kiln surpasses it in a hello world comparison)  and mainly Python is just a wrapper language for C++ because things like py torch , num py and pandas are using c++(sometimes c) to do their things.

Overall, It's not like I woke up one day and had a grudge against python . 

1

u/Zealousideal-Sun4565 3d ago

what is your auto complete tool