?
On Mon, Nov 24, 2008 at 4:02 PM, Ralf Bensmann [EMAIL PROTECTED] wrote:
Can you provide a summary of the libs? Or where can I find a
documentation?
TIA
On Mon, Nov 24, 2008 at 3:51 PM, Chouser [EMAIL PROTECTED] wrote:
This just a quick reminder about the poll. We've got 22 responses,
Seconded. As far as I can tell all you can do is go to Sourceforge
and poke around in the source code:
http://clojure-contrib.svn.sourceforge.net/viewvc/clojure-contrib/trunk/src/clojure/contrib/
On Wed, Nov 26, 2008 at 12:26 AM, Ralf Bensmann
[EMAIL PROTECTED] wrote:
?
On Mon, Nov 24, 2008
Hi,
On 26 Nov., 02:08, samppi [EMAIL PROTECTED] wrote:
(defn a1 [x]
#(vector :a (a2 x) :e))
What must I change?
Your call to a2 is not in tail position. You'll probably have
to rewrite your functions, so that this is the case.
(Sorry, can't check exactly. Don't have the latest SVN
If you don't like viewing source code at sourceforge, you can always
read the code from the git mirror at github.
http://github.com/kevinoneill/clojure-contrib/tree/master
I find that their servers respond faster for me and it is a bit easier
to find the page I am looking for. Also, if you watch
Rich,
I readily acknowledge the diversity of message passing frameworks for
Java.
Notwithstanding, I think it makes sense to think about distributed
message passing mechanism inherent to Clojure language, like the one
Erlang has.
It is Erlang abstraction of light-weight processes and extreme ease
I did some more testing on this and discovered some interesting
things...
Executive Summary: I propose the following patch
Index: src/jvm/clojure/lang/Compiler.java
===
--- src/jvm/clojure/lang/Compiler.java (revision 1123)
+++
Now that you've gone this far, why not do this?
- class clojure.lang.TailCall contains an AFn
- Compiler checks for a tail call position and instead of calling it,
returns new TailCall(AFn)
- In invoke, while returnvalue instanceof TailCall, returnvalue =
returnvalue.fn.invoke(returnvalue)
I
very elegant !
thanks
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For
On Nov 26, 10:28 am, dreish [EMAIL PROTECTED] wrote:
Now that you've gone this far, why not do this?
- class clojure.lang.TailCall contains an AFn
- Compiler checks for a tail call position and instead of calling it,
returns new TailCall(AFn)
- In invoke, while returnvalue instanceof
On Nov 26, 11:14 am, Rich Hickey [EMAIL PROTECTED] wrote:
There's a very simple reason - such built-in trampolines are
incompatible with interoperability. Anyone can build a trampoline
system into their lang to get tail calls and make sure it is used
consistently within lang - but what do
One big issue to note is that, because of Refs, Clojure agent
semantics can't simply be remoted the way Erlang processes can be.
This is because a message send could include a references to a Ref,
thus exposing mutable state remotely. This breaks, well, just about
everything.
If you restrict
I was toying around with agents today, and I got a weird behavior:
agents hang clojure.lang.Script. Here's a simple demo script; if you
run this script, it'll print the vector and the program will be
hung.
(let [a (agent [])]
(doseq [i (range 10)]
(send-off a conj i))
(await a)
The documentation for commute says Sets the in-transaction-value of
ref This implies to me that when the transaction ends, the ref
will have its previous value.
(def myRef (ref 19))
(dosync (commute myRef inc)) - 20
@myRef - 20
Why isn't the value of the last line 19?
--
R. Mark Volkmann
On Wed, Nov 26, 2008 at 1:00 PM, dreish [EMAIL PROTECTED] wrote:
My favorite thing about recur is that the compiler tells you
immediately if you accidentally put it somewhere other than in a tail
position. You don't have to wait for the stack to overflow in actual
use because your test case
Hi,
On Tuesday 25 November 2008 06:05, Rich Hickey wrote:
I've added trampoline to ease the conversion/creation of mutually
recursive algorithms in Clojure.
...
Clojure's new trampolines for mutually recursive functions has caught
the attention of the Scala folks. There's a nice thread
On Wed, Nov 26, 2008 at 1:41 PM, Vincent Foley [EMAIL PROTECTED] wrote:
I was toying around with agents today, and I got a weird behavior:
agents hang clojure.lang.Script. Here's a simple demo script; if you
run this script, it'll print the vector and the program will be
hung.
The agent
I am looking to see if anyone has come up with an ANT task or script
for compiling clojure CLJ files using the clojure compiler. Much
appreciated if anyone has anything to contribute.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
On Wed, Nov 26, 2008 at 1:13 PM, Shawn Hoover [EMAIL PROTECTED] wrote:
On Wed, Nov 26, 2008 at 1:55 PM, Mark Volkmann [EMAIL PROTECTED]
wrote:
The documentation for commute says Sets the in-transaction-value of
ref This implies to me that when the transaction ends, the ref
will have
On Nov 26, 1:45 pm, BrianS [EMAIL PROTECTED] wrote:
I am looking to see if anyone has come up with an ANT task or script
for compiling clojure CLJ files using the clojure compiler. Much
appreciated if anyone has anything to contribute.
Hi Brian,
The latest Clojure releases (post 1101) use
On Nov 26, 11:19 am, Dave Griffith [EMAIL PROTECTED] wrote:
Unlike some of the other comments in this thread, I'll say I believe
that remote agents in Clojure could be a very powerful idea,
particularly due to integration with the STM. Orchestrating in-
memory and eternal communications
On Nov 26, 2:35 pm, Mark Volkmann [EMAIL PROTECTED] wrote:
On Wed, Nov 26, 2008 at 1:13 PM, Shawn Hoover [EMAIL PROTECTED] wrote:
On Wed, Nov 26, 2008 at 1:55 PM, Mark Volkmann [EMAIL PROTECTED]
wrote:
The documentation for commute says Sets the in-transaction-value of
ref This
I've seen a few reports of the following error occurring when people
start SLIME with clojure:
user= java.lang.Exception: Unable to resolve symbol: progn in this
context (NO_SOURCE_FILE:1)
It turns out this occurs when I launch SLIME with C-u M-x slime RET
clojure RET, but I found out that
On Tue, Nov 25, 2008 at 8:05 AM, Rich Hickey [EMAIL PROTECTED] wrote:
big snip
To convert to a trampoline, simply return closures over your tail
calls, rather than direct calls. This is as simple as prepending #
(declare bar)
(defn foo [n]
(if (pos? n)
#(bar (dec n))
I'm curious
On Wed, Nov 26, 2008 at 3:22 PM, Mark Volkmann
[EMAIL PROTECTED] wrote:
I'm curious about this syntax. I thought if #(function-name args)
creates a closure then I can put one in a variable and execute it
laterI entered this in a REPL.
(def myClosure #(prn Hello))
How can I execute the
On Nov 26, 2008, at 3:22 PM, Mark Volkmann wrote:
I entered this in a REPL.
(def myClosure #(prn Hello))
How can I execute the closure in myClosure now?
Clojure
user= (def myClosure #(prn Hello))
#'user/myClosure
user= (myClosure)
Hello
nil
user=
--Steve
Thanks for untangling the Ant black magic, Stefan. Forking a separate
VM seems the simplest way to go.
With that in mind, here ( http://bit.ly/17N0M ) is a patch (against
r1125) that includes all of Stephen Stuart's additions for the
clojure.main function, plus the modifications to
On 25 nov, 15:05, Rich Hickey [EMAIL PROTECTED] wrote:
To convert to a trampoline, simply return closures over your tail
calls, rather than direct calls. This is as simple as prepending #
I've maybe missed something, but will this work if one wants to make
the final return value of the tail
On Nov 26, 2008, at 4:32 PM, lpetit wrote:
I've maybe missed something, but will this work if one wants to make
the final return value of the tail call a closure ?
Along the same lines of this being a manual way to do TCO, that issue
will need to be handled manually as well. Here's what
Hello,
In order to help a poor javaish like me go straight to the point with
what emacs offers concerning what you say below (sexpr ...), what
would you consider the best link to follow and read to understand the
functionalities, and have the keyboard shortcuts.
Indeed, I intend to (humbly) do
On Nov 24, 2008, at 11:57 AM, Stephen C. Gilardi wrote:
I've uploaded a patch along those lines: ant-compile-main.patch,
http://tinyurl.com/5azp3u
based on our recent work on this. This includes Compile.java,
main.clj, and modifies build.xml.
I've updated this to reflect several of the
On 26 Nov., 21:26, Chouser [EMAIL PROTECTED] wrote:
On Wed, Nov 26, 2008 at 3:22 PM, Mark Volkmann
[EMAIL PROTECTED] wrote:
I'm curious about this syntax. I thought if #(function-name args)
creates a closure then I can put one in a variable and execute it
laterI entered this in a
On Fri, Nov 21, 2008 at 2:17 AM, Mark McGranaghan [EMAIL PROTECTED] wrote:
I've created some experimental HTML docs for Clojure. You can see them
on S3:
http://clj-doc.s3.amazonaws.com/tmp/doc-1116/index.html
A really cool addition to this would be to modify the display of the
code for the
Dave,
Sure thing, only immutable values will cross network, no Refs.
As for the wait problem of, as you put it: the tricky code won't be
the remote equivalent of send, but rather the remote equivalent of
wait, as that requires keeping track of where the remote sends come
from - this can be solved
On Nov 26, 5:13 pm, Stephen C. Gilardi [EMAIL PROTECTED] wrote:
On Nov 24, 2008, at 11:57 AM, Stephen C. Gilardi wrote:
I've uploaded a patch along those lines:
ant-compile-main.patch,http://tinyurl.com/5azp3u
based on our recent work on this. This includes Compile.java,
main.clj,
I've started documenting AOT compilation and the new :gen-class option
for ns:
http://clojure.org/compilation
It's still a work in progress. Feedback welcome.
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
That's great -- happy it's in.
Quick impression: I like the improvements to clojure.main, especially
that forms from stdin -e are evaluated after init files are loaded
*command-line-args* is set.
Now that clojure.lang.Compile is official, I'll post a cleaned up
version of my cljc script (but
On Nov 26, 9:17 pm, Mark Volkmann [EMAIL PROTECTED] wrote:
This is probably more of a Java question than a Clojure question. I'm
thinking most people will want clojure-contrib in their classpath. I
tried this using SVN 1127 without success.
java -cp clojure-contrib.jar -jar clojure.jar
Looks good so far, Rich. Should be a blissfully smooth transition
from the legacy gen-class impl.
This is only tangentially related to the docs you're writing, but I
won't let that stop me:
As you know, I have at least one use case where being able to generate
gen-class specs from a macro (or,
38 matches
Mail list logo