This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-24
Channels
- # beginners (19)
- # boot (118)
- # capetown (4)
- # cider (37)
- # cljs-dev (69)
- # cljsjs (23)
- # clojure (212)
- # clojure-austin (10)
- # clojure-india (3)
- # clojure-italy (2)
- # clojure-mke (1)
- # clojure-nl (1)
- # clojure-russia (5)
- # clojure-spec (52)
- # clojure-uk (86)
- # clojurescript (31)
- # core-async (9)
- # cursive (123)
- # datomic (91)
- # emacs (22)
- # events (3)
- # hoplon (68)
- # klipse (4)
- # lambdaisland (10)
- # leiningen (2)
- # off-topic (14)
- # om (14)
- # onyx (44)
- # perun (14)
- # proton (20)
- # re-frame (15)
- # reagent (10)
- # ring-swagger (9)
- # specter (18)
- # untangled (3)
- # vim (26)
- # yada (4)
I figured you were adding a shaded fipp dep to every classpath and using it in cursive middleware, etc
No, I just lex (and parse in a very primitive way) the output string coming back from nREPL.
Again, it’s swings and roundabouts - what I have will work for CLJS as soon as I get a dedicated CLJS REPL going.
But it’s harder for the user to customise - I can expose knobs, but customised renderers are trickier.
yeah, it's a very uncomfortable notion, insofar as I'm so used to always having pprint or an equivalent available
Well, as far as I can tell, you should be able to use the middleware I sent and just disable pprinting in Cursive
it sounded like you were using fipp in order to get that somehow, but clearly that's not the case
Well, if pprinting is enabled, I lex and (somewhat, basically just data structures) parse using Cursive’s existing machinery, then use a custom fipp on that.
Other advantages are that the syntax highlighting colours are what the user expects (they’re the same as in the editor, which will not be the case if using e.g. puget)
And it’s just generally less intrusive on the user app - after all this time, I’m still not used to the idea that dev tooling has to be injected into the running app.
Not doing that reduces all sorts of version conflicts etc that Cider has suffered from
do you have any sense of the socket repl stuff? I actually don't really have a dog in the fight anymore, but I had been figuring there'd be more activity at some point
It’s surprisingly tricky from a UI point of view. It involves explaining to users the difference between RPC and streaming REPLs, making them choose one and then supporting the various tradeoffs depending on what they choose.
question about test integration. seems to me that cursive somehow holds on to old test definition. After overwriting example test = 1 0, with sth that passes it still reports that original as failing? how can i reset short of stopping the lein process that remote repl works on? redefines seem not to work...
stopping process and starting helps and it goes away. do not know how often one can run into that, maybe i am unlucky. Is there something specific at play with regards to test integration that might shed light on such behaviour?
Do you guys know if I can get the form/something under caret in a REPL command? Something like (pprint $form)
@felipehummel You can def do that with a macro
@rauh how? What should I put in the command to be executed?
Oh, I guess I wasn't clear. I'm talking about this: https://cursive-ide.com/userguide/repl.html#repl-commands
I'd like a command that gets whats under my caret (or something similar) and pass it to a function. Like: (my-pretty-print-function $form-under-caret)
@felipehummel Oh I see, I wrote a macro like that (actually calling clojure.repl/doc
on the symbol) but it's not pretty and was a little flaky
@felipehummel So currently you can only get the selection with ~selection
(although I think I just saw a bug in that - gah). If you’d like more possibilities, please file an issue - I’m definitely interested in hearing about use cases.
The use case I was thinking about was to show a pretty-printed version of a Prismatic Schema in the repl. We use extensively schemas and sometimes we want to take a quick look at the schema definition. As schemas are normally combined/merged with one another, going to the definition of the schema doesn't always give the answer.
Newbie cursive user here.. I'm trying to connect to a remote REPL and I get the "REPL run configuration is incorrect - no module selected" error. However in the REPL configuration Context Module dropdown there are no choices??
Hi @tmarble, what that probably means is that none of your modules have Clojure attached to them.
I just tried to import https://github.com/martinklepsch/tenzing out of the box
In task-options! I set repl {:port 8082} and then configured that port in the "MyREPL" config which is based on Remote
@tmarble Sadly, Cursive currently doesn’t support boot out of the box - it’s very near the top of my list, though. How people usually handle this is to do this: https://github.com/boot-clj/boot/wiki/For-Cursive-Users
That generates a project.clj using the deps from your boot build, which Cursive can then import.
The problem is that tenzing already has a project.clj - I don’t know why that would be.
I do above with boot, only issue I have with it is I regularly forget to run boot lein-generate
so the deps in Cursive are out of date until I remember to run it again.
the project.clj in the repo is for the lein-template... the generated example (from lein new) only has build.boot
Umm - so this is a boot project which creates a lein template which creates boot projects?
Ok, so that project.clj is really like a static resource, and is not the project definition for tenzing itself.
nope... just figure out how to get Remote REPL to work in cursive. In this example just one (1) CLJS REPL... Ultimate goal is to have CLJ REPL (web server) and CLJS REPL (Weasel connected browser REPL)
Hmm.. i ran 'boot dev' per the tenzing instructions... and it says nREPL started on 8082... but when I try to start the Cursive REPL it appears to start a new nREPL on a different port?
@tmarble It shouldn’t if you’re using a Remote REPL - can you send a screenshot of your REPL run config?
You shouldn’t have to - your REPL run config looks ok, but it seems to be running a local config instead of a remote one.
This is a project you just created from a template, right? Nothing sensitive in there?
Ok, can you zip the project up and send it to <mailto:[email protected]|[email protected]>?
Following import i did 'Add project' 'Add SDK', opened a terminal, ran 'boot dev', then made the new Remote REPL configuration and tried to connect to it
@tmarble Arg - one thing that’s missing is the REPL config itself. Could you open your run config, select “share” and then add the file and push it?
@tmarble Ok, that all looks good. I can’t run boot dev for some reason, I get “Unable to resolve symbol: update in this context, compiling:(pandeiro/boot_http/impl.clj:156:36)"
But when I run the REPL it says: Connecting to remote nREPL server... Error connecting to localhost:8082 - class java.net.ConnectException: Connection refused
I’m wondering if your REPL config has got itself into a funky state somehow. Could you try deleting it and recreating it, just to be sure?