Fork me on GitHub
#babashka
<
2021-09-23
>
grzm05:09:18

I see java.util.stream.BaseStream in babashka.impl.classes (https://github.com/babashka/babashka/blob/master/src/babashka/impl/classes.clj#L438-L439) but am not seeing it available:

% bb --version
babashka v0.6.1
% bb -e "(import 'java.util.stream.BaseStream)"
----- Error --------------------------------------------------------------------
Type:     java.lang.Exception
Message:  Unable to resolve classname: java.util.stream.BaseStream
Location: <expr>:1:1

----- Context ------------------------------------------------------------------
1: (import 'java.util.stream.BaseStream)
   ^--- Unable to resolve classname: java.util.stream.BaseStream

----- Stack trace --------------------------------------------------------------
user - <expr>:1:1

grzm05:09:02

Does it need to be included in babashka.impl.classes/classes as well?

grzm05:09:44

(Too tired to rebuild babashka tonight/this morning. I’ll try later today).

donavan08:09:15

Is there a way to use babashka/fs to delete a non empty directory without using fs/delete-tree ?

borkdude08:09:01

why not use fs/delete-tree?

donavan09:09:36

Sorry for the question; I thought it was slow because it was deleting every file in the tree one by one but now I realise it’s slow because there is a nested node_modules folder… it’s as fast as rm -rf

borkdude13:09:32

FYI: there is a #babashka-sci-dev channel for discussion dev related stuff of bb and sci itself. The channel used to be private but there is no reason for the channel to be private. So I created another one which is public.

wilkerlucio17:09:51

I remember babashka has a way to declare a dependency to load at runtime, but can’t remember how, can someone bring an example?

borkdude17:09:00

@wilkerlucio babashka.deps/add-deps accepts a deps.edn map

👍 1
🙏 1
Ben Sless19:09:17

Interesting mention of Babashka here https://tonsky.me/blog/python-build/

borkdude19:09:34

Unfortunately he doesn't seem to be aware of babashka.fs

😭 1
Ben Sless19:09:03

Maybe he is and it didn't meet his needs. Could be worth to get a user report from him

borkdude19:09:02

OK, reached out on Twitter.

borkdude19:09:54

But I guess it's hard competing against Python in this environment: > JetBrains isn’t known for its love for Clojure, and other people who wanted to participate would have to learn it

Ben Sless19:09:18

> I’d probably try it again in when it matures and when the rest of the code will already be in a Clojure. Then it’ll be a match made in Heaven. I think he wants it to work

albert.lai05:09:47

i think getting user report from him is really valuable. He mentioned having difficulty with fs, and process. i think the babashka process handling is quite joyful to use. really want to know what's the gap in between.

borkdude07:09:28

I’ve already talked to him. Many functions he implemented himself were already in fs and he was in a hurry. I can’t help someone who doesn’t reach out with feedback unfortunately

Quest23:09:45

Quick question -- is there a way to callout to code inside of file listed in :paths during Babashka :tasks? I want to call foo (service.make/foo), but I have to set tasks :init (load-file "scripts/service/make.clj") to get this working

Bob B01:09:31

If I'm understanding the question, you can use :requires assuming that src/foo.clj exists with (ns foo) and a make-service function:

{:paths ["src"] 
 :tasks {:requires ([foo])
         foo (foo/make-service)}}

Bob B01:09:26

there is also a mechanism to provide requires for a specific task: https://book.babashka.org/#_task_local_options

👍 1
Quest05:09:27

The :require is exactly like what I'm looking for -- thank you!