a very rough sed https://gist.github.com/corasaurus-hex/d70e533df6e4882d8f2d18186fbbce56
should work on very large files and also supports in-place editing
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
cool :) Feel free to share at https://github.com/babashka/babashka/discussions/categories/show-and-tell as well
shared
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)
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?
@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
it passes all tests
during build it says Warning: profile :feature/xml not found.
, not sure what's up with that. i can parse xml with it tho
that's a warning from leiningen (which I can't explain either)
ok 🙂
@leah Can you also try BABASHKA_TEST_ENV=native script/run_lib_tests
?
{:test 651, :pass 4882, :fail 0, :error 0}
that's interesting! what is the output for time ./bb -e '(+ 1 2 3)'
?
and what is your os?
real 0m0.013s
x86_64 Void Linux
very interesting
maybe worth checking out mandrel 😄
I read the README but it wasn't immediately apparent to me why I should use this over the "normal" one
i just tried it because one can build it with a plain openjdk11
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
first one is upstream binary
so the actual code sizes dont differ so much
wait
oh no -.-
argh
$ du --apparent-size ./bb 89181 ./bb
thanks zfs -.- 😿
ah, well, it's good to know it works with mandrel as well though :)
yeah 🙂
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
yeah i assumed i accidentally triggered this at first. but i want the features of course 🙂