first experience with Archlinux

So, I kinda messed up my desktop right after the upgrade to karmic, because I was too greedy for performance and converted my root file system to ext4. Well, that worked like a charm on my laptop, but it broke my desktop. This is in no way karmic’s fault, it’s my own misbehavior. Thankfully I could rescue most of my data.

Since I’d had to reinstall anyways, I decided to finally try out Archlinux. I find the rolling release mantra very intriguing. Together with a “simpler” packaging, namely no splitting between -dev and -dbg packages like debian/ubuntu does, this is destined to be a good environment for a developer. I always hated it to track down missing -dev packages when compiling software. And don’t get me started on outdated software in repos… I just compiled kdelibs and the only missing build dependency was hspell, that I don’t need anyways. Under Jaunty I had to compile stuff from kdesupport to fulfill updated dependencies. And the list of not-found optional dependencies was huge, since I did not spent time to install all those -dev packages by hand…

My first impression of Archlinux is very good so far. I also finally migrated to 64bit wich works like a charm, no issues with flash or anything. Since I never used a 64bit Ubuntu/Debian I’m not sure, whether the perceived performance increase is due to the switch to 64bit or whether Archlinux optimized packages are responsible. Probably both. Nevertheless I can safely say that my system feels snappier than before.

Of course, the installation and initial setup is not as straight forward / easy as with Debian/Ubuntu: Yet it’s no big deal for anyone with some Linux experience. And, once everything is setup, you are running KDE again, so no real difference. Thanks to the Chakra team for kdemod, it works like a charm!

I might have spent a bit more time during the installation / initial configuration, but I think this would have happened also if I’d installed any other distro I’ve never used before, like OpenSuse or Fedora.

Oh and since I can install sudo I can keep my old habits. Neat.

The only thing I miss so far is aptitude with it’s straight forward command structure. Yaourt/Pacman is fast and nice, esp. with pacman-color, but the commands don’t feel as straight forward to me… Personal preference I’d say.

To conclude: Archlinux is very nice, I can wholeheartedly recommend using it so far. Probably nothing for a novice Linux user, yet perfect for advanced users. Very good as a development environment. Fast. Up to date. I like it :)

Now I can finally continue hacking on Kate/Kdelibs again :) I’m currently in the process of refactoring Kate’s implementation of the TemplateInterface. Even in it’s current state it already implements features like mirrored snippets and the like. But once I’ve finished with the cleanup I will try to implement some more of the features that are found in e.g. yasnippet for Emacs. I really wonder why nobody else did that already…

Once this is finished, you can expect that I will deeply integrate that feature in various places in KDevelop, especially for code completion, snippet plugin etc. pp. Stay tuned!

News from the Holy Kate Land

Since we now all know that Kate is holy (thanks to rms. By accident, he obviously confused Kate with emacs, though) let’s have a look at what’s going on. In the last months Kate development is quite active, so here is a quick update:

  • new: on-the-fly spell checking thanks to Michel Ludwig. Highlights include e.g. spell checking in comments of source code or latex parts. Also, constructs like sch\”on work in latex.
  • extended scripting support in the command line, more on that later
  • more and more mature vi input mode
  • lots of bug fixing. quite impressive bug squashing by Pascal Létourneau for more than 4 months now
  • lots of refactoring and code cleanups thanks to Bernhard!
  • “Find in Files” appears by default again in the tool view,
  • “File Browser” uses UrlNavigator, huge code cleanup
  • convenience updates of syntax highlighting
  • delayed highlighting of code folding ranges to prevent flickering on mouse move
  • new command line commands: ‘toggle-header’ in the Open Header plugin. ‘grep’ and ‘find-in-files’
  • haskell and lilypond indenter
  • much, much more, see commits for details.

Thanks to all contributors involved in Kate development. Keep it up :)

Improved PHP support in Kate

Not only KDevelop gets better and better PHP support — the Kate PHP syntax file also got a few new features and fixes over the last weeks. The good thing is of course that all users of KWrite, Kate, Quanta, KDevelop and other editors leveraging the Katepart benefit from these changes.

Improved HereDocs

screenshot of improved highlighting in PHP heredocs
screenshot of improved highlighting in PHP heredocs

I went over PHP related bugs on today and spotted one that was fairly easy to fix:

vim-like syntax highlighting support for heredocs in php.xml

With some magic (IncludeRules just rocks) I got it working fairly easy. You can see the results to the right.

Additionally I added code folding to heredocs, since often these strings include lots of text and hiding it often makes sense.

Better support for overlapping syntax regions

code folding with overlapping syntax regions
code folding with overlapping syntax regions

Another long standing bug (accommodate overlapping syntax regions (especially for php)) got fixed by James Sleeman.

Finally PHP templates with code such as

  1. <?php if ( true ) : ?>
  2. <!-- some html stuff -->
  3. <?php elseif ( false ) { ?>
  4. <!-- some other html stuff -->
  5. <?php } ?>

can be folded properly. This kind of spaghetti code is used quite often in simple templates and having the posibility to fold it properly is a huge win in my opinion. Thanks to James Sleeman again!

Followup on Kate’s on-the-fly spellchecking

As there was a lot of feedback in the last blog, I’ll answer some of the questions here.

> Where can I get this patch?
The relevant subversion revisions are r992778, r992779, r992780, r992784.

> Will it be available in 4.3, or only in 4.4?
As KDE 4.3 will be released end of the month, this feature will be available in KDE 4.4 and not earlier.

> Please, please tell me that it’s powered by Sonnet, one of the most awaited KDE4 pillar by me…
Yes, it uses Sonnet :)
The old spellcheck dialog however still uses the old spellchecking code without Sonnet. Any volunteers to port this? Also, the on-the-fly spellchecking needs to be more configurable in Kate’s config dialog, e.g. selecting the correct language.

> Thanks so much, this was the feature I was mostly longing for in kate.
Yes, it is one of the oldest reports with 1245 votes!

> What languages are supported support?
On-the-fly spellchecking works if the specific itemDatas are marked with spellChecking=”true” or “1” in the xml highlighting definition files. UPDATE: On-the-fly spellchecking is enabled for all itemDatas by default in the xml highlighting defintion files. To disable it, you have to add spellChecking=”false” or “0” to an itemData, e.g. at the end of the cpp.xml file:

<itemData name="Normal Text" spellChecking="0" />
<itemData name="String" />
<itemData name="String Char" spellChecking="0" />
<itemData name="Comment" />
<itemData name="Symbol" spellChecking="0" />

So we have to go through all .xml files and change the relevant parts in the itemDatas section. And that’s where we need your help, as we don’t know all the languages :) …and if you want to test this feature, you first have to enable it in Tools > On-the-fly spellchecking.
PS: Is there a better name? Maybe Inline spellchecking? Any linguistic experts around? :)