• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Question for Programming and Webmastering Readers

I wouldn't be of any help, as I'm just a hack.

I do like tk because tcl/tk is already on most
all Linux distros (except for the custom ones Gentoo, Arch, LFS, etc...).

I've managed to use tk with tcl, perl and python, but it does
look different on different distros. For example, the listbox
and textbox were the same vertical size when I created that tcl/tk script
a while back on Gentoo, but other distros show them as different sizes.

Gtk+, Qt and wxWidgets are available, but who wants to install multiple
graphic libraries to try out a little script (I wouldn't), so I'll stick w/ tk for now.

You mentioned ncurses which is great for scripting, but that won't satisfy
the new GUI Linux user, who has heard of the shell, but never bothered with it. :laugh:
 
I wouldn't be of any help, as I'm just a hack.

I do like tk because tcl/tk is already on most
all Linux distros (except for the custom ones Gentoo, Arch, LFS, etc...).

I've managed to use tk with tcl, perl and python, but it does
look different on different distros. For example, the listbox
and textbox were the same vertical size when I created that tcl/tk script
a while back on Gentoo, but other distros show them as different sizes.

Gtk+, Qt and wxWidgets are available, but who wants to install multiple
graphic libraries to try out a little script (I wouldn't), so I'll stick w/ tk for now.

You mentioned ncurses which is great for scripting, but that won't satisfy
the new GUI Linux user, who has heard of the shell, but never bothered with it. :laugh:

Just a hack? :laugh: You don't give yourself enough credit.

Haven't gotten far enough yet to know for sure myself, but could you explicitly specify the vertical size?

Tk is more than suffice as I've been reading, you just have to know how to use it.

Thanks for reminding me of when I first started with a shell....VERY good point!
 
Last edited:
test.tcl:
Code:
set key "54636c2077696c6c206e65766120646965206a3030206630306c7a21204c4f4c21";puts [subst [regsub -all -nocase {([0-9a-f][0-9a-f])} $key {[format %c 0x\1]} ]]

$ tclsh test.tcl

:laugh:
 
Last edited:
Haven't gotten far enough yet to know for sure myself, but could you explicitly specify the vertical size?
Yes but I chose to use pack for a layout manager and to fill it up on a Frame.
I'm sure there is a way using .pack(), I'll look into it.


test.tcl:
Code:
set key "54636c2077696c6c206e65766120646965206a3030206630306c7a21204c4f4c21";puts [subst [regsub -all -nocase {([0-9a-f][0-9a-f])} $key {[format %c 0x\1]} ]]

$ tclsh test.tcl

:laugh:
Yes it will never die :laugh:

Do you have this??
Code:
#!/usr/bin/tclsh
	 
package require http
	 
set url http://www.this-page-intentionally-left-blank.org/comments.html;
	 
set http [::http::geturl $url];
set var_html [::http::data $http];

regsub -all { people} $var_html {} var_html
set var_line1 [string first {I t} $var_html];
set var_start $var_line1;
set var_line2 [string first {way</} $var_html];
set var_end $var_line2-23;
puts [string range $var_html $var_start $var_end];
:laugh:
 
Yes but I chose to use pack for a layout manager and to fill it up on a Frame.
I'm sure there is a way using .pack(), I'll look into it.



Yes it will never die :laugh:

Do you have this??
Code:
#!/usr/bin/tclsh
	 
package require http
	 
set url http://www.this-page-intentionally-left-blank.org/comments.html;
	 
set http [::http::geturl $url];
set var_html [::http::data $http];

regsub -all { people} $var_html {} var_html
set var_line1 [string first {I t} $var_html];
set var_start $var_line1;
set var_line2 [string first {way</} $var_html];
set var_end $var_line2-23;
puts [string range $var_html $var_start $var_end];
:laugh:

I just stopped at regular expressions in my second tutorial this morning, so I am still learning just Tcl. I would love to jump ahead, but I'm moving fast enough.

I think regular expressions was somewhere around chapter 20 something In my C++ book. I don't remember reading about it in my C bible, but that was soooo long ago.

I reached regular expressions in less than 10 hours with this language :laugh:

And yes, what it outputs to the console is very true I am waiting for surgery and trying to have fun for the next 6-12wks or whatever it takes. May as well learn something useful.

Eventually I will create my own puzzles like that. I'm a big fan of the obfuscated contests and making one liners.

How do we have our posts moved to a new thread of its own? Can I just email the mod for this sub-forum? I'm starting to feel bad posting here about Tcl :shadedshu
 
Last edited:
Back
Top