Fork me on GitHub
#beginners
<
2017-08-18
>
cjhowe05:08:50

is there a better way to do this? (when-let [title (#(if-not (empty? %) %) (om/get-state this :title))] ,,,) - it's like i want to treat empty strings as logically false for when-let, essentially

akiroz05:08:47

@cjhowe why not just separate the let and when?

(let [title (om/get-state this :title)]
  (when-not (empty? title)
    ...))

cjhowe06:08:28

hmm, i was trying to be succinct, but if that's the clearest way i guess i should

seancorfield06:08:47

(if-not (empty? x) x) is (not-empty x)

seancorfield06:08:20

so (when-let [title (not-empty (om/get-state this :title))] ...)

cjhowe07:08:21

ah, that's exactly what i'm looking for, thanks!

sb14:08:44

How to create similar app like replete iOS app? Ok, I can create now reagent app. How to compile into app the clojure repl?

sb14:08:12

Or with Xcode/swift?

mfikes14:08:00

@sb These days, I would consider React Native for building a ClojureScript REPL app.

sb14:08:02

Ok, I try it! in my free time.. that will be a great journey interesting project

lemontea14:08:37

@lepistane That's a tough lesson! Some google search could have prevented that: https://medium.com/@sellarafaeli/git-reset-not-so-hard-after-all-e3de88bb66a5 (Or just read stackoverflow posts... there's enough warning of how it is truly dangerous)

lemontea14:08:27

Personally, I always consult google before doing any git command that's not burned in my memory - git is a low level interface to some kind of distributed file system, and there is more than one way to mutate yourself into a bad state

lepistane15:08:55

@lemontea didnt expect this. Yeah i googled few things i was bit tired so i just did it and tadaaa anyway i got everything up and running in coupe hours again. redoing it kinda reinforced what i learned 🙂 tnx