Monday, February 06, 2006

lightning 1.1: new and improved

Non North-American readers: You may want to skip the "Infomercial" as it probably is something unique to our continent...
====Infomercial====
Are you tired of retyping some complicated indented code at the interpreter prompt?

Do you get annoyed with mixed tabs and spaces?

Do you find it troublesome having to start a full-fledge IDE just to test a few lines of code?

With Lightning Compiler, you don't have to!

Lightning Compiler allows you to open files and save them, or simply type in your Python code from scratch just like a more expensive editor. However, unlike these complicated programs, Lightning Compiler also allows you to test your code instantly, at the click of a button.

The new and improved Lightning Compiler even allows you to do all this without even having to use a mouse: you can control it entirely from your keyboard, just like the Unix gurus!

But wait, there's more!

If you download Lightning Compiler right now, we'll throw in a source colorizer in the editing window absolutely free. With the source colorizer, you will never make a typo in a Python keyword as you edit your code. In addition, we'll include a tab-to-4 space automatic conversion.

And that's not all... Lightning Compiler runs on all major platforms.

So, what are you waiting for? You can download Lightning Compiler right now!

Mirrors are standing by!

Lightning compiler is provided as is, with no guarantee. Possible side-effects include: carpal tunnel syndrome, cross eyes, sore neck, and general lack of social life. Python (and its batteries) and wxPython not included.
======End of Infomercial=====

I always wanted to do a fake infomercial... Now that it's done...


In the past week, I was looking at the stats on download for rur-ple, following the latest release of the lessons and of rur-ple itself, and noticed a fairly large increase. I felt good about that, given all the time I spent on it. Then, I noticed that I could look at individual stats for all the "packages". Much to my surprise, "Lightning Compiler" was responsible for a significant part of the increase in downloads. Not bad for just a little app that was extracted from rur-ple! I even got just about as much feedback (two comments in a week!) on it than I got for rur-ple in about a year. When I first released it, I gave it a version number 1.0, even though it was not very polished. I thought I was done with it as it was answering my needs as a small one-purpose tool. However, as a result of the comments I got, I made some changes to Lightning Compiler, and produced a version 1.1!

For those that don't know about Lightning Compiler, it is a simple windowed app: one window is a Python editor, the other an output window. Your can run your code, and watch the result in the output window, with input() and raw_input() handled through dialogs (wxPython based).

It is not meant to be a "serious" app, but I find I use it more and more, and almost never use the Python interpreter anymore!

2 comments:

Anonymous said...

Cool! I copied-and-pasted what I think might have been an earlier version of this from the cookbook just a few days ago, and I'm glad to see the enhancements you've made in this release! As a note to Windows users, you can rename the file to lightning.pyw and you won't have the "ms-dos window" when you run it.

If you want to see some of the extremes you can take this idea, the .NET Snippet Compiler is a similar utility (and similarily handy), but for C# (and now VB and who knows what else), a language which truly does have a compiler. It has a lot of features and is a lot more complicated (though some of that is to be expected with a language which requires an actual file to compile, and expects to be passed an explicit list of every "module" you're "importing"), but it originally started out the same way as Lightning Compiler (code window, run button, output window). It also started out taking something less than the 15-20 seconds to load which the latest version now requires on my machine :).

I do like the way it has the output and error displays beneath the code window where you get a full line width and the fact that it can run minimized in your system task bar and appear with a key-combo when you want to test an idea, though.
But it looks like if you try to work on this idea for too long you start moving towards being an inferior IDE instead of a handy little tool :).

André said...

Thanks for the feedback. Snippet compiler is perhaps a better name... but, since it's already taken, and since (I suspect) "Lightning Compiler" is very likely much faster, I'll keep the name (even though, it is not really a compiler... Lightning Executor wouldn't sound right ;-)

Also, given the nature of Python, I don't think all the xtra functionality that Snippet compiler has is really needed...

As far as output window below the editor window, I looked at it and decided that it was more useful to see more lines of code (and move the sash between the two windows when needed). Still... you gave me some ideas;-)