This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-23
Channels
- # announcements (26)
- # babashka (8)
- # babashka-sci-dev (3)
- # beginners (93)
- # biff (44)
- # calva (1)
- # cider (7)
- # clj-kondo (13)
- # cljdoc (1)
- # clojure (121)
- # clojure-australia (2)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (1)
- # clojurescript (35)
- # conjure (1)
- # core-async (2)
- # datalevin (6)
- # datomic (28)
- # emacs (25)
- # events (1)
- # fulcro (5)
- # introduce-yourself (2)
- # jobs (8)
- # leiningen (2)
- # off-topic (13)
- # other-languages (1)
- # podcasts-discuss (1)
- # polylith (7)
- # rdf (6)
- # re-frame (1)
- # reagent (53)
- # releases (3)
- # rewrite-clj (7)
- # scittle (5)
- # shadow-cljs (63)
- # specter (1)
- # squint (5)
- # tools-build (5)
- # xtdb (7)
What is the role of the tailwind binary in Biff? I’m familiar with including tailwind as a script, but this may be something a bit different.
The binary makes it so we don't have to include npm
If you have other npm dependencies, it's recommended to include tailwind the normal way
I think it was actually added because DHH asked for it, for rails
(or maybe that was incidental, either way I remember reading somewhere that DHH wanted it for rails)
I remember rails.
Wow… just googled it. It’s very alive and well.
yeah, they just made a rails foundation too
To think of all I’ve been through… and I could have just started and stayed with rails.
lol yes
So… this strays into Basic Web Dev Knowledge Questions… but why is a Tailwind binary type approach better than including a script tag?
More optimization?
Side question: I was including arbitrary hiccup (not rum) copy-pasta HTML with tailwind classes and it wasn’t, I think I recall, rendering correctly until I blindly included Tailwind via a script tag… is that expected?
Tonight is about Understanding Tailwind In Biff, it turns out.
I’ve been using Hiccup at times as opposed to Rum (confession).
Oh, I see what you were asking earlier. (this is I think what you're referring to: https://tailwindcss.com/docs/installation/play-cdn)
Optimization is a big part. There are tons of tailwind classes, so if you use the CDN file, it'll include a bunch of stuff you don't need, making your app slower to load for users. Also, there are certain special classes you can't use, e.g. w-[14px]
. (https://v2.tailwindcss.com/docs/just-in-time-mode)
Ah, gotcha. Yeah. That’s what I did… the CDN… then maybe downloaded it and included it by path. Because I didn’t understand what was going on and somehow not everything was getting compiled by the binary, I’m guessing.
> Side question: I was including arbitrary hiccup (not rum) copy-pasta HTML with tailwind classes and it wasn’t, I think I recall, rendering correctly until I blindly included Tailwind via a script tag… is that expected? Rum vs. hiccup shouldn't have anything to do with how tailwind is included. Maybe there was something else wrong with tailwind that was causing it to not compile your css.
I actually ran into some issues with the compiler when I started working on eelchat, maybe you were hitting the same thing
No… when I run into problems it’s because of something I’m doing. Let’s get that clear right off.
it would just keep crashing. super annoying. But I got a different binary (don't remember if I copied it from one of my other projects or if I downloaded it again) and the crashing stopped. 🤷 . I vaguely remember that the version didn't even change. maybe there was some weird corruption or something.
However, I have gotten into the habit of adding an additional arbitrary change to, say home.clj
if I’m working in it and saving, to force recompilation. That seems natural as it was the way for so long with various dev situations.
If you run into problems like that again, I'd delete the bin/tailwindcss
file and run bb dev
again, which will cause it to re-download. If it still breaks, then I'll believe maybe it's something you're doing wrong 🙂
> However, I have gotten into the habit of adding an additional arbitrary change to, say home.clj
> if I’m working in it and saving, to force recompilation. That seems
> natural as it was the way for so long with various dev situations.
Yep, I do that too
Ok. I’m normal then. Whew.
in fact if you just save the file without making changes that can trigger recompilation I think too
Oh, wow… ok. I thought it was hashing all the files to trigger compilation. Ok.
Overall I’ve had almost no issues (css or compilation). Biff’s been a dream compared to other situations.
excellent 🙂
The tutorial is finished! Last section: https://biffweb.com/docs/tutorial/inbound-rss/
I've also cleaned up https://github.com/jacobobryant/eelchat/commits/master and added "view the code for this section" links to the top of each of the tutorial pages
Planning to publish an announcement post tomorrow morning. Tonight I'll also look into doing something different with the diff things. other than that I'm planning to wipe my hands of this project for now, hoo hoo if there are any bugs you'll have to report them to @macrobartfast
I ended up just cleaning up the diff code blocks a bit, for example:
I've still got improving them further on my todo list, but tbh it's probably not high enough priority to get done anytime soon. Eventually I might like to overhaul the documentation setup, e.g. switch from markdown to asciidoc. if/when I get around to that I'll probably do code formatting improvements at the same time.
(I tried out https://markdoc.dev/ briefly as well, but it looked like even minor customizations would require a bunch of janky react stuff... no thanks)
Came here to say hi and nice article! Was browsing HN and saw it.
thanks!
Keen to try out the tutorial over the w/e
Is there a link to the Hn discussion?
There weren't any comments, but here's the link: https://news.ycombinator.com/item?id=33721730 (It's on page 2 now)
> There weren't any comments At the time; now there are a few
That's a good answer about why not postgres. I had the same question myself. Is that in a faq somewhere? Should be.
not yet. I'll add it to the docs soon.