Tuesday, September 30, 2008
Random Ramblings
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. This is a sports fest, and I'm proud to be the only first year in the football team. This is the first time I'll be playing football as part of an official team with jerseys ( no. 2 ) and all, so it will be fun.
I'll be back on the 5th after which I will probably start with a new project. Right now I'm thinking of something like hyperlink visualizations, though I've no idea how to accomplish this.
Sunday, September 14, 2008
Graffiti is almost released

Aside from some code cleanup, testing, and writing architecture documentation, Graffiti is good to go. You can Download it
Wednesday, August 27, 2008
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.
import pygame
from pygame.locals import *
import graffiti as g # 1
pygame.init()
g.init() # 2
pygame.display.set_caption('Graffiti Render Test')
screen = pygame.display.set_mode((800, 600))
screen.fill((0, 0, 0))
page = g.page.Page('<body><p>Testing Graffiti</p></body>') # 3
page.render.on(screen) # 4
while True:
for event in pygame.event.get():
if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
pygame.quit()
sys.exit(0)
pygame.display.update()
Monday, August 04, 2008
Great Weekend
I also made some headway into How To Design Programs which is a really great book, and read almost all of Joel On Software (the book) which is entertaining to say the least.
So right now I'm sitting here after attending a particularly boring calculus lecture. I haven't had a bath because there was no water, and I'm reading a boring story as part of the assignment for Communication Skills.
Right now I'm replanning Graffiti since I wiped it out a few weeks ago. I've also been messing around with Scheme, but can't think of what application to write to dig deeper into it.
Thursday, July 17, 2008
Graffiti: disaster
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. From next time, versioning first.
In retrospect this is a really bad week. Experience isn't the most fun teacher.
Monday, July 14, 2008
Graffiti and more
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. On Sunday I'm leaving for university ( DA-IICT ) and that involves a lot of pre-leaving things to do. And the week after that will go in getting settled there and taking a look at the computing facilities. I'll probably be taking a external HDD with all my files and I might just do a blind copy of this hard disk itself so I can boot Arch their if it is allowed.
Wednesday, July 02, 2008
Graffiti first view
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 2s = 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. Donec id diam. Nam risus sem, aliquet ac, dignissim eget, aliquam ac, dolor. Aenean lacus metus, eleifend eu, elementum ut, lacinia non, nisi. Morbi odio. Aenean id massa. Ut arcu urna, elementum et, iaculis ac, lacinia eget, dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas eleifend facilisis dolor. Quisque eget nulla. Sed ut eros. Maecenas ut diam. Nullam tellus urna, sodales ac, cursus nec, tempus ac, purus.
Aenean malesuada est quis velit. Nulla vitae nunc. Integer gravida. Curabitur purus velit, egestas quis, aliquet quis, mattis ac, orci. Aliquam ac lectus. Mauris congue orci faucibus est. In orci odio, sodales at, pretium nec, dignissim et, neque. Suspendisse potenti. Fusce eget ante. Etiam purus ligula, placerat tempor, pellentesque quis, tincidunt accumsan, turpis.
</p>) # Line 3
</body>
"""
surf = g.spray.SprayRenderer(s.sprays[0]).render() # Line 4
pygame.display.set_mode((800, 600))
pygame.display.set_caption('Spray Rendering')
screen = pygame.display.get_surface()
pygame.mouse.set_visible(1)
while True:
for event in pygame.event.get():
if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
pygame.quit()
sys.exit()
screen.blit(surf, (50, 50, 800, 600)) # Line 5
pygame.display.flip()
to generate this

I'm doing a bit of internal access in Line 4 right now, but that will be fixed.
If the design remains good, it should remain that easy ( just 5 lines! ) to use for all time