This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-08
Channels
- # admin-announcements (3)
- # beginners (284)
- # boot (179)
- # cider (15)
- # cljs-dev (6)
- # cljsrn (95)
- # clojure (105)
- # clojure-austria (4)
- # clojure-berlin (9)
- # clojure-germany (4)
- # clojure-japan (3)
- # clojure-russia (65)
- # clojurebridge (1)
- # clojurescript (109)
- # code-reviews (16)
- # cursive (27)
- # datavis (19)
- # datomic (68)
- # devcards (7)
- # funcool (31)
- # jobs (1)
- # ldnclj (2)
- # lein-figwheel (3)
- # leiningen (4)
- # off-topic (419)
- # om (255)
- # parinfer (39)
- # portland-or (2)
- # re-frame (28)
- # reagent (14)
- # slack-help (12)
- # spacemacs (1)
They seem to work fine when required from e.g. core.async, but my user-defined macros aren't working right
@jaredly: are your macros defined in a .clj file?
that's not going to work
almost sure about it
but @dnolen is replying so I yield
a very nice related blog post is -> http://blog.fikesfarm.com/posts/2015-09-07-messing-with-macros-at-the-repl.html
It doesn't exist really - but a minor bug that it doesn't error out. As usual patches most welcome!
oh did not know that 😉
@jaredly: When you write macros for bootstrapped ClojureScript, even though they are written in namespaces required from the consuming namespaces, all namespaces are compiled as ClojureScript. Thus defmacro
must exist in ClojureScript.
Perhaps it could be made to error out at the REPL, which is what I think David's suggesting.
oh, the signature is a bit different from clojure.core/map
, I expected it to be the same
Hello, I am having problem with externs for google-maps. I use cljsjs package as described here https://github.com/cljsjs/packages/wiki/Using-Packages with both dependency and require in my core namespace. When running lein cljsbuild I am getting No such namespace: cljsjs.google-maps
So I found the answer. I was using .setLabel on Marker instance which is not in the google-maps cljsjs package. And indeed the require is not needed.
I'm wondering what would happen if a third party is integrating the compiled cljs binary into a closed source project
don't really now how the linking clause applies to this environment, but I'd expect the GPL lib would "poison"/"bless" the rest of the project
Is it possible to have a main entry point a la java? So that I don’t have to bootstrap my app by relying on the side-effects of requiring a namespace?
Maybe I should just wrap the app bootstrapping code in a (defn main [])
and do <script>myapp.core.main()</script>
from the html-file?
@grav: in boot-cljs there is an init-fn
thing which is similar to :main
hello! I'm jacked to clojurescript with cider and trying to eval (println (GET "
gives me this org.mozilla.javascript.EcmaError: ReferenceError: "XMLHttpRequest" is not defined. (rhino.clj#41)
it makes the ajax request fine in the browser, but i'm trying to use the repl to explore what it's returning
@naomarik: all JS environments are different, if the constructor is not actually in the language specification you cannot expect such things to work.
Has anyone here used cljsjs.showdown with a custom extension defined in ClojureScript yet?
It expects a JS function that returns an array of objects, each with a .lang
, .regex
and .replace
member. Those members are a string, a JS regular expressions and a JS function, respectively.
Can I just define all this as if I was writing for ClojureScript and then wrap it in (clj->js my-extension-function)
or do I need to do more?
This is what I have so far: https://gist.github.com/Jannis/70b1aa5cfb47bacf08f1
Ok. I'm making a bit of progress by creating JS arrays and objects with #js
and passing those to Showdown. Still throwing errors but this time it's about creating JS regexps from other regexps. Should be able to solve that.
Ah. The cljsjs version of Showdown takes a pattern string, not a regexp. Done. Working. Sweet.
i haven't found much in the way of comparison between the two, you have anything to suggest in regards to that?
Om Next is here https://github.com/omcljs/om right?
https://github.com/omcljs/om/blob/master/src/main/om/next.clj https://github.com/omcljs/om/tree/master/src/main/om/next
I'm trying to figure out how to make the sente post fallback actually run - do I have to do something special in the frontend code?
I wrapped the post-fn in a middleware and have verified that even with the get handler that sets up the websocket malfunctioning, the post handler isn't getting hit
is there a blog post or tutorial for getting started with closure modules from a cljs perspective?
@noisesmith: I think you can choose what you want to connect on
@jaen: so this means I need to do the fallback manually from my cljs?
I'm already using :type :auto
and I modified my ws handler to fail, the post endpoint isn't even getting hit
um. sorry if the question is not very smart, but what is the newest example on how to use figwheel and connect from vim to browser page via nrepl? (I use vim-fireplace)
I tried to do om.next tutorial, and picked figwheel (now it's figwheel-sidecar) from there, and it's obviously connected to browser page
I just use figwheel in a regular terminal window, since it is mostly there for the hot-reloads anyway
right