@cfbolz@mastodon.social
@cfbolz@mastodon.social avatar

cfbolz

@cfbolz@mastodon.social

PyPy/RPython contributor. Half time teaching at Uni Düsseldorf. Works on dynamic language implementations. Vegan. Love street art and art in public spaces, hiking, reading.
they/them/?

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

hugovk, to python
@hugovk@mastodon.social avatar

📣🐍📚 Calling all Python library maintainers!

Python 3.13 is now in beta, with the second of four beta releases out later today!

It's now time to start testing your libraries with 3.13 and report any problems back to CPython so they can be fixed before the big October release. And make any updates you need to upgrade your library; keep an eye out for removals and deprecations.

Here's how to test 3.13 on GitHub Actions:

https://dev.to/hugovk/help-test-python-313-14j1

#Python #Python313 #beta #GitHubActions

cfbolz,
@cfbolz@mastodon.social avatar

@hynek @hugovk I think it's mainly undermaintained (just like everything else) :-(

cfbolz, to random
@cfbolz@mastodon.social avatar

I just learned that there are floating point numbers that have non-unique (positive) square roots:

>>>> s = {4.472135954999575e-155, 4.472135954999576e-155, 4.472135954999577e-155, 4.472135954999578e-155, 4.472135954999579e-155, 4.4721359549995795e-155, 4.47213595499958e-155}
>>>> len(s)
7
>>>> {x * x for x in s}
{2e-309}

(I suppose it's obvious in hindsight, but I still didn't expect it somehow)

cfbolz, to random
@cfbolz@mastodon.social avatar

I just merged the PyPy "known bits" JIT optimization that Nico Rittinghaus and I worked on in the last two years. It allows the JIT to reason about specific bits of integer variables that are known to be 0 or 1. This makes bit-manipulation code faster, sometimes significantly so.

A concrete example of something the JIT now knows, but didn't before: if you add two even integers together, you get an even result.

cfbolz,
@cfbolz@mastodon.social avatar

Code that does a lot of bit twiddling (eg bitwise and, or, xor, shifts, etc) is not so common in Python, so this does not really help on "normal" Python benchmarks and code.

However, it helps Pydrofoil a lot, our sibling project that uses the RPython JIT to generate jitted full-system emulators for RISC-V and ARM:

https://docs.pydrofoil.org/en/latest/

e.g. booting Linux on Pydrofoil-ARM becomes 30% faster.

cfbolz, to random
@cfbolz@mastodon.social avatar

I suppose it's better than the usual news

adamchainz, to python
@adamchainz@fosstodon.org avatar

🐍♦️ Use Git to pass pytest a list of all modified test files:

pytest $(git diff --name-only '/test_.py')

Adjust the pathspec (Git’s “glob” syntax) if you have a different test file naming convention.

#Python #Git

cfbolz,
@cfbolz@mastodon.social avatar

@adamchainz I've wanted a way to do this on the individual test function level for a long time. Something like --ff but 'run changed/new tests first'

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

This is my 30 years belated realization that PHIGS was a 'graphics' pun pretending to be an acronym. I'm not sure if that makes me hate it more or less. I'm leaning towards more. The focus on PHIGS was less welcome when I read Foley and Van Dam than the chapter on dot-matrix printing which at least had some timeless "how stuff worked" appeal. Teaching specific APIs in a textbook almost never ages well.

cfbolz,
@cfbolz@mastodon.social avatar

@pervognsen heh, I read 'GC textbooks' first and was a bit confused for a second

cfbolz, to random
@cfbolz@mastodon.social avatar

Anyone now what the least bad option is to express popcount of a bitvector in Z3 is? @regehr maybe? (I tried both a naive loop as well as a bit-twiddling advanced solution. the latter worked but was on the slow side, and the loop blows up all my timeouts)

cfbolz,
@cfbolz@mastodon.social avatar

@regehr right, that's kind of what I tried but it took ages. now I'm doing the fancy bit-twiddling thing and it's faster.

(sidenote: this is the fun trick I realized this week. you can pass z3 variables to python code that does straightline bit-manipulation and it will work just fine, due to dynamic typing and operator overloading. the popcount in the screenshot works both for python ints but also happily spits out a Z3 formula)

cfbolz,
@cfbolz@mastodon.social avatar

@pervognsen @regehr yeah, ifs are a problem. It's doable with some tricks maybe, I'm still thinking about it

cfbolz, to random
@cfbolz@mastodon.social avatar

Look, someone clicked 'inspect element' on the street!

villares, to python
@villares@ciberlandia.pt avatar
cfbolz,
@cfbolz@mastodon.social avatar

@villares @melissawm great post, thanks for the link! I also thought footnote 3 was quite interesting:

gvwilson, to random
@gvwilson@mastodon.social avatar

There are things science just can't explain: https://www.youtube.com/watch?v=c1IzS2oBBN0

cfbolz,
@cfbolz@mastodon.social avatar

@gvwilson I'm not sure it's helpful for anyone but me, but at some point I drew this to try to understand it

wingo, to random

doing a big renovation/ addition project on a 90yo house. many unknowns, of both rumsfeld types. allow me to share some beliefs i have had, sequentially, over the course of 3 weeks:

  1. this house is directly plumbed to the sewer mains
  2. 1, but with interstitial 2m^3 concrete settling tank. adjacent to foundations (why?). tank was concreted over and never emptied in last 20y at least
  3. omg the tank has a leak at the bottom
cfbolz,
@cfbolz@mastodon.social avatar

@wingo this is fascinating and scary and all, we definitely do need some pictures of the excavator though

mariatta, to random
@mariatta@fosstodon.org avatar

Obvious things conference speakers should do:

  • submit a talk proposal
  • take a photo/selfie
  • write up bio
  • give the talk

Not obvious things conference speakers should do:

  • update email filter so emails from conference organizers don't end up in spam
  • when traveling, plan to arrive at Talk day - 2 days, in case of flight cancellations
  • show up at least 30 minutes before the talk slot, not 5 minutes before
  • use light mode presentation slides (light bg, dark text)

anything else?

cfbolz,
@cfbolz@mastodon.social avatar

@jacob @mariatta it goes with the bathroom part, but still wanted to mention it explicitly: wash your hands thoroughly, it helps if you get sweaty hands when you're nervous.

(also, don't drink soda before a talk, being burpy with a mic is no fun)

cfbolz, to random
@cfbolz@mastodon.social avatar

Well dressed older guy at the main station casually chatting on his Motorola Razr, unbothered by all the Discourse

cfbolz,
@cfbolz@mastodon.social avatar

@pervognsen I had one too, and same

whitequark, to random
@whitequark@mastodon.social avatar

proposal for more body-part emoji https://jschoi.org/20/body-emoji/ (via @hexylena)

heck yeah let's goooo

cfbolz,
@cfbolz@mastodon.social avatar

@whitequark @hexylena this person does a ridiculous amount of things. here's their "hobbies and interests"

I found the homepage after google gave me a random gist with lots of research on algorithms to store the unicode codepoint database more compactly: https://gist.github.com/js-choi/320275d05d6f252f6bd55199f76489a6

cfbolz, to random
@cfbolz@mastodon.social avatar

"Fixing a Bug in PyPy's Incremental GC", the promised blog post on my recent debugging Odyssey:
https://www.pypy.org/posts/2024/03/fixing-bug-incremental-gc.html

cfbolz,
@cfbolz@mastodon.social avatar

I've worked on extending the Hypothesis property-based test for PyPy's garbage collector to exercise more of the GC's features.

I've now added tests for pinning (temporarily ask the GC to not move a string around in memory, to be able to pass it to a C function) and for Python's id function (takes an object and returns an integer that stays the same over the lifetime of the object).

Of course it immediately found more mem corruption bugs :-(. they're now fixed.

will test more features still…

cfbolz,
@cfbolz@mastodon.social avatar

I've chatted with Armin Rigo a bunch in the last weeks (author of Psyco, part of the group of people who started PyPy) and was whining about the GC problems, he then sent me this 😂🤷‍♀️

(source: https://addictivescience.kemono.cafe/comic/computer-science/ clearly predicted by Kafka)

ltratt, to random
@ltratt@mastodon.social avatar

An excellent debugging story from inside a garbage collector (always tough bugs!) from https://mastodon.social/@cfbolz https://www.pypy.org/posts/2024/03/fixing-bug-incremental-gc.html

cfbolz,
@cfbolz@mastodon.social avatar

@ltratt in the meantime I also found https://github.com/silentbicycle/autoclave which I am finding quite nice

(I still wonder whether the slight randomization that multitime does is helpful)

cfbolz,
@cfbolz@mastodon.social avatar

@dcreager @ltratt heh, I actually have used pytest, cffi and hypothesis to test C libraries. Works really well actually

cfbolz, to random
@cfbolz@mastodon.social avatar

I just merged my PyPy garbage collector bug fixes! Detailed blog post about the whole saga coming tomorrow (at first I thought I'd write a thread, but now it's like 4000 words long 😌).

Unfortunately in the process we discovered that there is as least one other unrelated GC bug still at large. Need to work on that one next.

cfbolz, to random
@cfbolz@mastodon.social avatar

autoclave: commandline tool that re-runs a command until it fails, with some convencience functions for log rotation, timeouts, starting debugger at the point of failure, etc.

https://github.com/silentbicycle/autoclave

Thanks @tekknolagi for pointing me to it!

(the debuggingposting will continue until the fix is merged)

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