Re: [julia-users] Embedding Julia in an app / calling from C++

2014-03-24 Thread Dibyendu Majumdar
The error message I got was:

System image file "C:\project\Debug\../lib/julia/sys.ji" not found

This occurred when I called jl_init() with NULL. It seems that it is trying 
to find files relative to the executable file location.
I tried setting JULIA_HOME environment variable but that did not help.
I then changed the argument to "c:\julia\bin" which worked. 

It takes about 2 seconds to startup on my laptop (2009 Intel duo Mac). 

I was wondering if I could modify Julia to only be a language - i.e. remove 
all the standard library and therefore most (all?) of the dependencies. As 
an embedded language I don't really want all these external dependencies.
Is this possible? Where should I start? Are any of the dependencies must 
have?
Is there a developer's guide for Julia?

Thanks and Regards
Dibyendu


[julia-users] Embedding Julia in an app / calling from C++

2014-03-23 Thread Dibyendu Majumdar
Hi,

I am working on a financial app where I would very much like to use Julia. 
I am currently using Lua as an embedded scripting language, but Lua doesn't 
perform very well with numeric computing. I have tried Luajit but no luck 
as Luajit doesn't optimise very well when called as callbacks from C++.  

Julia seems to be the language I was looking for. I tried a small 
experiment of calling Julia from C++ and noticed a few things:

1. The jl_init() function called exit() because it did not like the path to 
Julia home directory. 
2. There doesn't seem to be a way to control instances of Julia - it seems 
to rely on global state management. There seems to be an assumption that 
there is only one global Julia environment in an app.
3. The startup appears to take time.

These are kind of show stopper issues for my use case so I was wondering if:

a) There are plans to make Julia more embeddable ... or is that a non-goal 
or low priority?
b) How hard is it to change Julia to encapsulate all state in a Struct of 
some sort? Is this impossible - or can it be done? 

One other thing that I have been trying to work out is whether Julia JITs 
code when it is called in an embedded manner - this point doesn't seem to 
be covered in the Julia documentation.

Thanks and Regards

Dibyendu