Fork me on GitHub
#clojurescript
<
2015-11-30
>
dnolen00:11:16

There's a ticket about this

dnolen00:11:20

Patch welcome

tony.kay01:11:12

I'm using nodejs REPL, and I get an exception on a test. How do I get the stack trace?

tony.kay01:11:25

ah, found it.... .-stack e

tony.kay02:11:53

erm, yeah...that doesn't have src maps...

tony.kay02:11:44

@mikethompson: are you asking a question?

mikethompson02:11:45

Answering one, hopefully

clojuregeek02:11:45

does anyone have an idea why i get this in my browser script console? nodejs.cljs?rel=1448650510006:15Uncaught ReferenceError: require is not defined

dnolen03:11:46

@tony.kay: npm install source-map-support in your project directory

tony.kay03:11:07

ah, thanks for the tip

tony.kay03:11:23

I just finished process-roots rewrite with merged joins...was just pushing it simple_smile

dnolen15:11:42

@clojuregeek: it seems something is pulling in the Node.js helper namespaces which won’t work in a browser setting

clojuregeek15:11:17

@dnolen: thanks .. yeah that was it simple_smile

arohner16:11:56

I wrote up a quick blog on Foam, the server-side Om rendering library I talked about at the conj: https://rasterize.io/blog/server-side-foam-rendering.html

dnolen17:11:21

@arohner: cool, looking forward to pursuing deeper support for your ideas in Om Next, and I welcome help / collaboration. There were various other reasons I was already interested in defui working on either the client or server. So this seems like another logical step to me.

arohner17:11:43

@dnolen: great! how can I help?

dnolen17:11:59

also not against seeing this stuff get rolled into Om Now for people with large existing codebases that could benefit.

dnolen17:11:25

@arohner: I would just write a up a design page on the Om Wiki of how it currently works

dnolen17:11:37

then perhaps notes on what it would take to get Om Now & Om Next up to speed.

arohner17:11:15

sounds good

lvh17:11:14

awesome to see cljs chrome extensions; I’m writing a CLJS GM extension simple_smile

clojuregeek18:11:44

Working through this https://github.com/omcljs/om/wiki/Intermediate-Tutorial .. can't get past the CORS warning.. i added header manually in my api server and also used wrap-cors .... am i missing something?

clojuregeek18:11:23

I see it says We rely on Google Closure to deal with cross browser issues: but I can't see where it is..

dnolen19:11:21

@clojuregeek: CORs warning resulting from what?

dnolen19:11:37

@clojuregeek: but what is triggering that first request?

clojuregeek19:11:28

(defn app-container [cursor component]
  (reify
    om/IInitState
    (init-state [_])
    om/IWillMount
    (will-mount [_]
      (edn-xhr {:method :get
                :url ""
                :on-complete #(om/transact! cursor :eventTypes (fn [_] %))}))

clojuregeek19:11:44

will-mount ... want to load the data from my api

dnolen19:11:55

@clojuregeek: what url are you using to load your page? ?

clojuregeek19:11:18

api is at 3000

dnolen19:11:12

this may be a thing you have to configure in Figwheel or your webserver

clojuregeek19:11:59

before using the edn-xhr I was using clj-http and passing the cors header in the response ... but since using the edn-xhr it doesn't seem to read in the headers..

dnolen19:11:38

@clojuregeek: yeah so edn-xhr is probably broken now that is a standard browser thing

dnolen19:11:50

happy to see someone edit the tutorial and bring it up to date

clojuregeek19:11:01

ok well when I figure it out, I'll see about that simple_smile

dnolen19:11:07

seems like you just need to instantiate this instead and it’s a drop-in replacement