Fork me on GitHub
#squint
<
2024-03-07
>
Andrea14:03:15

Hi, I’m trying out a project with squint + lit, it’s pretty cool. Super nice to see defclass put to good usage! I end up using a bunch of code like:

(js-template lit/html
                               "<div class='border border-slate-600 mb-2 p-1'>"
                               "<div>" (:created-at this) "</div>"
                               "<div>" (:body this) "</div>"
                               "<button @click=" (.-addComment this) " class='bg-slate-500 rounded-md border p-1 text-slate-200 text-sm'>"
                               (.comment-button-text this)
                               "</button>"
                               (when (.commenting? this)
                                 (.render-editor this))
                               "<div class='ml-2'>"
                               (when (not-empty (:comments this))
                                 (.. this -comments (map render-comment)))
                               "</div>"
                               "</div>")
is there any existing solution to combine js-template with more hiccupish syntax?

borkdude14:03:46

I have a branch that allows more hiccup-esque stuff in combination with lit/html. Let me see where it is

Andrea14:03:16

of course you have 🙂

borkdude14:03:54

This is in the html branch

borkdude14:03:10

if you're willing, I could make this branch up to date with main and you could try it out using a local build?

Andrea14:03:48

cool, whould be amazing

borkdude14:03:14

one issue I struggled with was ul + li in a sequence etc but perhaps using your input we can work that out

borkdude15:03:27

updated

🙏 1
mhuebert15:03:46

I'm trying out squint's nrepl-server with bun. I'm able to start and connect with Calva ("generic") and evaluate files that contain only npm dependencies, but as soon as I try and depend on another namespace in my project I get an error, Cannot find package "foo.bar". I'm starting the nrepl-server via bun --bun squint nrepl-server :port 1888 and I have :paths ["src"] in a squint.edn file; anything else I might be missing configuration-wise?

borkdude15:03:23

Yeah that part isn't working yet... unfortunately

borkdude15:03:00

maybe I can give that a try next week

mhuebert15:03:49

cool... I wasn't sure how far into the bleeding edge I was 🙃

mhuebert15:03:27

am very happy with how my tiny squint project compiles and runs with bun though

👍 1
borkdude15:03:50

this shouldn't be too hard to solve, but it would need some logic around compile + loading of transitive namespace stuff

martinklepsch05:03:36

@U050RLRRQ nice to see you around here 👋 I’m also using squint and bun lately. Hope you’re well ☺️

martinklepsch08:03:12

@U050RLRRQ actually curious — what are you building? 🙂

mhuebert08:03:04

toying with using Observable Framework to visualize stuff coming out of pythonland