On Thu, Feb 11, 2010 at 7:59 PM, Paul Mooser wrote:
> are a few things that seem to try to make this easier (like clojure-
> mode's install-clojure, or ClojureX) but they also seem unable to keep
> up with the speed of some of the changes that are happening (or, quite
> possibly, I'm using them i
I have setup VimClojure on Linux, Mac and Windows successfully. (The
classpath stuff is a major annoyance though, and sometimes I think I
have problems with using different versions of clojure.jar.) I also
get large error messages like the above though, which is extremely
annoying. Especially si
Hi,
On Feb 12, 1:06 pm, Jeff Rose wrote:
> (The classpath stuff is a major annoyance though, and sometimes
> I think I have problems with using different versions of clojure.jar.)
This is possible. Since nailgun requires a named class I had to use
gen-class which ties the compiled code relative
Oh, man. I just moved from Seattle to Boston in December, and I miss
Zoka's coffee. Have fun, everyone!Maybe we can get some of the
Boston-area Clojure folks to meet up sometime.
On Feb 11, 7:30 pm, Phil Hagelberg wrote:
> On Fri, Feb 5, 2010 at 12:50 PM, Phil Hagelberg wrote:
> > Wow, I c
The (list) comes from my dabblings with other lisps, using a vector
does make more sense and I quite like it
I was unaware that, unless I am mistaken from your above code that let
bindings are evaluated left to right, that is I was under the
impression (incorrectly) that you could not use say vm i
I'll give the newbie perspective, which given as I did not really know
what I was doing may involve several false assumptions but will
provide insight into the thinking of a newbie, which may be a hard
frame of mind for experts to imagine.
Firstly when you are new you just want to get something wo
Hi all,
some time ago I wrote a simple control library (called "Robust") for
Lego Mindstorms NXT.
Recently I wrote a Clojure wrapper to the Robust library so that it is
possible to write simple control applications for standard Mindstorms'
vehicles directly in Clojure.
The Robust library together
I'd like to pitch in here as I think it's distressing to see (vim
familiar) people abandoning clojure when it's quite possible to have
an easy and very efficient working environment using just vim,
vimclojure and rlwrap. I set this up 14 months ago when I started with
clojure and I'd be dragged kic
Yup, literal syntax for vectors are very convenient and heavily used
in Clojure code.
And (let) bindings are evaluated left to right. It's analogous to
Scheme's let* i think?
Only thing to watch out for is that (binding) bindings are not
evaluated left to right. It's for performance reasons I thi
Sorry for the 3rd post, but can someone provide some nice example-code for
functional structures used in real world code?
2010/2/12 Jeff Rose
> Cool! This is the most fun I've ever had practicing Dutch :-)
>
> As someone who used to be very skeptical towards functional programming and
> Lisps,
On Thu, Feb 11, 2010 at 4:46 AM, HB wrote:
> Since Clojure is a LISP dialect, does this mean that it doesn't
> support OOP?
Another answer is that ``it could be if you wanted it to be'', for example:
http://s-expressions.com/2009/12/10/frumios-a-silly-object-system-for-clojure/
.
--
You
I have a piece of code like this:
(def ll ['a 'b 'c 'd])
(loop [e (first ll) f (rest ll)]
(do
(try
(do
(println e) ;; do sth with e which may throw an exception
(recur (first f) (rest f)))
(catch Exception _ (println "ex")))
(println "something")
(re
2010/2/12 Konrad Kułakowski :
> I have a piece of code like this:
>
> (def ll ['a 'b 'c 'd])
>
> (loop [e (first ll) f (rest ll)]
> (do
> (try
> (do
> (println e) ;; do sth with e which may throw an exception
> (recur (first f) (rest f)))
> (catch Exception _ (print
2010/2/12 Konrad Kułakowski :
> (def ll ['a 'b 'c 'd])
>
> (loop [e (first ll) f (rest ll)]
> (do
> (try
> (do
> (println e) ;; do sth with e which may throw an exception
> (recur (first f) (rest f)))
> (catch Exception _ (println "ex")))
> (println "something")
On Feb 11, 4:04 pm, Bryce wrote:
> I'm wondering what the rationale is for using multimethods vs. cond,
> and where it's best to use either? Multimethods seem to be very
> seldom used, usually to dispatch on type, but I can see advantages to
> using data to dynamically define only the methods you
Hi,
This is from the book:
(re-seq \w+ "the quick brown fox")
-> ("the" "quick" "brown" "fox")
But when I try it, these don't work:
user> (re-seq \w+ "the quick brown fox")
; Evaluation aborted.
clojure.lang.LispReader$ReaderException: java.lang.Exception:
Unsupported character: \w+ (NO_SOU
Replace \w+ with #"\w+".
(#"..." is the regex literal syntax.)
Sincerely,
Michał
--
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
Thanks,
I wonder why the book doesn't use that?
Michał Marczyk wrote:
Replace \w+ with #"\w+".
(#"..." is the regex literal syntax.)
Sincerely,
Michał
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo
A Very Simple Example:
(defn list-projects
[request posts]
(wrap request :project
(text :projects)
(map project-block posts)
(link-to "/project/edit/" "new")))
That's a top-level view function from a (nearly) production site I'm
working at right now.
Note:
Clean readable code. This
Hi:
I am not familiar with gradle, but I cannot build clojuresque, so I
cannot build clojureql.
The log building clojuresque is as follows :
Thanks for any help.
D:\tools\clojuresque>gradle build
:compileJava
:compileGroovy
07:19:24.781 [main] DEBUG o.g.a.i.p.ant.AntLoggingAdapter -
[ant:ant
Hello All,
I just finished version 1 of a clojure wrapper for protocol buffers:
http://github.com/ninjudd/clojure-protobuf
I'm using it as a data storage format for an embedded graph db I'm
working on. It ends up being much faster than pr-str/read-string.
If you're interested in fast serializati
I'm not sure about this one but I'll guess that your setup can't
compile Groovy scripts. I can't help you there as I didn't installed
it myself.
By the way, you don't need to build clojuresque, Gradle will take care
of downloading it if specified as a dependency. Look at the
build.gradle config fi
Phil Hagelberg writes:
> Upstream slime is not compatible with swank-clojure
I find this not to be true at present, the stilted SLIME/Swank
connection problem¹ and disabling autodoc mode notwithstanding.
Footnotes:
¹ http://thread.gmane.org/gmane.comp.java.clojure.user/24894/focus=24956
--
@all: Thank you very much for the replies. My bottomless pit of
ignorance must be quite annoying but, I can only hope one day to be in
your position. (e.g. answering others questions)
@ataggart: A different entity is supposed to change the refs when they
go over/under some limit. It's just the way
On Thu, Feb 11, 2010 at 4:30 PM, Phil Hagelberg wrote:
> On Fri, Feb 5, 2010 at 12:50 PM, Phil Hagelberg wrote:
>> Wow, I certainly was not expecting that level of response; this is great.
>>
>> Looks like the 11th (Thursday) is the crowd favorite. Once again, the
>> location is http://bit.ly/c9j
Hi,all
Although there is no right answer, vector seem to be preferred in many
cases.
Which do you prefer map or vector?
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
Note that pos
It's great to hear the Seattle event was such a success! Mark, I agree that
a Boston-area meet-up would be fun. If someone is interested in
spearheading, I would be happy to support in any way I can.
On Fri, Feb 12, 2010 at 7:58 AM, Mark Tomko wrote:
> Oh, man. I just moved from Seattle to Bost
I have confronted a similar question in the past when deciding how to label
the dimensions of vectors and multidimensional arrays.
My tentative conclusion is that it's best to use raw vectors.
=> (def v [40 41 42])
#'user/v
If you need human-readable labels, build a separate index with constant
On Sat, Feb 13, 2010 at 5:48 AM, Steven E. Harris wrote:
> Phil Hagelberg writes:
>
>> Upstream slime is not compatible with swank-clojure
>
> I find this not to be true at present, the stilted SLIME/Swank
> connection problem¹ and disabling autodoc mode notwithstanding.
Yes, I too use slime ups
Hi,Gaarth.
Thank you for helpful advice.
On 2月13日, 午後1:03, Garth Sheldon-Coulson wrote:
> I have confronted a similar question in the past when deciding how to label
> the dimensions of vectors and multidimensional arrays.
>
> My tentative conclusion is that it's best to use raw vectors.
>
> =>
Here's an idiomatic way of doing what you want;
(defn lp [col]
(loop [ll (seq col)]
(when ll
(try
(let [itm (first ll)]
(if (= itm 'x) (throw (IllegalArgumentException.
(str itm " not supported.")))
(println (str "done item: " itm
I concur with Garth - structures like coordinates, points, etc are
non-changing in their structure and hence don't need "mapped"
references into their elements. Destructuring is the easy way to get
at the elements;
(let [[x y z] pt] ...
and they can be combined in collections, arrays, etc, and mani
32 matches
Mail list logo