ClojureCLR in production ?

2011-03-23 Thread Jules
and how they felt about it ? Whether it will be mature enough in say 3 months to support a production app ? Thanks for your time, Jules -- 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

gen-class and state...

2011-03-23 Thread Jules
but am under the impression that they are for dynamic typing creation and will not give me link-time compatibility with the Java code in my project ? thanks for your time, Jules -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

Re: Serialising functions...

2011-03-04 Thread Jules
exactly what I have achieved, then I will post back a proper description in case anyone else is trying to build distributed Clojure apps in a similar manner. cheers Jules On Mar 3, 2:30 pm, Jules jules.gosn...@gmail.com wrote: On Mar 3, 1:22 pm, Alessio Stalla alessiosta...@gmail.com wrote

Re: Serialising functions...

2011-03-04 Thread Jules
I like that - I'm using ip at the moment - you'd need to combine it with pid aswell, since you may be running more than one jvm per box. thanks for the idea/code, Jules On Mar 4, 5:37 pm, Ken Wesson kwess...@gmail.com wrote: On Fri, Mar 4, 2011 at 4:48 AM, Jules jules.gosn...@gmail.com wrote

Re: Serialising functions...

2011-03-03 Thread Jules
problem then there is a good chance that my supposition was correct - otherwise it is back to the drawing board. I'll try to make time to give this a whirl soon and report back. Thanks, Jules -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Serialising functions...

2011-03-03 Thread Jules
On Mar 3, 1:22 pm, Alessio Stalla alessiosta...@gmail.com wrote: On Thursday, March 3, 2011 11:46:03 AM UTC+1, Jules wrote: Thanks, Alessio, I did know this, but it is a welcome addition to the thread. Ok. Classloaders are a tricky matter and many people don't have clear ideas about

Re: Serialising functions...

2011-03-02 Thread Jules
of clojure.lang I'm afraid :-( Apologies for posting all the source code here - but I thought that it would enable others to follow my track if interested. That's all for now. I'll post if I get any further. cheers Jules -- You received this message because you are subscribed to the Google Groups Clojure

Re: Serialising functions...

2011-03-01 Thread Jules
On Feb 28, 4:03 pm, Ken Wesson kwess...@gmail.com wrote: On Mon, Feb 28, 2011 at 9:25 AM, Jules jules.gosn...@gmail.com wrote: This is actualy my preferred route - however I've just revisited some test code I wrote a while back, that I thought I had working... - I only had it half working

Re: Serialising functions...

2011-03-01 Thread Jules
On Mar 1, 12:03 am, Phil Hagelberg p...@hagelb.org wrote: On Feb 25, 7:45 am, Jules jules.gosn...@gmail.com wrote: I want to include functions in my metadata - e.g. I might want to specify a version comparator function to allow tables to decide whether a new version

Clojure (1.3.0alpha4) Spring/Aspectj Load Time Weaving...

2011-03-01 Thread Jules
? Is Clojure and load time aspect weaving something that I should just give up on ? or can the two be made to share their toys nicely ? Or maybe I am missing something Thanks for your time, Jules -- You received this message because you are subscribed to the Google Groups Clojure group

Re: Serialising functions...

2011-03-01 Thread Jules
up this thread. Thanks for pointing this out. Jules -- 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 with your first post

Re: Serialising functions...

2011-02-28 Thread Jules
, Jules -- 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 with your first post. To unsubscribe from this group, send email

Re: Serialising functions...

2011-02-28 Thread Jules
, Jules -- 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 with your first post. To unsubscribe from this group, send email

Re: Serialising functions...

2011-02-28 Thread Jules
, Jules -- 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 with your first post. To unsubscribe from this group, send email

Re: Serialising functions...

2011-02-28 Thread Jules
, Jules -- 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 with your first post. To unsubscribe from this group, send email

Re: Serialising functions...

2011-02-28 Thread Jules
On Feb 28, 1:50 pm, Ken Wesson kwess...@gmail.com wrote: On Mon, Feb 28, 2011 at 5:59 AM, Jules jules.gosn...@gmail.com wrote: Unfortunately, I'd like it to be a open set, just as I would like the system's types to be - this was one of the choices driving Clojure over Java

Re: Serialising functions...

2011-02-28 Thread Jules
to override defineClass on DCl... but I ran out of gas. If anyone else can help out I would be very grateful Jules -- 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

Re: Serialising functions...

2011-02-28 Thread Jules
. If I have any success, I'll let the group know. thanks for all your help, Jules -- 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

Serialising functions...

2011-02-25 Thread Jules
live with that. I thought that, before I did this, I should canvas the group for their opinions on this. Has anyone done anything similar. Does anyone see anything inherently wrong with this approach. Why do I feel slightly uneasy about this approach myself ? etc... thanks for your time, Jules

Re: Pimp my algorithm: finding repeating subsequences

2011-02-21 Thread Jules
Sorry that should be: (def represent (memoize represent)) On Feb 20, 5:18 pm, Jules julesjac...@gmail.com wrote: Here is my solution that solves the problem optimally. Observe that given a sequence we can do one of two things: (1) represent it as a repetition or (2) represent

Re: Pimp my algorithm: finding repeating subsequences

2011-02-20 Thread Jules
this by memoizing represent: (memoize represent) Now the algorithm is polynomial time. It is still rather slow for large sequences (but there is a lot of room for optimization), and gives stack overflows. You can fix this by eliminating the recursion and filling the memoization table iteratively. Jules

Re: Clojure 1.3.0-alpha4 - number wierdness

2011-02-03 Thread Jules
Thanks for getting back to me on this one guys - now I know that this change is intentional I will make the necessary future-looking code changes to my project. much obliged, Jules On Feb 2, 4:13 am, Chas Emerick cemer...@snowtide.com wrote: The numeric coercion functions only impact interop

Clojure 1.3.0-alpha4 - number wierdness

2011-02-01 Thread Jules
Clojure 1.2.0 user= (type 0) java.lang.Integer user= (type (int 0)) java.lang.Integer user= but Clojure 1.3.0-alpha4 user= (type 0) java.lang.Long user= (type (int 0)) java.lang.Long apologies if this is a known issue ... regards Jules -- You received this message because you

Re: ANN: Logos 0.1 - An Optimized miniKanren Logic Programming Library for Clojure

2010-12-04 Thread Jules
Interesting. Is Byrd's dissertation available online? On Dec 4, 9:41 pm, David Nolen dnolen.li...@gmail.com wrote: I announced it earlier this week on Twitter, but it's now come far along enough to be usable. You can write fun stuff like the following: (defn likes   [x y]   (cond-e    ((==

Re: finding value nearest x

2010-09-25 Thread Jules
Maybe this: (min-key #(abs (- % 136)) xs) On Sep 25, 3:41 pm, Glen Rubin rubing...@gmail.com wrote: I have a list of numbers and I want to find the one that is closest to 136.  Is there an operator for performing this kind of operation or do I need to to do it algorithmically? thanks! --

Re: finding value nearest x

2010-09-25 Thread Jules
Yes, you're right. On Sep 25, 4:44 pm, Nicolas Oury nicolas.o...@gmail.com wrote: On Sat, Sep 25, 2010 at 3:40 PM, Jules julesjac...@gmail.com wrote: Maybe this: (min-key #(abs (- % 136)) xs) Wouldn't that be (apply min-key #(abs (- % 136)) xs)? -- You received this message because you

Re: cool compiler-project?

2010-08-18 Thread Jules
so presumably the Clojure compiler does not include an optimizer. So write an optimizing Clojure compiler! Or do type inference for Clojure. Or partial evaluation. Or a compiler that targets LLVM. On Aug 18, 10:46 pm, .Bill Smith william.m.sm...@gmail.com wrote: While I think Clojure is an

Re: cool compiler-project?

2010-08-18 Thread Jules
Or a Clojure to Javascript compiler. So many interesting projects! On Aug 19, 12:36 am, Jules julesjac...@gmail.com wrote: so presumably the Clojure compiler does not include an optimizer. So write an optimizing Clojure compiler! Or do type inference for Clojure. Or partial evaluation

Re: lazy-seq realization/retention within futures

2010-08-11 Thread Jules
In general the problem of whether a local can be cleared is undecidable. However a very advanced compiler might be able to find out that the closure of a future will only be called once, and clear the reference to the closure. It is much simpler to just special case futures. One problem that might

Re: Basic Lisp Compiler: How to tell which functions to compile?

2010-08-09 Thread Jules
It is impossible (undecidable) to tell precisely which functions a function will call. Therefore you will need to consider not exactly set of functions that a function will call, but some superset of that. Why not take as your superset all functions? That is, always compile all functions. On Aug

eval and threads...

2010-08-06 Thread Jules
someone explain to me how namespaces, threads and eval interact with each other, or point me to a resource where I can find this for myself ? Am I doing something that I shouldn't ? thanks for your time, Jules P.S. Clojure-1.2-beta1 / Java6 -- You received this message because you are subscribed

Re: Memoizing a recursive function?

2010-07-22 Thread Jules
(def fib (memoize (lambda ...))) On Jul 22, 1:25 pm, Laurent PETIT laurent.pe...@gmail.com wrote: Another solution, use the var, and then use memoize on your function as usual: (defn fib[n]   (if ( n 2)     (+ (#'fib (- n 2)) (#'fib (- n 1 (of course this was to answer closely to the

Re: Drawable Sets

2010-06-26 Thread Jules
You can store the numbers in a vector [2 5 3]. Instead of doing this store the cumulative weight v = [0 2 7 10]. What your problem comes down to is given a number n, find the the lowest index i such that v[i] = n. This can be accomplished with binary search. You can also use a binary search tree

Re: Drawable Sets

2010-06-26 Thread Jules
less good than using wider trees than binary. (I might use this second idea, though, with a set instead of a vector, if I can't manage to make HashTries work). On Sat, Jun 26, 2010 at 2:50 PM, Jules julesjac...@gmail.com wrote: You can store the numbers in a vector [2 5 3]. Instead of doing

Re: Enhanced Primitive Support

2010-06-19 Thread Jules
than ignoring the overflow, but faster than tagged 31-bit fixnums and a whole lot faster than bignums. Can you convince the JVM to produce similar code? Jules On Jun 19, 4:22 am, Rich Hickey richhic...@gmail.com wrote: On Jun 18, 2010, at 10:18 PM, Mark Fredrickson wrote: So far most

Re: Enhanced Primitive Support

2010-06-19 Thread Jules
On Jun 19, 3:53 pm, Rich Hickey richhic...@gmail.com wrote: On Jun 19, 2010, at 6:39 AM, Jules wrote: I know nothing about the JVM, but I do know that on x86 you can handle fixnum - bignum promotion fairly cheaply. You compile two versions of the code: one for bignums and one

Atoms/Concurrency - usage pattern

2010-05-17 Thread Jules
missing something here or is there room for another member of the swap! family which returns a tuple with a similar structure to mine, but only uses the head of this tuple to reset the state of the enclosing atom ? Thanks for your time, Jules -- You received this message because you are subscribed

Re: Atoms/Concurrency - usage pattern

2010-05-17 Thread Jules
awkward :-) - should I really be using refs/STM's to achieve this ? or am I using a pattern peculiar to myself because of some other wierd design decision that I have taken ? or have others come across the same requirement and been similarly perplexed ? thx Jules On May 17, 5:12 pm, ataggart

Serializable Collections ?

2010-04-27 Thread Jules
the wire... ArrayLists, however do not implement Comparable and I now need a Comparable AND Serializable collection. :-( Is there a wishlist for Clojure 1.2 ? :-) Is there a good reason why making '(), [], {} and #{} Serializable should not be on it ? thanks Jules P.S. I'm using 1.1.0-new

1.1.0-new-SNAPSHOT / java.lang.ExceptionInInitializerError / JRE 1.6.0 IBM Linux build pxi3260sr7-20091215_02 (SR7)

2010-02-26 Thread Jules
) at java.lang.J9VMInternals.initialize(J9VMInternals.java:200) ... 33 more I should probably not be using 1.1.0-new-SNAPSHOT, but thought that I should report the issue. thanks Jules -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: 1.1.0-new-SNAPSHOT / java.lang.ExceptionInInitializerError / JRE 1.6.0 IBM Linux build pxi3260sr7-20091215_02 (SR7)

2010-02-26 Thread Jules
- problem persists. Now I have scrubbed my own repo and am rebuilding. I'll post what I find later. Thanks again, Jules On Feb 26, 9:54 am, Meikel Brandmeyer m...@kotka.de wrote: Hi, On Feb 26, 10:32 am, Jules jules.gosn...@gmail.com wrote: I just checked in a new piece of code - A trivial

Re: 1.1.0-new-SNAPSHOT / java.lang.ExceptionInInitializerError / JRE 1.6.0 IBM Linux build pxi3260sr7-20091215_02 (SR7)

2010-02-26 Thread Jules
that this looks like a Hudson thing and not a Clojure one, I'll go offline with it. Thanks for all your help, Jules On Feb 26, 11:20 am, Jules jules.gosn...@gmail.com wrote: Thanks, Meikel I'll see if that helps. Strangely, although I can replicate the problem in Hudson every time, I am

on-the-fly fn creation, arglist, with-meta, :tag

2010-02-24 Thread Jules
together a list/tree of code, at runtime, that, when evaluated, gives me what I want, by flying beneath the 'fn macro and/or the #^ reader macro, but at this point I run out of doc and google-hits :-( I'd really appreciate some help with this. thanks, Jules -- You received this message because

Re: on-the-fly fn creation, arglist, with-meta, :tag

2010-02-24 Thread Jules
- much appreciated :-) Jules -- 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 with your first post. To unsubscribe from

Re: making instances of a parameterised class...efficiently...

2010-02-01 Thread Jules
Guys, Thanks for your answers. I'll give both of these solutions a try out this week and get back to the list with results and thoughts. Thanks again for your help. Jules -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

making instances of a parameterised class...efficiently...

2010-01-27 Thread Jules
to write this still all ended up returning a fn that used eval, as above.. so for the moment, I'm stumped hence throwing myself upon the mercy of this list. thanking you in advance for all your help, Jules -- You received this message because you are subscribed to the Google Groups Clojure

Re: Roadmap for 2010

2009-12-28 Thread Jules
the issues faced by Clojure users. Is there a list somewhere? Jules On Dec 28, 8:07 pm, Rich Hickey richhic...@gmail.com wrote: On Tue, Dec 15, 2009 at 11:32 PM, ashishwave ashishw...@gmail.com wrote: Request for prioritizing the 2010 roadmap. New year is just few days ahead :-) I don't

Re: Call for masters thesis ideas (possibly related to Clojure)

2009-12-19 Thread Jules
the problem. What is sum([])? For numbers it should be 0, for strings it should be . In a statically typed language you can use the type of the list to determine which value to return. How can we write a generic sum function in a dynamic language? Jules On Dec 18, 1:35 pm, Patrick Kristiansen

Re: Clojure in Clojure?

2009-07-11 Thread Jules
Another potential problem is the data structure library. Can you implement vectors, maps, etc. in Clojure with acceptable performance? Jules On 11 jul, 07:33, Tom Faulhaber tomfaulha...@gmail.com wrote: As awesome as this sounds, wouldn't it first require a native implementation

Re: How can I stop leaking memory?

2009-06-23 Thread Jules
() // adding 1 element and removing 1 keeps the result collection at size n return result Hope this helps, Jules On Jun 23, 10:14 am, Daniel Lyons fus...@storytotell.org wrote: On Jun 23, 2009, at 1:47 AM, Christophe Grand wrote: I don't know if it has an official name but basically it's

Re: No OO restrictions is good. why not still add dependency injection?

2009-06-16 Thread Jules
I still don't know what dependency injection means exactly. The examples I've seen that are said to use dependency injection can be solved by using first class functions. Are first class functions what you want? Jules On Jun 16, 12:09 pm, hari sujathan hari.sujat...@gmail.com wrote: Hi

<    1   2