This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-09
Channels
- # beginners (22)
- # boot (80)
- # cider (6)
- # cljs-dev (5)
- # clojure (190)
- # clojure-berlin (5)
- # clojure-dev (24)
- # clojure-italy (14)
- # clojure-russia (70)
- # clojure-spec (39)
- # clojure-uk (82)
- # clojurescript (121)
- # clojurewest (1)
- # core-logic (2)
- # cursive (25)
- # datascript (186)
- # datomic (33)
- # dirac (266)
- # emacs (9)
- # gsoc (4)
- # hoplon (37)
- # immutant (34)
- # instaparse (22)
- # jobs (4)
- # juxt (6)
- # lambdaisland (2)
- # leiningen (1)
- # liberator (1)
- # luminus (5)
- # lumo (28)
- # off-topic (9)
- # om (23)
- # onyx (26)
- # other-lisps (1)
- # parinfer (39)
- # pedestal (45)
- # proton (1)
- # protorepl (10)
- # re-frame (18)
- # reagent (4)
- # ring-swagger (8)
- # rum (4)
- # specter (13)
- # test-check (14)
- # testing (1)
- # unrepl (164)
- # untangled (10)
- # yada (14)
https://github.com/binaryage/cljs-oops is probably one of the mostunderrated libs of all time
pre https://github.com/binaryage/cljs-oops I keep 6 emacs windows open {boot client, boot server, gae} * {dev, prod} so that after hcekcin things work in dev :optimizations :none, I look over at prod :optimizations :advanced
but now, there's no longer need to keep prod open with ocall/oget/oset!, so I can kill the prods most of the time
Probably your using a function from maybe a library which expects a keyword to get something from a map?
hi all , has anyone experianced this error or know what it indicates when using sente DEBUG [taoensso.sente:208] - Bad package: , then it outputs the map that i was trying to send , it seems like its an issue with the size of the data but im not sure
closest i found was this , http://ptaoussanis.github.io/sente/taoensso.sente.html , but it doesnt explain what it means
@urbanslug I see that in cljc files. Just put one form under :clj
or :cljs
or wrap it in a do
ok so the actual exception seems to be "Reader tag must be a symbol" , though that doesnt seem to explain much more
If I add a depend like [cljsjs/moment "2.10.6-4"]
in my project.clj is there anything special I need to make this work in my cljs code?
With a funtion like
(defn format-date
[date]
#?(:cljs (if (or (js/isNaN (new js/Date date))
(= (new js/Date date) "Invalid Date"))
date
(-> date js/moment (.format "ll")))))
@urbanslug it might work from other namespaces that don't require it, it just depends on if it was required from another ns "before" the ns in question (think about the compiled js)
with lumo (or anything else) is it possible to run *.cljs files as shell scripts under node.js?
(main concern is somehow firing up the compiler, compiling the cljs and running it) --- or straight up interpreting the cljs file
@qqq yes it is already possible
@richiardiandrea : awesome ; what do I need to install to make this happen?
Lumo for Node.js 😀 or Planck, one sec I am fetching some samples from our meetup
In the repo you will find other examples of how we were playing around with it 😀
Yes, you can just, for example do lumo foo.cljs
and it will run it. If you do lumo -h
you will see that it follows the same command-line argument patterns used in the regular Clojure REPL.
I notice, in the CLJS API, there's a "special form" called let*
. It doesn't have any documentation for it, though, and it doesn't seem to be in "normal" Clojure. What does it do?
@qqq this is what I did specifically for you a few days ago: https://github.com/binaryage/dirac-sample/blob/master/scripts/reveal.cljs
darwin: this is very good! I was wondering if it could be reused for figwheel/boot-reload as well. We should maintain it in a repo 😉
well, it is not general enough, it would need some kind of configuration for source folders and maybe other projects will have different structure not really working with this matching scheme
Ok fair, I will use it for sure, maintaining we'll see, too many things to maintain at the moment 😀
here I call it from a normal bash script: https://github.com/binaryage/dirac-sample/blob/master/scripts/reveal.sh
@darwin: which then led me to believ "either @darwin is an idiot; or somehow it's magically possible to run cljs files as shell scripts with no downtime; despite cljs itself being slow"
As one might imagine, it's difficult to search the internet for let*
.
For reference, here is let*
in the CLJS API: http://cljs.github.io/api/cljs.core/#letSTAR
And in the CLJ API, there is only let
: https://clojure.github.io/clojure/clojure.core-api.html#clojure.core/let
@tech_hutch I did a search for "clojure let star" and found this: https://groups.google.com/forum/#!topic/clojure/f8iovY57J4k
Okay, thanks. So I guess it's just a low-level compiler thing, then.
It would be nice if they mentioned this in the documentation.
(trying to install lumo) is "npm install -g" supposed to require root? (newcomer to node.js)
I think it just installs for your account, so it shouldn't.
If it errors out, you could try root.
or jump into another rabbit hole: https://github.com/creationix/nvm
@tech_hutch what made you look for let*
?
I just happened to see it in the API.
api docs?
^ Linked to from the ClojureScript website
i’ll add a note to it
@tech_hutch If you do (source let)
you can at least see how the let
macro is built atop the let*
special form.
Oh okay.
The repl at http://clojurescript.net/ doesn't seem to have source
. Maybe it was added after it was created.
@qqq if you’re on a Mac you can brew install lumo
or npm install -g lumo-cljs
otherwise
@darwin: just got lumo working -- it's amazing, every time I study dirac, I end up learning something new (besides the choice of lein vs boot and cursive vs emacs)
I also maintain downloadable binaries here https://github.com/anmonteiro/lumo/releases/tag/1.2.0
@anmonteiro : thanks; just got it working
I just tried (source let)
at http://clojurescript.io/ and it returned nil
. :thinking_face:
tech_hutch: just to clarify here, the project used to be well maintained but then I changed jobs and other people did the same, and unfortunately things are not keeping up with the fast pace of cljs development. It is a self-host repl that shares a lot of code with Planck and uses replumb, a library I (try to) maintain for creating self-host repls 😀
Okay, I understand. It's running really slowly for me, in Firefox, though. Is it supposed to be that slow? I'm running it on an average PC.
There's like a half-second delay for entering a character.
Yeah we found that firefox was kind of slow, definitely, but as I said, it is a pity that that after I changed jobs things were left as they were...the project is oss and I can still merge PRs, but I don't know if Jenkins still pushes the release version up, you can find it here: https://github.com/Lambda-X/cljs-repl-web
@tech_hutch that’s not an officially supported REPL
source
is a REPL special that different REPLs need to implement
the ClojureScript REPL that ships with the CLJS compiler will have source
I saw the source at http://cljs.github.io/api/cljs.core/let anyway.
@tech_hutch updated let*
docs 🙂 http://cljs.github.io/api/cljs.core/#letSTAR
@tech_hutch answering your question, let*
is an internal thing which is not meant to be used
it’s one of the special forms that the analyzer needs to parse separately
may need a refresh, but you can submit docs in the details page, click “edit here” at bottom
I saw, thanks. 🙂
just like def
, loop*
, ns
, etc
Oh, you can submit docs? That's nice.
I added this so I could get myself to start writing more docs: http://cljs.github.io/api/#progress
color-coded by documentation progress
we’ll get there
hey folks, what are y’all doing to automate browser testing? clj-webdriver is unmaintained 😞
@robert-stuttaford https://github.com/igrishaev/etaoin looks interesting
@robert-stuttaford I had to vendor clj-webdriver in dirac for latest selenium updates, feel free to grab my patches: https://github.com/binaryage/dirac/commits/master/test/src/webdriver/clj_webdriver
@nwjsmith nice find — what did you search for to find that?
thanks @darwin! given this, would you consider clj-webdriver to still be a viable foundation to base long-lived tests on?
I think it came up here on one of the channels and I starred it on GH, not sure actually.
@darwin do you know if the clj-webdriver you have can be used with http://browserstack.com?
cool, thx
@robert-stuttaford I'm working on my own Webdriver implementation: https://github.com/igrishaev/etaoin Today I released a new version. Here are autodoc pages: http://grishaev.me/etaoin/ There are also unit tests as example.
I found a large list on HN about small js libs/frameworks (https://news.ycombinator.com/item?id=13830148). A lot of them implement some kind of virtual DOM like React. I wonder if there are any attempts doing the same in plain cljs?
The only one I know of is https://github.com/brandonbloom/cljs-vdom
@tech_hutch you probably want cond
cond->
threads the first argument, so it actually becomes (let (count choices) [...])
Really? I thought it only threaded the conditions?
it doesn’t thread the conditions 🙂
so they’re also wrong
I mean, the logic is wrong, because (> 1)
will always return true
Oh, I see. Thanks.
I just wanted to avoid the repetition of (count choices)
.
I guess I'll put the whole thing in a let
.