News for hackers. Stuff that matters.
Re:Wacl: Tcl distro customized for WebAssembly by jancsika on Saturday April 29, 2017 @08:15PM (#14229522)
> A fair amount of the popularity was being the first scripting language with a reasonably complete, cross platform, UI widget toolkit.

That wasn't my experience. At least in tcl/tk 8.5 things like zooming in/out of a tk canvas or updating a progress bar were a real pain.

For example, tk canvas has this nice, seemingly simple subcommand called "scale" that looks like it does exactly what it's called with a tag and two double-precision floats. Apply it and all the relevant tk items are scaled accordingly. It even has a predefined tag called "all" that applies to all current tk canvas items. Trivial. Awesome.

Except text items don't get scaled. And font sizes are limited to integer pixel/point sizes. So zooming is actually non-trivial. Not awesome.

There are a sufficient number of such idiosyncracies that if you want to make a clear, usable interface you end up battling the toolkit.

Also, on the tcl language level I felt the "everything is a string" feature gets in the way. I'd much rather have implicit expressions and explicit string declarations.

Re:Wacl: Tcl distro customized for WebAssembly by auxym on Sunday April 30, 2017 @10:14AM (#14231588)
Tcl 8.5 is a recent release though, around 2007.

When GP says "one of the first scripting languages with a GUI toolkit", he is talking about the early 1990s. Before even python's first release. In fact, python ended up with Tk as it's stdlb GUI package because that was what was available.

Sure, Tk will never live up to Qt, but in 1991, I bet it was quite impressive to have a relatively simple yet expressive language like Tcl that shipped with a cross platform GUI toolkit, all under a very permissive license.

Re:Wacl: Tcl distro customized for WebAssembly by pwg on Sunday April 30, 2017 @11:17AM (#14231930)
This. For a period of time in the 1990-1999 range, Tcl/Tk was often the only way to have a cross platform program with a GUI that did not require the language equivalent of #ifdef WINDOWS/#ifdef UNIX everywhere. Which while providing "one code base, two platforms" really meant writing the platform specific code twice.

For most Tcl/Tk usage at the time the same, unchanged, no "ifdef"'s present Tcl/Tk script would run identically on the various environments that it supported.

Re:Wacl: Tcl distro customized for WebAssembly by tyingq on Saturday April 29, 2017 @08:24PM (#14229556)
All fair, but you have to take the time period in context. There wasn't the plethora of choice we have today.
Re:Wacl: Tcl distro customized for WebAssembly by jancsika on Sunday April 30, 2017 @03:54PM (#14233497)
It's the "reasonably complete" phrase that I'm responding to.

For example: Qt was released around the same time. Do you know if the first version included QGraphicsView? Because it has features we still associate with a modern 2d graphics API-- affine transforms, opacity, grouping of primitives, arbitrarily complex paths, and decent performance even with event handlers and many items being animated on the canvas.

Re:Wacl: Tcl distro customized for WebAssembly by tyingq on Monday May 01, 2017 @01:49PM (#14239783)
Yes, qt is a better toolkit. But it wasn't embedded in a cross platform scripting language at the time.
Re:Wacl: Tcl distro customized for WebAssembly by jancsika on Wednesday May 03, 2017 @10:03AM (#14255690)
And that was quite obviously a reason many developers chose tcl/tk at the time, in spite of tk not being a "reasonably complete" GUI toolkit.