Wednesday, January 1, 2014

Rule matching with the Observer pattern

A rule matching algorithm has an intuitive implementation with the use of the observer pattern. Model state data as observables and productions as observers of state objects. Updates to the state objects trigger notices to productions. Notices to productions can include the state object which sent the notice. Productions request to add themselves to a set of rules-to-execute. Conflict resolution between productions can be done on addition to the set or in a separate phase.

Running time estimations

Updates to N state objects with at most M productions depending on any rule takes O(N*M) time if the productions know which rule fired and productions get notified independently for each state object of all changes to their preconditions. Deleting a production takes O(B) time to unregister the production from each of B data objects. Deleting N data objects with at most M dependents depending on at most B data objects takes O(N*M*B) time if the objects must unregister themselves when they can't be satisfied (presumably they can't if all precondition variables must be present to fire), or O(N*M) otherwise.

This algorithm improves over a naive implementation of searching through the whole list of productions on each update, but doesn't perform as well as Rete matching on updates.

~~~~

Wednesday, August 21, 2013

Public database of sampled music

http://www.whosampled.com/ I haven't explored it, but it's a cool idea.

~~~~

Sunday, July 21, 2013

Susan B Anthony riding a roller coster

 teehee... (click on the pic for the artist's blog)
~~~~

Saturday, July 20, 2013

A cool idea

One for LBS on mobile: I often go places with other people and want to spend more time in some places, but have to leave them for later. I'd like to have a tool that will read your current location so you have a 1-button add-to-list-of-places-I-want-to-revisit. 
~~~~

Tuesday, July 16, 2013

I don't think it's clear to some users what kind of authorisation they give to programs when they click an accept button. When you click accept, in most cases you give that software full authority to act as you in any action which it can perform. It's also problematic that outside of (and sometimes inside of) large government operations, the principle of least privilege is neither understood, nor implemented when it is, in the case of dodgy or absent specifications, a very good way to limit the damage rogue programs (and operators) can do.
~~~~

Thursday, July 4, 2013

fucking GSM standards

Post-2000, why the FUCK couldn't 3GPP hyperlink their specification documents? Seriously, go to the fucking trouble. It's worth it.
~~~~

Monday, January 21, 2013

Is it possible to derive statistics about bodies of English text  in general from measurements of a dictionary ? For example, if I have a chart of the letter most likely to come before any given letter in the alphabet taken from a dictionary, is that applicable to, say, a journal article?

A dictionary isn't distributed like the usual English text, so I'd say no. Richer metrics would be required to make that sort of translation.
~~~~