REBOL Developer Network

REBOL 2.7.6 Released - Changes

Carl Sassenrath, CTO
REBOL Technologies
14-Mar-2008 22:34 GMT

Article #0026
Main page || Index || Prior Article [0025] || Next Article [0027] || 62 Comments || Send feedback

REBOL 2.7.6 has been released!

Various packages are available for download from:

And thanks to...

Thank you to the entire V2.7 team for their efforts. I would like to especially thank Brent for project supervision and BrianH for coordinating DevBase and making the V3.0 compatible mezzanine changes.

Enhancements and Additions

The following outlines the addition of new functions as well as enhancements of existing functions for 2.7.6.

Bit shift on integers and binaries

Added the SHIFT function, which performs a bit shift operation. Right shift (decreasing) is default. SHIFT is a native value.

USAGE:

SHIFT data bits /left /logical /part length

ARGUMENTS:

data -- (Type: integer binary)
bits -- Number of bits to shift (Type: integer)

REFINEMENTS:

/left -- Shift bits to the left (increasing)
/logical -- Use logical shift (unsigned, fill with zero)
/part -- Shift only part of a series.
    length -- (Type: integer)

Release /library Component for Free

The /library component is now included in the free distribution of REBOL.

Backported FIRST+ Mezzanine from REBOL 3

FIRST+ is a function added in REBOL 3 as a native, and has been implemented as a mezzanine in REBOL 2.7.6 for forwards compatibility and use with backported code.

USAGE:

FIRST+ 'word

DESCRIPTION:

Return the first of a series, and increment the series index. FIRST+ is a function value.

ARGUMENTS:

word -- word must be a series. (Type: word)

(SPECIAL ATTRIBUTES)

catch

Backported ALSO Mezzanine from REBOL 3

ALSO is a function added in REBOL 3 as a native, and has been implemented as a mezzanine in REBOL 2.7.6 for forwards compatibility and use with backported code.

USAGE:

ALSO value1 value2

DESCRIPTION:

Returns the first value, but also evaluates the second.
ALSO is a function value.

ARGUMENTS:

value1 -- (Type: any-type)
value2 -- (Type: any-type)

Backported IN-DIR Mezzanine from REBOL 3

IN-DIR is a mezzanine used in REBOL 3, and has been implemented in REBOL 2.7.6 for forwards compatibility and use with backported code.

USAGE:

IN-DIR dir block

DESCRIPTION:

Evaluate a block while in a directory.
IN-DIR is a function value.

ARGUMENTS:

dir -- Directory to change to (changed back after) (Type: file none)
block -- Block to evaluate (Type: block)

Backport TO-RELATIVE-FILE Mezzanine from REBOL 3

TO-RELATIVE-FILE is a mezzanine used in REBOL 3, and has been implemented in REBOL 2.7.6 for forwards compatibility and use with backported code.

USAGE:

TO-RELATIVE-FILE file /no-copy /as-rebol /as-local

DESCRIPTION:

Returns the relative portion of a file if in a subdirectory, or the original if not.
TO-RELATIVE-FILE is a function value.

ARGUMENTS:

file -- File to check (local if string!) (Type: file string)

REFINEMENTS:

/no-copy -- Don't copy, just reference
/as-rebol -- Convert to REBOL-style filename if not
/as-local -- Convert to local-style filename if not

Backport TAKE Mezzanine from REBOL 3

TAKE is a function added in REBOL 3 as a native, and has been implemented as a mezzanine in REBOL 2.7.6 for forwards compatibility and use with backported code.

USAGE:

TAKE value /part length /last

DESCRIPTION:

Copies and removes from series. (Modifies)
TAKE is a function value.

ARGUMENTS:

value -- (Type: series port none)

REFINEMENTS:

/part -- Limits to a given length or position
    length -- (Type: number series port pair)
/last -- Take it from the tail end

(SPECIAL ATTRIBUTES)

catch

Backport MOVE Mezzanine from REBOL 3

MOVE is a mezzanine used in REBOL 3, and has been implemented in REBOL 2.7.6 for forwards compatibility and use with backported code. Its features have been carefully restricted to prevent aliasing and overlap errors. It is useful for rearranging elements in GUI code, structure manipulation, etc.

USAGE:

MOVE source offset /part length /skip size /to

DESCRIPTION:

Move a value or span of values in a series.
MOVE is a function value.

ARGUMENTS:

source -- Source series (Type: series)
offset -- Offset to move by, or index to move to (Type: integer)

REFINEMENTS:

/part -- Move part of a series
    length -- The length of the part to move (Type: integer)
/skip -- Treat the series as records of fixed size
    size -- Size of each record (Type: integer)
/to -- Move to an index relative to the head of the series

EXTRACT is Now Faster.

EXTRACT (a mezzanine function) was rewritten in REBOL 3 to be faster through preallocation, safer through better error screening, to handle missing values better when extracting from strings, to optionally specifiy an alternate default value, and to handle types other than block! better. Note that EXTRACT now returns a series of the same type as the source series.

ARRAY Supports Function Values

ARRAY now supports function values for the initialization value. This allows advanced block generation through function composition. When a function is used as an initial value, it will be called for each value to be inserted, with the return value of that call inserted instead. The function should take no arguments.

REPLACE Supports Function Values

REPLACE now allows function values to be used to generate the replacement values. When a function is used as the replace argument it will be called at every position in the source, with the return value of the call used as the replacement value at that position. The function can take one argument, the source series at the position of the replacement before the replacement has occurred - this allows you to generate your replacement values based on the value being replaced or its position, or to make other changes to the source series. The function could also take no arguments, but not more than one.

REPLACE Now Has a /tail Refinement

REPLACE now has a /tail refinement that causes it to return the series at the position after the last replacement. Otherwise it returns the series at the original position.

ALTER Return Value Is More Useful

ALTER now returns true if the value was added by ALTER, and false if it wasn't.

General Bug Fixes

The following sections outline bug fixes implemented in the 2.6.7 release common to all platforms. RAMBO numbers (http://www.rebol.net/cgi-bin/rambo.r) are included for reference.

Fixed SORT bug list! datatype. RAMBO #4314

Sort was adding the unset! and end! datatypes to list! data. LIST! was removed from SORT for now.

Fixed Missing 307 HTTP response. Rambo #4260

There is now a 307 response (Temporary Redirect) in the http and https schemes.

Fixed do load tail ['a] crash. RAMBO #4238

A crash used to happen with do load tail ['a] with corrupt datatype: 62 at 101. This is fixed.

Fixed b: first to block! {'thing} get b causes crash. RAMBO #4286

Fixed index? #[block! [] 2] causes crash. RAMBO #4155

Fixed reduce/only nonblockdata [] crashes. RAMBO #4319

Various situations with reduce/only such as reduce/only "bye" [] would dump and crash. This has been fixed.

Fixed Enbase ignores index offset. RAMBO #4259

Enbase was not working correctly with a series which has index > 0. This has been correctd.

Fixed AGG crash RAMBO #4010

AGG crash no longer occurs when used in the following situation:

view layout [ box effect [ draw [ pen radial red line 10x10 100x100]]]

Fixed SEEK Bug. RAMBO #3598

Previously, after opening a text file with OPEN/SEEK and copying the content, every first byte after a newline is replaced by a second newline. /SEEK now implies /BINARY in 2.7.6.

Fixed Encap crash when "title" is in the header.

A binary that crashed was produced when the word "title" was in the encap header in the non-view versions of encap. This has been fixed.

Windows Platform Bug Fixes

The following sections outline bug fixes specific to the Windows platform.

Fixed Missing Win32 Registry Functions in SDK Runtimes. RAMBO #4064

The Windows Registry Functions were being loaded by /Pro, /Face, and /Command but were not referenced at runtime. This has been fixed.

Fixed Do Not Set Master Sound Level by Default. RAMBO #4239

Setting sound/volume to NONE or to <0.0 will now keep the master volume as it has been set by the user.

Fixed Black Console Window Appearing. RAMBO #3763, #4113

During each shell CALL on Windows, the black Windows console would appear. It no longer appears. Use the /show option to see it.

Posix Platform Bug Fixes

The following sections outline bug fixes specific to Posix platforms.

Fixed Segfault on mold/all/flat [] in Posix RAMBO #4267

Fixed Function Keys Bug in Linux. RAMBO #4263

In Linux, any function related keys crashed VIEW in 2.7.5. They now operate as expected.

Fixed Call was returning wrong value in 2.7.5. RAMBO #4054

Call would return random values in the 2.7.5 build for Linux. This has been resolved.

62 Comments

Updated 11-Sep-2009   -   Copyright 2006 Carl Sassenrath   -   WWW.REBOL.COM   -   Edit   -   Blogger Source Code