kde Syndicate content

warning: Creating default object from empty value in /www/htdocs/w0065fc9/milianw/modules/taxonomy/taxonomy.pages.inc on line 33.

» Transparent loading of compressed Callgrind files in KCacheGrind

Thu, 03/11/2010 - 23:43

Hey everyone!

I just committed an (imo) insanely useful feature for KCacheGrind: Transparent loading of compressed Callgrind files. Finally one does not have to keep those Callgrind files around uncompressed, hogging up lots of space. And what is even more important: It’s much easier to share these files now, as you can send or upload them as .gz or better yet .bz2 and open them directly. KDE architecture just rocks :) So in KDE 4.5 the best profiling visualizer just got better :D

In related news: I’m spending my time as intern at KDAB currently by creating an application to visualize Massif. If you are interested, check the sources out on gitorious: http://gitorious.org/massif-visualizer

It’s still pretty limited in what it offers, yet is probably already more useful than the plain ASCII graph that ms_print generates:


Visualization of a Massif output file

This is very WIP but the visuals are somewhat working now. I plan to make the whole graph react on user input, i.e. zoomable, click to show details about snapshots, show information about the heap items that make up the stacked part of the diagram, …

Also very high on my wish list is some kind of interaction with the KCacheGrind libraries, to reuse it’s nice features like callgraphs, cost maps, etc. pp. you name it :) All these features that make KCacheGrind such an insanely useful application.

Oh and remember: Never do performance optimizations without checking the facts first ;-)

» Kate Highlighting for QML, JavaScript

Fri, 02/26/2010 - 16:45

Hey everyone!

I’ve started my internship at KDAB this week, it’s great fun so far! Though I spent most of my time this week on Bertjans KDevelop plugin, I couldn’t resist on a bit of Kate hacking:

steveire is experimenting with QML so I couldn’t stop but notice that there is no highlighting for it in Kate. Well, there was none ;-) Now you get pretty colors, rejoice!

Note: Since QML is basically JSON with some added sugar, I reused the existing JavaScript highlighter and improved it. Hence you get imrpoved JSON and member highlighting in plain.js as well. Enjoy!

» Kate/KDevelop HackSprint - Up To Day 4

Wed, 02/17/2010 - 19:43

Woha, quite a few days flew by without me blogging about anything. Thankfully the others started to write so I don’t have to repeat it all ;-) Instead I’ll concentrate on stuff I did or learned.

GHNS for Snippets

Well, first I think an excuse is in oder: There is a GHNS button for Kate Snippets in 4.4.0 but it’s broken, neither me nor Joseph had time to acutally use and fix it… But anyways, I fixed it now for 4.4.1. For 4.5 we’ll also have an Upload Dialog.

I also added both now to KDevelop, you can now upload and download snippets from it. I added a few dump examples but will probably improve it steadily.

Kate Performance

On Saturday and Sunday I started to profile Kate highlighting for a large MySQL dump and managed to greatly improve the speed. Actually the funny thing is that I could improve RegExp based highlighting (you still should try to prevent using it, it will always be slower than simple char/string based highlighting). And the knowledge for this optimization I had from my time as an active contributor for GeSHi. I feel like it was ages ago, he funny :)

So if anybody has a big file that takes ages to load (but only if you use KDE 4.5 trunk or higher), tell me and give me the file. I might find some more ways to optimize different languages.

Other Stuff

Other than that I also managed to fix a few more bugs in Kate and KDevelop and had a good time with the other guys here in Berlin. Yesterday I showed some others how I spent quite a few nights: Partying in Berlin is nice :)

Oh and Bernhard showed me a little gem of his: Kate Standalone which you can use to build only KatePart from kdelibs trunk. This actually works very well (up until some new API from KDE trunk is used).

» Kate/KDevelop HackSprint Day 1

Sun, 02/14/2010 - 01:58

So, first day of the Kate/KDevelop hacksprint.

We just talked and hacked at the rented flat,got to know each other and had a fun time. Everybody made it more or less in time, even last minute attendee Adymo from Ukraine, nice! Hacking-wise the productivity wasn’t that high, esp. for me, but a few patches got committed here and there.

Right now I’m working on a little speedup for Kate, esp. for big MySQL files - lets see how it turns out. Cullmann showed me a few things I could do so maybe it works out, lets see.

Over the next week I plan to push in user configurable include paths for the PHP plugin and do some more Snippets & Scripting work in Kate, lets see how it turns out. I’ll go home now, kinda sucks that I don’t stay with the others here at the flat but have to take a 1h ride into the city… Berlin is definitely too big :D

» FOSDEM 2010 - Day 1

Sat, 02/06/2010 - 19:05

Hey everyone!

Just a quick blurb about my first day at FOSDEM so far:

The City of Brussels

All I have to say about the things I saw this morning is simply: Wow. What a city. I really like it’s … /”style”/?! Magnificent old buildings, no dull corners, everything is a bit organic, grown together. I really like it. When I drove with the bus to the University today I really got thinking: What could Berlin have looked like if not these sons of b*****s messed up our history… Oh well - off to better thoughts…

The KDevelop talk by Aleix

Yeah, I think Aleix really nailed this one! Imo it was really well done and the audience also received it well. I really liked how he first talked about some parts that are so good in KDevelop (“we know everything” ;-)) and then - BOOM - he showed it off :) There were some interesting questions from the audience as well, probably most notably something along the lines of:

Eclipse has 300+ developers working on it - how do you manage to create something faster and better (for C++)

He, I think the work of the past years starts to pay of finally! Kudos to all the other developers who worked on it.

Another one asked me, whether there are any payed developers, or any kind of financial support at all. Well the answer is sadly: No, none at all… But imagine what we could do with KDevelop, if some of the core developers could get paid for working on it! Ah, wishful dreaming so far…

FOSDEM generally

It’s cool I think, pretty crowded with actually interested people. I mean sure, there is the odd guy requesting instant bug fixing (come on people: if you have a hand written list of bugs you want to see fixed, why wait for something like FOSDEM to get told that you have to report it to bugs.kde.org anyways?…). But there are also people you just stop by and tell you: Amarok is awesome! I really like KDE! KDevelop is amazing!

PS: What really amazes me as well is how many people are buying T-Shirts! I alone, while looking after the booth, sold like 10+ of the Amarok shirts. And - imo - only real fans do that, no? Really appreciate the users who show their support that way.

PPS: Lets just hope that our accommodation works out: Seems like people are already leaving tomorrow, not on Monday like I thought. And the hotel thought we would arrive yesterday… Yeah - I missed the beer event :’( Something I definitely have to improve next year!

» Snippets In KDevelop / Kate

Wed, 02/03/2010 - 17:59

Hey all!

Just wanted to give you a little rundown on Snippets in Kate 4.4 (via the snippets_tng plugin) and KDevelop Beta 8 (soon to be released).

Note: The Kate plugin was written by Jowenn and introduced me to all these nice features. For KDevelop I wrote a somewhat simpler yet imo better implementation. We will try to get the best of both worlds into KDE 4.5. Stay tuned!

General Usage & Features
  • create a snippet repository (or download via GHNS [see below])
  • create snippets in that repository
  • insert snippets via the snippets view (i.e. double click), or (imo better/faster) insert them via code-completion (remember: CTRL + Space requests code completion at the current cursor position!).
  • snippet gets inserted (properly indented) and potential placeholders/variables get expanded. A variable is something like %{date} or ${email}. Also take a look at the API documentation.
  • variables that get inserted via “${…}” will be “selectable”, meaning you can jump from one var to the other by hitting TAB / Shift TAB
  • the %{...} vars will only get expanded and inserted, without getting selectable.
  • multiple occurrences of the same variable will be updated once one of them gets edited, something that is called “mirroring” in other editors.
  • once one edits ESC the cursor is placed at the end of the snippet or to the first occurrence of ${cursor} or %{cursor} and the user types something, the snippet-handler quits and you are left with your normal editor until you insert the next snippet
  • nested snippets (i.e. insert snippet than insert another one) should “just work”.
Snippet Management
  • group snippets by file type, i.e. PHP snippets will only be offered during code completion when one edits a PHP file.
    Note: In KDevelop and KDE 4.4 nested documents are supported, e.g. create a CSS snippet and it will be shown inside the CSS parts of a HTML document or similar. This uses my HighlightInterface I wrote for KDE 4.4. I still have to rewrite some parts of the snippets_tng plugin for Kate so that it works there as well
  • group snippets in repositories, set an Author and a License of your choice
  • publish snippet repositories via GHNS: In Kate you can already download snippets from GHNS but we sadly don’t have any repos up on opendesktop… I’ll have to add some prior to KDE 4.4. Also we didn’t have enough time to implement uploading of Repos from inside Kate in time for KDE 4.4. So stay tuned for KDE 4.5. KDevelop currently has no support for GHNS, but I plan to fix this tomorrow or the next days - together with uploading from inside KDevelop, i.e. all the nice features of GHNS v3.
  • in KDevelop (and someday in Kate as well) you can simply select a part of your currently opened document and select the “create snippet from selection” in the ContextMenu - easy & fast!
TODO

There’s much to do.

  • Highest priority right now for me is to get GHNS with all bells and whistles supported for KDevelop.
  • Then I’ll merge and integrate the Kate & KDevelop plugins as much as possible, so we have a reduce code base.
  • Also important is to make all shortcuts configurable
  • Another thing is: How could we improve interoperability even between e.g. editors like TextMate or Gedit? Both have snippets features and their bundles are available in the net. If we can support those we’d save us a lot of work

Also, I should probably do a screencast… Not now though ;-)

» FOSDEM, 4.4 release party in Berlin, ...

Thu, 01/28/2010 - 00:56

Hey everyone, just a quick blurp:

FOSDEM

Yeah, I’ll go to FOSDEM! Will be my first time, I’m really looking forward to it. Esp. considering that it marks the end of my current semester. My current plan for the following days is:

  • visit relatives & friends
  • go to FOSDEM
  • get an immense overload of hacking at the Kate/KDevelop sprint
  • start working as an intern at KDAB

Looks like the future will be much fun :)

But back to FOSDEM: If you have any questions about Kate/KDevelop/PHP, visit me at the KDE booth. I’ll also attend Aleix’s talk about KDevelop for sure.

4.4 release party in Berlin

So well, Nighrose poked me on IRC and I added a short note about a small get-together on the 13th in Berlin. I’m reluctant to call it release party since it’ll be at the rented flat for the Kate/KDevelop sprint attendees, hence only a limited number of people can attend. But esp. other KDE/Qt/KDAB hackers in Berlin & vicinity are welcome. If you want to come by, take a look at the wiki notes about the “party” and contact me by mail.

If anyone else has a bigger party planned, please tell us. We’d be a horde of 10+ hackers, ready to crash anything :)

» Kate polishing

Thu, 01/21/2010 - 02:09

Phew, I just finished some last-minute backports to the KDE 4.3.5 branch. Lets hope the bug fixes I and pletourn did are as good as they look. Expect a much more stable Kate for 4.3.5 & 4.4! We managed to fix two bugs which are potentially the cause for dozens of bug reports, all seemingly random. Lets see whether our fixes hold up to our hopes!

Other than that: You should look forward to Kate scripting (with JavaScript) in 4.4. It’s dead simple but actually useful. In the utils.js file we ship with Kate there are now the following tools (all operate on the selection or - if none exists - on the whole document):

  • sort - simple sorting
  • natsort - natural sorting
  • uniq - filter duplicates
  • trim - remove leading & trailing whitespace
  • ltrim - remove leading whitespace
  • rtrim - remove trailing whitespace

Do you have more ideas for such simple helper functions?

» progress in PHP support for KDevelop

Wed, 01/20/2010 - 14:44

Hey everyone. Been some time since I last blogged… I want to take the chance to give you all a bit of overview over the last changes in the PHP plugin for KDevelop:

Performance Improvements

I spent quite some time profiling various aspects of the PHP plugin, be it parsing and DUChain building over to (just yesterday) code completion. I’m confident to say that I found (and removed) quite a few bottlenecks, making the plugin much more comfortable to use.

I’m really blown away time over time again by valgrind & KCachegrind… What would we do without these tools?

Documentation

An (imo) very strong point for using KDevelop for PHP programming is it’s seamless support for documentation. Be it the “simple” inline documentation in the Declaration Tooltips or the extended integration of the remote PHP.net docs. But these past days I improved our generator for the inline documentation of built-in PHP language constructs considerably:

  • add documentation for function/method parameters
  • add @since where appropriate
  • fix some missing declarations or bugs, esp. some that where part of SPL

These changes increased the size of the generated file to whopping 3.1M. This was too much for me and hence I added support to ship this file zipped (i.e. now it’s 80% smaller) and we decompress it transparently with the use of KZip. Adding such a feature was a breeze, so nice to work with the KDE Api :)

There are still a few things missing and stuff I plan to improve here, so stay tuned for more news in this regard.

» PHP & PHP-Docs now in extragear/sdk/kdevelop-plugins

Fri, 01/08/2010 - 18:58

Hey everyone! The PHP & PHP-Docs plugins for KDevelop now moved to Extragear! The new locations are:

  1. svn+ssh://svn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php
  2. svn+ssh://svn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php-docs

Or the anonsvn equivalent:

  1. svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php
  2. svn://anonsvn.kde.org/home/kde/trunk/extragear/sdk/kdevelop-plugins/php-docs

Happy coding!