Sunday, June 29, 2008

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. But I'll do it eventually, in a few days if there are no distractions

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. Even the iPhone can't match the joy of being able to view the entire page at once and still read every word. Maybe these are just my aesthetic idiosyncries but I like to be pampered.

So we have a collection of TFT touchscreens ( called PDA - Public Display for All ) all around us in public. They could look just like whiteboards. All you've to do is go near one and (assuming there is no queue) hook your cellphone up to the PDA using Bluetooth or some protocol not yet invented. Which means your data is available on the move, but you still get great visualisation and interaction. Once your work is done, you just leave and the phone disconnects itself.

Suppose your friend has this really cool video that you'd like, both of you latch onto the PDAs and drag-and-drop the photo.

The PDAs have absolutely no memory or trace of 'who' connected with them, they just display output and take input and pass it on to the anonymous user.

Additional features can of course be added:
  • Restrictions on how much time one person can use it, we don't want hoggers/freeloaders.
  • Privacy features like PDAs in phone booth like structures for all your secure transaction needs.
These could be charged for, free on advertisement based models or just paid for by the government as a public service ;)

I hope anyone who implements this before I grow up or the technology isn't available yet will please thank me and give me a share of the profits.

Thursday, June 26, 2008

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.

Sunday, June 15, 2008

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. Its got a really hard curve and some of the concepts which simplify the language need some pretty solid comp. sci. education. Implementing monads or parser combinators in it would have been horrible, because I don't understand them either. It can get very very frustrating, it's like writing a science paper in, say, German when you're just learning in it.

Frustration kills learning


But I'm comfortable with Python. Except for a few things I haven't tried (decorators), the language and its limitations are known, and logic flow emerges naturally.
So I'm free to concentrate on absorbing
the new concept instead of trying to make it fit to the language.

What all the above verbosity essentially wants to say is that it's hard to learn two things at once.

Friday, June 13, 2008

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.

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:

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.8 b 0.1 }
}

rule hornright {
CIRCLE { size 0.7 }
hornright { x -0.3 y 0.3 r -30 size 0.8 b 0.1 }
}

Thursday, June 12, 2008

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. There shouldn't be any disconnected branches, the entire structure should be one, without any loops. If you see loops or disconnected branches, let me know.

Controls:
Mouse click to rotate pieces. To resize the grid, press R and then use the arrow keys. pressing R again will bring you back to play mode.

Wednesday, June 11, 2008

Meet Pypes


Pypes is almost done, except for the loops, which shouldn't be there. Have a screenie.

Yahoo! free up my form


If you use 'Tab' to quickly move between form fields then I'd say that its now muscle-memory to 'type username. press tab. type password. press enter'. Well yahoo manages to break it, by introducing a linked email id, right between them. which means i end up typing my password twice. Its 2008 people! If you don't know what to type in the username box, you shouldn't be using it.

Saturday, June 07, 2008

The cooldown

This year's hot hot summer is finally drawing to a close as the rains have finally arrived in Mumbai. This has led to a nice drop in temperatures which means I went the entire day yesterday without getting sweaty even once! I love the rains! The football, the volleyball, and now Euro 2008...