Re: [beginner] idiomatic way to parse lazy sequence

2016-11-09 Thread anurag peshne
Hi Bobby,

Thanks for the reply. It worked and my server is serving over HTTP 1.0!
Next step: HTTP 1.1

Regards,
Anurag

On Tuesday, 8 November 2016 08:58:57 UTC-5, Bobby Eickhoff wrote:
>
> Here are a few thoughts.
>
> This algorithm sounds like a fold, i.e. a reduction.  You're iterating 
> over a sequence while accumulating into a collection.  A collection of 
> collections, in this case.
>
> You're starting value for the fold might be this:
>
> {:first {}, :second {}}
>
> You're reducing function would consume each line, adding it into the above 
> map of maps.  Updating the map-of-maps might be done through something like 
> update or update-in:
>
> (update-in maps [:first] add-by-key-and-value line)
>
>
> Here add-by-key-and-value is a function that I've left undefined.  It 
> takes a single map and a line and adds that line by key and value.  (Since 
> the definition of key and value were omitted from the example, I've 
> delegated them to said function.)
>
> Hence, the whole thing might look like this (untested!):
>
> (defn ___ [lines]
>   (let [rf (fn [maps line]
>  (condp re-matches line
>#"some-regex"(update-in maps [:first] 
> add-by-key-and-value line)
>#"another-regex" (update-in maps [:second] 
> add-by-key-and-value key line)))]
> (reduce rf {:first {}, :second {}} lines)))
>
>
> P.S.  I'm using update-in here a bit unnecessarily.  update would work 
> perfectly fine, but I thought it would be better to show you the general 
> form which can update maps to any depth.
>

-- 
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 Repos - Some Dependencies are Not In Clojars

2016-11-09 Thread Alex Miller
We are not going to publish the Clojure contrib libraries to Clojars, sorry.

-- 
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 Repos - Some Dependencies are Not In Clojars

2016-11-09 Thread Vitaly Peressada
Hi All,

FWIK the community uses both Maven Central and Clojars. But it appears that 
Clojars does not have ALL Clojure dependencies. It is an annoying issue in 
my present BIG company where Maven Central is blocked and it takes 2-3 
weeks to approve OSS library and upload it to company internal repo. 
Luckily Clojars is proxied via Nexus and is available.

Two examples are:
org.clojure/tools.nrepl 0.2.12
org.tcrawley:dynapath:jar:0.2.4 (dependency of 
cider/cider-nrepl/0.15.0-SNAPSHOT)

Don't know what historical context is but it would make sense to have ALL 
deps in Clojars with some duplication in Maven Central (may be for clojure 
itself, etc.)

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

2016-11-09 Thread Alex Miller
Let's keep the focus on Clojure here, please.

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

2016-11-09 Thread Colin Yates
And I thought we had it bad with the whole Brexit saga over here :-).

On 9 November 2016 at 12:23, Mikera  wrote:
> Given recent events, I advise caution when it comes to relying on votes to
> make important decisions.
>
> On Tuesday, 8 November 2016 23:33:43 UTC+8, Alex Miller wrote:
>>
>> In the spirit of the US election today, I thought I would mention voting
>> on Clojure tickets. Clojure manages bugs and enhancement requests in JIRA.
>> Anyone can create a JIRA account and vote on open tickets in the system (no
>> contributor agreement is required to vote).
>>
>> In the core team, we look at votes on tickets to be aware of what the
>> community cares about and as one input to the order in which tickets are
>> considered. However, the most-voted tickets in the system have fewer than 30
>> votes and I suspect that there are many thousands of people with opinions
>> about which of these tickets are important.
>>
>> If you'd like to see the lists of the highest voted tickets in the system,
>> you can do so in these reports:
>> - Highest voted defects
>> - Highest voted enhancements
>>
>> Andy Fingerhut also has a weighted voting report that updates about once a
>> week. This show a different perspective - I'm not sure which is more useful
>> but I look at both.
>>
>> If you'd like to learn more about the process:
>> - Overview of contribution links
>> - JIRA workflow
>> - A blog I wrote describing the process
>>
>> A few examples of highly voted issues that have been included in 1.9 so
>> far:
>> - CLJ-1224 Records do not cache hash like normal maps (21 votes)
>> - CLJ-1298 Add more type predicate fns to core (18 votes)
>> - CLJ-1744 Unused destructured local not cleared, causes memory leak (17
>> votes)
>> - CLJ-1242 = on sorted collections with different key types incorrectly
>> throws (7 votes)
>> - CLJ-401Add seqable? predicate (7 votes)
>>
>> Alex
>>
>>
>>
> --
> 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: Voting

2016-11-09 Thread Mikera
Given recent events, I advise caution when it comes to relying on votes to 
make important decisions.

On Tuesday, 8 November 2016 23:33:43 UTC+8, Alex Miller wrote:
>
> In the spirit of the US election today, I thought I would mention voting 
> on Clojure tickets. Clojure manages bugs and enhancement requests in JIRA 
> . Anyone can create a JIRA account 
>  and vote on open 
> tickets in the system (no contributor agreement 
>  is required to vote).
>
> In the core team, we look at votes on tickets to be aware of what the 
> community cares about and as one input to the order in which tickets are 
> considered. However, the most-voted tickets in the system have fewer than 
> 30 votes and I suspect that there are many thousands of people with 
> opinions about which of these tickets are important.
>
> If you'd like to see the lists of the highest voted tickets in the system, 
> you can do so in these reports:
> - Highest voted defects 
> 
> - Highest voted enhancements 
> 
>
> Andy Fingerhut also has a weighted voting report 
> 
>  
> that updates about once a week. This show a different perspective - I'm not 
> sure which is more useful but I look at both.
>
> If you'd like to learn more about the process:
> - Overview  of 
> contribution links 
> - JIRA workflow 
> - A blog I wrote describing the process 
>  
>
> A few examples of highly voted issues that have been included in 1.9 so 
> far:
> - CLJ-1224  Records do not 
> cache hash like normal maps (21 votes)
> - CLJ-1298  Add more type 
> predicate fns to core (18 votes)
> - CLJ-1744  Unused 
> destructured local not cleared, causes memory leak (17 votes)
> - CLJ-1242  = on sorted 
> collections with different key types incorrectly throws (7 votes)
> - CLJ-401    Add seqable? 
> predicate (7 votes)
>
> Alex
>
>
>
>

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