Home   Archive   Permalink



compiler for rebol

Is there any plan to have a compiler for rebol?
    
I saw someone ask the same question on the rebol.com site.


posted by:   yuem     23-May-2010/8:11:54-7:00



As far as I know, there are no plans to build an executable compiler for REBOL, but Cyphre recently announced a near alpha release of JIT compiled functions for REBOL. The purpose of it will be to speed up performance. Here's part of his announcement:
    
I'd like to announce important milestone in my personal(occasional weekend hobby ;)) JITteR project developement that has just been achieved yesterday.
    
JITteR is lightweight REBOL dialect that enables running JIT compiled functions directly from REBOL interpreter.
Such JIT compiled functions can be tens to hundreds times faster than REBOL equivalent code.
Usage of JITter is aimed on graphics routines, compressors, codecs, generators, number crunching algorithms and various other time-critical programming tasks.
The main idea of this project is not to clone all REBOL functionality but maintain compatibility in sense of JITteR -> REBOL way so any code written in JITteR can be executed(fallback) as plain REBOL function! without the need of touching the code.
    
Currently only REBOL2 version is being tested and x86 CPUs are supported. But R3 and other CPUs will be added in later stages of the developement.
Licensing is not yet decided (until the project reach full Alpha stage). But the code will be definitely free for non-commercial usage.
    
Since this release is only 'internal' I hope this announces doesn't sound to much 'vaporwarish' :-)
    
Alpha release is planned to be released to closed group of developers in ~2 months.
Feel free to leave any feedback in the Ann-Reply group or PM me.
    
project features log:
    
JITteR v0.1.23.3.1 (pre-Alpha version internal release) - 16-May-2010
---------------------------------------------------------------------
- currently only x86 32-bit CPU assembly supported (other CPUs planned in Beta stage)
- datatype support: image!, binary!, string!, integer!, decimal!, char!, logic!
- path! lookup support on binary!, image!, string! byte arrays
- math operations: +,-,*,/,<,>,<=,>=,=
- boolean operations: NOT, AND, OR, XOR
- parens support: REBOL-like code evaluation precedence
- supported keywords (REBOL compatible): APPLY(currently on JITTer functions only), LOOP, REPEAT, WHILE, UNTIL, BREAK, IF, EITHER, PICK, POKE
    
Licensing is not yet decided (until the project reach full Alpha stage). But the code will be definitely free for non-commercial usage.
    
Since this release is only 'internal' I hope this announces doesn't sound to much 'vaporwarish' :-)
    
Alpha release is planned to be released to closed group of developers in ~2 months.
Feel free to leave any feedback in the Ann-Reply group or PM me.
    
project features log:
    
JITteR v0.1.23.3.1 (pre-Alpha version internal release) - 16-May-2010
---------------------------------------------------------------------
- currently only x86 32-bit CPU assembly supported (other CPUs planned in Beta stage)
- datatype support: image!, binary!, string!, integer!, decimal!, char!, logic!
- path! lookup support on binary!, image!, string! byte arrays
- math operations: +,-,*,/,<,>,<=,>=,=
- boolean operations: NOT, AND, OR, XOR
- parens support: REBOL-like code evaluation precedence
- supported keywords (REBOL compatible): APPLY(currently on JITTer functions only), LOOP, REPEAT, WHILE, UNTIL, BREAK, IF, EITHER, PICK, POKE

posted by:   Nick     23-May-2010/9:03:19-7:00



compiling helps in two areas
1) speed/performance
2) your code is protected to some degree from the casual technologically
inclined end user. you don't have to provide your source code as part of
your deployment.    
    
so cyphre is addressing only area 1, not area 2.    
ruby used to have the same problem until JRuby came in. Now that
problem is resolved in the ruby world. you can compile to the JAVA
VM and deploy your compiled object.
    


posted by:   yuem     24-May-2010/15:39:46-7:00



Does it possible to generate rebcode from rebol source?
For ex. Purebasic generates assembly source from purebasci source file and then compiles it using NAsm. You can get the assembly source code to hand optimize it.


posted by:   Endo     24-May-2010/16:41:43-7:00



Yuem, the SDK handles #2 well for commercial projects, but it isn't free. I've come up with several ways to package code in exe's, to keep it from prying eyes (not 110% secure, but good for my needs). If you need real security, take a look at the SDK.

posted by:   Nick     24-May-2010/16:52:26-7:00



Is there any service that I send a Rebol script and they compile it into an exe then send me back. A web site I mean. If so, it is legal? :)

posted by:   Endo     25-May-2010/3:06:16-7:00



I don't know of anyone doing that, but it would be easy to implement with the SDK. I'll look into the license restrictions, but I'd bet it's not allowed...

posted by:   Nick     25-May-2010/8:57:14-7:00



even javascript is being compiled today to achieve higher performance.
    
see javascript v8 engine from google.
    
It compiles javascript and the speed has gone through the roof so to speak !

posted by:   yuem     5-Jun-2010/8:43:14-7:00



I've always wished for a REBOL to C converter. That would give us so many fantastic options, and it would seem potentially possible, since REBOL is written in C. If only REBOL were open sourced...

posted by:   Nick     5-Jun-2010/10:28:27-7:00



if only....
    
i don't use rebol much but i'd be interested in viewing the source only because i've wondered how the hell one could pack so much functionality in just 500k.
    


posted by:   walkfx     5-Jun-2010/11:51:16-7:00



if rebol is written in C as mentioned by Nick, does it mean that rebol is compact because of C ?
    
my biggest worry about Rebol is that its development is moving too slow, and not fast enough filling in the gaps that are inherent in the language and its ecosystem, and that its strengths will be copied by another programming language (existing or new one) where the community is more active and then there will be no reason for Rebol's existence.
    
there is no true Rebol IDE , or multithreading or abiity to call stored procedure. No major web framework like Rails or Grails, spring, struts , no compiler etc...
    
just like the multitasking feature, the original os which came up with multitasking has been overtaken by other more actively developed Operating Systems.


posted by:   yuem     5-Jun-2010/14:47:13-7:00



C is enough to code something compact without need a runtime library (almost) like java or .net and C sources can be compiled on different platforms with a few work and its speed is reasonable becase it is close to assembly. I guess these are the reasons why rebol coded in C.
But you are right, I also think sometimes, time flies, what if a big company do (or kind of stole) the concept of rebol? But always they get me wrong. I guess big companies don't care about size or simplicity. Thnik about RPC or webservices. The concept looks simple but the code behind them is a devil!!


posted by:   Endo     6-Jun-2010/10:44:48-7:00



@endo,
see javafx, using declarative statements like Rebol, for its gui. at least one big language is starting right now.

posted by:   yuem     6-Jun-2010/21:50:32-7:00



Yeum, I actually heard about javafx in AltME, because it was mentioned that javafx "shared" some conceptual approaches with REBOL.
    
Endo, speaking of RPC, have you seen http://earl.strain.at/space/rebXR ? (check out the articles by bruno bord at http://www.rebolfrance.info/org/articles.html).

posted by:   Nick     6-Jun-2010/22:51:20-7:00



@Nick: I didn't know rebXR, anyone use it in a project?
Articles are in French :(

posted by:   Endo     7-Jun-2010/18:33:01-7:00