This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-09
Channels
- # announcements (4)
- # babashka (25)
- # beginners (11)
- # calva (32)
- # clj-kondo (5)
- # clojure (130)
- # clojure-dev (11)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (96)
- # clojure-spec (1)
- # clojure-uk (3)
- # clojurescript (9)
- # conjure (2)
- # cursive (8)
- # datalevin (1)
- # etaoin (14)
- # ghostwheel (2)
- # hyperfiddle (13)
- # joker (2)
- # leiningen (82)
- # malli (3)
- # pathom (4)
- # polylith (12)
- # releases (3)
- # spacemacs (7)
- # sql (3)
I am really enjoying bb + clomacs via this repo earlier in thread: https://github.com/davidpham87/prelude/tree/master/personal/clomacs . Wanted to check if feasible to modify this to get to work with nbb? thanks in advance
I guess yeah or other users if any of this workflow: https://clojurians.slack.com/archives/CLX41ASCS/p1635238134027600
I am not the maintainer of clomacs haha. I guess, does nbb provide an NREPL as well?
Well, it should be feasible then. As clomacs use cider to communicate with bb
yeah seems same:
% nbb --help | grep nrepl
nrepl-server: start nrepl server. [1,2]
% bb --help | grep nrepl
nrepl-server [addr] Start nREPL server. Address defaults to localhost:1667.
i’ll try at some point, s/bb/nbb and see what happensOtherwise you could pipe the result and the call to nbb using bb as intermediary :rolling_on_the_floor_laughing:
seems like nbb
doesn’t take a -f
as bb
does to bootstrap from cloamcs’ init.clj
, I assume this is unlikely to change, correct @U04V15CAJ?
% bb --help | grep '\-f'
-f, --file Run file
print-deps [--format ]: prints a deps.edn map or classpath
% nbb --help | grep '\-f'
@U5Y86G3KL not sure what you mean by this
https://github.com/davidpham87/prelude/tree/master/personal/clomacs#clomacs also looks like need to translate all the java bits here to node equivalent, prob a little more work than I’m able to do atm 😅
(cl-defun bbmacs-bb-process
(&optional (dir bbmacs-clomacs-dir) (port bbmacs-port))
(let ((default-directory dir)
(port (number-to-string port)))
(make-process
:name "bbmacs-nrepl"
:buffer (concat "*bbmacs-nrepl" port "*")
:command `("bb" "-f" "init.clj" ,port))))
you can programmatically start an nrepl server from bb and nbb, there is no need to shell out like that (anymore)
anyway I'd take it up with the clomacs project probably. if they have any questions about bb or nbb, let me know
I encountered that babashka/http-client passes the Authorization-header on when following a (cross origin) redirect.
Specific case was GET-ing an artifact via the github-api that redirected to host *.
which responded with a 4XX because of the Authorization-header. Doing a HEAD, extract the Location and do a separate non-auth request worked.
Searching a bit but can’t find anything that might instruct http://java.net.http.HttpClient to do it differently.
I'm not sure if #C04J0N76E2G does anything special regarding this, might just be underlying behavior.
> I’m not sure if #C04J0N76E2G does anything special regarding this, might just be underlying behavior. (Sorry, missed the separate channel). I’m afraid it is indeed baked in.
FWIW https://github.com/dotnet/runtime/issues/26475#issuecomment-432878482 where they mention removing these headers on redirect as security fix in 2018.