Re: Is nil a compile-time literal?

2010-08-30 Thread Stuart Sierra
case does constant-time dispatch using the hash codes of the test values. Since nil is Java null, it doesn't have a hash code, so case can't handle it. I wouldn't call it a bug, but there is work to be done on extending case to edge cases like this. -S On Aug 30, 5:07 pm, Paul Mooser

Re: Question about testing (and *load-tests*)

2010-08-29 Thread Stuart Sierra
Hi Sean, As far as I know, that feature never saw much use. Most people like to keep their test and main sources separate, and build tools assume this. To bind *load-tests* during compilation, you would need to control your own build process. Basically, you would have to launch Clojure and

Re: 1.2 contrib shuffles

2010-08-27 Thread Stuart Sierra
With the 1.2.0 release, there was an effort to get the most useful parts of contrib -- IO and string handling, in particular -- into Clojure proper, with the goal of making contrib unnecessary for everyday programming. Hopefully, contrib can go back to being what it was meant to be: an

Re: 1.2 contrib shuffles

2010-08-27 Thread Stuart Sierra
On Aug 27, 3:42 pm, B Smith-Mannschott bsmith.o...@gmail.com wrote: This thread got me thinking that when a namespace is partially promoted to Clojure proper, it might be good to provide a reduced version of the old namespace, providing just the functionality that was not promoted as an

Re: Default values for fields of a defrecord?

2010-08-27 Thread Stuart Sierra
No, constructor functions are the correct way to accomplish this. -S On Aug 27, 5:16 pm, Darren Austin darren.aus...@gmail.com wrote: Hi folks, Is there a way to specify default values for the fields of a defrecord?  Or barring that, is there a way to override or augment the constructor for

Re: date serialization in clojure-contrib json

2010-08-25 Thread Stuart Sierra
Thanks, I'll give it a try. On Aug 25, 12:00 pm, Dmitri dmitri.sotni...@gmail.com wrote: I posted the complete file on github herehttp://gist.github.com/549771 -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Removed Clojure binaries from contrib 'complete' jar

2010-08-24 Thread Stuart Sierra
I've updated the clojure-contrib build to create the uberjar at modules/complete/target/complete-1.3.0-SNAPSHOT-bin.jar WITHOUT the Clojure .class build files included. This is a binary-only JAR right now. I will look into building a JAR that includes the clojure-contrib source files. -S

Re: date serialization in clojure-contrib json

2010-08-24 Thread Stuart Sierra
On Aug 23, 9:03 pm, Dmitri dmitri.sotni...@gmail.com wrote: Would there be an issue with adding something like that to the contrib? I don't want to add anything that impacts performance in the plain parsing case. -S -- You received this message because you are subscribed to the Google Groups

Re: clojure-contrib master now in submodules

2010-08-23 Thread Stuart Sierra
On Aug 23, 2:51 pm, Konrad Hinsen konrad.hin...@fastmail.net wrote: Or is there any simple way to make a jar containing only the source code files? Ys, the maven assembly plugin can do this. Ill work on it when I get back later this week. -S -- You received this message because you are

Re: date serialization in clojure-contrib json

2010-08-21 Thread Stuart Sierra
, Stuart Sierra the.stuart.sie...@gmail.com wrote: Since there is no standard for how to represent dates in JSON, it is unlikely to be built in.  But you can extend the writer with application-specific date formats. -S On Aug 20, 2:15 pm, Dmitri dmitri.sotni...@gmail.com wrote: I'm

clojure-contrib master now in submodules

2010-08-20 Thread Stuart Sierra
to the list, and we will try to answer them as soon as possible. Thanks, Stuart Sierra -- 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 posts from new members are moderated - please be patient

Re: date serialization in clojure-contrib json

2010-08-20 Thread Stuart Sierra
Since there is no standard for how to represent dates in JSON, it is unlikely to be built in. But you can extend the writer with application-specific date formats. -S On Aug 20, 2:15 pm, Dmitri dmitri.sotni...@gmail.com wrote: I'm currently using Dan Larkin's clojure-json, and it provides a

Re: Clojure 1.2 Release

2010-08-19 Thread Stuart Sierra
On Aug 19, 1:12 pm, Jeff Brown j...@jeffandbetsy.net wrote: When should 1.2.0 be available athttp://repo2.maven.org/maven2/org/clojure/clojure/? We don't have a direct sync to Maven central. They don't seem to be giving those out anymore. So someone with the authority will have to upload it

First Clojure Conj October 22-23

2010-08-19 Thread Stuart Sierra
In case you haven't heard, here's the official story: http://first.clojure-conj.org/ Clojure Conj 2010 will be held in Durham, North Carolina on October 22 and 23. We are currently collecting emails of people interested in attending. If you plan on attending, please submit your email at the

Re: RFC: updated c.c.logging with some breaking changes

2010-08-11 Thread Stuart Sierra
Hi, Please don't push to contrib master until after the final 1.2.0 release. We are in the process of splitting contrib into sub-modules (work-in-progress visible on the modules branch) to allow library authors more control over releases of individual libraries. -S On Aug 11, 12:52 am, ataggart

Re: maven compilation of a clojure project hangs due to still running thread pools

2010-08-08 Thread Stuart Sierra
Short answer: never execute code at the top-level of your source files. Only define functions. If you have a shared constant that only needs to be evaluated once, consider using delay/force. -S On Aug 7, 4:46 am, Christian Schuhegger christian.schuheg...@gmail.com wrote: Hi all, I just had

Re: Unexpected conj behavior

2010-06-14 Thread Stuart Sierra
On Jun 14, 11:06 am, Sean Devlin francoisdev...@gmail.com wrote: ;Bad user= (into {} (partition 2 [:a 1 :b 2 :c 3 :d 4])) This can, of course, be (into {} (map vec (partition 2 [:a 1 :b 2 :c 3 :d 4]))) I think the requirement is that the argument to APersistentMap.conj should implement

Re: promoting contrib.string to clojure, feedback requested

2010-05-26 Thread Stuart Sierra
On May 26, 12:42 pm, Sean Devlin francoisdev...@gmail.com wrote: I'd like to see a specific proposal for replace replace-first. Stuart Sierra put a lot of effort into getting those fns the way they are in contrib, and we should be careful to not undo any lessons learned in the process. Yes

Re: Question about namespaces

2010-05-09 Thread Stuart Sierra
http://www.google.com/url?sa=Dq=http://richhickey.github.com/clojure-contrib/ns-utils-api.html%23clojure.contrib.ns-utils/immigrate 'immigrate' is bad, it creates new Vars instead of new mappings to existing Vars, leading to very subtle and difficult-to-fix bugs. -S -- You received this

Re: Pack and unpack

2010-05-07 Thread Stuart Sierra
On May 7, 11:55 am, Michael Jaaka michael.ja...@googlemail.com wrote: I was searching for function which converts to and back all clojure structures like maps, vectors and sequences to serializable java objects. In Clojure 1.2 the core Clojure data structures will all be Serializable. You can

Re: Dumbest test Q you ever heard

2010-05-07 Thread Stuart Sierra
On May 6, 12:40 pm, Quzanti quza...@googlemail.com wrote: If you do anything outside an assertion you get an error saying you were outside an assertion. No, clojure.test permits any arbitrary code inside deftest. If you get an error saying Uncaught exception, not in assertion it means that

Re: Defining a namespace inside a let

2010-05-07 Thread Stuart Sierra
On May 2, 3:09 pm, alux alu...@googlemail.com wrote: Hm. Can you point me to some documentation about these special rules then? Some on http://clojure.org/namespaces But the best rule of thumb is: never use ns or in-ns anywhere except at the top of a source file. -S -- You received this

Re: Reading the manifest file

2010-05-03 Thread Stuart Sierra
On May 3, 11:16 am, Ralph grkunt...@gmail.com wrote: Yes, but I don't believe that it guarantees that you will get the manifest for the enclosing JAR file if you have more than one. I don't think that's possible in the general sense. Application containers like OSGI may provide this

Re: what is wrong with (use `clojure.contrib.string) ?

2010-04-30 Thread Stuart Sierra
On Apr 30, 1:43 am, David Nolen dnolen.li...@gmail.com wrote: My rule of thumb is: use + :only require + :as Yes. clojure.contrib.string deliberately has short function names, which means there is some overlap with clojure.core. Note: (use '[clojure.contrib.string :as st :only ()]) also

Re: Defining a namespace inside a let

2010-04-30 Thread Stuart Sierra
ns and in-ns have special evaluation rules. In general, they don't work as you'd expect in block expressions such as do or let. If you want to create namespaces programatically, use create-ns and intern. -SS On Apr 26, 6:25 pm, David McNeil mcneil.da...@gmail.com wrote: I am experimenting

Re: Remapping Class Imports

2010-04-12 Thread Stuart Sierra
On Mar 30, 11:38 am, aria42 ari...@gmail.com wrote: Hi,   Is it possible to remap the name of a class or package import? No. -- 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

Re: intuitive stack trace

2010-03-30 Thread Stuart Sierra
On Mar 29, 2:23 pm, strattonbrazil strattonbra...@gmail.com wrote: I do something wrong, I have to read through the stack which sometimes just says there's an error at line 0, which doesn't help me much. One problem is that the compiler can't keep track of line numbers in the REPL (or SLIME).

Re: unmapping all namespaces in repl

2010-03-30 Thread Stuart Sierra
On Mar 30, 4:36 am, Istvan Devai ist...@istvandevai.com wrote: How can I easily unmap all namespaces in a repl or swank? The following will give you a fresh user namespace: (in-ns 'clojure.core) (remove-ns 'user) (ns user) -SS -- You received this message because you are subscribed to the

Re: Getting started with open source Clojure projects

2010-03-30 Thread Stuart Sierra
Take a look at the dependency management tools. Most open-source Clojure projects use either Maven and Leiningen. Both use the same dependency model and provide similar capabilities for starting a REPL with the classpath configured automatically. -SS On Mar 29, 11:39 pm, Daniel

Re: clojure and clojure-contrib jars built with the 1.5 jdk

2010-03-23 Thread Stuart Sierra
On Mar 23, 9:08 am, Eric Thorsen eric.thor...@gmail.com wrote: Having the target=1.5 property set for the clojure-contrib build might get me where I need to be.  I just have not had a chance to try it yet. The clojure-contrib build does not call javac, so it shouldn't matter. -SS -- You

Re: clojure and clojure-contrib jars built with the 1.5 jdk

2010-03-23 Thread Stuart Sierra
On Mar 23, 9:08 am, Eric Thorsen eric.thor...@gmail.com wrote: The above returns the running jvm version.  I was looking at the jar manifest to see what it was built with which is where I saw the 1.6 reference for clojure-contrib. Oh, it's the JAR manifest that's the problem? Maybe this will

Re: clojure.contrib.json.write.print-json type coverage

2010-03-23 Thread Stuart Sierra
Current version of clojure.contrib.json on the github master branch uses protocols, and should have better type coverage. -SS On Mar 22, 2:24 pm, Jieren Chen jieren.c...@gmail.com wrote: Hey everyone I've come across a few situations where the print-json multi-method does not cover certain

Re: clojure and clojure-contrib jars built with the 1.5 jdk

2010-03-23 Thread Stuart Sierra
On Mar 23, 9:43 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: If the JAR manifest is the problem, the following pom.xml lines will change it: Yet another option is to supply a completely custom manifest file that omits the Build-Jdk line altogether. But I still think the correct

Re: clojure and clojure-contrib jars built with the 1.5 jdk

2010-03-22 Thread Stuart Sierra
By the way, Ant has the same problem: you can specify a target JDK version in the javac task, but not the java task. So the Clojure compiler runs with the default java executable on the local machine. -SS On Mar 22, 11:54 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Actually

Re: Maven clojure:repl

2010-03-21 Thread Stuart Sierra
On Mar 20, 7:56 am, alux alu...@googlemail.com wrote: mvn clojure:repl But that doesnt work. [ERROR] BUILD ERROR [INFO] [INFO] The plugin 'org.apache.maven.plugins:maven-clojure-plugin' does not exist Those

Re: Why I have chosen not to employ clojure

2010-03-21 Thread Stuart Sierra
I agree that the Clojure first-run experience is too rough. Both Scala and JRuby, for example, are complete packages that you can download, unzip, install, and run -- on any platform -- without knowing anything about Java. Clojure needs to provide the same experience, even if it only matters for

Re: Maven clojure:repl

2010-03-21 Thread Stuart Sierra
, yes, thats not in. I'm not enough into maven to know where the plugins have to be specified. I had the hope that maven searches its repository, when I call a specific goal of the form xxx:yyy - so this hope was in vain? Thank you for the comment. Regards, alux Stuart Sierra schrieb

Re: clojure.walk

2010-03-21 Thread Stuart Sierra
clojure.walk is a terrible hack that I wrote and abandoned 2 years ago. It never should have made it into the Clojure distribution, for which I apologize. I will campaign for its deletion just as soon as I find a suitable replacement. -SS -- You received this message because you are

Re: clojure and clojure-contrib jars built with the 1.5 jdk

2010-03-21 Thread Stuart Sierra
No, but you can change the configs and recompile. Clojure itself uses Ant, so ant on a machine with only Java 1.5 should do the trick. To install that custom JAR in your local Maven repository, download the Maven Ant Tasks JAR and run: ant -lib /path/to/maven-ant-tasks.jar ci-build Contrib uses

Re: Java method call irritation

2010-03-19 Thread Stuart Sierra
On Mar 18, 11:55 am, Per Vognsen per.vogn...@gmail.com wrote: Is there any reason why a .method occurrence in non-operator position doesn't just do the closure wrapping automagically? It's been discussed as a possibility; it may be added to Clojure in the future. -SS -- You received this

Re: Name suggestions

2010-03-19 Thread Stuart Sierra
On Mar 17, 3:08 am, mac markus.gustavs...@gmail.com wrote: After just a little more test and polish I plan on calling clj-native 1.0. But clj-native is a *really* boring name so I want to change it before 1.0 and I don't have very good imagination when it comes to these things. Personally, I

Re: Clojure Implementation issues that may affect performance?

2010-03-09 Thread Stuart Sierra
On Mar 9, 8:59 am, jshore jonathan.sh...@gmail.com wrote: I suspect that on recursion a will become an object again and will then need to be downcasted again as well.   Would be nice to be able to do: (defn fib [#^int v]         (if ( v 2)                 v                 (+ (fib (- v 1))

Re: Clojure for financial applications

2010-03-08 Thread Stuart Sierra
On Mar 8, 9:29 am, Stuart Halloway stuart.hallo...@gmail.com wrote: (1) You still have namespaces in Clojure, which correspond 1-1 with   Java packages. More or less. The namespace foo.bar.baz is actually a Class named baz in the package foo.bar. -SS -- You received this message because you

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-05 Thread Stuart Sierra
On Mar 4, 1:59 pm, David Nolen dnolen.li...@gmail.com wrote: If Lein evolves to to handle dependencies of dependencies and intelligently generates the classpath based on these dependencies (instead of copying files around) what advantage does Maven really have? Maven supports a wide range of

Re: Leiningen, Clojure and libraries: what am I missing?

2010-03-04 Thread Stuart Sierra
On Mar 4, 8:52 am, Stuart Halloway stuart.hallo...@gmail.com wrote: My 2c: Leiningen is an important step, but there is still plenty to do. Oh yeah. Some needs I see: (0) More point releases of key libs (or some other solution to the   snapshots problem) Yes! (1) Unify around the project

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Stuart Sierra
deftype just defines a map-like structure with fixed fields; it isn't going to change the way you deal with that structure in an Agent. -SS On Mar 3, 5:02 am, zahardzhan zahardz...@gmail.com wrote: Sorry my english I use in my small clojure program one complicated mutually-recursive data

Re: recursive call boxing primitives?

2010-03-04 Thread Stuart Sierra
On Mar 1, 5:33 pm, John Lawrence Aspden aspd...@googlemail.com wrote: Is the reason the Clojure version is slow that recursive calls to draw- tree are boxing and unboxing primitive types? Recursive calls, like all Clojure function calls, force boxing. This may or may not have anything to do

Re: bug: clojure.contrib.json should not default to use keywords.

2010-02-28 Thread Stuart Sierra
Mark, Thank you! I argued for this for months, but everyone kept insisting on keywords by default. Now you just have to convince the other 2 people who actually use clojure.contrib.json. -SS On Feb 27, 3:55 pm, MarkSwanson mark.swanson...@gmail.com wrote: Hello, Consider the following

Re: can the :test metadata be used to constrain the range of a variable?

2010-02-19 Thread Stuart Sierra
On Feb 17, 6:26 am, Timothy Pratley timothyprat...@gmail.com wrote: :test can be used to store a unit test (typically for a function) but you should use clojure.test for writing unit tests, just ignore :test clojure.test uses :test metadata, so it is somewhat compatible. -SS -- You received

Re: ClojureCLR under slime / emacs?

2010-02-14 Thread Stuart Sierra
On Feb 14, 10:43 am, Shawn Hoover shawn.hoo...@gmail.com wrote: The real work would be in the swank-clojure clj sources. Yes, you would basically have to rewrite swank-clojure, as it depends heavily on the JDK socket libraries. -SS -- You received this message because you are subscribed to the

Re: deftype comment

2010-02-14 Thread Stuart Sierra
On Feb 14, 1:53 am, Mark Engelberg mark.engelb...@gmail.com wrote: I think it would be ideal that if you *don't* specify clojure.lang.IPersistentMap as an interface, you still get an implementation of assoc that works only with keys already in the type. ... Thoughts? Rich's stated reason

Re: processing two collections

2010-02-14 Thread Stuart Sierra
On Feb 14, 9:57 am, Glen Rubin rubing...@gmail.com wrote: How do I take an element from one collection and test for no remainder (e.g. (zero? (mod x y)), when dividing by every element of the second collection, before processing the next item in the first collection? The 'for' macro does

Re: A couple of namespace questions

2010-02-14 Thread Stuart Sierra
On Feb 14, 2:09 am, Mike Meyer mwm-keyword-googlegroups. 620...@mired.org wrote: Second, is there a way to refer to a relative namespace? Not as such, but the 'load' function uses the parent directory of the current namespace: (ns foo.bar.baz (:load quux)) ;; = loads foo/bar/baz.clj and

More contrib renaming: c.c.java is gone

2010-02-11 Thread Stuart Sierra
As part of our clojure-contrib clean-up effort: * c.c.java is gone * as-str moved to c.c.string * as-file and as-url moved to c.c.io * properties stuff moved to c.c.properties * wall-hack stuff move to c.c.reflect These changes have been committed to the master branch on Github. -SS -- You

Re: Problems using clojure.contrib.string

2010-02-10 Thread Stuart Sierra
Hi Matt, Just pushed a fix, see if that helps. Note that argument order was reversed in most functions from c.c.str- utils2 to c.c.string. -SS On Feb 10, 10:44 am, Matt Culbreth mattculbr...@gmail.com wrote: Hello Group, I'm working on a Clojure project and I'm using Leiningen for the

Re: Problems using clojure.contrib.string

2010-02-10 Thread Stuart Sierra
yes On Feb 10, 1:25 pm, Matt Culbreth mattculbr...@gmail.com wrote: Yes that worked very well, thanks Stuart.  I'm assuming that this fix will make its way to the nightly build and will be published tohttp://build.clojure.org/job/clojure-contrib/as usual? On Feb 10, 12:32 pm, Stuart Sierra

Re: how to determine what implements a protocol?

2010-02-10 Thread Stuart Sierra
No need to slap your forehead, but here it is: - clojure.core/extends? ([protocol atype]) Returns true if atype explicitly extends protocol -SS On Feb 10, 4:03 pm, Raoul Duke rao...@gmail.com wrote: hi, is there a query to tell me if a datatype implements a

Re: Trait-like behavior with Protocols

2010-02-08 Thread Stuart Sierra
On Feb 8, 6:13 pm, aria42 ari...@gmail.com wrote: (defprotocol Span   (start [self])   (stop [self])   (span-length [self])) Now I know I can just make span-length a function on Span as opposed to part of the protocol. Is that what one should do? Yes. -SS -- You received this message

Re: clojure pathnames library

2010-02-08 Thread Stuart Sierra
Look at clojure-contrib. In the 1.1 release, use duck-streams and java-utils. In the latest github sources, it's all in clojure.contrib.io. -SS On Feb 8, 5:43 pm, Vadim Shender vadim.shen...@gmail.com wrote: Hi. Is there any clojure third-party library functionally similar to python's

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-06 Thread Stuart Sierra
On Feb 5, 1:47 pm, Peter Schuller peter.schul...@infidyne.com wrote: One problem is that there needs to be a convention for a clojure binary that works consistently across platforms. My extremely biased opinion: Clojure is not a scripting language. The binary is java. System-wide classpaths

Re: Coljure-contrib maven build fail

2010-02-04 Thread Stuart Sierra
This has been reported before. It's a bug that shows up on Windows. Please make an Assembla ticket. In the mean time, build with -Dmaven.test.skip=true to ignore the failure. -SS On Feb 3, 5:49 pm, Base basselh...@gmail.com wrote: Hi Pulling off of GIT I got the following 4 errors in the

Re: Clojure for system administration

2010-02-04 Thread Stuart Sierra
Clojure can certainly do these things; clojure-contrib contains many file and io-related utilities. But remember that Clojure, like any Java program, takes more time to start up than scripting languages like Perl/Bash/Ruby/Python, so it may be less suitable for programs that you intend to run at

Re: Closures and environments

2010-02-04 Thread Stuart Sierra
Hi, The functionality of closures in Clojure is more or less the same as Scheme. But the implementation may be quite different. I seem to recall that some Schemes treat lexical environments as first-class objects. Clojure does not (at present). Here's what happens in Clojure: When you write

Re: require macro/function [was clojure.contrib.[duck-streams io]]

2010-02-03 Thread Stuart Sierra
On Feb 2, 8:40 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: SS: is require* an acceptable name for the function version? I don't care what it's called so long as there's a function there. While we're at it, I want import* back as a function. -SS -- You received this message because

Re: building clojure-contrib without downloading clojure.jar from elsewhere

2010-02-03 Thread Stuart Sierra
On Feb 3, 2:03 am, Ramakrishnan Muthukrishnan vu3...@gmail.com wrote: I hope this will be added back into the repo soon. It's in now. -SS -- 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

Re: building clojure-contrib without downloading clojure.jar from elsewhere

2010-02-03 Thread Stuart Sierra
On Feb 3, 1:20 pm, Ramakrishnan Muthukrishnan vu3...@gmail.com wrote: I uploaded clojure-contrib 1.1 debian package into the debian repos. I hope that's the 1.1 release, not the current github master. -SS -- You received this message because you are subscribed to the Google Groups Clojure

Re: clojure.contrib.[duck-streams io]

2010-02-02 Thread Stuart Sierra
On Feb 2, 2:46 am, ataggart alex.tagg...@gmail.com wrote: On a related note, it is my sincere hope that we get a version of require and use which no longer require (ha!) the use of quoted parens. Absolutely not! Having 'require' as an ordinary function (not a macro) is important for

Re: building clojure-contrib without downloading clojure.jar from elsewhere

2010-02-02 Thread Stuart Sierra
Try adding the -o (for offline) option to the Maven command line. -SS On Feb 2, 6:20 am, Ramakrishnan Muthukrishnan vu3...@gmail.com wrote: Hi, I am trying to package clojure-contrib for Debian and one of the debian java packaging practices is that the build should not download any external

Re: clojure.contrib.[duck-streams io]

2010-02-02 Thread Stuart Sierra
On Feb 1, 9:23 pm, OGINO Masanori masanori.og...@gmail.com wrote: Can I write a code on both 1.1 and master using duck-streams/io? For now, yes, as ataggart showed. But I expect names in contrib will be in flux for the next few weeks, so you should probably pick a release and stick with it.

Re: Alternate Javadocs?

2010-02-02 Thread Stuart Sierra
On Feb 2, 11:42 am, Sean Devlin francoisdev...@gmail.com wrote: Does someone know of an alternate place to find Javadocs? You can (or could) download all the JDK docs as a ZIP. And lots of places, like university CS departments, mirror the JDK docs. There are several meta-javadoc search

Re: building clojure-contrib without downloading clojure.jar from elsewhere

2010-02-02 Thread Stuart Sierra
On Feb 2, 2:42 pm, Rob Wolfe r...@smsnet.pl wrote: In order to use command like this: mvn -Denv=local -Dclojure.jar=/path/to/clojure.jar package there are needed two things: 1. maven profile, which will be activated by -Denv=local 2. dependency defined with system scope and systemPath

Re: clojure.contrib compile fail

2010-02-01 Thread Stuart Sierra
On Feb 1, 10:53 am, Jeff Schwab j...@schwabcenter.com wrote: Thanks.  I see that you made an end-run around Maven.  I didn't know you could use gen-class that way. It's more an end-run around gen-class than around Maven. gen-class is an ordinary macro; it can be used anywhere, not just in ns

Contrib library renames

2010-02-01 Thread Stuart Sierra
As the first stage in a much-needed code cleanup, the following changes are now on the master branch of clojure-contrib: * Rename c.c.str-utils3 = c.c.string * Rename c.c.duck-streams = c.c.io * Rename c.c.java-utils = c.c.java * Rename c.c.seq-utils = c.c.seq * Rename c.c.shell-out = c.c.shell

Re: clojure.contrib compile fail

2010-01-31 Thread Stuart Sierra
This has been fixed now. -SS On Jan 30, 9:07 am, Jeff Schwab j...@schwabcenter.com wrote: Hi: What is the right place to report a clojure-contrib compile failure, or to look for information? The clojure-contrib I just pulled from github fails to compile, with an error that the ColumnWriter

Re: help with serializing/deserializing structs

2010-01-26 Thread Stuart Sierra
On Jan 26, 11:40 am, jleehurt jleeh...@gmail.com wrote: Thanks Anders. I'm not sure why, but it appears that read does not support structmaps. That is correct, read does not work with structmaps, because it doesn't know how to resolve the struct definition while reading. deftype, the

Final releases for clojure-contrib 1.0.0 and 1.1.0

2010-01-25 Thread Stuart Sierra
Hello all, We are finally ready to release clojure-contrib 1.0.0 and 1.1.0! Major/minor version numbers of contrib match major/minor version numbers of Clojure. So if you're using Clojure 1.0, use contrib 1.0.0; if you're using Clojure 1.1, use contrib 1.1.0. Get pre-built ZIP distributions

Re: Clojure for largish web application?

2010-01-23 Thread Stuart Sierra
I successfully used Clojure, Restlet, StringTemplate, and the Simple servlet framework to handle all traffic on www.altlaw.org. My scaling requirements were a tad unusual -- only ~10,000 visitors per day, but over a million pages. This was all on a single EC2 small instance, also running Solr.

Re: Dependency management

2010-01-23 Thread Stuart Sierra
On Jan 22, 11:58 pm, Richard Newman holyg...@gmail.com wrote: I foresee a future with a lot more time spent modifying other people's   project files. This is the past, the present, and the forever-after of open-source software development. If you need lots of libraries, you need your own Maven

Re: Dependency management

2010-01-22 Thread Stuart Sierra
On Jan 21, 8:21 pm, Richard Newman holyg...@gmail.com wrote: Apparently everyone is jumping on the Leiningen bandwagon and deleting   their build.xml files. I guess that means I'm moving, too. Deleting build.xml files is good. After that, you've got several options, including Leiningen and

Re: Question about Responsiveness of Garbage Collection

2010-01-21 Thread Stuart Sierra
On Jan 21, 3:20 am, Joonas Pulakka joonas.pula...@gmail.com wrote: In general, accusing garbage collection of being culprit for sluggish GUI performance is plain wrong. Swing GUIs can be quite snappy when done right - but surely there are lots of not-so-right done apps out there. From my

Re: deftype implementing methods with multiple argument lists

2010-01-19 Thread Stuart Sierra
You can include multiple definitions of the same method, with different arguments, in a deftype. (deftype Foo [f] (bar [x] ...) (bar [x y] ...)) Don't know if that's intended, but it works. -SS On Jan 19, 3:50 pm, Konrad Hinsen konrad.hin...@fastmail.net wrote: Protocols permit the

Re: clojure-contrib 1.1.0 Release Candidate 2

2010-01-11 Thread Stuart Sierra
On Jan 11, 4:33 am, Mark Derricutt m...@talios.com wrote: Stuart - are these RC builds available in any maven repository at all? Tim Dysinger and I are working on setting up a release repository for Clojure contrib, sync'd to central. -SS -- You received this message because you are

Re: First meeting of the NYC Clojure Users Group is scheduled

2010-01-08 Thread Stuart Sierra
Also, everyone is welcome to join LispNYC on Tuesday, January 12 and celebrate release 1.1 of Clojure! -SS Join us Tuesday, January 12th from 7:00 to 9:00 at PG's for the first social of the year! Directions: Near the 1 stop at 79th and B,C stop at 81st. Head to the northwest corner of

Re: Recommended JVM flags for Clojure

2010-01-07 Thread Stuart Sierra
I use -XX:+UseConcMarkSweepGC. And don't forget -Xmx, just having a bigger heap can solve some problems. Some people have found it necessary to increase the PermGen size, but usually only for programs that generate a lot of functions dynamically. -SS On Jan 7, 4:20 am, Gabi

clojure-contrib 1.1.0 Release Candidate 2

2010-01-07 Thread Stuart Sierra
We have a second Release Candidate for clojure-contrib version 1.1. This avoids ticket #42, AOT compilation of clojure-contrib.jar pre-sets logging implementation, by not AOT-compiling logging.clj. -SS -- You received this message because you are subscribed to the Google Groups Clojure group.

Release Candidates for clojure-contrib 1.0 and 1.1

2010-01-05 Thread Stuart Sierra
As announced yesterday on the dev list, I have created two release candidates for clojure-contrib. The idea is to get numbered contrib releases that match Clojure version numbers. So contrib 1.0 will work with Clojure 1.0 and contrib 1.1 will work with Clojure 1.1. This does NOT say anything

Re: Proposal: clojure.io

2010-01-01 Thread Stuart Sierra
On Dec 31 2009, 9:58 pm, Phil Hagelberg p...@hagelb.org wrote: I wonder if it would be a good idea to include a clojure.io namespace in Clojure itself. I've mentioned the idea a few times on IRC, and people seemed to be very much in favour. I've considered this too, but I know Rich Hickey has

import as a macro; dynamic imports?

2010-01-01 Thread Stuart Sierra
I should have brought this up before 1.1 was released, but I'm bothered by the change of clojure.core/import from a function to a macro. If I'm creating a namespace dynamically, I can't evaluate the name of the class I want to pass to import. The only way is to use undocumented Java functions,

Re: Parenthesis Inference

2009-12-19 Thread Stuart Sierra
On Dec 18, 9:28 pm, Sean Devlin francoisdev...@gmail.com wrote: It is proudly a Lisp for people that want to get things done.  Any Java/.NET/Python/Brainfuck/Ruby/Basic/C/C++ (No Perlmongers :)) I was a Perlmonger back in the day. :) -SS -- You received this message because you are

Re: 1.1 changes.txt typo

2009-12-19 Thread Stuart Sierra
On Dec 18, 9:03 am, David Thomas Hume dth...@gmail.com wrote: From the 1.1 release notes: Futures represent asynchronous computations. They are away to get code to run in another thread, and obtain the result. That's been fixed now in the 1.1.x branch; thanks for the report. -SS -- You

Re: mapmap

2009-12-17 Thread Stuart Sierra
On Dec 17, 9:37 am, C. Florian Ebeling florian.ebel...@gmail.com wrote: (defn mapmap   Map values of map m using function f.   [f m]   (reduce (fn [m [k v]]             (assoc m k (f v))) {} m)) But there is probably a more straightforward way. What do you use? I do that exactly, but I

Re: How to efficiently compare related persistent collections (maps, sets)?

2009-12-16 Thread Stuart Sierra
In general, straight equality is efficient for Clojure data structures. For example, the equals() implementation for sets checks type, size, and hash code before examining the set elements. Determining that two sets are equal is still O(n), but determining that they are NOT equal is usually O(1).

Re: book

2009-12-04 Thread Stuart Sierra
At the least, there will be a document describing the changes from 1.0 to 1.1. -SS On Dec 4, 9:27 am, .Bill Smith william.m.sm...@gmail.com wrote: I haven't been tracking all the changes in Clojure since the 1.0 release.  Will there be a 1.1 version of the Clojure book?  It's one thing to read

Clojure User Survey, preparation for 1.1

2009-11-23 Thread the . stuart . sierra
If you have trouble viewing or submitting this form, you can fill it out online: http://spreadsheets.google.com/viewform?formkey=dFJSd1p4YXh0d0VxV0xjdk42MTU5RkE6MA Clojure User Survey This user survey will help move Clojure toward an official 1.1 release. How do you get Clojure? *

Re: leiningen - a Clojure build tool

2009-11-18 Thread Stuart Sierra
On Nov 18, 9:00 am, Sean Devlin francoisdev...@gmail.com wrote: (binding [*set-hair-on-fire* true]   ;do-stuff) I like this just for the Var name. -SS -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure Web Libraries

2009-11-17 Thread Stuart Sierra
On Nov 16, 8:03 pm, ngocdaothanh ngocdaoth...@gmail.com wrote: Could someone provide an example about using Clojure with Restlet? I found:http://github.com/stuartsierra/altlaw-clojure-restlet but don't understand how the code works as a web application. It doesn't. That's just a few helper

Re: Datatypes and Protocols - early experience program

2009-11-17 Thread Stuart Sierra
On Nov 16, 11:57 am, Jonas Enlund jonas.enl...@gmail.com wrote: I made count return the number of rows because that way (count a-matrix) == (count (seq a-matrix)). I don't know if it's the right thing to do, maybe rows*cols would make more sense. Good point. I don't know which is better. -SS

Re: Datatypes and Protocols - early experience program

2009-11-16 Thread Stuart Sierra
On Nov 14, 8:28 am, Jonas Enlund jonas.enl...@gmail.com wrote: I have built a simple Matrix datatype with defprotocol and deftype. You can take a look at it athttp://gist.github.com/234535 (constructive criticism welcome!). Small thing: I would expect (count a-matrix) to return rows*columns,

Re: Clojure Web Libraries

2009-11-14 Thread Stuart Sierra
elaborate on Restlet? After some short investigation I think it uses annotation but Clojure does not support it, so Clojure is not Restlet-ready. Thanks On Jan 23, 1:44 am, Stuart Sierra the.stuart.sie...@gmail.com wrote: Hi Frank, I'd also recommend looking atRestlethttp://www.restlet.org

Re: Datatypes and Protocols - early experience program

2009-11-13 Thread Stuart Sierra
On Nov 12, 7:10 am, Rich Hickey richhic...@gmail.com wrote: An early version of the code for a few important new language features, datatypes[1] and protocols[2] Very simple example here: http://paste.lisp.org/display/90329 This shows how to do arithmetic with complex numbers using deftype and

<    3   4   5   6   7   8   9   10   11   12   >