Fork me on GitHub
#babashka
<
2022-09-21
>
steveb8n01:09:03

Idea: there’s been some discussion about using BB with mono-repls for various benefits. I wonder if we could get something like this as well? https://youtu.be/vE3LOHU0OV8

Sergio13:09:35

hello, is there an html-parser recommended and known to work with bb OOTB? I’ve tried multiple libraries but having classpath issues and prefer to avoid dealing with that

borkdude13:09:21

@sdmoralesma There are two pods that you could use for this: https://github.com/babashka/pod-registry Another option is to use a Node.js lib + #nbb

👀 1
Sergio13:09:24

and it worked! first time I work with pods, pretty sweet. Thank you @borkdude!

👍 1
bcaccinolo13:09:30

Hello, is it possible to run a process in the background with shell/sh or process. I would like to do my-app & basically via a bb task.

borkdude13:09:43

@benoit.caccinolo Yes :) process already runs in the background by default and if you want to wait on finishing it you can deref the process

borkdude13:09:53

but there's more...

bcaccinolo14:09:00

@borkdude and is it possible to let the process run even when the bb task terminates ? In a way, is it possible to detach the process ? ^^

borkdude14:09:56

With process the process might keep running, if you don't provide :shutdown process/destroy

1
borkdude14:09:34

There is also process/exec which does an exec call, but I don't think this is what you are after right?

👍 1
borkdude14:09:54

exec replaces the bb process with another process

bcaccinolo15:09:42

it might be what I need. The idea would be to have a kind of launcher to run and stop some programs.

Crispin02:09:52

not sure what you are doing, or if this applies, but detaching the process from the spawning process so that it continues to run in the background is "daemonizing" it. You can see the general approach outlined here http://www.microhowto.info/howto/cause_a_process_to_become_a_daemon.html and with an example (albeit in C) here http://www.microhowto.info/howto/cause_a_process_to_become_a_daemon_in_c.html

cap10morgan18:09:57

Am I crazy or do I recall seeing somewhere that babashka embeds a fork of core.async? Or maybe used to?

borkdude19:09:55

I think you answered your own question here? https://github.com/babashka/babashka/issues/1370

cap10morgan19:09:33

haha, perhaps. I was still curious if that were the reason why.

cap10morgan19:09:00

since it looked like the latest release of upstream core.async was a dependency of babashka's

borkdude19:09:23

dependency doesn't automatically imply it's available in bb :)

cap10morgan19:09:50

I'll see if I can work up a PR to fix that issue