Ficl Release Notes

Forth Inspired Command Language 
Author: John Sadler (john_sadler@alum.mit.edu)
Created: 19 July 1997 

 

What's new in version 2.05

General 

  • HTML documentation extensively revised
  • Incorporated Alpha (64 bit) patches from the freeBSD team.
  • Split SEARCH and SEARCH EXT words from words.c to search.c
  • 2LOCALS defined in Johns Hopkins local syntax now lose the first '2' in their names.

Bug fixes

ABORT" now works correctly (I promise!)
REFILL works better

New words

  • ANS CORE EXT words: 2r@2r> 2>r 
  • ANS DOUBLE words: 2VARIABLE
  • ANS ORDER now lists wordlists by name
  • ANS .S now displays all stack entries on one line, like a stack comment
  • wid-get-name   given a wid, returns the address and count of its name. If no name, count is 0
  • wid-set-name   set optional wid name pointer to the \0 terminated string address specified.
  • ficl-named-wordlist creates a ficl-wordlist and names it. This is now used in vocabulary and ficl-vocabulary 
  • last-word  returns the xt of the word being defined or most recently defined.
  • q@ and q! operate on quadbyte quantities for 64 bit friendliness

New OO stuff

  • Class methods ALLOT and ALLOT-ARRAY
  • METHOD define method names globally
  • MY=> early bind a method call to "this" class
  • MY=[ ] early bind a string of method calls to "this" class and obj members
  • C-> late bind method invocation with CATCH
  • Metaclass method resume-class and instance word suspend-class create mutually referring classes. Example in string.fr
  • Early binding words are now in the instance-vars wordlist, not visible unless defining a class.

Version 2.04

ficlwin

  • Catches exceptions thrown by VM in ficlThread (0 @ for example) rather than passing them off to the OS. 

ficl bugs vanquished

  • Fixed leading delimiter bugs in s" ." .( and ( (reported by Reuben Thomas)
  • Makefile tabs restored (thanks to Michael Somos)
  • ABORT" now throws -2 per the DPANS (thanks to Daniel Sobral for sharp eyes again) 
  • ficlExec does not print the prompt string unless (source-id == 0)
  • Various fixes contributed by the FreeBSD team.

ficl enhancements

  • Words.c: modified ficlCatch to use vmExecute and vmInnerLoop (request of Daniel Sobral) Added vmPop and vmPush functions (by request of Lars Krueger ) in vm.c These are shortcuts to the param stack. (Use LVALUEtoCELL to get things into CELL form) 
  • Added function vmGetStringEx with a flag to specify whether or not to skip lead delimiters
  • Added non-std word: number?
  • Added CORE EXT word AGAIN (by request of Reuben Thomas) 
  • Added double cell local (2local) support
  • Augmented Johns Hopkins local syntax so that locals whose names begin with char 2 are treated as 2locals (OK - it's goofy, but handy for OOP)
  • C-string class revised and enhanced - now dynamically sized
  • C-hashstring class derived from c-string computes hashcode too.

Version 2.03

This is the first version of Ficl that includes contributed code. Thanks especially to Daniel Sobral, Michael Gauland for contributions and bug finding. 

New words 

  • clock              (FICL)
  • clocks/sec         (FICL)
  • dnegate            (DOUBLE)
  • ms                 (FACILITY EXT - replaces MSEC ficlWin only)
  • throw              (EXCEPTION)
  • catch              (EXCEPTION)
  • allocate           (MEMORY)
  • free               (MEMORY)
  • resize             (MEMORY)
  • within             (CORE EXT)
  • alloc              (class method)
  • alloc-array        (class method)
  • free               (class method)
Bugs Fixed 
  • Bug fix in isNumber(): used to treat chars between 'Z' and 'a' as valid in base 10... (harmless, but weird)
  • ficlExec pushes the ip and interprets at the right times so that nested calls to ficlExec behave the way you'd expect them to.
  • evaluate respects count parameter, and also passes exceptional return conditions back out to the calling instance of ficlExec.
  • VM_QUIT now clears the locals dictionary in ficlExec.
Ficlwin Enhancements 
  • File Menu: recent file list and Open now load files.
  • Text ouput function is now faster through use of string caching. Cache flushes at the end of each line and each time ficlExec returns.
  • Edit/paste now behaves more reasonably for text. File/open loads the specified file.
  • Registry entries specify dictionary and stack sizes, default window placement, and whether or not to create a splitter for multiple VMs. See HKEY_CURRENT_USER/Software/CodeLab/ficlwin/Settings
Ficl Enhancements 
  • This version includes changes to make it 64 bit friendly. This unfortunately meant that I had to tweak some core data types and structures. I've tried to make this transparent to 32 bit code, but a couple of things got renamed. INT64 is now DPINT. UNS64 is now DPUNS. FICL_INT and FICL_UNS are synonyms for INT32 and UNS32 in 32 bit versions, but a are obsolescent. Please use the new data types instead. Typed stack operations on INT32 and UNS32 have been renamed because they operate on CELL scalar types, which are 64 bits wide on 64 bit systems. Added BITS_PER_CELL, which has legal values of 32 or 64. Default is 32.
  • ficl.c: Added ficlExecXT() - executes an xt completely before returning, passing back any exception codes generated in the process. Normal exit code is VM_INNEREXIT.
  • ficl.c: Added ficlExecC() to operate on counted strings as opposed to zero terminated ones.
  • ficlExec pushes ip and executes interpret at the right times so that nested calls to ficlExec behave the way you'd expect them to.
  • ficlSetStackSize() allows specification of stack size at run-time (affects subsequent invocations of ficlNewVM()).
  • vm.c: vmThrow() checks for (pVM->pState != NULL) before longjmping it. vmCreate nulls this pointer initially. 
  • EXCEPTION wordset contributed by Daniel Sobral of FreeBSD
  • MEMORY-ALLOC wordset contributed by Daniel Sobral, too. Added class methods alloc and alloc-array in softwords/oo.fr to allocate objects from the heap.
  • Control structure match check upgraded (thanks to Daniel Sobral for this suggestion). Control structure mismatches are now errors, not warnings, since the check accepts all syntactally legal constructs.
  • Added vmInnerLoop() to vm.h. This function/macro factors the inner  interpreter out of ficlExec so it can be used in other places. Function/macro behavior is conditioned on INLINE_INNER_LOOP in sysdep.h. Default: 1 unless _DEBUG is set. In part, this is because VC++ 5 goes apoplectic when trying to compile it as a function. See 

  • comments in vm.c
  • EVALUATE respects the count parameter, and also passes exceptional return conditions back out to the calling instance of ficlExec.
  • VM_QUIT clears locals dictionary in ficlExec()
  • Added Michael Gauland's ficlLongMul and ficlLongDiv and support routines to math64.c and .h. These routines are coded in C, and are compiled only if PORTABLE_LONGMULDIV == 1 (default is 0).
  • Added definition of ficlRealloc to sysdep.c (needed for memory allocation wordset). If your target OS supports realloc(), you'll probably want to redefine ficlRealloc in those terms. The default version does ficlFree followed by ficlMalloc.
  • testmain.c: Changed gets() in testmain to fgets() to appease the security gods.
  • testmain: msec renamed to ms in line with the ANS
  • softcore.pl now removes comments & spaces at the start and end of lines. As a result: sizeof (softWords) == 7663 bytes (used to be 20000)  and consumes 11384 bytes of dictionary when compiled
  • Deleted license paste-o in readme.txt (oops).

Version 2.02

New words  Bugs Fixed 
  • forget now adjusts the dictionary pointer to remove the name of the word being forgotten (name chars come before the word header in ficl's dictionary)
  • :noname used to push the colon control marker and its execution token in the wrong order
  • source-id now behaves correctly when loading a file.
  • refill returns zero at EOF (Win32 load). Win32 load command continues to be misnamed. Really ought to be called included, but does not exactly conform to that spec either (because included expects a string signature on the stack, while Ficl's load expects a filename upon invocation). The "real" LOAD is a BLOCK word.
Enhancements (IMHO) 
  • dictUnsmudge no longer links anonymous definitions into the dictionary
  • oop is no longer the default compile wordlist at startup, nor is it in the search order. Execute also oop definitions to use Ficl OOP.
  • Revised oo.fr extensively to make more use of early binding
  • Added meta - a constant that pushes the address of metaclass. See oo.fr for examples of use.
  • Added classes: c-ptr  c-bytePtr  c-2bytePtr  c-cellPtr These classes model pointers to non-object data, but each knows the size of its referent.

Version 2.01

  • Bug fix: (local) used to leave a value on the stack between the first and last locals declared. This value is now stored in a static.
  • Added new local syntax with parameter re-ordering. See description below. (No longer compiled in version 2.02, in favor of the Johns Hopkins syntax)

Version 2.0

  • New ANS Forth words: TOOLS and part of TOOLS EXT, SEARCH and SEARCH EXT, LOCALS and LOCALS EXT word sets, additional words from CORE EXT, DOUBLE, and STRING. (See the function ficlCompileCore in words.c for an alphabetical list by word set).
  • Simple USER variable support - a user variable is a virtual machine instance variable. User variables behave as VARIABLEs in all other respects.
  • Object oriented syntax extensions (see below)
  • Optional stack underflow and overflow checking in many CORE words (enabled when FICL_ROBUST >= 2)
  • Various bug fixes