Skip to content

Instantly share code, notes, and snippets.

@laurentpetit
Created July 23, 2015 10:04
Show Gist options
  • Save laurentpetit/42101637cb04f2f064a8 to your computer and use it in GitHub Desktop.
Save laurentpetit/42101637cb04f2f064a8 to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;;;;;
;; nrepl request when :pprint "true"
{:op "eval", :code "(defn somefn [] (prn \"something\"))", :ns "user", :pprint "true", :right-margin 20}
;; nrepl responses:
{:id a625ffc0-06f2-4fd5-a037-91b265e917b9, :pprint-out #<Var@758d0fe8:
#object[user$somefn 0x1929eceb "user$somefn@1929eceb"]>
, :session fe8e50cf-a399-47c4-8548-860cf540ae80}
{:id a625ffc0-06f2-4fd5-a037-91b265e917b9, :pprint-sentinel {}, :session fe8e50cf-a399-47c4-8548-860cf540ae80}
{:id a625ffc0-06f2-4fd5-a037-91b265e917b9, :ns user, :session fe8e50cf-a399-47c4-8548-860cf540ae80}
{:id a625ffc0-06f2-4fd5-a037-91b265e917b9, :session fe8e50cf-a399-47c4-8548-860cf540ae80, :status [done]}
;;;;;;;;;;;;;;;;;;;;;
;; nrepl request when :pprint is not set
{:op "eval", :code "(defn somefn [] (prn \"something\"))", :ns "user"}
;; nrepl responses:
{:id 47121206-a56a-4471-ba9c-79c0cfb8436a, :ns user, :session fe8e50cf-a399-47c4-8548-860cf540ae80, :value #'user/somefn}
{:id 47121206-a56a-4471-ba9c-79c0cfb8436a, :session fe8e50cf-a399-47c4-8548-860cf540ae80, :status [done]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment