Releases: Altoids1/Joao
Releases · Altoids1/Joao
João v2.3
João got a lot of well-deserved polish in this one!
Optimizations
- Retrieval of members from Objects is now slightly faster, leading to about a 5% speed increase in object-heavy programs.
Features
- João's interactive mode (a REPL) is now fully functional, with a wonderful ASCII-art header and complete, dynamic language support.
- João now has (EXPERIMENTAL!) support for running as a Linux daemon. Only available for João compiled under Linux and with Safe Mode enabled.
- Error and warning emissions from João are now in colour on all supported platforms! Enjoy the red.
Fixes
- Fixed misleading errors in interactive mode.
- Fixed João emitting errors into the output stream instead of the error stream.
- Fixed some objects not consistently inheriting
/table
properly.
João v2.2
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 as3
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()
andlog()
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++'sconstexpr
, 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
break
s 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 offoo()
, 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.
João v2.1.1
As the project matures, I'm doing a lot to reduce bugs and maximize test coverage.
Optimizations 🚗
- João now has its own custom hashtable implementation, and a special internal string type to hold write-once strings (think variable names). This has resulted in a 40% speed-up over the previous version!
Bugfixes ✔️
- Fixed small memory leak when instantiating a couple global variables.
- Fixed small memory leak when repetitively using a
/file
Object. - Fixed awful memory leak of tables when they leave scope.
- Fixed rare bug that could cause João to crash if an empty string literal were used.
- Fixed bug that caused all
/file
Objects to share the same filestream. - Fixed deep grandparent-accesses not working.
- Fixed
/input()
being available when under Safe Mode. - Fixed things that derived from
/error
not being throwable. - Fixed runtimes not being catchable by a
try
-block if they occurred in the arguments to a function call. - Fixed runtimes not propagating up the stack correctly
- Fixed
/max()
basically always throwing when called - Fixed
/max()
and/min()
not supporting all types that work with the comparison operators. - Fixed João segfaulting when given a program with no
/main()
function present.
João v2.1.0
João is more ready than ever for production use.
Optimizations 🐇
- Native functions saw a couple optimizations, related to inlining & unnecessary copying. Should cause a slight speed boost when calling these functions.
Features 🧐
- Added a new proc:
/explode()
! Takes in a string and an optional separator character and returns a/table
. The inverse of/table/implode()
. - Added a new method of iteration: the for-each! The syntax is
for(key_variable, value_variable in table_variable)
, wheretable_variable
must derive from or be a/table
. More details will be added to the documentation! - Base-class Tables can now be constructed with a short-hand brace initialization, either in key-value format (
{key1 = value1, "key2" = value2}
) or array-of-values format ({1,2,3,4,5}
). For now, this is a functionality only available for constructing objects of exactly type/table
. - Accessing a
/table
's element through a member access is now valid, as a syntactic-sugary alternative to typical index access. Doing so prefers any typical OOP property or method before querying the table.
Bugfixes 👩💻
- Fixed the
/error/New(code,what)
constructor not always doing a typecheck of itswhat
argument. - Fixed bug that caused certain immediate accesses of function results (as in
foo()[0]
) to not behave correctly. - Fixed bug that caused methods of the same base name (like
/foo/bar()
and/funk/bar()
) to overwrite each other during parsing. - Fixed bug that resulted in expressions like
)"what" .. )"why"))
being valid. - Fixed runtime errors being inaccurate and undescriptive when they occurred during a binary or unary operation.
- Fixed bug that caused functions to fail to return when a return statement was a call to a function from within a code block, i.e.
if(true) { return some_call();}
João v2.0.1
This update focuses on making João more optimized, while also squashing a bunch of bugs.
Optimizations 🏃♀️
- Fixed the Scope class being accidentally copied every time it was used for variable access, resulting in João now running more than twice as fast.
- Removed a few unnecessary string copies, resulting in an additional ~10% speedup.
- The
Scopelet
internal struct no longer has a superfluous string member. Resulted in a 1.4% speedup.
Features 🔋
- The
/file
methods are now better about reporting errors when opening, reading, and writing to files. /file.open()
's second argument, to determine whether the file (if existing) is blanked, now does not require the 2nd argument to be aBool
; it is cast into one implicitly.- João no longer produces a weird temporary file when used in interactive mode.
Bugfixes 🧼
- Fixed member accesses returning a Value of
Function
type with anullptr
inside whenever a member access fails. João safely throws aBadMemberAccess
runtime instead. - Fixed minor memory leak associated with interactive mode.
- Fixed the
typeof()
function not giving reasonable results for Values of typeNull
orFunction
. - Fixed parse failure when using the
../
scoping operator repetitively.
João v2.0.0
Version Two Release
After two months of development, João is fit and ready for use in a serious production environment.
Features 🚀
- João now has a real, working garbage collector! 🥳
- It is now possible to access the results of function calls (even to
New()
!) immediately without needing to assign it to a variable. /pick()
is now, also, a global function which picks one of its arguments at random.- New string function, called
/replace()
!
Bugfixes 🗑️
- Fixed for-loops & while-loops remembering all the variables of the previous iteration (not really a problem but resulted in some undesired garbage collection behaviour)
- Fixed memory leak associated with calling functions
- Improved the parser's resilience to ill-formed code
- Fixed the user being unable to conveniently determine whether a given Value was
null
. - Fixed runtimes associated with testing equivalence between Values of
String
orNull
type and other-typed Values. - Fixed bug with using Bitwise Not on floating-point
Number
s. - Fixed
/table
allocating ridiculous amounts of memory when given large numeric indices. - Fixed
/table
not supporting negative integer/double indices. - Fixed string-indexed values in
/table
s being unremovable. - Fixed
Value::dev_null
hypothetically preserving a Value which doesn't exist anywhere else. - Fixed
/table.remove()
and/table.insert()
not supporting indices that weren't positive integers. - Fixed
JOAO_SAFE
not detecting new indexes in arrays as novel variables to be counted.
João v1.3.0
João is gearing up for use in an actual production environment, so with this update comes a bunch of bugfixes and feature expansions.
Features 😎
- There are now try-catch blocks! As in any other language, these are used to catch exceptions thrown within the try block, to be
catch
ed by the catch() block. - Along with try-catch is a new native type,
/error
, which holds two values by default:errcode
(an integer expressing the error in a vague sense) andwhat
(a String that explains the problem in English). As per usual, novel sub-types can be made by the user. - The
throw
keyword has been added to allow for throwing anything which is an instance of the/error
type, or an instance of a descendant type thereof. - There is now the
input()
function, which takes in string input from stdin. - It is now legal for
return
to take no argument, in which case it returns null. - All sensible binary & unary operations are now implemented. Floating-point bitwise operations will be platform-specific; your mileage may vary!
Bugfixes 👾
- Fixed if-elseif-else chains not properly dumping their AST when AST-dumping is enabled.
- Fixed a bug in the parser that caused negative numbers to be doubled in some contexts.
- Fixed some bugs with particular binary operations.
- Fixed Logical XOR not being detected as a valid operation.
- Fixed bug in how
break
's optional literal arguments were parsed. - ...Honestly probably other bugs too! I haven't made a release in a while, but here's a lot of work in this one!
João v1.2.0
This release focuses on solidifying the behaviour of João by ironing out edge-cases and making it in general a more polished, production-capable product.
Features 📺
- In the globalscope, native functions
random()
andrandomseed()
have been added. - In
/table
, there's a new method:pick()
- You can now properly make classes which inherit from native classes such as
/table
! - João can now take some command line options.
-v
spits out the current version,-h
gives a help dialog listing the command options, etc. - João now has an interactive mode! If called with no arguments or with the
-i
argument, João takes on interactive mode, which allows writing an ad-hoc block within/main()
. - João now features several default global values! The math library now has
PI
andEULER
, and there's also__VERSION
,__VERSION_MAJOR
and other things to provide info on the version of João that the code is running on! - Some behaviour has been moved to flags you may pass to the João executable: the
-e
flag to mark that you want the execution times benchmarked and displayed, and-m
to mark whether you want the return value of/main()
to be put to stdout.
Bugfixes 💅
- Fixed some odd, broken inheritance behavior when building certain complex and overriding object trees.
- Fixed some runtime errors not providing the full, more descriptive runtime error dialogue.
- Fixed a critical bug around initializing a variable within a loop.
- João now better supports complex left-hand sides in assignment statements.
- Fixed weird parsing failures when attempting to access a multi-dimensional table by repetitive use of the bracket operator.
- Fixed a bug that caused João to crash unexpectedly after some runtimes.
- Fixed a bug where long comments on lines with whitespace would complain about "functional code" being on the same line as the comment.
- Fixed buggy behaviour when multiple flags were passed to the executable.
João v1.1.0
Changelog
Features ✅
- Added the ability for João to take command-line arguments, which are passed to
/main()
as atable
, as the first and only argument main() gets. - Runtime Errors now (attempt to) give you a line number where the error occurred, as well as the function or method in which the failure happened.
- There's now helper functions to help figure out the types of things, such as
typeof()
,istable()
,isnull()
, andclassof()
. - Added a library for accessing files, through the
/file
class. - Gave tables some methods, such as
insert()
,remove()
, andimplode()
. - You can now give arguments to
/table/New()
which will become the elements of the table's array upon construction. - Various assignment operators have been added (specifically
+=
,-=
,*=
, and/=
). - You can now use the
include
keyword to include files, which are transplanted into the master file at scantime. - Joao can now be compiled to use an integer type that is not
int
! Amazing! - You can now define the constructor of a given class via giving it a method called
New()
.
Bugfixes 🐛
- Fixed being able to do a local assignment of the same variable multiple times in the same layer of a blockscope
- Fixed bug where assignment & equality operations required a space between the operator and right-hand side.
- Fixed parsing error when using a single-character operator just before a newline
- Fixed typo in joao_MAKEFILE that caused it to not properly delete the binary when using
make clean
- Fixed max() and min() always returning errors when running on more than one argument
- João now compiles with zero warnings on VS 16.9! Woo!
- Several binary operations now work correctly, such as
bool && int
andbool || double
João v1.0.1
Changelog
Features 📈
- João now compiles on Linux, through g++ and the MAKEFILE provided in the repository.
- João now compiles with
noless warnings! 🥳 - The Scanner now returns a descriptive error if it detects a flipped equality operator (such as writing
=<
instead of<=
, etc.)
Bugfixes 🐞
- Accessing a global no longer always returns
true
in some contexts - Fixed the
!
and!=
operators not being parsed correctly in several contexts - Fixed the
<=
and>=
operators not being recognized by the Scanner - Fixed bad parsing of code when expressions of the form
( expression )
were used in particular contexts - Fixed variable names not being able to have numeric characters within them
- Fixed
double % int
returning buggy and incorrect results - Fixed LocalAssignment keywords
Number
,String
,Object
, andBoolean
not always being available in all applicable grammatical contexts - Fixed bug with how
power
expressions are parsed in some situations - Fixed bug in how strings with escape characters (such as
\n
) were scanned by the Scanner - Fixed functions runtiming when not given sufficient arguments -- missing arguments are automatically initialized as
null
.