You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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:
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?
The text was updated successfully, but these errors were encountered: