Re: ClojureScript Compile errors

2011-08-29 Thread David Nolen
On Wed, Aug 10, 2011 at 7:39 AM, Rich Hickey wrote: > :use … :only doesn't have the problems of full :use. > > Enhancement ticket and patch for :use … :only welcome. Note it must support > :use … :only only, i.e. :only is required. > > Rich http://dev.clojure.org/jira/browse/CLJS-65. Hopefully

Re: ClojureScript Compile errors

2011-08-10 Thread Rich Hickey
:use … :only doesn't have the problems of full :use. Enhancement ticket and patch for :use … :only welcome. Note it must support :use … :only only, i.e. :only is required. Rich On Aug 9, 2011, at 10:01 AM, David Nolen wrote: > On Sat, Aug 6, 2011 at 5:30 PM, Rich Hickey wrote: > In Clojure, n

Re: ClojureScript Compile errors

2011-08-09 Thread Chas Emerick
On Aug 9, 2011, at 10:01 AM, David Nolen wrote: > On Sat, Aug 6, 2011 at 5:30 PM, Rich Hickey wrote: > Why all the attention to :use - I thought everyone agreed using it is a bad > idea? > > I like pairing :use with :only especially between files that belong to the > same library. Agreed. Be

Re: ClojureScript Compile errors

2011-08-09 Thread David Nolen
On Sat, Aug 6, 2011 at 5:30 PM, Rich Hickey wrote: > In Clojure, namespaces are different from the host's packages, in > ClojureScript they are the same (insofar as they match the Google Closure > approach). > Makes sense. > Why all the attention to :use - I thought everyone agreed using it is

Re: ClojureScript Compile errors

2011-08-06 Thread pmbauer
> > Why all the attention to :use - I thought everyone agreed using it is > a bad idea? > Really? I thought it's use was only considered bad form in the absence of :only > The only benefit I see is that you can avoid a (minimum 2 > character) prefix. > I would think the obvious benefit is i

Re: ClojureScript Compile errors

2011-08-06 Thread Ken Wesson
On Sat, Aug 6, 2011 at 6:42 PM, Mark Engelberg wrote: > On Sat, Aug 6, 2011 at 2:30 PM, Rich Hickey wrote: >> Why all the attention to :use - I thought everyone agreed using it is a bad >> idea? > ... >> The only benefit >> I see is that you can avoid a (minimum 2 character) prefix. > > The othe

Re: ClojureScript Compile errors

2011-08-06 Thread Mark Engelberg
On Sat, Aug 6, 2011 at 2:30 PM, Rich Hickey wrote: > Why all the attention to :use - I thought everyone agreed using it is a bad > idea? ... > The only benefit > I see is that you can avoid a (minimum 2 character) prefix. The other benefit is it saves you from the cognitive load of having to kno

Re: ClojureScript Compile errors

2011-08-06 Thread Rich Hickey
In Clojure, namespaces are different from the host's packages, in ClojureScript they are the same (insofar as they match the Google Closure approach). Why all the attention to :use - I thought everyone agreed using it is a bad idea? In any case, ClojureScript is a subset and right now tha

Re: ClojureScript Compile errors

2011-08-05 Thread pmbauer
In Clojure, there is a clear distinction between using Clojure namespaces and importing interop packages. Is it a goal then to blur that line in ClojureScript? 'use' couldn't be used analogously just for ClojureScript names as it is in Clojure? On Friday, August 5, 2011 5:14:36 PM UTC-7, Rich

Re: ClojureScript Compile errors

2011-08-05 Thread Rich Hickey
On Aug 5, 2011, at 3:06 PM, David Nolen wrote: On Fri, Aug 5, 2011 at 2:51 PM, Fogus wrote: The following lines looks problematic: (ns mainpage (:use lib.dom-helpers)) That is, ClojureScript only supports the (ns foo (:require [a.b :as c])) form. Try changing your ns declaration ac

Re: ClojureScript Compile errors

2011-08-05 Thread pmbauer
You don't need 'use' in production? ;) *ducks* On Friday, August 5, 2011 12:06:29 PM UTC-7, David Nolen wrote: > > On Fri, Aug 5, 2011 at 2:51 PM, Fogus wrote: > >> The following lines looks problematic: >> >>(ns mainpage >>(:use lib.dom-helpers)) >> >> That is, ClojureScript only sup

Re: ClojureScript Compile errors

2011-08-05 Thread David Nolen
On Fri, Aug 5, 2011 at 2:51 PM, Fogus wrote: > The following lines looks problematic: > >(ns mainpage >(:use lib.dom-helpers)) > > That is, ClojureScript only supports the (ns foo (:require [a.b :as > c])) form. Try changing your ns declaration accordingly. > > The error message coul

Re: ClojureScript Compile errors

2011-08-05 Thread Fogus
The following lines looks problematic: (ns mainpage (:use lib.dom-helpers)) That is, ClojureScript only supports the (ns foo (:require [a.b :as c])) form. Try changing your ns declaration accordingly. The error message could be slightly better I agree. ;-) :F -- You received thi

Re: ClojureScript Compile errors

2011-08-05 Thread Timothy Baldridge
> Would it be possible to look at you project source? Sure this is all the source I currently have written: ;:mode=clojure: (ns lib.dom-helpers (:require [goog.dom :as dom] [goog.dom.classes :as classes])) (defn find-node [search] (if (keyword? search)

Re: ClojureScript Compile errors

2011-08-05 Thread Fogus
> how do I deal with ClojureScript compile errors? For > instance: Would it be possible to look at you project source? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note

ClojureScript Compile errors

2011-08-04 Thread Timothy Baldridge
So I used to think the stacktraces from Clojure were a bit cryptichow do I deal with ClojureScript compile errors? For instance: bin/cljsc ~/projects/WebSite/src/WebSite/CLJS > ~/test.js Exception in thread "main" java.lang.UnsupportedOperationException: nth not supported on this