Wait... People still use Tcl?
It has been a while since I have heard anything about it. Maybe I hang around the wrong people.
Don't know if 'people' is the word
How many consecutive days must you spend in a basement without either sunlight or human contact before the term ceases to apply?
who said Google invented multi-language browser scripting?
The difference is that it's running in a NaCl box as opposed to a DirectX plugin, so it's both platform independent and inherently trustable (according to how much you trust the NaCl sandbox, anyhow - but no need to put extra trust in the TCL interpreter or the code it's running).
Yeah but it's still crap
Seriously. Have you *seen* Tcl? It's like Lua's mutant older brother, born with three arms and twenty-one fingers, then sold to an orphanage by the family and never acknowledged or mentioned again.
When you say "platform independent" you mean as long as you're using Chrome plug-in. I thought the "Web" was supposed to be the one true, open platform, not a proprietary plug-in that only works on certain browsers. Or are we back to the days of "best viewed on X"?
@DZ True, but what were you just comparing it to? ActiveX on IE?
Go embed NaCl in firefox, or wait till someone else does. It's not HTML5, but it's not 'proprietary by design' either.
Exactly my point: Google is harkening back to the days of browser-specific scripting.
It already is. Google's sites are best viewed in Chrome simply because it's the only browser which uses SPDY instead of HTTP to see them. (don't tell me others can implement SPDY, the protocol is badly documented not to mention there should really be at least an RFC for it)
Welcome to the 90s all over again, just replace Microsoft by Google.
Question for Tcl fans... why?
Do people who choose to write complex apps in Tcl have no idea what other roughly comparable languages (e.g. perl, python) are like? Honestly trying to not make this a troll.
Not to take away from all it can do, but it's so strange to use. In my limited use, when I write any Tcl at all (other than simple unconditional commands) I find I'm often trying to trick the language into doing what I want because it seems the 'normal' way doesn't ever work (or I find out after, that the trick which worked is in fact the normal way for Tcl). I can certainly see how, if you've put in the steep learning curve to be good at Tcl, you'd then want to put that to use. But when you choose it mainly based on that investment bias, it doesn't mean you get to call it a good language. Am I being unfair?
Tcl can't do anything unique
(And I don't want to hear a *word* out of you Python lot about how awful Perl is. By comparison with Tcl, your holy cause and mine might as well both be the same language entirely -- that is, the language that lets you get your job done, instead of impeding you from doing so at every possible turn because it was invented by one guy from Shithole Flats, North Dakota who'd never heard of Unix before and only ever saw an Algolic language once, briefly, immediately after sustaining a nasty blow to the head and before he'd finished wiping the blood out of his eyes.)
Smug Lisp Weenies
Short answer: Tcl is lisp for strings, and we're all afflicted by the smugness of people who *get* lisp.
One significant difference between Tcl and PERL, Python, etc is that Tcl is completely defined by a very small set of syntactic rules. There is *no* special syntax for conditionals, loops, threads, coroutines, etc. Everything is expressed in a very simple syntax.
So, for me, that radical simplicity translates to a freeness of form. I now bridle at the arbitrary restrictions imposed by more traditional languages.
Tcl is utterly completely extensible, and highly introspective, and lends itself to emulation and interfacing to new and unexpected things, and so the community seems to define itself, not in terms of PERL and Python, but in terms of the next big thing coming down the track.
Some people don't get that, or don't want it. That's ok.
Tcl is hard, now get off my lawn!
That will change, but then we can see how well Tk stacks up compared to writing raw HTML/CSS for generating Web GUIs. Hint: very well indeed.
Why I use it.
If you are trying to "trick" the language, perhaps you don't understand how it works. Tcl is not a language that just simply simulates what other languages do, but uses a different, "weird" syntax. It *IS* different. It is also extremely powerful, if you dare to go beyond basics. It's power lies in it's super dynamism, where everything is modifiable and morph-able at runtime. It also has a whole buffet of object oriented frameworks, in addition to the built-in one. Tcl is such a chameleon language that you can build other DSL (Domain Specific Language) languages on top of it. It is the power to shape and mold it in a way that is only limited to my imagination is what attracted me to it. It is a power to be creative.
vicm and colinmcc - yes but
What I meant is that, 'how it works' appears to a novice like you are tricking the language, e.g. by reprocessing a string in some non-obvious way to get a certain result. That's how it works, but it means that some ordinary, everyday Tcl things look like strange tricks to the learner. In other languages you don't have to get strange simply in order to do fairly ordinary things (which is not the same as saying you *can't* get strange if you want to). Only stated as my opinion.
And I feel that pretty much everything you say about TCL, run-time morphing, do-anything powerful, can also be said about coding directly in assembler -- just replace the word 'string' in any overall description of TCL with 'byte, or group of bytes' and you could easily end up with a description of assembler (try this: absolutely everything is a "string" and the programmer controls exactly how each string is treated by the program). Except of course that TCL has garbage collection and much better behaviour when things go wrong, and is not tied to a specific processor. So it's definitely better than assembler, but in terms of general usability it's a good way off in that direction IMHO.
thanks for that answer ...
I think I know what u mean, in that since I've done a lot of python coding, I get very very frustrated with C++. Not because it isn't python -- that would be silly -- but because from the perspective of using python I now clearly see all the ways it's totally falling short of what it (C++) is trying to do with templates and so forth.
I don't really know perl but I think that python has the goods for extensibility and introspection. You can, for instance, fairly easily generate functions in the form of strings - ordinary source code - and then compile them and call them .. not quite as transparently as in Tcl (or lisp, for that matter) but not at all hard. This is a really good speedup trick in some cases, but it's difficult to imagine a case where this is the only reasonable option. In Tcl of course, executing a string is business as usual
one nice thing that Tcl can do....
Tcl keeps the entire interpreter state in one (non-global) variable, thus allowing multiple, independent interpreters to be run in different threads. Maybe this is why it's a good choice for this app.
I don't think this is at all possible for python, unless you do a *lot* of recoding. You can 'bless' threads to share the same interpreter with other threads, but that's not the same thing.
Tcl/Tk? For God's sake why?
They'll be moving the UI to Motif next...
There are two certain things in the world -- death and taxes, but in fact there is a third one -- the ignorant ones, those who know the least, they talk the most. It is a sure sign of a fool.
Certainly sounds like as Tcl is not one of the Google sanctioned language - I thought they'd been limited to the Gang of 4: Java, C++, Python and Perl?
Actually tcl is an excellent language
People brought up on algol-derived languages may not appreciate tcl, but the rest of us enjoy how easy our lives are when we program in the language.
Right now for example I am using tcl in a web project and the domain-specific language (DSL) I use for generating HTML lets me express what I mean more simply and directly than nearly any other web framework I have ever seen, making the code easier to write and easier to read.
This property is a result of the very simple and regular syntax, which is also what makes the language very easy to learn, at least if you don't have algol-ish preconceptions of how programming works. Of course lisp does nearly everything tcl can do and more, and might be a better choice for someone choosing a new language to learn.
Not that there is anything wrong with C or Java; I have programmed in the former for years and tutored students of the latter so I know what they are about, but I still prefer to use tcl.
For those who need some help groking tcl, I suggest a look at the MIT SICP lectures. These are not about tcl, but the concepts will help a lot with understanding what tcl is about: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/
As to the present topic, I have not seen this tcl-on-NaCl work so I can't comment on it but it sounds interesting. However I probably won't use it myself until (if) NaCl becomes widely supported, not just in Chrome. It is also worth noting that in terms of security sandboxing, tcl has had its own sandboxing mechanism for some time in the form of safe interpreters, which are a core part of the language.
Tcl is a language of the late 80s
And it should have stayed there. Its the most piss poor mashup of C and unix shell script I've ever seen. Why anyone would EVER choose it for a green field project is beyond me.
Got any opinions to back up your facts?
but just want to throw out a question here, and that's if you *really* need to program in Tcl for this to work?
Could someone (Google, whoever) create a compiler (pseudo-compiler?) to take your C (or whatever) code and translate it into Tcl?
A friend of mine (who, unlike myself, *is* a programmer) is a big fan of a RAD tool called code-charge which allows write-once for a variety of web servers and DB back-ends, and I thought there were tools that allowed write-once app for various mobile platforms... seems to me that putting together something to translate your code into Tcl wouldn't be any more difficult than any of those.
- DINO-SLAYER asteroid strike was a stroke of bad luck, say boffins
- BEST BATTERY EVER: All lithium, all the time, plus a dash of carbon nano-stuff
- Stick a 4K in them: Super high-res TVs are DONE
- Review You didn't get the MeMO? Asus Pad 7 Android tab is ... not bad
- Russia: There is a SPACECRAFT full of LIZARDS in orbit above Earth and WE control it