This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-10
Channels
- # announcements (4)
- # beginners (116)
- # boot (4)
- # calva (63)
- # cider (8)
- # clara (20)
- # cljdoc (10)
- # cljsrn (69)
- # clojure (115)
- # clojure-austin (1)
- # clojure-dev (4)
- # clojure-finland (1)
- # clojure-italy (3)
- # clojure-nl (6)
- # clojure-russia (10)
- # clojure-uk (84)
- # clojurescript (28)
- # cursive (14)
- # data-science (1)
- # datascript (1)
- # datomic (11)
- # duct (3)
- # emacs (13)
- # figwheel-main (11)
- # fulcro (4)
- # graphql (6)
- # jackdaw (2)
- # jobs (23)
- # jobs-rus (1)
- # kaocha (11)
- # lein-figwheel (13)
- # leiningen (55)
- # luminus (14)
- # lumo (22)
- # off-topic (121)
- # pathom (19)
- # re-frame (6)
- # reagent (3)
- # reitit (22)
- # remote-jobs (10)
- # ring-swagger (1)
- # shadow-cljs (67)
- # slack-help (5)
- # spacemacs (1)
- # sql (18)
- # vim (28)
- # yada (2)
Where do you people go and discuss web-technologies (eg Service Workers and PWA’s)? Are there any good channels on this Slack, or do you use other Slacks?
Good question. I don't know. I'm also interested in this subjects and I usually look in #clojurescript for more broad web content.
Hello ClojureScriptians! I love that a cljc test can now simply (:require [clojure.test :refer [deftest is testing run-tests]])
without reader-conditionals. I’m trying to figure out how to do the same under the following scenario: let’s say I have macro bar, its clojurescript version foo-cljs/bar in foo_cljs.clj and its clojure equivalent foo-clj/bar in foo_clj.clj. How do I get to being able to (:require [foo :refer [bar]])
? I’ve taken a stab at adding a foo.cljc that requires my bars in various ways, but as I flail, I am thinking one of you clever people knows the path.
I'm trying to create a cljs project that targets nodejs as directed by the current quick start guide. I've installed express, but when I run the repl with java -cp cljs.jar:src cljs.main --repl-env node
, then do (require '[my-ns.core :as myns])
, I get Cannot find module 'express'
figured it out. nevermind
related: should I use shadow-cljs instead of plain deps.edn?
@lee I think you're looking for implicit refer: http://blog.fikesfarm.com/posts/2016-03-01-clojurescript-macro-sugar.html
I found a regression related to cljs.js/analyze-str
, It's not working since 1.10.238 (maybe even before). I'm trying to run the following in the CLI repl:
(require '[cljs.js :as c])
(c/analyze-str
(c/empty-state) "(+ 1 2)" nil {:eval c/js-eval :context :expr} identity)
and it's returning nil instead of an AST.thanks @john, I will re-read that nugget from @mfikes and see if I can get to an unflailing state. 🙂
@jpsoares106 pretty sure that is intended. it must be able to go async so the identity
as a callback won't really work
@jpsoares106 the online example was incorrect and was updated with https://github.com/clojure/clojurescript-site/commit/9feab29728cb195f3fab67164465ae7d129b5bf7 It is the case that this used to work accidentally but that wasn’t the intended use.
The macro sugar seems pretty clear if there is one macro for clj and cljs, but I still haven’t figured it out if I have a separate clj and cljs implementation for my macro. I should really maybe just go over and study how it was done for clojure test.
@lee hmm, don’t you just need to detect current compilation environment in your macro and decide what to generate based on if the macro was called from cljs or clj?
something like https://github.com/binaryage/env-config/blob/master/src/lib/env_config/impl/macros.clj#L3
reader conditionals are about reading
btw. this commit could be helpful https://github.com/binaryage/env-config/commit/0fdb6de6a90296882aef10b58223c7fcc6b79c14
specifically macros.cljs https://github.com/binaryage/env-config/commit/0fdb6de6a90296882aef10b58223c7fcc6b79c14#diff-51ff5df1f5f9c0a0c9cdcf03b6e53981R4
It looks like macrovich is using a similar technique https://github.com/cgrand/macrovich
macros are about writing code
In cljs, when macros are run, you are in a Clojure program (the cljs compiler)
Thanks @alexmiller, I think I got too fixated on this reader conditional-less require syntax. I should probably stop. The macros I am writing do some digging and manipulating (clj version uses resolve and cljs version uses the cljs.analyzer.api).