This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-17
Channels
- # announcements (1)
- # babashka (21)
- # beginners (46)
- # calva (21)
- # cherry (10)
- # cider (5)
- # clojure (54)
- # clojure-europe (16)
- # clojure-nl (2)
- # clojure-norway (37)
- # clojure-spec (7)
- # clojure-uk (4)
- # clojurescript (30)
- # conjure (3)
- # cursive (1)
- # datalog (5)
- # datascript (3)
- # datomic (13)
- # emacs (5)
- # fulcro (82)
- # girouette (1)
- # helix (4)
- # hyperfiddle (2)
- # joyride (1)
- # juxt (1)
- # kaocha (4)
- # lambdaisland (3)
- # luminus (1)
- # malli (15)
- # off-topic (60)
- # pathom (3)
- # polylith (1)
- # practicalli (3)
- # releases (1)
- # ring (4)
- # sql (3)
- # squint (85)
is there a babashka equivalent of this code?
user=> (mapv :name (filter (comp :public :flags) (:members (clojure.reflect/reflect d))))
Could not resolve symbol: clojure.reflect/reflect [at <repl>]
user=> (require 'clojure.reflect)
java.lang.Exception: Could not find namespace: clojure.reflect. [at <repl>:10:1]
i'm trying to get the functions/methods available on an object, but babashka doesn't seem to have clojure.reflect available?
Currently not exposed, but I think we're already using this somewhere internally so we could probably just expose it without growing the binary. Worth posting an issue for
If you want, you could try a PR. When this is added, I'll check the binary size difference.
i’m trying to load lanterna w/ (pods/load-pod 'org.babashka/lanterna "0.0.1-SNAPSHOT")
and it looks like it’s not finding the artifact (https://14-303520083-gh.circle-artifacts.com/0/release/pod-babashka-lanterna-0.0.1-SNAPSHOT-macos-amd64.zip), anything I can do to help publish that?
@U0AQ1R7FG I'll retrigger a build
@U04V15CAJ sweet, thank you! 🙏
You can download a binary from here:
https://output.circle-artifacts.com/output/job/5b25aaf5-147b-47f0-a8cc-8f7cb33da2c2/artifacts/0/release/pod-babashka-lanterna-0.0.1-SNAPSHOT-macos-amd64.zip
Unpack it and then use (babashka.pods/load-pod "/tmp/path/to/binary")
cool thanks!
bb supposes to be quick startup. However, in one of my windows machine, it is slow. Here are the measurement. Any suggestions about what to do? Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 999 Ticks : 9992031 TotalDays : 1.15648506944444E-05 TotalHours : 0.000277556416666667 TotalMinutes : 0.016653385 TotalSeconds : 0.9992031 TotalMilliseconds : 999.2031 Measure-Command {clojure -Sdescribe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 7 Ticks : 78980 TotalDays : 9.1412037037037E-08 TotalHours : 2.19388888888889E-06 TotalMinutes : 0.000131633333333333 TotalSeconds : 0.007898 TotalMilliseconds : 7.898
the latter doesn't start a jvm so I'm not sure it's a very useful comparison point
I'm not sure what the former does exactly but the latter will just be some bash that echoes via cat
Continuing in thread @jeff66ruan , @alexmiller :
bb does run a JVM to calculate deps from bb.edn
(if present) so if you run bb for the first time, it might take a second, the second time there will be no JVM invocation because of caching. So be sure to either run bb from a directory that has no bb.edn
or run it a second time.
I created a new folder so no bb.edn in the current path. Here is running data. there are a few ran quick but others not. PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 712 Ticks : 7129463 TotalDays : 8.25169328703704E-06 TotalHours : 0.000198040638888889 TotalMinutes : 0.0118824383333333 TotalSeconds : 0.7129463 TotalMilliseconds : 712.9463 PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 61 Ticks : 614657 TotalDays : 7.11408564814815E-07 TotalHours : 1.70738055555556E-05 TotalMinutes : 0.00102442833333333 TotalSeconds : 0.0614657 TotalMilliseconds : 61.4657 PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 969 Ticks : 9699660 TotalDays : 1.12264583333333E-05 TotalHours : 0.000269435 TotalMinutes : 0.0161661 TotalSeconds : 0.969966 TotalMilliseconds : 969.966 PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 61 Ticks : 610818 TotalDays : 7.06965277777778E-07 TotalHours : 1.69671666666667E-05 TotalMinutes : 0.00101803 TotalSeconds : 0.0610818 TotalMilliseconds : 61.0818 PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 68 Ticks : 683748 TotalDays : 7.91375E-07 TotalHours : 1.8993E-05 TotalMinutes : 0.00113958 TotalSeconds : 0.0683748 TotalMilliseconds : 68.3748 PS C:\Temp\new> Measure-Command {bb describe} Days : 0 Hours : 0 Minutes : 0 Seconds : 0 Milliseconds : 955 Ticks : 9559010 TotalDays : 1.10636689814815E-05 TotalHours : 0.000265528055555556 TotalMinutes : 0.0159316833333333 TotalSeconds : 0.955901 TotalMilliseconds : 955.901 PS C:\Temp\new>
@jeff66ruan How did you install bb?
Ah I see that some invocations are fast: Milliseconds : 61 Not sure what's going on with your machine, but could it be a virus scanner? I've found this to be the answer several times on Windows ;)
@U04V15CAJ It is the scanner! bb can always run fast after I turned the scanner off. Thanks!