Fork me on GitHub
#portal
<
2022-01-03
>
genekim18:01:35

@djblue Portal continues to blow my mind. Just made my first vega-lite histogram, which is something I’d normally use Oz for. Sample code for anyone trying to use it — just tap> a value that has the shape of {:data {:values [..]}} . Here’s the link Vega-Lite histogram page: https://vega.github.io/vega-lite/examples/histogram.html

(defn vega-histogram
  [data]
  {:data     {:values data}
   :mark     "bar"
   :encoding {:x {:bin   true
                  :field "timestamp"
                  :type "temporal",
                  :timeUnit "yearmonth"}
              :y {:aggregate "count"}}})

(tap> (vega-histogram (->> rr
                          ;(take 1000)
                          (map #(select-keys % [:timestamp :op]))
                          (remove #(nil? (:timestamp %))))))

🎉 7
genekim18:01:25

Freaking amazing how little effort that required!! Thx @djblue!

teodorlu20:01:51

Out of curiosity, how are you running portal? Why? Quick poll. 1️⃣ - JVM - (p/open) 2️⃣ - vscode - (p/open {:launcher :vs-code}) 3️⃣ - intellij - (p/open {:launcher :intellij}) 4️⃣ - remote - (def submit (partial p/submit {:port 5678})) 5️⃣ - other - please explain.

1️⃣ 12
2️⃣ 6
3️⃣ 7
4️⃣ 1
5️⃣ 3
Lukas Domagala22:01:18

i like to have portal on a different monitor then my IDE, so the vscode plugin isn’t really helpful sadly

👍 2
Luke Johnson23:01:32

Portal web is really handy to bookmark or install. It doesn’t require a repl and it’s great for pasting data on your clipboard (transit or json, for example).

👍 1