Fork me on GitHub
#beginners
<
2017-10-21
>
seancorfield00:10:26

Ring doesn't need them lower case. They're case insensitive. It converts them to lowercase to match Clojure's normal naming.

seancorfield00:10:27

As I noted above, it uses a specific case-insensitive comparison when working with headers -- so even if you used Sentence-Case it would all still work. It's just nice and consistent with Clojure naming to have them be lower-case.

nico.roos199419:10:09

Hi! Not sure if this is the right place to ask, but is there a way to fix compojure and/or ring, with the new release of leiningen?

ajs19:10:26

I didn't know there was a problem, what is it?

nico.roos199419:10:20

“java.lang.RuntimeException: No reader function for tag object”

nico.roos199419:10:31

I’m getting such error right after upgrading leiningen

ajs19:10:59

Which line or object is throwing the exception?

nico.roos199419:10:13

I’m just gonna paste the whole stacktrace

nico.roos199419:10:17

Exception in thread “main” java.lang.RuntimeException: No reader function for tag object, compiling:(/private/var/folders/r_/whjqdcfx3757scdwdmx0_r680000gn/T/form-init6637250780543903319.clj:1:8265) at clojure.lang.Compiler.load(Compiler.java:7386) at clojure.lang.Compiler.loadFile(Compiler.java:7317) at clojure.main$load_script.invokeStatic(main.clj:275) at clojure.main$init_opt.invokeStatic(main.clj:277) at clojure.main$init_opt.invoke(main.clj:277) at clojure.main$initialize.invokeStatic(main.clj:308) at clojure.main$null_opt.invokeStatic(main.clj:342) at clojure.main$null_opt.invoke(main.clj:339) at clojure.main$main.invokeStatic(main.clj:421) at clojure.main$main.doInvoke(main.clj:384) at clojure.lang.RestFn.invoke(RestFn.java:421) at clojure.lang.Var.invoke(Var.java:383) at clojure.lang.AFn.applyToHelper(AFn.java:156) at clojure.lang.Var.applyTo(Var.java:700) at clojure.main.main(main.java:37) Caused by: java.lang.RuntimeException: No reader function for tag object at clojure.lang.LispReader$CtorReader.readTagged(LispReader.java:1245) at clojure.lang.LispReader$CtorReader.invoke(LispReader.java:1228) at clojure.lang.LispReader$DispatchReader.invoke(LispReader.java:684) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.read(LispReader.java:200) at clojure.lang.LispReader.access$200(LispReader.java:40) at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:800) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1158) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.read(LispReader.java:200) at clojure.lang.LispReader.access$200(LispReader.java:40) at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:792) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$VectorReader.invoke(LispReader.java:1150) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1158) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.read(LispReader.java:200) at clojure.lang.LispReader.access$200(LispReader.java:40) at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:800) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1158) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$MapReader.invoke(LispReader.java:1158) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.read(LispReader.java:200) at clojure.lang.LispReader.access$200(LispReader.java:40) at clojure.lang.LispReader$MetaReader.invoke(LispReader.java:792) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$ListReader.invoke(LispReader.java:1049) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$ListReader.invoke(LispReader.java:1049) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.readDelimitedList(LispReader.java:1200) at clojure.lang.LispReader$ListReader.invoke(LispReader.java:1049) at clojure.lang.LispReader.read(LispReader.java:263) at clojure.lang.LispReader.read(LispReader.java:196) at clojure.lang.Compiler.load(Compiler.java:7374) ... 14 more Subprocess failed

nico.roos199419:10:57

oh, and the same problem occurs on both ubuntu and MacOs

nico.roos199419:10:18

or should I just revert to older versions

tkjone19:10:36

RE: Naming conventions - HOF I have a HOF that creates an event-handler - what is the more common naming convention in clojurescript set-keyup-handler or create-keyup-handler

noisesmith19:10:08

does it just create a function, or does it also register a handler to be called?

tkjone19:10:44

sorry, what do you mean by "register a handler to be called"?

noisesmith19:10:48

my choice would be either create-keyup-handler-function or register-keyup-handler

noisesmith19:10:08

@tkjone does it tell the browser to call the function on keyup, or does it just return the function to call?

tkjone19:10:49

It would be this:

;; code would look like this
(.addEventListener js/window "keyup" (create-keyup-handler "secret"))

;; which would be the equivalent, if I just wrote the function in place, of this because
;; create-keyup-handler is going to return keyup-handler
(.addEventListener js/window "keyup" keyup-handler)
So I believe it would just return the function to call - sorry - the phrasing threw me off a little

noisesmith19:10:41

yeah - I wouldn't name it set-keyup-handler if it's not the thing that calls addEventListener

noisesmith19:10:54

so create-keyup-handler makes sense