Lex Plt :vim: · @lexplt
46 followers · 156 posts · Server hachyderm.io

I'm planning a (massive? maybe) refactor (could even be called a rewrite) of (a scripting language) once the v4 is there.

I'm currently stuck on 17 and willing to go to C++20. There are a lot of things that could get optimized (and many copies could be avoided), I wanted to make something that works first, but never got around to rewriting some pieces and use newer and safer idioms

Oh boy, that's going to take me a few more years :blobfoxthisisfine:

#arkscript #cpp

Last updated 1 year ago

Lex Plt :vim: · @lexplt
44 followers · 108 posts · Server hachyderm.io

Digging this up about a month ago: I somewhat failed (for now) by announcing that I wanted to work on again, and then I didn't
But it worked on , I just started looking at the code again, improving it here and there and posting my progress after, and it feels great!

#arkscript #pataro

Last updated 1 year ago

Lex Plt · @lexplt
20 followers · 20 posts · Server hachyderm.io

I saw a Reddit post asking if it was possible to generate revenue by making your own programming language
If you want to know, in the 4+ years I've been working on I might have earned about 400€ at most
is not profitable and is even less profitable, having a job on the side is a better idea than trying to rely on grants and donations

#arkscript #opensource #pldev

Last updated 1 year ago

Lex Plt · @lexplt
20 followers · 5 posts · Server hachyderm.io

Oh yeah, since I migrated my mastodon account my old posts are lost, so if you don't know what is, here is your explanation:
I've been working on this language for the past 4 (5?) years, with the goal in mind to be portable (compile once, single bytecode file, runs on a VM), easy to use (10 keywords and that's it), easy to embed in your C & C++ programs.
My main goal was to do with it, using it in my 2d video game lib... but I haven't touched this lib for a few years now 😅

#arkscript #gamedev

Last updated 1 year ago

Lex Plt · @lexplt
20 followers · 4 posts · Server hachyderm.io

Yesterday I got to work on the new parser for , polishing its integration into the existing compiler and started to implement the import solver
I'm proud to say that nearly all the parser tests are passing, checking the AST as well as the errors produced, and how they are formatted!
On the right you can see the list of imported packages and their type

#arkscript

Last updated 1 year ago

Lex Plt · @lexplt
19 followers · 169 posts · Server home.social

is everywhere, even on my split

#arkscript #keyboard

Last updated 1 year ago

Lex Plt · @lexplt
19 followers · 164 posts · Server home.social

I have a problem: how do I represent an if macro in , since the syntax changed from

!{foo 5} !{bar (a b) (+ a b)} !{if (= 5 foo) then else}

to

(macro foo 5) (macro bar (a b) (+ a b))

We have
- (macro if (= 5 foo) then else), it looks like we are creating a macro "if"
- (when (= 5 foo) then else), is that clear enough?
- (macro:if ...) a bit long
- (if ...), generic if: how do you know if that's runtime or compile time?

#pldev #arkscript

Last updated 1 year ago

Lex Plt · @lexplt
19 followers · 143 posts · Server home.social

v3.5.0 is now available

The release is mainly focused on bug fixes and enhancements for us maintainers to catch bug quicker

github.com/ArkScript-lang/Ark/

#arkscript #opensource #pldev

Last updated 1 year ago

Lex Plt · @lexplt
19 followers · 140 posts · Server home.social

I might be able to create a new version of this weekend, mostly enhancing the macro processor and chipping at a few bugs.

However, this might be the last update to the v3, as I currently have to support both v3.x and v4 (and thus port bug fixes to both, as well as some non-breaking changes features)

#arkscript

Last updated 1 year ago

Lex Plt · @lexplt
18 followers · 118 posts · Server home.social

Just a few things to add, like parsing \\uXXXXX in strings, going through all the crashes that the fuzzers reported (and fixing them if possible), and we will be able to add this to version 4!
Super excited for this, as this will let me experiment more on the import system, the goal being something like this, with imports being related to the entry file

#arkscript

Last updated 2 years ago

Lex Plt · @lexplt
18 followers · 117 posts · Server home.social

The new parser for is nearly done! It would appear to be at most 2 times slower than the previous one and I'm fine with that (being able to parse 20k deeply nested nodes/second is plenty)

Those metrics are interesting, because you can see that in term of lines parsed/second, the new parser is just 20% slower than the old one ; this was something to expect, as I switched from a basic look ahead parser to parser combinators.

#arkscript #pldev

Last updated 2 years ago

Lex Plt · @lexplt
17 followers · 76 posts · Server home.social

Fun fact: I wrote because of the interpreter/bytecode pattern described in Game Programming Patterns (Bob Nystrom)
I discovered some time later that Crafting Interpreters existed (at the time the clox chapters were at their beginning, but they existed!)

cppcast.com/dart-crafting-inte

#arkscript #cppcast

Last updated 2 years ago

Lex Plt · @lexplt
17 followers · 73 posts · Server home.social

Is it me or is really easy to understand and parse?
I'm sort of rolling my own utf8 (nearly) random access iterator in for a new parser for , and so far everything works well, not a lot of dark magic to add to it
Here is the POC if anyone is interested (or want to tell me I made a huge mistake) godbolt.org/z/Wq3M9he9r

#utf8 #cpp #arkscript

Last updated 2 years ago

Lex Plt · @lexplt
17 followers · 65 posts · Server home.social

I'm currently adding fuzz testing in the CI of a parser for and it was really easy to do thanks to AFL++.
They already have a production ready-ish Docker image and it just works™️

Look at this, I just copy pasted a few commands to build the target, generate a corpus, and fuzz it with some CI friendly parameters:
github.com/SuperFola/parser-co

#arkscript #pldev

Last updated 2 years ago

Lex Plt · @lexplt
14 followers · 54 posts · Server home.social

And here is a slight improvement in performances (a few more thousand nodes/sec) by creating only once the atom parsers.

I've worked a bit on it tonight, and we can handle things like comments inside blocks (only top level before, I don't know why), nested function calls and anonymous function calls!

#pldev #arkscript

Last updated 2 years ago

Lex Plt · @lexplt
14 followers · 46 posts · Server home.social

Thanks to a very basic implementation of a bloom filter, variable lookups have been sped up by a factor of 1.20 in !

This was as easy as storing the min and max variable IDs we had in each scope, and checking if the requested variable ID was there before trying to fetch it.

#arkscript #pldev

Last updated 2 years ago

Lex Plt · @lexplt
14 followers · 46 posts · Server home.social

And I decided to publish the first v4 pre-release so here you go! github.com/ArkScript-lang/Ark/

Keep in mind this isn't a final version, expect things to change drastically, binaries to be incompatible. ArkScript v4 will enhance the language a lot, by adding new features and breaking existing ones, and the same goes for the syntax.

#arkscript #pldev

Last updated 2 years ago

Lex Plt · @lexplt
11 followers · 41 posts · Server home.social

Implementing new functionalities on while listening to BardCore has become my new favorite activity

If you're looking for a sort of ambient music, without any voice over, this may be for you:
deezer.page.link/J4epMcvz6aCP2

#arkscript

Last updated 2 years ago

Lex Plt · @lexplt
10 followers · 30 posts · Server home.social

It looks like the legacy parser is 3 to 47 times faster than the new one. I have a few easy optimizations in mind that could help here, but even with this performance gap, when looking at the times par iteration, this is still considered fast.

#arkscript #cplusplus

Last updated 2 years ago

Lex Plt · @lexplt
10 followers · 29 posts · Server home.social

I am trying to improve the goodput nodes/sec by lowering the average backtrack count needed per node and oh god this is tough. All of this just to be able to parse some code faster.

I should eat but I had ideas while I was at work so here I am implementing them because I have a break

#arkscript #cplusplus

Last updated 2 years ago