Is it possible to run Tcl from Ruby?

Is it possible to integrate Ruby with Tcl such that Tcl frontend and Tk
backend???

Subject: Is it possible to run Tcl from Ruby?
Date: mar 12 mar 13 06:20:05 +0900

Quoting Ishaan B. ([email protected]):

Is it possible to integrate Ruby with Tcl such that Tcl frontend and Tk
backend???

Tcl/TK support is included in Ruby from the beginning. I never used it
personally, but if you google around you will find several
resources. For example, a multi-language tutorial:

Carlo

Subject: Re: Is it possible to run Tcl from Ruby?
Date: mar 12 mar 13 06:32:48 +0900

Quoting Ishaan B. ([email protected]):

Thanks Carlo but I wanted to run Tcl scripts without the usage of Tk.

Am planning to store and retreive Tcl data from Ruby database

Umm… Would opening a pipe with tclsh solve your problem? See

ri IO::pipe

Carlo

From: “Ishaan B.” [email protected]
Subject: Re: Is it possible to run Tcl from Ruby?
Date: Tue, 12 Mar 2013 18:32:48 +0900
Message-ID: [email protected]

Thanks Carlo but I wanted to run Tcl scripts without the usage of Tk.
Am planning to store and retreive Tcl data from Ruby database

Please use tcltklib and tkutil directly.
For example,

require ‘tcltklib’
require ‘tkutil’

interp = TclTkIp.new(nil, nil)
ret = interp._eval(“source hoge.tcl”)
ret = interp._invoke(“source”, “hoge.tcl”)
ret = interp._invoke(‘lsort’, TkUtil._get_eval_string([3,1,2]))
p interp._split_tklist(ret)

Thanks Carlo but I wanted to run Tcl scripts without the usage of Tk.

Am planning to store and retreive Tcl data from Ruby database