4 ms·
A few years ago I installed XCode on my Mac, started learning it (looked 1000x more complicated than my previous IDE.."Hello world" auto-creates dozens of files
by yesenadam 7y ago
A few years ago I installed XCode on my Mac, started learning it (looked 1000x more complicated than my previous IDE.."Hello world" auto-creates dozens of files and folders..) and read hundreds of pages of docs, started learning Objective-C, to try to draw pixels on the screen. Found out that was impossible! Ok, so basic graphics. Shapes.. I never bothered doing much at all. Too much hassle.
Discovered Tcl/Tk a lil while later. They were already on my Mac. With a half-dozen-line program in 1 minute I'd made a window on my screen with text. Graphics not much harder. I couldn't believe I'd gone through all that! haha. Had no idea GUIs could be so simple to write on a Mac. Noone told me. I wrote a couple of games in a few days. Tcl is a kinda weird language, unique, but very easy to get the hang of and be very productive in, a joy. I loved it.
- bachmeier 7y agoThis is all true. Tk is a great way to make a GUI on Mac or Windows. Linux, not so much, as it's so ugly and outdated that it's basically unusable. Maybe things have changed in recent years, but a 1995-style GUI just doesn't cut it.
- davidw 7y agoIt's not that hard to give it some styling to make it look modern-ish enough to get things done with it.
- bluedays 7y agoThe tk framework has had some improvements in 8.5 when ttk was added that modernize the framework. You can make really attractive Windows now with ttk on Linux now that wasn’t possible before.
- acqq 7y agoExactly, Tk looks good on all platforms at latest since 8.5 and the new engine. The relevant tutorial: https://tkdocs.com/tutorial/intro.html https://tkdocs.com/tutorial/intro.html Which exists since 2008. Here's the minimal example for Tcl, Perl, Python and Ruby (note -- Tk doesn't have to be used only in Tcl!) with the pictures of the native looking interfaces on Mac OS X, Windows and Linux (all three): https://tkdocs.com/tutorial/firstexample.html https://tkdocs.com/tutorial/firstexample.html
- aidenn0 7y agoTk has been fine on linux since 2006ish with ttk. The default look is still motif, but it's a single line change to get a more modern look. [edit] Tile (which was incorporated in tcl 8.5) is actually older, as an extension, so with a bit of work you could get better looking apps even earlier.
- swiley 7y agoAs a Linux user I quite like TK on Linux, I prefer it to the awful GUIs people make with html. In fact, my favorite GUI app on Linux (xcircuit) uses tk.
- flukus 7y agoI do wish the main documentation site would focus more on Tk and less on Tcl/Tk, you get the impression that the two are joined at the hip. For those of us that don't like Tcl it seems like Tk is still quite usable but working out how is left as an excercise for the reader. Things have improved, I found a good multi-language documentation page (https://tkdocs.com/index.html https://tkdocs.com/index.html) including this good multi language example (https://tkdocs.com/tutorial/firstexample.html https://tkdocs.com/tutorial/firstexample.html) but very little on how to use the c api (https://www.tcl-lang.org/man/tcl8.6/TkLib/contents.htm https://www.tcl-lang.org/man/tcl8.6/TkLib/contents.htm). I hope things keep improving, Tk is what electron should should have been.
- mwcampbell 7y ago> Tk is a great way to make a GUI Except that it has zero accessibility support, e.g. for blind users with screen readers. Please don't use it for any non-toy application, unless it's something inherently visual.
- bityard 7y agoTcl was the first language that I really grokked. Before that, I had tried learning C, C++, and Perl in my spare time. Progress was made, but not enough that I was able to write anything that was actually useful on the command line, let alone a GUI. Then someone suggested that I try Tcl/Tk. Literally within 2 hours of first hearing of the language I had a reasonably functional application running on my computer. I do most things in Python these days since it is simply far and away more capable than Tcl but I still think it's an excellent language for a lot of things.
- oefrha 7y agoPython has tkinter in the standard library so you can literally use Python to build Tk GUIs.
- sedatk 7y agoTCL was a breath of fresh air after I dabbled in mIRC's mishmash of a scripting language. It was so pleasant to write.