Wednesday, July 28, 2010

Apache + Trac + WSGI

Well today I can say I have learned more about apache's mod_wsgi, mod_perl, and mod_cgi then I was expecting. The trac system I set up was was extremely slow. This is because I set it up using apache's cgi system. Trac was running using cgi which apparently is the slowest way to run a trac instance. I was searching around for the better solution and found that using mod_wsgi is the best solution. Trac had some decent documentation that helped out with the process.

Another way to boost the speed of this trac was to only use https when sending login data. This was a challenge with the current setup of the apache server. Thankfully I found some great examples attached to a trac ticket that helped out with the process.

Other then that, I have also spiced up server's homepage. Added a some images to the home page and added a services section to show off what it is doing for us. I also set up a ZNC IRC Bouncer on the server for any of us wanted to always be on irc that don't have a server of their own.

Tuesday, July 27, 2010

Foss Infrastructure

Today I worked on foss infrastructure.

Now we have a basic project hosting system on our school server. The setup is basically a Trac system with Gitosis and GitWeb.

Now we can host trac projects and Git Repositories.

Monday, July 26, 2010

CSI 2.0 and Foss Infrastructure

Well today I spent a majority of my day working on getting the py2web framework on a public box so that others may continue the work Trose started. The major issue was the web2py framework doesn't like to allow admin access over non secure connections. This was problematic because the framework wasn't working out of the box with ssl support. The framework seems to be designed that it needs to run behind apache once it is read to go to a production server. I still didn't get it completely working, but the hack I did will have to do for now.

Other then that, I have also been working on some of our Infrastructure. Some of this involved setting up a trac instance and a git hosting server. We hope to soon have our own git and bug tracker in house. This will support projects and hopefully encourage people to start their own projects in the Center for Student Innovation.

Friday, July 23, 2010


So, yesterday we got access to the new facility server room for the first time and were able to install the three blades Sugar Labs had given us. Here at RIT, we are planning on running a mirror of (ASLO). So with that said, we are one step closer to having that set up. We got the blades on the rack and set up. They are able to talk to each other using their own private network and soon we will get them live on the RIT network.

This is great as we have been holding on to these blades for quite a while now, waiting for room to open up for them. So this means once we get them registered with RIT's network, we should be able to setup the sugar mirror soon!

Wednesday, July 21, 2010

Fortune Hunter Dungeon Advancing

I finally started implementing the ability to go to the next dungeon (ticket 44).

I didn't close the ticket because there seems to be some bug in the code on level two that gets you stuck in a room on level two.

Otherwise, I have been doing a lot of little things. Hopefully I'll get this figured out soon.

Tuesday, July 20, 2010

Lemonade Stand Release

Announcing Release Lemonade 2.0, XO Release 4. The source code freeze for this release: 2.0: Release Activity xo 4.

This also marks the close of the fortuneengine branch as it has been merged into master.

Lemonade Stand Counting Game

The Lemonade Stand project is almost back to/surpass its original state on the fortuneengine branch. I just got done implementing the lemonade counting mini game as well as added back the background image.

    Relevant commits (newest on top)
  • e8bef1eAdded profit calculation instead of income calculation
  • 8abf746 Added escape key to quit game
  • 180d070 Fixes bug with counting game
  • e546764 Minor tweaks
  • c33b71b Added font size flag for the xo
  • 9089014 Run on the xo?
  • 1958b37 Added width/height args
  • aa6077c Updated files
  • a883763 Removed old files
  • 58a2707 Implemented counting game

Thursday, July 15, 2010

Fortune Engine profiler and other projects

Yesterday I resolved the profiling ticket (ticket 31). This adds a basic profiling system to the game that can be run through the game console

This introduced a bug that I fixed today (changeset).

Kevin and I also started working on our paper for the symposium at the end of the semester.

Aside from Fortune Hunter and the Engine, I have also started working on porting Nate's Lemonade Stand game over to the engine.

Python backwards compatibility drives me nuts. The xo 1.0 runs python 2.5 or older where the newer ones use python 2.6. In the game engine I was using the keyword "as" in the exception handler where in python 2.5 the keyword is ",". So I had to make a commit to convert all my code so that it doesn't use the newer "as" keyword (changeset).

Pygame has a similar issue... I had to remove using pygame.Color and just use the tuple format for the rgb color values in our game (changeset 1 and 2)

Other then that, I have also been helping Taylor on a project for the CSI. This project is like making a facebook/social networking site driven around projects and events.

Tuesday, July 13, 2010

Lemonade finds bug in Fortune Engine

Today I spent a lot of time working on the lemonade stand activity. The activity is almost back to its original state but in the game engine. All that is left is the change counting mini-game at the end of each day. After that it is just improving the gui.

While working on lemonade, I found a bug in the game engine. This bug caused the game to appear to freeze when the game console was summoned in non-animation mode (ticket 38). The ticket has not been closed yet due to the fact the problem remains when you close the console until the next event sets the screen dirty.

Monday, July 12, 2010

Game Engine and Lemonade Stand

Today I started out by fixing a bug in the game engine that caused the timer to give an inaccurate number of millisecond passed when not in animation mode (Ticket #36). I also added some more commenting to the game engine (changeset).

After that I started recoding lemonade stand so that it will eventually run using the game engine. In its current state ( and the other commit I did today) it is able to run the basic process day loop. This includes buying items (or being forced to buy as many as you can if you try to buy to much making the game more interesting), decaying the inventory, process a weather change, and a random inventory event. Next I need to to implement the simulation portion where people go and buy the items and go into a mini game.

From there I get to start working on the main gui and some of the mini games.

Friday, July 9, 2010

OLPC Hackfest Summery

July 8, we had our hackfest at the OLPC headquarters. Foss at RIT had sent three of their coding teams and one of our storytellers to this event. The primary focus of this hackfest was the Open Video Chat activity with Fortune Hunter and CIVX as secondary topics.

Once we got settled in the board room, we found that our server was down. The server is hosted in RIT’s Computer Science House server room. Apparently they had a computer overheat and went into panic mode shutting down some of the servers and networking hardware to reduce heat due to this heatwave we are having. This was an inconvient time as our hackfest goals, irc bot, and dev enviornment of CIVX was hosted on this box. Luckily my personal server at rit was online and had a copy of our Drupal database for the goals, and had an irc bot ready to go. As for CIVX, distributed revision control through git was a life saver.

Open Video Chat

Open Video Chat’s goals at the hackfest was to get a telepathy-farsight implementation of the chat system working. We didn’t get any fully working code out of the hackfest, however we did get a much better understanding of the telepathy-farsight stack thanks to Daf’s physical presence at the hackfest. His insights of telepathy were very helpful and will be very valuable in the next coming week. Fran has been working at understanding the dbus and telepathy stack for the past week which this hackfest seems to have been exactly what he needed to understand how all of the components need to work together. We were playing with telepathy and empathy to programically start a video call between two computers.

This is important because this shows we are gaining an understanding on how the parts of telepathy work together. We were still using empathy to accept the video connection, but that is a start. We have decided we need to step back a bit and rebuild our stack. We are thinking of starting off by using some network/telepathy tube negoation from existing example activities like chat. By doing this we will build our stack with small peaces of the networking stack at time.

We also spend a portion of the time working Sjoerd Simons in the telepathy irc channel working around known bugs that have not made it into the main repositories. One aspect of sugar that I’m worried about is they are using older versions of fedora that have reached the end of their support life cycle, so some of these bug fixes may not be included in some of their current versions.

Mathmatical Adventure: Fortune Hunter

The art team of MAFH spent their time deciding how they want to build their animation system. It seams that they have decided on building some supporting classes that will make animation easier in pygame. These classes will hopefully be easily supported in the game engine. I am not too sure of the current status as I am working mostly on the engine.

The engine got a little bit attention druing the hakfest at the end. I broke apart the inspection system into a new class that is not specific to the engine. This could potentially be helpful to someone else in the future. I also added the ability to set the frame rate cap and animation mode in the constructor of the main engine.


The CIVX team spent most of their time working on their people widget. It has now been added to the front end of the dev enviornment and will hopefully be pushed to the main server. There was also some scraper work by the team, but due to the server being down their work was crippled.

CIVX has been wanting to add more servers at alternate locations for some time. Due to this issue with CSH, it looks the the primary server may be moved into a facualty server room at RIT where the network is in “production” instead of CSH’s “learning” enviornment.

Tuesday, July 6, 2010

Boston OVC Hackfest

Well tomorrow we are heading up to Boston for our Open Video Chat Hackfest at OLPC Headquarters on the 8th.

If you can make it to the hackfest, great if not, you can join us on our IRC Channel on, #rit-innovation.

Hope to see you there. For more information, please see our Open Video Chat Hackfest info page or mailing list.

Fortune Engine Loop Overhaul

After doing some tests with the new threaded system, I came to the conclusion that the overhead of the thread system in python is pushing it, especially on the xo laptop. The system wasn't even using threads correctly as it was using global locks over the event and display loops. This was to prevent the display from being changed during a draw cycle. Without the locks you would get some interesting phantom elements on screen between frames. This wouldn't be so bad except the drawing takes a noticeable amount of time.

To fix this, I decided to go back to a modified version of the event driven loop (ticket 36). It is similar to the original engine in the fact the drawing is taken care of in the event loop. The major difference is that the event loop no longer blocks for events. Instead events are drawn only when the even queue sends a NOEVENT signal and only if the dirty flag is set or the game is set to animation mode. This new animation mode forces it to draw every time it gets the NOEVENT signal.

This fixes a few problems with the old system. The old system would require a timer for animation. When the timer fired to wake up the blocking event call, it would be fired to every event callback registered. This also caused a problem if your animation timer was too fast, it would fill the event queue adding animation events faster then they could be eaten up which would slow the system down.

It also takes the idea of the threading system into account. I was using global locks to prevent the system from clashing, now that it waits for the queue to be empty, it then completes a draw cycle and hands control over to the event loop again.