June 10th, 2008 at 6:02 am
Tags: browsers, canvas, Cocoa, Javascript, Kids, objective-c, processing, Programming, Python, scratch, smalltalk, squeak, Visual

There is a lot of interesting stuff happening in Javascript land these days, even to the point of other languages targetting the browser as a runtime, but running on top of Javascript. You can run Scheme right in the browser, and by now everyone has probably heard of Objective-J (open-source coming soon), an Objective-C-like language used by 280 North to create their 280 Slides web application, inspired by Apple's Keynote.
Since my last post about Processing, John Resig managed to port most of Processing to Javascript, so it is easier than ever to get started. Now instead of having to download the Java-based runtime, you can create Processing animations in your browser, within the limitations that it only targets very recent, beta browsers (Firefox 3, Opera 9.5, WebKit nightlies, no version of IE) and that not all of Processing is supported (no 3D, for instance, and my example from the earlier post does not run). Still, it is interesting and a lot of fun to play with. My seven-year-old son is fascinated with computer programming and looking to move beyond Scratch, so as part of that I stuck all the basic examples from Mr. Resig's site into one page, with a menu to select them, and a button to run them. And I made them editable. You can write entirely new code too, of course, but the examples can help for getting started. I hope folks enjoy it.
Processing Playground
Of course, what my kids really want is a version of Scratch that we can extend to add some more features of our own. Scratch has been open-sourced, so we could possibly extend it, but it is built on Squeak Smalltalk, and I've never been very good at Smalltalk. Instead, I am porting it to Javascript. It is still in the early stages, but I'm making steady progress in my hour or so I have to code each evening, and my kids are eager to use it, so they keep me motivated and focussed.
2 Comments
May 12th, 2006 at 9:36 pm
Tags: AI, Dictionary, Games, Javascript, Python, Web
In my sidebar, under Mini Projects is one called Silent Boggle. When my daughter was born, my wifed Daniela and I like to play Boggle a lot, but we worried about the noise waking the baby, so I coded up a quick CGI script to create a web page listing the letters with the same frequency as the game. That worked OK, and now we could play without rattling the box, but of course a project never stops where you thought it would. I kept thinking that it would be cool if I could list all the words available, making it useful for learning new vocabulary, or just checking your score. It turns out that Peter Norvig covered solving Boggle as an AI problem in his book AI: A Modern Approach. And he also provides the code from the book, in both Lisp and Python. So, armed with a standard linux word list, munged to remove words illegal or impossible in Boggle (and to handly my funky hack involving the Qu face of the Boggle dice) and the AIMA python libarary, I was able to get something going. A little slow, and resource intensive, but it works (if that project ever starts getting much traffic, I'll have to stick the wordlist in a seperate, long-running process).
The thing is, the linux word list has a lot of words I don't recognize and cannot find in any dictionary. At first I wanted to create links from the "answers" to a site with their definitions, but for many of the words there don't appear to be definitions. I'd like to use this as a vocabulary building tool for my kids (my newborn daughter at the start of this project is now nine, and my son is now five and both are avid readers), but I can find two types of resources on the web: word lists suitable for use with the AIMA library, and dictionaries that don't have associated word lists. I suppose I can dowload an open-source dictionary and extract the word-list myself, but it seems like with all the work that's been done out there on wordlists and dictionaries, that there should be one that combines them both, that I just haven't found yet.
So, lazyweb, I invoke thee! Please help me to find the wordlist + dictionary that I have overlooked in my searching.
Comments
December 28th, 2005 at 10:38 pm
Tags: Javascript, MochiKit, OS X, Programming
Kathy Sierra, of the Creating Passionate Users blog, posted about using an equalizer metaphor for product planning and brainstorming. She included some images for her readers to play around with for their own equalizer-planning projects. I took those, apply the Gimp to them, mixed with Bob Ippolito's uber-cool MochiKit, and release to you:
Sierra Sliders

You can label up to eight sliders using the text box, hit enter and tweak the sliders. When you have it the way you want it, you can bookmark the result and send it to your team members, or your mom. Tested in IE 6, Firefox 1.5, and Safari 2.0.2. Your mileage may vary. Void where prohibited by law. Some limitations may apply. Coded in a hurry™.
Comments
July 13th, 2005 at 9:15 pm
Tags: Javascript, Programming
While most of my coding for fun is in Python, a whole lot of my coding at work is in Javascript. Over the years I have tried many, many frameworks for extending Javascript to add new widgets to the browser, to handle functional-style programming in Javascript, or simply to make the browser DOM easier to use. They pretty much all suck. Much of the suckitude comes from trying to support beasts such as Netscape 4 or IE Mac, neither of which are supported by any sane company these days. Of course, now that Netscape 4 is finally settling into the dim recesses of history where it belongs, we still have all the flavors of IE to plague us. Microsoft does their best work when they are playing catch-up. Everyone predicted that as soon as they were the dominant browser they would stop caring about standards and stop updating their browser in any significant way. Microsoft denied it, but can anyone really say they're suprised that it's exactly what they did? Only when Firefox began to seriously erode their "market share" did they reanimate the moribund IE team. I can't wait to see what kind of nightmares we get when that monster walks out of the laboratory.
Despite all this, I'm still somewhat of a fan of Javascript. It doesn't get much respect, in part because of poor implementations, and in part because it wasn't designed to be very modular. It ignores modern concepts such as threading. You could go on for days on the problems of Javascript, and others have, so I won't. What all this is getting to is that I'm excited about seeing good uses of Javascript in Google Maps and Backpack. I'm going to try using Script.aculo.us to see what I can get away with (using my new fave web framework, CherryPy). And I'm really, really looking forward to what Bob Ippolito is cooking up with his semi-stealth project: Mochikit. Bob has done some amazing work with PyObjC, and Mochikit could well be the Javascript framework I've been looking for, complete with documentation and unit tests. I can't wait.
Comments