Hi, I'm using macros to define special vars (w/ a keyword as type) to
retrieve them later with ns-utils/ns-vars and filter them. I don't
know if this technique is recommended or if there's some better way to
achieve this, but there's something weird happening when we try to
evaluate the var defined
On Fri, Jan 8, 2010 at 7:34 PM, Raoul Duke wrote:
> hi,
>
> i'm using (read) and it seems to get rid of double quotes e.g.
This seems very unlikely to me, though it would be easier to tell
for sure if you included the code that was failing.
Perhaps the problem is when you print the form after it
hi,
i'm using (read) and it seems to get rid of double quotes e.g.
(println "foo")
is read as
(println foo)
as far as i can tell so far. how do i get the quotes to come through?
or don't i want to?
thanks!
--
You received this message because you are subscribed to the Google
Groups "
sometimes (i can't repro it now that i restarted the repl?!)
(let [stream (new java.io.PushbackReader (new java.io.FileReader
"/tmp/foo.clj"))] (loop [s stream] (println "read" (read s nil nil))
(recur s)))
in Clojure 1.1.0-new-SNAPSHOT repl to echo a file, i get
java.lang.NullPointerException (N
Thanks again Sean/Chouser- Sounds like there isn't any easy way to do
in-step iteration using the "for" construct, as I suspected- This is
of course easily remedied for writing a convenience function for "(map
vec ...)"
(As I mentioned in the top post, I am aware the simple example I gave
can be w
And now for something completely different...
The baclojure meetup had our 13th meetup yesterday, and here are some
pictures - http://baclojure.org/photos/798526/12537681/
This was our largest attendance so far (not counting the one Rich Hickey
came to, that was > 80 people). We had about 35 peop
On Fri, Jan 8, 2010 at 3:38 PM, mac wrote:
>
> But interface-wise on the clojure side I guess my lib and clojure-jna
> are kind of similar so if clojure-jna good enough there is no reason
> to switch to my lib. I was certainly inspired by clojure-jna since I
> had used it before :)
If clojure-jna
On Jan 8, 8:53 pm, Rob Wolfe wrote:
> mac writes:
> > Hello all.
> > I've started work on a clojure library for interoperating with C. It's
> > always been a pain to do in Java but recently JNA (java native access)
> > has taken away most of that pain.
> > When using clojure however, it's nice
mac writes:
> Hello all.
> I've started work on a clojure library for interoperating with C. It's
> always been a pain to do in Java but recently JNA (java native access)
> has taken away most of that pain.
> When using clojure however, it's nice to be able to stay in clojure
> and not drop to ja
Also, everyone is welcome to join LispNYC on Tuesday, January 12 and
celebrate release 1.1 of Clojure!
-SS
> Join us Tuesday, January 12th from 7:00 to 9:00 at P&G's for the first
> social of the year!
>
> Directions:
>
> Near the 1 stop at 79th and B,C stop at 81st. Head to the northwest
> corne
ah hah. i think.
(ns nst1)
(deftype T1 [f1])
(println (ns-publics 'nst1))
(ns nst2)
(defprotocol P2 (foo [this]))
(deftype T2 [f2] :as this P2 (foo [] this))
(println (ns-publics 'nst2))
(ns nst3)
(println "nst3 using nst2" (nst2/foo (nst2/T2 1)))
(ns nst4)
(deftype T4 [f4] :as this nst2/P2 (fo
On 08.01.2010, at 20:21, Raoul Duke wrote:
might anybody have examples of how one deftype can implement protocols
from multiple other namespaces? i have not yet been able to suss out
the correct syntax i guess.
There's nothing special about protocols. defprotocol creates a
protocol object an
hi,
might anybody have examples of how one deftype can implement protocols
from multiple other namespaces? i have not yet been able to suss out
the correct syntax i guess.
thank you!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gro
Oh, right. I saw "paralell" and the brain hit autopilot.
And I think you CAN improve on your fn a little bit. This should do
the trick
(map + (range 1 5) (range 11 15))
The mapping fn itself will be applied to as many arguments as you have
collections. Since + is variadic, it will do the job
Thanks Sean
This is very helpful.
Tzach
On Jan 8, 5:44 am, Sean Devlin wrote:
> Tzach,
> I'd start will clojure.xml. At a very high level, my program would
> look like this
>
> 1. Load the xml file with clojure.xml/parse
> 2. Apply your filtering code with something like map-if (see below)
>
On Fri, Jan 8, 2010 at 4:38 PM, Richard Lyman wrote:
> Currently I'm only providing the code in AOT form. If the JAR is on your
> classpath everything in the manual works just fine.
>
> Did that answer your question?
Yes, thank you!
Cheers,
mk
--
You received this message because you are subscr
At some point, hopefully someone will write an open-source parsing
library with liberal licensing terms for clojure.
--
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
Thanks Sean...
Sorry, I should have used a better word than "parallel"- The second
code example shows what I mean... I'm not referring to multithreaded
parallelism, but simply being able to iterate through two lists in
step, as Chouser describes. (as you can do by passing two different
seqs to "ma
On Fri, Jan 8, 2010 at 11:34 AM, Sean Devlin wrote:
> Take a look at pmap
I don't think that's the kind of "parallel" being asked about.
> On Jan 8, 11:13 am, Conrad wrote:
>> Looping variables in a clojure "for" loop are iterated in a serial,
>> cartesian fashion:
>>
>> > (for [a (range 5) b (
Take a look at pmap
On Jan 8, 11:13 am, Conrad wrote:
> Looping variables in a clojure "for" loop are iterated in a serial,
> cartesian fashion:
>
> > (for [a (range 5) b (range 10 15)]
>
> (+ a b))
> (10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16
> 17 18)
>
> I was
Looping variables in a clojure "for" loop are iterated in a serial,
cartesian fashion:
> (for [a (range 5) b (range 10 15)]
(+ a b))
(10 11 12 13 14 11 12 13 14 15 12 13 14 15 16 13 14 15 16 17 14 15 16
17 18)
I was wondering if there's a standard idiom for looping in parallel
fashion- Doe
Hello all.
I've started work on a clojure library for interoperating with C. It's
always been a pain to do in Java but recently JNA (java native access)
has taken away most of that pain.
When using clojure however, it's nice to be able to stay in clojure
and not drop to java (or C *shudder*).
It's
We'll be meeting on January 28th starting at 6:30pm at:
NYC Seminar and Conference Center
71 West 23rd Street
NY, NY 10010
1-866-807-1114
I'd like to invite people to do some lightening talks and/presentations about
what they are doing with Clojure. Please contact me if you are interested in
gi
Thanks Chouser! I had not thought of moving the (list 'fn ...etc) bit
into the eval statement, it works perfectly! here is the final result!
http://github.com/tristan/modelmaker/blob/d7dbdfa9b998cfc6b846ea5c235b4496ed8caa63/infix_parser.clj
.Tristan
On 8 Jan., 16:15, Chouser wrote:
> On Fri, Jan
Currently I'm only providing the code in AOT form. If the JAR is on your
classpath everything in the manual works just fine.
Did that answer your question?
-Rich
2010/1/7 Michał Kwiatkowski
> On Mon, Jan 4, 2010 at 11:27 PM, Richard Lyman
> wrote:
> > This project adds support in Clojure for
On Fri, Jan 8, 2010 at 9:10 AM, tristan wrote:
>
> At first I thought I had solved it, as calling (parse-infix "a*(b+c)")
> returned the desired function that i could call. However as soon as i
> attempted to use it in the form (parse-infix users-input) it falls
> over with a "Don't know how to cr
Hello,
parse-infix, being a macro, works on the code-as-datastructure it has
as arguments.
So (parse-infix x) receives the symbol x , unevaluated, is in charge
of returning a new datastructure (generally involving the symbol x).
Only then, the compiler will evaluate the result of having called
pa
Phil Hagelberg writes:
> If someone would volunteer to fix it, I'd be thrilled. Nobody who is
> interested in using CL and Clojure at the same time has stepped
> forward so far, which is why it's currently broken.
Can you characterize what needs to be fixed?
--
Steven E. Harris
--
You receiv
Thanks, indeed, swank-clojure was not on my classpath, I added it as a
dependency to my project.clj and now it works fine.
On Jan 8, 2:25 pm, Shawn Hoover wrote:
> On Fri, Jan 8, 2010 at 4:39 AM, Zef Hemel wrote:
> > After I do the swank clojure project command, enter the directory and
> > press
Hi guys,
I've been working on a problem where I want the user to be able to
input an equation in infix notation which includes variables and
convert that to a clojure fn that my program can call later.
i.e. the user inputs the string "a*(b+c)" and i generate the unnamed
function (fn [a b c] (* a
On Fri, Jan 8, 2010 at 4:39 AM, Zef Hemel wrote:
> After I do the swank clojure project command, enter the directory and
> press return my Emacs gets stuck doing this: http://imgur.com/Ap8mo
> When I just go to the Slime CLI that works fine. Any idea what could
> be wrong there?
>
> Zef
>
Check
On Thu, Jan 7, 2010 at 11:37 PM, Joel wrote:
> Hello,
> I have an emacs setup on OSX using elpa with the latest clojure-mode,
> swank-clojure, slime, slime-repl all from ELPA. When I upgraded to the
> latest swank-clojure in ELPA (swank-clojure-1.1.0), I began to get
> this error as well:
>
> > S
Ok guys,
After trying all your suggestions, here is the combination that worked
best for me (in the order of their impact solving the problem):
JVM_FLAGS="-server \
-XX:+UseConcMarkSweepGC
-XX:+CMSIncrementalMode \
-XX:+UseCompressedOops \
-XX:+DoEscapeAnalysis \
-XX:+UseBiasedLocking \
-XX:Perm
On 08.01.2010, at 06:21, joel r wrote:
But right now I need some help. Either I'm using dist-m wrong, or it's
a bug I've found.
It's a bug. More specifically, a typo in a recent improvement. It is
fixed now, so please try again with the current version - or in fact
go back to an older vers
After I do the swank clojure project command, enter the directory and
press return my Emacs gets stuck doing this: http://imgur.com/Ap8mo
When I just go to the Slime CLI that works fine. Any idea what could
be wrong there?
Zef
--
You received this message because you are subscribed to the Google
On 8 Jan 2010, at 02:43, Steven E. Harris wrote:
Can you recommend a book that covers aspects of monads like these? I'd
like to learn more about the abstract concepts than their
implementation
in a particular language.
I don't know about any books. There's a lot of monad material on the
W
36 matches
Mail list logo