Feature #8539

Unbundle ext/tk

Added by Yui NARUSE 10 months ago. Updated 3 months ago.

[ruby-core:55530]
Status:Open
Priority:Normal
Assignee:-
Category:ext
Target version:current: 2.2.0

Description

How about unbundling ext/tk from Ruby repository?

ext/tk is a bundled extension library for GUI programming with tk.
It is introduced in 1999 and long maintained with CRuby itself.

But nowadays its maintenance is not so active.
Moreover ext/tk is not the de facto standard over Ruby GUI though it is bundled for 14 years.
(maybe because tk is not de facto of GUI toolkit)
GUI libraries for Ruby should compete in the wilds.

So I propose unbundling ext/tk.
It should be another repository for example on github and people should install it as gem.

How do you think?


Related issues

Duplicates ruby-trunk - Feature #8526: Removing tk from Ruby repository(ja) Open 06/14/2013

History

#1 Updated by Rodrigo Rosenfeld Rosas 10 months ago

I believe it is interesting to have at least one lightweight GUI framework bundled with Ruby to allow simple scripting to happen without the need for end-users to have to perform additional steps besides installing Ruby, just like it happens with the JVM...

Having said that, I have really never used Tk before or done anything but experiments on GUI using Ruby, so I wouldn't be upset if it is removed from Ruby. It's just that I can understand that some people would appreciate some built-in GUI support bundled with Ruby itself...

#2 Updated by Boris Stitnicky 10 months ago

+1

#3 Updated by Matthew Kerwin 10 months ago

+1
On Jun 18, 2013 1:25 AM, "naruse (Yui NARUSE)" naruse@airemix.jp wrote:

Issue #8539 has been reported by naruse (Yui NARUSE).


Feature #8539: Unbundle ext/tk
https://bugs.ruby-lang.org/issues/8539

Author: naruse (Yui NARUSE)
Status: Open
Priority: Normal
Assignee:
Category: ext
Target version: current: 2.1.0

How about unbundling ext/tk from Ruby repository?

ext/tk is a bundled extension library for GUI programming with tk.
It is introduced in 1999 and long maintained with CRuby itself.

But nowadays its maintenance is not so active.
Moreover ext/tk is not the de facto standard over Ruby GUI though it is
bundled for 14 years.
(maybe because tk is not de facto of GUI toolkit)
GUI libraries for Ruby should compete in the wilds.

So I propose unbundling ext/tk.
It should be another repository for example on github and people should
install it as gem.

How do you think?

http://bugs.ruby-lang.org/

#4 Updated by Jon Forums 10 months ago

A good idea if the new maintainer appreciates (and understands why great multi-platform support is strategic to Ruby the language) the fine cross-platform work Kou and the other Ruby-GNOME2 members do for the gtk2 gem by providing a self-contained mingw binary gem for MRI Windows users.

But, how embarrassing for MRI if it's Tk GUI toolkit gem was kinda-sorta-not-really-multi-platform and only supported, say, Linux and OS X.

Is the key issue bit rot (Tcl/Tk 8.6.0 released in 12/2012) in core, or something more strategic like continued interest in pushing as many extensions from core into gems?

#5 Updated by Yui NARUSE 10 months ago

jonforums (Jon Forums) wrote:

A good idea if the new maintainer appreciates (and understands why great multi-platform support is strategic to Ruby the language) the fine cross-platform work Kou and the other Ruby-GNOME2 members do for the gtk2 gem by providing a self-contained mingw binary gem for MRI Windows users.

But, how embarrassing for MRI if it's Tk GUI toolkit gem was kinda-sorta-not-really-multi-platform and only supported, say, Linux and OS X.

As far as I understand, people can also use Ruby/Tk on Windows if they install Tcl/Tk for Windows.
And on OS X (and Linux) people also need to install Tcl/Tk and X11.

Is the key issue bit rot (Tcl/Tk 8.6.0 released in 12/2012) in core, or something more strategic like continued interest in pushing as many extensions from core into gems?

Once we had an idea that Ruby distribution should be all-in-one package for every basic use caeses as rosenfeld says in .
But now we have rubygems and it is good for libraries which is on different timeline.
Therefore we have such reactions.

#6 Updated by Jon Forums 10 months ago

naruse (Yui NARUSE) wrote:

jonforums (Jon Forums) wrote:

A good idea if the new maintainer appreciates (and understands why great multi-platform support is strategic to Ruby the language) the fine cross-platform work Kou and the other Ruby-GNOME2 members do for the gtk2 gem by providing a self-contained mingw binary gem for MRI Windows users.

But, how embarrassing for MRI if it's Tk GUI toolkit gem was kinda-sorta-not-really-multi-platform and only supported, say, Linux and OS X.

As far as I understand, people can also use Ruby/Tk on Windows if they install Tcl/Tk for Windows.
And on OS X (and Linux) people also need to install Tcl/Tk and X11.

Yes, and the Tcl/Tk folks have made it easy to automate downloading and building the Tcl/Tk libraries on Windows (using MSYS/mingw environment)for use by ext/tk. For example:

https://github.com/jonforums/buildlets/blob/master/build_tcltk.ps1

The remaining issue on Windows is to ensure the built Tcl/Tk goodies are moved (install time) to correct filesystem locations and patch up for library dirs like we do with RubyInstaller:

https://github.com/oneclick/rubyinstaller/blob/master/resources/patches/tk/0002-Use-Tcl-Tk-from-different-directory.diff

As background, RubyInstaller users wanting Tk support select the feature during install time. I placed a checkbox in the installer GUI that controls whether pre-built Tcl/Tk artifacts (integrated in the installer) are installed into a lib/tcltk subdir of the user's Ruby install dir. None of this matters for Linux or OS X, but this ease-of-install capability is critical to ensure Windows users have a good experience with Ruby Tk, and we're not flooded with support/maintenance issues.

Is the key issue bit rot (Tcl/Tk 8.6.0 released in 12/2012) in core, or something more strategic like continued interest in pushing as many extensions from core into gems?

Once we had an idea that Ruby distribution should be all-in-one package for every basic use caeses as rosenfeld says in .
But now we have rubygems and it is good for libraries which is on different timeline.
Therefore we have such reactions.

I very much support extracting ext/tk into a gem as long as (a) no user loses access to cross-platform Tk GUI functionality, and (b) the gem install for Windows users is as easy as it is with the gtk2 mingw binary gem.

#7 Updated by Yui NARUSE 10 months ago

jonforums (Jon Forums) wrote:

naruse (Yui NARUSE) wrote:

jonforums (Jon Forums) wrote:

Is the key issue bit rot (Tcl/Tk 8.6.0 released in 12/2012) in core, or something more strategic like continued interest in pushing as many extensions from core into gems?

Once we had an idea that Ruby distribution should be all-in-one package for every basic use caeses as rosenfeld says in .
But now we have rubygems and it is good for libraries which is on different timeline.
Therefore we have such reactions.

I very much support extracting ext/tk into a gem as long as (a) no user loses access to cross-platform Tk GUI functionality, and (b) the gem install for Windows users is as easy as it is with the gtk2 mingw binary gem.

(a) normal gemify would do it
(b) if someone make binary gem, or add install-time downloading tk feature, or Rubyinstaller bundle tk binary gem

#8 Updated by Hidetoshi Nagai 10 months ago

From: "naruse (Yui NARUSE)" naruse@airemix.jp
Subject: [ruby-trunk - Feature #8539] Unbundle ext/tk
Date: Tue, 18 Jun 2013 10:20:30 +0900
Message-ID: redmine.journal-40021.20130618102029@ruby-lang.org

And on OS X (and Linux) people also need to install Tcl/Tk and X11.

Additional information.
Ruby/Tk supports Aqua version (without X11) of Tk on OS X.
At least a few years ago, it worked.
However, I don't know whether it works now, because I'm not a Mac user.
It is very hard that I know all troubles on each change of Ruby, Tcl/Tk,
operating system, and so on, without users' reports.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

#9 Updated by Hiroshi SHIBATA 3 months ago

  • Target version changed from 2.1.0 to current: 2.2.0

Also available in: Atom PDF