Clojurians
#cljs-dev
<
2016-06-24
>

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

dnolen18:06:41

@mfikes so I’m working on auto-aliasing of clojure.* namespaces to cljs.*

dnolen18:06:57

this means people can write (:require clojure.spec) etc and it will ust work

dnolen18:06:22

this relies on some classpath things of course that I don’t have answer for wrt to bootstrap

mfikes18:06:26

That makes sense. (There is some precedent in other parts of CloujureScript for doing that sort of thing, I’ve noticed.)

dnolen18:06:28

not a huge deal since it’s mostly a convenience thing

dnolen18:06:46

but if you have any thoughts here happy to see patches to make the same thing work for bootstrapped

mfikes18:06:54

Ahh, so the bootstrapped load function may simply pass ’clojure.spec to the bootstrapped client, unless something else is done. Yeah, I think I see where you are going.

dnolen18:06:34

@mfikes: the problem is that currently the resolution bit is just simpler to do directly in the compiler and conditionalize it

dnolen18:06:43

but I don’t have answer for how it should work in bootstrapped

mfikes18:06:51

@dnolen: Cool. Looking forward to seeing what you produce for JVM ClojureScript as inspiration for ideas on how that might lead to stuff for bootstrapped.

bronsa18:06:53

@dnolen: namespaced-map support to tools.reader is almost ready, release should be by tomorrow. I'm using cljs.analyzer/*cljs-ns* to resolve namespaces for #::foo{}, is that ok?

dnolen18:06:08

@bronsa yes

dnolen18:06:11

and great!

bronsa18:06:45

gah, don't think I can use *cljs-ns* actually as that doesn't exist at runtime

bronsa18:06:31

might have to add a *ns* var to cljs tools.reader

bronsa18:06:54

nevermind, I brainfarted. cljs has a *ns* so that should be fine

bronsa18:06:16

@dnolen: *ns* seems to be nil in a cljs repl, is that a bug?

dnolen18:06:31

there’s no such thing as actual runtime *ns*

dnolen18:06:13

but I don’t see why you need this anyway

dnolen18:06:19

how is this different from ::foo

dnolen18:06:21

might be missing something

bronsa18:06:19

no it's the same as ::foo, they both use *ns*. I must've forgot that the cljs version of tools.reader needs users to bind it then

bronsa18:06:15

both cljs & bootstrapped cljs are going to work fine as they bind *ns* while reading AFAICT tho

dnolen18:06:13

ClojureScript analyzer binds *ns* when reading yes

dnolen18:06:54

and so does bootstrapped

bronsa18:06:12

that'll do fine then :+1:

mfikes18:06:40

Thanks @bronsa for zero-latency-turnaround on this :slightly_smiling_face: Woot!

alexmiller19:06:46

@bronsa yes, big thanks!!

bronsa19:06:21

the clj[s] version was surprisingly (? :)) simple compared to the java one

bronsa19:06:31

~20 lines + a helper function, maybe 35/40 in total

dnolen20:06:39

@bronsa: cool, are you cutting a release today?

bronsa20:06:16

just cut 1.0.0-beta3

bronsa20:06:10

I'll probably cut 1.0.0 next if no issues come up

mfikes22:06:18

@bronsa Found an issue in bootstrap. This works but with a warning. Will write up a ticket:

cljs.user=> #::{:foo 1}
null is not an object (evaluating 'ns_obj.name')
{:cljs.user/foo 1}

anmonteiro23:06:03

does this mean the end of :refer-macros?

mfikes23:06:11

@cfleming: A new thing to update Cursive for ^

dnolen23:06:27

@anmonteiro: yes if the macro ns and the runtime ns share the same name

dnolen23:06:34

we’ll sort it out for you

anmonteiro23:06:00

yeah, that requirement makes sense

anmonteiro23:06:11

awesome stuff!