GUI libraries be like, choose three:
for example Qt is cross-platform and accessible to screen-readers, and it wastes resources a bit but not too badly. but it’s an overcomplicated clusterfuck nightmare to actually use it for anything
Electron is cross-platform, accessible to screen readers, it doesn’t seem too overcomplicated unless you start installing 12,000 Node frameworks. but it eats RAM and CPU for breakfast
Tkinter is cross-platform and lightweight, it’s reasonably easy to use (despite the terrible documentation), but it doesn’t work with screen-readers
@kasdeya electron is accessible to screen readers until the entire thing is div slop
@kasdeya As of Tk 9.0, it should work with screen readers! (I haven't got Tk 9.0 installed on my machine, so can't check.)
@kasdeya GTK is alright on all 4 of these when compared to Electron, its application still uses 124M RAM on launch but at least it isn't as bad
@wizzwizz4 ooh omg that’s amazing! I wonder which version Python uses. it might be worthwhile for me to learn it, in that case
@kasdeya Probably Tk 8.6 still; however, Tcl's a simple enough programming language that you could learn Tcl/Tk instead of learning tkinter. (Tk 9.0 has a lot of subtle improvements over Tcl 8.6, such as built-in support for entry placeholders.)
Apparently (per https://github.com/python/cpython/pull/124156), Python 3.14's tkinter supports Tcl 9.0, but (per https://github.com/python/cpython/issues/124111) released versions of Python do not yet use it. Looks like you'd have to build your own copy of Python.
@kasdeya then there's GTK, which is cross-platform, kinda easy on resources, has accessibility features, and is such a clusterfuck they wrote their own version of the STL (but in C, not C++, for spice.)
Honorable mention to ncurses, which is absolutely cross-platform, has resource requirements met by most phone chargers, is equally inaccessible no matter what your vision is like, and is dead simple*
*so long as your entire application is written in a late-80s style, and also in C.
@technobaboo ooh I’ve never heard of this! if there are ever Python bindings I might give it a try, but Rust makes me feel unbelievably stupid lol - I can not handle it
@wizzwizz4 hm I actually don’t know much at all about Tcl. is it kind of like a DSL for making a GUI, and then you write the rest of your code in another language? or does the whole program need to be written in Tcl?
@kasdeya Yes. Tcl's entire philosophy is that multiple interpretations are valid.
It is a fully-featured programming language (to give an example, Git GUI is written in it) with versioned packages, "it just works" invocation of procedures defined in other files; metaprogramming, support for functional and object-oriented paradigms…
… but also, you can just use it to define a DSL, construct strings of data, pass them to the Tcl interpreter, and drive it very manually (that's what tkinter does).
@kasdeya Tcl is, unfortunately, badly-documented, in that its documentation is designed for people who already know the language.
Also, there's currently a redirect bug with the web-based copy of the documentation, where attempts to request `.htm` pages take you to a non-existent URI scheme instead of the corresponding `.html` pages, so none of the links from the Tcl wiki work at the moment.
I think reading the Tk documentation will probably teach you enough Tcl to get started.
@kasdeya @LunaDragofelis I recently took a look at Tauri which looked rly cool but no passion to learn rust for buissnes logic right now…
@kasdeya The fundamental idea behind Tcl is that everything is a string. A list is a space-separated string. A dictionary is an even-length list of alternating keys and values, without duplicate keys, which is a string. Integers are "0", or an optional minus sign, followed by a non-zero decimal digit, followed by a sequence of decimal digits: a base 10 string.
Internally, Tcl's actually using far more sophisticated data structures, so don't worry about performance.
@kasdeya Surprisingly, this "everything is a string" approach entirely avoids the pitfalls you might be familiar with from PHP and JavaScript.
If you look a bit closer at Tcl, you may find four things that aren't strings: commands, variables, namespaces, and traces. Commands are things like `if` and `while`, but they are also used to represent named resources, such as Tk widgets. To interact with a widget, you treat it as a command. (But you could just as easily view this as a declarative DSL.)