[ / / / / / / / / / / / / / ] [ dir / 27chan / animu / arepa / g / mde / pawsru / polk / vichan ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Email
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.984726[Watch Thread][Show All Posts]

Has anyone done any work with Tcl?

What about Tcl in C/C++?

What about Tk vs GTK+, FLTK, Qt, etc...

 No.984737

Never did, but I'm interested in it. Too bad it doesn't have integers/floats.


 No.984743>>984751 >>984763

Perl murdered Tcl and ate a bunch of ideas including Tk, and then Python mimicked the Tk part. Tcl is neat, kinda like Forth in a way, but I never saw it until after the hit-job.

Today, fossil uses Tcl for its testing suite and for page generation: https://fossil-scm.org/index.html/doc/trunk/www/th1.md

and this is involved somehow: http://jim.tcl.tk/index.html/doc/www/www/index.html

and sqlite began as a tcl extension: https://sqlite.org/tclsqlite.html


 No.984751>>984757

>>984743

Tcl is nothing like Forth.


 No.984757

>>984751

He probably meant that it's minimalist, with a low number of keywords and data structures.


 No.984763

>>984743

I've been interested in fossil and sqlite lately.

I've ported some of my personal little projects that use JSON, YAML, conf files, or pile-of-files formats into sqlite dbs. Liking it so far.

Started using fossil too for personal stuff too backing up to chiselapp.com. I mostly like it so far but sill getting used to it.

I'm also interested in using Tcl with C because of (https://wiki.tcl.tk/299)

>Tcl is also a cross-platform C library. If you've been looking into glib, APR, NSPR, or qtcore, you might end up using Tcl not for its scripting capability, but to provide the features you've been looking for in a truly portable C library.

But is seems disingenuous to compare to something like glib. A better comparison would be comparing to C hooks for CPython, Lua, Guile, or some other easily embedded scripting language.

For example, I know it's contrived but, a C+Tcl program that only prints the cwd would look something like


Tcl_Interp *tcl = Tcl_CreateInterp ();
Tcl_DString s;
Tcl_DStringInit (&s);
Tcl_GetCwd (tcl, &s);
printf ("CWD: %s\n", Tcl_DStringValue(&s));
Tcl_DStringFree (&s);
Tcl_DeleteInterp (tcl);

Whereas with glib you can...


char *s = g_get_current_dir ();
printf("CWD %s\n", s);
g_free(s);

I haven't even looked much into base64 processing but handling with glib is dead simple compared what it looks like it would be with Tcl.


 No.984793

I used Perl/Tk for some stuff. It's okay but I'm not much into GUI stuff. I didn't want to bother with the more fancy toolkits like Gtk, Qt, etc.

Also used Expect to automate various CLI things.

https://en.wikipedia.org/wiki/Expect




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
6 replies | 0 images | Page ?
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / 27chan / animu / arepa / g / mde / pawsru / polk / vichan ][ watchlist ]