This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-28
Channels
- # announcements (1)
- # aws (1)
- # babashka (41)
- # beginners (21)
- # biff (7)
- # calva (102)
- # cider (8)
- # cljs-dev (1)
- # clojure (8)
- # clojure-bay-area (2)
- # clojure-dev (30)
- # clojure-europe (40)
- # clojure-norway (52)
- # clojure-sweden (9)
- # clojure-uk (5)
- # clojurescript (15)
- # cursive (7)
- # data-science (1)
- # datomic (23)
- # events (1)
- # fulcro (9)
- # humbleui (23)
- # hyperfiddle (46)
- # introduce-yourself (1)
- # jackdaw (2)
- # jobs (2)
- # london-clojurians (1)
- # malli (13)
- # off-topic (8)
- # re-frame (36)
- # remote-jobs (1)
- # shadow-cljs (4)
- # specter (4)
- # squint (1)
- # transit (4)
- # vim (1)
you can add :raw-args [...]
and add any curl arguments you want:
https://www.cyberciti.biz/faq/how-to-curl-ignore-ssl-certificate-warnings-command-option/
I recommend using babashka.http-client in most cases though, it's also possible with that one
When using insecure endpoint and wanting to post multipart forms, what library would you suggest using?
I have had something strange happen - I was using http-kit to do a multipart form post - It was all working fine and had been for sometime. A couple of days ago I started getting stray 503 errors, but when I changed the code to use the client you suggested the issue went away.
How to rename a symbol in emacs (cider)?
I get the following message when starting cider:
The refactor-nrepl middleware requires clojure 1.8.0 (or newer)WARNING: No Clojure project was detected.
The clj-rename doesn't work.
I'm not sure if renaming works in babashka nrepl but you could also try to load your project in a normal clojure REPL. bb print-deps
prints a deps.edn
Yeah refactor-nrepl most likely doesn't work with bb. Use a vanilla repl connection, or clojure-lsp
What is a vanilla repl connection @U45T93RA6?
clojure-lsp did work. Are there potential advantages to using the repl instead?
clojure-lsp can be used for refactorings such as renaming, a REPL can be used for evaluating code, they can co-exist and sometimes overlap in features
in this context we probably mean the repl as a means of code intelligence, e.g. cider-nrepl+refactor-nrepl vs clojure-lsp renaming works reasonably well with refactor-nrepl, but clojure-lsp does it just as well, and mostly better there are things that objetively are better done with "repl" tech - it can be faster and more accurate. But the opposite can also be true, lsp can be faster and more accurate for other features
Is there a way, when using babashka.cli
and the :spec
keyword to be able to generate a nice help output, to get it to handle positional args? In a non-spec definition I do it with :args->opts
, but I can't see anything in the docs about how to do the equivalent of that with :spec
, and using :args->opts
in the same options map works for the actual functioning of the cli parser, but not for the help output
I don't think the help output with format-opts
supports any positional arguments at the moment
My use case is a script that adds some value to a stack. It's big enough that using list if not an option (and apparently transient are not seq-able so I can't iterate on them either so that's a no go). Does that make sense ? 😅 I'm maybe missing a better clojure-based solution I need a mutable data-structure that can be used as a stack (push/pop) and that I can iterate on ~
If my understanding is correct, clojure list
use a value, than pointer to the next value. Which means I would use an extra 8 bytes per item in my list so, not great overhead-wise 😕 (the more I read myself the more I feel like maybe using clojure/babashka here is not the right tool ...)
Are you able to build babashka locally? You can add the class to babashka.impl.classes
and see if that works for you. I'd have to check if it adds much binary size to bb and then consider if it's worth doing
I've never done it but I'll try! At least that way I can test changes if I ever need to do any ~
it's a matter of downloading Oracle GraalVM 21, setting GRAALVM_HOME
to it, then run script/uberjar && script/compile
You also need to clone babashka with the recursive option (for submodules)
how many items are going to be in this stack?
I don't numbers to give you (I'll try later today) but probably one to several gigabytes
Maybe a ByteBuffer would be a better data structure to work with such a giant heap of data?
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/ByteBuffer.html
I probably could use it by using special characters as "stops" between items inside it but it seems very overkill. Nice to know about it though! Yeah I need something that can be used as a stack but preferably doesn't allocate a pointer for each item since memory is already a bit of a stretch ~.