Live data from Hacker News

Tcl-Lang Showcase

wiki.tcl-lang.org

21–30 of 45 posts

Re: Tcl-Lang Showcase

#21
post #8

I've been thinking of writing an extensible editor scriptable with Tcl, but - surely someone somewhere must have already written one, no? I couldn't find anything that wasn't just a toy.

BBEdit started in the 90s and was an early adopter for TCL extensibility.

Re: Tcl-Lang Showcase

#22
post #8

I've been thinking of writing an extensible editor scriptable with Tcl, but - surely someone somewhere must have already written one, no? I couldn't find anything that wasn't just a toy.

I suspect there are a great many, Tcl/Tk makes it a very easy project but once you start using your editor to edit the code for your editor you realize you can edit your editor while you edit in it without restarting. Couple weeks later you have an editor filled with undocumented features and a weird skew towards editing the languages you use most and tailored to your personal coding quirks and style.

At least that is how it went for me. Once I got basic functionality working it turned into something that evolves instead of being written; working on some project and realize a certain feature would be great, open editor's built in console and write a few procs, send it to the interpreter, test, save, continue on with other project, fully intend to document and improve/generalize later, repeat until it turns into something only you can use.

Re: Tcl-Lang Showcase

#23
post #8

I've been thinking of writing an extensible editor scriptable with Tcl, but - surely someone somewhere must have already written one, no? I couldn't find anything that wasn't just a toy.

There have been a few but I think they're all dead these days.

Alphatk for example: https://en.wikipedia.org/wiki/Alphatk

Re: Tcl-Lang Showcase

#25
post #12

A lot of people on Hackernews get wistful for VB. But the VB of the Unix world is still here—Tcl/Tk. It's not for the faint of heart, but it's the fastest way I've seen to get from zero to functional GUI. Entire desktop environments have been built in it—before GNOME 1.0 even came out. It even has metaprogramming capabilities that approach Lisp in flexibility.

> but it's the fastest way I've seen to get from zero to functional GUI

I think Qt Creator is still the best option I've used there. It has a very good GUI form editor (probably the only one I've ever used that is good). You can have a basic GUI up and running in like 5 minutes tops. And C++ is a much better language than TCL, and Qt is a much better GUI toolkit than Tcl/Tk.

Just steer clear of QtQuick and QML. It's kind of trash. QtWidgets is still supported though.

Re: Tcl-Lang Showcase

#26
post #8

I've been thinking of writing an extensible editor scriptable with Tcl, but - surely someone somewhere must have already written one, no? I couldn't find anything that wasn't just a toy.

[tcl'ers wiki page on tcl editors](https://wiki.tcl-lang.org/page/Tcl+Editors)

An interesting one I hacked around with for a while is [ma](https://github.com/kdltr/ma). It's a single window implementation of an acme-like editor. It was originally written (& still used by) Felix Winkleman, the creator of chicken scheme

Re: Tcl-Lang Showcase

#27
I wish more scripting languages (other than TCL and Python) had desktop GUI support out of the box. I don’t even need a good one, just having an OK GUI lib that isn’t a full blown third party webview frameworks would be nice for one off utilities.

Re: Tcl-Lang Showcase

#28

Here's a talk I gave many years ago at the Toronto Usenix Symposium about porting SimCity to TCL/Tk: http://www.art.net/~hopkins/Don/simcity/keynote.html At that point in history (1993), TCL/Tk was ideal for what I wanted to do. It was very easy to integrate with C code (exposing the SimCity simulation engine and callback as TCL commands), and implement custom Tk components (like pie menus) and services (like a real…

I have fond memories of many hours spent with my young daughter playing micropolis on my laptop while travelling by train accross Europe many years ago. Thank you for your work!

Re: Tcl-Lang Showcase

#29
post #12

A lot of people on Hackernews get wistful for VB. But the VB of the Unix world is still here—Tcl/Tk. It's not for the faint of heart, but it's the fastest way I've seen to get from zero to functional GUI. Entire desktop environments have been built in it—before GNOME 1.0 even came out. It even has metaprogramming capabilities that approach Lisp in flexibility.

VB and Tcl/Tk are very different at a fundamental level. Nowadays the closest to VB would be Lazarus[0]. There is also Gambas[1] though personally i haven't tried that recently (it also cannot make binaries for Windows FWIW) and back when i did, it was very clunky. Though there was an attempt[2] to make a Visual Tcl at some point. IIRC one neat aspect was that the program was actually live while you were designing it…

JavaFX has a role here too.

Re: Tcl-Lang Showcase

#30
I use tcl at work. It’s fine, but it’s one of those languages that’s heavily tilted toward “easy to write but hard to read.”

TCL can be so customized that it’s unrecognizable, breaking all compatibility between hosts.

Post reply on HN