This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-03
Channels
- # adventofcode (23)
- # announcements (2)
- # babashka (54)
- # babashka-sci-dev (2)
- # beginners (14)
- # biff (5)
- # calva (25)
- # cherry (9)
- # clj-kondo (4)
- # clojure-europe (2)
- # clojure-japan (2)
- # clojurescript (1)
- # data-science (6)
- # datascript (3)
- # datomic (1)
- # dev-tooling (25)
- # etaoin (5)
- # events (5)
- # hyperfiddle (1)
- # nbb (2)
- # off-topic (27)
- # shadow-cljs (1)
- # xtdb (7)
I'm planning to use babashka in one project. There is a good explanation of the initial setup for deps.edn
based development in this documentation: https://book.babashka.org/_/deps_clj.html
I was wondering if the example can be found in some git repo as well?
Well, actually no need. The documentation provides everything I need.
Good documentation, by the way. š
Hm. Except I'm a bit confused.
If I want to start babashka so that I can use its nrepl in development, and also some dependencies, like clj-http-lite
, do I create a bb.edn
file for my project or a deps.edn
file?
Ok. Thanks!
So, I don't need: https://github.com/borkdude/deps.clj
I was reading this: https://book.babashka.org/_/deps_clj.html
Probably I just misunderstood it.
ah I don't know how you ended up there... it's a very old version of the book :) These are the docs: https://book.babashka.org
My brother asked me to create an app for fetching some electricity information. I thought I do it using babashka, and write a blog post about this small project to promote this excellent tool. š
Should be a good use case :)
You can also use babashka.curl
as the built-in library. Also java.net.http
is supported
Ah. Ok. š
This will be fun! š
And I think I can use VSCode + Calva with babashka when developing the solution?
Let's try...
I remember that my last Babashka blog post even made it to Hacker News. Let's see if I can make it to Hacker News again. š
Actually you told me to see it in HN. š I was watching it with great interest. It climbed to position 11 but never made it to number one. š
I tried to remove that old document but now the whole docs aren't reachable... hopefully it will be fixed when the github cache is evicted...
I really have to read the excellent https://book.babashka.org/ book again before I publish the new blog post. To see that I really have understood everything properly.
ok, the book is back. I want to move to mkdocs-material at one point, Calva also has this, it looks nicer :)
Unbelievable. I'm going to be unemployed any day now.
I installed Github copilot a few days ago, and I was amazed how good suggestions it provides. But this is the first time I try it with Clojure. It practically wrote the function for me.
I'm so happy I have paid my mortgage and I managed to gather a nice stock portfolio. We programmers are all going to be unemployed in the near future. š
Sorry for the delay with the blog post. š I needed to visit my old parents and provide some help there. But I wrote the blog post now: https://www.karimarttila.fi/clojure/2022/12/04/using-babashka-to-get-electricity-prices.html @U04V15CAJ: If you want, you can read the blog post, and if there is some obvious misunderstanding or something like that, ping me here. š
@U76D9RZRR Reading it now. First of all, I think it's awesome you're writing this, it benefits other people to have resources like this. First issue:
{:paths ["src" "test"]
:deps {nrepl/nrepl {:mvn/version "1.0.0"}
cider/cider-nrepl {:mvn/version,"0.28.6"}}}
You don't need the nrepl dependencies, babashka has nrepl support built in and won't do anything with these depsMinor thing:
(Integer/parseInt hour)
You can now write this as (parse-long hour)
- parse-long was added in 1.11 and is also available in bb (given that you have a recent one of course)Ah! I update the solution and blog post regarding these issues! Thanks!
Maybe you could show how you ran this script in cron
- it might not be obvious to people how to run the script when not in a REPL
Good, point. I do it!
And finally, you could post it on social networks and #news-and-articles of course :)
Yep. I'll do it!
Heh. I promoted my new Blog post also in the Koodiklinikka slack / Clojure channel (Koodiklinikka slack is the community for Finnish programmers). One reader reacted immediately with this text (translation by Google, and I fix one lost-in-translation meaning): > Very cool. Now I got a really strong itch that this might be the gateway to the Clojure world I've been missing. > > I had thought that I would make the next small shell utilities for myself with Clojure instead of Python, but I didn't really figure out where to start.
It seems you got one more Babashka user. š
You can use that in advertizing: "Babashka is the gateway to the Clojure world!" š
I promised to help this new user in Koodiklinikka if he has any issues with Clojure or Babashka. Nice to see that Clojure and Babashka are getting more and more ground among programmers.
I'm doing a poll about the format of the babaskha documentation: ā¢ https://twitter.com/borkdude/status/1598983708417003522 ā¢ https://mastodon.social/@borkdude/109449232257239390