an abstraction for accessing stored data

2010-11-07 Thread faenvie
hi clojure-community, today i found this interesting blog-post about an abstraction for accessing stored data: http://anvil.io/2010/10/25/clojurize-the-data-not-the-database.html i searched the list if this was already discussed, but that seams not to be the case. would someone disagree, if i s

Re: Why isn't there a fold-right?

2010-11-07 Thread Michael Gardner
On Nov 5, 2010, at 9:03 PM, Yang Dong wrote: > Maybe because Clojure has a vector, and conj conjoins new elements to > the end of the vector, so there's mere little use of fold-right. But, > fold-right is an abstraction tool, missing it in the core is kind of > pity. What's wrong with just using

Re: Why isn't there a fold-right?

2010-11-07 Thread Laurent PETIT
2010/11/7 Alan : > Clojure's reduce is fold-left, not fold-right. My suspicion is that > fold-right is not as amenable to laziness or to tail-call recursion as > fold-right, but I don't have much experience in the area so I could be > wrong. > > What I'm surprised we're missing is unfold, not foldr

as-str function in Clojure 1.3

2010-11-07 Thread Shantanu Kumar
Hi, Some of the functions from clojure.contrib.string seem to have made it into clojure.string (e.g. blank?, replace-xxx, join etc) in Clojure master, but not 'as-str' as yet. Can somebody tell me whether 'as-str' is going to be part of clojure.string in 1.3? Regards, Shantanu -- You received t

could clojure be androids joker card

2010-11-07 Thread faenvie
hi clojure-commmunity, when learning 2 new things at a time, one is always temped to combine them and have some unrealistic fantasies. i am just reading through the meap of ??? so it's not a surprise, that i think about a combination of clojure and android. according to other discussions in the

Re: could clojure be androids joker card

2010-11-07 Thread faenvie
>>I am just reading through the meap of ??? ??? = http://www.manning.com/ableson2/ sorry -- 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 - p

Re: could clojure be androids joker card

2010-11-07 Thread Santosh Rajan
This is a subject that has interested me for a while now. While Clojure doesn't seem to work with android very well, another lisp based language called the kawa framework, that uses JVM just like Clojure, seems to work very well with android. The Kawa framework is used by the android AppInventor to

Re: could clojure be androids joker card

2010-11-07 Thread Laurent PETIT
Hopefully enough, Android support has a dedicated page on clojure dev's wiki : http://dev.clojure.org/display/design/Android+Support ! 2010/11/7 Santosh Rajan : > This is a subject that has interested me for a while now. While > Clojure doesn't seem to work with android very well, another lisp > b

Re: could clojure be androids joker card

2010-11-07 Thread Jacek Laskowski
On Sun, Nov 7, 2010 at 10:10 AM, Santosh Rajan wrote: > I would really like to see Clojure work on android the same way. Hi, I can hardly explain it myself and that's why I'm asking others whenever I stumble upon such a statement. Bear with my ignorance. I'm simply curious. Why is that importa

Re: could clojure be androids joker card

2010-11-07 Thread Santosh Rajan
I find Clojure syntax very appealing. Also Clojure is the first Lisp I have learnt. I give credit to Clojure to bringing Lisp back into the mainstream in the last couple of years. It has brought many people like me, (non Lisp, non Java) programmers like me into the fold. Having said that. Apps on

Re: map versus pmap

2010-11-07 Thread philip schwarz
yes, I started out trying the following example from Practical Clojure: (defn make-heavy [f] (fn [& args] (Thread/sleep 1000) (apply f args))) user=> (time (+ 5 5)) "Elapsed time: 0.06403 msecs" 10 user=> (time ((make-heavy +) 5 5)) "Elapsed time: 1000.622706 msecs" 10 user=>

Re: Why isn't there a fold-right?

2010-11-07 Thread Ken Wesson
On Sun, Nov 7, 2010 at 3:04 AM, Laurent PETIT wrote: > 2010/11/7 Alan : >> Clojure's reduce is fold-left, not fold-right. My suspicion is that >> fold-right is not as amenable to laziness or to tail-call recursion as >> fold-right, but I don't have much experience in the area so I could be >> wron

Re: as-str function in Clojure 1.3

2010-11-07 Thread Stuart Sierra
It will not. Instead, the "clojure.core/name" function now accepts string arguments, returning the string unchanged. -S On Nov 7, 3:15 am, Shantanu Kumar wrote: > Hi, > > Some of the functions from clojure.contrib.string seem to have made it > into clojure.string (e.g. blank?, replace-xxx, joi

clojure-contrib 1.3.0-alpha3 deployed to build.clojure.org

2010-11-07 Thread Stuart Sierra
http://build.clojure.org/releases/org/clojure/contrib/ -- 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 po

Re: Why isn't there a fold-right?

2010-11-07 Thread David Sletten
You could define a naive 'foldr' like this: (defn foldr [f coll] (if (empty? (rest coll)) (first coll) (f (first coll) (foldr f (rest coll ) (foldr list '(1 2 3 4)) => (1 (2 (3 4))) (foldr - [1 2 3 4]) => -2 However, this is not a tail-recursive function and will be limited by the s

Re: Why isn't there a fold-right?

2010-11-07 Thread iko...@gmail.com
2010/11/7 David Sletten > Or for those of you who prefer that other people won't be able to read your > code: > (defn foldr [f coll] > (reduce #(f %2 %1) (reverse coll))) > > To be honest, I find this one more readable... -- You received this message because you are subscribed to the Google Gr

Re: Python is way faster than Clojure on this task

2010-11-07 Thread Justin Kramer
Implementing this in straight Java might help pinpoint whether this is a JVM issue or a Clojure issue. Also, FYI, there is clj-glob (https://github.com/jkk/clj-glob) for finding files based on patterns like */*/*.dat Justin On Nov 4, 4:28 pm, Pepijn de Vos wrote: > Hi all, > > I have written a

Re: Why isn't there a fold-right?

2010-11-07 Thread nicolas.o...@gmail.com
On Sun, Nov 7, 2010 at 3:28 PM, iko...@gmail.com wrote: > 2010/11/7 David Sletten >> >> Or for those of you who prefer that other people won't be able to read >> your code: >> (defn foldr [f coll] >>  (reduce #(f %2 %1) (reverse coll))) >> > fold-right can not be made tail-recursive and in one-p

Re: Python is way faster than Clojure on this task

2010-11-07 Thread Gijs S.
The problem is not the freqs function. The implementation in Python and in Clojure are different algorithms. Both produce a graph with the number of blocks per layer per type, for 6 particular types. These six types are the Clay, Coal ore, Diamond ore, Gold ore, Iron ore, Obsidian, and Redstone or

IntelliJ IDEA/La Clojure with Clojure 1.2?

2010-11-07 Thread Shantanu Kumar
Hi, Has anybody been able to run La Clojure (IntelliJ IDEA Community Edition 9.0) with Clojure 1.2? The built-in Clojure version in LaClojure are 1.0 and 1.1 and there doesn't seem to be a way to ask LaClojure to use another Clojure JAR or not use either on its own. Regards, Shantanu -- You rec

Re: IntelliJ IDEA/La Clojure with Clojure 1.2?

2010-11-07 Thread Shantanu Kumar
For now I just went ahead and replaced existing LaClojure/clojure.jar (1.1) with clojure-1.2.0.jar and it seems to be working fine, but any pointer that doesn't force me to use this hack would be appreciated. Regards, Shantanu On Nov 8, 1:03 am, Shantanu Kumar wrote: > Hi, > > Has anybody been a

Re: clojure-contrib 1.3.0-alpha3 deployed to build.clojure.org

2010-11-07 Thread Sean Corfield
Thanx Stuart! As a general point of protocol, would the Clojure team prefer folks test against the Alpha builds or the (master) SNAPSHOT builds? Sean On Sun, Nov 7, 2010 at 6:50 AM, Stuart Sierra wrote: > http://build.clojure.org/releases/org/clojure/contrib/ -- You received this message beca

Re: Python is way faster than Clojure on this task

2010-11-07 Thread Benny Tsai
Great catch, Gijs! On Nov 7, 9:32 am, "Gijs S." wrote: > The problem is not the freqs function. The implementation in Python > and in Clojure are different algorithms. > > Both produce a graph with the number of blocks per layer per type, for > 6 particular types. These six types are the Clay, Co

Re: could clojure be androids joker card

2010-11-07 Thread Mike Meyer
On Sun, 7 Nov 2010 12:42:09 +0100 Jacek Laskowski wrote: > On Sun, Nov 7, 2010 at 10:10 AM, Santosh Rajan wrote: > > > I would really like to see Clojure work on android the same way. > > Hi, > > I can hardly explain it myself and that's why I'm asking others > whenever I stumble upon such a

Re: Why isn't there a fold-right?

2010-11-07 Thread Yang Dong
If that's the case, I can accept it. Thank you guys :) On Nov 8, 2:18 am, "nicolas.o...@gmail.com" wrote: > On Sun, Nov 7, 2010 at 3:28 PM, iko...@gmail.com wrote: > > 2010/11/7 David Sletten > > >> Or for those of you who prefer that other people won't be able to read > >> your code: > >> (def

Re: could clojure be androids joker card

2010-11-07 Thread Miki
You might find http://www.slideshare.net/smartrevolution/using-clojure-nosql-databases-and-functionalstyle-javascript-to-write-gextgeneration-html5-apps an interesting alternate approach. As I see it a language is a tool, and I'm still not convinced that Clojure is the right tool for UI. On Nov 7,

CUBRID JDBC driver is on Clojars

2010-11-07 Thread Shantanu Kumar
Hi, Just a heads up to all. I got in touch with CUBRID guys for a Maven repo for their JDBC driver. They have uploaded it on Clojars and have said they would maintain it there in future: http://clojars.org/org.clojars.cubrid/cubrid-jdbc I will soon include this in OSS-JDBC and do a v0.3 release:

ANN: Durable Clojure - Phase II - Persistent Data Structures

2010-11-07 Thread Alyssa Kwan
Extension of http://groups.google.com/group/clojure/browse_thread/thread/561230749be02f28 Hi everyone! I've continued hacking the Clojure core to extend durability. 1. Durable atoms and agents are now supported in addition to refs, using (datom) and (dagent) respectively. 2. Keywords and symbol