agena >>
                           
Overview

Download

Documentation

Code Samples

News

Visual Agena


Contact

Disclaimer
                     


 
 
 


Hosted by sourceforge.net
 




Change Log


0.30.4: January 31, 2010

This is an extension and bug fix release of Agena 0.30.
  1. The new function strings.isFloat checks whether a string contains a float.
  2. The new function strings.gmatches is a wrapper around strings.gmatch and returns all occurrences of a pattern in a string in a new sequence.
  3. When pressing CTRL+C during the console output of a table, set, or sequence that included other tables, sets, or sequences, the interpreter sometimes did not position the prompt correctly and also did not print separating lines between prompts. This has been fixed.
  4. The new kernel option 'emptyline' controls whether an empty line is printed between two input regions. By default, an empty line is printed. By issuing the statement `kernel(emptyline~false)`, two prompts are not separated by an empty line. This can always be revoked in a running session.
  5. The _EnvPrint.NoNewLine setting has been removed. Use the new kernel option 'emptyline' instead.
  6. The print function now accepts two options: 'delim' which denotes the character sequence separating two strings, and 'nonewline' which prevents the print function from issuing a newline after output completed.
  7. Removed a potential memory leak in the io.write and io.writelines functions.

0.30.3: January 23, 2010

This is an extension and bug fix release of Agena 0.30.
  1. Agena now supports arbitrary precision for real numbers through the mapm binding to Mike's Arbitrary Precision Math Library, which has been written by Michael C. Ring.
  2. The new function linalg.swaprow swaps rows in a matrix.
  3. The new function linalg.swapcol swaps columns in a matrix.
  4. The getentry function has been implemented in C and thus is 5 times faster than before.
  5. math.isPrime is around 4 % faster than before.
  6. The new function countitems counts the number of occurences of an item in a structure. The procedure accepts either the item itself to be counted or a function that evaluates to true in order for something else to be counted. It is at least twice as fast as a combination of size and select. The function may invoke metamethods.
  7. The gdi package includes a number of new functions that allow to plot geometric objects easily. See chapter 7.19.7 for a tutorial.
  8. If you pressed CTRL+C during operation of the instr operator, Agena crashed. This has been fixed.
  9. strings.seek will be removed in the next major release. Use the instr operator instead for it is 45 % faster.
  10. Fixed a bug in gdi.options that occurred when a wrong type has been passed.
  11. The manual has been improved.

0.30.2: January 04, 2010

This is an extension and bug fix release of Agena 0.30.
  1. In gdi.plotfn, labels were not plotted correctly in either Windows XP or in other versions of Windows running NVIDIA VGAs. This has been fixed. Solaris and Linux do not seem to have been affected even when runnung NVIDIA cards.
  2. When printing tables and sets, Agena printed an excess comma and a blank right after the last value at line breaks. This has been fixed.
  3. If a string has been assigned to the new environment variable _EnvPrint.EncloseStrings, then Agena now outputs strings with the prepending and appending string assigned to _EnvPrint.EncloseStrings at the console.
  4. The names of boolean _EnvPrint* environment variables have been changed (to syntax _EnvPrint.*). See Appendix A5. The old names are no longer supported.
  5. The setting of _EnvPrint.EmptyLine had no effect. This has been fixed.
  6. If using the mouse option with gdi.plotn, plotting of the x and y positions can now be also cancelled by hitting a key.
  7. gdi: `ink not defined` error messages are no longer printed on screen.
  8. Improved internal step size detection in for/to loops for step sizes that are larger than the maximum integer representable on your machine.
  9. The speed of the float operator has been increased by 13 % in the Windows version.
  10. The new linalg.mzip functions zips together two matrices by applying a function to the respective elements.
  11. zip and linalg.vzip now accept more than two function arguments.
  12. The new function linalg.augment joins two or more matrices or column vectors together horizontally.
  13. The new function linalg.stack joins two or more matrices or row vectors together vertically.
  14. The new baselib getentry function returns an entry from a table or sequence without issuing an error if one of the given indices does not exist (`attempt to index a <type> value` error). In case of an invalid index, null is returned.
  15. The macros linalg.isantisymmetric, linalg.isdiagonal, linalg.isdiagonal, linalg.isidentity, linalg.ismatrix, linalg.issquare, linalg.issymmetric, and linalg.isvector have been removed.
  16. Matrix subtraction with the binary minus operator did not work. This has been fixed.
  17. If you want to scalar-multiply a matrix A with a number n, the new syntax is: n*A, not A*n.

0.30.1: January 04, 2010

This is an extension of Agena 0.30.
  1. The new function io.anykey checks whether a key (any key) is being pressed (available in Solaris, Linux, and Windows).
  2. A second procedure called calc.xpdiff to differentiate functions has been added to the calc package. It produces better results with powers and trigonometric functions than calc.diff.
  3. calc.minimum and calc.maximum have been improved by checking possible extrema with both calc.diff and calc.xpdiff.
  4. The new dimension baselib function creates sparse vectors and sparse matrices with arbitrary index ranges. An optional initialiser may be given, too.
  5. calc.zero now sorts its return and also uses a fall-back method to improve results.
  6. The new tables.entries function returns all elements (not the keys) of a table in a new table array.
  7. When printing tables at the console, the output is now sorted in ascending order of the keys.
  8. When printing sets at the console, the output is now sorted.
  9. The Windows installer has been improved, supports multi-user setup, and also offers to copy the Agena include files to your disk.

0.30.0: January 01, 2010

This is the new release of Agena.
  1. In all OS versions, Agena now supports multi-user configurations by searching for an (optional) initialization file in the user's home folder at programme start-up. Agena still first tries to read the agena.ini file in the main Agena folder before looking for the personal initialization file.
  2. for/to loops now automatically use an advanced precision algorithm (an adaption of Kahan summation) if the step size is non-integral: This in many situations prevents Agena from stopping iteration before the last iteration value has been reached (try "for i from -4 to -3 by 0.1" in previous versions). Also Agena in most cases does not  return for/to-iteration values with roundoff errors any longer.
  3. The new nseq baselib function returns a sequence of numbers over an interval with a given step size. The return is much more precise with step sizes that are not integers by using the same new algorithm used in for/to loops.
  4. gdi now has a function to significantly increase the performance of the package: gdi.autoflush allows to set or unset autoflush mode. The latter gives quite a performance boost on x86 based systems.
  5. The new gdi.mouse function returns information on the current position of your mouse and its button state.
  6. The new function gdi.system sets the user's coordinate system and its scalings.
  7. The new 'mouse' options to gdi.plotn prints the current position of the mouse to the console. Click the right mouse button to finish.
  8. binio.sync corrupted files. This has been changed.
  9. The -p command-line switch to set the path to an alternate main Agena library folder did not work any more. This has been fixed.
  10. The -n command-line option suppressed loading the main Agena library file. This has been changed.
  11. calc.minimum and thus calc.maximum missed some possible extrema, this has been changed. The procedures sometimes also returned a point multiple times. This has been fixed, as well.
  12. calc.fseq now uses the Kahan summation algorithm to prevent (or at least minimize) roundoff errors. Before, right borders have not been processed in certain situations, and elements inserted had roundoff errors.
  13. calc.fsum now uses a modified Kahan algorithm conceived by Kazufumi Ozawa which is more precise than the original one.
  14. Patched calc.fminbr, such that if a minimum is exactly at one of the given borders, the border is returned. Thus, the results of calc.minimum and calc.maximum, which use calc.fminbr, have been improved, as well.
  15. gdi.plotfn: In case of errors, the function now tries to prevent to open empty windows. Plotting axes and labels has been improved, as well.
  16. When printing sequences, Agena sometimes printed a comma and a blank right after the last value at line breaks. This has been fixed.

0.29.3: December 25, 2009

This is a bug fix release and an extension of Agena 0.29.
  1. readlib and with now also check the folder pointed to by mainlibname for Agena libraries. The new search sequences are: current working directory, mainlibname, libname. The search sequence used by readlib is output on the console if the last argument is true.
  2. Added labels, xscale, and yscale options inspired by the TI-84 calculator to gdi.plotfn. Plotting of the `0` label has been improved, as well.
  3. The new tables.allocate function sets the specified keys and values to a table.
  4. Standardized error messages in all packages.
  5. map, select, and remove did not work correctly in some cases with table arrays, and always did not work correctly with dictionaries. This has been fixed.
  6. maptoset crashed Agena if called with a dictionary. Also it did not work correctly with some sorts of table arrays. This has been fixed.
  7. As previously documented, zip did not work with dictionaries. This has been changed.
  8. linalg.checkvector might have crashed if anything but a vector has been passed. Although this error never occurred, a fix has been provided.

0.29.2: December 21, 2009

This is an extension of Agena 0.29.
  1. The new gdi.setoptions function checks the given plotting options (all key~value pairs) for correctness and sets them as the respective defaults for subsequent calls to the gdi.plotfn function.
  2. Positioning of tickmarks and labels by the gdi.plotfn function has been improved significantly. Also treatment of poles and of errors is now more elaborate. The new axes styles 'boxed' and 'frame' are also available.
  3. The old bitwise operators band, bnot, bor, and bxor have been removed. Use &&, ~~, ||, and ^^, respectively.
  4. Updated the Quick Reference XLS file.
  5. Small modifications to the ldebug.* and lvm.c files for Agena to compile properly with current Linux distributions, e.g. OpenSUSE 11.2 and Ubuntu 9.10.

0.29.1: December 14, 2009

This is an extension and a bug fix release of Agena 0.29.
  1. The new gdi.plotfn function plots graphs of one or more functions. You have full control on how the graphs will look like by specifying one or more individual options (e.g. colours, line styles, etc.).
  2. The case statement did not work properly with indexed values within nested procedure calls of level 3 or higher. This has been fixed.
  3. Included Lua 5.1.4 patch 6. This prevents the garbage collector to get stuck during parsing and forces proper resizing of the string table, to speed up performance.
  4. gdi.dash now only accepts numeric values >= 1 in the dash sequence to prevent error messages.

0.29.0: November 29, 2009

This is the new edition of Agena featuring graphical capabilities.
  1. The Solaris, Linux, and Windows editions now feature graphics. You may plot points, lines, rectangles, etc. with the gdi package to a window, or to a PNG, GIF, JPEG, PostScript, or FIG file. The gdi package is a port to the g2 package written by Ljubomir Milanovi and Horst Wagner.
  2. The Windows, OS/2, and DOS editions of Agena are now shipped with the following optimized mathematical functions for real arithmetic that are 10 % to 110 % faster than before by linking to Assembler inline code: arccos, arssin, arctan, sin, cos, cosh, tan, ln, exp, entier, sqrt, and exponentiation operators, as well as math.arctan2 and math.irem.
  3. The new calc.fprod function computes the product Prod(f(x), x=a..b) = f(a) * ... * f(b).
  4. The new math.fma function performs floating-point multiply-add. This is the operation (x * y) + z, with the intermediate result not rounded, so that the precision of a calculation is improved.
  5. The new calc.maximum function returns possible maximum locations of a univariate function.
  6. The procedure returned by calc.interp now issues a proper error message if called without arguments or a wrong type.
  7. The pop left/right statement has been removed. Use pop bottom/top instead.
  8. The try .. as statement has been removed. Use try .. :: instead.
  9. The .. operator has been removed. Use the & operator instead.
  10. The gammaln keyword has been removed. Use lngamma instead.
  11. The left and right operators no longer support sequences. Use the bottom and top operators, respectively.
  12. readlib supports a new option (true as last argument) that makes it both quit and print some diagnostics if a corrupt C library has been found.
  13. The Solaris, Linux, Windows, DOS, and OS/2 binaries are now published under the GNU GPL, version 2 or later. The source files are still distributed under the MIT licence. The Windows installer no longer includes the source files.

0.28.2: November 20, 2009

This is a small extension of Agena including bug fixes.
  1. math.besselj and math.bessely now work in the complex domain. The code has been implemented in C with the Solaris, Windows, Linux, and OS/2 editions, and in Agena itself with the ANSI edition (e.g. the DOS version).
  2. The new `try <variable> [, <variable>] :: <type>` syntax for checking variables for a specific type is equivalent to the existing try .. as statement, which will be deprecated in the next major release.
  3. Added the Euler-Mascheroni constant EulerGamma with EulerGamma = 0.57721566490153286061.
  4. By default, complex values close to zero are no longer printed as just `0` at the console, i.e. the environment variable _EnvPrintZeroedCmplxVals by default is now unassigned. You may change this behaviour by editing the lib/library.agn file (see bottom of this file).
  5. The new mainlibname system variable points to the main Agena library (e.g. `/usr/agena/lib`).
  6. The new os.isANSI function checks whether Agena has been compiled with the LUA_ANSI switch. It returns true or false. Internally, this new function is used to provide functions that have been written in the Agena language itself in the ANSI (and thus DOS) edition of Agena, that otherwise have been implemented in C in Solaris, Windows, Linux, and OS/2.
  7. io.open now always issues an error if it fails. The _EnvIoForceError setting is no longer supported by the function.
  8. The getmeta and setmeta macros have been removed. Use getmetatable and setmetatable instead.
  9. If an error occurred in a calculation including complex values, error messages had been deceiving. This has been changed.
  10. os.list issued an error if called with no argument and if the current directory was the root directory. This has been changed.
  11. math.erf now works with complex numbers in the DOS and ANSI editions.
  12. The Solaris and Linux installers now print the main locations of the files that have been installed before (/usr/agena and /usr/local/bin).

0.28.1: November 10, 2009

This is a maintenance release of Agena.
  1. The Windows installer now installs Agena for all users, not only the Administrator, such that a programme group for Agena will appear in the Explorer menu for all users.
  2. The Debian installers now print information on how to set the AGENAPATH system variable.
  3. anames now also checks for user-defined types.
  4. The pop statement now suppports the keywords top and bottom. `pop top from a` is equivalent to `pop right from a`. `pop bottom from a` is equivalent to `pop left from a`. `pop left` and `pop right` will be deprecated in the next major release.
  5. The new bottom and top operators return the first and the last item in a sequence and thus work like the current left and right operators. The left and right operators will not work on sequences any longer in the next major release.
  6. lngamma and math.erf now also work in the complex domain.
  7. The gammaln operator has been renamed to lngamma. The old keyword will be deprecated in the next major release. The '__gammaln' metamethod has been renamed '__lngamma', the old metamethod name can no longer be used.
  8. Some minor internal optimizations regarding internal memory usage to the following operators and statements when applied on sequences: intersect, minus, and unique operators, delete statement.
  9. Some minor internal optimizations regarding internal memory usage to the following operators when applied on sets: intersect and minus.
  10. The speed of the delete statement with sequences has been increased by 4 %.
  11. With very large sequences (size -> 2,147,483,647 items), it was possible that Agena would have crashed while inserting further elements. This has been fixed, although this potential bug could never been proven.
  12. All editor scheme files distributed with Agena have been updated.

0.28.0: November 02, 2009


This is the new edition of Agena.
  1. Parameter lists of procedures now accept names of user-defined types (see settype).
  2. Multiple indexes can now be separated by commas, e.g. a[1, 2] is equal to a[1][2], and a[1, 2, 3] is equal to a[1][2][3].
  3. The new instr operator searches for substrings within a string, supports regular expressions in the search pattern und also optionally starts from a given position in the string. It is twice as fast as strings.find. The function was named after a similar function in the Sinclair QL.
  4. The new subs function substitutes values in tables, sets, and sequences.
  5. The new formatting function _EnvPrint.Procedure has been added to allow the user to control how procedures and procedures with a user-defined type are output at the console.
  6. The new & operator concatenates strings. The current .. concatenation operator will gain a new meaning in one of the coming releases, so it is advised to no longer use it.
  7. The bitwise operators bandbnotbor, and bxor have been renamed to &&~~||^^ to resemble the bitwise operators on the Sinclair QL and vaguely in C. The old bitwise operators (band, etc.) are still supported for backward compatibility but will be deleted in the next major release.
  8. The garbage collector inadvertently deleted user-defined types. This has been fixed.
  9. map and select did not copy user-defined types to the new sets. This has been fixed.
  10. remove did not copy user-defined types and metatables with tables and sets. This has been fixed.
  11. The C API function agn_setutypestring has been removed. Use agn_setutype instead.

0.27.2: October 15, 2009

This is the second enhancement of Agena 0.27.
  1. The new toSet baselib function converts a string into a set of its characters, and a table or sequence into a set.
  2. 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 and recompiling Agena.
  3. io.readlines now also accepts file handles. When using file handles, as opposed to file names, please note that you must open and close the file manually before and  after using io.readlines (with io.open and io.close).
  4. io.readlines no longer returns an empty table if the file does not exist. Instead, it issues an error.
  5. toSeq now returns an error instead of fail if it does not receive a string, set, or table. 
  6. The baselib function used has been extended and can return memory usage in bytes, kbytes, and gbytes. It is a C function now.
  7. The undocumented gcinfo function has been deleted. Its functionality has been taken by used.
  8. The new C API function agn_usedbytes returns the number of bytes used by the system.
  9. Corrected wrong error message of toTable.
  10. Renamed C API function `agn_isioforcerror` to `agn_isioforceerror`.

0.27.1: October 11, 2009

This is an enhancement of Agena 0.27.0.
  1. xor has been extended to check for non-null and null constellations so that they can also process non-boolean values similar to the and, or, and not operators.
  2. Expressions like 'text'[1] and 'test'$(1) are now supported by the parser. Before, the string first had first to be stored to a name in order to subscript it.
  3. The manual has been updated. Also, a crash course has been added to the doc directory.
  4. The C API functions agn_ncall and agn_ccall now issue an error if the type of return of the Agena function call is not a number or complex value, respectively. This affects calc.fseq and calc.fsum.
  5. The C API function agn_ccall is now also available for the strict-ANSI and the DOS versions of Agena.
  6. The strict-ANSI versions of Agena, and the DOS and OS/2 versions do not try to initialise external/dynamic C libraries any longer.
  7. Provided a separate makefile to compile the strict-ANSI versions of Agena (compiled with the LUA_ANSI  option) so that the stats, calc, linalg, and ADS packages can now be used (they are now compiled into the Agena executable). Before, these packages could not be used in the strict-ANSI versions of Agena. See the `makefile.ansi` for instructions on how to compile under GCC.
  8. Improvements to the Linux installers: at uninstall, all the Agena directories are now deleted. The RPM  installer now also prints a hint at installation to properly set the AGENAPATH environment variable.
  9. Improvements to the Solaris installers: the PKG installer now also prints a hint at installation to properly set the AGENAPATH environment variable.

0.27.0: August 30, 2009

This is the new release of Agena.
  1. Added the error function math.erf, and the complementary error function math.erfc.
  2. 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.
  3. 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 fail.
  4. 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, depending on the setting of _EnvIoForceError.
  5. arcsin and arccos are now operators and thus around 40 % faster.
  6. Added the xor operator which performs a Boolean exclusive-OR on values which evaluate to or are true, false, fail, and null.
  7. 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.
  8. hasrtable now only returns true, if it has a read-write remember table (updated by the return statement).
  9. 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.
  10. The new operators gethigh and getlow retrieve the higher and the lower bytes from a number (i.e. C double).
  11. The new operators sethigh and setlow set the higher and the lower bytes to a number (i.e. C double).
  12. The new operators band, bor, bxor, and bnot conduct bitwise and, or, exclusive-or, and complementary operations on numbers.
  13. The bits package has been removed.
  14. 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.
  15. With real numbers x, math.argument now returns Pi instead of 0 if x < 0.
  16. Because of a bug in the underlying ANSI C library functions on UNIX systems, arcsin and arccos produced wrong results with complex numbers if their imaginary part was zero. This has been fixed.
  17. math.isPrime reported false with number 2. This has been corrected.
  18. As opposed to the manual, abs returned 2 for fail. Now it returns -1, as documented.
  19. Added the new C API function agn_isioforcerror which checks whether _EnvIoForceError has been set to a non-null value.
  20. 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.
  21. The new C API function agn_getbitwise returns the mode set by agn_setbitwise.
  22. The new C API function agn_setdigits sets the number of digits used for printing numbers.
  23. The new C API function agn_getdigits determines the number of digits used for printing numbers.
  24. Internal: Removed deprecated "REPL" entry from luaP_opnames.
  25. 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.

0.26.4: August 21, 2009

This is the fourth update to Agena 0.26.
  1. The new `math.fraction` function splits a number into its numerator and denominator.
  2. The new `math.nextafter` procedure returns the next machine floating-point number of its argument in a specified direction.
  3. `calc.fseq` has been extended to accept an optional step size.
  4. The new `calc.minimum` function returns possible minimum locations of a univariate function.
  5. `math.approx` returned wrong results with GCC compiled binaries because of a buggy C library function (fmax). This has been fixed. `math.approx` now uses a combination of a simple distance measurement for values near 0, and the approximation algorithm already implemented for comparing larger values.
  6. Version information and an icon are now compiled into the Windows binary.
  7. Added --large-address-aware switch to the Makefile in a hope that correct values for free physical RAM are returned in the Windows versions of Agena on computers with > 2 GBytes RAM and <= 4 Gbytes.

0.26.3: August 16, 2009

This is the third update to Agena 0.26.
  1. Minor improvements of the error messages issued by `io.write` and `io.writeline`.
  2. Revised the manual and included examples for the io, calc, and linalg packages.

0.26.2: August 13, 2009

This is a bug fix release.
  1. Agena quits in Windows if a line beginning with a hash and ending with a colon has been entered. This has been fixed.
  2. An input like:
      > for i to 10 do
      >    print(i)
      >    i:
      > od;
    confused the stack. Now a syntax error is issued if a value shall be printed using the colon notation and if the colon notation is not used in the first line of input.
  3. A complex division by 0+0*I now returns `undefined` on all platforms.

0.26.1: August 11, 2009

This is a bug fix release to Agena
0.26, mainly focussing on arithmetic, and also with some improvements to complex math.
  1. `toNumber` now also converts strings with complex values into genuine complex values.
  2. Extended `math.approx` to compare complex values, as well.
  3. Patched `math.approx` to return correct results.
  4. Patched `math.arccosh` to return correct results if its argument x is in [-infinity, 0].
  5. The `ln` operator returned `-infinity` instead of `undefined` if its argument is 0+0*I. This has been fixed.
  6. `math.arccoth` returned wrong results if its `real` argument x was less than 1 or x = -1+0*I or x = +1+0*I. This has been fixed.
  7. Patched `math.ceil` to work correctly with real numbers.
  8. The `gammaln` and `int` simply returned their argument if it were not a number. Now these operators return an error if no metamethods have been defined.
  9. Fixed an issue when compairing a number and a complex values that are both `undefined`.  In this case, the equality check returned `false`. Now `true` is returned.
  10. `math.binomial` now returns `undefined` if at least one of its arguments is not an integer.
  11. Patched `math.gcd`: If at least one of its argument is not an integral number, the function now returns 1.
  12. Patched `math.lcm`: If its second argument is 0, 0 is returned instead of `undefined`.
  13. Patched `max` and `min`: If the functions received an empty sequence, Agena crashed. This has been fixed. The functions now in general return `null` if they receive an empty table or sequence.
  14. `stats.median` crashed if it got an empty sequence. This has been fixed.
  15. Fixed crippled error message of `math.root`.

0.26.0: August 10, 2009

This is the new version of Agena
.
  1. The built-in module system inherited from Lua has been largely removed. The `require`, `module`, `seeall`, and all the other functions of the Lua `package` module are not available any longer. (`require` did not work in Agena due to faulty file path assembly, anyway.) Use readlib instead.
  2. `readlib` and `with` now first try to find a library in the current working directory. If this fails, then libname is traversed. Also packages loaded are now registered in the `package.loaded` table.
  3. The ' and " characters to denote strings now do have the same meaning. If you use a single quote to enter multline strings, backslashes to denote the end of a line are no longer needed.
  4. Changed behaviour of the split operator if its left-hand operand is equal to the right-hand operand or if the right-hand operand is the empty string: In these cases an empty set is returned instead of a sequence of two empty strings, or an error message, respectively.
  5. The functionality of the former C library function `strings.put` has been added to the `replace` operator, which is twice as fast. An alias for the old function name is available so that you can still use it (but at the expense of the speed gain).
  6. The new `os.drives` function returns all logical drives available to the local computer (OS/2 and Windows only).
  7. The new `os.drivestat` function returns information on a given logical drive on the local computer (Windows only): file system, label, total size, free size, and drive type (fixed, removable, etc.).
  8. The structure of the output of `os.fstat` has been changed, and the amount of information it determines has been increased. Additional returns are:
      - File attributes as an integer (C type mode_t), indexed with the key 'perms'.
      - File attributes as a string similar to that in UNIX, e.g. '-rw-rw-r--:-----', indexed with
        key 'bits'.
      - In OS/2 and Windows, the file attributes 'hidden', 'readonly', 'archived', and 'system' are also
        returned in the subtable with key 'owner'.
      Changes to the table returned by `os.fstat`:
      - File mode is now indexed with key 'mode' (formerly key 1).
      - File size is now indexed with key 'length' (formerly key 2).
  9. The new function `os.fattrib` changes the file mode using symbols known from UNIX or DOS instead of asking for octal numbers. The Windows and OS/2 versions also support OS-specific hidden, archived, readonly, and system file attributes.
  10. `os.beep` has been extended for the UNIX and DOS versions of Agena and now accept the number of seconds the loudspeaker shall issue a sound.
  11. Added Lua 5.1.4 patch 5 of `debug.getfenv` to the codebase.
  12. If the new environment variable _EnvLibnameReset is set true, then the `restart` statement resets libname to its original value defined in the OS environment variable AGENAPATH.
  13. `readlib`, `loadClib` and `with` now add the packages loaded to the `package.readlibbed` set.

0.25.6: August 09, 2009

This is the sixth update to Agena 0.25
.
  1. os.remove and os.move returned true even if the file to be moved or deleted did not exist. This has been changed.
  2. stringarray userdata could not be properly garbage-collected. Since this data structure is used by  strings.diamap, and strings.diamap along with its substitution userdata array is defined in the library.agn file, repeatingly restarting Agena consumes more and more memory (without freeing it later). This has been fixed.
  3. In Windows and OS/2, os.fcopy now correctly sets all OS-specific file permission attributes of the original file to the new file.
  4. In Windows, os.memstate stated the same value for total virtual and total physical memory sizes. This has been fixed.
  5. When printing structures, ANSI C NaN values (Not a Number, known in Agena as undefined) were printed  in the C fashion, e.g. `1.#QNAN`. This has been changed.
  6. In the OS/2 version, Agena now prints the number of free virtual RAM in kBytes at start-up.
  7. os.freemem is now supported in the OS/2 version of Agena and returns the free virtual RAM.
  8. At start-up, the Agena welcome message is now printed before the library.agn and agena.ini files are loaded.

0.25.5: August 05, 2009

This is the fifth update to Agena 0.25
.
  1. The split operator now supports delimitors that consists of more than one character, i.e. 'agena::language' split '::' -> seq('agena', 'language'). Also, Agena does not crash or run out of memory any more if an empty string is passed for the delimitor.
  2. Changed Agena initialisation to allow switches to work as expected: First, libname is assigned. Second, the library.agn and agena.ini files are read; and third, program options are run.
  3. When printing complex values that are elements in structures (tables, sets, sequences, pairs), Agena issued an error. This has been fixed.

0.25.4: August 01, 2009

This is the fourth update to Agena 0.25
.
  1. If libname included more than one path, then the readlib function printed misleading error messages in case a package could not be found while traversing libname. (The library could be initialised properly, however.) This has been fixed. Also improved error handling when trying to read non-existing linked C libraries or when executing Agena library files that are syntactically incorrect.
  2. Optimised function toTable a little bit.
  3. stats.median crashed with tables. This has been fixed.
  4. stats.minmax now returns fail if a sequence or table with less than two elements has been passed.

0.25.3: August 01, 2009

This is the third update to Agena 0.25
.
  1. Pairs can now be indexed in read operations with the integers 1 and 2.
  2. The manual has been updated. Especially, Chapters 4.6 (Arithmetic), 4.7 (Strings), 4.10 (Sets), and Chapter 4.11 (Sequences) have been revised.
  3. A mimetype language description file `agena.lang` has been added to the /schemes folder.
  4. All installers unfortunately overwrote the existing agena.ini file during installation. This has been changed.
  5. Renamed the following linalg functions: isantisymmetric to isAntisymmetric, isdiagonal to isDiagonal,  isdiagonal to isDiagonal, isidentity to isIdentity, ismatrix to isMatrix, issquare to isSquare, issymmetric to isSymmetric, and isvector to isVector. Aliases for the old function names are available so that you can still use them.

0.25.2: July 28, 2009


This is the second update to Agena 0.25
.
  1. The for/in loop now also accepts the null value. In this case, the loop does nothing, and Agena proceeds  with the statement following the loop.
  2. The os.fexists function has been renamed to os.exists to show that the function checks for the existence of files and directories. The old function name (os.fexists) can still be used via an alias automatically loaded at startup of Agena via library.agn.
  3. The biniolib.c C source file has been renamed to binio.c.
  4. The manual did not mention that for/in loops can also work on iterator functions. This has been changed. Also Chapters 4.9 (Tables) and 4.10 (Sets) have been revised.
  5. The readme.os2 file has been updated with correct instructions regarding additions to config.sys.
  6. The attrib function sometimes did not correctly determine whether a table array contained holes. Thus printing table arrays containing holes sometimes produced wrong output, i.e. the keys where not printed at the console. This has been fixed.
  7. If you set _EnvLongTable to true, then Agena did not print an empty line above the next prompt. This has been fixed.

0.25.1: July 26, 2009


This is the first update to Agena 0.25
.
  1. The number of bytes to be read by binio.readbytes can only be given by the environment variable _EnvBufferSize. This has been fixed - the user can now specify the number of bytes to be read with the optional second argument.
  2. os.chdir, os.rename, os.rmdir, os.remove, and os.mkdir issued wrong returns but did their job correctly: in case of a failure, the functions returned true instead of fail. In some other cases - depending on the operating systems - it returned fail even if there were no errors. This has been fixed.
  3. The os.rename function has been renamed to os.move to intuitively show that the function can rename a file and also move it to a new location on the file system. The old function name (os.rename) can still be used via an alias automatically loaded at startup of Agena via library.agn.
  4. The os.fstat function now also determines file and directory permissions (read, write, execute rights). In case of an error, the function returns fail instead of an empty table.
  5. The os.fcopy function now also sets the file permissions of the original file to the new file.
  6. A WarpIn installer is now provided for the OS/2 distribution.

0.25.0: July 19, 2009


This is new edition of Agena. It contains some new functions and is primarily a language-consistency release.

  1. Added the binio.readbytes and binio.writebytes functions which read and write a sequence of bytes, respectively. Both functions are much faster than binio.readchar and binio.writechar when working on a larger number of bytes.
  2. Added the os.fcopy function which copies files. It has been implemented in C to ensure maximum performance. The user has some control by changing the internal buffer size with the new environment variable _EnvBufferSize.
  3. For simplicity, the enviroment variable _EnvAgenaPath has been renamed libname.
  4. The enviroment variable _EnvPrintNewLineAfterInput has been renamed _EnvPrintEmpyLine, because the former name was somehow confusing.
  5. os.md has been renamed to os.mkdir, os.rd to os.rmdir, os.rm to os.remove, os.cd to os.chdir, os.ls to os.list, os.pwd to os.curdir, and os.lscore to os.listcore. For backward compatibility, aliases have been added to the library.agn file so that the old names can still be used.
  6. The isnull operator finally has been deleted. Use the unassigned operator instead.
  7. The bottom and top keywords have been deleted. They have been substituted by left and right, respectively. Thus, now use `pop left from ...` instead of `pop bottom from ...`, and `pop right from ...` instead of `pop top from ...`.
  8. The getbottom and gettop operators have been deleted. They have been substituted by the left and right operators, respectively.
  9. Some few optimizations to the C source code.
  10. Added updated nedit.rc scheme for the nedit text editor to the Solaris installer.
  11. The agena.ini is no longer shipped with the installers to prevent overwriting your own personal agena.ini file when updating Agena to a new release. Instead, the agena.ini.sample file is distributed which you may rename to agena.ini to play with the initialisation feature.
  12. Tuned tables.bisEqual, tables.bminus, tables.bintersect and tables.duplicates by not deeply copying its arguments if they do not need to be sorted internally.
  13. Tuned tables.duplicates by 8 %.
  14. File and directory names returned by os.list are now sorted. Also, the * magic character is now interpreted correctly (one or more repetitions). os.list now recognizes the ? magic character in file names (exactly one character of any type).

0.24.3: July 11, 2009


This is the third update of Agena 0.24.

  1. io.write and io.writeline sometimes crashed Agena if called without arguments within procedures. This has been fixed.
  2. If a structure (table, set, sequence, or pair) contained another structure with a circular reference, then Agena issued an error when printing the contents of the structure with print because of stack overflows. This has been fixed.
  3. If _EnvLongTable is true then when printing _G, the last but one and the last entry were printed on the very same line. This has been fixed.

0.24.2: July 05, 2009


This is the second update of Agena 0.24.

  1. Settled problems with stack overflows when printing self-referencing structures on the console.
  2. The iolib package now provides the __tostring metamethod to properly print file handles returned by io.open (file(xyz) instead of userdata(xyz)). The __gc metamethod has also been added to the iolib package.
  3. tables.bisEqualtables.bminus, and tables.bintersect now do not modify their arguments in case they need to be sorted internally.
  4. Included Lua 5.1.4 bug fix #3: Wrong code generation for some particular boolean expressions.
    Example: print(((1 or false) and true) or false)  # --> 1, but should be 'true'.
    This has been fixed.
  5. Included Lua 5.1.4 bug fix #4: luaV_settable may invalidate a reference to a table and try to reuse it. This has been fixed.

0.24.1: July 04, 2009


This is an update of Agena 0.24.

  1. for/in iteration over strings is now up to 10 % faster.
  2. for/in now returns a proper error message if the object to be iterated is not a structure or a procedure.
  3. Tweaked for/in iteration over sequences a little bit (max. 1.5 % faster).
  4. os.ls now supports jokers within paths. Thus you may select subsets of files in a directory, e.g. "os.ls('*.c')" to select all files with suffix '.c'.
  5. All dump/undump functions inherited from Lua were deleted. Thus, strings.dump is no longer available.
  6. binio.open no longer evaluates the _EnvVerbose setting and thus ignores it.
  7. Removed support for an experimental second ADS sequence type from the ads package.
  8. Removed the following unused C API function: agn_isutype.
  9. Optimized internal type check for remember table value insertion.
  10. Optimized internal type check in set comparisons (=, subset, xsubset).
  11. If the pop statement encountered an error, a wrong line number has been displayed. This has been fixed.
  12. The pop statement could sometimes not be used within procedures. This has been fixed.

0.24.0: June 27, 2009


This is a new release of Agena.

  1. Introduced the new unassigned operator that will replace isnull in the future. It is advised that you exclusively use unassigned in your code. This is a language consistency measure. The isnull operator will be deprecated.
  2. Added facilities for stack programming. They exclusively operate on sequences:
    • The pop bottom from statement deletes the entry with the smallest key (actually key 1), thus popping the first entry from the stack and shifting all other elements down.
    • The pop top from statement deletes the entry with the greatest key, thus popping the top entry from the stack.
    • The getbottom operator returns the entry with the smallest key in a sequence, thus returning the entry on the bottom of the stack.
    • The gettop operator returns the entry with the greatest key in a sequence, thus returning the entry on the top of the stack.
    (With the already existing insert/into statement you can put a value on top of a stack.)
  3. Agena now provides a means to read user-specific initialisation, standard library and package files from different locations. The environment variable _EnvAgenaPath can now contain one or more paths separated by semicolons, e.g. 'd:/agena/lib;c:\programme\agena\lib'. Agena searches all paths in _EnvAgenaPath at initialisation or when invoking a new package:
    • The way Agena reads the library.agn and agena.ini files at initialisation and in case of a restart has changed: Agena searches all paths in _EnvAgenaPath from the left to the right for the above mentioned files. If it finds one and can execute it successfully, then all paths left in _EnvAgenaPath are skipped for the processed file.
    • The readlib and with functions search all paths in _EnvAgenaPath from the left to the right for the package files. If a package could be loaded successfully, then all paths left in _EnvAgenaPath are skipped. readlib continues with finding and loading other packages, if their names are given to the  function as optional arguments.
  4. readlib no longer accepts full filenames as input, e.g. `/usr/agena/lib/calc.agn'. Use run instead.
  5. If a package exists of both a C DLL/SO file and an Agena text file, then readlib and with now expect them to be stored in the very same folder; otherwise, a package may only be partially initialised. This behaviour has been introduced to avoid confusion.
  6. The Windows version now has a further fallback if it cannot find the system environment variable AGENAPATH during initialisation: It searches for the Agena main library folder by querying the Windows `ProgramFiles` system environment variable, and tries to set _EnvAgenaPath to it if the user has read access permissions. In UNIX, _EnvAgenaPath now is set to /usr/agena/lib only if the user has read permissions for this folder.
  7. If _EnvAgenaPath could not be determined at startup, Agena now enters into interactive mode instead of just quitting. A proper help text is displayed to help the user with reconfiguration.
  8. The facility to read a configuration file at startup by querying the "LUA_INIT" system environment variable has been removed, as in most cases you would have problems if Lua is installed on your system and the variable is set to be used by Lua.
  9. The new C API function agn_tostring converts a stack value to a value of C type const char*.
  10. Fixed a bug that reset _EnvAgenaPath when running restart.
  11. binio.open and ads.openbase now issue a proper error message if the user does not have the proper rights for files that already exist.
  12. io.fexists now only returns true if the file exists and the user has at least read permissions for this file.
  13. Updated scheme files for Proton and Nedit.

0.23.0: June 15, 2009


This is the new release of Agena.

  1. math.sinhmath.cosh, and math.tanh have been deleted. Use the new operators sinhcosh, and tanh operators instead, which are 40 % faster.
  2. The new float operator checks whether a number is a float, i.e. not an integer.
  3. The new strings.isLatinNumeric function checks whether a string consists entirely of numbers or Latin letters and returns true or false.
  4. The new math.convertbase function converts a number or a number represented as a string from one base to another base.
  5. The userinfo baselib function has been transformed to a C library function. It is now four times faster. Also, it does not print tabs between values any longer.
  6. Fixed a bug in the restart statement that creepingly increased the stack with some unwanted side effects in error messages or when executing restarts in a loop.
  7. The Windows installer now should work flawlessly with Windows 7 Beta due to a migration to NSIS 2.45.

0.22.2: June 12, 2009


This edition extends Agena 0.22.1 and also fixes some few bugs.

  1. Added the bits package providing four functions for bitwise integer manipulation.
  2. Rewrote math.irem so that large numbers are treated correctly and are not affected by internal overflows any longer.
  3. The ** operator has been tuned by at least 30 % when raising complex numbers. It now issues an error if the exponent is not a number. If the exponent is an integer in [2 .. 29], it is even three times faster than before.
  4. The precedence of the ! operator to construct complex numbers has been changed from highest to `above medium`, i.e. it is now the same as the precedence of unary operators. This means that -1!2 no longer is -1-2*I, but -1+2*I. The ! operator is still left-associative. Note that `sin 1!2` now is no longer `sin(1!2)` but (sin 1)!2. It is advised that you use brackets when applying unary operators on complex values.
  5. The ! operator did not explicitely check its arguments for the number type. This has been changed.
  6. The print function issued an error if a structure contained nulls. This has been changed.
  7. The print function now explicitly flushes any output to the console (to stdout) before returning so that text immediately appears on screen (sometimes needed in UNIX).
  8. calc.zero contained a severe bug by not returning all zeros found and also returning results that were not zeros. This has been changed.
  9. The formerly undocumented userinfo function did not work as expected. This has been changed.
  10. tables.writeTable has been removed. Use the new utils.writeCSV procedure instead, which is more sophisticated.
  11. Added descriptions of the previously undocumented utils.isLeapYear and userinfo functions to the manual.
  12. The Solaris and Linux installers now store all important Agena header files in /usr/include/agena.

0.22.1: May 31, 2009


This edition extends Agena 0.22.0 and also fixes two bugs.
  1. Complex arithmetic is now three to six times faster than before, depending on your machine and operating system. Overall performance, however, has decreased by 4 % (i86) to 8 % (Sparc) because of this tuning measure, for complex numbers are no longer implemented as a collectable C structure, but as a primary data type such as numbers and booleans.
  2. Read-only remember tables can now also be used by C functions. All remember table baselib functions (rinit, rget, rset, rdelete) now also work on C functions.
  3. rget has been extended such that it can return the original rtable along with its hash values. You cannot destroy the internal remember table by changing the table returned by rget.
  4. The == operator has been generalized to compare all data types, not only tables, sets, and sequences.
  5. The == operator now compares tables and sequences inside other structures strictly, and not the Cantor way.
  6. The == operator did not check sequences correctly, this has been fixed.
  7. Added metamethod handling for the == operator (key '__eeq').
  8. The '__eq' and '__eeq' metamethods now map the return value fail to false, and not true.
  9. User-defined data types were not properly printed at the console. This has been changed.
  10. Removed metamethod handling for shift operator.
  11. The new C API function agn_copy returns a true copy of a structure. The copy is put onto the top of the stack, but the original table is not removed.
  12. The new C API function agn_getfunctiontype returns whether a function is a C or Agena function.
  13. Misc:
    - In order to reduce the size of the OS/2 and DOS distributions and the amount of time it needs  to
      build them, the /src directory structure has been changed.
      - The standard source ZIP file now includes special makefiles for building Agena in OS/2 and DOS.
        Thus the OS/2 and DOS ZIP files do not include the sources any longer.
      - Extensions to the NSIS Windows installer.

0.22.0: May 28, 2009

  1. Summary:
    a) The new `==` operator compares tables, sets, and sequences for strict equality.
    b) Functions can now have read-only remember tables which contain precomputed results for super-
        fast access.
    c) The way Agena prints structures at the console is now completely controlled by Agena procedures
        which you may change to your own needs.
    d) Some other new features and some deletions of functions that have become useless.
  2. The new `==` operator compares two tables or sequences and returns true if they contain the same  key~value pairs or entries, respectively, i.e. it does not compare them the Cantor way. It also works with sets, but performs the same operations as with the `=` operator.
  3. Added super-fast read-only remember tables (rotables). Contrary to normal rtables, this special rotable cannot be updated by the `return` statement for the sake of speed if a function value could not be found in the remember table. Further entries can be added with the `rset` function, however. All remember table baselib functions (rinit, rget, rset, rdelete, rwritemode) work on rotables, as well.
  4. Added the new `defaults` baselib function to lib/library.agn. The function is an easy interface to create, return, update, and delete read-only remember tables.
  5. The `rset` function now does not _add_ an arguments~results pair if the arguments already exist in the  remember table. Instead, the function now replaces the arguments~results pair originally stored to the rtable with the new one. All these changes have been done to the agn_setrtable C API function which `rset` interfaces and work with both rtables and rotables.
  6. All remember table baselib functions (rinit, rget, rset, rdelete) now issue an error if a C function has been passed to them.
  7. The former C math library function `math.fact` has been converted to an Agena function taking advantage of the new rotables. The Agena version is as fast as the former C implementation.
  8. The new `pointer` function returns the memory address of various values as a string. This function has been added to support user-defined printing functions(_EnvPrint).
  9. Introduced the new environment variable _EnvPrintNoNewLine. If it is set true the `print` function does not print a newline when it quits, otherwise a newline is printed. This feature has been added to support more control for user-defined printing functions(_EnvPrint).
  10. Added a precautional check for enough stack space in the VM function that compares tables in order to prevent any crashes that might occur in weird situations.
  11. Optimized output of tables with the standard printing method: If a key is a table, then all its components are printed instead of the former 'table(memaddress)' format.
  12. The way the `print` function prints structures (tables, sets, sequences, pairs, and complex numbers) at the console has been changed such that it only uses the _EnvPrint functions defined in the lib/library.agn file. Internally, all formatting functions written in C have been deleted. The ouput, however, completely looks the same as in former Agena versions, as the _EnvPrint functions work exactly the same like the former internal C formatting functions.
  13. The `attrib` function now also indicates whether a table array includes at least one hole.
  14. The `attrib` function now checks whether a function has a remember table and whether the function is a C or Agena function.
  15. `math.isInteger` and `math.isFloat` have been deleted. Use `x = int(x)` or `x <> int(x)` respectively, because they are much faster.
  16. Improved error handling of the ADS package:
      - If a file contains a sequences, then all respective functions interrupt with an
        error instead of just returning `fail`.
      - `ads.free` returns `fail` instead of `false` if the file has not been opened.
      - `ads.rawsearch` returns `fail` instead of false when the given column does not exist.
      - `ads.createbase` now interrupts with an error instead of just returning
        fail if it received wrong arguments.
      - `ads.comment` now interrupts with an error instead of just returning `undefined` if
        something internally goes wrong when restructuring the file for storing the new
        comment.
      - `ads.clean` now interrupts with an error instead of just returning `undefined` if
        something internally goes wrong when restructuring the file.
  17. The Solaris, Linux, and Windows installers now contain the nedit and Proton editor language schemes.
  18. Deleted useless functions in the utils package (`utils.convertText` and `utils.convertText2`, plus a mapping table), their functionality is already available in the more sophisticated `strings.diamap` function.

0.21.1: May 23, 2009

  1. Changes to the `linalg` and `calc` packages due to the renamed `utype` operator.
  2. Type checking in various `stats` procedures has been updated to the new Agena double colon syntax in the parameter lists.
  3. The `ops` function could not be called because of a collision with an unused keyword of the same name. This has been fixed.
  4. `ads.invalids` did not behave properly when receiving a sequence, this has been fixed.
  5. Various revisions to the manual.
  6. _EnvWithProtected now is a set and not a table. This avoids that the structure is filled again and again with the same protected names when conducting restarts.
  7. nargs did not count nulls that have explicitely been passed to a function to the right of non-null arguments. This has been fixed.

0.21.0: April 26, 2009

  1. The semantics for the optional type specifier in the parameter lists of functions have been changed: If a type specifier has been given, then when calling the function you _must_ pass the corresponding argument, else Agena returns an error. This is to avoid executing time consuming `if nargs ... ` or `try ... as` statements in the procedure body. Mean increase in speed is around 10 %.
  2. Multiline-strings can now be entered by using double quotes. Contrary to single quotes, no backslashes are needed to indicate the end of a line.
  3. Changed the name of the `utype` operator to `typeof`.
  4. The `entier` operator and the `math.ceil` and `math.arctan2` functions now also support complex numbers.
  5. The `insert` statement now supports metamethods for tables, sets, and sequences. This also means that you can now use the `__writeindex` metamethod with sets, because the `insert` statement is the only function besides `rawset` that puts elements into sets.
  6. The `rawset` function has been extended such that it will insert an element into the next free position in a table or sequence if it is called with only two arguments. This is quite comfortable if you use the insert statement to add elements into a structure and want to use the `__writeindex` metamethod for this.
  7. The way Agena outputs tables, sets, sequences, pairs, and complex values can now be defined by the user via the `_EnvPrint` function table. See the Appendix A5 in the manual for further details.
  8. Agena can now print tables differently at the console: If the global variable `_EnvLongTable` is not set to true or if it is unassigned, then tables are printed like sets and sequences, e.g. [1, 2, 3] (provided you have not defined your own printing routine `_EnvPrint.Table`, see above). If `_EnvLongTable` is true, then each key~value pair will be printed at a separate line. For compatibility with older releases, `_EnvLongTable` is set to true in the agena.ini file that is shipped with this 0.21.0 release.
  9. The new functions `strings.isUpperLatin` and `strings.isUpperAlpha` check whether a string consists entirely of upper-case letters.
  10. `math.isfloat` and `math.isinteger` have been renamed `math.isFloat` and `math.isInteger`.
  11. Fixed a bug in the `print` function. If an object to be printed featured an `__index` metamethod, then with a call to `print`, the `__index` metamethod received a "_G" key which it tried to index. This often caused syntax errors with the `__index` metamethod.
  12. The `å` character was not acknowledged as a diacritic. This has been fixed.

0.20.2: April 18, 2009

  1. `binio.open` and `binio.close` could crash Agena if the user deleted the binio.openfiles table, a table indicating which files are currently open. The same applied to the corresponding functions in the ads package. This has been fixed: if the binio.openfiles or the ads.openfiles tables do not exist or are anything other than tables, then the `open` and `close` functions of these packages will not attempt to write to or read from these (missing) tables.
  2. `rawget` crashed the interpreter if applied to sets. This has been fixed.
  3. Improved error messages of `rawget` with respect to sequences and pairs.
  4. The faulty C API function `lua_sget`, which checked whether an element exists in a set, has been deleted. Use lua_srawget instead.
  5. Improved some error messages if something went wrong at initialisation of the interpreter.
  6. `setmetatable` can no longer set metatables to complex values.
0.20.1: April 15, 2009
  1. If a strings has been indexed with square brackets, Agena 0.20.0 and 0.14.0 crashed in some cases. This has been fixed.
  2. There were crashes with `strings.seek` and `strings.rseek` if the starting position (third, optional argument) had been positive or negative, respectively, and if its absolute value has been far greater than the actual length of the string.
  3. Changes to the `calc` and `linalg` packages with respect to argument checking.
  4. `os.system` now returns `NT 4.0` instead of `NT` for Windows NT 4.0.
  5. Tuned strings.isEnding (20 % faster).

0.20.0: April 13, 2009
  1. A parameter of a procedure can now be followed by an optional type specifier preceded by a double colon. If a type specifier is given then Agena will issue an error if arguments of the incorrect type are passed to the procedure. With multiple parameters, this optional type checking is around 14 % faster than an equivalent try statement. An optional type specifier can also be given for short-cut procedures.
  2. Error output at the console has been completely reworked. It now returns better and more useful information.
  3. With procedure definitions, the `is` keyword following the parameter list is now optional.
  4. The `__newindex` metamethod has been renamed to `__writeindex`, as it will always be called (if present) even if a key already exists in a structure.
  5. The new `strings.isAbbrev` function checks whether a string starts with a given substring.
  6. The new `strings.isEnding` function checks whether a string ends in a given substring.
  7. The new `strings.remove` function deletes characters from a string.
  8. The functions `binio.make` and `strings.isMagic2` have been deleted.

0.14.0: April 09, 2009
  1. The precedence of the colon operator to construct pairs has been changed from very high to medium. It has now the same priority as the concatenation operator (`..`), and is still right-associative. Thus when passing optional arguments to functions via the option~expr syntax, you do not have to use brackets any longer in most cases if expr consists of more than one operand.
  2. Changed semantics of the `__newindex` metamethod: If the structure is a table, then the metamethod is always called - regardless of whether the key to which a value shall be assigned is already present in the structure or not.
  3. The dozen operator `d` for numbers has been changed to `D` for consistency with number constructors returning a result which cannot be divided by 10. Thus 1D = 12, 2D = 24, ...
  4. The `with` package initalization function now support initialization procedures. If a procedure named `<packagename>.init` is present in your package then it is executed if the package has been found successfully.
  5. Strings can now be indexed with square brackets. This will return a single character from the string, i.e. str[n] will return the n-th character in string str.  It is around 8 % faster than using the str$(n, n) notation.
  6. The `insert` and `delete` statements now also process multiple returns correctly. In earlier versions, only the first element in a multiple return was inserted or deleted.
  7. It is now possible to define user-defined types for sets. `gettype`, `settype`, and `utype` have been extended to support this new feature. The new C API function agn_issetutype checks whether a set is of a given user-defined type.
  8. Renamed `add` and `qadd` operators to `sadd` and `qsadd`.
  9. Renamed the baselib `op` function to `ops`.
  10. Renamed `linalg.vadd` `linalg.vsub` to `linalg.add` and `linalg.sub`.
  11. Improvements to error messages of `left`, `right`, `real`, `imag`, `char`, `trim`, `upper`, `lower`, `unique`, `sadd`, and `qsadd` operators and to the error messages of `seq`, `set`, `table`, and `dict` constructors. All the above mentioned operators and constructors now return the type actually passed in case of type mismatch.
  12. The new `strings.rseek` function searches a string from its right end to its left beginning. This is useful for example in linguistics to search for inflectional endings.
  13. `strings.ltrim` and `strings.rtrim` now also trim strings with any given leading or trailing character. Before, only white spaces were removed.
  14. The new `strings.put` function will insert a new string into another string at a given position, substituting the character at this position with the new string which consists of zero, one or more characters. This function is more convenient than using a mix of substring and concatenation operators and is as fast as them.
  15. The new `strings.words` function counts the number of words in a string. A word is any sequence of characters surrounded by white spaces, however, the user can define any other delimitor.
  16. On Windows systems, the `math.arcsin` and `math.arccos` functions now return complex values for their arguments z = x + I*y, if |x| > 1 and y = 0. In former Windows versions, the return was `undefined`. On all other operating systems, this extension has already existed, maybe due other versions of libm(ath).
  17. The `wait` function in the utils package has moved to the os package and thus can now be called with the name `os.wait`.
  18. The `binio.open` function has been extended to - besides opening existing files - also create new ones. Thus the `binio.make` function will be deprecated.
  19. The formerly undocumented `binio.sync` function flushes all unwritten content to a file and is now described in the manual.
  20. Changed contents of the global _RELEASE variable. It now a string of the format `AGENA >> a.b.c` where a is the major release, b is the subrelease, and c the patch level.
  21. Also added a new system variable _EnvRelease which is a sequence of the string `AGENA`, the number a, the number b, and the number c where a, b, c have the same meaning as mentioned in the above format string.
  22. Changed syntax of `os.beep`: The function can now also be called without arguments. Support for both length and frequency information has been added to the OS/2 distribution.
  23. The new `os.battery` function returns the status of the battery on laptops. It works in OS/2 and Windows 2000 or higher, and returns fail on all other operating systems.
  24. `os.isDOS` now returns false in Windows systems.
  25. The new `os.isWin` and `os.isOS2` functions check whether Agena is running on Windows or OS/2,   respectively.
  26. The `toString` base library function now also handles complex values and pairs: It returns its components as two strings.
  27. `unpack` with tables now determines the number of table array elements differently. This avoids for nulls being returned if dictionary elements are also present in the table.
  28. The new `clock` package adds, subtracts, and multiplies hours, minutes, and seconds.
  29. Moved the `approx` function from baselib to the math package.
  30. Tuned `replace` operator regarding sequences.

0.13.4: April 09, 2009

  1. Fixed a bug in `strings.seek` which ignored negative values for the starting position.
  2. Fixed strings.ltrim which could crash Agena because it flooded the stack with temporary values. Crashes occured only if the strings had too many leading spaces.
  3. `binio.make` and `binio.open` do no longer accept _Agena numbers_ as a first argument (the file name) for this might be misleading since the user might confuse it with a numeric file handle. Thus the two functions only accept strings (which might include or consists of numbers entirely, of course).
  4. Extended `os.isUNIX` to identify HP-Unix, AIX, IRIX, and FreeBSD.
  5. Extended `os.isLinux` to identify more versions of Linux.
  6. Extended `os.system` to also identify Windows Vista, Windows 7, Windows 2003, and Windows 2008 Server. In Windows, the function now also returns the internal major (dwMajorVersion) and minor (dwMinorVersion) Windows version numbers as well as the product type (wProductType) as further entries in the resulting table.
  7. The `cls` statement is now also supported in the OS/2 version.
  8. `tables.put` displayed a wrong function name in error messages.
  9. Fixed a bug in the Windows installer that did not remove the /share subdirectory at uninstall.

0.13.3: April 04, 2009

  1. Patched `clear` statement: if the arguments were passed in enclosing brackets, a syntax error was issued, because the closing bracket was not checked correctly.
  2. A bug in the `delete` statement with respect to sets has been fixed. When deleting elements from a set of more than ten items, not all the elements to be deleted were actually removed from the set. The statement worked fine with tables and sequences, however.
  3. The `insert` and `delete` statements might unnecessarily enlarge the amount of memory needed by the stack. Although this behaviour did not show up in 0.13.2 and earlier, this fix was added.
  4. Substituted the following older Lua C functions in ldo.c with the ones from Lua 5.1.4: resetstack, callrethooks, lua_resume, lua_yield.
  5. Substituted the following older Lua C functions in lstate.c with the ones from Lua 5.1.4: preinit_state, lua_close.
  6. Substituted the following older Lua C structure definition in lstate.h with the one from Lua 5.1.4: lua_State.
  7. A little bit of code cleaning in loslib.c to avoid compiler warnings and errors in case the file is compiled in Non-Windows, Non-DOS, and Non-UNIX environments.
  8. Tuned `toTable` function by removing an unnecessary second type check.
  9. In OS/2, `os.memstate` now is fully supported and also returns the number of resident pages.
  10. In OS/2, `utils.wait`, `os.system`, and `io.getkey` are now fully supported.
  11. Renaming of four basic C header files (lua.h -> agena.h, luaconf.h -> agnconf.h, lauxlib.h -> aauxlib.h, and lualib.h -> agenalib.h) in the src directory to support development of additional packages. Also renamed lua.c to agena.c. (Agena is based on Lua 5.1 sources.)
  12. The Solaris and Linux package installers now also add the above mentioned four header files to /usr/include.
  13. The Solaris installer now also includes a libagena.so file.

0.13.2: March 24, 2009

  1. Substituted the following older Lua C functions in aauxlib.c with the ones from Lua 5.1.4 (lauxlib.c file): getF, luaL_loadfile, luaI_openlib.
  2. If an error occurs in a procedure loaded from a file with run, readlib, or with, the phrase `Error, Error in ..` sometimes had been issued on the console. This has been fixed.
  3. Fixed the agn_size C function in lapi.c file which could have made troubles if you would have changed the #define lua_assert(x)   ((void)0) pragmas in agenalib.h or llimits.h to something else and have recompiled Agena.
  4. In case the `in` operator returns an error because the operands are of the wrong type, there was a surplus space in the error message.
  5. If a function calls itself four times or more, `nargs` sometimes did not return the correct number of actual arguments passed to a procedure.
  6. When loading the ADS package with run, readlib, or with, an error was issued stating that the text package could not be found. Thus ads.lookup and ads.search could not work.

0.13.1: March 01, 2009

  1. Patched C `agnV_try` function executing try statements, in src/lvm.c: In scarce situations the try statement prints something like `for (null) `(null)`: ...` on the console when detecting that a name is of a wrong type.
  2. Patched C `db_errorfb` function issuing error messages, in src/ldblib.c: 
    Bug 1: If an error occurs in a procedure loaded from an .agn file, the name of this file is not printed in the error traceback. Instead, Agena prints the error message `... proc(null), line ...`, not indicating the place where the error happened.
    Bug 2: With procedures entered at the console, the line number where an error occured is printed twice.
  3. Patched `with` function, in lib/library.lib:
    Bug 1: If a .dll or .so file of a package <pkgname> has not been found in the lib folder, the function does not look into the <pkgname> directory of the main Agena folder to find and run it from there.
    Bug 2: If an optional argument is not a string, the error message should be more precise.
    Bug 3: If an optional argument is unassigned, i.e. is or evaluates to null, no warning is issued.
    Note that with this fix, the package files (text .agn file and/or binary .dll/.so file) must both now reside in either the lib or in the <pkgname> folder.
  4. Cleaned C code (mixed declarations and code, C++ style comments).
  5. Changed agnUS_setnum and agnUS_setstr C functions in src/lset.c so that no compilation warnings are issued any longer.
The OS/2 Warp 4 version of 0.13.1 features the following changes:
  1. Adaptions to the source files to support OS/2.
  2. The os package has been extended to support OS/2:
      a) os.memstate now partially returns status information on memory.
      b) os.login now returns the name of the current user.
      c) os.md, os.beep, and os.wait now work.
  3. Changed syntax of os.beep in the OS/2 distribution: the function does not require any arguments any longer.

0.13.0: January 24, 2009

  1. First public release.
 Back