Agena Changelog

New in version 2.2.6

September 8th, 2014
  • `stats.chauvenet` can now check specifically for lower or upper outliers by passing the option `outlier='lower'` or `outlier='upper'`, respectively.
  • `bags.remove` caused segmentation faults. This has been fixed. Moreover, all `bags` functions implemented in C have been internally changed.
  • The (undocumented) metamethods for `+`, `-`, and `*` did not work if the `bags` package has not been invoked with the `with` function or the `import/alias` statement. This has been fixed.

New in version 2.3.0 RC1 (September 8th, 2014)

  • Numeric `for` loops now support the `downto' keyword so that you can count down without using an obligatory negative `by` step size. In the `downto' context, the `by' step size should always be positive. `from' start and `to' stop values are obligatory when using the `downto' keyword.
  • The metamethods '__finite', '__entier', and '__sqrt' are no longer supported. Instead, three new metathods for operations on structures have been added: '__union' for union operations, '__intersect' to determine intersections, and '__minus' for differences. Thus, the `bags` package now also supports these three operations.
  • The `\` integer division operator did not support its metamethod and used the one for float divison (`/` operator) instead. This has been fixed.
  • The new function `stats.gini` determines the Gini coefficient, a measure of (in-)equality.
  • The new function `stats.zscore` returns a function computing the z-score (standard score) of a sample - the number of standard deviations the sample is above or below the mean of a distribution.
  • `stats.sorted` now by default uses the Introsort algorithm instead of Quicksort. This can speed up computation time thrice in ill-conditioned situations (where Quicksort would need O(n^2) operations), while not sacrificing performance in ordinary situations. Actually, Introsort uses Quicksort by default and then automatically switches to Heapsort if the recursion depth reaches 2*log(n, 2), where n is the number of elements in a structure.
  • You may override this logic by passing the new option 'quicksort' which solely uses the traditional recursive Quicksort method to sort numbers. Also, `stats.sorted` now also can use the Heapsort algorithm exclusively if the new option 'heapsort' is being passed, and a non-recursive Quicksort algorithm devised by Niklaus Wirth with the new option 'nrquicksort'.
  • The new function `stats.meanmed` returns both the arithmetic mean and the median of a distribution, or alternatively the quotient of the mean and the median, speeding up computation times when these values are needed by around 20 percent.
  • Improved the error message of the `size` operator.

New in version 2.1.1 (January 6th, 2014)

  • New functions and patches:
  • `try/catch`: explicit specification of an error variable right after the `catch` token is now optional. If no error variable is given, then the error message is automatically stored to the local `lasterror` variable, and the `then` keyword must be left out:
  • > try
  • > error('oops !')
  • > catch
  • > print(lasterror)
  • > yrt;
  • oops !
  • The `try/catch` statement sometimes did not work in procedures (unassigned error variable). This has been fixed.
  • The new `net.wget` function downloads HTML pages from the Web.
  • Tuned `skycrane.counter` by 10 %. The function now optionally applies the Kahan-Ozawa instead of the original Kahan summation algorithm if the new third argument is the string 'ozawa'. The corresponding C sources have been modified to prevent compiler optimisation, which could cancel the optimisations, as well.
  • `argerror` now prints the user-defined type name of a value received in its error message. If a value does not have a user-defined type, then its basic type is issued.
  • The new 'a' option to `debug.getinfo` returns the number of arguments expected by a procedure, thanks to Rob Hoelz' LuaPowerPatch.
  • Improved `index out-of-range` error message for strings.
  • Modified the `stats.agn`, `linalg.agn`, `library.agn`, and `ansi.agn` files with respect to their error handling.

New in version 2.1.0 (December 30th, 2013)

  • For a new kind of error handling, the new `try/catch` statement has been introduced. It has been invented and written by Hu Qiwei for Lua 5.1 back in 2008.
  • In general, any statements where an exception might be expected can be put into a `try` clause. If an error is issued, generated by an explicit call to the `error` function or to any other expression, function, or statement, control immediately jumps to the corresponding `catch` clause if present or to the end of the `try/yrt` statement if no `catch` clause has been given, ignoring any other subsequent statements in the `try` clause.
  • The `protect/lasterror` error dealing facilities are still and will always be supported. The new control statement also works with the `break`, `skip`, `redo`, and `return` statements flawlessly.
  • The new `redo` statement restarts the current iteration of a `for/to` and `for/in` loop from the beginning.
  • The new `recip` operator returns the inverse of a number x. It is equivalent to the expression 1/x, but faster.
  • The new `stats.ema` function computes the exponential moving average of a distribution. The new function `stats.gema` returns an iterator function returning the respective exponential moving average of a distribution.
  • `*%`, `+%`, and `-%` returned `undefined` instead of a correct result if their right operand had been zero. This has been fixed.
  • Fixed an error message in `net.survey`.
  • Improved error messages for out-of-range indexing of pairs and strings.
  • In the ANSI, Solaris, and DOS versions, the `int` operator has been tuned.
  • The new C API function `agn_arraytoseq` converts a numeric array into a sequence and pushes this new sequence on top of the stack.
  • Updated the manual.

New in version 2.1.0 RC (December 19th, 2013)

  • The new `redo` statement restarts the current iteration of a `for/to` and `for/in` loop from the beginning. Example:
  • > flag := true; > for j in [10, 11, 12] do > print('before', j, flag); > if flag and j = 11 then > clear flag; > print(' -->', j, flag, 'jump back') > redo > fi; > print('after', j, flag) > until j > 12; before 10 true after 10 true before 11 true --> 11 false jump back before 11 false after 11 false before 12 false after 12 false
  • The new `recip` operator returns the inverse of a number x. It is equivalent to the expression 1/x, but faster.
  • The new `stats.ema` function computes the exponential moving average of a distribution. The new function `stats.gema` returns an iterator function returning the respective exponential moving average of a distribution. For its usage, please have a look into the src/stats.c source file, C functions *ema.
  • `*%`, `+%`, and `-%` returned `undefined` instead of a correct result if their right operand had been zero. This has been fixed.
  • Fixed an error message in `net.survey`.
  • The new C API function `agn_arraytoseq` converts a numeric array into a sequence and pushes this new sequence on top of the stack.

New in version 2.0.0 (December 2nd, 2013)

  • New statements and functions:
  • Agena 2.0 is downward-compatible to Agena 1.12, except that the tokens `import`, `alias`, `until`, and `onsuccess` are now keywords and can no longer be used as variables. Currently, there are Solaris, Debian (x86, PowerPC, Raspberry Pi), Windows, Mac, and DOS installers available for 2.0, including an updated Primer and Reference that explains all new features in detail.
  • The new loop variants `for/as` and `for/until` check a condition at the end of the current iteration and either commence the next iteration or leave the loop. This works with both `for/to`, as well as `for/in` loops. In effect, both variants execute a loop at least once until the given condition is being checked.
  • Examples:
  • > for i to 5 do
  • > print(i)
  • > as i < 3
  • > for i in [1, 2, 3, 4, 5] do
  • > print(i)
  • > until i >= 3
  • The new `do/until` loop iterates until a certain condition is met:
  • > c := 0;
  • > do
  • > inc c;
  • > print(c)
  • > until c >= 3
  • In numeric `for` loops, the `to` clause may not be given any longer. Instead, when leaving out the `to` clause, the loop iterates until the largest number representable on your platform, in C HUGE_VAL, has been reached:
  • > for i do
  • > print(i)
  • > od
  • The new `onsuccess` clause in `if` and `case` statements executes a chunk if at least one of the conditions is true. Examples:
  • > flag := false;
  • > if 1 = 0 then
  • > print(0)
  • > elif 1 = 1 then
  • > print(1)
  • > onsuccess
  • > flag := true
  • > else
  • > print(-1)
  • > fi;
  • > print(flag);
  • true
  • > flag := false;
  • > if 1 = 0 then
  • > print(0)
  • > elif 1 = 0 then
  • > print(1)
  • > onsuccess
  • > flag := true
  • > else
  • > print(-1)
  • > fi;
  • > print(flag);
  • false
  • > flag := false;
  • > a := 2;
  • > case a
  • > of 1 then
  • > print(1)
  • > of 2 then
  • > print(2)
  • > onsuccess
  • > flag := true
  • > else
  • > print(-1)
  • > esac;
  • > print(flag);
  • true
  • The new `import` statement allows to import one or more libraries without putting their names into quotes, e.g. "import calc, stats" is equivalent to "readlib('calc', 'stats')".
  • The `alias` option to the `import` statement assigns one or more short names to the library functions initialised, e.g. "import calc alias xpdiff" is equivalent to "with('calc', 'xpdiff')", and "import calc alias" is equivalent to "with('calc')".
  • The new `..` operator allows to index tables even if its left-hand side operand evaluates to `null`. In this case, `null` is returned and no `attempt to index field ... (a null value)` error is issued. It is similar to the `getentry` function but is three times faster. Examples:
  • > create table a;
  • > a.b:
  • null
  • > a.b.c:
  • Error in stdin, at line 1:
  • attempt to index field `b` (a null value)
  • > a..b..c:
  • null
  • > create table a;
  • > a[1]:
  • null
  • > a[1][2]:
  • Error in stdin, at line 1:
  • attempt to index field `?` (a null value)
  • > a..[1]..[2]:
  • null
  • The new function `drem` evaluates the remainder of an integer division x/y, but contrary to `irem`, rounds the internal quotient x/y to the nearest integer instead of towards zero.
  • The new function `skycrane.todate` returns the current date and time as a formatted string.
  • The new function `io.truncate` truncates a file at the current file position.
  • The new function `io.move` changes the file position a given number of characters to the left or right.
  • The new function `io.filesize` returns the size of a file.
  • `readlib` now accepts strings as its arguments, only. Numbers are not allowed any longer.
  • If the last argument to `with` is the Boolean `false`, then the function does not write assigned short names to the console (stdout).
  • `strings.fields` now also accepts a sequence of index numbers. It does not, however, accept the index `0` any longer.
  • The Raspberry Pi Wheezy Debian installer now includes the `gdi` graphics package.
  • The `change.log` file is now correctly displayed in Windows.

New in version 2.0.0 RC3 (November 19th, 2013)

  • The new loop variants `for/as` and `for/until` check a condition at the end of the current iteration and either commence the next iteration or leave the loop. This works with both for/to, as well as for/in loops.

New in version 2.0.0 RC2 (November 16th, 2013)

  • The new loop variants `for/as` and `for/until` check a condition at the end of the current iteration and and either commence the next iteration or leave a loop. This works with both for/to, as well as for/in loops.

New in version 2.0.0 RC1 (November 15th, 2013)

  • The new `import` statement allows to import one or more libraries without putting their names into quotes, e.g. "import calc, stats" is equivalent to "readlib('calc', 'stats')".
  • The `alias` option to the `import` statement assigns one or more short names to the library functions initialised, e.g. "import calc alias xpdiff" is equivalent to "with('calc', 'xpdiff')", and "import calc alias" is equivalent to "with('calc')".
  • The new `..` operator allows to index tables even if its left-hand side operand evaluates to `null`. In this case, `null` is returned and no `attempt to index field ... (a null value)` error is issued. It is similar to the `getentry` function but is three times faster.

New in version 1.12.9 (November 14th, 2013)

  • The new functions `io.getclip` and `io.putclip` exchange texts between Agena and the clipboard (Windows only).
  • `stats.prange` has been rewritten in C and has become up to 60 % faster.
  • `os.cpuinfo` now returns correct and more information on ARM-based systems.
  • In DOS and UNIX systems including Mac OS X and only in the complex domain, the exponentiation of the base 0 to the exponent 0 + r*I, with r any non-zero float, returned `undefined` instead of 0. This has been fixed.
  • In DOS and UNIX systems including Mac OS X and only in the complex domain, the exponentiation of the base 0 to the exponent r + 0*I, with r any positive float, returned `undefined` instead of 0. This has been fixed.
  • `stats.obcount` and `stats.obpart` could not include values into the rightmost subinterval. This has been fixed.
  • `calc.nakspline`, `calc.naksplinecoeffs`, `calc_clampedspline`, and `calc_clampedsplinecoeffs` provoked segmentation faults if called with a structure that contained too few points, i.e. pairs. This has been fixed by returning `fail` in these cases.
  • Potential memory deallocation errors have been removed from `calc.neville`, `calc.interp`, `calc.newtoncoeffs`, `calc.naksplinecoeffs`, `calc.clampedsplinecoeffs`, `calc.nakspline`, and `calc.clampedspline`.
  • The new C API function `agn_checkinteger` checks whether an argument is a number and an integer and - contrary to `luaL_checkinteger` - issues an error otherwise.

New in version 1.9.0 (January 29th, 2013)

  • The new `alternate` function returns its first argument if its second argument is `null`. Otherwise it returns its second argument.
  • The -b switch to the Agena executable has been removed since its output had been the same as the -v option.
  • The Windows and UNIX/Mac versions of `strings.utf8size` contained a potential memory leak; this has been changed.
  • All binary DLLs/SOs of the plus libraries no longer contain unused code, slimming their sizes by up to 10 percent, depending on the operating system. The makefile and the sources previously importing unused header files have been changed. For example, this at all reduces the size of the Windows binaries by 55 kBytes.
  • Extended the test suite.
  • Updated the scheme files.

New in version 1.6.0 (May 24th, 2012)

  • New Functions and Features:
  • The new function `checktype` determines whether all values in a structure are of a given type.
  • The new function `isint` checks whether all of its arguments are integers.
  • The new function `strings.dleven` returns the Damerau-Levenshtein distance of two strings.
  • The new function `stats.ad` determines the absolute deviation of all the values in a structure.
  • The new function `stats.countentries` counts the number of occurrence of all the elements in a structure.
  • The new function `stats.deltalist` returns a structure of the deltas of the respective neighbouring elements.
  • The new function `stats.gmean` returns the geometric mean of a structure.
  • The new function `stats.hmean` returns the harmonic mean of a structure.
  • The new function `stats.ios` returns a proven indicator on stability in a distribution.
  • The new function `stats.iqr` returns the interquartile range.
  • The new function `stats.issorted` checks whether all numbers in a structure are sorted in ascending order.
  • The new function `stats.moment` computes the moment of the given data about an origin.
  • The new function `stats.numbperm` returns the number of permutations.
  • The new function `stats.percentile` determines percentiles.
  • The new function `stats.skewness` returns the skewness, an indicator of the symmetry of a probability distribution.
  • The new function `stats.sumdata` sums up all the powers of a structure about an origin.
  • `stats.tovals` is now a C library function and thus is up to 40 percent faster.
  • With an empty table or sequence, `stats.qmean`, `stats.mean`, `stats.gmean`, `stats.sd`, `stats.median`,
  • `stats.var` now return fail.
  • The maximum length for an input line in the stand-alone interpreter has been changed from 512 to 2048 characters.
  • The new environment variable `environ.maxpathlength` stores the maximum number of characters for a file path (excluding C's \0 character).
  • The new environment variables `environ.minnumber` and `environ.maxnumber` hold the minimum and maximum value an Agena number (currently an ANSI-C double) can store.
  • The new environment variable `environ.umaxlong` includes the maximum integral value of the C type unsigned long on 32+bit systems, and unsigned long on 16bit machines.
  • C API:
  • 100 % compatibility of the Agena C API to Lua's C API has been re-established by introducing Lua's *dump functions. Thus you are now able to store functions in a binary representation, e.g. by using `strings.dump` or lua_dump on the C level.
  • Introduced the new `agnL_optboolean` function to check for optional Boolean arguments and return them in case of success.
  • Bug Fixes:
  • `environ.globals` always quit with an error, this has been fixed.
  • `assume` returned false with both of its arguments being or evaluating to 'undefined'. It now returns true in this case.
  • Agena crashed when passing an empty table and a delimitor to `join` - this has been fixed.
  • The `colour` option is no longer being ignored by `gdi.plot`.
  • With tables, `stats.minmax` returned a wrong value for the minimum. It now works correctly.
  • With an empty table, `stats.median` returned 0, now it returns fail.
  • Contrary to the documentation, `strings.isending` returned 'true' with both strings being equal. This has been fixed.
  • `run` returned `could not open file` if an existing Agena script included a syntax error. This has been fixedby completely rewriting the function.
  • Added Lua 5.1.4 patch 9: "Wrong code generation for some particular [e.g. complex] boolean expressions."
  • Added Lua 5.1.4 patch 11: "Parser may collect a prototype while building it."
  • * Info: Adding Lua 5.1.4 patch 10, "[__write/__new]index metamethod may not work if metatable is its own metatable", to Agena is not necessary, for Agena already works correctly in this case.
  • Removed the unused keyword `default`.
  • Some hardening of functions and features.
  • Enhancements:
  • Added an _experimental_ version of `io.anykey` to the Mac version. However, at least on Lion, the key being pressed sometimes is echoed on the shell.
  • `utils.readcsv` now can optionally return all values in a CSV file in a flat sequence.
  • The `clock` package now supports the division operator `/` by adding it to its `tm` operator's metatable.
  • The behaviour of `with` has been changed for it could not assign short names for many library functions: If functions have been put into the .aux table, do not assign short names for these function names; otherwise assign short names for _all_ other package functions. Thus: `package.register` to register all the library functions for `with` to assign short names, is no longer needed. It will be deprecated in one of the following releases.
  • Improved the test suite.
  • Manual:
  • Improved the manual and the index.
  • Consistency:
  • For all of the following renamings, the following old variable names are still supported.
  • `environ.MinLong` has been renamed to `environ.minlong`.
  • `environ.MaxLong` has been renamed to `environ.maxlong`.
  • `environ.BufferSize` has been renamed to `environ.buffersize`.
  • `environ.PathSep` has been renamed to `environ.pathsep`.
  • `environ.More` has has been renamed to `environ.more`.
  • `environ.WithProtected` has been renamed to `environ.withprotected`.
  • `environ.Os` has been renamed to `environ.os`.
  • `environ.Cpu` has been renamed to `environ.cpu`.
  • `environ.Release` has been renamed to `environ.release`.
  • `environ.GdiDefaultOptions` has been renamed to `environ.gdidefaultoptions`.
  • In Windows, `os.login` and `os.computername` now return 'fail' like the UNIX or OS/2 versions do.
  • The `-DCOMPAT13` switch has been finally removed for compiling an Agena 1.3.x complient version.
  • Other:
  • Deprecated `calc.fseq` has been deleted. Please use `nseq` instead.

New in version 1.5.1 (November 15th, 2011)

  • Patched `strings.fields` which did not work at all. Also, it has been converted to a C library function and thus is 2.6 times faster.
  • `strings.words` now accepts a third argument, if set to `true`, succeeding delimiters are ignored.
  • Removed a possible security leak from `io.write` and `io.writeline` and improved its error messages.
  • Patched `binio.readchar` to avoid troubles with files of size greater then 2 GBytes.
  • Corrected error messages of functions `xbase.purge`, `xbase.readvalue`, `xbase.purge`, `ads.getvalues`, `binio.readshortstring`, `os.computername`, `os.login`, `os.fattrib`, `environ.kernel`, `package.register`.
  • Terabytes can now be entered with the notation T, where is an integer, and T is the character `T`. Likewise, g denotes billions, and t trillions. See page 48 of the manual for further information.
  • Updated the manual.
  • Mostly all backward compatibility switches in the C source code have been removed for code cleansing reasons. This affects only those who try to recompile Agena 1.5 or higher with full backward compatibility to Agena 1.3 and 1.4, and with most of backward compatibility to Lua 5.0 (except old Lua 5.0 library handling).

New in version 1.5.0 (September 13th, 2011)

  • `map` now can also process strings given as its second argument. The respective function and its arguments are consecutively applied to each character from left to right, and the result is returned in a sequence.
  • `run`: If you want to load and execute code from files with an 'agn' suffix, you do not have to specify the suffix in the argument any longer. So `run 'test'` and `run 'test.agn'` are now the same.
  • The `is` keyword is now obligatory to define procedures. (With GCC, use the -DCOMPAT14 switch to compile a version of Agena where the `is` keyword is still optional.)
  • The `try` statement has been deprecated and is no longer supported. (With GCC, use the -DCOMPAT14 switch to compile a version of Agena which still features this statement.)
  • The following `utils` functions have been removed: `arraysize`, `getarray`, `getwholearray`, `newarray`, `searcharray`, `setarray`. For backward compatibility, they have been added to the lib/compat.agn file. (With GCC, use the -DCOMPAT14 switch to compile a version of Agena that still suppports the original utils functions.)
  • `utils.singlesubs` has been completely rewritten. It now expects a sequence of numbers as the second argument instead of the former stringarray userdata structure. It is 35 % slower than the former version, but removal of the stringarray structure was more important.
  • `strings.include` crashed if called with 0 as the second argument. This has been fixed.
  • Applied Michael G. Schwern's May 10, 2011 patch to his `32-bit-Year 2038-Fix` date auxiliary functions used by the `os` and `xbase` packages (`Make mktime64() correct the incoming tm struct as ISO C requires.`)
  • Internal code optimisation: some library initialisation and file loading C functions used the stack to build path and filename strings. The new C aux function `concat` written by Solar Designer is now being used instead in many cases.
  • The Agena C API is now 100 % compatible to the Lua C API to facilitate porting C Lua packages to Agena.
  • The following functions have thus been renamed: lua_isnumber -> agn_isnumber, lua_isstring -> agn_isstring, luaL_optnumber -> agnL_optnumber, luaL_checknumber -> agnL_checknumber, luaL_optnumber -> agnL_optnumber, luaL_checkinteger -> agnL_checkinteger, luaL_optinteger -> agnL_optinteger.
  • The following macros have been renamed: luaL_checkint -> agnL_checkint, luaL_optint -> agnL_optint.
  • As opposed to the former Agena implementation, lua_tonumber now returns 0 like in Lua in case a non-number has been passed, instead of returning HUGE_VAL.
  • lua_setglobal2 has been removed. Use lua_pushvalue and lua_setglobal instead.

New in version 1.4.2 (September 6th, 2011)

  • If in the parameter list of a procedure user-defined types had been specified, in
  • procedure calls no errors were issued and the procedure has been executed instead, in the following cases:
  • a) a table, set, sequence, pair, or procedure - without being of a user-defined
  • type - has been passed,
  • b) no value at all has been passed for the parameter concerned.

New in version 1.4.1 (September 1st, 2011)

  • Short names for `stats.quartiles` and `stats.mode` could not be assigned by the `with` function. This has been fixed.
  • Erroneously, `with` could not assign a short name for `gdi.settriangle`. This has been changed.
  • Error handling of `calc.polygen` has been improved.
  • Improved error message of `fractals.draw` for missing FRACTINT map files.
  • Removed deprecated `strings.rseek` function. For backward compatibility, `strings.seek` has been added to the lib/compat.agn file.
  • Added the -d switch to print debugging information during startup of the interpreter.
  • The Windows version of Agena has now been compiled with GCC 4.5.2.
  • Updated language scheme files.
  • The manual has been updated.

New in version 1.4.0 (March 7th, 2011)

  • Semantic Changes:
  • Loop control variables of numeric `for/to` loops are now automatically local to their surrounding blocks instead of their (inner) loop bodies. If a local variable with the same name as the loop control variable has been declared and assigned before
  • executing a numeric loop, it is overwritten by the last iteration value of the loop. As such, the `external` switch in numeric `for` loops is no longer accepted. (With GCC, use the -DCOMPAT13 switch to compile a version of Agena that still recognises but ignores the `external` keyword.)
  • With the constant `fail`, `not` returned `true`, but with `fail` assigned to a variable, `not` returned false. This has been changed, i.e. 'a := fail; not(a)' now returns `true`.
  • `stats.median` now returns `fail` instead of 0 if the given structure is empty.
  • `utils.readcsv`: If a single white space is passed with the `delim` option and if the `ignorespaces` option has not been given, white spaces are not automatically removed any longer before splitting each line of the file into its words.
  • The function also has two new options: `header` which marks the first line in a file, and `output` which allows to store the contents of the file into a dictionary with its field names defined by the file header.
  • The `$` substring notation is no longer supported. (With GCC, use the-DCOMPAT13 switch to compile a version of Agena that still suppports the `$` operator.)
  • Extensions:
  • Infinite do/od loops have been added. This kind of loop iterates infinitely and can be interrupted only with the `break` or `return` statements. They are syntactic sugar for `while true do ... od` loops.
  • With tables, `stats.minmax` formerly only worked with arrays. This has been changed, i.e. values with corresponding non-positive keys (e.g. strings, non-positive integers, negative and positive floats, etc.) are now properly recognised in the evaluation.
  • `stats.mean`, `stats.qmean`, `stats.sd`, and `stats.var` now also process sequences.
  • The new `stats.mode` function returns all values in a sequence or table with the largest number of occurrence, i.e. highest frequency.
  • The new `stats.quartiles` function returns the first, second, and third quartile of a _sorted_ table or sequence.
  • Previously undocumented features of `linalg.matrix` have been added to the manual and its error handling has been improved.
  • Improved error handling of `linalg.hilbert`.
  • `gdi.setinfo` now accepts the `square` option. If `square = false`, then the x and y axes will not have the same scale on plots created with `gdi.plot`.
  • The `gdi.plot` function to draw graphics unfortunately has not been documented. This has been changed.
  • `gdi.plot` accepts two new options: The 'x' option specifies the horizontal range over which a plot is displayed, and the 'y' option specifies the vertical range.
  • If a PLOT structure is passed to `gdi.plot` that contains only POINTs, LINESs, RECTANGLES, TRIANGLEs, CIRCLEs, and ELLIPSEs (including their *FILLED variants), then `gdi.plot` automatically determines the scales (`gdi.setinfo` does not necessarily need to be called).
  • The OOP features inherited from Lua are now documented in Appendix A9. The author does not recommend object-oriented programming.
  • Tuning:
  • Tuned `filled` operator by around 3 %.
  • Tweaked `in`, `join`, `sadd`, `qsadd`, `replace`, `copy`, `unique`, and Cantor set operators on tables and sets a bit.
  • With tables, the `top` and `bottom` operators are around 5 % faster now.
  • The `size` operator is at least 8 % faster if a table does not include nulls.
  • `linalg.mzip`, `linalg.mmul`, and `linalg.transpose` have been tuned by around 3 % each.
  • Numeric for/to loops with fractional step sizes have been optimised by reducing the number of their control variables by half. This, however, did not attain any increase in speed.
  • Patches:
  • Patched `linalg.ludecomp` to detect singular matrices. Also, the function can now automatically determine the order of the given matrix.
  • As opposed to the manual, `gdi.plot` did not automatically determine horizontal and vertical ranges. This has been fixed.
  • `gdi.plot` no longer ignores the `square` option set by `gdi.setinfo`.
  • `gdi.setinfo` added settings to INFO structures even if they have been already present. This has been changed.
  • Circles were not plotted properly by `gdi.plot`. This has been changed.
  • The `gdi.plot` function in most circumstances ignored the individual colouring of geometric objects. This has been changed.
  • The gdi package did not assign short names for `gdi.settriangle`, `gdi.settrianglefilled`, `gdi.setrectangle`, and `gdi.setrectanglefilled`. This has been changed.
  • The fractals package did not assign short names for functions of user-defined type 'esctime'. This has been changed. Corrected error message of `fractals.draw` if positional arguments were not numbers.
  • Miscellaneous:
  • The functionality of `calc.fseq` has been merged into `nseq`. For backward compatibility, `calc.fseq` is still part of the calc package, but the function actually refers to the `nseq` implementation.
  • Added the `environ.FractScreenUpdates` variable to the `fractals package` to denote the number of vertical lines (a non-negative integer) after which a fractal will be updated in a window. The `environ.FractOptimised` variable has been deprecated.
  • Auxiliary gdi functions have been regrouped.

New in version 1.3.3 (February 14th, 2011)

  • Patches to `instr`:
  • When in regex mode, the operator returned a wrong result if a start position has been given.
  • When in plain search mode, the operator returned an out-of-range error if no start position has been given.
  • Except in reverse search mode, if no match has been found, the first argument has been returned instead of `null`.
  • Corrected error message of the `create` statement with respect to sequences.
  • In AgenaEdit, when outputting more than one structure with only one call to `print`, structures were not printed in full form if the first structure featured a __tostring metamethod. This has been changed.

New in version 1.3.2 (January 24th, 2011)

  • This release includes bug fixes, extensions, and an improved manual:
  • `dimension` created interesting results if a structure has been passed as the
  • initialiser. This has been changed: `dimension` now creates independent copies of the
  • structure when initialising the table.
  • The functionality of `strings.rseek` has been added to the `instr` operator.
  • Thus, `strings.rseek` has been deprecated. For backward compatibility,
  • `strings.rseek` has been added to the lib/compat.agn file.
  • `strings.hits` now supports regular expressions and captures. This behaviour
  • can be turned off by passing a boolean as a third argument.
  • `strings.isabbrev` and `strings.isending` now automatically use a plain search
  • if no regular expressions or captures have been passed as part of the second
  • argument.
  • Tweaked `strings.ismagic` and `strings.isfloat`.
  • The `log` function now is 13 % faster.
  • When outputting more than one structure with only one call to `print`,
  • structures were not printed in full form if the first structure featured a __tostring
  • metamethod. This has been changed.
  • Added categorisations of functions to Chapter 7 to facilitate the start for new
  • users.

New in version 1.3.1 (January 10th, 2011)

  • There have been problems with nested calls to the following binary operators: `xor`, `atendof`, `&&`, `||`, `^^`, `::`, and `:-`, and thus also with the pretty printer which quit with an error when printing nested structures. This has been fixed.
  • Four fixes to `os.list`: If the 'r' option has been passed, the current working directory has been mistakingly changed after completion of the call.
  • If 'r' has not been passed as the last argument, the function issued an error.
  • `null` has not been accepted as the first argument to denote the current working directory.
  • In Windows 7, printing the contents of the root directory did not work, i.e. os.list('c:') returned the contents of the current working directory.
  • When a string was indexed with a non-number, e.g. "str[null]", Agena returned `null`. Now an error is raised.
  • If library.agn has not been found the wrong path has been output twice in the warning. This has been changed.

New in version 1.2 (December 27th, 2010)

  • The substring operator has been redesigned but the old version will still be available till Agena 2.0: the new one is: `str[left to right]`, the old one has been:`str$(left, right)`. An example: before: `str := 'string'; print(str$(2, 3))` -> 'tr' now: `str := 'string'; print(str[2 to 3])` -> 'tr'
  • You are now able to determine sublists of table arrays and sequences with the new syntax mentioned above: `s[left to right]`. An example:now: `a := [10, 20, 30, 40]; print(a[2 to 3])` -> [20, 30] now: `a := seq(10, 20, 30, 40); print(a[2 to 3])` -> seq(20, 30)
  • The `ops` function now allows to specify the values to be returned by passing a sequence of their index positions as its first argument, e.g. ops(seq(1, -1), 10, 20,
  • 30).
  • The new function `strings.include` inserts a character sequence into a string
  • at a given position.
  • The following functions now issue an error instead of just returning `fail` in
  • case of a failure: `os.remove`, `os.move`, `os.mkdir`, `os.rmdir`, `os.chdir`.
  • Improvements to the following operators working on sets and sequences concerning garbage collection: `insert` statement, `union`, `intersection`, `minus`, `unique`, `copy`, `pop/top` and `pop/bottom` statements, and set assignments.
  • Improved error message of `fractals.draw` if FRACTINT colour map file has not
  • been not found.

New in version 1.1.0 (December 20th, 2010)

  • This release features new functionality and a cleansed namespace.
  • Compatibility to Agena 1.0:
  • Some functions have been removed from Agena and some have been converted to package functions (see below). If you still want to use them, issue readlib 'compat' on the command line or put the above statement into your initialisation file if you prefer backward compatibility to Agena 1.0.
  • Extended Functionality:
  • The `pop/top` and `pop/bottom` statements and `bottom` and `top` operators can now also be applied to table arrays.
  • When called with `null` or no arguments, `os.chdir` no longer issues an error but returns the current working directory. Thus, the former `os.curdir` C function has been replaced by one written in the Agena language.
  • `os.list` now recursively traverses subfolders if the new 'r' option is given.
  • The `join` operator now also accepts an optional delimitor and supports the option to specify the the first and the last element of the structure to be concatenated.
  • `instr` can now search from the right end of a string by passing a negative position.
  • If a table includes other tables, sets, sequences, or pairs, `copy` now knows how to handle these references properly if they occur multiple times: If an embedded structure is included n times, then one real copy is made and n-1 references to this newly created structure are inserted. Before, n independent copies have been made.
  • The new `isnonposint` function checks whether the given numbers are all integers and non-positive.
  • `io.close` can now close multiple files with only one call.
  • The `with` function did not assign short names for the following procedures of the `math` package: `convertbase`, `fraction`, `zeroin`, `todecimal`, `lcm`, `gcd`, and `ndigits`. This has been corrected.
  • The `rwritemode` function mentioned in the manual did not exist. It is now available but called `rmode`.
  • Error messages of various functions have been improved.
  • Namespace Cleansing: Renamed or Moved Functions:
  • The `register` and `loadclib` base library functions have been moved to the `package` library.
  • The former `rdelete`, `rget`, `rinit`, `roinit`, `rmode`, `rset`, `remember`, and `defaults` base library functions have been moved to the new `rtable` package.
  • Renamed the global _Env table to `environ` which now also contains procedures to access the environment.
  • The former global `homedir` and `infolevel` environment variables have been renamed to `environ.homedir` and `environ.infolevel`, respectively.
  • The following former base library functions have been moved to the `environ` package: `anames`, `attrib`, `gc`, `getfenv`, `globals`, `isselfref`, `pointer`, `setfenv`, `used`, `userinfo`, `__RESTART`, `__DOTTYPRINT`.
  • `mapm.xtoNumber` has been renamed to `mapm.xtonumber`, `mapm.xtoString` has been renamed to `mapm.xtostring`. For backward compatibility, the old function names can still be used by executing the lib/compat.agn file (first readlib the `mapm` package and then load the compat.agn file).
  • Deprecated Functions and Variables:
  • `strings.seek` has been deprecated. Its functionality has been added to the `instr` operator. To switch off `instr`'s pattern matching mode, pass the start of the search as the third and `true` as the fourth argument. `instr` is around 40 % faster in non-pattern matching mode than `strings.seek`. For backward compatibility, `strings.seek` has been added to the lib/compat.agn file.
  • The `concat` base library function has been removed. Use `join` instead. For backward compatibility, the former function has been added to the lib/compat.agn file.
  • The `hasrtable` and `hasrotable` functions have been removed. For backward compatibility, they have been added to the lib/compat.agn file.
  • The `pcall` function has been deprecated. Use `protect` instead. For backward compatibility, the function has been added to the lib/compat.agn file.
  • The `maptoset` function has been deprecated. For backward compatibility, the function has been added to the lib/compat.agn file.
  • The `os.alldirs` function has been deprecated. Use the 'dirs' and 'r' options in a call to `os.list` instead. For backward compatibility, the function has been added to the lib/compat.agn file.
  • `os.isMac`, `os.isSolaris`, `os.isLinux`, `os.isWin`, `os.isOS2`, `os.isDOS`, `os.isHaiku` have been deprecated. Please use the new environment variables environ.Os and environ.Cpu instead, which also speeds up code. For backward compatibility, the functions have been added to the lib/compat.agn file.
  • The undocumented _VERSION variable has been removed. For backward compatibility, its assignment has been added to the lib/compat.agn file.
  • Other Changes:
  • The C API function lua_rawsetstringnumber mentioned in the manual did not exist. This has been changed.
  • Code optimisations to the parser.
  • In some of the packages, accidently a few variables have been implicitly declared global. This has been fixed.
  • Corrected and updated initialisation sample files.
  • AgenaEdit has been updated.
  • The language scheme files have been updated.
  • The Linux installers now include the xBase package.

New in version 1.0.6 (December 17th, 2010)

  • Improved error messages of `join`, `copy`, and `filled` operators, of `toset`, `toseq`, and `totable` functions, of `insert`, `delete`, `pop` statements, and of `for` loops.
  • With sequences, Agena crashed in the following sequence of events: 1) a `delete` statement had been executed, 2) the sequence therafter had been empty, and 3) a new element had been inserted again. This has been fixed. (Internally, the `delete` statement no longer internally reduces the size of sequences any longer.)
  • With large strings, `concat` crashed. This has been fixed.
  • With strings of 512 and more bytes, `join` and `replace` could crash. This has been fixed. The two operators are now also much faster than ever before.
  • `math.isprime` returned wrong results with arguments > 2^31 (mentioned vaguely in the manual). This has been fixed by extending the argument range to integers with values up to +/-2^63.
  • `math.nextprime` and `math.prevprime` had the same issue with larger arguments like `math.isprime`. This has also been changed. With argument 2, `io.nextprime` falsely returned 5 instead of 3. This has been fixed, as well.

New in version 1.0.5 (December 13th, 2010)

  • `join` could crash Agena and otherwise behave unexpectedly if the resulting string
  • exceeded 512 bytes. This has been changed.
  • If `restart` has been called after an error has been issued in the previous
  • statement, Agena in rare occasions crashed because of stack corruption. This has been
  • fixed.
  • With newly created tables containing exactly one element in the hash part, `attrib`
  • now returns correct results for the number of allocated hash slots (1 instead of 0).
  • Corrected error messages of `qsadd` and `sadd`.
  • Improved error messages of `join`, `copy`, and `filled` operators, and of `insert`
  • and `delete` statements.
  • Error handling of `read`, `save`, and `fractals.draw` has been improved.
  • Improvements to the makefiles.
  • Buffer sizes have now been standardised in the sources.

New in version 1.0.4 (November 22nd, 2010)

  • Since rare crashes have been reported during initialisation (in Windows XP SP 3 and OpenSolaris 134, in some circumstances), garbage collection is now turned off in the initialisation phase. These rare segmentation faults occured in OpenSolaris when running the Agena binary in its harbouring directory as root, and in XP when clicking on the Agena desktop icon with local admin rights.
  • Introduced the -d switch to the command line options in order to print information during initialisation of Agena.
  • Introduced proper error handling if memory could not be internally allocated to: `trim`, `upper`, `lower`, `os.curdir`, and `strings.rseek`.
  • Removed potential memory leaks in the initialisation C functions agenaL_initialise and agenaL_setLibname, and in `io.write*` and `print`.

New in version 1.0.3 (November 15th, 2010)

  • The new function `protect` calls a procedure in protected mode and catches any possible error so that computation is not interrupted. In case of an error, it sets the error string to the global variable `lasterror`. It is related to `pcall`, but does not return the status code as the first result.
  • `attrib` now returns correct results with empty structures. With empty structures, the function wrongly counted one assigned hash element before.
  • `attrib` now return the number of bytes occupied by tables, sets, and sequences along with the new 'bytes' key . The number of bytes returned is based on sometimes contradictory information available on the net.
  • `replace` crashed Agena if the resulting string exceeded 512 bytes. This has been changed.
  • `assume` now returns 'Assumption failed.' instead of 'assumption failed.'
  • The new C API function lua_setglobal2 sets the value at the top of the stack to a global name. Contrary to lua_setglobal, the value is not popped.
  • Code cleaning of lobject.h (Table structure), and lapi.c (actnodesize macro). Bugfix to C API function agn_deletertable in case Agena is compiled with non-void lua_assert. Change to the return value of the savestate function that is used during initialisation to prevent the (slight) possibility of stack corruption.

New in version 1.0.2 (November 6th, 2010)

  • The new `os.setenv` procedure sets environment variables on the operating system level. The function has originally been written by Mark Edgar.
  • In Windows, `os.getenv` now calls a native Windows API function in order to get the values of environment variables. The Windows code has been written by Mark Edgar.
  • The new `os.environ` function returns all assigned environment variables in a table. The function has originally been written by Mark Edgar.
  • `io.open` now adds the FILE pointer, the name, and the mode of a successfully opened file into the new table `io.openfiles`. `io.close` deletes the entry from `io.openfiles` if the file could be successfully closed.
  • When called with no arguments, `io.read` now returns an error if called with no arguments in AgenaEdit (in an attempt to read the keyboard).
  • If `io.anykey` and `io.getkey` are called in AgenaEdit, a proper error message is displayed.
  • One of the initialisation subprocedures has been changed to avoid possible stack corruption (although problems never occured).
  • os.isMac('ppc') now works on PowerPC machines.
  • Chapters 4 and 6 of the Primer and Reference have been revised and extended. An index has been added and a lot of cosmetics have been done, as well.
  • Stored correct version information to the Windows executable.

New in version 1.0 (August 14th, 2010)

  • Dear Ladies and Gentlemen,
  • after almost four years of development, I published Agena 1.0, a procedural programming language, derived from Lua C sources.
  • My community actually is very, very small, but some users told me that it was fine, useful and stable.
  • I would be very happy if you reviewed Agena and informed me about your results. If you do not find it useful, please tell me personally, and give me a chance to fix the issues.

New in version 0.34.1d (July 27th, 2010)

  • This version includes an updated GUI version of AgenaEdit (see executable file agenaedit).

New in version 0.34.1 (July 13th, 2010)

  • AgenaEdit with syntax-highlighting and built-in runtime engine been released with Agena 0.34.1.

New in version 0.34.0 (July 7th, 2010)

  • AgenaEdit with syntax-highlighting and built-in runtime engine been released with Agena 0.34.0.

New in version 0.33.2 (June 27th, 2010)

  • Agena 0.33.2 with xBase file support has been released.

New in version 0.33.1 (June 21st, 2010)

  • Agena 0.33.1 with xBase file support has been released.

New in version 0.33.0 (June 14th, 2010)

  • The new `xbase` package can read and write xBase files compatible to the dBASE III standard.
  • The `binio` and `ads` packages can now handle files of up to 2^63 bytes. Before they could handle only files with sizes of up to 2^31 bytes.
  • The new `io.lock`, `io.unlock`, `binio.lock`, `binio.unlock`, `ads.lock` and `ads.unlock` functions lock a file from read and write access by other Agena
  • functions or even other applications provided the latter use a locking protocol.
  • The baselib function `read` can no longer be overwritten by `with`.
  • The new `package.checkClib` checks whether a package stored to a C dynamic library has been initialised. If not, it returns a warning printed on screen and creates an empty package table. Otherwise it does nothing.
  • The Haiku port now supports dynamic link libraries.

New in version 0.32.3 (June 3rd, 2010)

  • Agena 0.32.3 with new and tuned Calculus functions has been released.
  • Mac users do not need to install additional dependency libraries any longer.
  • A Haiku port is now available.

New in version 0.31.5 (April 12th, 2010)

  • This version contains built-in graphics, arbitrary precision math, and improved features.

New in version 0.31.3 (March 30th, 2010)

  • Added the fractals package to easily draw fractals in Solaris, Mac, Linux, and Windows.
  • On Solaris and Linux, `gdi.mouse` now returns standard values for pressed mouse buttons (the same as the Mac and Windows editions do).
  • When given the -v option, Agena now does not execute the initialization files any longer.
  • On UNIX or Mac, the file names of the initialization files must always be `.agenainit`, whether they be in /usr/agena/lib or the personal folder.
  • The binary Mac distribution for Intel CPUs runs around 30 % faster than previous releases.
  • The `io.getkey` function is now available in the Mac OS X edition.
  • On Mac, `os.system` now returns complete information about the operating system and CPU type. Note that it returns information on the Darwin kernel, and that the first entry in the resulting table now is `Darwin` instead of `MacOSX`.
  • `os.memstate`, `os.freemem` and `os.beep` now support Mac OS X.
  • `io.anykey` is available on all platforms, but returns `fail` on DOS and Mac. Thus, `gdi.draw` will not throw errors any longer on Mac when using the `mouse` option.
  • `os.listcore` has been extended to return file, directory, or link names only. '.' and '..' now are never returned.
  • `os.list` did not recognise any options and returned an empty list instead. This has been fixed. Also, options can now be combined. '.' and '..' as the first argument are now properly recognised.
  • `os.curdir` now automatically replaces backslashes in the path determined with slashes.
  • `os.fstat` and `ads.attrib` crashed Agena if the date of a file exceeded Tuesday, January 19, 2038. This has been fixed by either returning an empty table for the date key (os.fstat), or 0/0/01 00:00:00, (ads.attrib).
  • `utils.calendar` crashed Agena if its argument was void, negative or too big. This has been changed. In addition, if a date is beyond Tuesday, January 19, 2038, the correct date is returned.
  • The new functions `os.screensize` and `os.mousebuttons` return the current screen resolution and the number of buttons of the attached mouse, respectively (Windows only).
  • The agena.ini.sample file has been renamed to .agenainit.sample in the UNIX/Mac distributions.
  • A new makefile for Solaris is now being shipped with the mapm Agena binding to fully compile the original MAPM sources written by Michael C. Ring.

New in version 0.31.2 (March 8th, 2010)

  • The mapm package for arbitray math precision is now also available in the DOS edition of Agena.
  • The number of digits used by the mapm package is initialised to 17 digits at start-up of Agena for DOS or OS/2 Warp. Before, the default was 1 digit.
  • The C code for the MAPM binding has been standardised. Before, the DOS and OS/2 source files differed from the one for UNIX and Windows.
  • Small enhancements to the Windows and Mac OS X installers.
  • On Mac, the documentation is now available in Library/Documentation/Agena instead of /Users/Share/Agena.
  • The sin, cos, arcsin, arccos, and arctan functions returned -0 instead of 0 as the imaginary unit, which led to wrong results if the return of these functions had been applied to other functions such as ln (i.e. the sign of the imaginary unit of the result of these other functions was incorrect). This has been fixed by setting the imaginary unit -0 to 0 in the return of sin, cos, arcsin, arccos, and arctan.
  • The arcsin and arccos functions returned wrong results for arguments z, if abs(real((z))) < 1. This has been fixed.
  • In OS/2, most complex arithmetic functions returned undefined. This has been fixed.
  • Note that in OS/2 and DOS, in the complex domain there are still issues with the arccos and arcsin operators which return undefined in certain situations.
  • The Windows, i386 Solaris 10, and Linux versions have now been compiled with GCC 4.4.x (and without xmath86.h) which reduced the number of errors in complex arithmetic significantly. In fact, elaborate complex math test cases return zero errors. The Sparc version has been compiled with GCC 4.3.3 for Sun Sparc and has less bugs in complex number arithmetic than the 0.31.1 release had.
  • Renamed the following include files: config.h -> agncfg.h, chelpers.h -> agnhlps.h, agnxlib.h -> agnxlib.h.
  • On Mac, gdi.mouse now returns standard values for pressed mouse buttons.

New in version 0.31.1 (February 22nd, 2010)

  • Agena 0.31 includes all the basic tools to plot points, lines, circles, ellipses, rectangles, arcs. etc., to control image size, and colours.

New in version 0.31.0 (February 15th, 2010)

  • A language consistency release with a bug fix - has been released. See the change log for what has changed.

New in version 0.30.4 (February 12th, 2010)

  • Agena now features built-in graphics. This will allow you to plot graphs, images, etc. in X11 or Win32 windows or to GIF, PNG, JPEG, FIG, or PostScript files, both in Solaris, Linux, and Windows. Agena binds to the g2 graphical library written by Ljubomir Milanovic and Horst Wagner, to provide these new capabilities.
  • Agena 0.30 includes all the basic tools to plot points, lines, circles, ellipses, rectangles, arcs. etc., to control image size, and colours.
  • > with 'gdi';
  • gdi package v0.1.4 as of December 20, 2009
  • arc, arcfilled, background, circle, circlefilled, clearpalette, close, dash, ellipse, ellipsefilled, flush, fontsize, initpalette, ink, lastaccessed, line, newline, newpoint, open, plot, plotfn, point, rectangle, rectanglefilled, reset, resetpalette, setinfo, setoptions, structure, text, thickness, triangle, trianglefilled, useink
  • The plotfn function draws one or more graphs of functions in one real, optionally along with the axes plotted in a user-defined colour. The range for the y-axis can also be given, otherwise Agena determines the best setting. There are various other options which can be set with the setoptions function and which will apply to all graphs produced in a session: the window resolution, the colour map, the line thickness, and background colour. Of course, the user may override some or all options for a specific plot. Singularities are properly treated.

New in version 0.30.3 (January 23rd, 2010)

  • Agena 0.30.3 with built-in graphics, arbitrary precision math, and improved features has been released.

New in version 0.30.2 (January 12th, 2010)

  • Agena now features built-in graphics. This will allow you to plot graphs, images, etc. in X11 or Win32 windows or to GIF, PNG, JPEG, FIG, or PostScript files, both in Solaris, Linux, and Windows. Agena binds to the g2 graphical library written by Ljubomir Milanovic and Horst Wagner, to provide these new capabilities.
  • Agena 0.30 includes all the basic tools to plot points, lines, circles, ellipses, rectangles, arcs. etc., to control image size, and colours.
  • > with 'gdi';
  • gdi package v0.1.4 as of December 20, 2009
  • arc, arcfilled, background, circle, circlefilled, clearpalette, close, dash, ellipse, ellipsefilled, flush, fontsize, initpalette, ink, lastaccessed, line, newline, newpoint, open, plot, plotfn, point, rectangle, rectanglefilled, reset, resetpalette, setinfo, setoptions, structure, text, thickness, triangle, trianglefilled, useink
  • The plotfn function draws one or more graphs of functions in one real, optionally along with the axes plotted in a user-defined colour. The range for the y-axis can also be given, otherwise Agena determines the best setting. There are various other options which can be set with the setoptions function and which will apply to all graphs produced in a session: the window resolution, the colour map, the line thickness, and background colour. Of course, the user may override some or all options for a specific plot. Singularities are properly treated.

New in version 0.29.0 (November 30th, 2009)

  • Agena now features built-in graphics. This will allow you to plot graphs, images, etc. in a window or to a GIF, PNG, JPEG, FIG, or PostScript file in Solaris, Linux, and Windows, by including a binding to the g2 graphical library written by Ljubomir Milanovic and Horst Wagner.
  • Agena 0.29.0 features all the basic tools to plot points, lines, circles, ellipses, rectangles, arcs. etc., to manage colour, and to create image files or open X11 or Win32 windows.
  • In one of the coming updates, a high-level user interface featuring the gdi.plotfn and gdi.plot functions allows you to plot univariate functions and sets of points on-the-fly. The two functions are already included in Agena 0.29.0, but are still beta. Here is a preview:
  • > with 'gdi';
  • gdi package v0.1.0 as of November 24, 2009
  • arc, background, circle, clearpalette, close, dash, ellipse, filledArc, filledCircle, filledEllipse, filledRectangle,
  • filledTriangle, flush, fontsize, initpalette, ink, lastaccessed, line, open, plot, plotfn, point, rectangle, reset,
  • resetpalette, setinfo, setoptions, structure, text, thickness, triangle, useink
  • The plotfn function draws the graph of a function in one real, optionally along with the axes plotted in a user-defined colour. The range for the y-axis can also be given, otherwise Agena tries to determine the best setting. There are various other options which can be set with the setoptions function and which will apply to all graphs produced in a session: the window resolution, the colour map, the line thickness, and background colour. Of course, the user may override some or all options for a specific plot. Singularities are properly treated.
  • plotfn( sin(x)*x >>, -5, 5, colour~'blue', axiscolour~'grey', res~640:480);

New in version 0.27.2 (October 29th, 2009)

  • The new toSet baselib function converts a string into a set of its characters, and a table or sequence into a set.
  • io.readlines has been patched to process lines with more than 2048 characters. The function now also issues an error if internal memory allocation fails. Internal buffer size has been decreased from 2048 bytes to 512 bytes. You may change this by assigning another value to AGN_IOREADLINES_MAXLINESIZE in the agnconf.h file.
  • io.readlines now also accepts file handles. When using file handles, as opposed to file names, please note that you must close the file manually after using io.readlines.
  • io.readlines no longer returns an empty table if the file does not exist. Instead, it issues an error.
  • toSeq now returns an error instead of fail if it does not receive a string, set, or table.
  • The baselib function used has been extended and can return memory usage in bytes, kbytes, and gbytes. It is a C function now.
  • The undocumented gcinfo function has been deleted. Its functionality has been taken by used.
  • The new C API function agn_usedbytes returns the number of bytes used by the system.
  • Corrected wrong error message of toTable.
  • renamed C AOI function `agn_isioforcerror` to `agn_isioforceerror`.

New in version 0.27.0 (September 11th, 2009)

  • Added the error function math.erf, and the complementary error function math.erfc.
  • Added the Bessel function of the first kind math.besselj, and the Bessel function of the second kind math.bessely. The order is given by the first argument, the argument as the second argument.
  • If the new environment variable _EnvIoForceError is set to a non-null value (the default), the io.open, io.readlines, and the various binio functions quit with an error instead of just returning normally.
  • binio.readbytes and binio.readchar returned an empty sequence instead of fail in case the file to be read did not exist. This has been changed: fail or an error is now returned.
  • arcsin and arccos are now operators and thus around 40 % faster.
  • Added the xor operator which performs a Boolean exclusive-OR on values which evaluate to or are true, false, fail, and null.
  • Added the atendof operator which checks whether a word ends in a given phrase and returns its position as a number. The operator returns null if the strings have the same length, at least one of them is the empty string, or the word does not end in the given pattern.
  • hasrtable now only returns true, if it has a read-write remember table (updated by the return statement).
  • The new function hasrotable determines whether a function has a read-only remember table (that cannot be updated by the return statement) and returns true or false.
  • The new operators gethigh and getlow retrieve the higher and the lower bytes from a number (i.e. C double).
  • The new operators sethigh and setlow set the higher and the lower bytes to a number (i.e. C double).
  • The new operators band, bor, bxor, and bnot conduct bitwise and, or, exclusive-or, and complementary operations on numbers.
  • The new `kernel` function configures settings of the Agena kernel. Currently it can change the way the bitwise operators internally work (usage of signed or unsigned integers), and how numbers are printed.
  • With real numbers x, math.argument now returns Pi instead of 0 if x < 0.
  • Because of a bug in the underlying ANSI C library functions, arcsin and arccos produced wrong results with complex numbers if their imaginary part was zero in UNIX systems. This has been fixed.
  • math.isPrime reported false with number 2. This has been corrected.
  • As opposed to the manual, abs returned 2 with fail. Now it returns -1 as documented.
  • The bits package has been removed.
  • Added the new C API function agn_isioforcerror which checks whether _EnvIoForceError has been set to a non-null value.
  • The new C API function agn_setbitwise determines whether the operators band, bor, bnot, bxor, and shift internally calculate with either signed or unsigned integers.
  • The new C API function agn_getbitwise returns the mode set by agn_setbitwise.
  • The new C API function agn_setdigits sets the number of digits used for printing numbers.
  • The new C API function agn_getdigits determines the number of digits used for printing numbers.
  • Internal: Removed deprecated "REPL" entry from luaP_opnames.
  • The Windows installer has been improved by now checking for a previously installed version of Agena, by preventing that the installer is started if another instance of it is already running, and by some other small improvements.