This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-13
Channels
- # aleph (3)
- # announcements (2)
- # babashka (15)
- # beginners (84)
- # biff (28)
- # calva (2)
- # cherry (1)
- # clj-kondo (24)
- # clojure (69)
- # clojure-austin (35)
- # clojure-brasil (7)
- # clojure-conj (2)
- # clojure-europe (83)
- # clojure-losangeles (1)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-portugal (5)
- # clojure-turkiye (2)
- # clojurescript (25)
- # css (4)
- # cursive (11)
- # data-science (26)
- # datahike (4)
- # datalevin (2)
- # emacs (19)
- # gratitude (1)
- # honeysql (1)
- # hyperfiddle (45)
- # introduce-yourself (5)
- # lsp (53)
- # malli (8)
- # mid-cities-meetup (1)
- # nrepl (19)
- # pathom (23)
- # practicalli (2)
- # proletarian (1)
- # rdf (2)
- # reagent (28)
- # releases (4)
- # shadow-cljs (11)
- # sql (13)
- # uncomplicate (6)
- # vim (7)
- # xtdb (3)
Drop what you're doing: there's a new Biff release (https://github.com/jacobobryant/biff/releases/tag/v0.7.4)
Mostly stylistic changes--biggest of which is that biff/start-system
, biff/system
and biff/refresh
are deprecated. For new projects I've inlined their implementations. They were only a few lines anyway, and this way it's immediately clear what they do--a good tradeoff since it's such a central part of Biff.
There are also a bunch of documentation updates (mostly for the reference docs).
The official theme song for this release is https://triple-q.bandcamp.com/track/gangnamcut
The update went pretty smooth and most everything works, except my homepage, which is blank on the screen and the HTML is a bunch of JS and SVGs that appear to be related to Figwheel.
hm, not sure what would cause this. do you know if this happened right after upgrading the biff version? or did it happen after making some of the other manual changes? (I'm assuming the latter but you never know!)
Unfortunately, I didn't give it a go until after I made the optional manual changes. So I could've messed up there. I'll go over them again. All other routes, including other routes in the home plugin, are working fine. I put some println
s in the homepage handler to see if it was being called and then perhaps discarded, but nothing printed. When I move the handler for the homepage to another route, it shows up there fine.
well that's pretty interesting. Could you paste the plugin here?
or at least the routes section
also if you've got it on a public repo/private repo and want to send me an invite, I'd be happy to take a look
Thanks! I stepped away from it for a bit to get some perspective (and to do my taxes) and when I returned I did a little git time travel to redo the whole process and now there's no issue. If you're curious, I did save the broken version on its own branch. I could send you an invite to take a look at that. It got real mysterious near the end. I tried figuring out where the trouble was by inserting a println
in some middleware and discovered it wasn't even calling that. And then, after my break, it had stopped offering up all the JS and SVGs and just said the home page wasn't found. All while everything else worked perfectly fine.
If I've correctly navigated github, an invite should be on its way. It's the missing-home
branch.
👌 just left a comment on the commit
I'm actually really digging this one
genius
yeah, I've never had good results from trying to use those logo generators...
I basically just do "1. pick a font, 2. pick an icon, 3. if it's worth $1k, hire someone to make a real logo" in theory at least. I've never made it to step 3 so far ha ha
I've got a bit of a naive question. What's the deal with the com
part of the com.example
namespace? Back when we dropped the feat
stuff, I dropped the com
as well in an attempt to shorten the namespaces even more. Now, as I upgrade to version 0.7.4, I'm wondering if I shouldn't sneak it back in.
It's just a convention; if you use a domain you own, it's (basically) guaranteed not to conflict with other namespaces. A lot of clojure devs don't follow it.
As far as making them shorter, is it that you're typing them a lot for require lists? I'm not sure which part of my emacs/cider config is responsible for it, but when I type the short name (`:as whatever`) I've used for it in other files, the require line gets added automatically. That is when I type whatever/
Ah! That makes sense. I figured it was a transpose of the intended domain name, and I make foolish decisions when it comes to naming my domains. The one I'm working on now started off with com.dig1000holes
, which, when you include the feat
structure from a few versions ago, was building up to things like
and that was getting a bit unwieldy.
Typing all that isn't so much of a drag, what with aliases and autocomplete, but I would plop things onto the ctx
map with namespaced keys like ::focus-rogue
and then when I had to look at the map to do a bit of debugging, I was scanning through quite the chunk of namespace to find the pertinent part. So I got a bit aggressive with shortening things up and :
became :
.
I just wanted to make sure I wasn't painting myself into a corner.
ah, I see; that can be a pain for ctx destructuring. personally, I use single-word namespaces for keywords; they don't have to correspond to any actual module's namespace
I should probably go that route. As convenient as the double-colon trick is, a single-word namespace is probably more readable and explicit.
single-namespace keywords are fine as long as you're careful about what else is in the map you're inserting them into--e.g. ring requests already have a bunch of single-namespaced keywords so if you're inserting something into the request/context map you'd want to be sure not to some you key e.g. :params or something. I use single-namespace keywords in the ctx map sometimes too, I'm not terribly consistent about it... usually I only do double colon things that are accessed within a single file. another thing you can do is use a namespace without the double colon, like :com.example/foo