String hp = isa.getHostName() + ":" + isa.getPort();
String s = "service:jmx:rim://" + hp + "/jndi/rmi://" + hp + "/jmxrmi";
JMXServiceURL url = new JMXServiceURL(s);
String login = getJMXUsername(isa);
String password = getJMXPassword(isa);
Map env = new HashMap(1);
String[] creds = new String[] { login, password };
env.put(JMXConnector.CREDENTIALS, creds);
JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
// jmxc = new RMIJMXConnector(host, port, login, password); /* sigh */
[software] link and discuss (1 writeback)
Giggle is a small blogging application in Tcl, inspired by Blosxom. It's a fairly straight-forward translation of early Blosxom from Perl to Tcl. It doesn't have plugins, because the code is simple enough to hack on directly.
I'm greatly indebted to Steve Cassidy for making his code available; Dragons and Elegance owes a great deal to the modularity and readability of his efforts.
[software lightweight] link and discuss (0 writebacks)
Someday I may give in to the buzzwords: Java, Python, XML, Object Oriented Programming, XP as in Microsoft Windows, XP as in Extreme Programming. I may see the light and shout hallelujah. I've tried Python, but I've never really cared for bondage-and-discipline languages, as a friend calls them. And sometimes whitespace is just whitespace. I prefer my loops and blocks clearly delineated -- it's one way I keep them short. Any loop body that's over fifteen lines is probably doing too much. Also, Tcl's three sets of delimiters are enough for me to keep track of: {} for hard quoting and script bodies, [] for command substitution, and "" for 'soft' quoting with variable and command interpolation. It's possible that if Lisp had used [] instead of () for its delimiters, I wouldn't have been so bothered, simply because [] are unshifted on most North American keyboards. I will admit that having the delimiters for proc bodies be different from the delimiters for called procs is useful -- or maybe that's just my biases showing.
One of the reasons I find Tcl so useful as an SGML-templating language is that you really only need to quote one character, [. Variable substitution is a useful subset of command substitution, and I go back and forth about whether John Ousterhout's original idea to forgo the $-syntax entirely was a good one. It looks like a Perl-ism now, though it was probably intended as a loan from Unix shells. Again, my Forth background is undoubtedly speaking here: If I find that a problem needs syntax to solve it, I'll add my own.
It's sometimes hard for me to believe that my Tcl style is still developing after ten years of use as my primary language. But I've come to appreciate the notion that the source code is written for one human to express his conception of the problem to another; the computer doesn't care if you have any style at all.
Simple tools for simple problems. Maybe it's all just about making the language your own. Forth will always remain my first love for many reasons. Tcl is not considered quite the dinosaur that Forth is, but it's definitely no longer anywhere close to new and hip. Java should have lost its shine by now: it's almost as old as Tcl, but it had a multi-billion dollar marketing push behind it. Among the scripting languages, Python seems to be switching places with Perl for general-purpose scripting, while PHP hacks out a niche for itself in Web services and HTML-templating. Having more choices is always good, we tell ourselves in this consumerist society. Pick the tool that most closely matches the way you think.
"I think I've figured out why there are ten times as many Java jobs as Tcl jobs out there. It's because it takes ten Java programmers to do what I can do with Tcl." -- Jeff Hobbs being modest on the Wiki. Tcl does a very good job of matching how Jeff thinks. Or maybe it's the other way around.
[software] link and discuss (1 writeback)
TWS is a webserver, an SQL database engine, and a persistent Tcl interpreter all wrapped together into a stand-alone executable.
Take a look at that statement for a moment. Take a few thousand lines of C, about a thousand lines of Tcl, add a zip-file full of configuration content, wrap it all up in an executable file, and make it under a megabyte and a half. OK, two megs with a modern Tcl library.
My hat is definitely off to these folks.
(Update: After months of complaining, I took two hours and corrected the two flaws keeping me from using TWS for general work -- the URL-hacking security hole, and the lack of any logging. I'm very, very pleased.)
[software lightweight] link and discuss (0 writebacks)
One you get past the odd-looking name, blosxom is a very sweet, elegant piece of software. About 450 lines of Perl, a screenful of configuration in the top of the script, put it in the right place, and it just works.
Now to enable writebacks!
About Dragons and Elegance:
Politics, philosophy, software -- a notebook.
More writing by Karl:
Subscribe
Subscribe to a syndicated feed of this weblog,
brought to you by the wonders of RSS.
Flavours
There's more than one way to view this weblog; try these flavours on
for size.
Powered by
This page made possible by: