Sunday, March 30, 2008

bug?

At least they got the correct units in there:

Saturday, March 22, 2008

the many ways we iterate dictionaries

It's interesting to see how each language reinvents a way to iterate a dictionary in an interpreted language (in no particular order):

Lua

for k,v in pairs(d) do
XXX(k,v)
end
Python

for k,v in d.iteritems():
XXX(k,v)

Ruby #1

d.each { |k,v| XXX(k,v) }
Ruby #2

d.each do |k,v|
XXX(k,v)
end
PHP

foreach ($d as $k => $v) {
XXX( $k, $v );
}
Javascript/ECMAScript/ActionScript

for( var k in d ) {
XXX( k, d[k] )
}



My point? No point.

Tuesday, March 18, 2008

elementaldb

I've put up my baby database engine I've been developing onto Google Code under the name elementaldb. elementaldb is a standalone network based document-oriented database engine which uses an SQL-like query language. It is released under the new BSD license. At this point it is really only an alpha release but I'd like to put it out for the community.

I have plans to publish more about the system architecture soon. To learn more check out the overview wiki.

Sunday, March 16, 2008

You forget so easy

ahh... must keep... blog alive...
I have no idea how regular (real) blog posters do it. Do they have any time to do actual work? Attempting to do one post a day and I run out of ideas after a week, while others can keep going for years! It really is impressive and I respect and enjoy their efforts.

Too busy to come up with a new post, I've been working on my new site redesign in between my new project (to be announced soon) and real pay the bills work (and my horrible WoW addiction which I can quit at any time... really). The new site will feature a homegrown discussion board system which will use the reCAPTCHA human verification system to let random human visitors leave comments without having to login or sign-up for yet another account.

The reCAPTCHA system really is pretty great. It shows two words and asks you to try to decipher them into a text-box, at which point my server sends your feeble attempts at optical character recognition to the recaptcha verification server. It all works relatively fast considering the load their servers must be under since they apparently are used by facebook, twitter, and stumbleupon according to wikipedia. Their API is simple and easy to understand although the diagram they use to convey how it works isn't so great. Still, I'm probably going to have user accounts because I personally don't want to keep entering these illegible words into a box before I post.

Friday, March 7, 2008

new XCode code-completion


I never figured out how the old-style xcode completion was supposed to work but I'm totally digging the new-style completion. It is more like the token field where something like "const char * key" is considered essentially one character. This makes replacing it with whatever you were going to put in there much easier. The update comes from the iPhone SDK which also includes some other things like llvm -- I don't remember seeing that as part of the leopard xcode install but it is definitely here now. I did a quick compile using: /Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2

Netflix Spotter

Here's a great new feature for netflix to add: A netflix user spotter who watches customers for movies they would most certainly hate and warn them before renting it. I don't think it'd be that hard to look at a user's past renting history and see that this movie is outside their normal movie realm. I imagine the notification would go something like this: "Hi Grant, I see you're trying to rent Across the Universe. Perhaps you didn't see that this is actually a musical that bastardizes the entire Beatles catalog into a lengthy, boring and poorly made movie. Would you still like to take the time to rent this?" To which I would respond: "No, I don't want to rent that anymore! Thanks, Netflix, for letting me know!"

Saturday, March 1, 2008

2/29 end of the week

Got some gxjones.com updates in development including discussion forms. My new pet project deals exclusively with the underlying back-end forum stuff... more news on that to come later. So updates to the site may be delayed, oh well -- it'll be worth it.

Of interest to me this week:
The Lemon parser Generator LALR parser generator used by SQLite
Pygments Python syntex highlighter... unfortunately I didn't have enough patience to get the output to play nice with this blog :(
ustr via anarchaia - agreed - this library still seems sort of heavy