eudoxia0 / cl-libyaml Goto Github PK
View Code? Open in Web Editor NEWlibyaml bindings for Common Lisp
libyaml bindings for Common Lisp
I tried to install this library via quicklisp on SBCL 1.0.55 and Ubuntu 12.04, but unfortunately it fails with the following error:
caught ERROR:
during compiler-macroexpansion of
(FOREIGN-SLOT-VALUE MARK '(:STRUCT MARK-T) ...). Use *BREAK-ON-SIGNALS* to
intercept:
Unknown CFFI type: :STRUCT
Is there anything I can do to get it to compile on this version of SBCL? Sadly I am forced to use this old version...
The two convenience macros, with-parser and with-event don't free up the allocated memory. The forms end with calls to a libyaml delete functions, but those functions don't free the memory for the top-level data structure. Rather, they free up memory for its slots and zero out all the bytes.
The body of the with- forms could either end with a call to foreign-free, or alternatively, expand into a with-foreign-object call rather than calling foreign-alloc.
Trying (cl-yaml:parse "{ a: 1, b: 2}")
on Windows fails with the call to INITIALIZE
in cl-libyaml.
libyaml.dll is installed from MINGW64 in "c:\msys64\mingw64\bin" (in PATH
) (NB. MINGW64 library is called libyaml-0-2.dll
, as on *nix systems, I've just copied it to libyaml.dll
)
Lisp: SBCL 1.3.6 (installed from roswell)
Hi,
using cl-yaml (cl-yaml-20150505-git, cl-libyaml-20150407-git, sbcl 1.2.16.135, UTF-8 default encoding), evaluating
(yaml:parse "€")
throws an error:
Parsing error at line 0, column 0: incomplete UTF-8 octet sequence.
Evaluating
(yaml:parse "€1234")
returns
"€12"
Maybe in cl-libyaml/src/macros.lisp in (defmacro with-parser ...) the call to with-foreign-string passes the wrong length? Should that be something like the below instead (warning: untested, and my first contact with cffi):
(with-foreign-string ((c-string octet-size) string)
[…]
(libyaml.parser:set-input-string ,parser
c-string
octet-size)
[…]
)
Thanks,
Lutz Euler
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.