Fork me on GitHub

has anyone hit clojure jira's api? i tried a few paths under but getting 404. not sure if it's enabled.


I use it every week to collect numbers of votes on each JIRA ticket.


The URLs I use are in this code somewhere: Search for occurrences of http and you should see them.


awesome, thanks!


I do not necessarily exercise parts of the API that you want to use...


sure. i will poke around and see if i can figure it out


I notice that my code never uses 'rest' in any of its URLs. Also note that Clojure JIRA may be an older version than the most recent, by several years.


@hiredman built a neat looking way to query jira with core.logic but mentioned that the clojure jira doesn't send a lot of stuff back in the api


yeah i don't recognize the sr in the urls, or the jira.issueviews fragment


i'm assuming it is quite old and unloved


Well, loved by a few, and stable. Updating it can be a pain, I am sure.


apparently Atlassian JIRA (v4.4#649-r158309)


circa 2011


I am sure it gets more fun to update to the latest version, the more intermediate versions there are 🙂


good reason to use a service and let someone else worry about upgrades 😄


Until and unless they break APIs you use without telling you

💥 5

looks like we're on v7.6.6 at work, which is what i've developed against previously. so i bet none of my code will work against clojure's


ha parts of it work 🙂

Alex Miller (Clojure team)00:02:52

When you’re using the api, please be kind. It’s not on a mammoth server or anything

Alex Miller (Clojure team)00:02:30

I’ve unsuccessfully spent weeks trying to upgrade this jira instance to their cloud version. It’s a nightmare.

😞 5

Jira is brilliantly engineered in that it's extremely hard to get out of once you're in. On the other hand, the same indeed applies to Jira itself.


Where is the difference between clojure.edn and


The latter is implemented in Clojure


The former in Java. The Clojure library that tools.reader.edn lives in, also works in ClojureScript


Hi, I reinstalled Java and lein, but lein seems to be broken:

clojure.lang.Compiler$CompilerException: Syntax error compiling at (cider/nrepl.clj:1:1).
#:clojure.error{:phase :compile-syntax-check, :line 1, :column 1, :source "cider/nrepl.clj"}
Caused by: Could not locate clojure/tools/nrepl/server__init.class, clojure/tools/nrepl/server.clj or clojure/tools/nrepl/server.cljc on classpath.
 at clojure.lang.RT.load (


java --version
openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
but same issue with java 8


lein installed with brew and I tried from the cli command tool

Alex Miller (Clojure team)14:02:26

the latest cider has moved to a new nrepl - that exception indicates the old nrepl. I don't know quite enough to point you at where things are amiss

👍 5
Alex Miller (Clojure team)14:02:01

I think things that would help someone answer this better would be which leiningen version and cider version you have


usually lein 2.9.0 is enough. check your deps for the presence of tools.deps.nrepl which is poisonous to have now


Looks to me like an old cider version? the error is that t.d.n can't be found. You might have cider in your ~/.lein/profile.clj


Yes, you are right, I completely forget this file ~/.lein/profiles.clj which was pointing to an old version of cider, I put the version displayed on clojars and it worked. Thank you.

cider 10

thanks @andy.fingerhut @dpsutton, I was asking for a "max value" value only out of convenience

🦕 5

i just ended up writing my own comparator for the specific use case


So, anyone knows what's up with pRepl and what is it?


Given there is already nRepl and unRepl. I'm not sure what it can bring to the table


Though I would like it if it was more like unrepl


Or it seems maybe it can be used in conjunction with unRepl?


it cannot be used with unrepl


I think this is untrue


Unrepl can start a nested session within a single frame of prepl


I think, anyway


i don't see how that could work


it does framing on output -- unrepl expects a raw stream


It'll be nice to see more tooling using prepl so less dependencies need to be involved.


Hi folks! Is there a way of compiling clojure files to clojuresctipt/js ?


Well, the usual caveats apply--JS doesn’t support Java interop or Java-style threads. If your Clojure code isn’t running into any Java/JS incompatibilities, it probably compiles as CLJS already.


I may not have understood what you’re asking for tho.


No, you understand correctly. =D But, just because I have the org.clojure/clojurescript dependency it will compile to cljs? (if I have no incompatibilities)


I would tend to expect so, that was one of the goals of CLJS. You might also want to use .cljc files if you’re interested in code that compiles to both.


Here’s the link if you haven’t seen the docs for this:


Thanks! I am using lein-cljsbuild. Is there better one?


That’s what I’ve always used, I haven’t really looked for a better one.

👍 5

Just to clarify: I have an application written in Clojure and I would like to compile it to cljs/js and run it in a Node VM.


This is possible, right?


Sounds plausible, but you’ll have to port the code that works with dependencies, so anything to do with, say, databases or web servers


That can be a bigger rabbit-hole than you might think because you may have Clojure libraries that depend on something Java-specific internally, meaning you’ll have to find a CLJS replacement for the whole library.


Depending on the application, it may prove to be simpler/faster to use the Clojure implementation as a reference, and write the CLJS from scratch. But that’s a worst-case scenario.


Right, make sense! Thanks! Do you have any doc/post about compiling clj to cljs? I just would like to run some " lein comile clj to cljs" and see some exceptions popping up (because of some Java/JS incompatibilities).


I would just start by copying the files into a cljs directory instead of clj, and changing the file extensions from clj to cljs. (Actually, I’d inspect them as I copied them just to see what I was getting into.)

😲 5
👍 5

Hum, I'm not sure I'm onboard with pRepl then. Unrepl seems just all around better


Which already allows for zero dependencies

Alex Miller (Clojure team)17:02:03

Actually, I’d say prepl is not framing, but data over a stream


Is the data also streamed though? Otherwise it would be less efficient no?


Well, I mean. Say you return a long printed string. Can you start decoding the characters before the full string is returned?

Alex Miller (Clojure team)17:02:58

It’s packed in an edn string, so in general you would wait to read the whole data structure response (unless your client was very clever)

Alex Miller (Clojure team)17:02:50

But the key here is that in general your interactions with a repl are short, not a streaming video


If it is packed in a data notation, I feel you'd need to wait for the whole thing


Where as with unrepl bytestream, you can do whatever you want. You could return streaming video for that matter


Would replacing a node in a tree with be an example of path copying?


With the path copying method a copy of all nodes is made on the path to any node which is about to be modified. These changes must then be cascaded back through the data structure: all nodes that pointed to the old node must be modified to point to the new node instead. These modifications cause more cascading changes, and so on, until the root node is reached.
I think it pretty much describes zipping up a tree. Just realized that stuff I’ve been reading about Scala is described as path copying rather than anything related to functional zipper.


I guess pRepl is more a replacement for nRepl then. Which would be bundled with Clojure. It seems like the advantage over unRepl might just be easier for tooling to build on, because of the defined data-format.

Alex Miller (Clojure team)17:02:56

I see all of them as different approaches

Alex Miller (Clojure team)17:02:55

Prepl and unrepl are built over streams and certainly Rich has expressed at great length the heritage and benefits of streams for composability and portability


I guess I'm not seeing the value proposition of pRepl over nRepl except for it being bundled in the Clojure jar.


Sure, there's some implementation details differences.

Alex Miller (Clojure team)17:02:33

Every Unix thing already knows how to work with character streams

Alex Miller (Clojure team)17:02:12

Stream repls compose, so you can nest one inside another


Maybe I don't know enough about nRepl then. What does it return if not a stream?

Alex Miller (Clojure team)18:02:09

It’s a framed protocol


What does that mean?

Alex Miller (Clojure team)18:02:33

Probably better for you to go read their well written docs than for me to explain

👆 5
Alex Miller (Clojure team)18:02:56

It’s bencoded messages over a socket


that is not strictly accurate


nrepl in practice is mostly bencoded messages over a socket, but you can define different transports


I must admit I am some what baffled at the turn prepl has taken, because it has been my experience that tunneling framed messages is easier to do both over on framed message protocols (like websockets) and over streams (like a socket), and when nrepl as a project started I seem to recall rich suggesting looking at STOMP(a message bus protocol) for inspiration


(tunneling is near and dear to me because at work I do a lot with an nrepl tunneled over

☝️ 5

but then, like reading the doc string on prepl, most of the doc string is example framed messages that out-fn is called with


so the idea that that you can differentiate between prepl and nrepl saying one is framed messages and the other is streams, rings rather hallow


What is the best possible way to generate list using clojure on a map like

(def somemap {:name 'John Doe' :gender 'male'})
and generate
(some-ns/property :name 'John Doe')(some-ns/property :gender 'male')


if you want a list of those lists (map (fn [entry] (cons 'some-ns/property entry)) somemap)


but often lists aren't the right data type


generate is kind of an ambiguous word there


and the def isn't even valid clojure


@noisesmith @hiredman , I m trying to generate this form from a map

(traverse g (add-V :person)
              (property :name "John Doe")
              (property :gender "male")))


@UFURXR7PT Luckily you don't have to try to chain property calls together as they mutate the underlying traversal object. Something like

(defn add-properties
  [traversal m]
  (doseq [[k v] m]
    (o/property traversal k v))
will work. That saves you from a fairly nasty macro that I didn't enjoy trying to write


For once I was happy with mutable state :man-shrugging:


generate is again ambiguous


but, assuming traverse is a function, and property is a function, and what you want to do is call the traverse function with those arguments (instead of creating a that as a datastructure)


(apply traverse g (add-V :person) (for [[k v] somemap] (property k v)))


yes traverse and property are functions


assuming you fix the broken quotes on somemap


although, my (wild)guess is you are using clojurescript, not clojure, and for in clojurescript might not work on maps like that


@hiredman I m dabbling with ogre library for JanusGraph and trying to create a graph traversal in clojure


"generate this form" makes me think you might be trying to do a macro - is traverse a function where you can precalculate args, or a macro that needs another macro around it?


so, here is how ogre lets us create a vertex in Janusgraph with traverse function. so I am wondering if there is a macro approach -


don't use a macro if you dont' need one - if traverse is a function, use a function like hiredman demonstrated


macros can do a few things a function can't, but are less flexible / usable in other code, so if either a macro or a function would work, use a function


sure, thank you. I will check his approach


I saw single quoted strings and swung for the fence


philosophical design question: what makes some data metadata?

Michael Griffiths18:02:26

Equality and hashing ignore metadata, so it’s best used for annotations that you would not consider part of an object’s value


I'm not sure I see the difference between bencode, and EDN. Both sound framed to me. And neither seem to be streamable protocols. They both require the full payload to be received before decoding can proceed. That said, EDN in Clojure-land seems more natural. So I still feel pRepl is more like a new take on nRepl, with Clojure jar bundling. Which is fine, better then nRepl. But unRepl still seems like the wholy grail to me. That said, I recognize it might be harder to implement a tool with unRepl, since you're left implementing the protocol you want on your own. So, maybe pRepl is the right compromise in this case.


I haven't seen anything in unrepl that couldn't be done in nrepl


in fact technomancy had a proposal for using hypermedia kind of things to build emacs/vim/whatever uis for tooling on top of nrepl instead of having to build them again for every editor


Well, for me the differentiator for unRepl, is really just the idea that you inject your repl code through a standard socket repl or clojure.main repl.


So if nRepl injected itself like that, to bootstrap, instead of requiring hard dependencies. Then it would be totally fine


I started working on injectable nRepl.


Yes! Awesome, I was just thinking that in theory, unrepl could inject nRepl or even pRepl (:p), though that one is just part of Clojure so no reason to do so. That's great.


@hiredman I've seen hints of this in nREPL, but not sure where this was going. Do you know of a blog post or something?


I don't recall, it was a billion years ago


I think he even proposed a talk at the conj about (I don't recall if it was accepted)


It's like ultimate REPL reification


nrepl if I recall shipped with a teletype transport which was a socket repl

Alex Miller (Clojure team)18:02:58

prepl being streaming means that you can connect remotely and still nest new repls, which you can't with nrepl afaik. I think cgrand was even looking at deploying unrepl that way over prepl?


depends what you mean by nest repls, but nrepl middleware can pretty much do whatever it wants

Alex Miller (Clojure team)18:02:50

I mean like run clojure.main/repl


I have a repo somewhere that runs swim (clustering) over nrepl, and then lets you proxy in to different members of the cluster

😮 5

By the way, is there currently a way to start the socket repl from within a REPL? Or you need to have the JVM arg on app startup ?

Alex Miller (Clojure team)19:02:59

it has a programatic api

Alex Miller (Clojure team)19:02:08

so you can start it yourself if you like


Ah awesome, I was looking for that, but couldn't find it.


So, does each socket repl get a dedicated thread?

Alex Miller (Clojure team)19:02:12

each socket server has a thread, and each incoming client gets its own thread

Alex Miller (Clojure team)19:02:42

you could just go read the code for this too, it's pretty straightforward


Ah yes, I see from the source. Cool


So, what does the "p" stand for, just curious?

Alex Miller (Clojure team)19:02:01

as in not, designed for humans but for programs (like rebl) to talk


I see, that makes sense.

Alex Miller (Clojure team)19:02:36!msg/clojure-dev/Dl3Stw5iRVA/IHoVWiJz5UIJ is some stuff from rich when the socket repl was added that you might find useful to read if you're interested in his opinions on it


I see that haha.

Alex Miller (Clojure team)19:02:09

this pre-dates prepl but I think you can project most of what's said there to prepl as well


Hum, havn't read it all. But I wonder if pRepl is a realization that no one used the Socket Repl. And thus, a thin RPC, or lets call it more, a easier time building REPL based programs was needed to gain more adoption. Thus pRepl

Alex Miller (Clojure team)19:02:06

it's important to separate the socket server from the socket repl

Alex Miller (Clojure team)19:02:16

the socket server is the more important bit imo

Alex Miller (Clojure team)19:02:45

the socket repl is the clojure.main repl, with a few minor tweaks, over the socket server

Alex Miller (Clojure team)19:02:47

to some degree, it is mostly a minimal example to be in the box - we never expected it by itself to be used much

Alex Miller (Clojure team)19:02:50

we expected more people would build interesting custom remote repls (unrepl is a great example)

Alex Miller (Clojure team)19:02:34

stepping away... need to get some work done :)


the whole thing is so frustrating to read, the stream vs. messaging framing because streams are an ordered sequence of messages, the rpc vs. repl framing because after saying a repl is not an "Eval RPC Server/Window", rich turns around and releases prepl, which I mean, a programatic repl, how is that not an rpc server?

Alex Miller (Clojure team)19:02:25

It supports streamed messages which are independent. If you have a thread pumping out, you’ll keep getting messages independent from the repl


like tap messages get pushed


I'm taking this bit: With the improved read-ability of REPL output, I think an edn-based REPL makes a fine RPC server for program-to-program communication, especially since the set of 'verbs' supported is bounded only by what you can evaluate, and the types of things you might discover is open. This sounds a lot like pRepl. And I feel it is. I can see how the Socket server is the true primitive. And then unRepl, happened to be the only take on it. So maybe, it is true that people seemed to have been baffled by how bare bones socket server was, and just having to decide of a serialization format to exchange was too hard for tooling to adopt it. So maybe pRepl is trying to solve that. Adding a basic edn serialization on top.


Which is that a response to? I can see how that could be used to argued against it being rpc, but then again plenty of rpc frameworks have someway to stream information. As for streams vs. messages you can't describe what the stream is doing without calling it messages, so I dunno.


I feel like my parents got divorced so I get more toys (so many repls) but then they keep making digs at the toys the other parent got me


and like, it is pretty clear they are all legos


It's really important to separate Socket Server vs. Socket REPL Socket REPL is clojure.core.server/main running as the "connection accept" function for a Socket Server You can conceivably run a JSON-RPC endpoint, or some HTTP server as your "connection accept" function


prepl is another thing you can run on a Socket Server -- specifically clojure.core.server/io-prepl would be the accept function for that


I am not sure what point you are trying to make?


just re-articulating a previous point


diverse transports? nrepl has them (as I said nrepl ships with bencoded data over sockets and a plain socket repl, and there are throd party transports for things like message queues and http)


Right, I see that. I guess the thing is. Once you have a socket server, and an accept function that can take a char-stream and eval it, and return a char-stream of the result. You have all the power as a client. So now, you can send to be evaled the entire code of pRepl if you wanted. And eval a swap of the socket server accept-fn to be the one you just sent.


That to me is fantastic. And from my understanding, its the idea behind unRepl


Now, pRepl, or nRepl, or wtv else. Those are just protocols or middleware, etc. over your foundation. Maybe as a tool writer, I prefer to exchange EDN back and forth. Or maybe I prefer bencode.


unRepl lets me choose which


That said, its also an added responsibility to the tool writer. So maybe, I don't care. And its best that Rick just says, it'll be EDN from now on.


transport encoding is the least interesting part of this. How the REPL handles *in* is really important


Hum, go on


I haven't looked recently so I don't know if this is out of date information w.r.t. nREPL, but that old thread above brought up some difficulties with issuing (read *in*) in nREPL


(defn user-prompt [s]
  (println s)
  (read *in*))


yeah, it is tricky, but doable


so that is fundamental to a REPL


"Returns a LineNumberingPushbackReader suitable for binding to *in*.
   When something attempts to read from it, it will (if empty) send a
   {:status :need-input} message on the provided transport so the client/user
   can provide content to be read."


but it also illustrates the problems transporting streams over messages


and shouldn't be tricky


nesting repls, etc.


transport encoding is as simple as swapping the R and P in REPL.


and most intresting protocols these days (http, websockets, etc) are message based


so defining a repl entirely on streams limits its reach outside of a single machine


I remember Stu saying something like that on the apropos cast i think? His daughter was making a program and requested the users height or something. And he said it should read from in, not send a message.


But i don't see the full importance of that


as I have said in the past, I have a nrepl repl tunneled over


and I just typed (read) in to it


emacs prompted me for input


I typed ':a'


the result was :a


like, even tcp socket "streams" are not streams


they are sequence of messages


so framing streams as some fundamental answer that will give us super powers is kind of silly


there are molecules too but we're talking about the user-facing abstraction


what was that in reference to? ^


Rich sais: > There must be some source (stream) of things read. That source is the same source that should be used should the code being evaluated call 'read'.


the read input


And that seems hard to argue against. But maybe nRepl supports this now.


when I said "tricky but doable" and then did it, I was imply it is tricky but has been done


not "it is tricky, and you kind of have to hack around to make it work"


I think streaming matters. But I'm not sure pRepl qualifies as streaming.


When I think streaming, I think, partial.


Like if I wanted to return a big image from the REPL, and have it rendered in my tool.


what you mean is you want results split over multiple messages




Yes, where the messages don't add considerable overhead to the stream. And where you can begin to deserialize very early.


you can write an nrepl middleware that recognizes java Image objects and starts and a webserver and serves them over http and just sends a link to the client repl


That's a lot of roudabout


If my REPL just returns bytestreams. It could just return the image bytes with a byte header and done


I think you think more about it that is not enough


but you can also certainly write an nrepl middleware that detects java Image objects and sends them back as a bunch of bytes


ardem added this to cider-nrepl i believe


(but for example, if you are transporting over something that json encodes things will be tricky)


Yes, but now I'm having to add middleware dependencies ahead of time. So to use a tool, the user is forced to add code to their program. That's why I love unRepl


With unRepl, the tool is in full control. And can choose to be as sophisticated, or as little.


With no pre-req from the user, appart for starting a socket repl.


all critiques of nrepl I have seen so far instead of making me think "well nrepl could be better" leave me thinking "oh, I guess so and so hasn't used nrepl much"


My critique seems very real. I don't want to have to add nRepl to my code.


Or any additional middleware


you can add it the way you use any other library


Yes, but that is a burden.


Which I don't want.


if you want to inject it right in to an existing repl, I don't know if I buy there being a lot of demand for that, but if there is, while nrepl can't do that now, I don't see why reason why it couldn't do that


If it were to do that, it basically becomes unRepl.


at one point, and this may predate nrepl in the slime/swank days that is how a lot of the functionality was done, it would inject code in to the clojure process


version that is a nightmare, and making sure extensions work together, etc


what did it use to inject code into the process?


the swank-clojure repl


so of course there was a backlash, and now I guess we are scheduled for a backlash to the backlash


Ya, so this is where unRepl comes into play as well. Once you say, let's inject things into a socket repl. You have so much freedom, that you can also mess up, and different tools could inject incompatible things. Which is where, you want a framework around it. That's where unRepl goes beyond just the idea of injecting REPL functionality into a socket repl, into an actual library to use.


That said, nRepl isn't free of that issue also. Different middlewares need to play well with each other.


they do, but atleast if you have to included them in a versioned manner in your project.clj or deps.edn or whatever you can try to pin them to something that works together


but if we just have a free for all of all your tooling just evaling whatever


Well, I can't speak of more details, since it is beyond my knowledge. But in my experience, I've had less issues overall with unRepl then nRepl.


because unrepl is new and the field is empty


I don't use any middleware with nrepl and have also never had the problem


Yes, possibly. I'm just not sure that it would create a worse field.


For tooling, nRepl seems non ideal to me.


the idea that unrepl is better because people haven't written terrible tools around it yet, well, just wait


and in a year or two you can move on to the next repl


what tooling have you written for unrepl and nrepl?


Oh, you want refactoring, add this to your project.clj file. Oh, you don't want the refactor lib deployed to prod, okay, figure out a way to use profiles, or aliases to only depend on it in dev. Oh but now, you actually do want to connect to a prod remote repl, and miss your auto-complete? Well too bad, maybe just include that middleware when going to prod?

Michael Griffiths20:02:27

Would you really rather inject some tooling code into prod than include it as a normal dependency though?

Michael Griffiths20:02:06

I agree that sideloading/upgrading is a cool feature but having to add a dep or two surely isn’t a blocker. lein and boot bundle nrepl anyway 🙂


I would actually yes.


Normally my flow is, have issue, ssh to prod host, start a second instance of my app with socket.repl flag. Connect to REPL and debug.


Well, actually, I start a second instance into clojure.main to be more precise. And then I use unRepl to enhance the clojure.main repl to support all kinds of cool features.


That bypasses my server from instantiating, and thus avoids binding to an existing port, as well as make sure it is not serving traffic


I don't think the dependencies are a huge ordeal. But, its a pain point. Especially to newcomers. There's a reason cider-jack-in choose to inject them into lein.


By the way, I'm not bashing on nRepl.


It is great, and does a lot. The functionality is what matters to me.


I am not interesting in being the defender of nrepl


Which one gives me a better user experience.


my generator generates invalid inst 's Is it a know issue? clj -Srepro -Sdeps '{:deps {org.clojure/test.check {:mvn/version "0.10.0-alpha3"}}}' -e "(do (require '[clojure.test.check.generators :as gen] '[clojure.spec.alpha :as s]) (gen/generate (gen/vector (s/gen inst?)) 120 6))" [#inst "1970-01-01T01:24:38.462-00:00" #inst "1969-12-06T11:54:24.666-00:00" #inst "820499-07-18T05:28:23.398-00:00" #inst "1969-08-08T01:04:53.430-00:00" #inst "1970-01-01T00:00:00.000-00:00" #inst "1970-01-01T00:00:00.001-00:00"] The 3 one: #inst "820499-07-18T05:28:23.398-00:00" the reader can read it.

Alex Miller (Clojure team)20:02:06

not a known issue, file a jira


I take issue with people making bad comparisons to bolster their preferred solution


I get it, you like whatever, everyone likes things


Well, I'm not feeling like I'm making bad comparisons. I'm only stating a difference, which I think is not mistaken. nRepl requires hard dependencies to it and its middlewares. UnRepl does not.


And others seem to say that nRepl handles input and output in a way that makes certain code not behave normally. I can't speak to that fact. Maybe nRepl is handling all that correctly now, so it isn't an issue anymore.


Finally, I feel neither nRepl nor pRepl can allow for streaming data. So there use case suffers when you need to return gigantic results. Obviously, no tools needs this as of yet. But I like that UnRepl doesn't limit that, because the tool could choose its own mechanism.


Or might be more fair for me to say, limited streaming capabilities


I'm not totally sure about that last one though. I might be wrong about both nRepl and pRepl in that regards, I admit.


I also understand that, none of these might seem like good enough differentiator to warrant splitting the REPL ecosystem in three. And ya, maybe that'll end up worst, now having some tools use nRepl, others pRepl, and some more unRepl.


Anyways, I just wanted to understand where pRepl differentiated itself from nRepl, or unRepl. So thanks everyone for helping me understand that better.

Michael Griffiths20:02:04

nrepl can “stream” evaluation results over one or more messages since 0.6, and it was always possible with middleware (cider’s pretty printing middleware has done that for a long time). So you can interrupt an evaluation while printing a large (or infinite) result


Hey thanks for that piece of info @cichli I know you've been hard at work on the cider orchard and nRepl. I love all the improvements being done. And actually agree with @bozhidar choice to stick with nRepl and double down. Lots of good stuff uses it, and it makes sense to just keep improving and making better what we already have.

Michael Griffiths20:02:48

I think it’s a good thing if there are other REPL implementations tbh, tooling ecosystems can be diverse without being fragmented. If nrepl makes tradeoffs that dont make sense in some circumstances (i.e. how it handles *in* / *out*) then we should have other options


I think once the nREPL clients can side-load the nrepl dependency over a Socket REPL or pREPL, no one will really care about the differences.


It'll just become more and more common to start from a simple Socket REPL or pREPL, initiated by Clojure itself based on JVM options, and any and all tooling will start from that point and build up.


For me, that's the main benefit: you can start an arbitrary JVM process (that contains Clojure), using JVM options to start a basic REPL, and then connect to that process from any editor, command-line tool, whatever, using whatever set of tooling features you like best.


WRT nrepl to a cljs target, interrupt doesn't actually work.

Michael Griffiths20:02:26

That depends on which cljs repl you’re using – e.g. Nashorn handles interruption how you’d expect since it’s in the same runtime. Any kind of browser or foreign runtime and it gets complicated


I spent lunch thinking about streams vs. messages, and it seems like what differentiates nrepl and socket repl/prepl in that regard is, nrepl has different message types for "user input" and "forms to evaluate input" where as for socket repl/prepl there is effectively one "input" message type for both


are there any libraries that modify clojure.test output for exceptions to also show the ex-data?

Alex Miller (Clojure team)21:02:06

clojure 1.10 does now I think

😮 5
Alex Miller (Clojure team)21:02:33

yeah, that was CLJ-1209


does it print everything?


is it pretty printed?



Alex Miller (Clojure team)21:02:11

what do I look like, a go-try-it-machine?

😛 10

Dear Clojurists, any recommendations for DynamoDB API's? So far, Faraday looks the most promising, even though last commit was on 2017 :thinking_face:

Alex Miller (Clojure team)21:02:56

you could use the new cognitect-labs aws-api

😮 10

I will give it a shot


I've used faraday a little, ended up ripping it of a project in favor of the java sdk (and ultimately getting rid of dynamo altogether and the deployment target changed). faraday was a little too magic for my taste, if you try and do anything actually database like with dynamo vs. just using it as a key value store, a lot of the decisions faraday makes with regards to serialization will bite you

Alex Miller (Clojure team)21:02:36

aws-api doesn't use java sdk, just makes web calls, so it's much lighter weight


yeah, that example looks great


working with the java sdk is also frustrating because you can tell it is all json under the hood but you have to build all these java objects, which the aws-api stuff avoids

Alex Miller (Clojure team)21:02:28

what, you don't like needless data -> object -> data transformations?

🙃 20

I first parsed that as "needless data" -> "object" -> "data transformations" and that was much weirder


that's like the spring module for monads right?

🤷 5

Is there a way to expose an nrepl port (remote) to cider for a clj/deps instantiated repl?


ssh port forwarding?


there is a lot to unpack there


@johanatan are you asking how to use CIDER to connect to a remote REPL, or how to setup your project to include nREPL


what is a clj/deps instantiated repl?


the clojure.main repl? the socket repl? a nrepl server in your code?


@lilactown the former. I know how to do it generally just not for a repl started via clj (with a backing deps.edn)


M-x cider-connect or something to that effect

☝️ 5

@hiredman it’s literally what you get if you just run the ‘clj` executable


I know how to do it on the cider/emacs side. But doesn’t the repl server have to somehow include nrepl?


oh, okay, so you meant the latter


the old nrepl project has a great readme that explains how to embed an nrepl server


the new project has moved it all in to some fancy docs site that doesn't work without javascript


Sorry, my fault!


Although I expected antora not to be js dependent, I might report this upstream


So no one has made this automatic as it is for Leiningen?


(nrepl-server/start-server :bind "" :port nrepl-port
                               :handler cider-nrepl-handler)


@dpsutton thx! 👍:skin-tone-2:


i did this about two hours ago at my new job 🙂


Good timing lol


clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.5.3"}}}' -m nrepl.cmdline


@didibus that's what i was looking for. thx!


That (and a whole lot more) is in my .clojure/deps.edn file @johanatan as some inspiration of what you can do with CLI / deps.edn

rainbow-mouth 10

what does your clj invocation to utilize the main-opts look like?


is it just: clj -R:nREPL ?


I pretty much just use -A for everything -- so for aliases where I might want just the dependencies sometimes and also the main opts other times, I tend to break them into two aliases. Hence -A:test:runner for example, and the ability to combine the REBL aliases with others to add dependencies, start a Socket REPL Server, and so on.


Hmm, I’ll have to learn about that. My clj usage is rather shallow at this point


Happy to answer any questions -- we switched over from Boot to CLI / deps.edn completely last year, after being on Boot for three years (we were on Leiningen for four years before that). Feel free to DM me about it.