also I wrote a few functions in proto-Kittyscript, a very basic language targeting the interpreter VM directly, ran them as part of Kotlin unit tests and already found and fixed a few bugs in the interpreter.
#LangDev #PLDev
I started working on a small programming language that compiles to Lua so that I can work on a Play date game.
I didn’t have to start from scratch! I had written quite a bit las year when working on Kona. #PLdev
What kind of tools do you expect to have when working with dictionaries?
So far, I have:
- filter (predicate on key value)
- map (predicate on key value, update only the value)
- size (number of keys)
- keys (all the keys of a dict as a list)
- update (merge two dicts, the 2nd taking over the 1st)
- copy (create a separate instance of a dict)
- forEach (iterate on key values without updating the dict)
been mulling this over all day and i think i might add a few more loop constructs to my IR
like the conventional wisdom in #PLDev is that you don't need any loop construct other than while: everything else can just be constructed as syntactic sugar over a while loop
and like, yeah, that's *technically* true, but the following aren't actually semantically equivalent:
while x
for x = 0, count, 1
repeat x
Apparently this needs to be said? Bismuth VM is written in C, not C#. The reason there's .net stuff in the path of the hex editor I took a screenshot of is because the *compiler* is written in C#, because I don't hate myself nearly enough to be doing a whole bunch of string manipulation in C
I’m starting to realize #ArkScript does not have hashmaps and that is bad, because I need them often when scripting…
Probably something like
(let map (hashmap "key" value …))
(@ map "key")
(@= map "key" value)
Would work? (Reusing @ and @= from lists seems like a good call?)
I’ll see if I can make a POC in the next few days
I’ve started writing an article on #ArkScript blog, to show how it differs from other Lisp (since ArkScript is just Lisp inspired, not aiming to be a complete lisp replacement/variant)
So far I’ve talked about scoping, namespacing, declaring variables and functions, touched quoting and data types.
What is an important point for you when looking at lisp like languages?
(Btw here is the blog https://arkscript-lang.dev/blog/)
New Bismuth VM blog post, detailing the life cycle of a hello world program for Bismuth from high level Bronze code to text-based IR, transpiled C, binary IR, and finally bytecode: https://enikofox.com/posts/hello-world-in-bismuth/
(Quiet) public/unlisted replies to this post will be shown on the blog as comments on the post
This is the third in a series of posts about a virtual machine I’m developing as a hobby project called Bismuth. I’ve talked a lot about Bismuth, mostly on social media, but I don’t think I’ve done a good job at communicating how you go from some code to a program in this VM. In this post I aim to rectify that by walking you through the entire life cycle of a hello world Bismuth program, from the highest level to the lowest.let hello = data_utf8("Hello world!\n");func main() i32 { // system call 0x10 is the PrintStr system call sys(0x10, hello, 0, sizeof(hello)); return 0;}This code will be converted to the VM’s intermediate representation, which can then be transpiled to C, or compiled to a binary version of the IR, which the VM ingests and turns into bytecode and runs.
and now that handle pinning and all pointer load/store operations are implemented in my VM i can use it to speed up my VM's blit routine
this is Bronze code, which is converted to my VM's intermediate representation, which is then transpiled to C so i can integrate it into my VM :3
and with that the core of my VM is finally done! \o/