squint 2025-02-11

Thanks for the awesome work with Squint! Here is a PR that makes mapcat return a transducer if no collections are provided: https://github.com/squint-cljs/squint/pull/608

Here is another PR on the same theme: https://github.com/squint-cljs/squint/pull/610

🎉 3

Thanks, I don't have a very rational reason to prefer if else over () ? : but I think I do prefer if else more, because it's easier to put stuff in between when you need to

I also fixed the build failure (hopefully)

Thanks, I changed it to use if over ?. By the way, what is the purpose of jsv!, as in (jsv! '(into [] (remove odd?) [1 2 3 4 5 6 7 8 9])))?

it compiles the expression into a js value

compiles and evaluates

Interesting, but isn't it possible to write (into [] (remove odd?) [1 2 3 4 5 6 7 8 9])) without wrapping it with jsv! , or am I missing something?

no, because in that case the expression is evaluated in normal ClojureScript

Oh, I have to look into that... I believe I may not have used jsv! for the unit test in my previous PR that I submitted earlier today.

oh please fix that too then :)

Yes, I will look into that :-)

Is it OK that I put that change in the PR that I have open now, or does it need a separate PR?

yeah, it's ok

I pushed a fix that wraps the mapcat transducer expression in the unit tests with jsv.

merged. do you need another release?

No hurry, I will use (filter (complement ...)) until you decide to release.

cool. what are you building, something just for fun or otherwise?

I am building a library that will download datasets of RDF triplets to the browser and store them in a Dexie.js database. And then make them searchable. I am a bit new to frontend development and was first considering ClojureScript but decided to look into Squint instead because it is more interoperable with the rest of the JS ecosystem. If I end up with something useful, I will make it public.

sounds very cool!

I based my project on the vite-react example from Squint. Despite Squint being so young, it has been a very nice development experience so far. I sit with a bb test:watch process running in my terminal and an Emacs window next to it. Even if Squint doesn't have a REPL yet, the feedback loop is very short and pleasant 🙂