Visual Studio 2010!

Read now >

View Now
DevSource RSS FEEDS
XML Want an easy way to keep up with breaking tech news? And the Get DevSource headlines delivered to your desktop with RSS.
ADVERTISEMENT
ADVERTISEMENT

 

DevSource.com: Your Source for Visual Studio on Facebook
ADVERTISEMENT
Five Surprises from Tcl
By Jeffrey Hobbs

Rate This Article: Add This Article To:

Five Surprises from Tcl - ' Virtual File Systems '
( Page 4 of 4 )

Virtual File Systems

You can download the Asteroid sources — they're just under a thousand lines of lucid code — and study or even enhance them. The game is remarkably effective, despite this compactness, playing rather entertainingly on a variety of platforms, including Pocket PCs, from a single script that require no platforms checks. It impressively illustrates Tcl's GUI capabilities.

At the same time, running the game from a remote source repository hints at the potential of "virtual file systems" (VFS), one of the key Starkit technologies. The idea behind a VFS is that you already have a lot of intelligence having to do with filesystems: you can create, delete, rename, edit, and so on, the files in a hierarchical filesystem. VFS is a mechanism for leveraging those capabilities to things which aren't file systems. You don't need to create a special editor for the items in a remote CVS repository, or the project plans on a server you only access through a satellite connection, or so on. Instead, define these datasources as appropriate VFSs, and use the standard file system coding conventions you are already familiar with for edits on your desktop's filesystem. Instantly, you have network- or hardware-transparent solutions.

The possibilities are breathtaking, bringing down barriers to deployment. Getting your code out has never been easier. VFSs are a great way to simplify a variety of tough problems.

Even if VFSs aren't for you, though, remember Tcl as a cross-platform language with the speed and flexibility to write games, and the simplicity to do networking and graphics concisely.

Jeffrey Hobbs is "tclguy", the lead Tcl developer at ActiveState Tools, co-author of Practical Programming in Tcl/Tk, and a member of theTcl Core Team.

Cameron Laird is vice president of the Phaseit, Inc., consultancy. He received the 2003 Active Award for his Tcl programming.

Read more about scripting languages! Start with The State of the Scripting Universe. Then, explore each language in more detail, by learning Five Things You Didn't Know You Could Do...

  • ...With Python
  • ...With PHP
  • ...With Perl
  • ...With Ruby
  • Discuss this article in the DevSource forum.



     
     
    >>> More Microsoft Languages Articles          >>> More By Jeffrey Hobbs