im implementing text search on HTML TTRPG logfiles & parsing the HTML to return meant lines meant searches took ~1.5s
it's a CLI tool, so i realized i could just use ag's faster search to make basically a shitty bloom filter & get it down to 1s
6 line probabilistic filter with the same guarantees as a bloom filter that shaves 1/3 off the search time by using an existing tool without even adding a gem to the project :)
haven't programmed professionally in over 4 years but it's good to remember i still have the brain for it
does this introduce a silent dependency on the_silver_searcher? yes. will i *always* have the_silver_searcher installed on every terminal i use, and expect others to do the same? also yes.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
i let myself believe NFTs were a passing fad, in part b/c just thinking of them drains my soul, but their adoption & advertising boom is a reminder that:
NFTs are a natural instance of capital expanding private property given near-complete enclosure of existing forms of property
marx writes about the tendency of the rate of profit to fall, which oversimplified, explains that investment opportunities inevitably become less profitable for investors over time, creating periodic crisis and forcing capital to constantly open new investment opportunities
one way that capital can create these new opportunities is "enclosure" (as named by rosa luxemburg, also called primitive accumulation)
aka taking resources that were previously not private (typically land, natural resources, etc.) and privatizing them
#nobechdeltest but the fact that the female lead of altered carbon s1 literally does not appear in the 4min official recap of that season except as an offscreen voice in the final 15s to ask the male protag what he'll do about his long-lost love...says a lot about that show lol
she almost definitely has the second most screentime of any character and the fact that they "recapped" the entire season without her uh. hmm? could this perhaps indicate? she was a shallowly written character?
also the only named women to appear on screen in the recap are 1. the obsessive, controlling older sister 2. the sex worker trapped in a digital memoryscape to relive her murder repeatedly
also says. pretty much the same thing. about how this show writes women.
i’ve now spent somewhere around 4 hours on hold & phone calls over the last week trying to fill 1 prescription i ran out of last week
i am currently at the stage of “my insurance company says they have a plan with my name & member ID (a plan i’ve been using for 1.5 years) but there is no active date. ever. there are simply no dates indicating this plan is active or ever has been”
after 30 minutes, i had been on hold for 10 while the person tried to figure out why my plan didnt have an active date
suddenly it booted me back to the main menu except it was the provider menu not customer, so i have to hang up & call back & start again
feels good to realize i can still look at 3 lines of ruby, go "that can definitely be done in 1 line of ruby" and do it in one line of ruby
initialize a local variable from an arg, concatenate to that variable by looping an instance variable array, and return it? nah, call reduce on the instance variable array with the arg as the initial value.
that said, took me awhile to figure out what in the hell i was doing here 7 years ago