Comments (7)
Hi,
This is my clojure deps.edn
config, notice the :main-ops
is not present:
:rebl {:extra-deps {org.clojure/core.async {:mvn/version "RELEASE"}
org.clojure/data.csv {:mvn/version "RELEASE"}
org.clojure/data.json {:mvn/version "RELEASE"}
org.yaml/snakeyaml {:mvn/version "RELEASE"}
com.cognitect/rebl {:local/root "/home/david/development/workspaces/personal/clojure/rebl/rebl"}
org.openjfx/javafx-fxml {:mvn/version "RELEASE"}
org.openjfx/javafx-controls {:mvn/version "RELEASE"}
org.openjfx/javafx-graphics {:mvn/version "RELEASE"}
org.openjfx/javafx-media {:mvn/version "RELEASE"}
org.openjfx/javafx-swing {:mvn/version "RELEASE"}
org.openjfx/javafx-base {:mvn/version "RELEASE"}
org.openjfx/javafx-web {:mvn/version "RELEASE"}}}
Then my conjure.edn
config:
{:conns
{:local
{:port 55555}}
:hooks
{:connect! (fn [conn]
(do (require 'cognitect.rebl)
((resolve 'cognitect.rebl/ui))))
:result! (fn [{:keys [code result]}]
(cognitect.rebl/submit code result))}}
This works for me (once I'm in neovim, and I've connected to local
and I eval an expression).
Hope that helps!
from conjure.
Going to close this since the whole concept of hooks has gone in the new update. I'll have to reassess how REBL can be hooked in but I suspect it would just be nREPL middleware which would be so cool. Conjure doesn't even have to know about it!
from conjure.
Ah, that'll probably do it! I don't think you want the :main-opts
since that starts a REBL UI through some other thread potentially? Leaving it up to Conjure to start is probably for the best, if that solves your issue I think the caveat will need to go into the README.
The REBL docs are correct other than that one thing I guess? (in the context of using it with Conjure)
from conjure.
This setup works - thanks.
In the current readme
:result! (fn [{:keys [code result]}]
#?(:clj (cognitect.rebl/submit code result)))}}}}
does not work for me.
This does:
:result! (fn [{:keys [code result]}]
(cognitect.rebl/submit code result))}}
from conjure.
If I execute this:
(defn fib [x]
(loop [n x result '(1 0)]
(if (> n 1)
(recur (- n 1) (conj result (+ (first result) (first (rest result)))))
(rest (reverse result))
)))
it has output in the REBL.
Followed by: (fib 10)
gives no output to the REBL.
Can you see any reason for this ?
cheers
from conjure.
Hmm, the reader conditional not working isn't great, I'll need to check that out. Really I don't need to recommend it since one conn is one language. I was mainly using reader conditionals in testing when I had the hooks at the top level so every connection got REBL if it was Clojure.
A fun experiment but not really a common use case.
With regards to the fib
call: I'm really not sure... maybe lazy sequences aren't rendering correctly? I'll try to have a look soon. This issue will remain open until:
- Documentation updated to show a minimal working REBL scenario.
- Reader conditionals in hooks investigated. (I think some hooks will work, others won't depending on your current file name ending in
.cljc
or not.) - Your
fib
example is working.
from conjure.
from conjure.
Related Issues (20)
- [Clojure] Defining custom/alternative test runner HOT 5
- Regression on the `develop` branch since 5119706fa08ecb1efa72fb9d6e68bb965d259015 HOT 3
- Other floating windows overlap HUD HOT 1
- How can I write a conjure client without aniseed? HOT 5
- How do I connect to a Fennel REPL via port? HOT 3
- Connection resets upon evaluation on Windows for Janet + Netrepl HOT 4
- Disable all default mappings? HOT 11
- [Feature Request] Add Tangerine support (Fennel)
- Duplicate kondo messages with Lazy and your provided config HOT 7
- Randomly losing keymaps HOT 1
- Clojure: evaluate word misinterprets single-quotes in symbol names HOT 6
- [Clojure]: A way to configure a default namespace HOT 6
- Swap `__name__` to something other than `__main__` in Python REPLs HOT 3
- README Suggestion HOT 2
- Cannot connect to Scheme through socket HOT 2
- Async/await doesn't work with ipython REPL HOT 13
- stdio repl handling of both stderr and stdout for a form can be a problem sometimes HOT 1
- <localleader>ee, <localleader>E evaluate the whole file HOT 9
- Problems with evaluation: wrong returns HOT 3
- Guile over nREPL, guile-ares-rs integration HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from conjure.