This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-19
Channels
- # bangalore-clj (35)
- # beginners (42)
- # boot (89)
- # cider (9)
- # clara (2)
- # cljs-dev (29)
- # cljsjs (3)
- # cljsrn (14)
- # clojars (9)
- # clojure (332)
- # clojure-brasil (1)
- # clojure-dev (5)
- # clojure-italy (4)
- # clojure-russia (36)
- # clojure-spec (38)
- # clojure-uk (65)
- # clojurescript (114)
- # clr (11)
- # community-development (105)
- # core-async (10)
- # cursive (4)
- # datascript (1)
- # datomic (58)
- # defnpodcast (3)
- # emacs (4)
- # hoplon (7)
- # juxt (3)
- # keechma (8)
- # off-topic (7)
- # om (109)
- # om-next (8)
- # onyx (26)
- # pedestal (3)
- # planck (8)
- # re-frame (76)
- # reagent (28)
- # rum (25)
- # spacemacs (2)
- # specter (35)
- # untangled (31)
- # yada (27)
Cross-posting from #announcements: New replumb 0.2.4
: :file
in the ast is actually pointing to a real file thanks to CLJS-1515! Bumps Clojurescript - https://github.com/Lambda-X/replumb/releases/tag/0.2.4
hey fellow clojurians, i am getting an error when requiring specter in one of my namspaces
ERROR: any? already refers to: cljs.core/any? being replaced by: com.rpl.specter.impl/any? at line 530 resources/public/js/compiled/out/com/rpl/specter/impl.cljc Compilation aborted Subprocess failed
i tried [com.rpl.specter :as specter :rename {any? core-any?}]
but then i get: clojure.lang.ExceptionInfo: Renamed symbol any? not referred at line
@dev-hartmann fixed in 0.13.1-SNAPSHOT, try that
@nathanmarz will try, thank you!
@nathanmarz could i ask a question specific to using specter?
sure, but maybe that would be more appropriate in #specter
@nathanmarz i am trying to add to a list inside a map of maps if the if the id matches. my code looks like that: (def same-id? (specter/comp-paths (specter/paramsfn [id-key id] [item] (= id (get item id-key)))))
sry, you're right
How would I fetch the last portion of url, for example "http://www.mydomain.com/item/12345" I want to obtain 12345
I’ve spent the weekend deploying my first-ever clojure/script webapp. I started with a vanilla app and gradually added deps, but transitioned to luminus because in the future I want a fast and known setup.
I just want to say, luminus has amazing documentation. Every time I hit a small hitch, I’d google it, the luminus docs themselves would have the best answer… so within about an hour I was not googling at all.
(jk - clojure docs are amazing. What I’m impressed about with Luminus is how conscientious @yogthos or his collaborators are in covering every detail. Here’s how you migrate the db in production. Here’s how you set up an nginx proxy. Here’s the SSL recipe. Stuff orthogonal to Luminus but important for a newb.)
@jasonjckn could probably accomplish that with a macro
Deploying a uberjar to ec2 (ubuntu 14.1, openjdk 8), and I get this error which I didn’t get locally or on another local server: Failed to get driver instance for jdbcUrl=jdbc:
:dependencies [
[ring "1.5.0"]
[metosin/compojure-api "1.1.8"]
[cheshire "5.6.3"]
[clj-time "0.12.0"]
[im.chit/cronj "1.4.4"]
[hiccup "1.0.5"]
[cljs-ajax "0.5.8"]
[secretary "1.2.3"]
[reagent-utils "0.2.0"]
[reagent "0.6.0"]
[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.9.229" :scope "provided" :exclusions [org.clojure/clojure]]
[selmer "1.0.7"]
[markdown-clj "0.9.89"]
[ring-middleware-format "0.7.0"]
[metosin/ring-http-response "0.8.0"]
[bouncer "1.0.0"]
[org.webjars/bootstrap "4.0.0-alpha.3"]
[org.webjars/font-awesome "4.6.3"]
[org.webjars.bower/tether "1.3.3"]
[org.clojure/tools.logging "0.3.1"]
[compojure "1.5.1"]
[ring-webjars "0.1.1"]
[ring/ring-defaults "0.2.1"]
[mount "0.1.10"]
[buddy "1.1.0"]
[cprop "0.1.9"]
[org.clojure/tools.cli "0.3.5"]
[luminus-nrepl "0.1.4"]
[abengoa/clj-stripe "1.0.4"]
[luminus-migrations "0.2.6"]
[conman "0.6.0"]
[org.postgresql/postgresql "9.4.1209"]
[org.webjars/webjars-locator-jboss-vfs "0.1.0"]
[com.novemberain/monger "3.0.2" :exclusions [com.google.guava/guava]]
[luminus-immutant "0.2.2"]]
so it does have [org.postgresql/postgresql "9.4.1209”]
… not sure how to diagnose this, Google only suggests I put the postgres dependency in.
@credulous probably not quite the right channel for that question, I would try #clojure as well
Shouldn't
(-> (js/fetch " " (clj->js {:method "GET"}))
(.then #(.json %))
(.then js->clj)
(.then print)
(.catch print))
print the result of the api call to a cljs REPL? I get #object[Promise [object Object]]
print
is called asynchronously of course
@pesterhazy I get that, but should't it eventually print the result to the REPL
it'd be neat to be able to run planck
with a fetch polyfill included to try things out easily
it should yes 🙂
@pesterhazy Still just prints the promise object.
try `js/console.log" instead of print
@pesterhazy Same result. I sould understand if the output ended somewhere else, but weird that I get the promise object back.
@pesterhazy probably worth raising an issue or talking about it in #planck
here’s the supposedly “best” polyfill: https://github.com/github/fetch
@anmonteiro joined that channel now
I'm getting a bit stuck on the Figwheel quickstart. This is the exception being thrown
No ns form found in src/hello_seymore/core.cljs
I'm stumped because I have the namespace and have followed everything according to the instructions.
what's in your core.cljs ?
@grounded_sage is the namespace of the file src/hello_seymore/core.cljs
-> (ns hello-seymore.core)
?
be sure that _
in files are -
in namespaces
hey guys, what do you guys use for navigation, ( I mean navigator replica for clojurescript ) ?
@dnolen history support and something like routing through different scene of a react native app
Am I getting it right that go block only runs once unless it is go-loop ?
@dnolen thanks man, that can me helpful for my first web app which I'm going to start using clojurescript
@dnolen so there is no alternative in clojurescript for navigator in om or reagent, right ?
weird: why is this working for all events https://github.com/YurySolovyov/eion/blob/master/src/eion/renderer/core.cljs#L28, but this https://github.com/YurySolovyov/eion/blob/master/src/eion/renderer/channels.cljs#L10 requires go-loop to continue read?
@lxsameer I think some people in the #cljsrn channel have mentioned this https://github.com/vikeri/re-navigate
@jorda0mega thanks buddy
Hey, good afternoon, brand new to clojurians
and clojurescript
. I am trying to port a regex from javascript
to cljs
/^((?:not\s+)?included)(?=\s?:)/gim”
which is meant to match all the included
and not included
in a multiline string like:
test
Included:
Not included:
test
for that I am using re-seq
hopping it would match js' g
qualifier but for some reason I get nil
on my repl using:
(def a “test\nIncluded:\nNot Included\ntest”)
(re-seq #"(?im)((?:not\\s+)?included)(?=\\s?:)" a)
@tomas.casas if you’re not doing something simple you will probably run into trouble
@tomas.casas I would go with this: (js/RegExp. "^((?:not\\s+)?included)(?=\\s?:” “gim”)
and then use that native regexp for matching
Yeah, I was thinking that as a last resource, wanted to be able to use cljs functions
perhaps I can break my problem in smaller pieces
is there an equivalent to the g
qualifier in cljs?
many cljs re-something functions accept native regexps (created by re-pattern under the hood)
@liamd here is how I do it: https://github.com/binaryage/cljs-oops#integrate-with-your-project
correct, https://github.com/binaryage/cljs-oops/blob/master/src/lib/oops/sdefs.cljs#L4
clojure.spec
will be aliased to cljs.spec
(assuming you are using latest clojurescript)
more info on aliasing: http://blog.fikesfarm.com/posts/2016-07-03-clojurescript-clojure-namespace-aliasing.html
it seems this is the only way to accomplish the same results as in js:
(def a
"test
not included:
included:
test")
(.match a (js/RegExp "^(?:not[ \\u00a0\\u2000\\u200a\\u202f\\u3000\\ufeff]+)?included(?=:)" "gim"))
cljs.user=> #js ["not included" "included"]
:thumbsup:
you could watch generated code, and tinker with the source string until you get the same result as you would write in js
can I see generated code in the cljs repl? where?
or do you mean the js generated in my project?
how, pls!
checking! thanks a lot!
can i use my om/next components as functions and just pass them props for testing or do they need to be all hooked up with a reconciler and all that?
is there a way from the repl to output which is current :output-dir
?
@tomas.casas from the REPL itself - not really
@tomas.casas you can call .toString on a function, this way you can quickly print generated cljs code for fns at hand
but be careful with escaping again, I wouldn’t trust it 100%, because repl could print it in some fancy way
nice!
it was reading leiningen profiles to be able to hack this project’s profile.clj
thanks!!!
I am running ATOM proto repl (Ctrl+Alt+ , j) to get a cljs env, since lein repl
runs a clojure environment (used for integration tests)
not sure what triggers the switch, think profiles.clj should give me some answers, though I still need to get familiar with its structure/contents
again, thanks!
@darwin one thing I found is that cljs does not support g
flag
https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L9110
the flags I see there are the ones java
supports not js
(ie: idmsux
vs gimuy
)