Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MethodHandles vs Reflection invocation #1

Open
automenta opened this issue Nov 26, 2018 · 4 comments
Open

MethodHandles vs Reflection invocation #1

automenta opened this issue Nov 26, 2018 · 4 comments

Comments

@automenta
Copy link

A generic method invocation implementation for operators is a good idea. Here are a few suggestions to expand this

@PtrMan
Copy link
Contributor

PtrMan commented Nov 27, 2018

Point 3 - Building middleware and installing it with maven did the trick for me. I had to refresh some weird Maven Cache in my IDEA project before it accepted it.

@PtrMan
Copy link
Contributor

PtrMan commented Nov 27, 2018

Point 2 - Thank you for this hint. It will take a long time till we run into serious performance issues where these tricks are required. KISS.

@PtrMan
Copy link
Contributor

PtrMan commented Nov 27, 2018

Point 1 - Didn't think about it - may be a good idea if I can managed to pass a "context" object around into the lambda.

@automenta
Copy link
Author

a lambda api is helpful syntactical sugar allowing a complete operator to be defined and registered in as little as 1 or 2 lines of java. an ordinary synchronously executed operator should involve just one abstract method that takes the arguments terms and returns some feedback term or task. an asynchronous operator can wrap the same simple lambda api

the "termizer" is as simple as it could be, with or without caching: a bidirectional term -> object, object -> term mapping

https://github.com/automenta/narchy/blob/volatile1/nal/src/main/java/nars/concept/Operator.java#L103

opjects, along with the execution decider, manages the end-to-end work of a multithreaded asynchronous atomically-debounced execution/feedback system triggered by goal truth and scheduled according to occurrence time. not sure how much simpler this could be designed

https://github.com/automenta/narchy/blob/8ed594f20541adb57f2c14c403afe75e854fc1d5/nal/src/main/java/nars/util/AtomicExec.java#L31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants