Re: [ANN] akar 0.1.0

2016-07-07 Thread Rahul Goma Phulore
Hi, Nahuel.

A ClojureScript release is on the radar. Stay tuned!

Best,
Rahul

On Wednesday, July 6, 2016 at 3:20:16 PM UTC+1, Nahuel Greco wrote:
>
> Hi Rahul, Akar seems very nice! It works in Clojurescript?
>
> Saludos,
> Nahuel Greco.
>
> On Tue, Jul 5, 2016 at 11:38 AM, Rahul Goma Phulore  > wrote:
>
>> Hi, all.
>>
>> I am quite excited to announce my project Akar – 
>> https://github.com/missingfaktor/akar. It's a pattern matching library 
>> for Clojure, wherein the patterns are first class values (just functions, 
>> actually). Akar patterns can be manipulated, composed, abstracted over, 
>> like any other functions. In fact, this is exactly how various pattern 
>> operations, such as guards, alternation, and views are implemented in Akar. 
>> The library also features a syntactic layer that makes common use cases 
>> convenient, but at the same time stays true to the first-class spirit of 
>> the core model. 
>>
>> The library comes with a full-blown *tutorial* 
>>  and also 
>> covers some FAQs 
>> .
>>
>> I made the first release - 0.1.0 - today.
>>
>> I hope you guys like it, and find it useful! Feedback, constructive 
>> criticism, PRs are most welcome.
>>
>> Best,
>> Rahul
>>
>> -- 
>> 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: ClojureScript Quick Start - Error: Could not find or load main class clojure.main

2016-07-07 Thread Michael Wood
Perhaps try on the Clojurescript mailing list.

https://groups.google.com/group/clojurescript
On 05 Jul 2016 4:15 PM, "gilmoretj"  wrote:

> I suspect there is a MS Windows-specific configuration step missing from
> the Quick Start guide (
> https://github.com/clojure/clojurescript/wiki/Quick-Start).
>
> I was alright until I reached "Auto-building". Running the compilation
> step for watch.clj, I got the error message "Error: Could not find or
> load main class clojure.main".
>
> I carried on to the "Running ClojureScript on Node.js" section only to
> encounter the same error running the node.clj build.
>
> The initial build.clj build worked fine.
>
> --
> 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 alternative to AspectJ proxy in Java's code

2016-07-07 Thread Jacek Grzebyta
Hi,

I have a Clojure project which strongly uses some external java framework
(if you want to know it is Eclipse RDF4j). I need to override some method
within a java class. The issue is I am not able to inject my own
implementation of that class because it is in the middle of some complex
hierarchy.

In another Java (+ Spring Framework) project I had similar problem and I
had fixed that using AspectJ proxy which had had a breakpoint in calling a
particular java method. I read in many places that Clojure does not need it
and some explanation based on pure clojure examples. I would like to know
if Clojure is able to manage java code.

Quite often examples built a proxy with combination Java Class + protocol
and than injected the instance into somewhere. I thing that it does not
cover following example. The problems I found difficult are:

1. Distance between my code and Foo class is like 3 or 4 classes
2. Programmers quite strongly uses creation de novo rather than injection
already prepared instance

Thanks a lot for your help,
Jacek Grzebyta



++ java code+

class Baz {

// I need to proxy this method
protected List doAction(String arg 1, String arg2)

// weird work which I need to change

}


 Foo class

class Foo {

// cut


// elswhere

Baz jobber = new Baz(); // it creates de novo injection not supported


public String mySuperMethod(List args4) {

jobber.doAction(someList)

}


// cut
}


++ end ++

-- 
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] Neanderthal 0.6.0: new support for AMD, Nvidia, and Intel GPUs on Linux, Windows and OS X (fast matrix library)

2016-07-07 Thread Dragan Djuric
Neanderthal 0.7.0 released: Nvidia, AMD, and Intel GPU on LInux, Windows, 
and OS X  http://neanderthal.uncomplicate.org#matrix  #Clojure #GPU 
 #GPGPU

On Monday, May 23, 2016 at 9:57:00 PM UTC+2, Dragan Djuric wrote:
>
> This is a major release of Neanderthal, a fast native & GPU matrix library:
>
> In this release, spotlight is on the new GPU engine, that:
>
> * Works on all three major hardware platforms: AMD, Nvidia, and Intel
> * Works on all three major operating systems: Linux, Windows, and OS X
> * Is even faster, so it is now more than 1000x faster than the optimized 
> Java libraries for 8192x8192 matrix multiplication.
>
> Version 0.6.0 is in clojars
> Documentation and the tutorials can be found at the usual place: 
> http://neanderthal.uncomplicate.org
>

-- 
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: Can't extract multipart-params from POST request in compojure

2016-07-07 Thread aaarturozhao
You are right! I didn't set the boundary in my client code. Thanks a lot!

在 2016年7月7日星期四 UTC+8下午12:46:04,James Reeves写道:
>
> By "application" I mean "Ring handler".
>
> Your request looks wrong. The boundary you set in your header 
> (--BoUnDaRyFF) doesn't match the boundary I see in the body 
> (--2n639DJeu...).
>
> - James
>
> On 7 July 2016 at 05:29,  wrote:
>
>> The request  header:
>>
>>
>>
>> 
>>
>> The request body:
>>
>>
>> 
>>
>> My test params are: 
>>
>> String[] tags = {"", "", ""};
>> s = test.upload("/Users/apple/test.txt", tags, "19960808", 
>> "qwertyuiopasdfghjklzxcvbnm");
>>
>>
>> The content of test.txt is "This is a test...".
>>
>>
>> Is there anything wrong?
>>
>>
>> BTW, could you give me an example of the definition of app? I'm not sure 
>> which one is correct.
>>
>>
>> 在 2016年7月7日星期四 UTC+8上午10:30:31,James Reeves写道:
>>>
>>> In all your examples except for possibly the last, you have the 
>>> multipart middleware added twice over to your application.
>>>
>>> Also, are you sure it's not a problem with your client code?
>>>
>>> One thing to try is recording your HTTP request by pointing your client 
>>> at a netcat listener (e.g. "nc -l 3000"). Or writing a handler that dumps 
>>> out the headers and the contents of the request body.
>>>
>>> - James
>>>
>>> On 7 July 2016 at 03:18,  wrote:
>>>
 This is the link to the question in stackoverflow:

 http://stackoverflow.com/questions/38226276/cant-extract-multipart-params-from-post-request-in-compojure

 在 2016年7月7日星期四 UTC+8上午10:13:25,aaartu...@gmail.com写道:

> When I try to extract the multipart-params from a POST request like 
> this:
>
> (defroutes upload-routes
>   (POST "/upload" {params :params} (println params))
>
>
> I got {}.
>
> Then I tried like this:
>
> (defroutes upload-routes
>   (POST "/upload" {multipart-params :multipart-params} (println 
> multipart-params))
>
> I still got {}.
>
> I guess there are something wrong about my middleware.
>
> So I tried to change the handler, here are the handlers I had tried:
>
> (ns cloudserver.handler
>   (:require [compojure.core :refer [defroutes routes]]
> [compojure.route :as route]
> [compojure.handler :as handler]
> [cloudserver.routes.home :refer [home-routes]]
> [noir.util.middleware :as noir-middleware]
> [cloudserver.routes.auth :refer [auth-routes]]
> [cloudserver.routes.upload :refer [upload-routes]]
> [cloudserver.routes.search :refer [search-routes]]
> [cloudserver.routes.download :refer [download-routes]]
> [ring.middleware.defaults :refer [api-defaults wrap-defaults 
> site-defaults]]
> [ring.middleware.multipart-params :refer 
> [wrap-multipart-params]]
> [ring.middleware.params :refer [wrap-params]]
> [noir.session :as session]
> [ring.middleware.session.memory :refer [memory-store]]))
>
> (def app
>   (->
>(routes auth-routes
>home-routes
>upload-routes
>search-routes
>download-routes
>app-routes)
>session/wrap-noir-session
>(wrap-defaults(assoc-in site-defaults [:security :anti-forgery] false)
>wrap-multipart-params
>wrap-params))
> (def app
>   (->
>(routes auth-routes
>home-routes
>upload-routes
>search-routes
>download-routes
>app-routes)
>session/wrap-noir-session
>(wrap-defaults(assoc-in site-defaults [:security :anti-forgery] false)
>wrap-multipart-params))
> (def app
>   (->
>(routes auth-routes
>home-routes
>upload-routes
>search-routes
>download-routes
>app-routes)
>session/wrap-noir-session
>(wrap-defaults (-> site-defaults
>   (assoc-in [:security :anti-forgery] false)
>   (assoc-in [:params :multipart] true)
>   (assoc-in [:params :nested] true)))
>handler/site))
> (def app
>   (->
>(routes auth-routes
>home-routes
>upload-routes
>search-routes
>