Fork me on GitHub

Naming convention is always something top of mind when I am programming. I notice that a few CLJ libraries like - garden, clj-time, hiccup etc don't start their function names with a verb. For example, I was under the impression that it would be preferred to do something like create-x, get-x, register-x...but I am seeing thing like date-time, css or html - I am not saying this is wrong, I just want to better understand naming conventions in clojure land. Perhaps names for library function is just different than in projects?


@tkjone it is definitely a stylisitc thing. Some folks have more opinion on it than others, i'd recommend reading for ideas (the sample chapter talks about names)


Thanks! Will do.


A big :thumbsup::skin-tone-2: for Elements of Clojure!


There's also this blog post which advocates that naming convention


Stuart's really smart and really opinionated. I find myself agreeing really strongly with about half of what he writes (and disagreeing really strongly with the other half) đŸ˜†


Anyone has a list of good 4clojure users to follow? Checking other people's solutions once you've finished a problem is really fun


Oh I can already see the answers once I've solved a problem


but following multiple people let's me see different solutions to the same problem, and it's interesting how they are never the same


That is why programming is so amazing !


@gonewest818 The right margin is 30px, just like you set it. You may want to set the width on the table if that is the problem you want to fix.


Really? the table resizes to the div. there are no explicit dimensions other than the margin, so if that’s the case I expected the table to honor the right margin also. Am I missing something?


I mean, I expect there to be a consistent 30 px margin on all sides of the table in that grab.


The "Style" window in your screenshot indicates that the table does have a 30px margin on all sides, it looks like the table is just too wide. Maybe an element containing it is larger than the screen? Maybe the styles on the table cells are bumping up the width of the overall table? It could honestly be a thousand things.


(defn init-tinymce [comp]
  (.init js/tinymce #js {:selector "#editor"}))

(defn editor []
  (r/create-class {:component-did-mount init-tinymce
                   :reagent-render (fn []
                                     [:div#editor "abc"])}))
I am trying to use tinymce editor in a reagent project with figwheel, This renders the editor the first time, but when i change some content (for figwheel reload) eg. the text. The editor is not there and I get just the div element.


This could be because I have the initialization code in the component-did-mount which is probably not called after reload but I am not sure. Any ideas would help ..


No worries, found the official wrapper., works perfectly with adapt-react-class


^^^ my previous issue resolved on the semantic ui Gitter channel. The table gets a width 100% by default, so the solution is to embed it inside a another container with padding.

Lucas Barbosa21:11:13

Is there a native queue data structure in clojure?

Lucas Barbosa21:11:40

I want to conj at the back (like a vector) and pop from the front

Lucas Barbosa21:11:20

found it, clojure.lang.PersistentQueue/EMPTY