This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-12
Channels
- # admin-announcements (3)
- # beginners (13)
- # boot (52)
- # cbus (1)
- # cider (13)
- # cljs-dev (70)
- # cljsjs (16)
- # cljsrn (124)
- # clojure (129)
- # clojure-austin (3)
- # clojure-boston (2)
- # clojure-russia (238)
- # clojure-sg (3)
- # clojurescript (119)
- # cursive (18)
- # datomic (22)
- # editors-rus (2)
- # events (1)
- # hoplon (160)
- # jobs (1)
- # jobs-rus (8)
- # ldnclj (31)
- # ldnproclodo (1)
- # lein-figwheel (4)
- # leiningen (8)
- # off-topic (3)
- # om (335)
- # onyx (29)
- # re-frame (15)
- # reagent (12)
- # robots (1)
- # yada (19)
some clojurescript macros i’ve found useful: https://gist.github.com/jdubie/c8b62e24f7072078abc3#file-macros-clj-L26-L47
I tried using the file itself as an extern but I am getting an error from closure ERROR: JSC_DUPLICATE_EXTERN_INPUT.
Does anyone have a example of creating a drop-down using sablono with ClojureScript? I can’t seem to make it work in the tag form.
I’m assuming there is a tag version of drop-down. There is a defelem for it in sablano
@tavistock: I think you don’t need to provide externs for built-in globals. They should be provided by the Google Closure compiler (https://github.com/google/closure-compiler/tree/04dd916be73f961f489906231cfb1a1ad0fd583a/externs)
@tavistock: This would also explain why you are getting the JSC_DUPLICATE_EXTERN_INPUT error.
I phrased it wrong, in the optimization :none I am calling it like (. js/window hello) and in the :advanced it gets turned to window.zz. I need it to be window.hello
@tavistock: Maybe I’m misunderstanding, but shouldn’t (js/hello)
work? Like (js/alert “Hello”)
would?
To add to the conversation before that: We could ask the folks at https://sameroom.io/ to maybe provide a free pro account or something like that. Used the service in the past and it can mirror rooms almost perfectly
@tavistock: you aren’t being clear on what you want to accomplish - and fundamentally what you want is a Closure thing not a ClojureScript thing
@tavistock: do you or don’t you want to export something under advanced?
if you are confused about advanced the best thing you can possibly do is spend 30 minutes on Closure docs
@dvcrn Sameroom looks cool but the one I posted is just open source code that just runs a Slack bot (I think). An admin on these forums should be able to just easily install it
@tavistock: the dupe error is a red herring
if you want to use some name from some other library then yes you need an externs file
I have a html page that has a script tag. I want to use a function in that script tag from cljs.
@tavistock: I took a look at your project.clj … I suspect your problem is there, you’re using a lot of lein features … very few of which I understand.
Your setup is too foreign for me to actually want to investigate. Perhaps other folks have more insights.
@tavistock: you might be interested in the port of core.matrix to ClojureScript that Jeff Rose is currently working on - would be very useful for neural network stuff in the browser!
@tavistock I think the only thing you are missing for your thing to work in :advanced
is the actual externs reference
sorry not the page om.core
already uses the cljsjs.react
so you do not need the preamble
but the goog dependency isn't fullfilled. it can't be found and definately isn't on my file system
:cljsbuild {:builds {:main {:source-paths ["src-cljs"]
:compiler {:output-to "resources/js/main.js"
:optimizations :advanced}}
:dev {:source-paths ["src-cljs"]
:compiler {:output-to "resources/js/main.js"
:output-dir "resources/js/out"
:source-map "resources/js/out.js.map"
:optimizations :none
:pretty-print true}}}}
this is an example from one of my projects:
:cljsbuild {:builds [{:source-paths ["src/zoom_recordings/ui"]
:figwheel true
:compiler {:output-to "target/classes/public/js/app.js"
:output-dir "target/classes/public/js/out"
:asset-path "js/out"
:optimizations :none
:recompile-dependents true
:main "zoom-recordings.ui.core"
:source-map true}}]}}
@triss yeah you either need to specify a :main
or manually include js/out/goog/base.js
in your html
is this known error? Caused by: java.lang.NoSuchMethodError: com.google.common.base.Splitter.splitToList(Ljava/lang/CharSequence;)Ljava/util/List; can't compile minimized version
Hi! Does anyone uses internalization in clojurescript, any experience with "com.taoensso/tower" or any other library. Thanks.
does closure support loading two unrelated libs compiled with advanced compilation as separate js script tags, in the same page?
I’m getting errors in advanced compilation that looks totally unrelated to my code. in the depths of goog.object
Is this right? — object
is a type, Object
is like a protocol.
So I extend-type object IFoo
but (defrecord Bar Object (method [this] ...))
?
@bojanx100: any specific question re. i18n? Tower gets the job done for me.
@stuartsierra: that’s right
thanks
And js/Object
is the JavaScript constructor function for "Object"?
thanks
@arohner timbre https://github.com/ptaoussanis/timbre may fit the bill?
what is the equivalent of annotating things with ^java.util.{Collection, List, Map}
in ClojureScript?
bah. $ lein new reagent doh;cd doh;lein figwheel Generating fresh 'lein new' Reagent project. clojure.lang.Compiler$CompilerException: java.io.FileNotFoundException: Could not locate cljs/analyzer__init.class or cljs/analyzer.clj on classpath: , compiling:(figwheel_sidecar/utils.clj:1:1) at clojure.lang.Compiler.load (Compiler.java:7142)
@bherrmann: Clojure 1.7.0 is a minimum requirement. You’re probably specifying 1.6.0 via the reagent template.
$ grep cloj project.clj :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.170" :scope "provided"]
@bherrmann: figwheel in that template is a SNAPSHOT