This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (9)
- # aws (1)
- # beginners (4)
- # boot (197)
- # cider (38)
- # cljsrn (70)
- # clojure (128)
- # clojure-russia (36)
- # clojurecup (1)
- # clojurescript (86)
- # core-typed (2)
- # css (1)
- # datomic (35)
- # editors-rus (4)
- # hoplon (22)
- # ldnclj (2)
- # mount (19)
- # off-topic (45)
- # om (63)
- # onyx (7)
- # parinfer (8)
- # yada (2)
@jbaiter: was the code undergoing advanced compilation? and did you try it at the REPL?
Why is "doc" function lost after moving to another namespace after launching a CLJS REPL?
(ns something.core) (doc anything) (cljs.user/doc anything) (ns cljs.user) (doc anything)
crocket: it's just example, use any editor/plugin you like. johannjohann: and in clj it's different:
dmca-ui.server=> (doc map) ------------------------- clojure.core/map ([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls]) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. Returns a transducer when no collection is provided. nil dmca-ui.server=> (ns dmca-ui.ws-router) nil dmca-ui.ws-router=> (dmca-ui.server/doc map) CompilerException java.lang.RuntimeException: No such var: dmca-ui.server/doc, compiling:(/tmp/form-init7902851373642829696.clj:1:1) dmca-ui.ws-router=> (require '[dmca-ui.server :as ss]) nil dmca-ui.ws-router=> (ss/doc map) CompilerException java.lang.RuntimeException: No such var: ss/doc, compiling:(/tmp/form-init7902851373642829696.clj:1:1)
i just grepped for it--knew the require stuff was getting injected just didnt know where
I figured out that auto-completion is broken on cider after moving to another namespace if cider is connected to figwheel via nREPL.
There's this - https://github.com/Day8/re-frame/wiki/Using-Stateful-JS-Components - but it's for reagent.
I think Clojurescript doesn't fully support
use - https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure
Somewhat, and probably won't get all that much better, but it's certainly came a long way since a year or two.
@crocket: ClojureScript REPLs, by default, behave a lot like the Clojure REPL you get when running it from the JAR. Lein's Clojure REPL adds auto-complete, and Planck adds it as well, but it is not a base capability.
@crocket: after switching to a new namespace in the REPL, you should be able to
(require-macros '[cljs.repl :refer [doc]])
Looking at the pages repo an automatic update was triggered an hour ago, probably that?
@crocket: in my case I put the docset you can download in
looking for a good async http lib. CLJS wiki lists cljs-http, cljs-ajax, jeluard/happy.. can anyone recommend any other good one that I might be missing? easy integration with core.async is a huge plus.
@peterbak: You're looking for something to send messages to and from client/server?
anyone have any experience requiring amd foreign-libs with clojurescript? little shaky on my first principles about what seems to be going amok 😞
but when the browser tries to load the file im getting a 'require is not defined' error
seems like theres a race condition with when i include my cljs code and when the require stuff is loaded
@johannjohann: oh, sorry, I've missed the gist. This seems to look sensibly. I'm not sure about a race condition though - the
:module-type option means that the module will be translated to GClosure module, so it will be loaded exactly like the rest of your code, so this shouldn't exhibit any behaviours that wouldn't happen with the rest of your Clojurescript codebase, theoretically at least.
I've had experience mostly with CJS modules, but this should work similarly with AMD - this is all translated by GClosure codebase into GClosure modules.