Skip to content

Instantly share code, notes, and snippets.

@noisesmith
Last active August 5, 2016 21:19
Show Gist options
  • Select an option

  • Save noisesmith/5a59cd00489c9bfc754d11f5616e7a4d to your computer and use it in GitHub Desktop.

Select an option

Save noisesmith/5a59cd00489c9bfc754d11f5616e7a4d to your computer and use it in GitHub Desktop.
peregrine.circle=> (binding [*warn-on-reflection* true *unchecked-math* :warn-on-boxed] (eval '(fn [] (rand-int))))
#object[peregrine.circle$eval33277$fn__33278 0x1da5063e "peregrine.circle$eval33277$fn__33278@1da5063e"]
peregrine.circle=> (def a 1)
#'peregrine.circle/a
peregrine.circle=> (binding [*warn-on-reflection* true *unchecked-math* :warn-on-boxed] (eval '(fn [] (rand-int))))
#object[peregrine.circle$eval33283$fn__33284 0x3e49d47f "peregrine.circle$eval33283$fn__33284@3e49d47f"]
peregrine.circle=> (binding [*warn-on-reflection* true *unchecked-math* :warn-on-boxed] (eval '(fn [] (+ 1 (rand-int)))))
Boxed math warning, /private/var/folders/_m/9py48m892rq93bgbc91br8mr0000gr/T/form-init366749289092648620.clj:1:84 - call: public static java.lang.Number clojure.lang.Numbers.unchecked_add(long,java.lang.Object).
#object[peregrine.circle$eval33289$fn__33290 0x32cc6003 "peregrine.circle$eval33289$fn__33290@32cc6003"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment