Re: Clojure Literature

2013-01-18 Thread Alex Baranosky
"anything written for Clojure 1.2 that is based on
old contrib is next to useless for teaching people basic Clojure these
days."

So very true.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Associative extends Seqable?

2013-01-18 Thread Stephen Compall
First, I have a suggestion for your associative: make `seq' return (map
vector (iterate inc' 0) (constantly the-const-value)).  This would be a
correct result, as far as it's possible to observe.

On Fri, 2013-01-18 at 16:16 -0800, Ben Wolfson wrote:
> Right: I basically want (constantly 'foo), but supporting the map
> interface. Or, rather, a subset of the map interface as it's currently
> defined: it seems odd to me that being able to answer the question "do
> I contain x?" implies "I can enumerate my contents".

It may seem less odd if, instead of "I can enumerate my contents", you
take the implication as "I can transform my domain forwards".

In ordinary functions, the domain can be transformed, but the
transformer function can't go olddomain -> newdomain; it has to go
newdomain -> olddomain.  (This also applies to those functions that can,
given a value, report whether that value is defined for the domain,
because such functions simply have a total codomain of a particular
shape.)

Associatives are related to functions in that converting an associative
to a function is an injection, and both have domains and codomains.  But
the way you transform the domain of an associative is backwards from how
you must for functions: the transformer function goes olddomain ->
newdomain.

Why does this imply enumeration?  You can't use the transformer function
on lookups; the lookup keys are in newdomain already.  So you must have
applied that transformer to a data representation of the domain first,
so that you have a newdomain search space for the key you're looking up.
You must be able to produce the entire search space during a domain
transform, which implies an enumeration.  Once you're enumerating the
domain, you can just apply the associative to produce the codomain, and
thus, "enumerate the contents."

The only way you can apply both transformations is if your domain is
vacuous: that is, constant functions like yours are the only ones that
permit domain transform in either direction.

-- 
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: a question about running embedded jetty

2013-01-18 Thread Feng Shen
Hi:
(var app)  can be simplified to just app.

The detail:
app is a function: accept a request map, return a response map. your 
server's logic is in app.
( see ring spec https://github.com/ring-clojure/ring/blob/master/SPEC for 
more detail)

(var app) or #'app: get the var (clojure.lang.Var) of the function.  

when (#'app request-map) :  
will call Var's invoke function:

public Object invoke(Object arg1) {

return fn().invoke(arg1);

}

final public IFn fn(){

 return (IFn) deref();

}

after deref(), you just get app.  


i found some remarks about being able to change the app without
> having to restart the server but how exactly does this relate ?


Yes. It's possible.   The easiest of doing that is by 
using https://github.com/weavejester/lein-ring







On Saturday, January 19, 2013 7:54:08 AM UTC+8, faenvie wrote:
>
> dear clojure users,
>
> i have learned that for a ring/compojure-app the embedded jetty
> service can be started like this:
>
> (def app (handler/site routes))
>
> (defn start [port]
>   (ring/run-jetty (var app) {:port (or port 8080)
>  :join? false}))
>
> can anyone explain, what is the var for ? why '(var app)' or #'app ?
> i found some remarks about being able to change the app without
> having to restart the server but how exactly does this relate ?
>
>
> thanks & have a successful time 
>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Literature

2013-01-18 Thread Sean Corfield
On Fri, Jan 18, 2013 at 8:55 PM, Tim Cross  wrote:
> I wouldn't worry too much about differences because a book was written for
> clojure 1.2 or 1.3

Oh I would worry about that! I see so many people trying to learn
Clojure from outdated books (mostly Clojure in Action) and getting
into terrible problems because of references to old monolithic
"contrib" and incompatibilities between that and Clojure 1.3 and
later. Seriously, anything written for Clojure 1.2 that is based on
old contrib is next to useless for teaching people basic Clojure these
days.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure Literature

2013-01-18 Thread Tim Cross

The books I've found valuable are 

Clojure Programming. Really liked this book because it just fitted well 
with my preferred style of book. Really enjoyed it and found that often, 
just as I was asking myself a question, the answer was in the next 
paragraph. 

Joy of Clojure. Excellent book. Possibly not a great first book, but 
absolutely a must once you have read one of the others and you really want 
to get a deeper understanding. I have returned to sections on this book a 
number of times and get something out of it each time. Really helps with 
the deeper knowledge I think you need for real projects. 

Programming Clojure. This was the first book I read. A good starting point 
(have only read 1st edition). Has enough to get you started, but avoids 
getting you too bogged down, so you feel like your making progress. 

I also have a copy of the new clojureScript book from O'Reilly, but have 
not read it yet. 

I wouldn't worry too much about differences because a book was written for 
clojure 1.2 or 1.3 even though 1.5 is only just around the corner. The 
differences are minor and tend to be most directly related to more advanced 
topics that are unlikely to be of critical importance to begin with. Once 
you have covered the content in these books, you will pick up the minor 
differences in later versions easily enough. 

Probably more important is to use Lein 2.0 right from the start and ensure 
you spend as much time trying to cut clojure code as reading about cutting 
clojure code!

have fun.

Tim

On Saturday, January 19, 2013 1:46:14 AM UTC+11, Reginald Choudari wrote:
>
> I am looking for a new Clojure book to get me started on the language. 
> I've been doing some clojure-koans and reading up on web-development with 
> Clojure and am interested to get down to the knitty-gritty... From what 
> I've seen, it looks like the latest Clojure books are from around 
> March/April 2012. Seeing that Clojure is a changing language, I didn't want 
> to buy a book that would quickly become obsolete. 
>
> From all that I read, this page seemed to be the most comprehensive 
> description of the current state of Clojure literature: 
> http://stackoverflow.com/questions/2578837/comparing-clojure-books
>
> I'd like to hear if anyone has any recommendations or if there is news of 
> any upcoming books coming out that might be worth waiting for.
>
> Thanks,
> Reginald
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Literature

2013-01-18 Thread Francesco Agozzino
Actually i felt comfortable using The Joy of Clojure AND Programming 
Clojure...
Keep in mind that i never used a Lisp-like language and i had only little 
knowledge of Java...

Il giorno venerdì 18 gennaio 2013 15:46:14 UTC+1, Reginald Choudari ha 
scritto:
>
> I am looking for a new Clojure book to get me started on the language. 
> I've been doing some clojure-koans and reading up on web-development with 
> Clojure and am interested to get down to the knitty-gritty... From what 
> I've seen, it looks like the latest Clojure books are from around 
> March/April 2012. Seeing that Clojure is a changing language, I didn't want 
> to buy a book that would quickly become obsolete. 
>
> From all that I read, this page seemed to be the most comprehensive 
> description of the current state of Clojure literature: 
> http://stackoverflow.com/questions/2578837/comparing-clojure-books
>
> I'd like to hear if anyone has any recommendations or if there is news of 
> any upcoming books coming out that might be worth waiting for.
>
> Thanks,
> Reginald
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ClojureScript + Jayq Resulting in Error

2013-01-18 Thread Ari
I also noticed that when I compile the cljs code I get:

WARNING: Use of undeclared Var jayq.core/clj->js

On Friday, January 18, 2013 9:56:22 PM UTC-5, Ari wrote:
>
> Hi,
>
> Below is the project.clj -- anything stand out? Thanks for the help. 
>
> (defproject sample "0.1.0-SNAPSHOT"
>   :description "Practice Clojure/Clojurescript app"
>   :url ""
>   :license {:name "Eclipse Public License"
> :url "http://www.eclipse.org/legal/epl-v10.html"}
>   :source-paths ["src/clj"]
>   :dependencies [[org.clojure/clojure "1.4.0"]
>  [org.clojure/data.xml "0.0.7"]
>  [org.clojure/data.json "0.2.0"]
>  [org.clojure/clojurescript "0.0-1450"]
>  [compojure "1.1.3"]
>  [enlive "1.0.1"]
>  [com.cemerick/friend "0.1.3"]
>  [jayq "2.0.0"]
>  [crate "0.2.3"]
>  [waltz "0.1.0-alpha1"]
>  [com.novemberain/monger "1.4.1"]]
>   :plugins [[lein-ring "0.7.5"]
> [lein-cljsbuild "0.2.9"]]
>   :cljsbuild {:builds [{:source-path "src/cljs"
> :compiler {:output-to 
> "resources/public/javascripts/app.js" :optimizations :whitespace 
> :pretty-print true}}]
>   :repl-listen-port 3000
>   :repl-launch-commands {"firefox" ["firefox" :stdout 
> "stdout.log" :stderr "stderr.log"]}}
>   :ring {:handler sample.routes/app})
>
>
> On Friday, January 18, 2013 6:48:31 PM UTC-5, Ilia Ablamonov wrote:
>>
>> Hello Ari,
>>
>>
>> I've tried to reproduce your case and it works for me. I use the 
>> following project.clj:
>>
>> (defproject playground "0.1.0"
>>   :dependencies [[jayq "2.0.0"]]
>>   :min-lein-version "2.0.0"
>>   :source-paths ["src"]
>>   :plugins [[lein-cljsbuild "0.2.10"]]
>>   :cljsbuild {:builds
>>   [{:source-path "src"
>> :compiler {:output-to "public/app.js"
>>:pretty-print true
>>:optimizations :whitespace}}]})
>>
>> Maybe something in your project.clj makes difference. Could you plz list 
>> it?
>>
>> суббота, 19 января 2013 г., 2:43:43 UTC+4 пользователь Ari написал:
>>>
>>> The error message was cutoff in my previous post; the error returned is:
>>>
>>> Uncaught TypeError: Cannot call method 'call' of undefined 
>>>
>>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call(null, 
>>> cljs.core.ObjMap.fromObject(["\ufdd0'accepts", "\ufdd0'contents", 
>>> "\ufdd0'converters"], 
>>> {"\ufdd0'accepts":cljs.core.ObjMap.fromObject(["\ufdd0'edn", 
>>> "\ufdd0'clojure"], {"\ufdd0'edn":"application/edn, text/edn", 
>>> "\ufdd0'clojure":"application/clojure, text/clojure"}), 
>>> "\ufdd0'contents":cljs.core.ObjMap.fromObject(["clojure"], 
>>> {"clojure":/edn|clojure/}), 
>>> "\ufdd0'converters":cljs.core.ObjMap.fromObject(["text edn", "text 
>>> clojure"], {"text edn":jayq.core.mimetype_converter, 
>>> Uncaught TypeError: Cannot call method 'call' of undefined
>>>
>>>
>>> On Friday, January 18, 2013 3:48:16 PM UTC-5, Ari wrote:

 Hi,

 When I use the jayq  library to wait 
 until the page loads (see following code) I get the error below. If I 
 remove jayq, the code executes correctly. Does anyone know what I'm doing 
 wrong? Thanks.

 Html:
 
 
 
 
 https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
 ">
 var CLOSURE_NO_DEPS = true;
 
 
 


 Clojurescript:

 (ns myapp.example
 (:use [jayq.core :only [$]])
 (:use-macros [jayq.macros :only [ready]]))

 (ready (js/alert "Hello"))

 Error:
 jQuery.ajaxSetup(jayq.core.clj__GT_js.call...

 -Ari

>>>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ClojureScript + Jayq Resulting in Error

2013-01-18 Thread Ari
Hi,

Below is the project.clj -- anything stand out? Thanks for the help. 

(defproject sample "0.1.0-SNAPSHOT"
  :description "Practice Clojure/Clojurescript app"
  :url ""
  :license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
  :source-paths ["src/clj"]
  :dependencies [[org.clojure/clojure "1.4.0"]
 [org.clojure/data.xml "0.0.7"]
 [org.clojure/data.json "0.2.0"]
 [org.clojure/clojurescript "0.0-1450"]
 [compojure "1.1.3"]
 [enlive "1.0.1"]
 [com.cemerick/friend "0.1.3"]
 [jayq "2.0.0"]
 [crate "0.2.3"]
 [waltz "0.1.0-alpha1"]
 [com.novemberain/monger "1.4.1"]]
  :plugins [[lein-ring "0.7.5"]
[lein-cljsbuild "0.2.9"]]
  :cljsbuild {:builds [{:source-path "src/cljs"
:compiler {:output-to 
"resources/public/javascripts/app.js" :optimizations :whitespace 
:pretty-print true}}]
  :repl-listen-port 3000
  :repl-launch-commands {"firefox" ["firefox" :stdout 
"stdout.log" :stderr "stderr.log"]}}
  :ring {:handler sample.routes/app})


On Friday, January 18, 2013 6:48:31 PM UTC-5, Ilia Ablamonov wrote:
>
> Hello Ari,
>
>
> I've tried to reproduce your case and it works for me. I use the following 
> project.clj:
>
> (defproject playground "0.1.0"
>   :dependencies [[jayq "2.0.0"]]
>   :min-lein-version "2.0.0"
>   :source-paths ["src"]
>   :plugins [[lein-cljsbuild "0.2.10"]]
>   :cljsbuild {:builds
>   [{:source-path "src"
> :compiler {:output-to "public/app.js"
>:pretty-print true
>:optimizations :whitespace}}]})
>
> Maybe something in your project.clj makes difference. Could you plz list 
> it?
>
> суббота, 19 января 2013 г., 2:43:43 UTC+4 пользователь Ari написал:
>>
>> The error message was cutoff in my previous post; the error returned is:
>>
>> Uncaught TypeError: Cannot call method 'call' of undefined 
>>
>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call(null, 
>> cljs.core.ObjMap.fromObject(["\ufdd0'accepts", "\ufdd0'contents", 
>> "\ufdd0'converters"], 
>> {"\ufdd0'accepts":cljs.core.ObjMap.fromObject(["\ufdd0'edn", 
>> "\ufdd0'clojure"], {"\ufdd0'edn":"application/edn, text/edn", 
>> "\ufdd0'clojure":"application/clojure, text/clojure"}), 
>> "\ufdd0'contents":cljs.core.ObjMap.fromObject(["clojure"], 
>> {"clojure":/edn|clojure/}), 
>> "\ufdd0'converters":cljs.core.ObjMap.fromObject(["text edn", "text 
>> clojure"], {"text edn":jayq.core.mimetype_converter, 
>> Uncaught TypeError: Cannot call method 'call' of undefined
>>
>>
>> On Friday, January 18, 2013 3:48:16 PM UTC-5, Ari wrote:
>>>
>>> Hi,
>>>
>>> When I use the jayq  library to wait 
>>> until the page loads (see following code) I get the error below. If I 
>>> remove jayq, the code executes correctly. Does anyone know what I'm doing 
>>> wrong? Thanks.
>>>
>>> Html:
>>> 
>>> 
>>> 
>>> 
>>> https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
>>> ">
>>> var CLOSURE_NO_DEPS = true;
>>> 
>>> 
>>> 
>>>
>>>
>>> Clojurescript:
>>>
>>> (ns myapp.example
>>> (:use [jayq.core :only [$]])
>>> (:use-macros [jayq.macros :only [ready]]))
>>>
>>> (ready (js/alert "Hello"))
>>>
>>> Error:
>>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call...
>>>
>>> -Ari
>>>
>>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Sean Corfield
Because by submitting a JIRA patch explicitly, you are taking the
legal responsibility for the contents of the patch as being a change
that you are authorized to submit under the CA...

I'm not sure that you can even attach a patch to a Clojure ticket in
JIRA without being given permission to modify tickets (which means you
have a CA on file)?

As you say, at Mozilla, you have a whole team of legal people making
sure things are safe and acceptable. Clojure/core does not have that
luxury.

On Fri, Jan 18, 2013 at 5:16 PM, Irakli Gozalishvili  wrote:
> One could also copy attach patch with lines that belong to someone else. How
> is that different ?
> Pull requests are just a tool for working with patches nothing else
>
>
> Regards
>
> --
> Irakli Gozalishvili
> Web: http://www.jeditoolkit.com/
>
> On Friday, 2013-01-18 at 16:18 , Sean Corfield wrote:
>
> That will depend on whether it traces the origin of each line in the
> patch - just relying on the pull request originator is not sufficient
> (unfortunately).
>
> On Fri, Jan 18, 2013 at 4:11 PM, Hugo Duncan  wrote:
>
> Sean Corfield  writes:
>
> My understanding is that with pull requests it becomes much harder to
> provide accountability for Intellectual Property which is a legal
> concern, and that's why we have a Contributor's Agreement.
>
>
> I wonder if the availability of http://www.clahub.com/ changes anything...
>
> Hugo
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
>
>
>
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
>
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Irakli Gozalishvili
One could also copy attach patch with lines that belong to someone else. How is 
that different ?
Pull requests are just a tool for working with patches nothing else


Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/


On Friday, 2013-01-18 at 16:18 , Sean Corfield wrote:

> That will depend on whether it traces the origin of each line in the
> patch - just relying on the pull request originator is not sufficient
> (unfortunately).
> 
> On Fri, Jan 18, 2013 at 4:11 PM, Hugo Duncan  (mailto:duncan.h...@gmail.com)> wrote:
> > Sean Corfield mailto:seancorfi...@gmail.com)> 
> > writes:
> > 
> > > My understanding is that with pull requests it becomes much harder to
> > > provide accountability for Intellectual Property which is a legal
> > > concern, and that's why we have a Contributor's Agreement.
> > > 
> > 
> > 
> > I wonder if the availability of http://www.clahub.com/ changes anything...
> > 
> > Hugo
> > 
> > --
> > 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 
> > (mailto:clojure@googlegroups.com)
> > Note that posts from new members are moderated - please be patient with 
> > your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com 
> > (mailto:clojure+unsubscr...@googlegroups.com)
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > 
> 
> 
> 
> 
> -- 
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
> 
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
> 
> -- 
> 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 
> (mailto:clojure@googlegroups.com)
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> 
> 


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Irakli Gozalishvili
At mozilla we also require signing CA but do accept pull requests and there are 
whole team of legal people that
makes sure things like that don't raise any legal concerns. After all it's just 
.patch to the pull request url gives you
an actual change patch so if reviewing patches is desired it's easy to build a 
tool that attaches it to JIRA. We in fact
do that for bugzilla. The good news is that such tools are already written for 
JIRA so it's just matter of enabling it!


Regards
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/


On Friday, 2013-01-18 at 15:52 , Sean Corfield wrote:

> On Fri, Jan 18, 2013 at 1:33 PM, Andy Fingerhut
> mailto:andy.finger...@gmail.com)> wrote:
> > The issue that Clojure, its contrib libraries, and ClojureScript do not 
> > accept github pull requests has been brought up several times before on 
> > this email list in the past. Feel free to search the Google group for terms 
> > like "pull request". Short answer: Rich Hickey prefers a workflow of 
> > evaluating patches, not pull requests. It is easier for him.
> 
> 
> My understanding is that with pull requests it becomes much harder to
> provide accountability for Intellectual Property which is a legal
> concern, and that's why we have a Contributor's Agreement. The patch
> process naturally falls out of the legal CA-covered process since each
> patch is clearly identified as "belonging" to a specific contributor -
> and submitting a patch comes with the responsibility of vouching for
> the legal status of that submission. Github's pull request process
> makes it all too easy to incorporate code that belongs to a Github
> account holder who is not covered by the legal agreement and places
> the burden of verification on screeners to verify the IP ownership.
> 
> But let's not re-hash the issue of the CA. Folks can just read the
> archives and there's really nothing new to add...
> --
> Sean A Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
> World Singles, LLC. -- http://worldsingles.com/
> 
> "Perfection is the enemy of the good."
> -- Gustave Flaubert, French realist novelist (1821-1880)
> 
> -- 
> 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 
> (mailto:clojure@googlegroups.com)
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com)
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> 
> 


-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Sean Corfield
That will depend on whether it traces the origin of each line in the
patch - just relying on the pull request originator is not sufficient
(unfortunately).

On Fri, Jan 18, 2013 at 4:11 PM, Hugo Duncan  wrote:
> Sean Corfield  writes:
>
>> My understanding is that with pull requests it becomes much harder to
>> provide accountability for Intellectual Property which is a legal
>> concern, and that's why we have a Contributor's Agreement.
>
> I wonder if the availability of http://www.clahub.com/ changes anything...
>
> Hugo
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Associative extends Seqable?

2013-01-18 Thread Ben Wolfson
On Fri, Jan 18, 2013 at 3:37 PM, Stephen Compall
 wrote:
> On Jan 18, 2013 2:36 PM, "Ben Wolfson"  wrote:
>> >> I could just extend ILookup, which contains only valAt, but I'd also
>> >> like to be able to implement containsKey and entryAt, which AFAICT are
>> >> only found in Associative.
>
> Associative also contains
>
> Associative assoc(Object key, Object val);
>
> I would propose, as a law, that anAssociative.assoc(k, v).valAt(k) = v.  Do
> you satisfy that?  (An enumeration of Associative laws would be helpful
> here.)

No, I don't: assoc is a is a no-op (as is without). Both assoc and
without are, in fact, only there to prevent set/rename-keys and a few
other functions from blowing up (set/rename-keys is *also* a no-op
with those definitions of assoc and without---but given the definition
of valAt, rename-keys being a no-op is correct).

However, it would certainly be possible to support that behavior while
retaining the nonsensicality of calling seq on the structures:

(defn constmap [o & [override]]
  (let [override (or override {})]
(reify
  clojure.lang.Associative
  (containsKey [this _] true)
  (entryAt [this k] (if (.containsKey override k)
  (.entryAt override k)
  (clojure.lang.MapEntry. k o)))
  (valAt [this k] (second (.entryAt this k)))
  (assoc [this k v] (constmap o (.assoc override k v))


> Anyway, anyone is free to assume that, given an IPersistentMap (or what have
> you), all of the laws of its superclasses are also implied.

Yes, that is probably so.

> So I think
> inheriting Seqable is a positive statement of this law:
>
> anAssociative.entryAt(k) returning entry E,
> implies that (seq anAssociative) contains E.
>
> But I cannot be sure.  Without this law, though, you are basically left with
> (pure) function.

Right: I basically want (constantly 'foo), but supporting the map
interface. Or, rather, a subset of the map interface as it's currently
defined: it seems odd to me that being able to answer the question "do
I contain x?" implies "I can enumerate my contents".

-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks,
which may be sweet, aromatic, fermented or spirit-based. ... Family
and social life also offer numerous other occasions to consume drinks
for pleasure." [Larousse, "Drink" entry]

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Hugo Duncan
Sean Corfield  writes:

> My understanding is that with pull requests it becomes much harder to
> provide accountability for Intellectual Property which is a legal
> concern, and that's why we have a Contributor's Agreement. 

I wonder if the availability of http://www.clahub.com/ changes anything...

Hugo

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: [ANN] Schejulure 0.1.1

2013-01-18 Thread Adam Clements
Hi Marko,

I've addressed some of your concerns by re-using a single thread pool for
multiple schedule calls in the current master. The original use case was
one set of scheduled tasks running for the lifetime of my application. If
you can suggest improvements to cover other use cases with more
stopping/starting scheduled tasks and automatically cleaning up the
executor service if it's no longer needed that would be great.

Adam Clements

On Fri, Jan 18, 2013 at 9:50 PM, Marko Topolnik wrote:

>
> This looks great. I was building a couple of applications that run
>> periodic tasks/services on top of quartzite, but I'll definitely play with
>> this. Much nicer scheduling syntax, and the lack of a single stateful
>> scheduler feels much more Clojurian (and cleaner, too).
>>
>
> Behind the apparent elegance is a design that could be wasteful with
> system resources, starting another thread with each invocation of *
> schedule* and leaving the executor service running after the future is
> cancelled.
>
>  --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Literature

2013-01-18 Thread Sean Corfield
I see that specifically (and correctly) calls out two books written
about pre-1.3 Clojure but does not call out Practical Clojure for the
same issue. Wasn't that written for Clojure 1.1?

(and is there a 2nd Ed in the pipeline? Luke? Stuart?)

On Fri, Jan 18, 2013 at 3:36 PM, Alex Baranosky
 wrote:
> http://clojure-doc.org/articles/ecosystem/books.html
>
>
> On Fri, Jan 18, 2013 at 7:04 AM, Brian Marick  wrote:
>>
>>
>> On Jan 18, 2013, at 8:46 AM, Reginald Choudari
>>  wrote:
>>
>> > I am looking for a new Clojure book to get me started on the language.
>>
>> Here's a beginning Clojure reading list, with some discussion:
>> http://regretful.ly/clojure/2013/01/16/beginning-clojure-reading-list/
>>
>> 
>> Occasional consulting on programming technique
>> Contract programming in Ruby and Clojure
>> Latest book: /Functional Programming for the Object-Oriented Programmer/
>> https://leanpub.com/fp-oo
>>
>> --
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


a question about running embedded jetty

2013-01-18 Thread faenvie
dear clojure users,

i have learned that for a ring/compojure-app the embedded jetty
service can be started like this:

(def app (handler/site routes))

(defn start [port]
  (ring/run-jetty (var app) {:port (or port 8080)
 :join? false}))

can anyone explain, what is the var for ? why '(var app)' or #'app ?
i found some remarks about being able to change the app without
having to restart the server but how exactly does this relate ?


thanks & have a successful time 

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Sean Corfield
On Fri, Jan 18, 2013 at 1:33 PM, Andy Fingerhut
 wrote:
> The issue that Clojure, its contrib libraries, and ClojureScript do not 
> accept github pull requests has been brought up several times before on this 
> email list in the past.  Feel free to search the Google group for terms like 
> "pull request".  Short answer: Rich Hickey prefers a workflow of evaluating 
> patches, not pull requests.  It is easier for him.

My understanding is that with pull requests it becomes much harder to
provide accountability for Intellectual Property which is a legal
concern, and that's why we have a Contributor's Agreement. The patch
process naturally falls out of the legal CA-covered process since each
patch is clearly identified as "belonging" to a specific contributor -
and submitting a patch comes with the responsibility of vouching for
the legal status of that submission. Github's pull request process
makes it all too easy to incorporate code that belongs to a Github
account holder who is not covered by the legal agreement and places
the burden of verification on screeners to verify the IP ownership.

But let's not re-hash the issue of the CA. Folks can just read the
archives and there's really nothing new to add...
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureScript + Jayq Resulting in Error

2013-01-18 Thread Ilia Ablamonov
Hello Ari,


I've tried to reproduce your case and it works for me. I use the following 
project.clj:

(defproject playground "0.1.0"
  :dependencies [[jayq "2.0.0"]]
  :min-lein-version "2.0.0"
  :source-paths ["src"]
  :plugins [[lein-cljsbuild "0.2.10"]]
  :cljsbuild {:builds
  [{:source-path "src"
:compiler {:output-to "public/app.js"
   :pretty-print true
   :optimizations :whitespace}}]})

Maybe something in your project.clj makes difference. Could you plz list it?

суббота, 19 января 2013 г., 2:43:43 UTC+4 пользователь Ari написал:
>
> The error message was cutoff in my previous post; the error returned is:
>
> Uncaught TypeError: Cannot call method 'call' of undefined 
>
> jQuery.ajaxSetup(jayq.core.clj__GT_js.call(null, 
> cljs.core.ObjMap.fromObject(["\ufdd0'accepts", "\ufdd0'contents", 
> "\ufdd0'converters"], 
> {"\ufdd0'accepts":cljs.core.ObjMap.fromObject(["\ufdd0'edn", 
> "\ufdd0'clojure"], {"\ufdd0'edn":"application/edn, text/edn", 
> "\ufdd0'clojure":"application/clojure, text/clojure"}), 
> "\ufdd0'contents":cljs.core.ObjMap.fromObject(["clojure"], 
> {"clojure":/edn|clojure/}), 
> "\ufdd0'converters":cljs.core.ObjMap.fromObject(["text edn", "text 
> clojure"], {"text edn":jayq.core.mimetype_converter, 
> Uncaught TypeError: Cannot call method 'call' of undefined
>
>
> On Friday, January 18, 2013 3:48:16 PM UTC-5, Ari wrote:
>>
>> Hi,
>>
>> When I use the jayq  library to wait 
>> until the page loads (see following code) I get the error below. If I 
>> remove jayq, the code executes correctly. Does anyone know what I'm doing 
>> wrong? Thanks.
>>
>> Html:
>> 
>> 
>> 
>> 
>> https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
>> ">
>> var CLOSURE_NO_DEPS = true;
>> 
>> 
>> 
>>
>>
>> Clojurescript:
>>
>> (ns myapp.example
>> (:use [jayq.core :only [$]])
>> (:use-macros [jayq.macros :only [ready]]))
>>
>> (ready (js/alert "Hello"))
>>
>> Error:
>> jQuery.ajaxSetup(jayq.core.clj__GT_js.call...
>>
>> -Ari
>>
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Associative extends Seqable?

2013-01-18 Thread Stephen Compall
On Jan 18, 2013 2:36 PM, "Ben Wolfson"  wrote:
> >> I could just extend ILookup, which contains only valAt, but I'd also
> >> like to be able to implement containsKey and entryAt, which AFAICT are
> >> only found in Associative.

Associative also contains

Associative assoc(Object key, Object val);

I would propose, as a law, that anAssociative.assoc(k, v).valAt(k) = v.  Do
you satisfy that?  (An enumeration of Associative laws would be helpful
here.)

Anyway, anyone is free to assume that, given an IPersistentMap (or what
have you), all of the laws of its superclasses are also implied.  So I
think inheriting Seqable is a positive statement of this law:

anAssociative.entryAt(k) returning entry E,
implies that (seq anAssociative) contains E.

But I cannot be sure.  Without this law, though, you are basically left
with (pure) function.

--
Stephen Compall
If anyone in the MSA is online, you should watch this flythrough.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Literature

2013-01-18 Thread Alex Baranosky
http://clojure-doc.org/articles/ecosystem/books.html

On Fri, Jan 18, 2013 at 7:04 AM, Brian Marick  wrote:

>
> On Jan 18, 2013, at 8:46 AM, Reginald Choudari 
> wrote:
>
> > I am looking for a new Clojure book to get me started on the language.
>
> Here's a beginning Clojure reading list, with some discussion:
> http://regretful.ly/clojure/2013/01/16/beginning-clojure-reading-list/
>
> 
> Occasional consulting on programming technique
> Contract programming in Ruby and Clojure
> Latest book: /Functional Programming for the Object-Oriented Programmer/
> https://leanpub.com/fp-oo
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: ClojureScript + Jayq Resulting in Error

2013-01-18 Thread Ari
The error message was cutoff in my previous post; the error returned is:

Uncaught TypeError: Cannot call method 'call' of undefined 

jQuery.ajaxSetup(jayq.core.clj__GT_js.call(null, 
cljs.core.ObjMap.fromObject(["\ufdd0'accepts", "\ufdd0'contents", 
"\ufdd0'converters"], 
{"\ufdd0'accepts":cljs.core.ObjMap.fromObject(["\ufdd0'edn", 
"\ufdd0'clojure"], {"\ufdd0'edn":"application/edn, text/edn", 
"\ufdd0'clojure":"application/clojure, text/clojure"}), 
"\ufdd0'contents":cljs.core.ObjMap.fromObject(["clojure"], 
{"clojure":/edn|clojure/}), 
"\ufdd0'converters":cljs.core.ObjMap.fromObject(["text edn", "text 
clojure"], {"text edn":jayq.core.mimetype_converter, 
Uncaught TypeError: Cannot call method 'call' of undefined


On Friday, January 18, 2013 3:48:16 PM UTC-5, Ari wrote:
>
> Hi,
>
> When I use the jayq  library to wait 
> until the page loads (see following code) I get the error below. If I 
> remove jayq, the code executes correctly. Does anyone know what I'm doing 
> wrong? Thanks.
>
> Html:
> 
> 
> 
> 
> https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
> ">
> var CLOSURE_NO_DEPS = true;
> 
> 
> 
>
>
> Clojurescript:
>
> (ns myapp.example
> (:use [jayq.core :only [$]])
> (:use-macros [jayq.macros :only [ready]]))
>
> (ready (js/alert "Hello"))
>
> Error:
> jQuery.ajaxSetup(jayq.core.clj__GT_js.call...
>
> -Ari
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Frank Siebenlist
One process that could be made a little easier is the contribution of code 
documentation and suggested improvements of doc-strings.

New or improved doc-strings do not change any functionality, impact any tests, 
require peer review…

If we could simply suggest new doc-strings for example in the JIRA-issue, have 
enough eyeballs stare at it, improvements, amendments…,
then after sign-off, a committer could simply copy&paste this approved 
enhancement in the official code.

Low-impact and it could make it easier to get community involvement and 
contributions for clojure & clojurescript's documentation, which arguably could 
use a little patch here and there.

Having to go thru the whole official patch process to suggest an improved 
docstring is a bit much… and god forbid that you have to thru that multiple 
time before all the , and . are approved. 

-FrankS.


On Jan 18, 2013, at 1:33 PM, Andy Fingerhut  wrote:

> The issue that Clojure, its contrib libraries, and ClojureScript do not 
> accept github pull requests has been brought up several times before on this 
> email list in the past.  Feel free to search the Google group for terms like 
> "pull request".  Short answer: Rich Hickey prefers a workflow of evaluating 
> patches, not pull requests.  It is easier for him.  You aren't likely to 
> change his preference on this issue.  That choice wasn't made in order to 
> make it harder on contributors.
> 
> Instructions on creating patches for Clojure are under the heading 
> "Developing and submitting patches to Clojure and Clojure Contrib" on this 
> web page:
> 
>http://dev.clojure.org/display/design/JIRA+workflow
> 
> I suspect they are quite similar for ClojureScript, but I haven't submitted a 
> ClojureScript patch before to know for sure.
> 
> Andy
> 
> On Jan 18, 2013, at 1:01 PM, Irakli Gozalishvili wrote:
> 
>> I have being trying to engage community and to contribute to clojurescript 
>> for a while already,
>> but so far it's being mostly frustrating and difficult. I hope to start 
>> discussion here and maybe
>> get some constructive outcome.
>> 
>> ## Rationale
>> 
>> I'm primarily interested in clojurescript and not at all in clojure, because 
>> of specific reasons (that
>> I'll skip since their irrelevant for this discussion) dependency on JVM is a 
>> problem. Removing
>> that's dependency is also my primary motivation to contribute. 
>> 
>> ## Problems
>> 
>> - I do understand that most of the clojurescript audience is probably also 
>> interested in clojure,
>>  but please don't enforce that. Have a separate mailing list so that people 
>> interested in
>>  clojurescript and not clojure could follow relevant discussions without 
>> manually filtering out
>>  threads.
>> 
>> - What is the point of being on github if you don't accept pull requests and 
>> require I do understand
>>  that there maybe specific reasons why jira flow was chosen, but seriously 
>> that's another ball
>>  thrown at potential contributor to joggle. Not to mention that there are 
>> several options how
>>  jira and github could be integrated.
>> 
>> - My latest attempt was to configure travis.ci for integration tests
>>  https://github.com/clojure/clojurescript/pull/21
>> 
>>   Integration tests are great specially because they run on every pull 
>> request and post details back
>>   into pull requests. This also means that lot of local test run time can be 
>> saved. Not to mention that
>>   for clojurescript tests you need JVM, v8, spidermonkey and more…
>> 
>> If these things are intentionally made hard to stop new people with more 
>> clojurescipt interests then please
>> make it more clear, cause otherwise it just a motivation killer. 
>> 
>> Thanks
>> --
>> Irakli Gozalishvili
>> Web: http://www.jeditoolkit.com/
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: [ANN] Schejulure 0.1.1

2013-01-18 Thread Marko Topolnik


> This looks great. I was building a couple of applications that run 
> periodic tasks/services on top of quartzite, but I'll definitely play with 
> this. Much nicer scheduling syntax, and the lack of a single stateful 
> scheduler feels much more Clojurian (and cleaner, too).
>

Behind the apparent elegance is a design that could be wasteful with system 
resources, starting another thread with each invocation of *schedule* and 
leaving 
the executor service running after the future is cancelled.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Unexpected failure (split function)

2013-01-18 Thread Andy Fingerhut
Thanks, Chas.  Sorry for the noise.

I tested Thomas's bad case against the latest reply (version 0.1.8) standalone, 
and the problem does not occur there or in version 0.1.7, but it does in reply 
0.1.6 standalone.

CCing Phil Hagelberg so he is aware of this for possible inclusion in later 
versions of Leiningen.

Andy

On Jan 18, 2013, at 12:26 PM, Chas Emerick wrote:

> Looks like a reply issue.  The expression in question evals fine in ccw with 
> the latest nREPL, and in lein 2.0.0-beta10 (which used some beta of reply 
> 0.1.0) with the latest nREPL.  Lein 2.0.0-RC2 with reply 0.1.6 is affected, 
> though.
> 
> - Chas
> 
> On Jan 18, 2013, at 3:13 PM, Andy Fingerhut wrote:
> 
>> This issue appears to be unique to using a Leiningen version 2 REPL.
>> 
>> It does not occur if using "java -cp clojure.jar clojure.main" to get a 
>> REPL, nor with Leiningen version 1.7.1.
>> 
>> CCing nrepl developer Chas Emerick in case this might be an issue with 
>> nrepl, but I haven't attempted to localize the problem any further than 
>> mentioned above.
>> 
>> Andy
>> 
>> On Jan 18, 2013, at 11:32 AM, Thomas wrote:
>> 
>>> Hi,
>>> 
>>> When I run this in my REPL I get an exception and the REPL exits:
>>> 
>>> user=> (clojure.string/split "asdfsa;asdf;asdf" #";" )
>>> Exception Ambiguous match for ";\" )" by #>> [Ljava.lang.Object;@77237723>
>>> net.cgrand.parsley.lrplus/array-union/fn--4060 (lrplus.clj:91)
>>> net.cgrand.parsley.lrplus/matchers-union/fn--4072 (lrplus.clj:118)
>>> net.cgrand.parsley.lrplus/step1 (lrplus.clj:166)
>>> net.cgrand.parsley.lrplus/step (lrplus.clj:190)
>>> net.cgrand.parsley/stepper/self--4854 (parsley.clj:39)
>>> net.cgrand.parsley/stepper/self--4854 (parsley.clj:36)
>>> reply.eval-modes.nrepl/parsed-forms (nrepl.clj:72)
>>> reply.eval-modes.nrepl/parsed-forms (nrepl.clj:66)
>>> reply.eval-modes.nrepl/run-repl (nrepl.clj:103)
>>> reply.eval-modes.nrepl/main (nrepl.clj:189)
>>> reply.main/launch-nrepl/fn--5375 (main.clj:60)
>>> clojure.core/with-redefs-fn (core.clj:6585)
>>> Bye for now!
>>> 
>>> If I do use #"\;" (note the \ in there) it works as expected.
>>> 
>>> Surely this is unexpected (the REPL ending that is), but what about 
>>> escaping the ; It is after all in a string and I wouldn't expect it to be 
>>> seen as a comment.
>>> 
>>> REPL-y 0.1.6
>>> Clojure 1.4.0
>>> 
>>> Are my versions.
>>> 
>>> TIA,
>>> Thomas

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: my css and images are on the wrong path? -- NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes

2013-01-18 Thread larry google groups

This problem keeps happening intermittently, I managed to track it
down to a rare combination of restarting the app but not deleting the
session cookie, so that I restart the app and there is already some
cookie data present that the new app is not expecting. Not sure what
goes wrong, but something does. If anyone else runs into, the solution
was as simple as deleting all cookies when I restart the app.


On 18 Sty, 03:15, larry google groups 
wrote:
> Hmm, strange. I have had a lot of problems trying to get Friend to
> work. I have been wrestling with it, on and off, for 2 days, and I
> have not gotten it to work. I just removed all the paths that had to
> do anything with Friend, and now the paths to my images and CSS and
> Javascript are working. Not sure if that is coincident to something
> else, or whether the cause is somehow direct.
>
> On Jan 18, 3:08 am, larry google groups 
> wrote:
>
>
>
>
>
>
>
> > I searched on Google but found little about this error.
>
> > I was leaving work, where my app was working, and so I did "git push
> > origin master" and sent it all to Github, I got home and did "git pull
> > origin master" to pull everything onto my machine (work is a Mac
> > running OSX 10.8 and at home I've got a Mac running OSX 10.7).
>
> > Then I ran "lein uberjar" and then I started the app with "java -jar
> > discovery-0.9-standalone.jar 3
>
> > And then I pointed my browser tohttp://localhost:3
>
> > For all of the static resources, I got errors like this:
>
> > 2013-01-18 02:54:04.900:WARN:oejs.AbstractHttpConnection:/css/
> > bootstrap-and-combined-libraries.css
> > java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes
>
> > All of a sudden, the app is not finding the CSS files, or the images,
> > or the Javascript. My routes are setup in Compojure like this:
>
> > (defroutes app-routes
> >   (GET "/" request (index request))
> >   (GET "/search-results" request (search-results request))
> >   (GET "/schema" request (schema request))
> >   (GET "/account" request (friend/authorize #{::user} {} (account
> > request)))
> >   (GET "/admin" request (friend/authorize #{::admin} {} (admin
> > request)))
> >   (friend/logout (ANY "/logout" request (ring.util.response/redirect
> > "/")))
> >   (GET "/login" request (login request))
> >   (route/not-found "Page not found"))
>
> > (def app
> >     (-> app-routes
> >         (friend/authenticate {:credential-fn (partial creds/bcrypt-
> > credential-fn users)
> >                               :workflows [(workflows/interactive-
> > form)]})
> >         (wrap-resource "public")
> >         (wrap-session {:cookie-name "discovery-session" :cookie-attrs
> > {:max-age 1 }})
> >         (wrap-cookies)
> >         (wrap-keyword-params)
> >         (wrap-nested-params)
> >         (wrap-params)))
>
> > (defn -main [& args]
> >   (let [port (Integer/parseInt (first args))]
> >     (try
> >       (run-jetty #'app {:port (or port 8080) :join? false})
> >       (catch Exception e (debug/print-error-info e)
>
> > I actually saw this problem for about 5 minutes this afternoon at
> > work. But then the problem fixed itself so I forgot about it. But now
> > it is back and nothing I do seems to fix it. The CSS and images are
> > paths like this:
>
> > resources
> >     public
> >         css
> >         images
> >         js
> > src
> >     discovery
> >         core.clj
>
> > If I hit "view source" in the browser and then click on the links for
> > the CSS I get a 404 error:
>
> >      > rel="stylesheet">
> >     
>
> > But this was working when I left work, and, as I say, all I did was
> > get home, pull down the changes, rebuild the app and launch it. I am
> > not clear what might have changed to cause this error.
>
> > Any thoughts?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Andy Fingerhut
The issue that Clojure, its contrib libraries, and ClojureScript do not accept 
github pull requests has been brought up several times before on this email 
list in the past.  Feel free to search the Google group for terms like "pull 
request".  Short answer: Rich Hickey prefers a workflow of evaluating patches, 
not pull requests.  It is easier for him.  You aren't likely to change his 
preference on this issue.  That choice wasn't made in order to make it harder 
on contributors.

Instructions on creating patches for Clojure are under the heading "Developing 
and submitting patches to Clojure and Clojure Contrib" on this web page:

http://dev.clojure.org/display/design/JIRA+workflow

I suspect they are quite similar for ClojureScript, but I haven't submitted a 
ClojureScript patch before to know for sure.

Andy

On Jan 18, 2013, at 1:01 PM, Irakli Gozalishvili wrote:

> I have being trying to engage community and to contribute to clojurescript 
> for a while already,
> but so far it's being mostly frustrating and difficult. I hope to start 
> discussion here and maybe
> get some constructive outcome.
> 
> ## Rationale
> 
> I'm primarily interested in clojurescript and not at all in clojure, because 
> of specific reasons (that
> I'll skip since their irrelevant for this discussion) dependency on JVM is a 
> problem. Removing
> that's dependency is also my primary motivation to contribute. 
> 
> ## Problems
> 
> - I do understand that most of the clojurescript audience is probably also 
> interested in clojure,
>   but please don't enforce that. Have a separate mailing list so that people 
> interested in
>   clojurescript and not clojure could follow relevant discussions without 
> manually filtering out
>   threads.
> 
> - What is the point of being on github if you don't accept pull requests and 
> require I do understand
>   that there maybe specific reasons why jira flow was chosen, but seriously 
> that's another ball
>   thrown at potential contributor to joggle. Not to mention that there are 
> several options how
>   jira and github could be integrated.
> 
> - My latest attempt was to configure travis.ci for integration tests
>   https://github.com/clojure/clojurescript/pull/21
>   
>Integration tests are great specially because they run on every pull 
> request and post details back
>into pull requests. This also means that lot of local test run time can be 
> saved. Not to mention that
>for clojurescript tests you need JVM, v8, spidermonkey and more…
> 
> If these things are intentionally made hard to stop new people with more 
> clojurescipt interests then please
> make it more clear, cause otherwise it just a motivation killer. 
> 
> Thanks
> --
> Irakli Gozalishvili
> Web: http://www.jeditoolkit.com/

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Jay Fields
I'm not sure I've ever sent an email where the entire content should
be "+1", but this is the one where it felt most compelling.

Please split the list.

Sent from my iPhone

On Jan 18, 2013, at 4:25 PM, Phil Hagelberg  wrote:

>
> Irakli Gozalishvili writes:
>
>> - I do understand that most of the clojurescript audience is probably
>> also interested in clojure, but please don't enforce that. Have a
>> separate mailing list so that people interested in clojurescript and
>> not clojure could follow relevant discussions without manually
>> filtering out threads.
>
> I don't know whether or not contributions are intentionally made hard,
> but I would also appreciate separate mailing lists and IRC channels for
> Clojure and ClojureScript.
>
> -Phil
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Phil Hagelberg

Irakli Gozalishvili writes:

> - I do understand that most of the clojurescript audience is probably
> also interested in clojure, but please don't enforce that. Have a
> separate mailing list so that people interested in clojurescript and
> not clojure could follow relevant discussions without manually
> filtering out threads.

I don't know whether or not contributions are intentionally made hard,
but I would also appreciate separate mailing lists and IRC channels for
Clojure and ClojureScript.

-Phil

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Is contributing to clojurescript is intentionally made hard ?

2013-01-18 Thread Irakli Gozalishvili
I have being trying to engage community and to contribute to clojurescript for 
a while already,  
but so far it's being mostly frustrating and difficult. I hope to start 
discussion here and maybe
get some constructive outcome.

## Rationale

I'm primarily interested in clojurescript and not at all in clojure, because of 
specific reasons (that
I'll skip since their irrelevant for this discussion) dependency on JVM is a 
problem. Removing
that's dependency is also my primary motivation to contribute.  

## Problems

- I do understand that most of the clojurescript audience is probably also 
interested in clojure,
  but please don't enforce that. Have a separate mailing list so that people 
interested in
  clojurescript and not clojure could follow relevant discussions without 
manually filtering out
  threads.

- What is the point of being on github if you don't accept pull requests and 
require I do understand
  that there maybe specific reasons why jira flow was chosen, but seriously 
that's another ball
  thrown at potential contributor to joggle. Not to mention that there are 
several options how
  jira and github could be integrated.

- My latest attempt was to configure travis.ci for integration tests
  https://github.com/clojure/clojurescript/pull/21
   
   Integration tests are great specially because they run on every pull request 
and post details back
   into pull requests. This also means that lot of local test run time can be 
saved. Not to mention that
   for clojurescript tests you need JVM, v8, spidermonkey and more…

If these things are intentionally made hard to stop new people with more 
clojurescipt interests then please
make it more clear, cause otherwise it just a motivation killer.  

Thanks
--
Irakli Gozalishvili
Web: http://www.jeditoolkit.com/

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

ClojureScript + Jayq Resulting in Error

2013-01-18 Thread Ari
Hi,

When I use the jayq  library to wait until 
the page loads (see following code) I get the error below. If I remove 
jayq, the code executes correctly. Does anyone know what I'm doing wrong? 
Thanks.

Html:




https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js";>
var CLOSURE_NO_DEPS = true;





Clojurescript:

(ns myapp.example
(:use [jayq.core :only [$]])
(:use-macros [jayq.macros :only [ready]]))

(ready (js/alert "Hello"))

Error:
jQuery.ajaxSetup(jayq.core.clj__GT_js.call...

-Ari

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Unexpected failure (split function)

2013-01-18 Thread Chas Emerick
Looks like a reply issue.  The expression in question evals fine in ccw with 
the latest nREPL, and in lein 2.0.0-beta10 (which used some beta of reply 
0.1.0) with the latest nREPL.  Lein 2.0.0-RC2 with reply 0.1.6 is affected, 
though.

- Chas

On Jan 18, 2013, at 3:13 PM, Andy Fingerhut wrote:

> This issue appears to be unique to using a Leiningen version 2 REPL.
> 
> It does not occur if using "java -cp clojure.jar clojure.main" to get a REPL, 
> nor with Leiningen version 1.7.1.
> 
> CCing nrepl developer Chas Emerick in case this might be an issue with nrepl, 
> but I haven't attempted to localize the problem any further than mentioned 
> above.
> 
> Andy
> 
> On Jan 18, 2013, at 11:32 AM, Thomas wrote:
> 
>> Hi,
>> 
>> When I run this in my REPL I get an exception and the REPL exits:
>> 
>> user=> (clojure.string/split "asdfsa;asdf;asdf" #";" )
>> Exception Ambiguous match for ";\" )" by #> [Ljava.lang.Object;@77237723>
>>  net.cgrand.parsley.lrplus/array-union/fn--4060 (lrplus.clj:91)
>>  net.cgrand.parsley.lrplus/matchers-union/fn--4072 (lrplus.clj:118)
>>  net.cgrand.parsley.lrplus/step1 (lrplus.clj:166)
>>  net.cgrand.parsley.lrplus/step (lrplus.clj:190)
>>  net.cgrand.parsley/stepper/self--4854 (parsley.clj:39)
>>  net.cgrand.parsley/stepper/self--4854 (parsley.clj:36)
>>  reply.eval-modes.nrepl/parsed-forms (nrepl.clj:72)
>>  reply.eval-modes.nrepl/parsed-forms (nrepl.clj:66)
>>  reply.eval-modes.nrepl/run-repl (nrepl.clj:103)
>>  reply.eval-modes.nrepl/main (nrepl.clj:189)
>>  reply.main/launch-nrepl/fn--5375 (main.clj:60)
>>  clojure.core/with-redefs-fn (core.clj:6585)
>> Bye for now!
>> 
>> If I do use #"\;" (note the \ in there) it works as expected.
>> 
>> Surely this is unexpected (the REPL ending that is), but what about escaping 
>> the ; It is after all in a string and I wouldn't expect it to be seen as a 
>> comment.
>> 
>> REPL-y 0.1.6
>> Clojure 1.4.0
>> 
>> Are my versions.
>> 
>> TIA,
>> Thomas
>> 
>> -- 
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
> 
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Unexpected failure (split function)

2013-01-18 Thread Andy Fingerhut
This issue appears to be unique to using a Leiningen version 2 REPL.

It does not occur if using "java -cp clojure.jar clojure.main" to get a REPL, 
nor with Leiningen version 1.7.1.

CCing nrepl developer Chas Emerick in case this might be an issue with nrepl, 
but I haven't attempted to localize the problem any further than mentioned 
above.

Andy

On Jan 18, 2013, at 11:32 AM, Thomas wrote:

> Hi,
> 
> When I run this in my REPL I get an exception and the REPL exits:
> 
> user=> (clojure.string/split "asdfsa;asdf;asdf" #";" )
> Exception Ambiguous match for ";\" )" by # [Ljava.lang.Object;@77237723>
>   net.cgrand.parsley.lrplus/array-union/fn--4060 (lrplus.clj:91)
>   net.cgrand.parsley.lrplus/matchers-union/fn--4072 (lrplus.clj:118)
>   net.cgrand.parsley.lrplus/step1 (lrplus.clj:166)
>   net.cgrand.parsley.lrplus/step (lrplus.clj:190)
>   net.cgrand.parsley/stepper/self--4854 (parsley.clj:39)
>   net.cgrand.parsley/stepper/self--4854 (parsley.clj:36)
>   reply.eval-modes.nrepl/parsed-forms (nrepl.clj:72)
>   reply.eval-modes.nrepl/parsed-forms (nrepl.clj:66)
>   reply.eval-modes.nrepl/run-repl (nrepl.clj:103)
>   reply.eval-modes.nrepl/main (nrepl.clj:189)
>   reply.main/launch-nrepl/fn--5375 (main.clj:60)
>   clojure.core/with-redefs-fn (core.clj:6585)
> Bye for now!
> 
> If I do use #"\;" (note the \ in there) it works as expected.
> 
> Surely this is unexpected (the REPL ending that is), but what about escaping 
> the ; It is after all in a string and I wouldn't expect it to be seen as a 
> comment.
> 
> REPL-y 0.1.6
> Clojure 1.4.0
> 
> Are my versions.
> 
> TIA,
> Thomas
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Associative extends Seqable?

2013-01-18 Thread Ben Wolfson
On Fri, Jan 18, 2013 at 11:32 AM, Kevin Downey  wrote:
> use ILookup instead of Associative

>> I could just extend ILookup, which contains only valAt, but I'd also
>> like to be able to implement containsKey and entryAt, which AFAICT are
>> only found in Associative. (If I'm wrong, please let me know---I know
>> that count is found in e.g. both IPersistentCollection and Counted.)
>> And in any case I'd like to be able to use IPersistentMap as well, for
>> without. There are sensible definitions of all the functions
>> specifically defined for IPersistentMap and Associative, but there are
>> *not* sensible definitions for all of what they bring along.


-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks,
which may be sweet, aromatic, fermented or spirit-based. ... Family
and social life also offer numerous other occasions to consume drinks
for pleasure." [Larousse, "Drink" entry]

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Unexpected failure (split function)

2013-01-18 Thread Thomas
Hi,

When I run this in my REPL I get an exception and the REPL exits:

user=> (clojure.string/split "asdfsa;asdf;asdf" #";" )
Exception Ambiguous match for ";\" )" by #
net.cgrand.parsley.lrplus/array-union/fn--4060 (lrplus.clj:91)
net.cgrand.parsley.lrplus/matchers-union/fn--4072 (lrplus.clj:118)
net.cgrand.parsley.lrplus/step1 (lrplus.clj:166)
net.cgrand.parsley.lrplus/step (lrplus.clj:190)
net.cgrand.parsley/stepper/self--4854 (parsley.clj:39)
net.cgrand.parsley/stepper/self--4854 (parsley.clj:36)
reply.eval-modes.nrepl/parsed-forms (nrepl.clj:72)
reply.eval-modes.nrepl/parsed-forms (nrepl.clj:66)
reply.eval-modes.nrepl/run-repl (nrepl.clj:103)
reply.eval-modes.nrepl/main (nrepl.clj:189)
reply.main/launch-nrepl/fn--5375 (main.clj:60)
clojure.core/with-redefs-fn (core.clj:6585)
Bye for now!

If I do use #"\;" (note the \ in there) it works as expected.

Surely this is unexpected (the REPL ending that is), but what about 
escaping the ; It is after all in a string and I wouldn't expect it to be 
seen as a comment.

REPL-y 0.1.6
Clojure 1.4.0

Are my versions.

TIA,
Thomas

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Associative extends Seqable?

2013-01-18 Thread Kevin Downey
use ILookup instead of Associative


On Fri, Jan 18, 2013 at 11:00 AM, Ben Wolfson  wrote:

> I've got a bit of code implementing Associative, in order to provide a
> fake map that responds to all calls to valAt with the same object, no
> matter what the key is.
>
> Since it therefore "contains" every possible key, it doesn't make much
> sense to call keys or seq on it (and it doesn't make *much* sense to
> call vals on it if you expect the result of vals to be equinumerous
> with the key/value pairs in the map). Nor does it make much sense to
> call count on it.
>
> However, since Associative extends IPersistentCollection extends
> Seqable, the result is an instance of Seqable, and coll? returns true,
> etc., even though, as I said, the promises those interfaces make don't
> really make sense.
>
> I could just extend ILookup, which contains only valAt, but I'd also
> like to be able to implement containsKey and entryAt, which AFAICT are
> only found in Associative. (If I'm wrong, please let me know---I know
> that count is found in e.g. both IPersistentCollection and Counted.)
> And in any case I'd like to be able to use IPersistentMap as well, for
> without. There are sensible definitions of all the functions
> specifically defined for IPersistentMap and Associative, but there are
> *not* sensible definitions for all of what they bring along.
>
> Is there a way to weasel out of this? Force coll? to return false,
> make the runtime think these pseudo-maps aren't instances of Seqable?
> Being enumerable or seqable is not a necessary property of something
> that maps keys to values.
>
> --
> Ben Wolfson
> "Human kind has used its intelligence to vary the flavour of drinks,
> which may be sweet, aromatic, fermented or spirit-based. ... Family
> and social life also offer numerous other occasions to consume drinks
> for pleasure." [Larousse, "Drink" entry]
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>



-- 
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: [ANN] Schejulure 0.1.1

2013-01-18 Thread Jason Lewis
Adam,

This looks great. I was building a couple of applications that run periodic
tasks/services on top of quartzite, but I'll definitely play with this.
Much nicer scheduling syntax, and the lack of a single stateful scheduler
feels much more Clojurian (and cleaner, too).

Thanks!

Jason Lewis

Email  jasonlewi...@gmail.com

Twitter@canweriotnow 

About http://about.me/jason.lewis


On Fri, Jan 18, 2013 at 12:14 PM, Paulo Suzart wrote:

> Hello Adam,
>
> I knew about https://github.com/overtone/at-at. Your lib is pretty
> straight forward and promising.
>
> Cheers
>
>
> On 17 January 2013 16:05, Adam Clements  wrote:
>
>> A URL would probably help: https://github.com/AdamClements/schejulure
>>
>>
>> On Thursday, January 17, 2013 5:56:40 PM UTC, Adam Clements wrote:
>>>
>>> So there are a few scheduling libraries around, I wanted one for
>>> cron-like job scheduling and my options were quite limited, there are
>>> things like clj-cronlike and quartzite but I found the syntax quite clunky
>>> and didn't like the central stateful scheduler idea. There are also things
>>> like at-at, but that's more for events recurring over seconds/minutes or
>>> one-shot events, so that was out too.
>>>
>>> In the end I wrote my own library. It's tiny (~60 lines) and does one
>>> task quite well. It's modelled after futures, and in fact returns a future,
>>> so use it in the same places/way you might use a future, but for recurring
>>> events.
>>>
>>> To schedule things, it's like a cron setup (so by default fires every
>>> minute of every hour of every day...) but you can pass a map of times when
>>> it should fire, so for example {:minute [0 15 30 45] :day :tue} will fire
>>> every 15 minutes on a tuesday where {:hour 9} will fire every minute from
>>> 9-10am every day. Beyond that you simply call schedule with pairs of
>>> schedule maps to functions which should fire.
>>>
>>> Example:
>>> => (def my-running-scheduler
>>>  (schedule {:hour 12 :minute [0 15 30 45]} my-function
>>>{:hour (range 0 24 6) :minute 0 :day [:sat :sun]}
>>> batch-job))
>>>
>>> ...
>>> => (future-cancel my-running-scheduler)
>>>
>>> Simple as that.
>>>
>>> Like I say, this was to scratch my own itch, but if anyone else finds it
>>> useful, great. If it nearly does what you want but not quite... hey, it's
>>> only 60 lines, fork it/fix it. If anyone has suggestions for features,
>>> bugfixes or other libraries I should be contributing this code to instead,
>>> that would be useful knowledge too.
>>>
>>  --
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>
>
> --
> Paulo Suzart
> @paulosuzart
>
> --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Associative extends Seqable?

2013-01-18 Thread Ben Wolfson
I've got a bit of code implementing Associative, in order to provide a
fake map that responds to all calls to valAt with the same object, no
matter what the key is.

Since it therefore "contains" every possible key, it doesn't make much
sense to call keys or seq on it (and it doesn't make *much* sense to
call vals on it if you expect the result of vals to be equinumerous
with the key/value pairs in the map). Nor does it make much sense to
call count on it.

However, since Associative extends IPersistentCollection extends
Seqable, the result is an instance of Seqable, and coll? returns true,
etc., even though, as I said, the promises those interfaces make don't
really make sense.

I could just extend ILookup, which contains only valAt, but I'd also
like to be able to implement containsKey and entryAt, which AFAICT are
only found in Associative. (If I'm wrong, please let me know---I know
that count is found in e.g. both IPersistentCollection and Counted.)
And in any case I'd like to be able to use IPersistentMap as well, for
without. There are sensible definitions of all the functions
specifically defined for IPersistentMap and Associative, but there are
*not* sensible definitions for all of what they bring along.

Is there a way to weasel out of this? Force coll? to return false,
make the runtime think these pseudo-maps aren't instances of Seqable?
Being enumerable or seqable is not a necessary property of something
that maps keys to values.

-- 
Ben Wolfson
"Human kind has used its intelligence to vary the flavour of drinks,
which may be sweet, aromatic, fermented or spirit-based. ... Family
and social life also offer numerous other occasions to consume drinks
for pleasure." [Larousse, "Drink" entry]

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: [ANN] Schejulure 0.1.1

2013-01-18 Thread Paulo Suzart
Hello Adam,

I knew about https://github.com/overtone/at-at. Your lib is pretty straight
forward and promising.

Cheers

On 17 January 2013 16:05, Adam Clements  wrote:

> A URL would probably help: https://github.com/AdamClements/schejulure
>
>
> On Thursday, January 17, 2013 5:56:40 PM UTC, Adam Clements wrote:
>>
>> So there are a few scheduling libraries around, I wanted one for
>> cron-like job scheduling and my options were quite limited, there are
>> things like clj-cronlike and quartzite but I found the syntax quite clunky
>> and didn't like the central stateful scheduler idea. There are also things
>> like at-at, but that's more for events recurring over seconds/minutes or
>> one-shot events, so that was out too.
>>
>> In the end I wrote my own library. It's tiny (~60 lines) and does one
>> task quite well. It's modelled after futures, and in fact returns a future,
>> so use it in the same places/way you might use a future, but for recurring
>> events.
>>
>> To schedule things, it's like a cron setup (so by default fires every
>> minute of every hour of every day...) but you can pass a map of times when
>> it should fire, so for example {:minute [0 15 30 45] :day :tue} will fire
>> every 15 minutes on a tuesday where {:hour 9} will fire every minute from
>> 9-10am every day. Beyond that you simply call schedule with pairs of
>> schedule maps to functions which should fire.
>>
>> Example:
>> => (def my-running-scheduler
>>  (schedule {:hour 12 :minute [0 15 30 45]} my-function
>>{:hour (range 0 24 6) :minute 0 :day [:sat :sun]}
>> batch-job))
>>
>> ...
>> => (future-cancel my-running-scheduler)
>>
>> Simple as that.
>>
>> Like I say, this was to scratch my own itch, but if anyone else finds it
>> useful, great. If it nearly does what you want but not quite... hey, it's
>> only 60 lines, fork it/fix it. If anyone has suggestions for features,
>> bugfixes or other libraries I should be contributing this code to instead,
>> that would be useful knowledge too.
>>
>  --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>



-- 
Paulo Suzart
@paulosuzart

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: seeking namespace-aware xml lib

2013-01-18 Thread Roan O'Sullivan
Thanks for the status update.


On Fri, Jan 18, 2013 at 4:03 AM, Ben Smith-Mannschott  wrote:

> Not currently, alas, having hacked my primary motivating example
> (publishing my wife's most recent novel for kindle) by hand. I'd like to
> return to it, but probably not soon. First I want to get 0.4.0 of edn-java
> released.
>
> Ben
>
>
> On Thursday, January 17, 2013, lewen7er9 wrote:
>
>> Just wondering if this is still being actively worked.
>>
>> On Monday, July 16, 2012 3:53:21 PM UTC-4, bsmith.occs wrote:
>>>
>>> TL;DR: I'm looking for a Clojure library that round trips XML+namespaces
>>> through Clojure data structures and back again.
>>>
>>>
>>> I'm hacking on a chewing-gum-and-bailing-wire solution publish my wife's
>>> novels as EPUB.  I've got most of a prototype of the core functionality
>>> working, but an stubbing my toe an a lack of what  would consider
>>> sufficient XML support in the Clojure universe.
>>>
>>> I'm consuming Apple Pages (heavily namespaced XML) and will need to
>>> produce XML Plist, XHTML, OPF and NCX, all of which are namespaced as
>>> well.
>>>
>>> My first prototype parser for Pages documents used clojure.xml and
>>> works, provided Apple never changes the prefixes they use for the
>>> various namespaces the crop up in a Pages document. This is because
>>> clojure.xml is absolutely namespace ignorant. Also, there doesn't seem
>>> to be a way to write clojure.xml out as literal XML.
>>>
>>> I'm in the process of switching to clojure.data.xml, but have discovered
>>> that it parses namespace aware by default, but only uses this in order
>>> to have a simple way to ignore namespace information without getting
>>> confused by spurious namespace prefixes.
>>>
>>> That would be fine for parsing the Pages document, but it's a
>>> non-starter for producing my output files since these require the use of
>>> namespaces.
>>>
>>> I've looked at hiccup, which would solve my HTML production problem,
>>> save for the fact that it produces XHTML 1.0 while my current
>>> half-manual publishing process uses XHTML 1.1. I expect either version
>>> would work, but that still leaves me without a solution for Plist, OPF
>>> and NCX.
>>>
>>>
>>> What are my best options? Am I overlooking a Clojure library that
>>> already does what I need? I could try to teach data.xml to support XML
>>> namespaces, but the current half-hearted hack which conflates Clojure
>>> namespaces with XML namespaces would have to go, I fear. I could instead
>>> put my time into extending hiccup to support XML more generally, or at
>>> least provide explicit support for NCX, OPF and PList. Should I just
>>> write my own library? Maybe I could build atop XOM so as not to reinvent
>>> the heavy lifting.
>>>
>>> // Ben
>>>
>>  --
>> 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 unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>  --
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Clojure Literature

2013-01-18 Thread Brian Marick

On Jan 18, 2013, at 8:46 AM, Reginald Choudari  
wrote:

> I am looking for a new Clojure book to get me started on the language. 

Here's a beginning Clojure reading list, with some discussion:
http://regretful.ly/clojure/2013/01/16/beginning-clojure-reading-list/


Occasional consulting on programming technique
Contract programming in Ruby and Clojure
Latest book: /Functional Programming for the Object-Oriented Programmer/
https://leanpub.com/fp-oo

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


[ANN] java.classpath 0.2.1

2013-01-18 Thread Stuart Sierra
On its way to a Maven repository near you (within 24 hours):

[org.clojure/java.classpath "0.2.1"]

Changes:

- Fixed http://dev.clojure.org/jira/browse/CLASSPATH-4

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Clojure Literature

2013-01-18 Thread Reginald Choudari
I am looking for a new Clojure book to get me started on the language. I've 
been doing some clojure-koans and reading up on web-development with 
Clojure and am interested to get down to the knitty-gritty... From what 
I've seen, it looks like the latest Clojure books are from around 
March/April 2012. Seeing that Clojure is a changing language, I didn't want 
to buy a book that would quickly become obsolete. 

>From all that I read, this page seemed to be the most comprehensive 
description of the current state of Clojure 
literature: http://stackoverflow.com/questions/2578837/comparing-clojure-books

I'd like to hear if anyone has any recommendations or if there is news of 
any upcoming books coming out that might be worth waiting for.

Thanks,
Reginald

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Error on redirect when attempting unauthorized entry to Friend route

2013-01-18 Thread Chas Emerick
If you're being redirected to:

http://localhost:4/login?&login_failed=Y&username=lawrence

Then the problem is that you're not using the credentials for one of the users 
you've specified (e.g. "root" or "jane").

- Chas

On Jan 17, 2013, at 1:43 PM, larry google groups wrote:

> 
> How should I debug this? What questions should I ask?
> 
> At this point, for the sake of debugging, I have everything in one
> file, in one name space. I have recreated the dummy users database:
> 
> 
> (def users {"root"{:username "lawrence"
>   :password (creds/hash-bcrypt "admin_password")
>   :roles #{::admin}
>   :created_at "2013-01-08 14:00:00"
>   :telephone-numbers [{:country "USA" :number "434
> 825 7694"}
>   {:country "USA" :number "732
> 364 3640"}]}
>"jane" {:username "jane"
>:password (creds/hash-bcrypt "user_password")
>:roles #{::user}
>:created_at "2013-01-10 16:40:34"
>:telephone-numbers []}})
> 
> 
> And, as far as I know, I have set up the routes with Compojure and
> Friend correctly:
> 
> (defroutes app-routes
>  (GET "/" request (index request))
>  (GET "/search-results" request (search-results request))
>  (GET "/schema" request (schema request))
>  (GET "/account" request (friend/authorize #{::user} {} (account
> request)))
>  (GET "/admin" request (friend/authorize #{::admin} {} (admin
> request)))
>  (friend/logout (ANY "/logout" request (ring.util.response/redirect
> "/")))
>  (GET "/login" request (login request))
>  (route/not-found "Page not found"))
> 
> (def app
>(-> app-routes
>(friend/authenticate {:credential-fn (partial creds/bcrypt-
> credential-fn users)
>  :workflows [(workflows/interactive-
> form)]})
>(wrap-resource "public")
>(wrap-session {:cookie-name "discovery-session" :cookie-attrs
> {:max-age 1 }})
>(wrap-cookies)
>(wrap-keyword-params)
>(wrap-nested-params)
>(wrap-params)))
> 
> (defn -main [& args]
>  (let [port (Integer/parseInt (first args))]
>(try
>  (run-jetty #'app {:port (or port 8080) :join? false})
>  (catch Exception e (debug/print-error-info e)
> 
> When I go here:
> 
> http://localhost:4/admin
> 
> I get redirected to here:
> 
> http://localhost:4/login
> 
> So far, so good.
> 
> But when I try to log in, I end up with this for an URL:
> 
> http://localhost:4/login?&login_failed=Y&username=lawrence
> 
> I am wondering how I should debug this?
> 
> The admin function looks like this:
> 
> (defn admin [request]
>  (let [page-with-banner (add-banner-image-to-page)
>page-with-result (enlive/at page-with-
> banner
>[:#trips]
>(enlive/content
> (apply str (dashboard)))
>page-string (apply str (enlive/emit* page-with-result))]
>(response page-string)))
> 
> How should I debug this? How do I find out what is not working? What
> questions should I ask?
> 
> -- 
> 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 unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


clojure-jack-in problem with a project using clj and cljs files.

2013-01-18 Thread mmwaikar
Hi,

I have a project which uses both Clojure and Clojurescript. Hence in its 
project.clj file, I have -

:source-paths ["src/clj"]

and for Clojurescript -

{:builds
  [{;; CLJS source code path
:source-path "src/cljs"

;; Google Closure (CLS) options configuration
:compiler {;; CLS generated JS script filename
   :output-to "resources/public/js/kiosk.js"

   ;; minimal JS optimization directive
   :optimizations :whitespace

   ;; generated JS code prettyfication
   :pretty-print true}}]}

Now when I do M-x clojure-jack-in I get the following error - 

Debugger entered--Lisp error: (error "Could not start swank server: 
'jack-in' is not a task. See 'lein help'.
")
  signal(error ("Could not start swank server: 'jack-in' is not a task. See 
'lein help'.\n"))
  error("Could not start swank server: %s" "'jack-in' is not a task. See 
'lein help'.\n")
  clojure-jack-in-sentinel(# "exited abnormally with code 
1\n")

I have another project which uses only Clojure; there clojure-jack-in works 
perfectly.

Is this an issue or is there another way to start Clojure repl if the 
source files are in a different directory?

Thanks,
Manoj.

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: seeking namespace-aware xml lib

2013-01-18 Thread Ben Smith-Mannschott
Not currently, alas, having hacked my primary motivating example
(publishing my wife's most recent novel for kindle) by hand. I'd like to
return to it, but probably not soon. First I want to get 0.4.0 of edn-java
released.

Ben

On Thursday, January 17, 2013, lewen7er9 wrote:

> Just wondering if this is still being actively worked.
>
> On Monday, July 16, 2012 3:53:21 PM UTC-4, bsmith.occs wrote:
>>
>> TL;DR: I'm looking for a Clojure library that round trips XML+namespaces
>> through Clojure data structures and back again.
>>
>>
>> I'm hacking on a chewing-gum-and-bailing-wire solution publish my wife's
>> novels as EPUB.  I've got most of a prototype of the core functionality
>> working, but an stubbing my toe an a lack of what  would consider
>> sufficient XML support in the Clojure universe.
>>
>> I'm consuming Apple Pages (heavily namespaced XML) and will need to
>> produce XML Plist, XHTML, OPF and NCX, all of which are namespaced as
>> well.
>>
>> My first prototype parser for Pages documents used clojure.xml and
>> works, provided Apple never changes the prefixes they use for the
>> various namespaces the crop up in a Pages document. This is because
>> clojure.xml is absolutely namespace ignorant. Also, there doesn't seem
>> to be a way to write clojure.xml out as literal XML.
>>
>> I'm in the process of switching to clojure.data.xml, but have discovered
>> that it parses namespace aware by default, but only uses this in order
>> to have a simple way to ignore namespace information without getting
>> confused by spurious namespace prefixes.
>>
>> That would be fine for parsing the Pages document, but it's a
>> non-starter for producing my output files since these require the use of
>> namespaces.
>>
>> I've looked at hiccup, which would solve my HTML production problem,
>> save for the fact that it produces XHTML 1.0 while my current
>> half-manual publishing process uses XHTML 1.1. I expect either version
>> would work, but that still leaves me without a solution for Plist, OPF
>> and NCX.
>>
>>
>> What are my best options? Am I overlooking a Clojure library that
>> already does what I need? I could try to teach data.xml to support XML
>> namespaces, but the current half-hearted hack which conflates Clojure
>> namespaces with XML namespaces would have to go, I fear. I could instead
>> put my time into extending hiccup to support XML more generally, or at
>> least provide explicit support for NCX, OPF and PList. Should I just
>> write my own library? Maybe I could build atop XOM so as not to reinvent
>> the heavy lifting.
>>
>> // Ben
>>
>  --
> 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 'clojure@googlegroups.com');>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com  'clojure%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: my css and images are on the wrong path? -- NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes

2013-01-18 Thread larry google groups

Hmm, strange. I have had a lot of problems trying to get Friend to
work. I have been wrestling with it, on and off, for 2 days, and I
have not gotten it to work. I just removed all the paths that had to
do anything with Friend, and now the paths to my images and CSS and
Javascript are working. Not sure if that is coincident to something
else, or whether the cause is somehow direct.


On Jan 18, 3:08 am, larry google groups 
wrote:
> I searched on Google but found little about this error.
>
> I was leaving work, where my app was working, and so I did "git push
> origin master" and sent it all to Github, I got home and did "git pull
> origin master" to pull everything onto my machine (work is a Mac
> running OSX 10.8 and at home I've got a Mac running OSX 10.7).
>
> Then I ran "lein uberjar" and then I started the app with "java -jar
> discovery-0.9-standalone.jar 3
>
> And then I pointed my browser tohttp://localhost:3
>
> For all of the static resources, I got errors like this:
>
> 2013-01-18 02:54:04.900:WARN:oejs.AbstractHttpConnection:/css/
> bootstrap-and-combined-libraries.css
> java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes
>
> All of a sudden, the app is not finding the CSS files, or the images,
> or the Javascript. My routes are setup in Compojure like this:
>
> (defroutes app-routes
>   (GET "/" request (index request))
>   (GET "/search-results" request (search-results request))
>   (GET "/schema" request (schema request))
>   (GET "/account" request (friend/authorize #{::user} {} (account
> request)))
>   (GET "/admin" request (friend/authorize #{::admin} {} (admin
> request)))
>   (friend/logout (ANY "/logout" request (ring.util.response/redirect
> "/")))
>   (GET "/login" request (login request))
>   (route/not-found "Page not found"))
>
> (def app
>     (-> app-routes
>         (friend/authenticate {:credential-fn (partial creds/bcrypt-
> credential-fn users)
>                               :workflows [(workflows/interactive-
> form)]})
>         (wrap-resource "public")
>         (wrap-session {:cookie-name "discovery-session" :cookie-attrs
> {:max-age 1 }})
>         (wrap-cookies)
>         (wrap-keyword-params)
>         (wrap-nested-params)
>         (wrap-params)))
>
> (defn -main [& args]
>   (let [port (Integer/parseInt (first args))]
>     (try
>       (run-jetty #'app {:port (or port 8080) :join? false})
>       (catch Exception e (debug/print-error-info e)
>
> I actually saw this problem for about 5 minutes this afternoon at
> work. But then the problem fixed itself so I forgot about it. But now
> it is back and nothing I do seems to fix it. The CSS and images are
> paths like this:
>
> resources
>     public
>         css
>         images
>         js
> src
>     discovery
>         core.clj
>
> If I hit "view source" in the browser and then click on the links for
> the CSS I get a 404 error:
>
>      rel="stylesheet">
>     
>
> But this was working when I left work, and, as I say, all I did was
> get home, pull down the changes, rebuild the app and launch it. I am
> not clear what might have changed to cause this error.
>
> Any thoughts?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


my css and images are on the wrong path? -- NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes

2013-01-18 Thread larry google groups
I searched on Google but found little about this error.

I was leaving work, where my app was working, and so I did "git push
origin master" and sent it all to Github, I got home and did "git pull
origin master" to pull everything onto my machine (work is a Mac
running OSX 10.8 and at home I've got a Mac running OSX 10.7).

Then I ran "lein uberjar" and then I started the app with "java -jar
discovery-0.9-standalone.jar 3

And then I pointed my browser to http://localhost:3

For all of the static resources, I got errors like this:

2013-01-18 02:54:04.900:WARN:oejs.AbstractHttpConnection:/css/
bootstrap-and-combined-libraries.css
java.lang.NoClassDefFoundError: org/eclipse/jetty/http/MimeTypes

All of a sudden, the app is not finding the CSS files, or the images,
or the Javascript. My routes are setup in Compojure like this:

(defroutes app-routes
  (GET "/" request (index request))
  (GET "/search-results" request (search-results request))
  (GET "/schema" request (schema request))
  (GET "/account" request (friend/authorize #{::user} {} (account
request)))
  (GET "/admin" request (friend/authorize #{::admin} {} (admin
request)))
  (friend/logout (ANY "/logout" request (ring.util.response/redirect
"/")))
  (GET "/login" request (login request))
  (route/not-found "Page not found"))

(def app
(-> app-routes
(friend/authenticate {:credential-fn (partial creds/bcrypt-
credential-fn users)
  :workflows [(workflows/interactive-
form)]})
(wrap-resource "public")
(wrap-session {:cookie-name "discovery-session" :cookie-attrs
{:max-age 1 }})
(wrap-cookies)
(wrap-keyword-params)
(wrap-nested-params)
(wrap-params)))

(defn -main [& args]
  (let [port (Integer/parseInt (first args))]
(try
  (run-jetty #'app {:port (or port 8080) :join? false})
  (catch Exception e (debug/print-error-info e)


I actually saw this problem for about 5 minutes this afternoon at
work. But then the problem fixed itself so I forgot about it. But now
it is back and nothing I do seems to fix it. The CSS and images are
paths like this:

resources
public
css
images
js
src
discovery
core.clj

If I hit "view source" in the browser and then click on the links for
the CSS I get a 404 error:




But this was working when I left work, and, as I say, all I did was
get home, pull down the changes, rebuild the app and launch it. I am
not clear what might have changed to cause this error.

Any thoughts?

-- 
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 unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en