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.…
Read more ⟶
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.…
Read more ⟶
Public thin clients
Another cool new idea, and this time it is seriously cool ( unlike this ), though it may not be feasible with today's technology and economics. So here it goes:
Everybody has a cellphone these days, most of them support Internet access and they are pretty powerful in terms of processing power for most of the things anyone does on the web.
But I for one hate browsing on that disgusting little screen and typing URLs on the keypad.…
Read more ⟶
DA-IICT decision
Today I'm leaving for Gandhinagar, to take a look around the DA-IICT campus and if seats are available, get in. Hoping I will, it has a great campus and faculty and, in a way, Gandhinagar is pretty close to home. …
Read more ⟶
New concept, old language. New language, old concept
So this is something I just bumped on while reading Monadic Parser Combinators. After reading a few pages I thought I should do this practically. Unconsciously I decided to use Python. I could very well have used Factor, since it is more functional.
This led me to realise that I should take one thing at a time.
Two new things at a time == frustration
I'm already finding Factor pretty tough.…
Read more ⟶
URL memory
I'd like to add a new member to spatial, visual and verbal memory groups. The new one is URL memory.
URL Memory(n) - the arcane talent of unconsciously remembering all human readable URLS.
Usually predominant among power users only.
…
Read more ⟶
How cool is contextfree!
This is all it took:
startshape sun
rule sun {
sq { }
36* { r 10 } sq { }
}
rule sq {
SQUARE { hue 46 saturation 250 }
sq { x 1 y 1 s 0.8 brightness 0.4 }
}
to make this:
…
Read more ⟶
This is slightly context free
I've recently (re)discovered Contextfree, so here is Contextfree 103. Its a ram wearing a hat, w/o a face.
Here is the code
startshape foo
rule foo {
hornleft { y 1 b 0.2 }
hornright { y 1 r -90 b 0.2 }
TRIANGLE { size 0.8 y 1.5 b -10 }
}
rule hornleft {
CIRCLE { size 0.7 }
hornleft { x -0.3 y 0.3 r 30 size 0.…
Read more ⟶
Pypes beta, please try it out
Download
Extract the archive, switch to the directory and run pypes.sh or if you are on windows cd to src/ and run "python pypes.py".
You should have Python and Pygame ( Numpy is not required ).
Objective:
You'll notice that one of the pieces is green, others are red. Any piece which connects to the green one becomes green, and propagates. Your task is to rotate the pieces to make a complete green grid.…
Read more ⟶
Meet Pypes
Pypes is almost done, except for the loops, which shouldn't be there. Have a screenie. …
Read more ⟶