Fork me on GitHub
#clojurescript
<
2018-11-21
>
jumpnbrownweasel00:11:59

I just finished reading the doc on misuse of aget/aset for js objects and then stumbled on an example showing the wrong use of aget: http://cljs.github.io/api/cljs.core/DOT

You can get the value at property "foo" with any of the following:

(. o -foo)
;;=> "bar"

(.-foo o)
;;=> "bar"

(aget o "foo")
;;=> "bar"
I assume that last example is a doc bug from the past.

mfikes00:11:39

@mark540 you could file an issue against that repo

jumpnbrownweasel01:11:42

@mfikes OK, I created CLJS-2985.

mfikes01:11:05

@mark540 Thanks. That JIRA is actually for the ClojureScript compiler. That site is an unofficial doc site on ClojureScript which presumably has a GitHub issues tracker.

jumpnbrownweasel01:11:49

That's where the github links on the doc site take me.

jumpnbrownweasel01:11:39

That site seems to be the official site for clojure doc, since it is linked to here: https://clojurescript.org/reference/documentation

jaawerth02:11:24

there's a doc that talks about the misuse of aget/aset?

jaawerth02:11:10

ahh, thanks

jaawerth02:11:41

I figured that was the rationale but I don't think I'd read it anywhere official before

mfikes02:11:35

@mark540 I can’t figure out where the source is, but it appears to be here https://github.com/cljs/cljs.github.io/blob/master/api/cljs.core/DOT.html#L63

jumpnbrownweasel02:11:57

Hmm, that source doesn't have the example I mentioned. Anyway, I could try filing a jira there.

jumpnbrownweasel02:11:40

Oops, I see it now.

jumpnbrownweasel03:11:31

But like you said, that doesn't appear to be the source project and there are no issues filed there.

idiomancy03:11:42

So... I'm having trouble understanding the distinction and connection between boot and clj cli/`deps.edn` ... is the clj cli boot? are they one in the same? did the cli grow out of boot? did certain conventions come over from boot (like .cljs.edn files) intentionally or are they just kind of artifacts from libraries that used to use boot?

richiardiandrea04:11:09

Boot is a more comprehensive and fully fledged build tool, with which you will be able to build, compile ClojureScript, deploy, start a repl. Clojure CLI at the moment is basically a runner for Clojure code, with a limited amount of ecosystem around it cause younger

Alex Miller (Clojure team)03:11:47

They are different and unrelated

Alex Miller (Clojure team)03:11:35

Many Clojure tools use .edn files for config

idiomancy04:11:38

gotcha. figured that was a dumb question 😅 . Thanks!

Jakub Holý (HolyJak)13:11:24

Hi, 1) is there no equivalent of clojure.repl/source in cljs? 2) I see that the tooltip for filter at http://cljs.info/cheatsheet/ is wrong (is same as for keep) - how to report / fix? (The docstring in the code is correct - https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L5103) 3) The whole http://clojuredocs.org/ is down (502) but I guess that is a known issue 🙂 Thank you!

Jakub Holý (HolyJak)14:11:38

Thanks! So perhaps it is only a Planck {or my} issue that cljs.repl cannot be required

eval202014:11:48

in planck it seems you need the planck.repl ns: http://planck-repl.org/repl.html

❤️ 4
mseddon15:11:19

I'm seeing an order of magnitude overhead for variadic functions, is this expected?

4
mseddon15:11:01

[org.clojure/clojurescript "1.10.312"]

mseddon15:11:28

this is without :optimizations :advanced, let me just double check that doesn't go away...

mseddon15:11:15

yeah, closure compiler optimizes it away. still- worth watching out for. (now everything takes ~30ms, which is interesting..)

mseddon16:11:04

phew. protocols cost the same too with :advanced. Okay, I can relax again 🙂

dnolen16:11:45

@mseddon :advanced is less important than :static-fns

dnolen16:11:23

generally you don't set :static-fns during dev though because you could get into a funny place at the REPL

mseddon16:11:24

aha, right, thanks

mseddon16:11:07

I hadn't realised :static-fns was a thing, so that probably explains the mess I am in

dnolen16:11:20

Closure doesn't do that much with fn optimization - it really is the ClojureScript knobs that make that faster

dnolen16:11:31

but again we don't enable that by default because you might redefine a fn

mseddon16:11:27

That's fair enough, I'd rather a REPL that works 😉

richiardiandrea20:11:48

is anyone using the dotenv library with :npm-deps by any chance?

richiardiandrea20:11:08

I cannot make it work for the life of me