slang-users mailing list

[2010 Date Index] [2010 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-users] slang 2.2.3 released


Version 2.2.3 of the slang library has been released.  In addition to
bug-fixes to the previous version, it adds several new features while
maintaining backward binary compatibility with previous version 2
releases.  A copy of the NEWS file is appended below.

See <http://www.jedsoft.org/slang/download.html> for downloading
options. It may take a day or so for the mirror sites to pick up the
latest version.

Enjoy.
--John

NEWS for version 2.2.x --- Search for (v2.2.3) for items specific to
this release.

Interpreter Enhancements
========================

   1.  The ternary expression was added:

           expression = condition ? val1 : val2

       If condition is non-zero, then expression = val1,
        otherwise expression = val2

   2.  The break and condition statements support an optional integer
       that indicates how many loop levels the statement affects, e.g.,
       the break statement in

           while (1)
	     {
	         loop (10)
		    {
		        break 2;
		    }
	     }

       will cause both loops to be terminated.

   3.  Multiline strings have been added:

           "This is a \
	    multiline \
	    string"

           `This is
	    another multiline
	    string that
	    does not require
	    a \ for continuation`

    4.  List_Type objects may be indexed using an array of indices
        instead of just a single scalar index.

    5.  (v2.2.3) Binary literal integers of the form 0bxx...x are supported.
        Here, x is 0 or 1.  The printf "%B" format specifier was added
	to format integers as binary.

    6.  (v2.2.3) The dereference operator (@) may be used in a structure
        definition to include the fields from the dereferenced
	structure, e.g.,

	  space = struct {x, y, z};
	  spacetime = struct {@space, t};

    7.  (v2.2.3) Dereferencing a scalar or vector class type now
       results in duplication of the object, e.g, @7 will produce 7.

    8.  (v2.2.3) Mergesort was made the default sorting algorithm.  See the
        array_sort for details.

Modules
=======

   1.  zlib: A module that wraps the popular z compression library.

   2.  fork: A module that wraps the fork, exec*, and waitpid functions.

         slsh/lib/process.sl utilizes this module to allow an
	 application to easily create subprocesses and pipelines.

   3.  sysconf: Module that implements interfaces to the posix
       sysconf, pathconf, etc. functions.

   4.  (2.2.3) csv: A module that supports the reading and writing of
       so-called Comma Separated Values files.

Intrinsic Functions
===================

   The following intrinsic functions have been added for 2.2.x:

      sumsq
          equivalent to sum(x*x)

      expm1
          More accurate version of exp(x)-1 for x near 0.

      log1p
          More accurate version of log(1+x) for x near 0

      list_to_array
          Creates an array from a list.

      string_matches
          A convenient alternative to string_match and string_match_nth
	  functions.

      strskipbytes (v2.2.3)
          Skip a range of bytes in a byte string.

      is_substrbytes (v2.2.3)
          Like is_substr except this works with binary strings
	  containing embedded null characters.

      strskipchar, strbskipchar (v2.2.3)
         Analogous to C ch=*p++ and ch=*p-- for UTF-8 encoded strings.

      _close
          Close an integer descriptor
      _fileno
          Returns the descriptor as an integer

      dup2, getsid, killpg, getpriority/setpriority
          Wraps the corresponding system functions.

      utime (v2.2.3)
          Change a file's last access and modification time.

      ldexp, frexp:
          If x == a*2^b, where 0.5<=a<1.0 then (a,b)=frexp(x),
	  and x=ldexp(a,b).

      islower, isupper, isxdigit, isalnum, isalpha, iscntrl, isprint,
      isgraph, ispunct, isblank, isascii, isspace (v2.2.3):
          Character classification functions.

      list_append, list_join (v2.2.3)
          Functions for merging two lists together.

      ttyname (v2.2.3)
          Get the name of the terminal

      timegm (v2.2.3)
          Inverse of gmtime

   The following functions have been enhanced:

      hypot
          If given a single array argument, it returns the equivalent
	  of sqrt(sum(X*X)).

          Support for N arrays added for e.g., the Euclidean norm in
	  an N dimensional space (v2.2.3)

      _min, _max: (v2.2.3)
          Added support for more than two elements.

      polynom
          The calling interface to this function was changed and
	  support added for arrays.

      strjoin (v2.2.3)
          delimiter made optional

      strreplace (v2.2.3)
          New usage designed to facilitate the most common case where
	  one wants to replace all the substrings.

      strtrans (v2.2.3)
          Additional character classes added (see documentation).

      string_match, string_matches (v2.2.3)
          The position argument made optional

   The following string functions have been vectorized to act upon
   arrays of strings (v2.2.3):

       is_substr
       str_delete_chars
       strbytelen
       strcharlen
       strcmp
       strcompress
       strlen
       strlow
       strnbytecmp
       strncharcmp
       strncmp
       strtrans
       strtrim
       strtrim_beg
       strtrim_end
       strup


slsh
====
      slang readline enhancements:
         New functions:
	   rline_up/down_hist
	      Behaves similar to zsh up/down-line-or-search functions (v2.2.3).

	   rline_call_editor
           rline_edit_history
	   rline_edit_line
	      Call external editor for line/history editing. (v2.2.3)

         Structure field completion. (v2.2.3)

         Instead of scrolling horizontally when editing a line,
	 attempt to wrap the line. (v2.2.3)

         setfuns.sl: Various set functions: unique, intersection,
	 complement,union (v2.2.3)

Misc
====

   Unicode tables updated to version 5.1.




[2010 date index] [2010 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]