Hi All,
Is this the right place for ClojureCLR-specific questions?
I have managed to install and use ClojureCLR on Windows but before I
head too far down that track I'd like to canvas some expert opinion:
Is it going to be painful trying to implement a Windows Service in ClojureCLR?
Basically,
On Fri, Nov 19, 2010 at 8:52 PM, Bob Shock wrote:
> I had a bug in my code where I meant to type:
>
> (get map key)
>
> and instead typed:
>
> (get max key)
>
> It seems that any function name I put in for "max" always returns nil.
>
> user=> (get max 3)
> nil
> user=> (get min 3)
> nil
> user=> (
On Fri, 19 Nov 2010 17:52:03 -0800 (PST)
Bob Shock wrote:
> I had a bug in my code where I meant to type:
>
> (get map key)
>
> and instead typed:
>
> (get max key)
>
> It seems that any function name I put in for "max" always returns nil.
>
> user=> (get max 3)
> nil
> user=> (get min 3)
>
I had a bug in my code where I meant to type:
(get map key)
and instead typed:
(get max key)
It seems that any function name I put in for "max" always returns nil.
user=> (get max 3)
nil
user=> (get min 3)
nil
user=> (get maxx 3)
java.lang.Exception: Unable to resolve symbol: maxx in this cont
I generally prefer to pass in a sequence rather than use a variable
number of arguments. The only time variable arguments are really useful
is in functions like map (or maybe +) in which you rarely use more than
one (or two) arguments and it would be a pain to wrap the last argument
in a list.
e.
I always write a function to take a single seq argument because it can
also take varargs if I wrap them in a seq.
(defn add [nums]
(reduce + nums))
(add some-seq)
(add [1 2 3 4 5])
On Nov 19, 4:19 pm, Jarl Haggerty wrote:
> I always write a function to take varargs because it can also take a
I always write a function to take varargs because it can also take a
list using apply.
(+ 1 2 3 4 5)
(apply + [1 2 3 4 5])
On Nov 15, 9:52 am, Chris wrote:
> If you have a function that needs to treat multiple arguments as a
> group, what forces drive you to represent this as a single sequence
>
On Fri, Nov 19, 2010 at 1:59 PM, Chris Perkins wrote:
> On Nov 18, 11:09 pm, Ken Wesson wrote:
>> I got this oddity while debugging a Clojure sourcefile today:
>>
>> user=>
>> #> declaration loop should be a vector (io.clj:55)>
>> user=>
>
> You're misinterpreting the error message.
I'm misinte
Looks really good. Great work,
Sam
---
http://sam.aaron.name
On 18 Nov 2010, at 19:10, LauJensen wrote:
> Hi gents,
>
> For those of you who have followed the development
> of ClojureQL over the past 2.5 years you'll be excited
> to know that ClojureQL is as of today being released
> as 1.0.0
On Nov 18, 11:09 pm, Ken Wesson wrote:
> I got this oddity while debugging a Clojure sourcefile today:
>
> user=>
> # declaration loop should be a vector (io.clj:55)>
> user=>
>
You're misinterpreting the error message. It's not trying to tell you
that the parameters to loop should be a vector -
On Nov 19, 6:34 pm, "nicolas.o...@gmail.com"
wrote:
> I found a minimal case:
>
> (defprotocol A (f [x]))
>
> (deftype T [ ^{:unsynchronized-mutable true} ^int a] A
> (f [x] (loop [c 0]
> (set! a c
>
> (class: user/T, method: f signature: ()Ljava/lang/
http://dev.clojure.org/jira/browse/CLJ-420
Perhaps it's the same bug?
-Jason
On Nov 18, 8:09 pm, Ken Wesson wrote:
> I got this oddity while debugging a Clojure sourcefile today:
>
> user=>
> # declaration loop should be a vector (io.clj:55)>
> user=>
>
> Huh? Line 55 is a blank line!
>
> user=
In guava, there is an immutable version of bimap.
http://guava-libraries.googlecode.com/svn/trunk/javadoc/com/google/common/collect/ImmutableBiMap.html
On Fri, Nov 19, 2010 at 3:24 AM, Christophe Grand wrote:
> One call away but rarely persistent or even immutable.
>
> On Fri, Nov 19, 2010 at 4:
I found a minimal case:
(defprotocol A (f [x]))
(deftype T [ ^{:unsynchronized-mutable true} ^int a] A
(f [x] (loop [c 0]
(set! a c
(class: user/T, method: f signature: ()Ljava/lang/Object;) Expecting
to find integer on stack
The problem disappear
Hi David,
May be you will be interested, I use Enclojure with a pom file generated by
leiningen. Clojure 1.2 on Netbeans 6.9.1.
On Fri, Nov 19, 2010 at 4:15 AM, David wrote:
> Have you been able to "Build with Dependencies"? I haven't been able
> to figure this out yet - though I suspect it's
unfortunately doesnt work. The library loads succesfully but i still
get the error when calling add. Note that compiling on the top is a
workaround to get it working on the repl.
i added the loadlibrary to an init function which is good and i
decided to ahead of time compile it - and it worked! I
Thanks for your explanation which has allowed me to make this
definition
(def fibs
(list* 0 1 (lazy-seq (map + fibs (rest fibs)
that uses rest and IMHO is clearer that the first one using drop.
Juan Manuel
On 19 nov, 12:04, Christophe Grand wrote:
> Hi,
>
>
>
>
>
> On Fri, Nov 19, 201
Hi,
On Fri, Nov 19, 2010 at 11:44 AM, babui wrote:
> I've been playing with lazy sequences defined by autoreferential
> definition. For instance:
>
> (def ones (lazy-seq (cons 1 ones)))
>
> which is equivalent to (def ones (repeat 1)).
>
> My problem arises when defining the sequence of fibonacc
I've been playing with lazy sequences defined by autoreferential
definition. For instance:
(def ones (lazy-seq (cons 1 ones)))
which is equivalent to (def ones (repeat 1)).
My problem arises when defining the sequence of fibonacci numbers.
With this definition:
(def fibs
(lazy-seq (list* 0 1
Looks great, I'm giving it a try now. FYI, the github link in your
post is the private URL so it won't work for anyone but you.
-Jeff
On Nov 18, 8:10 pm, LauJensen wrote:
> Hi gents,
>
> For those of you who have followed the development
> of ClojureQL over the past 2.5 years you'll be excited
On Nov 19, 7:08 am, Miki wrote:
> Greetings,
>
> I gave a short presentation on getting started with Clojure on the
> AppEngine tonight at the clj-la meetup.
> Slides can be found
> athttps://docs.google.com/present/view?id=ah82mvnssv5d_1784s26pwsh
>
> Comments welcomed.
>
> Enjoy,
> --
> Miki
I
One call away but rarely persistent or even immutable.
On Fri, Nov 19, 2010 at 4:55 AM, Sunil S Nandihalli <
sunil.nandiha...@gmail.com> wrote:
> awesome.. :) i keep forgetting that all of java is just a call away .. hmm
> thanks Lachlan..:)
> Sunil.
>
>
> On Fri, Nov 19, 2010 at 7:46 AM, jlk wr
22 matches
Mail list logo