Hey everyone, I'm trying to implement a "slice" function but I'm not sure how to go with negative steps

Let's say we have (slice start end [step])
And
(slice alphabet 0 10) returns abcdefghij

What should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1]

#pldev #ArkScript

jihgfedcba (reversed selection)
71.4%
zyxwvutsrq (reversed but start at the end)
0%
Other
28.6%
Poll ended at .

According to my testing, embedding #ArkScript works well with low resources, as it only needs 1MB of disk space and 4.6MB of RAM!

It isn't the tinyest but it isn't the biggest either!

#TinyScheme sits at the top, with only 84KiB of disk and 3MB of RAM needed, and #Lua is close with 271KiB of disk and 1.9MB of RAM

https://github.com/ArkScript-lang/embedded-langs-footprint

I’ve been doing some code golf on code.golf, using my own language, #ArkScript

And I found a fun Quine (program that outputs itself), without using io:readFile:

```
(let _"(let _{:?})(puts(format _ _))")(puts(format _ _))
```

`format` is using fmtlib under the hood, and it’s pretty handy!

People, we have a debugger in #arkscript

https://arkscript-lang.dev/docs/tutorials/debugging/

and it's more tested than the repl somehow (I had to develop a new kind of tests for this one, so that I can skip the prompt and feed it lines from a file)

Debugging ArkScript code

ArkScript has a debugger built into its VM, that usually do not trigger, unless you pass the command flag -fdebugger to the CLI. It also doesn’t trigger by default when using ArkScript as an embedded scripting language.

ArkScript

I’ve learned #arkscript, a language I’ve been working on for a few years now, is being used as a code gold language by people on the internet

And they found bugs (hopefully it’s fixed now, 24 hours after I’ve been informed and started working on the fix)

It is truly awesome, and now I can’t wait to go back to work on more features (the current one being adding a debugger)

I used #ArkScript for the #AdventOfCode and it helped me improve the language as well as find bugs
You can read about the whole adventure on my blog: https://lexp.lt/posts/arkscript_advent_of_code/
Some bugs were very dirty and I’m glad I caught them…

#pldev #compiler

Using ArkScript for the Advent of Code 2025

Last month I got to use ArkScript, a language I’ve been developing for nearly 7 years, for the Advent of Code. And this time, I got to the end, using only my language (and a few hints from programming.dev)!\nAdding attributes to functions’ arguments Advent of code challenges are often heavy on lists, with inputs sometimes being thousands of lines long. After benchmarking some of my solutions, I noticed passing big lists to helper functions (eg a (get grid x y) that would check for width and height) was slower than doing the check in place and duplicating code. This is due to ArkScript “no hidden behaviour” rule: arguments are always passed by value, and no hidden references are used.\n

Lexy Plt blog

Since the Advent of Code, I've added about 50 new algorithms to #ArkScript standard library it seems
And it won't stop growing, even if I'll probably be the sole user of the language, it's quite fun to put your own stdlib together

https://arkscript-lang.dev/ (with a live counter of algorithms in the stdlib on the frontpage because I could)

ArkScript

A small, lisp-inspired, functional scripting language

ArkScript
Also, it means nothing, but I've done over 3000 commits in #ArkScript, and about 6.67 years of working on the project
It brings me joy, because it shows me that I can do things and keep doing them

I've added some kind of fused multiply add to #ArkScript.

"some kind of", because I can fuse 2 to 3 successive math operations in a single bytecode instruction, and this helps by removing useless push/pop the VM stack!

Before: 7 push, 6 pop
After (with 3 fused math ops): 5 push, 4 pop

And it was pretty easy to code, as I have a somewhat decent IR optimization engine, I just had to generate a bunch of rules to fuse instructions together!

So happy to have completed at least part 1 of every #AdventOfCode challenge!
I only had to give up on day 10 part 2, and there is no part 2 for day 12, otherwise I was able to do every single challenge using #ArkScript, my own scripting language, and it was an amazing opportunity to improve the standard library too!