Julia Interop / FFI / Smalltalk

I have come up with a need to call Julia from–wait for it–SmallTalk. If you are familiar with Pharo or Squeak, that’s where I want to call from–mostly from Pharo.

I see that Pharo supports FFI, but the docs focus mostly on calling C and not much else. I see in Julia that ccall is good for calling C, but I don’t see much on calling Julia from anywhere.

Q: Calling Julia from Smalltalk, can I get there from here? Or is there going to be some heavy lifting?

I realize I can do a microservice and call a Julia HTTP server. I can also do some kind of MQ thing. But I would like to simply make a local call to Julia.

I have a remote cluster with many datas in it and some substantial Julia modules also in the mix. Distribution/Parallel are appealing for the backend. It’s the front-end that is grieving me at the moment. Notebooks are not measuring up. I see things I would like to take advantage of already working in Pharo, hence this post.

If you read this far, thanks for your patience.

1 Like

I have no experience in doing this but i think you want this section fo the docs

https://docs.julialang.org/en/v1/manual/embedding/

where you use Pharo’s ability to FFI call C etc to call libjulia

2 Likes

Thanks

I had skipped embedded because I thought it was about Julia in devices. But it sounds like it might work.

1 Like