gsoc2011

Batisseur Midterm: Gravatars, packaging sugar, and achievements

Blog post by jrabbit on Mon, 2011-07-18 20:03

I’m in the middle of my planned vacation in New Mexico. I recently wrote a new feature for haikuporter emulating the style of homebrew’s create command. (It makes as much of the bep file for you as can be automated.) I’ve written a haikuporter (or later pkgman) wrapper to handle the achievements. It works like git-achievements you alias over the command and check the switches/commands. I’ve moved over some code to redis, and have gotten their development branch to build on alpha3 (Stable used to work back a few revs.). If you have ideas for achievements please file them in the issues tracker

I’ve implemented Gravatar support in the points board web app, it needs to be fleshed out more from the html side, if anyone has design questions or suggestions on how to implement this HaikuPoints system with regard to existing Haiku website features let me know.

The build drone “queen” controller I’ve been thinking about and will use a unique identifier for build jobs to allow cross-referencing with a list of available builds. (i.e. delegating responsibility of picking a useful build up to the client.) The unique ID would be based on GCC, Haiku version (release or nightly), and git-sha or a GUID. This will also allow for the build names to reference a camlistore sha1-blob with build information and binaries. I will be investigating if Jenkins is a good fit for receiving this data or if I will write a viewer for packagers to get build logs.

Language Bindings for the C++ API: Git Mirror, Gcc4, and Other Changes

Blog post by jalopeura on Sat, 2011-07-16 23:48

A status update for those interested:

Bindings now return multiple values when appropriate (this was not working before).

Bindings now return undef (in Perl) or None (in Python) for a NULL object pointer; previously a target language object with an underlying NULL was returned, which obviously caused problems.

For errors, Perl returns undef and sets an error variable. Python raises an exception. However, when the status code is also the return value, Perl returns true if there is no error. Python simply returns the status code.

Perl builds under gcc2 and gcc4. Python builds under gcc2 and gives the following warnings/errors under gcc4:

gcc -fno-strict-aliasing -I/boot/develop/headers/3rdparty -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/boot/common/include/python2.6 -c Haiku.cc -o build/temp.haiku-1-BePC-2.6/Haiku.o -Wno-multichar
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++

As far as I can tell, this has to do with the fact that the python executable was originally compiled with this flag. There seems to be no way to turn the flag off using distutils.

g++ -shared build/temp.haiku-1-BePC-2.6/Haiku.o -lpython2.6 -o build/lib.haiku-1-BePC-2.6/Haiku.so
/boot/develop/abi/x86/gcc4/tools/gcc-4.4.4-haiku-101111/lib/gcc/i586-pc-haiku/4.4.4/../../../../i586-pc-haiku/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
error: command 'g++' failed with exit status 1

I'm guessing that this command will work with gcc4 if python is installed normally on a gcc4 Haiku. If not, I'm not sure how to fix it.

For those interested, I have created a git mirror of the SVN repository at https://github.com/jalopeura/Haiku-API-Language-Bindings. Note that the repos contain the perl code and definition files used to generate the bindings; they do not contain the bindings themselves. The bindings are available for download from the project page at http://dev.osdrawer.net/projects/perl-haiku-kits.

Please note that this is a mirror. Its function is to reflect the state of the real repository for those who do not wish to use SVN. I will still be working from the OsDrawer.net repository. If you make changes and you want me to be aware of them, you must notify me. You can use an email, a comment to this blog, a github pull request, whatever you want.

The next items on my list are structs and global variables. Structs will be an appropriate data type (Perl hash or Python dictionary) and globals are going to be accessed via a class method, rather than actual variables.

For example, be_app would be avilable as Haiku::Application->be_app() in Perl and Haiku.Application.be_app() in Python. Or if people prefer, I could put them into the Haiku namespace: Haiku->be_app() or Haiku.be_app(). (And if people really would prefer a variable to a class method, I can do it that way as well.)

VBox Guest Additions: midterm status report

Blog post by scgtrp on Fri, 2011-07-15 11:30

Shares fully working!
Slightly slow, but usable.
Clipboardy stuff too.

I've now fixed most of the bugs in the guest additions, to the point that what's done so far is mostly usable - the only major bugs remaining are some random crashes in VBoxService that I've not been able to reproduce, and an inability to drag icons when mouse pointer integration is enabled. (Thanks to kallisti5 for finding both of these.) I also have replaced VBoxApp (which currently handles clipboard sharing) with VBoxTray, a replicant which serves the same purpose but can be autoloaded by Deskbar.

At my mentor's request, I've also added some installation instructions to the repository, as the build/install process is currently a bit complex. I intend to rewrite those instructions in the form of a makefile in the near future; this wasn't really a priority before because there wasn't much there for people to build.

The big task for this next part, though, is the video driver. This will include both OpenGL support and automatic screen resizing. The emulated video card is based on a 3dfx card, so I will hopefully be able to use large parts of the existing 3dfx accelerant, but I've still left myself a lot of time for this as these things are always a bit more complex than I predict. I plan to spend any leftover time on getting things to run a bit faster if possible.

GSOC 2011: Midterm Milestone Report

Blog post by antifinidictor on Fri, 2011-07-15 02:56

So far:
SDL 1.3 officially compiles.
Whether it works is another story.

I've created 7 patches so far, four of which were created in logical pairs, one of which was completely useless. The 7th patch (SDL-1-3_patch06.diff) was sent out to the haiku-gsoc mailing list today, and should allow the code to compile. Note that not all functionality is implemented in the video code.

I've also started working on creating a Google code project to host my repository; this will make it easier to follow my progress if I succeed. So far I have had trouble pushing my repository to the project site; it's a lot of information, and takes about five hours. I've tried twice and it failed both times, although the failure may have been due to other things running; I'll have to try again tonight.

I finally managed to find a machine that works with both Haiku's graphics and internet drivers, and am moving my project onto this machine. This probably won't affect my workflow too much, but it will increase the number of updates I can make.

Future:
I will implement the more important video functionality missing in the current compiling version over the next couple of weeks, as well as review the code I have for any obvious bugs. By the next milestone report I will have, at the very least, a simple test that creates and destroys blank windows.

At any rate, I think I've made some good progress, and I hope I will continue to do so over the remaining weeks of the project.

UVC Driver -- GSoC Midterm Report

Blog post by gabriel.hartmann on Sun, 2011-07-10 23:31

Since my last blog entry a lot of progress has been made. Currently I'm right on the cusp of actually producing images on the screen that have been captured by my camera. Successful communication is occurring between the driver and the camera in at least two different forms.

The first form of communication to be successfully implemented involves the setting of values within the camera which affect image capture. These are the familiar brightness, contrast, sharpness etc. settings which most cameras support. Nearly all of the options available to my camera are now presented for manipulation by end-users and successfully communicated to the camera. These values are maintained within the camera between power cycles and this fact is successfully communicated to the user via the available controls. The controls can be viewed and modified in the media preferences application or the cortex demo application. ParameterWeb control documentation indicates a range of different style controls within the continuous or discrete parameter varieties. However it appears to me that the only discrete value input method currently supported with an appropriate gui interface is the binary on/off option. This is suitable for features like the auto value for white balance which can only be either on or off. However the powerline frequency setting which has three possible values was unable to be represented with the appropriate discrete control of the B_RECSTATE type which has three possible states. To simulate this capability a continuous control was modified to only allow three values which are indicated by placing the sliding control within a +/-10 range of the desired value. The slider snaps to the available values to indicate this behaviour. One future feature which would perhaps be desirable is controls with auto settings which indicate in real time by their movement what values the camera is using in its auto mode. Right now sliders are simply frozen in their last position when the auto mode is in effect. I had some brief discussion with my mentors about this feature, but it was deemed to be unnecessary at this stage as a lot of work is left to be done in actual image capture.

Language Bindings for the C++ API: Mid-term Report and Third Quarter Goals

Blog post by jalopeura on Sat, 2011-07-09 23:45

The following objects have at least partial bindings:

From the Application Kit: From the Interface Kit: From the Support Kit:
Application
Clipboard
Cursor
Handler
Invoker
Looper
Message
Alert
Box
Button
Control
Font
Menu
MenuBar
MenuField
MenuItem
Point
PopUpMenu
Rect
Screen
StringView
TextControl
TextView
View
Window
Archivable

At the moment, some of the classes are not very usable; they're necessary because other objects inherit from them. They will later be expanded to allow creation of custom objects based on them, so users could subclass a Looper or a View the same way they can now subclass Application and Window.

Python has a minimal test program that uses Application, Window, and Button, but the other objects have not been tested. It would be helpful if interested Python programmers could start coding (and thereby discovering bugs). In addition, I get a large number of warnings about multi-character constants when compiling. Despite following the instructions in the documentation, I cannot get the installer to pass options to the compiler to turn these off. There are also a few other warnings I'm working on eliminating, but the extensions successfully compile and the test program works.

For the time being, the Python objects are all named Haiku.Object instead of Haiku.Kit.Object. This allows me to split up the kits into different extensions; since an extension does not know what kit a foreign object is defined in, the kit name cannot be part of the object name. Since this naming scheme is apparently not good Python practice, I am still looking into alternatives; currently I am considering either placing everything into a single extension or adding some data to my definition files that lets an extension know what kit/extension a foreign object belongs to.

Perl has the minimal test program and it also has a slightly more complex test program (a small Person viewer app). There are also a few compiler warnings I'm still working on eliminating.

The bindings can be found at http://dev.osdrawer.net/projects/perl-haiku-kits. The downloadable files are under "Files"; there are also Forums and a Wiki, and (under "Issues") a bug tracker. Anyone can download the files and look at the content, but if you want to report bugs, post to the forums, or edit the wiki, you need to be added to the project. Interested users with an OsDrawer.net account can email me or post a comment here, and I will add you as a member of the project.

There may be some trial and error involved in adding members; OsDrawer.net has defined some roles for members of a project, but I can't find any documentation on what permissions each role has. There is a role called "Reporter" that I assume lets the user post new bugs, and there's one called "Wiki editor" that's self-explanatory. But there's no role for Forum poster, so I assume one or more of the other roles has that permission included. But I don't know which one(s).

Okay, let's take a look at my second-quarter goals:

- Bring the Python bindings to minimal functionality (Done)
- Write a minimal Python test program (Done)
- Continue to test threading issues (See below)
- Expand preliminary bindings and add new bindings (Done)
- Write test programs for the bindings (Partially done)
- Write documentation for the bindings (See below)
- If there is sufficient time, select a third target language (Insufficient time)

Threading: I have found several issues I thought might be threading issues, but upon closer examination, they were not. I did find one genuine threading issue - but it was because I forgot to lock a window before updating data.

Documentation: I have written some documentation and I am working on programmatically adding it to the bindings. Python has fields in the underlying C++ structures to add documentation, and Perl allows documentation to be mixed in with the code.

Now for my upcoming goals. In general, during the next quarter I will continue to keep an eye out for threading issues, add new bindings, and fix reported bugs. There are also a few more specific things I want to work on:

There are a number of methods that haven't been implemented yet because they have structs as input or output, and the bindings do not handle structs yet. It should not be too difficult to map these to appropriate data types in the target language (Perl hash, Python dictionary).

I'm not sure what to do about globals like be_app and be_clipboard; on the one hand, they could be treated like constants and restricted to a particular namespace, in order to not pollute the global namespace. This is the way I'm leaning right now. On the other hand, there are relatively few of them, and so it would probably not result in a great deal of pollution if I were to put them in the global namespace.

Several of the C++ objects have overloaded operators. I would like to expand the bindings to support these overloaded operators. I'm not sure how much time I want to spend on this issue right now, though. It depends on how much users want this feature.

- Continue to test threading issues
- Expand existing bindings and add new bindings
- Fix bugs reported by users
- Enable structs
- Expose globals
- Add documentation
- Write additional and more complex test programs
- If there is sufficient time, select a third target language
- If there is sufficient time and user interest, work on overloaded operators

Language Bindings for the C++ API: Python partially working

Blog post by jalopeura on Fri, 2011-06-24 01:21

I've just uploaded some files onto http://dev.osdrawer.net/projects/perl-haiku-kits/files They are minimal implementations (window with a button) for Perl and Python. The Perl one works fine, but I'm still having issues with the Python.

Here are some of the issues with Python:

Apparently by convention packages start with a lower-case letter. The bindings are currently in the 'Haiku' package. This would be a trivial change; it depends on how important it is to Haiku's Python user community.

PyModules and PyTypes (= classes) cannot share the same name, as far as I can tell. Thus, in order to have constants and plain functions available from (for example) Haiku.Application, the Application PyType must be in a separate namespace, currently Haiku.Application.Application. Depending on what the community wants, I could move all the constants and plain functions into the ApplicationKit PyModule, and have the PyType be Haiku.Application.

The really big problem, however, is passing objects. BWindow::MessageReceived gets a BMessage object. In order to pass this to Python, I need to have a PyType. But the PyType in question is defined in the ApplicationKit, which is a separate package. So I don't have access to it.

In Perl, this was not a problem; I simply used a string containing the Perl class name, and as long as the user had loaded the relevant package, Perl took care of it. But Python wants the PyType, not just a string. I'm still looking into a way to get around this problem. I'm trying to do it by eval'ing some Python code, but so far I have been unsuccessful. If I can't do it any other way, I could export the PyType from the other package, but then Python would be loading the .so and I would be loading it a second time, in addition to the extra overhead of exporting and importing. It just seems like a waste of resources.

In any case, the Python test script displays the window, and calls event hooks on the Application object (ArgvReceived, ReadyToRun, QuitRequested), but when you click the button and it tries to call the Window's MessageReceived event, it dies.

Syndicate content