Results from the State of Clojure, Summer 2010 Survey

2010-06-08 Thread Chas Emerick
Last week, many of you were kind enough to participate in a survey I linked to here and elsewhere, that I awkwardly titled "The State of Clojure, Summer 2010". I've written up a summary of the results, and linked to the raw survey result data: http://bit.ly/dtdAwb There's a lot of intere

Re: The State of Clojure, Summer 2010

2010-06-04 Thread Chas Emerick
feel free to pass along the link above, etc. Have a good weekend, - Chas On Jun 2, 2010, at 1:48 PM, Chas Emerick wrote: "I have now been using Clojure as my primary programming language for almost exactly two years. Clojure 1.2 is nearing release. The Clojure community is larger than i

The State of Clojure, Summer 2010

2010-06-02 Thread Chas Emerick
"I have now been using Clojure as my primary programming language for almost exactly two years. Clojure 1.2 is nearing release. The Clojure community is larger than it ever has been, and shows no sign of slackening its growth. It seems like now would be a good time to take stock of where the

Re: last-var-wins: a simple way to ease upgrade pain

2010-05-05 Thread Chas Emerick
On May 5, 3:47 pm, Meikel Brandmeyer wrote: > Hi, > > On Wed, May 05, 2010 at 08:24:39AM -0700, Chas Emerick wrote: > > variety of birds with one stone, and maybe slightly simplify the > > mental model that one needs to have in place to understand namespaces. > > The

Re: last-var-wins: a simple way to ease upgrade pain

2010-05-05 Thread Chas Emerick
We've been able to treat ns declarations *as* declarations for the most part, which is nice. IMO, last-var-wins pulls the veil away even more on the fact that namespaces are probably the most pervasively- stateful part of clojure. I remember various proposals floating around a long time ago to lo

Re: AOT Compilation Class Hierarchy

2010-04-02 Thread Chas Emerick
Compilation is driven by namespace load-order, so just ensure that you add a (:require com.foo.IFoo) to the ns declaration where you define the Foo class. I seem to remember suggesting that Clojure should implicitly attempt to require namespaces corresponding to classnames being implemented

Re: Set performance

2010-04-02 Thread Chas Emerick
As Clojure moves towards being self-hosted, fewer and fewer of the data structures will be implemented in Java, thereby ensuring dependence on the Clojure runtime. Just FYI. - Chas On Mar 31, 2010, at 12:56 PM, Krukow wrote: It would be nice to have a version of the clojure data structure

Re: Getting started embedding Clojure into an existing codebase

2010-04-02 Thread Chas Emerick
Assuming your environment is set up properly w.r.t. classpaths, spring should work just fine in a REPL. We use spring security for our compojure webapp, and the spring context starts up as expected in our enclojure REPLs. FWIW, we do use maven and the clojure-maven-plugin, which informs N

Re: another concurrency question: could there be contention for allocation (consing etc.)?

2010-03-27 Thread Chas Emerick
If you're not using a parallel garbage collector (which is the case by default), then generating significant garbage will result in not- insignificant GC pauses. Allocation itself isn't a synchronous operation, but the default GC is. Most java profilers have thread-related tools that allow

Re: Choosing a Clojure build tool

2010-03-26 Thread Chas Emerick
use whatever it is they use in .NET-land for building, configuring, and deploying projects and applications, for all the same reasons. Cheers, - Chas On Mar 26, 2010, at 11:13 AM, Rick Moynihan wrote: On 25 March 2010 22:17, Brian Carper wrote: On Mar 25, 11:55 am, Chas Emerick wrote: W

Re: Choosing a Clojure build tool

2010-03-26 Thread Chas Emerick
On Mar 26, 2010, at 10:18 AM, David Nolen wrote: Now, it *would* be nice, when it's really called for, to be able to create a maven plugin using clojure. The API is just a pile of interfaces, so it's fundamentally the same as implementing any other Java API. As for having to package it -

Re: concurrency and rand-int

2010-03-26 Thread Chas Emerick
the right way to do it? Thanks, -Lee On Mar 26, 2010, at 3:30 AM, mac wrote: There is a fast Java version of Mersenne Twister here, if you feel like compiling a java file: http://cs.gmu.edu/~sean/research/ On 26 mar, 05:43, Chas Emerick wrote: I was going to suggest something simila

Re: Choosing a Clojure build tool

2010-03-26 Thread Chas Emerick
On Mar 26, 2010, at 4:33 AM, Jarkko Oranen wrote: No, compilation should not be included. You mention make; it is a macro language, dependency graph walker, shell executor and up-to-dateness checker. It doesn't do any compilation. It's very bare bones. It's not at all perfect but it's much close

Re: Choosing a Clojure build tool

2010-03-26 Thread Chas Emerick
On Mar 26, 2010, at 5:35 AM, David Powell wrote: I often want to add a custom task to a build, just as an example, I might want to call a Java method in my code after it has built which will generate a property file to be included in the distribution. If this was just a make file or some sort

Re: Choosing a Clojure build tool

2010-03-25 Thread Chas Emerick
On Mar 26, 2010, at 12:59 AM, Per Vognsen wrote: On Fri, Mar 26, 2010 at 11:50 AM, Chas Emerick wrote: Because they're common processes that are ideally built once, and then reused with minor variation. Library reuse is generally considered to be a good thing in software developmen

Re: Choosing a Clojure build tool

2010-03-25 Thread Chas Emerick
you mention in your article are convenient, but I don't see why they belong in the build tool. They should be completely separate pieces of functionality that you happen to use the build tool to invoke. Why this obsession with integration and unified configuration? -Per On Fri, Mar 26, 2010

Re: concurrency and rand-int

2010-03-25 Thread Chas Emerick
I was going to suggest something similar using seque in an atom, but in neither case (using an atom or a ref) is the contention going to be minimized -- just shifted from the AtomicLong in java.util.Random to the now-app-level atom or ref. - Chas On Mar 26, 2010, at 12:30 AM, Andrzej wrote

Re: concurrency and rand-int

2010-03-25 Thread Chas Emerick
Hi Lee, Indeed -- from the docs for Math.random(): "This method is properly synchronized to allow correct use by more than one thread. However, if many threads need to generate pseudorandom numbers at a great rate, it may reduce contention for each thread to have its own pseudorandom-numbe

Re: converting long string to number

2010-03-25 Thread Chas Emerick
Glen, You want (java.math.BigInteger. "2342343..."). java.lang.Integer is limited to 2^31-1. - Chas On Mar 25, 2010, at 6:40 PM, Glen Rubin wrote: I am trying to convert a long string of numbers to a number, but get a java.lang.numberformatexception My long string of numbers has new lin

Re: Choosing a Clojure build tool

2010-03-25 Thread Chas Emerick
rkflows and specific requirements are so different. My guess is that once the Clojure-flavored Polyglot Maven project becomes fully-baked, it will become the de facto standard, as XML allergies really are the biggest deterrent right now IMO. Cheers, - Chas On Mar 25, 2010, at 6:17 PM, Bri

Re: Choosing a Clojure build tool

2010-03-25 Thread Chas Emerick
On Mar 25, 2010, at 6:08 PM, Rob Wolfe wrote: No, XML is not the worst thing (at least for me). The real problem is here: http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html I'm not sure what you're referring to there. :-) Let's suppose that from time to time I'd

Choosing a Clojure build tool

2010-03-25 Thread Chas Emerick
I published a blog post earlier today, along with a short screencast that might be of interest: "Like any group of super-smart programmers using a relatively new language, a lot of folks in the Clojure community have looked at existing build tools (the JVM space is the relevant one here, me

Re: Binary compatibility and a culture of AOT abuse

2009-12-14 Thread Chas Emerick
On Dec 14, 2009, at 7:16 AM, B Smith-Mannschott wrote: >> Then, to depend upon only the source jar in a downstream project, one >> would simply add a 'classifier' element to the dependency element: >> >> >>com.ashafa >>clutch >>1.0-SNAPSHOT >>sources >> > > Hmmm... but in the Cl

Re: Funding Clojure 2010

2009-12-14 Thread Chas Emerick
Snowtide will be sponsoring Clojure. But, we're small, bootstrapped (i.e. not venture-funded), and just one of what I'll bet are a fair number of commercial users of Clojure. If you're reading this, and you use, enjoy, and perhaps profit from Rich's hard work, please contribute or sponsor Clojure.

Re: what is the correct way to "mvn install" clojure-contrib

2009-12-14 Thread Chas Emerick
The poms in clojure and clojure-contrib are not currently suitable for installing/deploying the produced artifacts as-is (something that I keep meaning to work on). We continue to rely upon in-house builds, which I deploy using deploy:deploy-file along with tweaked pom files -- you can do

Re: Binary compatibility and a culture of AOT abuse

2009-12-14 Thread Chas Emerick
There are certainly binary incompatibility issues between the different versions/branches -- that'll settle out as the core matures, and IIUC, especially once c-in-c becomes a reality. However, only providing libraries as source (non-AOT-compiled) jars whenever possible only shifts the problem aro

Re: How to internally refer to other keys in a hashmap?

2009-12-13 Thread Chas Emerick
I wrote this macro a while ago that allows you to do this in a relatively clean way: http://paste.lisp.org/display/81703 Example usage: => (let-map [a 5 b (+ a 12)]) {:a 5, :b 17} - Chas On Dec 9, 2009, at 1:20 PM, bOR_ wrote: > Hi all, > > I want to make a hash-map where the value of one k

Re: Why JVM (and not .NET) is the "primary" platform for Clojure?

2009-10-10 Thread Chas Emerick
Rich expanded on this briefly in IRC: http://clojure-log.n01se.net/date/2008-07-23.html#16:34 - Chas On Oct 10, 3:40 am, Dmitry Kakurin wrote: > I've watched some Clojure screen cast where Rich Hickey mentions that > initially Clojure was co-developed for both platforms simultaneously. > But t

Re: Fixing production systems on-the-fly

2009-09-04 Thread Chas Emerick
On Sep 4, 1:38 pm, Christophe Grand wrote: > You have to be prepared to deal with potential inconsistencies: a > closure (or any object) can hold a reference to the value of a > function. In some circumstances, I am careful to pass vars rather than fns, if I know they are going to be held. Th

Re: Self-referencing map literals

2009-08-31 Thread Chas Emerick
On Aug 31, 2009, at 6:56 AM, Achim Passen wrote: >> I would like to simplify it to something like: >> >> {:radius 20 >>:diameter (* 2 (% :radius)) >>:circumference (* pi (% :diameter))} >> >> where % is the map itself. > > You could define your own let-like construct for this: > > > (d

Re: Significant isa? / multimethod optimization opportunity

2009-08-30 Thread Chas Emerick
On Aug 29, 2009, at 7:41 PM, Rich Hickey wrote: > Since multimethods (are supposed to) cache their lookup *results* > (i.e. they shouldn't lookup over and over), I wouldn't expect this to > yield any improvement in a stable system with reused call paths. Are > you calling isa? yourself? Can you

Re: vs. Python

2009-08-30 Thread Chas Emerick
On Aug 30, 2009, at 3:24 AM, Dan Fichter wrote: > I'd like to convince some Python developers that Clojure is not > foreign and does many things better than Python. I'd appreciate > whatever suggestions you have about what I've written. > > Though I am crazy about STM and Clojure agents, I

Re: Significant isa? / multimethod optimization opportunity

2009-08-29 Thread Chas Emerick
On Aug 28, 2009, at 10:57 PM, Chas Emerick wrote: > > In the course of doing some profiling tonight, I hit on a hotspot in > some particularly multimethod- and isa?-heavy code. It didn't take me > long to find that the bases and supers support fns for isa? were at > the roo

Significant isa? / multimethod optimization opportunity

2009-08-28 Thread Chas Emerick
In the course of doing some profiling tonight, I hit on a hotspot in some particularly multimethod- and isa?-heavy code. It didn't take me long to find that the bases and supers support fns for isa? were at the root of the issue, with bases in particular taking more time in aggregate than

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chas Emerick
On Aug 28, 2009, at 12:13 PM, Chouser wrote: > On Fri, Aug 28, 2009 at 10:01 AM, Shawn > Hoover wrote: >> >> However, unless the platforms agree on literal regex >> syntax (they don't, beyond the basic "asdf|[0-9]+" >> features) will prevent true portability of the literals. > > This is an inte

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Chas Emerick
On Aug 28, 2009, at 10:01 AM, Shawn Hoover wrote: > Why wouldn't #"" produce whatever the corollary regex object is on > each host platform? > > I had a couple suggestions on clojure-dev for ClojureCLR that line > up with the "produce the corollary idea": > http://groups.google.com/group/cloju

Re: with-open should use a close multimethod?

2009-08-28 Thread Chas Emerick
Definitely +1, yes. - Chas On Aug 28, 2009, at 4:27 AM, Mike Hinchey wrote: > I have a suggestion for the with-open macro. It calls .close when > it's finished. I'd like it to have a (defmulti close type) so it's > behavior is extensible. A standard method could be defined for > java.i

Re: Why doesn't regex implement ifn?

2009-08-27 Thread Chas Emerick
On Aug 27, 2009, at 1:34 PM, Chouser wrote: > The benefits of #"" producing a real java.util.regex.Pattern > object instead of some Clojury wrapper will decrease as it > becomes more common to write Clojure code that can run on > non-JVM platforms. So although this idea has come up and > then b

Re: Why doesn't regex implement ifn?

2009-08-26 Thread Chas Emerick
On Aug 26, 2009, at 9:46 PM, Timothy Pratley wrote: >> java.util.regex.Pattern > > I imagine a wrapper class could be returned instead that implemented > IFn and Pattern, Pattern is a final concrete class, so that's not possible. ...I'm counting down until I see an all-clojure regex implementa

Re: Why doesn't regex implement ifn?

2009-08-26 Thread Chas Emerick
On Aug 26, 2009, at 9:17 PM, Sean Devlin wrote: > Okay, I'm sure this has come up before. I was just wondering if > anyone knew why the regex literal doesn't implement IFn? > > At first glance it seems like the following would be useful: > > user=>(#"\d{3}" "123") > true > > This is defined as..

Re: Invalid method Code length 65567 in class file user$eval__630

2009-08-20 Thread Chas Emerick
load-string evaluates the contents of the string, which brings in all of the compilation machinery, which produces bytecode, classes, etc. Classfiles have a 64K size limit in typical JVM implementations. You want to use the read fn (which requires a PushbackReader), as all you're intereste

Re: New string utilities library ready

2009-08-20 Thread Chas Emerick
On Aug 20, 2009, at 2:29 AM, Meikel Brandmeyer wrote: > Hi, > > Disclaimer: personal opinion following... I think that's all we have when it comes to matters of style :-) > I'm sorry. I don't get the elegance of point-free style. > > In mathematics f denotes the function, while f(x) denotes the

Re: Continuous Integration Builds for Clojure are Back!

2009-08-19 Thread Chas Emerick
On Aug 19, 2009, at 12:43 PM, Howard Lewis Ship wrote: > I've finally had a chance (after about a month of travel and other > distractions) to get the Clojure and Clojure Contrib builds on > Tapestry360 (http://tapestry.formos.com/bamboo) working again. Heh, I'm actually setting up a new hudson

Re: Augmenting the defn attr-map

2009-08-17 Thread Chas Emerick
On Aug 16, 2009, at 9:27 PM, Stephen C. Gilardi wrote: >> What I might be able to do is define alternatively-hinted versions >> of let, for, doseq, etc., and rebind clojure.core/destructure >> during the evaluation of those macros so that the s:String style >> can get layered on top of bind

Re: Improving the documentation

2009-08-16 Thread Chas Emerick
On Aug 16, 2009, at 7:12 PM, Ollie Saunders wrote: > I've been learning Clojure for about 5 or so days (I'm osaunders on > the channel) now and I'm liking it a lot. However, the lack of > structure of http://clojure.org/api is hampering my learning a bit. I > wonder other people think it might be

Re: Augmenting the defn attr-map

2009-08-16 Thread Chas Emerick
On Aug 16, 2009, at 6:29 PM, Stephen C. Gilardi wrote: > On Aug 13, 2009, at 4:52 PM, Chas Emerick wrote: > >> I've actually been using it at the REPL here and there, and I've >> found >> it pretty pleasant -- it's a very pretty way to hint args compare

Re: Alternative implementation of structures.

2009-08-16 Thread Chas Emerick
On Aug 16, 2009, at 7:32 AM, Nicolas Oury wrote: > after having spend a bit of time optimizing the n-body benchmark, I > had > an idea for another implementation of structures. > > - Create a java object Structure, that contains a pointer to a > persistent hash map and a private abstract class

Re: clojure success story ... hopefully :-)

2009-08-16 Thread Chas Emerick
On Aug 14, 2009, at 3:10 PM, bradford cross wrote: > We have just released flightcaster.com which uses statistical > inference and machine learning to predict flight delays in advance > of airlines (initial results appear to do so with 85 - 90 % accuracy.) > > The webserver and webapp are all

Re: Can dosync transaction result computation be parallelized over multiple threads?

2009-08-16 Thread Chas Emerick
On Aug 14, 2009, at 8:53 PM, Mark Volkmann wrote: > So it seems the biggest impact of the change can be summarized as > follows. In the past, once you successfully ensured a Ref, you knew > you could write to it later because no other thread could also ensure > it. Now you don't know that. You k

Re: Keyword not serializable

2009-08-16 Thread Chas Emerick
at 3:18 PM, bradford cross wrote: > the serializeability issues also come up with cascading/hadoop. > > On Thu, Aug 13, 2009 at 7:58 PM, Chas Emerick > wrote: > > On Jul 31, 1:47 pm, Chris Kent wrote: > > Great. As far as my (possibly flawed) understanding goes

Proposal: Promote clojure.contrib.def to a "core" lib

2009-08-14 Thread Chas Emerick
Seeing that some contrib libs have been promoted into the main clojure project, I'd like to suggest that the same be done for clojure.contrib.def (or, the majority of it). We use it nearly everywhere, and I suspect many others do as well. As a slight caveat, I'm not sure that the defalias,

Re: Request for Discussion: user created reader macros

2009-08-14 Thread Chas Emerick
On Aug 14, 2009, at 10:49 AM, Chouser wrote: > So in general 1 is in my opinion a fairly minor syntax > thing, while 2 could be somewhat alleviated if Clojure had > a string literal format that allowed un-escaped double > quotes and left backslashes unmolested. This would allow > things like (in

Re: Keyword not serializable

2009-08-13 Thread Chas Emerick
On Jul 31, 1:47 pm, Chris Kent wrote: > Great.  As far as my (possibly flawed) understanding goes it should be > pretty simple.  Make it implementSerializableand add a readResolve > method that returns intern(sym).  sym will have already been interned > by its own readResolve method. No, you're

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chas Emerick
On Aug 13, 2009, at 8:29 PM, Scott wrote: > A single "super quoted" string reader would avoid this problem. > Instead of defining a new read syntax like: > > #my-syntax(your DSL goes between here and here) > > Clojure could provide a general purpose string creating read syntax. > Something like

Re: Request for Discussion: user created reader macros

2009-08-13 Thread Chas Emerick
On Aug 13, 2009, at 4:59 PM, Daniel Lyons wrote: > On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote: > >> I'm just wondering what people's response would be to allow user- >> generated reader macros. I'm not sure, but I think the only change >> to the clojure core that would be necessary in ord

Re: Augmenting the defn attr-map

2009-08-13 Thread Chas Emerick
On Aug 12, 2009, at 3:24 PM, Chas Emerick wrote: >> I'd hate to see somebody do it, but it's currently valid to define >> variables with colons in them, so there could be code out in the wild >> with those definition forms already. Other than that, I like the >&g

Re: Can dosync transaction result computation be parallelized over multiple threads?

2009-08-13 Thread Chas Emerick
> I know that if you have a dosync call in some function executed by a > thread, and then that function calls other functions (which might have > their own dosyncs, which get bundled together with the original > transaction), then everything is fine. It seems common that all of > that work would

Re: Clojure, Java JIT, and inlining

2009-08-12 Thread Chas Emerick
On Aug 12, 2009, at 3:59 PM, Richard Newman wrote: >> Is there some reason that the Java JIT is not doing this, with the >> original code using defn, as fast as it works when using defmacro? > > The macro expands into bytecode within the same Java method, rather > than a method invocation. Some m

Re: Augmenting the defn attr-map

2009-08-12 Thread Chas Emerick
On Aug 12, 2009, at 3:19 PM, Mark Volkmann wrote: > I didn't release it was valid to define names with colons in them. > Maybe that shouldn't be allowed. I'd like to be able to specify type > hints using UML-like syntax like the second example from Chas which > was > > (defh foo [s:String unhinte

Re: Augmenting the defn attr-map

2009-08-12 Thread Chas Emerick
On Aug 12, 2009, at 2:02 PM, tsuraan wrote: > I didn't put it in yet, but I was thinking of just having nil in the > type vector for unhinted variables, so you could have > > (defn foo {:signature [ String String nil ]} [ a b c ] ...) > > and then c wouldn't be hinted. I hadn't thought of destru

Re: Augmenting the defn attr-map

2009-08-12 Thread Chas Emerick
This is an interesting path to take. I'm not at all familiar with haskell, but a couple of thoughts anyway :-) : - There's already a lot of moving parts to type hinting, so adding this optional approach into defn seems like it'd lead to unintended consequences. That said, there's absolute

Re: Can Clojure be as fast as Java?

2009-08-11 Thread Chas Emerick
On Aug 11, 2009, at 8:19 PM, Daniel Lyons wrote: >> Perf bottlenecks are being addresses in Clojure already but not a >> the expense of expressiveness. >> And that is perfectly fine... > > > I agree completely with everything you're saying, and I too find > fft1976's obsession hard to relate

Re: Can Clojure be as fast as Java?

2009-08-11 Thread Chas Emerick
On Aug 11, 2009, at 5:14 PM, fft1976 wrote: > On Aug 11, 1:50 pm, Stuart Sierra wrote: > >> I agree wholeheartedly. Let's optimize wherever possible, but drop >> on >> the side-by-side comparisons. > > I think it's very immature to dictate to others what should be > important to them. Speed m

Re: Can Clojure be as fast as Java?

2009-08-11 Thread Chas Emerick
On Aug 11, 2009, at 4:26 PM, fft1976 wrote: > I've seen that. There is a difference between "I can come up with two > snippets in Java and Clojure doing the same thing at the same speed" > and "For any Java code, I can write Clojure code that does exactly the > same thing just as fast". The diff

Re: ANN: Clojure Ant Tasks

2009-08-10 Thread Chas Emerick
On Aug 10, 2009, at 11:45 AM, J. McConnell wrote: > On Mon, Aug 10, 2009 at 9:07 AM, Chas Emerick > wrote: > Looks like a good start. I initially didn't grok what was going on, > until I realized that you were aiming for an "actual" ant library. > > Yes

Re: ANN: Clojure Ant Tasks

2009-08-10 Thread Chas Emerick
Looks like a good start. I initially didn't grok what was going on, until I realized that you were aiming for an "actual" ant library. We have a couple of ant macros that do all of our clojure building for us (including auto-detecting namespaces within source directories, compiling only tho

Re: Improving Clojure's primitive handling (warning: not thought through)

2009-08-05 Thread Chas Emerick
On Aug 5, 2009, at 5:00 PM, Joe Van Dyk wrote: > > On Aug 4, 8:02 am, Mark Addleman wrote: >> I think there may be a somewhat straightforward solution to improving >> Clojure's performance when passing primitives between functions. >> Here's my understanding of the problem: The IFn interface i

clojure.zip keywords

2009-08-05 Thread Chas Emerick
Having finally dug into clojure.zip and contrib's zip-filter, I eventually needed a zipper? (or loc?) fn. Thinking I'd just check for the existence of one of the keys in each loc's metadata, I noticed that clojure.zip is using unusual keywords in that metadata, e.g.: #^{:zip/branch? branch

Re: Newbie question: Writing a GUI with clojure

2009-08-05 Thread Chas Emerick
We use NetBeans' matisse designer for static form layout, and we hook up the components' behaviour using clojure. This is pretty easy, especially if you configure matisse to expose the components in a form by creating them with 'public final' visibility, thereby making them a (.componentN

Re: Keyword not serializable

2009-07-30 Thread Chas Emerick
It turns out that a framework we've been using is able to serialize *any* Java class, whether it implements Serializable or not -- so, we've been happily serializing keywords without them explicitly supporting it for some time. However, making Keyword formally Serializable has other benefits, spe

Agents, keepalive, and hanging -main / compilation

2009-06-01 Thread Chas Emerick
There has been intermittent chatter over the past months from a couple of people on the group (e.g. http://groups.google.com/group/clojure/browse_thread/thread/409054e3542adc1f) and in #clojure about some clojure scripts hanging, either for a constant time (usually reported as a minute or

Re: Clojure at JavaOne

2009-05-21 Thread Chas Emerick
I'm guessing glitz and visual impact is what's going to wow the crowd, especially in that environment, where it's likely that most people are steeped in "business applications". Perhaps using one of the clojure-processing wrappers to do some outrageously-slick data visualization, and then s

Re: Does ProGuard work with clojure?

2009-05-13 Thread Chas Emerick
I have used proguard to obfuscate clojure in the past. I've not had a chance to attempt to duplicate your specific case, but I do seem to remember that proguard did not appreciate working with classes in the default package (which is where both public and magic are in your example). Additionally

Re: The Path to 1.0

2009-04-16 Thread Chas Emerick
On Apr 16, 2009, at 1:56 PM, Stuart Sierra wrote: > On Apr 16, 12:53 pm, Rich Hickey wrote: >> What does 1.0 mean to you? Are we there yet? Any recommendations for >> the organization of the release branches, patch policy etc? > > I would like to see, concurrent with 1.0, some kind of library >

Re: Is Clojure production ready?

2009-04-16 Thread Chas Emerick
On Apr 15, 2009, at 9:57 PM, mikel wrote: > As for hiring people knowledgeable in the language, there aren't going > to be a lot of people very knowledgeable in any of these languages > right now. Erlang gurus may be easier to find than Scala or Clojure > gurus. You might be better served huntin

Re: JVM hanging after -main

2009-04-16 Thread Chas Emerick
I believe this is an issue related to how the threadpools used by executors are populated by default, i.e. they use non-daemon threads. clojure.lang.Agent uses instances of these default threadpool configurations, which is likely the cause of the delayed shutdown of the JVM (I'll bet that if you

Re: Java 6 dependency in clojure-contrib ok?

2009-04-12 Thread Chas Emerick
Agreed. We'll be supporting Java 1.4 for some time to come still (obviously not using clojure there). However, we do hope to use clojure for many years to come on Java 1.5 -- I suspect our customers won't be moving off of it for a very long time. That said, there's lots of stuff in 1.6 and

Re: "Transparent" delays

2009-04-12 Thread Chas Emerick
On Apr 9, 2009, at 4:20 PM, Rich Hickey wrote: > On Apr 9, 2:55 pm, Chas Emerick wrote: >> I recently came across a situation where I very much wanted to delay >> the calculation of some values, but where I also wanted those delays >> to use their calculated values for eq

Re: Got a Clojure user group?

2009-04-12 Thread Chas Emerick
There are a number of people who at least tinker with clojure (and jruby, and scala, and F#, and mad-scientist experimental PHP hacks, etc) at the Western Mass. Developer's Group: http://wmassdevs.com though we are welcoming of all software developers, entrepreneurs, consultants, etc. - Cha

"Transparent" delays

2009-04-09 Thread Chas Emerick
I recently came across a situation where I very much wanted to delay the calculation of some values, but where I also wanted those delays to use their calculated values for equality determinations. This is particularly important when comparing vectors or maps that contain delayed values,

Re: Gen-class, extending a parameterized type

2009-03-31 Thread Chas Emerick
gen-class does not yet support parameterized types. Rich is aware of the issue, though, and I suspect he'll wend his way around to it sooner rather than later. Depending on timing, I might try my hand at a patch that implements this. - Chas On Mar 30, 2009, at 2:27 PM, Greg Harman wrote:

Re: Scala vs Clojure

2009-03-31 Thread Chas Emerick
We shipped production software built in Scala last year, but likely will never do so again given clojure. Our primary motivating factor is the degree of complexity in the Scala, but since you're looking for "auxiliary" factors: - clojure has a far richer "ecosystem" -- there's a metric ton

Re: New release 20090320

2009-03-20 Thread Chas Emerick
Congrats, and a HUGE "thank you" to you and everyone else in the community that has contributed code or their good spirit to the community. - Chas On Mar 20, 10:15 am, Rich Hickey wrote: > New release 20090320 -http://clojure.googlecode.com/files/clojure_20090320.zip > > Incorporates all the re

Re: Going to ILC 2009?

2009-03-18 Thread Chas Emerick
One additional thought: if anyone wants to set up something at the last minute (as these things often are), I'd suggest twittering with an appropriate hashtag (i.e. #clojureilc, perhaps) so that like-minded folks can flock to the right spot. - Chas On Mar 18, 2009, at 4:22 PM,

Going to ILC 2009?

2009-03-18 Thread Chas Emerick
I am (from Sunday - Tuesday, anyway), along with another fellow from Snowtide, and I think it'd be great to meet up with some other Clojure programmers who might be there, too. I'm sure such things will happen naturally, but I thought I'd start a thread here so that people who are going c

Re: Dotted method invocations (and other reader niceties) do not work in #= forms

2009-03-11 Thread Chas Emerick
ions) are being recruited there at the moment. After tinkering, it looks like that's "just" an implementation limit right now, probably due to the mandate and details of #= forms and printable reading not being entirely fleshed out yet. - Chas On Feb 24, 5:19 pm, Chas Emerick wrot

Re: (ancestors ClassName) does not include tag ancestors of ClassName's superclasses

2009-03-10 Thread Chas Emerick
FWIW, a version of ancestors that exhibits proper (IMO) behaviour: (defn ancestors ([tag] (ancestors global-hierarchy tag)) ([h tag] (not-empty (let [ta (get (:ancestors h) tag)] (if (class? tag) (let [superclasses (set (supers tag))]

Re: contrib api documentation?

2009-03-10 Thread Chas Emerick
This is a pretty nice reference: http://clj-doc.s3.amazonaws.com/tmp/doc-1116/index.html A little old now, though. The tool that generated it is open-source (on github, I think), so refreshing it for yourself shouldn't be too difficult. - Chas On Mar 10, 2009, at 6:16 AM, rb wrote: > > H

Re: New in the group and question about Java interaction

2009-03-10 Thread Chas Emerick
In general, no -- in a typical project setup, any changes to Java code precipitate a rebuild and a restart of your application. There are plenty of ways to avoid this, but currently, they're only used in the major IDEs when debugging (e.g. while debugging an application, you can usually mak

(ancestors ClassName) does not include tag ancestors of ClassName's superclasses

2009-03-09 Thread Chas Emerick
The subject mostly says it all. Example: ;;; user=> (ancestors String) #{java.io.Serializable java.lang.Object java.lang.CharSequence java.lang.Comparable} user=> (ancestors Object) nil user=> (derive String ::foo) nil user=> (derive Object ::bar) nil user=> (isa? String ::foo) true us

Re: Workflow poll?

2009-03-08 Thread Chas Emerick
On Mar 7, 2009, at 3:53 PM, Mark Engelberg wrote: > Anyone using IntelliJ or Netbeans as their primary development > environment, or is that stuff too experimental? We've been using enclojure in NetBeans since we started using clojure seriously. IMO, one should definitely track the "hot" bui

Re: Clojure creates lots of classloaders

2009-03-04 Thread Chas Emerick
That's a good point. Does such usage cause some failure, or is it a performance issue? I would think that prior generations' code (classes + classloader(s)) would get GC'd as necessary -- or is the number of created classloaders so significant as to hit some serious limitation? - Chas

Re: JavaWorld article

2009-03-04 Thread Chas Emerick
Joshua, I'd be happy to take a look if it'd be helpful. Cheers, Chas Emerick Founder, Snowtide Informatics Systems Enterprise-class PDF content extraction cemer...@snowtide.com http://snowtide.com | +1 413.519.6365 On Mar 4, 2009, at 12:33 PM, Joshua Fox wrote: > I am worki

Re: Clojure creates lots of classloaders

2009-03-04 Thread Chas Emerick
Hendrik, I came across this issue with JNI libs some years ago, and also comes up in the context of most app servers, which use a multitude of classloaders to enable hot code reloading and such. The general solution is to move your JNI lib into your boot classpath; in my experience with

Dotted method invocations (and other reader niceties) do not work in #= forms

2009-02-24 Thread Chas Emerick
This works fine: user/ (read-string "#=(java.lang.Float. \"5\")") 5.0 However, these two cases fail: user/ (read-string "#=(.toCharArray \"foo\")") java.lang.Exception: Can't resolve .toCharArray user/ (read-string "#=(java.lang.Enum/valueOf java.lang.Thread$State \"NEW\")") java.lang.ClassC

Re: Clojure Off-topic IRC channel

2009-02-17 Thread Chas Emerick
+1 I actually think that #clojure is very active. Of the channels I frequent/lurk in, only #git regularly surpasses #clojure in number of messages per (my) day. Maybe that says more about my irc interests, so take that as you will. #clojure-offtopic doesn't have much poetry to it, but I'l

Re: calling Clojure functions from Java

2009-02-13 Thread Chas Emerick
Mark, If you use the #^{:static true} metadata on a :methods definition in a gen-class spec for your class' implementing namespace, then those fns appear as static functions in the generated Java class: Clojure: (ns bar.Foo (:gen-class :methods [#^{:static true} [stringLength [Strin

Re: Creating a new thread-local binding when the thread already exists.

2009-02-11 Thread Chas Emerick
def doesn't create a thread-local binding, it creates a var within a particular namespace -- the binding form is what established the thread-local binding. So, when used on the AWT/Swing thread, (binding [*my_environment* (new_environment)] ...) will execute the body of the binding form

Re: Suggestion: test-is should print *all* frames of exceptions caught while testing

2009-02-11 Thread Chas Emerick
trying to figure out the "right" depth. > Plus even if you figure out the right depth, you still usually end up > with a lot of garbage on the top of your stack. I've found that a > little simple filtering makes the traces *much* more readable. > > Tom > > On Feb

Re: How to port a mixin to clojure

2009-02-11 Thread Chas Emerick
I'm not sure I would call that a mixin -- really, all that's going on is Python is allowing you to call any function, anywhere. In a language like Scala that does have what I'd consider "real" mixins (traits over there), then on_key_down would become a function available in TableWidget's

<    1   2   3   4   5   6   >