4 ms·
Partcl – A Tiny Command Language
- davidw 5y agoI made a Tcl-like thing myself, a while back. For feature phones that could run a minimal JVM. https://github.com/davidw/hecl https://github.com/davidw/hecl Haven't touched it in a long time, though.
- chubot 5y agoSounds like fun! What to do next? Run a Lisp in Tcl :) https://github.com/kanaka/mal/tree/master/impls https://github.com/kanaka/mal/tree/master/impls Or write one yourself
- lmm 5y agoTcl is already homoiconic, you don't gain much from running lisp there.
- haolez 5y agoI've often read here that Lisp is a language that teaches you new ways of thinking about code. I've implemented a big Scheme project in the past and although "code is data" is interesting, I didn't have any "aha!" moments with it. However, with Tcl, I had some "aha!" moments! It messes with your head the way it feels like a shell and a programming language at the same time. Everything (kinda) is a string. Building a UI is as easy as running grep or find. It's nuts! And the least expected place to have "aha!" moments for me was learning advanced Make techniques. Don't know why, but it changed the way I think about programming as well :)
- mikepurvis 5y agoI think the closest I've gotten to writing anything serious in a functional language has been writing a packaging system in nix— and that's definitely been a mind-expanding exercise, in particular appreciate how immutability interplays with overlays and what it means to find the fixed point and then unroll all that lazy stuff into a sequence of concrete evaluations. Now, that said, those insights haven't been something that I've then turned around and felt like I missed when using a normal imperative language like Python or Rust. But they are pretty nifty, no doubt about it.
- dang 5y agoA couple past threads: ParTcl – a micro Tcl implementation - https://news.ycombinator.com/item?id=13675166 https://news.ycombinator.com/item?id=13675166 - Feb 2017 (31 comments) Partcl – a tiny command language - https://news.ycombinator.com/item?id=13592645 https://news.ycombinator.com/item?id=13592645 - Feb 2017 (19 comments) Reposts are fine after a year or so: https://news.ycombinator.com/newsfaq.html https://news.ycombinator.com/newsfaq.html. Links like these are just for the curious.
- tyingq 5y agoPretty neat to get it so small. Though it suffers the same problem that tcl originally had, but fixed later. Reusing C strings as tcl strings means you can't read or write a NULL character. Which would probably be limiting on a microcontroller.
- guerrilla 5y agoSo, does this mean Tcl ended up working on arrays of bytes then? Or is there more to it?
- tyingq 5y agoHere's what the changelog said for 8.0a1 "Binary data support. The new compiler C APIs allow any Tcl value to contain arbitrary binary data (strings are counted in addition to being null terminated)." I take that to mean it was probably a struct with a size and a buffer.
- 1vuio0pswjnm7 5y ago"JavaScript. I still can't take it seriously and it feels more like a modern IoT hype rather than a serious alternative to Lua." Hype is effective on some people. But not everyone. "There is also lil, the Little Interpreted Language. ... Too bad the author have removed Git repos and his site looks broken now." https://github.com/wsxiaoys/lil https://github.com/wsxiaoys/lil Here is another experimental small scripting language project probably few HN readers will ever discover. It is from 2006 but still compiles easily. It is intended to look like C. https://web.archive.org/web/20100706054938if_/http://www.minimalinux.org/arena/arena-0.9.13.tar.gz https://web.archive.org/web/20100706054938if_/http://www.min...