#arkscript — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #arkscript, aggregated by home.social.
-
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 typesAt 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
-
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 typesAt 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
-
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 typesAt 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
-
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 typesAt 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
-
Someone wrote a #discord api client library using #ArkScript 🤯
-
Someone wrote a #discord api client library using #ArkScript 🤯
-
Someone wrote a #discord api client library using #ArkScript 🤯
-
I don’t know what happened, but #ArkScript got faster than python and slower than Lua, at the same time.
The benchmarks all run on the same machine and the languages versions are fixed.
What the hell
-
I don’t know what happened, but #ArkScript got faster than python and slower than Lua, at the same time.
The benchmarks all run on the same machine and the languages versions are fixed.
What the hell
-
I don’t know what happened, but #ArkScript got faster than python and slower than Lua, at the same time.
The benchmarks all run on the same machine and the languages versions are fixed.
What the hell
-
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 abcdefghijWhat should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1] -
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 abcdefghijWhat should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1] -
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 abcdefghijWhat should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1] -
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 abcdefijWhat should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1] -
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 abcdefghijWhat should this
(slice alphabet 0 10 -1) return?
FWIW, #Python returns nothing for alphabet[0:14:-1] -
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
-
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
-
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
-
CW: ArkScript quine and code golf
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!
-
CW: ArkScript quine and code golf
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!
-
CW: ArkScript quine and code golf
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)
-
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)
-
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)
-
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’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’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… -
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… -
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… -
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 togetherhttps://arkscript-lang.dev/ (with a live counter of algorithms in the stdlib on the frontpage because I could)
-
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 togetherhttps://arkscript-lang.dev/ (with a live counter of algorithms in the stdlib on the frontpage because I could)
-
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 togetherhttps://arkscript-lang.dev/ (with a live counter of algorithms in the stdlib on the frontpage because I could)
-
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 -
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 -
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 popAnd 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!
-
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 popAnd 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!
-
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 popAnd 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! -
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! -
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! -
I reworked #ArkScript type errors so that they show more information, and are easier to read!
-
I reworked #ArkScript type errors so that they show more information, and are easier to read!
-
I reworked #ArkScript type errors so that they show more information, and are easier to read!
-
I’ve released #ArkScript 4.1.0 with argument attributes, and noticed just now that I’ve broken the code formatter… it is tested, but what i have broken what specifically tested, because said formatter is very complex
I’ll have to make a 4.1.1 to fix that, but hey new ArkScript release with an even bigger and better standard library thanks to the #AdventOfCode !
-
I’ve released #ArkScript 4.1.0 with argument attributes, and noticed just now that I’ve broken the code formatter… it is tested, but what i have broken what specifically tested, because said formatter is very complex
I’ll have to make a 4.1.1 to fix that, but hey new ArkScript release with an even bigger and better standard library thanks to the #AdventOfCode !
-
I’ve released #ArkScript 4.1.0 with argument attributes, and noticed just now that I’ve broken the code formatter… it is tested, but what i have broken what specifically tested, because said formatter is very complex
I’ll have to make a 4.1.1 to fix that, but hey new ArkScript release with an even bigger and better standard library thanks to the #AdventOfCode !
-
Arguments as references (const ref if we are speaking in #cplusplus terms) have been added to #ArkScript !
When used with big datasets (eg lists) they can yield up to a 5% perf improvement, and having the attribute in the signature makes it explicit that we are using a referenceI really wanted to lean hard on « no hidden behavior » and this will help tremendously, as well as the « mut » attribute, allowing users to mutate the function arguments (which are copies of what you pass to the function anyway)
-
Arguments as references (const ref if we are speaking in #cplusplus terms) have been added to #ArkScript !
When used with big datasets (eg lists) they can yield up to a 5% perf improvement, and having the attribute in the signature makes it explicit that we are using a referenceI really wanted to lean hard on « no hidden behavior » and this will help tremendously, as well as the « mut » attribute, allowing users to mutate the function arguments (which are copies of what you pass to the function anyway)