This problem came up on the mailing list recently:
http://groups.google.com/group/clojure/browse_thread/thread/5e0c078d0ad8b8bc#
You might want to compare your code to what was done here, but at a
glance the implementations are similar.
You provide relative speed comparisons (Such and such is %
Hello,
In order to understand the agent model of Clojure
better I wrote the alioth shootout threadring benchmark [1].
I ran some tests to compare it with the Java and Scala
implementation [2, 3] which I picked from the published
benchmarks.
The clojure code can be found here:
http://gist.github.
or use a digital signature service such as the one reported here:
http://www.techcrunch.com/2009/05/29/make-your-mark-rightsignature-lets-you-sign-documents-online-or-on-your-iphone/
servus,
Ray
On Jun 6, 12:16 am, Phil Hagelberg wrote:
> Frantisek Sodomka writes:
> > As a general rule to con
> I am dealing w/ some performance constraints in the current
> implementation of my application.
More information, please. What in general is your app? What are the
specs of your machine? What kind of data does your app deal with?
> So, although Clojure offers some
> features that would solv
"Stephen C. Gilardi" writes:
> I've attached a patch to allow namespace qualification. I wonder if we
> should treat the "def" prefix in every namespace like we treat "with-"
> after this patch. (Right now it's only allowing an optional namespace
> of "clojure".) I'll be happy to provide a patch
Try also visualvm (comes with jdk 1.6 )
https://visualvm.dev.java.net/
Boris
On Fri, Jun 5, 2009 at 5:22 PM, Jonah Benton wrote:
>
> Hi Robert,
>
> I haven't been able to dig into Clojure/JVM/GC details, so I can't
> speak in particular about problems e.g. with the ants application, but
> there
Hi Robert,
I haven't been able to dig into Clojure/JVM/GC details, so I can't
speak in particular about problems e.g. with the ants application, but
there are few useful conclusions that one can draw from a JVM's RSS
and VIRT. It's unfortunate, but in general, Java app memory behavior
can't be re
I just took a quick look, but string-to-seq can be defined as (re-seq
#"\S+" string), and similarly for string-to-map.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email
On Jun 5, 2009, at 5:18 PM, Phil Hagelberg wrote:
My implementation only works when the with- form is referred in the
current namespace, but you could fix that with a little more regex
tweakage.
Thanks, it's working great.
I've attached a patch to allow namespace qualification. I wonder if w
On Fri, Jun 5, 2009 at 2:09 PM, Ragnar Dahlén wrote:
>
> This turned out to be problematic since a couple of the commands have
> the same names as some clojure.core functions, most notably get and
> set.
>
> I solved this by checking if *ns* already contained a mapping for the
> name, and if so,
Thank you very much Phil. That fix worked perfectly.
-Patrick
--~--~-~--~~~---~--~~
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 me
Does anyone know what the functional difference is between
clojure-indent-function and common-lisp-indent-function ? Or even the
cl-indent:function from slime ?
I assume there is a difference, I just don't know what it is.
Cheers,
Chris Dean
--~--~-~--~~~---~--~---
"Stephen C. Gilardi" writes:
> (my-cool-database-operation the-database
> (arg-exp-1 with operands)
> literal-arg
> angstroms)
>
> There doesn't seem to be an easy way to distinguish these two types of
> initial operands (or the N-2 other types I've missed). "with-*" would
> probably seldo
I have a function to get the path out of a lucene searcher
(documentation at
http://lucene.apache.org/java/2_3_2/api/core/org/apache/lucene/search/IndexSearcher.html).
The searcher has a Reader, which has a Directory. The Directory is
abstract, but in my case I know that it's a FSDirectory, so I
"Stephen C. Gilardi" writes:
> While I often like lining up all the arguments generally, it is the
> one thing that I "fix" manually from time to time when the loss of
> horizontal real estate becomes too great to tolerate.
>
> One possible improvement would be to change clojure-mode so that
> "
On Jun 5, 2009, at 4:35 PM, Stephen C. Gilardi wrote:
What are the downsides to always indenting list contents that start
on a new line as indented 2 (possibly optionally 1) from their
opening paren?
Playing with this some, I see that when all the arguments to the
function are equal in s
Honestly, I really don't like indenting to align with the first
argument. The only case where that seems sensible is for functions
where the arguments have equal importance/characteristics.
eg. (bit-and GL_DEPTH_BUFFER_BIT
GL_COLOR_BUFFER_BIT)
But this situation rarely comes about in m
It would be nice if (doc) adapted to the type of thing (function,
etc.) that is being displayed, that nil (where parameters would
normally show) is ugly. Very low priority, of course.
On Thu, Jun 4, 2009 at 8:26 PM, Chouser wrote:
>
> On Thu, Jun 4, 2009 at 8:31 PM, Howard Lewis Ship wrote:
>>
>
On Jun 5, 2009, at 3:52 PM, Phil Hagelberg wrote:
You may be able to customize the indentation to behave differently,
but
that's going to be even worse than using define-clojure-indent with
regard to consistency when other people contribute to your project.
Any
time you stray from the stan
CuppoJava writes:
> Is there anyway to turn off the feature completely? I don't mind at
> all if my arguments are not aligned with the first one, and I don't
> want to maintain a elisp file along with my clojure source.
Turn off what feature? You can rebind TAB to another function if you
want t
Thanks Phil for your help.
Heh, I'm still not used to seeing my words separated with dashes. I'll
switch over eventually. =)
Is there anyway to turn off the feature completely? I don't mind at
all if my arguments are not aligned with the first one, and I don't
want to maintain a elisp file along
CuppoJava writes:
> Hi fellow emacs users!
> I'm using Jeffrey Chu's Clojure-mode right now, and I'm wondering how
> I can turn off the "align with first argument" feature.
>
> A lot of my code currently looks like this:
> (with_draw_mode :raycast
> (with_blending
>
Thanks everybody for their help!
I solved the problem (almost) but only for my specific f(x,y), which
is enough for me for now. Paul Mooser's hint about accumulating state
was the key I needed. By introducing another accumulator I got my
color compositing to blend correctly from front to back.
T
Hello everyone,
I have spent a few days implementing a client library for Redis
(http://code.google.com/p/redis/), a key value storage system, that
is slightly more than 'just' a key value storage system.
My Lisp experience before Clojure is basically limited to a couple of
hundred lines of ELIS
Hi fellow emacs users!
I'm using Jeffrey Chu's Clojure-mode right now, and I'm wondering how
I can turn off the "align with first argument" feature.
A lot of my code currently looks like this:
(with_draw_mode :raycast
(with_blending
(with_palette_shader
> Simply stated, given that it stated clearly in this group that Clojure
> runs, on average, slower than the JVM, is the JVM's high memory-
> utilization a non-issue for the Clojure community as well?
For my part, I'm relatively happy with the jvm's performance. I agree
that the memory is usa
> As a general rule to contribute, you need to fill-in and mail the CA:
> http://clojure.org/contributing
It's in the mail today.
> Files in test_clojure represent different areas - feel free to take
> your pick and do whatever you like :-)
Great! Looking forward to getting started.
--~--~
Hi Robert,
Thanks for a thoughtful email!
> Simply stated, given that it stated clearly in this group that Clojure
> runs, on average, slower than the JVM, is the JVM's high memory-
> utilization a non-issue for the Clojure community as well?
In short: yes.
I'm only bothered by the JVM's memor
First, Clojure has renewed my interest in Java, specifically the JVM
and the plethora of available libraries. Clojure and Scala are the
kind of projects that inspire peoples' imaginations in a world that
they might otherwise overlook. Thank you, Rich Hickey.
However, I have some concerns that f
On Jun 5, 2009, at 11:40 AM, Laurent PETIT wrote:
> * OOSC: Object Oriented Software Construction ( general about object
> orientation, see http://archive.eiffel.com/doc/oosc/page.html )
Good book, although weak on the dynamic language side of things.
> * SICP: Structure and Interpretation of
Concepts of Programming Languages by Sebesta is a book that we used that as
the text for my comparative programming languages class. I haven't read
CTMCP, so I cannot compare. However, after taking that class during my
undergraduate, I couldn't believe that it was an elective! There should
definite
Sounds like a candidate for the daily WTF...
On Jun 5, 12:54 pm, Daniel Jomphe wrote:
> You guessed mostly right, Daniel :) This guy hashed some fields of his
> client's database, replacing the original content with its hashed
> version. I don't know everything, but he at least obfuscated the
>
You guessed mostly right, Daniel :) This guy hashed some fields of his
client's database, replacing the original content with its hashed
version. I don't know everything, but he at least obfuscated the
addresses. He (and the client who asked to "encrypt with MD5") thought
he was actually encryptin
Daniel,
I guess I have to ask... why do you need to do this in the first
place? :) Zip codes are already unique. Are you searching through data
where someone else MD5'd some zip codes to obfuscate them? Just curious.
—
Daniel Lyons
http://www.storytotell.org -- Tell It!
--~--~-~--~
Frantisek Sodomka writes:
> As a general rule to contribute, you need to fill-in and mail the CA:
> http://clojure.org/contributing
>
> When Rich receives your CA and updates the clojure.org website, you
> can start creating issues in clojure-contrib and attaching patches to
> it. Example:
> htt
Stuart, I took a second look at your suggestion. I integrated it
directly in my code, which became much more elegant as a direct
consequence. :) And it's a tiny, tiny little bit faster too. :)
(defn all-zips []
"Returns a lazy list of all possible American zipcodes."
(let [zips5 (zip-format
On Jun 4, 2009, at 4:37 PM, Meikel Brandmeyer wrote:
These are certainly valid thoughts. I'm not a Swing guru
coming from a non-Java background. Maybe your last
version is the best, though I'm not sure about the
queueing stuff...
Checked in:
http://code.google.com/p/clojure-contrib/s
Thanks for your replies.
Sean: Type-hinting the String didn't help. And for some reason, defn'd
function is 1.5x slower than my anonymous one.
Daniel: Thanks for the info. Once my algorithms are fine (if they can
get finer), I'll definitely narrow down the zips5 seed, and use your
suggested MD5 d
Oh! Sweet : )
On Jun 4, 6:29 pm, "Stephen C. Gilardi" wrote:
> On Jun 4, 2009, at 5:56 PM, Max Suica wrote:
>
> > But
> > (-> x identity) => (identity x) => x, so what our friend ozzi suggest
> > sounds pretty on the level.
> > If (identity x) is not equivalent to evaluating x, then, well, that'
Stephen,
Sorry I removed the question as you were answering, as we
determined our problem was exactly what you described, our own cause,
rather than anything to do with clojure.contrib. Still, thanks for the
prompt reply, much appreciated, as is your library, which is being put
to good use wit
Yes,
It's rare to see books about programming concepts/models and not
programming languages.
As far as I know the following 3 ones deserve being mentioned :
* OOSC: Object Oriented Software Construction ( general about object
orientation, see http://archive.eiffel.com/doc/oosc/page.html )
* S
On Jun 5, 11:14 am, Daniel Lyons wrote:
> On Jun 5, 2009, at 8:56 AM, Daniel Jomphe wrote:
>
> > I need to generate a list of all possible American zipcodes, MD5-
> > digested. Later on, I will need to do much more involving stuff,
> > processor-wize, with this. But already, generating a naive
On Jun 5, 10:56 am, Daniel Jomphe wrote:
> I need to generate a list of all possible American zipcodes, MD5-
> digested. Later on, I will need to do much more involving stuff,
I'm not sure if this is exactly what you want, but maybe this will
help:
(defn all-zipcodes []
(for [x (range 1 9
On Jun 5, 2009, at 8:56 AM, Daniel Jomphe wrote:
> I need to generate a list of all possible American zipcodes, MD5-
> digested. Later on, I will need to do much more involving stuff,
> processor-wize, with this. But already, generating a naive list of all
> possible zipcodes is taking quite a d
Try adding type hints. Assuming all-zips returns a list of strings:
(defn all-zips-MD5 []
"Returns a lazy list of all possible American zipcodes, as MD5
digests."
(let [digester (java.security.MessageDigest/getInstance "MD5")]
(map
(fn [#^java.util.String to-digest]
(.update
I support the CTMCP recommendation. I learned a lot from its first few
hundred pages. (Kept the rest for later.)
On Jun 5, 2:45 am, Laurent PETIT wrote:
> I just got my own copy of the CTM book (Concepts, Techniques and
> Models of computer programming) (http://www.info.ucl.ac.be/~pvr/book.html)
Great! Thanks for your reply, it turned out I had a bug somewhere in
my code and I was bleeding send-offs.
On Jun 5, 12:06 am, Tassilo Horn wrote:
> mifrai writes:
>
> Hi!
>
> > I noticed that there's a send-off in the dosync clause of ants.clj
>
> > Does send-off hold off enqueue'ing the actio
I need to generate a list of all possible American zipcodes, MD5-
digested. Later on, I will need to do much more involving stuff,
processor-wize, with this. But already, generating a naive list of all
possible zipcodes is taking quite a deal of time:
user> (time (dorun (take 100 (all-zips)))
For those of you that may have the same problem in the future, check
the index:
http://code.google.com/p/clojure-contrib/wiki/ApiDocIndex
Great work.
On Jun 5, 10:25 am, Sean Devlin wrote:
> Okay, found it.
>
> clojure.contrib.seq-utils
>
> On Jun 5, 10:15 am, Sean Devlin wrote:
>
> > Okay, I
Okay, found it.
clojure.contrib.seq-utils
On Jun 5, 10:15 am, Sean Devlin wrote:
> Okay, I may be going nuts here. I can seem to find the group by
> function anymore. Where is it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Okay, I may be going nuts here. I can seem to find the group by
function anymore. Where is it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroup
I have generalized the code to allow more than one independent
variable. The calling convention has changed: instead of separate x
and y seqs, there is one "xylist". Each element of xylist is a tuple
containing the dependent variable *first*, and then any independent
variables.
I haven't had ti
On Jun 5, 2009, at 9:16 AM, BrianS wrote:
It sounds like you're running the code in an environment where *err*
is bound to an OutputStreamWriter. The default binding is to a
PrintWriter which does provide println.
I see that the API page describes *err* as a Writer whose default
bind
We are seeing a strange problem with the insert-values function in
clojure.contrib.sql. Basically, we passed in a single record for
insert that in fact violated a foreign key constraint in the database
(we were adding an accountid that was not in the accounts table).
Usually when using clojure.con
I'm writing a numerical methods library, and I already found a use for
you macro. Here's the old way:
(defn solve
[f & params]
(let [param-map (merge
{:start 1
:target 0
:diff-method :forward
:iter-method :new
Hello Richard,
any contributions to test_clojure are very welcome!
As a general rule to contribute, you need to fill-in and mail the CA:
http://clojure.org/contributing
When Rich receives your CA and updates the clojure.org website, you
can start creating issues in clojure-contrib and attaching
On 05.06.2009, at 02:48, Howard Lewis Ship wrote:
> Again, I'm not sure what the solution is or what the implementation
> would look like, but I'd love it if Clojure could relate back to me,
> when an exception occurred, what lazy operations were taking place
> that caused the bad code to be invo
mifrai writes:
Hi!
> I noticed that there's a send-off in the dosync clause of ants.clj
>
> Does send-off hold off enqueue'ing the action when a dosync fails/
> repeats or do the actions keep getting added?
send and send-off actions will only be enqueued if the transactions
succeeds.
Bye,
Tas
58 matches
Mail list logo