Hi Rich,
maybe this is a better way of looking at it.
When you create a transaction, you get a new UnitOfTime object that
has the sequential timestamp in it. The Transaction object keeps a
reference to the UnitOfTime object for the rest of the Transaction
objects life.
private static final Atomi
On 25 Mai, 08:03, Brent Millare wrote:
> Erik, what you said seems to make sense. So the question now is, since
> a new classloader is started during each eval at the repl, does that
> mean that it is closed after each repl statement? This seems to be the
> case because after requiring a namespa
(defmacro bound-fn
[& fntail]
`(bound-fn* (fn ~...@fntail)))
Shouldn't it be: (fn [] ~...@fntail) ?
If you try to use this function by passing more than one function as
arguments to it, you'll get an exception. e.g. (bound-fn f1 f2)
I'm a newbie to clojure and I'm not quite sure if this is a
Hi!
There is now a Clojure user group in Stockholm, Sweden (via
http://twitter.com/peter_hultgren/status/14648902541).
Join us at http://groups.google.com/group/stockholm-clojure-user-group
/Patrik
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
Hi,
On May 26, 12:41 pm, YD wrote:
> (defmacro bound-fn
> [& fntail]
> `(bound-fn* (fn ~...@fntail)))
>
> Shouldn't it be: (fn [] ~...@fntail) ?
>
> If you try to use this function by passing more than one function as
> arguments to it, you'll get an exception. e.g. (bound-fn f1 f2)
>
> I'm
On May 25, 11:29 am, Peter wrote:
> Hi Rich,
>
> If you set up your object dependencies correctly then the objects you
> want will stay in memory. Your history list would be a list of
> WeakReference so it could be GC'd.
>
> This is nothing about read tracking, more about setting the correct
> o
Hi,
As a newbie to lisp/clojure one thing I am having real trouble with is
understanding macro expand time (now having discovered the difference
between quote and backquote I was hoping I was on the way to nirvana
but still trip up)
Some newbie questions:
If the macro is run at compile time how
Hi,
2010/5/26 Quzanti
> Hi,
>
> As a newbie to lisp/clojure one thing I am having real trouble with is
> understanding macro expand time (now having discovered the difference
> between quote and backquote I was hoping I was on the way to nirvana
> but still trip up)
>
> Some newbie questions:
>
Thanks Laurent.
It does give me an overall view, but more importantly it gives me the
impression that there are some subtleties, so I am not feeling so bad
about the fact some of the behaviour hasn't been what I had predicted.
On May 26, 1:55 pm, Laurent PETIT wrote:
> Hi,
>
> 2010/5/26 Quzanti
I'd love to see a persistent "table" type together with some common
primitives (select, join, union) and optimization capabilities.
Currently a "set of maps" does something like that but I have no idea
how to, for example, add an "index" to some particular field and use
it in other operations.
Ano
Hi Erik,
>From what I understand, to close a classloader, you would need to also
remove all references to it or set the references to it to nil/null.
In the case of an eval in the repl, again I'm assuming we do lose that
reference once we are out of the scope of the eval.
While I said not reloadi
If you are a user of clojure.contrib.string, please take a look at the
proposed promotion to clojure [1]. Feedback welcome! It is my hope
that this promotion has enough "batteries included" that many libs can
end their dependency on contrib for string functions.
Cheers,
Stu
[1] https://www
Stu,
What happened to *not* promoting string?
http://groups.google.com/group/clojure-dev/browse_thread/thread/e294cd444227
Also, is there an actual patch/diff to review? I didn't see one in
Assembla.
Sean
On May 26, 11:16 am, Stuart Halloway
wrote:
> If you are a user of clojure.contrib.s
Based on the discussion of release granularity that started with the
proposed move of matchure to contrib [1], we are going to start doing
granular builds of Clojure. Matchure can be the first: It can be part
of the full contrib build, but also released as a standalone library
with its own
Thank you, now I see the point.
--
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 - please be patient with your
first post.
To unsubscribe from
Hi Rich,
>
> First, and foremost, it creates interaction relationships between
> transactions that otherwise have no overlap. You see this in the
> memory blowup during overlapping transactions. This rubs against a
> design objective in Clojure's STM to absolutely minimize transactional
> overlap
Stu,
What happened to *not* promoting string?
Changed our mind. It helps keep the people with prerelease books
busy. ;-) Seriously: I did an audit of several third-party libraries,
and concluded that for some libs, the presence of these string
functions in core could be the make-or-break d
Are these going to be in their own namespace (clojure.string), or in
core? I hope the former, because many of these names (replace,
reverse, join, split) are too valuable to be dedicated only to
strings.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group
Definitely! It will be clojure.string. Ticket updated to reflect this.
Are these going to be in their own namespace (clojure.string), or in
core? I hope the former, because many of these names (replace,
reverse, join, split) are too valuable to be dedicated only to
strings.
--
You received t
Stu Halloway,
Changes like this are a nuisance as a documentation guy >:| It makes
Beta seem further away, but it's a tough call and someone has to make
it. Such is life on the edge.
As far as technical feedback goes, it seems like a VERY useful list to
promote to core. There are a few things I
> Changed our mind. It helps keep the people with prerelease books
> busy. ;-)
Oh great! I'm going to have to cancel my appearance on "The View"
because of this.
I have mentioned my gripes in the IRC, but for public view I would
love better names for chomp and chop. In isolation those names a
> chomp => rtrim
> (rtrim "foo\n") => "foo" is much more clear to me, plus it leaves the
> door open for trim and ltrim functions should the need arise.
I like this. And in general I often fine the entire trio useful, and
adopting the ltrim/trim/rtrim naming makes it nice and tidy.
While I recogn
On May 26, 8:16 am, Stuart Halloway wrote:
> If you are a user of clojure.contrib.string, please take a look at the
> proposed promotion to clojure [1]. Feedback welcome! It is my hope
> that this promotion has enough "batteries included" that many libs can
> end their dependency on contrib
On Wed, 26 May 2010 19:47:25 +0200
Peter Schuller wrote:
> > chomp => rtrim
> > (rtrim "foo\n") => "foo" is much more clear to me, plus it leaves the
> > door open for trim and ltrim functions should the need arise.
>
> I like this. And in general I often fine the entire trio useful, and
> adopt
> Personally, I like the lstrip/strip/rstrip, but that's just because
> I'm used to them.
strip is fine too IMO; I'm neutral between *strip and *trim.
--
/ Peter Schuller
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send e
On May 26, 10:29 am, Fogus wrote:
> I have mentioned my gripes in the IRC, but for public view I would
> love better names for chomp and chop. In isolation those names are
> meaningless, so I suggest:
Almost every name in a programming language is meaningless in
isolation. But we don't work in
> "chomp" has a clear meaning to anyone who's touched Perl/Ruby/shell-
> scripting.
Believe me I can sympathize with this, but just because they are well-
known to some doesn't mean that they are good names. On that note,
just because rtrim and less make sense to me... you know the
rest. :-)
:f
I'm preparing a presentation about asynchronous concurrency in
Clojure, and I'm planning on talking a bit about how Clojure's
constructs make good, sensible use of Java's concurrency libraries. My
question is about clojure.lang.Agent. In the doRun method, I'm missing
what prevents a race condition
If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be
better to call them triml, trim, trimr so that they show up next to
each other in the alphabetized documentation?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this grou
On Wed, 2010-05-26 at 13:57 -0400, Mike Meyer wrote:
> On Wed, 26 May 2010 19:47:25 +0200
> Peter Schuller wrote:
>
> > > chomp => rtrim
> > > (rtrim "foo\n") => "foo" is much more clear to me, plus it leaves the
> > > door open for trim and ltrim functions should the need arise.
> >
> > I lik
> question is about clojure.lang.Agent. In the doRun method, I'm missing
> what prevents a race condition in the updating of the agent's state
> variable.
Unless I am misunderstanding the context in which the code runs, I
believe it is correct because doRun() is guaranteed never to run
concurrentl
Good point Ben. That change was obviously ill-conceived.
On May 25, 7:16 am, B Smith-Mannschott wrote:
> On Mon, May 24, 2010 at 05:41, Drew Colthorp wrote:
> > A few weeks ago I announced a pattern matching library called
> >matchure. I'm excited to say it's being merged into clojure.contrib as
This thread has potential to be the longest thread of clojure mailing list!
personally, I like strip or trim than chomp/chop.
On Wed, May 26, 2010 at 2:08 PM, Fogus wrote:
> > "chomp" has a clear meaning to anyone who's touched Perl/Ruby/shell-
> > scripting.
>
> Believe me I can sympathize wit
> personally, I like strip or trim than chomp/chop.
>
+1
Seeing how Clojure dropped/changed many classic Lisp monikers, there
is no reason to use comp/chop which may be familiar to somebody with
Perl/Python but confusing to others.
--
You received this message because you are subscribed to the
Thanks to sids, the project now has lein todo functionality.
--
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 - please be patient with your
fi
I've done Perl coding and I still mix up chomp and chop. The meaning
of trim, ltrim, and rtrim is immediately clear to me.
trim, ltrim, and rtrim could take an optional argument for characters
to strip:
(rtrim foo) ;; strip trailing whitespace
(rtrim foo "\r\n") ;; equivalent to chomp
If
> Unless I am misunderstanding the context in which the code runs, I
Which I was. Please ignore my previous post (sorry, think before I
post... think before I post...) and consider me joined in the OP's
question.
--
/ Peter Schuller
--
You received this message because you are subscribed to th
Very cool.
The website doesn't say... how was/is the Clojure/core team selected?
Are they all Relevance employees, or freelance? Do you plan on ever
bringing more people on board? Although I'm not quite as qualified as
some of the others, that's something I'd potentially be very
interested in, par
>> Unless I am misunderstanding the context in which the code runs, I
>
> Which I was. Please ignore my previous post (sorry, think before I
> post... think before I post...) and consider me joined in the OP's
> question.
And every time this happens I wonder if I should just leave it to
avoid floo
Clojure is not a great choice for this. It's oriented as a programming
language, not a database. It doesn't have any built-in persistence
mechanisms, and while it has many virtues, it's a little bit of a
memory hog. That isn't really what you want in an in-memory DB.
For anything more than a toy a
The people have spoken! The trims have it!
Stu
I've done Perl coding and I still mix up chomp and chop. The meaning
of trim, ltrim, and rtrim is immediately clear to me.
trim, ltrim, and rtrim could take an optional argument for characters
to strip:
(rtrim foo) ;; strip trailing whitespace
On May 26, 12:42 pm, Sean Devlin wrote:
> I'd like to see a specific proposal for replace & replace-first.
> Stuart Sierra put a lot of effort into getting those fns the way they
> are in contrib, and we should be careful to not undo any lessons
> learned in the process.
Yes, originally replace a
Hi!
I have some suggestions about transients (btw. the http://clojure.org/transients
is not linked from http://clojure.org).
Maybe before you give up reading the whole post I will post as first
the digression:
vars binding and transient are similar, however in the first case we
have thread isolat
Thanks for your post, Peter. I'm tracing the code, and it's
interesting.
The interesting point is definitely the agent's aq member, the
AtomicReference that wraps an ActionQueue.
The aq.compareAndSet call keeps the value of the ActionQueue from
switching out form under us while we attempt to set
> Where is Action's execute method called in the event the queue is not
> empty?
If the agent's queue was non-empty from the perspective of enqueue(),
that means one of the following is true:
(1) A previous enqueue() has already scheduled the execution of an
action, but it has not yet begun runni
OK, chouser gave me the explanation on IRC. It's amazing that we can
pop into #clojure and there's one of the two people who've touched
this file. Thanks, chouser!
The compareAndSet (CAS) that protects the agent's queue from
overlapping updates forces the agent's actions into serial execution.
Whe
Thanks for the explanation, Peter, and for accompanying me on this
journey into the unknown. Your description of enqueue is what chouser
explained to me too.
Someday I have to write some code with a queue named eat so that eat
will pop itself.
Cheers,
Michael
On May 26, 5:54 pm, Peter Schuller
Hi all,
The instructions on the labrepl git page says to "download missing
dependencies" of the labrepl. For some reason I cannot download them
in NetBeans running on Ubuntu 10.04. Can I also just download them
manually one by one? If so, what, specifically, are the dependencies
that the labrepl re
Hi all,
Inspired by Erik above, I've written a macro: gen-class+javadoc
(http://gist.github.com/415269).
It works quite well for me on Windows XP. For *nix, I think people
will have to make at least one change - the shell command (at line
57).
What it does -
1. Generates a javadoc for your API
Hi Harrison.
Welcome!
I am not familiar with netbeans but reading the labrepl instructions
it appears that dependencies will auto resolve.
Is there an error? Any more info?
On May 26, 5:34 pm, Harrison Maseko wrote:
> Hi all,
> The instructions on the labrepl git page says to "download missin
Mark Engelberg writes:
> If you're developing a trio, like ltrim, trim, rtrim, wouldn't it be
> better to call them triml, trim, trimr so that they show up next to
> each other in the alphabetized documentation?
+1 for modifiers at the end
Let's not forget those of us who search for functions u
Harrison,
Use leiningen (http://github.com/technomancy/leiningen) and then run
"lein deps" at your command line.
--
Paul Hobbs
On Wed, May 26, 2010 at 11:34 PM, Harrison Maseko wrote:
> Hi all,
> The instructions on the labrepl git page says to "download missing
> dependencies" of the labrepl.
Hey everyone. I was playing around with the protocols/deftype stuff
and ran into a weird NullPointerException when calling the satisfies?
function. Seems to only happen with a java.lang.Object instance.
Clojure 1.2.0-master-SNAPSHOT
user=> (defprotocol Greeter (greet [this]))
Greeter
user=> (satis
53 matches
Mail list logo