

Square open-sources Tesseract: fast filtering for coordinated views - mbostock
http://square.github.com/tesseract/

======
nodata
Please don't call it tesseract, we already have a prominent open source
project with that name: <http://code.google.com/p/tesseract-ocr/>

~~~
mbostock
Apologies; I wasn't aware of the Tesseract OCR project until very recently,
and then I hoped there would not be much harm given that the two projects are
so unrelated. (The name "Tesseract" was the natural progression from "Square"
and "Cube".) What's the saying? There are only two hard things in Computer
Science: cache invalidation and naming things.

~~~
sparky
Hypercube?

~~~
mattdeboard
n-dimensional hypercube

~~~
tesseract
hypercubes are already n-dimensional, that's not adding any extra information.

------
drewda
@mbostock: Why is there Dart code in the project? Just because that's where
you borrowed one of the sort functions from?

Thanks for another useful library!

~~~
mbostock
Yep. Typed arrays don't have a built-in sort method, and even the built-in
array.sort is extremely slow. I ported Dart's dual-pivot quicksort
implementation, which reduced the time to sort 1M floats from ~2.5s to ~350ms
(timed in Node v0.6.2).

[https://github.com/square/tesseract/blob/master/src/quicksor...](https://github.com/square/tesseract/blob/master/src/quicksort.js)

~~~
drewda
Good to know. I'll have to consider switching away from Underscore's sort,
which is probably equally slow.

By the way, quicksort.js is code you wrote, right? I assume that's too nice
and concise to be from the Dart generator...

~~~
jashkenas
Underscore doesn't have a "sort" apart from the native Array.prototype.sort,
but it does have a "sortBy", which is something else entirely.

~~~
drewda
The sortBy method is just producing an integer array that is then sorted using
each browser's implementation of Array.prototype.sort. Is that a proper
reading of the code?

~~~
jashkenas
Bingo. You got it.

------
nodata
Update: Square have changed the name to Crossfilter:

"Renamed to Crossfilter, partly in homage to Chris Weaver's work on
multidimensional visualization. It may not have the intrigue of "tesseract",
but it does describe the library's function succinctly."

\--
[https://github.com/square/crossfilter/issues/1#issuecomment-...](https://github.com/square/crossfilter/issues/1#issuecomment-4706390)

------
troels
That's timely. Recently I've been looking around for various widgets
interfaces to explore multidimensional data. This looks quite useful - way up
next to good old pivot table.

What do you think of parallel coordinates as a widget? (F.ex.
<http://exposedata.com/parallel/veggie/>)

------
mnutt
This is really great work, and I can't wait to see some of it filter into
Square's Cube project.

------
mukaiji
I got a preview of this project from Square's CTO 3 weeks ago at Stanford. The
fast-filtering is MIND-BLOWING.

------
Tyr42
It'd be cool if it could say, show the data for all weekends at once, skipping
over the weekdays.

------
swah
So mbostock works for Square?

------
huggyface
Thank you for an release. I've been heavily promoting the web stack for over a
decade and a half, yet still I'm surprised by what it is capable of. This also
provides a clear demonstration of the power of algorithms even on an imperfect
implementation. Excellent, clean API as well.

