Fork me on GitHub
#clojure-dev
<
2018-11-12
>
gfredericks00:11:23

Ooh I found a good mystery https://github.com/clojure/clojure/blob/a1722cf9a15d917ee78a117732cf5c5e01fe3557/src/clj/clojure/core.clj#L6743 Why doesn't this line have the effect it looks like it has?

andy.fingerhut00:11:58

To me, the effect that it looks like it has is to add a :doc key to the metadata of namespace clojure.core. Are you saying it does not have that effect?

andy.fingerhut00:11:29

Because in a Clojure 1.9.0 repl, I see that string value for the :doc key of (meta (the-ns 'clojure.core))

gfredericks00:11:19

hmm okay I see that too so now the question is what's wrong with this other repl I guess

gfredericks00:11:56

wow I definitely had a repl that started off with the other docstring, and now I can't reproduce that state

gfredericks01:11:00

I was definitely messing around with require and stuff, but I can't think of how that might have happened

gfredericks01:11:40

but anyhow I hope we can all agree that it's pretty weird that clojure.core's docstring appears on line 6743

alexmiller01:11:01

Bootstrapping ns is weird

alexmiller01:11:26

There was an old bug that broke ns meta in aot

alexmiller01:11:42

But that was fixed several releases ago

alexmiller01:11:51

The really weird thing is that the ns line at the beginning of core works at all (before we’ve defined ns or defmacro or ... anything)

1
arrdem04:11:09

bootstrapping ns is extremely strange and begs lots of questions about the what belongs where

gfredericks12:11:11

RT's static section has the weirdest stuff in it

gfredericks12:11:51

it doesn't do a whole lot; one of the things it does is set metadata on #'*agent*

gfredericks12:11:58

final static IFn bootNamespace = new AFn(){
	public Object invoke(Object __form, Object __env,Object arg1) {
		Symbol nsname = (Symbol) arg1;
		Namespace ns = Namespace.findOrCreate(nsname);
		CURRENT_NS.set(ns);
		return ns;
	}
};

gfredericks12:11:25

the docstring at the top of core.clj is given as metadata on the symbol rather than the normal way, which is why this IFn only needs three args

gfredericks12:11:31

and it clearly ignores the metadata on the symbol

gfredericks12:11:40

so clojure.core should have no docstring before line 6743

schmee16:11:52

I want to work on a solution for https://dev.clojure.org/jira/browse/CLJ-440, but before I delve too deep I would like to understand the core team’s position a bit more

schmee17:11:14

my understanding is that the the objections so far have been more about the proposed solutions rather than the validity of the problem itself?

schmee17:11:15

is there still interest for a patch to this, if that patch addresses all the concerns already mentioned in the issue?

alexmiller17:11:07

Cleaner Java interop around varargs would be great, imo

alexmiller17:11:00

if we can find a path that feels like idiomatic Clojure and does not leave ambiguity around the various cases

mario-star 1
schmee17:11:21

nice, then I will have at it! 🙂

alexmiller17:11:55

methodical and exhaustive analysis appreciated :)

cfleming21:11:57

@schmee I would love you forever if you got a nice solution to that 🙂

👍 2