amarmaduke / olette Goto Github PK
View Code? Open in Web Editor NEWOptimal Lambda Evaluator Toy
Home Page: http://olette.muse.life
Optimal Lambda Evaluator Toy
Home Page: http://olette.muse.life
Add a button that will clear all the state in the program. (History, graph, text inputs, the works).
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.
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)
The README at the current point is not sufficient for getting someone up and running easily.
We need to describe how to install the npm dependencies for npm run build
and npm start
. As well as how to npm link
olette to get things up and running.
See title.
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.
(\ f . (\ x .x x) (\ x . f x)) (\ y . y)
Olette creates a graph where the R (root) node is pointing to a lambda node, but it should be pointing to an application node.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.