I'm sorry.

add julia/src dir to cffi include dir, because *options.h* it's not 
exported so JULIA_DIR/include/julia

Segunda-feira, 10 de Março de 2014 11:49:29 UTC-3, Felipe Cruz escreveu:
>
> Hi All!
>
> I started another project to integrate Python and Julia, but instead of 
> using Python ctypes, I'm using Python cffi: 
> https://github.com/felipecruz/pyju
>
> I found cffi much better than ctypes, plus, it brings PyPy compatibility. 
> There's already some code working but, so far, I needed to make some 
> workarounds to make it work.
>
> To use some julia.h macros, I need 2 declarations to be exported: jl_null 
> and jl_subtype plus add julia/src dir to cffi include dir, because it's not 
> exported so JULIA_DIR/include/julia
>
> I would be glad to join efforts with anyone.. But I'm also planning on 
> sign to GSCO 2014 with this task.
>
> regards,
>
>
>
>
> Domingo, 9 de Março de 2014 23:46:16 UTC-3, Kenta Sato escreveu:
>>
>> Thank you for you reply.
>>
>> I guess `jl_nothing` itself needs a predicate like `jl_is_nothing`, 
>> because `nothing` has its own type and all other types seem to have 
>> corresponding predicates.
>> Also, the direct value comparison with v == jl_nothing would be 
>> error-prone.
>> For instance, users of Julia C API may abuse it like `if (v = jl_nothing) 
>> {...}`, or even worse `if (jl_nothing = v) {...}`.
>> `jl_is_nothing` predicate will prevent this misuage.
>>
>> By the way, I'm curious about calling Julia from Python and want to make 
>> it a full-fledged Python package.
>> I really need a easy-to-use but fast computing tool that is available 
>> from the Python language. Now I'm using C/C++/Cython, but they need 
>> compiling in advance. I guess Julia is the answer.
>> Of course, I'm ready to work with Jake together.
>>
>> On Monday, March 10, 2014 2:09:10 AM UTC+9, Stefan Karpinski wrote:
>>>
>>> +1e99 to using starting with Jake's pyjulia instead of duplicating this 
>>> effort. It's much better for there to be one really great way to call Julia 
>>> from Python than many less good ways. That said, I've felt for some time 
>>> that this functionality really needs an owner – someone to turn it into a 
>>> real easy_install/pip-able package that just works, assuming you have an 
>>> appropriately configured Julia install. Perhaps you're interested in that? 
>>> Or you and Jake can work on it jointly?
>>>
>>>
>>> On Sun, Mar 9, 2014 at 1:05 PM, Isaiah Norton <[email protected]>wrote:
>>>
>>>> You might also consider starting from and contributing to - or at least 
>>>> looking at - this:
>>>>  
>>>> https://github.com/jakebolewski/pyjulia
>>>>
>>>> The important idea there is to use the existing PyCall machinery to do 
>>>> conversions, which will save you a lot of headache (also, it does 
>>>> everything using ctypes which will make cross-platform deployment much 
>>>> simpler).
>>>>
>>>>
>>>> On Sat, Mar 8, 2014 at 10:11 PM, Kenta Sato <[email protected]> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I'm new to the Julia language, and I'm now trying the Julia C API in 
>>>>> order to call Julia functions from Python.
>>>>> I've become successful with calling some basic Julia functions such as 
>>>>> (*) and sqrt() and converting the returned values to corresponding ones 
>>>>> in 
>>>>> Python.
>>>>> But I've got into a trouble to check whether a return value from Julia 
>>>>> is `nothing` or not.
>>>>>
>>>>> In the julia.h header, there seems to be a related macro named 
>>>>> `jl_is_null(v)`, but I'm not sure that this is the predicate I want 
>>>>> because 
>>>>> its name is not `jl_is_nothing(v)` as expected.
>>>>>
>>>>> In addition, when I called `jl_is_null(v)`, I got a dynamic linking 
>>>>> error, which said:
>>>>>
>>>>> Traceback (most recent call last):
>>>>>>   File "sample.py", line 2, in <module>
>>>>>>     import libjulia as jl
>>>>>> ImportError: dlopen(/Users/kenta/myapp/libjulia/libjulia.so, 2): 
>>>>>> Symbol not found: _jl_null
>>>>>>   Referenced from: /Users/kenta/myapp/libjulia/libjulia.so
>>>>>>   Expected in: flat namespace
>>>>>>  in /Users/kenta/myapp/libjulia/libjulia.so
>>>>>
>>>>>
>>>>> Please note that `libjulia.so` is the name of my python library.
>>>>>
>>>>>  libjulia.dylib contains `_jl_null` symbol but it is local one:
>>>>>
>>>>> /Users/kenta/vendor/julia% nm usr/lib/libjulia.dylib| grep jl_null     
>>>>>>         [master]
>>>>>> 0000000000c2a3f0 s _jl_null
>>>>>
>>>>>
>>>>> I've got stuck at this point. Could you give me some advice?
>>>>>
>>>>> Julia: commit b52f17544d70ebc41508d6776ab3ca0ac26ccb3
>>>>> OS: Mac OS X 10.9.2 (Mavericks)
>>>>>
>>>>
>>>>
>>>

Reply via email to