Hi Phil!
Phil Hagelberg a écrit :
I'm using the Enlive library, and so far I've been pretty impressed. The
way it separates templates out into their own files and doesn't allow
any logic to get mixed up with them is great.
Thanks for the kind words.
One thing I noticed is that its
Great article! Although I’ve done only a little Ruby metaprogramming, my
sense is that Clojure’s macros make
it more powerful than Ruby in this respect
It would be good to see a comparison of metaprogramming with macros. They
sometimes are used for similar purposes, but of course are not the same
Phil Hagelberg a écrit :
From what I can tell the difference seems to be that it goes inside the
node if it's a string, and it replaces the node if it's a function call,
even if the function call results in a string.
This behaviour seems really strange. I feel like maybe there's some
logic
On 18.03.2009, at 19:03, Konrad Hinsen wrote:
Why is user// an invalid token, whereas clojure.core// works
perfectly well?
I found out in the meantime that clojure.core// is indeed handled as
a special case by the reader (line 276 in LispReader.java), but that
still doesn't answer the
Can Clojure simulate Class?Lisp can do it!
Anyone know it?
--~--~-~--~~~---~--~~
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 this
For the Java libraries, I like Java Cookbook 2ed by Ian Darwin. It
doesn't spend much time on the language. It includes introductions to
Swing, network clients and servers, regular expressions,
introspection, and JDBC. It was published in 2004, so it doesn't cover
Java 6.
Todd Fincannon
On 19.03.2009, at 07:54, Edward Shen wrote:
Can Clojure simulate Class?Lisp can do it!
Anyone know it?
Clojure can do it as well. Look here for a library that does it:
http://github.com/swannodette/spinoza/tree/master
Konrad.
Hi All,
I've been teaching myself clojure and in the process am working on a
small program to manipulate an XML file. I figured this was a good
chance to try clojure.zip, but I'm having some difficulty. Being a
newbie I strongly suspected myself - but when I posed the question on
IRC the
Hi Christophe,
On Mar 19, 11:22 am, Christophe Grand christo...@cgrand.net wrote:
Jason Sankey a écrit :
(if (and (branch? loc) (not (empty? (children loc
(recur (- loc down rightmost))
loc))
Being new to both clojure and zip I admit there's still a good chance
that I have
On Thu, Mar 19, 2009 at 6:34 AM, Konrad Hinsen konrad.hin...@laposte.netwrote:
On 19.03.2009, at 07:54, Edward Shen wrote:
Can Clojure simulate Class?Lisp can do it!
Anyone know it?
Clojure can do it as well. Look here for a library that does it:
Doesn't On Lisp talk about simulating CLOS with closures? It's free online.
I would like to add as the creator that I would not use Spinoza yet ;) And
I've put it on hold as I'm currently obsessed with trying to port cl-cont.
Spinoza still needs quite a bit of work, I started on that before a
I just checked in clojure.contrib.complex-numbers, a complex number
library. For the moment it implements only comparison and arithmetic,
but I intend to add maths functions later.
Complex numbers are represented by struct maps with two keys, :real
and :imag. The real and imaginary parts
On Mar 19, 7:22 am, Christophe Grand christo...@cgrand.net wrote:
Jason Sankey a écrit :
(if (and (branch? loc) (not (empty? (children loc
(recur (- loc down rightmost))
loc))
Being new to both clojure and zip I admit there's still a good chance
that I have no idea what I'm
On Wed, Mar 18, 2009 at 10:31 PM, Kevin Downey redc...@gmail.com wrote:
Symbols starting and ending with . are reserved.
see http://clojure.org/reader the section on Symbols
Fair enough, but why does the (defn) succeed if these symbols are reserved?
On Wed, Mar 18, 2009 at 12:58 PM, Michael
Hi,
I managed to put together an Emacs Lisp function to automatically
declare all defined symbols in a Clojure source file. The algorithm is
crude: it doesn't understand syntax, it just parses lines beginning
with either (def or (defn . A single line beginning with
(declare macro must
On Mar 19, 12:58 pm, Jason Sankey ja...@zutubi.com wrote:
Also, is there somewhere I can contribute test cases for this to
prevent a future regression?
In order to contribute, you must fill-in and send The Contributor
Agreement (CA) to Rich Hickey:
http://clojure.org/contributing
Tests for
On Mar 19, 2009, at 11:33 AM, Michael Wood wrote:
Fair enough, but why does the (defn) succeed if these symbols are
reserved?
Clojure does not always enforce all the rules. It may come to pass
that Clojure will never enforce all the rules as the performance cost
and complexity added by
Why not have two behaviours from the same code base ?
There could be a strict mode versus an optimized mode.
That could allow more optimizations at run time while
having a clear trace in the code of these optimizations.
The strict mode would be slower but that should be fine when
testing.
Going
On Mar 19, 8:22 am, Rich Hickey richhic...@gmail.com wrote:
So far it seems like sequential let has proven a useful default, and
I'd rather have one let than two.
Agreed - sequential let is a better default.
-Stuart Sierra
--~--~-~--~~~---~--~~
You received
Christophe Grand christo...@cgrand.net writes:
I'm not quite happy with this behavior: I wanted to preserve the
brevity of setting content from a parameter without resorting to (text
my-parameter) but it makes things too irregular. This feature will
certainly go away as I'm planning a
Phil Hagelberg a écrit :
I notice you use with-test to mix your tests in together with your
implementation. This seems to be less common than storing the tests in
their own file; I'm wondering if you are happy with this approach? One
advantage of keeping things in their own file is that it's
The code is entirely misaligned. Reposted it as in the files section:
http://groups.google.com/group/clojure/web/clj-auto-declare.el
Tabs are too wide, I use four spaces wide tabs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Test-clojure is updated and ready for new tests :-)
Frantisek
On Mar 17, 5:03 am, Phil Hagelberg p...@hagelb.org wrote:
OK, so I've posted a fair amount of smack talk about test suites and
how important they are--I figure it's time to help out.
What are some ways in which test-clojure is
On Mar 19, 7:17 am, David Nolen dnolen.li...@gmail.com wrote:
Doesn't On Lisp talk about simulating CLOS with closures? It's free online.
Building either class-based or prototype-based object systems on
closures is pretty straightforward. A closure carries abritrary state
around in the
I am trying to understand how to use SwingWorker to do time-consuming
work that needs to update a Swing GUI. The following makes a frame
with a button (which starts a SwingWorker on the first click).
Thereafter, clicking the button increments an integer n that is
displayed in the first
On Mar 19, 2009, at 2:14 PM, mikel wrote:
On Mar 19, 7:17 am, David Nolen dnolen.li...@gmail.com wrote:
Doesn't On Lisp talk about simulating CLOS with closures? It's free
online.
Building either class-based or prototype-based object systems on
closures is pretty straightforward. A
Hello Stuart all!
As discussed in this thread:
test-is: generating and processing testing data
http://groups.google.com/group/clojure/browse_frm/thread/3e84efefd7c0bebc/3652a4a9a124cc6b
, sometimes it is necessary to test each value against each value. Example
is zeros-are-equal (as you
However the code (proxy-super publish m) throws this exception:
#IllegalArgumentException java.lang.IllegalArgumentException: No
matching method found: publish for class
clojure.proxy.javax.swing.SwingWorker
publish is a protected method, and I don't think proxy (even with
proxy-super)
Christophe Grand christo...@cgrand.net writes:
I see two advantages to using with-test:
* documentation/usage examples as you pointed out,
Actually I meant that it's nicer for documentation to have the tests in
a separate file since when you're trying to learn how to use the library
On Thu, Mar 19, 2009 at 2:13 PM, Rich Hickey richhic...@gmail.com wrote:
http://clojure.org/state
This is a great essay that I hadn't read before!
I think it was written before Atoms were added to Clojure or they
would be mentioned along with Refs and Agents.
--
R. Mark Volkmann
Object
On Wed, Mar 18, 2009 at 10:40 PM, Stephen C. Gilardi squee...@mac.com
wrote:
Because parallel bindings are also useful
Could you explain? I don't understand the justification for let in Lisp,
when let* seems so much more useful.
Joshua
On Mar 19, 2:13 pm, Rich Hickey richhic...@gmail.com wrote:
On Mar 19, 2009, at 2:14 PM, mikel wrote:
On Mar 19, 7:17 am, David Nolen dnolen.li...@gmail.com wrote:
Doesn't On Lisp talk about simulating CLOS with closures? It's free
online.
Building either class-based or
Hi Frantisek!
I can see where this is useful, and the only reason I haven't
implemented something like it for a test-is already is that I don't
expect it would be very commonly used outside of the very specific
case of testing the language itself. Where else, other than a language
specification
On Mar 19, 2009, at 4:42 PM, Joshua Fox wrote:
Because parallel bindings are also useful
Could you explain? I don't understand the justification for let in
Lisp, when let* seems so much more useful.
As I mentioned, I like how Clojure's let works. I'm also fully on
board with Rich's
Hi Frantisek,
Frantisek Sodomka wrote:
On Mar 19, 12:58 pm, Jason Sankey ja...@zutubi.com wrote:
Also, is there somewhere I can contribute test cases for this to
prevent a future regression?
In order to contribute, you must fill-in and send The Contributor
Agreement (CA) to Rich Hickey:
I was debugging with inspect-tree and noticed that it errors when it
encounters a set (it thinks it's not atomic, but then nth produces an
UnsupportedOperationException).
I made a small patch (below) that makes inspect-tree work on
java.util.Sets, and also anything else that implements
It would be a great pity if there was no way to do this, as
SwingWorker is the 'proper' way for long-running code to interact with
Swing objects.
Any ideas for how to achieve this would be appreciated.
On Mar 19, 7:35 pm, MikeM michael.messini...@invista.com wrote:
However the code
http://clojure.org/java_interop
Note that while method fns can be provided to override protected
methods, they have no other access to protected members, nor to super,
as these capabilities cannot be proxied.
However this solution might be adequate:
(proxy [SwingWorker] []
Hello,
For the past few days, I've been trying, unsuccessfully, to make an
application I wrote faster. A Java program that performs, more or
less, the same task takes 12 seconds (on my machine) to parse 1000
files; my Clojure program takes nearly 3 minutes. This more than an
order of magnitude
You can get it here:
http://github.com/swannodette/clj-cont/tree/master
So over the past week I've been porting cl-cont (
http://common-lisp.net/project/cl-cont/) originally written by Slava
Akhmechet to Clojure. I've now ported most of the functionality that's
translatable from Common Lisp
Tim -
If you're running Windows or Linux/Unix (anything other than Mac OS
X), then I think the ctrl-x key binding for the shortcut will be
overridden by the text field's ctrl-x key binding, which is to the
'cut to clipboard' action. Try selecting some text and pressing ctrl-
x to see.
Keyboard
I like the sequential let too. For one thing, it allows for the
breaking apart of complex expressions into more comprehensible parts,
with well named intermediate variables resulting in self documenting
code. For another, if a calculated value is used more than once, then
using an intermediate
42 matches
Mail list logo