Fork me on GitHub

Should specifying a value for the :eof option to clojure.edn/read-string prevent these exceptions and return the provided value here, or am I misunderstanding the purpose of that option?

jungle.receiver> (edn/read-string "(")
RuntimeException EOF while reading  clojure.lang.Util.runtimeException (
jungle.receiver> (edn/read-string {:eof nil} "(")
RuntimeException EOF while reading  clojure.lang.Util.runtimeException (


@dpsutton: resources are always re-rooted to the / of you uberjar file, it is confusing sometimes I know. For instance if you put resources/css in your resource-paths the content (no css/) will be accessible with (io/resource yourfile.css).


@akjetma: you're getting the exception because of an incomplete form (the open paren without contents or closeparen). The :eof option is a way for read-string to give you back a special marker value when you hit a non-erroneous end of stream:

user=> (edn/read-string {:eof :END} " ")


it's more useful when repeatedly calling edn/read on a large stream


Ahhh, okay, thank you. I read :eof - value to return on end-of-file. When not supplied, eof throws an exception. in the docstring for edn/read and failed to notice that read-string passes an options map with :eof nil by default


"sentinel value"


what happened to defadt?


@danipov thanks. found your reply in gmail after dropped. I do not agree though.


our app talks to different services including jdbc, http/rest. we always choose async for http, but never for jdbc. 'coz jdbc request blocks a connection, but http request doesn't. The http protocol itself supports async request.


Sure we can use Future to make a JDBC request act like async, but back end, it always cause a thread to be stuck and wait for the results.


As for http/rest service, the server can provide async mode or not, I am wandering if i have a service owned by some one else, what i can do to verify whether it is supporting async mode or not


hello, whats the current recommended choice of libs for simple crud web app? any up to date articles or blog posts please?


@prozz: generally see Luminus for the bundle of libs which currently best give a starter CRUD app. There isn't anything approximating Rails or Django currently maintained.


thanks, i dont really need a framework, separate libs are fine too. im just worried im not up to date and may miss something valuable.


If you want to compose libs you can get pretty far with a ring + ring-defaults and a routing library (like compojure or bidi)


duct seem like a nice starter, thanks 😉


@prozz: Duct is really nice. The configuration handling is a bit confusing at first (at least for me) but once you understand that part the rest is pretty straight forward


thanks all for help 🙂

Shantanu Kumar08:05:23

Can anybody point me to a resource on using Clojure 1.8 Socket-server (instead of nREPL) with Emacs CIDER? Is this supported?


cider uses nrepl which is a more complicated protocol than just a repl on a socket

hiredman08:05:02 has an nrepl client and server, if you want to embed an nrepl server in your app so cider can connect to it


you may be able to rig up something with netcat and inferior-lisp mode if you care to fiddle with emacs


I just added a schema channel, and asked a question there, anybody know anything about this problem? :


With schema is there a good way to say "any keyword in this set" ?


@arrdem: s/enum? or if you mean as keys in a map just (into {} (map (fn [key] [key s/Any]) keyset))?