Some time ago, CF met the amazing artist Prof Havîn Al-Sîndy . She told them that she was still looking for someone to help with programming for the moving part of her upcoming installation at the Manifesta 16 in the now unused St. Josef church in Gelsenkirchen-Ückendorf. CF asked their friend Nico Rittinghaus to join in on the project. For complicated reasons, the timeline compressed immensely,…
In January I was at the excellent E-Graphs Dagstuhl where I met some really amazing people. One of the things I did during that week was to talk to Marcus Rossel and Andrés Goens about proving the soundness of Knownbits transfer functions in Lean . I don't really know any Lean, so it was really useful to have two people that know a lot about it to hold my hand through my attempts. Thanks a lot,…
While working on a paper about allocation profiling in VMProf I got curious about how quickly the RPython GC can allocate an object. I wrote a small RPython benchmark program to get an idea of the order of magnitude. The basic idea is to just allocate an instance in a tight loop: class A ( object ): pass def run ( loops ): # preliminary idea, see below for i in range ( loops ): a = A () a . i = i…
I wanted to investigate the warmup behavior of the PyPy interpreter, so I wrote a somewhat arbitrary microbenchmark: all_results = set () num = int ( sys . argv [ 1 ]) class A ( object ): pass def main (): res = 0 for i in range ( num ): a = A () a . x = i d = { "a" : a . x } l = [ 0 , 1 , d [ "a" ]] res += l [ - 1 ] all_results . add ( res ) This function is the ideal case for PyPy's JIT…
Meta Note: This post was in my draft folder for the PyPy blog for three years, and various people gave the feedback "wtf are you even talking about". Since I haven't worked on it since then I clearly am not going to fix anything about it, so I'll just post it almost unchanged to my personal blog now. RPython's meta-JIT cannot reason about the properties of many RPython implementation-level…
I mainly post on the PyPy blog , but there are sometimes things I write that don't really fit there. In 2018 and 2020 I wrote two essays about (computational) art which lived on glitch.com. Now that that is going to shut down, I decided to migrate and backdate them here, together with some shorter backdated draft posts that never really made it anywhere (or only to social media).
We don't do this regularly or anything, but every couple of years I look at how the PyPy binary sizes have developed in the meantime. Looks like an ok balance between occasionally cleaning something up and thereby shrinking the binary; and then slow growth or explicit time/binary-size-tradeoffs. This is the size of PyPy 2.7, btw. I can't use the 3.x variant, because the size of that changes due to…
I really enjoyed the two posts by Christophe Grand about Datalog, Writing the Worst Datalog Ever in 26loc and Half Dumb Datalog in 30 loc (even more than the first one), so I ended up porting them to Python. There's a bunch of differences to the Clojure versions: they are roughly twice as long use generators and thus have to environment threading somewhat differently a custom class for variables…
I was inspired by Phil Zucker's blog post Naive Automata Minimization . On Twitter he wrote : Maybe a way to actualize this is using knot tied rational trees instead of integer state ids. But this has its own confusions. I really wanted to try to implement this in SWI-Prolog. Rational Trees Rational trees are Prolog terms that are circular in some way. They can be created by unification: ?- X = f…
Somebody was Wrong on the Internet about the performance of Python, using computing Collatz sequence as a benchmark. Therefore I had to try to measure how long this takes on PyPy, with and without adding a cache for already seen numbers. Takes about 4min on my laptop for 1 billion numbers, or 30s with a cache. Code is here: