How to initialize octave without read-eval-print loop?

View: New views
4 Messages — Rating Filter:   Alert me  

How to initialize octave without read-eval-print loop?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Following a question I received about the Octave/Java bridge, I'd like to
know whether it is currently possible to initialize the octave engine
without running a read-eval-print loop? The only function I found is
octave_main, but AFAIK it starts a REPL loop. Is this feasible?

Michael.

How to initialize octave without read-eval-print loop?

by John W. Eaton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 10-Dec-2007, Michael Goffioul wrote:

| Following a question I received about the Octave/Java bridge, I'd like to
| know whether it is currently possible to initialize the octave engine
| without running a read-eval-print loop? The only function I found is
| octave_main, but AFAIK it starts a REPL loop. Is this feasible?

Do you want the equivalent of the octave_main function from
src/octave.cc without the call to main_loop, or something else?  What
are you trying to do?

jwe

Re: How to initialize octave without read-eval-print loop?

by Michael Goffioul-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 12/11/07, John W. Eaton <jwe@...> wrote:
> On 10-Dec-2007, Michael Goffioul wrote:
>
> | Following a question I received about the Octave/Java bridge, I'd like to
> | know whether it is currently possible to initialize the octave engine
> | without running a read-eval-print loop? The only function I found is
> | octave_main, but AFAIK it starts a REPL loop. Is this feasible?
>
> Do you want the equivalent of the octave_main function from
> src/octave.cc without the call to main_loop, or something else?

Something like that, yes.

> What are you trying to do?

Me, nothing. But a guy contacted me to see whether he could use
the java package to make octave available as computation engine
for his Java application: basically, what he would like to do (at first)
is to call "eval_string" from Java, through JNI. The java package
available in octave-forge provides such a function, but it implicitely
assumes that octave is correctly initialized (because the package
is intended to provide a Octave->Java bridge, and not the other way
around; so the "initial" caller is assumed to be octave). For a
correct eval_string behavior, I guess that octave must be initialized.

Thinking about it, what I'm talking about is some kind a in-process
engOpen/engClose/engXXX API.

Michael.

Re: How to initialize octave without read-eval-print loop?

by Fengbo Xie :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

That's really what I'm looking for.
Michael, you even figured out the API methods name engOpen/engClose.
Actually the Matlab/Java bridge jmatlink implemented such API for Matlab,
and JRI implented such API for R.
I'm looking forward the Octave One.
Is there anyone can give some tips on doing this?
Michael Goffioul-2 wrote:
On 12/11/07, John W. Eaton <jwe@bevo.che.wisc.edu> wrote:
> On 10-Dec-2007, Michael Goffioul wrote:
>
> | Following a question I received about the Octave/Java bridge, I'd like to
> | know whether it is currently possible to initialize the octave engine
> | without running a read-eval-print loop? The only function I found is
> | octave_main, but AFAIK it starts a REPL loop. Is this feasible?
>
> Do you want the equivalent of the octave_main function from
> src/octave.cc without the call to main_loop, or something else?

Something like that, yes.

> What are you trying to do?

Me, nothing. But a guy contacted me to see whether he could use
the java package to make octave available as computation engine
for his Java application: basically, what he would like to do (at first)
is to call "eval_string" from Java, through JNI. The java package
available in octave-forge provides such a function, but it implicitely
assumes that octave is correctly initialized (because the package
is intended to provide a Octave->Java bridge, and not the other way
around; so the "initial" caller is assumed to be octave). For a
correct eval_string behavior, I guess that octave must be initialized.

Thinking about it, what I'm talking about is some kind a in-process
engOpen/engClose/engXXX API.

Michael.