Javascript ActiveRecord

Ruby’s ActiveRecord Implementation is a very cool part of the very cool Ruby on Rails (RoR) project. RoR is a great way to build a database driven web page. It has weaknesses if you’re trying to build something that’s truly Javascript heavy though, because it offers no easy way for the Javascript in the page to get ahold of the database directly.

http://www.kiko.com/jsactiverecord/

Posted in Coolhunting, JavaScript | Leave a comment

Me And My Cat – 1994 – Robotic B&W QuickCam

miaow.jpg

I attempt the use of mind powers to shift a cat

[Recovered from pre HD crash blog]

Posted in Nostalgia for Misspent Youth | Leave a comment

The Problem With Stacking Browser Event Handlers From JavaScript

You learn something new every day, which is why I love being alive.

Its an astounding coincidence that just when I needed to implement a cross browser method of stacking event handlers (for MetaWrap WireWrap), this blog post came out describing exactly how you should not do it.

The issue seemed to be the difference between browsers that implement the W3C spec vs Microsoft’s spec for dynamically adding an event handler.

The key difference is that the this keyword does not work properly in Microsoft’s attachEvent. Instead of referring to the element the event handler is defined on, as it does in the W3C model, it refers to the window object.

There is also a memory leak in IE which for which the only solution is to garbage collect ever event handler you ever created, for example – on body.onunload() killing all references to event handlers. This leak is probably based on circular references.

So I’m going to write an event registration class in JavaScript that deals with both of these problems.


Related to WireWrap, it was pointed out to me that yet another CSS query/select JavaScript class has been released in this blog post which seems to implement the full set of CSS selectors.

Damned if I’m going to write my own now.

cssQuery() is a powerful cross-browser JavaScript function that enables querying of a DOM document using CSS selectors. All CSS1 and CSS2 selectors are allowed plus quite a few CSS3 selectors.

Posted in Coolhunting, JavaScript | Leave a comment

And What Do You Use A Home Grown Super Computer For In 1991? Rave Visuals Of Course :)

torus165.gif

torus135.gif

torus160.gif

torus64.gif

atorus8.gif

l_nano2.gif

Posted in Nostalgia for Misspent Youth | 1 Comment

Subtextual – Very Cool Language Demo

Looks a lot like RIDE – execution model is copy based – very much like the original old BSCAL /MetaWrap VM. They even have the factorial demo. I’m very impressd with it – it looks much nicer than anything I have made so far in this area.

Something to aspire to.

[UPDATE]

For anyone who is interested – I have uploaded the original (rewitten) BSCAL interpreter compiler into http://cvs.metawrap.com/cgi-bin/viewcvs.cgi/metawrap/vm/BSCAL/ . A garbage collecting non strict lazy functional language from 1986.

Posted in Coolhunting | Leave a comment

State of Ajax: Progress, Challenges, and Implications for SOAs

“Dare Obesanjo recently enumerated some key points that Ajax application architects have to contend with and a few of them are particularly worthy of note including how to deal with the need for permalinks, the Back button, and others. Please check it out. He also notes that MSN will be talking about their best practice Ajax techniques at Microsoft’s PDC developer’s conference next month, which it looks like I will attend. Since a prerelease version of Atlas will be available there as well, expect some updates here on this blog on the latest.”

http://hinchcliffe.org/archive/2005/08/18/1675.aspx

Posted in JavaScript, XML | Leave a comment

Something Else For The MetaWrap Javascript Library

http://www.ripcord.co.nz/behaviour/

I really really like this. It uses the CSS selector syntax to style elements with javascript code. You only need to keep one mapping paradigm in your head and its consistent for appearance and behavior.

I was considering using XPath for the same task by applying css classes and code to HTML and XHTML based on XPath – may still take this route, but I think this approach warrants some examination because more web developers understand CSS selectors than Xpath – but it may be slower and less efficent than my approach.

I’m going to play with this – if it does the job I willl integrate this into the MetaWrap JavaScript library, otherwise I’ll have to write my own from scratch. The hardest part is the interpretaion of the selector to map into a set of elements. Not sure if I like thepackaging they use. Will look into it.

If you need s refresher in how CSS Selectors work.

http://css.maxdesign.com.au/selectutorial/

In particular

http://css.maxdesign.com.au/selectutorial/selectors_type.htm

CSS Javascript!

http://www.unix.org.ua/orelly/web/html/ch13_04.html

http://www.quirksmode.org/css/javascript.html

Edit In Place

http://tool-man.org/examples/edit-in-place.html

[Update]

An Even Better Edit In Place (Thanks to Damian for poining this out)

http://demo.wikiwyg.net/wikiwyg/demo/standalone/

 

Posted in JavaScript, MetaWrap Server | 3 Comments

Grammar Visualiser – Part II

http://documentation.metawrap.com/tests/dot/test3.png (generated automagically)

http://documentation.metawrap.com/tests/dot/test.png (the original target plan)

It lurches into being.

I’m thinking that I may have to write this with MwW3ParserLexerState being the node instead of the current plan for MwW3ParserLexerStateGroup. The issue at hand is that a MwW3ParserLexerStateGroup can consist of multiple MwW3ParserLexerState’s, but its each MwW3ParserLexerState that represents a point state within the grammar – and its these that will give me my lovely dot notation description in the digraph nodes.

[UPDATE Monday]

http://documentation.metawrap.com/tests/dot/test4.png  is a tidy version of test3 which is a state group based walk of the parse table.

http://documentation.metawrap.com/tests/dot/test5.png is a strange mutant graph of a state based walk of the parse tables.. it actually represents something very interesting but mostly useless unless you are into quantum computing 🙂

[UPDATE Tuesday]

http://documentation.metawrap.com/tests/dot/test6.png is state based but with filtering duplicate edges. Compared to test5, the world lines no longer represent the set of all possible paths, but simply the transitions that can be used to build each path.

 

Posted in Parsing Theory, XPath | 1 Comment

Bittorrent

Now that the fate of the current generation of commercial P2P software is moot, the Eye Of Suaron turns towards Bram Cohen. [Bio]

A little before the MGM vs Grokster ruling he formed a company and launched a search engine. http://search.bittorrent.com which is very very good at finding TV series and music and now Microsoft is gunning for a place in the pareto efficent P2P market that Bittorrent has created.  

eg.

http://search.bittorrent.com/search.jsp?query=simpsons&Submit2=Search

“According to an article in Wired, the old webpage of Bram Cohen contained a manifesto stating that his goal for creating software was to ‘Commit Digital Piracy’. Cohen argues that the quote is taken out of context and represents a parody. He argues having written it in 1999, 2 years before even coming up with Bittorrent. You can find the archived copy of his site at archive.org. From the article: “Cohen has never publicly encouraged piracy, and he has consistently maintained that he wrote BitTorrent as a legitimate file-distribution tool. That would seem to make him and his budding company, BitTorrent, safe under the Grokster ruling. But legal experts worry the newly discovered manifesto extolling ‘digital piracy’ could put him on less certain legal ground.”

See him in action here.

http://stanford-online.stanford.edu/courses/ee380/050216-ee380-100.asx

Posted in Coolhunting | Leave a comment

JavaScript Optimisation

http://www.peachpit.com/articles/printerfriendly.asp’p=31567&rl=1

http://www.websiteoptimization.com/speed/10/

http://home.earthlink.net/~kendrasg/info/js_opt/

http://www.miislita.com/searchito/javascript-optimization.html

Posted in JavaScript | Leave a comment