Monday, March 29, 2010

The taste of lua as a web app language

This is a snippet of the web app that is written in lua, using my experimental framework:

Not RoR but is reasonably convenient, though would be nice to get rid of some of the braces/parens.

Tuesday, March 23, 2010

Solution for the "paid content" and online newspapers.

It's all here: - the newspapers just need to keep providing the "human-readable" content for free, and charge for the structured/machine-readable data, that might be possible to further aggregate/analyse.

How many of the "paid members" will that generate ? That's a good question - but I'd wager that people's curiousity could be a good help to this. Think of this more somewhat like a "click & pay here for more info", but rather than content-wise, you do that semantically.

Imagine this to be similar to a progressive JPEG (or different formats of the picture) - lower-resolution picture is free, and you need to pay a modest amount for the hi-res one.

Those who are interested by the core fact - will get only the core fact for free. Those who are interested in full glory - will use micropayment to get there. ($0.1 might be the right amount)

Of course, this implies working micropayments...

Monday, March 22, 2010

One-shot makefile for Prosody updated + on github

I've updated the makefile to compile 0.6.1, and rather than putting it onto the blog posts, it's now on github:

Lua quine

For some reason lately I've seen an anomalous number of mention of quines, and figured it'd be time to try it out myself (I read about this question back in 1990s, but for some reason never got myself at solving it. here's the result in Lua.

function p(s)
print("\ns = " .. string.format("%q", s) .. "\np(s)")

s = "function p(s)\n print(s)\n print(\"\\ns = \" .. string.format(\"%q\", s) .. \"\\np(s)\")\nend"

And, just in case that blogger mucks up my quoting, here's a base64-encoded version: