Use of Tk in Ruby

Just finished a small project in Python, that used Tk via the tk.inter module. Is there anything similar available for Ruby?

I found the Ruby Tk module to be hideously complicated. Failing that is there any GOOD documentation on Tk for Ruby?

···

--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net

Hi,

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

Ruby has Tk bindings in its standard library, but...

I found the Ruby Tk module to be hideously complicated.

...if you think they're too complicated, then there's nothing else for
Tk in Ruby, at least to my knowledge.

Failing that is there any GOOD documentation on Tk for Ruby?

Index of Classes & Methods in tk: Ruby Standard Library Documentation (Ruby 2.3.1) lacks real
documentation as far as I can see, especially there's no introductory
documentation. You could try to figure things out and send a patch to
the Ruby maintainers so that others could profit from your work.

Otherwise, you could try another GUI toolkit. The Gtk bindings for Ruby
are well maintained and do have acceptable documentation:
http://ruby-gnome2.osdn.jp/

Greetings
Marvin

···

On Fri, Sep 16, 2016 at 08:33:03PM +0100, Patrick Bayford wrote:

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F

There's a tutorial for using tk with a number of languages, including ruby, at
[1]. I never read all of it because I quickly decided I didn't like tk, but
the tutorial seems well done.

Stefano

[1] TkDocs Tutorial

···

On Friday 16 September 2016 20:33:03 Patrick Bayford wrote:

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

I found the Ruby Tk module to be hideously complicated. Failing that is
there any GOOD documentation on Tk for Ruby?

Hi,

···

From: Patrick Bayford <pbayford@talktalk.net>
Subject: Use of Tk in Ruby
Date: Fri, 16 Sep 2016 20:33:03 +0100
Message-ID: <cfd04524-914d-355e-e747-d5597181a0f7@talktalk.net>

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

I found the Ruby Tk module to be hideously complicated. Failing that
is there any GOOD documentation on Tk for Ruby?

There are some examples (including the translated "Widget Demos")
on Ruby's source tree ( <ruby-src>/ext/tk/sample/... ).
If you are already familiar with Tk, sample scripts may be good documents.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

Thanks for that Marvin - I'll have a look at the Gtk tutorial.
Thanks alos to Stefano, I had NOT found that resource, but will check it out.

···

On 18/09/2016 8:14 AM, Marvin Gülker wrote:

Hi,

On Fri, Sep 16, 2016 at 08:33:03PM +0100, Patrick Bayford wrote:

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

Ruby has Tk bindings in its standard library, but...

I found the Ruby Tk module to be hideously complicated.

...if you think they're too complicated, then there's nothing else for
Tk in Ruby, at least to my knowledge.

Failing that is there any GOOD documentation on Tk for Ruby?

Index of Classes & Methods in tk: Ruby Standard Library Documentation (Ruby 2.3.1) lacks real
documentation as far as I can see, especially there's no introductory
documentation. You could try to figure things out and send a patch to
the Ruby maintainers so that others could profit from your work.

Otherwise, you could try another GUI toolkit. The Gtk bindings for Ruby
are well maintained and do have acceptable documentation:
http://ruby-gnome2.osdn.jp/

Greetings
Marvin

--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net

Hi,

for the ruby-GNOME2 there are a lot of simple examples here:

You will find a tutorial based on the Gtk+ tutorial here:

And we are working on the gtk-demo (some demos still need to be updated)

feel free to ask if you have some problems here:

install gtk3

gem install gtk3

get a local copy of the ruby-GNOME2 project

git clone GitHub - ruby-gnome/ruby-gnome: A set of bindings for the GNOME libraries to use from Ruby.

regards

cedlemo

···

On 18/09/2016 09:14, Marvin Gülker wrote

Hi,

On Fri, Sep 16, 2016 at 08:33:03PM +0100, Patrick Bayford wrote:

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

Ruby has Tk bindings in its standard library, but...

I found the Ruby Tk module to be hideously complicated.

...if you think they're too complicated, then there's nothing else for
Tk in Ruby, at least to my knowledge.

Failing that is there any GOOD documentation on Tk for Ruby?

Index of Classes & Methods in tk: Ruby Standard Library Documentation (Ruby 2.3.1) lacks real
documentation as far as I can see, especially there's no introductory
documentation. You could try to figure things out and send a patch to
the Ruby maintainers so that others could profit from your work.

Otherwise, you could try another GUI toolkit. The Gtk bindings for Ruby
are well maintained and do have acceptable documentation:
http://ruby-gnome2.osdn.jp/

Greetings
Marvin

Hi,

···

From: Stefano Crocco <stefano.crocco@alice.it>
Subject: Re: Use of Tk in Ruby
Date: Sun, 18 Sep 2016 10:14:12 +0200
Message-ID: <1577621.aj2DNQIQgT@linux>

There's a tutorial for using tk with a number of languages, including ruby, at
[1].

    (snip)

[1] TkDocs Tutorial

The sample scripts in this tutorial are written in biased coding style only.
For example, most of the scripts uses method calls in the block given to
'new' method for initial configuration of the widget.
However, to configure the property of the existing widget,
the scripts use method.

For example, on tkdocs,
-------------------------------------------------------------
label = Tk::Tile::Label.new(parent) {text 'Full name:'}
-------------------------------------------------------------
But, 'new' method of widget classes can accept initial configurations
as arguments. So, (Ttk a.k.a Tk::Tile)
-------------------------------------------------------------
label = Ttk::Label.new(parent, :text=>'Full name:')
-------------------------------------------------------------
or
-------------------------------------------------------------
label = Tk::Tile::Label.new(parent, text: 'Full name:')
-------------------------------------------------------------
are available.
Those styles may be similar to tkinter.

On tkdocs, a global variable is used for a TkVariable object.
-------------------------------------------------------------
$resultsVar = TkVariable.new
label['textvariable'] = $resultsVar
$resultsVar.value = 'New value to display'
-------------------------------------------------------------
However, for this example, there is no need of a global variable.
All of following styles are available.
-------------------------------------------------------------
label[:textvariable] = TkVariable.new
label.textvariable TkVariable.new
label.textvariable = TkVariable.new
-------------------------------------------------------------
And "label.textvariable" returns the assigned TkVariable object.
-------------------------------------------------------------
v = label.textvariable; v.value = 'New value to display'
-------------------------------------------------------------
or more simply,
-------------------------------------------------------------
label.textvariable.value = 'New value to display'
-------------------------------------------------------------

The another example on tkdocs is
-------------------------------------------------------------
frame = Tk::Tile::Frame.new(parent)
frame['padding'] = '5 10'
-------------------------------------------------------------
But, on Ruby/Tk, an array is acceptable in this case.
-------------------------------------------------------------
frame.padding = [5, 10]
-------------------------------------------------------------
In both cases, "frame.padding" returns an integer array [5, 10].

     I never read all of it because I quickly decided I didn't like tk, but
the tutorial seems well done.

Could you tell us the reason of why you didn't like Tk?
It is important information to make Ruby/Tk better.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

Thanks for that Cedlemo - I am pursuing the Tk route for now, but will make a note of these. For me Gnome sounds less than ideal due to it's reliance on Gnome - most of my programming is done under Windows.

···

On 19/09/2016 2:38 PM, cedlemo wrote:

Hi,

for the ruby-GNOME2 there are a lot of simple examples here:

https://github.com/ruby-gnome2/ruby-gnome2/tree/master/gtk3/sample/misc

You will find a tutorial based on the Gtk+ tutorial here:

ruby-gnome/gtk3/sample/tutorial at master · ruby-gnome/ruby-gnome · GitHub

And we are working on the gtk-demo (some demos still need to be updated)

https://github.com/ruby-gnome2/ruby-gnome2/tree/master/gtk3/sample/gtk-demo

feel free to ask if you have some problems here:

Issues · ruby-gnome/ruby-gnome · GitHub

install gtk3

gem install gtk3

get a local copy of the ruby-GNOME2 project

git clone GitHub - ruby-gnome/ruby-gnome: A set of bindings for the GNOME libraries to use from Ruby.

regards

cedlemo

On 18/09/2016 09:14, Marvin Gülker wrote

Hi,

On Fri, Sep 16, 2016 at 08:33:03PM +0100, Patrick Bayford wrote:

Just finished a small project in Python, that used Tk via the tk.inter
module. Is there anything similar available for Ruby?

Ruby has Tk bindings in its standard library, but...

I found the Ruby Tk module to be hideously complicated.

...if you think they're too complicated, then there's nothing else for
Tk in Ruby, at least to my knowledge.

Failing that is there any GOOD documentation on Tk for Ruby?

http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/index.html lacks real
documentation as far as I can see, especially there's no introductory
documentation. You could try to figure things out and send a patch to
the Ruby maintainers so that others could profit from your work.

Otherwise, you could try another GUI toolkit. The Gtk bindings for Ruby
are well maintained and do have acceptable documentation:
http://ruby-gnome2.osdn.jp/

Greetings
Marvin

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13042 - Release Date: 09/18/16

--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net

Most people who want to know something about Tk in Ruby are going to
take a look into the official Ruby documentation at
http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/index.html, and that
one shows an intimidating amount of classes so that one doesn't really
know where to start. Some other libraries in the ruby stdlib have
useful documentation attached to the outermost namespace module, for
example Net::HTTP or YAML, so the natural first thing to do is to take
a look at the documentation of the Tk module at
http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/Tk.html\. There is no
documentation on that module. If there is documentation available
elsewhere in Ruby's source tree, there should at least be a note on
the documentation of the Tk module itself. At this point, most people
will have concluded there is no official documentation for the Tk
stdlib available and thus will not further consider using the Tk
bindings in the stdlib. I suspect that the impression of complexity
comes from the lack of documentation paired with the intimidating
amount of classes shown on the Tk overview page.

I realise that the amount of classes is totally normal for a GUI
library. ruby-gnome2 does not different in this regard, but they have
introductory documentation that is easy to find, which makes a huge
difference as to the impression of complexity. If I have a map, a
labyrinth is not "complex" anymore.

That made me think about ruby-doc.org in general, but I'm going to
place these thoughts into a new email.

Greetings
Marvin

···

On Tue, Sep 20, 2016 at 02:53:36PM +0900, Hidetoshi NAGAI wrote:

Could you tell us the reason of why you didn't like Tk?
It is important information to make Ruby/Tk better.

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F

I realise that the amount of classes is totally normal for a GUI
library. ruby-gnome2 does not different in this regard, but they have
introductory documentation that is easy to find, which makes a huge
difference as to the impression of complexity. If I have a map, a
labyrinth is not "complex" anymore.

Also: for many people Tk does not appear to be compiled into ruby at all. (FWIW I'm quite comfortable compiling my own Ruby and I have no idea how to fix that for myself.) Perhaps with 2.4.0 taking it out of Stdlib this will change.

All of this is a real shame because the whole Idea of Tk is that it is supposed to be a light, easy, simple GUI wrapper, suitable for beginners. It is in TCL, for which it was originally written. It is, as far as I can tell, for Python.

Does anyone else lament the lack of a simple GUI library for Ruby? There is Shoes (and Shoes isn't exactly Ruby, is it?) but that's it.

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Can I just add that I agree almost entirely with Marvin on this - the documentation available is, I'm sure, comprehensive, but most newbies do not need a full reference manual to start out - they need a structured idea of how the module works. In this respect, the Gnome2/3 documentation is superior.
May I just add a note of caution though - the Gnome documents point out that not all of Gnome's features are implemented in the Ruby gem, since they depend implicitly on the presence of the Gnome library. This could have a profound impact on those masochists, like myself, who use Ruby under Windows!

···

On 20/09/2016 1:11 PM, Marvin Gülker wrote:

On Tue, Sep 20, 2016 at 02:53:36PM +0900, Hidetoshi NAGAI wrote:

Could you tell us the reason of why you didn't like Tk?
It is important information to make Ruby/Tk better.

Most people who want to know something about Tk in Ruby are going to
take a look into the official Ruby documentation at
http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/index.html, and that
one shows an intimidating amount of classes so that one doesn't really
know where to start. Some other libraries in the ruby stdlib have
useful documentation attached to the outermost namespace module, for
example Net::HTTP or YAML, so the natural first thing to do is to take
a look at the documentation of the Tk module at
http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/Tk.html\. There is no
documentation on that module. If there is documentation available
elsewhere in Ruby's source tree, there should at least be a note on
the documentation of the Tk module itself. At this point, most people
will have concluded there is no official documentation for the Tk
stdlib available and thus will not further consider using the Tk
bindings in the stdlib. I suspect that the impression of complexity
comes from the lack of documentation paired with the intimidating
amount of classes shown on the Tk overview page.

I realise that the amount of classes is totally normal for a GUI
library. ruby-gnome2 does not different in this regard, but they have
introductory documentation that is easy to find, which makes a huge
difference as to the impression of complexity. If I have a map, a
labyrinth is not "complex" anymore.

That made me think about ruby-doc.org in general, but I'm going to
place these thoughts into a new email.

Greetings
Marvin

--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net

Hi, Thank you for your reply.

···

From: Marvin Gülker <m-guelker@phoenixmail.de>
Subject: Re: Use of Tk in Ruby
Date: Tue, 20 Sep 2016 14:11:28 +0200
Message-ID: <20160920121128.GA4549@hades.cable.internal.west-ik.de>

Most people who want to know something about Tk in Ruby are going to
take a look into the official Ruby documentation at
Index of Classes & Methods in tk: Ruby Standard Library Documentation (Ruby 2.3.1), and that
one shows an intimidating amount of classes so that one doesn't really
know where to start.

For this purpose, scripts under "<ruby-src>/ext/tk/sample/",
especially "<ruby-src>/ext/tk/sample/demos-en", were developed.

                     Some other libraries in the ruby stdlib have
useful documentation attached to the outermost namespace module, for
example Net::HTTP or YAML, so the natural first thing to do is to take
a look at the documentation of the Tk module at
http://ruby-doc.org/stdlib-2.3.1/libdoc/tk/rdoc/Tk.html\. There is no
documentation on that module. If there is documentation available
elsewhere in Ruby's source tree, there should at least be a note on
the documentation of the Tk module itself. At this point, most people
will have concluded there is no official documentation for the Tk
stdlib available and thus will not further consider using the Tk
bindings in the stdlib. I suspect that the impression of complexity
comes from the lack of documentation paired with the intimidating
amount of classes shown on the Tk overview page.

Do you think that the reason is "the lack of documents"?
Of course, it is a serious problem.
But it doesn't seem to be the reason of "didn't *LIKE* Tk".
I heard that some people said "I hate Tk", "Tk is ugly", and so on.
However, they didn't explain why they thought so.
Some of them criticized Tk based on obsolete knowledge.

In the past, I requested for help to develop the documents of Tk.
And I received many messages despising Tk.
It is too hard for one person, who is poor in English,
to develop all documents of standard Tk (e.g. interpret all documents
at "/usr/share/mann/*" for Ruby/Tk) and functions of Ruby/Tk only.
I couldn't keep the motivation under despite and no help.

I heard many request for removing Tk from the standard libraries,
and no request for keeping Tk in the standard libraries.
So, Ruby/Tk is removed from the latest Ruby's source tree.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

Also: for many people Tk does not appear to be compiled into ruby at
all. (FWIW I'm quite comfortable compiling my own Ruby and I have no
idea how to fix that for myself.)

I haven't tried, but I would say this is not really a problem of Ruby
itself. It is a problem of how people install Ruby. I am not aware of
another programming language whose community focuses so much on
nonstandard installation methods (i.e. RVM rather than the version your
operating system / Linux distribution supplies). If you use what is
supposed to be "standard", i.e. your os vendor's version, I'm pretty
sure Tk is there. I say this because when Ruby was originally developed
and Tk was included, RVM most likely was not yet around. Maybe not even
RubyGems.

Perhaps with 2.4.0 taking it out of Stdlib this will change.

If Tk is taken out of the stdlib anyway, then there's no point in
improving its documentation. It will simply fall into oblivion (as
nobody uses it due to the current lack of documentation) and Ruby
will not have a standard GUI toolkit that is simply there. For simple
desktop applications, using RubyGems should not be required IMO, as I
generally think that simple applications should not need it; I favour a
rich standard library with a defined maintenance policy over a large
community-driven repository. But maybe that's just how it is with Ruby.

All of this is a real shame because the whole Idea of Tk is that it is
supposed to be a light, easy, simple GUI wrapper, suitable for
beginners. It is in TCL, for which it was originally written. It is,
as far as I can tell, for Python.

I have the impression Python is a better language if you don't want too
many external dependencies in simple applications.

Does anyone else lament the lack of a simple GUI library for Ruby?
There is Shoes (and Shoes isn't exactly Ruby, is it?) but that's it.

Sure, but anything that requires separate installation from Ruby itself
cannot be easy by definition. I do not use Ruby anymore when I develop
GUI applications; the community is so focused on web (Rails) stuff that
anything else is starving. I happily use it for some simple (server)
script tasks, thanks to the good standard library, but if that one is
destructed piece by piece -- I was crying when curses was removed --
then I can't continue using it there anyway. I don't want to install
extra gems for my server scripts, installing Ruby itself has to
suffice. As of now, MRI is definitely heading towards a web-only Ruby.

What comes next? Will REXML be removed? Pathname? etc? net/ftp? Why not
just get rid of the stdlib alltogether, so it is over once and for all?

Greetings
Marvin

···

On Tue, Sep 20, 2016 at 04:07:22PM +0000, Andy Jones wrote:

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F

Andy, I also lament the lack of a simple GUI for Ruby - played with Shoes, which has it's limitations. Tk appears to be fine, but is more than a touch tricky to use. This was really the reason for my question in the first place!

···

On 20/09/2016 5:07 PM, Andy Jones wrote:

I realise that the amount of classes is totally normal for a GUI
library. ruby-gnome2 does not different in this regard, but they have
introductory documentation that is easy to find, which makes a huge
difference as to the impression of complexity. If I have a map, a
labyrinth is not "complex" anymore.

Also: for many people Tk does not appear to be compiled into ruby at all. (FWIW I'm quite comfortable compiling my own Ruby and I have no idea how to fix that for myself.) Perhaps with 2.4.0 taking it out of Stdlib this will change.

All of this is a real shame because the whole Idea of Tk is that it is supposed to be a light, easy, simple GUI wrapper, suitable for beginners. It is in TCL, for which it was originally written. It is, as far as I can tell, for Python.

Does anyone else lament the lack of a simple GUI library for Ruby? There is Shoes (and Shoes isn't exactly Ruby, is it?) but that's it.

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2016.0.7797 / Virus Database: 4656/13048 - Release Date: 09/19/16

--
Patrick Bayford Tel : 020 8265 8376 E-mail : pbayford@talktalk.net

Hi,

···

From: Andy Jones <Andy.Jones@jameshall.co.uk>
Subject: RE: Use of Tk in Ruby
Date: Tue, 20 Sep 2016 16:07:22 +0000
Message-ID: <39c4c830d8be4d64bf31a93c96169a3c@EXCH2013MBX.jhallpr.com>

Also: for many people Tk does not appear to be compiled into ruby at all. (FWIW I'm quite comfortable compiling my own Ruby and I have no idea how to fix that for myself.)

If Tcl/Tk sources are included into Ruby sources,
we can avoid the trouble on compilation.
But I think that it is bad to exist 2 versions of Tcl/Tk libraries,
working with and without Ruby.
When only one version of Tcl/Tk libraries on the system,
the Tk extension installed by Tck/Tk's teacup command is
also available on Ruby/Tk.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

For this purpose, scripts under "<ruby-src>/ext/tk/sample/",
especially "<ruby-src>/ext/tk/sample/demos-en", were developed.

I took a look, and the samples do look fairly nice. Here's a link to
them for those who are interested:
<https://github.com/ruby/ruby/tree/ruby_2_3/ext/tk/sample&gt;

Do you think that the reason is "the lack of documents"?
Of course, it is a serious problem.

The samples appear to do a nice job of what I think is needed, but you
need to make people aware that there *are* samples. Not many people are
going to dig around some subdirectory of ext/ in the Ruby sources. After
all, there's a doc/ directory where one would expect normal
documentation, and a sample/ directory where one expects samples. I
wouldn't have looked inside ext/ for example. Other parts of the stdlib
have samples inside the sample/ directory at the toplevel (for example
logger and openssl), why is Tk different in this regard?

Also, just as I said, there needs to be a notice of where to find these
samples in the documentation of the Tk module itself. Even if it's just
as simple as this:

There is a comprehensive list of examples available for how to use Tk
with Ruby. You can find these in the ext/tk/sample directory of the
Ruby source tree.

But it doesn't seem to be the reason of "didn't *LIKE* Tk".
I heard that some people said "I hate Tk", "Tk is ugly", and so on.
However, they didn't explain why they thought so.
Some of them criticized Tk based on obsolete knowledge.

Especially on Windows, Tk *was* ugly for a long time; here's a message
from 2001 (!) mourning about it:
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/22627&gt;\. I
last tried with Ruby 1.9.something, so I can't say whether it has
improved by now or not. The GUIs it created looked Win95-style and thus
totally out of place on Windows, where they should have used the same
modern styling (like Aero on Win7) like all other applications. This is
a problem with how Windows handles GUI styling as one has to compile in
a special RC resource file into the .exe if I remember correctly, but a
simple GUI library is supposed to take care of that for me. This is
difficult for a scripting language, as ruby.exe itself would have to be
compiled with that RC file build in, but maybe there's a way to load an
RC file later at runtime. That's something a developer more firm in
Windows development than me has to figure out, though.

If Ruby's Tk bindings by now have overcome this problem, then simply
ignore the above paragraph as obsolete. But the impression it left lives
on in the Ruby community, most likely because most Ruby developers only
occasionally touch Windows to verify whether things have changed since
they last tried some years ago. To destroy such an effect, a notice
could be added to the documentation of the Tk module that explicitely
says "Since Ruby 2.1.0 [or whenever it was fixed] Tk on Windows displays
using the native Windows styling (like Aero on Win7). Any rumours that
say it looks like Win95 are OBSOLETE.".

In the past, I requested for help to develop the documents of Tk.
And I received many messages despising Tk.

That is a shame. In my responses here on this list I have tried to give
constructive feedback, as should everyone do. It is not okay to call a
library bad and give no reasons. Who does that should simply not use
it and shut up. Feedback should give an opportunity to improve the
library.

The question around Ruby Tk documentation is not new. It came up as
early as 2005:

* <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/138166&gt;
* <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/171926&gt;

Eventually someone jumped up and created <http://www.tkdocs.com>. It was
announced here on Ruby-Talk (I've seen the message when searching on
blade, but for some reason I can't find it now anymore).

It is too hard for one person, who is poor in English,
to develop all documents of standard Tk (e.g. interpret all documents
at "/usr/share/mann/*" for Ruby/Tk) and functions of Ruby/Tk only.
I couldn't keep the motivation under despite and no help.

I totally understand that. You are seeing what I have said in my
other message: The Ruby community is focused almost entirely on web
development. Unless someone reading this thread is willing to take this
over, bring Tk up to date and fix the documentation problems -- ideally
multiple persons --, then it is probably right to remove it from the
stdlib, albeit it makes Ruby poorer. As of now, Ruby is not the right
language to write a Windows GUI in. ruby-gnome2 is a nice project, well
maintained and well documented, but it requires installation not only of
Ruby, but also of some gems and especially on Windows of Gtk+. It's okay
if your GUI only targets Linux systems, but beyond that it gets
complicated. My GUIs usually need to be crossplattform (I try to avoid
writing Windows-only programs where possible, even if that was
requested), which has made me switch to C++ for GUIs, usually with
wxWidgets. wxRuby is dead, and the replacement library
(<https://github.com/hanmac/rwx&gt;\) is far from finished and has no docs.

I heard many request for removing Tk from the standard libraries,
and no request for keeping Tk in the standard libraries.
So, Ruby/Tk is removed from the latest Ruby's source tree.

A web developer doesn't need a GUI library. SCNR.

Marvin

···

On Wed, Sep 21, 2016 at 03:35:38AM +0900, Hidetoshi NAGAI wrote:

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F

For this purpose, scripts under "<ruby-src>/ext/tk/sample/",
especially "<ruby-src>/ext/tk/sample/demos-en", were developed.

those samples are great but they are wanting "user/beginner
friendliness". As a start, maybe we can classify the samples from
beginner, intermediate, to advanced level. We can also classify them
as per function, like shell, or utility, or clock, etc.
The page should also layout the actual codes for immediate preview.
It would be nice to have a copy to clipboard fxn too.

But it doesn't seem to be the reason of "didn't *LIKE* Tk".
I heard that some people said "I hate Tk", "Tk is ugly", and so on.
However, they didn't explain why they thought so.
Some of them criticized Tk based on obsolete knowledge.

I would not mind them. But I would mind if ruby-tk itself is not
ruby-ish in it's interfaces. We love ruby, and we expect
gems/libraries to follow ruby styles/way too.

So, Ruby/Tk is removed from the latest Ruby's source tree.

that is ok. It's just a "gem install tk" away.
Maybe, we can move a step more, maybe if tk is not found, we give
option to user that the gem will install tk for them (i usually find
beginners having difficulty installing tk).

--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

yes, big fan here of Tk+NaHi combo : )

best regards,
--botp

···

On Wed, Sep 21, 2016 at 2:35 AM, Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp> wrote:

Not sure if it's relevant to this thread but RubyMotion is worth a try (on a Mac).

···

Sent from my iPhone. Pardon brevity and possible typos.

On Sep 20, 2016, at 9:40 AM, Marvin Gülker <m-guelker@phoenixmail.de> wrote:

On Tue, Sep 20, 2016 at 04:07:22PM +0000, Andy Jones wrote:
Also: for many people Tk does not appear to be compiled into ruby at
all. (FWIW I'm quite comfortable compiling my own Ruby and I have no
idea how to fix that for myself.)

I haven't tried, but I would say this is not really a problem of Ruby
itself. It is a problem of how people install Ruby. I am not aware of
another programming language whose community focuses so much on
nonstandard installation methods (i.e. RVM rather than the version your
operating system / Linux distribution supplies). If you use what is
supposed to be "standard", i.e. your os vendor's version, I'm pretty
sure Tk is there. I say this because when Ruby was originally developed
and Tk was included, RVM most likely was not yet around. Maybe not even
RubyGems.

Perhaps with 2.4.0 taking it out of Stdlib this will change.

If Tk is taken out of the stdlib anyway, then there's no point in
improving its documentation. It will simply fall into oblivion (as
nobody uses it due to the current lack of documentation) and Ruby
will not have a standard GUI toolkit that is simply there. For simple
desktop applications, using RubyGems should not be required IMO, as I
generally think that simple applications should not need it; I favour a
rich standard library with a defined maintenance policy over a large
community-driven repository. But maybe that's just how it is with Ruby.

All of this is a real shame because the whole Idea of Tk is that it is
supposed to be a light, easy, simple GUI wrapper, suitable for
beginners. It is in TCL, for which it was originally written. It is,
as far as I can tell, for Python.

I have the impression Python is a better language if you don't want too
many external dependencies in simple applications.

Does anyone else lament the lack of a simple GUI library for Ruby?
There is Shoes (and Shoes isn't exactly Ruby, is it?) but that's it.

Sure, but anything that requires separate installation from Ruby itself
cannot be easy by definition. I do not use Ruby anymore when I develop
GUI applications; the community is so focused on web (Rails) stuff that
anything else is starving. I happily use it for some simple (server)
script tasks, thanks to the good standard library, but if that one is
destructed piece by piece -- I was crying when curses was removed --
then I can't continue using it there anyway. I don't want to install
extra gems for my server scripts, installing Ruby itself has to
suffice. As of now, MRI is definitely heading towards a web-only Ruby.

What comes next? Will REXML be removed? Pathname? etc? net/ftp? Why not
just get rid of the stdlib alltogether, so it is over once and for all?

Greetings
Marvin

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

I haven't tried, but I would say this is not really a problem of Ruby
itself. It is a problem of how people install Ruby.

For the record:

* Linux
* No RVM/rbenv etc
* TCL/Tk installed plus all the '-dev' packages I can find
* Compiling ruby from source using the instructions on the site.
* Ruby Tk not working.

I don't think this is a problem with the Ruby code or with how people install Ruby per se. It's a problem with the *documentation*. No doubt I am missing some subtle step or dependency that ./configure isn't reporting to me in a way that I can understand.

Still, if only a handful of people are interested in using Ruby for anything other than web back end, I suppose that's what you get? Ah well.

Click here to view Company Information and Confidentiality Notice.<http://www.jameshall.co.uk/index.php/small-print/email-disclaimer&gt;

* Compiling ruby from source using the instructions on the site.

Including those that deal specifically with Tk?

* ruby/ext/tk/README.1st at ruby_2_3 · ruby/ruby · GitHub

Just sayin', I have not tried to compile it myself.

I don't think this is a problem with the Ruby code or with how people
install Ruby per se. It's a problem with the *documentation*. No
doubt I am missing some subtle step or dependency that ./configure
isn't reporting to me in a way that I can understand.

The Ruby developers are no native English speakers, so it is difficult
for them to write English documentation. If anyone figures out how to
compile it properly, please send a patch to them that improves the
documentation. (Unless Tk is removed anyway)

Greetings
Marvin

···

On Wed, Sep 21, 2016 at 08:15:19AM +0000, Andy Jones wrote:

--
Blog: http://www.guelkerdev.de
PGP/GPG ID: F1D8799FBCC8BC4F