The Idle Scripting Language

NEWS: Idle 1.02 released!

top of page

I am happy to release Idle version 1.02. This adds two new functions and updates core components.

Please see the list of changes for a short description of what has changed between versions.

So what is Idle, then?

top of page

Idle is a simple but powerful scripting language, in basically the same vein as the venerable Perl or Python languages. It is, however, an altogether more lightweight application: the basic installation zip weighs in at around 800 KB (and this includes the full documentation and loads of example scripts).

At the core of Idle sits a tweaked and significantly enhanced version of Lua. Idle inherits from Lua its elegant and powerful language definition as well as a highly-optimised interpreter kernel (an extremely fast compiler is included as well). Idle, like Lua, is readily extended with additional functions, modules and libraries (which can be written either in C/C++ or in Idle itself).

The small language kernel is complemented by an extensive collection of runtime libraries, almost all of which are squeezed into a single DLL file (with a size of around 230 KB).

Idle will run under Windows 2000 or newer Windows systems and comes as freeware, with an MIT-style licence.

How does it work?

top of page

Well, depending on your requirements the most basic Idle setup consists of just two or three files:

idle.exe: this is the Idle interpreter for console-mode (command-line-based) scripts. It reads and executes both .idle script source code files and .idol compiled byte code chunks (.idol is short for IDle Object Library). This version of the interpreter interacts with the user mainly via the console (although idle.exe can create GUIs and dialogboxes if required).

idlew.exe: this is the Idle interpreter for GUI scripts. It also reads and executes .idle scripts and .idol chunks. This version of the interpreter interacts with the user mainly via GUIs and dialogboxes (although idlew.exe can open a console window if required).

idle03.dll: this is the Idle runtime library and both the console-mode interpreter and the GUI-mode interpreter access it. The DLL is already UPX compressed: attempts to shrink it any further will need some serious work.

Besides the Idle standard runtime modules there are a few other modules, notably for networking and database/SQL connectivity. There are also direct interfaces to Perl and the Tiny C compiler. Indeed, the latter can be integrated with any Idle script: this makes it possible to compile and execute C code on the fly.

An additional file that may be required if you want to deploy or distribute your scripts is the Idle compiler, idlec.exe. It compiles a .idle script file either into a .idol byte code file or into a standard Windows executable. If compiling to a .exe file the compiler supports both the GUI and console subsystems as well as compression and encryption.

The Idle compiler produces relatively small executables: a minimum Idle script like

print('.')

will produce a .exe file with a size of roundabout 10 KB. Even relatively big Idle scripts of, say, 80 KB length will typically compile to a .exe file of 40 KB or even less. The compiler can easily integrate all required Idle modules into a single Idle executable: such a .exe file only requires the Idle runtime. This makes it possible to deploy an Idle application simply by copying two files: the compiled .exe and the runtime DLL (ie idle03.dll).

Who needs yet another scripting language?

top of page

See the Idle FAQ for an answer to that and a few other questions.

The Idle documentation

top of page

The documentation for Idle comes in four main parts:

Details about the Idle language itself (people already familiar with Lua may want to skim this file or skip to the main differences to Lua)

The functions in the Idle runtime library and the additional modules

How to use the Idle interpreters (console and GUI version) and the compiler

And finally some FAQs about Idle

If you want to get in touch about any aspect of Idle (I am especially interested in bug reports and feature suggestions), you can do so via either of the following channels:

(preferred) send an email to idle.script@gmail.com or idle.script@idle.thomaslauer.com

or post a message via my website's contact page

for most queries concerning the actual language core you could also try the Lua mailing list

Well, give all this a whirl and tell me what works and what, if anything, doesn't!

$$ built from index.txt d106963c4f77 Mon Sep 27 13:27:10 2010 +0000 thomasl $$