ClojureScript Presentation - video

2011-07-21 Thread Harrison Maseko
Hi all, I did not watch the live cast of Rich's presentation on ClojureScript. Could someone please point me to a video or audio recording of the presentation if there's one somewhere on the Web? Thanks, -h. -- You received this message because you are subscribed to the Google Groups Clojure

Re: Excellent intro to core.logic

2011-07-21 Thread Meikel Brandmeyer
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 Utility Function: geto for the new section.

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread pmbauer
I know. But the sorts of (presently non-portable) scripts in scripts (see bootstrap, repl) ad-hoc test strategy, etc in ClojureScript are begging for dependency management and a build tool. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: BUG REPORT: ClojureScript : Portable Path Support

2011-07-21 Thread pmbauer
If ClojureScript isn't mavenified, how else do you easily make it a dependency in a web application? -- 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: :require farms in Clojure?

2011-07-21 Thread pmbauer
Something akin to the clj-nstools ns+ in clojure proper would sure make life easier. -- 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

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)) #CompilerException java.lang.IllegalArgumentException: Wrong number of

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 red.

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

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 donald.bl...@gmail.com wrote: I had the same problem with open jdk on

Re: Anyone on Google+ yet?

2011-07-21 Thread Roger Austin
https://plus.google.com/117357905892731200369 -- 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

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: 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 m...@kotka.de 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

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 David Nolen
On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer m...@kotka.de 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

Re: Excellent intro to core.logic

2011-07-21 Thread Ambrose Bonnaire-Sergeant
On Thu, Jul 21, 2011 at 9:54 PM, David Nolen dnolen.li...@gmail.com wrote: On Thu, Jul 21, 2011 at 9:45 AM, Meikel Brandmeyer m...@kotka.de 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 ?

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

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

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 a

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

Re: Excellent intro to core.logic

2011-07-21 Thread Ambrose Bonnaire-Sergeant
On Thu, Jul 21, 2011 at 10:27 PM, Meikel Brandmeyer m...@kotka.de 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

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\test2lein self-install Downloading Leiningen now... % Total% Received % Xferd Average Speed

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: Excellent intro to core.logic

2011-07-21 Thread David Nolen
On Thu, Jul 21, 2011 at 10:27 AM, Meikel Brandmeyer m...@kotka.de 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

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 xapw...@gmail.comwrote: Hi Matjaz,

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 gre...@gmail.com 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 Phil Hagelberg
On Thu, Jul 21, 2011 at 8:38 AM, Matjaz Gregoric gre...@gmail.com 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

Re: :require farms in Clojure?

2011-07-21 Thread Phil Hagelberg
On Thu, Jul 21, 2011 at 5:59 AM, Chas Emerick cemer...@snowtide.com 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

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

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

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 paul.michael.ba...@gmail.com 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

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

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 m...@kotka.de 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.

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

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

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.

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

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 islonsche...@gmail.com wrote: I think it's just a sintax problem. (ns test-csv   ...   (:require [clojure.string :as str])) -- You received this message because you

Re: Being able to use blank?

2011-07-21 Thread Rasmus Svensson
2011/7/21 octopusgrabbus octopusgrab...@gmail.com: 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

Re: Why that slowness?

2011-07-21 Thread Alan Malloy
On Jul 21, 12:15 pm, Tassilo Horn tass...@member.fsf.org 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  

Re: what makes this code slow?

2011-07-21 Thread Tassilo Horn
nil ache...@gmail.com 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

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 tass...@member.fsf.org wrote: nil ache...@gmail.com writes: Hi! The two functions below should

Re: Why that slowness?

2011-07-21 Thread Tassilo Horn
Alan Malloy a...@malloys.org 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

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

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: Exception

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 dev...@gmail.com 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

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 histor...@gmail.com wrote: Yes. It worked fine. On Thu, Jul 21, 2011 at 5:48 PM, Devin Walters dev...@gmail.com wrote: Did you run script/bootstrap? You need a clojure-1.3

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

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

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] (let

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

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 bashw...@gmail.com wrote: That clojure.jar

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

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 octopusgrab...@gmail.com wrote: (def accumail-url-keys

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 islonsche...@gmail.com 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

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 #(= %

Re: How to Return Vector of Vectors

2011-07-21 Thread Ken Wesson
On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus octopusgrab...@gmail.com 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)

Re: How to Return Vector of Vectors

2011-07-21 Thread Ken Wesson
On Thu, Jul 21, 2011 at 10:13 PM, Ken Wesson kwess...@gmail.com wrote: On Thu, Jul 21, 2011 at 8:36 PM, octopusgrabbus octopusgrab...@gmail.com 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

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 raa...@gmail.com wrote: The first version stops as soon it encounters the first item

[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: The Last Programming Language

2011-07-21 Thread Jeff Dik
On Tue, Jul 19, 2011 at 9:04 PM, daly d...@axiom-developer.org wrote: On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote: On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt bhur...@gmail.com wrote:         What's this awk-a-mel he speaks of?  Ocaml, pronounced         oh-camel, I         know

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 members

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

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 d...@axiom-developer.org wrote: On Tue, 2011-07-19 at 20:14 -0400, Adam Richardson wrote: On Tue, Jul 19, 2011 at 6:23 PM, Brian Hurt bhur...@gmail.com wrote: What's this awk-a-mel he speaks of?

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