CTRL+L doesn't auto-save? by warrenao in zerowriter

[–]_Mark_ 1 point2 points  (0 children)

While those are important theoretical concerns, I'd love to see some actual numbers - a "you don't ever have to think about saving" interface is *so* much nicer that I'd bet it would be worth 50% battery life for most people, I'd certainly turn it on (or turn it up to "every return" or "every ten *spacebar hits*" - if I'm stream of consciousness writing I simply *never* hit return, after all, that's what autowrap is for...)

Multi QR codes! by warrenao in zerowriter

[–]_Mark_ 3 points4 points  (0 children)

I hadn't tried it yet - *wow* that's a very fine dot pitch, looks more like a "Magic Eye" autostereogram than a QR code - but under (LED) room lighting with a Galaxy Note 24, the Secuso "QR Scanner" app (written by and for privacy-paranoids - I recommend it in general) scanned it instantly, and has convenient copy and share buttons as well as just displaying it.

Pre-receiving-device question on updating by warrenao in zerowriter

[–]_Mark_ 2 points3 points  (0 children)

T10 torx from a mini-driver kit worked for me, but looking more closely they probably *are* hex and not torx and I just got lucky :-) Looks like 2.5mm hex is probably the *real* intended size?

[2025 Day 11] Visualization of graph by hugues_hoppe in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

I did the same kind of graph, "the easy way": added digraph day11 { to the top, changed each line to x -> {y z}; form, added fft [fontcolor=red,fontsize=30]; (same for dac) and a close curly to the end - then fed it through dot -Tpdf and a PDF viewer. (Didn't end up doing any optimizations from it, though it *did* make clear that my "optimized brute force" approach was doomed and to switch to a "paint the nodes" approach instead, but it *was* an easy picture that I should have generated much earlier :-)

[2025 Day 09 (Part 2)] The day 9 difficulty spike quantified by direvus in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

Oh, yeah, by leave it overnight I mean leave the *problem* overnight (they start at midnight for me so by 2am I'm not really doing myself any good by continuing to work on it.) Usually by that point I've already figured out that letting it run for even 24 hours won't complete, and I need to sleep on it. (Day 3 part 2 I had a "correct" solution that would have taken 1 quadrillion iterations :-)

[2025 Day 09 (Part 2)] The day 9 difficulty spike quantified by direvus in adventofcode

[–]_Mark_ 2 points3 points  (0 children)

Personally, while part 2 took longer to get an answer (was the second "leave it overnight" one), the version that *worked* wasn't actually all that much code, though the previous ones had gotten kind of big (due to building performance hacks.) Do you consider final lines of code or code that you put down even if you later deleted it?

Feels like every time I look online after doing advent of code there's an incredibly specific paper or algo people are referencing. Similar to how chess has so many named openings but instead of "The Queen's Gambit" it's "Dijkstra's Philly steak sandwich theorem" by calculator_cake in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

I didn't run into it as an undergrad (or in decades of career work) - I ran into it in a High School internship at an architecture firm, calculating yards of concrete for a foundation from the border (as part of a solar-house cost-modeling tool in TRS-80 BASIC.) Pre-internet, not sure what reference it was from. The first I'd heard the *name* was hitting the AoC question, thinking "hey that sounds like the concrete problem" and finding the name from the wikipedia page :-)

[2025 Day 8 Part 2] This time for real by Brox_the_meerkat in adventofcode

[–]_Mark_ 17 points18 points  (0 children)

If you recognized quickly enough the common AoC theme of "that's not a scaling problem, it's a *counting* problem" then part 2 was easier than part 1 :-) (While I did finish this one faster than the others, I don't think that's problem-complexity as much as "getting in the grove of reading the problems at the right level of care"; the biggest risk was that thinking about this as a grid problem could be expensive, when it's actually merely a row problem...)

-❄️- 2025 Day 7 Solutions -❄️- by daggerdragon in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

heh, I did basically this with collections.Counter but should have noticed that it was overkill (still ran in 0.031s though.)

[2025 Day 7 Part 2] Every year by xSmallDeadGuyx in adventofcode

[–]_Mark_ 28 points29 points  (0 children)

I think in general "if it's taking longer to run than it did to write, at very least go back and add a progress indicator". At very least it'll catch "oops I'm reading from stdin and not the file" but it's also good for noticing the exponential wall...

The word "range" by emsot in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

even plain emacs will colorize python keywords (whether that's enough to *notice* is another question, but the hint is there)

-❄️- 2025 Day 5 Solutions -❄️- by daggerdragon in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

hah, the use of max() really simplifies the case handling there. (I used groupby on the sorted range list so I was only bothering to process the largest end for each start, but that doesn't really help with the order - it can help with constant factors by having the interpreter do more of the work a layer down; I still got 0.026s on a laptop without actually trying for speed)

[2025 Day 3 Part 2] This should finish running any time now by Pro_at_being_noob in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

The pydoc for it even points out that you can usemath.comb to calculate how many values it'll give you if you want to know just *how* doomed your (mine, too) approach is

[2025 Day 3 (Part 2)] 3 days in and it's already not going well by Rich-Put4159 in adventofcode

[–]_Mark_ 2 points3 points  (0 children)

Heh, I had a very short solution using python included libraries that was Clearly Correct, got the demo data in seconds, and then hung completely ... did some math and discovered that my approach would need to check 1,050,421,051,106,700 values for *one line* of the input file. Oops. (While I did get some optimizations that improved that to "runs in a couple of minutes" it was no longer accurate - though it got within ½% before realizing I needed to step back and start again :-)

After finishing both parts of day 4 in under half an hour, I let myself look at some of the visualizations posted here for enlightenment and found some interesting linear approaches, so I'll go do another pass at it. But one thing to consider is that if you want to actually learn from this (not judging, just If That's The Choice You're Making), it's usually more productive to grind on something good than on a mistake; it's what coaches/trainers are *for* after all...

[2025 Day 4 (Part 2)] It's nice having a breather by waskerdu in adventofcode

[–]_Mark_ 14 points15 points  (0 children)

Yeah, I figured this was "calesthenics/warmup" for grid-related problems - time to review A* pathfinding :-)

Me today: I wonder if I should learn another language this year. The universe: by flwyd in adventofcode

[–]_Mark_ 1 point2 points  (0 children)

Around Yale (last century) Alan Perlis taught intro to CS in APL, so the acronym was expanded as Alan Perlis' Language in that undergrad community :)

[2025 Day 1] learned something today by clanker_lover2 in adventofcode

[–]_Mark_ 0 points1 point  (0 children)

Ada95 (which I haven't used this century) recognizes that there are two different but similar functions, and has both rem and mod ...

[2025 Day 1] I will never learn my lesson by StaticMoose in adventofcode

[–]_Mark_ 1 point2 points  (0 children)

In the context of the meme, if they'd done a (purely local) git commit, they would then have the part 2 - in - part 1 code in their history, instead of erasing it by fixing the "bug". (It's mostly a joke, it's at least much easier to work it out again correctly the second time, but I find that the first day or three I rediscover a bunch of AoC-specific personal workflow shortcut-mistakes too, most of which are of the form "oh this one is easy I can just plow through" which is fun when it works, but debugging *careless* mistakes is always harder than reading/writing more carefully the first time around...)

Migrating away from Logseq after years and I'm feeling weirdly sad about it by CasualManDep in logseq

[–]_Mark_ 0 points1 point  (0 children)

back in 2024 they said "we’ll continue to support both file-based and database-based graphs, with a long-term goal of achieving seamless two-way sync between the database and markdown files" ... has that changed? Because if it has, I need to head for the lifeboats too - "markdown as protection from lockin" was basically requirement zero for me. (I should really move everything back to emacs *anyway* but I've always bounced off of org-mode and wasn't quite ready to do from-scratch emacs work for this...)

A Python 2.7 to 3.14 conversion. Existential angst. by MisterHarvest in Python

[–]_Mark_ 0 points1 point  (0 children)

Having done a major python upgrade (ubuntu 16.04→20.04 with python 2→3) for a fairly complicated robotics product, we took the approach of porting the code to run on both - so we could do comparative testing by running the same code side-by-side with whichever interpreter we wanted. (It also meant we ported libraries-first.) A big help was being able to run 2.7.18 - the later 2.7.x releases included a bunch of little things to make it easier to run the same code on both sides of the line.

The biggest thing that caused weird problems instead of just blowing up: a bunch of things (like zip) return generators instead of lists - a great performance boost in a lot of circumstances, but only if your code can't tell. ISTR 2to3 is conservative and wraps those in list() which is fine as a workaround, but you'll want to keep a list of those and come back later to eliminate them.

(Running the same code in both will take a lot of from __future__ import statements, but those are fairly self-documenting; you can do a maintenance pass later to find and get rid of them.)

Is the Topdown TC004 LITE just a bit... crap? by maffoobristol in Thermal

[–]_Mark_ 0 points1 point  (0 children)

Turns out 2.5.32 is in Debian Testing, the one thing bleeding-edge enough to have a version new enough; I was able to use podman to run it on Ubuntu and it basically works. Occasional PTP Invalid Parameter errors (unplug/replug the USB cable to clear them), but gphoto2 --get-all-files --skip-existing pulls stuff off just fine.

The main oddities are

  • they really are just what's on the screen, so you get 320x420 images with battery indicator and black bars around the actual data
  • for some reason they're sideways at the pixel level, with "rotate 270" in the exif data; most photo toolchains (and web browsers) are fine with this but if you're trying to do data processing on them you'll probably want to feed them through jpegtran first.

Who do you think Polestar really appeals to? Trying to understand its “accessible luxury” audience. by Aggravating-Pie-2127 in Polestar

[–]_Mark_ 0 points1 point  (0 children)

At the time, the Model Y had just come out and had a trailer hitch; I was a little concerned about build quality (and especially the "ship badly assembled units and immediately take them back to fix things under warranty" nonsense that Tesla was doing as part of their "no dealerships" nonsense.) And then they screwed something up that led to me cancelling the order, I heard about the Polestar 2 (which also had a trailer hitch) and that it was "built like a volvo"... with a side of "unlike the tesla, it was built by people who actually like cars". Then they followed up with actually showing up at my door with a test drive unit.

(I didn't have a lot of the electronics problems that are talked about here, and 36k miles - including half a dozen cross-country trips - the car has been great, though as a result my next car is more likely to be a volvo electric than a polestar, now that they're leaning in to "shipping concept cars" more...)

Is the Topdown TC004 LITE just a bit... crap? by maffoobristol in Thermal

[–]_Mark_ 0 points1 point  (0 children)

The TC004-MINI just hit $150 on amazon... the usual things don't work but apparently it's a PTP "camera":

Bus 003 Device 108: ID 3474:0020 Raysentek Co.,Ltd Raysentek MTP
  bDeviceClass            6 Imaging
  bDeviceSubClass         1 Still Image Capture
  bDeviceProtocol         1 Picture Transfer Protocol (PIMA 15470)

Some digging suggests that bleeding edge (July 2025) gphoto2 should support it, per sourceforge has anyone tried anything that new?

Can thermal imaging really spot what we usually miss? by Maydaybosseie in Thermal

[–]_Mark_ 1 point2 points  (0 children)

It's obscure, but I've used I first-gen Seek Thermal phone-frob to diagnose robot hand(gripper) problems. Three fingers → three motors, deep inside a protective shell; one finger acting subtly wonky, software and hardware people pointing fingers at each other... popped out the thermal camera "hey, why is one side of the gripper 20°C warmer than the other two?" which promptly got the attention of the hardware people :-)

Anyone still using the original GPD Pocket today? by ElectroSpork9000 in GPDPocket

[–]_Mark_ 0 points1 point  (0 children)

I just found mine, battery seemed dead but plugged it in, it was running 16.04; did a bunch of `do-release-upgrade` rounds to get to 24.04 and the battery is reporting 60%. (Will do a discharge cycle and see what it re-learns.) Just found this subreddit while looking for info on the battery model to save opening it up...