GithubHelp home page GithubHelp logo

olette's People

Contributors

amarmaduke avatar macyschmidt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

macyschmidt

olette's Issues

Clear Button

Add a button that will clear all the state in the program. (History, graph, text inputs, the works).

Allow labels to be arbitrary strings

Right now labels can only be integers from 0-9. It would be better to allow arbitrary strings. This requires some finesse as a single key press will no longer be enough. Adding a modal will probably be the easiest way to implement this, i.e. when a node is selected and a key is pressed (say L) to start labeling it a modal will open with a text field, when the modal is closed whatever that was inside the text field will be the nodes label.

Also, it would be nice if this label didn't overwrite the "type-label" (i.e. the thing that tells you at a glance whether it is a lambda, application, or duplicator node). Rendering the text label next to the node would be a good first choice.

Better initial formatting

Format the graph like an AST from the get-go so that it doesn't load from (0,0) like spaghetti.

(this is low priority)

Add auto-reduction using labels to decide non-determinism

Right now rules have to be applied manually one at a time. Instead, we are going to add the option to automatically reduce a graph until no active edges exist. In order to resolve the non-determinism of a duplicator pair the label for a duplicator will be used. If the labels are equal then the cancel rule will be used, if they are different then the duplicate rule will be used.

It is probably best to implement this in the javascript code and also to add a "cancel" button in case the reduction is infinite. We also have to consider the order in which reductions are done (probably best to prioritize lambda-application pairs). Ideally this should make watching the reduction possible, so that each rule has a transition between it and the next graph.

Add rotation of nodes

This will likely be difficult. It is not immediately clear to me how to do this. One avenue is to use SVG rotations, but I wonder how that will effect links.

I recommend trying to use SVG rotations and then fixing up the link points after the fact. This may require some additional trig work (basically the unit circle projections will have to be relative to the rotation).

I'm not sure how to go about the user interface on this. The ideal scenario is you select a node and then click and hold a mouse button which lets you rotate a node as you drag the mouse around the screen. Perhaps, if a node is selected and you key press (say R) then the rotation will be set such that the 0 degree of the standard plane is rotated such that the center of the node and the point of the mouse form the new 0 degree line. (Perhaps easier explained with a picture)

From there, if you keep the key pressed (again say R) and move the mouse the node will rotate with it until the key is released.

Allow backtracking on reduction steps

When I make a reduction I would like to reverse it and trace the history of reductions I previously made. This is most easily done by storing historical graphs and reloading them when a back button is pushed.

We'll need to make sure that we an effectively deserialize the graph to reconstruct it in the Rust code. It will probably require a new function in the Rust code to do this. For the frontend it should be rather trivial, just claiming that this graph data is the new graph data.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.