@gvwilson@mastodon.social
@gvwilson@mastodon.social avatar

gvwilson

@gvwilson@mastodon.social

I program, write, and teach. Co-founder of Software Carpentry and It Will Never Work in Theory; co-editor of The Architecture of Open Source Applications.

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

gvwilson, to random
@gvwilson@mastodon.social avatar

OK Pythonistas: I want to include Python code snippets in a document. Rather than marking regions with specially-formatted comments, I use ast.parse to generate an AST, find the root node of the part I want to display (e.g., method M of class C), then use ast.unparse to turn it back into text. It's simple and effective except it doesn't preserve the indentation of the original: if (for example) I've split a dictionary across 3 lines, ast.unparse puts all the entries on a single line. 1/

gvwilson,
@gvwilson@mastodon.social avatar

It doesn't look like ast.unparse has a "preserve line breaks and indentation of original" option. Is there another tool that will do this for me? Because now that I have semantic inclusions, I'm really liking them. (Haven't figured out how to make it work for everything, e.g., how to include a bunch of 'constant' definitions at the top of a file, so I still need demarcation comments sometimes, but my example code is so much less cluttered with the AST-based approach.) thanks in advance 2/2

sue, to random
@sue@glasgow.social avatar

Not linking directly because I don't want to shit on projects I believe are genuinely trying to make the web better, but every time I see a post about "the small web" or a more "humane" web or whatever that includes phrases like this about content: "created without the motivation of financial gain" I sigh so deeply lol

I am begging ethical web enthusiasts to understand what an extreme privilege it is to spend time working on something without worrying about money

gvwilson,
@gvwilson@mastodon.social avatar

@sue "The trick is to do good and get paid." - George Orwell

gvwilson, (edited ) to random
@gvwilson@mastodon.social avatar

Now Tom said, "Mom, wherever there's a cop beating a guy
Wherever a hungry newborn baby cries
Where there's a fight against the blood and hatred in the air
Look for me, Mom, I'll be there"

"Wherever somebody's fighting for a place to stand
Or a decent job or a helping hand
Wherever somebody's struggling to be free
Look in their eyes, Ma, and you'll see me"

– Bruce Springsteen, "The Ghost of Tom Joad"

gvwilson, to random
@gvwilson@mastodon.social avatar

"We live on a placid island of ignorance in the midst of black seas of infinity, and it was not meant that we should voyage far."

hazelweakly, to random
@hazelweakly@hachyderm.io avatar

Tell me you're doing the GitOps thing without telling me you're doing the GitOps thing

gvwilson,
@gvwilson@mastodon.social avatar

@hazelweakly "undocumented nonsense is so fun"

gvwilson, to random
@gvwilson@mastodon.social avatar

Why is it "the dude abides" but "the dudes abide"? Wouldn't it make more sense if it was "the dude abide" (no 's' on either) and "the dudes abides" (both)? It makes no sense.

gvwilson, to music
@gvwilson@mastodon.social avatar

The Moon Loungers: "Alone Again Naturally" https://www.youtube.com/watch?v=3lt1EhiS-WY #music

gvwilson, to music
@gvwilson@mastodon.social avatar

Charles Lloyd & Norah Jones: "You Are So Beautiful" https://www.youtube.com/watch?v=9V-8tu1DVYM #music

gvwilson, to random
@gvwilson@mastodon.social avatar
gvwilson, to music
@gvwilson@mastodon.social avatar
gvwilson, to random
@gvwilson@mastodon.social avatar
gvwilson, to random
@gvwilson@mastodon.social avatar

If I was a lot smarter than I am and someone would pay my salary for a year to do the work, I would try to turn https://ferd.ca/a-distributed-systems-reading-list.html into a book of examples like https://third-bit.com/sdxpy/.

gvwilson,
@gvwilson@mastodon.social avatar

@stevel I feel that's like telling people to read the source of Python to understand how an interpreter works rather than giving them https://craftinginterpreters.com/ first

gvwilson, to random
@gvwilson@mastodon.social avatar
gvwilson, to random
@gvwilson@mastodon.social avatar

Trying again: is there a discrete event simulation framework in Python like SimPy but smaller and simpler? I'd like to understand how such things work, but SimPy itself is too big for me to understand in one gulp. If someone has a 100–200 line generator-based DES code lying around they could share, I'd be very grateful for a pointer.

gvwilson,
@gvwilson@mastodon.social avatar

@robertkern thank you

gvwilson, to music
@gvwilson@mastodon.social avatar

David Bowie: "Five Years" https://www.youtube.com/watch?v=8gPSGrpIlkc (a live version from 1972) #music

gvwilson, to music
@gvwilson@mastodon.social avatar

The Moon Loungers: "Enola Gay" https://www.youtube.com/watch?v=6NGm8dmWORA #music

grimalkina, to random
@grimalkina@mastodon.social avatar

A public service announcement with an expiration date: if you've loved my writing and science, I have a book proposal+sample chapter out on submission right now. The pitch is "The Psychology of Software Teams": a general audience, warmly human, accessible book for teams, leaders, and curious minds, filled to the brim with practitioner stories AND the new empirical social science of technology innovation. 🙌❤️

Let me know if you know editors who might be interested in this uniquely cool project.

gvwilson,
@gvwilson@mastodon.social avatar

@grimalkina very much so and I'd be happy to make an introduction

gvwilson, to random
@gvwilson@mastodon.social avatar

since it came up in conversation again today: https://third-bit.com/2024/02/25/community-norms/

gvwilson, to random
@gvwilson@mastodon.social avatar
gvwilson, to random
@gvwilson@mastodon.social avatar

who's going to SciPy in Tacoma this July?

gvwilson, to random
@gvwilson@mastodon.social avatar

I want the equivalent of 'lint' or 'ruff' for GitHub repos. Does the repo name match a pattern? Are the right issue labels set up? Et cetera. I can write a script to do this, but if it already exists, a pointer would be welcome: how do you manage the 780 repos your org has?

gvwilson,
@gvwilson@mastodon.social avatar

@paris thank you

gvwilson,
@gvwilson@mastodon.social avatar

@blakeNaccarato thank you

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