Releases: koder77/l1vm
L1VM - 3.4.0
L1VM (3.4.0)
Changed the -pack bzip2 bytecode compression to bzip3, which generates more compact files.
-- Stefan Pietzonke [email protected] Sat 22 Mar 2025 21:38 +010
L1VM (3.3.8)
Preprocesso: show line number in macro errors.
Preprocessor: second pass removed. Now error messages show the right line numbers!
VM: added two new interrupts to switch memory bounds check on push/pull opcodes:
(:memory_bounds_off !)
(:memory_bounds_on !)
If it is switched off then the execution speed can increase a lot.
But the overflow checking is disabled for push/pull opcodes!
Added "unsafe" and "unsafe-end" code blocks.
Inside a unsafe block the memory bounds checking can set on/off.
See example "prog/little-vm.l1com".
Added variable prefixes:
(\num\x * \num\y \num\z :=)
So here is the prefix: \num\
All variables must have the same prefix like the target variable \num\z.
So here \num\ is a special type all variables in the math expression must have.
See "prog/type.l1com".
-- Stefan Pietzonke [email protected] Sat 08 Mar 2025 12:57 +010
L1VM - 3.3.7
L1VM (3.3.7)
VM/MPFR module Windows and macOS build scripts: memory bounds added.
-- Stefan Pietzonke [email protected] Fri 21 Feb 2025 32:00 +010
L1VM - 3.3.6
Added "repair multi spaces" function to compiler.
It fixes the two or more spaces problem between tokens.
(set string 13 hello "Hello world!")
will be changed to:
(set string 13 hello "Hello world!")
For the other changes see ChangeLog!
L1VM - 3.1.5
L1VM (3.1.5)
Compiler: added := as assign operator for expressions too.
So you now should use := as the assign operator for new programs.
The old way of using = still works. This is backwards compatible
and older programs still compile.
-- Stefan Pietzonke [email protected] Tue 21 May 2024 15:57 +020
For older changes see ChangeLog!
L1VM - 3.1.0
L1VM (3.1.0)
NEW: linter now checks if function arguments are in right order at "stpop" call.
-- Stefan Pietzonke [email protected] Wed 24 Apr 2024 21:14 +020
L1VM (3.0.10)
NEW: preprocessor reuse alredy set defines bugfixes.
-- Stefan Pietzonke [email protected] Sat 06 Apr 2024 22:00 +020
L1VM - 3.0.0
L1VM (3.0.0)
NEW: now math expressions can be written like this in Brackets:
{i = xd + yd}
The () brackets are not longer needed for this, to work.
The old way was:
{i = (xd + yd)}
-- Stefan Pietzonke [email protected] Thur 1 Feb 2024 21:18 +0100
L1VM (2.9.0)
Added "return" to compiler. See "prog/return.l1com".
-- Stefan Pietzonke [email protected] Thur 1 Feb 2024 15:54 +0100
L1VM (2.8.8)
NEW: Added "tab" to SDL multiline string gadget. With the "tab" key you can insert spaces to "wrap" to the next input line.
See program "lib/sdl-lib-test.l1com".
-- Stefan Pietzonke [email protected] Sun 28 Jan 2024 20:05 +0100
L1VM -2.8.7
After a longer time this is the L1VM release of 2.8.7.
Here is the ChangeLog from the old release till now:
L1VM (2.8.7)
Added SDL GUI module set_gadget_menu, see: "lib/sdl-lib-test-menu.l1com"!
-- Stefan Pietzonke [email protected] Thu 18 Jan 2024 22:53 +0100
L1VM (2.8.6)
The preprocessor now removes empty .md documentation files.
The "l1vm-build.sh" script checks now if a "out.md" file exists and copies it if so.
-- Stefan Pietzonke [email protected] Thu 18 Jan 2024 18:55 +0100
L1VM (2.8.5)
Added vm/modules/string: MSYS2 fixing false positive BOUNDSCHECK array overflow messages.
-- Stefan Pietzonke [email protected] Son 14 Dec 2023 01:38 +0100
L1VM (2.8.4)
Added net module read/write byte arrays
-- Stefan Pietzonke [email protected] Son 31 Dec 2023 15:18 +0100
L1VM (2.8.3)
Added l1vmgodata links between keys added.
See l1vmgodata on GitHub.
-- Stefan Pietzonke [email protected] Sat 23 Dec 2023 18:49 +0100
L1VM (2.8.2)
l1pre preprocessor:
Added:
#docustart
#docuend
You can write documentation inside this two flags.
The preprocessor outputs this into "out.md" Markdown file.
See "prog/math-circle-bignum" for an example.
Added crypto module public/private keys generation and encryption/decryption.
BUGFIX: compiler line: main.c 1786 and following: variable to array assign code fixes.
Added crypto module key hashing and testing functions.
Added crypto module single key generation via password.
-- Stefan Pietzonke [email protected] Mon 18 Dec 2023 18:33 +0100
L1VM (2.8.1)
VM: added "-fPIE" flag to RELRO zerobuild scripts.
-- Stefan Pietzonke [email protected] Mon 27 Nov 2023 19:10 +0100
L1VM (2.8.0)
Now I did change the way how local and global variables are used.
I did add two new compiler flags:
(variable-local-on)
(variable-local-off)
If the flag is set to one then only the current function local variables and the main function global variables can be accessed.
You need to use this in your main function:
#var ~ main
So all variables in main are set with the "main" ending:
(set int64 1 foo~ 12)
This variable would be named "foomain".
If you want to see an example then have a look at: "prog/math-circle-bignum-2.l1com".
UPDATE: string module: all MAXLINELEN now replaced by MAXSTRLEN!
NEW: I did add a experimental install script for NetBSD. It may not work at all.
I need to test it on my NetBSD installation.
-- Stefan Pietzonke [email protected] Sat 18 Nov 2023 18:06 +0100
L1VM (2.7.3)
Update: now the network module uses a read/write buffer on the file send function.
This gives a very high speedup!
-- Stefan Pietzonke [email protected] Sun 12 Nov 2023 17:40 +0100
L1VM (2.7.2)
I did set a maximum source code line length tp 512 chars.
The default settimng was 4096 and this was way to high for programs with a lot of lines.
Update: now the network module uses a read/write buffer on the file send function.
This gives a very high speedup!
-- Stefan Pietzonke [email protected] Fri 10 Nov 2023 17:09 +0100
L1VM (2.7.1)
NEW: MPFR module: mp_set_float_prec function to set numbers base and precision (internal bits).
So you can calculate with real big numbers.
See prog/primes-bignum.l1com.
-- Stefan Pietzonke [email protected] Mon 06 Nov 2023 19:51 +0100
L1VM (2.7.0)
I did change the way how the global data is used.
It is now possible to allocate local data in a thread.
The "data_local_alloc" interrupt allocates local memory and copies the whole global data in it.
So all data accesses in the thread are local. As long as you don't switch to global data.
See "prog/hello-thread-3-local.l1com" and "prog/webserver-thread-local.l1com".
-- Stefan Pietzonke [email protected] Mon 23 Oct 2023 20:56 +0200
L1vM (2.6.7)
Update: memory module init code fixes.
-- Stefan Pietzonke [email protected] Sat 20 Oct 2023 23:00 +0200
L1VM (2.6.6)
JIT-compiler code cleanup.
VM: JIT_code cleanup fixed if VM runs without arguments set.
-- Stefan Pietzonke [email protected] Wed 11 Oct 2023 16:51 +0200
L1VM (2.6.5)
Compiler update: added set const-bool and mut-bool variable definitions.
Syntax highlighters update.
VM: JIT-compiler code cleanup. JIT_code_ind removed
-- Stefan Pietzonke [email protected] Tue 10 Oct 2023 22:26 +0200
L1VM (2.6.4)
Cells module update: added dealloc node links function.
-- Stefan Pietzonke [email protected] Fri 06 Oct 2023 19:28 +0200
L1VM (2.6.3)
Net module socket_write_string: possible buffer overflow fix!
-- Stefan Pietzonke [email protected] Sun 01 Oct 2023 20:35 +0200
L1VM (2.6.2)
New: compiler flags:
(variable-immutable) (variable-mutable) to set the default behavior on variables.
See demo prog/hello-mut.l1com!
Update: syntax highlighters to contain new "mut-byte" etc. variable definitions.
NEW: most installation scripts now install the binaries and libraries into ~/l1vm/bin
You have to set this directory in your PATH and LD_LIBRARY_PATH env variables!
-- Stefan Pietzonke [email protected] Sun 01 Oct 2023 10:31 +0200
L1VM (2.6.1)
Added string module string mid to byte function.
Update: Clang toolchain git build.
Debian build scripts updated to use clang-15 for zerobuild build.
Cells module added safety checks for cell numbers.
-- Stefan Pietzonke [email protected] Sat 30 Sep 2023 11:04 +0200
L1VM (2.6.0)
2023/summer reloaded version :)
String module:
Added string_array_sort to string module.
Added string_array_search string search function.
Math vect module:
Array search added.
prog/launcher/ added. A tiny launcher program for my SDL/GUI programs.
Added OTP crypt/decrypt programs.
Fixed file-tools module.
-- Stefan Pietzonke [email protected] Tue 12 Sep 2023 17:24 +0200
L1VM (2.5.1)
Version now is 2.5.1.
NEW: preprocessor now can use multiline definitions in included file too!
NEW: min/max values of an array can now be get by the new math-vect functions:
vmath_min_int, vmath_max_int, vmath_min_double, vmath_max_double
See prog/array-min-max.l1com example!
Array sort functions for int64 and double arrays added.
Array average number functions added.
Array clear function aded.
-- Stefan Pietzonke [email protected] Wed 24 Aug 2023 05:49 +0200
L1VM (2.5.0)
VM: modules total cleanup, global variables for memory_bounds now copied to module on module load.
loops.l1h added, it has some loops defining macros
l1pre update: replace_macro error messages fixes.
Added inc () and dec () macros in misc-macros to increase/decrease an integer by one.
See hello-math-3.l1com.
NEW: prepro: #replace and #noreplace block markers. To switch preprocessor replace of macros on and off.
See prog/hello-math-3.l1com example.
BUGFIX: mpfr big num module: init_memory_bounds now is extern "C".
NEW: preprocessor now can use multiline definitions in included file too!
-- Stefan Pietzonke [email protected] Tue 22 Aug 2023 17:02 +0200
L1VM (2.4.3)
VM: RS232 module code cleanup.
-- Stefan Pietzonke [email protected] Wed 11 Jul 2023 17:38 +0200
L1VM - 2.4.2
This is the L1VM 2.4.2 release with official Haiku OS support.
ChangeLog:
L1VM (2.4.2)
NEW: This version has the working Haiku installer scripts.
So Haiku OS is now official supported.
-- Stefan Pietzonke [email protected] Fri 7 Jul 2023 17:09 +0200
L1VM (2.4.1)
BUHFIX: The compiler now checks if a variable was already defined at "set".
So this will result in an error!
BUGFIX: now the infix/RPN parser works again! Sorry for this!
Added "install-zerobuild-openbsd.sh" experimental install script for OpenBSD.
Added VM range check now prints out variable value and min max values.
Set STACKSIZE in include/global.h to 4096 bytes. Should be enough!
NEW: VM "get_size" interrupt 33 pointer variable to get the variable size in bytes.
NEW: added "print_lni", "print_lnd" and "print_lns" macros int "intr.l1h" to print variables with a new line at the end.
NEW: l1pre now has multiline @@ line split chars.
NEW: Haiku port: RS232 module now uses Haiku RS232 port names too!
I did also build the FANN library and copied it into the Haiku libs folder.
You have to download the FANN library source code.
Then you need to configure it:
$ cmake . -DCMAKE_INSTALL_PREFIX=/boot/home/config/non-packaged
$ make install
Now you can build the L1VM FANN module.
NEW: now code and data are erased before freeing the RAM.
Debian install scripts now use clang-15 package for install and build.
-- Stefan Pietzonke [email protected] Thu 6 Jul 2023 22:03 +0200
L1VM (2.4.0)
NEW: l1pre now shows optional include path in info function.
-- Stefan Pietzonke [email protected] Fri 12 May 2023 21:42 +0200
L1VM (2.3.0)
NEW: compiler: type check in infix/RPN parser (parse-rpolish.c). If types of int and double are mixed then it results in a compile error!
Also gives an error if the variable inside a math expression is an array!
NEW: checks on variable to array and array to variable: make sure variable type is not array on assign:
(array tarray [ index ] =) -> error
(tarray [ index ] array =) -> error
Preprocessor now gives error message if #include is with quotes " ", instead of < >.
So if not an Brackets source code file is compiled, you get an error message!
Added checks if source code line has brackets or not. Give a compiler error if no brackets are found in line.
So the Brackets compiler now does not crash any mor on non Brackets source code files!
BUGFIX: file/open did not set file open flag.
BUGFIXES: ciphersaber module now works!
NEW: now the l1vm-build.sh script searches for includes in the current folder too!
ADDED a unit test demo.
NEW: time module: added better string overflow checks.
-- Stefan Pietzonke [email protected] Fri 12 May 2023 13:09 +0200
L1VM (2.2.0)
NEW: The Brackets compiler has now an object type for some OOP style functions.
See: prog/math-circle-oop.l1com!
NEW: include/settings.h now sets 256 chars MAXSTRLEN and 256 chars MAXLINELEN on LOW_MEM setting activated by "1"!
To save memory in the compiler.
BUGFIXES: memory module string code fixes. New function "cleanup" to free all memory allocs on "free_mem" global memory free call!
NEW: memory objects module now calls cleanup function on global memory free.
NEW: compiler: added compile time output.
BUGFIXES: file module: file open function now sets right file open/closed flag.
NEW added new text for copyright.
-- Stefan Pietzonke [email protected] Sun 23 Apr 2023 16:43 +0200
L1VM (2.1.1)
prog/hello-math-stack.l1com added
Compiler: -wall flag added to set all -w warning flags!
README update.
-- Stefan Pietzonke [email protected] Tue 28 Feb 2023 18:20 +0100
L1VM - 2.1.0
This is the L1VM 2.1.0 release:
L1VM (2.1.0)
Security BUGFIX: JIT-compiler now checks if code at given index is compiled or not. Resulting in an runtime ERROR if no code found!
Updated README.md.
NEW: now in the infix/RPN parser you can write a short name for the target variable: _ like this:
{target = (_ + x + (_ * y))}
Every _ will be replaced by "target"!
See prog/hello-target-shortname.l1com.
NEW: VM stack interrrupt 0: 32 stack_type returns the type on the top of the stack.
See prog/stack.l1com! And include/intr.l1h.
Update: include/vars.l1h stack types added.
-- Stefan Pietzonke [email protected] Tue 7 Feb 2023 20:46 +0100
L1VM (2.0.7)
Updated copyright in global.h to 2023.
NEW: now legal value ranges for variables can be set:
(x x_min x_max range)
See prog/hello-ranges.l1com
NEW: -wsetundef compiler flag now shows the variable name in the message!
NEW: data cloud now can load/save all data bases too!
See datacloud.l1h!
NEW: datacloud 3x1 worker update, now using even/odd args for worker runs.
NEW: module not load check on module function call.
NEW: math-3x1-cluster/3x1-worker.l1com example added. It outputs a l1vmgodata database with the given input range of the 3x1 problem.
NEW: now all module function call on unset functions exit the VM by an error.
So not initialized functions cause this new error!
-- Stefan Pietzonke [email protected] Fri 27 Jan 2023 19:29 +0100
L1VM - 2.0.6
L1VM (2.0.6)
NEW: compiler flag: "-wsetundef" warns if a variable has no value set!
NEW: compiler flag: "-wvarunused" warns if defined but unused variables are found!
NEW: fann module: train, save and train from data file functions added.
Examples in /lib: train_fann.l1com and train_fann_file.l1com.
FANN module code cleanup. Now uses pointers for the input/output vars.
NEW: string module demo update, string-tools.l1h now uses string_left and string_right in string replace function.
-- Stefan Pietzonke [email protected] Thu 12 Jan 2022 20:33 +0100
L1VM (2.0.5)
Code cleanup.
NEW: Compiler now exits on first "code list full" error message.
BUGFIXES: vm/modules/file-tools.
BUGFIX: vm/file file_close now checks if file handle was open.
NEW: before JIT compile blocks you can now use (x load) to load a int64 or double number into a register.
So the code inside the JIT compiled block can do calcualtions without "unknown" opcodes in it!
NEW: "m=" assign to use the "move" opcode if both variables are in registers.
See "prog/hello-move.l1com" for more!
(xd id m=)
Moves variable "xd" to "id" var.
-- Stefan Pietzonke [email protected] Thu 24 Nov 2022 23:01 +0100
L1VM (2.0.4)
NEW: lib/array.l1com, include/array.l1h functions to assign variable lists to arrays.
Added lib/json-l1com and include/json.l1h with functions for parsing json strings.
BUGFIXES: string module: string mem search function now sets string search start position right!
NEW: string module now has the "string_parse_json" function!
See lib/strin.l1com.
-- Stefan Pietzonke [email protected] Tue 25 Oct 2022 18:20 +0200
L1VM (2.0.3)
NEW: interrupt 0: 31: pointer_type to get the pointer variable type.
NEW: added nested code to switch statement: switch.
-- Stefan Pietzonke [email protected] Fri 14 Oct 2022 11:57 +0200
L1VM (2.0.2)
BUGFIX: compiler: nested-code-off added continue statement to fix operator not known error!
-- Stefan Pietzonke [email protected] Mon 3 Oct 2022 23:30 +0200
L1VM (2.0.1)
NEW: mem library now has string_to_array and array_to_string functions.
NEW: filetools directory read now has index start and end flags to read a part of the filelist.
See "lib/file-tools-dir.l1com" example!
BUGFIXES: string module: array functions index overflow check fixed!
BUGFIX: string.c searchstr now gives the right position of the substring, if searched by a startpos greater than 0!
-- Stefan Pietzonke [email protected] Thu 27 Oct 2022 17:11 +0200
L1VM (2.0.0)
NEW: check_pointer interrupt. See prog/people-object.l1com for more!
NEW: memory object function: get_obj_mem_type to return the type of a memory object index.
-- Stefan Pietzonke [email protected] Wed 14 Sep 2022 20:30 +0200
L1VM (1.9.0)
NEW: module file-tools added: file_copy, directory_create, remove_all, file_rename, file_size_bytes, file_exists
NEW: directory file list read added.
-- Stefan Pietzonke [email protected] Sun 11 Sep 2022 13:54 +0200
L1VM (1.8.0)
NEW: now nested code flag is set to 1 on function start.
init_registers () is then called at: if, else, endif, for, next, do, while, switch ? statements.
This removes the need for "reset-reg" call in the code.
Syntax highlighters updated: "nested-code-off" added.
-- Stefan Pietzonke [email protected] Thu 1 Sep 2022 15:57 +0200
L1VM (1.7.2)
NEW: compiler now exits with error if no main function is defined.
-- Stefan Pietzonke [email protected] Sat 20 Aug 2022 12:23 +0200
L1VM (1.7.1)
NEW: VM: main.c show -p flag infos.
NEW: scripts in distribution now use "bash" as the shell, this fixes some errors!
FIXES: compiler now gives error if label is defined twice. And if function name already used.
Compiler: update: now "stpop" opcode to loadreg code part set.
Added script to build and install latest Clang from GitHub.
NEW: prog/bool.l1com include/bool.l1h : define variable true/false.
Now boolean variable assign is checked by the "bool" command:
(bool true Bool =)
Only "true" or "false" are allowed in this expression!
Here the variable "Bool" will be set to "true".
Compiler:
NEW: new "bool" variable type in "set" variable setting.
The bool variable name must begin with a uppercase "B"!
// boolean variable name must beginn with upercase B!
(set bool 1 Bool 1)
The parser checks if the boolean variable is used in a normal math expression and returns an error if so!
This also includes the RPN parser and the infix expression parser.
NEW: more mono fonts added. Moved standard free mono font into /free.
NEW: now you just can do:
(true Bool =)
to set a boolean variable!
-- Stefan Pietzonke [email protected] Fri 26 Aug 2022 21:40 +0200