Objective C backend for Ruby? 
Author Message
 Objective C backend for Ruby?

While people are kicking around ideas for new backends for Ruby,
does anyone think that a backend could be written for Ruby that
uses the Objective C (GnuStep, Cocoa) runtime libraries? Or even
just a translator from Ruby to ObjC ?

Seems that the languages are simliar in many respects, and it seems
like ObjC, being a superset of C, would make a good backend if it's
possible (threads, performance, etc).

Just wondering.

----------------------------------------------------------------------
| Jim Hranicky, Senior SysAdmin                   UF/CISE Department |
| E314D CSE Building                            Phone (352) 392-1499 |

----------------------------------------------------------------------



Tue, 04 Jan 2005 21:45:05 GMT  
 Objective C backend for Ruby?

Quote:
>While people are kicking around ideas for new backends for Ruby,
>does anyone think that a backend could be written for Ruby that
>uses the Objective C (GnuStep, Cocoa) runtime libraries? Or even
>just a translator from Ruby to ObjC ?

>Seems that the languages are simliar in many respects, and it seems
>like ObjC, being a superset of C, would make a good backend if it's
>possible (threads, performance, etc).

You'd have a heck of a time with continuations, unfortunately.
Otherwise it should  be reasonably doable.
--
                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai

                                       teddy bears get drunk



Tue, 04 Jan 2005 23:55:25 GMT  
 Objective C backend for Ruby?
Hi,

I need some  Ruby/tk documentation, and I find a website,
http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
but unfortunately, it is a Japanese website.Anyone can tell me where I can
find a documentation like this one? I'd like to know the detailed
introduction of every class ,such as super class,class method,instance
method.etc.   Thanks for any information .

Maggie



Wed, 05 Jan 2005 00:21:32 GMT  
 Objective C backend for Ruby?

Quote:
> Hi,

> I need some  Ruby/tk documentation, and I find a website,
> http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
> but unfortunately, it is a Japanese website.Anyone can tell me where I can
> find a documentation like this one? I'd like to know the detailed
> introduction of every class ,such as super class,class method,instance
> method.etc.   Thanks for any information .

> Maggie

I don't think so.  If you find it, then please post the URL.  The Ruby
bindings to Tk are almost identical to the Perl bindings.  Knowing this, you
should buy the Perl/Tk Pocket Reference ($10) and learn to translate the Perl
commands, options, etc. into Ruby.  It isn't too hard and is recommended in
Chapter 15 of the Programming Ruby book.


Wed, 05 Jan 2005 00:31:56 GMT  
 Objective C backend for Ruby?
Thanks, I think I can learn how to translate the command into ruby/tk,but I
would like to know the relation among different classes.Do you mean the
per/tk reference include it?
Quote:
----- Original Message -----


Sent: Friday, July 19, 2002 10:29 AM
Subject: Re: Is there any English version of Ruby/tk class documentation
like this ?


> > Hi,

> > I need some  Ruby/tk documentation, and I find a website,
> > http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
> > but unfortunately, it is a Japanese website.Anyone can tell me where I
can
> > find a documentation like this one? I'd like to know the detailed
> > introduction of every class ,such as super class,class method,instance
> > method.etc.   Thanks for any information .

> > Maggie

> I don't think so.  If you find it, then please post the URL.  The Ruby
> bindings to Tk are almost identical to the Perl bindings.  Knowing this,
you
> should buy the Perl/Tk Pocket Reference ($10) and learn to translate the
Perl
> commands, options, etc. into Ruby.  It isn't too hard and is recommended
in
> Chapter 15 of the Programming Ruby book.



Wed, 05 Jan 2005 00:52:51 GMT  
 Objective C backend for Ruby?
it looks to be only partial but (and undocumented):

http://www.eng.dmu.ac.uk/~hgs/ruby/ruby-1.6.7-rdocs/files/ext/tk/lib/...

also, which has now only occured to me, you could generate the rdocs
yourself.

~transami

Quote:

> Thanks, I think I can learn how to translate the command into ruby/tk,but I
> would like to know the relation among different classes.Do you mean the
> per/tk reference include it?
> ----- Original Message -----


> Sent: Friday, July 19, 2002 10:29 AM
> Subject: Re: Is there any English version of Ruby/tk class documentation
> like this ?


> > > Hi,

> > > I need some  Ruby/tk documentation, and I find a website,
> > > http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
> > > but unfortunately, it is a Japanese website.Anyone can tell me where I
> can
> > > find a documentation like this one? I'd like to know the detailed
> > > introduction of every class ,such as super class,class method,instance
> > > method.etc.   Thanks for any information .

> > > Maggie

> > I don't think so.  If you find it, then please post the URL.  The Ruby
> > bindings to Tk are almost identical to the Perl bindings.  Knowing this,
> you
> > should buy the Perl/Tk Pocket Reference ($10) and learn to translate the
> Perl
> > commands, options, etc. into Ruby.  It isn't too hard and is recommended
> in
> > Chapter 15 of the Programming Ruby book.

--
~transami

  _(")_  dobee dobee do...
   \v/  
   ^ ^



Wed, 05 Jan 2005 01:13:44 GMT  
 Objective C backend for Ruby?

M> Thanks, I think I can learn how to translate the command into ruby/tk,but I
M> would like to know the relation among different classes.Do you mean the
M> per/tk reference include it?

 If you want to say the inheritence hierarchy then you can use Objectspace
 to find it.

 This must give something like this (if you just make a 'require "tk"')
 Must be verified (modules are in ())

* TkBindTag
    * TkBindTagAll      (TkBindCore Kernel)

* TkKernel
    * TkObject  (TkBindCore TkTreatFont Tk TkCore TkComm Kernel)
        * TkWindow
            * TkFrame
            * TkLabel
                * TkButton
                    * TkRadioButton
                        * TkCheckButton
                * TkMenubutton
                    * TkOptionMenubutton
                * TkMessage
            * TkMenu    (TkTreatMenuEntryFont TkTreatItemFont)
                * TkMenuClone
                * TkOptionMenubutton::OptionMenu
                * TkSysMenu_Apple       (TkSystemMenu)
                * TkSysMenu_Help        (TkSystemMenu)
                * TkSysMenu_System      (TkSystemMenu)
            * TkRoot    (Tk::Wm)
            * TkScale
            * TkScrollbar
            * TkTextWin
                * TkListbox     (Tk::Scrollable TkTreatListItemFont TkTreatItemFont)
            * TkToplevel        (Tk::Wm)

Guy Decoux



Wed, 05 Jan 2005 01:13:44 GMT  
 Objective C backend for Ruby?

t>  Must be verified (modules are in ())

 Bad, bad I've forgotten some classes

    * TclTkIp   (Kernel)
    * TkComm::Event     (Kernel)
    * TkVariable        (Tk TkCore TkComm Kernel)
        * TkVarAccess

t> * TkBindTag

Guy Decoux



Wed, 05 Jan 2005 01:29:23 GMT  
 Objective C backend for Ruby?
Thanks, they are really helpful. And I'd like to ask a simple question if
you don't mind. How to use Objectspace to find it? Thanks.
Quote:
----- Original Message -----



Sent: Friday, July 19, 2002 11:28 AM
Subject: Re: Is there any English version of Ruby/tk class documentation
like this ?


> t>  Must be verified (modules are in ())

>  Bad, bad I've forgotten some classes

>     * TclTkIp   (Kernel)
>     * TkComm::Event     (Kernel)
>     * TkVariable        (Tk TkCore TkComm Kernel)
>         * TkVarAccess

> t> * TkBindTag

> Guy Decoux



Wed, 05 Jan 2005 01:44:58 GMT  
 Objective C backend for Ruby?
Quote:
----- Original Message -----


Sent: Friday, July 19, 2002 11:29 AM
Subject: Re: Is there any English version of Ruby/tk class documentation
like this ?


> > Hi,

> > I need some  Ruby/tk documentation, and I find a website,
> > http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
> > but unfortunately, it is a Japanese website.Anyone can tell me where I
can
> > find a documentation like this one? I'd like to know the detailed
> > introduction of every class ,such as super class,class method,instance
> > method.etc.   Thanks for any information .

> > Maggie

> I don't think so.  If you find it, then please post the URL.  The Ruby
> bindings to Tk are almost identical to the Perl bindings.  Knowing this,
you
> should buy the Perl/Tk Pocket Reference ($10) and learn to translate the
Perl
> commands, options, etc. into Ruby.  It isn't too hard and is recommended
in
> Chapter 15 of the Programming Ruby book.

I wonder if you could use RDoc on the Ruby/Tk
code. (At least to expose the structure.)

Just a thought. I've never tried it.

Hal



Wed, 05 Jan 2005 03:13:43 GMT  
 Objective C backend for Ruby?
Thanks everyone who give me the information about it.They are really
helpful.Have a good weekend.
Quote:
----- Original Message -----


Sent: Friday, July 19, 2002 1:11 PM
Subject: Re: Is there any English version of Ruby/tk class documentation
like this ?

> ----- Original Message -----


> Sent: Friday, July 19, 2002 11:29 AM
> Subject: Re: Is there any English version of Ruby/tk class documentation
> like this ?


> > > Hi,

> > > I need some  Ruby/tk documentation, and I find a website,
> > > http://www2.pos.to/~tosh/ruby/rdtool/rubytk.html
> > > but unfortunately, it is a Japanese website.Anyone can tell me where I
> can
> > > find a documentation like this one? I'd like to know the detailed
> > > introduction of every class ,such as super class,class method,instance
> > > method.etc.   Thanks for any information .

> > > Maggie

> > I don't think so.  If you find it, then please post the URL.  The Ruby
> > bindings to Tk are almost identical to the Perl bindings.  Knowing this,
> you
> > should buy the Perl/Tk Pocket Reference ($10) and learn to translate the
> Perl
> > commands, options, etc. into Ruby.  It isn't too hard and is recommended
> in
> > Chapter 15 of the Programming Ruby book.

> I wonder if you could use RDoc on the Ruby/Tk
> code. (At least to expose the structure.)

> Just a thought. I've never tried it.

> Hal



Wed, 05 Jan 2005 05:08:15 GMT  
 Objective C backend for Ruby?

M> Thanks, they are really helpful. And I'd like to ask a simple question if
M> you don't mind. How to use Objectspace to find it?

 Be carefull, because this was one of my first scripts in ruby and fatally
 actually it look very strange for me :-))

 First you just ObjectSpace#Each_object to store the classes in a Hash

   ObjectSpace.each_object do |object|
      if object.kind_of? Class
         anc = object.ancestors
         anc.shift
         parent = nil
         mods = []
         anc.each do |c|
            if c.kind_of? Class
               parent = c if ! parent
            else
               mods << c
            end
         end
         $class[parent] ||= []
         $class[parent] << [object, mods]
      end
   end

 Then you display the Hash :

   def affiche(val, level, modu, prev)
      print "    " * level
      newm = modu - prev
      mod = if newm.empty?
            ""
         else
            "\t(#{newm.join(' ')})"
         end
      puts "* #{val}#{mod}"
      if $class[val]
         $class[val].collect { |a| [a, a[0].to_s.upcase] }.
         sort {|a, b| a[1] <=> b[1] }.
         each do |a, |
            affiche(a[0], level + 1, a[1], modu)
         end
      end
   end

   affiche(Object, 0, [Kernel], [])

Guy Decoux



Wed, 05 Jan 2005 19:15:48 GMT  
 
 [ 28 post ]  Go to page: [1] [2]

 Relevant Pages 

1. Perl/Python/Ruby common backend (Perl6)

2. Perl/Python/Ruby common backend (Perl6),

3. RATS (was Perl/Python/Ruby common backend (Perl6))

4. Perl/Python/Ruby common backend

5. Table: Ruby versus Smalltalk, Objective-C, C++, Java;

6. Table: Ruby versus Smalltalk, Objective-C, C++, Java;

7. Table: Ruby versus Smalltalk, Objective-C, C++, Java;

8. Table: Ruby versus Smalltalk, Objective-C, C++, Java;

9. Ruby vs. Objective Caml

10. Ruby vs. Objective Caml

11. PRESS RELEASE: TipTop Software Ships Objective-Tcl and Objective-Browser

12. Ruby in CS courses

 

 
Powered by phpBB® Forum Software