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

Discussion in 'Ruby' started by H. Simpson, Aug 2, 2004.

  1. H. Simpson

    H. Simpson Guest

    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.
    H. Simpson, Aug 2, 2004
    #1
    1. Advertising

  2. H. Simpson

    Mike Hall Guest

    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! :)
    Mike Hall, Aug 2, 2004
    #2
    1. Advertising

  3. H. Simpson

    H. Simpson Guest

    Re: Why does Ruby use both tcl83.dll and tk83.dll (instead of justtk83.dll)?

    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.
    H. Simpson, Aug 3, 2004
    #3
  4. Re: Why does Ruby use both tcl83.dll and tk83.dll (instead of justtk83.dll)?

    Hi,

    From: "H. Simpson" <>
    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$>
    > 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/ and
    http://www.activestate.com/Products/ActiveTcl/).
    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.
    --
    Hidetoshi NAGAI ()
    Hidetoshi NAGAI, Aug 3, 2004
    #4
  5. H. Simpson

    H. Simpson Guest

    Re: Why does Ruby use both tcl83.dll and tk83.dll (instead of justtk83.dll)?

    Hidetoshi NAGAI wrote:
    > Hi,
    >
    > From: "H. Simpson" <>
    > 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$>
    >
    >>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/ and
    > http://www.activestate.com/Products/ActiveTcl/).
    > 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.
    H. Simpson, Aug 3, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steven Bethard
    Replies:
    8
    Views:
    387
    Nick Coghlan
    Jan 5, 2005
  2. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,763
    Smokey Grindel
    Dec 2, 2006
  3. Replies:
    27
    Views:
    518
    Neil Cerutti
    Apr 25, 2007
  4. martin f krafft
    Replies:
    1
    Views:
    320
    Marc 'BlackJack' Rintsch
    Mar 17, 2008
  5. ABCL
    Replies:
    0
    Views:
    527
Loading...

Share This Page