Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Ruby Specification

Reply
Thread Tools

Ruby Specification

 
 
David Ross
Guest
Posts: n/a
 
      07-19-2004
Request. Can someone create a ruby specification? I
want to try to create a true rubycc compiler that is
licensed BSD. I cannot find the Ruby Specification
book anywhere, and I refuse to read the ruby sources
for legal reasons. Anyone want to read up on gc.c?
Thats mainly the monster. It would be nice to have a
full specification on ruby though. Also, if there are
any compiler designers out there that would like to
help or have any comments, drop me an email. Thanks. I
would really like to create a compiler that generates
small executables. It is important to expanding ruby
IMO. Something in the essence of how Lua has a
compiler. It would be really nice. Also, thanks to
that there is no ruby compiler I could not use it in a
commercial project. It would have been really nice to
use it in projects that require a compiled binary that
is 1) not open code, 2) not byte compiled. Please
advise, David Ross



__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/...otelifeengine/



 
Reply With Quote
 
 
 
 
Lothar Scholz
Guest
Posts: n/a
 
      07-19-2004
Hello David,

DR> Request. Can someone create a ruby specification? I
DR> want to try to create a true rubycc compiler that is
DR> licensed BSD. I cannot find the Ruby Specification
DR> book anywhere, and I refuse to read the ruby sources
DR> for legal reasons. Anyone want to read up on gc.c?
DR> Thats mainly the monster. It would be nice to have a

That's a typo, the monster is "eval.c".
Reading the "gc.c" file is as enjoying as reading Harry Potter.

DR> full specification on ruby though. Also, if there are
DR> any compiler designers out there that would like to
DR> help or have any comments, drop me an email. Thanks. I
DR> would really like to create a compiler that generates
DR> small executables. It is important to expanding ruby
DR> IMO. Something in the essence of how Lua has a
DR> compiler. It would be really nice. Also, thanks to
DR> that there is no ruby compiler I could not use it in a
DR> commercial project. It would have been really nice to
DR> use it in projects that require a compiled binary that
DR> is 1) not open code, 2) not byte compiled. Please
DR> advise, David Ross

This is a huge project that you want to start. And in 99% projects of
this size die faster then a local minister in iraq, leaving a lot
of wasted energy.

You should think twice if it is not better to support matz with doing
a rewrite of the current interpreter to get byte code for code obfuscation.
Because of the dynamic nature of Ruby and the interface it provides to
open languages you have to rewrite more or less the whole kernel
anyway. So please participate in the development of Rite.

There is no legal problem with using ruby in commercial projects,
otherwise matz would not be paid by his company.

And by the way, do you want to do this as part of some kind of job or
as a hobbyist ?


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's




 
Reply With Quote
 
 
 
 
Gully Foyle
Guest
Posts: n/a
 
      07-19-2004
David Ross wrote:

> Request. Can someone create a ruby specification? I
> want to try to create a true rubycc compiler that is
> licensed BSD. I cannot find the Ruby Specification
> book anywhere, and I refuse to read the ruby sources
> for legal reasons. Anyone want to read up on gc.c?
> Thats mainly the monster. It would be nice to have a
> full specification on ruby though. Also, if there are
> any compiler designers out there that would like to
> help or have any comments, drop me an email. Thanks. I
> would really like to create a compiler that generates
> small executables. It is important to expanding ruby
> IMO. Something in the essence of how Lua has a
> compiler. It would be really nice. Also, thanks to
> that there is no ruby compiler I could not use it in a
> commercial project. It would have been really nice to
> use it in projects that require a compiled binary that
> is 1) not open code, 2) not byte compiled. Please
> advise, David Ross
>
>
>
> __________________________________
> Do you Yahoo!?
> Vote for the stars of Yahoo!'s next ad campaign!
> http://advision.webevents.yahoo.com/...otelifeengine/
>
>
>


Wow. I wish you the best of luck!

Many of us would be overjoyed to see a true rubycc. Even if its kinda
like gcj with a huge runtime library. And the BSD style licensing makes
it sound almost too good to be true.

If this gets started and you need volunteers, I'm sure you'll find many
ready and willing.

 
Reply With Quote
 
gabriele renzi
Guest
Posts: n/a
 
      07-19-2004
il Mon, 19 Jul 2004 15:38:31 +0900, David Ross <(E-Mail Removed)>
ha scritto::

>Request. Can someone create a ruby specification? I
>want to try to create a true rubycc compiler that is
>licensed BSD. I cannot find the Ruby Specification
>book anywhere, and I refuse to read the ruby sources
>for legal reasons.


I understand your reasons, but I think you can look at parse.y and
refer to the ri documentation for most things, safely.
Matz' company is definitely not SCO, I believe.


> Anyone want to read up on gc.c?


I dont think tha gc is part of a ruby specification.
Maybe you intended eval.c ?

>Thats mainly the monster. It would be nice to have a
>full specification on ruby though.


matz itself agrees, and he told once that he would bless someone that
wants to fill this gap.

>Also, if there are
>any compiler designers out there that would like to
>help or have any comments, drop me an email. Thanks. I
>would really like to create a compiler that generates
>small executables.


maybe you'd like to take a look at metaruby or jruby.

>It is important to expanding ruby
>IMO. Something in the essence of how Lua has a
>compiler. It would be really nice.


it would, but you'd need some interpreter runtime anyway.
Maybe you could compile to C code and link the ruby runtime library

>Also, thanks to
>that there is no ruby compiler I could not use it in a
>commercial project.


if you mean you need to hide/obfuscate code, maybe you just need a
vm+bytecode, as lothar scholz pointed.

> It would have been really nice to
>use it in projects that require a compiled binary that
>is 1) not open code, 2) not byte compiled. Please
>advise, David Ross


why not byte compiled? there are plenty of java and smalltalk
commercial apps.
 
Reply With Quote
 
David Ross
Guest
Posts: n/a
 
      07-19-2004

> I understand your reasons, but I think you can look
> at parse.y and
> refer to the ri documentation for most things,
> safely.
> Matz' company is definitely not SCO, I believe.

I hope they are not SCO. I refuse to look at any
source code though.

> I don't think that gc is part of a ruby

specification.
> Maybe you intended eval.c ?

I should have said, "I do not understand the GC, and
parsing evaluations are a task as well. To start
though I need to know how ruby is expected to work.
Each language GC is different, but performs the same
task.


> >It is important to expanding ruby
> >IMO. Something in the essence of how Lua has a
> >compiler. It would be really nice.

>
> it would, but you'd need some interpreter runtime
> anyway.
> Maybe you could compile to C code and link the ruby
> runtime library


yes, you would need a runtime. I have not planned
anything out yet, its in the idea stage.


> >Also, thanks to
> >that there is no ruby compiler I could not use it

> in a
> >commercial project.

>
> if you mean you need to hide/obfuscate code, maybe
> you just need a
> vm+bytecode, as lothar scholz pointed.
>


I really do not like compiling software into bytecode.
They wanted a standalone executable, they did not want
any third party interpreters.

-------

Okay in response to a few things that have been
mentioned to me elsewhere. Even with dynamic nature of
ruby, it is still possible to create a native
compiler. You have to have a runtime running with it.
It is difficult, and certainly something that would
take a while. I'm tired of hearing, "It can't be done"
in software programming. Just because people think it
cannot be done doesn't mean they are right about it.

Why create a compiler to create stand alone
executables?

I find it difficult to have third part software
installed on the computer. Also, if someone wants to
include an application on a OS which I will not
mention, they want a standalone that does not need a
interpreter. This is one of the main reasons.

--David Ross



__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/...otelifeengine/



 
Reply With Quote
 
Lothar Scholz
Guest
Posts: n/a
 
      07-19-2004
Hello David,


DR> I really do not like compiling software into bytecode.
DR> They wanted a standalone executable, they did not want
DR> any third party interpreters.

You can have all in one interpreter binary, even DLL's. That is for
these people just the same.

DR> Okay in response to a few things that have been
DR> mentioned to me elsewhere. Even with dynamic nature of
DR> ruby, it is still possible to create a native
DR> compiler. You have to have a runtime running with it.
DR> It is difficult, and certainly something that would
DR> take a while. I'm tired of hearing, "It can't be done"
DR> in software programming. Just because people think it
DR> cannot be done doesn't mean they are right about it.

Oh, i don't say this. I just say that compiling it will not give you
any real advantage as long as you don't add type specifications to the
language. Otherwise the compiler would only have a very very small
performance advantage.

The only way to get some benefits is if you can assume that the system
is closed, means that now new ruby files are loaded and no internal
program structure is changed, D, Eiffel and some Lisps are taking
this approach, it's called global program optimization and can give
a huge boost in evaluation speed because accessing a variable or
calling a method can be as fast as a native function call.
But is this restriction really usefull ?

I don't have the time to go into a deep description of how to solve this
problems with a good JIT compiler. So maybe you should read some texts
about this first.

DR> Why create a compiler to create stand alone
DR> executables?

DR> I find it difficult to have third part software
DR> installed on the computer. Also, if someone wants to
DR> include an application on a OS which I will not
DR> mention, they want a standalone that does not need a
DR> interpreter. This is one of the main reasons.

Right, but ExErb is just doing this. It's not a compiler, it does
exist and is a living project and it is in real life usage.
So this is not an argument for a compiler. If you are unsatisfied with
ExErb please spend your time there.


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ruby-ide.com
CTO Scriptolutions Ruby, PHP, Python IDE 's




 
Reply With Quote
 
gabriele renzi
Guest
Posts: n/a
 
      07-19-2004
il Tue, 20 Jul 2004 00:17:13 +0900, David Ross <(E-Mail Removed)>
ha scritto::


>> I don't think that gc is part of a ruby

>specification.
>> Maybe you intended eval.c ?

>I should have said, "I do not understand the GC, and
>parsing evaluations are a task as well. To start
>though I need to know how ruby is expected to work.
>Each language GC is different, but performs the same
>task.


yes but I intended: "you can have your own kind of gc, because ruby
garbage collection does not really determine the behaviour of a
program".
If you have 3-color generational gc or simple reference counting with
cycle detection I think that nothing will change for the final user.
Anyway, I may be wrong.
 
Reply With Quote
 
Mark Sparshatt
Guest
Posts: n/a
 
      07-19-2004

>yes but I intended: "you can have your own kind of gc, because ruby
>garbage collection does not really determine the behaviour of a
>program".
>If you have 3-color generational gc or simple reference counting with
>cycle detection I think that nothing will change for the final user.
>Anyway, I may be wrong.
>
>
>
>

I think changing to a reference counting GC system would change the
behaviour of the program, since it would change when an object is collected.

I know that this subtlety has caused problems for people moving from
CPython (Which uses reference counting) to Jython (which uses mark and
sweep)

--
Mark Sparshatt




 
Reply With Quote
 
Bill Kelly
Guest
Posts: n/a
 
      07-19-2004
Hi,

From: "David Ross" <(E-Mail Removed)>
>
> Request. Can someone create a ruby specification? I
> want to try to create a true rubycc compiler that is
> licensed BSD.


Please don't take this as a criticism. I am asking
because I thought Ruby's license was said to allow
commerical exploitation (even closed source). And
so I'm curious if this is your impression too, or what
additional safeguards or clauses make the BSD license
preferable for your purposes?

> I cannot find the Ruby Specification
> book anywhere, and I refuse to read the ruby sources
> for legal reasons.


I find this perplexing. I thought open source
wasn't doing a good job of being open source if you
had to be wary of reading it for legal reasons?

An example in my field of interest is id Software's
generous release of their older game engines, such as
DOOM, Quake, and Quake 2 under the GPL. I was a game
developer when the Quake source was released, and it
never would have occurred to me to be afraid to look
at it.

Anyway, again, this is not intended as a criticism -
I'm just trying to understand what could possibly be
wrong with looking at Ruby's source code.


Regards,

Bill




 
Reply With Quote
 
David Ross
Guest
Posts: n/a
 
      07-19-2004
> Please don't take this as a criticism. I am asking
> because I thought Ruby's license was said to allow
> commerical exploitation (even closed source). And
> so I'm curious if this is your impression too, or
> what
> additional safeguards or clauses make the BSD
> license
> preferable for your purposes?



> I find this perplexing. I thought open source
> wasn't doing a good job of being open source if you
> had to be wary of reading it for legal reasons?


I want to make sure my code stays under the BSD
license. Ruby's license confuses me a bit. --David Ross



__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


 
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
The Final Draft Ruby Specification Shugo Maeda Ruby 0 09-22-2010 01:02 AM
[ANN] Ruby draft specification Shugo Maeda Ruby 5 12-02-2009 07:17 PM
Ruby Lex Specification Vasco Andrade e Silva Ruby 4 10-31-2007 06:44 AM
Creating Library and Config Specification Roberto Gallo VHDL 0 11-19-2003 01:11 AM
Specification of Ruby regex? Ronald Pijnacker Ruby 8 08-27-2003 05:55 AM



Advertisments