July 11, 2022 by Lex Plt2 minutes
Hello there!
The project is still alive, I was just running out of content to make a new post here.
Between today and the last post, taking into account only the dev branch, a small refacto of the project has passed:
I specifically said the dev
branch, because a little new one has appeared, aimed specifically at the next big release, ArkScript 4.0! It includes :
The work done since last year can be seen as clean-up and a bit of house keeping, as the vacations have arrived for part of the team, development is slowing down a little. However, we’re planning some brilliant improvements for the rest of the year, including the generation of an AST in JSON form (useful for making an LSP, writing tests for the lexer/parser/optimizer/macro processor, for having a new backend that transpiles into WASM or other…), fuzzing to detect as many errors as possible in the language’s implementation.
(let size 1000)
(let data (list:fill size 1)) # une liste de remplie de mille 1
(let sum (fun (a b src) {
(mut acc 0)
(while (< a b) {
(set acc (+ acc (@ src a)))
(set a (+ 1 a))})
acc
}))
(let workers [
(async sum 0 (/ size 4) data)
(async sum (/ size 4) (/ size 2) data)
(async sum (/ size 2) (- size (/ size 4)) data)
(async sum (- size (/ size 4)) size data)])
(let res-async
(list:reduce
(list:map
workers
(fun (w) (await w)))
(fun (a b) (+ a b))))
(let make (fun (a b c)
(fun (&a &b &c) ())))
(let foo (make 1 2 3))
(print foo) # output: (.a=1 .b=2 .c=3), avant: Closure<4>
functionName: needs argumentCount argument(s), got actualArgumentCount.
-> arg1Name (wanted type) was arg1Value (of type arg1Type)
-> arg2Name (wanted type) was arg2Value (of type arg2Type)