Home / Indice sezione
 www.icosaedro.it 

 M2 - Download

Last available version: 1.5-20110205

In order to successfully compile and execute M2 programs you will need the M2 development system AND the conservative garbage collector:

1) M2 Development System:

Stable version: m2-1.5-20110205.tar.gz (136 KB)
or
Under development: see CVS server
Source of the M2 compiler and application libraries. Basically, the M2-to-C compiler is a simple C program that reads the M2 source and then generates the corresponding C source.

2) Conservative Garbage Collector: gc-7.2alpha2.tar.gz (1.2 MB)
The installation of this GC is not mandatory, but highly recommended. It can be installed also later. Check for uptades in its official WEB site www.hpl.hp.com/personal/Hans_Boehm/gc/. This GC is used by many other projects, like GJC, Mozilla, W3m, Mono, DotGNU, so it might be already present in your system. Please check your system for the presence of the library libgc.so (use the command `locate libgc.so').

Note about the installation of the GC shared library. Normally the GC shared library gets installed under the directory /usr/local/lib rather than the default /usr/lib. To make the dynamic linker aware of the contents of this new directory you need to add the directory to the list /etc/ld.so.conf then run the command ldconfig. As an alternative, go to the directory /usr/lib then set here a symbolic link ln -s ../local/lib/libgc.so . . If you get the error message error while loading shared libraries: libgc.so.1: cannot open shared object file: No such file or directory, here is the fix.

Installing under Microsoft Windows

Please read these installation notes.

Updates Changelog

Version 1.5, release date 2011-02-05
------------------------------------
- Bug fix: the buffer module now do not relocate its data structure, so
  allowing several M2 variables to refer to the same buffer without causing
  inconsistent memory handling.
- m2.stor() now supports NAN, INF and -INF, case insensitive.
- Add function m2runtime.eq() to compare boolean values.
- Add math.is_nan() to check for NAN values.
- Add str.starts_with() and str.ends_with().

Version 1.4, release date 2009-07-12
------------------------------------
- Bug fix: m2runtime.StringToLitera() now properly handle non-ASCII chars.
- Compiler and libraries now tested on x86_32 and x86_64 processors.
- 'configure' now detects and supports 64-bit, little endian processors.
- math library: added ceil() and floor().
Recommended: install also the latest version of the GC library gc-7.2alpha2.

Version 1.3, release date 2007-09-24
------------------------------------
- Fixed incompatibility with GCC 4, tested with GCC 4.1.2 (thanks to A.D.).
- Fixed incompatibility with Ubuntu default shell command (thanks to A.D.).
- The installation of the garbage collector GC is no more mandatory,
  although highly recommended. This relaxes the installation requirements.
Special thanks to Alejandro Dubrovsky for its help.

Version 1.3, release date 2007-06-07
------------------------------------
- Language: introducing VAR STATIC for local var. statically allocated.
- Compiler: literal strings and IDs can now be of any length.
- m2.input() can now read also binary files and lines of any length.
- str.join(): the last element now is added (BUG FIX).

Version 1.3, release date 2006-12-20
------------------------------------
- Released under a BSD-style license (see file LICENSE for details).
- m2 script: it try do guess the preferences, then it "source" /etc/m2 and
  $HOME/.m2, in this order.
- m2 script: accepts ".cgi" file extension as an alternative to ".mod".
- io.imp: missing macro TEMP_FAILURE_RETRY patch (provided by Markus Kuehni).
- io.imp, m2.imp, str.imp: minor corrections to formal incompatibilities
  detected by newer versions of gcc.
- math.def: added required -lm linker option.
- new: anArray[] allowed as shortland for anArray[ count(anArray) ].
- new: m2runtime.lock() locks a RECORD/ARRAY for read-only.
- The 'configure' script now detect machine endianess (only for 32-bit).

Version 1.2, release date 2005-04-03
------------------------------------
- New type FORWARD. Many modules rewritten using this type.
- Enforcing of the scope rules - see the report for details.
- Extended support for the postfixed function calls.
- Preserved precision in literal REAL numbers from M2 to C source.
- Linking info about a module M are now stored in a separate file M.lnk
- The script "m2" now read preferences from "$HOME/.m2".
- New syntax for expressions. The precedence rules of the operators are now
  applied. IF i>0 AND b THEN --> IF (i>0) AND b THEN.
- Added the function FINALIZER() built-in to the compiler.
- Instruction TRY: new syntax; more accurate error reporting.
- Errors that cause the termination of the program now calls abort().
- HALT(): now generate an abort() for program debugging.
- All the components of a module (M.c, M.lnk) now are searched in the same
  directory where the M.def was found.
- Module "io": interely redesigned.
- Module "math": mostly rewritten; new functions.
- Module "bt_": still incomplete - removed from the package.

Version 1.1, release date 2005-03-07
------------------------------------
- Fixed bug compiling complex expressions.
- Added the SWITCH instruction.
- Some functions moved from m2 to m2runtime.
- Executables are now 20% shorter and 200% faster.
- Introduced the experimental postfixed notation x->f()

Version 1.0, release date 2004-09-01
------------------------------------
- First public release.

Umberto Salsi
Commenti
Contatto
Mappa
Home / Indice sezione
Still no comments to this page. Use the Comments link above to add your contribute.