This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-04
Channels
- # announcements (13)
- # babashka (19)
- # beginners (74)
- # boot (1)
- # calva (5)
- # clj-kondo (22)
- # clojure (46)
- # clojure-android (3)
- # clojure-dev (4)
- # clojure-uk (69)
- # clojurescript (19)
- # community-development (17)
- # cursive (27)
- # datomic (9)
- # emacs (13)
- # graalvm (2)
- # instaparse (4)
- # luminus (1)
- # off-topic (21)
- # reagent (6)
- # remote-jobs (1)
- # ring-swagger (4)
- # test-check (49)
- # vrac (1)
I like this a lot: https://clojurians.slack.com/archives/CLX41ASCS/p1578072130072400 It means I can develop my code using the jvm and then uberscript/carve it at the end. The power of the repl flow for dev, the speed of bb for prod (whatever that means).
More spartan than normal Clojure tooling, so I see your point. It's how I do it myself often too
Ah yes. I haven't tried the socket repl yet. Too hooked on prepl (via neovim/conjure) for now.
@deleted-user While I was trying to reduce the binary size (by including only methods in the reflection config and not everything), I found a simple way to include OS-specific classes: https://github.com/borkdude/babashka/blob/a5c2f62d386553267e4e67d504571b9670ae69af/src/babashka/impl/classes.clj#L171
Also, locking
landed on master:
$ ./bb "(def o (Object.)) (def x (volatile! 0)) (defn inc! [] (vswap! x inc)) (doseq [f (map (fn [_] (future (inc\!))) (range 100))] @f) @x"
98
./bb "(def o (Object.)) (def x (volatile! 0)) (defn inc! [] (locking o (vswap! x inc))) (doseq [f (map (fn [_] (future (inc\!))) (range 100))] @f) @x"
100
Adding more and more classes increases the binary size. We're now at 37MB for MacOS. From now on I'd like to include tests to prove the necessity of each class and only add instance check, constructors, methods and/or fields if necessary
Zipped it's still pretty good (around 10-11MB) but people are going to judge a tool on its size too I think
Also wrote it down here: https://github.com/borkdude/babashka#adding-classes
I kept forgetting why I added certain sun.something
classes for clj-http-lite but now that's locked down in tests as well
@sogaiu since you're here: in Windows build environments the Unix implementation classes should now automatically be left out
also made some progress on spec today: https://github.com/borkdude/spartan.spec/blob/master/test/spartan/spec_test.clj