obb

wcohen 2022-01-05T14:38:30.056400Z

Hi all — I just filed https://github.com/babashka/obb/issues/5 but was thinking it might be less frictiony to not have all discussion via the issue. Does it seem right to you that the only way to listen for events and respond to them would be to have some kind of obbd that runs in the background?

borkdude 2022-01-05T15:06:16.056900Z

Interesting idea. In obb eval and load-string should "just work"™️

borkdude 2022-01-05T15:06:41.057100Z

so if jxa supports some kind of server thingie, we could use that to read from a socket or so and eval things

borkdude 2022-01-05T15:06:57.057300Z

or we can just implement a full blown socket / nrepl server. #nbb already has this.

wcohen 2022-01-05T15:17:53.058700Z

To put a pin in this line of reasoning — I need to read up more on nbb and jxa sounds like. I don’t have it fully thought through but it seems like in addition to the services thing discussed above, one possible distinguishing factor between the end result of the nbb approach and this is that in addition to having something that could be run as nbb script and be text-based, an obb output could be to create a .app folder with the obb / babashka binary copied inside, which then itself calls the script in question, eventually meaning that the ad-hoc scripting could be graphical on macOS and redistributable as mini .app files for users. The use case that comes to mind for me for this would be to more easily create small ‘script’-like things in CLJS that are easier for the non-tech-savvy to utilize — not unlike what Automator et al are supposed to do in the first place

borkdude 2022-01-05T15:22:21.059Z

oh right!

borkdude 2022-01-05T15:23:02.059200Z

yeah, obb only needs a 1MB JS file btw, no babashka. So if you can make a .app folder that when executed launches the JS file + the script, then you're golden

wcohen 2022-01-05T15:30:20.059700Z

Oh, of course, osascript is the binary! Okay — I need to do a little more thinking about this. I don’t want to go too far down a rabbit hole and realize that I’m jankily trying to recreate javafx or something

borkdude 2022-01-05T15:12:23.058400Z

I justed opened the obb discussions board: https://github.com/babashka/obb/discussions Issues that are more like questions and ideas can go there rather than Github issues, as that format offers better options for discussions.

wcohen 2022-01-05T15:12:37.058600Z

Lovely — thanks!

zane 2022-01-05T17:13:49.060300Z

I have a feeling we’re going to want a wiki for usage examples pretty soon.

borkdude 2022-01-05T18:51:16.060700Z

We also have an examples dir, but wiki is also cool. You can just enable it in settings

borkdude 2022-01-05T18:51:41.061Z

What also works is doc folder with various docs

zane 2022-01-05T18:53:22.061900Z

Totally. My main concern is empowering non-contributors to add their own. Not sure what the best way to do that is.

borkdude 2022-01-05T18:53:33.062100Z

wiki is always good

👍🏻 1