This has nothing to do with eval. The following fails too:
(defmacro foo [] (new StringBuffer))
(foo)
On Dec 3, 3:22 am, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> Hi Michiel,
>
> eval is for form data, so I am more surprised that it works for
> ArrayList than that it fails for StringBuffer
Hi,
On 3 Dez., 12:04, Michiel de Mare <[EMAIL PROTECTED]> wrote:
> This has nothing to do with eval. The following fails too:
>
> (defmacro foo [] (new StringBuffer))
> (foo)
The results at the Repl are printed via pr-on and
obviously print-dup doesn't know how to print a
StringBuffer.
Sincerel
Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
throws the same exception.
But (new StringBuffer) in the REPL prints the stringbuffer just fine.
Why does the exception only get triggered in macros?
And doesn't print-dup need a default for unknown classes?
On Dec 3, 12:23 pm, M
On Tue, Dec 2, 2008 at 6:38 PM, Chouser <[EMAIL PROTECTED]> wrote:
>
> On Tue, Dec 2, 2008 at 3:52 PM, Mark Volkmann <[EMAIL PROTECTED]>
> wrote:
> >
> > (def my-string (print-dup [1 2 3]))
> > (def my-data (read my-string))
> >
> > Can you give a simple example of serializing and deserializing a
Since SVN rev 1094:
RT.lastModified fails when the file is not a jar: or file: URL (for
example when it is a bundleresource: URL in an eclipse plugin).
With the patch the fallback in this case is to load the source file.
http://groups.google.com/group/clojure/web/load_lastModified.patch
--~--~-
On Tue, Dec 2, 2008 at 10:40 PM, Matt Revelle <[EMAIL PROTECTED]> wrote:
> Updated patch attached, the extra let for readability looked ugly to
> me after some sleep.
>
>
> >
>
>
>
>
> On Dec 1, 2008, at 3:44 PM, Rich Hickey wrote:
>
> >
> >
> >
> > On Dec 1, 2:57 pm, Matt Revelle <[EMAIL PROTECTE
Peter Eddy wrote:
>> How are you attempting to start slime? Are you doing:
>>
>> 1. C-u M-x slime RET clojure RET
>>
>> OR
>>
>> 2. M-- M-x slime RET clojure RET
>>
>
> Well, either method caused this error for me. I deleted all my slime
> and clojure-related source trees and re-checked every
On Wed, Dec 3, 2008 at 1:05 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> I've created a patch for the clojure source that does the following:
>
> - Adds a minimal site build, with links to the main Clojure web site
> (http://clojure.org)
> - Generates a source JAR to go with the binary JAR
>
On Dec 3, 6:58 am, Michiel de Mare <[EMAIL PROTECTED]> wrote:
> Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
> throws the same exception.
> But (new StringBuffer) in the REPL prints the stringbuffer just fine.
>
> Why does the exception only get triggered in macros?
>
> And do
On Dec 3, 3:05 pm, "Rich Hickey" <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 3, 2008 at 1:05 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
>
>
> > I've created a patch for the clojure source that does the following:
>
> > - Adds a minimal site build, with links to the main Clojure web site
> > (
For what it is worth, I implemented (for another project) George
Marsaglias XorShift algorithm (as recommended in Java Concurrency in
Practice) in a thread-safe contention free maner, by making the
thread-id part of the source entropy. This way, two threads will
generate different random numbers f
On Dec 3, 9:01 am, ivant <[EMAIL PROTECTED]> wrote:
> On Dec 3, 3:05 pm, "Rich Hickey" <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Wed, Dec 3, 2008 at 1:05 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
> > > I've created a patch for the clojure source that does the following:
>
> > > - Adds a m
Hi,
This morning I noticed a new module in Clojure
Contrib, "clojure.contrib.repl-ln". But I don't think I've seen any
notice of it here or on #clojure.
Maybe Stephen Gilardi (the author) would say a little about it?
Randall Schulz
--~--~-~--~~~---~--~~
You r
I was just about to do that, Randall. :-)
clojure.contrib.repl-ln is a repl that supports lines and line
numbers. Here's a session that demonstrates it.
--Steve
% java -cp clojure.jar:clojure-contrib.jar clojure.main -e "(use
'clojure.contrib.repl-ln)" -e "(repl)"
1:1 user=> ; clojure.contr
This looks awesome, great work Stephen!
On Wed, Dec 3, 2008 at 9:27 AM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote:
>
> I was just about to do that, Randall. :-)
>
> clojure.contrib.repl-ln is a repl that supports lines and line
> numbers. Here's a session that demonstrates it.
>
> --Steve
>
>
On Wed, Dec 3, 2008 at 3:01 PM, ivant <[EMAIL PROTECTED]> wrote:
> I'm a Maven fan, and I think it'll be good if clojure supports it.
> But "support" here can mean different things. And the minimal
> "support" for maven could be to just drop the clojure.jar in public
> maven repository.
And a po
The classpath specified on the command line seems to be ignored for
case #3 (using SVN Rev 1142):
1. Using clojure.lang.Repl
java -cp /home/kreg/src/clojure/trunk/clojure.jar:/another/class/path
clojure.lang.Repl
Clojure
user=> (.getProperty System "java.class.path")
"/home/kreg/src/clojure/tru
On Wednesday 03 December 2008 06:27, Stephen C. Gilardi wrote:
> I was just about to do that, Randall. :-)
Yeah, I'm both nosey and impatient...
> clojure.contrib.repl-ln is a repl that supports lines and line
> numbers. Here's a session that demonstrates it.
Thanks. That looks pretty cool. Do
Right. Rich pointed out a week or so ago that you can't use -jar
together with -cp. That means you can't get around specifying the name
of the main class you want to run.
On Wed, Dec 3, 2008 at 9:05 AM, Craig McDaniel <[EMAIL PROTECTED]> wrote:
>
> The classpath specified on the command line seem
Hmm... I must have missed that. The comment in build.xml regarding how
to start Clojure should probably be changed to use clojure.main
instead of "-jar clojure.jar".
On Dec 3, 10:09 am, "Mark Volkmann" <[EMAIL PROTECTED]> wrote:
> Right. Rich pointed out a week or so ago that you can't use -jar
>
On Dec 3, 2008, at 10:06 AM, Randall R Schulz wrote:
> Thanks. That looks pretty cool. Do I understand from your example that
> if I just hit return I get another prompt? I've been meaning to ask
> for
> that.
Thanks and yes, that's right.
> I'm curious how it interacts with rlwrap in general
Thank you very much for this detailed explanation!
Michiel de Mare
On Dec 3, 2:47 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Dec 3, 6:58 am, Michiel de Mare <[EMAIL PROTECTED]> wrote:
>
>
>
> > Indeed, (print-dup (new StringBuffer) (new java.io.StringWriter))
> > throws the same exception.
Would it make sense to add a :gen-class declaration and have the -main
function automatically call the repl function? This would make launching the
repl less painful for new-comers.
- Drew
On Wed, Dec 3, 2008 at 9:27 AM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote:
>
> I was just about to do tha
Using "-jar clojure.jar" is fine if you only need the core. I suspect
though that most people are going to want the contrib JAR file and
other things, so the -jar option won't be used often.
On Wed, Dec 3, 2008 at 9:14 AM, Craig McDaniel <[EMAIL PROTECTED]> wrote:
>
> Hmm... I must have missed th
On Dec 3, 2008, at 10:14 AM, Craig McDaniel wrote:
> Hmm... I must have missed that. The comment in build.xml regarding how
> to start Clojure should probably be changed to use clojure.main
> instead of "-jar clojure.jar".
Yes it should be changed. This command:
java -cp clojure.jar clo
On Dec 3, 2008, at 10:48 AM, Stephen C. Gilardi wrote:
> but "java -jar" is almost never the right way to launch Clojure.
More correctly put:
"java -jar" is almost never the right way to launch clojure.jar
--Steve
--~--~-~--~~~---~--~~
You received this messa
+1 (avoid Maven, keep POM)
I'm moving Tapestry away from Maven as soon as I get chance, but I'll
still have a POM for each module, and I'll still distribute it to the
Maven central repository ... that part is the one thing that Maven
gets really right.
In some ways, avoiding Maven for the build
On Wednesday 03 December 2008 07:37, Stephen C. Gilardi wrote:
> ...
>
> Fixed. Thanks for the detailed report!
Detailed, eh?
Anyway, that did it and I gotta' say, very cool. And so far it seems
there's no adverse interaction with rlwrap. I've modified my Clojure
launcher script to have an opt
gensym-docs-default-to-match-impl.diff
Description: Binary data
--~--~-~--~~~---~--~~
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
To unsubscribe from thi
On Dec 3, 2008, at 9:06 AM, Randall R Schulz wrote:
>
> Also, does anybody know how gain any degree or kind of control over
> signal handling in Java? Preferably pure Java, but since everything
> I do
> is on Linux, a native-code solution for that platform would be
> acceptable.
Not in a porta
On Wednesday 03 December 2008 08:27, Dudley Flanders wrote:
> On Dec 3, 2008, at 9:06 AM, Randall R Schulz wrote:
> > Also, does anybody know how gain any degree or kind of control over
> > signal handling in Java? Preferably pure Java, but since everything
> > I do is on Linux, a native-code solu
On Dec 2, 5:42 am, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> Is it big enough to matter? My intuition says "yes". That's worth
> nothing, so I will write some tests when I have some spare time ...
> but secretly I was hoping that this thread would goad someone else
> into writing the tes
I just noticed that there's a new Clojure podcast by Stuart Halloway
on the Pragmatic Programmers site:
http://pragprog.com/podcasts/show/24
The blurb says:
"Stuart Halloway, author of "Programming Clojure", tells Susannah
Pfalzer all about this new and cool programming language. Stuart
explain
I am using jline with contrib.repl and it is working pretty well. I
use this command:
java -classpath
.:./jline-0.9.93.jar:classes:clojure/clojure.jar:clojure-contrib/clojure-contrib.jar
jline.ConsoleRunner clojure.main -e "(use 'clojure.contrib.repl-ln)"
-e "(repl)"
-- KD
Dakshinamurthy Karra
On Dec 2, 2:08 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> On Dec 2, 12:16 pm, Stuart Halloway <[EMAIL PROTECTED]> wrote:
> > In Ruby, most things match by value equality. But
> > classes match their instances. Ranges match things in the range.
> > Regexps match strings that they would match ag
On Dec 3, 2008, at 9:32 AM, Drew Olson wrote:
> Would it make sense to add a :gen-class declaration and have the -
> main function automatically call the repl function? This would make
> launching the repl less painful for new-comers.
>
> - Drew
It is a good idea and I'll work on it. What I d
On Dec 3, 2008, at 17:45, Mark H. wrote:
> I have the feeling that the "right interface" for a single stream of
> pseudorandom numbers is a seq, rather than a "function" that you
> call.
I'd provide two interfaces:
1) Low-level: (rng seed) yielding a pair [random-number, new-seed]
2) High-level
On Wednesday 03 December 2008 09:10, Dakshinamurthy Karra wrote:
> I am using jline with contrib.repl and it is working pretty well. I
> use this command:
I recently switched from JLine to rlwrap. I think the latter is
preferable, but I'm sure there are matters of taste involved.
> ...
>
> --
Hi,
there is a missing # in the new trace code. Patch attached.
One could think, that clojure-contrib uses clojure-contrib:
there's defvar in clojure.contrib.def.
Sincerely
Meikel
missing-sharp.patch
Description: Binary data
smime.p7s
Description: S/MIME cryptographic signature
A few other details: the podcast is free, and fairly short (23 minutes).
Cheers,
Stuart
> I just noticed that there's a new Clojure podcast by Stuart Halloway
> on the Pragmatic Programmers site:
>
> http://pragprog.com/podcasts/show/24
>
> The blurb says:
>
> "Stuart Halloway, author of "Progra
Fixed, thanks.
-Stuart Sierra
On Dec 3, 12:36 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> there is a missing # in the new trace code. Patch attached.
> One could think, that clojure-contrib uses clojure-contrib:
> there's defvar in clojure.contrib.def.
>
> Sincerely
> Meikel
>
> m
On Dec 2, 2:08 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> I'm pretty sure I don't like the sound of that at all. We had a nice
> discussion about fcase/condf, which I'd like to get in, here:
>
> http://groups.google.com/group/clojure/browse_frm/thread/dee910bef629...
And I haven't forgotten abo
I've just pushed a template library for Clojure up onto github for
public use. You can find it here:
http://github.com/rosejn/clj-libs/tree/master
This library is based loosely on erb from Ruby, which is the only other
template system I've used, and it allows you to insert Clojure
scriptlets
Hi,
Am 03.12.2008 um 18:24 schrieb Stephen C. Gilardi:
Would it make sense to add a :gen-class declaration and have the
-main function automatically call the repl function? This would make
launching the repl less painful for new-comers.
It is a good idea and I'll work on it. What I do at the mo
On Dec 3, 1:04 pm, Jeff Rose <[EMAIL PROTECTED]> wrote:
> I've just pushed a template library for Clojure up onto github for
> public use.
Cool! One thing to consider, a noted flaw in ERB: use real XML
processing instructions, like "" instead of "<%= .. %>".
That way your template can be a valid
Hi Christophe, hi list,
I really like clojure.contrib.javadoc; I've wanted something like this
for a while. But I wanted it to work for other packages besides the
core Java API, so this patch (attached) does that. It also works for
both local and remote Javadoc files. What do you think? In the
If you've got enough time to spare, I'd recommend trying out the
clojurebox that was released a few days ago. I installed it, ensured
it worked and then replicated that in my .emacs.
Once you have a basic setup working you can easily make the needed
changes to run the latest version.
On Wed, De
Ok, that makes sense. I'll do it. What about the other options
available in erb though? Do we use this:
*
Will '' pass for valid xml?
-Jeff
Stuart Sierra wrote:
> On Dec 3, 1:04 pm, Jeff Rose <[EMAIL PROTECTED]> wrote:
>> I've just pushed a template library for Clojure up onto github
Hi,
I really like cli4j and have a nice pattern I follow in creating CLI
entry points for my project. I find it has a lot of advantages,
including a declarative means of defining your CLI syntax using
annotations.
So I thought it might be nice not to have to write all new interface
wrappers
On Dec 3, 9:27 am, Konrad Hinsen <[EMAIL PROTECTED]> wrote:
> I'd provide two interfaces:
>
> 1) Low-level: (rng seed) yielding a pair [random-number, new-seed]
> 2) High-level: (random seed) yielding an infinite (obviously lazy)
> seq of the random numbers obtained starting from the given seed.
Hello again,
Sorry to follow-up on my own post, but another idea came to me shortly
after sending it.
On Wednesday 03 December 2008 10:49, Randall R Schulz wrote:
> ...
>
> Between this approach and Steve G.'s new REPL, I feel I'm going to
> get an interactive environment for my full suite of t
On Tue, Dec 2, 2008 at 1:53 AM, Stuart Sierra
<[EMAIL PROTECTED]> wrote:
>
> On Nov 28, 7:41 am, lpetit <[EMAIL PROTECTED]> wrote:
>> The "fix import" action could try to resolve an unknown symbol by
>> first searching the symbol in one of the classpath available
>> namespaces, and then search for
On Wed, Dec 3, 2008 at 11:25 AM, Randall R Schulz <[EMAIL PROTECTED]> wrote:
>
> On Wednesday 03 December 2008 09:10, Dakshinamurthy Karra wrote:
>> I am using jline with contrib.repl and it is working pretty well. I
>> use this command:
>
> I recently switched from JLine to rlwrap. I think the la
On Nov 28, 2008, at 5:07 PM, Meikel Brandmeyer wrote:
> Hi,
>
> I'm kind of lost with the latest works on the compiler.
> However here is a short patch, which modifies build.xml
> of contrib to also compile the sources.
[...]
> The build.xml adds all jar files in the path given by
> the CLOJURE
On Dec 3, 2008, at 1:12 PM, Meikel Brandmeyer wrote:
> I tried to trace down, what happens before we enter the Repl.
> The only points I noticed were setting the namespace to user
> and setting the command-line-args. I wrote a simple main to
> do this. Patch attached. To be started with clojure.c
On Wednesday 03 December 2008 11:26, Mark Volkmann wrote:
> On Wed, Dec 3, 2008 at 11:25 AM, Randall R Schulz <[EMAIL PROTECTED]>
wrote:
> > On Wednesday 03 December 2008 09:10, Dakshinamurthy Karra wrote:
> >> I am using jline with contrib.repl and it is working pretty well.
> >> I use this comm
Hi Stuart and Rich,
Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
I'm pretty sure I don't like the sound of that at all. We had a nice
discussion about fcase/condf, which I'd like to get in, here:
http://groups.google.com/group/clojure/browse_frm/thread/
dee910bef629...
And I haven't forgott
I want to build a regular expression pattern literal (I think that's
what they're called) like #"a.*" out of separate strings like "a" and
".*".
user> (re-seq #"a.*" "bab") ; this is cool
("ab")
user> (re-seq #(str "a" ".*") "bab") ; but this, in all its noobness,
is not
; Evaluation aborted.
On Wednesday 03 December 2008 11:57, Blaine wrote:
> I want to build a regular expression pattern literal (I think that's
> what they're called) like #"a.*" out of separate strings like "a" and
> ".*".
>
> user> (re-seq #"a.*" "bab") ; this is cool
> ("ab")
> user> (re-seq #(str "a" ".*") "bab")
Can you include an example usage of this function? Thanks.
On Wed, Dec 3, 2008 at 12:51 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi Stuart and Rich,
>
> Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
>
>> I'm pretty sure I don't like the sound of that at all. We had a nice
>>> discussio
Hello again,
Am 03.12.2008 um 20:51 schrieb Meikel Brandmeyer:
cls (mapcat (fn [[x c]] `[(~xprd ~xndl ~x) ~c]) (partition 2
cls))
xndl (gensym "condp_needle__")
xprd (gensym "condp_predicate__")
Oops. These should of course be changed to be in the
right order.
Sincerel
On Wed, Dec 3, 2008 at 3:10 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote:
>
> You're using a reader notation unrelated to regular expressions.
> Instead, #(...) is a shorthand notation for an anonymous function
> definition.
You can read more about the other reader macros here:
http://clojure.
On Wednesday 03 December 2008 09:07, bc wrote:
> I just noticed that there's a new Clojure podcast by Stuart Halloway
> on the Pragmatic Programmers site:
>
> http://pragprog.com/podcasts/show/24
>
> ...
I just listened to the interview. It was good, but I think for denizens
here, there won't be
On Wed, Dec 3, 2008 at 2:57 PM, Blaine <[EMAIL PROTECTED]> wrote:
>
> I want to build a regular expression pattern literal (I think that's
> what they're called) like #"a.*" out of separate strings like "a" and
> ".*".
>
> user> (re-seq #"a.*" "bab") ; this is cool
> ("ab")
> user> (re-seq #(str
I found myself needing the following today, and it was noticeably
missing from core.clj --- any reason not to include it?
(defn boolean?
"Returns true if b is a Boolean (i.e., true or false)"
[b]
(instance? Boolean b))
Peace,
-tree
--
Tom Emerson
[EMAIL PROTECTED]
http://www.dreamer
Hi,
Am 03.12.2008 um 21:10 schrieb Brian Doyle:
Can you include an example usage of this function? Thanks.
(condp = x
1 "We got a one."
2 (str "We got a " (- 3 1))
"We got something else."))
Sincerely
Meikel
smime.p7s
Description: S/MIME cryptographic signature
Hi Mark,
On Tue, Dec 2, 2008 at 10:38 PM, Mark H. <[EMAIL PROTECTED]> wrote:
> On Dec 1, 12:03 am, bc <[EMAIL PROTECTED]> wrote:
>> I've written a blog post titled "Clojure could be to Concurrency-
>> Oriented Programming what Java was to OOP" in which I discuss
>> Clojure's approach to concurren
It often happens that I would like to have gaurantees about the
consistency of in-memory data structures and external resources. For
instance, in the last two large systems I've built, the system would
respond to an external message received via socket, do some complex
processing based on the co
Vijay Lakshminarayanan wrote:
> If you've got enough time to spare, I'd recommend trying out the
> clojurebox that was released a few days ago. I installed it, ensured
> it worked and then replicated that in my .emacs.
>
> Once you have a basic setup working you can easily make the needed
> chang
Hello Stephen,
Am 03.12.2008 um 20:35 schrieb Stephen C. Gilardi:
Can we make clojure-contrib/build.xml work such that if you specify a
location for a clojure.jar as a property, it compiles (the stand-alone
compilable parts of ) clojure-contrib into clojure-contrib.jar, but if
you don't specify
Hi Craig,
clojure.main/with-bindings was exactly what I needed.
With it my JSP became trivial few liner: http://paste.lisp.org/display/71541
Thank you.
- Anton
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Cloju
I'm all straightened out. Thanks everyone. Very helpful.
On Dec 3, 3:18 pm, Chouser <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 3, 2008 at 2:57 PM, Blaine <[EMAIL PROTECTED]> wrote:
>
> > I want to build a regular expression pattern literal (I think that's
> > what they're called) like #"a.*" out
On Dec 3, 2008, at 4:23 PM, Meikel Brandmeyer wrote:
> I think your initial suggestion, is a good idea. I changed the
> build.xml file to look for a property called clojure.jar. If it
> exists, we use it and compile the libraries. Otherwise - well -
> we don't...
>
> Invocation: ant -Dclojure.ja
I am coming to Clojure from the Java side, and am completely ignorant
about lisp indentation & newline conventions.
Some things are easy to pick up from posted examples and common
sense...newline + tab after the parameters vector when defining a
function, etc.
But I did some web searches on lisp
On Wed, Dec 3, 2008 at 5:27 PM, Stephen C. Gilardi <[EMAIL PROTECTED]> wrote:
Buildfile: build.xml
>
> init:
> [mkdir] Created dir: /ext/clojure-contrib/classes
>
> compile_clojure:
> [java] Compiling clojure.contrib.command-line to /ext/clojure-
> contrib/classes
> [java] Comp
Hi,
Am 03.12.2008 um 22:06 schrieb levand:
I am coming to Clojure from the Java side, and am completely ignorant
about lisp indentation & newline conventions.
Good. Then you aren't spoiled, yet. ;)
My advice: get a reasonable editor like emacs or vim and
the corresponding clojure modes. They
Continuing with the monad theme, I decided to implement monadic
parsing in Clojure. Erik Meijer and Graham Hutton published a paper
called "Monadic Parsing in Haskell" and I implemented the examples
from that paper in Clojure. The code is available here:
http://groups.google.com/group/clojure/w
Hi all,
When I run the following from the REPL, I see the result of the
"println"
(defn read-docs [duc-dir]
(for [file (.listFiles (java.io.File. duc-dir))
:when (.isFile file)]
(do
(println file)
(.getName file
However, when embedded in a script (u
On Dec 3, 3:48 pm, Dave Griffith <[EMAIL PROTECTED]> wrote:
> It often happens that I would like to have gaurantees about the
> consistency of in-memory data structures and external resources. For
> instance, in the last two large systems I've built, the system would
> respond to an external me
The example on http://clojure.org/jvm_hosted should reflect this. I'm
not sure this is the proper venue to report such stuff. I've used
this example (successfully) to convince those that normally walk away
when I start talking about lisp to give clojure a look. I just cut
and paste it into the
On Dec 3, 2008, at 7:19 PM, aria42 wrote:
> Hi all,
> When I run the following from the REPL, I see the result of the
> "println"
>
> (defn read-docs [duc-dir]
> (for [file (.listFiles (java.io.File. duc-dir))
> :when (.isFile file)]
> (do
> (println file)
> (.get
On Wed, Dec 3, 2008 at 4:49 PM, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am 03.12.2008 um 22:06 schrieb levand:
>>
>> I am coming to Clojure from the Java side, and am completely ignorant
>> about lisp indentation & newline conventions.
>
> Good. Then you aren't spoiled, yet. ;)
>
>
On Dec 3, 2:51 pm, Meikel Brandmeyer <[EMAIL PROTECTED]> wrote:
> Hi Stuart and Rich,
>
> Am 03.12.2008 um 19:00 schrieb Stuart Sierra:
>
> >> I'm pretty sure I don't like the sound of that at all. We had a nice
> >> discussion about fcase/condf, which I'd like to get in, here:
>
> >>http://grou
Hi,
What's the rationale for accepting unary applications of =?
To wit:
user=> (= nil)
true
user=> (= true)
true
user=> (= false)
true
user=> (= 0)
true
user=> (= 1)
true
user=> (= =)
true
etc.
By the way, I do understand while (or) is false and (and) is true, but I
don't see why = all
On Dec 3, 2008, at 9:15 PM, Randall R Schulz wrote:
> By the way, I do understand while (or) is false and (and) is true,
> but I
> don't see why = allows a single argument.
I don't know the answer, but I do see it making sense as the final
value in this sequence:
(= 1 1 1 ...)
(= 1 1 1)
(=
On Wednesday 03 December 2008 18:28, Stephen C. Gilardi wrote:
> On Dec 3, 2008, at 9:15 PM, Randall R Schulz wrote:
> > By the way, I do understand while (or) is false and (and) is true,
> > but I don't see why = allows a single argument.
>
> I don't know the answer, but I do see it making sense
On Dec 3, 2008, at 9:39 PM, Randall R Schulz wrote:
> OK, so it's consistent with the null-ary (and) (no argument is false)
> and (or) (there is a true argument). But from that perspective,
> shouldn't the definition extend to the null-ary case, too?
I think not. How would you decide the values
On Wednesday 03 December 2008 18:48, Stephen C. Gilardi wrote:
> On Dec 3, 2008, at 9:39 PM, Randall R Schulz wrote:
> > OK, so it's consistent with the null-ary (and) (no argument is
> > false) and (or) (there is a true argument). But from that
> > perspective, shouldn't the definition extend to
On Thu, Dec 4, 2008 at 2:33 AM, Dimitre Liotev <[EMAIL PROTECTED]> wrote:
>
> Vijay Lakshminarayanan wrote:
>> If you've got enough time to spare, I'd recommend trying out the
>> clojurebox that was released a few days ago. I installed it, ensured
>> it worked and then replicated that in my .emac
On Tue, Dec 2, 2008 at 12:52 PM "Jan Rychter" <[EMAIL PROTECTED]> wrote:
>
> Rich Hickey <[EMAIL PROTECTED]> writes:
> > On Jun 20, 11:58 am, Jaime Barciela <[EMAIL PROTECTED]> wrote:
> >> Hello Phil,
> >>
> >> My understanding is that Common Lisp doesn't have support for
> >> continuations either
I want to put the Clojure logo:
http://clojure.googlegroups.com/web/Clojure-logo.png?gda=y8lqvUIAAABoLitVpBTEcNIQc_NHg39S6iU75fHiOxnOGiH4bfPrlzZZL8wLBEcX9EgDZpMYxIxV4u3aa4iAIyYQIqbG9naPgh6o8ccLBvP6Chud5KMzIQ
...on Wikipedia's article on Clojure. What is the license of Clojure's
logo--is it a free
I apologize if this has been brought up before... But, where does the
doc
string on the `my-test' defn below reside.
In case one evaluating (doc my-test returns the doc string. In case
two (doc evaluates the string as nil).
Is this value interned with the symbol and if so where and how do I
ac
(defn sub-til-0 [n]
(if (zero? n) 0 (recur (dec 1
works but the equivalent
(defn sub-til-0 [n]
(cond
[(zero? n) 0]
[:else (recur (dec 1))]))
does not.
Recursion is already limited enough in Clojure... give us recur in
tail position within cond! :)
Thanks,
Mark
--~--~-
On Dec 3, 2008, at 9:58 PM, Randall R Schulz wrote:
> But it is also the case that subtraction and division _do_ have
> identity
> elements. They follow directly from the application of the inverse
> operation to the corresponding operator's identity element. In other
> words, the identity elem
the hard part about implementing continuations in a language that doesn't
already support them is that you're trying to capture it from within.
with a delimited continuation, you're capturing it from the outside, so you
don't have that problem.
--~--~-~--~~~---~--~
did cond change syntax?
last i checked, it was
(cond (case) (expr)
(case) (expr)
)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojur
This seems to work for me:
(defn sub-til-0 [n]
(cond
(zero? n) 0
:else (recur (dec 1
I'm not sure what those extra ['s are for in your example.
On Wed, Dec 3, 2008 at 9:39 PM, puzzler <[EMAIL PROTECTED]> wrote:
>
> (defn sub-til-0 [n]
> (if (zero? n) 0 (recur (dec 1
>
>
On Dec 3, 2008, at 11:35 PM, Mon Key wrote:
> I apologize if this has been brought up before... But, where does
> the doc string on the `my-test' defn below reside.
It becomes metadata for the var that your defn form defines. You can
see all the metadata with (meta (var my-test)).
> If not,
On Dec 4, 5:40 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> I agree. By the identity element argument, (/) should be 1 and (-)
> should be 0.
>
Regarding *the* identity argument, I think it only works if the
operator is associative. Otherwise, you can talk about a left identity
or a
I'm sure I'm missing something
Maybe I should re address the issue in a different way; outside of
`meta' what other way is there to do a *visual* check/comparison to
test if two otherwise identical and/or nearly identical symbols
contain identical slot values?
In the case where the `doc' str
1 - 100 of 108 matches
Mail list logo