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:
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
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
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
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
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
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
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
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
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
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)
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
--
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)
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
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
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
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
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)))
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
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
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?
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
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
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
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
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
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 (/
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
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
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
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
44 matches
Mail list logo