Начал использовать cl for fun, но для решения практических задач, для этого мне нужно использовать gsl, чтобы не писать рунге-кутты метод.
Для cl существует gsll, который довольно плохо задокументирован.
Попробовал использовать cffi, c ним тоже проблемы. Даже пример из туториала не работает, такой код
#!/usr/local/bin/sbcl --script
(asdf:oos 'asdf:load-op :cffi)
;;; Nothing special about the "CFFI-USER" package. We're just
;;; using it as a substitute for your own CL package.
(defpackage :cffi-user
(:use :common-lisp :cffi))
(in-package :cffi-user)
(define-foreign-library libcurl
(:unix (:or "libcurl.so.3" "libcurl.so"))
(t (:default "libcurl")))
(use-foreign-library libcurl)
;;; A CURLcode is the universal error code. curl/curl.h says
;;; no return code will ever be removed, and new ones will be
;;; added to the end.
(defctype curl-code :int)
;;; Initialize libcurl with FLAGS.
(defcfun "curl_global_init" curl-code
(flags :long))
вываливается в следующее
sbcl --script cffi.lisp
unhandled SB-KERNEL:SIMPLE-PACKAGE-ERROR in thread #<SB-THREAD:THREAD
"initial thread" RUNNING
{AAF2841}>:
The name "ASDF" does not designate any package.
0: (SB-DEBUG::MAP-BACKTRACE
#<CLOSURE (LAMBDA # :IN BACKTRACE) {AB0001D}>
:START
0
:COUNT
128)
1: (BACKTRACE 128 #<SB-SYS:FD-STREAM for "standard error" {AAF51B1}>)
2: (SB-DEBUG::DEBUGGER-DISABLED-HOOK
#<SB-KERNEL:SIMPLE-PACKAGE-ERROR
"The name ~S does not designate any package." {AAFD5E9}>
#<unavailable argument>)
3: (SB-DEBUG::RUN-HOOK
*INVOKE-DEBUGGER-HOOK*
#<SB-KERNEL:SIMPLE-PACKAGE-ERROR
"The name ~S does not designate any package." {AAFD5E9}>)
4: (INVOKE-DEBUGGER
#<SB-KERNEL:SIMPLE-PACKAGE-ERROR
"The name ~S does not designate any package." {AAFD5E9}>)
5: (ERROR
SB-KERNEL:SIMPLE-PACKAGE-ERROR
:PACKAGE
"ASDF"
:FORMAT-CONTROL
"The name ~S does not designate any package."
:FORMAT-ARGUMENTS
("ASDF"))
6: (SB-INT:%FIND-PACKAGE-OR-LOSE "ASDF")
7: (SB-IMPL::READ-TOKEN
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
#\a)
8: (SB-IMPL::READ-MAYBE-NOTHING
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
#\a)
9: (SB-IMPL::READ-LIST
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
#<unavailable argument>)
10: (SB-IMPL::%READ-PRESERVING-WHITESPACE
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
NIL
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
T)
11: (SB-IMPL::%READ-PRESERVING-WHITESPACE
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
NIL
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
NIL)
12: (SB-C::READ-FOR-COMPILE-FILE
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
0)
13: (SB-INT:LOAD-AS-SOURCE
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
:VERBOSE
NIL
:PRINT
NIL
:CONTEXT
"loading")
14: ((FLET SB-FASL::LOAD-STREAM :IN LOAD)
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
NIL)
15: (LOAD
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>
:VERBOSE
NIL
:PRINT
NIL
:IF-DOES-NOT-EXIST
T
:EXTERNAL-FORMAT
:DEFAULT)
16: ((FLET SB-IMPL::LOAD-SCRIPT :IN SB-IMPL::PROCESS-SCRIPT)
#<SB-SYS:FD-STREAM for "file /home/aptyp/cffi.lisp" {AAF3EB9}>)
17: ((FLET #:WITHOUT-INTERRUPTS-BODY-5532 :IN SB-IMPL::PROCESS-SCRIPT))
18: (SB-IMPL::PROCESS-SCRIPT "cffi.lisp")
19: (SB-IMPL::TOPLEVEL-INIT)
20: ((FLET #:WITHOUT-INTERRUPTS-BODY-221821 :IN SAVE-LISP-AND-DIE))
21: ((LABELS SB-IMPL::RESTART-LISP :IN SAVE-LISP-AND-DIE))
unhandled condition in --disable-debugger mode, quitting
И заодно подскажите форум, сообщество по common lisp.