Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug when stringifying negative exponents? #63

Closed
iamFIREcracker opened this issue May 13, 2024 · 3 comments
Closed

Bug when stringifying negative exponents? #63

iamFIREcracker opened this issue May 13, 2024 · 3 comments

Comments

@iamFIREcracker
Copy link

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"
@Zulu-Inuoe
Copy link
Owner

Hi, thank you for reporting.
That was a bug that should have been fixed by #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/

@iamFIREcracker
Copy link
Author

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!

@Zulu-Inuoe
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants