Better HN
topnewbestaskshowjobs
Log inSign up

ecky-l

3 karma · joined Apr 30, 2017 (9y ago) · 5 submissions

Submissions

comment 9y ago · link · parent

I think you are a really good programmer by the time you use Tcl again: as a complementary language for test automation, or to integrate it in your software as DSL...

First you use it because it is simple to learn. Then you outgrow it and blame its weaknesses. Then you remember its strengths from a different perspective and pick it up again :)

comment 9y ago · link · parent

"well .. i am a big believer in the two layer separation"

I believe in this too. Not only two layers, if necessary there can be more.

For that to work, well designed interfaces are quite necessary.

"tcl + c .. are not exactly that and i believe a more modern combo will be better"

You don't necessarily need to reinvent Tcl in another "more modern" language to achieve that. You can compile Rust crates to dynamic libraries (.dll, .so) and use c types, or ffidl in Tcl (http://elf.org/ffidl/) to call the functions in your DLL-crates. Or write a small Tcl C extension to wrap function calls in the Rust code. That will do, without rewriting Tcl in Rust. For the other way around you can always call the Tcl library via its DLL interface in the same manner (which is the way to embed Tcl interpreters in other programs).

comment 9y ago · link · parent

"I think if someone can rewrite tcl or a tcl like language, as the top level language, using a more modern low level language, like Rust or Go ... it will be a very nice combo, I think Tcl can serve as a really nice declarative language"

Why would someone rewrite Tcl in another language? That is just an immense amount of work and would (re)introduce bugs that have been found and fixed in Tcl over the last 3 decades.

Just the fact that Tcl is old doesn't mean that it is dead. It is actively developed and used, although mostly hidden (its not that kind of hype around as with Python or Ruby). That Tcl is old does in fact imply that the code base is mature and reliable, its well documented and doesn't come with surprises. Which in turn means that your code is almost never broken with a new Tcl version. In fact, scripts and extensions written for 8.4, 15 yrs ago, are mostly still functional in 8.6 without modifications. Yet Tcl does come with pleasant surprises that don't break old programs, as can be seen with the new features in 8.6 (TclOO, coroutines, tailcall, try/trap ...)

comment 9y ago · link · parent

tDOM is just for parsing and generating XML or, more interrestingly, HTML. Once you have that, you can use the ::wacl::dom command to inject it into the browser dom. Or use the wacl::dom command to get HTML which then can be parsed via tDOM.

comment 9y ago · link · parent

To clarify: this is the Tcl interpreter compiled to webassembly. Not a Tcl program or the language.