Does anybody know how to redirect the output into the repl?
I actually think the preferred way of doing this is M-x
slime-redirect-inferior-output
or adding to your .emacs:
(add-hook 'slime-mode-hook 'slime-redirect-inferior-output)
--
You received this message because you are subscribed
On Thu, Nov 4, 2010 at 2:41 PM, Ken Wesson kwess...@gmail.com wrote:
clojure.core/use
([ args])
Like 'require, but also refers to each lib's namespace using
...
Yeah, that's a real help if you're trying to remember the syntax.
args. How specific. :)
You stopped one indirection short,
On Sat, Oct 23, 2010 at 8:53 AM, Ralph grkunt...@gmail.com wrote:
Won't work. The def gets executed at compile time, before the JAR
file exists.
I'm very confused by what you mean by this. If I do the following, I
get a new random value every time I run it, which does not seem to
match what
On Thu, Sep 9, 2010 at 6:43 PM, Brian Carper briancar...@gmail.com wrote:
On Sep 9, 3:13 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
Can you clarify? Maven-aware build tools (e.g. Leiningen) should not
be trying to downlaod the clojure-contrib:complete JAR file.
Instead, referencing
Maven isn't really analogous to git for the most part. Having a
complete history of a source code repository isn't a big deal thanks
to delta compression; keeping a complete history of every artifact
ever built would just be colossal.
One helpful tip though, is: mvn dependency:go-offline
That
On Wed, Jul 21, 2010 at 9:33 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On Jul 21, 1:35 pm, Jeff Rose ros...@gmail.com wrote:
Really, there isn't a way to start processes from VIM? How about just
opening a temporary buffer for the output of the nailgun server, and
then start it
I noticed that http://clojure-examples.appspot.com/clojure.core/max has both
(apply max [1 2 3 4]) - 4 and (max []) - [] (which I think is a poor
example).
However, when attempting to add another example for (apply max []) which I
expected to return nil, that instead it throws an exception.
I
If nothing else adding code to measure the empty loop and punting if
the difference between that and the code loop is statistically
insignificant would seem like a good idea.
It's actually notoriously hard to time the empty loop on the JVM. Once
you've iterated a few thousand times, the JIT
Doing these tests on clojure 1.1, while self-enlightening, is kind of
missing the point.
The current primitive work on master for 1.2 are trying to make optimizing
more practical, possible and less ugly. It's well known that 1.1
optimization is ugly at best and often not completely successful.
On Sat, Jun 19, 2010 at 11:22 PM, Mike Meyer
mwm-keyword-googlegroups.620...@mired.org wrote:
Rob Lachlan robertlach...@gmail.com wrote:
Actually, Mike, your two functions work just fine. (Equal branch).
Mind you I checked that out over two hours ago, so this information
might be out of date.
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 case, the recur value is
needlessly being boxed,
This error indicates that your java executable is coming from the
JRE rather than the JDK. On windows, the JRE only includes the
client virtual machine.
If you have the JDK already installed on your computer, switch your
JAVA_HOME and PATH to use it instead, and try it again.
--
You received
Judging from the javadoc, setRecipients takes an array of addressses
as its second parameter. So try (into-array to), (into-array for),
etc.
--
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
This seems to have been fixed in master at some point.
--
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
(I tried to post this to clojure-dev, but don't have permission to
post messages there)
At a repl the following works:
(defprotocol Base
(foo [o]))
(defprotocol Base)
(defprotocol Base
(foo [o]))
However, a file containing only those three forms, causes the
following when loaded:
loader
user= (defn foo [_] foo)
user= (defprotocol IFoo
(foo [_]))
Warning: protocol #'user/IFoo is overwriting function foo
IFoo
user= (extend-protocol IFoo nil (foo [_] IFoo))
nil
user= (foo nil)
IFoo
user= (foo 1)
java.lang.IllegalArgumentException: No implementation of method: :foo
user= (defn foo [_] foo)
user= (defprotocol IFoo
(foo [_]))
Warning: protocol #'user/IFoo is overwriting function foo
IFoo
user= (extend-protocol IFoo nil (foo [_] IFoo))
nil
user= (foo nil)
IFoo
user= (foo 1)
java.lang.IllegalArgumentException: No implementation of method: :foo
of
Sorry for the duplicate messages.
--
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 unsubscribe
Hi,
I realize that at some level, str is just calling toString so the
behaviour isn't really defined. I find the following surprising though
because str doesn't obviously involve printing:
user= (binding [*print-length* 1] (str '(1 2 3 4)))
(1 ...)
This is because ASeq.toString delegates to
This is actually a fairly good bug report, I think.
If you look in clojure.main, the eval-opt fuction uses
with-in-str, which unnecessarily interferes with using *in* within
the expression you are trying to evaluate. I was actually running into
this while trying to make a lein repl in clojure
On Thu, Apr 8, 2010 at 4:57 PM, Armando Blancas
armando_blan...@yahoo.com wrote:
Looks cool. This should help the XML-allergic :)
Though I don't like it, the XML is the least of my problems. Don't
know what to do or even where to start. I want to do the following in
maven or pmaven, but
If you're distributing the jar file you own copyright to it and you
can grant any kind of permissions you want. So you may need to grant
your user's explicit permission to link your code against specific
jars (such as Clojure and Clojure-Contrib), but it's hardly
impossible.
The GPL v3 has a
Hi guys,
I was watching the Clojure in Clojure talk that I saw linked from
the disclojure blog (very useful to me by the way, thank you
nameless to me person who does it
-- Aaron
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group,
This email was cut-off from what I intended to send, sorry.
What I meant to say, was that, unfortunately the video cuts off after
10 minutes. Are the slides for this talk available somewhere?
Thanks,
Aaron
On Feb 2, 3:44 pm, Aaron Cohen remled...@gmail.com wrote:
Hi guys,
I was watching
What JVM 6 sub-version are you using?
Does it make any difference if you specify -XX:+DoEscapeAnalysis at
the command line? Various JVM 6 sub-versions enable and disable it by
default and it can make a pretty hefty difference if it isn't enabled.
-- Aaron
On Sun, Jan 3, 2010 at 4:00 PM, Gabi
On Thu, Dec 3, 2009 at 9:13 AM, Johann Hibschman joha...@gmail.com wrote:
On Dec 2, 9:59 pm, Johann Hibschman joha...@gmail.com wrote:
On Dec 2, 9:09 pm, David Brown cloj...@davidb.org wrote:
You can tune the max with -Xmx1G for example, to limit it to one GB.
That's a good idea; then I'll
Isn't the audio part of the JDK something that Sun wasn't able to open
source because of licensing issues? I recall that openjdk had issues
in that area initially at least, I haven't looked recently.
-- Aaron
--~--~-~--~~~---~--~~
You received this message
Looks really nice Tom!
Wouldn't it be better to make the words API documentation the link
rather than adding the extra valueless word here?
Alternatively, you could turn the namespace titles into links and get
rid of the line words API documentation here entirely. That might
also help google
On Tue, Aug 18, 2009 at 11:28 AM, Brad
Beveridgebrad.beveri...@gmail.com wrote:
On 2009-08-17, at 8:58 PM, FFT fft1...@gmail.com wrote:
On Mon, Aug 17, 2009 at 9:25 AM, Bradbevbrad.beveri...@gmail.com
wrote:
Ah, that makes more sense re the cheating then. Your insight for
array range
On Tue, Aug 18, 2009 at 3:32 PM, Aaron Cohenremled...@gmail.com wrote:
On Tue, Aug 18, 2009 at 11:28 AM, Brad
Beveridgebrad.beveri...@gmail.com wrote:
On 2009-08-17, at 8:58 PM, FFT fft1...@gmail.com wrote:
On Mon, Aug 17, 2009 at 9:25 AM, Bradbevbrad.beveri...@gmail.com
wrote:
Ah, that
On Mon, Aug 17, 2009 at 7:45 PM, Mark Engelbergmark.engelb...@gmail.com wrote:
On Mon, Aug 17, 2009 at 9:25 AM, Bradbevbrad.beveri...@gmail.com wrote:
I found
another 2-3x speed up by coercing the indexes with (int x), ie
(defmacro mass [p] `(double (aget ~p (int 0
Which makes me
On Thu, Aug 13, 2009 at 5:14 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 13.08.2009 um 22:30 schrieb Brian Hurt:
Now, I can certainly see a lot of potiential downsides to this.
Redefining what #{} or #() means is just the start.
I think, this is the reason Rich is not very positive
On Thu, Aug 13, 2009 at 5:23 PM, Aaron Cohenremled...@gmail.com wrote:
On Thu, Aug 13, 2009 at 5:14 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 13.08.2009 um 22:30 schrieb Brian Hurt:
Now, I can certainly see a lot of potiential downsides to this.
Redefining what #{} or #() means is
On Wed, Aug 12, 2009 at 3:59 PM, Richard Newmanholyg...@gmail.com wrote:
Is there some reason that the Java JIT is not doing this, with the
original code using defn, as fast as it works when using defmacro?
The macro expands into bytecode within the same Java method, rather
than a method
On Wed, Aug 12, 2009 at 4:24 PM, Richard Newmanholyg...@gmail.com wrote:
I may be wrong, but doesn't a typical function invocation involve
dereferencing the Var holding the object that implements IFn and
calling invoke? It seems pretty intuitive to me that this would be
difficult to inline
I'm getting a very significant performance improvement by adding a
couple of JVM parameters (using jdk 1.6.0_14). They are:
-XX:+DoEscapeAnalysis
-XX:+UseBiasedLocking (I think the -server flag is required for those
two flags to do anything).
My runtime with n = 5,000,000 goes from ~7.5 seconds
On Wed, Aug 12, 2009 at 4:49 PM, Aaron Cohenremled...@gmail.com wrote:
I'm getting a very significant performance improvement by adding a
couple of JVM parameters (using jdk 1.6.0_14). They are:
-XX:+DoEscapeAnalysis
-XX:+UseBiasedLocking (I think the -server flag is required for those
two
On Tue, Aug 11, 2009 at 5:26 PM, Andy
Fingerhutandy_finger...@alum.wustl.edu wrote:
In case it matters to anyone, my intent in creating these Clojure
programs to compare their speed to others isn't to try to rip into
Clojure, or start arguments. It is for me to get my feet wet with
Clojure,
On Tue, Aug 11, 2009 at 8:13 PM, Andy
Fingerhutandy_finger...@alum.wustl.edu wrote:
On Aug 11, 2:36 pm, Aaron Cohen remled...@gmail.com wrote:
At that point is it possible you're just paying the price of
PersistentVector for the bodies vector? Does it improve much if you
change bodies
On Sun, Aug 2, 2009 at 3:28 PM, John Harrop jharrop...@gmail.com wrote:
On Sun, Aug 2, 2009 at 5:48 AM, James Sofra james.so...@gmail.com wrote:
(defn get-tile [[x y] maze]
(if (tile-in-bounds? [x y] maze)
((maze y) x)))
(defn get-tile [[x y] maze]
(get (get maze y) x))
While
I think it's MY C++ background shining through, but I keep reading
(ref-commit) as execute the commit method of the ref datastructure.
I'll have to echo the lack of enthusiasm of inputting fancy characters,
though the Emacs mode to prettify the display look interesting.
Good luck with the
At my day job, we've always used a custom classloader to get around that
asymmetry.
-- Aaron
On Thu, Jul 30, 2009 at 9:51 AM, Rich Hickey richhic...@gmail.com wrote:
On Jul 29, 6:09 pm, Jason Wolfe jawo...@berkeley.edu wrote:
Is this a bug?
user (eval `(make-array ~Byte/TYPE 2))
;
What is this convention you are using with the - ?
Are you coming from a C or C++ background or is this something lispy I
haven't seen before?
-- Aaron
On Thu, Jul 30, 2009 at 7:56 PM, Richard Newman holyg...@gmail.com wrote:
On 30 Jul 2009, at 2:26 PM, David Plumpton wrote:
I'm trying to
One thing you need to do is define what you mean exactly when you say Java
vs Clojure.
In your example you are comparing clojure code vs java code but you are also
comparing clojure data structures (PersistentMap) with traditional Java data
structures (HashMap). I'm not sure you meant to conflate
What kind of infrastructure would it take to do something like Escape
Analysis in the clojure compiler?
It seems to me that it should be possible for something (the clojure
compiler?, a new JIT of some sort?) to notice that a data structure is being
used in a thread-local manner, and use that
is comparable.
For example, lets say the Euler problem number 1 wants you want to
return a result of 123.
The end result is 123, if I write code in Java and then in Clojure, I
want to see the runtimes of the different versions.
On Jul 27, 1:34 pm, Aaron Cohen remled...@gmail.com wrote
in only one thread, you have to check that there's never a
reference to an older version.
You could theoretically re-implement the Persistent List/Map/Set
interfaces with mutable implementations, but I don't know where to go
from there.
-SS
On Jul 27, 1:37 pm, Aaron Cohen remled
Another note is that these kind of micro-benchmarks are a little difficult
to do correctly in most modern VMs, including Hotspot. In particular, the
kind of tight loop you're doing there where the result isn't used can
sometimes be optimized away by the JIT to go infinitely fast. A pretty
good
I'm a little unclear on why this happens still.
#(= % a) is a closure, correct? My understanding is that this should
capture the environment when it is defined. Why does the environment not
include the current bindings?
-- Aaron
On Tue, Jul 14, 2009 at 4:03 PM, Mark Engelberg
Isn't this a case of wrapping a Java API needlessly?
What's so bad about: (SwingUtilities/invokeLater my-func) ?
-- Aaron
On Sat, Jun 13, 2009 at 5:59 PM, Kevin Downeyredc...@gmail.com wrote:
On Sat, Jun 13, 2009 at 2:55 PM, Meikel Brandmeyerm...@kotka.de wrote:
Hi,
Am 13.06.2009 um
It's a great idea, and already in progress. ;)
http://code.google.com/p/clojure-contrib/source/browse/#svn/trunk/src/clojure/contrib/test_clojure
-- Aaron
On Thu, Jun 4, 2009 at 12:31 PM, Richard Newman holyg...@gmail.com wrote:
One of the things that occurred to me at last night's Meetup
I'm sorry if I missed you mentioning it, but have you tried running
your code with (set! *warn-on-reflection* true) in effect?
-- Aaron
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this
On Tue, Mar 31, 2009 at 1:24 PM, Aaron Cohen remled...@gmail.com wrote:
I'm sorry if I missed you mentioning it, but have you tried running
your code with (set! *warn-on-reflection* true) in effect?
Ugh, I should have looked at your code before I sent that. There it
is on line 1
user= (defstruct desilu :fred :ricky)
#'user/desilu
user= (def x (map (fn [n]
(struct-map desilu
:fred n
:ricky 2
:lucy 3
:ethel 4))
(range 100)))
#'user/x
user= (time (reduce (fn [n y] (+ n (:fred
Isn't it just asking for confusion?
I really like that maps are functions of their keys though.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to
201 - 255 of 255 matches
Mail list logo