This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-16
Channels
- # announcements (33)
- # atom-editor (1)
- # aws (21)
- # babashka (174)
- # babashka-sci-dev (2)
- # beginners (59)
- # calva (4)
- # chlorine-clover (9)
- # clj-kondo (51)
- # clojars (7)
- # clojure (86)
- # clojure-czech (4)
- # clojure-europe (21)
- # clojure-france (6)
- # clojure-nl (1)
- # clojure-uk (2)
- # conjure (7)
- # core-async (3)
- # core-logic (3)
- # cursive (10)
- # data-science (8)
- # datalevin (14)
- # datomic (12)
- # events (1)
- # fulcro (5)
- # graalvm (10)
- # gratitude (3)
- # honeysql (3)
- # hyperfiddle (3)
- # introduce-yourself (4)
- # joyride (3)
- # leiningen (3)
- # malli (13)
- # minecraft (15)
- # music (1)
- # off-topic (40)
- # pathom (16)
- # polylith (28)
- # portal (25)
- # rdf (15)
- # remote-jobs (3)
- # shadow-cljs (23)
- # specter (1)
- # sql (5)
- # tools-deps (25)
- # xtdb (31)
Is there a way to get the last active selection on the Portal UI without using the atom returned from "p/open"?
Do you mean via something like Joyride in VS Code? Or do you mean via code hosted on the JVM?
For the latter, I don't think there's any way except via the atom. Is that a problem?
I currently have this custom REPL snippet in VS Code to start Portal: https://github.com/seancorfield/vscode-calva-setup/blob/develop/settings.json#L242 -- and that creates dev/portal
which can be accessed by any code on the JVM
Because I use vagrant for my development and normally I will ssh into the vm. If I use the p/open, it will not pop up correctly.
I normally access the portal UI from browser by typing URL directly (something like vagrant.mydev:8080)
Not currently, but I wonder if portal exposed some thing like p/sessions so you can get all the active sessions :thinking_face:
I think one thing I need to add is setting up a session automatically when hitting the ui directly
@UNKNGH2EL I'm curious why you run your dev env in a VM? I see this pop up from time to time here (on Clojurians, not #portal) and people are nearly always running into problems with it and the responses are typically "all you need is a JVM" and your REPL etc is already "virtualized"...
I use Docker to run services that my code needs, but I always run my REPLs on the host machine, using just a JVM (and a Clojure CLI install -- but for work, that's part of our repo so that we can guarantee a fixed version for all devs and all tiers).
I have many different projects running with many different stacks, I found if I keep all stacks on the host, eventually it will get bloated easily. But you're right, I found this causes many problems and I am thinking how to redesign my dev env.
Everything I work on is JVM-based -- but I suspect if I had to work with certain other stacks, I might resort to VMs for them 🙂
Maybe the best solution is I should focus on one project only. (I will choose Clojure) 😊
@UNKNGH2EL Just pushed up https://github.com/djblue/portal/commit/bb390bba17ef0f2a592ee2bb1018bc68011dcd8f which should enable what you want :thumbsup:
Has anyone created some Portal magic with Neovim, specifically https://github.com/Olical/conjure?
It would be great to be able to send some / all of the evaluation results from Conjure to Portal (without having to explicitly wrap forms and expressions in tap>
in the source code.
I usually start Portal automatically by adding it to the user
namespace (in a dev/user.clj
file) but then I have to wrap code in a tap>
expression each time (unless I have missed something obvious).
Ideally it would be great to have a key binding that works like the cider inspector, where I can eval something and send the result to portal as well. It would also be good to toggle a state where every expression evaluation is sent to portal (but I have a lot to learn about hacking neovim / lua / fennel before I know how to do that myself)
I haven't seen anything but you could try the https://github.com/djblue/portal/blob/master/src/portal/nrepl.clj#L1 middleware and see if it works for your use case :thumbsup:
Ah, that does seem promising. Thanks. I used something a bit like that to send Cider evals to Cognitech REBL successfully. I will give this a try at the weekend (or whenever the UK heatwave is over)