Skip Navigation
Nerd snipping myself into optimizing ArkScript bytecode
lexp.lt ArkScript - June 2025 update

Since my last update post, there was a total of 941 files changed, 10'780 insertions and 4'105 deletions in 71 commits. I mainly focused on optimizing the runtime performances of the language.\nBetter errors! I worked on improving error contexts, by adding an optional cause, which is very helpful wh...

0
lexp.lt Instruction source location tracking in ArkScript

Good error reporting is crucial in programming languages. Doing it at compile time was easy in ArkScript as we have all the context we need at hand, but since we compile code down to bytecode, which is then run by the virtual machine, we loose a lot of context: the source files, their path, their co...

ArkScript is an interpreted/compiled language since it runs on a VM. For a long time, runtime error messages looked like garbage, presenting the user with an error string like "type error: expected Number got Nil" and some internal VM info (instruction, page, and stack pointers). Then, you had to guess where the error occurred.

I have wondered for a long time how that could be improved, and I only started working on that a few weeks ago. This post is about how I added source tracking to the generated bytecode, to enhance my error messages.

0
lexp.lt Publishing ZIP artifacts with SBT

In my previous article about Scala, I briefly mentionned we were publishing Swaggers inside JARs, that we could unzip to retrieve the Swagger definition and then run our code generation. It works, but using ZIPs would feel better and less confusing for users.\nI have decided to nerd snip myself and ...

0
lexp.lt Optimizing scopes data in ArkScript VM

If you don’t know me yet, I have been working on ArkScript for nearly 6 years now. ArkScript is a scripting language in modern C++, running on a custom virtual machine (like Python or Lua), with the goal of having a syntax easy to learn and use, a C++ interface to embed it in programs, and decent pe...

I finally found a better memory layout to store variables in ArkScript, and I got a 76% performance boost on the binary tree benchmark, and a 21% perf boost on Ackermann(3, 7) Who knew using a contiguous storage buffer could be beneficial? 🤡

I retraced all the performance improvements I applied to ArkScript through the last five years, with updated benchmarks, AND DAMN what a journey.

0
lexp.lt Generating swaggers at compile time

At work, we’ve been generating code from swaggers and publishing said generated code. Alas, this requires us to remember to generate the swagger(s), as well as fixing versions of libraries (which means you need to upgrade versions in the server, publish updated generated code, then update your clien...

Generating swaggers at compile time

Hi everyone!

I’m sharing with you a solution I designed for generating swaggers (http4s, tapir, open api) for apps.

At work we always had to remember to launch the app and all the databases containers, which was cumbersome and we would often forget to update the swaggers (which led to generated code for clients that wasn’t up to date).

0
Database Corruption Maintenance (00:01 - 06:00 UTC Dec 2)
  • To me (on voyager and on programming.dev website), !programming_languages@programming.dev still seems down

  • Problem with !data_structures
  • That doesn’t solve communities being inaccessible though, does it?

  • Problem with !data_structures
  • Hi there! Like many others, I’m wondering where this issue is at?

  • Doing it alone vs someone watching
  • When someone is watching I’m more like

    • where is my « a » key
    • oops I typed - and not =
    • oops why am I pressing tab instead of space
    • ah here we go « a=b+c »
    • how do I compile again
  • Floppy, a split 34 keys board using telephone cable
  • I didn’t but that’s a cool idea!

    I also had the idea of using real floppy disks as backplates, since I have a few lying around.

  • Floppy, a split 34 keys board using telephone cable
  • Thanks!

    I went with twilight ambient switches, might add soft o-rings under the keycaps later (I have been using those switches and the o-rings idea on another board and I love it, so quiet).

    For a while I considered putting some sunset for the tactility and the memories of membrane keyboards, but didn’t as I don’t really like tactile switches (for now).

  • Floppy, a split 34 keys board using telephone cable

    I wanted to design a funny keyboard with an alternative to TRRS, so I made this floppy disk sized keyboard! (Perfect replica, under 10cm x 10cm)

    I made a build guide for it too: https://lexp.lt/posts/floppy_keyboard/

    9
    The OnePlus 13 will leave more space free for your apps — Here's how
  • A big ass article just to say « they removed preloaded wallpapers and deleted redundant features but didn’t tell us what ».

  • If you had a 1 year sabbatical, what would you do?
  • I’ve been saving 30-40% of my salary each month for years, it helps not going outside because you don’t like people and watching movies and playing video games. And eating ramen

  • did user engagement drop significantly in programming forums?
  • I feel like a lot of open source projects redirect to a discord or private discussion system like slack (even worse).

    And it doesn’t help at all because it can’t be indexed and can quickly disappear on a while on the admin side. You can also be banned for no reason. Searching those platforms is horrendous, I don’t want to search a badly indexed system and then ask a question because I can’t find the answer to a problem, and be told it has been discussed 30 times.

    Give me a bloody wiki or old fashioned phpbb forum.

  • Ghostty 1.0 is Coming
  • This smells like bullshit because it’s just based on things users do not see (processes) or do not care about (the style used for your tabs).

  • Ghostty 1.0 is Coming
  • Only says it’s fast on some specific benchmarks against alacrity. Not talking about why alacrity or kitty would not work on Linux/mac while ghostty does.

    Sure, it’s interesting that he managed to optimize so many things. But the claims in the picture are unproven.

  • Ghostty 1.0 is Coming
  • Kitty is mentioned once in the article and that’s it. Doesn’t even mention its downside and how ghostty is so much better according to them.

    It’s a great project and all, but I’d love if people could stop stomping on others work just to appear better.

  • Ghostty 1.0 is Coming
  • Unsure, I am using kitty with a very minimal config on MacOS and it works well. Haven’t had any bugs. Seems more like marketing to me (the image)

  • Noob question about hosting multiple services on one server and DNS records
  • Nginx proxy manager can do all of the routing for you if you are using docker. In a graphical interface without touching config. It’s on top of nginx so you get all its benefits!

  • *Permanently Deleted*
  • You could start by creating an issue to add translations for the language you want and then expressing your interest in doing it yourself but needing guidance. Maintainers would be more than happy to help you.

  • Community programming_languages not found

    I tried accessing https://programming.dev/c/programming_languages but it tells me that the community can not be found. Is that a lemmy bug?

    1
    RIP. :(
  • High uptime is bad, that means you do not update your kernel

  • what is your Favorite passwords manager and why
  • Self hosted Bitwarden. It has been awesome for three years, never had any problems when switching from windows to Mac and then my phone from android to iPhone.

    Better than keeper and last pass. Good synchronization and more options to share passwords or notes with friends compared to Firefox password store.

  • lexp.lt Implementing an Intermediate Representation for ArkScript

    ArkScript is a scripting language, running on a VM. To accomplish this, we had (as of September 2024) a compiler generating bytecode for the virtual machine, receiving an AST from the parser (and a few other passes like name resolution, macro evaluation, name and scope resolution…).\nExploring new o...

    0
    How proficient do you rate yourself in your most coded language?
  • I’ve been using Scala professionally for 3 years. I don’t know what I’m doing most of the time because we have a ton of implicites and monads and extension methods. I just know the general idea and can get where I want by reading types.

    I’ve been creating a language for fun for nearly 6 years. I often don’t know what’s going on under the hood because it’s somewhat complex. I think this is normal for every language. You don’t have to know everything to be able to use it. You don’t have to write blog posts once a week about the language subtleties you found.

  • Key Promoter X for NeoVim?
  • Yes, that’s the one!

  • Key Promoter X for NeoVim?
  • I know of which-key.nvim that help you search your key map.

    There is somewhere a plugin that will belittle you for using jjj instead of 3j too, and I think that’s more like what you look for. I couldn’t find it, if anyone knows it!

  • Thousands of Linux systems infected by "perfctl" malware since 2021
    arstechnica.com Thousands of Linux systems infected by stealthy malware since 2021

    The ability to remain installed and undetected makes Perfctl hard to fight.

    Thousands of Linux systems infected by stealthy malware since 2021

    TLDR: perfctl is a crypto mining and proxy jacking malware that exploits about 20’000 common missconfigurations to install itself on Linux servers. Mostly using a 10/10 CVE on Apache RocketMQ.

    It is very persistent and can reinstall itself even when you have deleted all the perfctl and perfcc files. It hides itself by removing logs, network packets, and stopping all activity once you login to the machine.

    Monitoring cpu usage using tools (I use net data on my server) can help identify infections (100% cpu usage when « idle »).

    9
    Arkscript September update - macros and tooling
    lexp.lt ArkScript - September 2024 update

    Hello, General Kenobii!\nIn the last 90 days, 795 files have been modified, for 3105 insertions and 9135 deletions (dataset cleanup for fuzzers), in just 97 commits (I’m reworking the very last one, more on that soon).\nDid someone say… macros? Macros come in handy for improving syntax and creating ...

    ArkScript - September 2024 update

    I’ve started putting the (long) forum posts I make about ArkScript on my blog, so that more people can follow the development. I must say I like the look of it, that’s also helping me getting back into blogging!

    0
    Comparing ArkScript and Python async/await
    lexp.lt Comparing Python and ArkScript asynchronous models

    Python has received a lot of attention lately. The 3.13 release, planned for October this year, will begin the huge work of removing the GIL. A prerelease is already out for curious users who want to try a (nearly) GIL-less Python.\nAll this hype made me dig in my own language, ArkScript, as I had a...

    cross-posted from: https://programming.dev/post/18859576

    > This past few weeks, Python 3.13 and the possibility to disable the GIL has seen a lot of coverage and that pushed me to dig into my own language, to see how different our approaches are. > > So if you’re curious about the rambling of a pldev, that might be for you!

    0
    Implementing computed gotos
    lexp.lt Implementing computed gotos in C++

    A common idiom in virtual machines or state machines is to read data from a list, execute some code depending on the value we read, advance in the list, rinse and repeat. That could be written as:\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

    I just wanted to have a handy description of computed goto that I could refer to, to reuse this concept without having to read thousands of line trying to make sense out of it.

    0
    Comparing ArkScript and Python async/await
    lexp.lt Comparing Python and ArkScript asynchronous models

    Python has received a lot of attention lately. The 3.13 release, planned for October this year, will begin the huge work of removing the GIL. A prerelease is already out for curious users who want to try a (nearly) GIL-less Python. All this hype made me dig in my own language, ArkScript, as I had a ...

    This past few weeks, Python 3.13 and the possibility to disable the GIL has seen a lot of coverage and that pushed me to dig into my own language, to see how different our approaches are.

    So if you’re curious about the rambling of a pldev, that might be for you!

    0
    lexp.lt Creating custom GitHub webhooks for automatic deployments

    For a while, when updating ArkScript website, I have needed to remember to update the copy on my VPS so that the changes would be reflected to the world. Since I’m quite lazy, I’d like to automate this!\nThe solutions The first solution would be to use crontabs. Easy to setup, find a schedule, write...

    I thought you guys might enjoy it: I have a website that I push to frequently on GitHub, and some GitHub actions that update it periodically by pulling code and generating docs from it. I needed to connect to my vps often and update the website which was cumbersome.

    Well a solution is to use webhooks on push events and have a server listening to those events to then update said websites for me.

    0
    lexp.lt Creating custom GitHub webhooks for automatic deployments

    For a while, when updating ArkScript website, I have needed to remember to update the copy on my VPS so that the changes would be reflected to the world. Since I’m quite lazy, I’d like to automate this! # The solutions The first solution would be to use crontabs. Easy to setup, find a schedule, writ...

    0
    Checking if a hash is collision free on a limited domain
    lexp.lt Checking the collision \

    Why? In a work related context, I had to create a hash algorithm working on a finite set of values ([0, 0xFFFFFFFF]) to output a non sequential serie from a sequential one (the output had to be rendered as a UUID.\nBasically, I wanted to avoid generating UUID looking like 00000000-0000-0000-0000-000...

    I had some fun trying to check if a hash (more like a transformation really) was collision free, so I wrote a quick piece code and then iterated on it so that it was usable.

    I might add a quick bench and graphs and try to push it even further just for fun, to explore std::future a bit more (though the shared bit set might be a problem unless you put a shared condition variable on it to allow concurrent read but block concurrent writes?)

    3
    [suggestion] block new accounts from posting

    More and more new accounts are posting spam and ads to communities (eg !technology@programming.dev), would it be an idea to block new accounts from posting to any p.d community?

    5
    An online playground for ArkScript

    I wanted people to be able to try out my language online, and it’s now possible with a vscode like interface, sending code to a docker image running the interpreter!

    It was easier than I thought to implement, and yes, security was a concern, but I have been able to harden the docker container as well as implement restrictions on the websocket server to avoid having users escaping the docker image and getting access to the VM it’s running on.

    0
    SuperFola SuperFola @programming.dev

    ArkScript lang developer, split keyboard fanatic

    Posts 41
    Comments 158