Tuesday, March 15, 2011

Programming Lesson 18: Application Scripting

After a _long_ hiatus, Lesson #18 is available for your reading pleasure. The topic? Scripting Haiku applications, possibly one of the least understood aspects of the operating system. Learn about hey command, its uses, and even see some of the most English-like bash commands ever. Also see how to make almost any Haiku application answer your beck and call and tinker around the operating system with an updated version of the ScriptWorld demo application, Scripting Explorer.

Programming with Haiku, Lesson 18
Supplemental Source Code: Scripting Explorer

Saturday, March 12, 2011

A New Hat... Actually It's a Fedora

I've had fundamental issues with the last few of Ubuntu releases that I've seen come out of Canonical. Jumping from Jaunty to Karmic was foolish -- not all of the bugs had settled out of it for at least a month after its release. Lucid moved the default location of the window buttons -- it is unwise to muck around with a geek's muscle memory. Maverick doesn't seem quite as stable overall, although I've run into fewer problems with jumping from Lucid than Karmic gave me. It is also completely nonsensical and wrongheaded to change introduce a mode to the Close button for Rhythmbox -- it effectively minimizes to the tray if the close button is pressed while it's playing, but closes the program if it isn't. Stupid, stupid, STUPID.

I've been looking for a new distro as a result. Judging from the GNOME vs Canonical news of late, I must not be entirely without justification to be less than satisfied. I've tried Unity. Didn't like it. I've really wanted to go with a Debian based system, if at all possible, because I know the basics of apt well and I like its speed. I wasn't enthused by OpenSUSE's dog-slow first impressions. I've also experimented with CentOS, but I like something a little more up-to-date, so I'm giving Fedora 14 a go. The last time I did anything significant with it was 11(!) versions ago. Still learning, but so far, the experience has been pretty pleasant. I've always liked Red Hat as a company even if I wasn't necessarily wild about RHEL or Fedora. I may be changing my mind about that one. We'll see. Here's to hoping. :-)

Sunday, March 6, 2011

Automatic for the People

It's amazing how sometimes an idea hits me. It dawned on me this past week that much of the work I've been doing on libcharlemagne is grunt work. The code file for the PTextView text editing object is literally like 1000 lines long, far longer than most files that I write, and a large portion is stuff that is repeated with very little variation. In a matter of a few nights and a massive codefest yesterday, I've got the majority of a Lua code generation script which will automate most of the work for the different GUI controls. This is a good thing -- already I've found more than a couple bugs in a couple files just while reviewing them for work with the script. All that's left is the code for generating an object's methods -- tricky, but it should be doable with some thought. The more I work with Lua, the more I wonder what other tasks it might be useful for. Who knows? Perhaps PDesigner might end up as a visual designer with the ability to embed Lua code or something. Interesting thoughts for a pleasant Sunday night after a relaxing day. :)