Forum: Ruby-Gnome 2 Ruby-GNOME2 V3

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2015-09-17 21:21
It is there !

gobject-introspection, new icon list (Stock)...

"Migrated to GObject Introspection based bindings from hand
writing bindings. Now, all the latest API in GTK+ are supported."

See:
https://github.com/ruby-gnome2/ruby-gnome2/blob/b4...
8e16f7669af5b4ecfa4f2b89f32b21b6?d=identicon&s=25 Stefan Salewski (stefansalewski)
on 2015-09-19 19:55
Great, thanks.

I already saw it some days ago, V 3.02, and asked gentoo maintainers to
add it to gentoo linux, see

https://bugs.gentoo.org/show_bug.cgi?id=560520

Seems that the maintainer has some problems...

Unfortunately with latest gnome 3.16 my application
(http://ssalewski.de/PetEd.html.en) has some random GC related crashes
with ruby-gnome2 2.2.5 and Ruby 2.2. I have no idea how to debug that. I
had the feeling that ruby-gnome2 2.2.5 was more stable with gnome 3.14.
But now 3.16 is the default for stable gentoo linux, and I guess most
other distros will use that also. Version 1.0 of my application is close
to finished now, maybe 200 hours work left. But with random crashes
working on it is not much fun, and asking others for testing or putting
the code to github makes not much sense. My long term goal is to
transfer the app to Nim language (or maybe Crystal, which is closer to
Ruby), I already wrote the necessary GTK Nim wrappers for gtk 3.15.xx
and related libraries. But converting the 6k lines of code to Nim is
some work, and I would love to have a working Ruby version.

Any ideas?
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2015-09-24 19:44
Stefan Salewski wrote in post #1178859:
>
> Unfortunately with latest gnome 3.16 my application
> (http://ssalewski.de/PetEd.html.en) has some random GC related crashes
> with ruby-gnome2 2.2.5 and Ruby 2.2. I have no idea how to debug that. I
> had the feeling that ruby-gnome2 2.2.5 was more stable with gnome 3.14.
> But now 3.16 is the default for stable gentoo linux, and I guess most
> other distros will use that also.

I work on windows, all seem stable with 3.0.3 (gtk3 is embedded in the
gem for windows, so i don't bother with gnome version)


> Version 1.0 of my application is close
> to finished now, maybe 200 hours work left. But with random crashes
> working on it is not much fun, and asking others for testing or putting
> the code to github makes not much sense.

You should realy publish on github; so then we can help you...
Even if it is not finish.

> My long term goal is to
> transfer the app to Nim language (or maybe Crystal, which is closer to
> Ruby),

All memory issue seem to be in cairo drawing, and many bindings seem to
encounter them. So you risk to encounter ame issue with Nim or
Crystal...

I have done a cairo test in nim gk3 samples:
 https://github.com/nim-lang/gtk2/blob/master/examp...
It is animate, so you can do endurance testing with this kind of source.

Nim is not realy mature, Crystal neither

> I already wrote the necessary GTK Nim wrappers for gtk 3.15.xx
> and related libraries.

Well, commit them , i am interested...

> But converting the 6k lines of code to Nim is
> some work, and I would love to have a working Ruby version.

Conversion from ruby to Crystal are easy (if you don't abuse of ruby
metaprograming)

> Any ideas?

You should publish an isssue in ruby-gnome2 :
https://github.com/ruby-gnome2/ruby-gnome2/issues
Kou can help you.

Sometime my devs with gtk scratch ruby. when programming by
increment, i can reverse to a fee minutes backward and rewrite same
feature differently, and then that work...

Same kind of issue with Nim and Crystal, without gtk :)
8e16f7669af5b4ecfa4f2b89f32b21b6?d=identicon&s=25 Stefan Salewski (stefansalewski)
on 2015-09-24 20:46
Thanks for your reply.

You may have missed this:

http://sourceforge.net/p/ruby-gnome2/mailman/ruby-...

It is not easy for me to debug it. I tried commenting out large parts
including the cairo drawing, but still many random, arbitrary crashes.

You may know that I did the Nim GTK3 bindings? (
https://github.com/StefanSalewski?tab=repositories ) They have no
Garbage Collector support currently, and are much simpler than Ruby
bindings. Nearly no glue code, basically generated with the tool c2nim
from C headers. Adding GC support is not a very big deal, but the
benefit is not that large, because most memory management is done by
GTK's ref counting well.

The problem with Nim GTK3 is, that nearly no one seems to use it
currently, so no one is testing it. But I really think it should work
fine, there is simple not much what can be wrong. Next I have to do the
update for GTK 3.18, which is some works still.

For Crystal, they tried to make a introspection based bindings, I think
also still without GC support. But they call it experimental, and I
don't think they still spent much time on it.

Of course porting my Ruby app to Crystal would be easier because it is
more similar to Ruby. But the Nim GTK3 bindings are complete and do
really work, so I favor porting to Nim currently.
8e16f7669af5b4ecfa4f2b89f32b21b6?d=identicon&s=25 Stefan Salewski (stefansalewski)
on 2015-09-28 18:25
The bug should be fixed in latest ruby-gnome2 3.06 from git.

Now my tool seems to work without these crashes and I put it to github

https://github.com/StefanSalewski/Ruby-PET

>> I already wrote the necessary GTK Nim wrappers for gtk 3.15.xx
>> and related libraries.

>Well, commit them , i am interested...

They are at gitbub since six months, see

https://github.com/StefanSalewski?tab=repositories

More info is available in the Nim forum, there are a few long threads.
But I think no one is really using these bindings currently, so they are
not really tested, there may be some minor bugs and not all is really
polished.
B078cb4f4fb473c7a54d1fc36d10c70e?d=identicon&s=25 Regis d'Aubarede (raubarede)
on 2015-09-28 20:37
> http://sourceforge.net/p/ruby-gnome2/mailman/ruby-...

Well, I didn't know this mailing list...
It is a little bit confusing between github and sourceforge :)


Stefan Salewski wrote in post #1178927:


> The bug should be fixed in latest ruby-gnome2 3.06 from git.
> Now my tool seems to work without these crashes and I put it to github
> https://github.com/StefanSalewski/Ruby-PET

Good news !
debuging gtk/ruby-gnome seem very complex!


>>> I already wrote the necessary GTK Nim wrappers for gtk 3.15.xx
>>> and related libraries.
> https://github.com/StefanSalewski?tab=repositories

I had begining a litle dsl for nim/gtk (like Ruiby), perhaps i
will restart with your gtk3 binding...



> More info is available in the Nim forum, there are a few long threads.

If there are one maintainer, online, it is ok !

Regards,
This topic is locked and can not be replied to.