Releases: ArkScript-lang/Ark
Releases · ArkScript-lang/Ark
ArkScript v3.0.15
3.0.15
Added
- new submodule, plasma-umass/coz (a profiler)
- macros for profiling, enabled only if
ARK_PROFILE
is defined - cmake flags using -D to turn on/off sys:exec and the coz profiler
- mpark variant is now the default used instead of the default STL variant (faster, better, stronger, and its creator is quite a god)
- new cmake flag, -DARK_SCOPE_DICHOTOMY=On|Off (default Off)
- using internal only references to constants and symbols to reduce the number of useless copies of the value type
Changed
- updated standard library
- updated modules, adding hash
- updated the error handlers to avoid errors (sigsev) when handling errors (lexing, parsing, optimization and compilation error)
- better error message at runtime when a plugin can not be found
- fixes issue #203 (imports are ill-formed when given an absolute path)
- fixes issue #205 (search for the standard library folder in more common places)
- transitioning from C++ streams to printf
- replaced the thirdparty/ folder with a git submodule in thirdparties/
- now checking that a scope doesn't have our symbol before doing a
mut
operation (in dichotomic mode it was automatically handled, but not in linear mode) - enhancing the cmake defines (
-DARK_XYZ
) and the code using them - lighter Frame (from 40B to 32B), moved some unrelated logic from the frame to the virtual machine
(sys:exec)
now returns the stdout output of the given command
ArkScript v3.0.14
Changelog
3.0.14
Added
- the parser can handle
(let|mut a b.c)
(bug fix) f[ruv|no-ruv]
CLI switch to control the optimizer (ruv stands for remove unused variables)- error message when we have too many parenthesis (at parse time)
- error message when using an operator not right after a
(
- error message when we're capturing an unbound variable
- added
(sys:exit code)
as a builtin - bytecode integrity checking through a sha256 in the header
- tests for
math:fibo
andmath:divs
- added the ability to give scripts arguments, through
sys:args
Changed
- the parser checks if set is given a dot expression as an identifier (which is an error)
- the parser should take in account captured variables as well, otherwise some variables are optimized while they are captured, resulting in runtime errors
- better unbound variable error message
- (implementation) every constructor with a single argument is now marked as explicit
- REPL does not need to add extra surrounding {}
- the Ark::State (re)compiles a file even if there is a bytecode version available
- the parser is now stricter and gives better error messages when we give too many/not enough arguments to a keyword
- better handling of the code given to the REPL (adds new line)
- renamed the executable from
Ark
toark
- now using Github Actions instead of Travis
- the parser can now detect when let/mut/set are fed too many arguments, and generate an error
- the compilater now handles
(set a b.c.d)
- using a new plugin interface, more C-like
Removed
- class
Ark::internal::Inst
which was used as a wrapper betweenuint8_t
andInstruction
- worthless examples were removed
- removing
f[no-]aitap
since it wasn't used anymore in the code
ArkScript v3.0.13
3.0.13
Added
- string tests
- list tests
- range tests
- unbound variable checker at compile time (won't break on plugin symbols)
Changed
list:find
returns -1 to stay consistent withstr:find
- hot fix
(mut a 10) (let b 12) (set a b) (set a 11)
, the immutability was transfered from b to a - converting
list
,append
andconcat
to instructions - instructions
LIST
CONCAT
andAPPEND
added to replace the corresponding builtins
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