Komodo Extensions

Komodo is really designed for scripting/interpreted languages. However, I quite like it (although it’s a bit sluggish, but that may be me), and I’d like to use it for the small amount of compiled stuff I do. For instance, I had cause to decompile, edit and recompile a Java application. I was able to edit it using Komodo IDE, however the debugger doesn’t work, and it doesn’t execute. I did come up with the following command that will check the modified dates on the source and target files, if necessary compile the source to byte code, and then execute the program. This is for Java only at this stage, however, I’m planning to extend it.

 1     if test "%F" -nt "%b.class"; then 
 2     { 
 3         echo Compiling %F; javac "%F" ; 
 4         if test "$?" == "0"; then 
 5             echo Executing %b.class; java -classpath . "%b"; 
 6         fi; 
 7     } else {
 8         echo Compiled file %b.class is up to date; 
 9         echo Executing %b.class; java -classpath . "%b"; 
10     } fi

This was all on one line in the Add Command… box:

1     if test "%F" -nt "%b.class"; then { echo Compiling %F; javac "%F" ; if test "$?" == "0"; then echo Executing %b.class; java -classpath . "%b"; fi; } else echo Compiled file %b.class is up to date; echo Executing %b.class; java -classpath . "%b"; fi

I’m actually going to go a bit further and create a toolbar for compiling programs, which may take the form of language extensions, or GUI extensions, or just plain macros and commands. The other thing I really liked about SubEthaEdit was that you can get the source code as HTML, that is, code that keeps the syntax colouring, which can be cut and pasted into your blogging client/whatever. I’ll have to try to build this too. There is already an extension out there, called Clipboard Helper Extension, that puts a new contextual menuitem into the mix that allows for copying as encoded HTML entities, or as a URL. This could be used as a basis for Copy as XHTML Source. Basically what I need to be able to do is get the editor’s data about syntax highlighting (preferably with the class names, such as string, and so on), and them mark up the plain text using this. Then escape the HTML entities (or do this first), and place into the clipboard. Finally, back onto Java source code. I can get it so that double-clicking on a Java Source file will cause it to be edited by Komodo, but only if Komodo is already running. It seems that on startup, it checks the filetype being passed to it, or something, and fails to load properly if it isn’t a predetermined type. It works with the predefined python, perl and so on, but not Java. Strange.

Komodo IDE

I’ve been playing with (and loving) Komodo Edit for a few days, and I’m about to try Komodo IDE. Basically, for one reason: debugging. Particularly for teaching kids how to code, I think being able to step through a program line by line, and see all of the variables and their effects would be useful. I assume that Komodo IDE can do this (it’s being downloaded as we speak). I’ve managed to get some buttons to help with using Komodo Edit working, however there is one thing I’d love to be able to do, and that’s end the currently running script if it is running before attempting to execute the next one.

Keynote Rocks

I’ve never been much of a fan of PowerPoint.  I’d used it a little at University, and then this year I actually had cause to have to use it again.  I have been teaching Stage 2 (final year of High School) Information Technology Studies, and this is a content-rich subject.  Rather than what I’ve been teaching in the past, which is more task-based, this actually requires me to act a little more like a teacher than a facilitator.

So, I’ve built a few PPT presentations over the past couple of months.  Mostly it has been okay, but today I started playing with Keynote.  This is a much faster tool for creating presentations than PowerPoint, but I haven’t had cause to actually use it in any way that is different to how I would use PowerPoint.

There is one neato feature: export to SWF.  Which means I can still create the presentation on a Mac, and easily export it to work on either a website or a local machine, of basically any vintage.

Powered by ScribeFire.

Komodo

I’m loving Komodo. I’ve just discovered it, and I’m playing with the free “Edit” only version, not the full IDE. I’ve set up a couple of macros/commands to make coding in python easier, one which just executes the selection using python, and another which saves the current file, and then executes that. This should make it possible to replace most of what I do that requires a seperate window, however, the fine-grained ability to $ python -i Source.py and then type in commands is missing. I might need to try to build an extension that does that - allows for active manipulation of python code within the defined namespaces. Oh, and it works with just about every language, and on all major platforms. Bonus.

CLI-fu

LMAO! (from xkcd.com)

Cross-platform Application

John Gruber, over on Daring Fireball, has posted about the name change of Lightroom to Adobe Lightroom, in Brand New, and seems to have hit the nail on the head with the discussion about rebranding and brand integrity. He’s also spoken about cross-platform applications, and how Adobe are the only real software maker that builds true single-source based applications that run on multiple OSes. I would have agreed with him, except that he talks about how Lightroom is built using Lua as a scripting language. There is at least one other cross-platform application, also built with Lua, that is updated regularly, is the same on Mac and PC, and even “shares the same manual”. That application is, of course, World of Warcraft. Blizzard, along with (some) other game makers, have a long history of releasing Mac and PC versions of their software. I assume the source code for these two is largely the same, as they continue to update it on a monthly or so schedule, and a significant proportion of the update code is the same on both platforms. Granted, Blizzard are very different to most other game development houses, in that they do write Mac versions of their software. And they don’t have to write code that uses the GUI hooks, in that they have their own UI. But, it’s still (almost certainly) the same codebase, nonetheless. Well, I’m hung over, and I need a Chicken Yiros.

I Close My Eyes And Think Of YouPaul Kelly…Nothing But A Dream ★★★★

Donald Knuth comic.

This one made me laugh - see it and more over on xkcd.com

Eleanor RigbyShirley BasseySings The Movies

autoTorrent

I’ve started using BitTorrent, or rather a couple of different clients, since I got ADSL, but what I really want is a fire-and-forget client for the NSLU2. This is what should happen.

  • Monitor a certain directory. If a .torrent file is added to this directory, add it to the queue.
  • When a torrent is complete, move the file(s) to a completed directory. Send an email, or something. Perhaps add an item to an RSS feed. Remove the .torrent from the download queue, but keep it seeded.
  • When neither of the other computers is turned on, download the next .torrent in the queue.
  • If the download total of the running torrents is less than 80% of the available, start the next .torrent in the queue.
  • If more than one .torrent is running and bandwidth use is greater than 90%, then stop the lowest in the queue that is running.
  • Have a nice web interface that allows for changing the queue order.

There is a torrent ipkg for nslu2, which I’ve downloaded, but I may write my own. It’s show day tomorrow, so that might be a good start.

Ultimate WoW Druid Add-On

There are several Add-Ons out there for Druid characters, but none of them really quite meet my needs, so I’m going to write my own. The focus will initally be on Healing and Spells, although will still include some Feral aspects. /InstantHeal(unit) /BestHealingTouch(unit) /BestRejuvenation(unit) /BestRegrowth(unit) /BestWild(unit) /RemoveDebuff(unit) /TotemKiller /BestWrath(unit) /InstantHibernate(unit) /RootNow(unit)

Extending Crocodile Technology

I use, and really like, Crocodile Technology, an electronics and motion modelling system, which interfaces well with a really nice PCB layout program. However, it isn’t especially extensible, or so they would have you think. But, the component information is all stored in XML files, so in theory, it should be possible to create new parts, either in a new XML file or by editing one of the old ones, that can extend the functionality of the program. For instance, I want to be able to create a part that is the UM66T, a great little 3-pin (TO-92 package) melody generator. We buy it in four varieties, each of which is a different single-voice tune, such as Small World, Fur Elise and so on. At the moment, I need to model the circuit with the kids, and then add the pin layout of a TO92 component in RealPCB, which is somewhat error prone. It would be much nicer to be able to model it all in Crocodile Technology, including having the music play. This is what the XML code for a part, in this case a Red LED, looks like:

1     <part class="electronics/red-led" proto="electronics/discrete-led">
2       <p key="vf">1.567</p> 
3       <!--  1.9V @ 10mA  --> 
4       <p key="img" type="resource" flags="user-hidden">electronics/ledred</p> 
5       <p key="meta-parttree-order" type="int" flags="user-hidden">30</p> 
6       <p key="meta-label" type="string" flags="user-hidden">Red LED</p> 
7       <p key="meta-icon" type="resource" flags="user-hidden">electronics/icons/red_led</p> 
8     </part>