Thanks. It doesn't currently use type hints to distinguish between multiple
methods of the same arity. Opened an issue:
https://github.com/redplanetlabs/proxy-plus/issues/1
On Monday, January 20, 2020 at 11:57:31 AM UTC-5, Ghadi Shayban wrote:
>
> I tried using proxy+ for one of the proxy
I tried using proxy+ for one of the proxy implementations in clojure.core,
but I ran into an issue where a "too many matching methods" got thrown at
macroexpansion time. The proxy I tried to replicate was PrintWriter-on
Ah yes. I didn't consider that.
On Wednesday, January 15, 2020 at 12:31:13 PM UTC-5, Alex Miller wrote:
>
> Using vars lets you iterate on the impl functions without invalidating the
> proxy instances. I'm not sure if that was the reason, but that would be one
> advantage.
>
> On Wednesday,
Using vars lets you iterate on the impl functions without invalidating the
proxy instances. I'm not sure if that was the reason, but that would be one
advantage.
On Wednesday, January 15, 2020 at 10:46:36 AM UTC-6, Mike Rodriguez wrote:
>
> Do you have any idea about the reason that the Clojure
Do you have any idea about the reason that the Clojure implementation was
done this way - when it obviously seems a bit limited and also slower than
necessary? Just curious if there's some historical context.
On Tuesday, January 14, 2020 at 11:58:17 AM UTC-5, Nathan Marz wrote:
>
> The speedup
Thanks this is wonderful! Nice work
On Tuesday, January 14, 2020 at 11:58:17 AM UTC-5, Nathan Marz wrote:
>
> The speedup comes from proxy+ directly overriding methods with the
> provided implementation, while Clojure's proxy has additional indirection.
> For example, if you do (proxy [Object]
The speedup comes from proxy+ directly overriding methods with the provided
implementation, while Clojure's proxy has additional indirection. For
example, if you do (proxy [Object] [] (toString [] "hello")), the bytecode
for toString is:
public java.lang.String toString();
0 aload_0
I skimmed the code, I don't really understand how it makes it faster over
proxy. Is it the generated ASM is better? What's the in-a-nutshell
description of how it works?
On Monday, January 13, 2020 at 1:28:46 PM UTC-5, Nathan Marz wrote:
>
> No differences in behavior except for API being like
No differences in behavior except for API being like reify. It integrates
with AOT and can be consumed just like any other class. No idea how it
interacts with Graal.
On Monday, January 13, 2020 at 12:29:35 PM UTC-5, John Newman wrote:
>
> Bravo
>
> Are there any differences in behavior
Bravo
Are there any differences in behavior to be aware of? AOT, Graal, consuming
proxy+ classes from vanilla clojure classes?
On Mon, Jan 13, 2020, 11:47 AM Nathan Marz wrote:
> proxy+ is a replacement for Clojure's proxy that's faster and more usable.
> proxy has a strange
proxy+ is a replacement for Clojure's proxy that's faster and more usable.
proxy has a strange implementation where it overrides every possible method
and uses a mutable field to store a map of string -> function for
dispatching the methods. This causes it to be unable to handle methods with
11 matches
Mail list logo