clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
dharrigan 2021-05-05T05:21:30.077500Z

Good Morning!

djm 2021-05-05T05:27:40.077700Z

👋

slipset 2021-05-05T06:02:31.078400Z

Almost snowing here in Oslo this morning.

😱 1
anthony-galea 2021-05-05T06:39:03.078800Z

morning

ordnungswidrig 2021-05-05T07:08:11.079Z

Good morning.

jasonbell 2021-05-05T07:29:20.079400Z

Morning

2021-05-05T07:41:36.079600Z

Morning

borkdude 2021-05-05T07:45:45.079800Z

Morning

orestis 2021-05-05T08:03:42.080Z

Morning!

orestis 2021-05-05T08:05:00.081300Z

I have a bunch of very very common project-related command lines that I run all the time. Things like start a remote REPL etc etc. I don't want to commit those to git because they're relevant only to my setup. Is this something that babashka tasks would be useful somehow?

borkdude 2021-05-05T08:06:04.081900Z

@orestis babashka tasks is more like a replacement for makefiles than let's say global bash aliases

borkdude 2021-05-05T08:06:15.082200Z

maybe you just need that, a global bash alias

orestis 2021-05-05T08:06:32.082600Z

I use fish but yeah, global aliases make sense.

borkdude 2021-05-05T08:06:49.082900Z

I use the term "bash" in the broadest sense possible

😂 3
orestis 2021-05-05T08:07:22.083500Z

My laziness (and part of the reason I use fish) will still probably hit up arrow 10 times 😄

slipset 2021-05-05T08:08:05.084Z

C-r might just be your friend, as could !start-of-command

borkdude 2021-05-05T08:08:34.084600Z

Maybe babashka tasks could also support global tasks :thinking_face:

slipset 2021-05-05T08:08:59.085200Z

bash has implemented readline which can be set to understand Emacs or Vi bindings, and in emacs, C-r is incremental search backwards.

slipset 2021-05-05T08:09:14.085500Z

Not sure about fish, though.

slipset 2021-05-05T08:10:08.086200Z

The ways in which you can search/manipulate the command line is quite interesting.

orestis 2021-05-05T08:11:19.088400Z

Fish allows you to type the start of the command and press up arrow.

mdallastella 2021-05-05T08:11:49.089500Z

On fish you write some characters and then you can: use C-r for search backwards or simply press the up arrow.

borkdude 2021-05-05T08:11:56.089700Z

I have thought about global bb tasks, but the problem there might be: - bb tasks are now project/directory specific and they can depend on each other like in make - if we could merge tasks from the home directory, this could result in a weird mix of global and local dependencies? and broken tasks in CI if you forget that something is coming from your home dir?

borkdude 2021-05-05T08:12:55.090Z

this is why a shell alias probably makes most sense?

borkdude 2021-05-05T08:13:01.090200Z

or just a script in your bin dir

orestis 2021-05-05T08:14:17.091200Z

Can I point bb to a specific tasks file? Or does it always default to the working directory? I could think of a global alias that invokes bb tasks on my home dir.

orestis 2021-05-05T08:14:37.091800Z

I like bb tasks mainly for the memory help: afaik, if you invoke it with no args it will show you the available tasks.

borkdude 2021-05-05T08:46:38.092300Z

@orestis You can with BABASHKA_EDN=other/bb.edn bb foo

borkdude 2021-05-05T08:46:47.092500Z

(I used this mostly for testing)

borkdude 2021-05-05T08:48:59.093100Z

Maybe I should just allow bb global tasks and if people depend on their home tasks in a project, they should just deal with it themselves?

thomas 2021-05-05T08:49:55.093400Z

morning

borkdude 2021-05-05T08:57:12.093800Z

@orestis Let me experiment with global tasks. Are you willing to test a version when I have one?

raymcdermott 2021-05-05T09:12:11.094200Z

morning

raymcdermott 2021-05-05T09:14:26.096300Z

I considered using babashka tasks for building cljs and running a clj server but in the end clj -A:build-client && clj -A:serve is simpler ... is there a 5 task rule?

borkdude 2021-05-05T09:18:00.099600Z

One of the points of tasks is that clj -A:build-client && clj -A:serve is something you have to remember. With bb tasks you get an overview of tasks + descriptions. So after a month or two when you come back to this project, you see:

$ bb tasks
The following tasks are available:

serve Builds CLJS sources and launches server
instead of reading through your deps.edn trying to find out what are the valid combinations of aliases, main fns and exec fns. For this reason people often make Makefiles or shell scripts, but now you can do it with bb as well.

😍 2
borkdude 2021-05-05T09:28:07.101200Z

btw @raymcdermott the #defnpodcast is really picking up steam again, I'm happy to see this

raymcdermott 2021-05-05T09:34:09.101300Z

Thanks @borkdude - New episode today too!

1
borkdude 2021-05-05T09:34:23.101600Z

(yeah, that's what triggered me to say this :))

😂 1
borkdude 2021-05-05T09:34:43.101900Z

Really a big fan. Please share to #podcasts too

orestis 2021-05-05T10:46:45.103500Z

@borkdude wow I didn't expect this to turn into a proper project for you! I have to confess I don't even have babashka installed ATM 🙂 I'm keeping my eye on it and continuously assessing the various usefulness, but sitting down and a) making it required installation for devs and CI and b) actually going through our existing bash scripts to convert them isn't high on my priorities right now.

orestis 2021-05-05T10:47:52.104900Z

As far as my original question was, pointing to a dedicated bb.edn file is exactly what I want. I can then deal with the fallout myself e.g. if I need to use local directories or relative to the bb.edn file etc I can do that...

borkdude 2021-05-05T10:48:51.105400Z

Sorry for pulling you into the #babashka channel btw, feel free to leave, I won't be offended in any way ;)

orestis 2021-05-05T11:39:19.105600Z

No worries 🙂