# Ruby-GNOME2 V3

**URL:** <https://www.ruby-forum.com/t/ruby-gnome2-v3/243330>\
**Category:** Ruby-Gnome 2\
**Created:** [September 17, 2015, 9:21pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330 "2015-09-17T21:21:40Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [September 17, 2015, 9:21pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/1 "2015-09-17T21:21:40Z")

</div>

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-gnome/ruby-gnome/blob/b43eaa1f173e16deca9cc330472d409a7b16f39b/NEWS>

---

<div class="post-metadata">

**Author:** ![raubarede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@raubarede](https://www.ruby-forum.com/u/raubarede)\
**Post date:** [September 19, 2015, 7:55pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/2 "2015-09-19T19:55:26Z")

</div>

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](https://bugs.gentoo.org/show_bug.cgi?id=560520)

Seems that the maintainer has some problems…

Unfortunately with latest gnome 3.16 my application  
([Homepage of Dr. Stefan Salewski](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?

---

<div class="post-metadata">

**Author:** ![raubarede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@raubarede](https://www.ruby-forum.com/u/raubarede)\
**Post date:** [September 24, 2015, 8:46pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/3 "2015-09-24T20:46:56Z")

</div>

Thanks for your reply.

You may have missed this:

[http://sourceforge.net/p/ruby-gnome2/mailman/ruby-gnome2-devel-en/?viewmonth=201509](http://sourceforge.net/p/ruby-gnome2/mailman/ruby-gnome2-devel-en/?viewmonth=201509)

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? (  
[StefanSalewski (StefanSalewski) / Repositories · GitHub](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.

---

<div class="post-metadata">

**Author:** ![raubarede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@raubarede](https://www.ruby-forum.com/u/raubarede)\
**Post date:** [September 24, 2015, 7:44pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/4 "2015-09-24T19:44:52Z")

</div>

Stefan S. wrote in post #1178859:

> Unfortunately with latest gnome 3.16 my application  
> ([Homepage of Dr. Stefan Salewski](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:  
[gtk2/examples/ex10.nim at master · nim-lang/gtk2 · GitHub](https://github.com/nim-lang/gtk2/blob/master/examples/ex10.nim)  
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 :

> **[Issues · ruby-gnome/ruby-gnome](https://github.com/ruby-gnome/ruby-gnome/issues)**
>
> A set of bindings for the GNOME libraries to use from Ruby. - Issues · ruby-gnome/ruby-gnome

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 🙂

---

<div class="post-metadata">

**Author:** ![raubarede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@raubarede](https://www.ruby-forum.com/u/raubarede)\
**Post date:** [September 28, 2015, 8:37pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/5 "2015-09-28T20:37:55Z")

</div>

> [http://sourceforge.net/p/ruby-gnome2/mailman/ruby-](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 S. 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  
> [GitHub - StefanSalewski/Ruby-PET: Electronic schematics editor (inspired by gschem/gEDA) -- Ruby GTK3 version · 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.  
> > > [StefanSalewski (Dr. Salewski) / Repositories · GitHub](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,

---

<div class="post-metadata">

**Author:** ![raubarede](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d07c76/32.png) [@raubarede](https://www.ruby-forum.com/u/raubarede)\
**Post date:** [September 28, 2015, 6:25pm UTC](https://www.ruby-forum.com/t/ruby-gnome2-v3/243330/6 "2015-09-28T18:25:46Z")

</div>

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

> **[GitHub - StefanSalewski/Ruby-PET: Electronic schematics editor (inspired by...](https://github.com/StefanSalewski/Ruby-PET)**
>
> Electronic schematics editor (inspired by gschem/gEDA) -- Ruby GTK3 version

> > 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

> **[StefanSalewski - Repositories](https://github.com/StefanSalewski?tab=repositories)**
>
> StefanSalewski has 26 repositories available. Follow their code on GitHub.

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.
