4 ms·
Tk based GUIs work across pretty much all desktop platforms and are much less resource intensive than electron and friends.
by aidenn0 2y ago
Tk based GUIs work across pretty much all desktop platforms and are much less resource intensive than electron and friends.
- criddell 2y agoIs Electron really considered a competitor to Tk based GUIs? In my (limited) experience, Tcl/Tk is great for basic stuff but I don't think you could do even a small part of what you can do with an html + css + javascript GUI.
- aidenn0 2y ago1. Tk can do a lot more than you think 2. I have seen very basic GUIs in electron just for the cross-platform nature of it.
- nmadden 2y agoIt used to be the other way around. It’s been a while since I did much UI work, but the web always felt incredibly frustrating for layout compared to Tk. (I think CSS finally has something approaching Tk’s grid layout manager?) There are fewer frameworks for Tk, but I think it has most things you’d need. Maybe some of the finer control over fonts etc is lacking.
- criddell 2y ago> most things you’d need Say you wanted to write a CAD app like https://www.onshape.com https://www.onshape.com. There’s no way you could do it Tcl/Tk, is there?
- deleted 2y ago[deleted]
- oldlaptop 2y agoMost 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.)
- deleted 2y ago[deleted]
- zvr 2y agoYou are correct. Having written such a thing, you do all your basic UI in Tcl/Tk and have a custom widget doing all OpenGL/whatever rendering. The rest of the code treats it as a canvas-like widget.
- WillAdams 2y agoIt's 2D only and Mac OS-specific, but there is: https://github.com/revarbat/TkCAD https://github.com/revarbat/TkCAD
- criddell 2y agoThat's impressive!
- Karrot_Kream 2y agoI agree with you but a lot of the demand for GUI tools is small tools. Think something like Postman: it's really just a code editor widget to put in some request metadata and a table view storing requests. This is the kind of tool that something like Tcl would be great at and really doesn't need the sophistication of HTML+CSS+JS.
- catherinecodes 2y agoAbsolutely. It's even been remarkable stable--programs written 20 or 30 years ago work without any kind of modification.