On Nov 28, 2010, at 9:07 PM, Jeremy Dunck wrote:
In Dec 2009, Rich asked the community to step up and support core
development -- and the community came through.
I'm interested in clojure, but not using it professionally yet. I was
wondering if funding for 2011 has already been worked out, or
On Dec 16, 2010, at 11:19 AM, Ken Wesson wrote:
> On Thu, Dec 16, 2010 at 8:17 AM, Stuart Halloway
> wrote:
>> I wrote:
>>> Breaking source compatibility with just about every single preexisting
>>> line of Clojure code out there is supposed to make our lives *easier*?
>>> I'd dearly love to kno
On Oct 20, 1:34 pm, cej38 wrote:
> This question leads into something that I read in Joy of Clojure (page
> 161 in the latest MEAP edition):
> "If you manage to hold onto the head of a sequence somewhere within a
> function, then that sequence will be prevented from being garbage
> collected. Th
On Oct 19, 7:38 pm, Phil Hagelberg wrote:
> On Tue, Oct 19, 2010 at 4:26 PM, Rich Hickey wrote:
> >http://contributing.openoffice.org/programming.html
>
> This is probably not a good example; the copyright assignment policy
> for OpenOffice has caused the active contributo
On Oct 19, 7:01 pm, Mike Meyer wrote:
> On Tue, 19 Oct 2010 15:51:17 -0700 (PDT)
>
> Mibu wrote:
> > The greatest impediment for me is having to sign a contract to
> > participate in an open source project. I understand Rich Hickey and
> > most of you guys live in t
On Oct 19, 12:04 pm, Wilson MacGyver wrote:
> How should we as users consume the libs under the new umbrella? Is it fair
> to assume that most of these would be also uploaded by the creator into
> clojars as new versions become available, thus using build tools like
> mvn, gradle, lein,
> etc to
We are taking several steps to improve contrib and the facilities used
to host Clojure development. The goal is to make it easier and more
desirable to work on the Clojure project, and encourage more libraries
to be developed within the project.
There are several impediments to people working in o
People frequently complain about Clojure's stack traces, and there are
now some enhancements in the master branch. In particular, there is a
new function in clojure.repl, pst, which prints a nicer stack trace of
the most recent (or a supplied) exception. It also has depth control.
pst is automatica
I'm pleased to announce today the release of Clojure 1.2.
http://clojure.org/downloads
For maven/leiningen users, your settings to get the beta from
build.clojure.org/releases are:
:dependencies [[org.clojure/clojure "1.2.0"]
[org.clojure/clojure-contrib "1.2.0"]
Th
On Aug 12, 2010, at 7:52 PM, Tim Daly wrote:
I find that I'm horribly confused at this point about what a
protocol "is". Can someone use some other comp. sci. terms to
define this idea? I thought of them as Java interfaces with
default methods but clearly I'm wrong.
Coming from CL, the best
On Jul 29, 11:51 pm, Ryan Twitchell wrote:
> Hi all,
>
> I noticed (with a very recent git pull) the following asymmetric
> behavior regarding = and records:
>
> (defrecord my-record [a])
>
> (def r (new my-record 1))
> (def s (new my-record 1))
>
> (= r s) ;; true
> (= s r) ;; tru
On Aug 3, 2:19 am, Daniel Kersten wrote:
> Can one not detect that a recursive call is a tail call and then transform
> the AST so that its iterative instead - ie, not use the stack besides for
> initial setup of local variables (which then get reused in each recursive
> tail-call). Isn't this h
On Jul 20, 12:19 pm, Sang Noir wrote:
> I'm really tickled by the reaction to this comment on places like
> reddit. Especially how all the Haskell apologists are rushing to the
> defense of their language even though it's obvious that no Haskell
> programmer UNDERSTANDS the language, especially
On Jul 6, 2010, at 8:02 PM, Michał Marczyk wrote:
On 7 July 2010 00:36, Greg wrote:
Again, even The Joy of Clojure points out that people use commas
with -> and ->> to indicate the location of the parameter.
I think that is a terrible practice and should be left out of the book.
Rich
On Jul 6, 2010, at 5:24 PM, Greg wrote:
This would be most likely java interop, ie. ->.
There the main arguments are 99% of the times the first or the last
ones. So -> or ->> will work
OK, so what happens when one of the functions takes it in the front,
and the other in the back?
Or wha
On Jun 29, 2010, at 3:54 AM, Mark Engelberg wrote:
On Sun, Jun 27, 2010 at 7:18 AM, Rich Hickey
wrote:
There are no extension points built on protocols in Clojure yet.
Delivering
protocols is step one, re-architecting the core abstractions in
terms of
protocols is still to come.
Rich
On Jun 29, 2010, at 1:47 AM, Mark Engelberg wrote:
Yes, that is disconcerting that clojure-contrib produces errors on
Windows (sigh, it often feels like Windows is a second-class citizen
when it comes to clojure), but that did the trick and allowed the
build to complete. Thanks for the tip.
S
On Jun 27, 2010, at 1:09 AM, Mark Engelberg wrote:
Is there a list somewhere of all the protocols built-in to Clojure
1.2's core that are available for extension?
There are no extension points built on protocols in Clojure yet.
Delivering protocols is step one, re-architecting the core
a
equiv, the revenge of num
The latest revision of primitive support is in the equiv branch. It
takes the approach of num, with no auto-promotion, and bigint
contagion, and adds several things to better support contagion. I
think contagion is the best way to continue to support polymorphic
On Jun 22, 2010, at 12:44 AM, Mark Engelberg wrote:
The new uber-loop is fantastic.
So I guess the main point still to be finalized is whether the default
arithmetic ops will auto-promote or error when long addition
overflows.
Playing around with the latest equals branch:
user=> (def n 92233
On Jun 20, 2010, at 12:57 PM, Luke VanderHart wrote:
I've been reading this thread, and there's good arguments being made
both ways - I've just been reading with interest. But after seeing the
factorial function that won't compile without hints/casts, I feel I
have to speak up.
I wrote a book
On Jun 19, 2010, at 1:05 PM, Tim Daly wrote:
(proclaim (speed 3) (safety 0))
is verbose? Telling the compiler in one place that you care
about boxing speed, such as (declare (x unboxed)) seems to
me to be a very direct way to tell the compiler to choose
+' vs + everywhere that 'x' occurs.
Th
On Jun 19, 2010, at 4:25 AM, Daniel wrote:
Checked out the new prim branch to repeat some tests.
user=> (defn ^:static fib ^long [^long n]
(if (<= n 1)
1
(+ (fib (dec n)) (fib (- n 2)
#'user/fib
user=> (time (fib 38))
"Elapsed time: 4383.127343 msecs"
63245986
That's certainly not
The hard error has been restored:
http://github.com/richhickey/clojure/commit/25165a9ccd1001fa7c4725a8219c4108803ae834
Rich
On Jun 19, 2010, at 2:03 AM, Mark Engelberg wrote:
I'm confused. In the latest scheme, what is the eventual plan for
handling a recur to a loop element that was initial
On Jun 19, 2010, at 6:41 AM, Heinz N. Gies wrote:
On Jun 19, 2010, at 4:12 , Rich Hickey wrote:
I have to say I'm in the 'pay for what you use' camp - you need a
box, you ask for one. If I don't (and neither do any of those
loops), why should I have to do extra work to
On Jun 19, 2010, at 6:39 AM, Jules wrote:
I know nothing about the JVM, but I do know that on x86 you can handle
fixnum -> bignum promotion fairly cheaply. You compile two versions of
the code: one for bignums and one for fixnums. After an arithmetic
instruction in the fixnum code you check if
On Jun 19, 2010, at 2:50 AM, Tim Daly wrote:
Is it possible to follow the Common Lisp convention
of proclaim/declaim/declare in order to specify types?
It would be possible of course, but undesirable. We're trying to avoid
that kind of verbosity.
Rich
--
You received this message becaus
On Jun 19, 2010, at 2:03 AM, Mark Engelberg wrote:
I'm confused. In the latest scheme, what is the eventual plan for
handling a recur to a loop element that was initialized with a
primitive? Are boxed numbers automatically coerced to the primitive?
Would a long be coerced to a double, or doub
On Jun 18, 2010, at 11:47 PM, dmiller wrote:
Yes, it's easy to imagine a world where people who want efficient
code
have to jump through hoops to get it. OTOH, you can just say (num
some-
expr) to force it to be boxed, if you want assurance of an Object
initializer. Which will be the more c
silent overflow of bit shifts
(pseudo random number generators). Will there be a way to disable
overflow exceptions (either via a binding or through unchecked-*
functions)?
Yes, bit-ops will be made to align with whatever is done here.
Rich
On Jun 18, 8:33 pm, Rich Hickey wrote:
Turnabout
On Jun 18, 2010, at 10:09 PM, Mark Engelberg wrote:
An idea to consider:
How about keeping the arbitrary-precision default, but add a loop'
construct to the family of +',-',*',inc', and dec' for primitive
optimization? The loop' construct would bind primitive literals,
whereas the loop constr
On Jun 18, 2010, at 9:52 PM, Aaron Cohen wrote:
I've also temporarily enabled a diagnostic (in both) that tells you
when you have a mismatch between a loop initializer and its recur
form. It goes off over a hundred times in Clojure itself, when using
the arbitrary precision default. In each cas
e. But removing that useless overhead would be a
lot of tedious work.
With the defaults swapped, only 2 warnings.
Pay for what you use ...
Rich
On Jun 18, 4:52 pm, Rich Hickey wrote:
> I've revised and enhanced the strategy, based upon the feedback here.
> I think it is a nice c
ommit/c79d28775e06b196ae1426f6c1446d00b621d2e1
Thanks to all for the feedback, keep it coming!
Rich
On Jun 17, 2010, at 4:13 PM, Rich Hickey wrote:
I've been doing some work to enhance the performance, and unify the
semantics, of primitives, in three branches. I've started to document
this wo
On Jun 18, 2010, at 10:09 AM, Christophe Grand wrote:
On Fri, Jun 18, 2010 at 2:49 PM, Rich Hickey
wrote:
This L suffix idea is a non-starter. Here's why:
We're in a reader based language. The reader reads objects. When
the reader
reads 42, it must return an object. It cannot
On Jun 17, 2010, at 11:57 PM, Mark Engelberg wrote:
Thanks for the responses.
Going back to the naive factorial function:
(defn fact [n]
(if (zero? n) 1 (* n (fact (dec n)
Right now,
user=> (fact 40)
8159152832478977343456112695961158942720
Under the proposed changes,
user=> (fa
On Jun 18, 2010, at 8:56 AM, Konrad Hinsen wrote:
On 18.06.2010, at 14:49, Rich Hickey wrote:
I don't see a way around this fundamental dichotomy. The semantics
for + should be unified, and the operator that makes the other
choice needs to be called something else, or placed some
On Jun 18, 2010, at 6:47 AM, Carson wrote:
Just tried out num branch and I really like how easy it is to be
fast! However...
Consider:
(defn fact [n] (if (zero? n) 1 (* n (fact (dec n)
(defn twice-fact [n] (fact (fact n)))
(defn bad-twice-fact [n] (fact (-> n fact range last inc)))
user
On Jun 18, 2010, at 1:23 AM, Mark Engelberg wrote:
On Thu, Jun 17, 2010 at 9:20 PM, David Nolen
wrote:
The problem is that it distinctly *not* easy to write fast numeric
code in
Clojure. It requires expert Clojure knowledge.
Right, but with just the prim branch and a shorthand for long
On Jun 17, 2010, at 9:55 PM, Mark Engelberg wrote:
It's great to be discussing the possibility of enhanced primitive
support.
I like most of the proposals. But this part troubles me:
# For bigints, specify bigints
* new literal bigint format 42N
# bigints contagious, no more auto-reduct
On Jun 17, 5:10 pm, Rob Lachlan wrote:
> I think the enhanced support for primitives is fantastic. I'm looking
> forward to doing more numerical work in clojure.
>
> Quibble: Using a multiple-recursive algorithm for calculating
> fibonnaci values.
>
> user> (defn fib-2 [n] (if (>= n 1)
>
I've been doing some work to enhance the performance, and unify the
semantics, of primitives, in three branches. I've started to document
this work here:
https://www.assembla.com/wiki/show/clojure/Enhanced_Primitive_Support
Feedback welcome,
Rich
--
You received this message because you are su
On Jun 3, 9:28 am, Laurent PETIT wrote:
> Hi,
>
> 2010/6/3 Christophe Grand
>
>
>
>
>
> > On Thu, Jun 3, 2010 at 1:56 PM, Laurent PETIT
> > wrote:
> > > If I understand things well, one problem with ruby monkey patching is
> > that
> > > if a library I use opens a class C and adds a method who
On May 27, 1:10 am, Allen Johnson wrote:
> 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=> (de
On May 26, 5:13 pm, Michael Jaaka
wrote:
> Hi!
>
> I have some suggestions about transients (btw.
> thehttp://clojure.org/transients
> is not linked fromhttp://clojure.org).
>
> Maybe before you give up reading the whole post I will post as first
> the digression:
> vars binding and transient a
On May 26, 4:18 pm, Luke VanderHart wrote:
> Very cool.
>
> The website doesn't say... how was/is the Clojure/core team selected?
Everyone was selected by me and Stu, and vetted by Relevance's normal
interview process. Some of the criteria:
(1) A history of demonstrated ability in Clojure and c
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
On May 25, 11:18 am, Michael Gardner wrote:
> On May 25, 2010, at 7:30 AM, Rich Hickey wrote:
>
> > Note: clojure.com will now resolve to the Clojure/core site. Come
> > check it out!
>
> Does this mean Clojure itself is to be directly associated with Relevance,
> I
On May 25, 9:38 am, Peter wrote:
> Hi Rich,
>
> Still can't reply on that thread, but I was able to start this one.
>
> "MVCC history in Clojure's STM is dynamic, created by need. There
> is no
> read tracking, and more important for this case, no transaction
> tracking."
>
> What's
I'm happy to announce Clojure/core, a joint endeavor between myself
and Relevance, Inc. Clojure/core is a specialized technical practice
within Relevance, focused on Clojure. Featuring myself and Stuart
Halloway as advisors, the team also includes Clojure experts such as
David Liebke (Incanter), S
On May 4, 2010, at 9:30 AM, Nicolas Oury wrote:
Dear all,
Is there an equivalent of commute without return value?
A part of the usage of commute just want to change something without
knowing the result.
(For example, I want to extend a set).
I know it is not very expensive but computing twic
On May 3, 2010, at 10:26 PM, lprefonta...@softaddicts.ca wrote:
Hi all,
it's not that I want to put pressure on anyone here but there has
been a number
of discussions about the 1.2 release and I was wondering what's the
horizon for
a first release ?
We are still in prod with 1.0 but some
On Apr 29, 2010, at 4:21 AM, ataggart wrote:
I know it won't matter, but for posterity if nothing else...
Functions named contains-key? and contains-val? would make a lot more
sense to me than the current contains? and new seq-contains?. Anyone
looking at contains-val? should expect it to be
On Apr 29, 2010, at 1:57 AM, Meikel Brandmeyer wrote:
Hi,
On 29 Apr., 01:43, Stuart Halloway wrote:
I'll wait for Rich to maybe chime in on seq-contains?. Other than
seq-
contains? are people liking the new fns? Anybody having issues we
didn't anticipate?
I was a little bit surprised ab
On Apr 28, 7:17 pm, Douglas Philips wrote:
> On 2010 Apr 28, at 6:55 PM, Stuart Halloway wrote:
>
> > Specializations are available where there is a clear use case, e.g.
> > contains?, peek (instead of last), disj, etc.
> ...
> > Tying to concrete types is limiting. *Never* having special purpo
On Apr 27, 2010, at 2:45 PM, Sean Devlin wrote:
You're right, inserting into a vector is fundamentally slow.
Inserting into a list (must traverse elements) or String (Char Array)
isn't any better. I get why Clojure doesn't include certain
operations on certain data structures (e.g. assoc on a
On Apr 27, 10:00 pm, Richard Newman wrote:
> Further to IRC conversations:
>
> I'm attempting to generate a JAX-WS service using Clojure. The main
> stumbling block was annotations; that's been removed, so I gave it a
> shot using deftype.
>
> My first strike works code-wise, so I sent it to
On Apr 27, 2010, at 3:20 AM, Mark Engelberg wrote:
Watching Stuart's tutorial, it looks like the automatic factory
functions for deftypes have gone away (I'm still working with Clojure
1.1, so haven't had a chance to try the latest changes for myself).
I'm going to miss that feature, especially
On Apr 13, 2010, at 9:37 AM, Dan wrote:
I'm a Java developer; I work on a project that has adopted Clojure's
data structures as a convenient implementation of immutable sets,
maps, etc. In attempting to add type parameters to the Clojure
interfaces, I noticed a conflict in the definition of
IP
On Apr 24, 2010, at 1:11 PM, Richard Newman wrote:
Neither of those attributes reveal information about the
implementation of the objects in question. They both reveal
information about the state that some client could find useful. They
are both values that, if not directly available from the o
On Apr 23, 2010, at 11:48 PM, Mark Engelberg wrote:
A few meandering observations:
I like the latest change to include a this argument. It makes the
number of arguments line up which is a good thing.
I like the idea of defrecord for the common case, rather than having
to request default impl
On Apr 25, 2010, at 8:33 PM, John wrote:
I got no response since I posted the previous message. Should I be
posting bugs to assembla space instead of here ?
Yes, please create an issue.
Do I need to be a
member to do that ?
No, you can use the support tab if you are not a member.
Note t
I've started adding some support for Java annotations, as of this
commit:
http://github.com/richhickey/clojure/commit/fa899d22dceb531d9f5af833ac6af0d956e6bdc7
Example of use:
http://gist.github.com/377213
It supports annotations for definterface/type/record types (put in
metadata on type name),
On Apr 22, 2010, at 1:30 PM, Mark Engelberg wrote:
I tried using deftype relatively recently, but realized it wouldn't
work for my needs because serialization via *print-dup* wasn't yet
implemented. I'd recommend including this with the 1.2 release (or is
there a new recommended way to seriali
On Apr 23, 2010, at 3:12 AM, Konrad Hinsen wrote:
On 22 Apr 2010, at 21:15, Konrad Hinsen wrote:
I have several former deftypes that are a perfect fit for the new
defrecord, except that they need a specific comparison function.
This is usually for excluding some fields from equality testin
On Apr 22, 2010, at 3:15 PM, Konrad Hinsen wrote:
On 22.04.2010, at 18:53, Rich Hickey wrote:
Feedback and errata welcome as always,
One feature in the deftype/defrecord split that I regret is that
defrecord no longer allows the redefinition of equals and hashCode.
Any attempt to
I have been doing some work cleaning up the design and implementation
of datatypes and protocols in preparation for the 1.2 release. Some
notable changes for those who have been working with the earlier
versions:
deftype/reify now take an explicit 'this' argument in method sigs.
The :as option is
On Apr 20, 2010, at 1:33 PM, John wrote:
Yup, you're definitely right Daniel. Everyone's comment on the subject
was very helpful and gave us all insight into the internals of
Clojure. I guess the key points to learn in our case is:
1- Clojure supports primitives, but only when you ask for them
On Apr 17, 2010, at 3:50 PM, B Smith-Mannschott wrote:
On Sat, Apr 17, 2010 at 21:32, Stuart Halloway
wrote:
It's almost certainly the commit that added the InternalReduce
protocol:
5b281880571573c5917781de932ce4789f18daec.
I am slowly pounding my skull against this and would welcome any
On Apr 12, 7:53 pm, Stuart Halloway wrote:
> Hi Edmund,
>
> This is a regression since last Tuesday's commit
> f81e612cc9ff91ddefc1d86e270cd7f018701802. Thanks for catching it!
>
> Stu
>
>
>
> > Dear Clojurians,
>
> > I have been trying to get a proper grip on the operation of lazy-
> > seq
On Apr 1, 2010, at 7:37 AM, Konrad Hinsen wrote:
On 1 Apr 2010, at 13:04, Meikel Brandmeyer wrote:
Clojure being still young and in flux at certain areas doesn't
contradict a currently valid, authoritative documentation. It may be
that the list for allowed characters in a symbol is extended a
On Mar 23, 10:13 am, Stuart Halloway
wrote:
> The labrepl project (http://github.com/relevance/labrepl) is a
> tutorial environment for learning Clojure. It is open source under the
> same license as Clojure. Whether you are learning Clojure on your own,
> or teaching or learning in a clas
On Mar 23, 2010, at 10:13 AM, Stuart Halloway wrote:
The labrepl project (http://github.com/relevance/labrepl) is a
tutorial environment for learning Clojure. It is open source under
the same license as Clojure. Whether you are learning Clojure on
your own, or teaching or learning in a cla
On Mar 22, 2010, at 12:13 PM, Luc Préfontaine wrote:
I looked at these videos and they are a very good starting point.
Then do we have a communication problem getting these things known ?
Are these videos listed on the "Getting started" page ?
They are now:
http://clojure.org/getting_started
all Java 1.5 on the
build.clojure.org server and force it to be the default.
-SS
On Mar 22, 8:48 am, Rich Hickey wrote:
On Mar 21, 2010, at 8:50 PM, Stuart Sierra wrote:
No, but you can change the configs and recompile.
Clojure itself uses Ant, so "ant" on a machine with on
On Mar 22, 10:54 am, Stuart Halloway
wrote:
> >> The questions below refer to the gist
> >> athttps://gist.github.com/336674/9ab832a86d203731c6379404d20afded79fe5f5b
> >> and to protocols in general:
>
> >> (1) Clojure automatically types hints the first argument when
> >> extending a protoc
On Mar 21, 2010, at 8:50 PM, Stuart Sierra wrote:
No, but you can change the configs and recompile.
Clojure itself uses Ant, so "ant" on a machine with only Java 1.5
should do the trick. To install that custom JAR in your local Maven
repository, download the "Maven Ant Tasks" JAR and run:
ant
On Mar 21, 2010, at 8:29 AM, Andrzej wrote:
On Sun, Mar 21, 2010 at 6:37 PM, Jarkko Oranen
wrote:
Rich has done some work on using the JDK7 ForkJoin Library to
parallelise map and reduce over vectors, since they are already
internally structured as trees. It hasn't been touched in a while,
On Mar 20, 2010, at 3:56 AM, Stuart Halloway wrote:
The questions below refer to the gist at https://gist.github.com/336674/9ab832a86d203731c6379404d20afded79fe5f5b
and to protocols in general:
(1) Clojure automatically types hints the first argument when
extending a protocol to an interfa
On Mar 20, 2010, at 2:50 PM, cageface wrote:
So will deftype/protocol be the recommended, idiomatic way to
implement ADTs in Clojure 1.2?
Yes.
Will the current map/struct based
approaches essentially be deprecated?
These are two different things. deftypes will work fine with map-based
On Mar 10, 3:53 pm, Brian Hurt wrote:
> In a recent clojure:
>
> user=> (class 2147483647)
> java.lang.Integer
> user=> (class (inc 2147483647))
> java.math.BigInteger
> user=> (class (inc (inc 2147483647)))
> java.lang.Long
> user=>
>
> This isn't *technically* a bug, but it is an odd behavior.
On Mar 4, 2:56 am, TimDaly wrote:
> For the other groups that I subscribe to, the email subjects are
> always prefixed with the group name, e.g.
>
> Re: [sage-devel] This is the mail subject
>
> This makes it possible to reliably group the emails into folders.
> Is it possible to do the same for
On Mar 1, 11:32 am, Kevin Archie wrote:
> How close are we to a recommended programming style for Clojure? When
> there is more than one way to do something, should I emulate the style
> in core.clj?
>
> The situation that brought this up: I notice that in core.clj, the
> default clause for a co
On Feb 23, 12:51 am, "Edward Z. Yang" wrote:
> I'd first like to state that I went into this exercise expecting
> Bagwell's Hash Array Mapped Tries to blow the competition out of the
> water; I'd get a fast functional map and give it to Haskell and people
> would rejoice.
>
> Instead, I found a
On Wed, Feb 17, 2010 at 3:27 AM, Tom Faulhaber wrote:
> The autodoc robot that builds the API docs choked sometime after the
> merge of the new branch into master and the clojure and clojure-
> contrib API documents haven't been updating for the past 6 weeks or
> so. This has been unfortunate bec
On Mon, Feb 15, 2010 at 8:45 AM, George . wrote:
> Currently, if you want to perform a range query on a sorted-seq (AKA
> PersistentTreeMap), you are are advised to use the subseq wrapper for
> seqFrom.
>
> For instance, let's say your keys are dollar values you could do (subseq
> my-map > 30) to
On Mon, Feb 15, 2010 at 3:56 AM, Konrad Hinsen
wrote:
> On 14.02.2010, at 22:48, Mark Engelberg wrote:
>
>> Actually, the more I think about it, the more I feel like deftype's
>> "specify clojure.lang.IPersistentMap as an interface with no
>> implementation, and you'll get a default implementation
On Mon, Feb 1, 2010 at 2:42 AM, Moss Prescott wrote:
> Hi,
>
> As a very green Clojure user and a big fan of persistent data
> structures, I'm struggling to grasp the significance of transients in
> Clojure 1.1. In particular, the implementation seems to be less safe
> and less consistent than it
On Wed, Feb 3, 2010 at 8:27 AM, James Reeves wrote:
> Hi folks,
>
> Mark McGranaghan and I have recently been working on new functionality
> for Ring, a web application library for Clojure. Ring is similar to
> Rack on Ruby, and provides a simple, functional interface for handling
> HTTP requests.
On Fri, Jan 29, 2010 at 9:40 AM, Chouser wrote:
> On Fri, Jan 29, 2010 at 8:44 AM, Rich Hickey wrote:
>> On Fri, Jan 22, 2010 at 8:57 AM, Chouser wrote:
>>> On Thu, Jan 21, 2010 at 10:11 PM, Sean Devlin
>>> wrote:
>>>> Sometimes you don't want a
On Fri, Jan 29, 2010 at 8:53 AM, Sean Devlin wrote:
> The following doesn't currently work:
>
> user=> (assoc [] 1 :a)
> #
>
But this does:
user=> (assoc [] 0 :a)
[:a]
> So I say this should be map only.
I don't think so.
> Also, what do you mean by your question "Where would the default go"
On Jan 29, 9:04 am, Sean Devlin wrote:
> Rich,
> Your example didn't support a variadic signature. Is that the long
> term plan?
>
It's the short term plan. Let's see if there's any real need for more
than three. I've never needed more than one.
Rich
--
You received this message because you
On Fri, Jan 22, 2010 at 4:55 PM, ataggart wrote:
>
>
> On Jan 22, 1:30 pm, samppi wrote:
>> This is not a big deal: it is a quibble with a weird and inconvenient
>> behavior of list*: when given an empty sequence, it returns nil
>> instead of the empty list. Why is this? According to list*'s
>> d
On Fri, Jan 22, 2010 at 4:19 PM, Andreas Wenger
wrote:
> Hi,
>
> I read that deftype is often a better replacement for gen-class and
> defstruct. Indeed, it would fit for my purposes very well, except the
> following problem: deftype does not (yet?) use all the information
> from type hints.
>
> S
On Dec 30 2009, 6:18 am, Timothy Pratley
wrote:
> On Dec 13, 1:24 am, Rich Hickey wrote:
>
> > fnil seems to me to have greater utility than patching all functions
> > that apply functions with default-supplying arguments.
>
> Neat :) I like it.
>
> > The get-i
On Fri, Jan 22, 2010 at 5:41 PM, Raoul Duke wrote:
> hi,
>
> if i have (deftype map-db [next-id id-to-item-map]) i have to then do
> (map-db 0 {}) any time i want to make a new one. it would be nice to
> be able to add a function in my deftype so i could use (map-db) to get
> the same effect.
>
>
On Fri, Jan 22, 2010 at 6:58 PM, Raoul Duke wrote:
>> So you just need to instead use (new Trec (+ 1 v)).
>
> thanks! that does work for me, too.
>
> (i'm hoping Clojure will be able to avoid having to do it that way in
> the long run.)
>
That's as designed, and documented.
Rich
--
You receive
On Fri, Jan 22, 2010 at 8:57 AM, Chouser wrote:
> On Thu, Jan 21, 2010 at 10:11 PM, Sean Devlin
> wrote:
>> Sometimes you don't want assoc-in to create a hash-map. Sometimes you
>> wish it could create a sorted map.
>>
>> Just finished working on something with Alexy Khrabrov & Chouser on
>> IR
On Thu, Jan 21, 2010 at 2:51 AM, Raoul Duke wrote:
> hi,
>
> in the repl when i (use 'foo) vs. (use :foo) they both return nil, so
> it doesn't help me know that the former is right and the latter isn't.
> i think. would it be sensible for use to return true or something more
> positive than nil i
On Thu, Jan 21, 2010 at 7:57 AM, Jacek Generowicz
wrote:
> Clojure has a Ratio type; presumably there should be an easy way to
> find the numerator and denominator of a Ratio object.
>
> I didn't have much luck on clojure.org or with find-doc, but
>
> (show 1/2)
>
> taught me that there are num
101 - 200 of 1221 matches
Mail list logo