This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-03
Channels
- # aleph (1)
- # beginners (99)
- # boot (16)
- # cider (35)
- # cljs-dev (46)
- # cljsrn (7)
- # clojure (152)
- # clojure-austin (7)
- # clojure-dusseldorf (8)
- # clojure-italy (1)
- # clojure-uk (7)
- # clojurescript (3)
- # core-async (12)
- # css (8)
- # cursive (18)
- # datascript (2)
- # datomic (19)
- # defnpodcast (6)
- # duct (3)
- # editors (8)
- # emacs (8)
- # figwheel (1)
- # fulcro (20)
- # hoplon (18)
- # jobs-discuss (5)
- # lein-figwheel (1)
- # luminus (3)
- # lumo (19)
- # off-topic (15)
- # onyx (9)
- # parinfer (2)
- # planck (6)
- # portland-or (7)
- # re-frame (4)
- # reagent (7)
- # remote-jobs (1)
- # ring (6)
- # ring-swagger (4)
- # spacemacs (10)
- # specter (3)
- # unrepl (131)
@cfleming @jrheard FWIW copying the last REPL output would be enough for me
@val_waeselynck Yeah, we’ve discussed that here before, that’s probably a good 80% solution.
Hey, I am quite surprised that this is blocked by perceiving it as a combinatorial explosion. Cider has 10 eval commands, some also have a prefix version (http://cider.readthedocs.io/en/latest/interactive_programming/). So that would be max. 20, some are already present in Cursive, some are not needed. Having at least a subset of those commands would be really cool.
@cfleming Is it possible to add custom command in Cursive that receive, process in the REPL and return back data? For example something like eval and replace
@nblumoe Thanks for the doc link. It’s interesting the ones they’ve chosen to implement. They support three “sources” - form before point, top level form and surrounding sexp (which I don’t support but will do, people have asked for it). Cursive additionally supports sending the selection, but that’s overloaded - the other commands will send the selection if it exists rather than what they would normally use.
But the ops available for each source aren’t very consistent - you can debug a top-level form but not the form before point, and you can replace the form before point with the result but not the top-level form.
They have 4 ops - send to REPL and eval, send to REPL and replace, send to REPL and pprint result, debug in REPL. Cursive doesn’t need debug and it always pprints, so maybe it only needs two.
@roman01la Can you give me an example of the sort of thing you’d like to do? Would replacing the original form work? Would being able to easily copy the last REPL result be sufficient?
In vim I would wrap many MB edn files/logs in a pprint
then send to repl and replace, as long as the clipboard can handle it, it would be fine
@cfleming I’d like to be able to create commands that run arbitrary code on a selection and print results into the REPL
@roman01la Oh, yes, that you can do. See https://cursive-ide.com/userguide/repl.html#repl-commands. One thing that is not documented there is that you can use ~selection
in your commands.