Hacker News new | past | comments | ask | show | jobs | submit login

This is very impressive and cool. However I really don't think that parsing source code and manipulating is a very maintainable way to do this (and this as someone who writes Clojure for a living).

You could do exactly the same using very simple Knockout. It wouldn't be as funky, but it would be something you'd be happy to use in production.




I did something like this in my presentation[1] about Ember.

It uses Ember.js to maintain the state of the code samples and proved to be very stable. I don't have interactive sliders on specific values, but the code is parsed and run after every character the user types. e.g. you can change the size of the squid on this page[2] and see it reflected immediately on the right.

[1]: http://mutewinter.github.com/why_ember/#/slides

[2]: http://mutewinter.github.com/why_ember/#/slides/data-binding


It isn't really intended for production use. Personally, I plan to use it to tweak values in games I write, because having to alt+tab, find, edit, alt+tab, refresh, restore state for every tiny tweak to the position of a UI element sucks.

This is a development tool :)


Can you go into more detail?


I would highly recommend watching this, and keeping in mind how such a thing could be useful in games.

http://worrydream.com/#!/InventingOnPrinciple

For a concrete example of usefulness in games, see

http://www.youtube.com/watch?v=-32SFFbaeJg


It would be useful to give a pitch as to why I should watch it - it's an hour long.


Because it's an awesome lecture and well worth a good hour of your life. Trust us on this one, but it's your loss if you don't. :)


If it helps, you can read the comments from when it was posted and got 221 points:

http://news.ycombinator.com/item?id=3591298


It's really one of the best ways you can spend an hour imho.


What would you want to use it for in a production environment? (and why is JS source transformation not viable there?)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: