Hi,
Am 07.03.2009 um 07:11 schrieb Stephen C. Gilardi:
let* is an an internal implementation detail that supports the special
form let. let* does no destructuring.
And one might add, that let* is not part of the public API
and should not be used directly.
Sincerely
Meikel
smime.p7s
Descri
BTW Clojure has a future macro (and future-call function) now.
--~--~-~--~~~---~--~~
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
To unsubscribe from this g
Ok, so I ended up doing this in my code:
String resource = "/exmentis/rules_main.clj";
InputStream is = getClass().getResourceAsStream(resource);
String script = ... read in is as a String (like slurp) ...
StringReader r = new StringReader(script);
clojure.lang.Compi
Cool!
On Fri, Mar 6, 2009 at 5:35 PM, Dimiter malkia Stanev wrote:
>
> Thanks! Realized that a bit too late (Looked into the pmap source
> code, but that's about it).
>
> I've split my job decision roughly 1000 x 1000 - now I'm getting 8
> times speedup, on 8 core machine:
>
> (reduce +
>
java.util.IdentityHashMap
On Sat, Mar 7, 2009 at 1:49 AM, Mark Engelberg wrote:
>
> Is there a variation of hash-map which supports comparison of keys
> using identical? rather than = ? Ditto with sets.
>
> >
>
--~--~-~--~~~---~--~~
You received this message beca
On Sat, 2009-03-07 at 05:43 -0800, max3000 wrote:
> Ok, so I ended up doing this in my code:
>
> String resource = "/exmentis/rules_main.clj";
> InputStream is = getClass().getResourceAsStream(resource);
> String script = ... read in is as a String (like slurp) ...
> Strin
Hello,
Sometimes, one wants to answer to an event by starting a (potentially long)
computation in the background.
But if the same event is received again, one may want to stop the
computation currently running in the background, and relaunch one in the
background with newest data.
Is this use cas
> Hello,
> Sometimes, one wants to answer to an event by starting a
> (potentially long) computation in the background.
> But if the same event is received again, one may want to stop the
> computation currently running in the background, and relaunch one in the
> background with newest data.
>
> Is there a variation of hash-map which supports comparison of keys
> using identical? rather than = ? Ditto with sets.
There is java.util.IdentityHashMap, but it is mutable.
What objects are you trying to store? The ideal in the Clojure world,
is that most objects are immutable.
Immutable
On Mar 6, 5:14 pm, Mark Volkmann wrote:
> What's the recommended way to use this library in code that is run
> outside a REPL to simplify stack traces so they focus on Clojure code
> instead of Java code?
Hi Mark,
I wrote that library so I could use it in test-is, so I'm not sure if
it will hel
I've added some Datalog material to the wiki:
http://code.google.com/p/clojure-contrib/wiki/DatalogOverview
On Wed, Feb 18, 2009 at 4:55 PM, Jeffrey Straszheim <
straszheimjeff...@gmail.com> wrote:
> Makes sense. That would work. It certainly looks cleaner.
>
>
> On Wed, Feb 18, 2009 at 4:51 P
Hi Mark,
Stuart might be referring to clj-backtrace:
http://github.com/mmcgrana/clj-backtrace
This library parses the Java exception information and renders it for
better readability, especially for elements in the trace corresponding
to Clojure code.
user=> (try ("foo") (catch Exception e (pst
On Mar 6, 10:35 am, levand wrote:
> Anyway, that's my process, and my frustrations. How do you all do it?
I use Emacs + SLIME on Linux. I have each project in a git
repository, including Clojure and all the other JARs it requires, with
a shell script to start the REPL with the appropriate class
On Mar 6, 9:47 am, lprefonta...@softaddicts.ca wrote:
> For us Clojure = less useless code lines = fast delivery
> = less test headaches = major success :
I agree 100%, although I have the unusual advantage of working alone.
The succinctness of Lisp with Java's library support is a perfect
co
On Sat, Mar 7, 2009 at 10:31 AM, Stuart Sierra
wrote:
>
> On Mar 6, 5:14 pm, Mark Volkmann wrote:
>> What's the recommended way to use this library in code that is run
>> outside a REPL to simplify stack traces so they focus on Clojure code
>> instead of Java code?
>
> Hi Mark,
>
> I wrote that
Dear Clojurians,
I'd like to announce release of LazyMap v2.2.
New in this release are:
* compatibility with lazy-seq changes
* LazyMapSeq now inherits from ASeq
* 100% reflection free
The release maybe found at the usual place:
http://kotka.de/projects/clojure/lazy-map.html
Sincerely
Me
The default character set on WinXP (which I use) is windows-1252
(cp1252). Check out http://www.rgagnon.com/javadetails/java-0505.html.
If I were to change my source file encodings to UTF-8 that would
probably get me some mileage. Of course, I would have to use an editor
that supports it and not
On Fri, Mar 6, 2009 at 7:51 PM, rzeze...@gmail.com wrote:
>
> I think good arguments have been made for "doto," but I must say I
> prefer "with" slightly more.
with can mean different things in different languages. In javascript,
it means the same thing as doto in clojure but in Python (and many
>
> Yes, but any library that requires third-party jars can't be used out of
> the box in contrib, and I think a language that doesn't support
> date-processing out of the box is at a severe disadvantage.
>
One of the primary reasons Clojure is on the JVM is to re-use Java
libraries. Date & Time
Here's why it would be useful to have the option of hash maps that use
identity...
Let's say my keys are rather long lists. Equality comparison will be
slow. But if I know that the keys are always the exact same long
lists (perhaps because I traversed the key sequence to find a key with
a certa
Anyone using IntelliJ or Netbeans as their primary development
environment, or is that stuff too experimental?
I've been using the Clojure-in-a-box setup for Windows, which was
absolutely instrumental in getting me to try out Clojure. But if I
keep downloading the latest versions of Clojure, it
Yes, that's a very good point. For example "with" in Common Lisp is
used also when dealing with external resources (with-open-file, etc.).
And also the point about other with- usages.
On Mar 7, 10:31 am, Dan wrote:
> On Fri, Mar 6, 2009 at 7:51 PM, rzeze...@gmail.com wrote:
>
> > I think good a
Depending on what you are doing perhaps you could use (hash x). This might
not be very helpful if you need to update keys frequently. However if
you're mostly doing lookups, then this would help quite a bit.
On Sat, Mar 7, 2009 at 3:44 PM, Mark Engelberg wrote:
>
> Here's why it would be useful t
On Mar 7, 3:44 pm, Mark Engelberg wrote:
> Here's why it would be useful to have the option of hash maps that use
> identity...
>
> Let's say my keys are rather long lists. Equality comparison will be
> slow. But if I know that the keys are always the exact same long
> lists (perhaps because
Most conventional object-oriented languages conflate data layout with
protocol, by gluing those two orthogonal concepts together in classes.
If you want the behavior provided by a class, you have to take the
data layout with it, and vice versa, even though the two things are
logically orthogonal,
The nearest equivalent to Haskell type classes in Clojure are
multimethods, but as Clojure is a dynamically typed language, the
compiler does not enforce the 'interface' defined by the multimethods.
In Clojure, I can't think of any way you could enforce such a contract
at compile time. Clojure is
On Sat, Mar 7, 2009 at 2:57 PM, Rich Hickey wrote:
> Identity is tested first in equality, if identical, equal, full stop.
> So if you are using identical and unique collections as keys you'll
> find them without a value-by-value comparison. If they are not
> present, it's unlikely you'll get a m
On Mar 7, 2009, at 8:30 PM, Mark Engelberg wrote:
>
> On Sat, Mar 7, 2009 at 2:57 PM, Rich Hickey
> wrote:
>> Identity is tested first in equality, if identical, equal, full stop.
>> So if you are using identical and unique collections as keys you'll
>> find them without a value-by-value comp
On Mar 7, 2009, at 8:30 PM, Mark Engelberg wrote:
But if the key is a long list, wouldn't it have to traverse the list
just to come up with the hash code for that list?
Yes, but only once. Since Clojure lists are immutable, their hash code
is calculated once and cached and the cache will ne
Howdy all,
I'm brand new to this scene (where scene means lisp, closure, linux,
and emacs), so apologies if this has been addressed. My goal is to
make sure I'm up to date before moving forward.
I set up my emacs/slime development environment like various tutorials
suggested, except I received t
I'm reading the Sequences chapter of Programming Clojure, and Stu
points out that split-with combines the semantics of take-while and
drop-while. But is there a function that does something similar with
"filter"? Namely, rather than simply filtering the elements of a
collection that satisf
There is separate in seq_utils in contrib.
On Sat, Mar 7, 2009 at 11:29 PM, David Sletten wrote:
>
> I'm reading the Sequences chapter of Programming Clojure, and Stu
> points out that split-with combines the semantics of take-while and
> drop-while. But is there a function that does something s
check the discussion with the subject, "time lies, even with doall". We
came up with something like the following, but some name change change
tweaks were suggested. This thing takes a pred and a collection and returns
a list of two collections -- one that passes the pred, and one that fails.
(d
Hi folks,
Whilst we are talking about monads, allow me to direct all and
sundry to:
http://www.mefeedia.com/tags/brian_beckman
Brian Beckman gives a very beautiful description about monads. I
find these tutorials very well done. I commend them.
Kev
On Mar 7, 12:19 am, Konrad Hinsen w
That's the beauty of this language - there are many ways to skin the cat!
Here's a version using reduce...
(defn filt-split [pred col]
(reduce (fn [[a b] x] (if (pred x) [(conj a x) b] [a (conj b x)]))
[[] []] col))
(filt-split even? [1 2 3 4 5 6 7 8])
[[2 4 6 8] [1 3 5 7]]
But when you look a
On Mar 7, 2009, at 7:17 PM, Adrian Cuthbertson wrote:
>
> That's the beauty of this language - there are many ways to skin
> the cat!
Hmmm...I'm not sure what I'll do with a skinless cat. :)
> Here's a version using reduce...
>
> (defn filt-split [pred col]
> (reduce (fn [[a b] x] (if (pred
On Mar 7, 2009, at 6:44 PM, e wrote:
> check the discussion with the subject, "time lies, even with
> doall". We came up with something like the following, but some
> name change change tweaks were suggested. This thing takes a pred
> and a collection and returns a list of two collection
> ...repeated creation of the ephemeral vectors isn't too expensive.
With Clojure, although it looks like the immutable vectors are being
re-created on each iteration, under the covers it's really just
pointers being updated and the operations are (about) as efficient as
a loop/recur method.
> .
On Mar 7, 5:43 pm, James Reeves wrote:
> The nearest equivalent to Haskell type classes in Clojure are
> multimethods, but as Clojure is a dynamically typed language, the
> compiler does not enforce the 'interface' defined by the multimethods.
>
> In Clojure, I can't think of any way you could
39 matches
Mail list logo