Fork me on GitHub
#biff
<
2023-04-13
>
Jacob O'Bryant05:04:07

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).

👏 10
😍 2
Jacob O'Bryant05:04:53

The official theme song for this release is https://triple-q.bandcamp.com/track/gangnamcut

🙌 2
😁 2
Epidiah Ravachol14:04:45

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.

Jacob O'Bryant16:04:02

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!)

Epidiah Ravachol17:04:39

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 printlns 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.

Jacob O'Bryant21:04:31

well that's pretty interesting. Could you paste the plugin here?

Jacob O'Bryant21:04:41

or at least the routes section

Jacob O'Bryant21:04:21

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

Epidiah Ravachol12:04:55

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.

Jacob O'Bryant19:04:38

spooky 🙂 sure, I'll take a look at it

🎃 2
Epidiah Ravachol21:04:22

If I've correctly navigated github, an invite should be on its way. It's the missing-home branch.

Jacob O'Bryant22:04:24

👌 just left a comment on the commit

Jacob O'Bryant06:04:57

tryin out some new logo ideas

4
Jacob O'Bryant06:04:59

I'm actually really digging this one

gdubs16:04:57

All inferior of course to your's.

Jacob O'Bryant19:04:30

yeah, I've never had good results from trying to use those logo generators...

Jacob O'Bryant19:04:48

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

👍 1
Epidiah Ravachol12:04:48

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.

Ben Lieberman12:04:47

That's a Java convention

👍 2
m.q.warnock12:04:17

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/

👍 2
Epidiah Ravachol13:04:07

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.

m.q.warnock13:04:57

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

Epidiah Ravachol13:04:27

I should probably go that route. As convenient as the double-colon trick is, a single-word namespace is probably more readable and explicit.

Jacob O'Bryant16:04:10

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

👍 2