It’s not exactly encouraging when a website for a UI tool contains absolutely no visual examples of UI on any of its main pages.
Tcl 9.0
111–120 of 247 posts
Re: Tcl 9.0
#112Really enjoy the language, even if I don't use it much these days. Does it still produce GUIs from 1995 on Linux? I'd still be using it today if it had halfway reasonable support for building GUIs on Linux, like they've had for ages on other platforms.
Re: Tcl 9.0
#113The first major release in 27 years. 64-bit internal structures, so data can be huge. Full unicode with all the funky new emojis. Zip filesystems, etc., etc. There's lots of new stuff, and some old cruft has been dumped, so some programs may need a few updates, but there's still a high level of compatibility. The page above links to release notes with details of what's in and what's out.
Why did they remove tilde '~' as a convenient shortcut for the Home directory?
Just symlink /h to /home. So ~user becomes /h/user, in places where ~ is not expanded for you.
Re: Tcl 9.0
#114Earlier quoted context omitted.
I think of Tcl as Lisp for C programmers; by which I mean, Tcl give you the metaprogramming capabilities you get with Lisp in a language that looks more like C, plays well with C, is much more straightforward than your typical shell language, and has a cross-platform GUI. A skilled Tcl programmer can do magic. I spent ten years, from 2005 to 2015, programming almost entirely in Tcl/Tk and I loved it. Since then I mos…
I should add...Tk is the easiest GUI toolkit I've ever used (and I've used a bunch of them). It's got all the basic stuff you need, either built-in or readily available. But it comes from the classic desktop GUI world, you have to work at it to make it look nice, and it's a pain to do webpage-like layouts with it. I wouldn't do an end-user GUI in Tk at this point; but for in-house tools that need a GUI and don't need…
Re: Tcl 9.0
#115Earlier quoted context omitted.
I should also note that Richard Hipp, the creator of SQLite, says that SQLite is coded in Tcl. The database engine itself is coded in C, of course; but the vastly larger test suite is mostly coded in Tcl; and it's the test suite that makes SQLite the reliable engine that it is. The test suite persists; the engine's been re-written in whole and in part.
Indeed, SQLite started life as simply a Tcl extension[0] that “escaped into the wild”. Redis was initially prototyped in Tcl too, and ‘antirez has nice things[1] to say about Tcl. [0] https://sqlite.org/tclsqlite.html [1] http://antirez.com/articoli/tclmisunderstood.html
Re: Tcl 9.0
#116Really enjoy the language, even if I don't use it much these days. Does it still produce GUIs from 1995 on Linux? I'd still be using it today if it had halfway reasonable support for building GUIs on Linux, like they've had for ages on other platforms.
A theming engine went in something like 15 years ago now; the default theme looks rather dated, but there are plenty of others. See https://wiki.tcl-lang.org/page/List+of+ttk+Themes (though the screenshots of core themes are from 8.5/8.6 - default in particular has changed a bit in Tk 9). The "catch" is that the theming engine has its own new widgets, and so to be themed an application has to use the new API. Code fr…
Things may have changed over time. I no longer pay attention. Maybe I'll give it another try.
Re: Tcl 9.0
#117Earlier quoted context omitted.
I've long fantasized about a tool I call "expect" that safeguards against crazy stuff like that. It has a syntax of your expectations, functionally existing as a set of boundaries, and you can hook it to always run as a wrapper for some set of commands. It essentially stages the wrapped command and if none of the boundaries are violated it goes through. Otherwise it yells at you and you need to manually override it.…
When it comes to SQL, I will often write a SELECT with very explicit search (WHERE) criteria for this very reason. Then copying that statement, commenting the original, and pasting to change into an UPDATE or DELETE statement seems to be a technique that works well for me. The SELECT tells me exactly what I'm going to UPDATE or DELETE, and once I have that, changing the syntax is very minimal. In the case of an ORM,…
But this is stupid. These are computers, we can make whatever we want. Executing a delete or update should, if one desires, not have to be database knifeplay.
Re: Tcl 9.0
#118Earlier quoted context omitted.
> most things you’d need Say you wanted to write a CAD app like https://www.onshape.com . There’s no way you could do it Tcl/Tk, is there?
Most of what I'd call the UI - all the toolbars and pseudo-floating-windows - is basic bread-and-butter Tk stuff. The 3D context and CAD kernel would be the tricky bits. There are extensions floating around to work with OpenGL (or whatever), but I don't see doing the heavy CAD-kernel lifting in Tcl - that would likely have to be in C, or whatever. (Just as it presumably is for Onshape.)
Re: Tcl 9.0
#119Earlier quoted context omitted.
Indeed, SQLite started life as simply a Tcl extension[0] that “escaped into the wild”. Redis was initially prototyped in Tcl too, and ‘antirez has nice things[1] to say about Tcl. [0] https://sqlite.org/tclsqlite.html [1] http://antirez.com/articoli/tclmisunderstood.html
I'm curious about why they chose Tcl, particularly over languages like Python or Perl. Were there specific aspects of Tcl that made it appealing for SQLite and Redis, or was the choice more about familiarity with Tcl? Either way, I'd love to understand what they found interesting or advantageous about Tcl in these projects. BTW, I chose Tcl/Tk in the past because it was the easier way I found to quickly built an UI o…
Re: Tcl 9.0
#120Earlier quoted context omitted.
Super interesting, what's the rationale behind its use there?
John Ousterhout realized that every single EDA tool at Berkeley wound up implementing a crappy extension language. So, he implemented a language so that there could be a single, not-so-crappy extension language for the Berkeley EDA tools. He made C integration particularly easy (something the lisps of the time didn't really do). As his students spread out, each company they hit had a shitty extension language and the…
This[0] vs (from memory w/o a computer atm…):
#!/bin/env wish
button .b
.b configure -text “push me” -action {puts “don’t push me!”}
pack .b
[0] https://users.cs.cf.ac.uk/Dave.Marshall/X_lecture/node5.html...======
#include
#include
/* Prototype Callback function */
void pushed_fn(Widget, XtPointer, XmPushButtonCallbackStruct *);
main(int argc, char **argv)
{ Widget top_wid, button;
XtAppContext app;
top_wid = XtVaAppInitialize(&app, "Push", NULL, 0, &argc, argv, NULL, NULL);
button = XmCreatePushButton(top_wid, "Push_me", NULL, 0);
/* tell Xt to manage button */
XtManageChild(button);
/* attach fn to widget */
XtAddCallback(button, XmNactivateCallback, pushed_fn, NULL);
XtRealizeWidget(top_wid); /* display widget hierarchy */
XtAppMainLoop(app); /* enter processing loop */
}
void pushed_fn(Widget w, XtPointer client_data, XmPushButtonCallbackStruct *cbs)
{
printf("Don't Push Me!!\n");
}