This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-15
Channels
- # alda (4)
- # beginners (9)
- # boot (2)
- # cider (56)
- # cljsrn (6)
- # clojure (29)
- # clojure-belgium (2)
- # clojure-gamedev (1)
- # clojure-russia (19)
- # clojure-uk (3)
- # clojurescript (7)
- # core-async (2)
- # datomic (16)
- # hoplon (96)
- # lein-figwheel (4)
- # om (2)
- # om-next (3)
- # other-languages (6)
- # planck (11)
- # reagent (9)
- # rethinkdb (1)
- # ring-swagger (1)
- # spacemacs (1)
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 (Util.java:221)
jungle.receiver> (edn/read-string {:eof nil} "(")
RuntimeException EOF while reading clojure.lang.Util.runtimeException (Util.java:221)
@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} " ")
:END
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
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.
@prozz: There is also duct: https://github.com/weavejester/duct
If you want to compose libs you can get pretty far with a ring + ring-defaults and a routing library (like compojure or bidi)
@prozz system has a complete example for a web app with the Duct abstractions. https://github.com/danielsz/system-dependency-injection/tree/484b530f5f2f359cbe6b6de9a9ed97b8cd5a8565
@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
Can anybody point me to a resource on using Clojure 1.8 Socket-server (instead of nREPL) with Emacs CIDER? Is this supported?
https://github.com/clojure/tools.nrepl 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
@hiredman: Thanks!
I just added a schema
channel, and asked a question there, anybody know anything about this problem? : https://clojurians.slack.com/archives/schema/p1463320925000010