[ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
In my advanced compile, I see lots of lines that look like this: return new qB(c,b,sB,new s(null,5,[T,66,V,102,Qe,3,Re,34,Se,"/path/to/cljs/file/core.cljs"],null))}; My only guess is that it has something to do with source maps, but my project.clj has zero mention of source maps anywhere. One

[ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread John
Hi everybody! I am trying to write an article about a topic I find interesting: embedded templates. Please, read and give me feedback, if you find the topic interesting. English is not my first language, and I would appreciate all help to make it clearer. Does it make sense? Or should I try

[ClojureScript] Re: Path names in :advanced compile

2015-02-03 Thread Thomas Heller
Can you look at the pre-optimized js sources and grep for that string? It might be a macro of a library. Hard to tell without knowing what that thing actually is. It looks like something var-ish (ie. :line, :column, :file, ...). Anyways look at the js files to see the full context, should make

Re: [ClojureScript] Minimal compiled size

2015-02-03 Thread David Nolen
ClojureScript is aimed at users who are already using jQuery and other helper libraries like Underscore.js. These two alone put your JS application around ~40K gzipped without having written a line of code yourself. ClojureScript applications start at around ~20K gzipped and go up from there. If

Re: [ClojureScript] Minimal compiled size

2015-02-03 Thread Kyle Cordes
On Tuesday, February 3, 2015 at 6:45 AM, David Nolen wrote: > ClojureScript is aimed at users who are already using jQuery and other helper > libraries like Underscore.js. These two alone put your JS application around > ~40K gzipped without having written a line > By the way, there is somethi

Re: [ClojureScript] Minimal compiled size

2015-02-03 Thread David Nolen
On Tue, Feb 3, 2015 at 8:34 AM, Kyle Cordes wrote: > On Tuesday, February 3, 2015 at 6:45 AM, David Nolen wrote: > > ClojureScript is aimed at users who are already using jQuery and other > helper libraries like Underscore.js. These two alone put your JS > application around ~40K gzipped without

[ClojureScript] Path names in :advanced compile

2015-02-03 Thread Mike Fikes
Try the :pseudo-names compiler option to see what the :advanced code is referring to (https://github.com/clojure/clojurescript/wiki/Compiler-Options#pseudo-names). -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because

Re: [ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread Marc Fawzi
Hi John, Thank you for sharing your work in progress. Tomorrow I'll dedicate a couple hours to go over this, and I'll review it as a brand new user of CLJS/Reagent/React, and at least give you feedback about clarity. I don't think we'll be using JSX but I'm very open minded to see what you've wo

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Grepping over the files created by a :none optimization reveals the path in places like this: cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null,"end-column","end-column",1425389514),55,new cljs.core.Keyword(null,"end-line","end-line",1837326455),101,new cljs.core.Keyword(null,"colu

Re: [ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread Johan Berling
Hi Marc! Don't expect it to be a good introduction to Reagent. By the way, I think your choice is a wise one. Reagent is really nice to work with. On Tue, Feb 3, 2015 at 4:33 PM, Marc Fawzi wrote: > Hi John, > > Thank you for sharing your work in progress. > > Tomorrow I'll dedicate a couple

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
Looks like metadata leakage. Need a minimal example though. Thanks, David On Tue, Feb 3, 2015 at 10:57 AM, Andrew S wrote: > Grepping over the files created by a :none optimization reveals the > path in places like this: > > cljs.core.PersistentArrayMap(null, 5, [new > cljs.core.Keyword(null,"e

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
I can try to produce an example if I know where to start. There is nowhere in my app that I am specifying a path to a file, so I'm not sure where this is happening. On Tue, Feb 3, 2015 at 5:37 PM, David Nolen wrote: > Looks like metadata leakage. Need a minimal example though. > > Thanks, > David

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
The problem is metadata leakage. This has nothing to do with specifying paths in your code. Somewhere you are writing map literals (perhaps in a macro?) and compiler metadata is leaking. David On Tue, Feb 3, 2015 at 11:38 AM, Andrew S wrote: > I can try to produce an example if I know where to

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Ok, can you clarify the type of map literal that would do this? I have not written any of my own macros on this app, but perhaps a library I depend on has them. By map literal, do you just mean a {:foo :bar} type of syntax, or something else? I also have not added any metadata myself to anything in

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
Yes {:foo :bar} David On Tue, Feb 3, 2015 at 12:35 PM, Andrew S wrote: > Ok, can you clarify the type of map literal that would do this? I have > not written any of my own macros on this app, but perhaps a library I > depend on has them. By map literal, do you just mean a {:foo :bar} > type of

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Ok, I'm sorry if I'm missing the train of thought on this, but how does any ordinary clojure(script) map lead to what you call metadata leakage that contains paths to files? Of course I use maps all over the place (doesn't everyone?), but I don't see how this connects to the problem I'm having. On

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
You have as much of an idea why this happening as I do. Which is zero :) Without a minimal reproducer there is nothing for anyone to do. You need to sort yourself what line of your ClojureScript or your ClojureScript dependencies is generating these maps. Then maybe someone can offer a solution

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Francis Avila
Andrew, the metadata you are seeing is added by the CLJS compiler to the Clojure objects it creates as it is reading CLJS code. You did not add it explicitly in your code anywhere, and we're not saying you did. The problem here is that the metadata did not *stay* in Clojure but got emitted into

Re: [ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread Marc Fawzi
At last SF CLJS meetup Sean Grove mentioned to me a framework called Kioo https://github.com/ckirkendall/kioo which is for Om which introduces another kind templates In our team, we create the HTML markup and assign CSS classes the designers make visual mock ups, so "templating" is not necessary t

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Thanks, this helps, I'll try to track it down. I've made some slight progress in that a closer inspection of the grep results shows that the only JS files where these paths are showing up are files in which I define Om components, all my other JS files unrelated to Om do not show these paths. I'll

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Ok, I managed to create an easy reproduction of this. The problem goes away when I roll back my version of clojurescript. I have a simple lein template I use for various things. Its dependencies are listed here: https://github.com/hellofunk/hellofunk-lein-template/blob/master/resources/leiningen/

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
Have you tested against 0.0-2760? David On Tue, Feb 3, 2015 at 1:58 PM, Andrew S wrote: > Ok, I managed to create an easy reproduction of this. The problem goes > away when I roll back my version of clojurescript. > > I have a simple lein template I use for various things. Its > dependencies ar

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Yes. 2760 issue remains. On Tue, Feb 3, 2015 at 8:02 PM, David Nolen wrote: > Have you tested against 0.0-2760? > > David > > On Tue, Feb 3, 2015 at 1:58 PM, Andrew S > wrote: >> >> Ok, I managed to create an easy reproduction of this. The problem goes >> away when I roll back my version of cloj

Re: [ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread Mike Haney
FYI, Kioo works with Reagent as well. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from i

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
Ok will take a look with your template and see what I can see. Thanks, David On Tue, Feb 3, 2015 at 2:10 PM, Andrew S wrote: > Yes. 2760 issue remains. > > On Tue, Feb 3, 2015 at 8:02 PM, David Nolen > wrote: > > Have you tested against 0.0-2760? > > > > David > > > > On Tue, Feb 3, 2015 at 1:

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread David Nolen
Here's the issue for tracking purposes http://dev.clojure.org/jira/browse/CLJS-1001 David On Tue, Feb 3, 2015 at 2:10 PM, Andrew S wrote: > Yes. 2760 issue remains. > > On Tue, Feb 3, 2015 at 8:02 PM, David Nolen > wrote: > > Have you tested against 0.0-2760? > > > > David > > > > On Tue, Feb

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Andrew S
Thanks David. On Tue, Feb 3, 2015 at 8:25 PM, David Nolen wrote: > Here's the issue for tracking purposes > http://dev.clojure.org/jira/browse/CLJS-1001 > > David > > On Tue, Feb 3, 2015 at 2:10 PM, Andrew S > wrote: >> >> Yes. 2760 issue remains. >> >> On Tue, Feb 3, 2015 at 8:02 PM, David Nole

Re: [ClojureScript] analysing advanced build output size

2015-02-03 Thread stephanos
Just a quick follow up: I wrote a small Node script to analyse the contribution of each source file that goes into the final artifact. It works by reading the source map and simply counts each character, attributing it to the original source file. Here is a sample output: source

Re: [ClojureScript] Feedback on an article I am trying to write (React JSX, Reagent)

2015-02-03 Thread Marc Fawzi
Some semantic confusion on my part. Sorry. I use the word "template" to refer strictly to out-of-language templates like HTML markup prototypes that can be cloned, augmented and populated based on data, or the old string substitution and innerHTML type templates. I have not yet started referring t

[ClojureScript] muting specific warnings with the cljs compiler

2015-02-03 Thread Chris Zheng
I'm trying to figure out how to best deal with an issue on the newer versions of the class compiler: https://github.com/purnam/purnam/issues/8 I've reproduced the issue causing the warning in this particular piece of code (ns compiler.issue-1 (:require [purnam.test]) (:use-macros [purnam.co

Re: [ClojureScript] Path names in :advanced compile

2015-02-03 Thread Immo Heikkinen
Seems to be related to reify. I updated the issue with minimal repro example: (defprotocol Foo (foo [_])) (defn new-foo [] (reify Foo (foo [_]))) (new-foo) 2015-02-03 21:35 GMT+02:00 Andrew S : > Thanks David. > > On Tue, Feb 3, 2015 at 8:25 PM, David Nolen > wrote: > > Here's the issue for