This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-07
Channels
- # announcements (16)
- # asami (15)
- # babashka (12)
- # beginners (38)
- # calva (32)
- # cider (1)
- # clj-commons (9)
- # clj-otel (4)
- # clojure (57)
- # clojure-europe (43)
- # clojure-korea (1)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-uk (4)
- # clojuredesign-podcast (9)
- # clojurescript (10)
- # cursive (5)
- # datahike (9)
- # deps-new (2)
- # events (1)
- # fulcro (8)
- # hyperfiddle (7)
- # kaocha (1)
- # lsp (2)
- # malli (3)
- # nrepl (2)
- # off-topic (19)
- # releases (3)
- # ring (10)
- # shadow-cljs (4)
- # sql (14)
- # xtdb (57)
- # yamlscript (2)
Started reading the BB book this morning and saw the https://book.babashka.org/#_running_a_script and decided to port it to YS for fun:
#!/usr/bin/env ys-0
# require babashka::http-client: => http
defn main(url=nil file=nil):
when-not (url && file):
say: 'Usage: <url> <file>'
System/exit: 1
write-html file: url.get-url().body
defn get-url(url):
say: "Downloading url: $url"
http/get: url
defn write-html(file html):
say: "Writing file: $file"
spit file: html
Might spur some questions here.
ys
is conceptually very similar to bb
but with a different syntax and less mature / full featured to date...@UBRV1HXPD which leads me to wonder your interests in using ys inside bb. I certainly want it to work of course... 🙂