An old poem

Jan. 13th, 2026 01:28 pm[personal profile] smokingboot

Posted by Remy Porter

Today we have a true confession from Carl W. It has the benefit of being in R, which means that at a glance, I just assume "eh, looks fine to me." I guess I'm turning into Jimbo.

But let's dig into it. Carl's first snippet is this:

for(kk in 1:length(thematch)) {
	if(length(thematch)==0) break
	# actual code
}

"What WAS I thinking?" Carl asks.

You were thinking two things: you were thinking you wanted to iterate across a list, and you were thinking you didn't want to do anything if the list was empty. That these wires got crossed is natural- but sure, this isn't something that should end up in production code. The WTF is less the code itself, and more whatever allowed it to get released.

Carl's next snippet is described as "Yes, let's invert logicals as many times as possible."

	 slice <-rep(0,length(newxx))
	 slicelog<-as.logical(cuts[j]<=newyy & newyy<=cuts[j+1])
	 is.na(slice)<-!slicelog

Because R is weird, <- is one of the assignment operators (it also uses =, but for different purposes, and don't ask me to explain the difference), and because people like to have fun, it also has an -> operator (so the assignee is on the right side of the expression), and <<- and ->> versions which muck with scope in interesting ways.

In this example, the rep function replicates a value (0, in this case) length(newxx) times. So that gives us an array of zeros.

R supports broadcasting operations, so cuts[j] is an array and newyy is also an array (vector, if we're using R parlance), and by comparing two arrays we get an array of boolean values. Which we then pass to as.logical which converts an array into an array of boolean values.

Finally, in R, the NA value is their version of null. Thus is.na returns an array which is true if the original input held a null at that index, and false otherwise. Which is definitely going to be an array of falses, because slice holds an array of 0s. We just made it. Then we assign to the return value of that function. This is syntactically valid, but as you can imagine, it doesn't actually make sense- we just discard the result, at least based on me trying this in an R REPL.

Carl writes:

While the function containing these snippets was definitely a victim of "code it and design the requirements later," I can't believe that even Beginner Me wrote stuff that horrifying. But, it works perfectly so it ain't gonna get fixed.

Ah, that last sentence there, that is a dark truth. And it's important to note, it works perfectly: for now. But the world and runtime environment change. And someday, another developer will receive this code, and wonder, much like Carl, what the hell was going on when it was written.

In any case, Carl, consider yourself absolved. If it's stupid and it works, well, it's still stupid, but these WTFs are small and mostly self-contained.

Remember: code is a liability and starts accruing cruft and tech-debt the instant it's released. The functionality that code delivers is the asset, but that asset is inextricably tied to the code, which encodes assumptions about the world which, even if they were true to begin with, become increasingly false as the world changes.

Also, if you haven't figured out the headline, and because jokes are funnier when you explain them, this is clearly about a pirate's second favorite programming language, ARRRR. Why their second favorite? Because their first love will always be the C.

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.
loganberrybunny: Election rosette (Rosette)
Public

This spring's Senedd election looks like being an interesting one. Right now if I had to put money on any particular outcome, I'd go for a minority Plaid administration. I don't think they'll get anywhere near the number of seats they'd need to get a majority in the Senedd, which will now have 96 members. Probably a final seat count somewhere in the low-mid 30s. Reform are on their heels but seem to be slipping back a little very recently, so I'd suggest mid-high 20s for them. Quite possibly every other party, including incumbents Labour, in single figures.
spikedluv: (winter: mittens by raynedanser)
I hit Price Chopper while I was downtown. Later I hit the bank drive-thru, the library to return and pick-up books, and Stewart’s.

I visited mom, hand-washed dishes, ran a load in the dishwasher, went for a walk with Pip and the dogs, baked chicken for the dogs’ meals, cut up chicken for the dogs' meals, scooped kitty litter, and showered. Supper was ham steak. I browned ground beef and added onions, peppers and seasoning for the start of tomorrow’s chili.

I started the next Jack Reacher book and watched HGTV’s Home Town.

My healthy eating win today was stocking up on healthy snacks at the grocery store: grapes and almonds, bananas, yogurt, and cottage cheese and peaches. I still have some oranges at home, two apples, and one grapefruit.

Temps started out at 25.5(F) and reached 36.5. There was a little bit of sun, which was nice.


Mom Update:

Mom was doing okay when I visited her. She was still in her nightgown, which is always concerning to me. She had some mac&chs AND made herself a root beer float while I was there. She said she had one the other day and it tasted really good. Calories!

(no subject)

Jan. 13th, 2026 09:44 am[personal profile] oursin
oursin: Brush the Wandering Hedgehog by the fire (Default)
Happy birthday, [personal profile] alexseanchai, [personal profile] altariel. [personal profile] chance and [personal profile] rembrandtswife!

Posted by Matthew Nolan

Body Hair Is Knot A Big Deal by Ry Hasenaur

Ry Hasenaur did their best to remove their body hair, but once they figured out they’re nonbinary, they found their hair was directly connected to their gender euphoria. Lunalemony.crd Instagram Tumblr New year, new comics! AS ever, a reminder here in the bottom of the post; if you want to see us continue to keep […]
shewhostaples: View from above of a set of 'scissor' railway points (railway)
two log cabins with snow on the roofs in a wintery forest the text snowflake challenge january 1 - 31 in white cursive text

Top 10 challenge

I'm onna train, so here are 10 railway stations I like. In no particular order, and for various different reasons.

1. Frankfurt Hbf. This was where my international rail travels began. Standing on the concourse, looking at the departure boards (getting slightly earwormed by Stuttgart and Fulda), realising that I could get pretty much anywhere from here...

2. London St Pancras. It's beautiful. It's not actually a terribly pleasant experience getting a train from here (maybe the East Midlands and South Eastern platforms are better) but from the outside it's a fairy tale castle.

3. Stockholm. Rolling in, bleary eyed, off the sleeper from Malta, through dingy orange lights, and then suddenly you're in this marble palace. (I got chugged in Stockholm station. I don't know what I was doing to look like a Swede with disposable income rather than a discombobulated tourist, but there we go.)

4. London King's Cross. Never mind all that wizard nonsense, it has a fully functional platform zero. Also the toilets are free these days.

5. Liège Guillemins. Just glorious.

6. Ryde Pier Head. When it's operational and when you don't just miss the train because the catamaran was thirty seconds late. But there's still something fun about a station in the sea.

7. Dawlish. Train to beach in under a minute (your mileage may vary, as may mine considering I haven't been there in about a decade).

8. York. Never mind a pub in the station, it has one on the platform. Lovely stained glass, too.

9. Norwich. Light, gracious, makes you glad you've arrived.

10. Luxembourg. Stained glass again - and just time for an ice cream before the train.

Posted by Medievalists.net

Archaeologists in Suffolk, England, have uncovered a nationally significant early medieval burial ground, including a “princely” grave with two individuals, a harnessed horse, weapons, and personal items dating to the 7th century.

prepping

Jan. 12th, 2026 10:59 pm[personal profile] paperghost
paperghost: (Default)
My next paycheck is tomorrow, and it's going to be the pay from how much I worked on Christmas. So this is going to be a fat one. My hours later this month were cut, but doing some basic calculations tell me that the paychecks will be average, not terrible. This paycheck will likely carry me before the next mid ones this month. Hopefully my hours in early February will be decent, since my paycheck drops before the con lol. So tomorrow I'm going to buy my badge for Harmonycon, commission an artist for a badge, pay my personal bills a second time, pay household bills if they weren't already, and put some money aside property taxes later this year. Depending on how much money I have left after required stuff, I may donate to KHinsider since I didn't on Christmas.

I unfortunately haven't gotten my W2 for last year yet because my job's internal system for that changed. Really annoying, because I requested 4 days off for Harmonycon (Feb 13-15 and the 16th to recharge before work), and I'd like to have that return as "padding" for my lost hours, lol. I read on Reddit that the W2s for other employees will be posted around the 15th? So I'll check later this week. I signed up for email alerts, but I never heard of this site W2s are posted on. JFC, what happened to mailing or being in the employee panel?

I'm close to done on my site rebrand, but I'm having trouble ripping the bandaid off. I'm redoing my about page, and when I finish that I'll start my "offline tour" before I swap URLs, send out emails, and be free from now on. Harmonycon is an all ages event so I won't leave advertisements for my site there, but I'm considering printing stickers of my art to leave around the Hyatt for funzies. I'm debating on leaving a signature on them though, since I don't have an "all ages" platform now that DeviantART is in the shitter. OTOH, the Harmonycon Discord is mostly adults and older teenagers, I doubt there's going to be many kid-kids lol?

On that note, I popped in the Harmonycon Discord and saw someone from Sonic Expo there, which is something I'm starting to really enjoy about going to local cons. Obviously they're HUGE and have thousands of people, but local stuff will have recurring vendors and faces. An artists alley vendor at TFF/TFS was at Sonic Expo and recognized me, even. lol. After Harmonycon I'll request time off for TFF. Two cons in February and March makes me feel hectic but I need the minor stress to focus.

My inbox has been piling up. It's past 11PM but I have an afternoon-evening shift tomorrow so I can stay up late. I won't go to bed until I clear it out, lol.

EDIT: I AM DONE!!!!! FINALLY!!! When I was up I'm going to answer some Discord DMs, and hopefully send more out. I am not spending this year in hiding.

(no subject)

Jan. 12th, 2026 11:45 pm[personal profile] dustbunny105
dustbunny105: (Default)
It's been years since I consistently remembered my dreams and I guess I can't exactly say I've been remembering them consistently lately either but I've certainly been holding onto more so far this year. Most of them are nothing really worth remembering but then there have been this handful of weird... Idk, stress dreams?

What's funny is that I don't typically find whatever is happening in the dreams stressful while I'm dreaming. And it's ridiculous enough that I don't really feel stressed once I've properly woken up. But the moment in between, where I'm still asleep enough to believe the dream is happening but awake enough to apply it to real life, hits like a freight train.

Read more... )
pigshitpoet: (Default)
Via : https://davesmusictank.livejournal.com/7203756.html



Open House 0:00:00
Black Rock 0:05:21
Moon Beam 0:08:44
Family Affair 0:13:55
More Blood 0:21:22
Love Have Two Faces 0:26:06
Overnight 0:31:35
Fun House 0:35:01
We Bop 0:39:55
Songs/details : .♫¸.•*¨♥✿♪
https://www.discogs.com/release/1931052-James-Blood-Ulmer-Black-Rock

dr. π (pi)



enjoy!

❤️

Book review: Empty Wardrobes

Jan. 12th, 2026 07:19 pm[personal profile] rocky41_7 posting in [community profile] booknook
rocky41_7: (Default)
Title: Empty Wardrobes
Author: Maria Judite de Carvalho
Translator: Margaret Jull Costa
Genre: Fiction, literary

I collect false treasures in empty wardrobes.

This quote by Paul Eluard opens book #14 from the "Women in Translation" rec list, which continues to fatten up my TBR list. This is Empty Wardrobes by Maria Judite de Carvalho, translated from Portuguese by Margaret Jull Costa. This novella, originally published in the 1960s, is about the ways in which women are subsumed by the men in their lives, or otherwise are buffeted about with less control over their lives than they ought to have.

The forward by Kate Zambreno is a wonderfully complementary piece. She talks about the anger she feels going to a woman's funeral and hearing the dead woman sanctified by men in her life who did nothing but take from her, who can speak of her only to praise what she did for others, and can say nothing about what the woman herself was. 

Sometimes you can read a book and just know the author was angry when she wrote it. This is one of those. The book uses the phrase "discreet rage" about one of its characters, and I think that sentiment succinctly describes the whole book. The protagonist, Dora Rosario, is ten years into widowhood, and she has devoted her entire life to mourning her unremarkable husband as much as she had previous devoted her life to supporting his every opinion regardless of whether or not she agreed with it. Now, a decade on, her mother-in-law reveals something about Dora's late husband that changes her entire perspective.

I would like to believe we are moving away from the world portrayed in Empty Wardrobes (though not with as much success as I'd like), but this is a stark reminder of how even a few generations ago, in the Sixties, a woman's identity was so controlled by her husband's. There are only two men in this book--Duarte, Dora's dead husband, and Ernesto, the longtime partner of a side character--and they both, through social structures, exercise incredible control over the lives of the women around them without any respect or even knowledge of their impact.

The three main women in this book--Dora, her daughter Lisa, and the narrator--each take a different approach to the male romantic partners in their lives, and none of them comes out the better for it (well, perhaps for Lisa, but I personally doubt it will last), because the ultimate problem is societal attitudes about the way men and women are meant to relate to each other. 

It's not a long book, and I can't say much more without spoiling things, but I also think it does some fabulous things with its narration and perspective, and the way it doles out information. Really an excellent framing that allows for a lot of fluidity and filling in gaps with your own visions while remaining clear in the nature of the story it's telling. 

This book was only translated into English in 2021, which is a shame, because I think it would have struck a nerve much earlier, but we have it now! Costa does an excellent job with the work too; the writing is full of punchy phrases like the above, and she captures some realistic dialogue--characters repeating themselves, responding in ways that don't quite match up with what was asked, etc.--while keeping it natural-sounding.

Profile

low_delta: (Default)
low_delta

January 2026

S M T W T F S
    123
45678910
11121314151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 17th, 2026 11:01 pm
Powered by Dreamwidth Studios