chunked-seq? is lying?

2010-12-31 Thread Mike K
In 1.2, I don't understand why one of the sequences below is chunked,
but the other is not.  Also, chunked-seq? seems to be lying about the
second one.

user (take 1 (map #(do (print .) [% %2]) (range 100) (range 100)))
(.[0 0])
user (take 1 (map #(do (print .) [%]) (range 100)))
([0])
user (chunked-seq? (map #(do (print .) [%]) (range 100)))
false

   Mike




-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: chunked-seq? is lying?

2010-12-31 Thread Mike K
OK, I understand the difference in behavior between the two maps.  But
why is chunked-seq? incorrect?

user (take 1 (map #(do (print .) [%]) (range 100)))
([0])
user (chunked-seq? (range 100))
false
user (chunked-seq? (map #(do (print .) [%]) (range 100)))
false
user (chunked-seq? (take 1 (map #(do (print .) [%]) (range 100
false

The implementation of chunked-seq? checks to see if the sequence is an
instance of clojure.lang.IChunkedSeq.  That doesn't appear to be
sufficient in the case of map taking one collection.

Also, Chas Emerick stated in another discussion that ranges always
produce chunked seqs, but the value of (chunked-seq? (range 100))
seems to belie that.


  Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Any demand for ClojureCLR support under slime / emacs?

2010-12-12 Thread Mike K
I really, really want ClojureCLR to play nice with emacs the way
Clojure does.  I've looked at the swank-clojure sources, but I really
don't know enough about the Clojure and ClojureCLR internals to make
much headway with this project.  Still, I'd love to help out in any
way that I can.

Is anyone else out there interested in such a project?

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


with-meta vs ^{}

2010-11-22 Thread Mike K
In Programming Clojure Stuart Halloway says:

It is important to note that the metadata reader macro is not the same
as with-meta. The metadata reader macro adds metadata for the
compiler, and with-meta adds metadata for your own data:

(def ^{:testdata true} foo (with-meta [1 2 3] {:order :ascending}))

(Note: example changed to 1.2 style syntax)

He then shows the difference between (meta foo) and (meta #'foo).


However, it looks like I can accomplish the same thing with

(def ^{:testdata true} foo2 ^{:order :ascending} [1 2 3])

So, is there really any difference between with-data and the reader
macro?

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: string interpolation

2010-11-20 Thread Mike K
Check out the  macro from clojure.contrib.strint.

http://clojure.github.com/clojure-contrib/strint-api.html

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: string interpolation

2010-11-20 Thread Mike K
Check out the  macro from clojure.contrib.strint.

http://clojure.github.com/clojure-contrib/strint-api.html

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: string interpolation

2010-11-20 Thread Mike K
Check out the  macro from clojure.contrib.strint.

http://clojure.github.com/clojure-contrib/strint-api.html

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


A question regarding map destructuring

2010-11-01 Thread Mike K
This question is a bit abstruse, so please bear with me :-)

Here is an example of a function with named arguments and  default
values from the book The Joy of Clojure.  It uses optional arguments
(via ) and map destructuring.

(defn slope
  [ {:keys [p1 p2] :or {p1 [0 0] p2 [1 1]}}]
  (float (/ (- (p2 1) (p1 1))
(- (p2 0) (p1 0)

(slope :p1 [4 15] :p2 [3 21])
;evaluates to -6.0


(slope :p2 [2 1])
;evaluates to 0.5


Here is an example of map destructuring with no optional arguments:

(defn print-value-a [{vala :a}]
  (println vala))

(print-value-a {:b 7 :a 3})
; prints 3

My understanding of the way optional function arguments work based on
the book and the documentation at clojure.org is that all leftover
arguments are, conceptually speaking, stored in a (presumably vector-
like) sequence which is bound to (or destructured according to) the
entity after the .  If that is true, then I would expect to be able
to do explicitly what is being done in the slope function implicitly;
i.e., the following expression should print 3:

(print-value-a [:b 7 :a 3])
; actually prints nil

So this can't be how it works, but I don't know how else to interpret
the documentation.  Is this a special case meaning if there are
optional arguments AND they are to be destructured via a map, then
insert them pairwise into a map instead of a vector?  Or does this
behavior fall directly out of the destructuring rules without a
special case based on something I'm missing?

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is ClojureCLR converging toward a release?

2010-10-11 Thread Mike K
Fantastic!  Great job David and everyone else who contributed.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is ClojureCLR converging toward a release?

2010-10-11 Thread Mike K
Fantastic!  Great job David and everyone else who contributed.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is ClojureCLR converging toward a release?

2010-10-11 Thread Mike K
Fantastic!  Great job David and everyone else who contributed.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is ClojureCLR converging toward a release?

2010-10-04 Thread Mike K
David, Rich: any further updates on this?

   Mike

On Sep 24, 8:24 am, dmiller dmiller2...@gmail.com wrote:
  Just waiting for that person's CA to be processed by Rich.

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure for VS2010

2010-09-25 Thread Mike K
Wow, really cool.  I'm looking forward to seeing this!

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Is ClojureCLR converging toward a release?

2010-09-23 Thread Mike K
It was mentioned about six weeks ago that ClojureCLR was mostly 1.2
compatible with a few outstanding issues and a couple dozen failing
tests.  What is the status now?  Is there still an intention of an
official binary release with 1.2 level functionality, or has that
target been dropped?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: why the big difference in speed?

2010-09-19 Thread Mike K
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureCLR and WPF Data Binding

2010-05-08 Thread Mike K
 Anyone else looking at this sort of thing, or even interested?

I'm very interested although I'm not looking at it right now (still
taking baby steps learning Clojure while waiting for ClojureCLR to
mature a bit)

ClojureCLR + WPF / Silverlight is ultimately where I want to go.
Thanks for being a pathfinder on this.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: seq-contains? in practice

2010-04-29 Thread Mike K

On Apr 29, 5:10 am, Stuart Halloway stuart.hallo...@gmail.com wrote:
 (There are a few calls to seq-contains? in the test suite for contrib,  
 and I wrote all of them. If you write lots of unit tests you already  
 know why such calls make sense there.)

For those of us who are newbies, would you mind being more explicit
here?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Why I have chosen not to employ clojure

2010-03-21 Thread Mike K
 I would appreciate any feedback.

According to the readme it requires bash or zsh.  Any plans to support
windows (without cygwin or other unix emulation)?

I agree with Stuart that the user experience should be friendly on all
supported platforms.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


What's an idiomatic translation of this CL data structure?

2010-03-09 Thread Mike K
In PAIP section 2.3, Norvig gives an example of a generative grammar:

;; common lisp
(defparameter *simple-grammar*
  '((sentence - (noun-phrase verb-phrase))
(noun-phrase - (Article Noun))
(verb-phrase - (Verb noun-phrase))
(Article - the a)
(Noun - man ball woman table)
(Verb - hit took saw liked))
  A grammar for a trivial subset of English.)

What's the most idiomatic way to write something like this in
Clojure?  My first attempt is as follows:


(defonce- *simple-grammar*
  {:sentence [:noun-phrase :verb-phrase]
   :noun-phrase [:Article :Noun]
   :verb-phrase [:Verb :noun-phrase]
   :Article '(the a)
   :Noun '(man ball woman table)
   :Verb '(hit took saw liked)}
  A grammar for a trivial subset of English.)

Assume I'm going to need some way to distinguish terminals from non-
terminals.  Above I used lists vs vectors.  If this were a non-toy app
where I was optimizing for performance, would it make more sense to
use vectors everywhere?  If so, what would be a good succinct way to
differentiate the two rule types?  Could I add meta-data to the vector
literals somehow?  Or perhaps use structs instead?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Mike K
On Mar 4, 4:32 pm, Glen Stampoultzis gst...@gmail.com wrote:

 Getting swank-clojure going in Windows is also a pain.  To install it the
 recommended way via ELPA you need to patch the ELPA source code first.  This
 isn't documented at the swank-clojure site either.

For others who are struggling with this issue, see the following
thread.

http://groups.google.com/group/clojure/browse_frm/thread/c4d00ba0f1614c49/3b4e04ef9fb0c8bf?lnk=gstq=elpa+windows#3b4e04ef9fb0c8bf

I ended the thread with a plea to Phil update the docs wrt this issue,
but no movement on that front yet.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-07 Thread Mike K
Is anyone familiar with running Maven (and possibly Polygot Maven) on
Windows?  Does it pretty much work as expected?  The learning curve
for Maven looks steeper than for Leiningen, but if it makes up for it
with better documentation and being better-behaved, then it may be
worth it.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureCLR and swank-clojure: port to .NET or using IKVM?

2010-03-01 Thread Mike K
Hi Iwan,

I'm very interested in this also.  I inquired about it in the
following thread:

http://groups.google.com/group/clojure/browse_frm/thread/2954b1f005663bbf#

In short, it appears nobody has attempted this.  Unfortunately, I'm
too much of a clojure and java newbie to be competent at doing the
rework involved.

Concerning your first approach, it might be nice to modify swank-
clojure so that the platform-specific parts are hidden behind an
abstraction layer as mentioned in the above thread.

I think Phil Hagelberg is the chief maintainer of swank-clojure at
this point, so it may be useful to coordinate with him.

Let me know if I can help in some way!

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ClojureCLR status?

2010-02-25 Thread Mike K
I notice there have been no checkins to ClojureCLR in the last month
and a half.  Is something big in the works?  Is absolutely nothing in
the works? :-)

If I check out and build the latest sources, how will it compare in
terms of functionality to the Clojure main branch?  In particular,
does it have cutting edge things like protocols, reify, etc?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Common Lisp's append

2010-02-21 Thread Mike K

On Feb 19, 6:23 am, Chouser chou...@gmail.com wrote:

 In Clojure, if you could use conj on a vector but instead use
 concat on a list, you'll end up with code that is both
 non-idiomatic and runs slower than necessary.

I found the exercise of doing the equivalent with Clojure vectors
pretty challenging.  Given the following use case for CL append:

CL-USER (append '(a) '() '(b (c)) '(d))
(A B (C) D)

The best I could do with Clojure vectors is this:

(defn join-vecs [v1 v2]
  (let [v2len (count v2)]
(cond
 (zero? v2len) v1
 (= v2len 1) (conj v1 (first v2))
 true (recur (conj v1 (first v2)) (rest v2)

(defn append [ vecs] (reduce join-vecs [] vecs))

user (append '[a] '[] '[b [c]] '[d])
[a b [c] d]

Is there a better / more idiomatic / more efficient way?

   Thanks,
   Mike

P.S.  I recently got the MEAP of The Joy of Clojure and, aside from
a few rough edges in the copy editing, think the content is
excellent!  Looking forward to learning more.

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Common Lisp's append

2010-02-21 Thread Mike K
Thanks, I ended up using Allegro via Lispbox here.

http://www.gigamonkeys.com/lispbox/#download

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Common Lisp's append

2010-02-18 Thread Mike K
Hey Clojurians,

I'm a Clojure and Common Lisp newbie. I heard that Norvig's PAIP was a
good book to study idiomatic CL code, so I've embarked on a project to
translate the examples to / work the exercises in Clojure.  I hope to
complete this project before the end of this century :-)

Regarding append from CL: ISTM that this is similar to concat in
Clojure.  I tried the following definition:

(defn append [ parts] (concat parts))

but it is not quite correct:

(concat '(a b c) '(d e f) '(g))

- (a b c d e f g)

(append '(a b c) '(d e f) '(g))

- ((a b c) (d e f) (g))

What is the correct way to do this?  Is it possible to code the idea
that append == concat two ways, one explicitly defining a parameter
list like parts and one just aliasing the concat symbol somehow?

Also, is the following definition closer to the CL semantics?

(use '[clojure.contrib.seq-utils :only (flatten)])
(defn append2 [ parts] (flatten (list parts)))

(append2 '((a) b c) '(d e f) '() '(g))

- (a b c d e f g)

Finally, can anyone recommend a good free common lisp implementation
that runs well with slime / emacs under Windows?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ClojureCLR under slime / emacs?

2010-02-13 Thread Mike K
Does anyone have ClojureCLR running under emacs via slime?

Failing that, can anyone give me some pointers as to how I might
hacking swank-clojure.el (or whatever) to get this to work?

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


swank-clojure installation failure via ELPA

2010-01-02 Thread Mike K
Hi all,

I'm trying to get all the latest and greatest swank-clojure 1.1.0
goodness via ELPA, but no joy.  I'm starting with an absolutely clean
slate.  I'm running a freshly installed emacs 23.1.1 on Windows 7.  I
have a blank .emacs file and no elpa subdirectory under .emacs.d.

I install elpa and do a package-list-packages.  I mark swank-clojure
1.1.0 for installation and install it.  I restart emacs and type M-x
slime.  I get [No match].  Package-list-packages indicates that
slime, slime-repl, clojure-mode, and swank-clojure are all installed.
Huh?

Please advise.

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: swank-clojure installation failure via ELPA

2010-01-02 Thread Mike K
On Jan 2, 9:13 am, Shawn Hoover shawn.hoo...@gmail.com wrote:
 Hi Mike,

 Is there anything useful going on in *messages*?

Here is the contents of *Messages*:

Contacting host: tromey.com:80
Reading [text/plain]... 4k of 4k (100%)
Reading... done.
Reading [text/plain]... 54k of 54k (100%)
Saving file c:/mbk/.emacs.d/elpa/package.el...
Wrote c:/mbk/.emacs.d/elpa/package.el
Loading c:/mbk/.emacs.d/elpa/package.el (source)...done
Saving file c:/mbk/_emacs...
Delete excess backup versions of c:/mbk/_emacs? (y or n)
Wrote c:/mbk/_emacs
Contacting host: tromey.com:80
Reading [text/plain]... 9k of 9k (100%)
Saving file c:/mbk/.emacs.d/elpa/archive-contents...
Wrote c:/mbk/.emacs.d/elpa/archive-contents
Reading [text/plain]... 575 bytes of 563 bytes (102%)
Saving file c:/mbk/.emacs.d/elpa/builtin-packages...
Wrote c:/mbk/.emacs.d/elpa/builtin-packages
Contacting host: tromey.com:80
Reading [text/plain]... 25k of 25k (100%)
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-pkg.el
Warning: defvar ignored because generated-autoload-file is let-bound
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-autoloads.el
Generating autoloads for clojure-mode-pkg.el...done
Generating autoloads for clojure-mode.el...done
Saving file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
autoloads.el...
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-autoloads.el
(No changes need to be saved)
(No files need saving)
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/... [2 times]
Compiling c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
pkg.el...done
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-pkg.elc
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/...
Compiling c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el...done
Wrote c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.elc
Checking c:/mbk/.emacs.d/elpa/clojure-mode-1.6/...
Done (Total of 2 files compiled, 1 skipped)
Contacting host: tromey.com:80
Reading [text/plain]... 347k of 347k (100%)
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime.el
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime-pkg.el
Wrote c:/mbk/.emacs.d/elpa/slime-20091016/slime-autoloads.el
Generating autoloads for slime-pkg.el...done
hack-local-variables: Local variables entry is missing the suffix


Here is the contents of *Compile-Log*:

Compiling file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode-
pkg.el at Sat Jan 02 10:30:21 2010

Compiling file c:/mbk/.emacs.d/elpa/clojure-mode-1.6/clojure-mode.el
at Sat Jan 02 10:30:21 2010

In clojure-mode:
clojure-mode.el:196:34:Warning: reference to free variable `paredit-
mode'
clojure-mode.el:196:51:Warning: reference to free variable `paredit-
version'

In clojure-font-lock-extend-region-def:
clojure-mode.el:232:33:Warning: reference to free variable `font-lock-
beg'
clojure-mode.el:239:30:Warning: assignment to free variable `font-lock-
beg'
clojure-mode.el:240:33:Warning: reference to free variable `font-lock-
end'
clojure-mode.el:242:19:Warning: assignment to free variable `font-lock-
end'

In clojure-font-lock-extend-region-comment:
clojure-mode.el:257:26:Warning: reference to free variable `font-lock-
beg'
clojure-mode.el:254:49:Warning: reference to free variable `font-lock-
end'
clojure-mode.el:258:17:Warning: assignment to free variable `font-lock-
beg'
clojure-mode.el:262:17:Warning: assignment to free variable `font-lock-
end'

In clojure-indent-function:
clojure-mode.el:397:33:Warning: reference to free variable
`calculate-lisp-indent-last-sexp'

In clojure-slime-config:
clojure-mode.el:574:11:Warning: assignment to free variable
`swank-clojure-classpath'

In end of data:
clojure-mode.el:684:1:Warning: the following functions are not known
to be defined:
imenu--generic-function, inferior-lisp-proc, switch-to-lisp,
slime-setup, swank-clojure-slime-mode-hook

Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: swank-clojure installation failure via ELPA

2010-01-02 Thread Mike K
On Jan 2, 12:18 pm, Shawn Hoover shawn.hoo...@gmail.com wrote:
 I believe you're running into the same coding issue that I did with ELPA on
 Windows. slime.el declares in its local variables that it has unix line
 endings, but ELPA's download process is saving it with windows line endings.

 Here's the pseudopatch I submitted to ELPA. You can hack up your
 .emacs.d/elpa.package.el and then reinstall those packages.

That did the trick, but now I have another question.  How do I set up
additional entries on my classpath now that I've installed via elpa
and moved to 1.1.0?

I used to do something like the following:

(swank-clojure-config

;; ...

 (setq swank-clojure-extra-classpaths (list

;; ...
   )
   )
 )

However, swank-clojure-config is no longer recognized.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: swank-clojure installation failure via ELPA

2010-01-02 Thread Mike K
I'm up and running again.  Thank you very much Shawn and Phil!

Phil: For the sake of other Windows users, I suggest adding a pointer
to the patched package.el in the readme until the issue is resolved.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Loading a .clj file automatically at repl startup?

2009-12-28 Thread Mike K
Is it possible to load a library such as foo.clj (with (ns foo ...) at
the top of the file) into the repl automatically at startup, rather
than having to (use 'foo) every time the repl starts?  I'd like to
avoid creating a .jar file.

If possible, I'd like to do this both from the command line (java -
cp ...) and from within slime / emacs.

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


A tale of cond, clauses, and the docs

2009-12-19 Thread Mike K
What, exactly, is a clause in clojure?  From seeing the term used in
context, I inferred that it meant something along the lines of a
keyword which can optionally be used to change the semantics of a
form.  Apparently, it means more than that.

This is valid clojure:

(defn sign [x] (cond ( x 0) Positive ( x 0) Negative :else
Zero))

I had no idea that I could use :else for the fallthrough case of a
cond, so I looked it up in the docs:

user (doc cond)
-
clojure.core/cond
([ clauses])
Macro
  Takes a set of test/expr pairs. It evaluates each test one at a
  time.  If a test returns logical true, cond evaluates and returns
  the value of the corresponding expr and doesn't evaluate any of the
  other tests or exprs. (cond) returns nil.


Apparently, each test/expr pair is a clause, or perhaps each test
and each expression is a clause.  No mention of supporting an :else
clause though.  Let's check out the source code:

(defmacro cond
  Takes a set of test/expr pairs. It evaluates each test one at a
  time.  If a test returns logical true, cond evaluates and returns
  the value of the corresponding expr and doesn't evaluate any of the
  other tests or exprs. (cond) returns nil.
  [ clauses]
(when clauses
  (list 'if (first clauses)
(if (next clauses)
(second clauses)
(throw (IllegalArgumentException.
 cond requires an even number of forms)))
(cons 'clojure.core/cond (next (next clauses))

I don't know much about macros, but it is clear that cond builds on
if.  However, the documentation for if mentions nothing
about :else, and the source for if is not available, presumably
because it's implemented in java.

Is there a way to have discovered the existence of :else from the
documentation alone?  Is this just an oversight in the docs, or is
there a more general point concerning clauses that I'm missing?

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: A tale of cond, clauses, and the docs

2009-12-19 Thread Mike K
On Dec 19, 8:27 pm, Sean Devlin francoisdev...@gmail.com wrote:
  :else was chose because it is simply not nil, and therefor always true.

I suspected something along these lines soon after I posted.  I did
some more experimenting and discovered that :foo will work just as
well as :else.  So if I understand correctly, :else is not even
defined in the language anywhere.  Like :foo, it springs into
existence when I first mention it, and it evaluates to true by virtue
of being a keyword.  Cond exploits this behavior for free.

This is in contrast with, e.g., the ns macro, which presumably would
have to explicitly match against keywords such as :use or :require to
implement the proper semantics.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Help! My slime-fu is broken!

2009-12-15 Thread Mike K
On Dec 15, 8:42 pm, Phil Hagelberg p...@hagelb.org wrote:

  Ah, OK.  That explains the overload of the term compile

 I'll add a note to this to the swank-clojure readme.

Cool.

 I wasn't even aware that the CL version provided error navigation
 here. But it looks like it shouldn't be too hard to fix now that you've
 made me aware of the problem.

Great!

  Note that in sldb (debugger) buffers
 pressing v on a stack trace frame will actually jump to the cause of
 the error if possible.

Well then, here's another potential bug report / teachable moment :-)

I inserted an intentional typo in my code and then used slime-load-
file (^C^L).  I get an sldb buffer as follows:

java.lang.Exception: Unable to resolve symbol: lfjd in this context
(hi.clj:0)
  [Thrown class clojure.lang.Compiler$CompilerException]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [CAUSE] Throw cause of this exception

Backtrace:
  0: clojure.lang.Compiler.analyze(Compiler.java:4340)
  1: clojure.lang.Compiler.analyze(Compiler.java:4286)
  2: clojure.lang.Compiler.eval(Compiler.java:4536)
  3: clojure.lang.Compiler.load(Compiler.java:4857)
  4: clojure.lang.Compiler.loadFile(Compiler.java:4824)
  5: clojure.lang.RT$4.invoke(RT.java:273)
  6: swank.commands.basic$load_file__801.invoke(basic.clj:129)
  7: clojure.lang.Var.invoke(Var.java:346)
  8: user$eval__1256.invoke(NO_SOURCE_FILE)
  9: clojure.lang.Compiler.eval(Compiler.java:4532)
 10: clojure.core$eval__3990.invoke(core.clj:1728)
 11: swank.core$eval_in_emacs_package__366.invoke(core.clj:55)
 12: swank.core$eval_for_emacs__443.invoke(core.clj:123)
 13: clojure.lang.Var.invoke(Var.java:354)
(etc)

One suspicious thing is that the Exception line is reporting line
number 0 whereas the actual typo is at line 3.  Actually, further
digging indicates that the line number is correctly reported if the
typo is an undefined symbol being used as a function, e.g.,
(misspelled-func-name foo), but not if garbage appears outside of a
form like above, i.e.,  lfjd typed on a line by itself.  This behavior
with the line number reporting is consistent whether in sldb buffers
as above or as reported in slime compilation buffers after slime-
compile-and-load-file (^C^K).

Moreover, if I try to view the source on any of the stack frame lines
(v) I simply get an evaluation aborted message.  In this scenario,
would you expect v to work on any of the stack frames?  In general,
should v work on frames coming out of .java files (like frame 0) or
only .clj files (like frame 6).  Again, in my case, it doesn't work
anywhere.

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Help! My slime-fu is broken!

2009-12-14 Thread Mike K
Hello Clojurians,

I've a Clojure newbie, and I've just started running clojure-mode and
slime under emacs (on Windows). I'm running into several issues.  Some
of these are definitely bugs in my understanding; others may be bugs
in my install or the implementation itself. I'd appreciate any help
anyone can provide on the following questions:

Slime seems to be working to a degree.  I have a functional repl, but
I have some issues with compiling:

I know that ^C^L from clojure mode will load a file (defaults to the
file associated with te current buffer), and that this is in effect
the equivalent of typing the file's contents directly into the repl.
There is also ^C^K which the slime menu describes as compile/load
file.

Annoyingingly, emacs claims C-c C-k is undefined when I ask the help
system about that binding.

In any event, I'm not quite sure what compile means in this
context.  Is this truly AOT compile into class files, or is it
something more general?  I suspect it's the latter; I don't see class
files being generated anywhere.  If the file I'm compiling contains
no errors, the effect seems to be just like ^C^L except that the
minibuffer says something like Compilation finished: 0 errors  0
warnings  0 notes [0.00 secs]  Is there any important difference
between the two here?

If there are errors, e.g., an intentional typo, other strangeness
occurs.  I'll get a message like Compilation failed: 2 errors  0
warnings  0 notes [0.00 secs].  Fine. From the file.clj buffer, I
think I should be able to use M-n and M-p to navigate amongst the
errors (or is it the notes?) but I only get No next note.

If I then go to the *SLIME Compilation* buffer, I'll see something
like this:

2 compiler notes:
error:
java.lang.Exception: Unable to resolve symbol: greeto in this context
(hi.clj:3)
error:
java.lang.Exception: Unable to resolve symbol: greeto in this context


I'm not sure why the same error is appearing twice, but the first
instance even has the correct source code filename and line number. I
try to navigate from here by pressing enter.  No matter what line I'm
on when I press enter, emacs says No error here.  Huh?

If, instead, I load the file with the typo with ^C^L I get a new
buffer in sldb mode, as shown below:

java.lang.Exception: Unable to resolve symbol: greeto in this context
(hi.clj:3)
  [Thrown class clojure.lang.Compiler$CompilerException]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [CAUSE] Throw cause of this exception

Backtrace:
  0: clojure.lang.Compiler.analyze(Compiler.java:4340)
  1: clojure.lang.Compiler.analyze(Compiler.java:4286)
  ... etc ...

Clearly this is a debugger.  I won't ask for details as to what I can
do here, except for this:  Typing 0 will get me back to the repl.
Fine.  However, Typing 1 will Throw cause of this exception.  What
exactly does that mean?  Is it rethrowing the same exception, or doing
something different?  How is it useful?

Thanks to anyone who can help me with any of these issues.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Help! My slime-fu is broken!

2009-12-14 Thread Mike K
On Dec 14, 10:55 pm, Phil Hagelberg p...@hagelb.org wrote:

 How did you install slime? If you use trunk of slime you will run into
 breaking changes for which swank-clojure hasn't been updated yet. It's
 best to use ELPA, the Emacs package manager. (http://tromey.com/elpa)

I tried to use ELPA at first but I ran into some issues that I no
longer recall.  I ended up installing Clojure Box 1.0 from
http://clojure.bighugh.com thinking that would give me a consistent
collection of pieces.  Since I already had a pretty extensively
customized emacs already installed, I didn't use the emacs from
clojure box.  Instead I modified my _emacs file to use the pieces CB
installed.

The relevant portion of my _emacs is:

;; clojure-mode

(add-to-list 'load-path C:\\Program Files (x86)\\Clojure Box\\clojure-
mode)
(require 'clojure-mode)

;; swank-clojure

(add-to-list 'load-path C:\\Program Files (x86)\\Clojure Box\\swank-
clojure)

(require 'swank-clojure-autoload)

(swank-clojure-config
 (setq swank-clojure-jar-path C:\\Program Files (x86)\\Clojure Box\
\clojure\\clojure-1.0.0.jar)
 (setq swank-clojure-extra-classpaths (list
   C:\\Program Files (x86)\
\Clojure Box\\clojure-contrib\\clojure-contrib.jar
   C:\\projects\\clojure\
\ProgrammingClojure.code
   )
   )
 )

;; slime

(eval-after-load slime
  '(progn (slime-setup '(slime-repl

(add-to-list 'load-path C:\\Program Files (x86)\\Clojure Box\\slime-
cvs)
(require 'slime)
(slime-setup)


  Annoyingingly, emacs claims C-c C-k is undefined when I ask the help
  system about that binding.

 Sounds like you're invoking help from a context in which slime-mode is
 not enabled; probably due to installing by hand and forgetting a step?

I did some more digging and solved this one myself.  I had rebound
help-for-help to an alternate key sequence so that I could use ^H
for something else that I now no longer need.  When I reverted these
changes, ^H k C-c C-k worked as expected.

 Slime was designed for use with Common Lisp, which has a distinction
 between compiled and interpreted code. Clojure has no interpreter, so
 any way of loading in the code runs it through the compiler.

Ah, OK.  That explains the overload of the term compile

  [error navigation woes]

 There are some features of Slime that have not been ported to Clojure
 yet and still only work in CL. Unfortunately the author of the Clojure
 port has dropped it and I am left maintaining it myself, and there are
 still several portions of the code that I haven't gotten a chance to
 dive into yet.

Oh, so can you confirm that error navigation is basically broken?
Actually, I guess the relevant question is what CB 1.0's level of
functionality is.  If I can get access to a machine without emacs
currently installed on it, I'll try to run the straight CB install and
see how it behaves.

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Help! My slime-fu is broken!

2009-12-14 Thread Mike K
On Dec 14, 10:40 pm, David Nolen dnolen.li...@gmail.com wrote:
 While I personally use Emacs+SLIME to do Clojure hacking this is generally a
 poor introduction to Clojure for newbies. Clojure is new enough territory
 without having to fight with your text editor and the idiosyncracies of
 SLIME (SLIME hasn't even been compatible with swank-clojure since late
 October). Have you considered trying out NetBeans + Enclojure?

I hadn't considered another IDE.  Clojure is my first real exposure to
the JVM, so I'm not familiar with Java IDEs.  OTOH, Emacs has been my
editor of choice for over two decades (yikes!) so it's definitely home
turf for me.  Besides, I'm already addicted to paredit mode :-)

However, maybe the slime+Clojure picture is generally less stable than
I thought it would be.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen in Python

2009-12-12 Thread Mike K
I could not get the python script to work, so I switched to the
powershell version.

I now understand that the leiningen-1.0.0-SNAPSHOT.jar is a so-called
uberjar and contains all the dependencies for leiningen.

However, the python script assumes clojure is from a separate jar
which is not installed via lein self-install:

CLOJURE_JAR = expanduser(~/.m2/repository/org/clojure/clojure/1.1.0-
alpha-SNAPSHOT/clojure-1.1.0-alpha-SNAPSHOT.jar)

I don't know how to modify this to use the leiningen uberjar instead.

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen in Python

2009-12-11 Thread Mike K
All,

I tried to use this script on Windows and it blew up real good!  I'm a
Clojure, Java, and Leiningen newbie, so perhaps a kind soul can help
me out.

1.  lein self-install worked.  It downloaded leiningen-1.0.0-
standalone.jar.  However, that contradicts the description at
http://zef.me/2470/building-clojure-projects-with-leiningen which
indicates that self-install should download several jars, including
clojure itself.  That didn't happen, and it looks like it would never
happen according to the python script.  Also, I'd rather use one and
only one clojure, clojure-contrib, etc. for everything rather than
Leiningen using its own.  Is this possible?

2.  Any other lein command seems to require the clojure jar in the
repository ~/.m2/repository/org/clojure/clojure/1.1.0-alpha-SNAPSHOT/
clojure-1.1.0-alpha-SNAPSHOT.jar.  Since I don't have one there, I
modified CLOJURE_JAR to point to my existing jar.  Everything still
fails with this sort of error:

lein help
java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
Could not find the main class: Files.  Program will exit.
Exception in thread main

I suspect the suspicious Files class name is coming from the fact
that I now have CLOJURE_JAR set as follows:

CLOJURE_JAR = expanduser(C:\\Program Files (x86)\\Clojure Box\\clojure
\\clojure-1.0.0.jar)

Looks like I'm getting bit by spaces in the path name.  This would not
be an issue if lein had downloaded its own clojure jar during step 1
(no spaces in that path).

3. My clojure jar is clojure-1.0.0.jar from clojure org.  The script
uses clojure-1.1.0-alpha-SNAPSHOT.jar, but a comment from the link
implies that this has been supplanted by 1.1.0-master.jar.  In any
event, I don't know where either of these two things are.  I tried
going to build.clojure.org, but all the build artifiacts there are
named clojure.jar.

4.  BTW, what's the deal with this .m2 directory (i.e., where does
the name come from)?

Thanks for any help you can provide!

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


lazy sequence question

2009-12-09 Thread Mike K
I'm working my way through Programming Clojure and got an unexpected
result with sequences:

user (take 10 (filter even? (iterate inc 1)))
(2 4 6 8 10 12 14 16 18 20)
user (take-while #( % 10) (iterate inc 1))
(1 2 3 4 5 6 7 8 9)
user (take 10 (filter #( % 10) (iterate inc 1)))
; Evaluation aborted.

The first two work but the third one hangs.  Why?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: lazy sequence question

2009-12-09 Thread Mike K
On Dec 9, 10:35 pm, Mike K mbk.li...@gmail.com wrote:

 The first two work but the third one hangs.  Why?

user (take 5 (filter #( % 10) (iterate inc 1)))
(1 2 3 4 5)

OK, I figured out that it won't hang with taking = 9 elements, which
is the total that pass the filter.

But shouldn't it give me 9 items without hanging when I ask for 10 or
more as in the first case?

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: lazy sequence question

2009-12-09 Thread Mike K
 Neither filter nor take know to abandon their attempt. That's how this  
 works.

Ah, of course.  Thanks Mark and Richard!

   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


ClojureCLR questions

2009-12-01 Thread Mike K
Hi Clojurites!

I'm reading about Clojure and ClojureCLR with great interest.  Since
I'm a .net developer with little Java / JVM experience, I'm
particularly interested in ClojureCLR.  It seems like David M. and
crew are doing a fantastic job with the CLR implementation!  A few
quick questions:

1.  Re. CLR Interop -- one thing I didn't see mentioned on the wiki
is .net attributes (metadata).  Will annotating methods, properties,
etc with attributes be supported?

2.  What are the performance goals for ClojureCLR?  I saw a video
overview of Clojure by Rich in which he stated (perhaps with certain
caveats that I don't recall) that essentially Clojure ran at speeds
comparable to Java.  Is having ClojureCLR run at speeds comparable to
C# a realistic goal?  What's the current performance story?

3.  I get the basic concept that native Clojure data structures are
immutable and persistent.  This is obviously an impedance mismatch
when dealing with JVM or .net objects and APIs that are built around
mutable state.   Where can I more info regarding best practices in
getting these two different animals to work well together within an
app?

   Thanks,
   Mike

-- 
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 from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en