Graffiti


Random Ramblings

Sorry for not blogging in a long time. This has been a very busy week, and so I'm just going to drop some snippets. First RMS and Larry Ellison both commented against cloud computing. Graffiti is uploaded and ready to use ( but not necessarily stable ). I read Snow Crash and loved it. I'm confused between getting a Dell Studio 15 and HP Pavilion dv6767tx. Meanwhile I'll be leaving for Pune tomorrow for SUMMIT '08 at MIT Pune.

Graffiti is almost released

Aside from some code cleanup, testing, and writing architecture documentation, Graffiti is good to go. You can Download it

Reworked Graffiti's first render

After quite a few weeks of work, Graffiti has (again) reached the stage where it can render it's first words. It's now at 488 lines of code, of which the CSS related stuff itself comes in at 288 lines! There is no word wrapping yet, or any layout logic. I've been busy fixing quite a few bugs in the CSS overlays and so on. This is how you would use it.

Great Weekend

So my second weekend in this place went pretty great. Now that I've found the right computer which easily boots from external devices I'm ready to slowly begin coding. On saturday five of us saw Ugly and Pagli — crappy movie — but I got my first pair of studs. Its been raining a lot for the last three days here. It starts at around 7 and goes on till late into the night, which means a lot of fun football (I've discovered that playing barefoot is better than playing with normal shoes), but being cooped up in the rooms afterwards.

Graffiti: disaster

I Gitted Graffiti yesterday, and made an error in adding the files to version control, so I decided to undo the changes and because Git complained, I added -f. git rm graffiti -rf BOOM! Graffiti is gone. Except for the basic style parser which I was writing at that time, which was saved by Kate. I'm not blaming Git, just my stupidity. I usually don't version control as soon as I begin a project, since I like to get the structure right, without having really bad log comments.

Graffiti and more

It turns out parsing CSS according to specifications is no mean feat. So I am going to stall that for a moment, or implement a bare bones parser specifically written for Graffiti, and just plow along with Graffiti and doing what I can do, properly. Maybe later ( read quite a few months ) I'll write a nice SAC compliant CSS parser and hook it into Graffiti. Whatever I want to do, things aren't going to be moving fast.

Graffiti first view

Word wrapping is now implement and I've got a fairly decent design for the first version So here is the client code it took import sys import pygame from pygame.locals import * import graffiti as g # Line 1 pygame.init() g.init() # Line 2 s = g.spraybuilder.parse_string( """ <body> <p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean id diam. Curabitur lectus. Nullam ultricies ultrices tellus. Praesent id turpis vitae lorem varius posuere.

Graffiti

A new project of mine is Graffiti, a library over Pygame which allows application developers to write HTML and some CSS-like styling information and let Graffiti manage styling and rendering. It's no Gecko. Just something to solve an itch of handling word wrapping and styling in raw Pygame/SDL. The distinction between CSS and CSS-like is important and will be explained later. Write now I'm just on basic API design with no CSS parser, and all styles currently encoded in source.