Re: Java Interop on steroids?

2019-06-22 Thread atdixon
> Do the framework you're talking about do static analysis of the types? Because generic types are erased at runtime, so there wouldn't ever be a way for proxy to set them in. They aren't entirely erased. They're erased from the code, but Java compilers are obligated to emit generic type

Re: Java Interop on steroids?

2019-06-22 Thread Didier
> They did cite a significant performance boost as a side effect. I think it isn't very clear from the wording. They didn't just rewrite it in Java, they also changed the architecture: > Storm 2.0.0 introduces a new core featuring a leaner threading model, a > blazing fast messaging subsystem

Re: Java Interop on steroids?

2019-06-22 Thread Chris Nuernberger
Nathan, For the subset of problems for which clojure has insufficient power to optimize well, I think a good percentage of those would be best off solved by numeric languages like numpy or a numeric compiler like TVM

Re: Java Interop on steroids?

2019-06-22 Thread Aaron Dixon
That is likely more to do with doing a full rewrite with 5+ years of learned experience under their belt than any insurmountable performance issue by Clojure. (Storm was mostly Clojure from day one but always had Java code in the mix, as well; in other words, they've always had Java if they had

Re: Java Interop on steroids?

2019-06-22 Thread Nathan Fisher
They did cite a significant performance boost as a side effect. On Fri, Jun 21, 2019 at 21:04, Sean Corfield wrote: > I got the impression this was the primary reason for Storm’s rewrite: > > > > While Storm's Clojure implementation served it well for many years, it was > often cited as a

Re: Shorter form to check if some words are contained in a sentence?

2019-06-22 Thread Andy Fingerhut
No tip or payment needed for me. If at some point you desperately want to toss some money to someone for Clojure, one possibility is to make periodic small payments to Cognitect Labs, which also gives you access to a tool called REBL that you may find useful at some point if you continue using

Re: Shorter form to check if some words are contained in a sentence?

2019-06-22 Thread Thad Guidry
Beautiful Andy! Can you confirm that last syntax for me? I see it as treating the anonymous function of #(.contains value %) as the predicate to check on every member of the vector? But anonymous function expansion is what throws me off... I need layman's terms (grandma speak) to break down the

Re: Shorter form to check if some words are contained in a sentence?

2019-06-22 Thread Andy Fingerhut
And, of course you can continue to use .contains: (every? #(.contains value %) ["CBS" "Bar" "cat"]) On Sat, Jun 22, 2019 at 10:37 AM Andy Fingerhut wrote: > I haven't counted characters, but this would certainly become relatively > shorter the more substrings you check for. It is shown in

Re: Shorter form to check if some words are contained in a sentence?

2019-06-22 Thread Andy Fingerhut
I haven't counted characters, but this would certainly become relatively shorter the more substrings you check for. It is shown in the context of a Clojure REPL. I do not know whether OpenRefine might already do the require for you, or perhaps even (use 'clojure.string). user=> (def value "Bar

Shorter form to check if some words are contained in a sentence?

2019-06-22 Thread Thad Guidry
Clojure is supported as an expression language in OpenRefine. Where any cells value in OpenRefine's datagrid is just accessed by the name value. Here's one of my cells value in OpenRefine... "001","878","245","$c","CBS Barmarick Publications,","$c","Emerald" and I am trying to see if that

Re: Java Interop on steroids?

2019-06-22 Thread atdixon
Here is my problem, distilled. This code should tell the full story: static class Apple {} Apple a = new Apple() {}; Type[] x = ((ParameterizedType)a.getClass().getGenericSuperclass()) .getActualTypeArguments(); // x is a Type array containing String, Integer HOWEVER, via Clojure `proxy`, I

Re: Java Interop on steroids?

2019-06-22 Thread atdixon
Here is my problem, distilled. This code should tell the full story: static class Apple {} Apple a = new Apple() {}; Type[] x = ((ParameterizedType)a.getClass().getGenericSuperclass()) .getActualTypeArguments(); // x is a Type array containing String, String HOWEVER, via Clojure `proxy`, I

Re: Java Interop on steroids?

2019-06-22 Thread Matching Socks
By "generic type information", you mean the X in List ? On Friday, June 21, 2019 at 12:03:46 AM UTC-4, atdixon wrote: > > However -- there are many popular Java frameworks that love to reflect on > their annotations and their generic type signatures. > > To name a heavyweight: Spring. But also,