[ANN] Cognitect Labs' aws-api 0.8.437

2020-02-14 Thread David Chelimsky
Cognitect Labs' aws-api 0.8.437 is now available!

CHANGES

   - fix issue with invoke hanging when no region or creds are found #124 
   

README: https://github.com/cognitect-labs/aws-api/
API Docs: https://cognitect-labs.github.io/aws-api/
Changelog: https://github.com/cognitect-labs/aws-api/blob/master/CHANGES.md
Upgrade Notes: 
https://github.com/cognitect-labs/aws-api/blob/master/UPGRADE.md
Latest Releases of api, endpoints, and all services: 
https://github.com/cognitect-labs/aws-api/blob/master/latest-releases.edn

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/3bc59ec7-fb62-481f-9d81-d868805cffca%40googlegroups.com.


Re: [ANN] Cognitect Labs' aws-api 0.8.430

2020-02-14 Thread David Chelimsky
That should be com.cognitect/http-client 
(https://search.maven.org/search?q=g:com.cognitect%20AND%20a:http-client)

It is a dependency of aws-api, which it uses to submit http requests.

On Wednesday, February 12, 2020 at 6:52:31 AM UTC-6, Tim Visher wrote:
>
> What's cognitect.http-client?
>
> On Tue, Feb 11, 2020 at 10:09 AM David Chelimsky  > wrote:
>
>> Cognitect Labs' aws-api 0.8.430 is now available!
>>
>> NOTE: we changed the behavior of cognitect.aws.client.api/client in 
>> order to support automatic resource management. Although this should be 
>> a drop-in upgrade for most of you, anything you've been doing to manually 
>> manage resources is probably unnecessary now. Please see Upgrade Notes 
>>  for 
>> more information about upgrading to this version, and feel free to reach 
>> out here, on Clojurians' Slack (in the #aws channel), or in github issues 
>>  if you have any 
>> questions or concerns.
>>
>> CHANGES
>>
>>- upgrade to cognitect.http-client 0.1.104 #115 
>>
>>- all aws clients use shared http-client, credentials-provider, and 
>>region-provider by default 
>>   - addresses #109 
>>   
>>   - first call to invoke takes hit of fetching region and credentials
>>- com.cognitect.aws.api/stop will not stop the shared http-client, 
>>   but will continue to stop any other instance
>>
>>
>> README: https://github.com/cognitect-labs/aws-api/
>> API Docs: https://cognitect-labs.github.io/aws-api/
>> Changelog: 
>> https://github.com/cognitect-labs/aws-api/blob/master/CHANGES.md
>> Upgrade Notes: 
>> https://github.com/cognitect-labs/aws-api/blob/master/UPGRADE.md
>> Latest Releases of api, endpoints, and all services: 
>> https://github.com/cognitect-labs/aws-api/blob/master/latest-releases.edn
>>
>> -- 
>> 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
>> clo...@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 clo...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/clojure/749f31a3-7c18-42e9-a98d-082d897117fa%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/db02021d-5403-4d0c-968f-4f26af12551d%40googlegroups.com.


Re: Odd exception on lazy sequence

2020-02-14 Thread KJO
OK. I got some super guidance from p-himik on the Slack channel (Thank 
you!).

Essentially there was a TreeSet in one of the sets to be conj'ed and that 
was causing the exception. Apparently, it's not a trivial matter to conj 
tree-sets :-).

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/00f41d30-b599-4475-ab92-ead413454172%40googlegroups.com.


Re: JNA stdout and the REPL

2020-02-14 Thread Jason Felice
I imagine you'll have to call the Java System.out.println from C.  I forget
how exactly to do this.

Java streams and ANSI/POSIX C streams aren't compatible.  The C ones
usually rely on having an OS file descriptor, and Java allows making new
kinds by implementing interfaces.  There's not a general way (at least not
a portable one) to get a file descriptor for a user space object.



On Fri, Feb 14, 2020 at 5:40 AM Sonny To  wrote:

> here is an example of
>
>
>
>
>
>> package foo;
>>
>>
>>
>> import com.sun.jna.Library;
>>
>>
>> import com.sun.jna.Native;
>>
>>
>> import com.sun.jna.Pointer;
>>
>>
>>
>>
>>
>> public interface C extends Library {
>>
>>
>> C INSTANCE = (C) Native.load("c",C.class);
>>
>>
>>
>>
>>
>> void printf(String format, Object... args);
>>
>>
>> }
>>
>>
>
>
>
> calling this from a java main like this works as expected at the command
> line
>   C.INSTANCE.printf("hello\n");
>
> but from the clojure REPL,
>
> (.printf foo.C/INSTANCE "hello "(into-array []))
>
>
> does not show anything
>
> On Friday, February 14, 2020 at 6:30:51 PM UTC+8, Sonny To wrote:
>>
>> I am using JNA to call native C code. calling native code that outputs to
>> stdout does not show up in the Clojure REPL. stdout is redirected somewhere
>> that is not attached to *out*
>>
>> How can I get stdout from native code outputting to *out* in the REPL?
>> Without this, it makes it difficult to see what went wrong in the C code.
>>
>> thanks,
>> Sonny
>>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/bd950525-defd-4696-948e-ac321dc5220e%40googlegroups.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAB6_SoZouGg9vWxwHK92QpSPnLW%2Bz4gROyGKm6mR9W5%3DF-_Hkg%40mail.gmail.com.


[ANN] - neanderthal-stick (Neanderthal matrix library extension)

2020-02-14 Thread Kamil Toman
Hi everyone,

I am pleased to announce the first release of neanderthal-stick 0.1.0 - 
save/load extensions to Dragan's Neaderthal matrix library. The focus of 
Neanderthal-stick is saving neanderthal data to a disk and importing them 
back fast and with as little ceremony as possible.

Note that Neanderthal-stick is able to save the data that are currently on 
the GPU and load them elsewhere (or vice versa) - switching 
native/CUDA/OpenCL contexts as necessary.

The library uses Nippy under the hood to store the metadata and pure direct 
buffers to save the actual contents of vectors or matrices. It doesn't 
attempt to support any of myriads of existing data formats that are used in 
the wild but it can be used as a support code if anyone wanted to do that.

Gihub: https://github.com/katox/neanderthal-stick/
Dependency info: https://clojars.org/neanderthal-stick

Enjoy,
Kamil




-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/80d13592-eca2-4147-a51b-3a8b852d6b9c%40googlegroups.com.


Odd exception on lazy sequence

2020-02-14 Thread KJO


I'm stumped on this. I have a function that returns a lazy sequence (let's call
it lzs - it's produced by another function, and for this exercise I def'd it

in the REPL from `*1'). It's a sequence of maps.

When I apply a merge-with operation to the lazy sequence. I get the following
error.

  class clojure.lang.PersistentHashSet cannot be cast to class 
  java.lang.Comparable (clojure.lang.PersistentHashSet is in unnamed 
  module of loader 'app'; java.lang.Comparable is in module java.base 
  of loader 'bootstrap'

If I apply the same operation on a `doall' of the sequence, I also get the 
error.

However, if I fully realize the sequence in the REPL and feed it into the
merge operation, I don't get the error. There's really no magic in the 
merge-with
operation, it just conj's some sets.

Any ideas?

The relevant code is below:
;; FAILS
(apply
  merge-with
  px-tran-netter-ex
  lzs)

;; FAILS
(apply
  merge-with
  px-tran-netter-ex
  (doall lzs))

;; NO PROBLEM HERE with lzs realized and fed back in
(apply
  merge-with
  px-tran-netter-ex
  '({:fund {:src-ax-id #{nil :ax-m01}}}
{:fund {:src-ax-id #{:ax-m01}}}
{:fund {:src-ax-id nil}}
{:fund {:src-ax-id :ax-m01}}
{:fund {:src-ax-id #{:ax-m01}}}
{:fund {:src-ax-id #{nil :ax-m01}}}
{:fund {:src-ax-id #{:ax-m01}}}
{:fund {:src-ax-id nil}}
{:fund {:src-ax-id :ax-m01}}
{:fund {:src-ax-id #{:ax-m01}}}))

The px-tran-netter-ex is 

(defn px-tran-netter-ex
  [ov nv]
  (if (nil? ov)
nv
(update
  ov
  :src-ax-id
  (fn px-tran-set-merger
[lv rv]
(if (some? rv)
  (conj
(if (set? lv)
  lv
  (if (some? lv)
#{lv}
#{}))
rv)
  lv))
  (:src-ax-id nv 

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/86ea4d9a-bd32-499c-8626-45068a98808d%40googlegroups.com.


Re: JNA stdout and the REPL

2020-02-14 Thread Sonny To
here is an example of 



 

> package foo; 
>   
> 
>
> import com.sun.jna.Library;
> 
> 
> import com.sun.jna.Native;
> 
>  
> import com.sun.jna.Pointer;
> 
> 
>   
> 
>  
> public interface C extends Library {  
> 
>  
> C INSTANCE = (C) Native.load("c",C.class);
> 
>  
>   
> 
>  
> void printf(String format, Object... args);
> 
> 
> }  
> 
> 

 

calling this from a java main like this works as expected at the command 
line
  C.INSTANCE.printf("hello\n");

but from the clojure REPL,

(.printf foo.C/INSTANCE "hello "(into-array []))  


does not show anything

On Friday, February 14, 2020 at 6:30:51 PM UTC+8, Sonny To wrote:
>
> I am using JNA to call native C code. calling native code that outputs to 
> stdout does not show up in the Clojure REPL. stdout is redirected somewhere 
> that is not attached to *out*
>
> How can I get stdout from native code outputting to *out* in the REPL? 
> Without this, it makes it difficult to see what went wrong in the C code.
>
> thanks,
> Sonny
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/bd950525-defd-4696-948e-ac321dc5220e%40googlegroups.com.


JNA stdout and the REPL

2020-02-14 Thread Sonny To
I am using JNA to call native C code. calling native code that outputs to 
stdout does not show up in the Clojure REPL. stdout is redirected somewhere 
that is not attached to *out*

How can I get stdout from native code outputting to *out* in the REPL? 
Without this, it makes it difficult to see what went wrong in the C code.

thanks,
Sonny

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/c0e5756a-4f29-4ca2-876e-c2bb8c8d88b0%40googlegroups.com.