babashka-sci-dev

lispyclouds 2022-04-14T18:15:17.332749Z

continuing on the bash-free bb PR, any good suggestions on which step to pick the uberjar up for boostrapping the build? the current plan is to use the uberjar built with the current HEAD and use it for scripting, cc @cap10morgan

lispyclouds 2022-04-14T18:16:10.153839Z

i tried a persist to workspace in the jvm stage, still dont see the jar at the docker stage, something quite stupid im missing for sure

lispyclouds 2022-04-14T18:16:52.547659Z

also @borkdude we seem to be building jars at each of the native stages, we could save some time there too right?

borkdude 2022-04-14T18:17:46.307829Z

I think so yes

lispyclouds 2022-04-14T18:22:14.701609Z

reading some persist_to_workspace docs

lispyclouds 2022-04-14T18:23:30.242059Z

ah, dont have the attach_to_workspace

lispyclouds 2022-04-14T19:03:43.918049Z

this definitely looks nicer

borkdude 2022-04-14T19:05:30.161179Z

it looks nice but it will slow down the native builds with quite some time since the JVM tests take quite a bit of time

lispyclouds 2022-04-14T19:06:00.490699Z

ah, is it more than native ones?

borkdude 2022-04-14T19:06:21.586279Z

no, but now they can't run in parallel to the native builds

borkdude 2022-04-14T19:06:43.221809Z

so maybe it makes sense to split out the uberjar build

lispyclouds 2022-04-14T19:06:45.748289Z

yeah i could brach out more

lispyclouds 2022-04-14T19:06:49.441839Z

yes

borkdude 2022-04-14T19:07:10.301579Z

uberjar doesn't take that much time though

borkdude 2022-04-14T19:07:12.314939Z

does it?

lispyclouds 2022-04-14T19:07:48.012529Z

yeah not really this is more to check my persist to workspace threory faster πŸ˜›

lispyclouds 2022-04-14T19:08:22.012289Z

i will split the uberjar and the tests out once i narrow down the issue

lispyclouds 2022-04-14T19:15:02.205219Z

yeah doesnt look like is worth it for the head scratching to save about 1min

borkdude 2022-04-14T19:17:25.602489Z

oh it's 1 minute? more than I thought

lispyclouds 2022-04-14T19:18:14.197389Z

well 45s-1m avg

borkdude 2022-04-14T19:19:25.392779Z

might be worth it, but feel free to skip it

lispyclouds 2022-04-14T19:20:11.070109Z

yeah finer optimisations later, wanna make sure the script works

lispyclouds 2022-04-14T21:17:17.046949Z

@borkdude seems good to go for me: https://github.com/babashka/babashka/pull/1239 tested it with a full push

borkdude 2022-04-14T21:17:55.535609Z

what's a full push?

lispyclouds 2022-04-14T21:18:55.752179Z

saw if the latest and snapshots arrive in dockerhub

borkdude 2022-04-14T21:19:02.816399Z

ah nice

borkdude 2022-04-14T21:19:32.515489Z

so, > enabled: true was removed. what does that mean?

lispyclouds 2022-04-14T21:21:05.596029Z

from what i know its the older key to have a root user or something in the machine executors and we dont need it anymore

lispyclouds 2022-04-14T21:21:37.544779Z

my linter was telling me it doesnt need it in the spec and i had tried it without it before too

borkdude 2022-04-14T21:22:47.511919Z

circleci linter?

lispyclouds 2022-04-14T21:23:08.916519Z

yeah the YAML lsp i have knows the spec of the YAML im editing

borkdude 2022-04-14T21:23:12.304299Z

I placed one remark, other than that, seems good to me

borkdude 2022-04-14T21:24:41.424459Z

good riddance of that bash script, it was probably the most painful one ;)

lispyclouds 2022-04-14T21:24:43.514729Z

pushed

lispyclouds 2022-04-14T21:24:58.231459Z

yessss, personally painful to me

lispyclouds 2022-04-14T21:25:33.890699Z

will be poking the compile one too, bit tricky with the env vars

lispyclouds 2022-04-14T21:27:19.572099Z

im using https://github.com/redhat-developer/yaml-language-server fyi, understands most of the well known YAMLs

borkdude 2022-04-14T21:27:21.728439Z

hmm, with babashka.process/sh :inherit true doesn't work as intended.

(babashka.process/sh "ls -la" {:out :inherit :err :inherit})
But since you call check anyway, why not just use (babashka.process/process "ls -la" {:inherit true}) ?

borkdude 2022-04-14T21:27:49.899389Z

you don't even need to separate the string args :)

borkdude 2022-04-14T21:28:18.199969Z

you can, but it's optional

lispyclouds 2022-04-14T21:28:18.959979Z

yeah makes sense

borkdude 2022-04-14T21:28:44.458499Z

since there's a variable in the middle I see why you did that

borkdude 2022-04-14T21:29:00.667649Z

> hmm, with babashka.process/sh :inherit true doesn't work as intended. I'll make a bug report of this

lispyclouds 2022-04-14T21:29:31.865869Z

so should i keep it to {:out :inherit :err :inherit} ?

borkdude 2022-04-14T21:30:20.705769Z

yes

borkdude 2022-04-14T21:30:30.241219Z

or use process instead of sh

borkdude 2022-04-14T21:30:46.296689Z

sh is more for "get a string" since it resembles http://clojure.java.io/sh

lispyclouds 2022-04-14T21:31:17.551119Z

yeah have a habit of doing sh -> check for a while

borkdude 2022-04-14T21:31:19.226219Z

$ bb -e '(:out (babashka.process/sh "ls -la"))'
=> string

borkdude 2022-04-14T21:31:42.526939Z

ok, I recommend doing process + check then

lispyclouds 2022-04-14T21:32:22.474909Z

yeah this is what im keeping now:

(defn exec
  [cmd]
  (-> cmd
      (proc/process {:out :inherit :err :inherit})
      (proc/check)))

borkdude 2022-04-14T21:32:47.668139Z

or use (babashka.tasks/shell "ls") , that also works and is basically the same

lispyclouds 2022-04-14T21:33:06.236149Z

that is okay with a vec too?

borkdude 2022-04-14T21:33:18.623969Z

shell takes varargs strings

borkdude 2022-04-14T21:33:27.598589Z

and an optional first map options arg

borkdude 2022-04-14T21:33:55.664459Z

so (shell "tar xzvf" file)

lispyclouds 2022-04-14T21:33:56.070189Z

yeah i guess process+check is a bit verbose and make me remember it too πŸ˜›

borkdude 2022-04-14T21:34:03.104589Z

sure :)

lispyclouds 2022-04-14T21:34:46.859399Z

done

borkdude 2022-04-14T21:35:29.945919Z

merged

πŸ™ 1
πŸ™πŸΌ 1
lispyclouds 2022-04-14T21:35:45.446819Z

wanted to try out contajners too, but the buildx is a pain in it πŸ˜•

lispyclouds 2022-04-14T21:36:39.090059Z

more bash cleansing soon hopefully

borkdude 2022-04-14T21:36:45.366849Z

πŸ™Œ

borkdude 2022-04-14T21:37:45.646689Z

recently I spoke with someone who was concerned that babashka was becoming a de facto clojure project tool and that he couldn't run it on PPC (IBM something).

borkdude 2022-04-14T21:38:03.825859Z

I told him: you can always use the uberjar. That was enough to address that concern.

lispyclouds 2022-04-14T21:38:15.354599Z

wait til you get the it doesnt run in my emacs

lispyclouds 2022-04-14T21:40:46.403939Z

Every program attempts to expand until it can read mail run bb.

borkdude 2022-04-14T21:42:04.098779Z

What I meant was, like we're using the uberjar in our build now, it's great to have it as a fallback option when you can't run the binary for some reason

lispyclouds 2022-04-14T21:42:32.584339Z

yep! but always nice to take a poke at emacs πŸ˜‰

lispyclouds 2022-04-14T21:44:15.809319Z

interesting bit

It should also export a symbol named plugin_is_GPL_compatible to indicate that its code is released under the GPL or compatible license; Emacs will signal an error if your program tries to load modules that don’t export such a symbol. 

borkdude 2022-04-14T21:45:01.385199Z

is SCI incompatible with GPL?

lispyclouds 2022-04-14T21:45:32.608269Z

well AFAIK EPL and GPL has issues

lispyclouds 2022-04-14T21:46:48.998499Z

which version not sure, looking up

borkdude 2022-04-14T21:47:47.526629Z

I can probably release the dynamic module under the GPL, but does that also mean that libraries used in that module should all be GPL?

borkdude 2022-04-14T21:48:29.625529Z

Anyway, I haven't even started on that, but seemed like a nice thing to try out. Also a headache because of all the pointer stuff.

lispyclouds 2022-04-14T21:48:54.554869Z

from https://www.eclipse.org/legal/eplfaq.php

Are the Eclipse Public License (EPL) 1.0 and the General Public License (GPL) compatible?
The EPL 1.0 and the GPL are not compatible in any combination where the result would be considered either: (a) a "derivative work" (which The Eclipse Foundation interprets consistent with the definition of that term in the U.S. Copyright Act ) or (b) a work "based on" the GPL code, as that phrase is used in the GPLv2, GPLv3 or the GPL FAQ as applicable. Further, you may not combine EPL 1.0 and GPL code in any scenario where source code under those licenses are both the same source code module.

Based upon the position of the Free Software Foundation, you may not combine EPL 1.0 and GPL code in any scenario where linking exists between code made available under those licenses. The above applies to both GPL version 2 and GPL version 3.

borkdude 2022-04-14T21:49:47.711159Z

ok, fuck emacs then. hello neovim!

lispyclouds 2022-04-14T21:49:53.732359Z

heh

lispyclouds 2022-04-14T21:50:42.475599Z

there i think you just need to implement their msgpack rpc

lispyclouds 2022-04-14T21:51:16.217659Z

but would be fun to try out native modules be it nvim, emacs