MW

Tag linux - page 4

Recent Posts

QML/JavaScript language plugin for KDevelop (October 28, 2012)

Wow… the last days are a blur. I hoped to blog more but once more failed at doing so. What an awesome sprint this is… Once again, many thanks to Joseph for organizing this! But lets now blog about really noteworthy stuff!

Inline Syntax Errors for QML in KDevelop
Inline Syntax Errors for QML in KDevelop

QML/JS language support

Aleix was doing quite some QML work-work recently. Sadly KDevelop has no language support for that, so to stay productive you start to use Qt Creator for the QML files sooner or later. This is of course perfectly fine, except for those people that love to use Kate e.g. or for those that prefer our interpretation of the IDE metaphor and C++ language support. So what should we do about that? Right, lets write a QML/JS Plugin.

Cannot Parse

But writing a KDevelop language plugin is not an easy task. To get something useful, probably the most essential ingredient is a proper language parser. And of course that is nothing you do over night. Furthermore, you should always try to not write that stuff on your own, instead leverage the work done by others. This is what Aleix did. We now use an internal copy ( not a fork, see below) of the QML/JS parser from Qt Creator. I’ve wrapped that in the basic KDevelop language plugin code. Without much work we are now already able to show syntax errors inside the editor for JavaScript and QML files!

continue reading...

Kate/KDevelop Sprint Vienna 2012 Take 1 (October 25, 2012)

Hello everyone!

Finally I take some time to blog again. I’m currently in Vienna for the joint KDevelop/Kate sprint together with lots of other hackers. Many thanks to Joseph for planning and partially financing this sprint! And of course as usual many thanks to the KDE e.V. and all the donors for bringing in the rest of the money required to pull something like this off!

Anyhow, considering that the sprint is running since Tuesday, I need to catch up quite a bit… Actually, I have to start even before that since I committed something quite noteworthy in KDevelop and KMail last week.

Reducing Memory Consumption

KMail

Shared Data References

I attended the recent Akonadi sprint that took place at the KDAB office in Berlin (where I work btw.). I heard that Alex Fiestas would come and show us his memory problems in KMail, which sooner or later was eating multiple GBs of memory for him. That sounded like a fun task to improve, fixing performance issues is what I love to do :) So I investigated it with Valgrind/Massif and my pmap script. After quite some time I came up with a patch to fix the memory increase, which is waiting for Stephen Kelly to review. It should be merged into master very soon™.

continue reading...

KDevelop 4.4.0 Welcomes You! (October 23, 2012)

Hey everyone!

A first broadcast from the joint KDevelop/Kate sprint! Many thanks already to Joseph for planning this all. As you can see, we also have net access and thus nothing can prevent a very productive week :)

Anyhow, back to the actual news: I finally announced the release of KDevelop 4.4.0. Many thanks to all involved again.

Mind you though, the change list is a bit sparse this time. Yet I’m really looking forward to the 4.5 release already. I’ll blog about it in the next days during the sprint. Stay tuned!

continue reading...

Logitech Mini Boombox on Linux (August 21, 2012)

Two of my friends gave me the Logitech Mini Boombox for my birthday. While it can be used with a plain old jack cable, it also supports Bluetooth. I don’t have a smartphone, but my laptop has Bluetooth support, so lets try it out, shall we?

First, we have of course to install all the required software packages. On Archlinux that was all pulled in by installing the bluedevil package. We could now theoretically start Bluetooth already and connect to the device, but lets fix a problem first: Pulseaudio integration: See this Gentoo wiki page, essentially you have to add a Enable=Socket line to the [General] section of your /etc/bluetooth/audio.conf file.

Now, start Bluetooth via /etc/rc.d/bluetooth start 1 and head over to the Bluetooth section in systemsettings. There you should be able to connect to the Boombox using “Add device”. Once that’s done, go to the Multimedia section in systemsettings and prefer the new boombox audio device over your built-in hardware devices. Then, don’t forget to go to the “Audio Hardware Setup” tab, select the Boombox in the “Sound Card” combobox and finally choose the “High Fidelity Playback (A2DP)” profile. If you don’t do that, the audio quality will be abysmal!

continue reading...

KDevelop 4.4.0 Beta 1 Released (August 15, 2012)

Hey all!

After quite some slacking on my side, I’ve finally managed to drop the good news: KDevelop 4.4.0 Beta 1 is released!

Our 4.4 branch already contains some more interesting changes for the next beta, stay tuned. Oh and yeah, we’ll try to release 4.4.0 final sometime in September, I hope.

Cheers

continue reading...

Access klipper clipboard on CLI under KDE4 (August 04, 2012)

NOTE: find most recent version on github: https://github.com/milianw/shell-helpers/blob/master/clipboard

Here’s a little script you can save in your path and do things like

    # paste current clipboard into file
    clipboard > "some_file"
    # copy some file into clipboard
    cat "some_file" | clipboard

Actually I find it rather useful so I thought I should share it.

    #!/bin/bash
     
    # Access your KDE 4 klipper on the command line
    # usage:
    #  ./clipboard
    #    will output current contents of klipper
    #  echo "foobar" | ./clipboard
    #    will put "foobar" into your clipboard/klipper
     
    # check for stdin
    if ! tty -s && stdin=$(</dev/stdin) && [[ "$stdin" ]]; then
      # get the rest of stdin
      stdin=$stdin$'\n'$(cat)
      # oh, nice - user input! we set that as current
      # clipboard content
      qdbus org.kde.klipper /klipper setClipboardContents "$stdin"
      exit
    fi
     
    # if we reach this point no user input was given and we
    # print out the current contents of the clipboard
    qdbus org.kde.klipper /klipper getClipboardContents

continue reading...

KDevelop 4.3.1 Released with improved GCC 4.7 compliance (April 19, 2012)

Hey all!

KDevelop 4.3.1 is out! Go read the announcement and update.

Many thanks to all contributors, you rock :)

continue reading...

KDevelop 4.3.0 - Go Get It! (March 20, 2012)

Finally I managed to get my job as the release dude done: <http://kdevelop.org/kdevelop/kdevelop-430-final-released- basic-c11-support>

Thanks to all the developers who sent in patches! The same goes to our loyal users for their continued support and bug reports :)

It’s really fun to work on KDevelop and - I’ve said it many times before - I’m really looking forward to our next releases! Even now our code in the master branches has some neat commits that make the eventual 4.4 release something to look forward to!

continue reading...

Improving Massif-Visualizer For Large Data Files (March 19, 2012)

As I just wrote in another article, Massif is an invaluable tool. The [Visualizer](https://projects.kde.org/massif-visualizer] I wrote is well appreciated and widely used as far as I can see.

A few days ago though, I did a very long (~16h) Massif run on an application, which resulted in a 204MB massif.out data file. This proved to be a very good stress test for my visualizer, which triggered me to spent some time on optimizing it. The results are pretty nice I thing, so look forward to Massif-Visualizer 0.4:

Reduced Memory Consumption

Yeah, meta eh? Just how I like it! I’ve used Massif to improve the memory consumption of Massif-Visualizer, and analyzed the data in the Visualizer of course… :)

Initial Version

initial memory consumption of the visualizer
fig. 1: initial memory consumption of the visualizer

continue reading...

Tracking Memory Consumption Using Pmap (March 19, 2012)

Massif is a really nifty tool which is very powerful, especially paired with my visualizer. The caveat of course is that it slows down the application considerably, I’ve seen anything up to a factor of 100… I see no alternative to Massif when it comes to investigating where your memory problems come from. But if you just want to see whether you have a problem at all, tracking the total memory consumption should suffice.

A few days ago, I came across pmap on Stack Overflow, which makes it easy to track the RSS memory consumption of an application using the -x switch. Of course I had to write some bash magic to automate this process and visualize the data using Gnuplot! Behold:

memory consumption of PhantomJS
memory consumption of a PhantomJS script over ~30min

continue reading...