@fractaledmind so tl;dr probably ok to keep using :where(&) here, since you can always nest a selector to increase specificity :) and the cases in which layers give you more control are probably code smells anyway
@fractaledmind there are still some situations where layers give you more control, for example here: https://t.co/5Z3nmL1zT9 vs https://t.co/4jrEBYZawZ – the layers version lets you control the order of otherwise same specificity rules (theming is actually not the best example) very niche
@fractaledmind So, when looking into it I realised actually :where(&) works fine for almost every situation, I initially mistakenly believed if I had a nested selector within it, that selector also would have 0 specificity but that's not correct, so it can be used almost anywhere, however 1/2
@fractaledmind For instance if you have two @ utility with the same name, they compound, but without css layers the order they’re added into the compiled css matters, and that’s not desirable. I have multiple with same name for specific themes
@fractaledmind Well, :where(&) gives it 0 specificity, so it’s very easy to override your affordances like that but you lose the flexibility of choosing the layer order, maybe in your case this is always fine. I use layers so that I can override with theme-specific tailwind utilities
@fractaledmind Tbf the vite/lightningcss in my case I use mostly to tree shake themes out, eg I make themes that override utilities in some cases which I put in their own css layer, then I delete the ones I’m not using. As a nicety I also rename the layer my custom utilities go into.
@fractaledmind I follow a very similar pattern for my base css framework, but I use css layers and then have some custom vite magic to rename stuff. The cool thing about this pattern is you can also theme your css easily eg https://t.co/yzYfMC0sop where the theme takes precedence.
@fractaledmind FYI you don't need to do this to remove specificity, you can simply nest a css layer within the utility, it will be a bit ugly (layer will end up named as utility.affordances) but specificity of nested layers is always less than the parent layer so it will work
@gullgristle@fractaledmind Because tailwind doesn't let you customise the layer that the custom utilities go to, and you need to add them as custom utilities if you want them to be tree shaken. Otherwise everything ends up in the css
@Max_Born_FRS@wongmjane Except her way is more future proof, accounting for changes of js api, or calendar system due to the inevitable collapse of society.
@ethmaxi@ZiomkowskiChris Not to add to the fire, but I always assumed “Satoshi” as a name was a meta reference to the Mind Candy “Find Satoshi” game, which was very popular in tech circles in the UK a couple years before bitcoin was released.
@DrizzleORM The facepalm isn’t the tip, it’s that curly brackets isn’t some cool way of getting the logged variable names back: it’s the way to build an object
@freysa_ai Could you at least update the github code with the winning logic? At this point it's pure luck to win when we don't know what the new code looks like. Keep the prompt hidden if you want, but the github source should be updated
@jarrodwatts Yeah so the reason for this is because, in the code, the transfer gets approved as long as the approveTransfer tool is called first. They can easily harden it by making it require the only tool called be approveTransfer (that’s trickier!)
@popular_12345 That’s interesting, I was actually trying to increase the success rate on gpt4o-mini cause Claude sonnet was much easier to fool, I did use default temp
@depthfirstsearc@popular_12345@freysa_ai I could’ve sworn I saw it in HN but struggling to find it now, I’ll try and find it, iirc it covered different formatting options for prompts and measured accuracy
@popular_12345@freysa_ai if you noticed, I sent the exact prompt without the // START NEW SESSION a bit before the win, but the prompt history was messing it up – I took that idea from your win. Final prompt also worked pretty consistently in gpt4o (not just mini) which is pretty cool