Interop with strange java type: java.lang.String<>

2015-08-20 Thread Andy Dwelly
I'm having to do some interop with a proprietary - and erroneously 
documented - Java SDK. There's a class C with a method described as 
'translate(java.lang.String). Trying to call the method with a Clojure on
an object of class C I got a 'no matching method found' error.

So I used the following snippet from stack overflow to print out the entire 
collection of methods on the object (useful enough to repeat here):

(ns ...
  (:require  [clojure.reflect :as r]
 [clojure.pprint :refer [print-table]))
(print-table
  (sort-by :name
(filter :exception-types (:members (r/reflect (type my-object))

What I discovered was that the translate method had a signature reported as 
'translate(java.lang.String<>)', not a mere quirk of the reflection process 
- there were plenty of other methods taking the usual java.lang.String 
method as well.

Does anyone know how how to create a java.lang.String<> ? Ideally how to 
convert a Clojure "some string" which is a java.lang.String to a 
java.lang.String<>.
Also, although this is merely idle curiosity on my part, does anyone know 
what a java.lang.String<> actually is? The <> suggests a generic, but 
java.lang.String is not a container - although the <> is empty of course.


-- 
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 core.async results in page getting replaced with empty iframe

2015-08-20 Thread Colin Yates
Daniel, is the UI constructed based on receiving something from a
channel? which is incorrectly setup and so the UI is 'blocked' pulling
from that channel.

Timothy Baldridge writes:

> core.async has nothing to do with the DOM, so I don't know how this could
> happen.
>
> On Wed, Aug 19, 2015 at 3:00 PM, Malcolm Sparks  wrote:
>
>> Would you mind pasting the rest of your dependencies? This is the most
>> curious of puzzles and I'd love to know the answer - but I'm really stumped
>> so please provide the next clue!
>>
>>
>> On Wednesday, 19 August 2015 19:32:22 UTC+1, Daniel Higginbotham wrote:
>>>
>>> I've found that using core.async in one of my projects results in the
>>> entire DOM getting replaced with an empty iframe when I view the site in
>>> Firefox. I'm using
>>>
>>> [org.clojure/clojure   "1.7.0"]
>>> [org.clojure/clojurescript "1.7.48"]
>>> [org.clojure/core.async"0.1.346.0-17112a-alpha"]
>>>
>>>
>>> I've tried to isolate the problem and am unable to reproduce it in a
>>> minimal project using only core.async. However - has anyone else run into
>>> anything similar? Does core.async use iframes somehow? Any other
>>> suggestions or leads?
>>>
>>> Thanks!
>>> Daniel
>>>
>> --
>> 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.
>>
>
>
>
> --
> “One of the main causes of the fall of the Roman Empire was that–lacking
> zero–they had no way to indicate successful termination of their C
> programs.”
> (Robert Firth)

--
Sent with my mu4e

-- 
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 core.async results in page getting replaced with empty iframe

2015-08-20 Thread Malcolm Sparks
Could you also run

lein deps :tree

and paste the output to the thread. It could be that one of your
dependencies is already depending on core.async transitively, and the
explicit inclusion of a different version of core.async causes that to
break. This is a long shot but it could help.

On 20 August 2015 at 10:22, Colin Yates  wrote:

> Daniel, is the UI constructed based on receiving something from a
> channel? which is incorrectly setup and so the UI is 'blocked' pulling
> from that channel.
>
> Timothy Baldridge writes:
>
> > core.async has nothing to do with the DOM, so I don't know how this could
> > happen.
> >
> > On Wed, Aug 19, 2015 at 3:00 PM, Malcolm Sparks 
> wrote:
> >
> >> Would you mind pasting the rest of your dependencies? This is the most
> >> curious of puzzles and I'd love to know the answer - but I'm really
> stumped
> >> so please provide the next clue!
> >>
> >>
> >> On Wednesday, 19 August 2015 19:32:22 UTC+1, Daniel Higginbotham wrote:
> >>>
> >>> I've found that using core.async in one of my projects results in the
> >>> entire DOM getting replaced with an empty iframe when I view the site
> in
> >>> Firefox. I'm using
> >>>
> >>> [org.clojure/clojure   "1.7.0"]
> >>> [org.clojure/clojurescript "1.7.48"]
> >>> [org.clojure/core.async"0.1.346.0-17112a-alpha"]
> >>>
> >>>
> >>> I've tried to isolate the problem and am unable to reproduce it in a
> >>> minimal project using only core.async. However - has anyone else run
> into
> >>> anything similar? Does core.async use iframes somehow? Any other
> >>> suggestions or leads?
> >>>
> >>> Thanks!
> >>> Daniel
> >>>
> >> --
> >> 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.
> >>
> >
> >
> >
> > --
> > “One of the main causes of the fall of the Roman Empire was that–lacking
> > zero–they had no way to indicate successful termination of their C
> > programs.”
> > (Robert Firth)
>
> --
> Sent with my mu4e
>
> --
> 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 a topic in the
> Google Groups "Clojure" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/clojure/kgLcFpTnxL4/unsubscribe.
> To unsubscribe from this group and all its topics, 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: How can find something inside heavily nested data structure ?

2015-08-20 Thread Dave Tenny
I have found the core 'get-in' function to be useful for extracting data 
from big trees of clojure data structures, perhaps
that will help.

I'm still in search of tools that let me get a good sense of *what* to 
navigate when looking at such trees
of data structures from API's  and/or data sources I'm unfamiliar with.  I 
find that to be pretty painful, not least
because emacs (and maybe the REPL) get seriously compute wedged printing 
large data structures.

An example of this is Amazonica, which will flatten ALL the data in a 
hierarchy of java data structures from
the AWS SDK into one gigantic tree.  It's a nifty tool, but the resulting 
flood of data with one careless query or printed tree fragment has been 
known to knock out my emacs session for minutes at a time.

I wrote a tool to analyze unique key paths in large trees so that I might 
know, for a given tree, what would be useful to provide as the access path 
to 'get-in'.
However I'm not happy enough with my tool to post it here, it needs some 
kind of syntax for describing sequences in the tree (since you don't want 
to see every unique key
used to access a sequence of 10,000 things).


On Wednesday, August 19, 2015 at 10:18:06 AM UTC-4, Hussein B. wrote:
>
> Hi,
>
> I have transformed JSON response into the equivalent data structure using 
> Cheshire library.
>
> The result is a huge nested data structure , mostly vectors and maps. It 
> is actually a tree.
>
> How to find a property that is nested deep inside the tree ? For example 
> I'm search for the node that has the value zyx for property "uuid".
>
> What I'm supposed to use? Something like zipper or walk? or something 
> simpler is available?
>
> Thanks for help.
>

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


[ANN] New Clojure Book: Clojure Data Structures and Algorithms Cookbook

2015-08-20 Thread Rafik NACCACHE
Hi Guys,

I am proud to let you know that my book dealing about advanced algorithms
in Clojure has hit the shelves. Please head over to:

https://www.packtpub.com/application-development/clojure-data-structures-and-algorithms-cookbook

Rafik

-- 
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: [ANN] New Clojure Book: Clojure Data Structures and Algorithms Cookbook

2015-08-20 Thread gvim

On 20/08/2015 12:21, Rafik NACCACHE wrote:

Hi Guys,

I am proud to let you know that my book dealing about advanced
algorithms in Clojure has hit the shelves. Please head over to:

https://www.packtpub.com/application-development/clojure-data-structures-and-algorithms-cookbook

Rafik



Congrats, Rafik. The book looks great. I just wish you'd gone with a 
publisher with more realistic pricing.


gvim

--
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: partition-when?

2015-08-20 Thread Laurens Van Houtven
Gorgeous! Thanks, Moe! (Chris says hi back :))

> On Aug 19, 2015, at 7:51 PM, Moe Aboulkheir  wrote:
> 
> Laurens,
> 
> I don't think I've encountered an identical function I can point you to, but 
> here's an alternative implementation:
> 
> (defn partition-when [pred coll]
>   (lazy-seq
>(when-let [[h & t] (seq coll)]
>  (let [[run remains] (split-with (complement pred) t)]
>(cons (cons h run) (partition-when pred remains))
> 
> Do you like that any better?
> 
> P.S: Say Hi to Chris for me!
> 
> Take care,
> Moe
> 
> 
> On Thu, Aug 20, 2015 at 1:34 AM, Laurens Van Houtven <_...@lvh.io 
> > wrote:
> Hi,
> 
> 
> I needed a function that partitions (coll a) => (coll (coll a)), starting a 
> new subcoll whenever a given pred is true. Use case: I have a sequence of 
> rows; these rows form groups; I want to group them. A group is started by a 
> header; so I want a new coll whenever my is-header? pred returns true.
> 
> I found an implementation that used partition-by on the mailing list, but 
> this had some issues: if multiple elems next to each other were true under 
> the pred, it wouldn’t create a new pred for each one.
> 
> I came up with the following implementation.
> 
> (defn ^:private partition-when
>   "Partitions the coll whenever (f elem) is true."
>   [pred coll]
>   (-> (reduce (fn [[first & rest :as groups] elem]
> (if (pred elem)
>   (conj groups [elem])
>   (conj rest (conj first elem
>   '()
>   coll)
>   reverse))
> 
> It feels like this could be written a *lot* better. With Haskell’s 
> Data.List.Split, this becomes:
> 
> partitionWith p xs = filter (/= []) (split (whenElt p) xs)
> 
> (thanks to my colleague Christopher Armstrong for the help with the Haskell 
> version)
> 
> It would *almost* be partitionWith p = split (whenElt p), but for some reason 
> split sometimes returns empty lists. Granted, this is a specialized library; 
> I’d be more than happy to get partition-when from a 3rd party. It’d be even 
> nicer if it was in Clojure though :)
> 
> 
> thanks
> lvh
> 
> -- 
> 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 
> .

-- 
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: Unable to write GPL software with clojure?

2015-08-20 Thread Atamert Ölçgen
On Wed, Aug 19, 2015 at 1:05 AM, Sean Corfield  wrote:

> On 8/18/15, 2:24 PM, "Kyle Sexton"  k...@mocker.org> wrote:
>
>
> >Can anyone weigh in on whether it is possible to write GPL code with
> clojure?  Seen some recent[1] tweets saying that the EPL on clojure core
> prevents writing GPL code with clojure.
>
> You cannot write an application that is GPL and released as a standalone
> program with EPL libraries embedded:
>
> https://eclipse.org/legal/eplfaq.php#GPLCOMPATIBLE
>
> "Based upon the position  of the
> Free Software Foundation, you may not combine EPL and GPL code in any
> scenario where linking exists between code made available under those
> licenses. The above applies to both GPL version 2 and GPL version 3."
>
> https://www.fsf.org/blogs/licensing/using-the-gpl-for-eclipse-plug-ins
>
> "However, developers who want to release GPL-covered plug-ins for Eclipse
> can address this issue by providing an additional permission with their
> license 
> that grants users permission to combine their work with Eclipse in this
> way."
>
> In other words, while you can’t write standalone GPL software using EPL
> libraries, you could provide just your (Clojure) software under a modified
> GPL that would allow end users to then combine it with the (EPL) libraries
> it needs to make a complete piece of software — but that wouldn’t be very
> convenient for your users.
>

I have added this extra clause to clecs' LICENSE
:

If you modify this Program, or any covered work, by linking or
combining it with clojure (or a modified version of that
library), containing parts covered by the terms of EPL, the licensors
of this Program grant you additional permission to convey the resulting
work. Corresponding source for a non-source form of such a combination
shall include the source code for the parts of clojure used as well as
that of the covered work.


To my understanding a game can be written with clecs & Clojure provided
that it's distributed with GPL. Any other non-GPL clojure library cannot be
included in the distribution though, as far as I can understand. It would
be cool it would automatically work.



>
> This is part of why some people consider GPL to be a "viral" license and
> why many companies will not use GPL software: it "taints" everything it
> touches and requires "the whole thing" to be GPL. Proponents of GPL will
> argue a different position (so, be careful, this is almost a religious
> issue on both sides).
>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "If you're not annoying somebody, you're not really alive."
> -- Margaret Atwood
>
>
>
>
> --
> 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.
>



-- 
Kind Regards,
Atamert Ölçgen

◻◼◻
◻◻◼
◼◼◼

www.muhuk.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 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: Interop with strange java type: java.lang.String<>

2015-08-20 Thread Stephen C. Gilardi

> On Aug 20, 2015, at 3:32 AM, Andy Dwelly  wrote:
> 
> Does anyone know how how to create a java.lang.String<> ? Ideally how to 
> convert a Clojure "some string" which is a java.lang.String to a 
> java.lang.String<>.
> Also, although this is merely idle curiosity on my part, does anyone know 
> what a java.lang.String<> actually is? The <> suggests a generic, but 
> java.lang.String is not a container - although the <> is empty of course.

I don’t have a complete answer, but maybe these references will help:

I recall seeing a <> in this post:

http://tech.puredanger.com/2011/08/12/subclassing-in-clojure/ 


and I see it mentioned here:

http://dishevelled.net/Tricky-uses-of-Clojure-gen-class-and-AOT-compilation.html
 


Maybe that argument is an array of Object where the objects are Strings. In 
other contexts I have seen the class name for an array of Strings displayed as 
“class [Ljava.lang.String”, but perhaps it’s printed differently by this 
reflection API.

—Steve

-- 
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: Unable to write GPL software with clojure?

2015-08-20 Thread Sean Corfield
Atamert Ölçgen said on August 20, 2015 at 8:51 AM:
If you modify this Program, or any covered work, by linking or
combining it with clojure (or a modified version of that
library), containing parts covered by the terms of EPL, the licensors
of this Program grant you additional permission to convey the resulting
work.

Would you expect that to be read as just the Clojure JAR (which contains the 
Clojure compiler itself as well as a number of "standard" namespaces), or would 
you expect that to include the Contrib JAR libraries as well? Or, further, any 
other Clojure libraries released under the EPL?

I think the is the core issue of the confusion: what is "Clojure" for the 
purpose of any such license exclusions?

 Corresponding source for a non-source form of such a combination
shall include the source code for the parts of clojure used as well as
that of the covered work.

Are you saying that the whole of the EPL-licensed Clojure source, for a 
specific version of Clojure used in the combined work, should be physically 
included into the source overall for the combined work? I.e., that any game 
built with clecs and distributed in source form would have to include the 
GitHub repos of any/all Clojure libraries used? [I believe it’s reasonable to 
say this — I just wanted to check this was your intent]

Sean Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"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 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: Unable to write GPL software with clojure?

2015-08-20 Thread Atamert Ölçgen
Hi Sean,

On Thu, Aug 20, 2015 at 8:20 PM, Sean Corfield  wrote:

> Atamert Ölçgen said on August 20, 2015 at 8:51 AM:
>
> If you modify this Program, or any covered work, by linking or
> combining it with clojure (or a modified version of that
> library), containing parts covered by the terms of EPL, the licensors
> of this Program grant you additional permission to convey the resulting
> work.
>
>
> Would you expect that to be read as just the Clojure JAR (which contains
> the Clojure compiler itself as well as a number of "standard" namespaces),
> or would you expect that to include the Contrib JAR libraries as well? Or,
> further, any other Clojure libraries released under the EPL?
>

If you are saying what "clojure" there means is unclear, I agree with that.
And I would like to work towards fixing it. I think, at the time I created
this, my intent was just Clojure distribution (sans contrib) since clecs
only depends on that. But now I realize a game made with clecs can depend
on other libraries as well and this clause perhaps also need to cover them.


>
> I think the is the core issue of the confusion: what is "Clojure" for the
> purpose of any such license exclusions?
>
> Corresponding source for a non-source form of such a combination
> shall include the source code for the parts of clojure used as well as
> that of the covered work.
>
>
> Are you saying that the whole of the EPL-licensed Clojure source, for a
> specific version of Clojure used in the combined work, should be physically
> included into the source overall for the combined work? I.e., that any game
> built with clecs and distributed in source form would have to include the
> GitHub repos of any/all Clojure libraries used? *[I believe it’s
> reasonable to say this — I just wanted to check this was your intent]*
>

If it included clecs' source and the game's source it would be enough for
me. I wouldn't want to dictate terms for other people's code. If another
library the game depends on is also GPL, it's source should be included as
well. But that's because of the other author's licensing. If that library
has a license that doesn't require source distribution, who am I to ask for
that.

Not directly related to licensing but my main intent is to get people to
write games and share them. Not necessarily as a commercial activity but
game development for game development's sake. Commercial side is IMO
already covered well.



>
> Sean Corfield -- (904) 302-SEAN
> An Architect's View -- http://corfield.org/
>
> "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 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.
>



-- 
Kind Regards,
Atamert Ölçgen

◻◼◻
◻◻◼
◼◼◼

www.muhuk.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 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: when the body of the request is HttpInputOverHTTP, how do I get the string representation?

2015-08-20 Thread Jordan Schatz
The Java docs for HttpInputOverHTTP are here:
http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/server/HttpInputOverHTTP.html

and the source is here:
https://github.com/eclipse/jetty.project/blob/master/jetty-server/src/main/java/org/eclipse/jetty/server/HttpInputOverHTTP.java

It matters what data is wrapped by HttpInputOverHTTP, if the submitted data
was binary, slurp will return an empty string. So you may need to pay
attention to the content type header.

As an aside, if you are testing with curl (as I was yesterday...) depending
on your invocation curl will alter the data before it is sent, striping out
newlines from text, not send binary data, etc
http://curl.haxx.se/docs/manpage.html

- Jordan

On Wed, Aug 19, 2015 at 5:45 PM, Mike Rodriguez  wrote:

> Off subject. Just going to throw it out there that HttpInputOverHTTP looks
> like a CamelCase naming convention gone wrong. Id like to hear why it was
> named that way. :)
>
> --
> 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: partition-when?

2015-08-20 Thread Steve Miner
If you’re interested in a transducer version of partition-when, here’s my code 
from https://github.com/miner/transmuters


;; collection version by Frank on mailing list
;; SEM added transducer version, adapted from partition-by
(defn partition-when
   "Applies f to each value in coll, starting a new partition each time f 
returns a
   true value.  Returns a lazy seq of partitions.  Returns a stateful
   transducer when no collection is provided."
  {:static true}
  ([f]
   (fn [rf]
 (let [a (java.util.ArrayList.)]
   (fn
 ([] (rf))
 ([result]
  (let [result (if (.isEmpty a)
 result
 (let [v (vec (.toArray a))]
   ;;clear first!
   (.clear a)
   (unreduced (rf result v]
(rf result)))
 ([result input]
(if (.isEmpty a)
  (do (.add a input)
  result)
  (if (f input)
(let [v (vec (.toArray a))]
  (.clear a)
  (let [ret (rf result v)]
(when-not (reduced? ret)
  (.add a input))
ret))
(do
  (.add a input)
  result

  ([f coll]
  (lazy-seq
   (when-let [s (seq coll)]
 (let [fst (first s)
   run (cons fst (take-while #(not (f %)) (next s)))]
   (cons run (partition-when f (seq (drop (count run) s)


-- 
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: Interop with strange java type: java.lang.String<>

2015-08-20 Thread Justin Smith
I suspect this is it. Also, remember that internally a varargs string 
method will take an Array of String as its last arg.

On Thursday, August 20, 2015 at 9:35:19 AM UTC-7, squeegee wrote:
>
>
> On Aug 20, 2015, at 3:32 AM, Andy Dwelly > 
> wrote:
>
> Does anyone know how how to create a java.lang.String<> ? Ideally how to 
> convert a Clojure "some string" which is a java.lang.String to a 
> java.lang.String<>.
> Also, although this is merely idle curiosity on my part, does anyone know 
> what a java.lang.String<> actually is? The <> suggests a generic, but 
> java.lang.String is not a container - although the <> is empty of course.
>
>
> I don’t have a complete answer, but maybe these references will help:
>
> I recall seeing a <> in this post:
>
> http://tech.puredanger.com/2011/08/12/subclassing-in-clojure/
>
> and I see it mentioned here:
>
>
> http://dishevelled.net/Tricky-uses-of-Clojure-gen-class-and-AOT-compilation.html
>
> Maybe that argument is an array of Object where the objects are Strings. 
> In other contexts I have seen the class name for an array of Strings 
> displayed as “class [Ljava.lang.String”, but perhaps it’s printed 
> differently by this reflection API.
>
> —Steve
>
>

-- 
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: Unable to write GPL software with clojure?

2015-08-20 Thread Fluid Dynamics
On Thursday, August 20, 2015 at 1:40:54 PM UTC-4, Atamert Ölçgen wrote:
>
>
> If it included clecs' source and the game's source it would be enough for 
> me. I wouldn't want to dictate terms for other people's code. If another 
> library the game depends on is also GPL, it's source should be included as 
> well. But that's because of the other author's licensing. If that library 
> has a license that doesn't require source distribution, who am I to ask for 
> that.
>
> Not directly related to licensing but my main intent is to get people to 
> write games and share them. Not necessarily as a commercial activity but 
> game development for game development's sake. Commercial side is IMO 
> already covered well.
>

LGPL might be a better choice than GPL in that case, as LGPL doesn't 
dictate terms for everything that ever gets linked to your code, while 
still providing GPL-like terms for your own code. 

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