This seems strange:
(with-meta :foo {:type 'id})
causes:
java.lang.IncompatibleClassChangeError (NO_SOURCE_FILE:0)
[Thrown class clojure.lang.Compiler$CompilerException]
Restarts:
0: [ABORT] Return to SLIME's top level.
1: [CAUSE] Throw cause of this exception
Backtrace:
0: clojure.lang.C
On Oct 7, 12:32 am, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> On Oct 7, 2008, at 1:21 AM, Matthew D. Swank wrote:
...
> Here's a similar question and answer from the list archive that
> includes a cool tip for seeing the effect of reader macros:
>
>
>
> > On Fri, Mar 14, 2008 at 11:58
On Oct 7, 2008, at 3:19 AM, Matthew D. Swank wrote:
> This seems strange:
> (with-meta :foo {:type 'id})
> [is an error]
From http://clojure.org/metadata:
Symbols and collections support metadata, a map of data about the
symbol or collection
Keywords are not symbols in Clojure and
I'm attempting to learn Clojure with a long history of OO and have some
questions.I've created a defstruct for a place type object like:
(defstruct place :id :name :street :city :state :zip)
I want to write a function that would take a list of places and remove
the duplicates. Duplicates ar
Hi Brian,
(1) What does it mean to be equal on id and not equal on the other
fields? If two fields claim the same id but a different name, how
would you know which one to keep?
(2) Given some answer to #1, why not store the structs in a map under
id?
(3) For the geocoded place struct, I w
This is a tangent from Brian's question about struct inheritance:
While I am not sure that I want struct inheritance, it seems
unnecessarily hard to write the macro for it. Structs are not first
class citizens, in that you cannot reflect against them. I want to ask:
(defstruct person :fname
On Oct 5, 8:20 pm, Krzysztof Kliś <[EMAIL PROTECTED]> wrote:
> Hello Rich,
> I know this is an old post, but did you consider using Terracotta
> (http://www.terracotta.org/) for clustering Clojure? It might fit the
> Clojure concurrency model much better than MPI, and you wouldn't have
> to mix
On Tue, Oct 7, 2008 at 2:32 PM, Stuart Halloway
<[EMAIL PROTECTED]>wrote:
>
> Hi Brian,
>
> (1) What does it mean to be equal on id and not equal on the other
> fields? If two fields claim the same id but a different name, how
> would you know which one to keep?
I guess it could depend on the si
Hello,
Am 07.10.2008 um 23:32 schrieb Brian Doyle:
Yes, I was just being somewhat lazy with this. If I define 10
attributes
for a given struct and wanted to use all of those plus 3 more in a new
struct I didn't want to have to write out those original 10
attributes again.
I'm not sure, t
Ok, I know we've been over this before, but nothing was actually done.
For the record:
http://groups.google.com/group/clojure/browse_thread/thread/81b361a4e82602b7/0313c224a480a161
So here is my attempt formalize a simple proposal.
The reader should take the literal contents of #"..." and pass t
I love it!
On Tue, Oct 7, 2008 at 4:37 PM, Chouser <[EMAIL PROTECTED]> wrote:
> Ok, I know we've been over this before, but nothing was actually done.
>
> For the record:
>
> http://groups.google.com/group/clojure/browse_thread/thread/81b361a4e82602b7/0313c224a480a161
>
> So here is my attempt fo
On 7 Oct 2008, at 21:00, Brian Doyle wrote:
> [...] I've created a defstruct for a place type object like:
>
> (defstruct place :id :name :street :city :state :zip)
>
> I want to write a function that would take a list of places and remove
> the duplicates. Duplicates are defined by places havi
How do you make a two-dimensional array of a given size? (e.g. (make-
array '(i j)) in common lisp)
I want to do stuff like, e.g., representing a chessboard, where I can
index into cells and update them.
martin
--~--~-~--~~~---~--~~
You received this message beca
This destructuring on sequences works:
user=> (let [[:as m] [1 2]] m)
[1 2]
but this one on associations doesn't (and it seems like it should):
user=> (let [{:as m} {:b 1 :c 2}] m)
java.lang.NullPointerException
clojure.lang.Compiler$CompilerException: NO_SOURCE_FILE:14: null
..
Is there
Is it bad etiquette to reply to myself? I thought it might be useful
to compare the proposed syntax with that of other languages with good
regex support.
I tried all the examples from my previous message in Perl, Python,
Ruby, and JavaScript. All but Python have literal regex syntax, while
Pyth
On Tue, Oct 7, 2008 at 9:30 PM, Martin DeMello <[EMAIL PROTECTED]> wrote:
>
> How do you make a two-dimensional array of a given size? (e.g. (make-
> array '(i j)) in common lisp)
>
> I want to do stuff like, e.g., representing a chessboard, where I can
> index into cells and update them.
For som
Hello Rich,
in the definition of isa? in boot.clj in the last line (no. 2879),
there isa? recurs into the contents of the vectors. It uses
implicitely the global-hierarchy instead of the provided
one.
Shouldn't it be
(isa? h (child i) (parent i))
instead of
(isa? (child i) (parent i))
Sinc
17 matches
Mail list logo