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 wrote: > Hi, >    cloju

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 wrote: > On Jun 23, 2009, at 1:47 AM, Christophe Grand wrote: > > > > > > > I don't know if it has an official name but ba

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 wrote: > > As awesome as this sounds, wouldn't it first require a > > native implementation to be

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

2009-12-19 Thread Jules
for this example). sum ([1,2]) = 3. sum(["ab","cd"]) = "abcd". Now comes 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

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 wrote: > On Tue, Dec 15, 2009 at 11:32 PM, ashishwave wrote: > > Request for prioritizing the 2010 roadmap. New year is just few days > > ahead :-) > > I don't

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

2010-01-27 Thread Jules
1 #^type2 arg2...#^typen argn]...) then pass this off as the to-be-called-frequently fn mentioned above, but my efforts 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. thanki

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 t

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

2010-02-24 Thread Jules
it worked - but the metadata has been ignored by the compiler - aaargh ! There must be a way to put 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-h

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

2010-02-24 Thread Jules
can't be resolved. # user=> when I needed : user=> (let [arg (with-meta 's {:tag "java.lang.String"}) arglist [arg] body (list '.length arg)] (eval (list 'fn arglist body))) # user=> (*1 "foo") 3 Thanks for your help - much appreciated :-) Jul

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

2010-02-26 Thread Jules
alize(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 e

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
ory and rebuilt - 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 wrote: > Hi, > > On Feb 26, 10:32 am, Jules wrote: > > > I just checked in a new piece

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
Now 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 wrote: > Thanks, Meikel > > I'll see if that helps. > > Strangely, although I can replicate the problem in Hudson eve

Serializable Collections ?

2010-04-27 Thread Jules
ayLists before sending them, from Java code, over 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

Re: Serializable Collections ?

2010-04-28 Thread Jules
Brian, Thanks for getting back to me :-) I look forward to your changes making it into the mainline. I'm going to register with Assembla and watch this ticket. If I find a way to vote for it, I will do. Jules On Apr 27, 3:59 pm, Brian Hurt wrote: > On Tue, Apr 27, 2010 at 9:10 A

Atoms/Concurrency - usage pattern

2010-05-17 Thread Jules
but this feels clumsy. Am I 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 messa

Re: Atoms/Concurrency - usage pattern

2010-05-17 Thread Jules
being 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

2 way transform in single definition ? unification ?

2015-07-12 Thread Jules
single src. Ideally it would allow me to extend it to construct/destructure e.g. joda-time class instances etc as some of my internal rep uses these. It feels a bit like unification in PROLOG... Looking forward to hearing your ideas. regards, Jules -- You received this message because you are

Re: 2 way transform in single definition ? unification ?

2015-07-13 Thread Jules
I was hoping for something in idiomatic Clojure - but I'll take a look thanks. Jules On Monday, 13 July 2015 04:45:00 UTC+1, craig worrall wrote: > > You may have already discounted Java versions, but just in case ... > http://www.javacodegeeks.com/2013/10/java-object-to-obje

Re: 2 way transform in single definition ? unification ?

2015-07-13 Thread Jules
I haven't. Are you just suggesting it because I mentioned unification, or have you used it and know that it might be a good fit ? Thanks, Jules On Monday, 13 July 2015 10:37:55 UTC+1, Gary Verhaegen wrote: > > Have you already looked at core.logic? > > On Monday, 13 July 20

Re: 2 way transform in single definition ? unification ?

2015-07-14 Thread Jules
This does look good - I'll give it a whirl - thanks for the example :-) Jules On Monday, 13 July 2015 11:00:55 UTC+1, Jonathan Winandy wrote: > > To me it's a very good option. > > Given you example : > > (./pull '[org.clojure/core.logic "0.8.10&

using a private constructor...

2014-06-24 Thread Jules
ction and setAccessible from Clojure but I'm not keen on the performance overheads of this approach. Is there not some way that I could create a Clojure module in the same namespace as the Java class and get hold of the functions that I need directly :? Any guidance gratefully received :

[ANN] seqspert-1.7.0-alpha4-1.0-SNAPSHOT now on Clojars - Merge big hash-maps, FAST !

2014-11-17 Thread Jules
rties have kicked the tyres a bit. regards, 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

Re: [ANN] seqspert-1.7.0-alpha4-1.0-SNAPSHOT now on Clojars - Merge big hash-maps, FAST !

2014-11-17 Thread Jules
all is explained in the README on github :-) and here is an example Splicer: https://github.com/JulesGosnell/seqspert/blob/master/src/java/clojure/lang/ArrayNodeAndArrayNodeSplicer.java Jules On Monday, 17 November 2014 23:01:44 UTC, Fluid Dynamics wrote: > > On Monday, November 17,

Re: [ANN] seqspert-1.7.0-alpha4-1.0-SNAPSHOT now on Clojars - Merge big hash-maps, FAST !

2014-11-17 Thread Jules
as nothing to do with int-map etc. This is for merging standard Clojure hash-maps with large amounts of data in them very quickly and with very little churn. See the examples in the README. cheers Jules On Tuesday, 18 November 2014 00:14:30 UTC, Glen Mailer wrote: > > I did? > >

Using core.logic for bi-directional json transformation

2020-09-30 Thread Jules
look for another solution - in which case can anyone suggest anything ? I find the idea of using core.logic to do bi-directional JSON doc transformations really appealing - what do others think ? Jules -- You received this message because you are subscribed to the Google Groups "Clojure&q

Re: Using core.logic for bi-directional json transformation

2020-09-30 Thread Jules
(logic/is nil schema (fn [s] (s "format"))) or (logic/pred schema (fn [s] (not (contains? s "format" clumsy - but works still interested to hear what other people think of this approach... Jules On Wednesday, 30 September 2020 at 17:15:42 UTC+1 Jules wrote: &g

? stateful-map ?

2022-11-27 Thread Jules
ap (stateful-mapper +)) [0 1 2 3 4 5]) ``` Am I missing a standard way of doing this in Clojure ? Or is a stateful function the best answer ? Interested in your thoughts, Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: ? stateful-map ?

2022-11-27 Thread Jules
step... Jules On Sunday, 27 November 2022 at 19:00:48 UTC Jules wrote: > Guys, > > I've found myself needing a function that I am sure cannot be an original > but I'm not aware of it existing anywhere... > > It is a cross between 'map', 'reduce&

Re: ? stateful-map ?

2022-11-28 Thread Jules
50015.clj:60). Wrong number of args (1) passed to: clojure.core/reductions core> at least I now know what to call what I am looking for. Thanks for your help - much appreciated, Jules On Sunday, 27 November 2022 at 23:47:22 UTC sritc...@gmail.com wrote: > Pretty sure what you’

[ANN] Killer: Functional Event Stream Processing in Clojure with Transducers

2016-06-16 Thread Jules
-time Charting/Tabling Web UI in ClojureScript - please get in touch. I'm going to have my hands full working on the back-end and my front-end knowledge is poor at best. Interested to hear what everyone thinks. Jules -- You received this message because you are subscribed to the Goo

Re: [ANN] Killer: Functional Event Stream Processing in Clojure with Transducers

2016-06-28 Thread Jules
n to start thinking about adding a number more D3 widgets: https://github.com/d3/d3/wiki/Gallery If anyone else is interested in getting involved, just shout ! :-) Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

crazy idea...

2015-11-28 Thread Jules
to talk to lots of people much smarter than myself about it - so here I am. What does everyone think ? Is this worth discussing or just pie in the sky ? Looking forward to hearing your thoughts, Jules -- You received this message because you are subscribed to the Google Groups "Clojure

Re: crazy idea...

2015-11-29 Thread Jules
Thanks for this pointer, Lucas - it looks as if I could learn a lot from Kibit - I'll have a good look at it. Jules On Saturday, 28 November 2015 18:54:11 UTC, Lucas Bradstreet wrote: > > Kibit (https://github.com/jonase/kibit > <https://www.google.com/url?q=https%3A%2F%2Fgi

Re: crazy idea...

2015-11-29 Thread Jules
Lee, Thanks for the link - I can see that I have a lot of reading ahead of me :-) - looks very interesting indeed. Jules On Saturday, 28 November 2015 20:26:48 UTC, Lee wrote: > > > Jules, > > There's work using random variation and selection to do some of the more >

Re: [ANN] dali SVG library 0.7.0

2016-04-04 Thread Jules
to a graph of a live feed etc ? cheers Jules On Thursday, 11 February 2016 00:49:54 UTC, Stathis Sideris wrote: > > Hello all, > > dali is a Clojure library for representing the SVG graphics format. It > allows the creation and manipulation of SVG files. The syntax > &

fast parallel reduction into hash-set/map

2014-02-15 Thread Jules
ot important for the reduction process. BTW - benchmarks were run on a 3.2ghz Phenom II / clojure/master / openjdk-1.7.0_51 / Fedora 20 with min and max 4gb ram. regards, Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: fast parallel reduction into hash-set/map

2014-02-15 Thread Jules
where appropriate. This makes it faster and more memory efficient as evidenced in the (into c d) vs (splice c d) timings above. regards Jules On Saturday, 15 February 2014 23:52:00 UTC, Alex Miller wrote: > > You should try transients if you're looking to quickly fill collection

Re: fast parallel reduction into hash-set/map

2014-02-16 Thread Jules
'user/m3 user=> (time (def m4 (clojure.lang.PersistentHashMap/splice m1 m2))) "Elapsed time: 1064.268269 msecs" #'user/m4 user=> (= m3 m4) true user=> as you would expect, a splice is faster and causes less of a memory spike. Jules On Sunday, 16 February 2014 10:01:04 UTC, Mikera wrote:

Re: fast parallel reduction into hash-set/map

2014-02-16 Thread Jules
I would have thought so - it's only my first cut - seems to work but I wouldn't like to stake my life on it. It really needs a developer who is familiar with PersistentHashMap to look it over and give it the thumbs up...Still, I guess if it was marked "experimental" ...:-

Re: fast parallel reduction into hash-set/map

2014-02-16 Thread Jules
ld also be keen to investigate my idea about the efficient 'cleave'-ing of tree-based seqs so that they can be used as inputs to the reducers library, as mentioned in my original post... Jules On Sunday, 16 February 2014 10:57:35 UTC, Jules wrote: > > I would have thought s

Re: fast parallel reduction into hash-set/map

2014-02-17 Thread Jules
is no issue lurking here. I'll put together some proper testcases and add them to my repo. thanks for your interest :-) Jules On Monday, 17 February 2014 09:28:28 UTC, Jean Niklas L'orange wrote: > > > > On Sunday, February 16, 2014 11:49:38 AM UTC+1, Mikera wrote: >> &g

Re: fast parallel reduction into hash-set/map

2014-02-17 Thread Jules
Alex, thanks for the suggestion - I'll look at collection-check and raise the appropriate JIRA when I am happier with the code / idea. Jules On Monday, 17 February 2014 13:21:28 UTC, Alex Miller wrote: > > It is too late, but an enhancement jira would be appropriate. I woul

Re: fast parallel reduction into hash-set/map

2014-02-17 Thread Jules
ll keep it in mind. Jules On Monday, 17 February 2014 18:42:28 UTC, Glen Mailer wrote: > > Is there a specific part of this implementation which means it needs to > live in core? > > It would be cool to have this as a library that could be used with > existing versions o

[ANN] seqspert - demystify the internals of Clojure Sequences

2014-02-20 Thread Jules
, you need to understand a bit about your hardware (mechanical sympathy), the JVM and the Clojure runtime. The Seqs are a large part of this and Seqspert will help you quickly understand how they work. Please take a look: https://github.com/JulesGosnell/seqspert.git regards, Jules --

Re: fast parallel reduction into hash-set/map

2014-02-20 Thread Jules
e-combination with another seq of the same type. This could be leveraged by e.g. 'into' to deliver significant performance benefits and footprint reduction. more as and when, Jules On Saturday, 15 February 2014 23:06:24 UTC, Jules wrote: > > Guys, > > I've been playing

Re: fast parallel reduction into hash-set/map

2014-02-20 Thread Jules
his promise and this issue is the last blocker for me for a couple of usecases that I have :-) I hope that explains where I am coming from - does it seem reasonable ? am I missing anything ? thanks again, Jules On Thursday, 20 February 2014 23:25:29 UTC, Andy Fingerhut wrote: > > H

Re: fast parallel reduction into hash-set/map

2014-02-20 Thread Jules
jury is still out, but I thought I should put my ideas out onto the forum to kick off useful discussions just like this one ... thanks for your interest, Jules On Thursday, 20 February 2014 23:51:46 UTC, shlomi...@gmail.com wrote: > > Hey Jules, > > Really nice stuff your making

Re: fast parallel reduction into hash-set/map

2014-02-20 Thread Jules
this tree up above the combined nodes, but with a smaller branching factor. Jules On Friday, 21 February 2014 00:10:19 UTC, TheBusby wrote: > > On Fri, Feb 21, 2014 at 8:51 AM, > > wrote: > >> One note about your SuperVecs idea though, it seems that using that >> app

Re: [ANN] seqspert - demystify the internals of Clojure Sequences

2014-02-20 Thread Jules
welcome :-) Jules On Friday, 21 February 2014 00:16:11 UTC, Ambrose Bonnaire-Sergeant wrote: > > Nice, thanks for releasing! > > Ambrose > > > On Fri, Feb 21, 2014 at 5:47 AM, Jules >wrote: > >> I've been teaching myself a bit about the internals of vario

1.6.0-beta2 / sumatra / graal / okra / hsa / gpgpu

2014-03-05 Thread Jules
22 23 24 25 26 27 28 29 30 31] I tried doing a little maths on the value on the way through, but that did not work :-( Too tired to say much more now - but will pick this up tomorrow and play some more. Please let me know if you are interested - I will start checking in code somewhere. Jules

Re: 1.6.0-beta2 / sumatra / graal / okra / hsa / gpgpu

2014-03-09 Thread Jules
rking graal-enabled jdk8. Here is the project - Clumatra ! https://github.com/JulesGosnell/clumatra please get in touch if you're interested. Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: XOR two arrays into a third on Clojure

2014-03-15 Thread Jules
able, then hand off a start and end point to each core and apply your solution between them. If the cost of set up and tear down does not outweigh the amount of work that you have to do you should see a fair performance boost. Jules -- You received this message because you are subscribed to

Re: fast parallel reduction into hash-set/map

2014-03-15 Thread Jules
o just put it all out there and see if anyone was interested in discussing it further - it is always good to bounce stuff of other people. that's all folks ! Jules On Friday, 21 February 2014 01:09:26 UTC, Jean Niklas L'orange wrote: > > Hi Jules, > > On Thursday, Fe

Re: fast parallel reduction into hash-set/map

2014-03-15 Thread Jules
what you would hope for, but not always as easy to achieve as you would expect. regards Jules On Friday, 21 February 2014 01:22:09 UTC, Ghadi Shayban wrote: > > Jules, > For recombination of parallel reductions into a vector, have you looked at > foldcat<https://github.com/

(bytecode 'function-that-you-want-to-view-bytecode-of) ?

2014-03-15 Thread Jules
e produced by java and clojure for loops and mathematical functions. Did they get it the hard way or is there a magic fn floating about out there which I have failed to track down. many thanks, Jules -- You received this message because you are subscribed to the Google Groups "Clojure&qu

Re: (bytecode 'function-that-you-want-to-view-bytecode-of) ?

2014-03-15 Thread Jules
H Looks like it's time I figured out how to use Cider - it appears to have support for decompiling funcs at the repl... https://github.com/clojure-emacs/cider/pull/338 Just what I want :-) Jules > > -- You received this message because you are subscribed to the Go

Re: (bytecode 'function-that-you-want-to-view-bytecode-of) ?

2014-03-16 Thread Jules
Thanks, Karsten - it is dissasembly and not decompilation that I want :-) - I'll take a look. Jules On Sunday, 16 March 2014 09:23:58 UTC, Karsten Schmidt wrote: > > Jules, there's also the no.disassemble lein plugin which works for any > repl: > > https://github

Re: (bytecode 'function-that-you-want-to-view-bytecode-of) ?

2014-03-16 Thread Jules
Yes - this is exactly what I was looking for :-) - thanks alot - will make my life much easier. Jules On Sunday, 16 March 2014 11:35:06 UTC, Jules wrote: > > Thanks, Karsten - it is dissasembly and not decompilation that I want :-) > - I'll take a look. > > Jules >

Re: fast parallel reduction into hash-set/map

2014-03-17 Thread Jules
k that it is a game-changer. We'll just have to wait and see Jules On Monday, 17 March 2014 12:15:37 UTC, Jean Niklas L'orange wrote: > > Hello, > > On Saturday, March 15, 2014 11:37:11 PM UTC+1, Jules wrote: >> >> 2. I've had a look at rrb-vector - ver

Re: ANN: no.disassemble 0.1.3 - data disassembler

2014-03-24 Thread Jules
isassembler can't be resolved (argument types: java.lang.Object, java.lang.String, unknown). If these did not crop up, no.disassemble would rock even more ! Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: Why is this code so slow?

2013-02-03 Thread Jules
The Scala version is probably faster because it uses a range (1 to top) which is represented as a pair of integers (the start and endpoint). Perhaps the JVM can even eliminate that completely with escape analysis. The Java version is repeatedly filling an ArrayList with the numbers in that rang

Re: Why is this code so slow?

2013-02-03 Thread Jules
If your goal is just to make it fast, then you should use a different algorithm, e.g. (defn bump-up "Bump up n by a multiple of x until greater than or equal to k." [n x k] (if (>= n k) n (recur (+ n x) x k))) (defn bump-up-fast "Bump up n by a multiple of x until greater than or equal

Re: Why is this so difficult?

2013-02-14 Thread Jules
You are certainly not alone. Learning the language and concepts is very easy for me, but the sysadmin stuff to get set up is so much harder. Believe it or not, I had much more trouble with installing core.logic than understanding it. It doesn't end either, you bump into more problems once you t

Re: Why is this so difficult?

2013-02-14 Thread Jules
; > Same principle for practically every single Clojure lib. > > On Friday, February 15, 2013 12:08:18 AM UTC+1, Jules wrote: >> >> You are certainly not alone. Learning the language and concepts is very >> easy for me, but the sysadmin stuff to get set up is so much harder. &

Re: Why is this so difficult?

2013-02-14 Thread Jules
a project and run it. Jules On Friday, February 15, 2013 12:34:26 AM UTC+1, vemv wrote: > > If this does not work for you, you can help everyone by opening an issue > at the Leiningen bug tracker: > > Make sure java and curl are correctly installed > Run the corresponding (unix or

Re: Why is this so difficult?

2013-02-15 Thread Jules
at least 20 hours with installation woes. The way I view it, learning the magic incantations to get a specific tool working is not useful knowledge. People would rather fill their brain with the cool stuff: how reducers, lambda, macros, core.logic work, etc. Jules On Friday, February 15, 2013 8

Re: Why is this so difficult?

2013-02-15 Thread Jules
tter what you do if you use open source" really doesn't match with my experience. There *are* easy to use open source projects. Python is another example. You're right that there are a lot of open source projects that aren't as easy, like OCaml for example, and look how succe

Re: Why is this so difficult?

2013-02-15 Thread Jules
up with an actual command that succesfully installs CCW. I suppose the -repository should have the ccw update site, but what should be the -installIU argument? 2. How to prevent CCW from hanging when creating a leiningen project. On Friday, February 15, 2013 5:19:01 PM UTC+1, Jules wrote: > &

Re: Why is this so difficult?

2013-02-15 Thread Jules
ojure development environment" or something like that. > > On Fri, Feb 15, 2013 at 5:36 PM, Jules >wrote: > >> By the way, I've been trying to write an install script for windows that >> installs leiningen + CCW. Creating a folder for all Clojure stuff, putti

Re: Why is this so difficult?

2013-02-15 Thread Jules
en an issue. >> >> I like your idea. Assuming curl is installed, when running `lein.bat >> self-install` the user could be asked whether he wants to download "a fully >> functioning Clojure development environment" or something like that. >> >> >

Re: Why is this so difficult?

2013-02-15 Thread Jules
; the newcomers, but making that happen requires a lot of effort - which > might or might not be worth it, especially considering lein devs' > contributions come from their free time (afaict). Same thing for Clojure > the language, the library ecosystem, etc. > > On Fri, Feb 15

Re: Why is this so difficult?

2013-02-15 Thread Jules
> between the current doc improvement for lein we're both participating in ( https://github.com/technomancy/leiningen/issues/1007) and the available doc for CCW (installation is one step really), are there any pain points that such a starter kit would address? A starter kit would address several

Re: Why is this so difficult?

2013-02-15 Thread Jules
re out how to do the rest of the things one needs to do in CCW, like unit testing, having java files and clojure in the same project, integrating with version control, running the whole application, and creating a packaged application/library. If this process was described in a canonical how to g

Re: Why is this so difficult?

2013-02-16 Thread Jules
@Andy: I hadn't seen that page before, and it is excellent. It explains everything step-by-step and also gives key information, for example that it is not necessary to install leiningen manually because it comes with CCW. If possible, that guide should be featured prominently on http://code.goo

Re: Clojure Performance For Expensive Algorithms

2013-02-26 Thread Jules
Clojure code should in principle be possible to execute very fast when using the same data structures. Clojure is much better behaved than languages like Ruby and Javascript from a compiler perspective. See for example the Stalin scheme compiler. It runs well written Scheme at almost C speed (s

Re: Enhanced Primitive Support

2010-06-19 Thread Jules
ersions. Yeah it's slower 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 wrote: > On Jun 18, 2010, at 10:18 PM, Mark Fredrickson wrote: > >

Re: Enhanced Primitive Support

2010-06-19 Thread Jules
On Jun 19, 3:53 pm, Rich Hickey 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 co

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 i

Re: Drawable Sets

2010-06-26 Thread Jules
perform a bit 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 wrote: > > You can store the num

Re: Memoizing a recursive function?

2010-07-22 Thread Jules
(def fib (memoize (lambda ...))) On Jul 22, 1:25 pm, Laurent PETIT 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 question. Nobod

eval and threads...

2010-08-06 Thread Jules
Can 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

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 9

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: 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" wrote: > While I think Clojure is an impressive achievement, I

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 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 eval

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 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! -- You received thi

Re: finding value nearest x

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

ClojureCLR in production ?

2011-03-23 Thread Jules
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

gen-class and state...

2011-03-23 Thread Jules
tocol and reify 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" gro

Re: gen-class and state...

2011-03-24 Thread Jules
Guys, Thanks for your replies - I'm glad I posted as this is exactly what I was looking for. I wish I had found Stuart's article when he wrote it. I had an inkling that my gen-class struggles were out of date - now I can go and rework all that code :-) Problem solved. Thanks aga

http://build.clojure.org/releases - no alpha5 alpha6.. ?

2011-03-24 Thread Jules
e, or will this release dir be updated soon ? thanks 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

Java Interop - Generics - Hmmm...

2011-03-24 Thread Jules
efore the interfaces themselves. 2. give up the ability to write further generic implementations of these interfaces in Java :-( can anyone who really knows what the situation is confirm my suspicions ? thanks for your time, Jules -- You received this message because you are subscribed to the G

Re: Java Interop - Generics - Hmmm...

2011-03-24 Thread Jules
TODO list :-) 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

Re: http://build.clojure.org/releases - no alpha5 alpha6.. ?

2011-03-24 Thread Jules
ve to investigate. Thanks for pointing me in the right direction. 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 w

Re: Java Interop - Generics - Hmmm...

2011-03-24 Thread Jules
could work - but this is all supposition - I'd be interested in hearing from someone in the know. 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

Re: http://build.clojure.org/releases - no alpha5 alpha6.. ?

2011-03-24 Thread Jules
know if there are plans to ship contrib 1.3alphas from maven central as well ? thanks 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

Re: gen-class and state...

2011-03-24 Thread Jules
which read/wrote this atom... - so I suppose this would be one way around the problem,,,] Would you mind clarifying ? Thanks 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

Re: Java Interop - Generics - Hmmm...

2011-03-24 Thread Jules
cool :-) I had a feeling that there was some vestige of generics left at runtime - now I know exactly what it is. thanks guys, Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: gen-class and state...

2011-03-25 Thread Jules
yes and that's great where the resource usage is scoped on a per-thread basis, but not a per-object basis - but then, I am thinking in OO terms again :-) Jules -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: ClojureCLR in production ?

2011-03-26 Thread Jules
Thanks for getting back to me Timothy - I'm encouraged - I'll give it a whirl. 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 m

  1   2   >