BeGeistert 029 coding sprint report

Hello world,
The autumn leaves are falling, which sets the perfect mood for...

The yearly coding sprint!

The room was not too crowded this year, to say the least. We started the week with Jonathan (js), Olivier (oco), François (mmu_man), Jérôme (korli), but they all left on monday and tuesday, leaving just Jua and me for the end of the week.

The sprint was still productive, and quite a lot of progress was made, especially on the web browser.

Note to others: feel free to complete this if you did some work during the sprint. I don't know all the details!

Freepascal port

Olivier writes and maintains Delphi code for his paid job. When he has some free time to spend on Haiku, he maintains the FreePascal port. He continued his work on this, progressing towards getting a recipe done for it, as well as experimenting with Haiku's profiler to see if there were some optimizations to make to the port.

Too many ports

mmu_man did not work on his software porting, but he did work on restoring the PowerPC port of Haiku. This is another one of his ongoing projects to make Haiku run on the Sam440 board, popular amongst AmigaOS users, and he wanted something to show during the Alchimie, which is happening as I write these lines. Unfortunately, being an organizer at the Alchimie he had to leave us earlier than planned.

Rust and gcc6

Jérôme did some progress on porting Rust to Haiku, and also updated our gcc6 recipe (gcc6 is not yet released, but he is tracking the git repo).

MIPS and ARM and clang

js planned to work on either the MIPS or ARM port, but after hitting issues with gcc he decided to continue his work towards replacing gcc4 with clang in Haiku. The goal is to provide a saner and cleaner compilation toolchain, and make porting easier.

WebKit and WebPositive enhancements

This was the main topic for this sprint. Jua finished cleaning up his work and merged both the app_server and webkit sides of his changes, which made Web+ a lot more faster and also fixed several rendering issues. He then spent the rest of the week working on an app-server side cache for alpha masks, as some websites were still very slow at rendering.

On my side, I worked mostly on improving the browser itself.

I implemented a cookie management window where you can view and delete cookies. While doing so, I identified some problems with the design of the cookie jar, which I also fixed. It should now be faster and more thread-safe.

I added a simple session management system, which stores the list of open tabs when closing the app, and restores them on next start. This can save a lot of time when you don’t want to manually reopen all the tabs.

I updated the SSL certificates to a current version. We had been using an old one because we were stuck to OpenSSL 1.0.0. The list of SSL certificates we use is provided by Mozilla, and at one point they switched to a format that OpenSSL couldn’t handle (Mozilla use their own library, NSS, for SSL management). Since a lot of projects rely on Mozilla’s certificate list and use it with OpenSSL, the support for the new format was added in OpenSSL 1.0.2. However, some broken dependency declarations in our OpenSSL packages made it difficult to handle this update properly. The issues have now been fixed. Moreover, I also added a way for Web+ to add temporary exceptions when it hits a page with an untrusted certificate. This means you have to accept the certificate only once, and then it will be accepted for the whole session. There is no way to add permanent exceptions, yet. Implementing this also required extension of the BCertificate API, which is hopefully more useful now.

I also helped Jua review all tickets on our bug tracker that were reporting Web+ rendering issues. It turns out quite a lot of these were already fixed by his work, but some still didn’t. As I had updated OpenSSL and did not rebuild the Qupzilla package, I was left with only Web+ and NetSurf. So I quickly hit the problem that I couldn’t login to my google account. After some time tracking that problem, I finally discovered a set of runtime configuration flags in WebKit that I had completely missed before, and which had inappropriate default values. This fixed most of the remaining problems with WebKit rendering pages (but I’m sure there will be more bugreports coming).

Another small but useful change is that Web+ now declares that it knows how to handle Theora and WebM. The HTML5 video and audio elements identify the codec to use by providing its MIME type. This is a good match to our Media Kit design, so Web+ queries the media kit for supported formats and tries to find a match with the requested one from the webpage. The problem is, some formats have multiple MIME types (such as audio/ogg and video/ogg, for example), and the ffmpeg media add-on was declaring only one of the two possible types.

I updated ffmpeg to version 2.8, which should provide better performance and be more stable. However, I couldn’t test the audio because the hda driver does not work on my laptop, and that seems to not work currently. I will investigate this issue when I’m back at home with my desktop computer.

Random fixes

Some of the tasks done above involved a full or partial build of WebKit. Since this takes quite a lot of time, it was a good opportunity to work on something else.

I first spent some time doing small bug fixes to LnLauncher. It is a tool I use a lot, and there were some bugs in it, in particular, it tended to lose his configuration and erase it with an empty one. This is now fixed and my carefully laid out icons are now safe. There were also some graphical glitches.

Jua discovered Slayer (a process and thread manager similar to TeamMonitor) and started using it for his tests of WebKit rendering performance (it is not a profiling tool, but can give a quick overview of what is going on). I took the opportunity to make Slayer stop showing the idle threads as eating CPU, giving a more useful CPU load information for the kernel team.

As waddlesplash tackled the subject of the PPP stack, I wanted to check if my phone would be able to use it. It turns out it can, but while testing that I found out that I needed a new feature in SerialConnect. It can now convert line endings so you can use it to send AT commands to a phone, for example.

js also complained that our server infrastructure is rather badly architectured and we should consider starting from scratch, with better documentation of how things are set and more streamlining; His plan is to use the haiku-files.org server as an experimentation platform for that, but first we need to remove the old haikuports website which is still hosted there. This is blocked on removing and processing all the trac tickets still listed there (about 20, each with patches pending review). I did some work on that, fixing packages for kqlives, allegro, dumb, sdl_net, f1-spirit, lua 5.1, mxml, dreamchess.

Korli had brought some hardware, inclusing a 20x2 chars text lcd that connects on an USB port. I was intrigued by this (who doesn’t like blinkenlights?) so I played with it a bit and ported the lcdproc driver from Linux. It is having problems when using it with our libusb however, so this will require further investigation (but I got to keep the LCD display).

I also did some work on enabling proxies for HTTPS. I could however not test that code, as the youth hostel where the coding sprint is hosted is filtering and disallowing proxies. I can however confirm that my code doesn’t break what already worked.

Remote entries

Axel and Rene could not attend the sprint in person, but they dod take some days off work to make some progress on Haiku. Axel fixed some problems in the launch daemon and introduced the launch_roster command which allows to control launched jobs and services, and will soon do more.

Rene worked on the Debugger, continuing his work on support for viewing and editing variables of the running program.

Personal conclusion

The coding sprint is a great way to get things done, and also a good motivator for Haiku work. I have crossed a lot of items out of my TODO list, and added even more new ones. A big thank you to everyone who donated to the HSA and Haiku, inc, which makes funding this event possible! I wish there would be more people attending BeGeistert and the coding sprint, it was sad to be only 2 of us this year. But the progress done is still worth the effort, the 16 hour workdays, and the long trip to Düsseldorf by train. I hope to be there next year!