<cfbolz> Hpy doesn't have a buffer protocol yet, right?
<cfbolz> maybe we can talk to Alex about ideas how to fix the described problem?
<cfbolz> he's in #pypy usually
<fangerer> well, we could do what is suggested in the article: `mutable XOR shared`
<antocuni> I don't think it's possible to implement it in HPy though?
<antocuni> or maybe I don't understand how this "mutable XOR shared" works
<antocuni> at some level, there must be someone who checks that cannot create a shared buffer if you have a mutable buffer around (and viceversa)
<antocuni> but who enforces it? Python itself? Or each type much keep it track of it internally?
<fangerer> my idea was: buffers are usually acquired using `PyObject_GetBuffer`(HPy does not have a similar function yet). We could handle it there, right?
<fangerer> since we don't expose slots in HPy, it should not be possible to call the `getbufferproc` directly
<fangerer> if using legacy API, we cannot give guarantees
<antocuni> yes but where do you store the flag "I have a mutable buffer around"?
<fangerer> Right, noo idea, yet. Having just one flag on the type is not sufficient. We need to do it per instance. Using a dict for that seems to be slow.
<antocuni> yes exactly, it's something that must be done by the extension authors probably, not by us
<antocuni> what we might add is a way to support this mutable XOR shared thing
<antocuni> e.g. a new API which is opt-in
<antocuni> but then it's useful only if also the rest of the world uses it
<antocuni> I'm unsure that it's something that we can fix only on our side
LarstiQ has joined #hpy
Alex_Gaynor has joined #hpy
jevinskie[m] has quit [Quit: Bridge terminating on SIGTERM]
jboi has quit [Quit: Bridge terminating on SIGTERM]
ronny1 has quit [Quit: Bridge terminating on SIGTERM]
antocuni[m] has quit [Quit: Bridge terminating on SIGTERM]
jboi has joined #hpy
jevinskie[m] has joined #hpy
ronny has joined #hpy
antocuni[m] has joined #hpy
pmp-p_ is now known as pmp-p
m_qunaibit has quit [*.net *.split]
m_qunaibit has joined #hpy