I'll go one step further and say that we shouldn't have to call
persist namespace. It should be automatic such that a change to the
state of an identity is transactionally written.
Let's start with refs. We can tackle the other identities later.
The API is simple. Call (refp) instead of (ref)
While examining the Clojure source I came across this line in the
EmptyList class:
public boolean equals(Object o) {
return (o instanceof Sequential || o instanceof List)
RT.seq(o) == null;
}
What's up with the RT.seq(o) == null? Why don't we do this instead:
public boolean
Thanks to many people on this list in Aug 2009 who helped improve my code,
to Johannes Friestad for writing a nice fast Clojure program using deftype
for the n-body problem, to Isaac Gouy for setting up the shootout web site
to accept Clojure submissions, and to my having more time than good sense
Thanks! That worked for me. Understood on the precautions about these
things not being immutable, and thus potentially unsafe as hash keys (and
anything else that expects immutability, whether that is obvious or not).
This raises the question in my mind -- will there be something in Clojure,
Persistant variable handling is one of the things which I have spent much
time on as a beginner and former SQL-illiterate (Among getting the swank to
finally work (it's a dream!)). I have however got into databases quite a bit
among the way - but it was not my main goal and it has taken some time
I defined a fn whose execution depends on the number of parameters
passed to it. It works fine! I am just concerned that I am doing
this in a way that is not as concise as it could or should be. Here
is my fn:
(defn make-target
Parses text file for single sweep specified by sweepidx. If size
Hello Glen,
I'd use the first two forms to set startidx and size and then call the
full form:
(def inf java.lang.Double/POSITIVE_INFINITY)
(defn make-target
Parses text file for single sweep specified by sweepidx. If size
is
not specified will parse till end of sweep. If startidx and size
It checks the value against memory. If it's
the same, commit data store changes. If not, retry after refreshing
memory with the current contents of the store.
May I suggest we take a page from the CouchDB book here? In addition
to having a id each ref also has a revision id. Let's say the id
I've written a short tutorial for clojure.zip:
http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/
-
Brian Marick, independent consultant
Mostly on agile methods with a testing slant
Author of /Programming Cocoa with Ruby/
www.exampler.com,
Meant to thank you for this. It was very timely for me, and very
understandable.
On Thu, Sep 2, 2010 at 10:34 AM, Brian Marick mar...@exampler.com wrote:
I've written a short tutorial for clojure.zip:
http://www.exampler.com/blog/2010/09/01/editing-trees-in-clojure-with-clojurezip/
-
Probably so the list can be compared to anything and thus o may not
implement Seqable, like:
user= (.equals '() nil)
false
On Sep 1, 4:14 pm, Timothy Baldridge tbaldri...@gmail.com wrote:
While examining the Clojure source I came across this line in the
EmptyList class:
public boolean
A couple other things:
1) (apply identity ...) is the same as (first ...)
2) Consider using the - macro to clean up the let
Here's a quick rewrite:
(defn make-target
([file channel sweepidx]
(make-target file channel sweepidx 0))
([file channel sweepidx startidx]
(make-target file
Hi.
I'd like to do a union of some sequences using my own comparison
function. Similar to supplying a Comparator in Java. The things
being compared are Objects from a Java library that I don't control,
so I can't just override the equals function on the class, for
example.
Would aprecaite any
Ah...so I looked into the RT code a bit more and you're right. If we
passed in a Java array or a Java String then it would need to be
converted to a Seqable class first then we could have a seq() method
to call.
Thanks,
Timothy
On Thu, Sep 2, 2010 at 9:43 AM, Armando Blancas
Hey,
Would you please recommend some good Blogs/Twitter accounts about
Clojure?
Thanks.
--
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 moderated -
On Thu, 2 Sep 2010 05:54:26 -0700 (PDT)
Glen Rubin rubing...@gmail.com wrote:
I defined a fn whose execution depends on the number of parameters
passed to it. It works fine! I am just concerned that I am doing
this in a way that is not as concise as it could or should be. Here
is my fn:
I am trying to build a rest webservice using compojure/ring and json
marshalling. the consumers of the web service are written in java and
we are thinking of using apache cxf.
when i am trying to send an object using jsonprovider , it is getting
correctly parsed at the client end but on using
a few off the top of my head:
@fogus
@planetclojure
@disclojure
@stuartholloway
@liebke
@richhickey
blog.fogus.me
dosync.posterous.com
m.3wa.com
nathanmarz.com
On Thu, Sep 2, 2010 at 12:21 PM, HB hubaghd...@gmail.com wrote:
Hey,
Would you please recommend some good Blogs/Twitter accounts
good suggestions guys!! thx so much
On Sep 2, 10:44 am, Justin Kramer jkkra...@gmail.com wrote:
A couple other things:
1) (apply identity ...) is the same as (first ...)
2) Consider using the - macro to clean up the let
Here's a quick rewrite:
(defn make-target
([file channel sweepidx]
On Wed, 1 Sep 2010 15:14:45 -0700 (PDT)
Alyssa Kwan alyssa.c.k...@gmail.com wrote:
I'll go one step further and say that we shouldn't have to call
persist namespace. It should be automatic such that a change to the
state of an identity is transactionally written.
Let's start with refs. We
http://planet.clojure.in/ is all i really need :)
On 2 Sep., 18:21, HB hubaghd...@gmail.com wrote:
Hey,
Would you please recommend some good Blogs/Twitter accounts about
Clojure?
Thanks.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Special thanks to Andrey Fedorov for making this happen for us!
If you are in the tri-state area and would like to present at the
Clojure NYC @google, please contact me with the topic and we'll get it
setup.
Thanks,
Eric
--
You received this message because you are subscribed to the Google
Hi,
On Thu, Sep 2, 2010 at 17:21, HB hubaghd...@gmail.com wrote:
Hey,
Would you please recommend some good Blogs/Twitter accounts about
Clojure?
I irregularly maintain a list here: https://twitter.com/#/list/otfrom/clojure
--
You received this message because you are subscribed to the
Shameless self-promotion: http://clojurls.com
(like hackurls.com, but only clojure content only)
On 2 Sep., 18:21, HB hubaghd...@gmail.com wrote:
Hey,
Would you please recommend some good Blogs/Twitter accounts about
Clojure?
Thanks.
--
You received this message because you are subscribed
I usually git pull clojure, ant, mvn install, then git pull and build
clojure-contrib against it. There used to be a -Dclojure.jar=...
option mentioned in README.txt for the contrib. The new modular
version, however, doesn't mention it, just saying, use these contrib
versions for those clojure
You'll need to adjust the version numbers for the Clojure
dependencies. These are configured in clojure-contrib/modules/parent/
pom.xml at the line:
properties
clojure.version1.2.0/clojure.version
Change that to 1.3.0-SNAPSHOT for the latest snapshot (including the
ones you build locally)
On Sep 2, 5:24 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
You'll need to adjust the version numbers for the Clojure
dependencies. These are configured in clojure-contrib/modules/parent/
pom.xml at the line:
properties
clojure.version1.2.0/clojure.version
Change that to
Hi All,
As Zach announced in the ClojureDocs mailing list [1], I'm going to be
working on the API for ClojureDocs.org in the coming future. I was
hoping to get some feedback regarding what people wanted to see for an
API for ClojureDocs:
- What kind of features would you like to see in the
I've got a curious little bit of a memory leak of sorts that I'm
trying to narrow down.
I have an application (betcha can guess what it is if you know me from
IRC :) that, in order to reload plugins, requires each of them with
the :reload option whenever you ask them to be reloaded.
Each of
On Sep 1, 9:46 pm, John Fingerhut andy.finger...@gmail.com wrote:
Thanks to many people on this list in Aug 2009 who helped improve my code,
to Johannes Friestad for writing a nice fast Clojure program using deftype
for the n-body problem, to Isaac Gouy for setting up the shootout web site
Awesome! It doesn't have to be much. Searching for examples and docs
is the most important thing, obviously. I'd request that if you're
going to have any single format, JSON would make me the happiest.
Clojure data structures would be cool, but that's kind of limited to
Clojure.
My vote is on
On Wed, Sep 1, 2010 at 9:46 PM, John Fingerhut andy.finger...@gmail.com wrote:
You can see a brief summary of results comparing
run time, memory, and code size against Java 6 -server here:
http://shootout.alioth.debian.org/u32/benchmark.php?test=alllang=clojurelang2=java
Very interesting.
On Wed, Sep 1, 2010 at 5:41 AM, Remco van 't Veer rwvtv...@gmail.com wrote:
If you want something old school like CFML you might consider using
plain JSP and taglibs. These are modeled after CFML and available on
every web container by default.
FWIW, I've created a small CFML/Clojure bridge
On Sep 2, 5:28 pm, Sean Corfield seancorfi...@gmail.com wrote:
On Wed, Sep 1, 2010 at 9:46 PM, John Fingerhut andy.finger...@gmail.com
wrote:
You can see a brief summary of results comparing
run time, memory, and code size against Java 6 -server here:
This is amazing, thank you all guys :)
On Sep 2, 7:33 pm, Sean Allen s...@monkeysnatchbanana.com wrote:
a few off the top of my head:
@fogus
@planetclojure
@disclojure
@stuartholloway
@liebke
@richhickey
blog.fogus.me
dosync.posterous.com
m.3wa.com
nathanmarz.com
On Thu, Sep 2,
Hey,
I finished reading Programming Clojure and Practical Clojure and
I'm hooked :)
Please count me in the Clojure club.
But I failed how to think in Clojure.
My main career is around Java web applications (Hibernate, Spring,
Lucene) and Web services.
Lets not talk about Java web frameworks
On Thu, Sep 2, 2010 at 7:47 PM, Rayne disciplera...@gmail.com wrote:
I've got a curious little bit of a memory leak of sorts that I'm
trying to narrow down.
I have an application (betcha can guess what it is if you know me from
IRC :) that, in order to reload plugins, requires each of them
On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure and Practical Clojure and
I'm hooked :)
Please count me in the Clojure club.
But I failed how to think in Clojure.
My main career is around Java web applications (Hibernate, Spring,
So in idiomatic Clojure applications, maps are considered like
objects?
And to operate on them we pass them to functions?
On Sep 3, 4:55 am, David Nolen dnolen.li...@gmail.com wrote:
On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure
I highly recommend Joy of Clojure. It's a good 2nd book on clojure.
It shows you the why things are the way they are, and how to
do things the clojure way as much as possible.
On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure and
By union do you mean union as in sets, or just smashing the two lists together?
--Robert McIntyre
On Thu, Sep 2, 2010 at 11:10 AM, mlimotte mslimo...@gmail.com wrote:
Hi.
I'd like to do a union of some sequences using my own comparison
function. Similar to supplying a Comparator in Java.
I'd go over SICP, though it not in Clojure but in Scheme - it will
show you how to think functional.
On Sep 2, 6:29 pm, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure and Practical Clojure and
I'm hooked :)
Please count me in the Clojure club.
But I failed how to
42 matches
Mail list logo