Fork me on GitHub

FYI, we just used rewrite-clj to create a script. It massages legacy re-com codebases to include a newly introduced re-com feature: Worked a treat. Thanks!

👍 4
❤️ 4
metal 4

Awesome! Thanks for sharing @mikethompson !


rewrite-clj is dang cool. I wish I’d looked for it before. I’m definitely going to try to use it more in the future.


I want a t-shirt


@reefersleep I'm considering of writing a bb-like tool with rewrite-clj in it. Do you think this would be useful? Transform code in a blink of an eye


Also considering of adding it to bb itself, but not sure how much extra weight this would bring in and if it's generally scripting-focused enough to add


To my shame, I haven’t really used bb yet, though. I keep thinking it’s really cool, but I tend to do things from inside a repl in Cursive, making ad hoc projects for things like scripting things with rewrite-clj.


Another binary could have have another focus. E.g. also add instaparse to it and other parser-related tools


idk how those things would compose.


I need to look through your repositories to get an overview of your projects, and to try to use bb more. I feel like I’m missing out 🙂


I would say, anytime you need to write a bash script longer than 5 lines for your clojure build, it's worth taking a look at bb


funny, this was something that I was hammocking lately. In a production-oriented build I'd use clj, because many prod builds take something like 10m or more, so a difference measured in seconds barely matters. I would still keep the .clj script bb-compatible (shebang and all) so that devs can iterate on the scripts comfortably


@U45T93RA6 true, in CI it usually doesn't matter a lot, but for local development it's nicer to have it all fast at your fingertips I find

🤝 4

and it's indeed one of bb's goals to offer a sane migration path to clj when you need to, no "vendor lock-in", all libs in bb also run with the JVM


yes, I definitely appreciate that bb is not its own island otherwise creating an arbitrary fast-starting lisp would be too easy :)


I wrote a bash script for the first time in ages the other day. It wasn’t horrible but it wasn’t bb.


@borkdude, if rewrite-clj were built into bb (or available via pod), I would have used it the other day. I had to spawn from bb to clojure. It was not traumatic but also not super convenient. In the case of that script, processing time was not a big issue, it was a long running one.


Yeah, long running scripts (say 5 seconds or longer) are better off on the JVM


So it remains to be seen in which case bb would be useful with rewrite-clj included