Pages

August 10, 2011

Red/System v0.2.1 released

This new release is bringing a lot of important bug fixes and some new features for Red/System. The new PRINT function might break some existing scripts, but should be easily fixable.

New features
  • Variable-arguments function support
  • RTTI function limited support
  • Polymorphic and variadic PRINT function
  • Command-line arguments access
  • Added stack low-level manipulation native functions: push, pop
  • Access to stack pointer and stack frame pointer (reading/writing)
  • Subtracting two pointers is now possible
  • Preprocessor improved to solve macros recursively
  • New built-in hexdump debugging functions
  • External library access unit tests (thanks to Peter)
PRINT function examples:

print 123
123

print "hello"
hello

print [123 "hello"]
123hello

print [123 tab "hello" lf "world" lf]
123 hello
world

a: 1 < 2
b: "hello"
print [a tab b/2]
true e

Bugfixes
  • Complex arithmetic expressions involving pointers, path access and type casting are now much more reliable. 89 new unit tests were written to help fix the bugs and track regressions.

Specification document
  • Updated to match all new and changed features

Red runtime
  • Memory allocator implemented in Red/System, documentation is pending.

As you can see, no vacation this summer for Red project!

6 comments:

  1. Nice to hear of progress as it is being made. Unlike REBOL which is sadly silent. Well done. - Luke

    ReplyDelete
  2. great job dockimbel, in particular "stack low-level manipulation native functions: push, pop"
    -Paullys

    ReplyDelete
  3. Great stuff Doc!

    Paul

    ReplyDelete
  4. Hi, I found out about Red indirectly through a Slashdot post about Syllable. I glanced at the introductory documents but they don't explain what Red is, and how it differs from popular languages like C++/C#, in an accessible way. Is it statically typed? Can it support very high-performance and high-level, concise code simultaneously (because that's the only kind of language I'm interested in)?

    ReplyDelete
  5. The full answer is not simple, but to answer your immediate questions:
    - Red is currently only Red/System, the low-level language that is being used to build Red, the high-level version.
    - As such, Red/System is quite comparable to C, but with a REBOL style syntax, which makes the construction of (JIT) compilers and other tools much easier.
    - Some Red/System features go beyond C, such as functions with typed arguments (RTTI).
    - Some Red/System features go below C to the assembler level, such as direct stack manipulations (but still in portable fashion).
    - The current performance should be comparable to unoptimised C, so perhaps around C++ level.
    - The full Red language will support much higher level features, aiming at the feature set of the dynamic REBOL level. Because it will still be compiled, the aim is to keep the performance loss compared to Red/System as small as possible.

    Nenad, the author, will probably be available for comment tomorrow, but it's better to ask further questions in the Google Group.

    ReplyDelete