gratitude

Matt 2023-11-22T21:35:59.767429Z

@borkdude Thanks for ANOTHER killer tool on the ol' toolbelt. jet has been such an effortless adoption for me. I am not embarrassed to admit, that I did not RTFM and the "element of least surprise" seems to be part of the api. ❤️ you dude.

💯 2
5
13
❤️ 3
1
h0bbit 2023-11-23T01:31:11.829879Z

I’ve been using jet ever since it was released and it’s become such a day-to-day part of my toolkit that I don’t even think about it anymore 😄 Thank you @borkdude

❤️ 1
Vincent 2023-11-23T17:46:40.224709Z

cool lib. didn't know it existed til now. "CLI to transform between https://www.json.org/, https://github.com/edn-format/edn, https://yaml.org/ and https://github.com/cognitect/transit-format using Clojure." Link for the curious: https://github.com/borkdude/jet

h0bbit 2023-11-22T02:40:53.460319Z

Recently, I read through all the guides on the Pedestal website: http://pedestal.io/pedestal/0.7-pre/guides/hello-world.html. I believe they were written by @mtnygard and are maintained by @hlship. I learnt so much about how to write good Clojure code from these guides! — How to think about routing, How to separate concerns, How to write testable code! The guides were an absolute delight to read through. Thank you!

👀 3
6
h0bbit 2023-11-22T02:42:45.116849Z

Thank you @jpmonettas for #flow-storm 🙂 I didn’t think that my REPL experience could become sweeter, but boy was I wrong. Flow-Storm has made debugging an order of magnitude easier.

12
❤️ 2
Martín Varela 2023-11-22T06:43:32.288379Z

If you haven't yet, try combining it with @djblue’s Portal... it's a great, great combo!

h0bbit 2023-11-22T07:03:31.468549Z

I’d love to see what Portal adds to Flow-Storm. I find myself only in the Flow-Storm UI. I’d love to see how Portal improves the experience

Martín Varela 2023-11-22T07:06:24.870259Z

Well, the data inspection aspect of Portal is nicer than the one currently on Flowstorm. You can make it so that you tap a value on Flowstorm, and it shows up on Portal, for you to navigate it. You can do some other cool stuff on Portal (one thing I found super nice is that you can compose the portal submit function with some arbitrary processing, so for example I made it so that documents I keep on XTDB can be navigated in portal, so clicking anything that looks like a UUID, or corresponds to a key that I know maps to an id, takes me to that object in the DB, but the possibilities are endless, really)

Martín Varela 2023-11-22T07:07:24.027009Z

I suspect you could eventually have a Portal instance in a webview inside Flowstorm, with a little hacking.

h0bbit 2023-11-22T07:08:30.869999Z

^ Okay, this is really cool. I’m assuming this is using the datafy/nav protocols for making queries to flesh out the data. I’m using next-jdbc + PG, and I believe next-jdbc already has implementations of datafy/nav on the data it returns. I’ll check if Portal can help me get a “excel” style view of my data.

Martín Varela 2023-11-22T07:11:57.281139Z

Yes, basically I do a walk/postwalk on the results, and reify Nav via meta-data

Martín Varela 2023-11-22T07:13:02.380509Z

(defn fetch [coll k v]
  (if-let [xx (xt/entity (xt/db node) v)]
    (navify xx)
    v))

(def navigable-keywords #{:xt/id ,,,})

(defn navify[x]
  (walk/postwalk (fn[e]
                   (if (instance? clojure.lang.IObj e)
                     (with-meta e {'clojure.core.protocols/nav
                                   (fn[coll k v]
                                     (if (or (contains? navigable-keywords k)
                                             (uuid/uuidable? v))
                                       (fetch coll k v)
                                       (user/navify v)))})
                     e))
                 x))

🙌 2
Martín Varela 2023-11-22T07:13:18.185539Z

node there is bound to an initialized instance of XTDB

Martín Varela 2023-11-22T07:13:31.768169Z

you can make it neater, of course

Martín Varela 2023-11-22T07:14:32.632079Z

and you could extend String to implement Nav as well (can't do it via meta-data, unfortunately)