Fork me on GitHub
#babashka
<
2020-02-24
>
sogaiu09:02:15

had a use for clojure.data.csv today πŸ™‚ thanks for including it!

borkdude09:02:55

ah good to hear!

borkdude10:02:54

First result of testing with hato on JDK11 wasn't successful: https://github.com/borkdude/babashka/issues/220#issuecomment-590244660 Will take a look later to see what's causing the problem

borkdude10:02:32

if someone wants to help with this, feel free! there is a hato-jdk11 branch

borkdude10:02:00

what I usually do is cut out parts of the library until it works and then add parts back

borkdude10:02:54

ah I guess the stuff in middleware.clj is using dynamic requires and resolve, this is usually the culprit - I'll make a fork

borkdude10:02:57

yup, that's it:

$ ./bb "(require '[hato.client :as hc]) (-> (hc/get \"\") :body (subs 0 20))"
"\n<!--"

borkdude10:02:04

ok, pushed the hato-jdk11 branch where the above example now works

sogaiu10:02:27

worked here on linux:

$ ./bb "(require '[hato.client :as hc]) (-> (hc/get \"\") :body (subs 0 20))"
"\n<!--"

borkdude10:02:06

@sogaiu Cool! I do get some CircleCI failures for this branch on linux: https://circleci.com/gh/borkdude/babashka/4474?utm_campaign=vcs-integration-link&amp;utm_medium=referral&amp;utm_source=github-build-link but happy to hear it's working locally for you. I've made a patch to clojure.lang.Reflector for JDK11 but it seems that isn't overriding the built-in Clojure one for the linux build on CircleCI. The macOS one does work πŸ˜•

borkdude10:02:24

oh wait, it's simply an out of memory there

sogaiu10:02:10

is that what 137 means?

sogaiu10:02:29

fwiw, i used graal 19.3.x

borkdude10:02:17

ah, the jdk11 one right?

borkdude10:02:33

ok, that's good.

borkdude10:02:32

I might have to move the build to Github actions for JDK11, keep getting out of memory errors on Circle.... πŸ˜•

mkvlr10:02:43

does that support windows as well?

mkvlr10:02:09

we’re still brewing Nextjournal CI but would love to have you as a beta tester

mkvlr10:02:51

maybe something we can chat about saturday

borkdude10:02:52

I'd love to! yes, I also need Windows for babashka, but I'm not running that on Circle now anyway.

mkvlr11:02:52

ok, that’s good. Windows support might be a bigger task. How are you doing windows builds?

borkdude11:02:26

appveyor, but github actions also supports them, so if appveyor won't work for jdk11 I've still got one other option

borkdude11:02:39

I would need macOS builds too btw

borkdude11:02:47

that's now built on CircleCI

hobosarefriends10:02:06

Since I know very little about the topic, how hard would you guys think it would be to find a way to make a bb script into a native binary (through graal)? The purpose being allowing someone else to run the script without having bb installed

borkdude10:02:48

@hobosarefriends In that case I think you just want to compile your own GraalVM binary from Clojure code, without bb

borkdude10:02:41

but note that you will have to compile separately for macOS, linux and Windows to cater to different users

hobosarefriends10:02:17

yeah, I wanted to skip the "turning it into a clojure project" step.

hobosarefriends10:02:12

but yeah that makes sense, I'm gonna learn the normal way and then see if I can make something to skip that step.

hobosarefriends10:02:31

(even if it probably is just copy-pasting and renaming aliasing some namespaces)

borkdude10:02:36

@hobosarefriends I find jet to be the simplest example of my projects how to do graalvm

hobosarefriends10:02:53

Oh great tip, I'll look into that!

borkdude10:02:19

btw, I screwed up an xmx flag, this was the reason for the out of memory error on circle

borkdude12:02:28

it still goes out of memory though

jeroenvandijk13:02:52

Has someone already been frustrated enough to build a Github Actions workflow script in Babashka?

jeroenvandijk13:02:34

I'm almost there πŸ™ˆ

sogaiu23:02:55

i wonder how much of 4clojure works with babashka

sogaiu06:02:09

thanks for that -- i think i have another use for that too πŸ™‚

borkdude08:02:33

if something doesn't work, feel free to post issues -- we will do our best to fix it if possible