PulkoMandy's blog

Working on WebPositive

Blog post by PulkoMandy on Fri, 2013-08-30 00:56

As you may know, I'm going to spend some time again as a full-time Haiku developer. This time, I'll be working on improving WebPositive and the WebKit port to bring a better web browsing experience to Haiku users.

During the past weeks I've managed to spare some free time to get up to speed on the various pieces of code involved and how to work with them. This first blog post summarizes the current state of affairs and I'll set some goals (with your help) for the next monthes.

BG026 Coding Sprint report

Blog post by PulkoMandy on Fri, 2012-11-09 08:49

Hi there !
This week was the BeGeistert coding sprint. I assume you already read the great report at IsComputerOn about the conferences for this week-end, so here's just a summary of the work done durint the coding sprint.

ARM Port - Ithamar Adema, René Gollent, Adrien Destugues

Ithamar was holding the keyboard on this one. He's working on low-level Android stuff as his paid job, so he has a good understanding of the hardware and the Linux kernel that serves as a reference.

The ARM port was started as a Google Summer of Code project back in 2009. The project got the kernel compiling, and the bootloader working. Things more or less stayed there after that. However, with the recent release of the Raspberry Pi and some other cheap ARM-based hardware, there is interest for ARM again.

Ithamar is working with the Gumstix Verdex board. This is what was used for the work in 2009. That board is quite old by now, but it has a complete emulation in QEmu which is very useful for debugging the kernel.

We worked on getting interrupts, context switching, and page faults working. This brings the kernel to the point where it says "Cannot find any boot partitions", because there is no mass storage driver yet (it also lights 4 icons on the bootscreen, which is also working). We tried to add the usb mass storage driver, but that reliably triggers a panic which also happens, but only sometimes, on x86.

We also did some work (with remote help from Oliver Tappe) in getting the ARM toolchain working on Haiku. The compiler can now be built, and u-boot tools are ported (they are required to build a bootable image that the u(boot bootloader can work with). The build of an ARM version of Haiku still requires a tool to create partitions from the command line, and some scripts changes to use our own mkdos command instead of dosfstools mkdosfs. Ithamar may work on this since he now has installed Haiku on his laptop.

FDT support - François Revol

As part of his work on the PowerPC port, François is working on Flattened Device Tree support. The FDT is a data structure passed by the u-boot bootloader to the booted kernel. It describes the hardware the kernel is running on, and allows to find where are the serial port, frame buffer, keyboard, mass storage, RAM, etc. needed by Haiku. This avoids hardcoding drivers to fixed addresses for these peripherals. Since u(boot is also used on ARM devices, this work will be reused there as well. This will make it easier to port Haiku to more hardware with PPC and ARM chips.

BMenu tracking code rework - Alexandre Deckner

The code in BMenu is one of the most messy parts of the interface kit. Each menu is actually a BWindow, which means it gets its own thread and event loop. As a menu tends to share a lot of data with its submenus, the code is very messy and has a lot of small bugs. Alexandre is reworking this code to use a better solution.

WebPositive service kit network backend - Alexandre Deckner

The Services Kit is another of our past GSoC projects (2010). The plan is to have a full-featured http API for getting information from web services more easily. The kit has been merged into Haiku but is completely undocumented, so it's not seeing much use.

Alexandre started by merging some patches for better https support. He then tested the kit by writing a weather deskbar replicant that makes use of it.

But the core of this work was on the WebPositive broser. The browser currently uses WebKit's default Curl backend. While being the default, this is not used by most WebKit based browsers and has a number of problems with cookies, caching, and https connexions, as well as being quite slow. The idea is to replace this with a backend relying on the services kit, to avoid this problem. This means the cookies and other information will be shared with other applications using the kit.

Debugger improvements - René Gollent

René worked on watchpoints support in Debugger. That's one more step on making it a suitable replacement to GDB.

Stack&Tile fixes, ALE, and more - Clemens Zeidler

Clemens is currently working on his phd at the university of Aukland. The research department has some projects focused on improving user interface interaction. They use Haiku as a prototype for their research, as it is easier to modify things that affect the whole system. You already kow their work as the Stack and Tile support and the Aukland Layout Model.

This year Clemens showed us the Aukland Layout Editor which is a drag and drop tools for laying out an user interface. It can be used at runtime on ALM-based windows to freely alter the layout. Clemens asked each of us to go through a set of test applications to see if we managed to use the feature to make our work more efficient. There is also support for graphically routing events (such as a button click) to actions, in a way similar to the Cortex application. That stuff looks very promising.

Clemens also fixed some Stack and Tile related bugs in Haiku.

fRiSS user interface update - Adrien Destugues

fRiSS is an RSS and ATOM feed reader for Haiku. It just displays news items from your favourite websites in a window or a desktop replicant. fRiSS is available in Haiku as an optional package, and I'm working on improving it.

With the apha 4 release around the corner, I wanted to improve the user interface that was quickly hacked together. I cleaned up the code and improved the drwaing so it looks more like a regular Haiku application. This was finished right in time for the Alpha 4 code freeze, so people installing alpha 4 will get the very latest version of fRiSS.

NetSurf browser improvements - Adrien Destugues

NetSurf is a web browser. Originally developped for RiscOS, it has a focus on being very fast and lightweight. The BeOS port was started by François Revol with the target of replacing NetPositive. His main use for that was using Netsurf as a replicant inside the BeHappy application. this means while the html rendering works very well, the UI shell around it stayed very basic.

My work included adding graphical toolbar buttons, a download window (not saving the file to disk yet !), some event loop fixes to avoid network activity freezig when the UI is not doing anything, and updating the port to the latest sources from NetSurf git tree. I also added the support for automatically stacking windows using Stack&Tile, which removes the need for any in-application tabbing. I hope to see more applications supporting that soon, maybe starting with Terminal.

NetSurf is a very nice browser and much faster than the alternatives on Haiku. Its main drawback is the lack of JavaScript support, but the developpers are actively working on that. I think this browser has some potential for becoming the standard choice in Haiku. It is also much faster to compile than WebPositive with the whole WebKit framework, which makes it a lot easier to improve on it.

One last mention : I also did some work on APlayer, a release should not be too far but there are some issues I'd like to solve first.

The end.

Overall, this was a pretty good coding sprint with lots of stuff going on. We also saw some remote activity as the Alpha 4 release saw his code freeze happen during the week and is now in final testing stage. If all goes well, it will be available on monday.

BeGeistert 024 + Coding sprint report

Blog post by PulkoMandy on Fri, 2011-11-04 12:17

I'm heading home from the BeGeistert event that just ended today.

For those who don't know, BeGeistert is the european meeting of all Haiku (and BeOS) developpers and enthusiasts. This year, Haiku has seen its third alpha release, and we feel that R1 shouldn't be too far.

So, what happened there ? Over the weekend we had multiple conferences. The first one on saturday morning was a discussion on Haiku's release process and roadmap for the future. We didn't have time to solve all the problems, but at least one important decision was taken : after delaying the switch to git to after alpha3, then after gsoc, we finally decided it was about time to actually flip the swith. This is scheduled for the 12th of November.

Speaking of Git, Oliver Tappe made a talk about how to use it and the main differences with the current Subversion, and presented the work done so that Haiku developpers don't get lost.

Then, there were talks from Ingo and Oliver about package management, with an impressive demo of the current status It's working, but there are some problems with it like deskbar replicants not working anymore because of the readonly nature of packages (that was solved later during the coding sprint).

Stippi presented us the layout API and some examples on how to use it. The Layout API is an extention to the interface kit that allows much more easier design of window layouts.

François Revol presented us a proposal for UXA, an unified extended attribute scheme to efficiently share attributes between different OSes. While many filesystems and OS now support attributes like Haiku (NTFS, ReiserFS, ...), they all use their ownscheme and the conversion from one to another isn't always a reversible process.

We also had a presentation of an application called VOPTOP, which is a nice peer-to-peer VoIP chat application. The main feature is it uses peer to peer routing to make the communication. This makes it needed to use encryption to make sure one pf the peers doesn't spy the communication.

Finally, Matt Madia told us about the status of Haiku, Inc. Besides helping with the funding of BeGeistert, they are paying mmlr for a full-time year working on Haiku, which is likely to bring us much nearer to R1. The donated amount to Haiku, Inc. this year was rather impressive, which makes it possible to think about more contracts for Haiku developpers, but also things such as giving Haiku shirts to people showing out Haiku at various free software conferences (to strenghten the image of the project).

Axel proposed a patch hour on sunday. An ongoing problem in Haiku is the unability to handle patches submitted by users on Trac. Our policy is to review the patch, and ask the author to improve it. Quite often several rounds of improvements are needed, and people don't react too fast or give up on the amout of work needed to get the patch in. So, the patches tend to accumulate in trac and never get commited. They get out of sync with svn trunk, and it is not possible to apply them anymore. So, Axel took the list of 144 patches waiting on Trac, and wrote the ticket id of each of them on a piece of paper. Each of us was given 5 tickets to look at and make a decision. Either cleanup and apply the patch, or reject it if it doesn't work. At the end of the hour, about 40 tickets were closed. Some of us continued looking at the list over the week, and now there is less than 80 patches left, so the list has decreased by half.

As the weekend was over, the coding sprint started. 9 developpers were present this year : Matt Madia, François Revol, me, Olivier Coursiere, Ingo Weinhold, Michael Lotz, Oliver Tappe, and Rene Gollent. With the imminent switch to Git, Matt worked on getting a buildbot running with it to replace Build-O-Matic that only does SVN. However, he ran into some weird problems with building the now 10 years old gcc2 on FreeBSD, so not everything is working yet. François worked on bringing the 68k port of Haiku back in compiling state, as it was broken by some architecture changes. This was a success, as we can now run KDL on the aranym emulator. The work stopped at needing a build of the ICU package, which is a bit painful to do for platforms other than x86. Olivier worked on Lazarus, a Qt-based Delphi clone that now mostly runs in Haiku. He also made some stress testing of Haiku by copying the OpenOffice sourcecode around. Eventually, he found a bug in DiskUsage and fixed it. Michael and Ingo started tracking a memory corruption bug that may be the cause for the few remaining cases of FS corruption. But this ended up in writing KDL tools for tracking memory use, which will come in useful to track memory leaks, looking at pages owners and similar stuff. Oliver worked on fixing our wchar_t support. He got it working but needs to test compatibility with BeOS applications. The change involves the compiler support for wchar_t, and any application using that needs to be rebuilt. If we can't get it working in a way compatible with BeOS, it's likely that only gcc4 built parts of the system will get the fix. Rene Gollent worked on some TODOs for the debugger. One part was saving and resoring the view layout of Debugger accross sessions. The other was starting to add a CLI mode. When both are done, Debugger will replace GDB as the default debugger for the system. The CLI mode is needed mostly to debug app_server crashes. I worked on various areas of the system, but most notably reworked (again) the notification windows (I'm now rather happy with the result), and fixed bugs in the game sound API which now seems to be working fine.

Overall this coding sprint week was very productive, with several hundred commits improving the Haiku codebase. This also apparently boosted donations to Haiku, Inc. quite a bit. I'm ready to attend the next one.

On spatial mode and the document-centered interface

Blog post by PulkoMandy on Wed, 2011-07-27 19:37

Once again, the idea that tracker should use single-window mode was raised as a trac ticket. This discussion was made multiple times on the mailing list, and each time the answer from the developper was no. However, users still seem to prefer the single window mode, and other OS are switching to it. Maybe we just need to explain how to efficiently use this mode, and why we think it's better. I'll try to do that in this blogpost, with my own point of view on it.

A bit of history

The spatial metaphors was used quite early in graphical user interfaces. You can already see it in the first version of Mac OS. It was adopted in windows 95, made optional and non-default on windows 98.

The Mac OS version of spatial navigation was quite well done. The desktop is at the root of everything and shows a list of volumes (or disks). In each volume, you can find folders and files. When a folder is already open, it will be grayed out in the parent so you can see that's the case. Double clicking on a grayed icon will raise the already open window.

From the very start, there were other ways of working. While Windows 3.1 program manager was sort of spatial, it didn't match the filesystem hierarchy at all and offered only one level of windows. The file manager was working with a tree view, a concept still visible in later versions of Windows in "explore" mode, and also part of OS/2 way of working. This kind of browser is now known as "single window" or "navigational". Typical features include not opening a window for each folder, allowing a folder to be open multiple times, and a web-browser like history allowing to go back in time.

BeOS did only allow spatial mode. When OpenTracker got released, one of the first changes done by the community was adding a single-window navigational mode to it. This shows how even BeOS users wanted this feature.

Still, 10 years later, we're still using spatial mode in Haiku as the default one.

Spatial navigation

As I said, in spatial mode, a window is binded to a single folder, and each folder can only be shown in a single window. When opening another folder, another window is opened. Each window stores its position and size, as well as the content (icons) positions inside itself. This makes navigating the filesystem a tangible operation. Beginner users quickly get what "opening" a folder means, and how the hierarchy of files work.

There are some quirks to make it more convenient. On Haiku, these include allowing different workspaces to have the same folder open, possibly at different positions ; and symlinks, which are shortcuts in the directory tree to get somewhere quickly. These are hinted by a slight underlining.

The main complaint we hear about spatial mode is that one always end up with a lot of windows opened. This is a learning problem. When programming in C++, each object you create with new must be released by delete (sorry for the technical comparison). Likewise, in a spatial mode file browser, every folder-window you open by clicking must be closed by clicking - keyboard shortcuts also work. It's just done this way. If you end up with too many windows (in C++ this would be called a memory leak), either you open too much, or you don't close enough of them.

In Haiku, we have a nice feature called drill-down menus. When you right click any folder icon, you can see what's inside and navigate through popup menus to your target. The target is then opened in a window, while the path isn't. Learning how to use that allows you to quickly et anywhere without opening more windows than you need. This really seems to be the key, along with getting used to close windows when you don't need them anymore.

On the other hand, there is a lot of material on the internet showing the drawbacks of navigational mode. I just want to point out I'm so used to spatial mode that I now find it annoying to have to explicitly open a new window when navigating to another directory if I want to keep the one I'm in at the same time. Some file browsers (I use pcmanfm on linux) even added tabs in the windows, which make things sometimes even more confusing, as you may have something open in a background tab which itself is somewhere in an hidden window, and thus won't show up in the taskbar. In Haiku I get a list of all the open folders at a glance. I don't see people really using the navigation support besides the "parent folder" button, or even trying to use the "back" button when they actually mean "parent". Going to the parent folder in spatial mode is as easy as typing alt+up, we could have a toolbar button for it if people really want that.

Document-centered

Another feature of Haiku is that it is document-centered. This goes outside of Trancker and file navigation and defines how applications work and look like. The idea is that a window in Haiku maps to a document on the filesystem. You see how this matches spatial mode navigation.

With the document-centered system, you get more windows on screen than when using other systems like MDI (Multiple Document Interface). But you get to manage all these window the same way, and you can mix them together as you need. It doesn't make snese to group your documents in applications, by filetypes, however, it does make sense to put together a sourcecode editor and a debugger, or a word processing application and a drawing application used to insert diagrams in the document.

The problem is a lot of GUI elements are duplicated : toolbars and menus are shown for each document. Mac OS tried to solve that by moving the menu outside of windows, at the top of the screen. This way, it is shown only once for all documents in an application. However, activating a window suddenly shows the associated menu, which is sometimes a bit confusing, and you can't use toolbars.

A later alternative to MDI and SDI appeared later, it's called TDI for Tabbed Document Interface. The idea is to have tabs for each document in an application. You can see that in any modern web browser, or in Haiku's terminal. TDI avoids nested windows like MDI does it, and makes it a bit easier to manage the documents. However, it still doesn't allow to mix documents from different apps in the same area. Haiku has a solution for that, it's called Stack&Tile. Stack&Tile allows to use tabbing accross applications. This makes it a lot more powerful and allows to group windows by their actual use, not by the document type/associated application. Stacked windows suddenly make it a lot easier to manage all these windows. And tracker in spatial mode just fits this perfectly. Tracker is then the application for opening folders, and it works just like any other application.

Note this is very different from the way other OS work. They tend to have one single application take the whole screen space, while we have multiple ones sharing the space, with ability to operate them together (drag and drop, copy and paste, and other ways of sharing data). This is why tracker windows zoom button will make them shink to fit the contents, instead of growing to hide the whole screen. Any application zooming to the whole screen can get very annoying, because that's of no use, unless you're trying to view a really, really big document. With modern high-resolution screens, it's time to share the space ! StyledEdit should enlarge the window to ensure there are no forced line breaks; showimage will fit the current image, some apps are even not scalable at all since the contents always has the same size. Making the zoom button work that way helps getting things done much more efficiently.

Making it more visible

Working the document-centered way takes some learning, but it's reallyworth it. Having tracker fitting in with spatial mode may be of some help, but it won't do everything. Here are some more things we could do (or try to do) :

  • Icon showing open/closed state : this is something that was available in Mac OS since the very beginning. An open folder is grayed out, or shown with an "open" icon. So you know it's already somewhere. The same applies for other documents.
  • Document-centered deskbar : currently the deskbar groups things together by application. This makes it hard to see the document nature of things. Grouping the documents could be done by projects, or S&T groups instead. This would help making the grouping more visible.
  • S&T groups persistence : I already said tracker windows keep their position and size. All windows should also keep their S&T grouping state accross reboots. Even better, this state could be stored as a "project" and reopened later, as needed, restoring the windows as they were. Projects could be mapped to folders, and show all the documents inside the folder. Or they could be an independant stuff on another layer. Projects would be the grouping criterion in Deskbar, so the deskbar menu for a project would allow to save it, besides closing and hiding it.
  • Single window mode has some points

    There are still things that work really well in single window mode and can't be done in spatial. They relate to the ability to decouple windows from folders. So you can have multiple windows showing the same folder. While harder to understand for beginners, this allows for quite powerful use, as each window can then offer a different "view" on the same folder : one may be sorted by filename, and another by date, so you can quickly grab what you're after. The only way to do that in spatial mode is to cheat using workspaces. A partial answer to this is queries : they are window with a different point of view on the whole filesystem. An application called Trax allows you to do queries with a constraint on the filepath.

HCD : Progress report II

Blog post by PulkoMandy on Mon, 2010-07-26 14:44

So, I'm still working on the locale kit. Here are some things I did since last time :

Conference report : RMLL 2010

Blog post by PulkoMandy on Wed, 2010-07-14 09:14

Hello readers !
Last week we were at the RMLL (Libre Software Meeting) in France, with François (mmu_man) and Olivier (oco). Haiku has beed holding a booth and giving some talks in this conference for some years now, and it's nice to go and meet people again.

HCD : Locale Kit progress report

Blog post by PulkoMandy on Wed, 2010-07-14 08:30

Hello readers !

As you know, I'm currently working on the locale kit to bring it to a more polished state. The work is going well, and it's about time for a status update. I've been quite busy at school for the whole year and committed few time to Haiku, so I'm catching up with a lot of things.

Syndicate content