Tk on Windows and Mac OS X 10.6

Didn't read everything. Just want to mention that there will be a Qt-
Ruby-Gem for Windows release very soon. For Linux there should be pre-
build packages available for most common distributions.

First adress for ruby + Qt/KDE: The Kde-bindings Archives

Robert

···

On 19 Feb., 10:48, mdiam <maurice.diamant...@gmail.com> wrote:

On Feb 18, 11:56 pm, Hidetoshi NAGAI <na...@ai.kyutech.ac.jp> wrote:

> > > I think that a monolithic tcltklib.so library is one of the solutions
> > > to avoid such kind of troubles.
> > > ...

> Probably, not easy. But it will not so difficult as you think.
> By using Tclkit and some experiments, I've already succeeded to make
> a tcltklib.so merged a Tcl/Tk environment and create a TclTkIp object
> with Tk (of course, the version of Tcl/Tk is the one of the merged) on
> Ruby with the tcltklib.so.

Great, if it is possible, it would be *the* definitive solution for Tk
with Ruby.

If you have a recipe on how to build this full Ruby/Tk distrib from
sources, I could test it on Macosx and some linux.
These source would be :
- ruby-1.9xxx
- tcltk-8.5xxx or tcltk-8.6xxx

My idea would be to create a stand alone ruby sumo distrib (rubylab ?)
with Ruby + Tk + Qt + FFI + some science selected extensions.
(This would be the last alternative before switching from Ruby to
Pihton :frowning: )

But as I'm not very clever in compilation, this will take some
time...

Cordialement,
-- Maurice

If you have a recipe on how to build this full Ruby/Tk distrib from
sources, I could test it on Macosx and some linux.
These source would be :
- ruby-1.9xxx
- tcltk-8.5xxx or tcltk-8.6xxx

My idea would be to create a stand alone ruby sumo distrib (rubylab ?)
with Ruby + Tk + Qt + FFI + some science selected extensions.
(This would be the last alternative before switching from Ruby to
Pihton :frowning: )

The only real cross platform distro I'm aware of is "rawr" for jruby.
If all you need is swing or the eclipse swt you're good to go (there's
examples of ruby wrapping the swt in the redcar project).
-r

···

--
Posted via http://www.ruby-forum.com/\.

One more thought, on my feeling from what I read in this newsgroup
about Ruby/Tk on Windows:
_Until_ a very good solution is available, I think, it would be good
to have a clear description on how to install Ruby/Tk on Windows,
using for example ActiveTCL, and having binaries for download.
Something like Roger Pack provides, but even more.

I've updated
http://wiki.github.com/rdp/ruby_tutorials_core/tk
to be a little more verbose.
Hopefully that will be enough of a stop gap until somebody comes in and
patches RubyInstaller to have the Tk binaries...
-r

···

--
Posted via http://www.ruby-forum.com/\.

Message-ID: <c8479617-faeb-41af-b96d-a0ea083c6fae@f42g2000yqn.googlegroups.com>

One more thought, on my feeling from what I read in this newsgroup
about Ruby/Tk on Windows:
_Until_ a very good solution is available, I think, it would be good
to have a clear description on how to install Ruby/Tk on Windows,
using for example ActiveTCL, and having binaries for download.

Of course, if you can, it is the best way to install Tcl/Tk (and Ruby)
on your environment. I never think to change current standard relation
between Ruby and Tcl/Tk libraries.

I think that most of troubles on installation of a binary distribution
depend on:
(1) install wrong version (not supported by tcltklib.so) of Tcl/Tk.
(2) "Path" environment variable doesn't include the folder of Tcl/Tk
    libraries.

Tcl/Tk stubs are usually effective. But sometimes, it generates errors
by uncertain reason.

# On a linux box, I get such errors.
# tcltklib.so with stubs made for Tcl/Tk8.4 doesn't work for Tcl/Tk8.5,
# but works for Tcl/Tk8.6.
# And os the same box, the one made for Tcl/Tk8.5 doesn't work for 8.6.

If can, it is better to distribute 3 version (for Tcl/Tk8.4, 8.5, and
8.6) of tcltklib.so.

···

From: Axel <a99.googlegroups.a99@dfgh.net>
Subject: Re: Tk on Windows and Mac OS X 10.6
Date: Sat, 20 Feb 2010 16:15:07 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Great new, thank you for the link.
(I hope the Qt-Ruby-Gem will be multiplatform)

-- Maurice

···

On Feb 19, 3:26 pm, saLOUt <salout...@googlemail.com> wrote:

> My idea would be to create a stand alone ruby sumo distrib (rubylab ?)
> with Ruby + Tk + Qt + FFI + some science selected extensions.

Didn't read everything. Just want to mention that there will be a Qt-
Ruby-Gem for Windows release very soon. For Linux there should be pre-
build packages available for most common distributions.

First adress for ruby + Qt/KDE:The Kde-bindings Archives

Not really, jruby (that I like) work on java which
can be see as a platform by itself. So if you need to use
other lib (such as glpk (c), lemon (c++) , coin-or (c++), ..
you have or play with jni interface.

The FFI ffi-tk ruby project should work with any plateform
(e.g. jruby but also macruby, etc...).
But if Hidetoshi hasn't choose that way (i.e. ffi) for tk,
propably there is a good reason (like the threads, or simply
it much more work ?)

-- Maurice

···

On Feb 19, 6:13 pm, Roger Pack <rogerpack2...@gmail.com> wrote:

> If you have a recipe on how to build this full Ruby/Tk distrib from
> sources, I could test it on Macosx and some linux.
> These source would be :
> - ruby-1.9xxx
> - tcltk-8.5xxx or tcltk-8.6xxx

> My idea would be to create a stand alone ruby sumo distrib (rubylab ?)
> with Ruby + Tk + Qt + FFI + some science selected extensions.

The only real cross platform distro I'm aware of is "rawr" for jruby.
If all you need is swing or the eclipse swt you're good to go (there's
examples of ruby wrapping the swt in the redcar project).

Hopefully that will be enough of a stop gap until somebody comes in and
patches RubyInstaller to have the Tk binaries...
-r

I think, that's good.
The only thing which might be missing is a gem/binary for Ruby1.8.x +
Tk8.5.
People might want to have it because of better looking (really?)
widgets.
I'll send you an email on this issue.

Axel

I think that most of troubles on installation of a binary distribution
depend on:
(1) install wrong version (not supported by tcltklib.so) of Tcl/Tk.
(2) "Path" environment variable doesn't include the folder of Tcl/Tk
libraries.

I agree. I would add:
(3) Get the binaries in order to avoid compilation; becoming solved
now by Roger Pack.
(4) _Find_ the explanation on how to install ( 1. right versions
are ..., 2. TCL of version xyz from here..., 3. Ruby/Tk-binaries/gems
from rp..., 4. If it does not work, check PATH, path must be...)

Axel

Message-ID: <f758cf0f-774f-47a2-8069-1d53ea4b08f7@f15g2000yqe.googlegroups.com>

The FFI ffi-tk ruby project should work with any plateform
(e.g. jruby but also macruby, etc...).
But if Hidetoshi hasn't choose that way (i.e. ffi) for tk,
propably there is a good reason (like the threads, or simply
it much more work ?)

Because I'm not familiar with FFI, I don't have good ideas to soleve
complexity of combination of callbacks, threads, and exceptions.

For example ...
The eventloop is running on thread1.
thread2 calls Tk function1 (send to thread1; serialized on event queue).
thread1 get thread2's request from the event queue.
thread1 call callback1 on Ruby.
callback1 (running on thread1) calls Tk function2.
function2 call callback2 on Ruby.
And, an exception is raised in callback2.
Then, how should we treat the exception?
Tcl/Tk functions know nothing about Ruby threads.

Of course, there are some methods to solve it.
However, those methods may have other problems;
slow operation or response (with lock process),
depend on global variables, explosion of entry tables,
CPU power eater (by busy loop), and so on.
To solve or avoid all of them on Ruby only may be difficult.

# I agree that ffi-tk is valuable even if it has some restrictions.

···

From: mdiam <maurice.diamantini@gmail.com>
Subject: Re: Tk on Windows and Mac OS X 10.6
Date: Sat, 20 Feb 2010 19:16:41 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

I agree. I would add:
(3) Get the binaries in order to avoid compilation; becoming solved
now by Roger Pack.
(4) _Find_ the explanation on how to install ( 1. right versions
are ..., 2. TCL of version xyz from here..., 3. Ruby/Tk-binaries/gems
from rp..., 4. If it does not work, check PATH, path must be...)

Feel free to hack on that wiki page if desired :slight_smile:
I don't mind :slight_smile:
-r

···

--
Posted via http://www.ruby-forum.com/\.

Feel free to hack on that wiki page if desired :slight_smile:
I don't mind :slight_smile:

Thank you, I'll do so - wait :slight_smile:

Axel

From: mdiam <maurice.diamantini@gmail.com>
Subject: Re: Tk on Windows and Mac OS X 10.6
Date: Sat, 20 Feb 2010 19:16:41 +0900
Message-ID: <f758cf0f-774f-47a2-8069-1d53ea4b08f7@f15g2000yqe.googlegroups.com>

The FFI ffi-tk ruby project should work with any plateform
(e.g. jruby but also macruby, etc...).
But if Hidetoshi hasn't choose that way (i.e. ffi) for tk,
propably there is a good reason (like the threads, or simply
it much more work ?)

Because I'm not familiar with FFI, I don't have good ideas to soleve
complexity of combination of callbacks, threads, and exceptions.

[...]

Manveru has an ffi-tk gem for Ruby 1.9. He says it should run on any
Ruby 1.9 installation that has FFI installed (either as a gem, as with
MRI, or as part of the installation, as with JRuby or Rubinius).

Axel wrote:

axel DOD friedrich_smail ED gmx DOD de

I think you meant "DOT" and "AT".

···

On Sun, Feb 21, 2010 at 12:21 AM, Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> wrote:

Roger, could you send me your email address? Can't find it.

Mine:

axel DOD friedrich_smail ED gmx DOD de

From: mdiam <maurice.diamantini@gmail.com>
Subject: Re: Tk on Windows and Mac OS X 10.6
Date: Sat, 20 Feb 2010 19:16:41 +0900
Message-ID: <f758cf0f-774f-47a2-8069-1d53ea4b08f7@f15g2000yqe.googlegroups.com>

The FFI ffi-tk ruby project should work with any plateform
(e.g. jruby but also macruby, etc...).
But if Hidetoshi hasn't choose that way (i.e. ffi) for tk,
propably there is a good reason (like the threads, or simply
it much more work ?)

Because I'm not familiar with FFI, I don't have good ideas to soleve
complexity of combination of callbacks, threads, and exceptions.

[...]

Manveru has an ffi-tk gem for Ruby 1.9. He says it should run on any
Ruby 1.9 installation that has FFI installed (either as a gem, as with
MRI, or as part of the installation, as with JRuby or Rubinius).

I actually just tested it on windows today, had to do some tweaks, but
it runs (together with EM even) with just two lines of modification (i
had guessed the name of the dll wrong).
Will push a new gem tomorrow when i get confirmation that OSX still works.

···

On Mon, Mar 1, 2010 at 8:52 AM, Eric Christopherson <echristopherson@gmail.com> wrote:

On Sun, Feb 21, 2010 at 12:21 AM, Hidetoshi NAGAI > <nagai@ai.kyutech.ac.jp> wrote:

GitHub - manveru/ffi-tk: FFI bindings to the Tk GUI toolkit

Axel wrote:

axel DOD friedrich_smail ED gmx DOD de

I think you meant "DOT" and "AT".

--
Michael Fellinger
CTO, The Rubyists, LLC