Fork me on GitHub
#babashka
<
2020-04-20
>
shem06:04:49

i'm getting clojure.lang.ExceptionInfo: Unable to resolve classname: java.util.Calendar [at clojure/instant.clj, line , column ] even though i'm not directly using that class. i'm using java.util.Date minimally but importing that makes no difference

shem06:04:48

ah, it was because I was in a clojure project dir and bb got confused with its classes

borkdude07:04:17

@shem babashka has the java.time API in favor of java.util.Calendar, although it still has java.util.Date for compatibility

borkdude07:04:39

@raydelalonsobaryolo I think you just need to post it as body: {:body (json/generate-string {:username ... })}

👍 1
borkdude09:04:58

@raydelalonsobaryolo I have added a :debug option now to babashka.curl so you can more easily find issues. https://github.com/borkdude/babashka.curl#debugging-requests This will end up in the next release of babashka as well.

3
raydel9516:04:11

@U04V15CAJ i have anorther question, I’m working with bb in osx and it works perfect, but yesterday i tried to run a bb in windows (intstalled with scoop) and babashka.curl gave an error with the path specifically clojure.lang.ExceptionInfo: The system cannot find the path specified [at C:\Users\rbary\OneDrive\Escritorio\raydel.clj, line 7, column 17] am I missing something? i’m just trying to do (curl/get )

borkdude16:04:10

@raydelalonsobaryolo Can you try creating C:\Temp?

borkdude16:04:30

This has to do with a bug in GraalVM 19.3.1 which is currently used.

raydel9516:04:49

you mean changing the path of the script?

borkdude16:04:47

no, I mean creating the directory C:\Temp on your machine.

borkdude16:04:55

and then run the same script

borkdude16:04:18

babashka.curl tries to write a temp-file but in GraalVM the path a the tmp-dir is hardcoded to C:\Temp in Windows

raydel9516:04:22

ohh ok, I’ll try it right away

borkdude16:04:11

cool. maybe this should be documented?

raydel9516:04:16

yes I think so, it’d save a lot of work

borkdude16:04:37

where would you expect this to be documented, in the babashka.curl repository?

raydel9516:04:53

I think babashka.curl

borkdude16:04:06

ok, I'll make a note there

👍 1
raydel9516:04:17

yesterday I end up installing babashka in wsl 😅

borkdude16:04:48

did it work? 😉

raydel9516:04:04

lol, it works perfect

borkdude14:04:06

Hi @grumplet! Enjoyed your talk at EuroClojure 2016 in Bratislava.

borkdude14:04:19

(you know, back when conferences were a thing)

grumplet14:04:41

Wow! - that goes back a way!

grumplet14:04:51

Loving all you work at the moment. I just checked in to see if anyone had a calva nrepl connection setup for babaskha. Just being lazy!

borkdude14:04:33

@pez might be able to help you with that. There are some docs about nREPL here: https://github.com/borkdude/babashka/blob/master/doc/repl.md#nrepl

grumplet14:04:29

Great, thanks. It looked like it might be configurable.

borkdude14:04:07

Then select "generic project" and enter "localhost:1667"

grumplet14:04:13

Aha. Trying it!

borkdude14:04:50

First start the nREPL server with bb --nrepl-server

grumplet14:04:06

Hmm.. Not sure. On entering (+ 1 1) in the repl - which did connect I do get 2, but the bb nrepl-server is complaining with this

grumplet14:04:13

`Mike:transplants gmp26$ bb --nrepl-server 1667 Started nREPL server at localhost:1667 For more info visit https://github.com/borkdude/babashka/blob/master/doc/repl.md#nrepl. #error { :cause Dangling meta character ‘+’ near index 0 + ^ :via [{:type java.util.regex.PatternSyntaxException :message Dangling meta character ‘+’ near index 0 + ^ :at [java.util.regex.Pattern error Pattern.java 1969]}] :trace [[java.util.regex.Pattern error Pattern.java 1969] [java.util.regex.Pattern sequence Pattern.java 2137] [java.util.regex.Pattern expr Pattern.java 2010] [java.util.regex.Pattern compile Pattern.java 1702] [java.util.regex.Pattern <init> Pattern.java 1352]`

grumplet14:04:30

babashka line numbers involved are

grumplet14:04:32

` [babashka.impl.nrepl_server$complete invokeStatic nrepl_server.clj 74] [babashka.impl.nrepl_server$session_loop invokeStatic nrepl_server.clj 132] [babashka.impl.nrepl_server$listen$fn__12768 invoke nrepl_server.clj 172]

borkdude14:04:11

hmm, weird. I see this:

$ bb --nrepl-server
Started nREPL server at localhost:1667
For more info visit .
and this:

grumplet14:04:41

Yes - the evaluation is happening fine inside Calva, but errors show in Calva output.

grumplet14:04:20

Sorry - Error was in the Calva Terminal not the output - and it’s no longer happening…

borkdude14:04:27

Ah, I start the nrepl-server not inside VSCode but in a separate terminal program. Does that help?

grumplet14:04:01

Thanks so much - looks really useful.

borkdude14:04:13

you're welcome