News for hackers. Stuff that matters.
Re:Visual Tcl by qwantim1 on Wednesday January 27, 2021 @06:49AM (#25927087)
I once used Tcl/Tk and am glad to see it’s still out there.

I’ve recently thought of using it again for fun.

I’m constantly amazed, but shouldn’t be, at how things like Tcl/Tk, that are used by various businesses to create applications, don’t take off into the mainstream.

I think about all of the effort today on the web using JavaScript. That’s using a language that could hardly do anything 25 years ago. But it wasn’t OS-specific, so it beat its competitor, VBScript, and later beat Applets and now Flash. I think the momentum that inspired V8 and development of great sandboxes, etc. was that JavaScript early on was fun for those that were creating their own webpages.

Tcl/Tk wasn’t fun, and neither were Java’s AWT nor Swing. So, maybe that’s why they didn’t stay around.

However, JS isn’t that fun for me either, these days. Constantly learning to do it “correctly” takes a lot of effort.

Re:Visual Tcl by flohofwoe on Wednesday January 27, 2021 @07:35AM (#25927439)
Personal opinion: Tcl was lots of fun and somewhat unique in being both a convenient scripting language and an easily embeddable language. But in the end Python and Lua became better replacements for those two specific areas (that's at least how it went in my case, I did lots of Tcl in the late 90's and early 2ks, but then switched to Python for "cross-platform-scripting").

There's still no proper replacement for Tk GUIs as far as I'm aware though, even Python uses it for building quick'n'dirty cross-platform UIs.

Re:Visual Tcl by Pet_Ant on Wednesday January 27, 2021 @09:38AM (#25928753)
> but then switched to Python for "cross-platform-scripting").

For simple scripting I've switched to Powershell (formerly Windows PowerShell). It's OSS, you can use it from the command line and it's available on Windows/OS X/Linux.

https://github.com/PowerShell/PowerShell

Re:Visual Tcl by FlyMoreRockets on Wednesday January 27, 2021 @11:40AM (#25930318)
Not sure why you are being downvoted, you aren't wrong.

How does it compare to Python?

Re:Visual Tcl by 7thaccount on Wednesday January 27, 2021 @02:34PM (#25932801)
Powershell can be pretty expressive.

It has a lot in common with Python, but the syntax is more C like when you're scripting, but can be used like a standard shell as well.

The learning curve is partially steep as it takes time to learn the advantages and complexity of piping objects around instead of text streams (like Linux does).

The major deal breaker for me is that file reads and writes which are glacially slow. Like waayyy slower than Python if you can believe it even if you basically call the .NET libraries directly instead of the cmdlets.

So it makes the most sense for Windows IT admin tasks.

Re:Visual Tcl by Pet_Ant on Wednesday January 27, 2021 @03:00PM (#25933152)
The syntax is uglier, and it doesn't have anything like PyCharm. However, as a shell it's syntax lends itself to typing out on the command line. It does have this weird thing where you use lots of aliases to make things ergonomic on the command line, but tend to use the full name in the script. Example "ls" is "Get-Child-Item" and is usable on more than just directories.

What sets it apart IMHO is that it return records instead of just string so you can declare which fields you are interested in instead of trying to parse the string output with "cut"

Re:Visual Tcl by dlundqvist on Wednesday January 27, 2021 @09:38AM (#25928752)
Tcl is still fun :) We use it at work as an embedded language. It powers many features, and is a quite large part of our product.

It has absolutely lost some mindshare, but I still think it's a great choice.

Re:Visual Tcl by ephaeton on Thursday January 28, 2021 @04:58AM (#25940077)
same here. In the hardware we build (containing, amongst others, an ARM and a FPGA), I added tcl scripting of the kernel driver interface for the FPGA for testing, debugging, fun & profit ;) ..although that has no visual side.
Re:Visual Tcl by Kototama on Wednesday January 27, 2021 @07:31AM (#25927408)
GUI builder for desktop applications in 90s were really useful in increasing the productivity of programmers. It is sad to see how complex it is to build the UI of a web application in comparison. And there is no definite answer on the best way to do it neither.

Of course now you can expose your app to the whole world. But instead of thinking what it means at the application level you spend lot of brain cycles just setting up the styles and uncoupling presentation and logic.

Re:Visual Tcl by dmux on Wednesday January 27, 2021 @09:04AM (#25928362)
I wonder if we'll ever see a middle ground take over where apps are developed in that 90's GUI builder style but instead of purely desktop applications, they're more akin to tiny internet applications like this idea from Rebol: http://www.rebol.com/reblets.html
Re:Visual Tcl by Kototama on Wednesday January 27, 2021 @09:39AM (#25928774)
Did you try that? Was it good?
Re:Visual Tcl by dmux on Wednesday January 27, 2021 @11:45AM (#25930386)
I've never tried it, no. Just something I've read about in the past and it seems like something that could be easily done with Tcl and its "safe" interpreter mechanism.
Re:Visual Tcl by tabtab on Wednesday January 27, 2021 @05:44PM (#25935180)
Indeed! I've been trying to figure out if we MUST sacrifice such productivity and K.I.S.S. to get web or web-like features for rank and file CRUD intranet apps. Are the bottlenecks solvable? Related debate:

https://www.reddit.com/r/dotnet/comments/kn20yi/start_with_a...

Re:Visual Tcl by beagle3 on Wednesday January 27, 2021 @07:21AM (#25927333)
Until Node (when it was more than 10 years old), JS essentially did not exist outside the web.

And other languages essentially didn’t exist inside the web.

So JS’s success is the web’s success, other explanations are not helpful or needed.

I wouldn’t characterize JS as fun either, especially not in comparison to Python which predates it.

Re:Visual Tcl by andylynch on Wednesday January 27, 2021 @09:21AM (#25928541)
Funny how that came back into vogue. Netscape web server had a JS runtime way back then. Node is way nicer to use though.

I also remember around the same time it was possible to run TCL in browser, like Java applets.

Re:Visual Tcl by beagle3 on Wednesday January 27, 2021 @02:22PM (#25932617)
You could run lots of things with the right plug-in/activex component. And even VBScript on IE/Win. But Netscape Navigator was not yet dead, so the only reliable browser scripting language was JS.
Re:Visual Tcl by vram22 on Wednesday January 27, 2021 @01:43PM (#25932091)
> Netscape web server had a JS runtime way back then.

And "applogics", in JS, IIRC. Touched it a bit in the 2000s.

Re:Visual Tcl by bachmeier on Wednesday January 27, 2021 @08:06AM (#25927711)
> And other languages essentially didn’t exist inside the web.

Having trouble following your argument. What were people doing with PHP if not "inside the web"?

Re:Visual Tcl by Kototama on Wednesday January 27, 2021 @09:01AM (#25928331)
The argument is that since Javascript was the only programming language running in the browser, it was bound to be successful with the explosion of the web ; other arguments trying to justify why it succeed are not relevant.
Re:Visual Tcl by RHSeeger on Wednesday January 27, 2021 @10:39AM (#25929508)
> Tcl/Tk wasn’t fun

That is exactly the opposite of my experience with Tcl. It is one of the most fun languages I've used. And it's flexibility is without peer excluding other Lisp-y languages. So many fun things you can do.

Re:Visual Tcl by dlundqvist on Wednesday January 27, 2021 @10:49AM (#25929674)
Agree. Just the other year I discovered {*}, oh how that simplified some things.