Fork me on GitHub
#clerk
<
2024-03-15
>
genekim01:03:05

Wrote something about Tailwind CSS, but it’s really about Clerk — it’s just amazing to take the Moldable Development practices preached by @mkvlr and @jackrusher. (OMG, I didn’t mean to hit Enter. Will expound upon it in a reply.)

👍 1
🖤 1
genekim21:03:24

https://twitter.com/RealGeneKim/status/1768406320187924527 This post is really about how amazing it is to write little viewers for data and state in Clerk — and what a magnificent design design it was to allow using Tailwind in the HTML viewer. What I learned from Tudor Girba, creator of the Glamorous Toolkit (built upon Pharo Smalltalk) and term Moldable Development, is how much things change when you are constantly building little visualization tools to understand your code and data better. I struggled to understand why something was failing in the 12-step LLM process. I had a “big bag of data” with all the intermediate results, which was wonderful, but even viewing it in the amazing Portal just didn’t seem to be working. In a flash of inspiration, I wrote these little viewers to render nicely what the data was all about: • clear titles: what is the “bag1": label what the inputs are, and what the outputs were • is the data correct (green vs. red, based on whether the UUID was in a set of “bad UUIDs) • what are the keys in this big map? • which ones were important, and what are the values? • and then: is the data correct (green vs. red, based on whether the UUID was in a set of “bad UUIDs) Thank you @mkvlr and @jackrusher — this is definitely changing the way I work. • I’ll be writing a lot more of these little viewers — moving them into another namespace, so I can see what I’m doing.. a truly critical part of doing work well! • Clerk is amazing. It’s brought a real appreciation of JavaScript and all the affordances that browsers give you — and learning Tailwind amped that up even more • I still have some questions about how Clerk actually works — I’ve been recording many of my coding sessions, and I’ll highlight where I’m having to put “no-cache” meta attributes in, to get it to do something I want…. There must be something wrong with my mental model about how it actually works. Keep up the amazing work!

🔥 5
clojure-spin 2
🖤 2
🙏 1
José Javier Blanco Rivero22:03:23

I 've been working in a RAG project, and I started before langchain4j so there is a lot of Python interop, and I have the issue that I cannot visualize Python objects in Portal. Itq throws an exception. And I'm curious, which libraries are you using in your LLM pipeline?

genekim05:03:04

I’m using https://github.com/wkok/openai-clojure, along with the diehard library to do rate limiting and retries. I had to roll my own wrapper to call ollama locally, but I mostly abandoned that, because the results are so inferior to openai API.

👍 2
andersmurphy18:03:11

I’ve been looking for a library like https://github.com/sunng87/diehard for a while. Thanks for mentioning it! 🙏

Kurt Harriger23:03:49

Is there a way that I can have clerk hide comments? as far as I know I can’t apply metadata to comments When working in the repl its common to have examples that include the results such as: (+ 1 1) ;; => 2 I really want to keep the results in the code file so that I can view them without actually needing to view the clerk output but if I keep them in the code and then render it with clerk it renders the comments as markdown which looks ugly. I wouldn’t mind as much if they were rendered as code rather than markdown. I’m thinking maybe having any comments starting with => automatically hidden? but I don’t know if I can change the default comment renderer? as a workaround I move the evaluation results to the same line as the code but I also have some cases with multiline output in comments as well and this I can’t inline

teodorlu00:03:51

Perhaps put the line comments into a (comment ,,,) block, then hide the comment block via metadata?

Kurt Harriger00:03:25

interesting idea I think that could work

Kurt Harriger00:03:52

yeah that seems to work

Kurt Harriger00:03:19

I can use inline in most cases and then comment blocks with metadata for longer snippets

👍 1
Kurt Harriger00:03:44

seems like its possible to do what I want to do, but the comment block is a good enough hack for now

Kurt Harriger00:03:14

I’m was also toying with idea of creating a macro that is somewhat like deftest is and have it print actual but ignore the expected if equal otherwise renders a failure message. This might be useful to ensure my comments don’t drift from actual behavior

jackrusher16:03:33

We should document this better 🙂