babashka

https://github.com/babashka/babashka. Also see #sci, #nbb and #babashka-circleci-builds .
Cora (she/her) 2021-07-05T15:33:09.336900Z

a very rough sed https://gist.github.com/corasaurus-hex/d70e533df6e4882d8f2d18186fbbce56

Cora (she/her) 2021-07-05T15:33:50.337600Z

should work on very large files and also supports in-place editing

Cora (she/her) 2021-07-05T15:37:04.339500Z

doesn't support a ton of things but the real magic is that the replacement arg can be a function which opens up all sorts of opportunities

borkdude 2021-07-05T15:37:17.339800Z

cool :) Feel free to share at https://github.com/babashka/babashka/discussions/categories/show-and-tell as well

Cora (she/her) 2021-07-05T15:40:33.340Z

shared

🎉 1
borkdude 2021-07-05T19:01:21.346800Z

Now that 4clojure is closing down, here's a fun idea: - Contribute to 4bb (https://github.com/porkostomus/4bb) - Or make a babashka web app (or client side only SCI app) that offers a similar 4clojure UI but can be ran locally)

Leah Neukirchen 2021-07-05T21:42:42.348800Z

i compiled bb 0.4.6 with mandrel 21 and the result is only 38MB which makes me suspicious. but it seems like everything is there? any ideas what makes such a difference?

borkdude 2021-07-05T21:44:26.349700Z

@leah You can try to run the test suite with that binary in the current directory of babashka's repo. BABASHKA_TEST_ENV=native script/test

Leah Neukirchen 2021-07-05T21:44:37.349900Z

it passes all tests

Leah Neukirchen 2021-07-05T21:44:59.350300Z

during build it says Warning: profile :feature/xml not found., not sure what's up with that. i can parse xml with it tho

borkdude 2021-07-05T21:45:15.350600Z

that's a warning from leiningen (which I can't explain either)

Leah Neukirchen 2021-07-05T21:45:28.351Z

ok 🙂

borkdude 2021-07-05T21:46:03.351600Z

@leah Can you also try BABASHKA_TEST_ENV=native script/run_lib_tests?

Leah Neukirchen 2021-07-05T21:51:27.352200Z

{:test 651, :pass 4882, :fail 0, :error 0}

borkdude 2021-07-05T21:52:30.352700Z

that's interesting! what is the output for time ./bb -e '(+ 1 2 3)'?

borkdude 2021-07-05T21:52:36.352900Z

and what is your os?

Leah Neukirchen 2021-07-05T21:52:59.353100Z

real 0m0.013s

Leah Neukirchen 2021-07-05T21:53:04.353300Z

x86_64 Void Linux

borkdude 2021-07-05T21:53:25.353500Z

very interesting

Leah Neukirchen 2021-07-05T21:53:35.353800Z

maybe worth checking out mandrel 😄

borkdude 2021-07-05T21:54:01.354100Z

I read the README but it wasn't immediately apparent to me why I should use this over the "normal" one

Leah Neukirchen 2021-07-05T21:54:01.354300Z

i just tried it because one can build it with a plain openjdk11

Leah Neukirchen 2021-07-05T21:55:54.354600Z

text    data     bss     dec     hex filename
90118751          28520    <tel:203290149303|2032 90149303>        55f91b7 /home/leah/bin/bb
91220131          28472    <tel:201691250619|2016 91250619>        5705fbb ./bb

Leah Neukirchen 2021-07-05T21:56:01.354800Z

first one is upstream binary

Leah Neukirchen 2021-07-05T21:56:08.355100Z

so the actual code sizes dont differ so much

Leah Neukirchen 2021-07-05T21:56:10.355300Z

wait

Leah Neukirchen 2021-07-05T21:56:15.355500Z

oh no -.-

Leah Neukirchen 2021-07-05T21:56:23.355700Z

argh

Leah Neukirchen 2021-07-05T21:56:29.355900Z

$ du --apparent-size ./bb 89181 ./bb

Leah Neukirchen 2021-07-05T21:56:40.356100Z

thanks zfs -.- 😿

borkdude 2021-07-05T21:56:54.356400Z

ah, well, it's good to know it works with mandrel as well though :)

Leah Neukirchen 2021-07-05T21:56:59.356600Z

yeah 🙂

borkdude 2021-07-05T21:57:52.357300Z

if you want a leaner babashka build, you can try export BABASHKA_LEAN=true and you will end up with some libraries excluded from the binary and a slightly smaller size

Leah Neukirchen 2021-07-05T21:58:14.357700Z

yeah i assumed i accidentally triggered this at first. but i want the features of course 🙂

👍 1