I use this really basic Firefox bookmarklet pretty much every day, so I thought I’d post it.
–> Dictionary.com <– drag to toolbar
Dictionary.com provide an ‘official’ bookmarklet, here:
http://dictionary.reference.com/tools/bookmarklets.html
I’ve improved it a bit Read more…
AMF and RTMP libraries for node.js – Flash remoting with node.
I’ve been having fun playing with node.js over the past year, but have had little, or no excuse to use it in any production work, so I thought I’d set myself a challenge and build a module. That challenge was firstly to create a simple AMF gateway for Flash remoting, and secondarily to see if an RTMP socket server was achievable in node.
If you don’t know about “node” – It’s a JavaScript runtime that allows you to write socket servers. I like it a lot – it brings asynchronous, event-driven programming to the server side and provides a truly global variable scope across all connections. I’ll blog about it in more detail later, perhaps.
At Public we do a lot of Flash work, and regularly implement Flash remoting using a PHP AMF gateway. I wasn’t necessarily looking to replace this stock approach with node, but node offers proper socket connections that PHP can’t, so I was imagining the possibilities of using node as a free, and more flexible alternative to Flash Media Server. Not for streaming media, but for real-time messaging, for example in multi-player games. If I’m honest though, I did this mostly for fun, an academic exercise and as an excuse to work with node.
I couldn’t find this information today when I needed, so I thought I’d share. If it’s in the Google maps documentation, then I missed it.
If you want to zoom a map to fit a particular distance as tightly as possible, you need to know the scale of each of the 19 levels. In metres per pixel, I worked them out to be as follows: Read more…
After nearly two years I’ve finally gotten around to releasing my PHP JavaScript parser, although documentation is still thin on the ground.
The library has been split in two:
- jTokenizer – A JavaScript tokenizer designed to mimic the PHP tokenizer.
- jParser - The fully blown JavaScript syntactical parser which generates a parse tree.
Read more…
After a brief exchange of tweets with @jsmag I discover this web development ‘podcast’ : webdevgeekly.com, which appears to be run by the same people as jsmag.com. About 9 minutes into the following podcast there is a 2 minute discussion about JASPA. Conveniently just 24 hours after I rescued my site from a hardware crash.
> http://www.webdevgeekly.com/r/www.webdevgeekly.com/mp3/geekly6.mp3
I’ve been asked how I generate the JavaScript parse table for jParser, so I’m posting the grammar file here for anyone else who’s interested.
↓ JavaScript grammar file for jParser
Read more…
I’ve received quite a few emails recently asking me where the code is for jParser.
I’ve had to disappoint so far, because it’s not currently available for download. My web analytics also tells me that a lot of people are finding this blog by Googling “php javascript parser“. There’s clearly a need out there, so I’d better do something about it.
I know why I want a JavaScript parser, but what kind of things might you need it for? What API features/functions would you like to see? Please post a comment and let me know. Watch this space for a release, and in the mean time here’s some food for thought …
Read more…
I’m suspicious of people who don’t enable commenting on their blog – that just makes it a book. But this gripe aside, I like what Joel Spolsky has to say about abstraction in modern programming. Well, it pushes one of my buttons; perhaps “like” has nothing to do with it.
Sadly the people I feel need to appreciate his point the most probably won’t get past the second paragraph. That point, or at least the one I took away from it, is best summarized by this quote:
“[...] as we have higher and higher level programming tools with better and better abstractions, becoming a proficient programmer is getting harder and harder.”
Read more…
JavaScript language abstraction
I just read this blog article by John Resig, the author of jQuery. The article in general is a criticism of various projects like my very own “JASPA” – A criticism of frameworks that attempt to bring JavaScript into the 21st century by abstracting it into a different language. Read more…
In my article about method closures I showed a way to neatly create a portable reference to an object method that doesn’t ‘forget’ the object it belongs to. I have since discovered an aggravating problem on – you’ll never guess – Internet Explorer!
Read more…