This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-11
Channels
- # announcements (3)
- # aws (3)
- # babashka (79)
- # beginners (105)
- # calva (10)
- # chlorine-clover (22)
- # clj-kondo (12)
- # cljs-dev (39)
- # clojure (52)
- # clojure-europe (1)
- # clojure-spec (15)
- # clojure-uk (12)
- # clojurescript (47)
- # conjure (93)
- # data-science (1)
- # datomic (10)
- # emacs (6)
- # figwheel-main (14)
- # fulcro (30)
- # instaparse (3)
- # kaocha (2)
- # lambdaisland (3)
- # malli (2)
- # meander (6)
- # off-topic (27)
- # pathom (14)
- # perun (1)
- # reagent (15)
- # shadow-cljs (69)
- # slack-help (2)
- # spacemacs (5)
- # test-check (23)
- # vim (9)
So nice to catch up on this channel, I just tried :help conjure-intro
and nothing came up, but damn, I’m excited! 🙌
No rush, no rush!
is it true that conjure reads the .nrepl-port content to decide on a port to listen on?
I’m just messing around a bit 🙂
@sogaiu that’s what it seems to be doing currently, yes
creating .nrepl-port and putting a port number in it and starting lein doesn't seem to affect the port lein chooses to listen on
well you’d need lein running so conjure can connect to something, no?
It needs you to start an nREPL at the moment, yes (@U050TNB9F) so you need an nREPL and .nrepl-port file
I haven't added commands to connect to any arbitrary port yet (that's easy and soon), so to connect to bb you need to create a .nrepl-port file yourself
Really not that big of a deal for now!
I just upgraded my Conjure to develop
and am connected to a CLJS repl and I can see stdout (which hasn’t been working with shadow + fireplace). I’m sold! 😄
Yay! Yeah, there's still issues with piggieback CLJS and stdout but I've reported them on the repo
I think doc lookup doesn't work through piggieback either because the stdout goes to the wrong session id. Figwheel may be much better, I haven't tried yet.
My repl use is pretty simplistic so I’m not too worried about doc etc
the old one didn’t use nrepl but the new one does. and the nrepl server has to be started somewhere.
previously conjure also didn’t start nrepl servers on it’s own IIRC
as in you specified a port number in .conjure.edn
but it was largely up to you that an nREPL server is running at that port
if conjure works with bb, please report it here: https://github.com/borkdude/babashka/issues/344
@borkdude I’ll give it a test run
Yep, so you run your own nREPL server (I will probably add jack-in at some point) and it only works by .nrepl-port file right now.
Here's the raw mapping config https://github.com/Olical/conjure/blob/656bf69e03b8ca18ea02cfda01c271a264397a73/fnl/conjure/config.fnl#L8-L23 and for Clojure specifically https://github.com/Olical/conjure/blob/656bf69e03b8ca18ea02cfda01c271a264397a73/fnl/conjure/lang/clojure-nrepl.fnl#L28-L49
You can use those to work out which keys do what until I write it up 😬 (pretty bad, but still)
Mappings wrapped in tables/lists like ["K"] mean it's unprefixed. Just a little DCL for config.
@olical Is that this operation? https://nrepl.org/nrepl/ops.html#_ls_sessions
Yep, I use it extensively to ensure the user is always connected to an existing session.
If you kill all sessions then it'll go "oh no, I don't have one and there's none to assume so I'll make a fresh one"
I don't understand the use case completely. When you do clone, you get a new session id. When do you want to see the other session ids?
If I reconnect to an nREPL server I can list the existing ones (which might have a server process in it I want to go interrupt and restart)
It also means if I have piggieback cljs running then my neovim crashes, all I have to do is reopen neovim and I'm back into cljs land.
ok, I'll add it: https://github.com/borkdude/babashka/issues/346
I'm planning on adding ways to name sessions from Conjure too which will mean you can be like "this is my server, this is cljs, this is the main clj eval one"
Not sure if you’re asking for bug reports on Conjure develop
but I noticed that session-select
fails with this when connected to a shadow-cljs nrepl server
; conjure.lang.clojure-nrepl error: .../.vim/plugged/conjure/lua/conjure/lang/clojure-nrepl.lua:912: attempt to call field 'input' (a nil value)
Ah that's annoying, probably to do with shadow's ls-sessions working differently,at a guess?
It’s not that big of a deal for me really, I’m fine just using session-next and session-prev
Overall this is really amazing, I’m really excited to use this going forward
Showing the session type in the session list would be pretty cool
And yeah, planning on adding meta data to sessions such as names (maybe auto generated with human readable things by default) which show up instead of the uuid
I think the naming system will be automatic by default, so I'll mash together a few random words (like "correct horse battery staple"), but you can manually rename if you want
Something I haven't really seen in any other clients so far but maybe I'm missing something. Sessions seem super useful but I've never really seen them exposed much?
I never bothered to look into sessions in Cider, I just disconnect and reconnect if I want to go back from cljs to clj, but on my current project I’m also mostly using cljs so not too important to be able to go back
I haven't got all the magic of "execute the code in the right connection via a series of complex rules", I don't think it's required
The autogenerated names sound like a great idea, may I suggest: use a single word & have a theme for clj and cljs sessions, e.g. clojure is colors (blue, white, …) and clojurescript is tools (hammer, saw, …)
The problem is you won't know what type a session will be when you create it. It becomes CLJS via piggieback.
Yeah I actually like the manual switching but that may only be due to some oddness in my current project. I wonder if maybe there should be a warning of some kind though, when evaluating forms from a .clj
buffer to a cljs session
:thinking_face: maybe, although you might want to, so a warning would be a strong as it got I guess
right, I actually read that code just now but would it be too complex to just collect this information before listing sessions?
I'm keeping sessions simple until I give them some love really. Once I start attaching metadata it'll get easier.
Maybe city names from around the world mapped into an evenly divided space :thinking_face:
I think I'll do that, so you get to discover random city/town names while playing with sessions 😅
Hey @olical I'm pretty excited with the new conjure, even more with the idea of multiple languages in the same tooling, I may finally give Racket a try haha But regarding backward compatibility, you planning to make it smooth? Or it will break everything when you swap the master branch for sourcery? I actually don't care if I need to do a setup again, but I care for the Mappings, they will be the same? Sorry if you said this before.
I'm trying to make it as smooth as possible, but there will definitely be things you need to adjust to. I mean the lack of .edn config files and prepl for starters. The mappings however are basically exactly the same as before, how you configure them will be different but not too much. You just have to set some values in Lua now (I might provide some viml based helpers so you don't need to write any Lua interop)