Fork me on GitHub
#clojurescript
<
2016-04-10
>
hemingward04:04:44

Quick question (which y’all have probably seen a ton of times but google yields few results): Any idea why trying to make use of NavigateIOS yields the exception “put reactNavSuperviewLink back”?

hemingward04:04:02

NavigatorIOS, rather

hemingward04:04:15

whoops, wrong channel. Sorry

Yehonathan Sharvit06:04:32

@mfikes: macros are definable in KLIPSE

Yehonathan Sharvit06:04:07

But only for simple cases

lsenta09:04:54

How do you guys test macros? clojure tests "is" doesn't eval them?!

(deftest minimal
  (is (=(core/make-chart {:initial {}} [])
        (macros/defchart db))))
Gives me:
FAIL in (minimal) (:)
expected: (= (core/make-chart {:initial {}} []) (macros/defchart db))
  actual: (not (= {:nodes {:initial {}}, :transitions []} (core/make-chart {:initial {}} [])))

lsenta09:04:42

"expected: A = M, actual: eval(A) != A" :thinking_face:

lsenta09:04:19

Only info I found is: https://groups.google.com/forum/#!topic/clojure/nAybQ7tDgSw where Mr Sierra wrote "call the macro, the form of the macro is an implementation detail". That's what I did, without success

dm310:04:46

could you paste your defchart macro?

ccann15:04:51

Hi all, I’m writing a Clojurescript app that (I think) needs a Clojure backend (it has to query a postgres database). I just want to run this code on my machine locally, I don’t need to deploy anywhere. How do I interact with that Clojure backend? Does the backend need an HTTP server like ring? Is there a simpler way? Any help majorly appreciated

mfikes15:04:34

@ccann: If I were doing it, I’d consider making a simple REST call to the backend, but with the data encoded using Transit. That way you can pass Clojure(Script) data back and forth painlessly.

ccann15:04:11

I basically only need one-way server -> client transfer for this toy app

ccann15:04:19

would transit be overkill @mfikes?

ccann15:04:42

(I don’t know the syntax and I’m pressed for time and overload of learning new things)

niwinz15:04:34

overkill, hmm no

mfikes15:04:31

@ccann: I'd use Transit because it is easiest. (Easier than JSON encoding.) Invoking the API for any of the serialization libraries typically involves very little code.

ccann16:04:10

okay I’ll check it out

ccann16:04:07

This question feels stupid to me but I’ve never really written code that spans server to client like this before. A server is necessary right? even if I’m running both client-side and server-side code on my laptop I have to serve up content from clojure and consume it via some protocol like HTTP right?

richiardiandrea17:04:33

@ccann: just as alternative, if you want a prepackaged framework, Luminous does already a lot of the things you wrote

weavejester19:04:41

IIRC edn is faster than transit for small loads.

vincentdm23:04:42

Hi all. Can anyone point me to the current state-of-the art solution for i18n (translation) in the client (cljs)? All the packages I find are either abandoned or pre-release.

vincentdm23:04:34

I am also considering using FormatJS, but it requires JS interop and depends on the availability of window.Intl in the browser, which Safari doesn't support

danielcompton23:04:16

@vincentdm: is Google Closure i18n suitable?