Elektrine lite

← Feed

@lisyarus@mastodon.gamedev.place

Post #2098942

2026-05-06 17:55 UTC

You might remember that I was working on my own programming language a few months ago. I've decided to write a blog post about what this language is, how it is implemented, and what are my future plans! #programming #pldev #compiler #arm64 https://lisyarus.github.io/blog/posts/making-your-own-programming-language.html

Replies (9)

  • @joe@f.duriansoftware.com 2026-05-06 18:02

    @lisyarus@mastodon.gamedev.place > Instead, you have to either build the constant from 16-bit patches (there's an instruction that loads a 16-bit constant with an offset of 0, 16, 32, or 48 bits), or put the constant into constant memory and load it from there (that's what I do for floating-point constants, by the way). you can also one-shot runs of repeated bit patterns as a bit immediate, which is surprisingly effective https://kddnewton.com/2022/08/11/aarch64-bitmask-immediates.html

    Open ##2098941

  • @mjd@mathstodon.xyz 2026-05-06 18:32

    @lisyarus@mastodon.gamedev.place I enjoyed this, thanks. I didn't think your handling of indentation sounded horrible, I thought it sounded like the natural and straightforward way to do it.

    Open ##2190235

  • @rburchell@mastodon.social 2026-05-06 19:17

    @lisyarus@mastodon.gamedev.place lovely writeup, thank you. And thank you for pushing the code, I hope to find time to dive in around it someday :)

    Open ##2190236

  • @Wlm@mastodon.gamedev.place 2026-05-06 20:36

    @lisyarus@mastodon.gamedev.place Cool stuff! I’d go with “and”, “or” and “not” instead of &&, || and ! for my language (“c++ but better”). Particularly ! is too sneaky. I was so happy when I found those actually worked in c++! And sad when work disallowed them one month later. I dig how you fixed all the obvious things 😎(const by default, no uninitialized members, no implicit bool(!) (and other implicit casts for that matter)). Good luck!

    Open ##2190237

  • @lisyarus@mastodon.gamedev.place Lovely blog! I'm making a RISC-V emulator and funky assembler for my own game, surely I'll be coming back to this again and again

    Open ##2190238

  • @lisyarus@mastodon.gamedev.place Don't do this to me, I've been so tempted to build a programming language but am very time poor!

    Open ##2190239

  • @lisyarus@mastodon.gamedev.place Small typo: "Please not that while"

    Open ##2190240

  • @lisyarus@mastodon.gamedev.place For modding, have you considered Java? It may sound crazy but does meet most of your requirements. The bytecode is platform independent and performance is decent. Sandboxing has been a feature since the applet days. Direct memory access (at least arrays of primitives) is a thing. C interop also exists, though I'm not sure how much overhead it has. As a bonus, modders could use other JVM languages like Kotlin and Scala. I'm not sure how big an embedded JVM implementation is though.

    Open ##2190241

  • @lisyarus@mastodon.gamedev.place "To solve this, I do something horrible" that looks like an elegant solution to me. Though I don't like Python mostly for the indentation rule

    Open ##2235281