Fork me on GitHub

@potetm nah, double-checked that. toolsns reload works OK btw. it's when I try to use cursive to execute tests after a tools ns reload is when the error comes out


cursive displays "loading such and such file..." then the error


I'm learning om and noticed that although om.dom/div is a function and parameters will be indented according to the first one, the first param is the properties and the second is the body (children), so it seems more appropriate to indent it like a macro with a body param, by 2 spaces. Does this sound correct? I don't think there's a way to config that.


@yonatanel You can use under “Code style settings” and set the indentation for “om.dom/div” to 1


@imre I’m at the conj sorry, so I can’t investigate that easily - when I get back I’ll ping you.


thanks @cfleming and have fun


@cfleming om.dom/div is not a macro so I don't get the option to change its setting. Anyway have fun at the conj.


@yonatanel That option works for functions too


Not here. I'll try to play with it.


Works for defui which is a macro. Not for functions :(


Why do I see here a lot of not resolved here :

(ns paintings.api-get
  (:require [clj-http.client :as client])

(defn read-numbers
  "Reads the ids of the paintings"
  (let [ids (->> (client/get "" {:as :json})
                 (map :id))
        ids (reduce (fn [results id] (conj results (.substring id 3))) [] ids)]

(defn read-data-painting
  "Reads the title, description, date , collection, colors and url of a image"
  (let [art-objects (-> (str "" id "?key=14OGzuak&format=json&type=schilderij&toppieces=True")
                        (client/get {:as :json})
        description (:description art-objects)
        date (get-in art-objects [:dating :year])
        collectie (first (:objectCollection art-objects))
        colors (:colors art-objects)
    {:id id :description description :date date :collectie collectie :colors colors}))

(defn read-image-url
  "Reads the image-url"
  (let [art-objects (-> (str "" id "/tiles?key=14OGzuak&format=json")
                        (client/get {:as :json})
        url (filter #(= (:name %) "z4") art-objects)
        tiles (:tiles (first url))
    {:id id :tiles tiles}))

(defn do-both-in-parallel [ids]
  (let [paint-thread (future (pmap read-data-painting ids))
        image-thread (future (pmap read-image-url ids))]    
    (pmap merge @paint-thread @image-thread)))    



the client/get and the read-data-painting and read-image-url are all not resolved


So I just created a very very quick&dirty script that parses any CSS file and generates a list of keywords from the CSS classes in that file. Pretty nice to get autocompletion for all css classes in Cursive when using cljs. Ping me here and I'll link it