Top Tweets for #starklang
Hey .NET folks, it's a rainy Sunday here so I just released a new .NET library https://t.co/3tlFpUlJnt to parse ANTLR4/g4 files into a lightweight AST useful for codegen scenarios.
I'll use this library for #starklang to generate the data oriented syntax from an ANTLR g4 spec! ๐๏ธ
As I have finished implementing the Lexer for #starklang, I made a small benchmark https://t.co/GVdgjuZHbh to compare it with Roslyn, similar handwritten Lexer, but my version is using data oriented layout + unsafe ๐ฑ. Stark is roughly:
- 2.5x faster ๐๏ธ
- using 35% less memory ๐ค

Finally starting to rewrite from scratch the lexer for #starklang, not much to share about it yet, still a long way to go, but it is leveraging full utf8 even internally, arena virtual mem allocator (Varena!) and a data oriented layout for all the generated tokens/spans/values ๐๏ธ

Hey .NET folks, I just released a new small library https://t.co/DpNJAamBml that provides an arena allocator using virtual memory! ๐๐ค
I will hopefully use it for the next version of the #starklang compiler (fully data oriented!)
Just tried with the latest .NET 7 preview and AOT has improved significantly in terms of size, HelloWorld getting under 1MB, that's pretty cool ๐
Looking forward to use it for the next version of the #starklang compiler!
Congrats to all the folks involved in improving this ๐ค

HelloWorld AOT compile โ time โฑ๏ธ/ size ๐
- .NET 7 AOT โ 5.36s / 3_608_064 bytes
- .NET 7 AOT with bflat โ 2.69s / 2_777_088 bytes
- go 1.8 โ 358ms / 1_892_352 bytes
- rust 1.60 โ 218ms / 256_512 bytes

The min memory granularity of an arena will be 1024 bytes for now. Allocating in an arena is a bump pointer, so one departure from my original idea is that #starklang will not use a GC, which is great, but I will have to challenge the usability of this memory model! Stay tuned!๐ง
I'm starting to have a good draft of the memory model that I will try to implement for #starklang: It is basically quite inspired by Cyclone, Rust and Midori. Heap memory can be allocated in arena. An arena is a special linear typed struct, moveable only/single ownership ๐งต

I was re-reading some papers about the Cyclone programming language experiment and found this nice article https://t.co/i8hqtDp35A about Cyclone's influence on Rust, M#/Midori, Pony...
My recent thoughts on #starklang are largely at the cross intersection of all these languages
Back to my #starklang/melody experiment, in the next iteration I'll probably switch to LLVM for the backend instead of reusing RyuJIT. Reasons:
1) Better codegen
2) Statepoints seem quite stable + x86_64/aarch64 support
3) Alloca with addrspace support
4) Asm inline support
The micro-kernel will provide GC/memory management, and process scheduling/async-await message passing while the rest - drivers/services/apps will be written in #starklang and should challenge capability based object with Software Isolation Process - so no kernel/user transition
Revisiting the prototype of #starklang I did with the microkernel seL4, I thought I couldn't get rid of unsafe, and so I was still relying on HW process isolation, but the beauty of SW process isolation with physical mem access without virtual mem/context switching 1/2
Finally modelling the async process model of #starklang, no more access to threads! Very similar to e.g the actor model in pony-lang, but actually more equivalent to the Midori model, with its async func calls approach instead of msg passing (which in the end is identical)

In case you are wondering: it's Friday, I should be at work instead of loud tweeting about #starklang, right?
Actually, I'm super grateful and proud that our company is giving us a "Connect day" today and we get also this Monday to commemorate Juneteenth. ๐ค
So far in #starklang, I was considering that mutable would only apply to the state of an object.
Now, I'm reconsidering the operator new to have a mutable effect (e.g mutates heap mem), meaning that using it in a function would require the func to be mutable
How does it feel?๐

Thinking of using a different name for an `isolated ref in #starklang that is, a ref to an object for which its sub object graph is closed and no external references are made to its internal objects
The other ref kinds are `unique (single owner) and `shared
Ideally 6 letters ๐ค
I'm completing the capabilities of a ref in #starklang, so far composed of:
- Permission: immutable (default) vs mutable
- Lifetime: region based lifetime (e.g stack, heap, temp and sub-hierarchies)
- Ownership: default is shared, but I'm hoping to fit `unique and `isolated refs
Starting to define how to write a Struct of Array (SOA) in #starklang. The key point is that you want to be able to define this layout on the struct itself - but you could also define it on an existing AOS struct afterwards, e.g Vector3 is AOS, but Vector3[|] would be SOA ๐งต
![xoofx's tweet photo. Starting to define how to write a Struct of Array (SOA) in #starklang. The key point is that you want to be able to define this layout on the struct itself - but you could also define it on an existing AOS struct afterwards, e.g Vector3 is AOS, but Vector3[|] would be SOA ๐งต https://t.co/cV4ovNqUZo](https://pbs.twimg.com/media/FUwR6tgWAAAId2f.png)
1 + 3 << 1 = 7 or 8?
How many times I have been hit this behavior in C/C# and many derivatives...
Not sure what was the original rationale to make bitwise shift <<, >> having a lower precedence than +/- but I'm fixing this in #starklang (as I did in Scriban in the past)
Keywords vs non-keywords in #starklang: managed to get the list down to 26, pretty good! (considering that e.g C# has over 70+)
Keywords are only coming from expressions.
How is it possible? make sure that for any member declaration, you never start with an identifier

Last Seen Hashtags on Sotwe
JennyLetterson
Seen from United States
Unexpected(******************) filter:videos
Seen from Turkey
doggystayel
chacalitos
ูุซูู_ุงุฎุจุงุฑ
Seen from United States
poop
Seen from Thailand
AriellaFerrera
Seen from South Africa
skybri
Seen from Australia
mgai (************)*******+filter:native_video
Itafushi
Seen from United States
Trends for you
Most Popular Users

Elon Musk 
@elonmusk
241.3M followers

Barack Obama 
@barackobama
118.8M followers

Cristiano Ronaldo 
@cristiano
114.5M followers

Donald J. Trump 
@realdonaldtrump
111.9M followers

Narendra Modi 
@narendramodi
107M followers

Rihanna 
@rihanna
98.7M followers

NASA 
@nasa
92.3M followers

Justin Bieber 
@justinbieber
91.8M followers

KATY PERRY 
@katyperry
90M followers

Taylor Swift 
@taylorswift13
84M followers

Lady Gaga 
@ladygaga
75.5M followers

Virat Kohli 
@imvkohli
73.4M followers

Kim Kardashian 
@kimkardashian
70.8M followers

YouTube 
@youtube
68.7M followers

Neymar Jr 
@neymarjr
66.4M followers

Bill Gates 
@billgates
65.2M followers

Selena Gomez 
@selenagomez
63.1M followers

The Ellen Show
@theellenshow
62.2M followers

CNN 
@cnn
61.7M followers

X 
@x
60.7M followers




