squint

Jonas Östlund 2025-02-11T11:31:18.872639Z

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

borkdude 2025-02-11T11:36:07.320599Z

Very cool, thank you!

Jonas Östlund 2025-02-11T11:41:32.276129Z

You're welcome, thanks for the review!

borkdude 2025-02-11T11:45:56.872409Z

released

Jonas Östlund 2025-02-11T11:50:38.738709Z

Cool!

Jonas Östlund 2025-02-11T15:39:30.506539Z

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

🎉 3
borkdude 2025-02-11T15:52:40.550109Z

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

borkdude 2025-02-11T15:52:50.061809Z

I also fixed the build failure (hopefully)

Jonas Östlund 2025-02-11T15:56:33.876649Z

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])))?

borkdude 2025-02-11T15:57:19.081529Z

it compiles the expression into a js value

borkdude 2025-02-11T15:57:31.846279Z

compiles and evaluates

Jonas Östlund 2025-02-11T15:59:01.837659Z

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?

borkdude 2025-02-11T15:59:16.705069Z

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

Jonas Östlund 2025-02-11T16:00:17.871819Z

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.

borkdude 2025-02-11T16:00:56.477249Z

oh please fix that too then :)

Jonas Östlund 2025-02-11T16:01:13.078029Z

Yes, I will look into that :-)

Jonas Östlund 2025-02-11T16:02:39.654449Z

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

borkdude 2025-02-11T16:04:02.648849Z

yeah, it's ok

Jonas Östlund 2025-02-11T16:09:43.272249Z

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

borkdude 2025-02-11T16:09:45.021399Z

merged. do you need another release?

Jonas Östlund 2025-02-11T16:10:12.181589Z

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

borkdude 2025-02-11T16:10:33.082339Z

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

Jonas Östlund 2025-02-11T16:14:34.337769Z

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.

borkdude 2025-02-11T16:15:23.463079Z

sounds very cool!

Jonas Östlund 2025-02-11T16:17:10.717569Z

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 🙂

borkdude 2025-02-11T16:17:38.989919Z

👍