Re: Problem Running ClojureScript on OpenJDK

2011-07-21 Thread Sean Corfield
And then you can't run the resulting JS on node - anything I can try to get you guys more info? sean@sean-netbook:~/node$ node nodehello.js /home/sean/node/nodehello.js:1 (defn test-stuff node.js:134 throw e; // process.nextTick error, or 'error' event on first tick ^

Re: Problem Running ClojureScript on OpenJDK

2011-07-21 Thread Sean Corfield
FWIW, I get this same error trying to compile the basic examples for Node.js as well: cljsc nodehello.cljs {:optimizations :advanced :target :nodejs} > nodehello.js sun.org.mozilla.javascript.EvaluatorException: Encountered code generation error while compiling function "test_stuff": generated by

Re: Why that slowness?

2011-07-21 Thread Alan Malloy
On Jul 21, 2:39 pm, Tassilo Horn wrote: > Alan Malloy writes: > > Hi Alan, > > >> Any hints? > > > (1) The first version is doing way less work. It tries the first rule > > until it runs out of steam, then the second rule, then the third rule. > > If the third rule produces a structure that the f

Re: Problem Running ClojureScript on OpenJDK

2011-07-21 Thread Sean Corfield
I made these changes but still got exceptions trying to start the cljs repl (although code seemed to work just fine in the repl after this exception). I'm about to move onto node.js installation on ubuntu 11 at this point... sun.org.mozilla.javascript.EvaluatorException: Encountered code generatio

Self-joins in ClojureQL

2011-07-21 Thread Zak Wilson
SQL allows for self-joins of the form SELECT e.first_name AS 'Employee FN', e.last_name AS 'Employee LN', m.first_name AS 'Manager FN', m.last_name AS 'Manager LN' FROM employees AS e LEFT OUTER JOIN employees AS m ON e.manager =m.id I can't determine a syntax for the same in ClojureQL. The limit

Re: The Last Programming Language

2011-07-21 Thread daly
On Thu, 2011-07-21 at 23:03 -0400, Jeff Dik wrote: > On Tue, Jul 19, 2011 at 9:04 PM, daly wrote: > > On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote: > >> On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt wrote: > >> What's this awk-a-mel he speaks of? Ocaml, pronounced > >>

Re: what makes this code slow?

2011-07-21 Thread Ken Wesson
On Thu, Jul 21, 2011 at 10:58 PM, nil wrote: > Oh good -- take-while will stop right when it encounters the first > item it can't take? Yes. (filter even? [some-numbers]) will produce the even numbers from some-numbers and skip the odd ones; (take-while even? [some-numbers]) will produce the even

ClojureScript announcement video

2011-07-21 Thread Chouser
Video is now available of Rich Hickey's talk at ClojureNYC yesterday announcing ClojureScript. http://blip.tv/clojure/rich-hickey-unveils-clojurescript-5399498 Thanks to the Clojure/core team for getting this online so rapidly! --Chouser -- You received this message because you are subscribed t

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Phil Hagelberg
Matjaz Gregoric writes: > Would it be helpful to create a 1.6.1-windows tag? > > > Yes Phil, it would be nice if we could do this. Just pushed a tag. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cl

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Matjaz Gregoric
> Would it be helpful to create a 1.6.1-windows tag? > Yes Phil, it would be nice if we could do this. Matjaz -- 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 memb

Re: The Last Programming Language

2011-07-21 Thread Jeff Dik
On Tue, Jul 19, 2011 at 9:04 PM, daly wrote: > On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote: >> On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt wrote: >>         What's this awk-a-mel he speaks of?  Ocaml, pronounced >>         oh-camel, I >>         know very well, but I've never heard o

[ANN] CongoMongo 0.1.6-SNAPSHOT

2011-07-21 Thread Sean Corfield
On Clojars. Fixes (almost) all reflection warnings but should otherwise be identical to 0.1.5-SNAPSHOT. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Railo Technologies, Inc. -- http://www.getrailo.com/ "Perfection

Re: what makes this code slow?

2011-07-21 Thread nil
Oh good -- take-while will stop right when it encounters the first item it can't take? Perfect. Too bad there is a tradeoff between idioms and performance. Thanks for the help! On Jul 21, 9:15 pm, Dmitry Gutov wrote: > The first version stops as soon it encounters the first item in the > collec

Re: How to Return Vector of Vectors

2011-07-21 Thread Ken Wesson
On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson wrote: > On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus > wrote: >> And do you have a suggestion for a functional way? > > Yes. Change > > (doseq [one-full-csv-row all-csv-rows] >  (let [accumail-csv-row one-full-csv-row >        q-param (zipmap accum

Re: How to Return Vector of Vectors

2011-07-21 Thread Ken Wesson
On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus wrote: > And do you have a suggestion for a functional way? Yes. Change (doseq [one-full-csv-row all-csv-rows] (let [accumail-csv-row one-full-csv-row q-param (zipmap accumail-url-keys accumail-csv-row) accu-q-param (first (rest (

Re: what makes this code slow?

2011-07-21 Thread Dmitry Gutov
The first version stops as soon it encounters the first item in the collection that's too big. The second version filters the whole collection, which may lead to a major slowdown, depending on coll's relative size. It will also hang if coll is infinite. This should be better: (take-while #(<= % lim

Re: How to Return Vector of Vectors

2011-07-21 Thread octopusgrabbus
And do you have a suggestion for a functional way? On Jul 21, 8:05 pm, Islon Scherer wrote: > Simple: conj doesn't mutate the vector, it returns a new vector. > Clojure is a (mostly) immutable language, you're trying to solve the > problem in a imperative way, you should solve it in a functional

Re: How to Return Vector of Vectors

2011-07-21 Thread Islon Scherer
Simple: conj doesn't mutate the vector, it returns a new vector. Clojure is a (mostly) immutable language, you're trying to solve the problem in a imperative way, you should solve it in a functional way. On Jul 21, 7:48 pm, octopusgrabbus wrote: > (def accumail-url-keys ["CA", "STREET", "STREET2"

Re: clojure.contrib.profile crashes

2011-07-21 Thread Aaron Bedra
What version of Clojure are you running? Cheers, Aaron Bedra -- Clojure/core http://clojure.com On 07/21/2011 06:12 PM, Sunil S Nandihalli wrote: The reason I am not posting the code is because I am not able to reproduce this on a simple case. I was just hoping some of you may have some insig

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Changing colons to semicolons did it! I guess since the classpath is a string that's passed to Java it still treats it like it would any path on Windows, even though I'm using it through Cygwin. Thanks again! On Thu, Jul 21, 2011 at 6:49 PM, Brenton wrote: > That clojure.jar file is clojure 1.3

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Brenton
That clojure.jar file is clojure 1.3. Something is wrong with the classpath. Here are a couple of things to try: - when using a batch file the classpath must be delimited with semicolons instead of colons - try replacing lib/* with an explicit list everything that is in lib - something like lib/

How to Return Vector of Vectors

2011-07-21 Thread octopusgrabbus
(def accumail-url-keys ["CA", "STREET", "STREET2", "CITY", "STATE", "ZIP", "YR", "BILL_NO", BILL_TYPE"]) (defn ret-params "Generates all q-parameters and returns them in a vector of vectors." [all-csv-rows] (let [param-vec [[]] ] (doseq [one-full-csv-row all-csv-rows]

Re: clojure.contrib.profile crashes

2011-07-21 Thread Sunil S Nandihalli
The reason I am not posting the code is because I am not able to reproduce this on a simple case. I was just hoping some of you may have some insight with out the code.. Thanks, Sunil. On Fri, Jul 22, 2011 at 3:29 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Hello everybody, > I

clojure.contrib.profile crashes

2011-07-21 Thread Sunil S Nandihalli
Hello everybody, I have used the profiler successfully in the past. But some how it is repeatedly crashing with the following stack trace. Value out of range for int: 17069635385 [Thrown class java.lang.IllegalArgumentException] Restarts: 0: [QUIT] Quit to the SLIME top level Bac

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Hmm, I have clojure.jar, but not clojure-1.3.jar in clojurescript/lib On Thu, Jul 21, 2011 at 5:49 PM, Tamreen Khan wrote: > Yes. It worked fine. > > > On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters wrote: > >> Did you run script/bootstrap? >> >> You need a clojure-1.3 jar in your clojurescrip

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Yes. It worked fine. On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters wrote: > Did you run script/bootstrap? > > You need a clojure-1.3 jar in your clojurescript/lib directory. > > On Thursday, July 21, 2011 at 4:45 PM, Tamreen Khan wrote: > > Hi everyone, I'm trying to get the repl for Clojuresc

Re: Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Devin Walters
Did you run script/bootstrap? You need a clojure-1.3 jar in your clojurescript/lib directory. On Thursday, July 21, 2011 at 4:45 PM, Tamreen Khan wrote: > Hi everyone, I'm trying to get the repl for Clojurescript to start under > Windows but keep running into the following error: > > Excepti

Can't find clojure.main in clojurescript's script/repl on Windows

2011-07-21 Thread Tamreen Khan
Hi everyone, I'm trying to get the repl for Clojurescript to start under Windows but keep running into the following error: Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main Caused by: java.lang.ClassNotFoundException: clojure.main at java.net.URLClassLoader$1.run(URL

Re: Why that slowness?

2011-07-21 Thread Tassilo Horn
Alan Malloy writes: Hi Alan, >> Any hints? > > (1) The first version is doing way less work. It tries the first rule > until it runs out of steam, then the second rule, then the third rule. > If the third rule produces a structure that the first rule could have > matched, it will never be tried,

Re: what makes this code slow?

2011-07-21 Thread nil
Oh right. What you said is what I meant. I renamed the functions improperly and then fooled myself. But I still can't figure out why the second one is much slower. On Jul 21, 4:09 pm, Tassilo Horn wrote: > nil writes: > > Hi! > > > The two functions below should return true if the first argument

Re: what makes this code slow?

2011-07-21 Thread Tassilo Horn
nil writes: Hi! > The two functions below should return true if the first argument is > divisible by any of the prime numbers (ascending) in the second > argument, and false otherwise. Without testing, I cannot see that these functions do what you want. At least the second looks like it return

Re: Why that slowness?

2011-07-21 Thread Alan Malloy
On Jul 21, 12:15 pm, Tassilo Horn wrote: > Hi all, > > probably I don't see the forest for trees, but anyhow.  In my graph > transformation lib I have these functions for applying rules: > > --8<---cut here---start->8--- > (defn iteratively >   "Applies the func

Re: Being able to use blank?

2011-07-21 Thread Rasmus Svensson
2011/7/21 octopusgrabbus : > Thanks. You're right. > (:require [clojure.contrib.string :as cstr]) ; str already defined There should be no conflict between the var "str" (clojure.core/str) and the namespace alias "str" (clojure.string). Names for vars and namespaces never occur at the same place a

Re: Being able to use blank?

2011-07-21 Thread octopusgrabbus
Thanks. You're right. (:require [clojure.contrib.string :as cstr]) ; str already defined On Jul 21, 3:16 pm, Islon Scherer wrote: > I think it's just a sintax problem. > > (ns test-csv >   ... >   (:require [clojure.string :as str])) -- You received this message because you are subscribed to th

Re: Being able to use blank?

2011-07-21 Thread Islon Scherer
I think it's just a sintax problem. (ns test-csv ... (:require [clojure.string :as str])) -- 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

Why that slowness?

2011-07-21 Thread Tassilo Horn
Hi all, probably I don't see the forest for trees, but anyhow. In my graph transformation lib I have these functions for applying rules: --8<---cut here---start->8--- (defn iteratively "Applies the function f with args as long as it returns logical true. R

Being able to use blank?

2011-07-21 Thread octopusgrabbus
What is the proper syntax to be able to use blank? ? I've tried a bunch of things in the docs, but either the :require syntax is bad, or I get a Java exception saying blank? not recognized. Method 1 - (ns test-csv (:gen-class) (:use clojure.contrib.command-line) (:use clojure-c

what makes this code slow?

2011-07-21 Thread nil
The two functions below should return true if the first argument is divisible by any of the prime numbers (ascending) in the second argument, and false otherwise. But the second function is much slower. I haven't been able to figure out why. Can you? Also, if there is a more idiomatic way, please

Re: Need help on Replace

2011-07-21 Thread Tuba Lambanog
This works! I really appreciate your help. Thank you very much. On Jul 21, 2:33 am, Meikel Brandmeyer wrote: > Hi, > > the anonymous function takes only one argument which contains the matches. > You have to extract the data from there. > > user=> (clojure.string/replace "The coror is red." > #"(

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread pmbauer
Fair enough. That addresses my concern. -- 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 unsubsc

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread Chas Emerick
On Jul 21, 2011, at 12:40 AM, Sean Corfield wrote: > On Wed, Jul 20, 2011 at 9:34 PM, pmbauer wrote: >> Even better would be ClojureScript with maven support > > Didn't Rich say he hopes Maven doesn't come anywhere near ClojureScript? :) >> I know. >> But the sorts of (presently non-portable)

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread pmbauer
Fair enough. But, it would be nice to eventually have a ClojureScript jar available in a public maven repo someplace. Not having one would needlessly complicate projects that already use a maven-based build tool (mvn, lein, cake) and want to depend on it as part of their build. -- You receive

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread Brenton
> generated JS has path problems on windows Until this gets fixed you can work around this particular problem by using one of the available optimizations. cljsc src {:optimizations :simple} > twitterbuzz.js You may also use :whitespace or :advanced in place of :simple above. This will produce o

Re: :require farms in Clojure?

2011-07-21 Thread Phil Hagelberg
On Thu, Jul 21, 2011 at 5:59 AM, Chas Emerick wrote: > There's no way that `ns` and its constituent pieces are the last word in > defining/managing codebase topologies, but they are a bit of a local maxima.   > ns+ looks nice (I'm surprised I haven't come across it so far), but I'm > surprised t

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Phil Hagelberg
On Thu, Jul 21, 2011 at 8:38 AM, Matjaz Gregoric wrote: > It seems like the version in lein.bat is set to 1.6.1-SNAPSHOT instead of > just 1.6.1. Would it be helpful to create a 1.6.1-windows tag? -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Arie van Wingerden
Ah indeed that was the problem. Thx, Arie 2011/7/21 Matjaz Gregoric > It seems like the version in lein.bat is set to 1.6.1-SNAPSHOT instead of > just 1.6.1. > The line in the lein.bat file should say > > set LEIN_VERSION=1.6.1 > > instead of > > set LEIN_VERSION=1.6.1-SNAPSHOT > > > Matjaz > >

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Matjaz Gregoric
It seems like the version in lein.bat is set to 1.6.1-SNAPSHOT instead of just 1.6.1. The line in the lein.bat file should say set LEIN_VERSION=1.6.1 instead of set LEIN_VERSION=1.6.1-SNAPSHOT Matjaz On Thu, Jul 21, 2011 at 4:49 PM, Arie van Wingerden wrote: > Hi Matjaz, > > that is what i

Re: Excellent intro to core.logic

2011-07-21 Thread David Nolen
On Thu, Jul 21, 2011 at 10:27 AM, Meikel Brandmeyer wrote: > Hi, > > Am Donnerstag, 21. Juli 2011 16:06:23 UTC+2 schrieb Ambrose > Bonnaire-Sergeant: > > >> You do not need to look at the surrounding code to know what (geto x y > z) does. > >> It establishes the geto relation between x y z. x mus

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread Stuart Halloway
> If ClojureScript isn't "mavenified", how else do you easily make it a > dependency in a web application? Maven doesn't any problems that we have, and would add complexity to the development process and slow us down. Also, we don't want to unthinkingly drag Java presumptions into ClojureScript

Re: Problem with Leiningen 1.6.1 in Windoes

2011-07-21 Thread Arie van Wingerden
Hi Matjaz, that is what i did in the first place; however, i deleted the 1.6.1 jar (which was present), downloaded the new lein.bat 2.0.0, changed that tot 1.6.1. and now get this: D:\src\Clojure\test2>lein self-install Downloading Leiningen now... % Total% Received % Xferd Average Speed

Re: Excellent intro to core.logic

2011-07-21 Thread Ambrose Bonnaire-Sergeant
On Thu, Jul 21, 2011 at 10:27 PM, Meikel Brandmeyer wrote: > Hi, > > Am Donnerstag, 21. Juli 2011 16:06:23 UTC+2 schrieb Ambrose > Bonnaire-Sergeant: > > >> You do not need to look at the surrounding code to know what (geto x y > z) does. > >> It establishes the geto relation between x y z. x mus

Re: [ANN] ClojureScript

2011-07-21 Thread Stuart Halloway
> Where is the bug tracker for ClojureScript? Just created: http://dev.clojure.org/jira/browse/CLJS Stu Stuart Halloway Clojure/core http://clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

Re: Excellent intro to core.logic

2011-07-21 Thread Meikel Brandmeyer
Hi, Am Donnerstag, 21. Juli 2011 16:06:23 UTC+2 schrieb Ambrose Bonnaire-Sergeant: >> You do not need to look at the surrounding code to know what (geto x y z) does. >> It establishes the geto relation between x y z. x must be some key in, y must be a >> vector of key-value pairs and z must be

Re: Excellent intro to core.logic

2011-07-21 Thread Meikel Brandmeyer
Hello David, Am Donnerstag, 21. Juli 2011 15:54:56 UTC+2 schrieb David Nolen: This is something I personally don't like at all. What does this code do: >> (geto x y z)? You can't tell you have to look at the surrounding context. >> And that context can be arbitrary large. A similar example is E

Re: [ANN] ClojureScript

2011-07-21 Thread Marko Kocić
Where is the bug tracker for ClojureScript? For example I would like to report that windows scripts are missing. Regards, Marko -- 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 p

Re: Excellent intro to core.logic

2011-07-21 Thread Ambrose Bonnaire-Sergeant
On Thu, Jul 21, 2011 at 9:54 PM, David Nolen wrote: > On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer wrote: > >> Hi, >> >> Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose >> Bonnaire-Sergeant: >> >> >> > Ah, but is mapsto? a boolean predicate? :) >> >> Why should ? denote a boole

Re: Excellent intro to core.logic

2011-07-21 Thread David Nolen
On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer wrote: > Hi, > > Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose > Bonnaire-Sergeant: > > > > Ah, but is mapsto? a boolean predicate? :) > > Why should ? denote a boolean predicate? This is logic programming, not > functional programm

Re: Excellent intro to core.logic

2011-07-21 Thread Meikel Brandmeyer
Hi, Am Donnerstag, 21. Juli 2011 15:24:49 UTC+2 schrieb Ambrose Bonnaire-Sergeant: > Ah, but is mapsto? a boolean predicate? :) Why should ? denote a boolean predicate? This is logic programming, not functional programming. ;) In Mathematics i is the imaginary unit, in electrical engineering

Re: Excellent intro to core.logic

2011-07-21 Thread Ambrose Bonnaire-Sergeant
Hi Meikel, On Thu, Jul 21, 2011 at 2:19 PM, Meikel Brandmeyer wrote: > Hi, > > Am Mittwoch, 20. Juli 2011 15:28:58 UTC+2 schrieb Ambrose > Bonnaire-Sergeant: > >> I also dropped the whole walkthrough with typedo, and replaced it with an >> interesting (but much easier) look at geto. >> See "Util

Re: :require farms in Clojure?

2011-07-21 Thread Chas Emerick
On Jul 21, 2011, at 2:31 AM, pmbauer wrote: > Something akin to the clj-nstools ns+ in clojure proper would sure make life > easier. There's no way that `ns` and its constituent pieces are the last word in defining/managing codebase topologies, but they are a bit of a local maxima. ns+ looks

Re: Anyone on Google+ yet?

2011-07-21 Thread Roger Austin
-- LinkedIn: http://www.linkedin.com/pub/roger-austin/8/a4/60 Twitter: http://twitter.com/RogerTheGeek -- 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: Problem Running ClojureScript on OpenJDK

2011-07-21 Thread Kevin
I just saw this thread and that (use of internal class) does seem to be the problem. I submitted a pull request for this problem a little while ago: https://github.com/clojure/clojurescript/pull/1 On Jul 20, 9:45 pm, db wrote: > I had the same problem with open jdk on ubuntu.  It looks like op

Re: Anyone on Google+ yet?

2011-07-21 Thread Tassilo Horn
Here's mine: http://plus.google.com/106752564906713546161 Bye, Tassilo -- 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

Aw: Need help on Replace

2011-07-21 Thread Meikel Brandmeyer
Hi, the anonymous function takes only one argument which contains the matches. You have to extract the data from there. user=> (clojure.string/replace "The coror is red." #"([aeiou])(?:r)([aeiou])" (fn [[_complete-match left-vowel right-vowel]] (str left-vowel "l" right-vowel))) "The color is

Need help on Replace

2011-07-21 Thread Tuba Lambanog
Hello, Alas, spent hours on this but can't get it to work. It's looking for a pattern: r between any vowels, then replace r with l. (clojure.string/replace-first "The coror is red." #"([aeiou])(?:r) ([aeiou])" #(str %1 "l" %2)) # thanks and cheers! Tuba -- You received this message because yo