Eric a écrit :
> He said that I should use clojure.core/list instead of #'list. That
> is, to reference it with a fully-qualified name. But my understanding
> is that binding still changes clojure.core/list withing the binding
> form. Here, from my REPL:
>
> (let [list 10]
> (binding [list +]
Stephen C. Gilardi a écrit :
> Here are some suggestions of mine. I don't claim they're standard:
>
> - Avoid using an argument name or let-bound local name that
> "shadows" the (unqualified) name of a var you need to use within its
> scope
> - Failing that, use a namespace qualified sym
Hi Jeffrey,
On Feb 1, 4:50 am, Jeffrey Straszheim
wrote:
> However, I'm not sure if you can built your own predicates in Java
> code (and therefore in Clojure code). That seems like a feature we'd
> want. I've sent an email to their support folks to find out if this
> is possible.
I gave it a
Just to be clear make-instance is a macro on struct:
(defmacro make-instance
"Takes a defclassed struct-basis and creates a struct. Initializes
properties to default values."
[aclass & initializers]
(let [class-key (eval (make-pair aclass))
class-sym (symbol (name aclass))
Hello,
In an attempt of returnig favour (i.e. being able to use so much good
free software and getting free help while doing so), I have put
together a short guide (very basic) on how to use NetBeans GUI (Swing)
designer and then get hands on it from Clojure.
The guide is available in 2 forms (
Dear Clojurians,
the questions of the various locations, which were recently
posted, reminded me of Graham Fawcett's Clojure User Map.
Feel free to add your pin and look for fellows in your area.
http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=112691912540601337884.00045972a1deb8de0d96b
Sincer
All -
I'm curious to know how to minimize memory consumption in Clojure for
large lists. I did the following test in repl:
(def d ())
(dotimes [_ 10] (def d (cons "x" d)))
Then, I used VisualVM, an awesome free profiling tool (https://
visualvm.dev.java.net/) to examine the results. It in
Hello everybody,
Althrough I am new to Clojure, I like it a lot. Because it is
advertised as native JVM language, I expected it to demostrate decent
performance in simple numeric tests, so I decided to compare it to
Python.
Clojure rev. 1173:
user=> (defn fac [#^Integer n] (reduce * (range 1 (+
On 02.02.2009, at 16:35, Gregory Petrosyan wrote:
> Althrough I am new to Clojure, I like it a lot. Because it is
> advertised as native JVM language, I expected it to demostrate decent
> performance in simple numeric tests, so I decided to compare it to
> Python.
>
> Clojure rev. 1173:
> user=>
Ketih,
I think what you have done, at least at the JVM level, is create 100,000
lists, with basically each list containing an element and a pointer to the
next element. Because one list points to the next, none of them can be
garbage collected. It seems to me that this would be roughly equivalen
Hello,
I have put a short guide on how to create Swing GUI using NetBenans
and how to get hands on this generated
GUI JForm (java class) from clojure.
I hope someone will find this useful...
http://www.dearm.co.uk/cgan/
or (.pdf version):
http://www.dearm.co.uk/cgan/cgan.pdf
Vlad
PS: Comme
The trick with these listish things is to not calculate the tail until
you need it, and to throw away the head when you're done with it.
On Mon, Feb 2, 2009 at 7:06 PM, Keith Bennett wrote:
>
> All -
>
> I'm curious to know how to minimize memory consumption in Clojure for
> large lists. I did
It would have been nice if that link was prominent on their website.
They still haven't responded to the email I sent them.
On Feb 2, 10:13 am, Timothy Pratley wrote:
> Just thought I'd share this
> link:http://www.murat-knecht.de/schuerfen/irisdoc/html-single/index.html
> Particularly Example
There is a "lazy" branch in SVN. The "streams" branch has been
discussed, but I haven't seen any discussion of the "lazy" branch -
perhaps I missed it. Rich and/or other contributors if you have a
little time - I'm curious what changes are being considered and when
these might show up in trunk. Al
Looks like I'll find it helpful. Thanks!
On Feb 2, 10:42 am, prhlava wrote:
> Hello,
>
> I have put a short guide on how to create Swing GUI using NetBenans
> and how to get hands on this generated
> GUI JForm (java class) from clojure.
>
> I hope someone will find this useful...
>
> http://www.
I am not an expert on the JVM, but I think Google's runtime will
disallow uploading precompiled bytecode (jar). The assumption is that
if you can compile it on their servers, then it is legal and therefore
safe. I hope they allow the use of ASM library.
Obviously this is speculation, but can you
On Mon, Feb 2, 2009 at 2:05 PM, MikeM wrote:
>
> There is a "lazy" branch in SVN. The "streams" branch has been
> discussed, but I haven't seen any discussion of the "lazy" branch -
> perhaps I missed it.
Here's a discussion from earlier today, mainly about the "lazy" branch:
http://clojure-log
Heh, this is a more reasoned reply than my own as it points out an actual
implementation difference between Python and Clojure. And of course you
might need arbitrary precision arithmetic in your program, but again this
just reinforces the insignificance of microbenchmarks without some context
of w
I wonder if the Classloader issues that currently affect OSGi would impact
an app-engine style deployment scenario as well. My understanding of the
issue is that each different classloader would pick up its own RT and
compile/generate up different versions of the core classes under each
classloade
Cool, at least one positive response so far :-).
I have also put the .pdf file into this group's files section, called:
clojure-gui-and-netbeans.pdf
Vlad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure"
On Mon, Feb 2, 2009 at 11:10 AM, David Nolen wrote:
> Just to be clear make-instance is a macro on struct:
Ah! That wasn't clear to be before. I thought you were making a case
for plain maps being more efficient than struct-maps.
--
R. Mark Volkmann
Object Computing, Inc.
--~--~-~--~-
On Mon, Feb 2, 2009 at 12:02 PM, Meikel Brandmeyer wrote:
> Dear Clojurians,
>
> the questions of the various locations, which were recently
> posted, reminded me of Graham Fawcett's Clojure User Map.
> Feel free to add your pin and look for fellows in your area.
>
> http://maps.google.com/maps/m
Hi Mark,
Am 02.02.2009 um 21:42 schrieb Mark Volkmann:
http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=112691912540601337884.00045972a1deb8de0d96b
How do you add a pin?
You have to be logged in with your google account.
Then you have an edit button on the left hand side.
Clicking on that gi
Thanks Meikel, that's the answer.
R.
2009/2/2 Meikel Brandmeyer
> Hi Mark,
>
> Am 02.02.2009 um 21:42 schrieb Mark Volkmann:
>
>>
>>> http://maps.google.com/maps/ms?ie=UTF&msa=0&msid=112691912540601337884.00045972a1deb8de0d96b
>>>
>>
>> How do you add a pin?
>>
>
> You have to be logged in with
On Feb 2, 1:41 pm, Paul Barry wrote:
> Ketih,
>
> I think what you have done, at least at the JVM level, is create 100,000
> lists, with basically each list containing an element and a pointer to the
> next element. Because one list points to the next, none of them can be
> garbage collected.
Paul -
Clojure definitely has its benefits, but in terms of memory footprint,
Java appears to be *much* more economical, unless elements can be
discarded shortly after use as Christian describes, in which case it's
much *less* economical.
In a Java ArrayList, only a single ArrayList object is us
As it happens, I just downloaded NetBeans a few hours ago to start
working on this very issue. Thanks for saving me the trouble!
Also, Nokia has just changed the licensing of Qt Jambi so that LGPL
can be used. My sense is that Qt looks nicer than Swing, though I'd be
happy to hear if otherwise if
Please do the list a favor and read the very long threads about performance.
You cannot expect to enter a new language run a microbenchmark you would
never see in a running programming and expect that to be anything like a
real comparison.
Here's something unlikely but far less so (something like
Hi,
There are three "homes" for clojure-contrib that I've seen referred to
on the web (each in more than one place):
Google Code
Sourceforge
git://github.com/kevinoneill/clojure-contrib.git
Now I think I've got a pretty good idea which one is the correct one,
but how did this situation co
Count me in :)
--
JFB
--~--~-~--~~~---~--~~
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 group, send email to
clojure+unsubscr...@g
In your example, why are you using struct-map to create your structs
instead of just using struct?
(struct rect-struct ::rect [50 50] 100 190)
produces the same struct, but is about three times faster than using
struct-map.
(time (dotimes [x 100]
(struct-map rect-struct :tag ::rect
Just so you don't feel alone Mark, I can't figure it out either.
Rob Lally.
2009/2/2 Mark Volkmann
>
> On Mon, Feb 2, 2009 at 12:02 PM, Meikel Brandmeyer wrote:
> > Dear Clojurians,
> >
> > the questions of the various locations, which were recently
> > posted, reminded me of Graham Fawcett'
Hey, it is an extremely simplified example ;)
Which is more readable in the long run?
(struct sprite ::foobar 98 ::hunta ::laser [5.5 3.3] 4.01 78)
or
(make-instance foobar :id 98
:mode ::hunta
:weapon ::laser
Hi,
Is there anyone getting together in London to discuss Clojure?
If so, can anyone play?
If not, would anyone be interested?
Cheers
Tom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post
any concrete example?
thanks,
-sun
On Feb 2, 5:13 am, Christian Vest Hansen wrote:
> On Sun, Feb 1, 2009 at 9:35 PM, e wrote:
> > This may be obvious to others, but what's the motivation behind it? Is it
> > that we are very concerned about combatting the criticism that lisp has too
> > many
On Mon, Feb 2, 2009 at 6:34 AM, wubbie wrote:
>
> any concrete example?
Here's an example of how -> makes it easy to get data out of nested maps.
(def person {
:name "Mark Volkmann"
:address {
:street "644 Glen Summit"
:city "St. Charles"
:state "Missouri"
:zip 63304}
:emp
Hi Vlad,
A very useful guide.
> PS: Comments welcome...
Ok great, let me nitpick! :)
The java class you posted doesn't compile (unless name is renamed
person_name, and location renamed person_location).
The quote symbol rendered is not copy+paste friendly.
You can call main very easily: (MainF
On Mon, Feb 2, 2009 at 3:00 PM, GS wrote:
>
> Hi,
>
> There are three "homes" for clojure-contrib that I've seen referred to
> on the web (each in more than one place):
>
> Google Code
> Sourceforge
> git://github.com/kevinoneill/clojure-contrib.git
>
> Now I think I've got a pretty good idea
On Mon, Feb 2, 2009 at 4:48 PM, Keith Bennett wrote:
>
> Clojure definitely has its benefits, but in terms of memory footprint,
> Java appears to be *much* more economical
It's probably worth being careful to separate the different parts of
Java and Clojure. Clojure code can use most Java data
Oh, cool! I'll be at the library next Monday then. Thanks for letting
me know.
-Jeff
Remco van 't Veer wrote:
> Great idea! Maybe you would like to join ACK:
>
>
> http://groups.google.com/group/amsterdam-rb/browse_thread/thread/2a38b6b85f3e7bbb
>
> A small get together initiated by Rubyi
On Feb 2, 9:37 am, Tom Ayerst wrote:
> Is there anyone getting together in London to discuss Clojure?
> If so, can anyone play?
> If not, would anyone be interested?
I'm in London, and I might be interested. I tend to have a pretty
tight schedule, though :(
- James
--~--~-~--~~-
On Mon, Feb 2, 2009 at 1:34 PM, wubbie wrote:
>
> any concrete example?
http://github.com/karmazilla/textjure/blob/cf4ac457358e02f1d1d46d14a2885da0544dbd46/textjure.clj#L342
>
> thanks,
> -sun
>
>
> On Feb 2, 5:13 am, Christian Vest Hansen wrote:
>> On Sun, Feb 1, 2009 at 9:35 PM, e wrote:
>>
Just thought I'd share this link:
http://www.murat-knecht.de/schuerfen/irisdoc/html-single/index.html
Particularly Examples 1.2 and 1.6 show how the parts fit together.
I really wish I saw that before attempting anything :) Well now I know
for next time.
--~--~-~--~~~--
On Feb 2, 10:06 am, Keith Bennett wrote:
> I'm curious to know how to minimize memory consumption in Clojure for
> large lists. I did the following test in repl:
>
> (def d ())
> (dotimes [_ 10] (def d (cons "x" d)))
Let me translate this into pseudocode for you:
Make d into a global refer
Hello Tom,
> If not, would anyone be interested?
I live in London and would be interested...
Vlad
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@goo
On Sun, Feb 1, 2009 at 9:35 PM, e wrote:
> This may be obvious to others, but what's the motivation behind it? Is it
> that we are very concerned about combatting the criticism that lisp has too
> many parens?
The -> macro is simply an excellent tool for drilling into nested
structures and/or p
On Sun, Feb 1, 2009 at 7:22 PM, David Nolen wrote:
> I've changed the name of my project since that was a joke anyway.
> http://github.com/swannodette/spinoza/tree/master
>
> Spinoza isn't just for people who want object oriented behaviors. It's also
> for anyone who plans on instantiating many
Great idea! Maybe you would like to join ACK:
http://groups.google.com/group/amsterdam-rb/browse_thread/thread/2a38b6b85f3e7bbb
A small get together initiated by Rubyist in Amsterdam. Next meeting
is next monday. At least two of us, myself included, are happily
hacking clojure.
On Mon, Fe
Anyone else hacking Clojure in Amsterdam? How about going for a beer
and talking some shop?
-Jeff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googl
It is safe to assume that Python uses the GMP library for its infinite
precision math, no? This could be a big part of the explanation as, if
the language shootouts are to be believed, BigInteger and BigDecimal
have inferior performance when compared to what can be achieved with
GMP.
For problems
Paul,
I can understand the concerns about memory footprint if you work in a
restricted environment
(lack of physical memory or other system resources) or if your memory
load is very high.
However, these things are less common these days with the kind of
hardware we can buy
compared to what we cou
Hi
If there's anyone in Santiago, Chile, who speaks Clojure and some
English (my Spanish is not very good) would be good to meet up.
Cheers
bd
--
None are more hopelessly enslaved than those who falsely believe they
are free — Goethe
--~--~-~--~~~---~--~
Luc -
It is I (Keith) who posed the original question.
I am just now learning Clojure, and for me, understanding what's going
on underneath the surface helps me understand how to use the language
properly. As I said previously, the amount of memory consumed by a
list will very rarely be an issu
On Tuesday 03 February 2009 00:39:45 blackdog wrote:
> Hi
>
> If there's anyone in Santiago, Chile, who speaks Clojure and some
> English (my Spanish is not very good) would be good to meet up.
Perhaps a Venn diagram would help. ;-)
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffco
I understand that special forms are all recognized by the Clojure
compiler clojure.lang.Compiler. Is it the case that all function and
macro definitions can be found in some .clj file, whether supplied
with Clojure or not? Asked another way, are there any functions or
macros that are included with
On Tue, 3 Feb 2009 01:53:36 +
Jon Harrop wrote:
>
> On Tuesday 03 February 2009 00:39:45 blackdog wrote:
> > Hi
> >
> > If there's anyone in Santiago, Chile, who speaks Clojure and some
> > English (my Spanish is not very good) would be good to meet up.
>
> Perhaps a Venn diagram would hel
I think the special forms list on the Clojure main page lists all the
constructs that are not written in Clojure itself. It seems most everything
else can be found in the .clj files in the src directory. I'm constantly
looking in there when I'm curious how something works or is implemented,
espec
I believe that any non-special-form has a clojure implementation in
some .clj file, although that implementation may simply be a wrapper
for a method in clojure.lang.RT.
Also check out the source macro in clojure.contrib.repl_utils. It's
quite nifty:
user> (source into)
(defn into
"Returns a
I have a project where I would like to have a much larger world than
the 80x80 world in Rich's ants.clj [1] demo. When I bring the world
up past about 600x600, I get a java.lang.OutOfMemoryError.
Is this expected? If so, is there another reasonable way to represent
a large grid with concurrent
I have recently enjoyed exploring clojure.
I can use java...
C:\myprograms\clojure>java -cp clojure.jar clojure.lang.Repl
Clojure
user=> (into [] (.list (new java.io.File "c:/myprograms/clojure")))
["build.xml" "changes.txt" "clj.ico" "clojure.jar" "epl-v10.html"
"fractal.clj"
"Mandelbrot.class"
I was fooling around in the REPL and from the looks of the transcript,
I typed the very same thing, yet in one case the REPL returned (quote
foo) and in the other case it returned foo.
Transcript follows:
user=> \newline
\newline
user=> \c
\c
user=> nil
nil
user=> false
false
user=> :foo
:foo
us
You need to add it to -cp argument when starting up the REPL, not your
environment CLASSPATH.
On Mon, Feb 2, 2009 at 9:05 PM, greg wrote:
>
> I have recently enjoyed exploring clojure.
>
> I can use java...
> C:\myprograms\clojure>java -cp clojure.jar clojure.lang.Repl
> Clojure
> user=> (into [
On Feb 2, 2009, at 8:32 PM, Terrence Brannon wrote:
>
> I was fooling around in the REPL and from the looks of the transcript,
> I typed the very same thing, yet in one case the REPL returned (quote
> foo) and in the other case it returned foo.
>
> Transcript follows:
>
> user=> \newline
> \newl
Are you launching Java with any flags? I think by default the heap
limit is quite small (128 MB?)
I use "java -server -Xmx1g ..." as my default for 1 gig of ram; you
should be able to take it from there (-server makes long-running
processes go faster, and perhaps more memory-efficient (?)). As
Paul sorry for the mistake, these emails are a pain to follow sometimes,
Keith,
It's up to you if you prefer to slice the Clojure features one by one
down the bone marrow,
as for myself I used a different approach to ramp up with Clojure ASAP
The need to get down to implementation details came a
On Feb 2, 5:32 pm, Keith Bennett wrote:
> I am just now learning Clojure, and for me, understanding what's going
> on underneath the surface helps me understand how to use the language
> properly. As I said previously, the amount of memory consumed by a
> list will very rarely be an issue. Howe
On Feb 2, 5:32 pm, Keith Bennett wrote:
> I have a lot of work to do to learn how to think in functional
> programming. These kinds of discussions are very helpful.
A picky point -- lazy sequences aren't really a functional programming
thing (although restricting side effects makes it easier to
Datalog is a cool problem.
I've started writing some code. The rule-unification part of the
algorithm is trivial -- its not even proper unification at all. The
hard part seems to be optimising the query strategy to avoid
materialising too much. The advantage is you can support rules that
would
On Tue, Feb 3, 2009 at 5:07 AM, Dan Larkin wrote:
>
>
> On Feb 2, 2009, at 8:32 PM, Terrence Brannon wrote:
>
>>
>> I was fooling around in the REPL and from the looks of the transcript,
>> I typed the very same thing, yet in one case the REPL returned (quote
>> foo) and in the other case it retu
69 matches
Mail list logo