Git Product home page Git Product logo

Comments (5)

RickMoynihan avatar RickMoynihan commented on June 7, 2024 1

Also we should rename all the above to be prefixed with nrebl-, as they're really instructions for our middleware not rebl itself.

from nrebl.middleware.

RickMoynihan avatar RickMoynihan commented on June 7, 2024

What custom ops do you suggest?

I was thinking:

  • rebl-start-ui (already implemented) calls (rebl/ui) for you.
  • rebl-toggle-follow (would require cognitect to give us a hook for this) equivalent to pushing the follow checkbox button (but from your editor)
  • rebl-submit-form (for sending a form direct to REBL skipping your editor's REPL).

from nrebl.middleware.

jaidetree avatar jaidetree commented on June 7, 2024

I have no objections to those but I think it can be helpful to think them through as user stories:

As a user familiar with REBL I want to create a keybinding to open the REBL UI so that I can quickly inspect eval results whenever I need it.

  • Sends nrebl-start-ui op to middleware.

As a beginner REBL user I expect it to automatically receive any forms sent to my REPL so I can quickly get familiar and use my pre-existing REPL process and keybindings.

  • Will help sell the experience seen in Stu's REBL demo video
  • Sends nrebl-toggle-follow to middleware
  • Active by default?

As an advanced REBL user I expect to be able to specify which forms I inspect in REBL as not all evaluations are valuable to inspect. I want to create a keybinding to select which forms should be inspected.

  • Sends nrebl-submit-form op to middleware
  • Question: Would the result of it be evaluated against the REPL environment at all or just inspect it as a value?

As a moderate REBL user I expect to be able to clear the REBL eval history after running it for a long time and having collected a lot of data that needs to be held in memory.

  • Sends nrebl-clear-history op to middleware
  • May need support from Cognitect if such a function does not exist.
  • Definitely helpful if follow mode is active

from nrebl.middleware.

RickMoynihan avatar RickMoynihan commented on June 7, 2024

Yes thanks for that.

I agree that we probably also want an nrebl-clear-history, though I've not seen any such function exposed. Also this might be achievable simply by closing the REBL window, though there's no function hook to do that, that I'm aware of either.

Regarding nrebl-submit-form:

Would the result of it be evaluated against the REPL environment at all or just inspect it as a value?

I'd thought about this too and think we really need to do a read and eval as I think users will normally expect evaluating a form like (let [x 10] x) to return 10 not the s-expression. And an un evaluated form won't have any datafy metadata on it. If you have a form in your editor it'll normally be small enough to view in your editor anyway. Finally if you had evaluated a value and bound it to a var, then sent the var back to REBL it could easily contain unprintable values, and thus is unlikely to work as expected.

from nrebl.middleware.

jaidetree avatar jaidetree commented on June 7, 2024

That sounds good to me. We may not be able to provide nrebl-clear-history without support but Is there a way to fake it by creating a function that closes and reopens rebl?

from nrebl.middleware.

Related Issues (11)

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.