News for hackers. Stuff that matters.

angryamoeba

I can't help but feel that those people were using Ubuntu expecting it to be something that it was never intended to be.

To be surprised at evolutionary changes which shed the aesthetic of competing distributions and introduce simpler, more consumer-oriented user experiences is to fundamentally misunderstand what Ubuntu Desktop has always been aiming for - Ubuntu hasn't stopped delivering on promises in recent days, it's started delivering on them.

Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @11:10AM (#4003193)
None whatsoever apart from to say that it's acceptably fast for whatever data set I happen to throw at it. Another poster here mentioned in an email that he'd tried it against arrays of ~50000 object structures and it was fine.
Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @09:43AM (#4002763)
Good utility, but I had a few specific itches to scratch with SpahQL:

* Declarative syntax for selections, such that selection queries may be handed between implementations in other languages

* Imperative syntax for updates, such that updates may be idiomatic to the language in which the spahql library has been ported (linq meets this criteria)

In essence all SpahQL is, is a shorthand syntax for generating traversal and descent functions, which output a proxy object for reading to and writing from the selected nodes.

Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @07:12AM (#4002270)
That's a pretty interesting idea, and I see no reason why it shouldn't work.
Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @07:12AM (#4002266)
Nope it's completely my fault. SpahQL is so named because it was primarily developed for Spah, another project I'm working on.

I hope I don't cause too much confusion!

Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @06:42AM (#4002189)
Can you unpack that question a little for me? As in, could you use a spahql selection as the path component of some request? I don't see why not, but the escaping will probably look a little ugly.
Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @06:19AM (#4002129)
Hope you get some use out of it - don't forget to let me know any issues you have. Also there's some other neat JS-querying systems linked in these comments, so check those out and see which meets your needs!
Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @05:06AM (#4001968)
This looks pretty handy for large datasets, to be sure.

SpahQL is definitely much lighter than that - the API is intended to be more jquery-like with a specific selector language, each selection returning a resultset object which then provides methods for subselections and modifications.

Re:SpahQL - A query language for Javascript objects on Monday May 21, 2012 @04:57AM (#4001960)
Author here. I wanted to try something a little lighter than jsonpath and with a specific mode of (node collection|descent) that allowed set arithmetic to be the primary means of comparisons and assertions. This allowed me to obviate the need for scoped AND/OR structures and instead provide a broad range of assertion options using superset, subset, disjoint and joint set operations.

It's most certainly not perfect, but I had fun experimenting with it.

Re:Ask HN: server- and client-side web framework? on Wednesday August 10, 2011 @12:25PM (#2868955)
Sure - Spah is intended to act as the V in your MVC. I'd probably just use Express for the C and Mongoose or similar for the M.

I find that stitching my own framework from quality open source components gives me a bit more flexibility than Rails (rails user since version 0.7) and lets me get closer to the metal when I need it. Your mileage may vary :)

And no, you're definitely not retarded.

Re:Ask HN: server- and client-side web framework? on Wednesday August 10, 2011 @11:46AM (#2868735)
Thanks for mentioning that - Have to say, it's a work in progress. The query language for JSON (called SpahQL) is done, but I'm currently working on the document runner. See the readme for how it's meant to turn out.