
Cruncher: An Implementation of Bret Victor's Scrubbing Calculator - luu
https://www.cruncher.io/
======
akie
In case you're unfamiliar with the term "scrubbing calculator" (like me), read
this:
[http://worrydream.com/ScrubbingCalculator/](http://worrydream.com/ScrubbingCalculator/)

~~~
seanmcdirmid
It really is a good essay, but the videos in it have seem to be broken for
awhile.

~~~
sdabdoub
In chrome, I had to click on the words "click to play" to get the video
running.

~~~
seanmcdirmid
It didn't work for me (using chrome latest).

------
jbackus
Author's other projects are pretty interesting too:
[https://rsnous.com/](https://rsnous.com/)

~~~
duncancarroll
Very cool! Thanks for sharing!

------
felipeerias
When I click on the "assorted examples" link, it pops up a dialog to ask me if
I want to leave the page.

After I tell it that yes, I really meant to click on the link that it had
offered me, it displays the examples... and promptly replaces them with an
empty page after a few seconds.

That annoying dialog also comes out when doing other things, like using the
Back button.

------
akavel
Interesting!

Quick feedback: some I believe issues in the current version, in the "assorted
examples":

\- "4 apples + 5 oranges * 18 friends" ― wasn't that meant to be "(4 apples +
5 oranges) * 18 friends"?

\- "Hold ALT while scrubbing to plot" ― doesn't seem to work for me on Fx nor
Chrome

\- after clicking on "assorted examples", they like to not show immediately,
requiring me to go back till the URL has "?/examples/cdg" and then refresh.

\- also, Ctrl-Z doesn't seem to do anything, I'd really appreciate if Undo was
available after I click something by accident.

\- 5,000 in some locales means 5 not 5000 (',' is used as decimal separator
instead of '.') ― see e.g.:
[https://en.wikipedia.org/wiki/Decimal_separator#Countries_us...](https://en.wikipedia.org/wiki/Decimal_separator#Countries_using_Arabic_numerals_with_decimal_comma)

~~~
oneeyedpigeon
> "4 apples + 5 oranges * 18 friends" ― wasn't that meant to be "(4 apples + 5
> oranges) * 18 friends"?

In the 'real world', that would clearly be the correct interpretation, even if
it flies in the face of the 'standard' rules of precedence. If the calculator
really works that way, it only makes it _more_ impressive in my book.

~~~
Chris2048
Why is it that way in the real world? The example is still abstract, and
without clear interpretation without context.

The text is supposed to be, in the first place, all the relevant context in an
abstract form, i.e. problem minus all irrelevancies.

~~~
oneeyedpigeon
> Why is it that way in the real world?

It's an interesting discussion how the nature of concrete items involved in
calculations might affect the precedence. I think that, since "apples" and
"oranges" are clearly more closely related than "friends", it makes sense that
they bind together more closely in this case. Also, the order in which the
items are presented has some bearing on the interpretation.

~~~
Chris2048
Sounds like DWIM, NWIS...

------
stdbrouw
On the one hand I love that people are thinking about how to make algebra more
approachable and more usable in everyday life, but on the other hand I fear
that it might mess with the learning curve. Once you want to do something
that's beyond the capabilities of the scrubbing calculator, you start from
zero because nobody's ever told you about algebraic equations and unknowns and
you only know how to describe your problem in terms of "connections" and
"locked numbers."

Compare this to an application like Calca
([http://calca.io/](http://calca.io/)). Calca is more difficult to start with
for a mathophobe because, while it will solve your calculations and equations
for you, you do have to explicitly define all variables and formulate an
equation. But the result is that the learning curve when you graduate from the
application is much smoother: you can easily port more complex problems to a
programming language or pen-and-paper math. Your existing knowledge doesn't
suddenly become void.

~~~
duncancarroll
No offense, but clearly no good deed goes unpunished on Hacker News =)

Notwithstanding opinions on the merits or lack thereof of abstracting and
visualizing concepts that may or may not help your syntactical understanding
of algebra, I want to point out that this is A) a brilliant idea and B) a
really cool implementation.

Kudos to the developer who spent the time to implement this, and to Brett for
putting the idea forward. I hope this gets traction and is continued to be
built upon.

~~~
stdbrouw
It's great work. Constructive criticism can make it even better.

~~~
duncancarroll
I know, and I don't mean to single you out, it just gets tiresome when the
top-voted HN comment always seems to be critical. I felt this post in
particular deserved better.

It was even more funny because while I was waiting for the comments to load I
was thinking, "This is an awesome tool, but I bet the top comment is going to
be some obscure reason not to like it."

------
theknarf
So when I try to write + it writes = instead, not sure why.

------
Chris2048
It's tempting to call this 'programming' or 'code', in order to link those
concepts. This is true. _BUT_

Consider the context of this kind of thing is different to the context in
which we _usually_ use code.

To explain:

It would be great if figures (e.g. in articles) came with code representing
how they were calculated, such that they can be tweaked. In fact, I think
actual programming source code should implement such a thing e.g. for
constants. But this won't be part of the "real" code - the values will remain
implemented as constants. Hence "code" like this should be still considered
_manual_ , a working tool, as opposed to the nature of common code - which is
non-manual in the end...

------
worldsayshi
There seems to be an issue where + is turned into = on my Swedish keyboard. So
I can't type +.

edit: Can't seem to find any other character mapping issue. Perhaps this is
due to some hardcoded mapping assuming an english keyboard?

~~~
odabaxok
I have the same problem with the + on my numpad.

~~~
9point6
Same as me on a British Mac keyboard number pad

------
nwhitehead
I'm solving "2^... = 256" and it gives NaN. It works when the right hand side
is smaller than 200 but fails when the right side is larger than 242.

------
vardump
Had some fun with this calculator toy. Scrubbing concept could work well in
spreadsheet input values too. Maybe you could also scrub from a spreadsheet
chart?

Text input doesn't seem to work for other than US keyboard layout. Does it
read keycodes directly?

------
neil_s
I've been meaning to make an online version of Calca.io / Soulver, which I
love so much! If this is it, that'll be awesome.

Currently, I can't really use it much because the examples won't load (they
flash, and then disappear)

------
tobr
Looks interesting, but doesn't seem to support my Swedish keyboard layout very
well. Typing '+' inserts '=' instead. Pasting a '+' in works fine though.

------
iso8859-1
Source here:
[https://github.com/osnr/cruncher](https://github.com/osnr/cruncher)

------
iNerdier
Getting an invalid cert for this via Chrome, anyone else having problems?

------
qwerty1793
Just to point out: entering 1000^6 gives 999,999,999,999,999,900.

