Blog

Pico-Term, is now officially better than vim (Update 1)

Pico-Term got its first major update! Lots of new features (I swear this is interesting)
23 May, 2024

Pico-Term, the best terminal based text editor

I released Pico-Term yesterday, a new text editor. Kinda like vim, only better!
18 February, 2024

Kang2 version FINAL VERSION 1.3 out!

The next (and probably last) version of Kang2 is out! Some new features and a lot of bug fixes!
31 January, 2024

Kang2 version 1.2 out!

The second version is finally done! This version is a lot more stable and has a lot more features! (and a vsc extension!)
14 January, 2024

Kang2 version 1.1 out!

My Programming Language Kang2 is getting an update! Lots of fun stuff and really big shifts in the language
04 January, 2024

Lumina-Engine: An early look

Lumina Engine is finally presentable! Though there is still a lot missing
1 December, 2023

AchoMatico-Launcher finished!

Yesterday, I finally finished AchoMatico-Launcher, this explains, the process of ending this ~1.5 year journey
17 November, 2023
𝕏

Kang2's FINAL version, 1.3

Kang2 is now just about done. Almost every feature I set out to add is now done and should (hopefully) work.

So what did I add?

1. Primitive types

There have been complex types before, with structs but not primitive ones, like string and number. BUT NOW there are

String split

For this, there is a built in library, which has all the functions. Speaking of which, Number two:

2. Standard library

Currently it's very small and doesn't have a lot, because I didn't feel like adding all these features only for me. PLUS they can be added very easily. The most "complete" one is array, just because I used it a bunch of times for the brainfck compiler.

Array
Array

So basically when you call some function from this library, it just calls one of these functions and passes the value of the variable as self. This, of course, happens automatically. In the last picture, you can actually see the next thing, which is:

Advanced loops

Before, the only way to do loops was just this:

Old loop

This is very simple, yes, BUT as soon as you want to actually know the current index, you'd have to do lots of gymnastics

Old loop

This gets annoying quick, so now we finally have advanced loops, which look like this:

Advanced loop

It basically compresses the old way of looping into one line, just like in Java or C. The three fields can be manipulated however you want. The first is just what gets called before the loop starts, the middle is an expression for some condition (could be a function call too) and the last is what gets called after each loop iteration. Very nice indeed

Active Reference

Active reference is the last and my favorite feature. One thing I really dislike about all these modern language is the lack of a way to explicitly set references.

In JavaScript it's just set a variable to another and it references it, but you HAVE to know that yourself. So somebody maybe wouldn't know that they reference each other. Also if you DON'T know about it, you may end up creating references where you actually didn't want to and suddenly two variables that should be different just became the same. If you want to copy, you HAVE to copy.

In Python there's just straight up no way of doing that, apart from either a function that returns the variable or a class that stores the variable, both of which being pretty weird to use. I've read up on how python handles memory and as SOON AS you mutate a variable, that another variable "references" (with an Object for example), the "reference" stays the same, while the actual variabe points to a new field now. This is why Yo-Masta-Nag has the "Container" class, which is just there to store something as a reference. It's highly unintuitive to use and I wish they'd just add an explicit reference.

Dart has the same problem, you will have to create a wrapper class to reference primitives. Again just dumb

Fun fact: Because I didn't find anything about references in Python, I asked the nice and friendly community of Stack Overflow, if they had an answer. The nice and friendly community of Stack Overflow gave me basically no answer BUT they directed me in a nice and friendly way of their site and of the "Ask question" button entirely.

In C# there IS a way, but to this day I haven't figured out how to use it. I'm talking about the ref keyword. Every time I tried it, it just resulted in some long hieroglyphical error

The only languages where you can actually do that are those low-level languages like C and Rust. Rust has it's borrowing and ownership model, which ACTUALLY allows real references, while C is just barebones manual memory managment with pointers.

So, what if a language had a way to reference things explicitly? Introducing active reference!

Active reference

Reference any variable only using & and unreference using @. This makes all the problems mentioned above pretty much obsolete. Active references was a feature I always planned to add, since the beginning, which is now almost 2 years ago.

The end

So what now? I guess I'm finished with Kang2. There are probably still a plethora of bugs and whatever. I could continue and add another thousand things, but I feel like this is enough. The language has been in the back of my mind for the past two years and now I can finally move on to my backlog of unfinished projects. Kang2 has been one of, if not my favorite Project I've done. I'm very proud of it and It's has definitely something of a brag factor. Even though, there is a version 1.0, I really feel like only NOW has it become a full and fleshed out language. So I guess it's time to say

Thank you for reading and goodbye Kang2!