Fork me on GitHub
#nbb
<
2022-12-06
>
Benjamin11:12:00

Is there a blog post or something on why clj maps print this hairy in js/console.log?

(def m {:foo 10})

  (js/console.log m)

  ;;   {
  ;;   G: null,
  ;;   J: 1,
  ;;   B: [
  ;;     {
  ;;       Vb: null,
  ;;       name: 'foo',
  ;;       ga: 'foo',
  ;;       Od: null,
  ;;       F: 2153775105,
  ;;       N: 4096
  ;;     },
  ;;     10
  ;;   ],
  ;;   I: null,
  ;;   F: 16647951,
  ;;   N: 139268
  ;; }


  (str m)
  "{:foo 10}"
basically I figured out when I say console.log I first call str

borkdude11:12:15

yes, these are CLJS data structures printed as JS objects

genRaiy12:12:11

or use println 🙂

Aron14:12:15

hi, can nbb run datascript, either cljs or js release? 🙂

borkdude14:12:11

@ashnur You can with the nbb-logseq - it's built in. If datascript is available on npm as JavaScript, then I think you should also be able to use it from there

👍 1
Aron14:12:06

cool, thank you! I must be running into some kind of pebkac issue, trying too many new things at once )