ArkScript Lang Ark Versions Save

ArkScript is a small, fast, functional and scripting language for C++ projects

v4.0.0-rc4

1 month ago

Added

  • more tests for the io builtins
  • added lines and code coloration in the error context
  • new dependency: fmtlib
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • $repr macro to get a string representation of a given node
  • added boost-ext/ut to write unit tests in C++
  • basic ArkScript code formatter, available through the CLI: arkscript -f|--format
  • comments are now tracked in the AST and attached to the nearest node below them

Changed

  • instructions are on 4 bytes: 1 byte for the instruction, 1 byte of padding, 2 bytes for an immediate argument
  • enhanced the bytecode reader and its command line interface
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • fixed underline bug in the error context
  • the str:format functions now expects strings following this syntax: https://fmt.dev/latest/syntax.html
  • more documentation about the compiler implementation
  • more documentation about the virtual machine
  • closures can be now be compared field per field: (= closure1 closure2) will work only if they have the same fields (name) and if the values match
  • macros are now defined like ($ name value) / ($ name (args args args) body) / ($if cond then else)
  • upgraded from C++17 to C++20
  • new parser, new syntax for imports: (import package.sub.file)
  • allow nodes to be empty when dumping the AST to JSON
  • macros can be declared inside a begin block within a cond macro and used in the scope surrounding the cond macro
  • arkscript --version and arkscript --help now output ArkScript version with the commit hash

Removed

  • removed unused NodeType::Closure
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • Utils::digPlaces and Utils::decPlaces got removed as they were no longer needed
  • removed deprecated code (list:removeAt, ark executable now replaced by arkscript)

v4.0.0-0.3

2 months ago

Added

  • more tests for the io builtins
  • added lines and code coloration in the error context
  • new dependency: fmtlib
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • $repr macro to get a string representation of a given node
  • added boost-ext/ut to write unit tests in C++

Changed

  • instructions are on 4 bytes: 1 byte for the instruction, 1 byte of padding, 2 bytes for an immediate argument
  • enhanced the bytecode reader and its command line interface
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • fixed underline bug in the error context
  • the str:format functions now expects strings following this syntax: https://fmt.dev/latest/syntax.html
  • more documentation about the compiler implementation
  • more documentation about the virtual machine
  • closures can be now be compared field per field: (= closure1 closure2) will work only if they have the same fields (name) and if the values match
  • macros are now defined like ($ name value) / ($ name (args args args) body) / ($if cond then else)
  • upgraded from C++17 to C++20
  • new parser, new syntax for imports: (import package.sub.file)

Removed

  • removed unused NodeType::Closure
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • Utils::digPlaces and Utils::decPlaces got removed as they were no longer needed
  • removed deprecated code (list:removeAt, ark executable now replaced by arkscript)

v4.0.0-0.2

4 months ago

Added

  • more tests for the io builtins
  • added lines and code coloration in the error context
  • new dependency: fmtlib
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader

Changed

  • instructions are on 4 bytes: 1 byte for the instruction, 1 byte of padding, 2 bytes for an immediate argument
  • enhanced the bytecode reader and its command line interface
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • fixed underline bug in the error context
  • the str:format functions now expects strings following this syntax: https://fmt.dev/latest/syntax.html
  • more documentation about the compiler implementation
  • more documentation about the virtual machine
  • closures can be now be compared field per field: (= closure1 closure2) will work only if they have the same fields (name) and if the values match

Removed

  • removed unused NodeType::Closure
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • Utils::digPlaces and Utils::decPlaces got removed as they were no longer needed
  • removed deprecated code (list:removeAt, ark executable now replaced by arkscript)

v3.5.0

1 year ago

Added

  • added fuzzing tools and corpus for AFL
  • added some tests for errors
  • added recursion limit reached detection

Changed

  • plugins can be constructed from outside ArkScript lib/modules folder, easing the development process
  • plugins loading now works as intended: look alongside the given file/bytecode file, then in the std lib folder
  • new way to create modules, easier to use
  • calling a non-callable anonymous object do not result in a segfault
  • macro processor function registering now handles empty nodes
  • added a fix to avoid crashes when capturing unbound variables
  • checking if the given operator takes one or more arguments at compile time
  • adding bound checking on operator @
  • adding bound checking on operator @ when used in macros
  • better arity check for macros
  • fixed a bug in the macro processor where macros were deleted when they shouldn't
  • fixed a bug where macro functions with no argument would crash the macro processor

v4.0.0-0.1

1 year ago

[4.0.0-0.1] - 2022-11-28

Added

  • more tests for the io builtins
  • added lines and code coloration in the error context
  • new dependency: fmtlib

Changed

  • instructions are on 4 bytes: 1 byte for the instruction, 1 byte of padding, 2 bytes for an immediate argument
  • enhanced the bytecode reader and its command line interface
  • added the padding/instruction/argumentation values when displaying instructions in the bytecode reader
  • fixed underline bug in the error context
  • the str:format functions now expects strings following this syntax: https://fmt.dev/latest/syntax.html
  • more documentation about the compiler implementation
  • more documentation about the virtual machine
  • closures can be now be compared field per field: (= closure1 closure2) will work only if they have the same fields (name) and if the values match

Removed

  • removed unused NodeType::Closure
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • removing the custom string, replacing it with std::string (the format engine of the custom string had a lot of memory leaks)
  • Utils::digPlaces and Utils::decPlaces got removed as they were no longer needed
  • removed deprecated code (list:removeAt, ark executable now replaced by arkscript)

v3.4.0

1 year ago

Added

  • added new async and await builtins
    • they can access the outer scope
  • added methods to create and destroy an execution context and a future in the VM
  • added new CLI option --ast to generate JSON from the generated abstract syntax tree
  • added an AST to JSON compiler
  • added warnings on unused functions/quotes and statements without any effect

Changed

  • printing a closure will now print its fields instead of Closure<1432>
  • macros are always evaluated, even when they aren't any user defined macro
  • argcount works on symbols and anonymous functions

Deprecated

  • deprecating Value VM::resolve(const Value* val, Args&&... args)

Removed

  • removed the std::ostream& operator<< of the Value, now using the .toString(stream, vm reference)
  • removed the global VM lock
  • removed coz and ARK_PROFILER

v3.3.0

1 year ago

Added

  • running the modules tests in the CI
  • new bytecode instruction POP, removing the last value from the stack
  • more documentation about ArkScript and its modules
  • more tests for the io builtins
  • added lines and code coloration in the error context
  • added documentation about the compiler implementation
  • added documentation about the virtual machine
  • ArkScript now supports LTO if the compiler can do it

Changed

  • fixed underline bug in the error context
  • changing the way we count received arguments in arity / type errors for failed function call
  • the CLI can now take a list of paths to the standard library, separated by ';'

v3.1.3

2 years ago

Added

  • adding an ExecutionContext to host the pointers (instruction, page, stack) and execution related structures (stack, locals, scopes), to ease the transition to a parallelized VM
    • the VM can have multiple independant context running on the same bytecode
  • the VM now takes a reference to an Ark::State instead of a raw non-owning pointer
  • adding ARK_PROFILER_MIPS to toggle instruction per second calculation
  • adding new way to typecheck in builtins
  • new CI build step now running valgrind to check for memory leaks
  • new type checker (to be used by builtins)
  • better type errors generation (with the list of arguments, if they are matching or not, and more)

Changed

  • splitting Utils.hpp into multiple files for easier maintenance and contextualisation
  • reserving a default scope size of 3, which yields really good performance results compared to nothing being reserved
  • upgrading the builtins error handling to use the BetterTypeError
  • the VM now displays the debug info (ip, pp, sp) at the end of the backtrace instead of the beginning

Removed

  • BetterTypeError has been removed in favor of a type checker using templates and an error generator

Deprecated

  • deprecating VM(State*) in favor of VM(State&)

v3.1.2

2 years ago

Added

  • adding support for append_in_place, concat_in_place, pop_list and pop_list_in_place in the bytecode reader
  • added page_ptr(int) in the compiler to replace &page(int)
  • added literals _u8 and _u16
  • added table overflow detection in the compiler, to avoid creating unusable bytecode (checks if the symbols/values table is full or not)
  • new Installer.iss (inno setup script) to generate a Windows installer
  • new exceptions for type errors

Changed

  • using doc_formatting.first_column instead of doc_formatting.start_column when displaying the CLI help
  • brand new cmake build system
  • renaming Ark/Config.hpp to Ark/Platform.hpp
  • refactored compiler handling of keywords
  • removed using Inst_t = uint8_t in the compiler
  • moved everything related to the AST in Ark/Compiler/AST/
  • moved everything related to the macros in Ark/Compiler/Macros/
  • renamed unclear file CValue to ValTableElem
  • the parser is now an internal class
  • the AST Optimizer was moved to Compiler/AST
  • changed the ARKSCRIPT_PATH to be a collection of paths to look into, separated by ;
  • updating replxx to avoid a bug when compiling with clang

Removed

  • removed ARK_SCOPE_DICHOTOMY flag so that scopes don't use dichotomic search but a linear one, since it proved to be faster on small sets of values. This goes toward prioritizing small functions, and code being cut in multiple smaller scopes
  • removing download-arkscript.sh from the repo
  • removed isFraction, isInteger, isFloat from Ark/Utils.hpp (worked on strings and used regex)
  • removed mpark variant to use standard variant
  • Ark::FeatureFunctionArityCheck was removed, making arity checks mandatory

v3.1.1

2 years ago

Added

  • ArkDoc documentation for the builtins
  • Now using clang-format to ensure the code is correctly formatted

Changed

  • the macro processor can now handle multiple macro definitions in a if-macro: !{if true { !{a 1} !{b 2} }} is finally working

Deprecated

  • ark command is now marked as deprecated, in favor of arkscript