Re: Compilation with Java class files

2009-10-15 Thread Christophe Grand
Hi, On Wed, Oct 14, 2009 at 8:50 PM, Manuel Woelker wrote: > > Hi all, > > after digging around a bit in the clojure code, trying to get the > compile to work, I found out that classes used by the compiled code > actually classloaded by the compiler. > > I can totally get behind the idea that cod

Re: Clojure's 2nd Birthday!

2009-10-15 Thread Mark Engelberg
Uh oh, time for the "terrible twos". Who wants to throw the first tantrum? :) --~--~-~--~~~---~--~~ 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 p

Clojure's 2nd Birthday!

2009-10-15 Thread Baishampayan Ghose
Hello, Exactly a year ago Rich posted this message on the list about "Clojure's first year" -- a year before that he had released Clojure. http://groups.google.com/group/clojure/msg/16fec21eb1fff8aa That makes today the second birthday of Clojure. Congratulations to Rich and the community. Cloj

ANN: Cupboard, an embedded database library for Clojure

2009-10-15 Thread Constantine Vetoshev
I would like to announce the release of Cupboard, an embedded database library for Clojure. In a nutshell, it allows saving arbitrary struct maps to a database. It supports indices on struct keys, ACID transactions, and retrieval using non-trivial queries. For more details and sample code, please

Re: prn/read and infinities

2009-10-15 Thread Timothy Pratley
Hi Brian, On Oct 16, 5:18 am, Brian Hurt wrote: > with double precision infinities and NaNs. pr just calls .toString on > doubles, which for infinities and nans returns the string "Infinity" or > "NaN": > The problem is, when you try to read these values back in, they're > interpreted as symbols

Project Euler: Problem suggestions that show off clojure?

2009-10-15 Thread Stan Dyck
I recently discovered Project Euler (http://projecteuler.net/) and have decided to take on some of the problems there to improve my clojure skills. I see from searching around that I'm not the first to have this idea so I thought I'd ask if anyone on this list who has done this can suggest pro

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-15 Thread Mark Derricutt
The maven release plugin does pretty much that, only it doesn't do any ivy stuff. However, it also checks: * No uncommitted files * No files in working copy that are not under VCS * Automatically tags (and optionally branches) the code at time of release * Automatically incremements your

Re: clojure-mode patch for docstrings

2009-10-15 Thread Jeff Valk
On Thursday 15 October 2009 at 11:54 am, Phil Hagelberg wrote: > If you base it on the "maven" branch from my github repo, you should be > good. good stuff. thanks. > I've started a separate mailing list for swank-clojure, why don't > you join at http://groups.google.com/group/swank-clojure ?

Re: Compilation with Java class files

2009-10-15 Thread Laurent PETIT
Please note that in this discussion, I'm not trying to advocate pro/con things, but rather just trying to help you (and me in the process!) see/define the problems you think you see, etc. So more below ... 2009/10/15 Manuel Woelker > > On Thu, Oct 15, 2009 at 9:16 PM, Laurent PETIT > wrot

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Laurent PETIT
2009/10/15 Manuel Woelker > > On Thu, Oct 15, 2009 at 9:43 PM, Laurent PETIT > wrote: > > 2009/10/15 Manuel Woelker > >> > >> On Thu, Oct 15, 2009 at 5:48 AM, jng27 wrote: > >> > > >> > The following seems like it could be a common scenario when attempting > >> > to re-write parts of an existi

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Manuel Woelker
On Thu, Oct 15, 2009 at 9:43 PM, Laurent PETIT wrote: > 2009/10/15 Manuel Woelker >> >> On Thu, Oct 15, 2009 at 5:48 AM, jng27 wrote: >> > >> > The following seems like it could be a common scenario when attempting >> > to re-write parts of an existing Java application in Clojure. >> > >> > Let

Re: Compilation with Java class files

2009-10-15 Thread Manuel Woelker
On Thu, Oct 15, 2009 at 9:16 PM, Laurent PETIT wrote: > 2009/10/15 Manuel Woelker >> >> > How about the compiler just loads classes in a SecurityManager context >> > that >> > won't allow some naughtiness like System.exit()? Then you'd get a >> > CompilerException caused by ExceptionInInitialize

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Laurent PETIT
2009/10/15 Manuel Woelker > > On Thu, Oct 15, 2009 at 5:48 AM, jng27 wrote: > > > > The following seems like it could be a common scenario when attempting > > to re-write parts of an existing Java application in Clojure. > > > > Let's say there exists Clojure code and Java code in the same > > '

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Manuel Woelker
On Thu, Oct 15, 2009 at 5:48 AM, jng27 wrote: > > The following seems like it could be a common scenario when attempting > to re-write parts of an existing Java application in Clojure. > > Let's say there exists Clojure code and Java code in the same > 'project'. > The Clojure code depends on the

Re: Compilation with Java class files

2009-10-15 Thread Laurent PETIT
2009/10/15 Manuel Woelker > > > How about the compiler just loads classes in a SecurityManager context > that > > won't allow some naughtiness like System.exit()? Then you'd get a > > CompilerException caused by ExceptionInInitializerError caused by > > SecurityException rather than have your REP

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Laurent PETIT
2009/10/15 Stuart Sierra > > On Oct 15, 7:56 am, Laurent PETIT wrote: > > if the clojure classes depend on the java classes in the implementation > and > > not in their interfaces ( extends, implements, methods signatures ), then > > you can write your gen-class with a separate namespace for the

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Stuart Sierra
On Oct 15, 7:56 am, Laurent PETIT wrote: > if the clojure classes depend on the java classes in the implementation and > not in their interfaces ( extends, implements, methods signatures ), then > you can write your gen-class with a separate namespace for the > implementation of the class ( using

prn/read and infinities

2009-10-15 Thread Brian Hurt
So, I've hit a problem and I'm hoping for some help on how to solve it. The problem is that prn and read are not perfect duals- that is, not everything that prn produces can be read in by read. The specific case I'm hitting is with double precision infinities and NaNs. pr just calls .toString on

Re: Compilation with Java class files

2009-10-15 Thread Manuel Woelker
> How about the compiler just loads classes in a SecurityManager context that > won't allow some naughtiness like System.exit()? Then you'd get a > CompilerException caused by ExceptionInInitializerError caused by > SecurityException rather than have your REPL, IDE, or whatever blow up from > code

Re: clojure-mode patch for docstrings

2009-10-15 Thread Phil Hagelberg
Jeff Valk writes: >> Do you have any specific ideas for new features? > > Well one thing I started playing with is completion on the entire classpath > in swank-clojure. So for example, typing "clojure.contrib.a" would bring up: > clojure.contrib.accumulators > clojure.contrib.agent-utils >

Re: locking semantics: queue for the monitor?

2009-10-15 Thread Christian Vest Hansen
I think it uses intrinsic locks, which are always non-fair. You can instantiate fair locks (what you are asking for) with the implementations in this package: http://java.sun.com/javase/6/docs/api/java/util/concurrent/locks/package-summary.html But that requires you use lock.lock() and lock.unloc

locking semantics: queue for the monitor?

2009-10-15 Thread Garth Sheldon-Coulson
Hi All, If multiple threads are competing for the monitor of an object using (locking obj ... ), is it a strict queue for the monitor (first in, first lock) similar to send and send-off? Or are there other considerations? I would probably know this if I knew more about Java sync, but quick web/gr

Re: clojureshell-maven-plugin - easier clojure startup with maven

2009-10-15 Thread Fredrik Appelberg
It should be noted that clojure-maven-plugin now also includes the clojure:swank and clojure:repl goals, and can do pretty much everything that clojureshell can. So I urge people to check out clojure-maven-plugin, it's really cool. Cheers, -- Fredrik On Thu, Oct 15, 2009 at 4:56 AM, ngocdaothanh

Re: Clojure Applets: Tutorial

2009-10-15 Thread indy
The applet seems to work fine on my PowerPC Mac (10.4.11) with Java 1.5.0_19 On Oct 15, 12:50 pm, Andreas Wenger wrote: > Hi Jon, > > "Applet net.n01se.Tree" ist just an example I found on the web. My new > demo code can be found > here:http://www.xenoage.com/extern/clojurebook/applet2/cljapp.h

Re: Circular dependencies (Clojure and Java)

2009-10-15 Thread Laurent PETIT
Hello, One solution I've applied in the past: if the clojure classes depend on the java classes in the implementation and not in their interfaces ( extends, implements, methods signatures ), then you can write your gen-class with a separate namespace for the implementation of the class ( using :i

Re: Clojure Applets: Tutorial

2009-10-15 Thread Andreas Wenger
Hi Jon, "Applet net.n01se.Tree" ist just an example I found on the web. My new demo code can be found here: http://www.xenoage.com/extern/clojurebook/applet2/cljapp.html But as already said, Java 5 doesn't like it (see error message two posts above) and tells me that the bytecode generated by the

Re: Problem with .NET interop

2009-10-15 Thread Dmitry Kakurin
Thank you David, I'm impressed by your dedication to this project! - Dmitry On Oct 13, 10:58 pm, David Miller wrote: > Fixed in latest commit.  (commit 7dd9fcb, which is taking quite some > time to appear on github, so make sure you see this one in the commit > history) > > -David > > On Oct 13

Circular dependencies (Clojure and Java)

2009-10-15 Thread jng27
The following seems like it could be a common scenario when attempting to re-write parts of an existing Java application in Clojure. Let's say there exists Clojure code and Java code in the same 'project'. The Clojure code depends on the Java code in one direction and then the same is true in the

Re: clojure-mode patch for docstrings

2009-10-15 Thread Jeff Valk
On Wednesday 14 October 2009 at 07:11 pm, Phil Hagelberg wrote: > Currently with swank there are some changes on his branch that I haven't > been able to get working properly, so maybe for functionality there it > would be best if you wait till I have a chance to merge them, sorry. Good tip. Tha

Re: Clojure Applets: Tutorial

2009-10-15 Thread Jon
Hi, I get "Applet net.n01se.Tree notinited" in the status bar on my Mac. Did you compile for Java 5? /Jon On Oct 15, 11:36 am, Andreas Wenger wrote: > Fantastic news: > > - Clojure applets do not have to be signed, when reflection can be > avoided (by type hints and so on) > - Java code is ind

Re: Clojure Applets: Tutorial

2009-10-15 Thread Andreas Wenger
However, compatibility with Java 5 is lost again. Java 5 plugin shows the following error message when loading the applet (even when Clojure compiler was started with Java 5, but I guess, this does not matter anyway): Java Plug-in 1.5.0_19 Verwendung der JRE-Version 1.5.0_19 Java HotSpot(TM) Clie

Re: Clojure Applets: Tutorial

2009-10-15 Thread Andreas Wenger
Fantastic news: - Clojure applets do not have to be signed, when reflection can be avoided (by type hints and so on) - Java code is indeed not needed (thanks @ rob) I've updated the tutorial accordingly. Here is another Clojure applet which works without Java code and without signing: http://cho