Re: Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-03 Thread Laurent PETIT
2011/8/4 Devin Walters > > On Aug 3, 2011, at 7:32 PM, Base wrote: > > I hope not, because I would *love* that! > > > +1 for the sake of the community. > > AFAIK Google Closure operates under the Apache License 2.0. I am not > personally aware of any conflicts that would arise from the dependenci

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread Sean Corfield
On Wed, Aug 3, 2011 at 12:48 PM, octopusgrabbus wrote: > Thanks, and I'm searching as to how to get cvs commit to write this > into the module. If you know that, it would be so helpful. > The consensus seems to be: don't do that. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http:/

Re: Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-03 Thread Laurent PETIT
Thx for the encouragements. I was not necessarily thinking I would be the person to do this zip packaging, tho ;-) Especially since (hope no thiefs read this ml) I'm going on holidays this evening. Cheers, -- Laurent 2011/8/4 Devin Walters > > On Aug 3, 2011, at 7:32 PM, Base wrote: > > I h

Re: Trying to understand performance of two simple functions

2011-08-03 Thread yair
No you didn't misinterpret it, I thought that would have been the cause. I ran a test and I think the de-structuring might have something to do with it. Here's the test: (defn count-slow [[x & xs] acc] (if (empty? xs) (inc acc) (recur xs (inc acc (defn count-fast [xs acc] (if (empty? (r

Re: better community docs: getting started

2011-08-03 Thread Devin Walters
On Jul 29, 2011, at 7:30 PM, Stefan Kamphausen wrote: > inc > > IMHO there are three types of people coming to Clojure > > Java Programmers > Old-school lispers > all the other, who just want to try (and possibly follow the examples in a > tutorial or book) I humbly disagree. All of these grou

Re: Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-03 Thread Devin Walters
On Aug 3, 2011, at 7:32 PM, Base wrote: > I hope not, because I would *love* that! +1 for the sake of the community. AFAIK Google Closure operates under the Apache License 2.0. I am not personally aware of any conflicts that would arise from the dependencies ClojureScript requires, but I am n

Re: What information does (:key x) convey?

2011-08-03 Thread Ken Wesson
On Wed, Aug 3, 2011 at 1:26 PM, Colin Yates wrote: > +1 as well.  Surely "(start-date voyage)" would be more explicit than > "(start voyage)" though meaning there is no ambiguity for me; I would have thought start-location. If it's start-date, then the circular? in the OP can only return true for

Re: Trying to understand performance of two simple functions

2011-08-03 Thread Mark Feeney
As a test, I replaced the mapcat with a plain map in the slow version: (defn collapse-slow [col pred rep] (let [f (fn [[x & more :as xs]] (if (pred x) [rep] xs))] (map f (partition-by #(if (pred %) true) col Is that the concat you were thinking of? Ignoring that the functions aren't eq

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Brian Marick
On Aug 2, 2011, at 7:23 PM, Armando Blancas wrote: > Check out the work of Warren Teitelman on > Conversational LISP and Do What I Mean, way back when most in this > board weren't even born. Around 1985, I heard Teitelman's "Do What I Mean" (DWIM) referred to as DWWTWHM ("Do What Warren Teitel

deftypes that implement IPersistentCollection#equiv: argument order

2011-08-03 Thread Brian Marick
In Midje, I have reason to create a type Metaconstant whose instances are "equal" to a symbol with the same name. Here's the relevant bits of the definition: (deftype Metaconstant [name storage] Object (equals [this that] (if (instance? (class this) that)

Re: Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-03 Thread Base
I hope not, because I would *love* that! On Aug 3, 7:23 pm, Laurent PETIT wrote: > Hello, > > Do you know, given the licence of ClojureScript dependencies (which I don't > know in details), if doing the following would go against their licenses ? : > > basically, a zip with pre-packaged fixed/tes

Are there potential licensing issues of doing a "fully packaged" ClojureScript zip for Windows ?

2011-08-03 Thread Laurent PETIT
Hello, Do you know, given the licence of ClojureScript dependencies (which I don't know in details), if doing the following would go against their licenses ? : basically, a zip with pre-packaged fixed/tested versions of ClojureScript and its dependencies, so that, e.g. on Windows, the "manual ste

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Brian Goslinga
On Aug 2, 8:39 am, Ken Wesson wrote: > It is true that the messages commonly encountered could stand to be > better documented on a Clojure site. I'm wondering if we could go > further, though, and make REPL exception printing more informative. > The Java exception gets stored in *e, so someone ca

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread Joop Kiefte
That was exactly what I meant. Sorry for not responding directly to the second inquiry, I wanted to see if others thought the same about this... 2011/8/3 Ben Smith-Mannschott : > This. 1000 times this. > > Don't clutter your source code with this kind of stuff. It'll just > cause you pain down the

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Nicolas
On 3 août, 03:00, Mark wrote: > The compiler might not be able to do better but the runtime system certainly > could.  In this case, both filtered and more information is what's needed.   > Why couldn't the runtime generate a message like: > Symbol "fac" of type clojure.lang.IFn is used where type

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread Ben Smith-Mannschott
This. 1000 times this. Don't clutter your source code with this kind of stuff. It'll just cause you pain down the road. (Say, when merging two branches.) // ben On Wed, Aug 3, 2011 at 23:36, Sean Corfield wrote: > I think Joop meant to use the change history in your version control system > dir

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread Sean Corfield
I think Joop meant to use the change history in your version control system directly, rather than try to put it into the source code. I think the prevailing best practices these days are to _not_ duplicate change history into source code, even thru VCS keyword substitution. The change history is a

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread octopusgrabbus
Thanks, and I'm searching as to how to get cvs commit to write this into the module. If you know that, it would be so helpful. On Aug 3, 3:31 pm, Joop Kiefte wrote: > changelog.txt / VCS? > > 2011/8/3 octopusgrabbus : > > > > > > > > > Is there a preferred method for adding a Change History block

Re: Adding "Change History" To Clojure Modules

2011-08-03 Thread Joop Kiefte
changelog.txt / VCS? 2011/8/3 octopusgrabbus : > Is there a preferred method for adding a Change History block to a > Clojure module? I'm doing this for now: > > (ns addr-verify >  ^{:author "Charles M. Norton", >    :doc "addr-verify is a small Clojure program that runs address > verification thr

Adding "Change History" To Clojure Modules

2011-08-03 Thread octopusgrabbus
Is there a preferred method for adding a Change History block to a Clojure module? I'm doing this for now: (ns addr-verify ^{:author "Charles M. Norton", :doc "addr-verify is a small Clojure program that runs address verification through ... Created on August 3, 2011 Cha

Re: What information does (:key x) convey?

2011-08-03 Thread Stefan Kamphausen
inc Functions in Lisps are (usually) verbs, to my eye the colon looks just like 'get', doesn't it? :-) Stefan -- 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 that posts from new m

Re: What information does (:key x) convey?

2011-08-03 Thread Kevin Downey
the clojure compiler also does some optimizations for keyword literal calls on deftypes which you lose if you def it On Wed, Aug 3, 2011 at 10:29 AM, Laurent PETIT wrote: > 2011/8/3 Sean Corfield >> >> On Wed, Aug 3, 2011 at 10:03 AM, Brian Marick wrote: >>> >>> ** It could mean "there are no n

Re: What information does (:key x) convey?

2011-08-03 Thread Laurent PETIT
2011/8/3 Sean Corfield > On Wed, Aug 3, 2011 at 10:03 AM, Brian Marick wrote: > >> ** It could mean "there are no nasty surprises here". I vividly remember >> debugging a Smalltalk program and discovering what I'd been ignoring as a >> simple getter actually had hundreds of lines of code behind

Re: What information does (:key x) convey?

2011-08-03 Thread Colin Yates
+1 as well. Surely "(start-date voyage)" would be more explicit than "(start voyage)" though meaning there is no ambiguity for me; I would (incorrectly) assume (start voyage) was a mutator :) On 3 August 2011 18:22, Sean Corfield wrote: > On Wed, Aug 3, 2011 at 10:03 AM, Brian Marick wrote: >

Re: What information does (:key x) convey?

2011-08-03 Thread Sean Corfield
On Wed, Aug 3, 2011 at 10:03 AM, Brian Marick wrote: > ** It could mean "there are no nasty surprises here". I vividly remember > debugging a Smalltalk program and discovering what I'd been ignoring as a > simple getter actually had hundreds of lines of code behind it. Using a > keyword as a gett

What information does (:key x) convey?

2011-08-03 Thread Brian Marick
It's very handy that :keywords act as functions and maps do too: (:start voyage) => 5 (voyage :start) => 5 It's idiomatic Clojure, I think. I've been experimenting with a style of top-down TDD that puts off deciding about the "shape" of data as long as one can. [I hasten to add this is

Re: Clojure 1.3 Beta 1

2011-08-03 Thread Aaron Bedra
It does, thanks for the explanation. Stuart Halloway and I took a look at this yesterday and have started on a solution. I will create a ticket in JIRA to track it. The basic idea is that BigInts that are small enough to store their value in the Long portion of the BigInt will not do the extra

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread MarisO
(defn fac [n] (if (= n 1) 1 (* n fac (- n 1 your code tries to multiply n by function this is correct: (defn fac [n] (if (= n 1) 1 (* n (fac (- n 1) On Aug 2, 8:11 am, recurve7 wrote: > In browsing this group I see this topic has been brought up several > times over the past 3 years

Re: learning clojure library

2011-08-03 Thread Islon Scherer
You can use (ns-publics 'your.namespace) to see every public intern mapping in this namespace. Islon -- 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 that posts from new members are m

learning clojure library

2011-08-03 Thread Vincent
How shld i go about for studying about a Clojure library , functions provided with it ? Is there any function which will list all the functions available in a namespace of library ? Which are the namespace available in library.? MY problem is how to study to use functions avail. , as (doc fun

Re: Problem calling third-party library from ClojureScript code when advanced optimization used

2011-08-03 Thread Alen Ribic
Searching the CLJS bug reports, it turns out that the issue has been reported. (http://dev.clojure.org/jira/browse/CLJS-10) Additionally, I implemented a *quick-fix* for load-externs function in clj/cljs/closure.clj and it resolved the problem as expected. -Alen -- Science is what you know, philo

Re: java.lang.StackOverflowError when calling function name instead of recur

2011-08-03 Thread Ken Wesson
On Tue, Aug 2, 2011 at 4:47 PM, David Nolen wrote: > On Tue, Aug 2, 2011 at 4:43 PM, Trastabuga wrote: >> >> I just came across the issue of getting the StackOverflowError in the >> function reading long file and recursively building a list of data. >> After I replaced function name with "recur"

Re: Re: How to import and use an enum enclosed in an java interface?

2011-08-03 Thread Ken Wesson
On Tue, Aug 2, 2011 at 10:42 AM, finbeu wrote: > Works! Ken, thx. You're welcome. -- Protege: What is this seething mass of parentheses?! Master: Your father's Lisp REPL. This is the language of a true hacker. Not as clumsy or random as C++; a language for a more civilized age. -- You receive