Did you know ... | Search Documentation: |
![]() | Packs (add-ons) for SWI-Prolog |
Title: | Embedded Julia for SWI Prolog |
---|---|
Rating: | Not rated. Create the first rating! |
Latest version: | 0.1.4 |
SHA1 sum: | c336ba353b3818e747b9316deb5db56f0c288724 |
Author: | Samer Abdallah <samer.abdallah.00@gmail.com> |
Download URL: | https://github.com/samer--/pljulia.git |
No reviews. Create the first review!.
Embedded Julia for SWI Prolog
This module allows Prolog code to use an embedded instance of Julia, a language for numerical and technical computing.
Make sure you have installed Julia, and that the julia executable is on your PATH.
Then do
?- pack_install(pljulia).
?- use_module(library(julia)). ?- ?cumsum(rand(4,4)). ?- X <? 6*7. ?- "hello world"[1:2:end] ?> X. ?- X <? rand(3,4,5), ?X. ?- X <? #(1,"a",2.2,[1,2,3]). ?- maplist(jl_call("println"), [1,3.14,#("a",2.2,float64([3],[4,5,6]))], _). ?- ?pl_call(:user,:succ,4).
See examples/example.pl for more, including plotting.
Add jl_map/2, like jl_call/N
but mapped over lists.
Generate more informative Prolog exceptions from Julia exceptions
Handle more Julia types directly: more base types? Arrays of more types? BitArray?
Handle more node types in Julia syntax trees.
Consider having jl_array_t
structures floating around as Prolog BLOB
atoms, assuming they can be protected from Julia's garbage collector.
Should be more efficient than converting to/from Prolog lists when dealing
with numeric arrays.
Handle more Julia syntax:
; to separate positional args from keyword args {} for parametric types
Pack contains 8 files holding a total of 73.0K bytes.