Live data from Hacker News

Animated Algorithms

algomation.com

31–36 of 36 posts

Re: Animated Algorithms

#31
post #28

Sadly the website seems to have fallen over for me. I am really interested in how it works. From what I could see it seems a bit more cumbersome, than my approach of a using full JS interpreter: http://will.thimbleby.net/algorithms/doku.php?id=bubble_sort

agreed, but compiling the code does have the benefit of providing syntax checking and you are assured the full benefits of whatever JS engine your browser is running. How do I create new algorithms on you site? I could not figure that out.

I make use of Tailspin [1], which is a JS-in-JS interpreter and almost fully ES262 compliant. The visualisation gets called on every line of code and updates itself based on inspecting the interpreter state.

Two benefits are, the visualisation code is kept completely separate from the code being visualised. And secondly Tailspin offers the ability to step back in time.

In terms of creating algorithms, it's a bit of an awkward wiki syntax at the moment, see the tutorial [2] and bubble sort example [3].

[1] http://wthimbleby.github.io/tailspin/ [2] http://will.thimbleby.net/algorithms/doku.php?id=creating_an... [3] http://will.thimbleby.net/algorithms/doku.php?id=algorithm:b...

Re: Animated Algorithms

#33

Very pretty, reminds me of http://www.cs.usfca.edu/~galles/visualization/Algorithms.htm...

Another cool algorithm animation site: http://rosulek.github.io/vamonos/demos/ uses Vamonos (http://rosulek.github.io/vamonos/). However, it looks like you have to write the algorithm twice, once in pseudocode to present to the reader and once in javascript to execute. In the Javascript code, you annotate the execution with the corresponding lines in the pseudocode so that the library can show what's executing.

I haven't dug into Vamono to figure out how that interacts with the browser's event loop. Duncan's use of ES6 generators for that interaction is clever, as is Will's Tailspin JS interpreter.

Re: Animated Algorithms

#35

I'm not sure if the site is having issues, or if I am just searching the wrong algorithms :( Can you link me directly to an algorithm to check out the animation?

Nothing showing up for me either, a search for "quicksort" returns zero results.

Searching for "Quick Sort" on the other hand returns results for me. Not sure if it's just a case of a different naming convention and finicky search, or intermittent site issues.
Post reply on HN