New jed and slang snapshots available

New jed and slang snapshots available

Post by John E. Dav » Tue, 17 Nov 1998 04:00:00


   I created new snapshots of the jed 0.99 development code and
slang 1.3.x development code.  They are available from  Both jed and slang have
undergone many changes since the last officially released versions.
In particular, jed has much improved syntax highlighting and slang
has support for dynamically loaded modules, namespaces, and
associative arrays.

   I hope to officially release jed 0.99 and slang 1.4 sometime before
the new year.  However, I am unable to test the code on non-Unix
platforms and I would appreciate any feedback regarding their
compilation and execution on other operating systems.

   Below, you will find a list of the slang changes since 1.2.x and
the jed changes since 0.98-7:

************ SLang Changes ***********************

Changes since 1.2.2
0. New assignment operators: *= /= &= |=
   The addition of these operators meant that some of the internal
   byte-codes had to be modified.  This change should only cause
   problems with byte-compiled or preprocessed .sl files.  As far as I
   know, only the JED editors uses this feature.  So, after upgrading
   the library, and before running JED, do the equivalent of

        rm $JED_ROOT/lib/*.slc

   That is, delete the byte-compiled .slc files.

1. Now the language supports `!if ... else' statements.  
2. New intrinsics:

       __is_initialized:  This may be used to see whether or
          not a variable is initialized, e.g, __is_initialized (&variable);
       __get_reference: Returns a reference to an object with a
          specified name.
       rmdir, rename, remove (slfile.c): these return 0 upon success, -1 upon
          failure and set errno
       getpid, getgid, getppid (slunix.c)
       _typeof: This is similar to `typeof' except in the case of
          arrays where it returns the data type of the array
       __pop_args, __push_args: see documentation
       fseek, ftell, and symbolic constants SEEK_END, SEEK_CUR, SEEK_SET

3. `Conj' function added to get the complex conjugate
4. New array module that implementes additional array functions, e.g.,
   transpose, matrix multiplication, etc...  Use `SLang_init_array' to
5. An array such as [[1,2,3],[4,5,6]] is interpreted as a 2-row
   3-column array.
6. Amiga patches from Jrg Strohmayer <>.
7. New table types:


   These are useful for defining symbolic constants.  See slmath.c and
   slfile.c for examples of their use.

8. A new pseudo-function: __tmp
   This `function' takes a single argument, a variable, and returns
   the value of the variable, and then undefines the variable.  For

        variable x = 3;
        variable y;
        y = __tmp(x);

   will result in `y' having a value of `3' and `x' will be undefined.
   The purpose of this pseudo-function is to free any memory
   associated with a variable if that variable is going to be
   re-assigned.  For example, consider:

        variable x = [1:10:0.1];
        x = 3*x^2 + 2;

    At the time of the re-assignment of `x' in the last statement, two
    arrays will exist.  However,

        x = 3*__tmp(x)^2 + 2;

    results in only one array at the time of the assignment, because
    the original array associated with `x' will have been deleted.  This
    function is a pseudo-function because a syntax error results if
    used like

        __tmp (sin(x));

9.  New low-level push/pop functions that are designed specifically
    for use in constructing the push/pop methods of application
    defined data types.  These functions have names of the form:


    where * represents int, long, char, short, ptr, double, float.
    See sltypes.c to see how they are used by, e.g., SLANG_INT_TYPE.

10. New module import facility.  See modules subdirectory for
    examples.  To enable this, use


    in you application.  Modules will be searched in the following order

        1.  Along the path specified by the `set_import_module_path'
            function, or by the C functiion SLang_set_module_load_path.
        2.  Along the path given by the SLANG_MODULE_PATH environment
        3.  Along a system dependent path, e.g., LD_LIBRARY_PATH
        4.  In the current directory.

    New interpreter intrinsics include:

        import (String_Type MODULE_NAME);
        set_import_module_path (String_Type PATH);
        String_Type get_import_module_path ();

11.  New integer and floating point types added to the language.  Now
     all basic C signed and unsigned integer types are supported:

       C bindings             S-Lang bindings
       SLANG_CHAR_TYPE        Char_Type
       SLANG_UCHAR_TYPE       UChar_Type
       SLANG_SHORT_TYPE       Short_Type
       SLANG_USHORT_TYPE      UShort_Type
       SLANG_INT_TYPE         Int_Type
       SLANG_UINT_TYPE        UInt_Type
       SLANG_LONG_TYPE        Long_Type
       SLANG_ULONG_TYPE       ULong_Type
       SLANG_FLOAT_TYPE       Float_Type
       SLANG_DOUBLE_TYPE      Double_Type

    For example, `Long_Type[10]' creates an array of 10 longs.

12. New intrinsic: set_struct_field.  See function reference for more

----- snapshot slang1.3_981030 made available -----

13. Type synonyms added:

        Int16_Type, UInt16_Type   (16 bit (un)signed integer)
        Int32_Type, UInt32_Type   (32 bit (un)signed integer)
        Int64_Type, UInt64_Type   (64 bit (un)signed integer)
        Float32_Type              (32 bit float)
        Float64_Type              (64 bit float)

    Not all systems support 64 bit integers.  These synonyms are
    useful when one needs integers and floats of a definite size.

14. array_sort changed to use qsort.  The main reason for this is that
    the previous sorting method was derived from a numerical recipes
    merge sort.

15. New namespace manipulation functions available.  When a function
    or variable is declared as `static', it is placed in the private
    namespace associated with the object being parsed (a file).  By
    default, there is no way of getting at that function or variable
    from outside the the file.  However, the private namespace may be
    given a name via the `implements' function:

         implements ("A");

    Then the private variables and functions of the namespace A may be
    accessed via A->variable_name or A->function_name.  The default
    global namespace is called `Global'.  For example, the intrinsic
    function `message' is defined in the global namespace.  One may
    use either of the following forms to access it:

         message ("hello");
         Global->message ("hello");

----- snapshot slang1.3_981104 made available -----

16. New intrinsics:

        strtok  (See documentation)
        length  (Get the length of an object)

17. New data type added: Any_Type.  An array of such a type is capable
    of holding any object, e.g.,

         a = Any_Type [3];
         a[0] = 1; a[1] = "string"; a[2] = (1 + 2i);

    Dereferencing an Any_Type object returns the actual object.  That
    is, @a[1] produces "string".

18. Associative arrays added.  See documentation.
19. New `foreach' statement.  See the section on `foreach' in
    doc/text/slang.txt as well as the examples in examples/
    and src/
20. Oops.  sign function was broken.
21. array_sort modified to also accept &function_name.

*************** JED changes *************************

Changes since 0.98-7
   0.  Major changes to the display system.  Now jed uses the SLang
       screen management routines.  Syntax highlight of multi-line
       comments should now work correctly.
   1.  insert_char did not check read-only status of buffer.
   2.  Added patches from Joao Luis Fonseca <>
       to src/mkfiles/makefile.all.
   3.  Typo in corrected.
   4.  New rmail functions:


   5.  %p status line specifier now includes the column if LINENUMBERS
       is greater than 1.
   6.  Tweaks to src/gpmmouse.c from George R. Young
   7.  Port to MINGW32 from Marko Pistotnik <>.
       Note: mswshell.exe is still a BCC compiled 16 bit executable.
       It appears that mswshell.c still needs ported to WIN32.
   9.  VMSMAKE.COM changes provided by Martin P.J. Zinser
       <>.  He also provided jed/doc/JED.HLP for VMS.
  10.  OS/2 ICC patches from Eddie Penninkhof <>.
  11.  Small regexp bug in backward searches fixed
  12.  check_buffers intrinsic function added.
  13.  Bug fix in keymap.c fixed (Tom Culliton <>)
  14.  jed/lib/ bug fixed (Michael Johnson<>).
  15. typo fixed
  16.  Major changes to win32/win16 code from Luchesar Ionkov
  17.  Patch to x_region_to_cutbuffer from Mark Olesen
  18.  OS/2 and isearch specific patches from
  19.  Xjed color allocation changes from Radim Halir
  20.  CHanges to better support C++ from Michael Johnson
       <> as well as changes to
  21.  Fortran-sytle comments are now mode dependent in a much more
       useful and flexible way via the new intrinsic
  22.  TI asm mode added (
  23. added.  The functions in this file facilitate
       sharing information between modes:


       For example, a mode can define folding information that can use.  See, e.g., and

  (B0.99.1 snapshot released)
  24.  Bug fixes:
       * Blink match bug fixed involving " at the beginning of a line.
       * In sh-mode `\'' given a string syntax.
  25.  hook_add_to_hook replaced by  I believe
       this interface permits better chaining of hooks.
  26. bug fix involving ^G abortion of search.
  27.  Updates to to use array syntax.  Also foreach...using
       used in some .sl files.  See slang documentation for
       information about foreach construct.
  28.  Some functions and variables in several lib/*.sl files have
       been made `static'.

John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    One Hampshire St., Building NE80-6019     Cambridge, MA  02139-4307


1. Entering fold mode with latest JED snapshot + latest S-Lang snapshot?

I'm having problems entering fold mode in the latest JED compiled with the
latest S-Lang.  I'm using the supplied lib/*.sl files and entering fold mode
either by editing a file with "% -*- mode: slang; mode: fold -*-" at the top
or by typing M-x fold[RETURN].  Both used to work, the former now doesn't
fold the document on load and the latter JED says there's a stack underflow
error somewhere.  I have no jedrc file, so I'm using the supplied defaults.

Has this been fixed somewhere I'm not aware of?  I've checked the JED
snapshots dir on's FTP server and the S-Lang website at
<URL:>.  It's not a big deal, obviously folding isn't
crucial, but it sure is handy.

2. cisco 7000: strange routing

3. Few things about the new S-lang and Jed snapshots

4. Aminet CD-ROM for 15 pounds (sterling)

5. RPMS for redhat6: jed-B0.99.6 and slang-1.3.7

6. adband Gaming

7. jed 0.98-7 isearch -> SLang error

8. ?? 3D fonts

9. read-only actions for slang/jed

10. Jed editor / SLang

11. more jed/slang questions