Ruby-GTK and rubyapi2 
Author Message
 Ruby-GTK and rubyapi2

I CC'ed copy to Hiroshi Igarashi since it was the email address on the
docs this mail is about.

I'm going through Gtk+ -tutorial and practising Ruby at the same time. I
have latest version of Ruby (1.5.2, 2000-02-18) and ruby-gtk-0.23. Gtk
is rather old though. I haven't used Gtk ever and my Ruby experience is
over 24h old :).

I'm not going to dive into gtk-related questions (yet) because I seem to
find answers by reading the source :).

My questions:

1) What is the intended way to get english docs for Ruby-Gtk to describe
the API and hopefully up to date?

Current docs seems to be generated by program rubyapi2. I haven't seen
sources for this creature anywhere. Are they public? Where are they?

Is it planned to extend functionality on that program and write API as
comments in the sources? Or some other way possible? Since sources seem
very regular it should be possible to write program to extract all the
useful information into the docs.

2) Is it possible to timestamp all the releases (to README too:)?

3) What is the way to update or contribute stuff? Sources (patches
probably), docs, typos?

4) My gtkbrows.rb (ugly name) crashes after a while with following
report:

./rbbr_rb.rb:34:in `visitModule': stack level too deep
(SystemStackError)
        from ./rbbr_gtk.rb:78:in `visitModule'
        from ./rbbr_rb.rb:97:in `visitModule'
        from ./rbbr_rb.rb:96:in `each'
        from ./rbbr_rb.rb:96:in `visitModule'
        from ./rbbr_rb.rb:99:in `each'
        from ./rbbr_rb.rb:95:in `visitModule'
        from ./rbbr_gtk.rb:78:in `visitModule'
        from ./rbbr_rb.rb:97:in `visitModule'
         ... 4061 levels...
        from ./rbbr_rb.rb:109:in `visit'
        from ./rbbr_rb.rb:109:in `each'
        from ./rbbr_rb.rb:109:in `visit'
        from gtkbrows.rb:44

5) Is it worthwhile to write some interface for some missing class?

ToDo -list mentions to rewrite with Swig etc. So should I wait or should
I go (for it)?



Thu, 08 Aug 2002 03:00:00 GMT  
 Ruby-GTK and rubyapi2

Subject: Ruby-GTK and rubyapi2
Date: Sun, 20 Feb 2000 14:34:12 GMT

Quote:
> I'm going through Gtk+ -tutorial and practising Ruby at the same time. I
> have latest version of Ruby (1.5.2, 2000-02-18) and ruby-gtk-0.23. Gtk
> is rather old though. I haven't used Gtk ever and my Ruby experience is
> over 24h old :).

a quick note.  better not use Ruby 1.5.2.  1.5.x is the development
branch.  Ruby/Gtk is not tested on the development branch.  Get Ruby
1.4.3 if you just want to learn Ruby :^)

Quote:
> I'm not going to dive into gtk-related questions (yet) because I seem to
> find answers by reading the source :).

> My questions:

> 1) What is the intended way to get english docs for Ruby-Gtk to describe
> the API and hopefully up to date?

help is always welcome!

Quote:
> 3) What is the way to update or contribute stuff? Sources (patches
> probably), docs, typos?

hmm... there is japanese list for ruby extensions.  we usually use
that list to post paches...  you can post to ruby-talk if you want.

well we can talk about Ruby/Gtk here, too, IMHO.

Quote:
> 4) My gtkbrows.rb (ugly name) crashes after a while with following
> report:

seems to me you are in the infinite loop.   never happened to me...

Quote:
> 5) Is it worthwhile to write some interface for some missing class?

I think it worth writing missing classes. I don't know how far Hiroshi
Igarashi, the maintainer, got with SWIG...
--
            yashi


Thu, 08 Aug 2002 03:00:00 GMT  
 Ruby-GTK and rubyapi2
Sorry for later reply.

I wrote this to ruby-talk and comp.lang.misc:

At Sun, 20 Feb 2000 06:35:23 -0800 (PST),
in rubyapi2,

Quote:

> I wrote this to comp.lang.misc:

> I'm going through Gtk+ -tutorial and practising Ruby
> at the same time. I have latest version of Ruby
> (1.5.2, 2000-02-18) and ruby-gtk-0.23. Gtk is rather
> old though. I haven't used Gtk ever and my Ruby
> experience is over 24h old :).

> I'm not going to dive into gtk-related questions (yet)
> because I seem to find answers by reading the source
> :).

That's right.
And there is a bit of matters characteristic of Ruby/GTK.

Quote:
> My questions:

> 1) What is the intended way to get english docs for
> Ruby-Gtk to describe the API and hopefully up to date?

> Current docs seems to be generated by program
> rubyapi2. I haven't seen sources for this creature
> anywhere. Are they public? Where are they?

I haven't opened sources of the docs to the public.
because rubyapi is not unofficial doc format.

In addition, the official doc format `RD' and doc tools
`RDTools' have been under discussion, and documents in
unofficial rubyapi format cause confusion. (About RD, see the
articles in ruby-talk.)

For reference, I put current source tarball at:
    http://www.ueda.info.waseda.ac.jp/~igarashi/ruby/ruby-gtk-api-xml-200...
This sources is written in encoding iso-2022-jp and so
you need Emacs or XEmacs with Mule extension or
some Japanese editor to read/edit it.

Quote:
> Is it planned to extend functionality on that program
> and write API as comments in the sources? Or some
> other way possible? Since sources seem very regular it

                            ~~~~~~~ are C sources or doc sources?

Quote:
> should be possible to write program to extract all the
> useful information into the docs.

I have no idea on rubyapi now.

Quote:
> 2) Is it possible to timestamp all the releases (to
> README too:)?

Do you mean that I put into the files like the line following?
  $Date: 2000/02/11 10:20:42 $
Well, I will do so till next release.

Quote:
> 3) What is the way to update or contribute stuff?
> Sources (patches probably), docs, typos?

Please send it to me for the present.
You may well post it to ruby-talk if the stuff is a bit.

Quote:
> 4) My gtkbrows.rb (ugly name) crashes after a while
> with following report:

> ./rbbr_rb.rb:34:in `visitModule': stack level too deep
> (SystemStackError)
>         from ./rbbr_gtk.rb:78:in `visitModule'
>         from ./rbbr_rb.rb:97:in `visitModule'
>         from ./rbbr_rb.rb:96:in `each'
>         from ./rbbr_rb.rb:96:in `visitModule'
>         from ./rbbr_rb.rb:99:in `each'
>         from ./rbbr_rb.rb:95:in `visitModule'
>         from ./rbbr_gtk.rb:78:in `visitModule'
>         from ./rbbr_rb.rb:97:in `visitModule'
>          ... 4061 levels...
>         from ./rbbr_rb.rb:109:in `visit'
>         from ./rbbr_rb.rb:109:in `each'
>         from ./rbbr_rb.rb:109:in `visit'
>         from gtkbrows.rb:44

I met with the above error, too.  rbbr_rb.rb dose not work well
for difference between ruby 1.4 and 1.5. I will examine, but
does anyone know how to fix it?

Quote:
> 5) Is it worthwhile to write some interface for some
> missing class?

> ToDo -list mentions to rewrite with Swig etc. So
> should I wait or should I go (for it)?

I wish that we get glue routines more automatically and so I
wrote it in ToDo. But we have already many (I don't know for
certain) glue routines. There are the way to make more
completely:

  - hand-write the rest of glue routines as we do till now.
  - generate glue routines from the file `gtk.defs' (included in
    GTK+ and PyGTK and etc). We need to write generator program.
  - SWIG/Ruby (but extension is required to SWIG/Ruby)

Automatic processes have the problem how we treat the API
specific to Ruby/GTK. We have to mapping methods and constants
name from C/GTK to Ruby/GTK in the end. I don't know which is
efficient in above options.

I welcome some ideas.

--
Hiroshi IGARASHI



Fri, 16 Aug 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Ruby-gtk, Gtk::Text question

2. string.c (str_alloc) ruby 1.8 + ruby-gtk crash

3. Ruby-GTK / Ruby-glade problems

4. Ruby/GTK: example needed of Widget written in Ruby

5. Ruby on a PDA -- GTk/Ruby ??

6. Seeking news/status about Ruby/Gtk and Glade/Ruby

7. Ruby/GTK

8. Ruby/GTK

9. Ruby/GTK and the mainloop

10. Where to get Ruby(mswin32)/Gtk?

11. Ruby/Gtk and speed...

12. Ruby/Gtk and speed... (solved)

 

 
Powered by phpBB® Forum Software