Fork me on GitHub
#babashka
<
2021-07-20
>
martinklepsch10:07:32

@borkdude is there a link for that already?

martinklepsch10:07:50

super eager to play around with those more, seems really handy

grazfather15:07:46

By my math it’s in about 2 hours?

borkdude15:07:59

2 hours and 17 minutes

grazfather18:07:05

I had to duck out near the end but it was good!

grazfather18:07:26

and yes the p after coffeep was indeed because i was comparing it to a non-parallel version

borkdude18:07:39

thanks for attending

grazfather18:07:54

I learned some new things

borkdude20:07:48

Here are the slides: https://twitter.com/borkdude/status/1417562502985101321 Youtube video will probably be up tomorrow

borkdude22:07:10

@deleted-user (first (split-ext f))?

borkdude22:07:06

is base-name the posix term for this?

borkdude22:07:58

if I wanted to remove the .md extension, I'd probably write (str/replace s #"\.md$" "") ;)

borkdude22:07:28

we could perhaps name this function remove-ext or so.

borkdude22:07:39

I'll think about it some more, it's too late for me now :)

borkdude22:07:37

(map #(first (split-ext %)) ...) would probably also work in the majority of cases

borkdude22:07:59

it's probably better to open an issue or discussion first to see what are the use cases for such a function

borkdude22:07:14

and then record the arguments there first

borkdude22:07:26

and see how it composes with the rest

borkdude22:07:40

I'm not against including new functions, but taking on new functions also means maintaining them forever, so I'd like to first see some thinking before coding

borkdude22:07:32

and having such an issue open also means other people over time can post feedback on it

borkdude22:07:35

and give it some time

borkdude22:07:58

btw, raynes/fs calls this function basename, which I found confusing since some other libs had this function and stripped the extension.

borkdude22:07:29

but I now see that raynes/fs has an option to strip the extension. which we could also do in file-name

borkdude22:07:12

ok, good to record the conversation in an issue

lukasz22:07:36

I almost opened a PR for this (it was adding an option to strip a suffix) but realized that fs/file-name and fs/extension basically give you all the building blocks. After reviewing the code and how we use babashka.fs in majority of the cases we wanted to full name (as in: with extension), so I dropped it.

lukasz14:07:22

Looks like @borkdude already did :-)

lukasz14:07:09

I will follow up there too with some additional comments :thumbsup:

partywombat 2