Rendered at 21:29:00 GMT+0000 (Coordinated Universal Time) with Cloudflare Workers.
dima-quant 2 days ago [-]
Nice language with many built in features! Do you gain much in comparison to languages, where these concepts are implemented as frameworks? Not clear, how the memory management is implemented? Is it manual?
sia_xi 14 hours ago [-]
I tried to keep the ideas conceptual for and not bring too many frameworky features to the language itself but rather a the standard library.
However, there are features that I intentionally brought it to the language:
- DI and IoC features:
this language is not made for writing hello world programms, rather some microservices and the code suppose to have abstraction layer and impl layer that connected via DI
- Different Function Types: the reason for having differnet function types is rather memory management, basically give Compiler more information; therefore, at the compile time we know how to manage the memory, It also brings some limitations (for example, a mapper function is not allowed to make any mutation or actions calls)
- Memory management: it's still not perfect as the compiler is still not in the fully self-hosted stage and currently it complies to C99 then to binary, but the idea is to avoid GC while not making hard-to-learn syntax (e.g. Rust borrowing)
see more at : https://code-by-sia.github.io/xi/memory/
Panzerschrek 1 days ago [-]
A whole programming language in 3 weeks? Is it LLM-generated?
sia_xi 14 hours ago [-]
I used LLM for the documentaiton, I had this project going on an off for a while (5+ years), first version was in C then when I managed to make first usable compiler, I flattened the history and re-write (mostly replace all) the code into xi - however mostly if/else and loop blocks; therfore, I had it as a self-host compiler (a compiler that written in its own language) - I used AI along the way for refactoring and documentation, but the core idea and most work is done by me.
However, there are features that I intentionally brought it to the language:
- DI and IoC features:
this language is not made for writing hello world programms, rather some microservices and the code suppose to have abstraction layer and impl layer that connected via DI
- Event
I wanted to have a similar concept as (signals) as part of language - It's worth mentioning that the transport layer has a default implementation but it can be changed (https://code-by-sia.github.io/xi/events?_highlight=events#ap...)
- Different Function Types: the reason for having differnet function types is rather memory management, basically give Compiler more information; therefore, at the compile time we know how to manage the memory, It also brings some limitations (for example, a mapper function is not allowed to make any mutation or actions calls)
- Memory management: it's still not perfect as the compiler is still not in the fully self-hosted stage and currently it complies to C99 then to binary, but the idea is to avoid GC while not making hard-to-learn syntax (e.g. Rust borrowing) see more at : https://code-by-sia.github.io/xi/memory/