News for hackers. Stuff that matters.
Re:Visual Tcl by badsectoracula on Wednesday January 27, 2021 @08:14AM (#25927822)
I've only played briefly with it some years ago on a Linux installation but one thing that i found neat was that unlike something Visual Basic or Delphi (which were clear inspirations - i think this screenshot[0] with the entire UI makes it a bit more obvious than the windows in the linked site) is that it is a "live" environment (pretty much like tclsh and wish) you are working with (kinda like a Smalltalk, though probably not to the same extent).

(though FWIW classic VB is a sort of in-between because you are editing the actual forms and state you'd see running - which is most likely why you can't edit a form while the program is running and the IDE even "hides" them - but there is an intentional distinction between "running" and "editing")

[0] https://a.fsdn.com/con/app/proj/vtcl/screenshots/49571.jpg

Re:Visual Tcl by dmux on Wednesday January 27, 2021 @08:56AM (#25928278)
>kinda like a Smalltalk

This may be of interest if you find the idea of a live Tcl environment interesting: https://news.ycombinator.com/item?id=22852484

Re:Visual Tcl by mschaef on Wednesday January 27, 2021 @09:58AM (#25928955)
> FWIW classic VB is a sort of in-between because you are editing the actual forms and state you'd see running

VB could be a little weird in that respect. This screenshot of 1.0 has a clue about why:

https://winworldpc.com/screenshot/40c3942c-c281-2230-11c3-a4...

The timer control in the toolbar (left column, second from the bottom) is an example of a control you could drag over into the 'form editor', give a location, but was totally invisible at runtime. All it did was provide a hook for timer events.

This pattern turned into something common, at least in early VB. The extension mechanism for the language was defined in terms of VBX custom controls - which were intended to be visual controls that showed up on screen. The model worked well as long as that assumption held true, but VBX was also turned into an ad hoc mechanism for everything else.

The net of this was that you often had a form editor showing a bunch of totally-non-graphical VBX controls that would do things like send mail, interact with a PBX, whatever else.

Rolling back from this mess was a bit part of the impetus for the way OLE/COM 2.0 was designed, specifically OCX controls and IDispatch.

Re:Visual Tcl by p_l on Wednesday January 27, 2021 @10:03AM (#25929012)
Delphi continued in that manner - You could have all kinds of visual controls, including FTP clients, that you'd visually add to a form etc. - but they were also possible to instantiate from code.
Re:Visual Tcl by mschaef on Wednesday January 27, 2021 @02:07PM (#25932405)
I didn't use it as much, but my recollection is of Delphi being a much more coherent product than VB ever was. This probably stems naturally from the way the two products came into being.

Delphi evolved from a compiler with full access to the underlying Windows API, with a GUI builder and framework layered on top. Drag a control into a form, and it was fairly easy to see the code behind it down to the layer of the Win32 API itself.

In contract, VB started out as a point and click builder for custom Program Manager like tools, and then had MS Basic attached. You could drag a control into a form, but then there was a very clear delineation between the code you could write as a VB developer and the hidden, opaque code provided by VB itself.

Re:Visual Tcl by badsectoracula on Saturday January 30, 2021 @06:11PM (#25973977)
Yeah though FWIW Delphi was also a much more intimidating product to get into while VB was like a drawing program where you draw a GUI (there is even a color palette!) instead of a picture and then put some bit of logic - the IDE even tried to avoid intimidating you via your own code by only showing a single routine at a time.
Re:Visual Tcl by badsectoracula on Wednesday January 27, 2021 @12:15PM (#25930797)
Though Delphi's components were always meant to be for both visual and non-visual uses (TControl, from which other visual controls descent, is just a subclass of TComponent).
Re:Visual Tcl by bitwize on Wednesday January 27, 2021 @02:59PM (#25933134)
This was still often done in later VB. The Internet Transfer Control was often used by VB and VBA programmers to give their applications HTTP and FTP capability.
Re:Visual Tcl by tabtab on Wednesday January 27, 2021 @05:32PM (#25935035)
What VB should have done was have an optional "utility band" or the like on a screen on which to place the invisible widgets.
Re:Visual Tcl by peteretep on Wednesday January 27, 2021 @04:50AM (#25926201)
> Exports Tclets which run in Netscape/MSIE. You must have the Tcl Plugin to see the Tclets.

Not sure the Tcl Plugin would still run anywhere, which is a shame

Re:Visual Tcl by skissane on Wednesday January 27, 2021 @05:56AM (#25926667)
I assume the plugin is just running Tcl/Tk inside a browser window.

I wonder how hard it would be to recreate the same idea using Emscripten drawing to a HTML canvas?

People have gotten Tcl to work on Emscripten [0]. I think the big problem is the Tk part. Tk has X11, Win32 and macOS backends, but emscripten supports SDL, for which there is no Tk backend.

[0] https://github.com/aidanhs/emtcl

Re:Visual Tcl by blacksqr on Wednesday January 27, 2021 @10:32AM (#25929397)
The Projected Tk project aims to recreate Tk with a pluggable backend structure, with a web browser backend one goal.

https://chiselapp.com/user/gwlester/repository/PTK/home

Re:Visual Tcl by swiley on Wednesday January 27, 2021 @07:34AM (#25927430)
There is an SDL backend for Tk but it's not part of the normal distribution:

http://androwish.org/home/home

Re:Visual Tcl by Aldipower on Wednesday January 27, 2021 @05:20AM (#25926424)
I think Chrome dropped support recently too..
Re:Visual Tcl by flohofwoe on Wednesday January 27, 2021 @07:40AM (#25927488)
Would be a nice weekend hack to create a Tclet "plugin" for WASM. The Tcl interpreter itself is extremely easy to port to exotic platforms, only problem might be APIs that wrap underlying operating system APIs, those would need to be emulated on top of browser APIs.
Re:Visual Tcl by tluyben2 on Wednesday January 27, 2021 @06:10AM (#25926781)
We used this back in the day to make a touchscreen PoS application. It was great as you can switch from running state to dev state without any friction. We quickly went from nothing to production because of visualtcl.
Re:Visual Tcl by lizknope on Wednesday January 27, 2021 @08:26AM (#25927941)
A lot of EDA (Electronic Design Automation CAD tools for the semiconductor industry) tools use Tcl as the built in scripting language. Because of that many companies have built their CAD flows around Tcl so that it integrates with the tools from Cadence and Synopsys.
Re:Visual Tcl by GnarfGnarf on Wednesday January 27, 2021 @09:07AM (#25928395)
I'm trying to compile SQLite from source, which requires Tcl.

I'm getting many errors in what should be a "vanilla", hassle-free, off-the-shelf process. The 32-bit Tcl test suite fails with cryptic unresolved externals, whereas the 64-bit build only fails one test.

Re:Visual Tcl by tyingq on Wednesday January 27, 2021 @10:44AM (#25929577)
As far as I know, it's not a hard dependency. I believe if you just build from the autoconf download after deleting the tclsqlite.c file it works fine.
Re:Visual Tcl by pjmlp on Wednesday January 27, 2021 @05:54AM (#25926650)
Back in the day Active State also had similar tooling support on their Tcl IDE.

https://www.activestate.com/products/tcl/

Re:Visual Tcl by Aldipower on Wednesday January 27, 2021 @06:18AM (#25926845)
The products from Active State were my choice of love before Sublime Text got popular. They had a very good workflow in my opinion. Only downside was the performance of the IDE, but still way better then Ecplise.
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.
Re:Visual Tcl by wiso on Wednesday January 27, 2021 @08:03AM (#25927685)
I remember using https://wiki.tcl-lang.org/page/tkBuilder long time ago.
Re:Visual Tcl by elviejo on Wednesday January 27, 2021 @11:58AM (#25930561)
Where can I learn Tk/Tcl today?
Re:Visual Tcl by cartoonfoxes on Wednesday January 27, 2021 @12:28PM (#25931015)
"The TCL Programming Language" is a recent (2017) book, paired with the language docs at https://www.tcl.tk/doc/. The language itself is remarkably simple.
Re:Visual Tcl by doublerabbit on Wednesday January 27, 2021 @12:14PM (#25930779)
Re:Visual Tcl by publicola1990 on Wednesday January 27, 2021 @12:51PM (#25931356)
How does using tcl and this compare with using Pascal and Lazarus for GUIs?
Re:Visual Tcl by zubairq on Wednesday January 27, 2021 @01:15PM (#25931679)
Very nice. As the creator of visual JavaScript I am glad to see something even better in the TCL world
Re:Visual Tcl by bsdooby on Wednesday January 27, 2021 @05:52AM (#25926632)
Native Client (NaCl) comes to mind.
Re:Visual Tcl by sigzero on Wednesday January 27, 2021 @09:11AM (#25928444)
There's a Tcl blast from the past.