Ruby-GNOME2 V3

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:

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
(Homepage of Dr. Stefan Salewski) 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?

1 Like

Thanks for your reply.

You may have missed this:

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

Stefan S. wrote in post #1178859:

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

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

1 Like

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

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

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 (StefanSalewski) / Repositories · GitHub

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,

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

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

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.