Bug when stringifying negative exponents?
Not sure what's going on, but the printer is emitting a & when serializing a float with a negative exponent.
Repro:
* (ql:quickload '#:com.inuoe.jzon)
To load "com.inuoe.jzon":
Load 1 ASDF system:
com.inuoe.jzon
; Loading "com.inuoe.jzon"
(#:COM.INUOE.JZON)
* (sb-ext:add-package-local-nickname '#:jzon '#:com.inuoe.jzon)
#<PACKAGE "COMMON-LISP-USER">
* (jzon:stringify -9.2596805e-4)
"-9.2596805e-&"
Environment:
* (format t "~a:~a on ~a~%...~%" (lisp-implementation-type) (lisp-implementation-version) (machine-type))
SBCL:2.4.4 on X86-64
...
NIL
* (map 'list #'char-code "e+-.0123456789")
(101 43 45 46 48 49 50 51 52 53 54 55 56 57)
* (ql-dist::dist-version "quicklisp")
"2023-10-21"
Hi, thank you for reporting. That was a bug that should have been fixed by https://github.com/Zulu-Inuoe/jzon/pull/61 However, I think Quicklisp is still on an older version as they haven't done a new release since October.
I'd recommend either install jzon locally, or use Ultralisp https://ultralisp.org/
Aha, that appears to fix the problem!
Interesting, before opening this I did download latest develop on local, to see if the problem had already been fixed, but somehow I was still able to reproduce it. Guess I failed to override the one inside the Quicklisp dist?
Anyways, I am going to close this, thanks!
Thanks for following up! With you downloading it locally, it may be a load order issue, but I can't say for sure.
I keep my local projects in ~/common-lisp/, which ASDF seems to prioritize over quicklisp entries, if that helps