Looks nice from just looking at the gists - I have a small project
where annotations support would actually come in handy as well so will
definitely give this a try shortly.
mark
--
Pull me down under...
On Sat, Apr 24, 2010 at 12:06 PM, Rich Hickey wrote:
> It supports annotations for definte
It's not answering your idiomatic clojure question, but extract-url-
filename will have problems because of this:
user> (.getFile (URL. "http://www.foo.com/";))
"/"
On Apr 21, 1:08 pm, Brent Millare wrote:
> Technically I didn't write my own cause I just copied pasted it ;)
>
> For the purpose
So it seems like recently the only thing I use AOT for is producing
-main functions that can be easily run from the command-line. I've
found that an alternate to this is to use clojure.main -e, require the
necessary namespace, and then call (apply -main *command-line-args*),
but this is rather awkw
On 24 April 2010 05:48, Mark Engelberg wrote:
> Ideally, I'd like to see a way to allow me to write a program using
> (:name employee), and later, if I need to, customize the employee
> datatype so that (:name employee) actually dispatches to some other
> function. Ditto with (assoc employee :nam
A few meandering observations:
I like the latest change to include a this argument. It makes the
number of arguments line up which is a good thing.
I like the idea of defrecord for the common case, rather than having
to request default implementations of various interfaces within
deftype. Still
I haven't compiled under a release in a while. Recent changes to the
build system may have messed it up. I'll check it out.
David
On Apr 23, 2:11 am, Joerthan Panest wrote:
> Hello,
>
> I am considering ClojureCLR for embedding in an application, but it appears
> as though it takes ~4secs to
I've started adding some support for Java annotations, as of this
commit:
Fantastic! I'm just about to do some JAX-WS stuff (which requires
annotations), so this is a welcome change.
The syntax looks no worse than Java's, so no comment on that...
--
You received this message because you are
2010/4/24 Rich Hickey :
> I've started adding some support for Java annotations, as of this
> commit:
>
> http://github.com/richhickey/clojure/commit/fa899d22dceb531d9f5af833ac6af0d956e6bdc7
>
> Example of use:
>
> http://gist.github.com/377213
>
> It supports annotations for definterface/type/reco
Hi,
yes, you may use a project created with a (very) old version of ccw,
thus initialized with a pre-release of 1.1.
To upgrade, use the Project > Properties > Java Build Path > Libs for
your project.
Or else, in the contextual menu of the project, click the
"enable/disable clojure support". Thi
I've started adding some support for Java annotations, as of this
commit:
http://github.com/richhickey/clojure/commit/fa899d22dceb531d9f5af833ac6af0d956e6bdc7
Example of use:
http://gist.github.com/377213
It supports annotations for definterface/type/record types (put in
metadata on type name),
Thanks for the "food for thought". I'm concerned with the short
introduction not being too much "goal oriented" (and more "tutorial
oriented"), I'll continue think about it in "background mode".
Cheers,
--
Laurent
2010/4/23 cburroughs :
> What I did when I needed to give a shorter talk was to b
I wrote this, which seems to solve the problem being discussed:
http://gist.github.com/377278
Thoughts?
On Apr 23, 8:10 am, Armando Blancas wrote:
> > Is there any easy workaround which doesn't involve defing a global
> > conn.
>
> To do all in a single place you'll have to mimic the Java idi
Just in case anybody is interested
I have written a tool to aid developing against a web-service. It sits
between the Soap client and the Soap service and acts as a router (a
bit like SoapTrace). You can use it to record Soap sessions then
replay them. See http://github.com/NeillAlexander/spon
On Fri, Apr 23, 2010 at 12:36 PM, catonano wrote:
> I need some help in order to set up a decent setting as in the subject.
>
> I mean, there's elpa, leningen, apt-get, what am I supposed to do ?
The Getting Started page on the wiki covers this pretty well:
http://www.assembla.com/wiki/show/clo
Hello,
I need some help in order to set up a decent setting as in the
subject.
I mean, there's elpa, leningen, apt-get, what am I supposed to do ?
Thanks for any hint
Cato
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send
On 23.04.2010, at 19:20, Rich Hickey wrote:
> You can get that back easily by implementing ILookup/IKeywordLookup, as does
> defrecord. I still have ideas about macro-like mixins for use in deftype, but
> I concluded the mandatory use of such mixins to create record-like things was
> too much u
On 23.04.2010, at 17:49, ataggart wrote:
> One problem with requiring the "other" object to be of the same type
> is that it would break the current model, e.g.:
>
> user=> (= '(1 2 3) [1 2 3])
> true
I'd want this only for defrecord, which is a more limited (but also more
convenient) way to de
On Apr 22, 6:53 pm, Rich Hickey wrote:
[snip..]
> Feedback and errata welcome as always,
>
1) Typo on http://clojure.org/protocols:
Section "Basics"
defprotocol will automatically generate a corresponding interface,
with the same name as the protocol, i.e. given a protocol my.ns/
Protocol, an in
On Apr 22, 2010, at 1:30 PM, Mark Engelberg wrote:
I tried using deftype relatively recently, but realized it wouldn't
work for my needs because serialization via *print-dup* wasn't yet
implemented. I'd recommend including this with the 1.2 release (or is
there a new recommended way to seriali
On Apr 23, 2010, at 3:12 AM, Konrad Hinsen wrote:
On 22 Apr 2010, at 21:15, Konrad Hinsen wrote:
I have several former deftypes that are a perfect fit for the new
defrecord, except that they need a specific comparison function.
This is usually for excluding some fields from equality testin
On Apr 22, 2010, at 3:15 PM, Konrad Hinsen wrote:
On 22.04.2010, at 18:53, Rich Hickey wrote:
Feedback and errata welcome as always,
One feature in the deftype/defrecord split that I regret is that
defrecord no longer allows the redefinition of equals and hashCode.
Any attempt to overri
I had trouble with Enclojure 1.1.1
What worked for me: uninstall it and follow the Netbeans section at
http://github.com/relevance/labrepl
--
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
N
One problem with requiring the "other" object to be of the same type
is that it would break the current model, e.g.:
user=> (= '(1 2 3) [1 2 3])
true
I'm left to wonder if it the more correct implementation of the
desired behavior is not to override the equals, but rather to
implement Comparable.
> Is there any easy workaround which doesn't involve defing a global
> conn.
To do all in a single place you'll have to mimic the Java idiom.
(let [conn (atom nil)]
(try
(reset! conn (API/getConnection ...) ...
(catch ...)
(finally (if @conn (API/closeConnection @conn)
As it's
In your code you have:
(defstruct body
:id
:type ; :projectile or :unit -> projectiles do not collide with other
bodies;
:current-position ; ref
:current-cells ; ref
:current-rotation ;atom
:pixel-half-width :pixel-half-height
:half-width :half-height
:components) ; a map of (:co
What I did when I needed to give a shorter talk was to base it on some
of the well known presentations and just cut out a lot. I don't think
Stuart's intro or Rich's "for Java people" talk assumes people are
already enthusiastic about functional programming.
[1] http://github.com/stuarthalloway/cl
> *clojure-version*
> {:interim true, :major 1, :minor 1, :incremental 0, :qualifier
> "alpha"}
>
Looks like you have some old version of 1.1 prior to release. The
release version of 1.1 shouldn't have the alpha qualifier.
Try upgrading.
--
You received this message because you are subscribe
Hi ALl
I am using CounterClockwise for Eclipse and for some reason I keep
getting the error:
Unable to resolve var: juxt in this context (repl-1:34)
This happens when I fire up the repl in the user NS or when I do:
(ns testit
(:require clojure.core))
What am I missing here? It has to be som
Hi all,
I've written my first macro: with-open-flexi!
(defmacro with-open-flexi!
" Just like with-open except it takes closing expression instead
of assuming it to be .close
Macro definition :
(with-open-flexi! [] body) expands to -
(do body)
(with-open-flexi! [obj1 init
I am completely new to Clojure. I decided to use Netbeans with
Enclojure, but can't get it to work. I'm using Netbeans 6.8 on a Mac
(Leopard). The Netbeans Plugin window Installed tab says that it is
active (under User Installed Plugins it says Source: enclojure-
plugin-2010-23-mar.nbm, Enclojure
Hello,
I am considering ClojureCLR for embedding in an application, but it appears
as though it takes ~4secs to start up. Is this typical? Is there a way to
speed up? I realize that this could be hidden by opening it in a background
process and leaving it open but I can see where that is less than
Hello, I have successfully built ClojureCLR and run the main REPL
successfully.
Now, I would like to set up a project that uses ClojureCLR. So, I
followed the short tutorial at:
http://www.genericerror.com/blog/2010/01/22/SimpleClojureCLRExample.aspx
At the first call of RT.LoadScript(...) I am g
On Thu, 2010-04-22 at 22:29 +0700, Per Vognsen wrote:
> How about this?
>
> (use 'clojure.contrib.str-utils 'clojure.contrib.duck-streams)
>
> (defn parse [file]
> (let [r (reader file)]
> (map (fn [line] (map #(Integer/parseInt %) (.split line " ")))
> (take (Integer/parseInt (
Simple fix, the new project was targeting .NET 4.0 Client. Switching to 3.5
solved the issues.
On Thu, Apr 22, 2010 at 10:37 PM, Joerthan Panest wrote:
> Hello, I have successfully built ClojureCLR and run the main REPL
> successfully.
>
> Now, I would like to set up a project that uses ClojureC
Hi this is my first clojure application: http://pastebin.com/Vv7xr6Uj
(Code Criticism welcome!)
I am porting my hack'and'slay game from java to clojure.
It is using slick2d and rendering and moving bodies (rectangles) on a
2d collision map.
-
I created a computationally intensive situation with
On 22 Apr 2010, at 21:15, Konrad Hinsen wrote:
I have several former deftypes that are a perfect fit for the new
defrecord, except that they need a specific comparison function.
This is usually for excluding some fields from equality testing, or
for requiring identity rather than equality f
36 matches
Mail list logo