beginners

Getting started with Clojure/ClojureScript? Welcome! Also try: https://ask.clojure.org. Check out resources at https://gist.github.com/yogthos/be323be0361c589570a6da4ccc85f58f.
Idan Melamed 2021-01-17T02:01:37.390100Z

https://www.learnreframe.com/ Seems nice

seancorfield 2021-01-17T02:38:00.390600Z

Ah, sorry, missed that question. Yes, that's probably the one I would have recommended. There's also this one https://purelyfunctional.tv/courses/understanding-re-frame/ (and, yes, you need to pay for these).

lilactown 2021-01-17T03:12:45.393300Z

The tradeoffs are very similar to Clojure vs Java. I would not build a library in Clojure that is consumed in a Java app unless I had some very specific and important reason to

Harley Waagmeester 2021-01-17T03:34:43.394300Z

interleave sounds very useful, but i seldom see it used

Harley Waagmeester 2021-01-17T03:48:56.394700Z

(def goof '(:a 1 šŸ˜› 2 :c 3))

Harley Waagmeester 2021-01-17T03:49:09.394900Z

(:a goof)

Harley Waagmeester 2021-01-17T03:49:42.395200Z

dumb icon face

Harley Waagmeester 2021-01-17T03:50:29.395600Z

i might expect an error from (:a goof)

Harley Waagmeester 2021-01-17T03:52:00.395900Z

(get :a goof) => nil

Harley Waagmeester 2021-01-17T03:56:27.396200Z

(get goof :a) => nil

Harley Waagmeester 2021-01-17T03:57:44.396700Z

that's at the cider repl

Harley Waagmeester 2021-01-17T04:00:02.397500Z

... or nil if key not present ... technically correct

Harley Waagmeester 2021-01-17T04:00:25.397900Z

loose typing

seancorfield 2021-01-17T04:07:21.398400Z

@codeperfect Is that a question?

2021-01-17T04:07:43.398900Z

get on a list (with parentheses) always returns nil, I believe. It is more useful when given a first arg that is a vector or a map, not a list.

Harley Waagmeester 2021-01-17T04:14:20.402800Z

@seancorfield i haven't compiled code with that syntax, and i wonder if it should compile without an error, i stretch the limits of all software i use, and get nervous when i discover nonsensical code that compiles, i mean we can't have walmart giving away free teslas or anything

seancorfield 2021-01-17T04:14:59.403200Z

Do you think it is "nonsensical code"?

2021-01-17T04:15:57.404200Z

get won't throw, it returns the key when present or nil

2021-01-17T04:16:25.404500Z

> Returns the value mapped to key, not-found or nil if key not present.

2021-01-17T04:18:48.406400Z

This is true also if what you pass to get is not associative, it considers that like the key isn't on the thing since the thing cannot even associate keys to values

2021-01-17T04:20:22.407900Z

If you want it to throw, you should use the map as a function: (goof :a)

2021-01-17T04:20:43.408900Z

This will help catch if you're not actually using an associative

Harley Waagmeester 2021-01-17T04:21:17.409600Z

it just bothers me that the code doesn't make sense, it accomplishes nothing because it is garbage code, i think it is, and it still gets evaluated without an error

seancorfield 2021-01-17T04:22:12.410200Z

It makes perfect sense once you understand Clojure's semantics.

Harley Waagmeester 2021-01-17T04:22:19.410600Z

(goof :a) is new to me

seancorfield 2021-01-17T04:22:51.411200Z

Because nil-punning is core to Clojure's idioms. So returning nil here is far more useful (and idiomatic) than throwing an exception.

seancorfield 2021-01-17T04:23:51.412300Z

Associative data structures also implement function semantics: they look up their argument in themselves. Keywords also implement function semantics: they look themselves up in their argument.

seancorfield 2021-01-17T04:25:22.413400Z

user=> (get [1 2 3 4] 2)
3
user=> (nth [1 2 3 4] 2)
3
user=> (get [1 2 3 4] 100)
nil
user=> (nth [1 2 3 4] 100)
Execution error (IndexOutOfBoundsException) at user/eval6035 (REPL:1).
null

seancorfield 2021-01-17T04:25:58.414300Z

We have both approaches for different contexts.

Harley Waagmeester 2021-01-17T04:26:00.414400Z

yes that is the gist of it, i think the keyword function should only work with maps, that's all i am concerned weith

seancorfield 2021-01-17T04:26:29.414600Z

user=> ([1 2 3 4] 2)
3

Harley Waagmeester 2021-01-17T04:27:34.415800Z

oh, that is new to me

Harley Waagmeester 2021-01-17T04:27:39.416Z

heh'

seancorfield 2021-01-17T04:29:05.416700Z

You can create new data structures that implement ILookup and you can pass those as "arguments" to a keyword and it will "do the right thing". Clojure is about abstractions.

seancorfield 2021-01-17T04:37:03.417Z

user=> (def stuff (reify clojure.lang.ILookup (valAt [_ _] 42) (valAt [_ _ _] 13)))
#'user/stuff
user=> (:a stuff)
42
user=> (:b stuff :c)
13
(as a silly example)

seancorfield 2021-01-17T04:56:15.417500Z

@codeperfect Does that example help illustrate the point I was trying to make?

solf 2021-01-17T05:08:25.417600Z

I like this example, I've never used reify before nor extended a clojure implementation, but this gives me at least the very basics about why/how to do it.

seancorfield 2021-01-17T05:29:55.417800Z

reify is awesome for adjusting one data structure to match another's API, so you can have different views into something. Also when you need to fake some interaction with Java under the hood.

Trevor 2021-01-17T05:57:31.421400Z

Hey folks, I'm trying to interop with a Java library that leverages .class a lot, like below:

Family family = Family.all(PositionComponent.class, VelocityComponent.class).get();
Notice the PositionComponent.class I was hoping I could interop by doing the following:
(deftype MovementComponent [speed dir] Component) ; the lib requires that it extend Component 
; ... later in the code when I wanna make a family ....

; This doesn't work, get "Cannot cast class java.lang.Class to class [Ljava.lang.Class;"
(def fam (Family/all  MovementComponent) )

; Also doesn't work, same error
(def fam (Family/all (class MovementComponent)) )
So I'm worried I might have to make a new namespace for MovementComponent and use gen-class, is that true? Or is there something else I can do. Having to use gen-class would be a real bummer...

seancorfield 2021-01-17T06:03:10.421800Z

@trevor670 So the issue here is Java varargs methods, not the classes.

seancorfield 2021-01-17T06:04:18.422900Z

If you look at the Java docs for the Family/all method, I'm going to bet that is says static all(Class...) and what it is expecting here is an array of Component objects.

seancorfield 2021-01-17T06:05:37.424300Z

So I think what you want is (def fam (Family/all (into-array Class [MovementComponent])))

Trevor 2021-01-17T06:07:16.424700Z

I'll give that a shot!

Trevor 2021-01-17T06:09:17.425Z

YAAASSS, I t*h*ink it worked!

Trevor 2021-01-17T06:10:43.426100Z

Thanks so much @seancorfield! This is super exciting! (Thanks for all your clojure contribs to!)

dpsutton 2021-01-17T06:10:47.426200Z

the jvm is really weird but [Ljava.lang.class means an array of java.lang.class. Bizarre shorthand but the error message is trying to tell you

seancorfield 2021-01-17T06:11:28.426500Z

@trevor670 What is this library BTW?

popeye 2021-01-17T06:18:12.427700Z

I have installed intellj community edition and added cursive plugin , But I am not able to sync my file after starting repl,

popeye 2021-01-17T06:18:20.428100Z

anyone faced same issue earlier?

Trevor 2021-01-17T06:32:38.428200Z

In gamedev there's a really nice pattern that's also cpu cache friendly called Entity-Component-Systems. Ashley is a java implementation that strikes a great balance between ergonomics and performance. ECS systems make let you break up your game logic into systems which apply functions to a set of entities based on what components they have. (Example: apply rendering logic to all entities containing a render component) They're not actually to hard to implement naively, but getting them performant is really important cause it's essentially your core game loop Which why this is so awesome! I get to use clojure where it matters and enjoy the performance of the Ashley ECS!

seancorfield 2021-01-17T06:38:32.428400Z

Yep, Chris Granger, who created LightTable and Aurora, talks about ECS.

seancorfield 2021-01-17T06:39:35.428600Z

See https://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/ for example

seancorfield 2021-01-17T06:39:54.428800Z

And https://www.chris-granger.com/2013/01/24/the-ide-as-data/

seancorfield 2021-01-17T06:41:25.429300Z

@popeyepwr Not sure what you're asking so maybe #cursive would be a good channel?

šŸ‘€ 1
seancorfield 2021-01-17T06:43:00.429500Z

Ah, here's Ashley: https://libgdx.badlogicgames.com/ci/ashley/docs/

seancorfield 2021-01-17T06:43:44.429700Z

public static final Family.Builder all(java.lang.Class<? extends Component>... componentTypes) so yeah, there's the Class... type for (into-array Class [...])

Hagenek 2021-01-17T08:37:23.430300Z

Is there an easier way to write maps like these in Clojure:

(defn createContact
  [phone email street city postal-code state country country-code]

  {
   :uuid "to be implemented"
   :phone phone
   :email email
   :street street
   :city city
   :postalCode postal-code
   :state state
   :country country
   :countryCode country-code
}
)

pavlosmelissinos 2021-01-17T08:56:22.430500Z

You could use zipmap

(defn create-contact [vals]
  (-> (zipmap keys vals)
      (assoc :uuid "to be implemented"))
where keys is a vector of keywords that correspond 1-1 to the vals. This is not necessarily a better solution though, as you have less control over what goes in the map.

Hagenek 2021-01-17T08:57:16.430700Z

Creative solution though, thanks!

Hagenek 2021-01-17T09:02:21.431Z

New question: (def contacts (atom [])) (swap! contacts (create-contact "<tel:+4793535312|+47 935 35 312>" "<mailto:fixerman@gmail.com|fixerman@gmail.com>" "Mellony Lane 42" "Berlin" "46162" "Berlin" "Germany" "52")) I then have this code, but I cannot get the info from the contacts atom in the repl? Tried this: namespaces.core&gt; @contacts nil namespaces.core&gt; contacts #&lt;Atom@136cd01a: nil&gt; namespaces.core&gt; (str contacts) "clojure.lang.Atom@136cd01a" namespaces.core&gt; (str @contacts) "" namespaces.core&gt;

Mno 2021-01-17T09:15:00.431200Z

Does create-contact return the proper value?

Hagenek 2021-01-17T09:15:25.431800Z

Yes, tested it in the repl

Mno 2021-01-17T09:15:48.432Z

Then try reset! Instead of swap!

Mno 2021-01-17T09:17:20.432200Z

Sorry I just woke up, it's gonna take me a sec to start thinking

Hagenek 2021-01-17T09:17:51.432900Z

No worries, itā€™s sunday after all:smile:

Mno 2021-01-17T09:20:47.433100Z

yeah now that I look at it I believe youā€™re looking for reset! since you donā€™t seem to want to run anything ont he current value of the atom

Mno 2021-01-17T09:21:04.433300Z

hopefully that helps

dpsutton 2021-01-17T09:21:38.433500Z

i don't think your createContact function is doing any work. If you have 8 values, i don't see how a positional function helps you at all. just write the map there

dpsutton 2021-01-17T09:21:49.433700Z

remembering the arg order seems worse than just constructing the map literal

ā˜ļø 2
Hagenek 2021-01-17T09:24:48.433900Z

Ok, so basically I am building controllers for a REST-api. Right now I am just going to populate it with mockdata. The reason I am creating a function is because I will have to also have a controller that creates a contact. I am very much a newbie though The thought now is to make a function that both creates a contact and puts it into the atom. This will later be connected to a DB

Mno 2021-01-17T09:26:38.434100Z

ooooh i get it now

Mno 2021-01-17T09:27:55.434300Z

yeah you can swap! it, but you have to specify how you wnt to update the atom so itā€™d be like :

(swap! contacts conj (create-contact "+47 935 35 312" "<mailto:fixerman@gmail.com|fixerman@gmail.com>" "Mellony Lane 42" "Berlin" "46162" "Berlin" "Germany" "52"))

Hagenek 2021-01-17T09:29:57.434500Z

ahhh of course! So that it knows to put it at the end of the list

Mno 2021-01-17T09:30:49.434700Z

vector! but yeah!

Hagenek 2021-01-17T09:41:31.435400Z

:uuid #uuid "7326bc03-d044-4b0f-bafc-da4daf91bff5", Gotten this value after using the Java.util.UUID lib. What does the #uuid mean in this context? Will it mess up my uses of the ID in someway going forward?

Mno 2021-01-17T10:34:00.436900Z

Iā€™m not good at explaining what tagged literals are

Mno 2021-01-17T10:34:06.437100Z

so hereā€™s https://clojure.org/reference/reader#tagged_literals

Mno 2021-01-17T10:34:30.437300Z

but basically no.. you really shouldnt worry about it

roelof 2021-01-17T11:05:05.439700Z

hmm, studying compujure but could not find one thing or Im overlooking it several times I want that if lets say the index page is hit, a method is executed and the end-result is send to the browser

roelof 2021-01-17T11:05:17.440Z

Does someone has a example for this ?

dumrat 2021-01-17T11:11:51.440500Z

How about the usage example in the GH itself?

(ns hello-world.core
  (:require [compojure.core :refer :all]
            [compojure.route :as route]))

(defroutes app
  (GET "/" [] "&lt;h1&gt;Hello World&lt;/h1&gt;")
  (route/not-found "&lt;h1&gt;Page not found&lt;/h1&gt;"))

roelof 2021-01-17T11:21:45.441Z

Oke, I mean can I do things like this :

(defroutes app
  (GET "/" [] (display_data)
  (route/not-found "&lt;h1&gt;Page not found&lt;/h1&gt;"))

dumrat 2021-01-17T11:24:35.441400Z

@roelof Of course you can

roelof 2021-01-17T11:24:56.441600Z

oke

roelof 2021-01-17T11:25:09.441800Z

that is what I wanted to know

roelof 2021-01-17T11:25:33.442Z

I need 2 routes that uses I think the same method

dumrat 2021-01-17T11:32:02.442200Z

btw, clojure names usually don't use underscores. Usually the use hyphen: display-data

roelof 2021-01-17T11:50:48.442400Z

pfff

roelof 2021-01-17T11:51:11.442600Z

still does not display anything on my browser

(ns paintings.core
  (:require [cheshire.core :as json]
            [clj-http.client :as client]
            [compojure.core :refer :all]
            [compojure.route :as route]))


(defn image-url-size [image]
  (let [data (select-keys image [:width :height])
        url (get-in image [:tiles 0 :url])]
    (assoc data :url url)))

(defn take-image-data [image-data object-number]
  (-&gt;&gt; image-data
       (sort-by :name)
       (last)
       (image-url-size)
       (merge {:object-number object-number})))

(defn assoc-image [object-number]
  (-&gt; (client/get (str "<https://www.rijksmuseum.nl/api/nl/collection/>" object-number "/tiles")
                  {:query-params {:key "14OGzuak"
                                  :format "json"}})
      (:body)
      (json/parse-string true)
      (:levels)
      (take-image-data object-number)))

(defn take-data [api-data]
  (-&gt;&gt; api-data
       (map :objectNumber)
       (map assoc-image)))

(defn display-data []
  (-&gt; (client/get "<https://www.rijksmuseum.nl/api/nl/collection>"
                  {:query-params {:key "14OGzuak"
                                  :format "json"
                                  :type "schilderij"
                                  :toppieces "True"}})
      :body
      (json/parse-string true)
      :artObjects
      (take-data)))

(defroutes app
  (GET "/" [] (display-data)))

Mno 2021-01-17T12:36:14.443Z

start by verifying that you get something useful back from (display-data)

Mno 2021-01-17T12:37:20.443200Z

then verify that when your routes do something simpler they work. Try to rule out assumptions.

Mno 2021-01-17T12:37:58.443600Z

for example test that when your routes are defined as:

(defroutes app
  (GET "/" [] "Hello World"))

Mno 2021-01-17T12:38:10.443800Z

you actually get hello world.

Mno 2021-01-17T12:40:45.444Z

You can imagine itā€™s hard to guess what part of a computer is broken when it wonā€™t even turn onā€¦

(Is it the battery? the screen? the ram? is the power out? am I blind? is this actually not a computer? is it the GPU? maybe a flash chip? maybe something is shorting out? maybe this outlet doesn't work?)
see what I mean?

Mno 2021-01-17T12:44:18.444300Z

I might also suggest you inspect your browser to see what html itā€™s rendering and also if it has any errors in the console.

roelof 2021-01-17T13:56:38.444600Z

no luck. I think I forget the ring part

roelof 2021-01-17T15:37:47.445Z

nope, I do not see it

Mno 2021-01-17T16:33:51.445200Z

simpler first, complex later.

Mno 2021-01-17T16:34:33.445400Z

I canā€™t really be helpful when the problem is this vague.

roelof 2021-01-17T16:35:10.445600Z

I think I have to add some code so I see the text

roelof 2021-01-17T16:35:19.445800Z

so ring can make a server

roelof 2021-01-17T16:35:31.446Z

but I do not know how

roelof 2021-01-17T16:35:53.446200Z

read some tutorials but still confused

Mno 2021-01-17T16:39:08.446400Z

Like I said itā€™s hard to help when thereā€™s so much I donā€™t know about your app, or what tutorials you followed

Mno 2021-01-17T16:39:29.446600Z

I recommend you first try to follow something until you get ā€œHello Worldā€ or similar in your browser

Mno 2021-01-17T16:39:43.446800Z

then try to edit it to use routes

Mno 2021-01-17T16:39:56.447Z

or if itā€™s simpler for you maybe try to start from a template.

Claudio Ferreira 2021-01-17T17:05:19.449800Z

Clojurians, am i beeing too rude by only coming to this group when i have a problem? I was thinking about ways that i can generate value to the group itself, but i didn't found anyone. If someone have an ideia of how i can help all achieve your goals. I fell bad to only come here to extract.

Claudio Ferreira 2021-01-18T11:23:15.486200Z

Thanks @dpsutton!

Antonio Bibiano 2021-01-17T17:06:58.451300Z

I'm doing an exercise from the brave and true which involves querying a list of search engines in parallel and returning the first result from each in a vector I came up with this

(defn search-online-all
  [query engines]
  (mapv (comp first deref)
        (doall (map (fn [engine]
                      (future (engine query)))
                    engines))))
The point of the exercise is to use future/delays/promises

Antonio Bibiano 2021-01-17T17:09:23.452100Z

I was debating wether to use mapv instead of (doall (map ..))

Antonio Bibiano 2021-01-17T17:10:45.452600Z

Or if there is a better pattern that could be used here

NPException 2021-01-17T17:14:16.455100Z

One argument in favour of doall is that it makes it more explicit that you want to realize the entire sequence at this spot. Especially if you are working in a team it gives away the intention to other developers very clearly.

šŸ™Œ 1
Antonio Bibiano 2021-01-17T17:15:13.455300Z

ah nice! i liked it too

dpsutton 2021-01-17T17:18:26.455500Z

politely asked questions that lead to discussions help thousands of silent readers who may be facing the problem or just learn more in general. seems like a win win for everyone

šŸ’Æ 9
Antonio Bibiano 2021-01-17T17:22:50.456700Z

I was also thinking if there is a nicer way to do this so that the first result is the one from the engine that returns first, the second from the second fastest etc..

2021-01-17T17:42:59.457200Z

You could put a vector in an atom to hold the results, and use swap! & update to conj each result as it comes in. A core.async chan would work too.

roelof 2021-01-17T17:52:23.457700Z

hmm, 4clojure makes me crazy

roelof 2021-01-17T17:52:42.458200Z

why is here % unknown in (reduce (fn [c _] inc c) 0 %)

Antonio Bibiano 2021-01-17T17:54:49.458800Z

% only works in the #() macro

Antonio Bibiano 2021-01-17T17:55:14.458900Z

ah right!

Antonio Bibiano 2021-01-17T17:55:34.459100Z

thanks!

roelof 2021-01-17T17:59:08.460Z

Thanks, I hope this #(reduce (fn [c _] (inc c)) 0 %) is good clojure code to count a seq where you do not allowed to use count

Christian 2021-01-17T18:39:15.461200Z

I think I solved it pretty mich the same way

roelof 2021-01-17T18:41:15.461400Z

šŸ™‚

roelof 2021-01-17T18:43:54.461800Z

maybe i get the hang of it

šŸŽ‰ 1
roelof 2021-01-17T18:43:58.462Z

finally

Piotr Brzeziński 2021-01-17T19:28:07.464Z

Hey! Iā€™m going through ā€œLiving clojureā€ and have ran into an issue when I was asked to install Cheshire. I added it to dependencies like so (project generated with lein if that matters)

:dependencies [[org.clojure/clojure "1.10.0"]
                 [compojure "1.6.1"]
                 [ring/ring-defaults "0.3.2"]
                 [cheshire "5.10.0"]]
then in my handler I try to require it like so
(ns cheshire-cat.handler
  (:require [compojure.core :refer :all]
            [compojure.route :as route]
            [cheshire.core :as json]
            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]))
but when I run repl and try to use json/generate-string I get an error Syntax error compiling atā€¦.No such namespace: json how can I debug what could be going wrong here?

Piotr Brzeziński 2021-01-17T19:28:21.464400Z

I did restart the server so I assume cheshire was installed just fine.

2021-01-17T19:37:21.464500Z

Is your REPL in the user namespace?

Piotr Brzeziński 2021-01-17T19:38:21.464800Z

It is, yes.

2021-01-17T19:38:29.465Z

One thing that you need to understand is your REPL is not necessarily inside the cheshire-cat.handler namespace, and it is that namespace only where you have required cheshire as json

Piotr Brzeziński 2021-01-17T19:38:37.465200Z

Ah, should it bee switched to the handler?

Piotr Brzeziński 2021-01-17T19:38:46.465400Z

riiight

2021-01-17T19:38:54.465600Z

So in user namespace you have not required cheshire as json and therefore can't use it

Piotr Brzeziński 2021-01-17T19:39:08.465800Z

That makes perfect sense.

2021-01-17T19:39:12.466Z

Ya, you need to switch the repl to your namespace first

Piotr Brzeziński 2021-01-17T19:39:24.466200Z

Too bad it wasnā€™t mentioned in the book. Wouldā€™ve saved me some frustration šŸ™‚.

Piotr Brzeziński 2021-01-17T19:39:25.466400Z

Thank you!

2021-01-17T19:39:33.466600Z

No problem

2021-01-17T19:42:27.466800Z

This can sometimes be a bit "magic", because some IDEs, like Cider, when you do eval-last-sexpr, it'll automatically eval it in the context of the namespace of the file you are in. So it might work like that, but then if you go at the REPL prompt and try to call something it won't. And it confuses people, cause you might assume that the IDE command to eval is the same as typing in the REPL but not exactly

šŸ‘ 1
Piotr Brzeziński 2021-01-17T20:00:48.467200Z

Right, got it. Thanks for the detailed explanation šŸ™‚

roelof 2021-01-17T21:07:21.468400Z

hmm, why here a classException #(reduce (fn [i xs] (conj xs i)) %) I try to reverse a seq but am not allowed to use reverse or rseq

roelof 2021-01-18T08:50:31.475500Z

oke, so I missed the initial value ?

Mno 2021-01-18T08:59:40.475700Z

Try it out and tell us if it was that.. Learning to debug is arguably the most important skill to pick up.

Mno 2021-01-18T09:00:30.475900Z

Open a repl and try it there with your own sample data, do a couple extra println just to see how the data changes.

roelof 2021-01-18T09:08:36.476900Z

oke

dpsutton 2021-01-17T21:19:15.469400Z

Your arguments to conj are backwards as are your arguments to the reducing function.

2021-01-17T21:20:51.469800Z

In such a situation I'd try to check what the values of i and xs are with which the anonymous function gets called (additionally to @dpsutton's suggestion below; I'd expect such a possibility to be useful in general)

roelof 2021-01-17T21:23:15.470400Z

then stilll the same error

dpsutton 2021-01-17T21:26:28.471200Z

take some time and think about the arguments to your reducing function acc item. and take some time to think about the arguments to conj collection item and make sure they line up.

2021-01-17T21:38:16.471300Z

It helps to write it:

#(reduce
  (fn [accumulator element]
    (conj accumulator element))
  %)

2021-01-17T21:41:31.471500Z

+ if you prefer pen-and-paper style, also recall the difference between (reduce f coll) and (reduce f val coll)

clyfe 2021-01-17T21:42:54.471700Z

(ring.adapter.jetty/run-jetty
 app {:port  3000, :join? false})
^ runs it

clyfe 2021-01-17T21:45:02.471900Z

see this if you haven't yet: https://skillsmatter.com/skillscasts/3445-functional-web

roelof 2021-01-17T21:45:12.472300Z

wierd, still the same error

roelof 2021-01-17T21:45:37.472500Z

can it be that 4clojure uses a old version of clojure ?

roelof 2021-01-17T21:49:41.472700Z

yep, thanks, I now see the data that I want

roelof 2021-01-17T21:49:59.472900Z

tomorow look if I can send the data to hiccup

2021-01-17T21:57:15.473100Z

"still" meaning when evaluating what code (and "same error" being what exactly)?

gibi 2021-01-17T22:39:40.474300Z

Hi, I am learning reitit and this is an example copied from a book: https://paste.ofcode.org/WkTRZKPgrKZSJbSPBRXSpA when I try curl -X POST <http://localhost:3000/echo/4> I get 404 instead of 405 though. It seems only the 404 default handler is considered :thinking_face:

2021-01-18T23:49:25.095300Z

Looks like your parenthesis are wrong