
Picol, a Tcl interpreter in 550 lines of C - fogus
http://antirez.com/page/picol.html
======
sstephenson
Tcl is a strangely beautiful language. For those who haven't tried it, it's a
little bit like Lisp (minimal homoiconic syntax, code is data) but without
closures. Which of course sounds awful until you realize you can implement
lexical scoping with the [uplevel] command: <https://gist.github.com/874370>

It's also very easy to embed a Tcl interpreter into a C program, or into a Tcl
interpreter itself via the [interp] command. And asynchronous I/O is baked
into the standard library.

If you're interested, the Tclers Wiki (<http://wiki.tcl.tk/>) is a great place
to learn more about the language.

~~~
mhd
Tcl seems a bit in a slump nowadays, but I don't think it would need much to
get out of it. With a nice interface builder or some "automagic" layout
classes the GUIs could be up to par again, although that's probably not even
the most important aspect right now. Probably the biggest part missing are
packages. TEA isn't that bad, but compared to Eggs/Gems/CPAN it's a bit
lackluster. Although this is a bit of a catch-22, I guess.

Hmm, was thinking about what language to use for my next project. Wanted to go
with Python, but I think I'll give my old Tcl muscles a good workout again.
Had much fun using it in an industrial context, let's see how much hurdles I
have to jump for a current web project...

~~~
gaius
It suffers a bit from public perception as being "old" but of course it's up
there with all the modern features, it's exceptionally easy to learn and use,
there are no surprises or special cases. Probably because Tcl/Tk attracts the
sort of programmer who happily uses it for real work and doesn't spend much
time on advocacy forums...

------
swah
The original reddit discussion:
[http://www.reddit.com/r/programming/comments/1aefl/picol_a_t...](http://www.reddit.com/r/programming/comments/1aefl/picol_a_tcl_interpreter_in_550_lines_of_not_line)

------
dexen
Very nice project. I'd like to show it to every nay-sayer in the recent ``C,
The Beautiful Language (tenaciousc.com)'' [1] thread.

\----

[1] <http://news.ycombinator.com/item?id=2325065>

------
Nate75Sanders
Obligatory link to Stallman's "Why you should not use Tcl".

<http://www.vanderburg.org/OldPages/Tcl/war/0000.html>

This set off a war a long time ago, in a galaxy far far away.

Edit: This has been downvoted twice now. Could be accident, but could be that
people think I'm saying you shouldn't use Tcl. I've never used Tcl and hold no
strong opinions about it. I'm simply linking to a piece of usenet history.

~~~
protomyth
I didn't downvote you, but I didn't upvote you either.

Maybe it is the reaction to doing something cool and having someone post a
link to criticism that is peripheral to the project. Maybe some Tclers are a
little tired of people continuing to post this particular piece of criticism.
Maybe a random few don't care about RMS's opinion. It is like people posting
the Tanenbaum / Torvalds thread in every Minix article. It just seems a little
mean-spiritted after a while.

~~~
silentbicycle
Agreed. In particular, it's hardly "obligatory".

------
giu
It's quite impressive, especially since he managed to do it in 3 hours. Hats
off!

Regarding the name: I'm guessing it's an _altered_ version of the word
_piccolo_ , which stands for _small_ in Italian. Nice one ;)

~~~
swah
From Reddit:

\- someone: "Picol", as in "piccolo"?

\- antirez: No, it's an obscure joke about the way Tcl is usually pronounced:
"Tickle" that in Italian sounds a lot like "Ticol", so the small version of it
is "Picol".

------
Nate75Sanders
Ah, I was hoping this was going to be about a stored procedure mechanism for
Redis.

