Re: [julia-users] Calling Julia from Java (Java--->Julia)

2014-12-17 Thread cdm

for some additional context on the Java REPL:

  http://www.infoq.com/news/2014/09/repl-for-java


etc.


Re: [julia-users] Calling Julia from Java (Java--->Julia)

2014-12-17 Thread cdm

this may be relevant / interesting / inspirational:

   http://www.javarepl.com/console.html


the git repo is on:

   https://github.com/albertlatacz/java-repl



i may try to look into that code some ...

best,

cdm


On Wednesday, December 17, 2014 7:41:19 AM UTC-8, Isaiah wrote:
>
> I'm not aware of any examples of Java->Julia, but there are basically two 
> options:
>
> - RESTful API or other messaging-based interop
> - use the Julia C API via JNI (Julia functions can be exposed as C 
> function pointers). The potential advantage here is performance (no-copy 
> data transfer, avoid the network stack).
>
> A variation of the second would be to extend JavaCall.jl to wrap Julia 
> functions as Java callbacks and do as much of the conversion/bookkeeping as 
> possible via JavaCall. This would still entail using JNI for the actual 
> calls, but might avoid some code duplication and hairiness dealing with the 
> embedding API (see pyjulia for an example).
>
> On Tue, Dec 16, 2014 at 7:21 AM, Frank  > wrote:
>>
>> Hi,
>>
>> i am trying to find information on how to do the following:
>>
>>- expose Julia functions within/as Java Interfaces 
>>- Call Julia from Java
>>
>> I find a lot of Julia-->Java examples, but i would like to call Julia 
>> from Java.
>>
>> Any tackers?
>> Thanks
>> Frank
>>
>>

Re: [julia-users] Calling Julia from Java (Java--->Julia)

2014-12-17 Thread Isaiah Norton
I'm not aware of any examples of Java->Julia, but there are basically two
options:

- RESTful API or other messaging-based interop
- use the Julia C API via JNI (Julia functions can be exposed as C function
pointers). The potential advantage here is performance (no-copy data
transfer, avoid the network stack).

A variation of the second would be to extend JavaCall.jl to wrap Julia
functions as Java callbacks and do as much of the conversion/bookkeeping as
possible via JavaCall. This would still entail using JNI for the actual
calls, but might avoid some code duplication and hairiness dealing with the
embedding API (see pyjulia for an example).

On Tue, Dec 16, 2014 at 7:21 AM, Frank  wrote:
>
> Hi,
>
> i am trying to find information on how to do the following:
>
>- expose Julia functions within/as Java Interfaces
>- Call Julia from Java
>
> I find a lot of Julia-->Java examples, but i would like to call Julia from
> Java.
>
> Any tackers?
> Thanks
> Frank
>
>


[julia-users] Calling Julia from Java (Java--->Julia)

2014-12-16 Thread Frank
Hi,

i am trying to find information on how to do the following:

   - expose Julia functions within/as Java Interfaces 
   - Call Julia from Java

I find a lot of Julia-->Java examples, but i would like to call Julia from 
Java.

Any tackers?
Thanks
Frank