This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-28
Channels
- # beginners (8)
- # boot (49)
- # cljs-dev (29)
- # cljsrn (9)
- # clojure (238)
- # clojure-dev (3)
- # clojure-gamedev (1)
- # clojure-italy (7)
- # clojure-norway (11)
- # clojure-russia (39)
- # clojure-sanfrancisco (3)
- # clojure-spec (116)
- # clojure-sweden (2)
- # clojure-uk (53)
- # clojurescript (90)
- # cursive (13)
- # datomic (12)
- # defnpodcast (2)
- # dirac (1)
- # emacs (11)
- # figwheel (2)
- # hoplon (15)
- # jobs (3)
- # jobs-discuss (48)
- # keechma (1)
- # klipse (4)
- # leiningen (16)
- # luminus (4)
- # lumo (49)
- # mount (10)
- # off-topic (1)
- # om (13)
- # onyx (15)
- # pedestal (67)
- # perun (1)
- # planck (16)
- # powderkeg (33)
- # proton (1)
- # protorepl (2)
- # re-frame (16)
- # reagent (4)
- # ring (9)
- # ring-swagger (10)
- # rum (5)
- # slack-help (1)
- # spacemacs (1)
- # uncomplicate (15)
- # untangled (19)
- # yada (58)
can anyone tell me how to add live reloading of the server code in the project one generates in https://github.com/omcljs/om/wiki/Intermediate-Tutorial ? I've been playing with the server side and have been running 'lein figwheel' again and again to see changes in core.clj. The cljs changes have been reloading beautifully, of course.
https://github.com/raph-amiard/clojurescript-lua <-- is this the best for cljs on lua? (last commit looks like 5 years ago)
I want to add GraphiQL to my project. I’m currently trying via webjars: https://github.com/webjars/graphiql But I’m not sure what and how to add this using foreign libs
Does foreign libs expect a path on the filesystem or relative to the served output file via a webserver?
This answer says: > The path is classpath-relative and the contents of the resources/ directory are added to the classpath, meaning if you want to point to resources/jsonld.js in a classpath-relative way it's just jsonld.js. http://stackoverflow.com/a/34353911/6264
However, when I try:
:foreign-libs
[{:file "webjars/graphiql/0.3.1-1/graphiql.js",
:provides ["graphiql"],
}]
I get the error message:
adzerk.boot_cljs.util.proxy$clojure.lang.ExceptionInfo$ff19274a: /…/myproject/app/webjars/graphiql/0.3.1-1/graphiql.js (No such file or directory)
from: :boot-cljsDoes anyone know if Closure modules namespace name should match directory structure? e.g. my.lib
-> src/my/lib.js
"should" yes ... but not a hard requirement. the name of the file is not important to Closure.
hello all: fyi, i scratched an itch I had when dealing with cljs on the node platform: https://github.com/ghaskins/lein-nodecljs
In my ClojureScript code, it seems I'm blowing it up with varargs destructured as maps.
if your generating signatures and you hit the limit for fixed arities I don’t think we do the right thing yet - mostly because no one has complained or worked on it 🙂
I wouldn't consider it a problem — in my case, it's the keyword options, and I should have grouped them into (several) maps anyway.
@dnolen possible how? unless destructure
expands differently in cljs than it does in clj i don't see how destructuring a vararg could cause that
cljs.user=> (defn a [x y & {:keys [a b c d e f g h i j k l m n o p q r s t u v w x y z ab bc cd ef fg hi jk lm no pq rs tu vw zy zz]}] )
#'cljs.user/a
cljs.user=> (a 1 2 :y 23, :q 23, :r 23, :v 23, :o 23, :bc 23, :fg 23, :cd 23, :n 23, :w 23, :m 23, :lm 23, :zy 23, :e 23, :s 23, :l 23, :k 23, :vw 23, :z 23, :g 23, :c 23, :rs 23, :j 23, :tu 23, :h 23, :b 23, :zz 23, :pq 23, :d 23, :f 23, :t 23, :x 23, :ab 23, :jk 23, :ef 23, :p 23, :i 23, :hi 23, :no 23, :a 23, :u 23)
nil
I just switched to [a b c & [{:keys [lots of options}]
and I'm fine, but tracing it down took a while because of the strange (for me) error message.
@bronsa Or the fact that it isn't really a defn, but a rum/defcs
, so I'd have to see what really happens in the defcs
macro.
So I'd like to put together a github project so others can test or improve on this webagents idea. Is there a canonical example of a third party library providing an iRef implementation?
Well, I do have a minimal example:
(ns arity.test
(:require [rum.core :as rum]))
(rum/defc example-component [a & args]
true)
(defn example-fn [a & args]
true)
;; This works fine:
(apply example-fn (mapcat (fn [n]
[(keyword (str "arg" n)) (str "s" n)])
(range 11)))
;; This, however, breaks:
(apply example-component (mapcat (fn [n]
[(keyword (str "arg" n)) (str "s" n)])
;; Works up to (range 10), (range 11) causes an exception.
(range 11)))
I don't think I'm able to understand this further — should this be reported as a rum problem?
@jrychter don’t know this for sure, but it might break because you are passing more than 20 arguments to a functions, which is a hard limit set in clojure.
@isaac you may wanna consider looking at specify!
@anmonteiro thanks, it’s look like an alternatives.
Hey folks, question: is there the ClojureScript node repl supported in Cursive at the moment?
@richiardiandrea start a cursive clojure.main repl, then (require '[cljs.repl.node :as cljs-node])
and (cljs-node/-main)
@richiardiandrea pretty sure there isn’t any special ClojureScript REPL support in Cursive at all
but clojure has no keyword-identical?
, it seems i need replace it with =
or use conditional reader
with :emit-constants
it will be true
but yes avoid identical?
on keywords or symbols
https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure#data-structures
@dnolen I am using mies
and scripts should be already there, and it looks like it is even connecting to the repl...but the window is read-only and the bottom (modifiable) part does not show up...I'd better write to @cfleming 😄
@richiardiandrea there’s a #cursive channel I’m sure someone can help out
@richiardiandrea but this is what I do and it definitely works 🙂
@richiardiandrea make sure in your REPL setup that you are using the clojure.main
option not the nREPL thing - common mistake
ok, I will check, i have blindly executed script/repl
in a colleague's terminal tnx
...trying...
can anyone point me to how to get the server side of the project in https://github.com/omcljs/om/wiki/Intermediate-Tutorial to reload on code changes (like adding routes)? I've tried wrap-reload and a number of other things without success. the client is reloading via figwheel awesomely. I'm an emacs/cider user if that's relevant.
I've been quitting the repl and restarting every time 😐
@macrobartfast if you’re using CIDER you should be able to use refresh from clojure.tools.namespace
just hit ,
in your CIDER REPL and start typing “refresh"
@anmonteiro ah ok... I'll have to figure out how to connect to a figwheel situation from cider, and then I'll try that
M-x cider-connect
should work, no?
or C-c M-c
it doesn't, actually... the intermediate tutorial doesn't expose a port for that AFAIK... but let me double check.
I mean, whatever happens when you run 'lein figwheel' against the outcome of 'lein new om-intermediate-template om-async'.
I haven’t used Figwheel in a while, but I thought it started an nREPL server
I'll check now...
Figwheel has an option to set an nREPL server port, but it doesn't do it by default, I don't think?
well, it was the way to go, but there is a new route as per https://github.com/bhauman/lein-figwheel/wiki/Using-the-Figwheel-REPL-within-NRepl...
I actually had that working on a stock figwheel project (very cool) but for some as-yet-undetermined reason is not working on the intermediate project.
@richiardiandrea Dedicated CLJS REPLs and other improvements (socket REPLs etc) are the next major feature coming to Cursive.
hi, does anyone know how to expect an exception/assertion failure/failure/etc in a cljs.test.async
test?