New runtime lexer
The first runtime lexer (wrapped by load function) was implemented a year ago, as a quick hack for the console addition to Red. It was coded in Red/System and supported ASCII inputs only. It was not meant to stay more than a few weeks, but as often in the software world, temporary code lifespan exceeds by far the wishes of the author. The addition of Parse dialect in previous release has opened the possibility of rewriting the Red runtime lexer using the Unicode-aware parse function. It turned out to be a great design choice and opens even more interesting future options like I/O streaming support (when parse will support it) or dynamically extending the lexical rules (when loading custom datatypes for example).
Improved console
The new runtime lexer is now powering the Red console, so we finally have proper Unicode input support!
A help system has also been provided, including the following functions: help, what and source. Try them from the console!
From the console code, the line editing features have been extracted in a different source file that can be now included in your Red programs when you need user input support. For that, two new functions have been provided (working like in Rebol): input and ask.
Moreover, a new branch was started in order to provide cross-platform line editing capabilities without the burden of external dependencies that have proved to be problematic and limited. The new vt100 version should work fine, but it is unfinished. Contributors with deep terminal coding experience are welcome to help improve the current code. We are aiming at a cross-platform console engine that could be used both in CLI and GUI apps.
Additional functions
- New actions: absolute, remainder, complement, power, odd?, even?, and, or, xor, reverse
- New natives: complement?, positive?, negative?, min, max, shift, to-hex
- New operators: <<, >>, >>>
Parse and load have been extended to accept a /part refinement.
Infix operators can now be created from existing functions or routines.
A first call function implementation has been contributed by Bruno Anselme with support for both Red and Red/System.
FreeBSD support
Yes, we got it now! :-) All thanks to Richard Nyberg who kindly provided us with the low-level patches required to make Red work on FreeBSD.
Red/System changes
The Red/System lexer used to be simply the load native from Rebol, which was a great way to speed up the development at the beginning, but was also limitating the syntax to only what Rebol2 accepts. Now the Red/System lexer uses the same code as the Red lexer (the compiler version, not the runtime one), freeing the Red/System syntax from the limitations and making it truly a dialect of Red!
Literal arrays support has been added also in order to facilitate initialization of arrays of value (until we get a first class array! datatype).
CPU registers read/write access has been added. It will be extended in the future to support special registers (like status flags register).
The maximum number of function local variables supported by Red/System was limited to 16, this was limitating also the number of local words that could be used in a Red function. This limitation has now been raised much higher, at least 512 local variables are now allowed.
Work in progress...
Object support is already present in this release, but is it not official yet, as it is supported by the interpreter only and not the compiler. Expect quick progress on this front.
The Android GUI support is also under heavy work in the android branch. In order to implement a proper GUI API, the implementation of a VID-like dialect has started, with Android as first back-end. Windows support should follow shortly, then Linux (most probably using GTK+) and finally MacOSX (once we implement the objective-c bridge).
Gear second!
I am not made of rubber, but I can go gear second too! ;-) You may have not noticed, but the project is rapidly growing up in the last months. It is moving faster and on a larger scale as more contributors are joining. We also get better organized. This is the github stats for just this month:
The most important power-up we got was the addition of Xie Qingtian (aka qtxie) to the Red core team. Xie is an amazingly skilled young programmer from China, who is contributing to Red since more than a year now. But the thing is that he is working full time on Red project now, thanks to the kind sponsoring of CSDN and his CEO, Jiang Tao. Xie is the one who implemented all the new functions listed above and in a short amount of time! So consider that from now on, Red will be advancing twice faster thanks to him! ;-)
In order to organize better the work on Red, we are now using extensively Trello as our main task manager tool. The Red tasks board contains three main lists:
- "Work in progress": for features we are working on.
- "Road to 1.0": lists the required features for 1.0 version.
- "Milestones": helps us organize upcoming releases.
Last but not least, the number of visitors on this site and the github repo has, at least, doubled since new year, thanks to an article on CSDN about Red, our Google Summer of Code campaign and the successful StackOverflow ad campaign (finished earlier this month) run by HostileFork, that brought us more than 10k new visitors who clicked the ad, making it the most clicked ad on SO since the new year! The ad is still visible here.
Big thank to all the people that have contributed to this (big) release. Enjoy it! :-)
Congratulations! Waiting for a long time. ;-) I would like to thank Jerry who introduce me to CSDN, Jiang Tao. :D
ReplyDeleteWell done dude !
ReplyDeleteGreat work! Well done.
ReplyDeleteBravo !
ReplyDeletenice to see that it is going well. Also for the first time I played with red.
ReplyDeletemy little experiment (I know nothing about programming on red or rebol so basically I only tried print function) revealed that red has very weak types, that is:
red>> 1 + "3"
== -143324515
in my view so much weakness is not a good thing. Is this going to be a characteristic of the language or is it just the experimental state of the compiler?
Hi,
ReplyDeleteI think, that 1 + "3" should return error (Rebol does). There is little of typechecking in Red yet, let's regard it really being an alpha state software. What works in Rebol is: 1 + load "3" for e.g., but what you just reported is clearly a bug imo ..
Argument type-checking and error handling have not yet been implemented. We certainly will not support math operators on strings.
ReplyDeleteWill there be nice font anti-aliasing and more beautiful widget-style in Red? The look rebol has is not so easy on the eye.
ReplyDeleteRed default GUI engine will use the native widgets of the host platform (unlike the Rebol View engine).
ReplyDelete