Search code examples
olpc

OLPC development choices


What are my options for developing a piece of software for the OLPC project. From looking at the various sites and wikis, I can honestly say that I am still totally confused. Is it to be sugar, c++, smalltalk or python? HELP!

Thanks,


Solution

  • First, the short answer: You want to use Python, and you want to make your python programs "sugarized".

    Sugar is not a programming language or development toolkit. It's a GUI environment and "activity" framework. The applications that kids use on OLPC laptops are called "activities", and Sugar provides a bunch of tools for them to use so that they can store their information in the versioned object database (the "journal" from the user's perspective), can show up in the list of available activities, etc.

    To make sugarized applications, you write them in python, using the pygtk and/or pygames APIs for graphical work and the Sugar APIs for other Sugar services (like storage, access to the camera, mic, the very cool networking stuff, etc.). You also use a Sugar API to make the program available as a Sugar activity.

    You can write C++ code for the OLPC, but Python is the preferred language.

    As for Smalltalk, the OLPC project does provide a Squeak environment, but it's intended primarily for kids to play with Smalltalk programming, rather than as a tool for building activities intended to be distributed for use on the OLPC. Not that you couldn't use it that way (I think sugarization of Smalltalk apps is possible -- not sure), but it would be a memory hog. Smalltalk isn't inherently more memory-hungry than Python, but the OLPC devs have done some clever things to optimize Python memory usage. Basically, nearly all of the memory consumed by the Python interpreter is shared among all Python-based activities. Adding a Smalltalk activity to the mix would mean running another interpreter.

    You can find lots of activities to look at (with source code) at http://activities.sugarlabs.org. If you develop anything for the OLPC, it's highly recommended that you get a Sugarlabs account and use their git infrastructure (http://git.sugarlabs.org).

    I'd also highly recommend that you join the Sugar development mailing list. It's intended primarily for discussion of development of the Sugar platform, but there are very helpful and very knowledgeable people there who can answer questions and point you to the right resources. http://lists.sugarlabs.org/listinfo/sugar-devel

    EDIT: Another useful resource for getting started is:

    http://wiki.sugarlabs.org/go/Development_Team/Quickstart