# Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)?

**URL:** <https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861>\
**Category:** ruby-talk\
**Created:** [2 August 2004 18:01 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861 "2004-08-02T18:01:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![H\_Simpson](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@H\_Simpson](https://rubytalk.org/u/H_Simpson)\
**Post date:** [2 August 2004 18:01 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861/1 "2004-08-02T18:01:35Z")

</div>

Hi,

Why does Ruby (on windows) use both tcl83.dll and tk83.dll (instead of just tk83.dll)?

Does tk require tcl? I thought tk was simply a c api...

Thanks.

---

<div class="post-metadata">

**Author:** ![Mike\_Hall4](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@Mike\_Hall4](https://rubytalk.org/u/Mike_Hall4)\
**Post date:** [2 August 2004 19:21 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861/2 "2004-08-02T19:21:34Z")

</div>

H. Simpson wrote:

> Does tk require tcl?

Absolutely. Tk operations and events are scripted in Tcl.  
Look for a 'Scripts' directory under your Tk installation.  
Much of the behaviour of buttons, listboxes, menus, and dialogs  
is done with Tcl.

> I thought tk was simply a c api...

It very well may be... for Tcl! 🙂

---

<div class="post-metadata">

**Author:** ![H\_Simpson](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@H\_Simpson](https://rubytalk.org/u/H_Simpson)\
**Post date:** [3 August 2004 03:21 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861/3 "2004-08-03T03:21:34Z")

</div>

Mike Hall wrote:

> H. Simpson wrote:
> 
> > Does tk require tcl?
> 
> Absolutely. Tk operations and events are scripted in Tcl.  
> Look for a 'Scripts' directory under your Tk installation.  
> Much of the behaviour of buttons, listboxes, menus, and dialogs  
> is done with Tcl.
> 
> > I thought tk was simply a c api...
> 
> It very well may be... for Tcl! 🙂

Seems that perl-tk somehow removed the Tcl part of Tk.

Hmmm. The compiled part of that project might be useful for other languages (like c/c++ or Ruby) to directly use Tk without the overhead+benefits of Tcl.

---

<div class="post-metadata">

**Author:** ![Hidetoshi\_NAGAI](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@Hidetoshi\_NAGAI](https://rubytalk.org/u/Hidetoshi_NAGAI)\
**Post date:** [3 August 2004 06:53 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861/4 "2004-08-03T06:53:46Z")

</div>

Hi,

> **···**
>
> From: "H. Simpson" \<nospam@asdlkfjhasldkjfsadlfhskadjfahsldfks.com\>  
> Subject: Re: Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)?  
> Date: Tue, 3 Aug 2004 12:21:34 +0900  
> Message-ID: \<jqDPc.2438$hI.751970@newssvr28.news.prodigy.com\>
> 
> > Seems that perl-tk somehow removed the Tcl part of Tk.
> 
> That is a 'ptk' library. It's similar but NOT same as a 'Tk'  
> library, I think. If linking 'ptk', it should be called 'Ruby/ptk'.
> 
> # I never oppose the creation of 'Ruby/ptk'.
> 
> > Hmmm. The compiled part of that project might be useful for other  
> > languages (like c/c++ or Ruby) to directly use Tk without the  
> > overhead+benefits of Tcl.
> 
> I think the overhead is not serious, because almost all part of  
> Ruby/Tk don't depend on Tcl's command line parser.  
> Maybe, the cost for converting Ruby/Tk's arguments to Tcl/Tk's  
> arguments is heavier than the overhead.  
> If you cannot accept the cost, you can bypass the converting step  
> in the bottle neck part (Please check ext/tcltklib/demo/lines?.rb).
> 
> I hate losing the benefits rather than accepting the overhead.  
> I'm advocating that the merits of using pure Tcl/Tk libraries are
> 
> (1) you can use the newest features at the same time of the new  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tcl/Tk release, and
> 
> (2) you can use almost all of Tcl/Tk extensions under Ruby/Tk.
> 
> By this reason, I'll not replace Tcl/Tk libraries to ptk libraries.
> 
> To receive the second merit, Ruby 1.8.2 includes the wrapper libraries  
> for some Tcl/Tk extensions (e.g. Tcllib, IWidgets, BWidgets, TkTable,  
> vu, and so on; see ext/tk/lib/tkextlib/SUPPORT\_STATUS). Of course,  
> to use those libraries, those extensions must work on your Tcl/Tk.
> 
> However, many of current target extensions of the wrappers are  
> included the ActiveTcl binary package (see [http://www.tcl.tk/](http://www.tcl.tk/) and  
> [http://www.activestate.com/Products/ActiveTcl/\](http://www.activestate.com/Products/ActiveTcl/%5C)).  
> If your tcltklib.so is compiled with libraries of the ActiveTcl  
> package, you can use those extensions (charts, tables, calendar,  
> tree, tab-note, and so on) with those wrappers.  
> --  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

---

<div class="post-metadata">

**Author:** ![H\_Simpson](https://avatars.discourse-cdn.com/v4/letter/h/6bbea6/32.png) [@H\_Simpson](https://rubytalk.org/u/H_Simpson)\
**Post date:** [3 August 2004 16:51 UTC](https://rubytalk.org/t/why-does-ruby-use-both-tcl83-dll-and-tk83-dll-instead-of-just-tk83-dll/12861/5 "2004-08-03T16:51:34Z")

</div>

Hidetoshi NAGAI wrote:

> Hi,
> 
> From: "H. Simpson" \<nospam@asdlkfjhasldkjfsadlfhskadjfahsldfks.com\>  
> Subject: Re: Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)?  
> Date: Tue, 3 Aug 2004 12:21:34 +0900  
> Message-ID: \<jqDPc.2438$hI.751970@newssvr28.news.prodigy.com\>
> 
> > Seems that perl-tk somehow removed the Tcl part of Tk.
> 
> That is a 'ptk' library. It's similar but NOT same as a 'Tk' library, I think. If linking 'ptk', it should be called 'Ruby/ptk'.
> 
> # I never oppose the creation of 'Ruby/ptk'.
> 
> > Hmmm. The compiled part of that project might be useful for other languages (like c/c++ or Ruby) to directly use Tk without the overhead+benefits of Tcl.
> 
> I think the overhead is not serious, because almost all part of  
> Ruby/Tk don't depend on Tcl's command line parser. Maybe, the cost for converting Ruby/Tk's arguments to Tcl/Tk's arguments is heavier than the overhead. If you cannot accept the cost, you can bypass the converting step  
> in the bottle neck part (Please check ext/tcltklib/demo/lines?.rb).
> 
> I hate losing the benefits rather than accepting the overhead. I'm advocating that the merits of using pure Tcl/Tk libraries are
> 
> (1) you can use the newest features at the same time of the new Tcl/Tk release, and
> 
> (2) you can use almost all of Tcl/Tk extensions under Ruby/Tk.
> 
> By this reason, I'll not replace Tcl/Tk libraries to ptk libraries.
> 
> To receive the second merit, Ruby 1.8.2 includes the wrapper libraries  
> for some Tcl/Tk extensions (e.g. Tcllib, IWidgets, BWidgets, TkTable, vu, and so on; see ext/tk/lib/tkextlib/SUPPORT\_STATUS). Of course, to use those libraries, those extensions must work on your Tcl/Tk.
> 
> However, many of current target extensions of the wrappers are included the ActiveTcl binary package (see [http://www.tcl.tk/](http://www.tcl.tk/) and [http://www.activestate.com/Products/ActiveTcl/\](http://www.activestate.com/Products/ActiveTcl/%5C)). If your tcltklib.so is compiled with libraries of the ActiveTcl  
> package, you can use those extensions (charts, tables, calendar, tree, tab-note, and so on) with those wrappers.

I see! Thanks for explaining. The BWidgets look really nice so I'm glad you took that approach rather than something like ptk.
