Using the Undertow AJP Linstner in Immutant2

2015-02-20 Thread Eunmin Kim
Hi!
I added ajp? on immutant.web/run option to use the Undertow AJP Linstner in 
Immutant2. :)

https://github.com/eunmin/immutant/tree/support_undertow_ajp


-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Returning early from a function

2015-02-20 Thread Cecil Westerhof
I have a function to check the parameters of another function:
(defn params-correct-lucky-numbers
  [upto]
  (let [max (* 10 1000 1000)]
(if (< upto 1)
(do
(println "The parameter upto should at least be 1")
false)
  (if (> upto max)
  (do
  (printf "The parameter upto should be below %d\n" (inc
max))
  false)
true

I am used to something like:
​Boolean params-correct-lucky-numbers(int upto) {
final int MAX = 10_000_000;

if (upto < 1) {
   System.out.println("The parameter upto should at least be
1");
return false;
}
if (upto > MAX) {
   System.out.printf("The parameter upto should be below %d\n",
MAX + 1);
return false;
}
return true;
}

Personally I find this clearer. In this case it is not a big deal, but when
you have to check 20 parameters …

Could the Clojure function be rewritten into something resembling the Java
function? (In a functional way of-course.)​

-- 
Cecil Westerhof

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Returning early from a function

2015-02-20 Thread Cecil Westerhof
Answering my own question. :-D

2015-02-20 11:01 GMT+01:00 Cecil Westerhof :

> I have a function to check the parameters of another function:
> (defn params-correct-lucky-numbers
>   [upto]
>   (let [max (* 10 1000 1000)]
> (if (< upto 1)
> (do
> (println "The parameter upto should at least be 1")
> false)
>   (if (> upto max)
>   (do
>   (printf "The parameter upto should be below %d\n" (inc
> max))
>   false)
> true
>
> I am used to something like:
> ​Boolean params-correct-lucky-numbers(int upto) {
> final int MAX = 10_000_000;
>
> if (upto < 1) {
>System.out.println("The parameter upto should at least be
> 1");
> return false;
> }
> if (upto > MAX) {
>System.out.printf("The parameter upto should be below
> %d\n", MAX + 1);
> return false;
> }
> return true;
> }
>
> Personally I find this clearer. In this case it is not a big deal, but
> when you have to check 20 parameters …
>
> Could the Clojure function be rewritten into something resembling the Java
> function? (In a functional way of-course.)​
>


​I stumbled on cond, so it becomes:
(defn params-correct-lucky-numbers
  [upto]
  (let [max (* 10 1000 1000)]
   (cond
  (< upto 1) (do (println "The parameter upto should at least be 1")
 false)
  (> upto max) (do (printf "The parameter upto should be below %d\n"
(inc max))
   false)
  :else true)))

-- 
Cecil Westerhof

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using the Undertow AJP Linstner in Immutant2

2015-02-20 Thread Jim Crossley
Cool. Submit a PR and we'll get it merged in.

Thanks!
Jim

On Fri, Feb 20, 2015 at 4:25 AM, Eunmin Kim  wrote:
> Hi!
> I added ajp? on immutant.web/run option to use the Undertow AJP Linstner in
> Immutant2. :)
>
> https://github.com/eunmin/immutant/tree/support_undertow_ajp
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clojure takes all CPU and fails after 12 minutes

2015-02-20 Thread Cecil Westerhof
I have the following code:
(defn params-correct-lucky-numbers
  ( [upto] (params-correct-lucky-numbers upto true))
  ( [upto check-max]
(let [max (* 10 1000 1000)]
 (cond
   (< upto 1) (do (printf "The parameter upto should at least be 1
(%d)\n" upto)
  false)
   (and check-max
(> upto max)) (do (printf "The parameter upto should be
below %d (%d)\n" (inc max) upto)
  false)
   :else true

(defn lucky-numbers-avl
  "Lucky numbers from 1 up-to.
  1 <= upto-value <= 10.000.000
  http://en.wikipedia.org/wiki/Lucky_number";
  ; doc-string and pre-condition should match
params-correct-lucky-numbers
  [upto]
  {:pre [(params-correct-lucky-numbers upto false)]}
  (if (= upto 1)
  ; for 1 the algorithm does not work, so return value manually
  (list 1)
(loop [i   1
   avl (apply avl/sorted-set (range 1 upto 2))]
  (let [n (nth avl i nil)]
(if (and n (<= n (count avl)))
(recur (inc i)
   (reduce (fn [sss m] (disj sss (nth avl m)))
   avl
   (range (dec n) (count avl) n)))
  (sequence avl))

When I execute in the REPL:
(time (count (lucky-numbers-avl 1E8)))

Then after some time the Clojure process takes the complete CPU (all
cores). Twelve minutes later I get:
OutOfMemoryError Java heap space  java.lang.Long.valueOf (Long.java:840)

In a way I understand what is happening here, but should Clojure not fail
sooner? Now it is about ten minutes busy with something that is not going
to work. (If it is possible to predict that it is not going to work.)

-- 
Cecil Westerhof

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Returning early from a function

2015-02-20 Thread Cedric Roussel
You may want to look at
https://clojuredocs.org/clojure.core/case
https://clojuredocs.org/clojure.core/cond

On Friday, February 20, 2015 at 11:01:43 AM UTC+1, Cecil Westerhof wrote:
>
> I have a function to check the parameters of another function:
> (defn params-correct-lucky-numbers
>   [upto]
>   (let [max (* 10 1000 1000)]
> (if (< upto 1)
> (do
> (println "The parameter upto should at least be 1")
> false)
>   (if (> upto max)
>   (do
>   (printf "The parameter upto should be below %d\n" (inc 
> max))
>   false)
> true
>
> I am used to something like:
> ​Boolean params-correct-lucky-numbers(int upto) {
> final int MAX = 10_000_000;
>
> if (upto < 1) {
>System.out.println("The parameter upto should at least be 
> 1");
> return false;
> }
> if (upto > MAX) {
>System.out.printf("The parameter upto should be below 
> %d\n", MAX + 1);
> return false;
> }
> return true;
> }
>
> Personally I find this clearer. In this case it is not a big deal, but 
> when you have to check 20 parameters …
>
> Could the Clojure function be rewritten into something resembling the Java 
> function? (In a functional way of-course.)​
>
> -- 
> Cecil Westerhof
>  

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Injecting html code into selmer

2015-02-20 Thread Anatoly Smolyaninov
Hello!
You have strange syntax -- no `:` symbol before keyword, `render` (not 
`render-file`) function for html template...

Try this, both works for me [selmer "0.8.0"]:
 
(render "{{ foo-str|safe }}" {:foo-str "bold!"})
(render-file "templates/foo.djhtml" {:foo-str "bold!"})

пятница, 20 февраля 2015 г., 4:27:28 UTC+6 пользователь Sven Richter 
написал:
>
> Hi,
>
> I wonder if this is even possible.
> I have a string :foo-string "foo" and I pass this string to selmer:
> (render "templ.html" {foo-string "foo"})
>
> Now in the templ.html I do this:
> {{foo-string|safe}} which injects this into the html:
> "foo" 
>
> But what I need is plain html like this inside the template:
> foo
>
> Is that even possible?
>
> Thanks,
> Sven
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing branches in PersistentTreeMap / sorted-map / CLJ-1008

2015-02-20 Thread David James
Thanks for your comments. I see now that I should clarify: all I really 
need is public access to the left and right Java methods in PTM. (So, 
perhaps CLJ-1008 is asking for more than I really need.)

It seems to me that since Clojure's RB-Tree implementation (i.e. sorted-map 
= PTM), it might as well expose a Java API for root node (which it does) 
and branches (which is does not, currently). Is there any downside to 
exposing the 'right' and 'left' Java methods as public?

In the near term, I'll be using data.avl. I'm glad it exists! My use case 
involves a non-overlapping interval map to store time series data that 
doesn't change very often.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing branches in PersistentTreeMap / sorted-map / CLJ-1008

2015-02-20 Thread Michał Marczyk
Do you mean you'd like to compress

  {0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9 :c}

to something like

  {[0 1 2] :a [4 5] :b [6 7 8 9] :c}

while maintaining the ability to ask for the value at 0, 1, …, 9?

If so, you could represent the above as

  {0 :a 2 :a 4 :b 5 :b 6 :c 9 :c}

(notice no explicit entries for 1, 7, 8) and query for the value at 7, say,
using

  (val (avl/nearest the-map <= 7))
  ;= :c

(avl/nearest can be implemented for built-in sorted maps using subseq and
first, in fact the test suite for data.avl has an implementation like that
that it compares avl/nearest against).

If you need more operations – say, data.avl-style slice-{at,key} and
subrange – those could be supported with some care (mostly around the
possibility that a slice, say, removes an endpoint of an interval – you may
need to add the slice boundary as a replacement in that case).

Cheers,
Michał


On 20 February 2015 at 16:15, David James  wrote:

> Thanks for your comments. I see now that I should clarify: all I really
> need is public access to the left and right Java methods in PTM. (So,
> perhaps CLJ-1008 is asking for more than I really need.)
>
> It seems to me that since Clojure's RB-Tree implementation (i.e.
> sorted-map = PTM), it might as well expose a Java API for root node (which
> it does) and branches (which is does not, currently). Is there any downside
> to exposing the 'right' and 'left' Java methods as public?
>
> In the near term, I'll be using data.avl. I'm glad it exists! My use case
> involves a non-overlapping interval map to store time series data that
> doesn't change very often.
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing branches in PersistentTreeMap / sorted-map / CLJ-1008

2015-02-20 Thread Michał Marczyk
PS. Well, I suppose you'd want to make sure that you're not getting a key
that lies past the right endpoint of the map when using the nearest-based
approach.


On 20 February 2015 at 16:39, Michał Marczyk 
wrote:

> Do you mean you'd like to compress
>
>   {0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9 :c}
>
> to something like
>
>   {[0 1 2] :a [4 5] :b [6 7 8 9] :c}
>
> while maintaining the ability to ask for the value at 0, 1, …, 9?
>
> If so, you could represent the above as
>
>   {0 :a 2 :a 4 :b 5 :b 6 :c 9 :c}
>
> (notice no explicit entries for 1, 7, 8) and query for the value at 7,
> say, using
>
>   (val (avl/nearest the-map <= 7))
>   ;= :c
>
> (avl/nearest can be implemented for built-in sorted maps using subseq and
> first, in fact the test suite for data.avl has an implementation like that
> that it compares avl/nearest against).
>
> If you need more operations – say, data.avl-style slice-{at,key} and
> subrange – those could be supported with some care (mostly around the
> possibility that a slice, say, removes an endpoint of an interval – you may
> need to add the slice boundary as a replacement in that case).
>
> Cheers,
> Michał
>
>
> On 20 February 2015 at 16:15, David James  wrote:
>
>> Thanks for your comments. I see now that I should clarify: all I really
>> need is public access to the left and right Java methods in PTM. (So,
>> perhaps CLJ-1008 is asking for more than I really need.)
>>
>> It seems to me that since Clojure's RB-Tree implementation (i.e.
>> sorted-map = PTM), it might as well expose a Java API for root node (which
>> it does) and branches (which is does not, currently). Is there any downside
>> to exposing the 'right' and 'left' Java methods as public?
>>
>> In the near term, I'll be using data.avl. I'm glad it exists! My use case
>> involves a non-overlapping interval map to store time series data that
>> doesn't change very often.
>>
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing branches in PersistentTreeMap / sorted-map / CLJ-1008

2015-02-20 Thread David James
Yes, exactly, you read my mind.

(I'd also like to do this a sorted-map / PersistentTreeMap (nudge, nudge) 
-- all that is missing would be public 'left' and 'right' accessors. I 
don't necessarily need rank functionality.)

On Friday, February 20, 2015 at 10:39:26 AM UTC-5, Michał Marczyk wrote:
>
> Do you mean you'd like to compress
>
>   {0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9 :c}
>
> to something like
>
>   {[0 1 2] :a [4 5] :b [6 7 8 9] :c}
>
> while maintaining the ability to ask for the value at 0, 1, …, 9?
>
> If so, you could represent the above as
>
>   {0 :a 2 :a 4 :b 5 :b 6 :c 9 :c}
>
> (notice no explicit entries for 1, 7, 8) and query for the value at 7, 
> say, using
>
>   (val (avl/nearest the-map <= 7))
>   ;= :c
>
> (avl/nearest can be implemented for built-in sorted maps using subseq and 
> first, in fact the test suite for data.avl has an implementation like that 
> that it compares avl/nearest against).
>
> If you need more operations – say, data.avl-style slice-{at,key} and 
> subrange – those could be supported with some care (mostly around the 
> possibility that a slice, say, removes an endpoint of an interval – you may 
> need to add the slice boundary as a replacement in that case).
>
> Cheers,
> Michał
>
>
> On 20 February 2015 at 16:15, David James  > wrote:
>
>> Thanks for your comments. I see now that I should clarify: all I really 
>> need is public access to the left and right Java methods in PTM. (So, 
>> perhaps CLJ-1008 is asking for more than I really need.)
>>
>> It seems to me that since Clojure's RB-Tree implementation (i.e. 
>> sorted-map = PTM), it might as well expose a Java API for root node (which 
>> it does) and branches (which is does not, currently). Is there any downside 
>> to exposing the 'right' and 'left' Java methods as public?
>>
>> In the near term, I'll be using data.avl. I'm glad it exists! My use case 
>> involves a non-overlapping interval map to store time series data that 
>> doesn't change very often.
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Licensing of software products created with Clojure and related

2015-02-20 Thread David Christensen

clojure:

I'm looking for a LISP-like programming language with a robust library 
and multi-platform support for open- and closed-source projects 
(scripts, applications, libraries, plug-ins, whatever).  Clojure looks 
like a good possibility.



It appears that Clojure itself is licensed under the Eclipse Public 
License v 1.0:


http://clojure.org/license

https://www.eclipse.org/org/documents/epl-v10.php

https://www.eclipse.org/legal/eplfaq.php


How do I figure out what licenses are involved for the various 
combinations of target platforms (Linux, Windows, OS/X, iOS, Android, 
WWW), libraries (Java/JRE, .NET, JavaScript), tools (leiningen), etc.?



How do I figure out what combinations are valid or invalid for open- and 
closed-source development and distribution?



TIA,

David

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Licensing of software products created with Clojure and related

2015-02-20 Thread Phillip Lord

Well, you have to read the license, or employ a lawyer to do so.

You mostly can do what you want with Clojure under EPL. You can build 
proprietary products with Clojure and distribute them
with or without Clojure itself. The main limitation is that you cannot 
distribute a modified version of Clojure without releasing  the 
source to those modifications.

At least that is how I read it.


From: clojure@googlegroups.com [clojure@googlegroups.com] on behalf of David 
Christensen [dpchr...@holgerdanske.com]
Sent: 20 February 2015 18:02
To: clojure@googlegroups.com
Subject: Licensing of software products created with Clojure and related

clojure:

I'm looking for a LISP-like programming language with a robust library
and multi-platform support for open- and closed-source projects
(scripts, applications, libraries, plug-ins, whatever).  Clojure looks
like a good possibility.


It appears that Clojure itself is licensed under the Eclipse Public
License v 1.0:

 http://clojure.org/license

 https://www.eclipse.org/org/documents/epl-v10.php

 https://www.eclipse.org/legal/eplfaq.php


How do I figure out what licenses are involved for the various
combinations of target platforms (Linux, Windows, OS/X, iOS, Android,
WWW), libraries (Java/JRE, .NET, JavaScript), tools (leiningen), etc.?


How do I figure out what combinations are valid or invalid for open- and
closed-source development and distribution?


TIA,

David

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Accessing branches in PersistentTreeMap / sorted-map / CLJ-1008

2015-02-20 Thread Michał Marczyk
You don't need left and right, you can literally use a sorted map / PTM
that looks like {0 :a 3 :a …} as your representation and build a wrapper to
query it appropriately using functions like avl/nearest, but implemented
using first/(r)(sub)seq.

Here's a prototype:

https://github.com/michalmarczyk/ticktickticktock

(require '[ticktickticktock.core :as ])

(/-map 0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9 :c)
;= {0 :a, 3 :a, 4 :b, 5 :b, 6 :c, 9 :c}
;; the above is a wrapper around a sorted map

Some interactions:

user=> (get (/-map 0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9
:c) -1)
nil
user=> (get (/-map 0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9
:c) 0)
:a
user=> (get (/-map 0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9
:c) 1)
:a
user=> (get (/-map 0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9
:c) 8)
:c

NB. this really is a prototype – it supports only the what's strictly
necessary for the above demo to work – but it should be fairly
straightforward to extend it to support other desirable features. (For
example assoc elsewhere than beyond the rightmost key etc. dissoc of single
values doesn't really make sense here, but I suppose "inserting a gap"
would.) Also, I don't think it handles lookups "in between intervals" very
well… That's fixable as well. I guess the first thing to fix would be the
lack of a clear target API design. :-)

Cheers,
Michał


On 20 February 2015 at 20:09, David James  wrote:

> Yes, exactly, you read my mind.
>
> (I'd also like to do this a sorted-map / PersistentTreeMap (nudge, nudge)
> -- all that is missing would be public 'left' and 'right' accessors. I
> don't necessarily need rank functionality.)
>
> On Friday, February 20, 2015 at 10:39:26 AM UTC-5, Michał Marczyk wrote:
>>
>> Do you mean you'd like to compress
>>
>>   {0 :a 1 :a 2 :a 3 :a 4 :b 5 :b 6 :c 7 :c 8 :c 9 :c}
>>
>> to something like
>>
>>   {[0 1 2] :a [4 5] :b [6 7 8 9] :c}
>>
>> while maintaining the ability to ask for the value at 0, 1, …, 9?
>>
>> If so, you could represent the above as
>>
>>   {0 :a 2 :a 4 :b 5 :b 6 :c 9 :c}
>>
>> (notice no explicit entries for 1, 7, 8) and query for the value at 7,
>> say, using
>>
>>   (val (avl/nearest the-map <= 7))
>>   ;= :c
>>
>> (avl/nearest can be implemented for built-in sorted maps using subseq and
>> first, in fact the test suite for data.avl has an implementation like that
>> that it compares avl/nearest against).
>>
>> If you need more operations – say, data.avl-style slice-{at,key} and
>> subrange – those could be supported with some care (mostly around the
>> possibility that a slice, say, removes an endpoint of an interval – you may
>> need to add the slice boundary as a replacement in that case).
>>
>> Cheers,
>> Michał
>>
>>
>> On 20 February 2015 at 16:15, David James  wrote:
>>
>>> Thanks for your comments. I see now that I should clarify: all I really
>>> need is public access to the left and right Java methods in PTM. (So,
>>> perhaps CLJ-1008 is asking for more than I really need.)
>>>
>>> It seems to me that since Clojure's RB-Tree implementation (i.e.
>>> sorted-map = PTM), it might as well expose a Java API for root node (which
>>> it does) and branches (which is does not, currently). Is there any downside
>>> to exposing the 'right' and 'left' Java methods as public?
>>>
>>> In the near term, I'll be using data.avl. I'm glad it exists! My use
>>> case involves a non-overlapping interval map to store time series data that
>>> doesn't change very often.
>>>
>>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Clojurescript Light Table Setup

2015-02-20 Thread JvJ
I'm having some issues working with CLJS and Light table.  I've found a few 
things online, but never a single end-to-end setup.  Does anyone have any 
advice on setting up, beginning with lein, ending with repl-browser 
connection in light table?

Thanks.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No such var during runtime

2015-02-20 Thread Sven Richter
Hi,

A user reported an error for closp which I cannot make sense of: 
java.lang.RuntimeException: No such var: t-cli/parse-opts, 
compiling:(leiningen/new/closp.clj:102:52)
This is the issue: https://github.com/sveri/closp/issues/1
The code is here: 
https://github.com/sveri/closp/blob/master/src/leiningen/new/closp.clj

Interpreting the error message I would say that t-cli is not required in 
the namespace, but looking at line 6 I see this: [clojure.tools.cli :as 
t-cli]. Also I can execute the same command again and again and it just 
works.

Any ideas what might be causing this?

Thanks,
Sven

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Clojurescript Light Table Setup

2015-02-20 Thread Sam Ritchie

What issues are you having?


JvJ 
February 20, 2015 at 2:17 PM
I'm having some issues working with CLJS and Light table.  I've found 
a few things online, but never a single end-to-end setup.  Does anyone 
have any advice on setting up, beginning with lein, ending with 
repl-browser connection in light table?


Thanks.
--
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 unsubscribe from this group and stop receiving emails from it, send 
an email to clojure+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Sam Ritchie (@sritchie)
Paddleguru Co-Founder
703.863.8561
www.paddleguru.com 
Twitter // Facebook 



--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-20 Thread Timothy Pratley
Alex/Rich, if a patch is welcome for this I am happy to raise a ticket and 
submit.

Test case:
(clojure.data/diff {:x {:y 1}} {:x {}})

Expected:
({:x {:y 1}} nil nil)

Actual:
;; => ({:x {:y 1}} {:x nil} nil)

Problem:
There is nothing only in the second input, so the second result should be 
nil.
{:x nil} implies that there is a nil in the second input, which there is 
not.
Furthermore the result cannot distinguish from
(clojure.data/diff {:x {:y 1}} {:x nil})
Which should and does correctly return {:x nil} as the second result.

Affects:
Empty collections in first or second argument

Cause:
clojure.data/diff-associative-key
[(when (and in-a (or (not (nil? a*)) (not same))) {k a*})
 (when (and in-b (or (not (nil? b*)) (not same))) {k b*})
 (when same {k ab})]
should be
[(when (and in-a (or (not (nil? a*)) (and (not same) (nil? va {k 
a*})
 (when (and in-b (or (not (nil? b*)) (and (not same) (nil? vb {k 
b*})
 (when same {k ab})]))

Why do I care?:
I use and maintain a modest library to send state changes from Clojure to 
ClojureScript
https://github.com/timothypratley/patchin
In this context, handling empty collections/nils is desirable so the data 
can be treated abstractly.
I have a workaround, so am not affected by the issue, just providing a 
motivating example where knowing the difference is useful.



Regards,
Timothy

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-20 Thread Andy Fingerhut
Timothy, I probably haven't thought about this carefully enough yet, but
why do you expect the return value to be ({:x {:y 1}} nil nil) in your test
case?

Why not ({:x {:y 1}} {:x {}} nil)  ?

Andy

On Fri, Feb 20, 2015 at 4:13 PM, Timothy Pratley 
wrote:

> Alex/Rich, if a patch is welcome for this I am happy to raise a ticket and
> submit.
>
> Test case:
> (clojure.data/diff {:x {:y 1}} {:x {}})
>
> Expected:
> ({:x {:y 1}} nil nil)
>
> Actual:
> ;; => ({:x {:y 1}} {:x nil} nil)
>
> Problem:
> There is nothing only in the second input, so the second result should be
> nil.
> {:x nil} implies that there is a nil in the second input, which there is
> not.
> Furthermore the result cannot distinguish from
> (clojure.data/diff {:x {:y 1}} {:x nil})
> Which should and does correctly return {:x nil} as the second result.
>
> Affects:
> Empty collections in first or second argument
>
> Cause:
> clojure.data/diff-associative-key
> [(when (and in-a (or (not (nil? a*)) (not same))) {k a*})
>  (when (and in-b (or (not (nil? b*)) (not same))) {k b*})
>  (when same {k ab})]
> should be
> [(when (and in-a (or (not (nil? a*)) (and (not same) (nil? va {k
> a*})
>  (when (and in-b (or (not (nil? b*)) (and (not same) (nil? vb {k
> b*})
>  (when same {k ab})]))
>
> Why do I care?:
> I use and maintain a modest library to send state changes from Clojure to
> ClojureScript
> https://github.com/timothypratley/patchin
> In this context, handling empty collections/nils is desirable so the data
> can be treated abstractly.
> I have a workaround, so am not affected by the issue, just providing a
> motivating example where knowing the difference is useful.
>
>
>
> Regards,
> Timothy
>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-20 Thread Timothy Pratley
On Fri, Feb 20, 2015 at 4:40 PM, Andy Fingerhut 
wrote:

> Why not ({:x {:y 1}} {:x {}} nil)  ?
>

Hi Andy,


Great point! Both solutions convey accurately the same meaning? I have a
subjective preference to nil as the absence of things in b that are not in
a. Conversely {:x {}} implies that :x is replaced by an empty map, which is
indeed equivalent, but to my mind the map was always there. It does call
out the fact that the collection is now empty, which might be useful if one
was interested in identifying that condition.

Do you have any thoughts on why {:x {}} might be better?


Regards,
Timothy

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-20 Thread Andy Fingerhut
The goal with your library is to transmit deltas between two systems, and
then apply those deltas to the other system to make them match, yes?

How would you use the diff return value ({:x {:y 1}} nil nil) to cause a
system that currently has {:x {:y 1}} to change to {:x {}}, as opposed to
some other state?  That is, how would it know it needs to change the value
associated with :x to {} as opposed to removing the key :x and its value
entirely?

Andy

On Fri, Feb 20, 2015 at 5:34 PM, Timothy Pratley 
wrote:

> On Fri, Feb 20, 2015 at 4:40 PM, Andy Fingerhut 
> wrote:
>
>> Why not ({:x {:y 1}} {:x {}} nil)  ?
>>
>
> Hi Andy,
>
>
> Great point! Both solutions convey accurately the same meaning? I have a
> subjective preference to nil as the absence of things in b that are not in
> a. Conversely {:x {}} implies that :x is replaced by an empty map, which is
> indeed equivalent, but to my mind the map was always there. It does call
> out the fact that the collection is now empty, which might be useful if one
> was interested in identifying that condition.
>
> Do you have any thoughts on why {:x {}} might be better?
>
>
> Regards,
> Timothy
>
>  --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Workaround for CLJ-1604?

2015-02-20 Thread tcrayford
CLJ-1604 was just fixed (as far as I can see), by this 
commit: 
https://github.com/clojure/clojure/commit/59889fdeb7ef7f4f73e13fa6ecb627f62b7d2adb

On Friday, 20 February 2015 12:10:50 UTC+8, Adam Krieg wrote:
>
> I'm running into what appears to be the same issue described in CLJ-1604 
> , where a library that I'm 
> using (Korma) has a function that clashes with a new function in Clojure 
> core with 1.7, update.
>
> At the point of invocation, I get the compilation exception:
> Exception in thread "main" java.lang.RuntimeException: No such var: 
> korma.core/update, 
>
> Other than ripping out Korma or downgrading to 1.6, is there anything I 
> can do to avoid this issue?
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using the Undertow AJP Linstner in Immutant2

2015-02-20 Thread Eunmin Kim
Awesome! :)

2015년 2월 20일 금요일 오후 11시 12분 11초 UTC+9, Jim Crossley 님의 말:
>
> Cool. Submit a PR and we'll get it merged in. 
>
> Thanks! 
> Jim 
>
> On Fri, Feb 20, 2015 at 4:25 AM, Eunmin Kim  > wrote: 
> > Hi! 
> > I added ajp? on immutant.web/run option to use the Undertow AJP Linstner 
> in 
> > Immutant2. :) 
> > 
> > https://github.com/eunmin/immutant/tree/support_undertow_ajp 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@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+u...@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 unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to clojure+u...@googlegroups.com . 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [BUG] : clojure.data/diff handles nested empty collections incorrectly

2015-02-20 Thread Timothy Pratley
Hi Andy,


On Fri, Feb 20, 2015 at 5:51 PM, Andy Fingerhut 
wrote:

> The goal with your library is to transmit deltas between two systems, and
> then apply those deltas to the other system to make them match, yes?
>

Correct, it works well for what I need it to do. :)


> How would you use the diff return value ({:x {:y 1}} nil nil) to cause a
> system that currently has {:x {:y 1}} to change to {:x {}}, as opposed to
> some other state?  That is, how would it know it needs to change the value
> associated with :x to {} as opposed to removing the key :x and its value
> entirely?
>

The short answer is (update-in state [:x] dissoc :y).
Which is identical in result to (assoc state :x {}).
So either representation could be used to accomplish the goal, and can be
interchanged.

As such I think either solution would be great! (and am happy to provide a
patch either way).


Below digresses from clojure.core/diff concerns, but I'm including it to
more fully answer your question.

I'll expand a little on the way patchin currently works. The second
clojure.data/diff return value is used as replacements. The first item
returned from clojure.data/diff is used as the keys to dissoc, excluding
things that would be replaced anyway. If the patch size is greater than the
target, just the target is sent. So in the end it constructs the same patch
you described (as it is smaller). Valid patches look like either:
[x]
[diss replace]
So the patch sent is
[{:x {}}]
Which means "replace the state with {:x {}}
but for {:x {:y "foo", z "bar", w "baz"}} -> {:x {:z "bar", w "baz", q
"bonza"}} the patch sent is
[{:x {:y 1}} {:x {:q "bonza"}}]
Which means "replace in state [:x :q] bonza, and strip out [:x :y].
Plus some minor tricks to handle sets, and treat sequences as values.
There are good resources for sequence diff compression but haven't thought
of a good way to represent them in the same patch as a structural diff, and
haven't had the need.

I do not think clojure.data/diff need concern itself with optimization, as
it currently serves the purpose of identifying differences very well, and
optimization comes with calculation/size tradeoffs specific to the usage.


Regards,
Timothy

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: javac-options are ignored

2015-02-20 Thread Justin Smith
This would make sense because javac isn't used to generate those classes.

On Thursday, February 19, 2015 at 5:08:33 PM UTC-8, Jeremy Heiler wrote:
>
> On February 19, 2015 at 4:40:16 PM, Felipe Gerard (fge...@interware.com.mx 
> ) wrote: 
> > When you set: 
> >   
> > :javac-options ["-target" "1.6" "-source" "1.6” ] 
>
> This option is only for when you are compiling Java source. 
>
>
> https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L249:L251
>  
>
> > I think this is a bug. Any help please? 
>
> It looks like that 1.5 is hardcoded in the Clojure compiler. 
>
> See: 
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java
>  
>
> And search for “V1_5”. 
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No such var during runtime

2015-02-20 Thread Sean Corfield
Could it perhaps be this bug at work?

http://dev.clojure.org/jira/browse/CLJ-1604 


Sean

On Feb 20, 2015, at 1:31 PM, Sven Richter  wrote:
> A user reported an error for closp which I cannot make sense of: 
> java.lang.RuntimeException: No such var: t-cli/parse-opts, 
> compiling:(leiningen/new/closp.clj:102:52)
> This is the issue: https://github.com/sveri/closp/issues/1
> The code is here: 
> https://github.com/sveri/closp/blob/master/src/leiningen/new/closp.clj
> 
> Interpreting the error message I would say that t-cli is not required in the 
> namespace, but looking at line 6 I see this: [clojure.tools.cli :as t-cli]. 
> Also I can execute the same command again and again and it just works.
> 
> Any ideas what might be causing this?

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.