I'm having trouble finding any resources on the net for telling me how
to initiate a Clojure application. I'm currently using Netbeans with a
Clojure plugin, and from what I gather from one of the examples, I
need to define a main function as the launching point for my app, but
there seems to be a
t least I can now build and run a script.
On Feb 1, 6:40 pm, ataggart wrote:
> You can generate a Java class with a main method (as you have done),
> or you can use clojure.main:
>
> http://clojure.org/repl_and_main
>
> On Jan 31, 2:32 pm, Wardrop wrote:
>
> > I
I can't for the life of me get Clojure.Contrib to work. No matter what
I do, I seem to have it available within clojure. Here's just an
example of what I've been trying when calling the repl from the
command line...
java -classpath "C:\Program Files\Clojure\clojure.jar";"C:\Program
Files\Clojure\c
I had already tried using a colon as the separator, but it gave an
error. I've also noticed that if neither path resolves to a file, it
also errors, so it's finding clojure-contrib-1.1.0.jar.
On Feb 2, 2:07 pm, tsuraan wrote:
> > java -classpath "C:\Program Files\Clojure\clojure.jar";"C:\Program
t. If only the "java" commnd prompt provided a
little more help.
On Feb 2, 2:25 pm, Wardrop wrote:
> I had already tried using a colon as the separator, but it gave an
> error. I've also noticed that if neither path resolves to a file, it
> also errors, so it's finding
I better provide credit to this page:
http://forums.pragprog.com/forums/91/topics/1738
On Feb 2, 2:25 pm, Wardrop wrote:
> I had already tried using a colon as the separator, but it gave an
> error. I've also noticed that if neither path resolves to a file, it
> also errors, s
I've noticed that the output of a script, is often different to the
output of the same commands if run on the REPL. This makes sense, but
here's a situation which has got me a little confused. I'm trying to
run this code as a script...
(use '[clojure.contrib.duck-streams])
(for [line (line-seq (r
ld someone now help me with my second problem?
Cheers
On Feb 3, 8:50 am, Kevin Downey wrote:
> for is lazy, and your code formatting is horrible.
>
>
>
> On Tue, Feb 2, 2010 at 2:48 PM, Wardrop wrote:
> > I've noticed that the output of a script, is often different to th
(some) definitely seems like the way to go. Now I've got to move onto
my next problem, which is totally the number of duplicate files and
the bytes they take up. I'm guessing at this point that something like
(reduce) will be the way to go.
Thanks for all your help. This won't be the last time you
I feel like I'm over-staying my welcome by posting yet another topic,
so please only answer if you get some form of enjoyment out of solving
such problems as this one.
I've given this problem a fair bit of my time, and it's been good so
far as it's forced me to learn new things and challenge my ra
clean and easy to understand. Thanks a
lot for that. The use of (->>) was very clever. Your example certainly
makes Clojure look good.
On Feb 3, 4:28 pm, ataggart wrote:
> On Feb 2, 7:53 pm, Wardrop wrote:
>
>
>
> > I feel like I'm over-staying my welcome by postin
I've always struggled when it comes to defining good names for
functions and methods. Now that I'm learning Clojure, function naming
becomes even more imperative, as you don't have classes and objects to
help give meaning to a method. I'm finding at the moment that I'm
spending half my time thinkin
d [functionality]
> (let [[refactored-functionality & new-functions] (extract-
> functionality functionality)]
> (map #(unless (atomic? %1) (haphazard %1)) new-functions)))
>
> Ideally these functions lead to the same output.
> In my use of map I am assuming a lazy progra
means it's been
poorly designed/implemented (suggesting there's a better way) or the
coder isn't exactly sure what they're trying to achieve.
On Feb 4, 5:28 pm, Michael Wood wrote:
> On 4 February 2010 09:04, Wardrop wrote:
>
>
>
> > I often myself creating func
I'm wondering if there's anyway in Clojure, that one can detect the
number of available processoring threads (ie. 4 core cpu with
hyperthreading would equal 8 available threads). This will allow me to
have a scalable processing app which can run on a single core CPU, or
250 core processor, without
2010 11:29, Wardrop wrote:
>
> > I'm wondering if there's anyway in Clojure, that one can detect the
> > number of available processoring threads
>
> (.availableProcessors (Runtime/getRuntime)) might be what you are after?
--
You received this message because
I've written a function which I think would be a good inclusion into
the Clojure.Contrib library. I have two questions though, the first is
how? How do I go about adding a single function to an existing
namespace; in this case, seq-utils, and what are the pre-requisites?
My second question is, wha
standards, like what to call function arguments (e.g. idx for indexes
and coll for collections to name the more obvious ones).
Cheers
On Feb 11, 9:44 am, Sean Devlin wrote:
> Take a look here:
>
> http://clojure.org/contributing
>
> On Feb 10, 6:38 pm, Wardrop wrote:
>
> &g
18 matches
Mail list logo