Red Changelog

What's new in Red 0.6.1

Aug 18, 2016
  • Despite being a minor release, 0.6.1 still weighs a heavy 588 commits with a big number of fixes and many additions, among which the new reactive framework is the most notable.
  • Last release introduced, for the first time in the Rebol world, a reactive programming framework, as a part of the GUI engine. While working on improving it, we realized that it could actually be easily generalized beyond GUIs, with just minor changes to its design and implementation.
  • Red reactive framework:
  • Red's reactive framework is just ~250 LOC long, and written purely in Red (no Red/System). It relies on object events (equivalent to observables in OO languages) and the ownership system (which will be properly documented once completed in one or two releases time). Rebol does not offer any past experience in such domain to guide us, so it should still be considered experimental, and we need to put it to the test in the wild, to study the pros/cons in real-world applications. We are quite excited to see what Red users will create with it.
  • Full documentation for the reactive framework is available here. It also explains the important difference between static and dynamic relations.
  • In a nutshell, the reactive API provides 4 functions (quite big API by our standards):
  • react to create or remove reactions.
  • is infix function for creating reactions which result will be assigned.
  • react? to check if an object's field is a reactive source.
  • clear-reactions to remove all existing reactions.
  • Moreover, react is directly supported as a keyword from VID dialect.
  • Time! datatype:
  • A time! datatype is now included in Red, supporting already a broad range of features, like:
  • Path accessors: /hour, /minute, /second.
  • Math operators, including mixing with other scalar types.
  • All comparison operators.
  • Actions: negate, remainder, random, pick.
  • GUI changes:
  • Two main additions to our View engine have enabled the writing, or porting, of some nice graphic demos (thanks to Gregg Irwin for the awesome demos!).
  • View engine changes:
  • New time event in View, triggered by timers.
  • New rate facet in face! objects for setting timers.
  • move action allows to move faces between panes in a non-destructive way.
  • Adds support for event/window property.
  • data syncing with text for field and text faces.
  • Add default option for fields (e.g. options: [default 0]).
  • at, skip, pick, poke, copy on image! now accept pair! index argument.
  • Added /argb refinement for image! datatype.
  • Added request-font dialog.
  • Improved size-text native.
  • GUI console faces are now excluded from the View debug logs.
  • Draw dialect changes:
  • fill-pen has been extended to support color gradients.
  • pen accepts `off` as argument now, to make the subsequent pen-related operations invisible.
  • Allows box to accept edges in reverse order.
  • Radius of circle now accepts a float! value.
  • Added key-color support for to image command.
  • VID dialect changes:
  • Added rate keyword for setting timers.
  • do command now support `self` to refer to container face (window or panel).
  • Added focus option to faces for presetting focus.
  • Added select option support to preselect an item in a list (using an integer index).
  • Added default option support for field and text faces' default data facet value.
  • Added support for get-words to pass an handler function as an actor.
  • Adding glass and transparent color definitions.
  • The red/code repository has also been filled with more demos using the new features, like color gradients and timers.
  • Other changes:
  • New actions: change, move
  • New natives: remove-each, new-line, new-line?, set-env, get-env, list-env, context?, enbase, now/time, browse
  • New functions: repend, overlap?, offset?, any-list?, number?, react, is, react?, clear-reactions, dump-reactions, make-dir, request-font, time?
  • Parse improvements:
  • Added change command.
  • remove also accepts, now, a position argument.
  • Support for parsing binary! series.
  • Several bugs fixed.
  • Syntax for change command:
  • CHANGE rule value
  • CHANGE ONLY rule value
  • CHANGE rule (expression)
  • CHANGE ONLY rule (expression)
  • CHANGE pos value
  • CHANGE ONLY pos value
  • CHANGE pos (expression)
  • CHANGE ONLY pos (expression)
  • Console improvements:
  • Filenames completion using TAB key.
  • Font and color settings from new menu bar.
  • Ctrl-K will erase to end of line (CLI console).
  • Ctrl-D will remove character or exit like Ctrl-C if empty line (CLI console).
  • Optimized speed of pasted code in console.
  • Other improvements:
  • Allows bitsets to be used as search pattern for find on any-string! series.
  • /next refinement support for do and load.
  • /seek and /part refinements added to read.
  • Added any-list! typeset.
  • Added /with refinement to pad function.
  • Improved split function (though not final version).
  • Added LF CRLF conversions support to UTF-16 codec.
  • input can now read from stdin when run from a child process.
  • Added /same refinement into find and select actions.
  • Added binary! support for data and HMAC key to checksum.
  • Reduced emitted code for setting struct members to float literals on IA-32.
  • Allows owned property to be used by modify on objects.
  • Compiler now accepts creating global op! values from object's functions.
  • A big number of tickets have also been processed, 110 bug fixes have been provided since 0.6.0 release. We have about 10% of open tickets which is more than usual, though not surprising after the last huge release, but only 22 are actual bugs.

New in Red 0.5.3 (Apr 27, 2015)

  • Redbin support and improved vector!

New in Red 0.5.2 (Apr 6, 2015)

  • This is minor release mainly motivated by the need to fix some annoying issues and regressions we have encountered in the last release:
  • the help function was displaying an error when used with no arguments, preventing newcomers from seeing the general help information
  • the console pre-compilation issue with timezones was back.
  • Some significant new features managed to sneak into this release too, along with some bugfixes.
  • Case folding:
  • Red now provides uppercase and lowercase natives and more generally, better support for Unicode-aware case folding. Red runtime library contains now a general one-to-one mapping table for case folding that should cover most user needs.
  • red>> uppercase "hello"
  • == "HELLO"
  • red>> uppercase/part "hello" 1
  • == "Hello"
  • red>> uppercase "français"
  • == "FRANÇAIS"
  • red>> uppercase "éléphant"
  • == "ÉLÉPHANT"
  • red>> lowercase "CameL"
  • == "camel"
  • This applies also to words, so now case insensitivity is Unicode-aware in Red:
  • red>> É: 123
  • == 123
  • red>> é
  • == 123
  • red>> "éléphant" = "ÉLÉPHANT"
  • == true
  • red>> "éléphant" == "ÉLÉPHANT"
  • == false
  • For special cases, we will expose, in a future release, the collation table we use internally, so that anyone can provide a customized version that is a better fit for some local special rules or usages. For example, some lower case characters (such as "ß") actually map to two or more upper case code points ("SS" in this case). So in Red, by default, you will get:
  • red>> lowercase "ß"
  • == ß
  • red>> uppercase "ß"
  • == ß
  • You can read more about our plans for full Unicode support on the wiki.
  • Hash datatype:
  • The new hash! datatype works exactly the same way as in Rebol2. It provides a block-like interface but with fast lookups for most values (block series can be stored in hash! too, but they will not be hashed, so no faster access). It is a very flexible container for any kind of hashed tables (not only associative arrays) while keeping the handy navigational abilities of blocks. The underlying hashing function is a custom implementation of the MurmurHash3 algorithm. Some usage examples:
  • red>> list: make hash! [a 123 "hello" b c 789]
  • == make hash! [a 123 "hello" b c 789]
  • red>> list/c
  • == 789
  • red>> find list 'b
  • == make hash! [b c 789]
  • red>> dict: make hash! [a 123 b 456 c 789]
  • == make hash! [a 123 b 456 c 789]
  • red>> select dict 'c
  • == 789
  • red>> dict: make hash! [2 123 4 456 6 2 8 789]
  • == make hash! [2 123 4 456 6 2 8 789]
  • red>> select/skip dict 2 2
  • == 123
  • A map! datatype (strictly associative array) should also be provided in the next release, though, we are still investigating some of its features and use-case scenarios before deciding to release it officially.

New in Red 0.5.1 (Mar 16, 2015)

  • New console and errors

New in Red 0.5.0 (Dec 23, 2014)

  • Objects support

New in Red 0.4.3 (Nov 17, 2014)

  • Floating point support - After a long time having only partial floating point support in Red/System, it comes now to Red with a broader support, thanks to the terrific work from Qtxie and Oldes, who managed to push Red further while I was busy moving from Europe to China (though, this might be the topic for another blog entry, as requested by many of you).
  • The new float! datatype implements IEEE-754 64-bit floating point format. It is available with most of the usual math functions support:
  • infix operators: +, -, *, /, **.
  • prefix base functions: add, substract, multiply, divide, power.
  • trigonometric functions: cosine, sine, tangent, arcsine, arccosine, arctangent.
  • other math functions: log-2, log-10, log-e, exp, square-root, round
  • Note that these trigonometric functions are taking arguments in degrees, a /radians refinement is provided for input values in radians. However, this can result in extra verbosity for some long math expressions where using only radians, like: ((sine/radians b) * (cosine/radians c)) + ((cosine/radians b) * (sine/radians c))
  • Some radians-oriented shortcuts to these functions are also provided for convenience: cos, sin, tan, arcsin, arccos, arctan. So the above expression becomes: ((sin b) * (cos c)) + ((cos b) * (sin c))
  • IEEE-754 special values - You might know that standard floating point format supports a few extra special values that are meant to make some calculation possible in edge cases. Those are also supported natively by Red, with the following literal formats:
  • Not a Number (NaN) : 1.#NaN
  • Positive Infinity (+INF) : +1.#INF (or just 1.#INF)
  • Negative Infinity (-INF) : -1.#INF
  • Positive Zero : +0.0 (or just 0.0)
  • Negative Zero : -0.0
  • These values are mostly intended for scientific calculations, you do not have to worry about them. They can be produced as results of some math operations on floats, but by default, an error will be thrown instead.
  • In case, you need to operate with maximum precision, and have all the special float values as results instead of errors, a couple of flags are available for that through the system special access. The syntax is:
  • system/float-options [spec]
  • [spec]: block of flags (word! | set-word!) with values (logic! | word!)
  • Valid flags are: pretty?: enables pretty printing of float numbers when very close to an integer value (default: true) ; full?: enables math operations on float special values (default: false)
  • Armhf support - So far, Red supported only the armel ABI for ARM backends. Since this release, we fully support now armhf ABI too, through a specific compilation option that can be found in the new RPi compilation target (intended mainly for default OS on RaspberryPi). The main difference between these ABI is the way float values are passed as arguments to functions, armel requires passing them on stack, while armhf requires passing them through FPU registers.
  • Other changes:
  • url! datatype preliminary support: all actions are working, but no path access support yet.
  • New actions: reverse, random, swap, take, to(*), trim
  • New natives: same?, NaN?
  • New mezzanines: float?, routine?
  • Red/System FPU direct access through system/fpu/* options.
  • Help command now displays full help on routines too.
  • Many bug fixes and a few wishes granted.

New in Red 0.3.3 (Aug 13, 2013)

  • Added Java bridge
  • Added Android support
  • Shared lib generation
  • Other changes:
  • new action: insert
  • new native: bind
  • new mezzanines: system, any-series?, replace, zero?
  • new bindings: Curses, ZLib, JNI, R3-extension
  • finished interpreter by adding exit and return support.
  • Function keyword now collects counter words from: repeat, foreach, forall.
  • new #call compilation directive to enable calling Red functions from Red/System.
  • paths now support get-words fully
  • Red/System got also several improvements:
  • PIC support for both x86 and ARM backends
  • Kernel driver compilation support (Windows only for now)
  • improved function! pointer support, now they can be used as struct members.
  • added new function attribute for dynamic calls: custom
  • new compiler directive for exporting symbols: #export
  • a way to manually align the native stack before making system calls: system/stack/align

New in Red 0.2.5 (Mar 13, 2012)

  • This is a mainly a bug fixing release with several issues and bugs in float numbers handling solved.
  • In addition to that:
  • Libc is now much better integrated with Red/System, the __libc_start_main C internal initialization function is now correctly handled by Red/System on all supported platforms. This ensures that all libraries relying heavily on C will now work as well as if called from a C program. Thanks to Andreas for the nights spent on digging and debugging that.
  • The IA-32 floats backend has been improved to keep last float value in FPU rather than passing it to CPU. This change not only simplifies the backend code emitter but also reduces significantly the generated code size for floats. As a side effect, float-intensive programs are now twice as fast as with v0.2.4. The same change could be applied to ARM backend, but with less gains as ARM can easily transfer data between CPU and FPU, as opposed to IA-32 architecture, which requires an intermediary step through memory when using x87 FPU.