This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-04
Channels
- # admin-announcements (14)
- # aleph (3)
- # beginners (75)
- # boot (95)
- # carry (4)
- # cider (23)
- # clojure (39)
- # clojure-android (3)
- # clojure-brasil (2)
- # clojure-dev (17)
- # clojure-gamedev (1)
- # clojure-mexico (12)
- # clojure-poland (12)
- # clojure-romania (1)
- # clojure-russia (10)
- # clojure-spec (8)
- # clojure-uk (36)
- # clojurescript (34)
- # core-async (4)
- # datomic (40)
- # emacs (1)
- # events (7)
- # hoplon (119)
- # instaparse (52)
- # keechma (71)
- # mount (4)
- # off-topic (9)
- # om (4)
- # onyx (3)
- # other-languages (23)
- # protorepl (3)
- # re-frame (9)
- # reagent (26)
- # rethinkdb (5)
- # spacemacs (2)
- # testing (1)
- # yada (1)
@hueyp: One thing I’ve wondered about is if you need some imperative code for speed reasons in a tight loop, whether bashing on 1-element array values buys you anything over atoms. Such code ends up being pretty difficult to read, though.
Is the use of the closure library encourage over other more mainstream libraries that do the same thing?
@hueyp: Looks like David wrote some macros based on such arrays to simulate mutable locals: https://github.com/swannodette/chambered/blob/master/src/chambered/macros.clj
@mfikes: thanks, I’ll take a look … in my case it isn’t for speed, I just am swap!
’ing an atom, but the inner function returns the next value + some extra data and but I want that extra data .. in clj I was using with-local-vars
@hueyp: Yeah, for that I’d just let
ps
be an atom, and replace the var-set
with reset!
this is super basic — but what’s the proper way to get a map’s key and val without knowing the :key?
hmm, so there’s simply no (key m) or (val m), unless its a MapEntrie (whatever that is)?
@lwhorton: not sure what the use-case is for a map with one key-value pair
you probably want something like {:key “foo", :val “bar”}
instead of {“foo” “bar”}
it’s only idiomatic to use {“foo” “bar”}
if you’re intending to use ”foo”
to lookup ”bar”
@lockdown: always reach for google closure first if possible. lots of good stuff there, and it will be always be easier to integrate in your cljs project
@vandr0iy: I'm on Emacs but the point is to start two REPLs, one clojure REPL and run (start)
in user
namespace to start all the mount
states (it includes web server and few other stuff) and then run lein figwheel
to start clojurescript REPL. Dmitri Sotnikov, the author of Luminus use Cursive so try ask him on GitHub if you have more troubles.
@novakboskov: I'll try this kind of workflow, thanks! But my point was: I'm completely unable to start a repl that my .cljs file would be able to see. Like: -start emacs -open .cljs file -C-c M-j and then: -trying to call some method defined in the .cljs file I opened before -> nope -(in-ns my.cljs.ns) -> nope -recompile .cljs file I'm talking about with C-c C-k -> nope, "no clojurescript repl opened" & similia errors galore. I opened the issue, appearently solved since february, on github, no replies yet...
Has anyone published an npm
module written in clojurescript that runs in both node and the browser ?
good day, gentlemen
I am having a trouble with lein cljsbuild once db
:
:cljsbuild {:builds {:db {:source-paths ["src/ddd/ios/db"]
:compiler {:output-to "target/db/db.js"
;:main "ddd.ios.db.db.main"
:output-dir "target/db"
:optimizations :advanced}}
(ns ddd.ios.db.db)
(defn ^:export main [])
If I uncomment :main "ddd.ios.db.db.main"
, I get:
Compiling "target/db/db.js" failed.
java.lang.IllegalArgumentException: No implementation of method: :-find-sources of protocol: #'cljs.closure/Compilable found for class: nil
Otherwise – it compiles. :optimizations :none
works as well.
Am I missing something obvious?