Releases: ArkScript-lang/Ark
Releases · ArkScript-lang/Ark
ArkScript v3.0.12
Change log
The biggest release ever!
3.0.12
Added
- using a macro to define the default filename (when none is given, eg when loading bytecode files or from the REPL)
PLUGIN <const id>
instruction to load plugin dynamically and not when the VM boots up- updated search paths for
(import "lib.ark")
, looking in ./, lib/std/ and lib/ - added a case to display NOT instructions in the bytecode reader
T& as<T>()
in usertype- enhanced error message when calling a non-function object
- eliminating unused global scope variables in the compiler
- adding a new feature enabled by default:
FeatureRemoveUnusedVars
(not enabled for the REPL for obvious reasons) - added replxx as a submodule
- added custom destructor to the user type, called when a scope is destroyed and when we use
(del obj)
- added a GVL (global virtual machine lock) to be able to use the VM in a multithreaded context
- dockerfile + specific github action to build and push stable and nightly docker images, thanks to @yardenshoham
- added guards to the bytecode reader to stop reading if we're missing an entry point; now telling the user about it
Changed
- updated the string module to benefit from the new
format
member function - updated the logger to remove
fmt/format
- changed the argument order for
Ark::State
- renamed the cache directory
__arkscript__
- operator
@
can now handle negative indexes to get elements from the end of the given container - the standard library is now in another repository
- moved the modules to lib/ext
- the value of
CODE_SEGMENT_START
is again 0x03 (because we removed the plugin table) - renamed
isDir?
todir?
for consistency - the lexer is no longer using regexes but a char after char method
- an ArkScript program is no longer a single bloc, but can be composed of multiple bloc, thus we don't need to use a single big {} or (begin) bloc for all the program
- enhancing lexer and parser error messages
- else clause in if constructions is now optional
- updating error messages in the VM
- updated the repl to add auto completion, coloration and persistance by @PierrePharel
- moving the parser, lexer and AST node to Compiler/ from Parser/
- better import error messages at parsing
- format can now handle any value type
- updated the tests to use the new standard library, and testing every VM instruction and builtins (we didn't test everything before, this way we can be sure we don't break anything in the VM after each update)
- renaming builtins to add a namespace to them (math:, sys:, str:, list: and such)
- firstOf, tailOf and headOf now returns [] or "" instead of nil when they have nothing to do
- adding a brand new scoping system, lighter, more powerful
str:find
now returns the index where the substring was foundstr:removeAt
was fixed to throw an error when the index is strictly equal to the length of the string (can not work since accessing elements in string is 0-index based)
Removed
- removed
fmt/format
from our dependencies PLUGIN_TABLE
was removed to use thePLUGIN
instructionnot_()
from usertype- removed Parser/Utf8Converter
ArkScript v3.0.11
Change Log
3.0.11
Added
- member function
resolve(Args&& args...)
to Value, callable by plugins to resolve the value of a function called with specific arguments given by the plugin (fill qu value)
create a list ofqu
value
s(setListAt list at new-value)
modify a list in place and return the new list value- adding UTF-8 support in programs (experimental)
- more benchmarks
- on error, the VM now display the value of each variable in the current scope
- added thirdparty/madureira/String, to replace std::string in Ark::internal::Value which was heavy and slower than the new implementation
- minimizing the size of the usertype
Changed
- UserType does not need to be given a manually defined type id but relies on
typeid(T)
- performance boost of the VM by using pointers to avoid unecessary copies
- renaming
isNaN
toNaN?
,isInf
toInf?
for uniformisation (seeempty?
,nil?
) - renaming CLI feature options:
-ffunction-arity-check
becomes-ffac
, same for the-fno-
version-fauthorize-invalid-token-after-paren
becomes-faitap
, some for the-fno-
version
- improving compiler performances by using const ref when passing nodes around
- renaming the FFI "builtins" because it's not a FFI but a set of functions using the VM API
- the VM should display a backtrace even if an unknown error occured
- transforming inline code from the vm into not inline code when possible to speed compilation, using macros instead of inline functions
- smaller value class
- smaller vm frames
- forked madureira/String and modified it for the needs of the project, added it as a submodule
- removed the VM pointer from the value class to make it lighter, now the VM is sending a pointer of itself to the C procedures
- removed const and type from value, now using a uint8_t to store those informations
Removed
- removed NFT from the internal API to rely only on the value type
ArkScript v3.0.11-pre
3.0.11-pre
Added
- member function
resolve(Args&& args...)
to Value, callable by plugins to resolve the value of a function called with specific arguments given by the plugin (fill qu value)
create a list ofqu
value
s(setListAt list at new-value)
modify a list in place and return the new list value- adding UTF-8 support in programs (experimental)
- more benchmarks
Changed
- UserType does not need to be given a manually defined type id but relies on
typeid(T)
- performance boost of the VM by using pointers to avoid unecessary copies
- renaming
isNaN
toNaN?
,isInf
toInf?
for uniformisation (seeempty?
,nil?
) - renaming CLI feature options:
-ffunction-arity-check
becomes-ffac
, same for the-fno-
version-fauthorize-invalid-token-after-paren
becomes-faitap
, some for the-fno-
version
- improving compiler performances by using const ref when passing nodes around
- renaming the FFI "builtins" because it's not a FFI but a set of functions using the VM API
- the VM should display a backtrace even if an unknown error occured
- transforming inline code from the vm into not inline code when possible to speed compilation, using macros instead of inline functions
Removed
- removed NFT from the internal API to rely only on the value type
ArkScript v3.0.10
3.0.10
Added
- adding
sort
to sort a list - added
\t
,\n
,\v
and\r
escape codes (available in strings only) - adding
listFiles
which returns a list of paths (strings) - adding
(makeDir path)
and(removeFiles ...)
- added
(filter func list)
inlib/Functional/Functional.ark
- adding
puts
. Does the same thing as print but doesn't print a newline character - added a msgpack module by @PierrePharel
- added a user type (to be defined in C++)
- adding a
not
operator - adding an http module by @SuperFola
Changed
- updated output of tests with number of passed tests
- updated REPL so that it doesn't try to compile blank lines or comments, by @rstefanic
- the option
-d|--debug
is now repeatable, to set a debug level. Can go from 1 (compilation information) to 3 (a lot of information). - better precision when using
(time)
- better tests presentation
- moved the modules to https://github.com/ArkScript-lang/modules
ArkScript v3.0.9
3.0.9
Added
- fixing segfault when the VM receives an empty code page (generated from an empty block)
(print (fun () ()))
will now printFunction @ 1
instead of just its page addr,1
(if true () ())
now returns nil (can be generalized to() -> nil
)- anonymous functions are now available ; eg:
((fun () (print "a")))
- added
forEach
in library - added
-c|--compile
option to the CLI so that we can only compile an ArkScript file instead of compiling and running it, by @DontBelieveMe - added
min
andmax
inlib/Math/Arithmetic.ark
, by @FrenchMasterSword - added
reduce
inlib/Functional/Reduce.ark
, by @FrenchMasterSword - added
product
inlib/List/Product.ark
, by @FrenchMasterSword
Changed
- a quoted code (defered evaluation) isn't capturing anymore surrounding variables' values, thus increasing greatly performances
- lists are printed like
["string" 1 true]
now, instead of( string 1 true )
- updated
zip
so that it can work with lists of different sizes, by @FrenchMasterSword - better cyclic includes detection
- better VM error message when redefining a variable through
let
ArkScript v3.0.8
3.0.8
Added
- it's now possible to compare Values using
operator<
reverseList
(added to the FFI) by @rinz13r- a warning will now pop up during compilation if code appears to be ill-formed (eg number/string/list right after a
(
) - option
-f(allow-invalid-token-after-paren|no-invalid-token-after-paren)
was added (default: OFF)
Changed
- the internal API used to compare values has been updated to be much shorter
- the REPL can take into account the lib directory, by @rstefanic
isNaN
andisInf
should work on any type but return false if they aren't numbers- replacing Ark with ArkScript in source code and files (Ark being the shortname for ArkScript, as JS is the shortname for Javascript)
findInList
now returnsnil
when the object can not be found, otherwise it returns its index in the list
ArkScript v3.0.7
3.0.7
Added
cos
,arccos
,sin
,arcsin
,tan
,arctan
E
(exp 1),Pi
,Tau
(2 * Pi),NaN
,Inf
isNaN
,isInf
exp
,ln
(standard logarithm),pow
,sqrt
ceil
,round
,floor
zip
,map
,sum
- REPL, made by @rstefanic
Changed
- moved the lib files in subfolders to be more organized
- re-updating the import rules on the parser side to be able to import files in subfolders from the standard library
- updating naming convention of the modules
ArkScript v3.0.6-b
3.0.6-b
Added
- adding
lib/Functional.ark
to store(compose f g)
Changed
- the VM now deletes all scopes except the global one in case of failure, when the persisting flag is set
- fixing plugin importation
ArkScript v3.0.6
3.0.6
Added
- function arity handling in the VM, can be disabled with the option
-fno-function-arity-check
sliceStr
inlib/Slice.ark
, taking a string, a starting index (can't be less than 0), and the length (can't be less than 1), returning a portion of the given stringreverseStr
inlib/Reverse.ark
taking a string and returning it in reverse
Changed
- updated the include module, which was randomly adding
/
before the path of the files - dispatched the unit tests in multiple files
- now using a separated class to hold the description values for the VM
- updated assertions in
split
inlib/Split.ark
(works only with single character separators) - fixing import bug
ArkScript v3.0.5
3.0.5
Added
- the parser can now recognize expressions like
((f f) x)
- we can now create
Ark::Value
with floats
Changed
- the
init()
internal method of the VM shouldn't stop when a binded function isn't used in the code, just ignore it - the compiler shouldn't crash on a bad code block
- better line counter in lexer
- the VM shouldn't try to run a non-existing bytecode file if the compilation fails (when calling
doFile()
) VM.call
should returnnil
if the stack is empty, otherwise it results in avector subscript out of range
and that's bad- the SFML plugin was updated to run on Windows
Shipping with the compiled modules this time