home.social

#arkscript — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #arkscript, aggregated by home.social.

  1. I'm conflicted about how I should implement UTF8 support for strings in my language, #ArkScript

    There seem to be two options:
    1. Every string is UTF8, thus every access to a char is O(n) and not O(1) anymore (have to decode the codepoints to count them). Length is O(n) too. That pretty much pessimizes all strings, even ASCII ones, but makes working with UTF8 codepoints easier
    2. Every string is just a series of bytes, as it is right now, and a (@ string index) returns a potentially invalid character (on 8 bits). Indexing and length are O(1), but we need a function to get the codepoints, like (string:codepoints str) or (string:graphemes str) or something else
    3. third hidden option that I want to avoid and that doesn't really count: introduce another string type that's different from normal strings. That's bad because the C++ API will be impacted, and the internals will need to handle all the different string types

    At first, I thought option 1 was better because then everything is easy, since the language is high-level. But now I lean toward option 2 because UTF8 support won't hinder the performance of programs that don't need it, and doing such a thing should be intentional

    #pldev

  2. I’m officially working part time so that I can have more time for myself to work on #ArkScript (and also rest, go on small adventures…)

    And this month I’ll finally publish the next (hopefully last) major of ArkScript, on which I’ve been working for about 3 years now!
    arkscript-lang.dev

    I’m looking for sponsors so that I can keep working on the project and deliver high quality code (github.com/sponsors/SuperFola)

    #pldev #langdev #cpp #BuildInPublic #opensource

  3. 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 arkscript-lang.dev/blog/)

    #lisp #clojure #commonlisp #scheme #pldev #langdev

  4. On another note, I’ve added instruction source location tracking to #ArkScript!

    Meaning, we can (finally) have runtime errors that point to the line which threw the error. As well as go up the call tree and display it with the line of each call as well!

    However I’m still dueling with #msvc that loves generating weird errors at runtime (and my favorite OS, Windows, using back slashes in path instead of forward slashes…)

    #pldev #compiler #cplusplus

  5. ArkScript December 2024 update is here!

    lexp.lt/posts/arkscript_update

    Quite a long read because there was a lot of changes. I’m now thinking I should maybe do a 2024 article wrap?
    Or people can just read lexp.lt/categories/arkscript/ if they want to see everything 🤔

    #compiler #cpp #cpluscplus #opensource #pldev #ArkScript