Fork me on GitHub
#portal
<
2021-12-14
>
genekim01:12:08

What sort of witchery is this? Portal can render bitmaps?!? Amazing!

(def img-retval
    (http/get "some image url"
      {:oauth-token (:token token)
       :as :byte-array}))

(tap> img-retval)

genekim01:12:25

Literally, jaw is on the floor.

seancorfield01:12:26

VS Code's webview can render anything a browser can?

genekim01:12:08

@seancorfield Ha! I was expecting to see this again!!! 😆 (“”�PNG\r\n\n\rIHDR�8\bp��sBIT\b\b\b��O� IDATx���yx[՝?~ɒ�ś�Ȗl���;v�x��ر�9!�\n�)f�����t�>...“”)

genekim01:12:12

(Sort of felt guilty stuffing non-7bit ascii in Slack, given recent log4j injection horrors, but couldn’t resist. 🙂

Lukas Domagala01:12:05

the admins need something to look at:)

😆 1
genekim16:12:30

Yeah — it’s like a fire drill to keep @seancorfield on his toes. 🙂 😆

seancorfield20:12:36

The world has been on fire, non-stop, since Thursday evening... thankyouverymuch 🔥

genekim04:12:42

Fans of Portal (like me) might be interested in this — I thought this was utterly freaking mind-expanding, seeing what Smalltalk people are used to doing in their IDE. @djblue: I was thinking of you when Tudor Girba (author of Glamorous Toolkit, which is based on Pharo Smalltalk) was showing Eric Normand and me me how he’d build something. It was glorious seeing how he could create visualizations, and immediately thought of how Portal changed the way I work in IntelliJ. I thought you’d get a kick out of this — I’d start around the 42m mark. Please let me know if you find it as provocative as I did!! Links are here: https://twitter.com/RealGeneKim/status/1469389359249956869

💯 1
seancorfield04:12:05

The Smalltalk system was pretty amazing even back in the '90s when I had one on my Mac at home.

djblue04:12:18

I love how easy it is to make things interactive!

seancorfield04:12:53

The complete, top-down ability to introspect and manipulate any item in the IDE, using the same language you're using the IDE to write, makes for a very powerful system.

☝️ 1
genekim16:12:30

@seancorfield Totally — watching Tudor build things in GT blew my mind, and made me think what it would take to do something similar in Clojure…. To be able to render graphics in the IDE seemed so difficult without having to fire up a JS window or Swing window or whatever. Which is why I was so stunned when I discovered Portal could render an image. The ability for him to compose UI elements in the Playground was also amazing to me.

Lukas Domagala11:12:35

I’ve been thinking about portal hotkeys/commands lately and how I’d kind of like bookmarks and remappable hotkeys, but also don’t want to overload the ui too much. Then I remembered a post https://nextjournal.com/blog/command-bar and found out that the source for the command bar is available. @djblue would you be interested in an integration? If so I’d start a POC

djblue16:12:52

I would hold off on a POC as this would be a pretty big change. I do want to add user defined shortcuts via var metadata 👌

Lukas Domagala17:12:39

what do you mean by var metadata? something like:

^{portal/shortcut "ctrl+1"}
{:some :data :to :display}
and then you can use ctrl+1 to jump to that item or something more sophisticated?

djblue20:12:50

Something like:

(defn my-function {:shortcut #{"control" "1"}} [] ...)

🙌 1
Lukas Domagala02:12:02

ah so shortcuts for sci functions that you register with the ui? that also sounds interesting as well, nice idea! i was thinking of a way to mark data so i can jump around easier between a few different values, but yours is more general

djblue16:12:42

This would also work for runtime registered functions. I do think it could be interesting to tag values with metadata and just that to jump to them :thinking_face:

Lukas Domagala16:12:56

yeah, i’d kind of like it both ways. sending it tagged from the runtime to the ui, but also tagging it from the ui if it’s already in there. i’ve been thinking about the way RTS games do it, where you “bookmark” a group of units with ctrl+number and then jump to it by pressing the number.

1
djblue17:12:26

Also reminds me of vim's mark system

Lukas Domagala17:12:10

i just learned how to exit vim, so yeah … 😅

😂 2