Fork me on GitHub
#babashka
<
2020-06-14
>
borkdude10:06:52

would clojure.datafy be useful to have built-in to sci or bb? what would be a useful example of this? my impression is that this was created with an eye on REBL, but isn't that widely used yet in the community maybe?

mkvlr11:06:05

hmm, doesn’t that have to be in the same context?

mkvlr11:06:28

either way, a babashka runtime ob Nextjournal would be cool

mkvlr11:06:53

and datafy would be useful there for sure

mkvlr11:06:14

it’s also pretty tiny or not?

borkdude11:06:54

> hmm, doesn’t that have to be in the same context? hashmaps and vector etc. returned from sci can just be walked by the main clojure app which called sci/eval-string.

borkdude11:06:04

tiny: what are you referring to: bb, sci, datafy?

mkvlr11:06:22

to datafy

borkdude11:06:50

yeah, just have to build it into sci which is a bit of work

borkdude11:06:58

it's not just copy pasting source

mkvlr11:06:46

ok, does the protocol support already support extension via metadata?

borkdude11:06:04

yes, it does now since 0.1.2

borkdude11:06:22

but you can't run datafy from source, I tried.

borkdude11:06:50

datafy relies on some clojure internals like clojure.lang.Namespace which works differently in sci

borkdude11:06:12

it would probably take a few hours to get it built-in. no problem, just want to know if and how this is useful

mkvlr12:06:45

does that only apply when using datafy on a namespace?

borkdude12:06:24

think so yes

mkvlr12:06:32

ok, think it would be useful to have the protocol exist, even if it’s not 100% compatible from the start

borkdude12:06:25

yeah, it will be included, I made an issue.

❤️ 3
mkvlr12:06:14

will try to see what’s missing for the Nextjournal runtime and let you know next week

mkvlr12:06:57

thanks for all your work and enjoy your Sunday!

borkdude10:06:55

export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {seancorfield/readme {:mvn/version "RELEASE"}}}' -Spath)
$ bb -e "(require '[seancorfield.readme :as readme]) (readme/-main) "

Testing readme

Ran 1 tests containing 1 assertions.
0 failures, 0 errors.
with this in the README:
clojure
user=> (+ 1 2 3)
6
🙂

sogaiu10:06:40

i think the scicloj / data science folks may be using it -- i've seen them mention and discuss it on zulip.

borkdude10:06:59

babashka v0.1.2 Most notable: compatibility with clojure.data.generators and honeysql https://github.com/borkdude/babashka/blob/master/CHANGELOG.md#v012-unreleased

❤️ 6
borkdude17:06:27

honeysql can be combined together with the postgresql or hsqldb pod: https://github.com/babashka/babashka-sql-pods#libraries

dpsutton17:06:31

That’s a game changer

David Pham21:06:33

Please forgive my ignorance: is bb start time impacted by the size of the classpath?

borkdude21:06:15

@neo2551 No. The only thing the classpath size affects is the time of finding a namepace when you do require. When there is more to search, it can be slower.