Skip to content

Instantly share code, notes, and snippets.

@lispm
Created March 19, 2017 21:33
Show Gist options
  • Save lispm/fc5cc6ade70770bc62db3e1def9fd4d9 to your computer and use it in GitHub Desktop.
Save lispm/fc5cc6ade70770bc62db3e1def9fd4d9 to your computer and use it in GitHub Desktop.
#|
* (cffi:use-foreign-library "/Applications/Julia-0.5.app/Contents/Resources/julia/lib/libjulia.0.5.1.dylib")
#<CFFI:FOREIGN-LIBRARY LIBJULIA.0.5.1.DYLIB-505 "libjulia.0.5.1.dylib">
* (cffi:defcfun ("jl_init" jl-init) :void (julia-home-dir :string))
JL-INIT
* (jl-init "/Applications/Julia-0.5.app/Contents/Resources/julia/lib/")
* (cffi:defcfun ("jl_eval_string" jl-eval-string) :pointer (str :string))
JL-EVAL-STRING
* (jl-eval-string "print(sqrt(2.0))")
1.4142135623730951
#.(SB-SYS:INT-SAP #X28304010)
|#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment