Wapp – A Web-Application Framework for Tcl
wapp.tcl.tk
wapp.tcl.tk
But it's a really neat exploration of a "what if" in programming languages.
In the 1990s.
Fast forward 20 years and I found myself using it again, but it felt silly compared to the now-mature Python, Lua, PHP, and Ruby.
These days, maybe lua is a better choice, but I can see lua being more intimidating for smart, but less software-experienced people. "Everything is a string" might be more intuitive for them.
For example, you can delete or rename procedures on the fly, including built-in procedures. So you can rename a built-in like puts to something else, create your own puts procedure, and then call the old one (under its new name) in your new procedure (in case you wanted to override it to do some pre- or post-processing each time). You can even redefine procedures within themselves.
You can use variables in variable names (PHP does this as well).
The comment character # is a valid name for a variable or a procedure.
"Everything is a string" extends to even lists and code blocks.
Even though we've moved away from the hyperflexibility of languages like Tcl and Perl, they certainly served their purpose, and a lot of their better ideas were refined in their more orderly successors.
upvar
Expect & children (& see Don Libes book)
>a lot of their better ideas were refined in their more orderly successors.
Predecessors:
- ???
- Smalltalk
- Forth
- Lisp
#Not a language lawyer, just love proglangs
proc displayHackerNews {} {
set hn "Hacker News" ;#Fill the variable (hn) with the string "Hacker News"
puts $hn ;#output the variable ($hn) to terminal
} ;#end procedure
displayHackerNews ;#execute the procedure
displays: Hacker News
If statements are easy set hn ""
if { $hn eq "Hacker News" } { puts $hn } else {
set hn "Not Hacker News"
puts $hn
} ;#end if
Infinite Loops are fun set hn "Hacker News" ;#Set a variable
while { $hn eq "Hacker News" } {
puts "$hn" ;# print "Hacker News" to terminal in an infinite loop
} ;#end loop
Multi-threading is a breeze. package require Thread
set MyThreadID [thread::create {
puts "Hello from my new thread"
thread::wait
} ;#end code-to-run
] ;#end thread
And finally, a if-switch-threaded-loop set hn "Hacker News"
if { $hn eq "Hacker News" } {set switch "hn" } else { set switch "" }
switch $switch {
hn {
set MyThreadID [thread::create {
proc displayHackerNews {} {set hn "Hacker News" ; puts $hn} ;#end procedure
#set aCounter to zero, if aCounter is < 7 execute displayHackerNews procedure
for {set aCounter 0} {$aCounter < 7} {incr aCounter} { displayHackerNews }
thread::wait
} ;#end threaded-code
] ;#end thread
} ;#end switch-case
default {puts "It's still not hacker news"}
} ;#end switch
The simplicity of the language plus it's power enhances it further then python could ever reach. It also powers the Mar's Rover a long with 99% of all industrial technology. I wouldn't be too surprised to find the nuclear launch button is coded in TCL. (that part might not all be true) butIt's a nice language but to diss it that much, don't. It's a fun language to use and creates modern enhancements. I would HIGHLY recommend it to anyone who's confused about programming. Running remotely hosted X applications via novnc natively on most OS is tasty.
If one language that should be dropped is GOlang. Rust wins. It came from Google. Seriously, github links in source? Yes, looks smart and modern but is incredibly stupid. NO programming language should ever pull URL links for dependence. You wouldn't execute a random bash file on the internet to install a script would you? It's no difference.
I create a repo, heres link to repo, people install repo. I maliciously change the code to backdoor your box, you don't notice. Well done, You've compiled remote backdoor new version, none the wiser.
Who really reads the dependency code that that person has wrote?
My home page completely coded in PureTCL. No Databases, No JavaScript, no SSL and no bitching. http://fantasy.tf/
bc this one quite quite funny
Just because you like web shit doesn't mean you are completely disconnected from the greater culture.
* I do not follow or participate in pop culture.
* I do not listen to pop music, ever.
* I do not know who Cardi B is.
Any similarity in the name of the Wapp software framework and music by the individual or group known as "Cardi B" is purely coincidental.That people associate "Wapp" with a sexually suggestive pop song name instead of "app" or "web app" might say more about them than anything inherent from the project name...
but let me tell you how I got this app running
Better just call it whatever you find OK at the time ( minus the legal stuff ).
Btw, having a framework called Wet Ass PussPuss -> (,)++ for short it's pretty cool.
Maybe a slightly better link... https://en.wikipedia.org/wiki/AOLserver
...this is the web, a completely different and totally unrelated beast.
The web is a different beast from that too.
Some other screen shots: http://aejaks.sourceforge.net/Screen_Shots/index.html
This was made with the Java based Echo toolkit, and the Jtcl interpreter (Tcl implemented in Java.)
At that time, a few lucky folks made way too much money using weird languages for the fledgling commercial internet.
But frankly it was about 10 years ago (and the program in question was ancient even back then) and I don't really remember much, and if it was a fault of Tcl, Tk, or the actual program.
Unfortunately, people often encounter Tcl in situations where there's nobody to explain it to them, so they learn it the wrong way.
There's a talk by DRH at the Tcl 2019 Conference regarding Wapp [0].
[0] https://youtu.be/Aq4NI5NTUpU time code 1:49:34
Also, sometimes it seems “hacker” in Hacker News has been lost and replaced with corporate group think consensus, here.