This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (3)
- # announcements (29)
- # babashka (99)
- # beginners (30)
- # calva (46)
- # cider (9)
- # clara (1)
- # cljsrn (4)
- # clojars (10)
- # clojure (41)
- # clojure-dev (4)
- # clojure-europe (45)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-uk (5)
- # clojurescript (61)
- # community-development (11)
- # cursive (10)
- # data-science (1)
- # events (1)
- # fulcro (17)
- # graphql (1)
- # gratitude (1)
- # holy-lambda (1)
- # jobs (4)
- # jobs-discuss (5)
- # meander (22)
- # off-topic (50)
- # pedestal (3)
- # re-frame (3)
- # reagent (3)
- # reitit (82)
- # releases (2)
- # rewrite-clj (14)
- # shadow-cljs (3)
- # spacemacs (14)
- # tools-deps (7)
- # xtdb (33)
Would a PR adding
clojure.core.memoize`` to Babashka be of interest? Found myself needing it a couple of times now, and been manually copy-pasting the code to my projects so far
I meant, you're welcome to create a Github Discussion for this, so we can discuss and see if more people are interested
babashka v0.6.4 - a fast starting Clojure scripting environment https://github.com/babashka/babashka/blob/master/CHANGELOG.md#063 • Add `java.security.Provider` and `java.security.Security`. This adds compatibility with https://github.com/clj-commons/digest. • Fix mapping for `babashka.fs/unzip` https://github.com/babashka/babashka/issues/1030 • Pods: support metadata in pod vars, like docstrings (https://github.com/quoll) • babashka.curl: support `:follow-redirects false` (https://github.com/sudorock) • Add support for `--init` as a file to be loaded before evaluation actions https://github.com/babashka/babashka/issues/1033 (https://github.com/bobisageek) • Bump rewrite-clj to v1.0.699-alpha (https://github.com/yannvanhalewyn) • Fix `BABASHKA_FEATURE_POSTGRESQL` feature flag, initialize `java.sql.SQLException` build time https://github.com/babashka/babashka/issues/1040 • Deps.clj: upgrade to tools version `220.127.116.118` and include new `DEPS_CLJ_TOOLS_VERSION` environment variable to use older or newer tools jar.
Note that there is a pod for datalevin, if you're looking for a light-weight datalog-database with babashka
I'm thinking how much babashka would shrink by the compilation with new release of GraalVM native-image. For most users this is not important, but for me is 😄 Lower binary size = lower AWS Lambda cold start
I have posted this before in the #graalvm channel: it shrinks with about 10mb but this 10mb is regained once you upgrade to java 17
btw lower binary size doesn't mean faster start of the binary on my local machine. why does this matter for lambda?
Because, before the code is executed for the first time it has to be downloaded from s3, then unpacked 😄
That's why I once told you the cold start for babashka is much higher than for native-compiled binary for hello world example 😄
It's nothing wrong with the bb itself 😄 It's just the architecture of AWS Lambda.
I don't think it will be a very significant difference either way, it's not more than 10-15% or so
Maybe some #nbb users would like it, but frankly I used pulumi only once (same for aws-cdk) (to only show it's possible to integrate it with HL), so I dunno how much this is important.
you can use the pulumi nodejs library directly in nbb, no compilation required, which could be useful for this kind of scripting stuff
> which means you can now develop lambdas on M1 Hmm, don't you need graalvm m1 support for this?
> Hmm, don't you need graalvm m1 support for this? Nope. 😄 GraalVM native-image already supports AMD64 linux. AWS Lambda now also support ARM64 (This is new. Like few weeks old).
The reason M1 users were having troubles with using HL is because docker emulation is extremely slow when on M1 when using AMD64 docker images.
When I created HL, there was no ARM64 support for AWS Lambda, and using the emulation was the only choice.
oh so using arm64 docker images is faster on m1 than using amd64 images - is this what you mean?
It's not only faster, but also it works. Using AMD64 docker image with GraalVM on M1 tend to hang indefinitely.
The new release also makes it possible to run babashka on ARM64 AWS Lambda. This is 100ms improvement in cold starts for simple hello world programs.
nice! btw, it is possible to trim down babashka using feature flags. there is one feature flag called
BABASHKA_LEAN which leaves out most libraries, java.time, etc.
The problem with trimming it down is that you can never know what libraries one finds essential. I would have to release bunch of runtimes on AWS serverlessrepo. This is painful to mantain.
When you want to optimize and put in the time, that is when you go Clojure native with GraalVM I think
Exactly! Btw you can use https://github.com/FieryCod/holy-lambda/tree/master/modules/holy-lambda-babashka-layer to create a serverlessrepo of nbb layer 🙂
I want to experiment more with this myself, but my fear about AWS is that I will do something foolish which will empty my creditcard and make me go bankrupt
See also here: https://serverlessrepo.aws.amazon.com/applications. Query for holy-lambda. All that has to be done on AWS console is to click "publish" on the pushed layer (for the first time). cc @U6N4HSMFW @U06QSF3BK
Hah. I can relate. I was afraid of this as well. You can set a cloudwatch rule when you cross some hard limit like (1$).
The thing is that for AWS Lambda it's hard cross the free tier limit when doing either development or testing.
There is AWS budget or something like this, so you can specify a hard limit AFAIK.
and earn more money by making lambda attractive and get more users for the other services?
hmm, what if you exposed your lambda via a route and it would get DDOS-ed? this could still cost you a lot of money I guess
1. All the services are protected via AWS Shield at no charge: https://aws.amazon.com/shield/ 2. Actually AWS Lambda is cheap, and most of the serverless solutions are cheap for low usage. The biggest bill you will is by using VPC Gateway for private subnets (if you're using it). What AWS wants is to make you use only AWS, hence lifetime free tiers :D
ah neat, I had seen Luke's Pulumi cljs wrapper (https://github.com/modern-energy/pulumi-cljs) , but somehow missed the connection to nbb (nbb might not have existed that time)
I haven't used Pulumi myself but this colleague of mine, Kari, has used and I think Pulumi is valid and neat tech, just that I tend to prefer Terraform :)
@U04V15CAJ I think you can try HL with Datalevin + Elastic Storage. :D you would not have to learn the dynamodb :)
@UJ1339K2B do you mean: does babashka support a web server that can serve a ring handler?
hell yeah it does :) https://github.com/kloimhardt/babashka-scittle-guestbook
Cool. Tomorrow I will release an adapter between ring and HL. It's already used by Retailic, I have just polished it more. So you can develop locally on babashka with the ring handlers and HTTP-kit and deploy it on AWS Lambda with the single command ;D
I’m also transforming real world example from polylith to AWS Lambda + Polylith. The main change is just bb.edn and reflection configs for native backend. Everything else stays mostly the same. This is extremely cool, since at any point of time you can transition back to servers if you don't like AWS Lambda.