Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby Compiler

Reply
Thread Tools

Ruby Compiler

 
 
Heesob Park
Guest
Posts: n/a
 
      03-21-2008
Hi,

I longed for a ruby byte code compiler.
But I guess YARV is not stable until now.

So I made a very experimental Ruby Compiler.
Actually it is not a true compiler just ruby object dumper and loader.
By modifing gc.c and eval.c , It cannot be distibuted as extension
library.

The main idea is simple.
1. Dump all symbols,ids and node tree to a file.
2. Load the symbols,ids and tree from a file and run.

But I should have spent much time to understand how to parsing and
evalualing
the ruby code.

With this compiler, you can secure your source code.
And saving parsing time is the main advantage.
Even the same object file can runs on Linux and Windows just like Java
class.

What do you think about this compiler?

Regards,

Park Heesob
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      03-21-2008
On 21 mar, 14:49, Heesob Park <(E-Mail Removed)> wrote:
> Hi,
>
> I longed for a ruby byte code compiler.
> But I guess YARV is not stable until now.
>
> So I made a very experimental Ruby Compiler.
> Actually it is not a true compiler just ruby object dumper and loader.
> By modifing gc.c and eval.c , It cannot be distibuted as extension
> library.
>
> The main idea is simple.
> 1. Dump all symbols,ids and node tree to a file.
> 2. Load the symbols,ids and tree from a file and run.
>
> But I should have spent much time to understand how to parsing and
> evalualing
> the ruby code.
>
> With this compiler, you can secure your source code.
> And saving parsing time is the main advantage.
> Even the same object file can runs on Linux and Windows just like Java
> class.
>
> What do you think about this compiler?
>


Looks interesting , one question:

Does the loading for the parsed/node tree generated dump avoid
evaluation? I mean, there is no need to reparse it, right? If so, then
you have a speed boost when loading pre-compiled ruby scripts and
sounds good.

How it handles reload of files (using load 'foo.rb' compares the mtime
of the pre-compiled file with the source file?)

Regards,
--
Luis Lavena
 
Reply With Quote
 
 
 
 
llothar
Guest
Posts: n/a
 
      03-21-2008
On 22 Mrz., 05:11, Luis Lavena <(E-Mail Removed)> wrote:
> On 21 mar, 14:49, Heesob Park <(E-Mail Removed)> wrote:
>
>
>
> > Hi,

>
> > I longed for a ruby byte code compiler.
> > But I guess YARV is not stable until now.

>
> > So I made a very experimental Ruby Compiler.
> > Actually it is not a true compiler just ruby object dumper and loader.
> > By modifing gc.c and eval.c , It cannot be distibuted as extension
> > library.

>
> > The main idea is simple.
> > 1. Dump all symbols,ids and node tree to a file.
> > 2. Load the symbols,ids and tree from a file and run.

>
> > But I should have spent much time to understand how to parsing and
> > evalualing
> > the ruby code.

>
> > With this compiler, you can secure your source code.
> > And saving parsing time is the main advantage.
> > Even the same object file can runs on Linux and Windows just like Java
> > class.

>
> > What do you think about this compiler?

>
> Looks interesting , one question:
>
> Does the loading for the parsed/node tree generated dump avoid
> evaluation? I mean, there is no need to reparse it, right? If so, then
> you have a speed boost when loading pre-compiled ruby scripts and
> sounds good.
>
> How it handles reload of files (using load 'foo.rb' compares the mtime
> of the pre-compiled file with the source file?)
>


This concept can only work on special written files that are not doing
any
evaluation during load. Unfortunately almost none of the files in the
standard library do fit into this schema.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Error Message: The compiler failed with error code -1073741819 Ram ASP .Net 0 09-13-2005 09:52 AM
Why is a JIT compiler faster than a byte-compiler RickMuller Python 4 03-26-2005 04:30 PM
Compiler compiler with C++ as output Andrey Batyuck C++ 3 05-17-2004 08:17 PM
Can we use <compiler> tag to avoid RunTime Compiler error? Jack Wright ASP .Net 5 01-19-2004 04:36 PM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM



Advertisments