github Oldes/Rebol3 3.22.1
Rebol v3.22.1

2 days ago
rebol-3 22

New interactive console

The biggest change in this release is a completely revamped REPL, written entirely in Rebol itself — meaning it can be inspected and modified at runtime. The new console brings TAB completion (including path and file completion with multiple refinements) and history saved on exit. As the new console is still fresh and may have rough edges, the legacy REPL remains available via --legacy-repl as a fallback.

Language additions

Several useful natives join the standard library: read-key for single-keystroke input, tty? to detect whether stdin is a terminal, lerp for linear interpolation, and integer-divide for integer division. The arithmetic operators have been reorganised — // is now integer division, % is remainder, and %% is modulo. char! values now work with ++ and --.

Sorting has been upgraded to stable merge sort by default, with sort/unstable available for the previous Adaptive Symmetry Partition sort. Block sort with a comparator function now works correctly with the /all refinement, enabling multi-column sorting like sort/skip/compare/all.

The select and find functions now accept error! values, and bind works with errors too.

Type construction and accessors

url! and email! can now be constructed from a block!, restoring compatibility with Rebol 2. Email values gain /user and /host getters and setters. Strings pick up /size, /length, and /width accessors; individual characters get /size (UTF-8 byte count) and /width (terminal column width). Images gain /width, /height, /red, /green, /blue accessors and setters, plus grayscale/luminosity support using the BT.709 formula (BT.601 available via luminosity/luma).

Vectors can now be constructed from binary data or from an empty block, including shorthand like #(uint8!). Image pixels can be set using 1-byte-width vectors.

Maps and compose

compose now works with map! values, allowing parens inside a map to be evaluated in place:

compose #[num: (1 + 2)]  ;== #[num: 3]

A related fix ensures map values that evaluate to blocks expand correctly, and that deep-copying an object now correctly clones its map fields.

HTTP and networking

HTTP redirect handling can now be controlled per connection via port/spec/redirect?, or globally capped via system/options/http-redirects. Automatic decoding in the HTTP protocol is now limited to GET, POST, and PATCH responses. Network protection has been fine-tuned and security confirmation is now implemented — for example, secure [net ask] will prompt the user before allowing network access.

Formatting and output

format now supports rounding rules and implicitly reduces input blocks (as does printf). ANSI colours for ??, log messages, format, and printf are now drawn from system/options/ansi rather than dialected money values. The help output has been improved and partially colourised.

Renamed and removed

A handful of functions have been renamed:

  • wait-for-keywait-key
  • ask/charask/only
  • format-date-timeformat-datetime
  • print-horizontal-lineprint-hline
  • protect-system-objectprotect-system

The deprecated try/except has been removed (use try/with).

Documentation

The functions dictionary has been updated, datatype documentation is now available, and a new examples section has been added to the site.


Full changelog

Features:

  • e1e45d Allow url! construction from block!
  • c0fc06 Allow email! construction from block!
  • 1459f6 Implement user and host getters/setters for email
  • 78dc62 Add a build option to strip all docstrings from embedded Rebol code
  • 65b232 Implement security confirmation
  • 5420c6 Save history on exit; set system/console/current with actual console instance
  • 082b30 Use new interactive console with TAB completion; legacy REPL available via --legacy-repl
  • 043211 Allow select and find with error! values
  • 111543 Implement rounding rules in the format dialect
  • 17704c Allow overwriting the default ANSI palette during the build
  • f8816c Allow bind with error! values
  • 7f47a9 Fine-tune network protection
  • 61ff9d Add link to latest Rebol/Bzip2 extension
  • 2cba18 Allow odd input lengths for debase with base 2
  • 4252da Allow odd input lengths for debase with base 16
  • e8ffb4 Add idivide native for integer division
  • 9c251f Support char! arguments for -- and ++
  • aa20a5 Add string /size, /length, and /width accessors
  • 71f28f Add character /size accessor for UTF-8 byte size
  • 1468e7 Add character /width accessor for terminal column width
  • c4b8ef Add read-key native for single-key input
  • 344252 Add tty? native to detect terminal stdin
  • 46c59a Implement sort/skip/compare/all on blocks with comparator function
  • 8d3539 Add /red, /green and /blue image accessors/setters
  • 87bedf Support vector construction from binary data
  • 389c33 Allow empty vector construction without empty data like #(uint8!)
  • 66c260 Support setting image pixels with vectors (1-byte width)
  • 123ed0 Add /width and /height image accessors
  • 903e28 Add lerp native for linear interpolation
  • f74e1d Add grayscale/luminosity image and tuple support
  • 9b886c Use stable merge sort by default; sort/unstable for Adaptive Symmetry Partition sort
  • 20b665 Allow trim/auto/tail with string input
  • 7632b8 Make map datatype composable in closures
  • 631ad3 Make map datatype composable in functions
  • c626c7 Optimize map datatype creation
  • 368dc5 Add support for MAP! values in COMPOSE
  • 2b6aef Block SORT comparator
  • 75d0f0 Native request-color function on Windows

Changes:

  • f0a2f9 form does not perform implicit dehexing like Rebol 2
  • 22e083 Decode percent-encoded output when forming a URL to string
  • a86cfb Allow construction of a vector from an empty block: make vector! []
  • 298649 Rename wait-for-key to wait-key; aks/char to ask/only
  • a3ad37 Use the BT.709 luminance formula by default; BT.601 when used luminosity/luma
  • 5cccb8 Remove access to the internal limit-usage function
  • 47b547 Remove outer brackets from profile code block output
  • d0c418 Rename protect-system-object to protect-system (and remove it when used)
  • 51c558 Rename (and improve) print-horizontal-line to print-hline
  • 2d52f8 Rename form-datetime to format-datetime
  • aebd72 Improve help output
  • 0e8ad5 Allow datatype comparison
  • 79a1d9 Fine-tune help docstring output
  • 5cf343 Rename format-date-time to form-datetime
  • 17a867 Partially colorize docstrings in help output
  • a8cec7 Allow entering protected directories with change-dir
  • 31ae19 Fine-tune default startup security
  • 5c058b Give higher priority to words from the lib context
  • 300836 Reset system/state/quit? after do evaluation
  • 0ce12f Use the foreground ANSI color in ?? output
  • b99ce7 Use system/options/ansi values to colorize log messages
  • 4113c0 Allow zero precision scale in round/to
  • 285dfd Improve HELP output
  • fccfcd Return full Windows version in build info
  • 9be0d7 Implicitly reduce input blocks for printf and format
  • 3fbd2a Use system/options/ansi colors in format and printf instead of dialected money values
  • 221ff6 Extend default system/options/ansi table
  • b963cf Allow disabling redirects per connection via port/spec/redirect?
  • ae6dd7 Move HTTP redirects to PORT/SPEC (#174)
  • 0ab808 Control the maximum number of HTTP redirects via system/options/http-redirects
  • b97431 Switch to // integer-divide, % remainder, %% modulo
  • 17b5ab Remove deprecated try/except
  • 61cb80 Allow percent-words like %% (for future module op)
  • 0d83b9 Normalize backspace and escape key output across systems
  • fa093a Handle CTRL+C properly in read-key cycle
  • 038216 Keep control?, shift?, and alt? flags in system/state
  • 642a1b Use GetConsoleWindow to avoid Sleep in console HWND lookup
  • 4fdad4 HSV related code optimization
  • 5c41fe Enable debugging with default MSVC _DEBUG define
  • 519e07 Add error notification when read-thru skips storing content
  • f5c5e6 Force construction syntax for files/emails molded starting with %
  • 3ade0c Allow unescaped @ chars in filenames
  • d995b9 Use recycle/pools in benchmarking functions to minimize chance of memory pool release during measurement
  • 1ba32c Use Adaptive Symmetry Partition Sort instead of Bentley & McIlroy's Qsort
  • 4907ed Qoi - Make encoding 1.4% faster by replacing modulo with mask

Fixes:

  • 87bd59 query on URLs does not handle redirects
  • 53d06c Bind new words from the console command line to the console context
  • 6fa4cb mold and mold/part with Unicode input
  • 23ca61 Make the CHANGE parse rule compatible with Red
  • 9790a4 Make the CHANGE parse rule compatible with Red
  • be42e1 Regression in HTTP protocol
  • 479c49 Show correct help output for unset values from paths
  • 92afc4 Incorrect order in stable merge sort for blocks over 32 values
  • d48602 Crash when using the startup option without a value
  • fb900e Correct read-key Unicode input on POSIX
  • 5f7703 Unicode string case-insensitive comparison
  • 75b6ef New console path completion
  • 20a642 Manually set the VERASE character in POSIX terminals
  • 2bc42d New console file completion within current directory
  • 8f6776 New console path completion of function with multiple refinements
  • be7663 Multiple new console fixes
  • 50d133 Last minute new console fixes
  • d56d22 Improve help output
  • 84f57f Prevent leaking special datatype ID location info in action specification
  • 2ca9d1 Ignore output when no real console is attached
  • 535f7c Convert Unicode char to string
  • 42ac10 Restore line drawings in recursive directory listings (list-dir/r)
  • 5754ff Use UTF-8 encoded file values in file-related security checks
  • b88415 Automatically decode results only for GET and POST in the HTTP protocol
  • 575d27 Use try/with instead of deprecated try/except
  • efd394 Silence 'size_t' to 'REBLEN' conversion warning
  • f4f772 Silence unreferenced local variable warnings
  • 87d4f0 Update control state flags after read-key on POSIX where possible
  • ed004c Properly parse bracketed escape sequences in POSIX console input
  • b48c02 Prevent GC crash with op! from functions
  • 4b5c3f Correct terminal state updates between readline and key modes
  • 790d3e ASCII Control characters width
  • cdc0f0 Skip comments in multiline input
  • 872197 Correct operator in UTF-32 to UTF-8 conversion loop
  • 9c823b Correct swap behavior with binary series and Unicode strings
  • 7f8f34 Correct swap behavior with binary series and Unicode strings
  • 9584d0 Missing series protection
  • e5dd43 Improve sort index comparator validation
  • 061beb Block stored in struct! rebval! field not updated correctly via path
  • 90226e Correct UTF-8 input randomization
  • 05c356 Correct binary input randomization
  • 9fd7bb Use unsigned integer to fix compilation warning
  • ec62d8 Invalid results when used FORM with an Unicode characters
  • 6479be Recognize -> as valid word
  • ec40a2 Deep copy MAP values when cloning an OBJECT
  • 7f3234 Compose on Maps values that evaluate to a block expands the map.
  • 19fcb8 Properly handle series modification with /part and non-series values
  • dd3632 Memory corruption when used append/part to binary with char! argument
  • 03db99 Clear UTF-8 flag from reused internal buffers before use
  • b14b52 Memory corruption when used append/part to binary with char! argument"
  • 527844 Memory corruption when used append/part to binary with char! argument
  • 877069 Memory corruption in append/part with char! argument
  • 909fc9 Infinite loop with some data
  • b2754c Remove full-window SRCERASE to eliminate black screen flashes
  • 38f825 Correctly handle window title on Windows
  • 4d094c Avoid adding duplicate compression name to system/catalog/compressions

Don't miss a new Rebol3 release

NewReleases is sending notifications on new releases.