[ANN] Ubergraph 0.3.1

2017-02-23 Thread Mark Engelberg
https://github.com/Engelberg/ubergraph

Ubergraph is a batteries-loaded, immutable graph data structure for Clojure.

Version 0.3.1 includes a pull request from github user masztal that now
allows `viz-graph`, which is an ubergraph visualization tool using
graphviz, to pass along graph-level attributes to graphviz.

Ubergraph has now been in use for almost two years, and has no outstanding
github issues.

Given that Loom is Clojure's other main graph library, many people are
interested in how Ubergraph and Loom compare.

Broadly speaking, Ubergraph is a superset of Loom that fulfills Loom's
protocols offering several features and algorithms beyond what Loom
supports:

* Multigraphs and multidigraphs with parallel edges, i.e., multiple edges
between the same pair of nodes in the same direction.
* Multiple weights per edge (as opposed to one "privileged" weight
attribute).
* Weights that are modifiable after initialization (in the immutable sense
of producing a new graph structure with modified weights).
* Mixtures of directed and undirected edges in the same graph.
* The ability to distinguish between an undirected edge and an opposing
pair of directed edges.
* The ability to traverse all a graph's edges while guaranteeing that
undirected edges are visited only once.

Because Ubergraph implements Loom protocols, Ubergraph can typically be
used as a drop-in replacement for Loom graphs.  For the most part, Loom's
graph algorithms work on ubergraphs, and Ubergraph's graph algorithms work
on loom graphs.  There are some exceptions to this, because in some cases,
the implementation of Loom's algorithms were not carefully implemented to
rely only on Loom's protocol abstractions, but were hard-coded to specific
aspects of Loom's concrete implementation.  And since Loom wasn't written
with multigraphs in mind, some of Loom's algorithms don't work properly on
multigraphs.

Ubergraph's algorithm namespace contains a curated collection of algorithms
from Loom known to work properly on ubergraph's more general data
structure, improved versions of several critical algorithms from Loom, and
reimplementations of several key algorithms from Loom known to be broken on
multigraphs.

I encourage people from the Loom community to test all newly submitted
algorithms against Ubergraph's concrete implementation of Loom's protocols
as a way to ensure that the algorithm is properly written to Loom's
protocols, rather than leveraging concrete implementation details.  Also,
this will give you an opportunity to think through whether your algorithm
works properly with multigraphs.  (Relatedly, I welcome pull requests
identifying Loom algorithms which belong in Ubergraph's curated set of Loom
algorithms known to work well with ubergraphs, or multigraph-friendly
reimplementations of those that don't).

-- 
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] core.async 0.3.426

2017-02-23 Thread Max Penet
There are new/related issues that crept up with this release fyi.

I would personally wait the next one for an upgrade in production: 

http://dev.clojure.org/jira/browse/ASYNC-187
http://dev.clojure.org/jira/browse/ASYNC-186

On Wednesday, February 22, 2017 at 7:58:27 PM UTC+1, Gary Trakhman wrote:
>
> Thank you so much for getting around to ASYNC-138+32, it was a usability 
> issue between idiomatic clojure code and async code, would show up almost 
> immediately in new projects, the workaround raised questions during 
> code-reviews, etc.
>
> On Wed, Feb 22, 2017 at 1:47 PM Alex Miller  > wrote:
>
>> core.async 0.3.426 is now available.
>>
>> Try it via:  [org.clojure/core.async "0.3.426"]
>>
>> 0.3.426 includes the following changes:
>>
>>- ASYNC-169  - handling 
>>of catch and finally inside go blocks was broken, causing a number of 
>> issues
>>   - Related: ASYNC-100 
>>   , ASYNC-173 , 
>>   ASYNC-180 , ASYNC-179 
>>   , ASYNC-122 
>>   , ASYNC-78 
>>   , ASYNC-168 
>>   
>>- ASYNC-138  - go 
>>blocks do not allow closed over locals to be cleared which can lead to a 
>>memory leak
>>   - Related: ASYNC-32 
>>- ASYNC-155  - preserve 
>>loop binding metadata when inside a go block
>>- ASYNC-54  - fix bad 
>>type hint on MAX-QUEUE-SIZE
>>- ASYNC-177  - fix 
>>docstring typo in Buffer protocol full? method
>>- ASYNC-70  - docstring 
>>change in thread, thread-call
>>- ASYNC-143  - assert 
>>that fixed buffers must have size > 0
>>- Update tools.analyzer.jvm dependency
>>
>>
>> Many thanks to Kevin Downey and Nicola Mometto for their help on the go 
>> block issues.
>>
>> Additionally, I've done some work to make the core.async build less weird 
>> and to match all the other contrib projects (other than how the version is 
>> computed). This will make core.async easier to use and manage for 
>> development and CI and also lets us use our automated CI matrix test setup 
>> to give us more coverage going forward.
>>
>> -- 
>> 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: [ANN] core.async 0.3.426

2017-02-23 Thread adrian . medina
Thanks for pointing this out. 

On Thursday, February 23, 2017 at 6:37:45 AM UTC-5, Max Penet wrote:
>
> There are new/related issues that crept up with this release fyi.
>
> I would personally wait the next one for an upgrade in production: 
>
> http://dev.clojure.org/jira/browse/ASYNC-187
> http://dev.clojure.org/jira/browse/ASYNC-186
>
> On Wednesday, February 22, 2017 at 7:58:27 PM UTC+1, Gary Trakhman wrote:
>>
>> Thank you so much for getting around to ASYNC-138+32, it was a usability 
>> issue between idiomatic clojure code and async code, would show up almost 
>> immediately in new projects, the workaround raised questions during 
>> code-reviews, etc.
>>
>> On Wed, Feb 22, 2017 at 1:47 PM Alex Miller  wrote:
>>
>>> core.async 0.3.426 is now available.
>>>
>>> Try it via:  [org.clojure/core.async "0.3.426"]
>>>
>>> 0.3.426 includes the following changes:
>>>
>>>- ASYNC-169  - 
>>>handling of catch and finally inside go blocks was broken, causing a 
>>> number 
>>>of issues
>>>   - Related: ASYNC-100 
>>>   , ASYNC-173 
>>>   , ASYNC-180 
>>>   , ASYNC-179 
>>>   , ASYNC-122 
>>>   , ASYNC-78 
>>>   , ASYNC-168 
>>>   
>>>- ASYNC-138  - go 
>>>blocks do not allow closed over locals to be cleared which can lead to a 
>>>memory leak
>>>   - Related: ASYNC-32 
>>>- ASYNC-155  - 
>>>preserve loop binding metadata when inside a go block
>>>- ASYNC-54  - fix bad 
>>>type hint on MAX-QUEUE-SIZE
>>>- ASYNC-177  - fix 
>>>docstring typo in Buffer protocol full? method
>>>- ASYNC-70  - docstring 
>>>change in thread, thread-call
>>>- ASYNC-143  - assert 
>>>that fixed buffers must have size > 0
>>>- Update tools.analyzer.jvm dependency
>>>
>>>
>>> Many thanks to Kevin Downey and Nicola Mometto for their help on the go 
>>> block issues.
>>>
>>> Additionally, I've done some work to make the core.async build less 
>>> weird and to match all the other contrib projects (other than how the 
>>> version is computed). This will make core.async easier to use and manage 
>>> for development and CI and also lets us use our automated CI matrix test 
>>> setup to give us more coverage going forward.
>>>
>>> -- 
>>> 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: [ANN] core.async 0.3.426

2017-02-23 Thread Petr
I have slightly unrelated question. Why core.async is still not 1.x 
version? Is there a feeling that API is still experimental and not mature 
enough? Or authors of core.async are not happy with implementation?

среда, 22 февраля 2017 г., 19:47:33 UTC+1 пользователь Alex Miller написал:
>
> core.async 0.3.426 is now available.
>
> Try it via:  [org.clojure/core.async "0.3.426"]
>
> 0.3.426 includes the following changes:
>
>- ASYNC-169  - handling 
>of catch and finally inside go blocks was broken, causing a number of 
> issues
>   - Related: ASYNC-100 
>   , ASYNC-173 , 
>   ASYNC-180 , ASYNC-179 
>   , ASYNC-122 
>   , ASYNC-78 
>   , ASYNC-168 
>   
>- ASYNC-138  - go blocks 
>do not allow closed over locals to be cleared which can lead to a memory 
>leak
>   - Related: ASYNC-32 
>- ASYNC-155  - preserve 
>loop binding metadata when inside a go block
>- ASYNC-54  - fix bad 
>type hint on MAX-QUEUE-SIZE
>- ASYNC-177  - fix 
>docstring typo in Buffer protocol full? method
>- ASYNC-70  - docstring 
>change in thread, thread-call
>- ASYNC-143  - assert 
>that fixed buffers must have size > 0
>- Update tools.analyzer.jvm dependency
>
>
> Many thanks to Kevin Downey and Nicola Mometto for their help on the go 
> block issues.
>
> Additionally, I've done some work to make the core.async build less weird 
> and to match all the other contrib projects (other than how the version is 
> computed). This will make core.async easier to use and manage for 
> development and CI and also lets us use our automated CI matrix test setup 
> to give us more coverage going forward.
>
>

-- 
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] core.async 0.3.426

2017-02-23 Thread Alex Miller
On Thu, Feb 23, 2017 at 9:33 AM, Petr  wrote:

> I have slightly unrelated question. Why core.async is still not 1.x
> version?
>

Because we don't really associate any emotional significance to the version
number.


> Is there a feeling that API is still experimental and not mature enough?
>

The existing API is not experimental (the alpha designation was removed).
Many people use core.async in production, so seems mature enough.


> Or authors of core.async are not happy with implementation?
>

We are happy. :)

-- 
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] core.async 0.3.441

2017-02-23 Thread Alex Miller
core.async 0.3.441 is now available.

Try it via:  [org.clojure/core.async "0.3.441"]

0.3.441 includes the following changes:

   - ASYNC-187  - Tag 
   metadata is lost in local closed over by a loop (also see ASYNC-188 
   )
   - ASYNC-185  - thread prevents 
   clearing of body locals
   - ASYNC-186  - NPE when go 
closes 
   over a local variable bound to nil

-- 
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] Odin 0.2.0 - Query DSL for Clojure

2017-02-23 Thread Alan Thompson
Just came across this - it looks very cool!
Alan

On Sat, Dec 10, 2016 at 7:14 AM, Timothy Baldridge 
wrote:

> I just released the first official version of Odin (
> https://github.com/halgari/odin). Odin is a declarative, extensible query
> DSL for Clojure that leverages transducers to provide a high amount of
> generality while still maintaining acceptable performance.
>
> One of the biggest features of Odin is its ability to rapidly index and
> query "normal" Clojure data structures. Here is a quick example of this
> feature in practice:
>
> (let [orders [{:customer/name "Sam"
>:customer/id   3411}
>   {:customer/id 3411
>:order/items {1212 3}}
>   {:customer/id 3411
>:order/items {2232 2 4242 3}}
>   {:item/id1212
>:item/price 40.0}
>   {:item/id2232
>:item/price 100}
>   {:item/id4242
>:item/price 1.99}]]
>   (->> (o/for-query
>  (o/and
>(d/query orders ?customer :customer/name "Sam")
>(d/query orders ?customer :customer/id ?id)
>(d/query orders ?order :customer/id ?id)
>(d/query-in orders ?order [:order/items ?item-id] ?qty)
>(d/query orders ?item :item/id ?item-id)
>(d/query orders ?item :item/price ?price))
>  (* ?qty ?price))
>(reduce + 0)))
>
> ;; => 325.97
>
>
> In this example we are given a vector of maps, we are then finding a customer 
> by name,
>
> then walking a path through the data to find all the items that customer 
> ordered, the
>
> total price is then calculated via the normal multiply and sum.
>
>
> There are several other features supported by Odin, including transformation 
> of data
>
> (based on a query), tabling, Datomic support, and much more.
>
>
> I also did a video series on the development process of Odin if anyone is 
> interested:
> (https://www.youtube.com/watch?v=JyKySmcTR4g)
>
> --
> 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: how to send SSL certificate in POST request?

2017-02-23 Thread mascip
Amazing, thank you James, thank you Micheal, it works!

In Perl things are often pretty complex, but in this specific case the code
is dead easy:

my $client = REST::Client->new(
  cert => '/path/to/ssl.cert',
  key => '/path/to/ssl.key');

my $response = $client->POST(
'https://.../api/certlogin',
'username=' . $username . '&password=' . $->password);


-- Pierre Masci

On 22 February 2017 at 21:17, Michael Ball  wrote:

> I had to do the same several months ago. You will need to create a java
> key store with the certificate. Once you have a keystore,  here's the
> clj-http docs on how to include it in an http request.
>
> https://github.com/dakrone/clj-http#keystores-trust-stores
>
> (client/post "https://example.com"; {:keystore "/path/to/keystore.ks"
> :keystore-type "jks" ; default: jks
> :keystore-pass "secretpass"})
>
>
>
>
>
> I don't know if it's much use to you but here's how I created the keystore
> using openssl first to convert to pkcs12 then the java keytool to build the
> keystore.
>
> openssl pkcs12 -export -in cert.pem -inkey "private_key.pem" -certfile
>> cert.pem -out keystore.p12
>>
>
>
>> keytool -importkeystore -srckeystore keystore.p12 -srcstoretype PKCS12
>> -destkeystore keystore.jks
>>
>
>
>> keytool -import -alias ejbca -keystore keystore.jks -file
>> VDPCA-Sandbox.pem -storepass password
>
>
>
>
>
>
>
>
> On Tuesday, February 21, 2017 at 3:36:41 PM UTC-8, Pierre Masci wrote:
>>
>> Hi, I am new to Clojure and using clj-http for the first time, to
>> implement a REST client.
>> I don't find anywhere how to indicate where my SSL certificate is located.
>> Here is what I did:
>>
>> (ns my-client.core
>>   (:require [clj-http.client :as client]
>> [clojure.pprint :refer :all]))
>>
>> (def my-appkey "...")
>>
>> (defn login [username password appkey]
>>   (client/post "https://.../api/certlogin";
>>{:headers {"X-Application" appkey
>>   "Content-Type" 
>> "application/x-www-form-urlencoded"}
>> :form-params {"username" username "password" password}}))
>>
>> (defn -main []
>>   (pprint (login "..." "..." my-appkey)))
>>
>>
>> This sends me back a response which indicates that I need to send the SSL
>> certificate.
>> When I send the same request with curl and indicate the certificates, it
>> works. This is the successful curl request:
>>
>> curl -q -k --cert client-2048.crt --key client-2048.key 
>> https://.../api/certlogin
>> -d "username=...&password=..." -H "X-Application: ..."
>>
>>
>>
>> --
> 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/Bh0gl5QEUsI/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.