This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-12
Channels
- # aleph (1)
- # aws (2)
- # babashka (44)
- # beginners (178)
- # biff (12)
- # calva (22)
- # chlorine-clover (60)
- # cider (1)
- # clj-kondo (9)
- # cljdoc (6)
- # cljs-dev (37)
- # cljss (2)
- # clojure (43)
- # clojure-europe (3)
- # clojure-finland (23)
- # clojure-italy (1)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-spec (56)
- # clojure-uk (148)
- # clojuredesign-podcast (1)
- # clojurescript (11)
- # conjure (5)
- # core-async (22)
- # cursive (9)
- # datascript (5)
- # datomic (4)
- # duct (8)
- # emotion-cljs (2)
- # figwheel-main (15)
- # fulcro (53)
- # graalvm (68)
- # helix (2)
- # jackdaw (1)
- # kaocha (9)
- # lambdaisland (1)
- # malli (10)
- # meander (2)
- # news-and-articles (1)
- # observability (12)
- # off-topic (17)
- # pathom (1)
- # pedestal (25)
- # practicalli (1)
- # protojure (4)
- # re-frame (2)
- # reagent (57)
- # reitit (1)
- # releases (2)
- # shadow-cljs (69)
- # specter (6)
- # tools-deps (10)
- # vim (16)
- # vscode (4)
- # yada (3)
Doing some performance tests for issue https://github.com/borkdude/sci/issues/348 I got the feeling some tooling is missing to do these tests properly. I think I miss a criterium for command line utils. Ideally you would want to compare two binaries under the same circumstances. I think this requires shuffling of tests cases, setting thresholds and some other tricks. We could write this in Babashka itself. What do you think?
idea: a .babashka
directory with a config.edn
with e.g. a :classpath-cmd
that tells babashka how it should get a classpath for the current directory (project) using some other tool, most often clojure -Spath
haven't really thought this through, or simply a :classpath
entry that can be "."
or "src:test" or
:paths` rather, with just ["src", "test"]
classpath-cmd could also just be git clone + printing a string of the cloned dir for projects that don't have transitive deps
@borkdude sounds handy! Is your main intention to support libraries like deps.edn or do you have other use cases in mind?
the question which sparked this was @bozhidar asking if babashka has some kind of notion of a "project" and if so, how CIDER can know about it
Makes sense. I can also imagine that it would be useful to know how to retrieve a pod and what version. Slightly different problem I guess
I suspect there's an important question about what users expect. Cider could perhaps use the deps.edn?
right now people should just start their --nrepl-server manually and connect from CIDER with cider-connect - which is fine
Latest commits on master add compatibility with clojure.data.generators
🙂 - thanks @jeroenvandijk
$ export BABASHKA_CLASSPATH=$(clojure -Sdeps '{:deps {org.clojure/data.generators {:mvn/version "1.0.0"}}}' -Spath)
$ bb -e "(require '[clojure.data.generators :as gen]) (binding [gen/*rnd* (java.util.Random.)] (gen/anything))"
5997391543372303418/406970517245213237
$ bb -e "(require '[clojure.data.generators :as gen]) (binding [gen/*rnd* (java.util.Random.)] (gen/anything))"
#uuid "5d31aa8f-6d13-a110-f924-a1c55a325ab3"
Awesome! @borkdude thank you 🙂
I would like to expand on this idea to make performance tests more reliable https://gist.github.com/jeroenvandijk/dcfebddd7ba9bda1ae298b29ee2f8998
for next week 🙂
Im trying to use the new csk included lib without success
bb  ✔  13:36:51 
Babashka v0.1.1 REPL.
Use :repl/quit or :repl/exit to quit the REPL.
Clojure rocks, Bash reaches.
user=> (require '[camel-snake-kebab.core :as csk])
java.lang.Exception: Could not require camel-snake-kebab.core. [at line 1, column 1]
so its not included with babashka but now its being supported because of partial protocol support?
Got an experimental branch with taoensso/nippy in it:
$ ./bb "(require '[taoensso.nippy :as n]) (n/thaw (n/freeze [1 2 3]))"
[1 2 3]
Not sure how useful that would be. I haven't used this myself a lot. Would also consider to make a pod for it first, but at least it's GraalVM compatible.I also tried to make it work as running from source as a lib, but I'd have to put a lot of stuff in the reflection config. it is doable though
exactly. then it'd needed to use reflection to invoke java.lang.reflect.Method
... hmm
I'm a bit unsure about including it in bb right now, given nobody has requested it before but you, but doing it as a pod is a no-risk thing. I'm wondering what's the kind of data you freeze and thaw, pure EDN or also records, etc?
we use nippy primarily for storage and transfer of large data sets, because it's so compact and it retains types
I'm not sure if it gzips, but it's usually about the same level of compactness that gzip gets
we use it sometimes for when we have a dataset in memory and want to save it out for ease of reloading, we'll just nippy it out to a file
@nate here are some binaries with nippy in it: https://clojurians.slack.com/archives/CSDUA8S6B/p1591979798021900 you could try and see if it works as expected and report some problems in that issue if there are any