Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explorable Explanations #33

Open
vshesh opened this issue Feb 16, 2017 · 0 comments
Open

Explorable Explanations #33

vshesh opened this issue Feb 16, 2017 · 0 comments

Comments

@vshesh
Copy link
Owner

vshesh commented Feb 16, 2017

Brett Victor's article: http://worrydream.com/ExplorableExplanations/

It would be cool if GLUE could handle this. Of course, tanglejs already exists as one library that is capable of handling it, and I'm sure there are others.

One way to do it is to integrate tanglejs. Another way to do it is to find some way to define syntax for inline elements that are vars and for those that are outputs.

The only issue is that this sounds like something that would ideally require two documents - one document for the layout, and another for the definitions (unless some block element will output a script tag).

It could be cool to be able to define things in a less clunky way than {init: function() {...}, update: function() {...}} since that's not very automatic - you have to hookup everything yourself.

Instead I would like to be able to simply define a set of equations, like:

bmi(height, weight) = 0.15 * weight/ height^2.

In this equation we have the appropriate dependency graph. Even cooler would be dimensional analysis checking for the input so that we can verify all equations make sense:

pressure(density: Kilo Gram / Meter^3, gravity: Meter/ Second^2, height: Meter) = density * gravity * height
force(pressure: Newton / Meter^2, area: Meter^2) = pressure * area

Now if I had written pressure wrong, then the units wouldn't add up. Would be really cool if something could check that. An application of ADT's and typeclasses to solve the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant