Clojurescript libraries for MVC and state management

2012-05-16 Thread Murtaza Husain
Hi, Are there any clojurescript libraries / frameworks for mvc, or state management ? I have come across clojurescript one and waltz. Thanks, Murtaza -- 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: Is there a Clojure lib for web scraping?

2012-05-16 Thread Z.A
Thanks. I ll try all of these. Previously I was using Perl/ WWW::Mechanize for such uses. Now want to do everything in Clojure. On May 16, 5:00 pm, Benny Tsai wrote: > There's also clj-webdriver [1], which can drive a browser and also offers > CSS-style querying capability. > > [1]https://github.

Re: Idiomatic usage of partial

2012-05-16 Thread Alan Malloy
On May 16, 2:05 pm, Stuart Sierra wrote: > Every literal instance of `fn` or `#()` compiles to a new class definition. > This is only at compile time: once the code is running, each execution of > the `fn` expression merely creates an instance of that class. > > partial is implemented in terms of

Re: [ANN] ClojureScript release 0.0-1236

2012-05-16 Thread Evan Mezeske
Looks awesome! I just pushed out lein-cljsbuild 0.1.10, with the sole change being that it depends on ClojureScript 0.0-1236. On Wednesday, May 16, 2012 1:50:55 PM UTC-7, Stuart Sierra wrote: > > http://build.clojure.org/job/clojurescript-release/12/ > > Highlights: > > - Reducers > - Dependenci

Re: Clojure Bee iPhone app updated

2012-05-16 Thread Softaddicts
Just installed it on my iPad, it's worth the dollar :) Luc > Just a quick announcement that the Clojure Bee iPhone app was just > updated. This release eliminates crashiness and updates the font for > the source code view. > > More info on the app here: > http://itunes.apple.com/us/app/clojure

Re: [ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-05-16 Thread Andy Fingerhut
Did you use the instructions under "Install & Start-up" on this page? https://github.com/franks42/clj-ns-browser Also, what OS are you using (and if Windows, are you using Cygwin, too?), and what do you get as output of the command "lein version"? Thanks, Andy On May 16, 2012, at 6:16 PM, then

Re: [ANN] Clojure Namespace Browser (clj-ns-browser "1.0.0")

2012-05-16 Thread thenwithexpandedwingshesteershisflight
I get NoSuchMethodError org.apache.http.conn.ssl.SSLSocketFactory.(Lorg/apache/http/conn/ssl/TrustStrategy;)V clj-http.core/fn--5014 (core.clj:64) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googleg

Clojure Bee iPhone app updated

2012-05-16 Thread mudphone
Just a quick announcement that the Clojure Bee iPhone app was just updated. This release eliminates crashiness and updates the font for the source code view. More info on the app here: http://itunes.apple.com/us/app/clojure-bee-api-documentation/id524862532?ls=1&mt=8 Anyone interested in a free

Request to create new contrib: data.dependency

2012-05-16 Thread Stuart Sierra
As part of my long-delayed effort to get namespace dependency parsing into Contrib, I offer the clojure.data.dependency library: https://github.com/stuartsierra/data.dependency This is wholly my own work. I give permission to release it under the Clojure Contributor Agreement. -S -- You rece

Re: deps.js in cljsbuild?

2012-05-16 Thread Evan Mezeske
Mefesto's solution is correct. I wrote a brief justification for why you need to set CLOSURE_NO_DEPS=true in lein-cljsbuild's simple example: https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/simple/src-clj/example/views.clj#L8 On Monday, May 14, 2012 6:21:06 AM UTC-7, Mur

Re: Idiomatic usage of partial

2012-05-16 Thread Stuart Sierra
Every literal instance of `fn` or `#()` compiles to a new class definition. This is only at compile time: once the code is running, each execution of the `fn` expression merely creates an instance of that class. partial is implemented in terms of `fn`, so every usage of `partial` merely creates

Re: Is there a Clojure lib for web scraping?

2012-05-16 Thread Benny Tsai
There's also clj-webdriver [1], which can drive a browser and also offers CSS-style querying capability. [1] https://github.com/semperos/clj-webdriver On Wednesday, May 16, 2012 2:33:05 AM UTC-7, Z.A wrote: > > Hi > Is there a good Clojure lib for web scraping. I intend to collect > story link

[ANN] New Google Closure Library JARs (incl third-party)

2012-05-16 Thread Stuart Sierra
http://search.maven.org/#search%7Cga%7C1%7Cgoogle%20closure I have pushed out new releases of the Google Closure Library JARs. You can now get these dependencies directly from Maven Central: [org.clojure/google-closure-library "0.0-1376"] [org.clojure/google-closure-library-third-party "0.0-137

[ANN] ClojureScript release 0.0-1236

2012-05-16 Thread Stuart Sierra
http://build.clojure.org/job/clojurescript-release/12/ Highlights: - Reducers - Dependencies on latest Google Closure Compiler and Library - Partial support for of data reader functions (tagged literals) -- You received this message because you are subscribed to the Google Groups "Clojure" grou

Re: what is the deal with ArraySeq?

2012-05-16 Thread Vinzent
Just a side note: you'd easily find the problem if you'd use contract programming facilities of clojure (via pre- and post-conditions, or better clojure-contracts (shameless plug)). среда, 16 мая 2012 г., 22:34:08 UTC+6 пользователь Jim foo.bar нап

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
Happy to help. As for the error, well, you simply need to pick your preferred semantics for the final parameter ("the (single) final argument" or "all the remaining arguments") and use it consistently within your function. Happy sunspot hacking (maybe you could post a few words about your use cas

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
The error was precise regarding the issue and location. If you printed out data in make-data you would have seen that it was an array wrapped in a seq. David On Wed, May 16, 2012 at 2:45 PM, Jim - FooBar(); wrote: > Oo it worked!!! > > Thanks a lot guys - you're the best honestly! > > You h

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
Oo it worked!!! Thanks a lot guys - you're the best honestly! You have to admit though - that was a weird error! Jim On 16/05/12 19:42, Michał Marczyk wrote: That's fine. You can leave the& be and use (doubles (first data)) in the "problematic clause". M. On 16 May 2012 20:41, Jim

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
That's fine. You can leave the & be and use (doubles (first data)) in the "problematic clause". M. On 16 May 2012 20:41, Jim - FooBar(); wrote: > Really OMG...why so? what if I sometimes need more than one array - for > example in the data-set case? > > Jim > > > On 16/05/12 19:38, Michał M

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
Really OMG...why so? what if I sometimes need more than one array - for example in the data-set case? Jim On 16/05/12 19:38, Michał Marczyk wrote: You need to remove the& from the params vector of make-data. Cheers, M. On 16 May 2012 20:35, Jim - FooBar(); wrote: This is 'make-data'

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Armando Blancas
> > > I think the problem might also be that the failing tests are Java tests > calling Java code, which is trying to call Clojure. > Usually I'd have Clojure code consuming Java code; then Java and/or Clojure tests consuming compiled code, including classes from gen-class. But given the order

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
As Michael pointed out the rest arg is messing things up. On Wed, May 16, 2012 at 2:39 PM, Jim - FooBar(); wrote: > On 16/05/12 19:38, David Nolen wrote: > >> What's actually on line 37? >> > > (do (. twa analyze (doubles data)) > > the error originates here... > > JIm > > > -- > You received thi

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
On 16/05/12 19:38, David Nolen wrote: What's actually on line 37? (do (. twa analyze (doubles data)) the error originates here... JIm -- 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 No

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
You need to remove the & from the params vector of make-data. Cheers, M. On 16 May 2012 20:35, Jim - FooBar(); wrote: > This is 'make-data': (only look at the :temporal-window clause)... > > (defn make-data > "Constructs a MLData object given some data" > [of-type & data] > (condp = of-type >  

Re: Idiomatic usage of partial

2012-05-16 Thread Jay Fields
Someone once mentioned that partials are more performant. i.e. (partial println "foo") is better than #(println "foo" %). I can't remember why, something about creating classes under the covers, I believe. Hopefully someone can chime in. Personally, I used to use #(... %) due to it being less char

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
This is 'make-data': (only look at the :temporal-window clause)... (defn make-data "Constructs a MLData object given some data" [of-type & data] (condp = of-type :basic (BasicMLData. (double-array data)) :basic-complex nil;;TODO :basic-dataset (BasicMLDataSet. (into-array (map do

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
On Wed, May 16, 2012 at 1:59 PM, Jim - FooBar(); wrote: > > ClassCastException [D cannot be cast to java.lang.Number > clojure.lang.Numbers.double_array (Numbers.java:1068) > clojure-encog.training/make-data/fn--963 (training.clj:37) > As Aaron has already mentioned - what is going on in

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
I'm sorry i made a mistake again... '(doto (doubles data) ((comp prn class))) ' deos absolutely nothing! Nothing is being printed! However the other suggestion (into-array Double/TYPE data) throws the error described in my previous email. THat is why i got suspicious and looked inside data.

Re: what is the deal with ArraySeq?

2012-05-16 Thread Aaron Cohen
I believe that your problem is in "make-data". If I understand correctly, "data" has been closed over and is fixed at whatever value it happened to be when you first defined "make-data". You need it to change make-data so that it returns a new function every time, not one that has closed over data

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread dgrnbrg
I too assumed that if/when-let would support multiple bindings, short- circuiting if one failed, when I started learning Clojure. It seems that short-circuiting multiple bindings isn't surprising. On May 16, 10:56 am, Jay Fields wrote: > I've also attempted to use if/when-let with multiple bindin

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
On 16/05/12 19:11, Michał Marczyk wrote: , is the output of normalize transformed in any way before being passed on to the method which blow up? no it is not...give me 2 min to try the other suggestions... Jim -- You received this message because you are subscribed to the Google Groups "Cloju

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
Also, does (into-array Double/TYPE data) work? If it does, it's not the ideal solution, but at least we could rule out some possible causes... Cheers, M. On 16 May 2012 20:11, Michał Marczyk wrote: > Also, is the output of normalize transformed in any way before being > passed on to the meth

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
Also, is the output of normalize transformed in any way before being passed on to the method which blow up? M. On 16 May 2012 20:09, Michał Marczyk wrote: > Could you replace (doubles data) in that troublesome spot with > > (doto (doubles data) ((comp prn class))) > > and note what gets printed

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
Could you replace (doubles data) in that troublesome spot with (doto (doubles data) ((comp prn class))) and note what gets printed? M. On 16 May 2012 19:59, Jim - FooBar(); wrote: > Yes that gave me a stack trace but it does not give me more info than i > already know...For examlple i know th

Re: Idiomatic usage of partial

2012-05-16 Thread Jim - FooBar();
One of the best examples of partial that I've seen is in the debug-repl...look it up on github and see how it is being used there in the main function that starts the debug repl...basically every time you invoke the debug-repl within the same repl session you're going to have different local bi

Re: Iteration or reduction on a transient map

2012-05-16 Thread Michał Marczyk
Well, I don't know if it's an explicit design goal of transients to not support these kinds of operations or if noone felt the need for them strongly enough to implement them. I believe transients are not meant to be the final solution to the problems which are currently addressed through their us

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
Yes that gave me a stack trace but it does not give me more info than i already know...For examlple i know the exception occurs at the call to analyze...the question is why? 'analyze' and 'process' both expect a double-array and a double-array is what 'normalize' delivers... ClassCastException

Idiomatic usage of partial

2012-05-16 Thread Murtaza Husain
Hi, What is the idiomatic use of partial. I understand it helps create closures, however the reader notation also allows to the same. So when should partial be use dover other forms of creating functions. Thanks, Murtaza -- You received this message because you are subscribed to the Google Gr

Unable to trigger / dispatch a browser event

2012-05-16 Thread Murtaza Husain
Hi, I am trying to trigger / dispatch click event on a button. The following code works in the browser - $ ("button").trigger ("click") However I am not able to trigger the same from my cljs code (I am using domina) - (defn enter-to-click "It captures the enter event on the given element sel

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
On 16/05/12 18:37, Michał Marczyk wrote: Anyway -- does the function displayed in function.png work if you just type it in at the REPL (wrapped in a (let [data some-array-of-doubles] ...), I guess)? Hey Michal... Yes you're right, the fucntions on their own work just fine...I've attached a sc

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
Also did you try Aaron Cohen's suggestion, did that give you the full trace? On Wed, May 16, 2012 at 1:41 PM, Jim - FooBar(); wrote: > No I have a minimal setup with gedit + emebedded terminal for editing > files and a differrent terminal open for testing individual functions...and > of course i

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
What are NormalizeArray and TemporaryWindow? Java classes, deftypes, defrecords? What does the source look like for those? On Wed, May 16, 2012 at 1:41 PM, Jim - FooBar(); wrote: > No I have a minimal setup with gedit + emebedded terminal for editing > files and a differrent terminal open for te

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
No I have a minimal setup with gedit + emebedded terminal for editing files and a differrent terminal open for testing individual functions...and of course i use 'lein new' and load-file to load my namespaces in. Jim On 16/05/12 18:38, David Nolen wrote: But *how* are you using leiningen2 t

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
But *how* are you using leiningen2 to test this? With swank & Emacs? On Wed, May 16, 2012 at 1:35 PM, Jim - FooBar(); wrote: > Well, suspect or not that is what is happening under leiningen2...in all > fairness this rarely happens - ususally the errors originate from my code > and sometimes for

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Matthew Boston
Here's my sequence and results: [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) [INFO] --- clojure-maven-plugin:1.3.4:compile (clojure-compile) [INFO] --- maven-resources-plugin:2.4.3:testResources (default-tes

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
On 16 May 2012 19:18, Jim - FooBar(); wrote: > But it is already a double array, or at least it should be because that is > what normalize returns...Why start copying into a new array? Oh ok, so that's what data is. I got confused. Anyway -- does the function displayed in function.png work if yo

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
Well, suspect or not that is what is happening under leiningen2...in all fairness this rarely happens - ususally the errors originate from my code and sometimes for really "complicated" stuff i have big stack traces...this particular example is very straight forward, all the functions have been

Re: Iteration or reduction on a transient map

2012-05-16 Thread nicolas.o...@gmail.com
So, if I have a transient and want to reduce it and then continue to use it transiently, I need to call persistent!, reduce and transient again. Is there a reason for that? (The documentation says that read operation are allowed. And it is actually possible to write a reduce for a transient vecto

Re: what is the deal with ArraySeq?

2012-05-16 Thread David Nolen
clojure.lang.Numbers.doubles_array takes a Number or ISeq. The fact that you're not getting precise line numbers for the error in your own source is suspect. How are you compiling and testing your code? David On Wed, May 16, 2012 at 1:18 PM, Jim - FooBar(); wrote: > But it is already a double a

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
But it is already a double array, or at least it should be because that is what normalize returns...Why start copying into a new array? anyway, I tried it and i get this instead: ClassCastException [D cannot be cast to java.lang.Number clojure.lang.Numbers.double_array (Numbers.java:1068) I

Re: what is the deal with ArraySeq?

2012-05-16 Thread Aaron Cohen
On Wed, May 16, 2012 at 1:04 PM, Jim - FooBar(); wrote: > This is the only error I'm getting - there is no stack trace or at least > i can not see it...I'm inside leiningen 2 preview 4... I can however > provide 2 screenshots confirming what is happening. > Your most recent exception should be s

Re: what is the deal with ArraySeq?

2012-05-16 Thread Michał Marczyk
You probably want to use double-array rather than doubles. The former creates an array, the latter is a cast. Cheers, Michał On 16 May 2012 19:04, Jim - FooBar(); wrote: > This is the only error I'm getting - there is no stack trace or at least i > can not see it...I'm inside leiningen 2 previe

Re: Iteration or reduction on a transient map

2012-05-16 Thread Michał Marczyk
If you want to reduce the map, there's nothing to be gained from the map being transient -- just use reduce-kv (or reduce pre-1.4) on the persistent map. If you want to map over the entries, again, there's nothing to be gained from the map being transient. (But if you want to pour the transformed

Re: what is the deal with ArraySeq?

2012-05-16 Thread Walter Tetzner
On Wednesday, May 16, 2012 12:51:15 PM UTC-4, Jim foo.bar wrote: > > I guess what I'm asking is at which point does the array become an > ArraySeq and why casting it back to a double array with 'doubles' doesn't > work? > Can you post the whole stack trace? -Walter -- You received this mess

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
I guess what I'm asking is at which point does the array become an ArraySeq and why casting it back to a double array with 'doubles' doesn't work? Jim On 16/05/12 17:40, Walter Tetzner wrote: On Wednesday, May 16, 2012 12:34:08 PM UTC-4, Jim foo.bar wrote: -

Re: what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
On 16/05/12 17:40, Walter Tetzner wrote: On Wednesday, May 16, 2012 12:34:08 PM UTC-4, Jim foo.bar wrote: --- (defn normalize [data high-end low-end] (let [norm (NormalizeArray.)]

Re: what is the deal with ArraySeq?

2012-05-16 Thread Walter Tetzner
On Wednesday, May 16, 2012 12:34:08 PM UTC-4, Jim foo.bar wrote: > --- > > > (defn normalize > [data high-end low-end] > (let [norm (NormalizeArray.)] > (do (. norm setNormalizedHigh high-end) >

what is the deal with ArraySeq?

2012-05-16 Thread Jim - FooBar();
Hello all... I've been stuck for a good 2 hours trying to figure out why I'm getting this exception on a very simple example: ClassCastException clojure.lang.ArraySeq cannot be cast to [D clojure.lang.Numbers.doubles (Numbers.java:1280) I have 2 very simple functions: -

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Armando Blancas
Can you post the error? It's hard to tell without looking at the details. As you've may have seen, the order is this: [INFO] [resources:resources {execution: default-resources}] [INFO] [compiler:compile {execution: default-compile}] [INFO] [clojure:compile {execution: compile-clojure}] [INFO] [res

Re: EPL License Problem

2012-05-16 Thread Phil Hagelberg
I've never heard of this problem. The EPL is considered a fairly business-friendly license. Perhaps someone is confusing it with strong-copyleft. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googl

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Matthew Boston
Armando, Thanks for your help. I was using `com. theoryinpractise.clojure-maven-plugin` at first but recently switched because I figured the other would help (seeing that it was built by Stuart Sierra.. I've switched back now, but stil receiving an error. When I `mvn compile` all is fine and

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Jay Fields
I've also attempted to use if/when-let with multiple bindings in the past. I assumed that it would behave as 'AND' and that no bindings would be available in 'else' Cheers, Jay On Wed, May 16, 2012 at 10:29 AM, Dan Cross wrote: > On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen wrote: > > On Wed,

Re: Assuring avalaibility of ring web apps

2012-05-16 Thread Murtaza Husain
Tim thanks for the link, I will give it a go. Kyle appreciate the detailed explanation, yes will try to put in practice through ELB, but I am not sure if I can switch the configs like you do with nginx. On Wednesday, May 16, 2012 7:32:59 PM UTC+5:30, Kyle Burton wrote: > > > I'm not personal

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Armando Blancas
This repo and plugin tags should do it. clojure-releases http://build.clojure.org/releases ... com.theoryinpractise clojure-maven-plugin 1.3.4 compile-clojure compile c

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Dan Cross
On Wed, May 16, 2012 at 9:16 AM, Aaron Cohen wrote: > On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner > wrote: >> To make the bindings work like let, where later bindings can see previous >> bindings, I think the most natural way to do it is to have the bindings >> behave like the maybe monad. >

ANN Welle, a Clojure client for Riak with batteries included

2012-05-16 Thread Michael Klishin
I am happy to announce Welle [1], a Clojure client for Riak with batteries included. Welle supports almost all Riak 1.x features: * K/V operations * Bucket operations * Secondary indexes * Map/reduce queries * Links, link walking * HTTP and Protocol Buffers transports and also provides so

Iteration or reduction on a transient map

2012-05-16 Thread nicolas.o...@gmail.com
Dear all, Is there a way to apply a function to all members of a transient map? Best regards, Nicolas. -- 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 a

Re: Is there a Clojure lib for web scraping?

2012-05-16 Thread Michael Klishin
Z.A: > Is there a good Clojure lib for web scraping. I intend to collect > story links using regex from a news site's home page, then visit each > link to gather photos and text. Take a look at Crawlista [1]. It primarily tries to cover link and content extraction (there is no actual crawling/re

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Matthew Boston
Right, I totally understand I need AOT compilation for calling Clojure from Java. I'm asking how to set that up in maven. Thanks for your help. On Wednesday, May 16, 2012 9:58:18 AM UTC-4, Meikel Brandmeyer (kotarak) wrote: > > Hi, > > you have to use AOT compilation to generate the class with

Re: Assuring avalaibility of ring web apps

2012-05-16 Thread Kyle R. Burton
> I'm not personally using this but people I trust recommend it highly. > It has a free option plus fairly reasonable monthly options. > > http://www.pingdom.com/ We use a similar service: cloudkick We have some custom plugins that we've written for it (to monitor RabbitMQ consumers and queue siz

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Meikel Brandmeyer (kotarak)
Hi, you have to use AOT compilation to generate the class with gen-class. Additionally you have to compile the clojure source before you compile the java code since otherwise the class is missing. I don't know how to do this with maven. I can tell you only for gradle. Kind regards Meikel --

Re: Browser History in cljs

2012-05-16 Thread eduardoejp
Regarding Snout: I'm using it mostly for routing but it should work for most things history-related. The back and forward buttons already work correctly. If you need more detailed programmatic access to the browser's history, that can be easily arranged with one or two more functions. > > >

Re: defstruct defrecord metadata

2012-05-16 Thread Tim Visher
On Tue, May 15, 2012 at 12:11 PM, JDuPreez wrote: > Maybe I should post my solution to this problem here? Sounds like a plan. :) -- 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: docstrings of if-let and when-let incorrect

2012-05-16 Thread Walter Tetzner
On Wednesday, May 16, 2012 9:16:29 AM UTC-4, Aaron Cohen wrote: > > Saying something is obvious and then using the word monad a paragraph > later is contradictory. ;) > > What should happen on the else branch of the if-let; which bindings are in > scope and what would be their values? > > None of

Re: Assuring avalaibility of ring web apps

2012-05-16 Thread Tim Visher
On Wed, May 16, 2012 at 3:13 AM, Murtaza Husain wrote: > Currently I am using noir for developing web apps. I am deploying them on an > EC2 server, by running lein trampoline run in the project directory. I also > have a nginx in front of it which is handling serving of static files. > > I have ne

Re: Unable to replace static Java method with Clojure function

2012-05-16 Thread Matthew Boston
Meikel, Thanks for your reply. I should have been more clear. This is an existing Java app using maven. How would I add to my pom to AOT-compile the Clojure pieces? I'm using the clojure-maven-plugin, from `com.theoryinpractise.clojure-maven-plugin`. I'll try Stuart's `org.clojure.clojure-mav

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Chris Ford
Personally, I would intuitively assume that none of the bindings from if-let would be available in the else branch. On 16 May 2012 14:36, Moritz Ulrich wrote: > On Wed, May 16, 2012 at 3:16 PM, Aaron Cohen wrote: > > What should happen on the else branch of the if-let; which bindings are > in >

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Michael Gardner
On May 16, 2012, at 8:16 AM, Aaron Cohen wrote: > Saying something is obvious and then using the word monad a paragraph later > is contradictory. ;) If the word "monad" is scary, just pretend he said "it should short-circuit" instead. ;) > What should happen on the else branch of the if-let; w

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Moritz Ulrich
On Wed, May 16, 2012 at 3:16 PM, Aaron Cohen wrote: > What should happen on the else branch of the if-let; which bindings are in > scope and what would be their values? This is kind of tricky. My opinion tends to "all bindings", but then it's difficult to handle lazy evaluation like in (or (cheap

Re: Is there a Clojure lib for web scraping?

2012-05-16 Thread David Powell
On Wed, May 16, 2012 at 10:33 AM, Z.A wrote: > Hi > Is there a good Clojure lib for web scraping. I intend to collect > story links using regex from a news site's home page, then visit each > link to gather photos and text. Check out enlive [1]; it works as both a web templating library, and a sc

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Aaron Cohen
On Wed, May 16, 2012 at 9:10 AM, Walter Tetzner < robot.ninja.saus...@gmail.com> wrote: > On Wednesday, May 16, 2012 9:01:49 AM UTC-4, Stuart Sierra wrote:How would >> multiple bindings for if-let or when-let work? Should every binding be >> testedd? Should they be and-ed together? Should it short

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Walter Tetzner
> > On Wednesday, May 16, 2012 9:01:49 AM UTC-4, Stuart Sierra wrote:How would > multiple bindings for if-let or when-let work? Should every binding be > testedd? Should they be and-ed together? Should it short-circuit if the > first is false? > > I don't think there are obvious answers to thos

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Stuart Sierra
How would multiple bindings for if-let or when-let work? Should every binding be testedd? Should they be and-ed together? Should it short-circuit if the first is false? I don't think there are obvious answers to those questions. -S -- You received this message because you are subscribed to the

EPL License Problem

2012-05-16 Thread Olle Mårtensson
Hi, I'm in the telco space and have used Clojure for a new project, it's working out great and I'm finally back to a LISP again. I have ran into a problem though, it turns out that I'm not allowed to use EPL licensed software together with our main system, Apache licenses are OK though. We are

Is there a Clojure lib for web scraping?

2012-05-16 Thread Z.A
Hi Is there a good Clojure lib for web scraping. I intend to collect story links using regex from a news site's home page, then visit each link to gather photos and text. Thanks Zubair -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this g

Re: Browser History in cljs

2012-05-16 Thread Moritz Ulrich
Does snout[1] accomplish what you need? It was recently announced on this mailing list. [1]: https://github.com/eduardoejp/snout On Wed, May 16, 2012 at 2:37 PM, Murtaza Husain wrote: > Hi, > > I would like to implement browser history in my cljs app. Are there any > libraries that already do it

Re: Clojurescript NS question

2012-05-16 Thread Michał Marczyk
Actually the part on persistent collections not being implemented was out of date too for the latest release. Fixed now. I'm actually not sure whether there still are unported collection functions; if so, there aren't many. M. On 16 May 2012 14:35, Michał Marczyk wrote: > That was out of date.

Browser History in cljs

2012-05-16 Thread Murtaza Husain
Hi, I would like to implement browser history in my cljs app. Are there any libraries that already do it? I know clojurescriptone does it, however for that I will have to use its eventing system too, I am looking at something more pluggable. Thanks, Murtaza -- You received this message becau

Re: Clojurescript NS question

2012-05-16 Thread Michał Marczyk
That was out of date. Fixed now. Cheers, M. On 16 May 2012 07:37, Oded Badt wrote: > Sorry, meant to quote: > " :use is not supported  " > > > On Wednesday, May 16, 2012 8:36:24 AM UTC+3, Oded Badt wrote: >> >> In: >> https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure >> It

Re: Pretty printing javascript objects in cljs

2012-05-16 Thread Murtaza Husain
Thanks David, Moritz - that resolved it !! On Wednesday, May 16, 2012 5:57:39 PM UTC+5:30, Moritz Ulrich wrote: > > For the record: (.log js/console obj1 obj2 ...) > > On Wed, May 16, 2012 at 2:25 PM, David Nolen > wrote: > > Just console.log the object directly. Chrome will give you someth

Re: Pretty printing javascript objects in cljs

2012-05-16 Thread Moritz Ulrich
For the record: (.log js/console obj1 obj2 ...) On Wed, May 16, 2012 at 2:25 PM, David Nolen wrote: > Just console.log the object directly. Chrome will give you something > inspectable at the JS console. > > > On Wednesday, May 16, 2012, Murtaza Husain wrote: >> >> Hi, >> >> I am trying to use do

Re: Pretty printing javascript objects in cljs

2012-05-16 Thread David Nolen
Just console.log the object directly. Chrome will give you something inspectable at the JS console. On Wednesday, May 16, 2012, Murtaza Husain wrote: > Hi, > > I am trying to use domina for listening to an event - > > (listen! (sel "#password") :keydown (fn [ev] >

Re: Assuring avalaibility of ring web apps

2012-05-16 Thread Alex Robbins
You could probably use upstart or supervisord. Upstart is available if you are on a newish ubuntu system (and maybe others?). Supervisord could run on most linuxes I think, although I've only ever used it on ubuntu. Hope that helps, Alex On Wed, May 16, 2012 at 2:13 AM, Murtaza Husain wrote: >

Pretty printing javascript objects in cljs

2012-05-16 Thread Murtaza Husain
Hi, I am trying to use domina for listening to an event - (listen! (sel "#password") :keydown (fn [ev] (log (pr-str ev))) log is a funciton which uses chrome's console.log. a) The pr-str just prints "object" instead of its properti

Re: defs in Clojurescript REPL

2012-05-16 Thread Michał Marczyk
That doesn't seem to free one from the need to take special care when assigning potentially large lazy values to names with def. If exercising special care on a case-by-case basis is not a problem, then it's already possible to say (do (def ...) nil) or similar, as mentioned above. You can als

Re: docstrings of if-let and when-let incorrect

2012-05-16 Thread Vinzent
> > As the logical AND of all of the multiple forms? The OR? Only use the > first expression? Only the last? > It should be AND. -- 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 t

Assuring avalaibility of ring web apps

2012-05-16 Thread Murtaza Husain
Hi, Currently I am using noir for developing web apps. I am deploying them on an EC2 server, by running lein trampoline run in the project directory. I also have a nginx in front of it which is handling serving of static files. I have never had the apps crash, however recently on app was down o