Paul Findlay
3 October 2007
Fingers crossed
I may be able to graduate this year. Of course, that entails finding something else to do.
Paul at 3:08 pm
25 July 2007
JSON: State Machine
Well I had fun making this (4 deterministic finite state machines that are joined together as a pushdown automaton to parse JSON). It has something like 75 73 74 states. I’m sure I could cut that number down if I made it less deterministic, but I can’t be bothered.
Just got to find some use for it..
If you can’t understand what I am on about, I’m sorry for you
Paul at 10:20 pm
20 July 2007
XML: Impossible to be original
I write a comment, then follow a couple of links to find that what I have imagined in my comment is already in production (and probably better): Simple XML Compiler.
I will have to one up it somehow.. the dream inside my head for several months has been a trie like system where you add a whole bunch of XPath’s to it (preferably doable on the fly) and by dint of acting like a trie, the common beginnings of the XPaths are bundled up so as to save space/states and to result in longest-prefix matching.. anyways the combination of these XPath expressions get applied like a giant state-machine/trie to the incoming XML events in something approximating log(n) time, so large numbers of XML streams can be handled efficiently.. probably sounds like Drools (trigger rules which are based on XPath expressions) even though I had never heard of it.
How am I supposed to get an interesting job unless I study, but how am I supposed to study when I keep trying to flesh out my interesting ideas.. but then how can I consider my ideas interesting when they are already taken
Paul at 9:11 am
4 July 2007
XML: Parser
Creating an XML parser that works like StaX out of a FSM that can process partial chunks of the document as it asynchronously arrives is kinda hard. Especially when you are trying to do it without any heap activity..
Paul at 3:47 pm
3 December 2006
Bob Parsons on how to go broke
Don’t let crowded markets frighten you.
I’ve heard people say that I love this idea, but this particular business is already crowded. In response to that I say there is always room in any industry or business for someone who truly makes a difference. And I can tell you that someone who loves what they are doing often makes a wonderful difference. People who make a difference tend to stand out from the crowd and they are the ones who survive shakeouts.
When you love something
My father used to tell me When you love something, it tells you all its secrets
. There is so much truth to this statement. It’s the accumulation and use of all those big and little secrets that separate the great companies from all the also-rans. People who are in it just for the money never learn any of the secrets.
Paul at 11:21 pm
Comments Off
26 June 2006
XML: People
Continuing with the theme…
There is the bitterly smart Fredrik Lundh and his excellent ElementTree (which will be in Python 2.5) “it makes XML documents look like a bunch of nested lists”. I find the iterparse function interesting. (Of course someone as made a similar python interface but with all libxml2’s functionality and compliance).
Another figure is the fatherly Uche Ogbuji who is heavily involved with the 4suite⢠“platform for XML and RDF processing” which is built on by the Amara XML toolkit. Very pythonic yet very concerned about the XML-Specs it would seem.
I should mention the bearded Tim Bray. He gives me hope, but not only that – he contributed to the XML standard (and the excellent Atom standard) and has ‘recently’ written a nice C library for generating XML called Genx. It seems Genx is pretty much feature complete, which is cool (because that means handling UTF-8 and namespaces ‘well’).
Paul at 2:26 pm
Comments Off
23 June 2006
XML: Digestion
Well, so I said:
– it seems the Jakarta Commons project has a Digester Component which does this programmatically. One of the Scribus developers made something similar for C++a custom XML parser (that maps onto application specific data structures) would be cool.
Paul at 2:00 am
Comments Off
17 June 2006
XML: See also
David Mertz’s XML Programming Paradigms
Also by the same author, The Xom Java Xml Api (which he calls a “A rigorously correct tree-oriented XML model”).
TagSoup, a SAX-compliant parser, for all that ‘wild’ HTML written in Java. Similarly BeautifulSoup written in Python.
From CUJ: Generating a custom XML parser (that maps onto application specific data structures) would be cool.
Paul at 4:22 pm
Comments Off
15 June 2006
XML Apis
(For future reference)
StAX
- JSR 173: Streaming API for XML
- XML.com article on StAX
- (Another) Blog post by Elliotte Rusty Harold
- StAX and XML related blog
- Woodstox is a StAX-compliant (JSR-173) Java implentation
- Don’t forget the convenience layer for the above
(Ok, so StAX is the reverse of SAX which makes it more like the normal parser/tokeniser behaviour, but SQLite goes the other way (like SAX) because the author is convinced it is better, and I’ve yet to experience any of these situations.)
A Conversation with Elliotte Rusty Harold
(About the experiences that led to nu.xom)
- What’s Wrong with XML APIs
- The Good, the Bad, and the DOM
- A Design Review of JDOM (He worked on JDOM)
- Lessons Learned from JDOM
- Design Principles and XOM (Also see the XOM Design Principles)
- Air Bags and Other Design Principles
- Designing by Dictatorship, Examples, and Tests
- The Human Side of XML
- Organic Schemas and Outlier Data
Rogers Cadenhead on XOM in Linux Magazine.
XML Pull parsing
XMLPULL
- The XMLPULL API
- Processing XML with the XML Pull Parser
- Building an in-memory tree with the Xml Pull Parser
(Even though “The API does not model XML correctly” – it preceded StAX.)
Paul at 7:48 pm
8 June 2006
Hilarious
// Preconditions: variable i in memory
// Post conditions: variable i incremented by one
// Method:
//1: fetch i from memory into register
//2: increase register value by 1
//3: write value of register into memory
i++;
Updated: This is interesting for two other reason, now I have the prefix operator (++i;) fixed in my head, and there is actually a need for such documentation: Interlocked.Increment Method (.NET’s System.Threading namespace).
Paul at 3:09 am