Top
Best
New

Posted by aryonoco 7 hours ago

Develop Cross-Platform CLI and GUI Tools with Tcl/Tk(cgicoffee.com)
72 points | 39 commentspage 2
em-bee 6 hours ago|
the problem with Tcl/Tk is Tcl. the author does write about the quirks and problems, so this is a good article, but the end of it is that Tcl is simply not a language that i am interested in mastering. just like shell scripting. i'll use it if i have to, but it is not my preference.

and as the article also mentions what makes the apps cross platform is the native or near-native GUI. and apparently Tk is good for that.

but i'd rather use a nicer language with it. again, the article does talk about python, and points out that the Tk bindings in python are simply not good enough. that was very insightful, and i am glad to know.

however i would like to know if any other languages do better here. what about go for example? has anyone tried Tk with other languages and can share some experience?

mbirth 4 hours ago|
I wonder whether Delphi/Lazarus would be better suited for a native GUI on each platform. But you’d have to compile your app for each separately.
mbirth 6 hours ago||
Fun fact: macOS hex editor "Hex Fiend" uses Tcl for its templating language:

https://github.com/HexFiend/HexFiend/tree/master/templates

fitsumbelay 4 hours ago||
I appreciate this reminder that boring old tech is pretty fucking good tech; especially to your non-ReactJS-not-anti-ReactJS dev, here.

The comments are also a helpful reminder of the various sw and visual design/GUI values folks hold.

I personally never gotten past exploring Tkinter but like everything else I played with until I found reason to depend on it, that'll probably change since it's as available as vim and python and _that's_ the kind of thing I value. Limitations/constrains are the engineer's problem, not the tool's (unless they are the tool's problem (but even then, just be your natural creative self and roll with it))

edoceo 5 hours ago||
On Linux there is also this windowing shell `wish` which I've used for some very quick (and very very dirty) UIs
a1o 4 hours ago||
I haven’t used myself but in Linux there is also zenity

https://linux.die.net/man/1/zenity

I have seen scripts that use it for a quick GUI.

I really dislike using Powershell as a shell, but it looks like on Windows specifically it also has some gui thing that is somewhat similar to a .NET like zenity.

edoceo 2 hours ago||
This seems modal driven. Like calling MsgBox on windows. Wish (iirc) let me get multiple labels, input and buttons in an Hbox/Vbox type layout.
ashenke 4 hours ago||
Do you have more information? It looks interesting
edoceo 4 hours ago||
I don't, but it was easy even before AI code.

It's this one https://en.wikipedia.org/wiki/Wish_(Unix_shell) - which turns out is Tcl.

I used it to wrap up some socat and curl. Ugly stuff. Reading values from a serial device, show on screen until a button press when a value was sent over HTTP. The kind of code you hate but the management thinks is production ready.

I found it because someone on Gentoo IRC was like: ?"if you hate yourself try this"?. Would have preferred to do the whole thing in Perl.

self_awareness 1 hour ago||
> Alas, the complexity of its meta-object compiler (MOC)

Do these people use the same template when writing about GUIs? I mean what's complicated about MOC? In CMake it's even transparent and the user doesn't even see it. I swear, the same argument coming back year after year. "MOC" is complicated, but the compiler itself and ld isn't?

Ozzie-D 4 hours ago|
[flagged]