Re: clojurescript and regular expr.

2012-08-11 Thread Vincent
code entry is a map entry , to-match is string for (defn matchName [ entry to-match] (let [match-str (.toLowerCase to-match) str-pattern (re-pattern (str "(" match-str ")")) m (re-matcher str-pattern (.toLowerCase (:name entry)))] (when (re-find m) entry))) how t

Re: use pmap but ensure that original ordering is retained?

2012-08-11 Thread Ben Smith-Mannschott
Yes, pmap behaves as map with respect to the ordering of the elements of the resulting sequence. // ben On Sat, Aug 11, 2012 at 9:29 PM, Jim - FooBar(); wrote: > Hi all, > > I was wondering what assumptions does pmap take with regards to the ordering > of the resulting seq? Can I assume it retai

Re: core.logic: (run* [q] (membero :x #{:x})) -> ()

2012-08-11 Thread David Nolen
On Sat, Aug 11, 2012 at 2:14 PM, Moritz Ulrich wrote: > > Hi, fellow logic programmers! > > > Shouldn't `membero' work with sets? > > I notice that > > (run* [q] (membero :x #{:x})) > > returns no results while > > (run* [q] (membero :x (seq #{:x}))) > > returns the (in my opinion) correct res

core.logic: (run* [q] (membero :x #{:x})) -> ()

2012-08-11 Thread Moritz Ulrich
Hi, fellow logic programmers! Shouldn't `membero' work with sets? I notice that (run* [q] (membero :x #{:x})) returns no results while (run* [q] (membero :x (seq #{:x}))) returns the (in my opinion) correct result: (:x). Can someone explain this behavior to me? It seems strange. -- M

use pmap but ensure that original ordering is retained?

2012-08-11 Thread Jim - FooBar();
Hi all, I was wondering what assumptions does pmap take with regards to the ordering of the resulting seq? Can I assume it retains the original ordering or does it just cons whatever future returns earlier? In other words can I do this and feel safe? --

Re: Better ideas how to collect analytics data

2012-08-11 Thread Maik Schünemann
Using maps in clojure is very idiomatic if the structure fits to your data. Do you experience performance problems? Dependent on the data you are modeling you could split the master maps in several smaller ones. If performance gets really important you can use records instead of maps. It would be

Re: Any chance for Ratio and BigInt support in ClojureScript?

2012-08-11 Thread David Nolen
On Sun, Aug 5, 2012 at 10:43 PM, Olaf Delgado-Friedrichs wrote: > Thanks for the link! I didn't know that the Closure library contained an > arbitrary precision type, but should have expected it. > > When you speak of performance, do you mean the extra cost of checking > argument types for the ari

Re: clojurescript and regular expr.

2012-08-11 Thread Maik Schünemann
Could you please post the relevant code? Note that clojurescript uses Javascript regular expression syntax and not javas Am 11.08.2012 17:02 schrieb "Vincent" : > dear all , > i am trying a search a string in a clojure map data and then want to > return the result to be viewed in webpage > so usin

clojurescript and regular expr.

2012-08-11 Thread Vincent
dear all , i am trying a search a string in a clojure map data and then want to return the result to be viewed in webpage so using clojurescript .but regular expr. of clojure is not supported it seems as error is showing when lein cljsbuild ...how to work around thru this? any example? thanks

Re: How to measure pieces of Clojure code?

2012-08-11 Thread nicolas.o...@gmail.com
Visualvm is quite nice and simple to use. On 10 Aug 2012 23:21, "Hussein B." wrote: > Hi, > I want to measure how much space an algorithm is taking and then trying to > change some aspects to see how things are going to differ. > I also want to measure how much time it takes to complete an operat

Re: A "ClojureScript One" Question: Why is so much html created on the client side.

2012-08-11 Thread john
Hello, thank you very much for your comments! I didn't know before about the term "SPA" (http://en.wikipedia.org/wiki/Single-page_application) I guess a sign of being too "Conservative" (-: ! I am trying to re-implement a swing app with clojure script. Before seeing Clojurescriptone I was only