@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.

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?

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 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?"

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.

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

@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.

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)

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 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.

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. 😬

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

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 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. 💀

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.

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

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.

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

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.

danderson, to random
@danderson@hachyderm.io avatar

Ooooh so close! Got the right clang bits in place, patched out a broken part of upstream's build config, the build burns 100% CPU for a while... and then craps itself because it can't find libstdc++ headers. So close!...

creachadair,
@creachadair@mastodon.social avatar

@danderson I'm putting my money on there being no actual generator program at all, the whole thing is just a horrible template metaprogram that generates the output as a side effect of compiling the "generator". 🍿

molly0xfff, to random
@molly0xfff@hachyderm.io avatar

fun little experiment now, as i posted the most recent Citation Needed newsletter.

first CPU spike at ~23:17 is me sending the email.

second spike at ~23:35 is posting the link to

creachadair,
@creachadair@mastodon.social avatar

@molly0xfff The hint to check the spam folder turned out to be prescient; apparently for some reason GMail seems to disapprove. Mine went there too. It might be worth warning GMail folks of that, though I'm slightly stumped as to why it's flagged.

danderson, to random
@danderson@hachyderm.io avatar

Whee, I got multi-language parsing to work, I think!

Templ is mostly plain Go, with three new top-level definitions that aren't Go. Templ's grammar is a superset of Go, but for Reasons I can only reuse go-ts-mode's go-ish stuff if the actually-go bits are handled by the Go tree-sitter parser.

creachadair,
@creachadair@mastodon.social avatar

@danderson that seems like a good use of your resources. There's no sense trying to make a whole new parser when you already have one that gives proper source ranges.

danderson, to random
@danderson@hachyderm.io avatar

OKAY, phase 1 of stupid project achieved. Now on to sinister phase two.

creachadair,
@creachadair@mastodon.social avatar

@danderson I mean that is not what I'd call a very high bar, but it is broadly true that treesitter is reasonable to use.

danderson, to random
@danderson@hachyderm.io avatar

Okay I've now written enough Elixir+Phoenix to ship something modestly spiffy, and I'm reaching the point of framework fatigue, I think. In particular, the breaking point in Phoenix is the second you have to make a form that doesn't match the shape of your data model, things suddenly get pretty unpleasant.

Not unmanageable, just... enough to make me pine for Go again, and less frame/more work.

creachadair,
@creachadair@mastodon.social avatar

@danderson yeah. That's what drew me to it as well—the stdlib template engine is ok for very basic stuff, but pretty quickly gets overwhelmed and kind of awful to use. I set about trying to write more or less this, only to find it already written (and better than I'd have managed).

creachadair,
@creachadair@mastodon.social avatar

@danderson Yeah. My approach was going to be basically building a baby Lisp to compile down into Go, it's certainly not a new idea. I feel like the template forms fit pretty nicely into the existing code.

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