Fork me on GitHub
#squint
<
2024-01-22
>
borkdude15:01:16

squint, compile an expression + run it immediately, in deno:

$ time deno run -A npm:squint-cljs -e '(js/console.log (+ 1 2 3))'
6
deno run -A npm:squint-cljs -e '(js/console.log (+ 1 2 3))'   0.05s  user 0.01s system 94% cpu 0.059 total
with deno.json being:
{
  "imports": {
    "squint-cljs": "npm:squint-cljs",
    "squint-cljs/core.js": "npm:squint-cljs/core.js"
  }
}

👏 5
seancorfield18:01:33

Is npm an alias?

seancorfield18:01:57

Or is that a different -A option?

borkdude18:01:04

this isn't the clojure CLI

seancorfield18:01:41

But -A still refers to an alias... Confused the heck out of me!

borkdude18:01:43

-A in deno means drop all security restrictions to allow reading from the network etc, npm: means: use the package from NPM

seancorfield18:01:02

Oh... Sheesh...

😆 2
seancorfield18:01:43

I was like, why is there no : in front of that alias:rolling_on_the_floor_laughing: