We have all waited long for this to happen, but it is finally there: first Red alpha release!
This is the biggest milestone since the initial release of Red System, as it marks the entrance of the higher layer of the Red software stack. There's still another layer pending, the JIT compiler, but that's for 2013, when Red will be self-hosted.
What Red can do so far?
- 15 datatypes: block!, string!, char!, integer!, logic!, none!, word!, lit-word!, get-word!, set-word!, refinement!, action!, native!, op!, unset!.
- 19 actions: make, form, mold, add, divide, multiply, subtract, append, at, back, clear, head, index?, length?, next, pick, poke, skip, tail.
- 21 natives: if, unless, either, any, all, while, until, loop, repeat, foreach, forall, print, prin, equal?, not-equal?, strict-equal?, lesser?, greater?, lesser-or-equal?, greater-or-equal?, not.
- 10 infix operators: +, - , *, /, =, ==, <, >, <=, >=.
String! datatype fully supports Unicode from end to end and in a cross-platform way, according to our plan (see the hello.red demo script).
We also have some unit tests (223 tests right now), but that number should rapidly increase once we will be able to fully port QuickTest framework to Red (in a couple of weeks, once Red will gain functions).
All those features were mostly coded in the last month, some parts are still lacking (e.g. refinements support for actions/natives) but that gives you an idea of the pace at which Red will be further developed.
However, we haven't started yet writting the documentation for Red language, we should decide soon on the kind of documentation we want (hint: you can make propositions about that on the Red mailing-list or FB page). Red API documentation will most probably be generated automatically from source code by extracting doc-strings.
What's not yet there?
- Red runtime lexer (LOAD native)
- Functions and objects support
- I/O support (including networking)
- More complete memory allocator and a garbage collector.
- Concurrency support
- Additional datatypes
Can I try it already?
How does Red work?
Some compilation options are already available, the famous -t option from Red System is also present, allowing Red to cross-compile any script as easily as with Red/System.
This is just the beginning, so for now, whole Red runtime library is compiled with user scripts each time. We will add modular compilation support at some point to get the full compilation speed back.
You can test the few example Red scripts from the repository. Here is what the demo.red script outputs on some of the platforms Red can already run on:
The missing characters in some of the screenshots are Chinese ones as I only have font support for them on Ubuntu.
Red was originally conceived to be statically typed. However, during the early stages of Red implementation, it appeared that an hybrid typing system will be more adequate for a language that will support high-level scripting, without the burden of a sophisticated, but slow, type inference engine. The overhead of such inference engine can be very high (cf Scala slow compilation speed ). The hybrid type system works very simply, typing is optional, but if local variables and function returned values are typed by user, the compiler will be able to generate faster code (more than an order of magnitude faster for, e.g., pure math expressions) and catch more programming errors at compile time.
Red compiler does not do any optimization so far, it basically outputs the equivalent of an unrolled interpreter loop. Some optimizations will be added along the development of the bootstrap version of Red, but the full extent of possible optimizations will be left for the self-hosted Red. Firstly because the current compiler code is disposable, so we don't want to invest too much time in it, secondly because the final JIT compiler will allow even deeper optimizations thanks to reflection and profiling information collected at runtime.
Red/System changes
- function pointer support has been extended and improved, dereferencing is now possible.
- 20 issues have been fixed.
- some long-standing bugs with GTK+ and other bindings on ARM platforms have been fixed.
So, what's coming next?
The work on shared library generation for MacOS and Linux platforms is on-going. Once available, we'll be able to literally "plug" Red in a lot of third-party apps, including other programming languages. Also, this will enable (or make easier) the bridging with some external systems like Java, .Net and objective-c, in order to fully support the main mobile platforms.
As you can see, next months will see some important parts of Red come to life, be sure not to miss them, follow us on our mailing-list, on Twitter, IRC and Facebook.
Cheers!
Great Work! Thanks!
ReplyDeleteGreat, another milestone done. Now towards the next level :-)
ReplyDeleteAmazing!
ReplyDeleteim none-programmer but would like to give Red a try, are their plans to add its own easy to code GUI programming like Rebol has?
ReplyDeleteGreat!
ReplyDeleteI think Red is by far the most exciting new computer language project.
Clark, Red/System already has a binding with the cross-platform GTK+ GUI library, which looks more or less like REBOL and is much easier to use than other language bindings with GTK. Look on the Contributions page here. We're working on making it available from Red.
ReplyDelete@Kaj de Vos
ReplyDeletethat is nice to hear, im gonna check it out when its already available, and yes Red looks very exciting its gonna make programming much easier
Thanks to you all for your kind support!
ReplyDeleteClark, Red will have several GUI frameworks for you to use, including a HTML5-based one.
@Nenad Rakocevic
ReplyDeletethanks a lot!!! *waits patiently for Red to mature*
One of the most promising (futuristic)language projects. I happened to see the presentation the day before yesterday. It's cool..I must say.
ReplyDeleteThanks Amanda. The whole project is very ambitious, but with enough will, energy and (good) coffee, nothing is impossible! ;-)
ReplyDeleteWhat is a long wait to the REBOL community?
ReplyDeleteDon't wait for it to mature, @Clark! Play with it now, or at least as soon as you can. I know I will at least be installing it and trying some simple things tonight ^_^
ReplyDeleteJust discovered this project this morning while I was contemplating writing a JIT for REBOL. I have to say that I haven't been this excited about something for a long time. Red will allow me to develop and deliver all my code from one platform and replace the three other languages that I have to use for various tasks. A big thanks to Nenad and everyone else working on Red!
ReplyDeleteI forgot to mention that I made a blog entry about red:
ReplyDeletehttp://www.linuxinside.gr/content/%CE%BC%CE%B9%CE%B1-%CE%BD%CE%AD%CE%B1-%CE%B3%CE%BB%CF%8E%CF%83%CF%83%CE%B1-%CE%B3%CE%B5%CE%BD%CE%BD%CE%B9%CE%AD%CF%84%CE%B1%CE%B9
note that it is just a blog. I have no other connection to linuxinside team.
@Λύκινος: thanks for helping spreading Red!
ReplyDelete@ZM76: thanks for your enthusiasm and kind words!