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. :)

Tuesday, February 22, 2011

More Progress on Code Lookup

I finally came upon a term for the new Paladin feature that I've been doing R&D on the last couple of weeks: Code Lookup, which will look up code definitions for enumerated types, methods, and more using a database from header files. I'm getting better at hacking Lua, though I would still call myself a novice. I rewrote the parser using a more structured, less hackish approach, and I've managed to make it work pretty well. Considering that I've never delved into this particular realm of computer science before, I'd say that I did OK. It sits on top of the luasql engine at the moment, which needs some more work. Once I've gotten it working properly under Ubuntu, I'll be migrating the project to Haiku. From there, integrating Code Lookup into PalEdit shouldn't be too difficult. I'm not wild about adding more dependencies, but I can easily see greater use of Lua with the Paladin suite because of its flexibility and ease of integration with C/C++. I can't wait until this gets to the point where I can use it under Haiku.

Thursday, February 17, 2011

Libcharlemagne, Lua, and Haiku

The last couple of weekends I've taken a little time away from writing lessons to find some much-needed refreshment in coding. The target? Lua, oddly enough. I twiddled with it for a while and discovered that as scripting languages go, I have to jump through fewer hoops to get something quick-and-dirty done with Lua than others and the code isn't write-only like Perl.

The first project was a doozy: write a C++ header parser and (later on) dump the parsed C++ information into a SQLite3 database so that I have the hard stuff done for implementing something code completion for Paladin. Code completion has been #1 on my hit list of features for a long time now, but I haven't had a clue where to start to implement it, and ctags sure didn't seem to be a step in the right direction. I've learned enough about Lua to really like it and want to eventually put together an elegant implementation of the Haiku API via libcharlemagne. I haven't gotten to more advanced topics like metatables and such, but I'm pretty sure that the rest will come in time. Once I finish cleaning up PalEdit's internals like I was working on last summer, I can easily see embedding Lua scripting into it for more powerful editing features and plugins.

Monday, January 31, 2011

Lesson 17: Writing a New Control, Part I

Yet another three weeks has gone by and I didn't even notice. Yeesh. Time flies when you're coding, so no big deal. *shrug*

This lesson is one of several which delves into the art of control writing for Haiku -- not just a quick-and-dirty hack on an existing one, but writing a new control which rivals existing ones in quality and features. Learn how controls handle drawing themselves and write a basic color display control.

Programming with Haiku, Lesson 17