Blogs

Managing multiple documents in applications

Blog post by stippi on Fri, 2010-10-29 12:41

Working on my rewrite of WonderBrush, I've been thinking about the document management. As you may know, WonderBrush is a stricly single window application in its current release. It can still open more than one document at once, of course, and those are displayed in a list above the navigational preview of the current document. One of the drawbacks of this approach is that there are no previews of all the documents visible at once, and it's harder to make non-current documents the target of drag&drop operations, like when dragging objects from one document onto another document to move or copy them there.

Lesson 12: All About Attributes

Blog post by darkwyrm on Tue, 2010-10-26 11:51

You might think that I took a short vacation, but I've just been buried in Real Life. You might also be wondering about where lessons 6-11 went. They'll be published later, but you're not missing anything, as they are edits of the last several lessons from Learning to Program with Haiku with an experienced developer in mind. If you've worked with the previous series, there isn't anything in 6-11 that you haven't seen before -- they're more to make the Programming with Haiku series complete on its own. This lesson is all about attributes -- what they are, how they can be useful, and how they are manipulated from code.

Programming with Haiku, Lesson 12

A Report From BeGeistert 023

Blog post by luroh on Sun, 2010-10-24 22:14

Probably forgetting half of what took place and getting the other half backwards, below are my recollections of BeGeistert 023.

Layout docs landing

Blog post by yourpalal on Sat, 2010-10-23 15:24

It's been a long time coming, and they're still not done, but I've committed some initial documentation for the Layout API. For the curious, you can access the documented classes here, there is also an introduction to building a GUI with the Layout API here. If you happen to find a typo, or inaccurate info, please contact me so I can fix it. Finally, note that, like the documentation, the Layout API is not yet finalized.

Haiku mentioned on XKCD; website stressed

Blog post by mmu_man on Fri, 2010-10-15 19:43

This morning I was welcome by a nice XKCD cartoon mentioning Haiku (as an experimental OS).
Several of us started twitting (rather, identi.ca-ing) about it, proud as we were.
Then when getting back tonight we noticed the website was unreachable.
It really seems like it brought us quite a lot of unwaranted advertising! It's quite visible on the server stats:

WPA encryption progress

Blog post by axeld on Wed, 2010-10-13 21:03

I've been working on getting WPA encryption to work on Haiku. While I haven't been able to invest as much time as I hoped for before, I made a bit of progress that at least justifies a small status update.

The first part of WPA related work has actually happened while I was working on the network stack for Haiku Inc., as it was not possible to inject packets into the network - while you could easily monitor all incoming packets, there was no mechanism to send packets for arbitrary protocols. I've extended the AF_LINK protocol to be able to deliver that mechanism.

Then I started the actual work on porting wpa_supplicant, the standard tool for allowing WPA/WPA2 encryption almost everywhere. Since we're using the net80211 WLAN stack as part of our FreeBSD driver compatibility layer, a lot of code from the existing BSD driver backend could be used. There are actually only two differences between Haiku, and your favorite BSD for this kind of work:

  • ioctl() needs a length parameter that tells the kernel how large the structure passed in is. In BSD this information is encrypted in the control constant, but this is not the case for Haiku. While the BSD way is certainly more convenient, Haiku's solution is safer and more flexible.
  • the BSDs are using AF_ROUTE sockets to pass network notifications to the interested user software. In Haiku, we already have a system wide interprocess messaging service, and this is what is therefore used there. The only downside of this approach is that the API is C++ only which is probably something that won't be accepted upstream.
  • After I had the driver backend ported, the next thing was to implement the level 2 packet support, as the wpa_supplicant needs a way to receive, and send packets outside of the usual protocols. This part is now using the AF_LINK method I described above, although there seems to be a problem left that I need to look into: select() always reports the socket readable. For now, due to the event based implementation of the wpa_supplicant, this is only causing a bit more CPU usage than you would want to have. I am not sure there is anything actually relying on receiving something yet (or if it works, as nothing has been sent or received so far).

    Once I had the wpa_supplicant working in theory, more problems surfaced, though, as usual. One is that the FreeBSD driver layer does not receive a few ioctl() calls that need to be forwarded to it in the use case of wpa_supplicant. That one only took a bit of debugging, and I've added a quick hack that forwards the needed calls for now; since I'm not happy with that yet, I haven't committed the changes yet.

    A more serious problem was that Colin did an iterative port of the net80211 stack: he added/implemented only the parts that were needed at the time. It seems that WPA needs a bit more parts; so far I've only added the xauth module which allowed me to actually receive node association events from the the stack. After that, it still fails for some reason, but I haven't figured out why.

    I will only be able to work a few hours per week in the next weeks, so I hope I'll get something useful done until the deadline is hit. In any case, once I have the wpa_supplicant working, I will commit what I have done so far - since the wpa_supplicant currently needs private Haiku headers, and the changes I'm planning on doing are unlikely to be accepted upstream, I will probably end up adding all of its sources to the Haiku repository. Once I have WPA working, I will continue with extending the existing configuration tools to support WLAN as well. This will also cause further integration of the wpa_supplicant, it will probably end up being an add-on for the net_server.

Programming with Haiku, Lessons 3-5

Blog post by darkwyrm on Thu, 2010-09-30 11:54

In an attempt to move on and get on to just the Haiku API, here are the final three lessons on C++. Lesson 3 introduces C++ file streams, formatting and printing using C++ streams, and lightly touches on exceptions. Lesson 4 takes a break from actual coding and spends time on a critical development tool: source control -- what it is, how it is used, and why it is used. Lesson 5 ties together all of the C++ concepts covered in this series with a project. I hope you enjoy them.

Programming with Haiku, Lesson 3
Programming with Haiku, Lesson 4
Programming with Haiku, Lesson 5

Syndicate content