Raven - Change Log

20071127

BUG

Track source indent changes when compiling && and || conditional jumps. Previously it was possible to for a false && result to cause a jump over both if and else branches when else should have been executed.

BUG

Do not ever execute variable names for value $object:$variable notation. In 20071117, value $object:$variable notation resulted in $variable being executed so that the value was set within $object under a key of the content of $variable, rather than a key of the name of $variable.

INTERNAL CHANGE

All non scalar item display words (stack, list, hash, object) now write to an intermediate temporary file rather than directly to standard output. This should not produce any visible high level change. As before, the "path_tmp" value in INI still controls temporary file location and will need to be a writeable.

20071117

BUG

Prevent start files being executed twice when Raven is called with the -e argument.

FEATURE

Allow . and : notation to operate on lists and strings as a shorthand for get and set respectively. Previously only hashes and objects could be accessed this way.

CHANGE

Make md5 a modifier. Previously md5 would always create a new string; now the source string must be copied first if it must remain intact. This change was made for consistency as all other string words are modifiers.

CHANGE

Remove lock and unlock. Some items are made immutable to protect parts of the system (eg, the CORE scope, the ENVS hash, the ARGS stack, hash keys lists outside the hash engine). In retrospect, having a method for a script to unlock these things was not very useful. The words lock and unlock will be reused for read/write locks for fine grained thread access controls in the future.

FEATURE

Allow call to accept an optional object argument as well as the required definition string. If an object is supplied, we search only that scope; otherwise we behave as before and search the current scope chain.

CHANGE

Rename self to local. Based on feedback, this will be a clearer name.

Rename tid to self (return the integer id of the current thread). Originally tid was intended to emulate for threads the behavior of pid for processes. The change to self is intended to improve code readability.

BUG

Reenable creation of matched sub strings in m// as $1, $2, etc, in the current scope.

FEATURE

Allow wait to accept an optional semaphore argument as well as the required condition variable. If a semaphore is provided, assume it is already acquired by the current thread. Release the semaphore while waiting on the condition variable, and reaquire it immediately on notification. This behavior is atomic and allows serial access to a block of code surrounding the wait call.

20071112

BUG

Adjust Regular Expression behavior so that matching or searching on a zero length pattern returns results in line with other languages. There are arguments for both handling and ignoring empty patterns, so it seems logical to conform to common practice.

BUG

Release mutex on an object with calling a method using object.method notation, so that multiple threads may access an object concurrently. This also prevents some deadlock situations. All serialization of access to everything with the object's scope (ie, instance variables) is taken care of at a lower level.

20071108

BUG

Prevent possible buffer overflow in format and double quoted strings. This would have been hard to hit as it required a pattern string with more than 8K of characters between any two % signs.

BUG

Properly check mysql_store_result() for NULL or error condition. Previously it was possible to get a MySQL result resource into a state where a call to query and a simultaneous MySQL server restart would cause a segfault.

BUG

Prevent prefer modifying the last character of the source string when converting a string to an integer.

BUG

Remove debugging code that disabled STDERR notice and warning compression in 20071104.

BUG

Directory detection using isdir was broken in all previous releases when called on a Unix socket, due to incorrect checking of stat() -> st_mode flags.

FEATURE

Add Condition and Semaphore types for thread synchronisation wrapping pthread_*() functions. New words:

condition ( -- id ) (create a new condition variable)
wait      ( id -- ) (wait for a condition variable)
notify    ( id -- ) (notify all threads waiting on a condition variable to restart)
semaphore ( -- id ) (create a new semaphore)
acquire   ( id -- ) (continue immediately if a semaphore position is available, otherwise block)
release   ( id -- ) (relinquish a semaphore position and awake one waiting thread to take our place)

20071104

BUG

Handling of data stack item ref counts was broken in 200710* for some stack underflow situations resulting in possible memory leaks or a segfault crash. The interpreter now tracks any data stack items used by a code word and releases them automatically. This adds very little overhead and means manual calls to rv_ds_release() are no longer required.

BUG

Reading from streams using word read was broken for TCP sockets allowing EOF and some error conditions to be mishandled, and resulting in a long blocking read time out. The function rv_stream_read() has been added to correct these problems and is called by these words:

read (for direct file and file/socket resources)
line (for file/socket resources)
each (when iterating over a file resource)
Get Firefox!