On Mon, Mar 29, 2010 at 08:24, Mark Derricutt wrote:
> Why do you need to edit the settings twice a day? Strikes me as a problem.
> You could move the relevant settings into a which is
> only activated based on network/env settings, so those changes are
> automatic?
> --
> Pull me down under..
Why do you need to edit the settings twice a day? Strikes me as a problem.
You could move the relevant settings into a which is
only activated based on network/env settings, so those changes are
automatic?
--
Pull me down under...
On Fri, Mar 26, 2010 at 8:36 PM, Konrad Hinsen
wrote:
> 2) B
Is this a bug?
echo "hi" | java -cp $HOME/jars/clojure.jar clojure.main -e '(println
(line-seq (java.io.BufferedReader. *in*)))'
The output is nil.
This works fine if argument to -e is saved to a file and then the file
name is specified on the command line.
--
Asim
--
You received this messag
Hi,
I'm thinking about writing some piece of software completely in
clojure (yeah!) However, it is my first time so I want to make sure I
know what I'm doing.
Specifically, I prefer to define the important components of my
software as Java interfaces. Partly to see myself think, partly
because it
The Clojure data structures are immutable, so there's no need to copy. Just
"modify" the existing structure and you have a new immutable instance.
If you are coming from Java, it helps to think of these immutable structures
like Java's String.
On Sun, Mar 28, 2010 at 9:29 AM, strattonbrazil wrot
My current proposal for the Clojure DSL for polyglot maven looks like this:
--
(defproject com.linkuistics.lamdras/website "1.0-SNAPSHOT"
:model-version "4.0.0"
:name "Lamdras Website"
:description "Acumen / LRMDS Integr
I just sent you a message before I saw this...
I'm in the midst of cutting a new release of the Enclojure plugin and I'm
working on also providing a prepackaged version of Netbeans with the
Enclojure plugin installed. I wanted to include the LapRepl in the release
and the pre-packaged netbeans (as
Is this the common way to do it?
(def sister (assoc brother :name "Cindy"))
If you want to change the value of one key in a map, yes. (In this
example it looks weird, of course.)
If you want to create a new map by taking only some values from
another map:
user=> (def sister (assoc (sele
Is this the common way to do it?
(def sister (assoc brother :name "Cindy"))
Reading up more on structs, it seems they have base keys that can't be
dissoc. Is that the main difference then between it and a hash?
On Mar 28, 2:48 pm, strattonbrazil wrote:
> I did a poor job explaining myself. S
Is there a shorter way to do this?
See my earlier message. dissoc and assoc will do what you want.
(def brother {:name "Gary" :address "..." :mother "Mary" :father
"John"})
(def sister (assoc brother :name "Cindy"))
user=> sister
{:name "Cindy", :address "...", :mother "Mary", :father "John
Bytes in java are signed values [-128,127]. I've submitted a ticket
to add a ubyte function which simply checks for [0,255]. Note that
this only deals with down-casting. Shift functions work on ints, thus
you'd need to mask the byte to an int with (bit-and % 0xFF). If you
don't do this, then when
I did a poor job explaining myself. Sorry. I understand that copying
an immutable structure is worthless. I want a copy of a structure
except one or two specific properties. For example,
(defstruct person :name :address :mother :father)
(def brother (struct person "Gary" ...))
(def sister (st
Halelujah!
On Mar 28, 4:29 pm, Michael Wood wrote:
> On 28 March 2010 22:07, Glen Rubin wrote:
>
> > I guess not, some of the values I am obtaining are off. I have tried
> > searching for a java class that will understand a signed (two's
> > complement) hex (16 bit, 0xff32)
>
> > This is someth
On 28 March 2010 22:07, Glen Rubin wrote:
> I guess not, some of the values I am obtaining are off. I have tried
> searching for a java class that will understand a signed (two's
> complement) hex (16 bit, 0xff32)
>
> This is something so basic, I know there must be some in built
> function for t
I guess not, some of the values I am obtaining are off. I have tried
searching for a java class that will understand a signed (two's
complement) hex (16 bit, 0xff32)
This is something so basic, I know there must be some in built
function for this??
On Mar 28, 3:06 pm, Glen Rubin wrote:
> I am w
Addendum: After about a day of CPU time most of the refs are at 9 or
10 with their history length.
a.
On 28 Mrz., 14:18, alux wrote:
> Hi,
>
> I played with Richs ant colony these days, and want to report about
> experience with 4 cores.
>
> First I didn't want my computer to idle, so I set
>
>
I am working with 2's complement hex. It looks like i can get the
value of any number by just using byte?
e.g.:
(byte 0xff32)
--
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 post
On Sun, Mar 28, 2010 at 18:29, strattonbrazil wrote:
> This may be really basic. So much so that it's hard to find on the
> internet, but is there something like a copy constructor in clojure,
A copy-constructor is redundant in a language where values are
immutable. (Just refer to it since it ca
As for papers on the Interner on the subject of persistent data
structures, one gentle introduction might be this blog entry:
http://eclipsesource.com/blogs/2009/12/13/persistent-trees-in-git-clojure-and-couchdb-data-structure-convergence/
(with examples from several fields: git, clojure, etc.)
H
This may be really basic. So much so that it's hard to find on the
internet, but is there something like a copy constructor in clojure,
where I can copy everything in a structure except one or two keys?
Maybe something like struct-map, but fills in the other variables not
supplied by another data
This may be really basic. So much so that it's hard to find on the
internet, but is there something like a copy constructor in clojure,
where I can copy everything in a structure except one or two keys?
Maybe something like struct-map, but fills in the other variables not
supplied by another data
Really embarrassing in two ways:
- Could not remove my previous post. :-)
- I should have tried to create such a big number (at least after
reading all the answers here) before posting... It is possible to
crate a 5 digit big integer.
PS: Watch out though. The aim of the problem is to add up t
Looks like you are doing the 13th Project Euler problem. That means
you have exactly one hundred 50 digit numbers. I am new to Clojure but
AFAIK you wont be able to handle a 5000 digit number in it. You have
to find another way. There is at least one... ;-)
--Feka
On Mar 25, 11:40 pm, Glen Rubin
Hi,
I played with Richs ant colony these days, and want to report about
experience with 4 cores.
First I didn't want my computer to idle, so I set
* (def dim 140) was 80
* (def food-places 13) was 35 - I hoped for more defined routes. In
vain.
* (def food-range 1000) was 100 to have enough.
and
Hi,
I'm playing with Stuart Sierra's lazytest[1]. I'm trying to get access
at the test results of a test. I defined a spec and when I evaluate
it, it looks like I get a TestResults back. Trying to assign this to a
var fails with a java.lang.AbstractMethodError:
Clojure=> (spec my-spec
On 28/03/2010, at 8:01 PM, B Smith-Mannschott wrote:
> - Clojure code manipulating poloyglot's notation is more complex
> because it must be parsed first, and then recombined. Leiningen's
> notation already is 'parsed'.
Partly parsed. The most 'correct' form would be [groupdId artifactId version
Ah. Okay. Thank you.
Hello Michał,
reading your mail, I was completely convinced I already did exactly
this.
Seemingly I made a number of mistakes that didn't cancel out.
First, the defs are in the namespace if and only if the namespace
expression is evaluated first. I didn't realise I do non co
On Sun, Mar 28, 2010 at 08:39, Antony Blakey wrote:
>
> On 28/03/2010, at 4:42 PM, Antony Blakey wrote:
>
>> (defproject main "org.clojars.the-kenny:clojure-couchdb:0.2"
>> :add-default-plugins true
>> :description "Simple Clojure interface to Apache CouchDB, fork of the
>> original project wit
On 28/03/2010, at 5:33 PM, Stefan Kamphausen wrote:
> It will be interesting how the licenses will be interpreted in Clojure
> where Java and Lisp bump together. The Java-world probably had it's
> discussion, too, no?
The "Classpath Exception" is the principal result of this discussion:
http:/
Hi,
On 28 Mrz., 06:55, Mike Meyer wrote:
> And to answer the critical question you didn't ask:
>
> 5) Can I distribute a jar file for my Clojure project under the GPL?
>
> No. When you compile your code, code from clojure (and clojure-contrib
> if you use it) will be included in the resulting ja
30 matches
Mail list logo