The AI assistant I thought would help me with this JSONPath refactoring task just hallucinated a feature for OpenAPI Overlays that does not exist (citation: I maintain the thing). But now I’m thinking …. maybe we DO need template based variable replacement as a feature?!?? #NerdSniped
Nerdsniping of the day (I was the victim): Are there years when the US vs ISO abiding countries do not agree on the week number?
The answer as per playing a bit with python is: yes indeed, and 2027 will be the next occurrence. On this date 2 years from now, the US is living week 15 while most of us are still in week 14.
The root cause is a different definition of week 1, whether it's placed on January 1st or January 4th.
In addition there's the bit where we disagree on the number every Sunday and other Fun conflicts I'm omitting for brevity, but that's mostly small potatoes to almost an entire year of potential misunderstandings!
@projectgus OK now I’m curious… what factors continue to battery drain during installation? if you grab a tiny distro like DSL or Puppy does smaller install = less time = less battery drain…?
dammit, #NerdSniped!
@simontatham
(and yes, I grabbed a quick set of unicode emoji/symbol ranges and wrote a #Python script that expanded them all to their individual code-points, iterated over them checking if 0x20 was set and if not-0x20 was also among the code-points; and if so, emitted the unicodedata.name() of both characters for quick evaluation)
@EricAlper True that. Every time I need to re-organize my route-optimized shopping list. #nerdsniped
I got properly #NerdSniped last night thinking about how to create #shapes.
A circle is easy and has a defined #circularity (1) and #AspectRatio (1), but how do you create a set of shapes with given values for these properties?
An ellipse seems like a decent "base" shape to start with but then calculating the perimeter is not as trivial as I thought it would be.
Here is the question that started it if anyone is interested in chiming in:
https://forum.image.sc/t/free-shape-generator-based-on-the-obtained-data/96113?u=dnmason
#Maths #Geometry #Mathstodon
New patchwork version just dropped and has the feature I helped out with!
https://www.data-imaginist.com/posts/2024-01-05-patchwork-1-2-0/
Thanks also to @_TimTaylor and @coolbutuseless who I #nerdsniped into thinking along with the 2D RLE procedure!
... I've #NerdSniped myself.
Tidying up code for finding all rectangles in a matrix.
@teunbrand Fresh eyes this morning saw a better way of penalising based on aspect-ratio.
I think this looks better than the previous two!
Now to tidy this spaghetti code :)
@teunbrand Two diferent rectangularisations of the same matrix.
In the second one i penalise narrow areas - hoping to promote areas at least 2 high (or wide).
Still some thin areas that could be replaced by fatter in top half of first two columns.
@teunbrand First draft.
Notes:
* There's an interesting choice to be made when multiple candidates match
* Locally optimal/greedy matching probably gives globally sub-optimal final result
* Feels like there should a 2d divide/conquer method.
* Also feels like there should be a 2d growth+simulated annealing that would producing something nice
* quadtrees / binary space partitioning methods?
Do you have interesting test cases to try this on?
@teunbrand I'll probably spend all day thinking about this!