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

Java object cprint does not match README screenshot #48

Closed
lread opened this issue Oct 6, 2019 · 1 comment · Fixed by #49
Closed

Java object cprint does not match README screenshot #48

lread opened this issue Oct 6, 2019 · 1 comment · Fixed by #49
Labels

Comments

@lread
Copy link
Contributor

lread commented Oct 6, 2019

Hey there!

While working on unit tests for #44, I noticed that:

(require '[puget.printer :as printer])
(printer/cprint (java.util.Currency/getInstance "USD"))

I get the following result:
image

Which does not match the format shown in the README screenshot:
image

I don't know what the expected/desired behavior is, perhaps the README screenshot just needs an update?

@greglook
Copy link
Owner

greglook commented Oct 8, 2019

Yeah, I added the object ID to object printers because it's useful to be able to distinguish distinct instances of a class that would otherwise render identically. I'm somewhat ambivalent about updating the screenshot, it's more meant to give a sense of what the library does than be 100% accurate.

lread added a commit to lread/puget that referenced this issue Oct 8, 2019
For posterity (and if you need a redo) run:
lein repl

Then paste the following:
(require '[puget.printer :as puget])
(puget/cprint [nil true \space "string" {:omega 123N :alpha '(func x y) :gamma 3.14159}
 #{\a "heterogeneous" :set} (java.util.Currency/getInstance "USD") (java.util.Date.) (java.util.UUID/randomUUID)])

Adjust terminal theme. I chose Ubuntu Color Preset in iTerm2 on macOS.
Fira Code font with spacing tweaks seemed like a close enough match.

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

Successfully merging a pull request may close this issue.

2 participants