Code Monkey home page Code Monkey logo

sol-repl's People

Contributors

eagr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

sol-repl's Issues

More fine-tuned interactions

Move

  • Alt-Left move cursor to previous start of word from cursor
  • Alt-Right move cursor to next end of word from cursor
  • Fn-Left move cursor to line start
  • Fn-Right move cursor to line end

Delete

  • Ctrl-W / Alt-Del delete to last word bound from cursor
  • Ctrl-U delete to start from cursor

Editor mode

For multi-line snippets

  • Ctrl+D finish editing
  • Ctrl+C exit editor mode
  • support all the editing shortcuts of the normal mode
  • allow moving cursor across lines

Properly handle the mixing of pure computation and mutating operations

On each invocation, the repl replays the current session on each input, the statements of which are currently encased in a single function. When applicable, each input is set as the return of the function. And we rely on the response of calling the function (initiated using ether.js) to display the result of each input.

From what we've seen so far, the actual response is affected by the function signature. The return of the function won't be available unless the function is declared as pure or view. This is all fine when the session only contains "pure" statements. The problem occurs when we start to mix in what Solidity referred to as state-mutating statements, since declaring a function as pure or view is forbidden if any of the contained statements may modify the state.

Show results eagerly when available

This has become a common feature for REPLs: listen to the input changes and preview the result of the input so far. This could greatly improve UX. Will try it out and see if we could make the preview quick and responsive.

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.