On Sep 19, 2010, at 3:45 PM, Shantanu Kumar wrote:
> I simulated a similar recursive call and found it
> throws StackOverflowError at 5508 levels deep on a 32-bit Sun JVM (not
> server mode) on Windows 7.
Did your similar recursion include the lazy-seq form that wraps the
(apparently) recursive
That also sounds pretty useful for development. I may try that as an exercise...
This weekend has been a journey through The Joy of Clojure. I read
about 100 pages on Friday evening (easy going), 150 pages on Saturday
(harder going - more complex topics). Today I read another 50 pages,
skipped cha
With XNA running on the Xbox 360, reflection is the least of your
worries. The runtime uses a very poor non-generational mark-and-sweep
collector. At the rate of memory allocation in a typical Clojure
program, you would be faced with constant GC hitches. Even people
writing XNA games in C# (where i
Since there appears to be a version of clojure being made for .Net I
was interested in the possibility of programming Xbox games in
clojure. I imagine the Xbox doesn't have many of the same limitations
that mobile devices have but as I understand it the version of .Net on
the Xbox is a compact ver
Not sure how practical it is, but a while back I was playing around
with a macro redefining defn so that it stored the function source in
the meta-data of the function. I can't find it now but remember it
being fairly trivial to implement.
- lachlan
On Sep 20, 10:29 am, Hozumi wrote:
> If you
I recently spent some time trying to abstract away some of the
incidental complexity of using Google App Engine with Clojure. Right
now, setting up interactive development and understanding what to do
requires reading several blog posts, and pasting in a lot of
boilerplate code. I ended up making a
> But is the way Clojure works so opaque we need to see byte codes?
> I was hoping someone on the list would have some intuition about
> how the expressions get implemented. In fact I hope it's pretty
> close to what I would naively guess from just reading the code
> as is.
One of the advantages
If you use emacs, incremental back search is handy.
Typing "C-r defn", you may jump to the defnition of a function.
Next time, you need to type only "C-r C-r".
-- Takahiro Hozumi
On 9月19日, 午前6:39, Sean Corfield wrote:
> OK, this feels like a really dumb question...
>
> I'm playing around in the R
On Sun, 19 Sep 2010 16:33:54 -0700 (PDT)
TimDaly wrote:
> In common lisp I can say (trace foo) and it will print out the
> arguments
> and the return value of calls to foo. Would it be possible to create
> such
> a facility in clojure, perhaps by defining a new class loader? Java
> knows
> the ty
In common lisp I can say (trace foo) and it will print out the
arguments
and the return value of calls to foo. Would it be possible to create
such
a facility in clojure, perhaps by defining a new class loader? Java
knows
the types of the arguments and the return values so it should be
possible
to w
On Sun, 19 Sep 2010 23:07:55 +0200
Meikel Brandmeyer wrote:
> Hi,
>
> Am 19.09.2010 um 22:59 schrieb ataggart:
>
> > Also note that the namespace portion of a keyword does not get
> > resolved against the current aliases. E.g.,
> > user=> (require '[clojure.java.io :as io])
> > nil
> > user=>
Microbench is a little utility I wrote that executes a piece of code
for awhile to warm up, then records timings for as many runs as will
fit in a preset time limit and reports statistics. So the numbers you
see are min/median/max milleseconds per run, and number of runs that
fit in 3 seconds of r
What is the definition of microbench?
--
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 unsubscrib
Hi.
I posted following question.
The more threads that changes the Clojure's ref are, the more does the
rate of retries per threads rise?
http://stackoverflow.com/questions/3746893/the-more-threads-that-changes-the-clojures-ref-are-the-more-does-the-rate-of-re
I think increasing retries in O(thre
Hi Ranjit,
The big perf differences you're seeing are due to reflective calls.
Getting the Java array bits properly type-hinted is especially tricky,
since you don't always get good reflection warnings.
Note that aset is only fast for reference types:
user> (doc aset)
-
c
Hi Ranjit,
The big perf differences you're seeing are due to reflective calls.
Getting the Java array bits properly type-hinted is especially tricky,
since you don't always get good reflection warnings.
Note that aset is only fast for reference types:
user> (doc aset)
-
c
Hi,
Am 19.09.2010 um 22:59 schrieb ataggart:
> Also note that the namespace portion of a keyword does not get
> resolved against the current aliases. E.g.,
> user=> (require '[clojure.java.io :as io])
> nil
> user=> (= :io/foo :clojure.java.io/foo)
> false
It does with ::.
user=> (= ::io/foo :
Considering that the only effect of adding a namespace to keyword is
to ensure it doesn't inadvertently equal some other keyword (e.g., :a-
ns/foo doesn't equal :foo nor :b/foo), I'm not clear on what kind of
conflation you're concerned about.
Also note that the namespace portion of a keyword does
I'm seeing a big difference in speed for each function run only once,
so I guess any Hotspot optimization isn't happening right?
But is the way Clojure works so opaque we need to see byte codes? I
was hoping someone on the list would have some intuition about how the
expressions get implemented. I
On Sun, 19 Sep 2010 12:22:54 -0700 (PDT)
ataggart wrote:
> Unlike symbols, keywords just evaluate to themselves. The keyword :foo
> will not collide with a var foo, likewise keyword :my-ns/foo will not
> collide with var my-ns/foo. So, if I understand you correctly, :xsl/
> value-of would work j
Hi,
While looking at the implementation of clojure.core/resultset-seq
function, I found there is a recursive call to 'thisfn' which isn't
loop-recur'ed. I simulated a similar recursive call and found it
throws StackOverflowError at 5508 levels deep on a 32-bit Sun JVM (not
server mode) on Windows
On Sun, Sep 19, 2010 at 10:24 AM, Stephen C. Gilardi wrote:
> The clojure repl is very customizable. It's possible to add this feature in a
> custom repl to experiment with the idea:
Awesome. I'll see if I can generalize that to keep a longer history
and a nice easy way to view / retrieve past e
Unlike symbols, keywords just evaluate to themselves. The keyword :foo
will not collide with a var foo, likewise keyword :my-ns/foo will not
collide with var my-ns/foo. So, if I understand you correctly, :xsl/
value-of would work just fine.
On Sep 19, 11:56 am, Kyle Schaffrick wrote:
> Would it
Would it be correct to say that the namespace portions of keywords are
semantically opaque?
In other words, if I have a keyword :my-ns/foo and a symbol 'my-ns/foo,
obviously the namespace in the symbol has semantic meaning to the
language when it's evaluated (or syntax-quoted), but the namespace o
On 19 Set, 19:34, Tim Daly wrote:
> In common lisp I use the (disassemble) function which generally
> gives back an assembler listing of the code that would be executed.
> Is there a Java function which will return the byte codes that get
> executed?
In general there isn't. In the particular si
I think I understand; the unquote operator is not providing a
reference to the underlying object itself, but is rather a procedure
that translates the object into a code representation.
Thank-you for the explanation.
On Sep 19, 6:53 am, Stuart Sierra wrote:
> A macro is a function which returns
You can use "javap -c" out of the JDK to get the bytecodes that are handed to
the VM.
However, HotSpot does amazing things with the bytecodes after the code begins
to run, so a disassembly can be quite misleading. I measure far more often than
I view bytecode.
Stu
> In common lisp I use the (
In common lisp I use the (disassemble) function which generally
gives back an assembler listing of the code that would be executed.
Is there a Java function which will return the byte codes that get
executed? Could this be used to create a (disassemble) function for
Clojure? Having such a functio
On Sep 19, 2010, at 11:45 AM, Steven E. Harris wrote:
> Moritz Ulrich writes:
>
>> I think this would be a very nice extension for the repl - Saving the
>> forms for later-retrieval.
>
> As precedent, the Common Lisp reader uses the +, ++, and +++ variables¹
> to store the last three forms read
Hi Nicholas,
Thanks for the advice. I already tried (set! *warn-on-reflection*
true), but it doesn't generate any warnings for any of these
functions.
I tried adding ^doubles in gaussian-matrix1 as you suggested but that
didn't really change the speed at all. And changing next-gaussian to a
macro
I definitely have. I'm in the middle of trying to port some stats test
from R over to Incanter, notably the Wicoxon Rank Sum test. I just
meant I hope this catches on with statisticians, now that R's creator
has admitted its flaws.
On Sep 18, 9:09 pm, Jeff Heon wrote:
> On Sep 17, 8:23 pm, David
On 19 Sep 2010, at 07:21, Stuart Campbell wrote:
In this method, the first two parameters may be null. So, my fn
looks like this:
(defn exported-keys
([table]
(exported-keys nil table))
([schema table]
(exported-keys nil schema table))
([catalog schema table]
(fetch-metad
Moritz Ulrich writes:
> I think this would be a very nice extension for the repl - Saving the
> forms for later-retrieval.
As precedent, the Common Lisp reader uses the +, ++, and +++ variables¹
to store the last three forms read.
Footnotes:
¹ http://www.lispworks.com/documentation/HyperSpec/
A first good start is to put
(set! *warn-on-relection* true) at the start of the file and removes
all reflective access.
Before the 1.3 release, function cannot receive/returns primitive so
you might consider
(defmacro next-gaussian []
`(.nextGaussian ^Random r))
(^Random is here to make sure
Hi,
I'm trying learn Clojure to see if I can use it in my simulations, and
one thing I need to do is generate arrays of normally distributed
numbers.
I've been able to come up with the following two ways of doing this.
gaussian-matrix2 is a lot faster than gaussian-matrix1, but I'm not
sure why.
I think this would be a very nice extension for the repl - Saving the
forms for later-retrieval.
On Sun, Sep 19, 2010 at 3:54 PM, Stuart Sierra
wrote:
> On Sep 18, 5:39 pm, Sean Corfield wrote:
>> Is there something easy within the REPL to show the source of
>> something you defined earlier?
>
>
On Sep 18, 5:39 pm, Sean Corfield wrote:
> Is there something easy within the REPL to show the source of
> something you defined earlier?
No. The REPL does not preserve what you type in.
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
A macro is a function which returns a data structure representing code
to be compiled. All literals (String, Integer, symbol, etc.) and
basic data structures (lists, maps, etc.) can be compiled, as can
functions.
Most other non-literal objects *cannot* be compiled.
What you probably want is not
Hi everyone!
I started learning Clojure earlier this year (as a part of MSc studies
from this discussion:
http://groups.google.com/group/clojure/browse_thread/thread/a8aa5ac26d9761da?hl=en&tvc=2#)
I was initially shocked with lispy syntax, given the fact I previously
mostly used languages with C
39 matches
Mail list logo