slang 2.3.1 rele review

Download
by rbytes.net on

S-Lang is a multi-platform programmer's library designed to allow a developer to create robust multi-platform software. It provide

License: GPL (GNU General Public License)
File size: 0K
Developer: John E. Davis
0 stars award from rbytes.net

S-Lang is a multi-platform programmer's library designed to allow a developer to create robust multi-platform software.

It provides facilities required by interactive applications such as display/screen management, keyboard input, keymaps, and so on. The most exciting feature of the library is the slang interpreter that may be easily embedded into a program to make it extensible.

The language features both global and local variables, branching and looping constructs, user-defined functions, structures, datatypes, and arrays. In addition, there is limited support for pointer types. The concise array syntax rivals that of commercial array-based numerical computing environments.

The language provides built-in support for string, integer (signed and unsigned long and short), double precision floating point, and double precision complex numbers. In addition, it supports user defined structure types, multi-dimensional array types, and associative arrays.

To facilitate the construction of sophisticated data structures such as linked lists and trees, a `reference' type was added to the language. The reference type provides much of the same flexibility as pointers in other languages. Finally, applications embedding the interpreter may also provide special application specific types, such as the Mark_Type that the jed editor provides.

The language provides standard arithmetic operations such as addition, subtraction, multiplication, and division. It also provides support for modulo arithmetic as well as operations at the bit level, e.g., exclusive-or. Any binary or unary operator may be extended to work with any data type. For example, the addition operator (+) has been extended to work between string types to permit string concatenation.

The binary and unary operators work transparently with array types. For example, if a and b are arrays, then a + b produces an array whose elements are the result of element by element addition of a and b. This permits one to do vector operations without explicitly looping over the array indices.

What's New in This Release:
src/slarray.c: superfluous call to SLclass_add_math_op removed (Michael Noble)
src/slang.c: foreach (NULL) using("next"){} foo (); caused _NARGS=1 in foo.
src/slarrfunc.c: Fix to prevent sum(NULL) from causing a core-dump.
src/slimport.c: import (module, "") made equivalent to import(module,"Global"); This way, import(module, current_namespace()) will work when the current namespace is anonymous.
src/slospath.c: Several users have requested that I add the ability to define a load path and use that path when loading interpreter files. To this end, several new functions were added to the API:
char *SLpath_get_load_path (void);
int SLpath_set_load_path (char *path);
/* Get and Set the path to be searched for files */
int SLpath_get_path_delimiter (void);
SLpath_set_path_delimiter (int delimiter);
/* Get and set the character delimiter for search paths */
int SLang_load_file_verbose (int verbose);
/* if non-zero, display file loading messages */

New intrinsics include:

set_slang_load_path
get_slang_load_path
path_get_delimiter

These functions, nor the intrinsics have an effect on applications that use SLang_load_file_hook or SLns_load_file_hook for loading files. The change should be transparant to applications that use the stock load file mechanism. The main difference is that if one attempts to load a file with no extension, e.g., "foo", but the file does not exist, then the interpreter will try to load the more recent of "foo.sl" and "foo.slc". See src/slsh.c for how the functions may be used.
slsh/slsh.c: Updated to use the new search path code outlined above. Also, slsh is distributed with a collection of general purpose slang functions, including jed's provide/require functions. See slsh/README for more information.
doc/tm/cslang.tm: Modified the section describing the implemetation of intrinsic functions in an effort to clarify the discussion.
src/slang.c: tiny memory leak resulting from peephole optimzations added earlier found and fixed.
src/slarrmisc.c: new intrinsic: cumsum computes the cumulative sum of an array via the new SLarray_map_array function.
src/modules: perl compatible regular expression (pcre) module added.

slang 2.3.1 rele search tags