This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-03
Channels
- # announcements (3)
- # asami (4)
- # aws (1)
- # babashka (22)
- # beginners (111)
- # calva (3)
- # cider (1)
- # clj-kondo (55)
- # clj-on-windows (9)
- # cljsrn (1)
- # clojure (13)
- # clojure-europe (35)
- # clojure-losangeles (3)
- # clojure-nl (2)
- # clojure-norway (2)
- # clojure-spec (2)
- # clojure-uk (5)
- # clojurescript (51)
- # conjure (5)
- # cursive (5)
- # datascript (1)
- # datomic (27)
- # deps-new (8)
- # depstar (41)
- # emacs (4)
- # fulcro (24)
- # graphql (4)
- # gratitude (8)
- # helix (36)
- # jobs (2)
- # leiningen (2)
- # lsp (11)
- # off-topic (24)
- # pathom (23)
- # pedestal (2)
- # polylith (27)
- # re-frame (12)
- # reagent (7)
- # reitit (1)
- # releases (3)
- # remote-jobs (1)
- # rewrite-clj (4)
- # sci (1)
- # shadow-cljs (27)
- # spacemacs (12)
- # tools-deps (31)
- # web-security (2)
I was looking at the dad
source code and was curious; is this the right part of the code that allows you to set dad
as your shebang line and parse whatever is after it? https://github.com/liquidz/dad/blob/master/src/dad/core.clj#L93-L101 Im basically looking to do something similar
I see it calls a reader implementation that has a few functions defined, it looks like those are what is exposed if you use dad
as your shebang
Also, when I was doing something similar in perl I used https://metacpan.org/pod/Import::Into which basically allowed me to take functions from other libraries and import them into my "namespace" that would be automatically exported to the DSL
I know babashka does this but it looks like you define those implementation files; do they just wrap the functions you want and pass on the args?
@adam.stokes This is not the dad
channel and dad isn't something I developed, so I don't know, but perhaps the author is on Slack here somewhere
Fair enough, in babashka, can you point me to the code that handles parsing the forms when using bb as your shebang
Figured it was similar in nature since they both use sci
¯\(ツ)/¯
@adam.stokes A shebang is part of a shell implementation like bash, it just invokes a binary with that name
From what I can tell you dont import the functions you want into your namsespace
Yep, that's the part im looking into
does it just do some evaling on the remaining items when called from a script?
ok cool, was hoping it was something like that; and for exporting functions from other libraries to be used in this environment, is it just a matter of wrapping those functions in my own namespace?
Thanks will read up on that
Awesome, I'll take that approach, thanks again