This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-03
Channels
- # announcements (2)
- # asami (1)
- # babashka (32)
- # beginners (125)
- # calva (4)
- # cider (1)
- # clj-kondo (16)
- # clj-together (1)
- # cljs-dev (15)
- # clojure (30)
- # clojure-australia (3)
- # clojure-europe (41)
- # clojure-italy (1)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-spec (68)
- # clojure-uk (28)
- # clojurescript (36)
- # conjure (2)
- # cryogen (1)
- # cursive (2)
- # data-science (2)
- # datascript (2)
- # datomic (70)
- # events (2)
- # fulcro (11)
- # graalvm (1)
- # jobs (4)
- # kaocha (4)
- # leiningen (4)
- # malli (52)
- # meander (21)
- # off-topic (11)
- # pathom (7)
- # pedestal (17)
- # reagent (23)
- # reitit (5)
- # remote-jobs (5)
- # reveal (7)
- # shadow-cljs (24)
- # spacemacs (36)
- # sql (21)
- # vim (18)
- # xtdb (7)
@lukaszkorecki I can add it if you want, it takes about 80kb extra. Can you explain the use case a bit?
Btw, I now fixed this example on master:
$ ./bb -e "(take 4 (iterator-seq (.iterator (.doubles (java.util.Random.)))))"
(0.11018020853952415 0.8538439232524406 0.24374736204535452 0.975224420988415)
@borkdude I have reimplemented RabbitMQ's password hashing algo, at one point it requires 4 bytes of a random salt, so out of habit I always reach for SecureRandom but in this case good old j.u.Random
will suffice. I guess it comes from the fact that MessageDigest is included. Babashka/SCI is so good I keep forgetting it's not "full" Clojure :-)
I suppose if it only adds 80kb, it would be worth including, since it adds that "parity" to MessageDigest
MessageDigest is included to calculate sha-256 hashes, etc, which is quite common in scripting
It doesn't really, apart from both being a part of java.security.
package. It only came up in my use case - I needed both, being used to having both in regular Clojure and implementing various cryptography stuff (which I'm surprised how much I had to do this year :thinking_face: )
fwiw, this entire library works with bb: https://github.com/clojure/data.generators
yeah, could work. Again: it's not incredibly painful to not have SecureRandom, I naively assumed it's already in BB
no problem. if the need arises I would add it, if it would enable access to some interesting library for example
btw, @lukaszkorecki are you still considering writing an AWS pod? I noticed https://github.com/BrunoBonacci/graalvm-clojure/tree/master/amazonica-s3 is graal compatible. Together with the new support for transit in pods it might feasible, maybe using some code generation.
Good timing - I have just kicked off the work which will involve this. At this point I'm considering using babashka.process
and AWS CLI v2 as we are using AWS SSO for credentials, and none of the AWS SDKs (Java, Go etc) support that right now. Also, that gives access to all AWS services in a programatic way - my understanding is that with amazonica and the AWS SDK we had to pick and choose what gets included when compiling using native-image, right?
That's correct. The way I usually accomplish this is by putting stuff in a map and looking it up dynamically. This ensures GraalVM will hold on to it. https://github.com/babashka/pod-babashka-lanterna/blob/main/src/pod/babashka/lanterna.clj#L106
So yeah, going with aws cli might be more flexible since services you might need to interact with might not be known (we need ECS, S3, SecretsManager, SSM and couple of more, some people might need S3 and DynamoDB only etc).
The good thing is that the CLI is somewhat structured in the way you call it, so I think it can have a sane API in Clojure in terms of the interface. Something like (aws :ec2 :describe-instances {:instance-ids ["a" "b"] })
We will see.
By the way - the post about monitoring ECS with babashka will be published soon :-)
@lukaszkorecki :-) Here's an example of a lib that shells out to psql: https://github.com/borkdude/babashka/blob/master/doc/libraries.md#clj-psql Might be cool to publish somewhere at some point.
I've heard that the AWS cli sometimes makes breaking changes, not sure how bad those are? Is that what you're referring to with v2?
Yep, I'm planning to open source our RMQ monitoring + Docker setup - all tooling is based on BB