(just wanted to document this; self-answer to follow)
I just found Visual REGEXP : a graphical explorer for your regexps, which is a Tck/Tk application, so I wanted to try it on Ubuntu 11.04 natty.
First I tried that 3.0 version:
$ wget http://laurent.riesterer.free.fr/regexp/visual_regexp-3.0.tar.gz
$ tar xzvf visual_regexp-3.0.tar.gz
$ cd visual_regexp-3.0/
$ ./visual_regexp.tcl
./visual_regexp.tcl: 48: Syntax error: word unexpected (expecting ")")
$ bash visual_regexp.tcl
visual_regexp.tcl: line 48: syntax error near unexpected token `platform'
visual_regexp.tcl: line 48: `if {$tcl_platform(platform) == "windows"} {'
$ sh visual_regexp.tcl
visual_regexp.tcl: 48: Syntax error: word unexpected (expecting ")")
$ tclsh visual_regexp.tcl
0
invalid command name "toplevel"
while executing
"toplevel .history"
(procedure "regexp::history:init" line 5)
invoked from within
"regexp::history:init"
(file "visual_regexp.tcl" line 1080)
$ wish visual_regexp.tcl # finally works
$ readlink -f $(which wish)
/usr/bin/wish8.4
$ wish8.5 visual_regexp.tcl # works too, better fonts
$ cd ..
OK, so now I want to try the 3.1 version:
$ wget http://laurent.riesterer.free.fr/regexp/visual_regexp-3.1.tcl
$ wish8.4 visual_regexp-3.1.tcl
Error in startup script: can't find package starkit
while executing
"package require starkit"
(file "visual_regexp-3.1.tcl" line 1)
$ tclsh visual_regexp-3.1.tcl
can't find package starkit
while executing
"package require starkit"
(file "visual_regexp-3.1.tcl" line 1)
Looking for this error, the most relevant hits I can find are:
STEP 1: Get Tclkit and sdx
[...]
If this command responds with the error "can't find package starkit" then you need to add read permissions to your tclkit binary. On UNIX/Linux type systems, this would be via: chmod u+r tclkit
Ok ... first I thought there is an Ubuntu package for this tclkit
, but couldn't find one; and so ended up doing this:
$ wget http://tclkit.googlecode.com/files/tclkit-8.5.9-linux-ix86.gz
$ gzip -d tclkit-*.gz
$ chmod +x tclkit-8.5.9-linux-ix86
$ sudo ln -s $(readlink -f ./tclkit-8.5.9-linux-ix86) /usr/bin/
$ which tclkit
/usr/bin/tclkit
$
$ wget http://tclkit.googlecode.com/files/sdx-20110317.kit
$ chmod +x sdx-20110317.kit
$ sudo ln -s $(readlink -f ./sdx-20110317.kit) /usr/bin/sdx.kit
$ which sdx.kit
/usr/bin/sdx.kit
$ tclkit sdx.kit
couldn't read file "sdx.kit": no such file or directory
$ tclkit $(which sdx.kit)
Specify one of the following commands:
addtoc eval fetch ftpd httpd httpdist ls lsk md5sum mkinfo mkpack mkshow mksplit mkzipkit qwrap ratarx rexecd starsync sync tgz2kit treetime unwrap update version wrap
For more information, type: /usr/bin/sdx.kit help ?command?
$ tclkit visual_regexp-3.1.tcl
0
invalid command name "toplevel"
while executing
"toplevel .history"
(procedure "regexp::history:init" line 5)
invoked from within
"regexp::history:init"
(file "visual_regexp-3.1.tcl" line 1510)
$ wish8.4 visual_regexp-3.1.tcl
Error in startup script: can't find package starkit
while executing
"package require starkit"
(file "visual_regexp-3.1.tcl" line 1)
$ tclsh visual_regexp-3.1.tcl
can't find package starkit
while executing
"package require starkit"
(file "visual_regexp-3.1.tcl" line 1)
So, apparently I got tclkit
and sdx.kit
running - but still I cannot visual_regexp-3.1.tcl
to run? How do I get to run this on Ubuntu?
Answer: the missing thing was the
tclvfs
package.Namely, after all that, I tried looking up
visual_regexp-3.1.tcl
- and realized there is an Ubuntu package for it. So I didAfter this, both
visual-regexp
works fine, andwish8.5 visual_regexp-3.1.tcl
; however, note thatvisual_regexp-3.1.tcl
doesn't work withwish8.4
:Finally, note that
visual_regexp-3.1.tcl
apparently is still marked as 3.0: