Stefan put in words what I was thinking earlier today. For those of us that use
both CL and clojure, keeping swank-clojure up to date wrt the slime HEAD is a
good thing, if you ask me. It is, however, a two-way street and I would imagine
that the swank-clojure implementors don't want to spend
Hi,
Stefan Kamphausen wrote:
I'll take a look at it the next few days (er, evenings that is), if I
find the time. No promises ;-)
Not that I'm close to a solution, but at least I have stacktrace...
After some digging in the clojure-swank code I came across this piece
in swank.clj:
(defn-
Hi,
I'm wondering what part is missing in which provides a means for
nested contexts to communicate with code before it the call stack. at
http://clojure.org/vars? I think the wording is broken at the end.
Jacek
--
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl
--
Hi,
during some examinations about the broken REPL with current Slime I
found that I can't create names with a trailing %:
Clojure 1.1.0-alpha-SNAPSHOT
user= (def %thisworks 11)
#'user/%thisworks
user= %thisworks
11
user= (def %thisdoesnt% 22)
java.lang.Exception: Too many arguments to def
On Nov 16, 8:03 pm, ngocdaothanh ngocdaoth...@gmail.com wrote:
Could someone provide an example about using Clojure with Restlet?
I found:http://github.com/stuartsierra/altlaw-clojure-restlet
but don't understand how the code works as a web application.
It doesn't. That's just a few helper
On Nov 16, 11:57 am, Jonas Enlund jonas.enl...@gmail.com wrote:
I made count return the number of rows because that way (count
a-matrix) == (count (seq a-matrix)). I don't know if it's the right
thing to do, maybe rows*cols would make more sense.
Good point. I don't know which is better.
-SS
I'm having this same problem. Did you find a way around it?
I want to try changing the User-Agent, but I can't figure out
how to do that.
What's a catalog file?
any ideas?
thanks,
paul w
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
Jon,
Thanks for the reply. You are correct. When my compiled code tries
to run (eval (+ 1 1)) I get the same exception that I got when I
tried (+ 1 1) from the repl.
Since I only need to be able to interact with the REPL when the client
is running on my development machine, I am going to try
Hi Paul,
the code from [1] does not work under the latest Terracotta (3.1.1)
with clojure-slim.jar's in the following combinations:
1) branch 1.0.x from [3]
2) branch 1.0.x from [3] + modified
ClojureTerracottaConfigurator.java (uncommented lines)
3) [2] svn revision 1335 + modified
On Tue, Nov 17, 2009 at 08:03:59AM -0800, pkw wrote:
I'm having this same problem. Did you find a way around it?
I want to try changing the User-Agent, but I can't figure out
how to do that.
I suspect that the Sax parser by default is configured to not allow
fetching of the DTD over the net.
I
On Tue, Nov 17, 2009 at 8:40 AM, Jacek Laskowski ja...@laskowski.net.plwrote:
Hi,
I'm wondering what part is missing in which provides a means for
nested contexts to communicate with code before it the call stack. at
http://clojure.org/vars? I think the wording is broken at the end.
A quick aside about matrices. Every dense matrix algorithm is
measured by the number of rows (n). LU factorization is O(n^3), as is
QR. If memory serves, Eigenvalues are usually O(n^2). Determinants
are O(n^3), too. These estimates change if the matrix is banded, they
usually become O(n).
I *THINK* what is meant by the non-numeric is anything that matches
#[a-zA-z]
Just my $.02
Sean
On Nov 17, 9:30 am, Stefan Kamphausen ska2...@googlemail.com wrote:
Hi,
during some examinations about the broken REPL with current Slime I
found that I can't create names with a trailing %:
On Tue, Nov 17, 2009 at 1:46 PM, Sean Devlin francoisdev...@gmail.comwrote:
I *THINK* what is meant by the non-numeric is anything that matches
#[a-zA-z]
Nah, it'll be anything that's allowed elsewhere AND is not a digit.
--
You received this message because you are subscribed to the
Hi,
On Nov 17, 8:12 pm, John Harrop jharrop...@gmail.com wrote:
On Tue, Nov 17, 2009 at 1:46 PM, Sean Devlin francoisdev...@gmail.comwrote:
I *THINK* what is meant by the non-numeric is anything that matches
#[a-zA-z]
Nah, it'll be anything that's allowed elsewhere AND is not a digit.
On Tue, Nov 17, 2009 at 8:40 AM, Jacek Laskowski ja...@laskowski.net.pl wrote:
I'm wondering what part is missing in which provides a means for
nested contexts to communicate with code before it the call stack. at
http://clojure.org/vars? I think the wording is broken at the end.
Fixed,
On Tue, Nov 17, 2009 at 2:17 PM, Stefan Kamphausen
ska2...@googlemail.comwrote:
Hi,
On Nov 17, 8:12 pm, John Harrop jharrop...@gmail.com wrote:
On Tue, Nov 17, 2009 at 1:46 PM, Sean Devlin francoisdev...@gmail.com
wrote:
I *THINK* what is meant by the non-numeric is anything that
Hi,
On Nov 17, 1:47 pm, Stefan Kamphausen ska2...@googlemail.com wrote:
[...]
user= user= Connection opened on local port 37693
#ServerSocket ServerSocket
[addr=0.0.0.0/0.0.0.0,port=0,localport=37693]
user= user= java.lang.InterruptedException
[...]
at
On Tue, Nov 17, 2009 at 2:31 PM, Chouser chou...@gmail.com wrote:
On Tue, Nov 17, 2009 at 8:40 AM, Jacek Laskowski ja...@laskowski.net.pl
wrote:
I'm wondering what part is missing in which provides a means for
nested contexts to communicate with code before it the call stack. at
On Nov 16, 4:28 pm, Chouser chou...@gmail.com wrote:
'let' is also careful to always have the user provide the symbol
being bound as a symbol. That is you say {:keys [a b c]} not
{:keys [:a :b :c]}. What do you think of having let-kw take
symbols instead of keywords for the names being
Stefan,
Thanks for pursuing this so adamantly :) For a long time (more than a year)
it was possible to use SLIME tip. It would be great for that to continue.
David
On Tue, Nov 17, 2009 at 2:44 PM, Stefan Kamphausen
ska2...@googlemail.comwrote:
Hi,
On Nov 17, 1:47 pm, Stefan Kamphausen
Hi John,
On Nov 17, 8:40 pm, John Harrop jharrop...@gmail.com wrote:
The docs say that letters and *, +, !, -, _, and ? should work anywhere,
do you read it that way? I think the doc (if you are referring to
http://clojure.org/reader) are a little vague here: Symbols begin
with a non-numeric
How do you def a symbol that you make using (symbol)? I.E. if I try
to do (def (symbol x) 2) I get:
java.lang.Exception: Second argument to def must be a Symbol. (And
why does it say the \second argument must be a symbol?)
Thanks,
Nick.
--
You received this message because you are subscribed
On Tue, Nov 17, 2009 at 3:59 PM, nchubrich nicholas.chubr...@gmail.comwrote:
How do you def a symbol that you make using (symbol)? I.E. if I try
to do (def (symbol x) 2) I get:
java.lang.Exception: Second argument to def must be a Symbol. (And
why does it say the \second argument must be a
On Tue, Nov 17, 2009 at 4:11 PM, John Harrop jharrop...@gmail.com wrote:
On Tue, Nov 17, 2009 at 3:59 PM, nchubrich nicholas.chubr...@gmail.com
wrote:
How do you def a symbol that you make using (symbol)? I.E. if I try
to do (def (symbol x) 2) I get:
java.lang.Exception: Second argument to
Hi,
Am 17.11.2009 um 19:46 schrieb Sean Devlin:
I *THINK* what is meant by the non-numeric is anything that matches
#[a-zA-z]
Along with !,+,*,.,?,...
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
Hey everyone,
I was working with an object that implements java.util.Map today, and
I had to turn it into a Clojure map.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html
I cam up with this utility fn
(defn read-map
Designed to turn a java.util.Map into a Clojure map.
[a-map]
Sean,
If the class implements Map, then it already behaves as an associative
data structure in Clojure. E.g.,
(map (fn [[k v]] (println v))
(doto (java.util.HashMap.)
(.put foo bar)
(.put baz noo)))
(get (doto (java.util.HashMap.)
(.put foo bar)
(.put baz
Heh. Learn something new every day.
This also works
(into {} (System/getProperties))
On Nov 17, 4:56 pm, Richard Newman holyg...@gmail.com wrote:
Sean,
If the class implements Map, then it already behaves as an associative
data structure in Clojure. E.g.,
(map (fn [[k v]] (println v))
user= (import 'java.util.HashMap)
java.util.HashMap
user= (def m (doto (HashMap.) (.put 'a :a) (.put 'b :b)))
#'user/m
user= m
#HashMap {b=:b, a=:a}
user= (into {} m)
{b :b, a :a}
user= (class *1)
clojure.lang.PersistentArrayMap
user=
On Tue, Nov 17, 2009 at 1:56 PM, Richard Newman
Heh. Learn something new every day.
Heh.
Incidentally, because of this property there are only three situations
in which you need conversion at all:
* To get some additional interface that Clojure's maps provides (e.g.,
to use them as functions)
* To get persistence
* To have them print
Sean Devlin wrote:
Hey everyone,
I was working with an object that implements java.util.Map today, and
I had to turn it into a Clojure map.
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html
I cam up with this utility fn
(defn read-map
Designed to turn a java.util.Map into a
Wow.
So this works
user=(get (System/getProperties) os.arch)
x86_64
And this does not
user=((System/getProperties) os.arch)
java.lang.ClassCastException: java.util.Properties cannot be cast to
clojure.lang.IFn (NO_SOURCE_FILE:0)
but this does
user=((into {} (System/getProperties)) os.arch)
Okay golfers. Is there a better way to do this?
(defn put-all!
[java-map clj-map]
(do
(doseq [entry clj-map]
(.put java-map (key entry) (val entry)))
java-map))
user=(put-all (java.util.HashMap. ) {:a 1 :b 2 :c 3})
#HashMap {:c=3, :b=2, :a=1}
I already tried into :)
Sean Devlin wrote:
Okay golfers. Is there a better way to do this?
(defn put-all!
[java-map clj-map]
(do
(doseq [entry clj-map]
(.put java-map (key entry) (val entry)))
java-map))
user=(put-all (java.util.HashMap. ) {:a 1 :b 2 :c 3})
#HashMap {:c=3, :b=2, :a=1}
How about?:
(java.util.HashMap. {:a 1 :b 2 :c 3})
= #HashMap {:c=3, :b=2, :a=1}
Mark
Sean Devlin francoisdev...@gmail.com writes:
Okay golfers. Is there a better way to do this?
(defn put-all!
[java-map clj-map]
(do
(doseq [entry clj-map]
(.put java-map (key
Alex Osborne wrote:
Sean Devlin wrote:
Okay golfers. Is there a better way to do this?
(defn put-all!
[java-map clj-map]
(do
(doseq [entry clj-map]
(.put java-map (key entry) (val entry)))
java-map))
user=(put-all (java.util.HashMap. ) {:a 1 :b 2 :c 3})
#HashMap
Very awesome. So this means you can (almost) use the putAll method.
The only catch is putAll return void (WHY!)
(defn put-all
[java-map clj-map]
(doto java-map
(.putAll clj-map)))
Sean
On Nov 17, 5:29 pm, Alex Osborne a...@meshy.org wrote:
Sean Devlin wrote:
Okay golfers. Is there
The only catch is putAll return void (WHY!)
Apparently Java people like having more LOC :)
(defn put-all
[java-map clj-map]
(doto java-map
(.putAll clj-map)))
Note that this isn't limited to Clojure maps, so 'clj-map' is probably
a bad variable name. It works just as well for
On Tue, Nov 17, 2009 at 4:22 PM, Chouser chou...@gmail.com wrote:
On Tue, Nov 17, 2009 at 4:11 PM, John Harrop jharrop...@gmail.com wrote:
On Tue, Nov 17, 2009 at 3:59 PM, nchubrich nicholas.chubr...@gmail.com
wrote:
How do you def a symbol that you make using (symbol)? I.E. if I try
On Tue, Nov 17, 2009 at 5:06 PM, Sean Devlin francoisdev...@gmail.comwrote:
Heh. Learn something new every day.
This also works
(into {} (System/getProperties))
And I'd much prefer it. Passing a mutable Java map around to functions that
expect a map but assume it will never change out
In the example I made up Tina has the friend Karl.
I can not simply store a copy of the Karl person in Tinas :friends
slot,
because when Karl gets one year older, then I don‘t want to go through
all persons, looking for Karls, and have their age updated.
Instead it is preferred to have
On Nov 15, 9:05 am, Danny Woods dannywo...@gmail.com wrote:
Danny, could you maybe hack up a possible very simple example of what
you mean?
snip
I can not simply store a copy of the Karl person in Tinas :friends
slot,
because when Karl gets one year older, then I don‘t want to go
I wonder if perhaps (into {} a-java-map) should work but no other
substitutions of a potentially-mutable map for a Clojure map.
Baby, bathwater. Making a persistent map out of a Java map is
expensive. Not everything that implements Map is concrete; e.g.,
spending several seconds making a
Can anyone defend Clojure in comparision to JScheme?
I want to see all pros why to learn Clojure instead of JScheme.
I've found out that the java methods invocation and rest of syntax is
very similar, which satisfies me since it is easier to work with lisp
family languages.
--
You received this
On Tue, Nov 17, 2009 at 6:24 PM, Richard Newman holyg...@gmail.com wrote:
I wonder if perhaps (into {} a-java-map) should work but no other
substitutions of a potentially-mutable map for a Clojure map.
Baby, bathwater. Making a persistent map out of a Java map is
expensive. Not everything
can anyone explain why this doesn't work?
(defprotocol arrow
( ([f g] [f g fs]) compose left to right))
(extend clojure.lang.Fn
arrow
{: (fn
([f g] #(g (f %)))
([f g fs] (apply ( f g) fs)))})
( inc inc inc)
; gives this error:
; java.lang.IllegalArgumentException:
Well, what are your needs or objectives?
If you just want to do Scheme on top of Java, JScheme will be fine.
The rationale behind Clojure is functional programming and
concurrency:
http://clojure.org/rationale
For a more comprehensive answer, I'll let the man himself speaks 8)
Rich does a
On Nov 16, 2:49 pm, John Harrop jharrop...@gmail.com wrote:
For a real challenge, try implementing Hashlife using Clojure's immutable
data structures. :)
This might help.
http://www.ddj.com/hpc-high-performance-computing/184406478
To quote the author, Tomas G. Rokicki : This decision lets you
My history man be wrong, but wasn't JScheme the original starting
point for DotLisp?
http://dotlisp.sourceforge.net/dotlisp.htm
-m
--
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
On Nov 17, 2:52 pm, David Nolen dnolen.li...@gmail.com wrote:
Thanks for pursuing this so adamantly :) For a long time (more than a year)
it was possible to use SLIME tip. It would be great for that to continue.
You can still use SLIME; just avoid the slime-autodoc contrib. Use
(slime-setup
I always wondered what intern was for; the answer was staring me in
the face
On Nov 17, 9:08 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
On Nov 17, 5:57 pm, John Harrop jharrop...@gmail.com wrote:
How stable is the intern function likely to be?
Quite stable, I think. It's a
Suppose one went for broke and made a variable binding form that was
1) Maximally permissive
and
2) Notationally minimal
Without saying whether this is \advisable, we might agree it would be
an interesting exercise.
It might look like this:
\All arguments are potentially keywords; and since
(preceding message, re-formatted)
Suppose one went for broke and made a variable binding form that was
1) Maximally permissive
and
2) Notationally minimal
Without saying whether this is \advisable, we might agree it would be
an interesting exercise.
It might look like this:
\All
Stefan Kamphausen ska2...@googlemail.com writes:
Unless there are some really great features added upstream in slime,
fixing swank-clojure to work with their latest changes is a low priority.
this is a pity, at least for those of us, who also use Slime to do
some CL hacking. For that setup
I'm pleased to announce the initial release of Leiningen.
Leiningen is a build tool for Clojure designed to not set your hair on fire.
Building Clojure projects with tools designed for Java can be an
exercise in frustration. If you use Ant, you end up copying around a
lot of the same tasks
Awesomeness.
On Wed, Nov 18, 2009 at 2:29 AM, Phil Hagelberg p...@hagelb.org wrote:
I'm pleased to announce the initial release of Leiningen.
Leiningen is a build tool for Clojure designed to not set your hair on
fire.
Building Clojure projects with tools designed for Java can be an
57 matches
Mail list logo