# ANN: pljulia - Julia embedded in SWI Prolog

**URL:** <https://discourse.julialang.org/t/ann-pljulia-julia-embedded-in-swi-prolog/8054>\
**Category:** Community\
**Created:** [December 29, 2017, 1:01am UTC](https://discourse.julialang.org/t/ann-pljulia-julia-embedded-in-swi-prolog/8054 "2017-12-29T01:01:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samer](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@samer](https://discourse.julialang.org/u/samer)\
**Post date:** [December 29, 2017, 1:01am UTC](https://discourse.julialang.org/t/ann-pljulia-julia-embedded-in-swi-prolog/8054/1 "2017-12-29T01:01:42Z")

</div>

Hello all,

Any Prolog users out there might be interested in an add-on package for SWI Prolog which runs an embedded Julia and allows computations to be done in Julia, building Julia expressions from Prolog terms, converting Prolog terms into appropriate Julia types (including multidimensional arrays and tuples), and converting Julia result types in to Prolog terms.

The package is installed in SWI Prolog using `pack_install(pljulia)`. The information page on the main SWI site is here: ["pljulia" pack for SWI-Prolog](http://www.swi-prolog.org/pack/list?p=pljulia)

As I’ve only just started using the Julia C API, I’m probably making some mistakes, in particular, in handling garbage collection, but it seems to be working ok so far. I’m also probably missing a lot of useful things I could be doing with the API. If you’re interested, the code is here: [https://github.com/samer--/pljulia](https://github.com/samer--/pljulia)

cheers,  
Samer
