6 ms·
Tcl/Tk Spline Editor
- hyperupcall 5y agoHaving been recently converted into a Tcl user, studying this code will definitely help me improve my skill in the language! Thanks for the link
- pantulis 5y agowhy converting to Tcl? Job related? The joy of learning?
- thesz 5y agoTcl vaues do not have null and they are immutable - value assigned to a variable cannot change unless variable gets reassigned. Lists are immutable, for one example, even if they can be shared. These two properties make Tcl much more suitable for programming than most other contemporary scripting languages. I regularly use Tcl for various peeaonL scripting tasks OR EXPERIMENTS and rarely use Python or bash. The reasons are stated above.
- pantulis 5y agoThanks!
- cpach 5y agoJust a friendly note to 'blacksqr: Feel free to add some more context here. What is it that you found fascinating about this editor?
- 7thaccount 5y agoI'm assuming because the full source is in Tcl and that isn't common for these kinds of tools. Tcl is pretty cool.
- badsectoracula 5y agoLooks neat though i think it needs some undo/redo functionality. Also zoom should affect stroke width too. And middle-button-drag should be used for scrolling too as it is a very common gesture.
- teleforce 5y agoThis is the latest book on Tcl (does not cover Tk) by one of the active members of Tcl community. The Tcl Programming Language: A Comprehensive Guide: https://www.magicsplat.com/ttpl/index.html https://www.magicsplat.com/ttpl/index.html
- 7thaccount 5y agoI bought this back in ~2019. A very good book, kind of like the old cookbooks, but with more background.
- qwerty456127 5y agoExcuse me for this kind of question, I'm genuinely curious and don't mean to ignite a flame war. Is TCL worth studying and using when you can just use Tkinter with Python?
- teleforce 5y agoMost of the modern CAD tools for electronics IC design support Tcl and most of the computer networking companies e.g. Cisco has Tcl built-in inside their devices. SQlite author is an avid Tcl user and he even introduced a small, secure and modern CGI based web application called wapp: https://wapp.tcl.tk/home https://wapp.tcl.tk/home
- badsectoracula 5y agoThis is largely a subjective thing, but IMO because of its shellscript-style syntax Tk "feels" better when used with Tcl than Python when it comes to writing quick-and-dirty GUI apps.
- blacksqr 5y agoNot sure my info is still up to date, but last time I checked, not all the features of Tk could be accessed through Tkinter. To take advantage of Tk's full power, you have to use Tcl.
- deleted 5y ago[deleted]
- mastax 5y agoHaving known Tcl/Tk only from the common Python tools, I didn't know that Tk could be used to make GUIs that are any good. I feel a bit silly now, this looks neat.
- vinkelhake 5y agoHah, that's really nice! I've been working on an editor for setting up Box2D scenes for the last month or so. I know there are a bunch of them out there already, but it seemed like a fun project. No Tcl/Tk for me though. I'm writing it as a web app, but in C++ with wasm/webgl and using NanoVG[1] for drawing. I saw a comment here about undo/redo and I think it's a must have feature for something like this. I implemented something based on the command pattern first, but ended up disliking the amount of code needed just for undo. I eventually tore all that out and built my state model on the excellent immer[2] library. [1] https://github.com/inniyah/nanovg https://github.com/inniyah/nanovg [2] https://github.com/arximboldi/immer https://github.com/arximboldi/immer