This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-11
Channels
- # announcements (6)
- # architecture (14)
- # babashka (26)
- # beginners (22)
- # calva (11)
- # clj-kondo (2)
- # clj-on-windows (1)
- # cljsrn (10)
- # clojure (116)
- # clojure-europe (5)
- # clojure-uk (1)
- # clojurescript (5)
- # cursive (9)
- # datomic (21)
- # depstar (1)
- # events (1)
- # fulcro (2)
- # graalvm (17)
- # graalvm-mobile (28)
- # helix (3)
- # introduce-yourself (2)
- # jobs (2)
- # lsp (4)
- # meander (1)
- # off-topic (4)
- # pathom (5)
- # polylith (6)
- # practicalli (5)
- # reagent (67)
- # reitit (1)
- # releases (2)
- # shadow-cljs (24)
- # tools-deps (23)
I'm curious, any using babashka on a rasberrypi ? How are you accessing the gpio pins?
i would just use the /sys/class/gpio/
directory with regular file operations.
https://www.ics.com/blog/gpio-programming-using-sysfs-interface
Added a bunch more API functions from timbre and clojure.tools.logging, links are updated in the discussion
Just to check my understanding - I guess it’s possible to have clj files which are used both from bb scripts and also from JVM clojure processes, correct? As long as they don’t use any of the built-in dependencies from bb (and presumably with a little care), they should work in both?
> As long as they don’t use any of the built-in dependencies from bb I didn't get this part.
on the JVM you would have to have those deps in your classpath, but in bb you don't if they are built-in
code that works in bb generally works in the JVM, but not always vice versa. most specifically, deftype
/`definterface` aren't supported (currently) and reify
/`proxy` in a very limited fashion
Right, so as long as the deps that the file uses is either built in (in bb) or pulled in via the classpath (in clj) files can be shared. That was my assumption, just checking.
And things like the default aliases are only available in bb in the user ns, right? So they will only be available in a script without an ns form.
correct. but this was actually just done for command line expressions. in an editor I recommend people to use explicit aliases
Sounds like good advice, but I’ll have to support those who choose not to follow it 🙂
I can add an inspection to gently suggest to them that they might not like to do that.
clj-kondo will also advice them that, in fact, it will just say: don't know what namespace str
is
I think that's reasonable. https://book.babashka.org/#style