@creachadair@mastodon.social avatar

creachadair

@creachadair@mastodon.social

A lover of language, a writer of words, a spinner of yarns, and a mangler of bits. A page, torn from a book.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

danderson, to random
@danderson@hachyderm.io avatar

dangit, my inner data structure has a structural fault because of rust ownership semantics.

Conceptually, the inner struct is a binary tree where inner nodes can carry a value, and leaves can carry a value or a child tree. If you need a leaf to hold both a child and a value, you store the child and move the value to the child's root node.

Conceptually again, lookups walk down this tree-of-trees looking for the node representing the lookup key, and nearest self-or-parent value is the result.

creachadair,
@creachadair@mastodon.social avatar

@danderson @irenes Yeah. And Rust lets you express to the compiler many things you'd otherwise have to shoulder the burden for yourself. As you say, there's value in seeing how far you can push it, especially at the beginnings of things.

creachadair,
@creachadair@mastodon.social avatar

@danderson @irenes The morally defensible case for an unsafe treatment is when you have knowledge that cannot be expressed to the compiler, but which you've already ensured some other way (e.g., by constraining the input higher up in the call tree). It's still unsatisfying, of course. And I always worry about the next joker who tries to cross the street because they saw me do it. 💀

danderson, to random
@danderson@hachyderm.io avatar

Terrible little gremlin idea of making a distro only secretly rewrite all the load bearing libraries in the OS bootstrap brainstem in rust, and just trick increasingly large chunks of the system to not be C and see how long it takes anyone to notice that glibc looks a bit weird. Like a supply chain attack of kindness

creachadair,
@creachadair@mastodon.social avatar

@danderson @vaurora the best attempts I've seen at crawling out of the morass start at the lower end, the "tiny core language" approach, where you can build the core nonsense by hand even if it doesn't run fast, and use that to get up to a runtime that can handle the more complex stuff. But most, including Rust, start very much higher up the stack and that makes a lot of implicit design choices that are harder to retcon later.

danderson, (edited ) to random
@danderson@hachyderm.io avatar

Okay rust has confused me and I need help: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ad23ba5c6511f1bdd40515efefcb9193

I have two fns set_deep_val1 and set_deep_val2. The first works fine, the second angers the borrow checker. By my current understanding of borrows, either both should work or both should fail. What am I missing?

Help?

EDIT: answer is at https://hachyderm.io/@danderson/112233659311769059

creachadair,
@creachadair@mastodon.social avatar

@danderson I don't know either, though this smells like burnt syntactic sugar.

creachadair,
@creachadair@mastodon.social avatar

@danderson As long as your program doesn't stab it behind an arras crying dead for a ducat I'm sure it's fine.

danderson, to random
@danderson@hachyderm.io avatar

https://without.boats/blog/let-futures-be-futures/ is a very good read. From outside rust, the only take on async that went viral enough that I read it was "what color is your function?" Although it was about the javascript world, I was exposed to it as a takedown of async/await in rust.

This post goes quite deep into another framing: if we accept that there is a "color" tradeoff, how is it justified, what do we get out of it? Quite a lot of things, I've learned. Still a significant tradeoff, but I get it now.

creachadair,
@creachadair@mastodon.social avatar

@danderson The real curse of C is that because there is so much of it, we keep writing more of it. 😬

creachadair,
@creachadair@mastodon.social avatar

@danderson I mean, simplified a bit that is more or less always the case, the question is always what facilities you let yourself have for controlling it. The options are "none" (or perhaps "explicitly drop into asm / setjmp / longjmp / hand write CPS"), some kind of library bolted to the compiler (async/await, other state machine nonsense), or explicit continuations of some kind. All require some runtime to actually get control of the machine, but that is unavoidable anyway.

danderson, to random
@danderson@hachyderm.io avatar

Hmm, I wrote out a neat little iterator for the next step of this algorithm, which outputs a sequence of "go into child table" followed by a final "insert in this table" (enum with 2 vals).

But that breaks the borrow checker when used, because the final insert case moves a value, and rust reasonably goes "you can't do that because what if another loop iteration gets here?"

I don't think I can express the promise that it won't happen without unsafe... Is there some std wrapper type for this?

creachadair,
@creachadair@mastodon.social avatar

@danderson let the Forth be with you and compile it to an array of closures?

danderson, to random
@danderson@hachyderm.io avatar

Just one more wrapper around runc, i promise just one more wrapper and then cloud-native is done, come on bro just one more coordination layer i swear just one more api come on bro just one more

creachadair,
@creachadair@mastodon.social avatar

@danderson You can tell a lot about how much it will hurt to use a project from the degree of excitement its maintainers have about everything being pluggable.

They say: "you can do anything!"

I hear: "I have to do everything"

Good design choices are hard. But not making them never helps.

creachadair,
@creachadair@mastodon.social avatar

@danderson I wish that, as an industry, we'd stop rewarding people for "solving" the difficulties of one complicated system by wrapping it in a new complicated system that is trying REALLY HARD to look different from the old complicated system (as it painstakingly reproduces the same complications with different warts).

Ideally our systems wouldn't be so complicated in the first place, ha, but I'd settle for harm reduction at this point.

creachadair,
@creachadair@mastodon.social avatar

@danderson Yeah. Though arguably we didn't even really do that, because with a few exceptions, none of the container ecosystem tools do ANYTHING independent of a huge hairball of related nonsense in harness. So it's more of an artist's impression of the philosophy than a real implementation of it.

creachadair,
@creachadair@mastodon.social avatar

@danderson A brilliant answer to the age-old question, "this situation is pretty bad, but how could we maybe make it even worse?"

danderson, to random
@danderson@hachyderm.io avatar

> Note: anonymous scopes are not considered scopes.

Once again begging people inventing DSLs to just grab a lisp. Guile is embeddable and everything!

creachadair,
@creachadair@mastodon.social avatar

@danderson My biggest quarrel with most DSLs is that they're not designed with any consistent principles in mind, but merely slap a soggy poultice over whatever lexical grievance the author had with whatever they were using previously.

If you're gonna make new life, at least take it seriously, I say.

danderson, to random
@danderson@hachyderm.io avatar

Okay I wrote this python code so long ago that python 3.5 was new, and... wow so much has changed since then, it's going to be a trip to catch up.

creachadair,
@creachadair@mastodon.social avatar

@danderson Yep, some of it IS actually nice. (Though IMO the matching is one of the jankier and more abrasive changes, despite that I like the feature generally)

creachadair,
@creachadair@mastodon.social avatar

@matt @danderson Yeah, though much of it is not worth the effort. It's a weird mix of a small handful of genuinely useful improvements with a large helping of wallowing.

danderson, to random
@danderson@hachyderm.io avatar

The enshittification continues! Premium subscriptions are coming to my spice rack.

creachadair,
@creachadair@mastodon.social avatar

@danderson On the bright side there probably aren't ads strewn randomly about the middle of the bottle.

ct_bergstrom, to random
@ct_bergstrom@fediscience.org avatar
creachadair,
@creachadair@mastodon.social avatar

@ct_bergstrom they took another panoption?

They panopted out?

I got nothing. I'm mostly just gobsmacked that someone would name a product that with a straight face.

danderson, to random
@danderson@hachyderm.io avatar

The simple joy of watching a video titled "This will RUIN the hobby! (it's not what you think)" and submitting a non-clickbait replacement title to Dearrow. It's so nice.

(it was elitism, the thing that will ruin the hobby is elitism. Apparently we needed a 7-minute video to say this, even though I don't even have to tell you which hobby it is, because it's true of literally all of them)

creachadair,
@creachadair@mastodon.social avatar

@danderson "this video could have been a printed headline"

"Yes, but the monetization guide says that's the optimal length to maximize engagement and ad revenue so I rambled for the remaining 6m57s"

creachadair,
@creachadair@mastodon.social avatar

@danderson Haha yeah I know there are various timing optima, but I don't know what they are so I just used your 7m 😂

creachadair, to random
@creachadair@mastodon.social avatar

A lot of folks getting an eye opener this week on the way universities (especially the really famous ones) have always behaved: Let someone else do all the planning and organizing and work, raise the funds, solve the problems, get it published, and then when it turns into a big deal, run out in front with a fucking baton, cream off half the grant money, and pretend to be leading the parade.

creachadair, to random
@creachadair@mastodon.social avatar

Even after all these years I'm still bitter that Python3 made such small changes and yet managed to break so much working code without realizing any meaningful improvement to performance, usability, or reliability. It's still slow, still wasteful of memory, still bad at concurrency, still has terrible string representation, still requires tests to detect typographical errors. It's all the costs of a second system with none of the benefits.

creachadair, to random
@creachadair@mastodon.social avatar

It seems like the GitHub analogue of getting ratioed is when your repository has been forked more times than it's been starred.

creachadair, to random
@creachadair@mastodon.social avatar

The greatest weakness of reasonable people is the expectation that unreasonable people will listen to reason.

creachadair, to random
@creachadair@mastodon.social avatar

Mother's Day is here again
but you aren't.

Maybe I'll pack it up
in a plastic tub
scratchy from a hundred washes
and a lid that doesn't match,
like you'd have done,
and put it in the back
of the fridge.

Waste not, want not,
you said. For who knows
what there will be
tomorrow?

creachadair, to random
@creachadair@mastodon.social avatar

Time blows us all into solitude and death soon enough. Let us show each other a little grace during such fragile brief moments as we have together in the sun.

Everyone can sometimes be a huge pain in the ass, but our sparks last so short a while that it's folly to waste ourselves in rage at a situation so impermanent.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines