Clojurians
#cljs-dev
<
2017-06-26
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

ewen07:06:15

@dnolen there is an issue with my patch from CLJS-1886 (already merged), here https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/core.cljs#L5559, it should be (implements? APersistentVector v), otherwise the iterator optimization for subvecs is never used

dnolen12:06:53

@ewen fixed

darwin14:06:54

not sure if this is relevant, I was just compiling dirac tests against pretty recent master version (from last week) and noticed new warnings (not present in 1.9.562: https://gist.github.com/darwin/936829b27b73a91aa4dec0e9286671b8

darwin14:06:29

looks like code generated by (compiling) specter library is newly problematic

dnolen14:06:34

@darwin those are Closure warnings

darwin14:06:17

yes, I know, just wanted to mention it, going back to 1.9.562 does not produce them

dnolen14:06:30

yes understood - but we bump Closure Compiler

darwin14:06:41

aha, so that might be it

dnolen14:06:21

@darwin and in this case it seems you could just set :language-in to suppress

darwin14:06:37

ok, thanks

dnolen14:06:46

and perhaps file an issue to with specter to not do whatever it’s doing

darwin14:06:51

I will probably wait for specter to update if this will be common problem

darwin14:06:41

or maybe there are more places where they could produce such code: https://github.com/nathanmarz/specter/blob/cfb191e1cd4be66b09d8e4f671a4890372a32cef/src/clj/com/rpl/specter/impl.cljc#L688-L698 don’t have time to further investigate it

dnolen14:06:09

@darwin no idea, but we don’t see these warnings when we run our tests

dnolen14:06:16

which involve defrecord

bronsa14:06:59

using var as a field name is not a very good idea in clojure either

darwin14:06:01

I will try to add defrecord with var field into cljs test suite to confirm

dnolen14:06:23

@darwin there’s no need I can tell you :slightly_smiling_face:

dnolen14:06:35

we don’t munge record field names for JS reserved keywords

dnolen14:06:59

there’s already a minor ticket open for this issue which mentions naming a field default

darwin14:06:34

my conclusion: it is nice that Closure Compiler now reports warnings

darwin14:06:38

to let people know

dnolen14:06:56

I’m probably going to close the ticket because I’m starting to believe the expectation is not reasonable

dnolen14:06:16

A) we cannot munge the field name because then you can’t access it

dnolen14:06:36

B) (.-default foo) cannot become (.-default$ foo) w/o breaking interop in general

darwin14:06:22

well, I could imagine that generating [“default”] for accessing them would fix the warning and didn’t break anything

bronsa14:06:40

dnolen: can you not if you apply the same munging on accessors?

dnolen14:06:43

or setting :language-in

darwin14:06:47

also closure compiler pass will rewrite them back to .default if they are not reserved or don’t contain wild chars

dnolen14:06:52

I don’t see why we have to do anything at all

bronsa14:06:09

that is what clojure does IIRC, by munging e.g. - in deftype records to _

tmulvaney14:06:03

the access is done via a case statement in CLJS at so it should be possible

dnolen14:06:44

@bronsa the issue is interop w/ external JS stuff

dnolen17:06:51

unless I hear some complaints will probably release ClojureScript late this afternoon

mfikes18:06:07

I have a post ready to go covering the new :protocol-impl-recur-with-target warning. (Thinking it might help reduce confusion for those who encounter it.)

anmonteiro18:06:25

@dnolen @mfikes I wonder if it would be valuable for the ClojureScript website to have its own blog where we’d post release announcements & cover these new features / changes

anmonteiro18:06:10

I could probably dedicate some time to writing a post from time to time

mfikes18:06:45

I suppose David’s release email has been acting like a changelog. But, yeah, this release has lots of good stuff warranting coverage. :slightly_smiling_face:

mfikes18:06:42

@anmonteiro Are you thinking of maybe something like http://elm-lang.org/blog ?

anmonteiro18:06:25

yeah, most Facebook OSS projects also have a blog, e.g. React, React Native, Flow, Jest

mfikes18:06:00

I bet the community would find that kind of stuff useful. I’d be willing to write for such a thing as well.

anmonteiro18:06:25

I find that a lot of people read my blog (probably yours too, but I don’t have those metrics) whenever we post about ClojureScript

dnolen18:06:33

@alexmiller thoughts? Clojure doesn’t really have it’s own blog outside of the Cognitect one

anmonteiro18:06:48

I’m just advocating for an official “source of truth” :slightly_smiling_face:

dnolen18:06:06

I agree that it would be nice to tweet something which isn’t a link to Google Groups

mfikes18:06:12

Yes, my blog and António’s are nice adjuncts. But “non-normative,” “non-official”. :slightly_smiling_face:

alexmiller18:06:28

I’ve taken to copying any news-ish stuff over to the clojure site

mfikes18:06:38

Every time I see a big new feature being added, I feel compelled to write about it :slightly_smiling_face:

alexmiller18:06:54

same could be done for cljs

dnolen18:06:01

I OK with that

alexmiller18:06:07

I’d be happy to do the magic later today if wanted

alexmiller18:06:13

anyone could PR an addition to that

anmonteiro18:06:22

sounds great :+1:

dnolen18:06:37

@alexmiller you mean add a new tab right?

alexmiller18:06:44

I have also been putting changlog release stuff at https://clojure.org/community/devchangelog

dnolen18:06:01

also a good idea

alexmiller18:06:04

@dnolen well, could be put in a couple places

dnolen18:06:26

@alexmiller I just mean only you have the power to add the news tab we need right?

alexmiller18:06:37

could be top nav

dnolen18:06:48

yes I think it should be

alexmiller18:06:58

I can just replicate what’s on clojure site

alexmiller18:06:28

we reduced top nav menu items on cljs site as the left image is longer (due to “Script”)

alexmiller18:06:45

but seems like there is room

mfikes18:06:08

Here is the content of the post I have queued. I could see perhaps smaller versions, lacking typical post images, and perhaps using a less personal tone, on an official ClojureScript blog, where such posts delve into new features as contributors find time to write such posts. https://gist.github.com/mfikes/41cc3911e8f2c15ec005df7ed256ec33

dnolen18:06:41

@mfikes I think for releases probably the thing to call out is the big story if there is one

mfikes18:06:03

^:const is high on my list

dnolen18:06:18

in this case I would say compile/runtime performance and cache safe spec are probably the things worth talking about

mfikes18:06:28

But you are saying this release has a theme of lots of perf and fixes

dnolen18:06:51

yes - posts should emphasize reasons to adopt :slightly_smiling_face:

dnolen18:06:09

^:const subtleties and recur alignment is interesting but probably a bit too esoteric for most users

dnolen18:06:17

much easier to say “Look it, it’s FAST”

mfikes18:06:57

Exactly. The length of the post I’ve drafted above goes into too much detail for a general official ClojureScript blog.

dnolen18:06:44

yeah. I am excited about outside contribution for the news tab, would be nice.

dnolen18:06:27

@anmonteiro @mfikes if either of you feel like drafting something for the release be my guest :slightly_smiling_face:

mfikes18:06:55

I may have some time in an hour or so

mfikes18:06:01

Is that set up for PRs? (Otherwise I’ll just draft up a few paragraphs about the upcoming release for review.)

mfikes18:06:31

Thanks Alex!

alexmiller18:06:43

@anmonteiro this is kind of a weird artifact of how the templates are set up. the news index page shows the content of the most recent post but the author of the index page itself

alexmiller18:06:02

I remember messing with this on the clojure site too, let me see if I can fix

anmonteiro18:06:32

not a big deal, but I thought I’d mention anyway

mfikes19:06:53

Drafting a post for the news site now; will submit a PR an a bit.

alexmiller19:06:26

@anmonteiro should be fixed in a few minutes

shaunlebron19:06:57

will news contain release posts, like those on the mailing list?

shaunlebron19:06:03

i asked @alexmiller earlier if it would make sense to show release posts like this: http://cljs.github.io/news

rauh19:06:58

@mfikes Here is a few concrete stuff that I think can be interesting/useful to users:

- sort, shuffle is now 30-40% faster (thanks to to-array optimization)
- apply is 200-400% faster
- You can use js/Promise and many more ES featurs and have GCC generate polyfills (new :rewrite-polyfills option)
- defmulti is now much faster in case of a "miss" (200-1000%)
- set and map equivalence is 100-200% faster
- reduce on sets and maps is now ~100% faster

New:
- new language options ES-2017, ES-next

anmonteiro19:06:22

^ this is so good, I know all the fixes by looking at it but couldn’t have remembered all of them together

rauh19:06:09

Come to think of it, sort & shuffle should probably use into-array which uses reduce.

mfikes19:06:43

I need to run. You may need to pull the changes and edit them after the pull.

rauh20:06:15

Feel free to just edit away, I'm logging off for the day...

dnolen20:06:57

@shaunlebron I think it’s probably simpler to just copy and paste w/ minor edits whatever @mfikes comes up with for the release post

dnolen20:06:04

(to mailing lists)

mfikes20:06:10

I'm AFK at the moment but will incorporate the Rauh list when I get back

roman01la20:06:17

afaik a lot of people are reading news letters these days, do we need one exclusively for ClojureScript?

shaunlebron20:06:49

loving the movement on news here :+1: site definitely needs something for it

shaunlebron20:06:02

@roman01la but not having news on an official site seems weird yeah?

roman01la20:06:55

@shaunlebron having a blog is great, newsletter could be a nice addition to that

roman01la21:06:24

It could have links to other blog posts on the web as well as learning materials references and promos for trainings or something

roman01la21:06:59

That's basically React's newsletter

roman01la21:06:45

@shaunlebron I'm not saying cljs should not have a blog :)

shaunlebron21:06:21

so a newsletter would just be a blog that covers community activity rather than only compiler development?

shaunlebron21:06:23

I would like to see that too :+1:

roman01la21:06:01

I think I could take care of this, I'm reading all those resources every week anyway. Could just put them together

anmonteiro21:06:02

a newsletter sounds like something that the community should do to me

dnolen21:06:45

yes newsletter is an interesting idea but I don’t think we need to be directly involved

roman01la21:06:49

All I'm saying is that it would probably have more reach if people know its kind of "official" newsletter

shaunlebron21:06:54

that seems to fit the purpose of the site, if it was updated as a separate newsletter page

shaunlebron21:06:40

or news vs community news

mfikes21:06:19

@dnolen I’ve squashed revisions onto the PR, including the Rauh list

dnolen21:06:48

cool thanks will check it out

dnolen23:06:51

@mfikes might not be able to review until later, so looking more like a morning release at this point

anmonteiro23:06:22

@dnolen docstring ticket adding fn-invoke-direct to cljs.js‘s API https://dev.clojure.org/jira/browse/CLJS-2130