This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-02
Channels
- # adventofcode (63)
- # announcements (21)
- # babashka-sci-dev (1)
- # beginners (24)
- # biff (2)
- # calva (78)
- # cherry (6)
- # clj-commons (3)
- # clj-kondo (7)
- # clojure (91)
- # clojure-austin (2)
- # clojure-bay-area (6)
- # clojure-denmark (1)
- # clojure-europe (45)
- # clojure-nl (1)
- # clojure-norway (16)
- # clojure-portugal (3)
- # clojure-uk (1)
- # clojurescript (20)
- # conjure (11)
- # datalevin (13)
- # datomic (5)
- # emacs (14)
- # etaoin (15)
- # events (7)
- # fulcro (9)
- # funcool (1)
- # honeysql (26)
- # joyride (4)
- # kaocha (3)
- # lambdaisland (2)
- # malli (7)
- # off-topic (22)
- # pathom (29)
- # portal (58)
- # practicalli (8)
- # rdf (25)
- # reagent (14)
- # sci (3)
- # scittle (37)
- # shadow-cljs (10)
- # slack-help (2)
- # spacemacs (7)
- # sql (7)
- # tools-deps (1)
- # xtdb (2)
some ideas: I want to highlight the "winning" numbers when revealing the answers. I could also make the table a bit more snazzy.
Advent of Code in Scittle, amazing @raymcdermott !
Feel free to make issues / PRs for missing stuff, I will support this effort by making more frequent releases for AoC :)
@raymcdermott What are the troubles you have with Github pages? There is also an #C0GLTDB2T channel where you can share / discuss solutions
@raymcdermott you can just code in a file and then refer to that file from a script tag
(defn content
[day#]
(let [elves (->> @data
str/split-lines
(map js/parseInt)
(partition-by js/isNaN)
(keep (fn [xs]
(when-not (js/isNaN (first xs))
(reduce + xs)))))]
[:div
[:a {:href (str " " day#)}
"Link to AOC Challenge for day " day#]
[:br]
[:br]
[:h3 "Calorie counting for " (count elves) " elves. They each have this many calories..."]
[elf-table elves]
[:br]
[parts elves]]))
ok, you want to show a code sample. Take a look at the scittle README where this is also done
not the readme but the http://github.io docs thing
This is the page with the docs: https://babashka.org/scittle/ It is not the README.md of the scittle github repo
I'm probably asking it wrong but I don't how that page is made so that it shows the text snippets. I want to make the snippets available dynamically not hard-coded.
@raymcdermott you can just look at the source of this page. there is no build process, view source shows it like it was done. I did hardcode the snippets I wanted to show, but I think you could make that dynamic. I see your need for a formatter here. I also have a playground that I pre-populated with some code - again, no build process, everything is loaded directly from jsdeliver / npm https://babashka.org/scittle/codemirror.html
What are my options if I want to use a library like https://github.com/philoskim/debux? I can either try to build the library and put js files on a cdn or try and fetch the clj source from github and eval it. Have you done anything like that yet?
@rgkirch I think it's likely you'll bump into some incompatibility if you load it from source (I see cljs.analyzer.api is used for example), but you might be able to simplify this lib to evaluate it with scittle directly. If you're going to include as a compiled lib, you have the challenge that this library consists of macros and those macros have to exist at run time in SCI - which basically means copying them as regular functions (see sci.configs for promesa for example).
Thanks. It looks like nothing in debux would work without changes. The other library that I always reach for is meander. I think I’ll start by cloning it into my project, reference it from script tags, and find out if it’s incompatible. I guess I’d have to have a script tag for each source file. And order probably matters. That sounds like a pain. You haven’t done anything in that direction yet?