babashka

2026-05-08T18:58:27.590069Z

I feel like I'm going insane. I'm trying to write a oneliner with bb -e and from what I can tell, the output always ends in a newline. I don't want the newline. First: am I crazy? Second: is there a way to turn that off?

borkdude 2026-05-08T19:17:35.654899Z

Yes just use print instead of println

2026-05-08T19:23:04.994089Z

I'm not actually printing anywhere, the output is just whatever the oneliner evaluates to. Like for example: bb -e '5' outputs:

5
nl

2026-05-08T19:23:57.678599Z

Not literally nl, but you get the idea

2026-05-08T19:24:21.600789Z

Downstream sees a newline

borkdude 2026-05-08T19:40:33.055159Z

My suggestion is to actually explicitly print to change the printing behavior

2026-05-08T19:48:04.305759Z

I'll give that a try, thanks 👍🏻

2026-05-08T21:26:59.970759Z

Just reporting in that most of my problem was actually pebcak and has been resolved (classic, right?). Good to know that I can control printing explicitly, though

👍 1
borkdude 2026-05-08T21:27:49.943719Z

np

mauricio.szabo 2026-05-08T02:05:54.696999Z

Another question about Babashka: I might be doing this wrong, but I'm problems with stacktraces when I am running under nREPL I do a load-file (nREPL operation) to load my file, then I evaluate something, and I get back essentially only internal stuff - core.clj, protocols, sci stuff, but nothing on my source code.

mauricio.szabo 2026-05-12T15:48:55.251689Z

Pinging you just to be sure I'm not doing anything wrong 😄

borkdude 2026-05-12T16:05:18.422059Z

oh crap I hoped you would forget about it. j/k. would you mind filing an issue about this? then I can see what I can improve about it. it's true that the internal stacktrace is pretty useless. it also happens a lot with tests. a situation I've been trying to improve but it's hard

mauricio.szabo 2026-05-12T21:48:12.353129Z

No worries, I'll make a small code to reproduce things and fill an issue, thanks 👍

borkdude 2026-05-08T06:22:12.741069Z

Let me get back to you after bb conf and DCD if nobody else has