Cross-compiling Krita using MXE

Writing code that builds with multiple compilers is good way to catch errors, improve code quality and conformance. Or so I have always been taught. Hence, when we ported Krita to Windows, we ported it to the native compiler for Windows, Microsoft Visual C++. That took some doing, but in the process we found lots of little things that, once fixed, improved Krita’s code. When we ported Krita to OSX, where the native compiler is clang, the same happened.

And then we added two dependencies to Krita that have trouble with Visual C++: G’Mic and Vc. G’Mic implements a parser for a custom scripting language for writing filters, and that parser is written in a way that makes life really hard for Visual C++. Basically, the 32 bits builds never worked and the 64 bits builds need a stack of about a gigabyte to parse the scripts. And Vc, a library to add vectorization/simd support easily, from version 1.0 and up just doesn’t build at all on Windows.

It’s probably not a coincidence that both are heavy users of templates, and in the case of Vc, of C++11. But Krita needs both libraries: our users love all the filters and tools the G’Mic plugin gives them, and without Vc, our brushes and pixel compositing code becomes really slow.

What could we do? Hair was liberally pulled and not a few not unmanly tears shed. We could try to build Krita on Windows using one of the GCC ports, or we could try to build Krita on Windows using clang. We already tried to use Intel’s icc to build Krita, but that broke already when trying to build Qt. (Though that was in the early Qt 4 days, so maybe things are better now.)

But building on Windows will always be slower, because of the slow terminal and the slow file system, and we know that the Windows releases of Gimp and LibreOffice are actually built on Linux. Cross-compiled for Windows. If complex projects like those can manage, we should be able to manage too.

Unfortunately, I’m a bear^Wdeveloper of very little brain, and figuring out which blogs and articles are up to date and relevant for OpenSUSE Leap was already quite hard, and when I saw that the mingw packages for Leap were a year old, I wasn’t prepared to even put a lot of time into that.

Enter MXE. It’s a kind of KDE’s emerge, but for Linux, a bunch of Makefiles that can make a cross-platform build. It comes with a huge bunch of pre-configured libraries, though Unfortunately not everything we need.

So, using MXE, I built Qt and most dependencies. Still missing are Vc, OpenColorIO, GSL, Poppler-qt5 and openjpeg. I also needed to remove some of the hacks we did to make Krita compile with MSVC: we had added a couple of dummy header files to provide things like nothl and friends (these days superseded by QtEndian). A 3rd-party library we embed, xcftools, had its own equivalent of that stuff. But apart from that…

Everything mostly built out of the box, and the result runs in Wine (as evidenced by the “native” file dialog:

What’s left to do? Build the remaining dependencies, add translations, create a packaging script (where’s windeployqt?), and test.

Krita AppImages

Years and years ago, before Krita had even had one single official or unofficial release, we created something called “klik” packages. Basically, an iso that would contain Krita and all its dependencies and that could be used to run Krita on any Linux distribution. The klik packages were quite hard to maintain and hard-ish to use, though. It was easier than trying to build rpm’s for SuSE, Redhat, Mandrake, debs for Debian, PKG for Slackware and whatever else was out there, though.

Fast-forward a decade. Despite advances like Launchpad and the OpenSuse OBS, it’s still hard to create Krita packages for every distribution. There are more distributions, more versions, more architectures… Just maintaining the Krita Lime PPA for Ubuntu and derivatives takes a serious amount of time. Basically, the problem of distributing ones application to Linux users is still a problem.

And if you’re working on even a moderately popular application that has a moderate development velocity, if it’s an application that users rely on to do their job, you really want to provide your work in a binary form.

Distributions do a good job combining all the software we free software developers write into distribution releases; distributions really make it easy and convenient to install a wide range of applications. But there is a big mis-match between what users need and what they get:

Most users want a stable, unchanging operating system that they can install and use without upgrading for a couple of years. On top of that, some users don’t want to be bothered by desktop upgrades, others cannot live without the latest desktop. That’s often a personal preference, or a matter of not caring about the desktop as long as it can launch their work applications. And those work applications, the production tools they use to earn their money with, those need to be the very latest version.

So, Krita users often still use Ubuntu 12.04. It’s the oldest LTS release that’s still supported. But Ubuntu doesn’t support it by providing the latest productivity applications on top of the stable base, not even through backport ppa’s and if you use the Ubuntu-provided Krita, you’re stuck in what now feels like the dark ages.

Enter the spiritual successor of Klik: AppImage. AppImages sprang into the limelight when they got Linus Torvalds’ Seal of Approval. That distributing software on Linux is problematical has been a thorn in his eye for a long time, and when particularly when he started working on an end-user application: Subsurface. When the person behind AppImage created a SubSurface package, that resulted in a lot of publicity.

And I contacted Simon to ask for help creating a Krita AppImage. After all, we are in the middle of working up to a 3.0 release, and I’d like to be able to produce regular development builds, not just for Windows and OSX, but also for Linux.

Krita’s AppImage is built on CentOS 6.5 using a long bash script. It updates CentOS using the Epel repository so we get a reasonably recent Qt5, then installs an updated compiler, gets Krita, installs dependencies, builds dependencies, builds krita, checks all the output for their dependencies, copies them into a tree, edits eveyrthing to look for dependencies locally instead of on the system and packages it up with a small executable that runs the Krita executable. The one thing that was really hard was figuring out how to integrate with the GPU drivers.

You can get the recipe here: https://github.com/boudewijnrempt/AppImages/blob/master/recipes/krita/Recipe.

There are some refinements possible: AppImage offers a way to update AppImages by only downloading and applying a delta, which we don’t support yet. It’s possible to setup a system where we can generate nightly builds, but I haven’t figured out the combination of docker, travis and github that supports that yet, either. And Simon is working on an improved first-run script that would ask the user whether they would like to have some desktop integration, for instance for file handling or menu integration. All of that is in the future. There are also a handful of distributions that disable fuse by default, or close it for non-root users. Unfortunately, CentOS is one of them…

For now, though, it’s really easy to generate binaries that seem to run quite well on a wide variety of Linux distributions, that performs just like native (well, the packages is native), are easy to download and run. So I’m ready to declare “problem solved!”

A Week in the Life of a Krita Maintainer

Sunday, 10th of January

Gah… I shouldn’t have walked that much yesterday… It was fun, to see A’s newborn daughter, A, and then we went to Haarlem to buy tea and have dinner. But with a nasty foot infection, that wasn’t wise. So, no chance of serving in church today. Which means… More Krita time! Around 9:30 started the first OSX build, CentOS build and Windows build, time to try and figure out some bug fixes. Also, reply to forum posts and mails to foundation@krita.org… And prepare review requests for making Krita .kra and OpenRaster .ora images visible in all Qt applications, as images and thumbnails. Fix warnings in the OSX build. Fix deprecated function calls everywhere. Yay! Wolthera and Scott start cleaning up color stuff and the assistants gui. Dinner.

Monday, 11th of January.

Dammit, still cannot walk. But that means… More Krita time! I’m missing a whole day of income, being a small, independent enterpreneur, but I’ve got a better chance of fixing those Windows, OSX and Linux builds. Looks like OSX works fine now, Windows sometimes, but there’s still something wrong with the Linux builds. I think we need more people in our project, people who like making builds and packages, so I can go back to bug fixing. Bug fixes… Let’s fix the CentOS build issue by dropping the desktop file to json file conversion build-time. Fix a memory leak in the jpeg filter, been there for ages. Make it possible to load and save GBR and GIH brushes! Kickstarter feature lands! Not with the big rewrite of our import/export system I’d wanted to do, but it’s better now than it was, import/export can specify a mapping from filename extension to mimetype, so we can load files that the shared desktop’s mime database doesn’t know about yet. Break selecting the right style and theme — oops! Finally fix the unreadable Close button on the splash screen (when the user used a light-colored theme). User-support mail, forum posts, irc chat… Dmitry adds cut, copy and paste of layers, another kickstarter feature! Yay!!! Tonight is roleplaying night, need to prepare the adventure for my players, with maps. (Session report is here.)

Tuesday, 12th of January

Six-forty-effing-five. Alarm clock. I was dreaming of Qt builds going awry, so probably a good time to get up. Erm… Mail, more mail, and forum posts during breakfast. Orange juice, coffee, tea. Off to the railway station around 7:40. Do a couple of Italian lessons with Duolingo while waiting for the train to arrive, interspersed with Facebook Page Manager community management moments. On the train. Sleepy! Time to start working on our OSX port. Beelzy did an awesome job providing me with lots of patches, now they need to be integrated. Cool, Dmitry doing lots of cleanups! But where did Nimmy go? We really need his patch to make Krita work on OSX… Ah! And there’s the bad boy, we accidentally had the wrong application icon. Let’s remove that one, and use ours instead. And then 9:12, arrival in Duivendrecht. 9:25, arrival at the day job — Krita cannot pay my bills yet, so I’m working on a QtQuick1 to QtQuick2 port for a Dutch home automation company. Work, work, work, without a break, until 17:30, when it’s time to go back to the train. Dinner — and yay! Smjert has got his setup fixed and is fixing bugs again. Users keep mailing foundation@krita.org with support questions, and I’m just too nice… Answered. Time to go to bed, around midnight.

Wednesday, January the 13th

Exciting! Windows builds and OSX builds were working last Sunday, and today the Linux appimage builds are working on most systems! We might be able to release the pre-pre-pre-pre-pre-alpha tomorrow! And we’re creating the correct OSX application bundles, with icon! And Timothee has fixed the icon, and Jouni has started implementing importing image sequences as animations! And the alarm clock buzzed me at 6:45. Wait, that’s not yay-worthy. Refactor the PNG export dialog a bit. Work, work, work. I realize that after three months I’m one of the people at this office who’s been here longest. There are ten people who’ve been here for more than six months, twenty who’ve been here for six to three months and it seems there’s a legion who’ve just started… Fix the top toolbar sliders. And I’ve got extra-double-plus long hacking time on the train because the track is blocked and I have to make a detour via Zwolle. No, tonight I’m not going to finish the release notes or the fixed Windows (OpenGL is broken. wth), OSX and Linux packages. Time for dinner, a bath and bed. And all kickstarter rewards except for some shirts have arrived!

Thursday, January the 14th.

Gah, six colon four five. Time to get up. And I was dreaming of a bunch of kittens playing in a hay-loft that was being converted into yuppie student housing. Must be significant or something. At least I wasn’t trying to form keys out of my pillow cover so I could type “./configure” in the qt source directory, which is what my mind tried to make me do last night. Oooh! Ben Cooksley has enabled docs.krita.org, our new manual home! Exciting! People having trouble with preset files, photoshop files, krita files. Let’s try to offer a helping hand, while guzzling orange juice, tea and coffee. Dmitry adds multi-node editing of layer properties, Wolthera fixes canvas rotation. A british VFX studio tries Krita and the artists are excited — must not forget to follow-up Layer property shortcuts, drag&drop in tabbed mode and more gets pushed by Dmitry. At work, there are meetings, and more meetings. The train home fortunately isn’t delayed, because we’ve got our priest and his wife for dinner. After dinner, I go out for a beer with our priest. The barlady wonders what kind of a monk he is, is put right, and later on, after choir practice, our wives join us. No more coding tonight, I’ve had two beers.

Friday, January 15.

My last day on my current contract, but my agenda is full with meetings and things for next week. Next week is also the mini-sprint to prepare the next kickstarter. I’m guessing they’ll want to keep me, we’ll see on Monday. Breakfast. Forum posts. This guy is a bit agressive, though no doubt well-meaning. Mail. Time to get started with the spriter plugin! Jouni fixes the build… I’m fixing OSX stuff left and right, and trying to figure out howto make builds faster, and get them tested. Maybe we can release on Sunday? It’s only a pre-alpha, but still exciting! More forum posts. More work — meetings, it’s the end of our sprint, so sprint review, sprint retrospective, sprint planning…

Saturday, 16 January

I sleep until 9:30. Well, I wake up at seven, but then go back to snoozing and dreaming of the comic book scenario that’s been whirling around my mind for a while now. It’s going to be cool, if I can sit down and do something about. Fried eggs and bacon. Coffee. Orange juice. Tea. Time to fire up some more builds. Things are falling together! Some preliminary tests by other OSX users shows that my packages are okay, on recent hard, with a range of OSX versions. Figuring out the Linux and Windows builds. Some more bug fixing. Jouni pushes an even more advanced image sequence importer. In the evening, guests, but I’m too tired to go down for the Vigil service, and my foot is aching again. But I did buy new, better shoes and some pullovers, because my old shoes and pullovers were completely gone and tattered. That should help…

Sunday, January 17th.

Getting up at 8:45. Time to check a bit of mail, forward an enquiry about a Secrets of Krita download to Irina. Forum posts. This guy sure posts a lot, but it’s all bug reports. Liturgy, fortunately I can serve. Coffee afterwards, then upstairs and switch on the desktop, the windows laptop and the OSX laptop. Ah! The problem with Intel drivers and OpenGL is the same problem we’ve got on OSX: insufficient support for the Compatibily Profile of OpenGL, which breaks Qt’s OpenGL QPainter engine. Good… There’s a way forward. But first…

RELEASE!!!

The New Laptop

So, some time ago, I was wondering a) what new laptop to get and b) what to do with Krita on OSX. As for the laptop, I felt I wanted something fast, something with at least 16GB of memory and a largish screen. Preferably with a good keyboard. As for OSX, I felt it might not be worth either mine or the Krita Foundation’s money to plunk down the serious moolah that Apple is asking for their hardware… After all, how many people fall for Apple’s glamourie, in the real world, after all? Especially now that the reality distortion field’s progenitor is no longer among us.

Then I did an interview with CGWorld’s Jim Thacker, about Krita. He’s very much someone from the graphics software world, not the free software world. And he expressed his amazement at my dismassal of Apple. And then my bank account was getting seriously empty, and I had to take a temporary consulting gig to make sure I could continue paying my mortgage. And at the place I’m working now, and in the commuter train I’m travelling on, more than half of the people have Apple laptops.

I don’t know why… And I guess they don’t know why, either. Well, Windows has always been kind of ugly, especially Windows 7 and 10. Windows 8 I really liked, by the way — if you have a touch screen, the interaction design is simple, effective and efficient. Everything is consistent, easy and pleasant. The few metro apps I used, I loved. But, well, Apple. Apparently more people than I was able to imagine think getting an Apple laptop is a good idea.

So, all together, I decided to go and get an Apple laptop, too. Let’s try to make Krita 3.0’s OS X port a first-class citizen! It can only expand our community and make our next fundraiser stronger!

So we got a 15″ Macbook Pro Retina. Not the most expensive model, but it was still plenty expensive. More than a thousand cups of coffee. Here’s what I think of it, after a month or so.


What follows now is part hardware, part software review. I guess I need to state up-front that while I’m a long-time free software person, I’ve never been an Apple hater any more than a Microsoft hater. Or lover. I’ve used or owned three Apple computers before this one.

The first was a Powerbook Pismo I got when Tryllian went broke and the artist department was disbanded. That thing had a great screen, a great keyboard (apart from the missing keys), a great shape and style, ran OS 9 and OS X equally well. I had wanted one of the tiBooks, but they were all broken. The Pismo served me for a long time as a writing machine, as a holiday games, music and photo machine, as a Krita development machine (it dual-booted to Debian). I loved it, and then a clumsy daughter tripped over the power cable, causing it to drop nearly half a meter, onto the floor. It sparked and smoked whenever I applied current to it afterwards, so I discarded it.

Sadness! But when I started working for Hyves, I got a first generation 17″ macbook pro. Still a thoroughly respectable keyboard (apart from the missing keys), great screen, really fast. And using an Apple laptop was sort of inevitable, since at Hyves we were developing a cross-platform chat client for the Hyves social network. Hyves was the Dutch Facebook, by the way. It’s dead now. So was the Macbook Pro, after a year. After a year in my backpack the screen started developing vertical green, red and blue lines. Actually… It was the second device Hyves got me, the first one was dead on arrival. Still, it had a decent keyboard.

At KO GmbH, one of our less well-considered ventures was to develop a WebODF-based app for the iPad. To that end, we got an iPad and a 2011 Mac Mini. The iPad is still with Jos, but after a while, building Krita for OSX also seemed a good idea, so I got the Mac Mini. It’s got a nice amount of memory, 8GB, and the disk is exceedingly roomy, at 1TB. But… The disk is also really slow, and the Krita hack, build, deploy, test, hack again cycle could easily take an hour! Which is the reason I never really did much Krita on OSX hacking since the 2014 kickstarter, when I first ported Krita to OSX.

(The keyboard I use with the Mac Mini, by the way, is more than excellent. It’s a WASD custom-built keyboard, and I bought it for using with the Thinkstation desktop machine. It’s got a penguin key.)


So, time for the fourth Apple computer. My needs were:

  • Fast
  • Large screen
  • Good keyboard

Two out of three isn’t bad… Except for a laptop that costs more than 2000 euros. I got a 15″ Macbook Pro with a 256Gb SSD. For only about 500 euros more, I would have had a bigger disk, and the disk on this laptop is already fullish, what with two Linux and one Windows virtual machines and an OSX build tree or two.

So, what’s good? The screen is really good, sharp, clear, excellent color, unless you turn the brightness down. It’s not as clear and sharp as the Dell XPS 12 screen, but it doesn’t have the Dell’s ghosting problem. And if you turn the brightness down? The contrast goes down and the colors go down and it looks washed out.

Unfortunately, it isn’t a touch screen, which frustrates me, because I have gotten used to direct interaction in the past couple of years. I also don’t get the way Apple uses display scaling, but that’ll come, no doubt. It seems to me that if you just blow up ever pixel to four pixels the result isn’t really sharper, but somehow it is, for text at least.

It’s also fast. It builds Krita faster than my desktop workstation, which is really impressive. And useful, because apart from writing mail, handling bugs and irc, building Krita is pretty much what I do. Oh, and a little coding…

For the coding, I need a good keyboard, and that’s where this laptop falls down.

The keyboard is ghastly. Honestly. The only reason anyone can think it’s adequate is because they are too young to have used really good keyboards on laptops.

Not only does it still miss Home, End, PgUp, PgDn and Delete (the key Apple labels as Delete is Backspace), the keys have next to no travel. Yes, I get it, thin is the new black. But not when it impairs my productivity. The keys are little black squares of sharp-edged plastic with no shape. And they are also sort of wobbly.

As on Thinkpads, Fn and Control are reversed. Which makes the remarks you read now and then from people who’ve chosen to buy Apple instead of Lenovo because of the Fn key position rather silly.

Because of the lack of Home and End, and because of Apple’s confusion about what those keys should do, it gets really tricky to navigate to the start or end of a line, something which anyone who codes does all the time. You need a different key combination in the shell, in vi, in Qt Creator, in TextMate, everywhere! I am a fast touch typist, but I am having to look under my left hand at the block of Fn, Control, Option and Command all the time to hit the right combination. I still cannot switch between the browser and the terminal and remember the shortcut to move to the next or previous tab, they are different! Honestly, I am not making this up.

The other thing that’s below par, though probably related to the “really fast” bit, is the battery life. Two hours of coding and building will drain the battery down to about 40%. When building in a Windows VM and in OSX at the same time, the charger seems to have a hard time keeping up. I saw the battery drain while it was plugged in. No, I’m not asking you to believe me, I don’t believe myself either.

There are other niggles about the hardware: the laptop gets really hot (again probably related to the “really fast”…), the edges are sharp, the power button is where my little finger expects the delete button. The aluminum case is really prone to scratches, even the plastic zipper of my laptop bag manages it.

But actually, Apple’s design is one reason I didn’t want to wait another six months for the updated model. Just imagine a Macbook Pro that is remodeled after the Macbook redesign, with keys with all of two-tenths of a milimeter of travel! Better live for a bit with an older processor.

Now for the other part of the deal…

Software

The software. OSX. It’s an operating system. Not a particularly brilliant one, but it does run applications. And it’s got a gui with a a window manager. A particularly aenemic window manager that needs extensions to tile windows left and right, but that’s getting “modernized” by making it more like a tablet. In the El Capitan version, it really, really, really wants you to run your applications full-screen. Okay. It’s a bit stupid that from version to version the meaning of the title bar button changes, apparently randomly, too.

What is also quite irritating is the bunch of crap extra applications that take up space and are completely useless to me: safari, garageband, imovie, pages, keynote, itunes and so on. I wonder if I can just trash them…

As a development platform, OSX sucks, too, with limited OpenGL support, huge crippling changes between versions and horrible developer documentation. Oh, and a bunch of proprietary languages and API’s that nobody in their right mind would even consider learning, because they are bound to be deprecated just when they get established.

Conclusion

The short version: I still take the Dell XPS 12 with me on the train most days. It’s slow, small, the keyboard is lacking, and it’s still a more usable computer. If that isn’t a damning indictment, I don’t know what is.

The slightly longer version: the only valid reason to buy an Apple computer is because you need to write software for OSX or iOS, in other words, to provide the people who didn’t have a valid reason to get an Apple with software.

Coda

I bought this laptop from a website with a .nl extension. The website was in Dutch. It’s no doubt being maintained by people who live in the Netherlands and pay income tax in the Netherlands. After ordering it, it was manufactured in China, and shipped from Shanghai to Korea, from Korea to Kazachstan, from Kazachstan to Germany, from Germany to the Netherlands. And then to me. I paid VAT in the Netherlands. At no point in the buying of this piece of crap was Ireland involved.

Except that Ireland’s where the bill was ostensibly coming from.

Tim, me boy, you sell a crap OS on a crap piece of hardware and you’re cheating my country of the tax income it needs, which I and the other Dutch people then need to make up, just so you can sit on a pile of cash big enough to make all of Africa into an affluent continent. If you were an honest dealer, my tax burden would be lower and my laptop would, presumably, be better. And so would the world. Time to think different?

Release date for Krita 2.9

After a short discussion, we came up with a release date for Krita 2.9! It’s going to be… February 26th, Deo volente. Lots and lots and lots of new stuff, and even the old stuff in Krita is still amazing (lovely article, the author mentions a few features I didn’t know about).

Then it’s time for the port to Qt5, while Dmitry will be working on Photoshop-style layer styles — a kickstarter feature that didn’t make it for 2.9.0, but will be in 2.9.x. A new fundraiser for the next set of amazing features is also necessary.

Of course, there are still over 130 open bugs, and we’ve got a lot to do still, but then the bugs will always be with us, and after 2.9.0 a 2.9.1 will surely follow. But I do care about our bug reports.

Some people feel that in many projects, bugreports are often being discarded in an administrative way, but honestly, we try to do better! Because without user testing and bug reporting, we won’t be able to improve Krita. After all, hacking on Krita takes so much time that I hardly get to use Krita for more than ten, twenty minutes a week!

We fixed, closed or de-duplicated 91 bugs in the past seven days. Of course, we also got a bunch of new bug reports: 25.

So, I want to take a bit of time to give a public thank-you to all our bug reporters. We’ve got an awesome bunch of testers!

For example, one tester has reported 46 bugs against the 2.9 betas: that is a pretty amazing level of activity! And we have by now fixed 33 of these 46 bugs. By testing betas and painstakingly carefully reporting bugs, often with videos to help us reproduce the issue, Krita has become so much better.

If you use Krita and notice an issue, don’t think that you’ll hurt us when you report the issue as a bug — the only thing we ask from you is that you do a cursory check whether your bug has already been reported (if it isn’t immediately obvious, report away, and if it’s been reported before, no problem), and that we can come back to you with questions, if necessary.

Master builds for OSX and Windows, an update

So I spent three full days trying to make working builds for OSX and Windows. Mostly OSX, with a side-dish of Windows. Here’s a short update. I’m using this git repository as a build system. It’s basically a set of cmake extern projects, one for each dependency. It’s still a mess, there are definitions for dependencies we no longer need, like glew.

Both on Windows and on OSX, I setup a development tree with this repo, a build directory for the dependencies, an install directory, a download directory and a second build directory for doing Krita development.

I’m using Qt 5.6 alpha, by the way, compiled to exclude dbus and some other things.

OSX

On OSX, there were some weirdnesses: OpenColorIO seems hardcoded to want myptch as a patch command, not just on Windows, but everywhere… That needs patching, of course, or symlinking patch to mypatch.

Eigen3 doesn’t want to build because it needs a dart file for some test setup which we don’t want to build. Patch in the cmake project.

Qt’s macdeployqt needs patching as well, the patch is in the cmake project. After building Qt with -rpath, it became necessary to manually set the rpath on desktop2json: as built by kcoreaddons, it won’t run because it cannot find Qt.

Finally, I managed to build everything including Krita. In order to run Krita, it’s necessary to use macdeployqt to deploy all plugins, libraries and frameworks to the app bundle, and then manually use install_name_tool to add @executable_path/../Frameworks to the rpaths of the executable.

But… Somehow, macdeployqt refuses to deploy the QtNetwork framework out of all Qt frameworks it deploys to the krita.app bundle. No idea why, yet, I had to stop debugging that because it was bedtime… More next weekend, but it is progress.

Windows

On Windows, I use the same kritadeposx repo: the name is wrong. When everything works, I want to add the externals definition to krita’s repo. In any case, with some coaxing, I got most things to build. Almost.

Qt was a bit of a problem: QtDeclarative just doesn’t build with Visual Studio 2015. Not sure why, for now I didn’t need that module.

Then it turned out that ki18n cannot find the gettext executable. I could bull past that by commenting out the line where it looks for it, but then the same happens when trying to configure Krita. It needs more investigation why this happens.

At that point the laptop overheated and shut down and I wasn’t motivated to start it up again, so again more next weekend… With hopefully more progress.

Krita on OS X

Ever since our first kickstarter in 2014, we’ve been building every release of Krita for OSX. The initial work to make that possible took two weeks of full-time hacking. We did the work because Krita on OSX was a stretch goal and we wanted to show that it was possible to bring Krita to OSX, not because we thought two weeks would be enough to create a polished port. After all, the port to Windows took the best part of a year. We didn’t make the stretch goal, and the port to OSX got stuck.

And that shows. We build Krita on a mid-2011 Mac Mini that runs Mavericks. That has a couple of consequences: Krita doesn’t run well on anything but Mavericks, and the hack-build-test cycle takes about half an hour. That means that fixing bugs is nigh on impossible. Some things have been broken since the start, like OpenGL, other things broke along the way, like proper tablet support, loading and saving jpeg files. And more. Still, though we didn’t make the stretch goal, the demand for Krita on OSX is there: we’re getting about half a dozen queries a week about Krita on OSX. So, what should be the next steps?

Step one: define the goals. That’s easy. Krita on OSX should run on all versions of OSX that are supported by Qt5, be a good citizen, that is, come as an app bundle in a disk image, save settings to the usual locations, use the regular temporary file location and provide the same feature set and performance as on Windows and Linux. (Which might be difficult because of problems with Apple’s OpenGL implementation: Apple wants developers to use their platform-specific alternative.)

Step two: estimate the effort needed. With the Qt5/Kf5 port of Krita, estimation is more difficult because only now people are creating the first Kf5-based applications on OSX, and are running into new and interesting problems. Things like finding resources in standard locations: for Krita 2.x, we had to hack KDE’s standard paths implementation quite severely. The main issues are: OpenGL, tablet support, standard paths, bundle creation, platform integration and optimization.

My best effort estimation is three to four months of nearly full-time work. That’s similar to the Qt5 port, and comes to about 12,000 to 16,000 euros. Add in a decently fast Mac, and we’re looking at, roughly, an investment for 15,000 to 19,000 euros. Add a bit for unexpected events, and let’s say, 20,000 euros. A lot of money, but actually quite cheap for a development effort of this kind. It’s more than the Krita Foundation has availabe, though…

There is a secondary consideration, borne from experience with the Kf5/Qt5 port: if it will take three months of development time, then that development time is not spent on other things, like bug fixes or kickstarter features. That will have an immediate impact on the project! The port has already made the bug list grow horribly long, because work on the port meant less work on bug fixes.

If we decide to it, step three then must be: do it… There are a couple of possibilities.

The first: run a kickstarter campaign to get the money. Wolthera and I actually started setting one up. But we’re just not sure whether a kickstarter campaign is going to succeed, and to fail would be really bad. It would reflect badly on Krita as a wider project and might jeopardize the 2016 kickstarter campaign to fund the next round of feature improvements. It might even cannibalize the 2016 campaign. We’re not sure how likely that is, though, because we’re not sure the campaigns would be targetting the same user group. Right now, our campaigns are supported in equal parts by free software enthousiasts and by artists. We’re not reaching the OSX community, because Krita isn’t ready on OSX, but conversely, we don’t know how to reach the OSX community. We don’t even know whether the OSX community can be involved enough to reach a funding level of at least 15,000 euros.

That makes starting a kickstarter campaign (which is in itself two months of full-time work) a really dicey proposition. Even cutting the goal up into tranches of 5000 euros for the basic port (and a new Mac) and then stretch goals of 2500 euros seemed chancy to us. Plus, if we get stuck at 5000 euros there really is not enough money to do a decent port.

The second possibility: fund it out of pocket, and try to get the investment back. That could be done by making Krita for OSX exclusively available on Steam, or by a possible increase in donations because we can now reach the OSX user community. The first option could be scotched by someone taking our work and making Krita available gratis on OSX. That would be totally OK of course: Krita is free and open source. Nothing says we have to give our binaries aways, but on the other hand, nothing can stop anyone else from giving our binaries away. Or making their own, once the hard work is done. The second possibility, increased donations, is a kind of gamble. It might work out, or it might not…

The third possibility: fund the development out of pocket, but take a longer period to work on it. Get a Mac and devote, say, two weeks of initial work, and then invest a day a week to OSX. Slice up the week. A bit like I’m now doing four days a week of paid non-krita development to fill up my empty bank account, one day a week of porting and one day a week of stable-version bug fixing.

The final possibility is to do nothing. Maybe a capable OSX-loving developer will come around and start doing the work out of love for Krita. But I’m not sanguine about that happening, since we’ve seen four or five people trying to build Krita on OSX, and all but two failed. The first attempt was using MacPorts, which doesn’t lead to an installable app bundle, and the second attempt was the one done for the 2014 Kickstarter.

Which brings us full-circle to the question: what now?

Qt World Summit 2015

I hadn’t been able to attend the Qt Dev Days since the old Nokia days… My last one was when they handed out the blue N9’s. KDE, as a sponsor/partner for the Qt World Summit, had access to a number of passes, and was going to have a booth, and I applied for one. I like doing booth duty and I think I’m fairly good at getting people to listen to our spiel. Here’s a report from the trenches!

Monday is training day, and the KDE team didn’t have passes for trainings. Besides, it probably was more instructive to sit in the hack room and hack anyway. With about ten KDE hackers around, the room was full and stuffy, but on the other hand, it was like a mini sprint. At the end of the day, I had the kxmlgui framework in a state where I could use it again for Krita without needing to fork it.

Very gratifying was the recognition KDE got on Tuesday, during the intro talk and the keynote by Lars Knoll. We know we’re doing a good job stress-testing Qt, and a good job as a community helping Qt develop and grow, and it was good to see that recognized.

Not so awesome was the need another keynote speaker felt to connect to his public by making a little “I won’t tell my wife” joke. Not terribly seriously over the edge, perhaps, but unpleasant nonetheless. When can we have a tech conference where speakers don’t assume that their public are heterosexual, white, middle-aged married men? I happen to be one of them, of course…

I didn’t attend many presentations. Of the talks I attended, both Guisseppe D’Angelo’s “Integrating OpenGL with Qt Quick 2” and Olivier Goffart’s “Using namespace std:” stood out because the presentation was clear, the information went deep so I could learn something new. Olivier’s way of engaging with the public worked really well.

The real meat of the QtWS was working the booth, though. We had a good presentation: nice blue table cloth, two good posters (need to have OS logo’s next year, most people thought KDE was Linux-only), a presentation running on a big screen and videos (Plasma Phone, Calligra Gemini, Krita) running in a loop on a nice convertible Windows 8 laptop, together with some software, like Krita Gemini and Marble to show people that KDE’s Frameworks are a truly tested technology you can use to create serious real-world technology. Here’s a picture Dan took:

That was a story that worked: almost everyone whom I asked “do you know KDE” answered with “Yes, I even used to use it”. So I’d go on explaining that KDE is more than the desktop they used to use, but that there’s this set of frameworks, full of tried, tested and reliable technology. Some examples later, I’d point them at the inqlude website. KDE really doesn’t have a website that ‘sells’ Frameworks, which is a problem. Inqlude worked, though. I could also help reassure some people that doing a new desktop application with QWidgets wasn’t a choice for a dead technology, also by showing off Krita Gemini: QWidgets and QML in the same application, with a seamless switch. All in all, we reached a fair number of interested people and we had a story that appealed and got through.

Wednesday evening, my feet ached and the arm that I had broken just before aKademy was very painful as well, but I was pretty satisfied. Plus, I had a stack of Kiki postcards, and pretty much everyone whom I handed one smiled, no matter how tired they were!

One cannot visit Berlin and skip seeing one of the museums. That’s my story, and I stick to it. This time, I went to the Gemäldegalerie. Usually, I visit the Bode Museum, which has some incredible sculpture. The Gemäldegalerie was showing a special exhibition around Adobe’s famous Illustrator splash screen’s painter. The exhibition was a tad disappointing though.

Botticelli’s work was shown together with 19th and 20th century works inspired by him. Some of those works were really interesting, some were boring. Warhol’s Venus on an Amiga 1000 is much less interesting than the Amiga 1000 itself. Other works were more interesting, like Antonio Donghi or Evelyn de Morgan. But that’s fine: not everything needs to be riveting. More of a problem was the presentation of Botticelli’s works themselves: a
boring, long row of paintings grouped by subject. As if the exhibition designer was fresh out of inspiration. The central room with the sole two works signed by Botticelli was flooded in a red light that made it impossible to see anything.

Anyway, after the exhibition followed a four kilometer walk through the galleries, with so many great paintings that a certain visual indigestion was inevitable. But I’ll go again, and perhaps again. This might be my favorite for now, with the red-haired girl helping her grandmother, and the dancing pair:

 

Which laptop?

All the old hardware I kept from my KO GmbH days is, well, old, and dying. The Thinkpad’s hinges are breaking, the Dell XPS 12’s has a really small screen and is too slow for development work, the Thinkstation desktop machine has been throwing compiler segfaults for a year now. I’ve got a bunch of Intel Software Development Platforms, which are interesting laptops, but without battery life. And the Surface Pro 3 is a test device, not suited to develop on either. Even the Dell monitor is slowly losing what little contrast it had.

But what to buy?

I need a good keyboard, a good, largish hi-dpi screen (to check whether Krita handles that okay), at least 16 gb of memory and a big, fast disk. I have multiple checkouts of Krita, I build million+ lines of C++ code projects all day long, run virtual machines and, well, Krita likes lots of memory as well.

I could buy a Mac… It would help porting Krita to OSX. But it would also mean using a Mac. I’ve done that before, but I didn’t like it. The keyboard shortcuts are all wrong, the window manager is aenemic and the whole platform goes out of the way to patronize its users. Plus, Macbooks don’t have separate home, end, page up and page down keys, and there still isn’t even a backspace key. And, expensive as Macbook Pro Retina’s are, they don’t even come with a touch screen, which is a convencience I’ve come to really appreciate. And the processors available now are a generation out of date.

I could buy a Dell. An XPS 15, or a Precision. I would have a really good screen, an up-to date-processor and 16 gb of memory. So far, so good. But all these workhorses have the same keyboard as the XPS 12, which means, no Home, no End, no PageUp, no PageDown. Look, dear laptop manufacturers, I’m editing all day long. I need to zoom through my text. That needs those four keys!

I could by a Lenovo. No, scratch that. Lenovo has squandered whatever good will they had by dropping build quality year over year. Every new Thinkpad is worse than the previous generation. The keyboards have all the keys, though. The screens are often really dim, have really low contrast. And those breaking hinges… And, except for a gaming laptop, no configuration with more than 8GB of memory, no Hi-DPI screens. Even the X1 Carbon doesn’t seem to go to 16GB! If it did, I might still be tempted, despite the hinges, because it’s at least got the home, end, PgUp and PgDn keys.

I could wait and buy a Surface Book. It might be a bit small, but it has most keys (weirdly enough no Ins key, which I actually use a lot), but the screen’s aspect ratio is pretty good. I’m just worried that it, being so thin, won’t be able to stand all the compiling I’d be doing. On the other hand, it’s got a pen, which is pretty useful for me. No word on when it will become available, though…

So, what I need is Lenovo’s keyboard, Dell’s processor, screen and memory, Microsoft’s pen and the ability to run OSX for porting Krita…

The Art of Language Invention

“Careful now. I must say this right. Upe, I have killed your husband. There’s a gold hairpin in his chest. If you need more soulprice, ask me. Upe, bing keng … No, that doesn’t start right. Wait, I should say, ‘Upe, bing wisyeye keng birikyisde… And then say sorry. What’s sorry in this stupid language? Don’t know. Bing biyititba. I had to… She can have the gold hairpin, and the other one, that should be enough. I hope she didn’t really love him.”

This is a tiny fragment from the novel I was writing when I started hacking on Krita… I finished the last chapter last year, and added a new last chapter this year. The context? Yidenir, one the protagonists, an apprentice sorcerer, is left alone by her master in a Barushlani camp, where she lives among the women, in the inner courtyard. When she learns she has been abandoned, she goes to the men’s side of the tent, argues with the warlord and to make sure he understand she’s a sorcerer, kills his right-hand man, by ramming one of her hairpins in his chest. Then she goes back, and tries to figure out how to tell that henchman’s wife that she has killed her husband. A couple of weeks isn’t long enough to learn Den Barush, as Barushlani is called in Denden (where ‘barush’ is form of the word for ‘mountain’).

Together with the novel, I wrote parts of a grammar of Barushlani. I had written a special application to collect language data, called Kura, and a system that used docbook, fop and python to combine language data and descriptive text into a single grammar. I was a serious conlanger. Heck, I was a serious linguist, having had an article published in Linguistics of
the Tibeto-Burman Area
.

But conlanging is how I started. I hadn’t read Tolkien (much, the local library only had Volume II of Lord of the Rings, in a Dutch translation), I didn’t know it was possible to invent a language. But around 1981 I started learning French, English and German, and with French came a grammar. A book that put down the rules of language in an orderly way, very attractively, too, I thought. And my mind was fizzing with this invented world, full of semi-hemi-demi-somewhat humans that I was sculpting in wax. And drawing. And trying to figure out the music of. My people needed a language!

So I started working on Denden. It’s no coincidence that Denden has pretty much no logical phonology. Over the years, I found I had gotten sentimentally attached to words I invented early on, so while grammar was easy to rewrite and make more interesting, the words had to stay. More
or less.

Then I started studying Chinese, found some like-minded people, like Irina,
founded the Society for Linguafiction (conlang wasn’t a word back then), got into a row with Leyden Esperantist Marc van Oostendorp who felt that languages should only be invented from idealistic motives, not aesthetic. I got into a memorable discussion in a second-hand bookshop when a philosopher told me smugly that I might have imagined I had invented a language, but that I was wrong because a) you cannot invent a language and b) an invented language is not a language.

I got into the community centered around the CONLANG mailing list. I did a couple of relays, a couple of translations, and then I started getting ambitious about my world: I started working on the first two novels. And then, of course, I got side-tracked a little, first by the rec.arts.sf.composition usenet group, where people could discuss their writing, and later on by Krita.

These days, when we need words and names for our long-running RPG campaign, we use Nepali for Aumen Sith, Persian for Iss-Peran. Only Valdyas and Velihas have proper native language. The shame!!

And apart from RPG and now and then writing a bit of fiction, I had more or less forgotten about my conlanging. The source code for Kura seems to be lost, I need to check some old CDR’s, but I’m not very hopeful. The setup I used to build the grammars is pretty much unreconstructable, and the wordprocessor documents that have my oldest data don’t load correctly anymore. (I did some very weird hacks, back then, including using a hex editor to make a Denden translation of WordPerfect 4.2.)

Until today, when young whipper-snapper David J. Peterson’s book arrived, entitled “The art of language invention”. Everything came back… The attempt to make sense of Yaguello’s Les Fous du Langage (crap, but there
wasn’t much else..) Trying to convince other people that no, I wasn’t crazy, trying to explain to auxlangers that, yes, doing this for fun was a valid use of my time. The Tolkienian sensation of having sixteen drafts of a dictionary and no longer knowing which version is correct. What’s not in David’s book, but… Telling your lover in her or your own language that you love her, and writing erotic poetry in that language, too. Marrying at the town hall wearing t-shirts printed with indecent texts in different conlangs, each white front with black letters shouting defiance at the frock-coated marriage registrar. (I don’t believe in civil marriage.)

Reading the book made me realize that, of course, internet has changed what it means to be a conlanger. We started out with literally stenciled fanzines, swapping fanzine for fanzine, moving on to actual copiers. Quietly not telling my Nepali/Hayu/Dumi/Limbu/comparative linguistics teacher what I actually was assembling the library of Cambridge books on Language (the red and green series!) for.

Linguistically, David’s book doesn’t have much to offer me, of course. I adapted Mark Rosenfelder’s Perl scripts to create a diachronically logical system of sound changes so I could generate the Barushlani vocabulary. I know, or maybe, knew, about phonology, morphology, syntax and semantics. I made my first fonts with Corel Draw in the early nineties. I had to hack around to get IPA into Word 2. But it was a fun read, and brought back some good memories.

And also some pet peeves… Dothraki! I’m not a Games of Thrones fan, I long for a nice, fun, cosy fantasy series where not everyone wants to kill, rape and enslave everyone else. I found the books unreadable and the television series unwatchable. And… Dothraki. David explains how he uses the words and names the author had sprinkled around the text to base the language on. Good job on his side. But those words! Martin’s concept of “exotic language” basically boils down to “India is pretty exotic!” It reads like the random gleanings from the Linguistic Survey of India, or rather, those stories from the Boy’s Own Library that deal with Hindoostan. Which is, no doubt, where the ‘double’ vowels come from. Kaheera’s ee is the same ee as in Victorian spellings of baksheesh and so on. Harumph.

BUT if the connection with television series helps sell this book and get more people having fun conlanging, then it’s all worth it! I’m going to see if I can revive that perl script, and maybe do some nice language for the people living in the lowlands west of the mountain range that shelters Broi, the capital of Emperor Rordal, or maybe finally do something about Vustlani, the language of his wife, Chazalla.

Let’s go back to Yidenir, doing the laundry with poor disfigured Tsoy… Tsoy wants to sing!

Yidenir, ngaimyibge?” Another fierce scowl.

“What did you say? — do I sing? Er…” Yidenir was silent for a moment. Was this girl making fun of her? Or was she just trying to be friendly?

Sadrabam aimyibgyi ingyot. Aimyibgyi ruysing ho,” Tsoy explained patiently.

“Er, singing, is good, er allowed? when doing laundry? Oh, yes, I can sing… Denden only, is that all right? Er, aimyipkyi denden?

Ruy!

“All right, then… Teach you a bit of Denden, too? Ngsahe Denden bingyop?” Yidenir offered.