341 points · by p4bl0 · 6y ago · 207 comments
The last stable release of Cairo was in October 2018. A very simple merge request[2] submitted by Nikolaus Waxweiler two years ago has not been merged even though everyone agrees it is good because nobody has been willing to take the responsibility to approve it.
The test suite is broken and tests were failing CI for all commits for a year (until the tests were disabled) because there was nobody who knew how the test suite worked who had time to fix it. There has been a proposal by a Google intern to add fuzzers for OSS-Fuzz to find security issues—but no maintainer has the time to review it.
Yes, there are a few commits and merge requests getting merged here and there, thanks to Uli Schlachter who is still active, but this is a large graphics library with many, many features, used by thousands of applications. It is not finished and not in a good state. Web browsers and other applications that have resources to move to Skia have done so already; GTK probably will not have spare resources to do this.
[1]: https://gitlab.freedesktop.org/cairo/cairo/-/issues/422
[2]: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/...
Looking at the release history, as far as I can tell, every release since 2013 was rolled by Bryce Harrington, who at the time was employed with Samsung Open Source Group. Samsung shut the group down in... October 2018 [1].
[1] https://www.phoronix.com/scan.php?page=news_item&px=Samsung-...
If Cairo didn't have that support, it might have fizzled out much earlier. Or a more heterogeneous community might have emerged, which would be more resilient to a single sponsor dropping out.
If anybody has data (not just anecdotes) regarding this question, I would be very grateful!
Surely, the answer is "no" in absolute terms. In relative terms, however, the answer is "better than none" most of the time.
- A single company is a bad idea. - A single maintainer is a bad idea. - Maintainers from a single country is a bad idea.
So yes, having all of your maintainers in one company is bad for long-term health.
But 1 is better than 0!
https://lists.cairographics.org/archives/cairo/2020-November...
Details and source code here for anyone interested: http://adom.brinkster.net/forum/messages.asp?thread=6420&sta...
Competitors have an advantage where you buy a macbook and the profits go to every single part and not just the eye catching features.
Krita is roughly 500k LOCs of code proper. The KDE ki18n library that is one of its primary dependencies which extends Qts internationalization faculties is... about 7k LOCs. Almost all of Kritas immediate dependencies are small shims except for Qt itself which is produced by an already profitable corporation. So qtbase is about 2.3M LOCs but the Qt Company has ~300 employees with most of them working on it.
Krita with its "killing it" manages to employ 4 people full time to work on development. That is on an install base of several millions of active users. The closest competitor to Krita is probably Paint Tool Sai, a proprietary Windows only program that is made by a for profit Japanese corporation as its largely only product that employs around ~10 people. Getting actual employment figures for Systemax Software Development is actually really hard...
Point is Krita is likely shuffling along with half the full time paid employees of its principal competitor while also likely having a larger installed and active userbase due to it being free software and cross platform. They aren't "killing it" at all, especially if you compare it to the elephant in the room at Adobe with a hundred man development team at least making insane amounts of revenue off licensing of Photoshop.
Its revenue is nothing close to hoist the weight of the entirety of the free software ecosystem upon when it doesn't itself come close to even competing in the field its doing a really good job competing it on a tiny development team.
If a blender dev wants to improve perf and finds that the bottleneck is in some Linux kernel component, they should post a bounty for improving that component.
On Windows:
- Obviously, in Windows, you get the Bluetooth stack automatically, as well as drivers. So I did not have to do any setup. It is possible, though, that some alternate drivers would work better than the default ones, which seem to be buggy.
- Pairing is fairly straight forward. However, sometimes it doesn't work quite right: the device will connect but not function right, sometimes leading to all Bluetooth devices failing to pair or connecting and disconnecting rapidly. This may be related to the driver, although it is using the default driver.
- Playback seems fine when it works. Sometimes it is randomly choppy. My understanding is that Windows 10 supports aptX but not aptX HD, and I can't get it to show up in traces but I suspect aptX is likely the codec being used. SBC is really 'good enough' for most cases though, so it's not a big deal.
- Routing leaves something to be desired. Every single time the device is paired, anything that plays audio needs to be moved or explicitly restarted for it to work. For example, Firefox or Edge tabs playing music typically have to be reloaded even if i unpair and repair the headphones during playback. It also interacts ridiculously poorly with my Realtek drivers, also Windows 10 defaults. I typically have to jump into the weird mixer and try to get everything right when switching between the two, and some apps like Discord act a little weird even then.
On NixOS:
- Not all distros will require this, but NixOS naturally requires configuration by its nature. Here is my audio-related config, in its entirety:
hardware.pulseaudio = {
enable = true;
daemon.config = {
flat-volumes = "no";
resample-method = "speex-float-10";
};
extraModules = [ pkgs.pulseaudio-modules-bt ];
package = pkgs.pulseaudioFull;
};
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
};
nixpkgs.config.pulseaudio = true;
environment.systemPackages = with pkgs; [
pavucontrol pulsemixer broadcom-bt-firmware
];
Most of this is NixOS specific. Some of it is personal: I disable flat-volumes because I do not like flat-volumes. I switch the resampler to a different one to prevent aliasing artifacts. (This may seem like audiophile non-sense, but it actually impacted real-time resampling chibi-tech's album "The Mutual Promise" which has 18-20 kHz sounds in it, designed to sync to some Pripara toys. Pretty interesting stuff.)In any case, it's the whole config. I don't think I ever had to trial-and-error it, I just followed the manual. So not too bad.
Honestly, I fully expected it would not work. And for a long time, I never tried the setup. However, a few months ago I tried it. Here is what I found:
- Pairing works. I have yet to hit an issue where pairing does not work.
- Playback works, and using either Blueman or the PulseAudio mixer it is trivial to switch between A2DP codecs or, if for some reason one would want to do it manually, HSP. Once again, I have not noticed problems. I tend to use the Sony LDAC codec since it seems most appropriate for the headphones.
- Routing seems okay too. I do still sometimes run into a situation where I need to switch an app manually, but it's easy to do in the PulseAudio mixer.
My verdict is that the Linux Bluetooth Audio situation is not bad. Yes, no ordinary Windows user could stomach the Nix configuration in my Nix setup. However, you can notice the lack of hacks needed here: clearly, Bluez and PulseAudio are now up to the task of handling Bluetooth Audio "correctly". I haven't tried but I suspect Debian or Fedora would, with a couple of packages installed, handle Bluetooth devices just fine so as long as the Bluetooth chipset is supported.
Bonus: In the future, Pipewire will take over for Bluetooth audio. For the time being it is limited to SBC and can't handle other codecs yet, but I gave it a shot and it seems to work just fine, too. Hopefully that holds into the future.
Disclosure: I am a Snowdrift.coop cofounder. I have no financial stake in the project (we're a non-profit cooperative and currently a fully volunteer team), although I hope in the future we'll have the income to hire me, for a modest salary.
>Our core feature is a new fundraising approach we call crowdmatching. Patrons donate together by all agreeing to match one another instead of donating unilaterally.
Edit: so, everybody donates the minimum donation of all donations? The "How it works" page is not clear enough.
Software may need to adopt this model.
It's ocurred to me that ancient symbolic megaprojects (e.g., pyramid-building) may have played roles in developing and maintaining technical skills, supply chains, and generaal interest. All the cool hard problems, great minds, and stable funding.
Also, I am pleased that this discussion is in a thread about Cairo.
FOSS purists object, leading to the libre vs gratis rabbit hole.
I'm now revisiting Hintjens' (ZeroMQ) advice around trademarks and licensing.
Maybe there's an angle around trademarks. Like maybe you can call your fork "SuperWidget™ compatible", for a fee.
Dual licensing seems obvious. But maybe we need some new revenue sharing licenses better suited for cloud providers and SAAS. (A life time ago, I used libraries in my shrink-wrap. So negotiating price feels familiar to me.)
Libraries kinda "feel" like music sampling. So I've been skim reading how that world handles royalties. I like that they have boilerplate for all the most common scenarios.
I'm also alert to case studies and financial reports about existing efforts, successful, failed, or otherwise. This solution to funding might just be as simple as mimicking success.
What should be transparent is the amount of money they receive. It should be the oss project leaders responsibility to further distribute the donations. Using bitcoin for transparency. Nobody is going to work for an oss project where the leader gets all the money and doesn't redistribute.
Many intermediaries, institutions and paperwork will ruin that. My 2c.
https://en.wikipedia.org/wiki/Cairo_(graphics)
(I still default to association "Cairo" and shftware with Microsoft, though there's also an Apple/Mac context https://en.wikipedia.org/wiki/Fonts_on_Macintosh#Fonts_of_th... ....)
Forking isn't necessarily bad, but it is often better to keep the "official" status of the upstream project unless it is necessary to drop it.
But for any distro to make use them this needs a cairo release with his patches built in. I found myself periodically visiting cairographics.org just to see if there was an update ready for the next Ubuntu or Fedora. Never done that before for a "boring system package"...
[1]: https://blogs.gnome.org/mclasen/2019/07/27/more-text-renderi...
[2]: The topic of font rendering always evokes responses like "Fonts look fine to me" - good for you, but this actually bothers quite some people. See also: https://pandasauce.org/post/linux-fonts/
Thanks for this very informative post!
Anyway, I've manually built a snapshot of Cairo for Debian: https://salsa.debian.org/liskin/cairo/-/commits/debian/maste... and I have a wrapper around Pango which enables subpixel positioning: https://github.com/liskin/dotfiles/tree/79cef7167a57dde02edf.... It really it noticeably prettier! :-)
I couldn't even begin to understand why the changes required the removal of this feature. But I won't complain, at least someone's doing the hard work.
I'm amazed to see Matthias Clasen still involved 20 years later.
This guy is a hero! True he is paid by Red Hat. But the Linux desktop needs people like this.
More info: https://blogs.gnome.org/engagement/2019/06/11/meet-matthias-...
Few projects ascend to the astral planes of immortality. Even Xorg is on the way out. Computer look and feel is very nostalgic and I hope to visit an API museum when I am older, to e.g. look back on fond memories of using repl.it so much in 2020.
(Tip to any young people who read this far: take lots of full desktop screenshots as you work. You’ll enjoy looking at them in 20 years time.)
At the time, pulling in an open source project was a big ordeal. You had to figure out how to build it, getting all the configuration options correct, pulling in all the dependencies, configuring them, etc. I set aside a whole afternoon to get it working.
Anyway, I pulled it down, built it, and was writing simple drawing programs in about 15 minutes. It was amazing.
I uploaded a bunch of screenshots to r/unixporn just a few years ago and even those already carry some nostalgia :D
If even Xorg doesn't qualify, which are these few immortal projects?
In the 90s, SSLeay shipped with a cute little shell script that makes a self signed CA for you. It’s still shipped as part of OpenSSL, today.
Examples of things you would need to have added in the past few years to stay competitive:
* Vulkan support
* Emoji support (although I'm not familiar enough with Cairo to know if shaping is part of the library)
* Rendering in compute shaders
* New platform support (like MacOS arm or Android)
Already many users have switched to Skia which continues to make progress in all of these areas (and which is much faster).
That would be its sister project Pango:
https://blogs.gnome.org/mclasen/2019/05/25/pango-future-dire...
Calling it dead implies that projects that are currently using it shouldn't use it anymore, but projects for which cairo as-is suffices will continue to work with the features that cairo already has, so why would they need to migrate?
Just as a simple example, if my competition is using a non-dead rendering library and their UI is twice as fast as mine as a result, I'm not going to be happy.
That was the theory behind Cairo. In practice it never worked out and Cairo wasn't able to fully exploit hardware accelerated rendering. Cairo was very complex so it wasn't easy for the maintainers to keep all the various backends up to date.
If something has bugs or lacks features, then it needs maintenance. "Maintenance" for pushing out versions to fulfill expectations of "maintained" is pointless.
What is the big O run time of the various functions? Sometimes someone pops in from a university and knows how to improve an algorithm and shrink its runtime, perhaps based on the latest graphics research, perhaps based on old research which was somehow missed.
That's exactly it, this is essentially a contributor saying "hey, there are a bunch of contributions, can a maintainer please check in this month?" If you don't check in once a week/month, then you're not good.
In Cairo's case: Waaaaay too many projects depend on Cairo as a dependency either through GTK+ or otherwise. You will be breaking heaps of backwards compatibility.
In the past few years X.org had some major ancient holes discovered. If the authors of the fixes hadn't bothered writing the fixes, I doubt many other people would have stepped up.
Development seems active. Last MR/PR merged in was 2 days ago[1]. Isn't all that's lacking is someone to pack changes into a tarball and call it a release?
[1] https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests?...
Can't this be automated?
Meaning, you just volunteered.
Have you ever considered increasing the title character limit slightly? The current limit can have quite a constraining effect on some titles, sometimes to the detriment of the thread.
Having worked with thousands of HN titles over the years, it's amazing how rarely the 80 char limit really gets in the way. It's nearly always possible to make a good title fit, without resorting to weird abbreviations or other gimmicks. So I see it as one of those constraints that serves creativity.
You can see this in the OP actually. The direct quote is:
Is there still somebody around in the cairo community who is willing and able to make a release?
...which is 96 chars. The shortened version seems clearly better as a title, and all I did was take out some redundancies (or, if you prefer, some subtleties that are superfluous in a title).
Edit: if anyone's wondering why so much attention on a mere title - I used to wonder that too, but titles turn out to be a much deeper issue for the site than they at first seem:
https://news.ycombinator.com/item?id=20429573
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
The problem is: there are contributions, there are pull requests, they even get merged. The code gets reviewed, and it’s not an easy feat.
And while it’s all being done, whenever there’s a question of making a tarball, attaching a number to it, making sure the changelog has all it needs to say, people who do code reviews and merge requests suddenly all start feeling tired and bored. Too bored to slap a tag on a repository, too bored to roll a tarball, too proud of being a bottleneck.
Maybe a robot could do releases? It could even build GTK against the newly minted release and run its test suite too...
At least if you care about these things which I do for the use cases I have for a vector graphics lib.
Did this get fixed in the meantime? Last time I checked this[2] was still open.
[1] https://skia.org/user/sample/color?cl=9919
[2] https://openprinting.github.io/gsoc2020/17-get-cairo-code-up...
So really there are 3 possible outcomes here:
1. the contributors pressure one of the maintainers to come back,
2. the contributors get in touch with one of the maintainers and convince them to promote some contributors to maintainers, or
3. the contributors fork Cairo, because they can't get a maintainer involved.
The email comes from a contributor, who is effectively saying "last call for (1) or (2), and then I'm doing (3)".
Pressuring maintainers to come back is foolish.
Many of the people submitting PRs probably already contribute to projects that depend on Cairo. They may even maintain those projects. They may not have spare bandwidth to take on the maintenance of Cairo too.
Unless that pressure has some impact on the maintainer's boss(es).
it dies in the eyes of a new/potential user (who have been conditioned to expect support for the latest/greatest platform).
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n407...
My naive answer was going to be that, from Java's perspective libcairo is part of the underlying OS. But when I wrote my original post, I was taking the fact that libawt_xawt (the awt implementation for X11) links against Cairo at face-value. But looking a little closer at that, it only uses Cairo in its integration with GTK+ (as GTK+ uses Cairo).
Now, OpenJFX (which you could quibble about whether it's "part of" Java) uses Cairo extensively in its implementation of using HTML/CSS for Java UIs.
The developer also produced an incredibly useful SVG test suite comparing various libraries https://razrfalcon.github.io/resvg-test-suite/svg-support-ta...
I've even been able to get it to build on a Pi (although that took more elbow-grease).
Also, if you're using Rust, the rust-skia [0] project provides prebuilt binaries for a bunch of platforms and using it is as simple as putting it in your Cargo.toml.
No release for a few years now. So a lot of bugs in the last release.
Theoretically there is a maintainer but they haven't done any releases. Some bug fixes have been merged into the git repository, but most distros seem to use the last release.
Right now on my system alone, tons of system-critical programs depend on it — Gtk3, Emacs, texlive, pango, gstreamer…
For imagemagick -- but yeah, still applies :)
Make sure to read the hint here: "Someday ImageMagick will finally break for good and we'll have a long period of scrambling as we try to reassemble civilization from the rubble."
https://github.com/femtovg/femtovg
I'm in the process of adding a metal backend and wgpu backend is planned.
It's debatable how production ready it is, but it's a lot more hackable (as in one can work on it since it's a small codebase) than skia or Cairo.
Skia and Cairo are two of the most used 2D renderers. A 2D renderer is an angular piece of software used by every GUI software. It has a key role in 1) rendering correctness (anti aliasing, no bug, no tearing) and 2) rendering performance.
2D renderer performance is key for all graphical workloads, from the scrolling/animation performance of your browser to the smoothness of any non cli software.
As humans we strive for progress, we want tomorrow to be better than now, therefore we want more correctness and more performance by 1) improving 2D renderers where it matters the most and 2) making sure that the right 2D renderer is used by softwares.
For example a big reason of slowness of Firefox a few years ago was because they used Cairo, by switching to Skia they got "free" significant performance gains for the pleasure of all users and even for the pleasure of HN readers currently scrolling this thread.
Skia is the only renderer to have a lot of human resources allocated to it (thanks to Google) and this translate by it being the most performant 2D rendering, sometimes by order of magnitudes.
But skia can become even better by integrating new optimizations, Vulkan, NVpath, AVX, etc
So now you can understand the original statements: Everybody should switch to Skia This means that new and existing software would significantly benefit from switching from Cairo to Skia (this argument was sufficient before the news but is even more important now that Cairo is unmaintained) As an end users you will probably get more FPS, accuracy and lower power consumption (which is ecological btw).
This thread about Cairo being unmaintained could attract potential new contributors. Instead I'm saying to those new contributors: New human resources if not allocated on Skia should go on next gen renderers like fastuidraw Because their work if on Skia would benefit order of magnitude more people. Else they could work on next gen renderers, having talked to the devs of blend2d, fastuidraw, etc I have big doubts they'll ever one day be able to replace skia (too many missing features e.g full SVG compliance) but their performance paradigm shifts could be backported into skia once proved, so contributors could have a huge impact here too.
Now I hope this is clearer for you