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>
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>\. 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>
* <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/171926>
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>\) 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