10000 Release João v2.2 · Altoids1/Joao · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

João v2.2

Compare
Choose a tag to compare
@Altoids1 Altoids1 released this 02 Jan 01:34
· 37 commits to main since this release

New year, new João.

Optimizations 🥇

  • João now does some basic constant folding of operations between literals. (1 + 2) will now properly be parsed as 3 before the code is run by the interpreter.
  • Hashtables now grow in a slightly more optimized way. Scripts with heavy table load should be 5 - 15% faster.

Features 📚

  • log10() and log() were added to the math library.
  • The new keyword continue was finally added, behaving similarly to how it does in other languages.
  • In Safe Mode, HashTables in the language are now not allowed to use more than 512 MB of memory, each.
  • /explode() now accepts strings which are not singular characters, as well as empty-string separators (which results in the haystack being returned as the single element of the returned table).
  • Another new keyword is const, which, when given a block, runs itself before the greater program is run and is replaced with its return value. This is similar to C++'s constexpr, except in our case, it has the full functionality of João at its disposal.
  • Interactive Mode now functions in a manner more akin to a scientific calculator, with the evaluation of expressions. A full REPL implementation will appear in the next patch.
  • João now supports being compiled in an Emscripten WASM environment. Read the new documentation on the matter for more.
  • The Documentation now describes how to compile João, plus some reference information on the math library.

Bugfixes 🥾

  • Fixed Joao emitting #error directives when compiled on certain Clang builds.
  • Fixed instantiating /error with the wrong arguments causing a read access violation.
  • Constructors now properly halt and return null if there is a runtime when evaluating their arguments.
  • Fixed large breaks in complicated situations not always working correctly.
  • Fixed incorrect error message when the parser fails to find a missing closing parenthesis.
  • Fixed occasionally-incorrect parsing of expressions of the form arr[x()] or similar.
  • Fixed parser errors at keyword tokens not informing you of what keyword it's confused about.
  • Fixed all Interactive Mode statements occurring only as statements within /main().
  • Fixed indirect access of methods and functions not working (doing /foo() instead of foo(), etc)
  • Fixed several math functions not checking the number of arguments given before trying to access them.
  • Fixed expressions like .1234 not being valid numbers.
0