arigato changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end ) | use cffi for calling C | mac OS and Fedora are not Windows
fryguybo1 has quit [Read error: Connection reset by peer]
fryguybob has joined #pypy
senyai_ has joined #pypy
senyai has quit [Ping timeout: 268 seconds]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
speeder39_ has joined #pypy
jcea has quit [Quit: jcea]
PileOfDirt has quit [Remote host closed the connection]
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
jacob22 has quit [Ping timeout: 268 seconds]
speeder39_ has quit [Quit: Connection closed for inactivity]
forgottenone has joined #pypy
xcm has quit [Read error: Connection reset by peer]
xcm has joined #pypy
dddddd has quit [Remote host closed the connection]
jacob22 has joined #pypy
forgottenone has quit [Ping timeout: 245 seconds]
runciter is now known as glup
glup is now known as runciter
Remi_M has quit [Ping timeout: 245 seconds]
Remi_M has joined #pypy
_whitelogger has joined #pypy
Arfrever has quit [Quit: 御出で]
Remi_M has quit [Ping timeout: 255 seconds]
Remi_M has joined #pypy
Ai9zO5AP has joined #pypy
<fijal> that might be a bit of a headache
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
lazka has joined #pypy
forgottenone has joined #pypy
<lazka> fijal, looks like it's mainly in Python + a bit for C for wrapping two shm_xxx funcs
Zaab1t has joined #pypy
senyai_ has quit [Quit: Leaving]
senyai_ has joined #pypy
antocuni has joined #pypy
Zaab1t has quit [Client Quit]
senyai_ has quit [Client Quit]
senyai has joined #pypy
<fijal> lazka: how do they sotre unicode data there?
<fijal> I haven't looked
<lazka> fijal, looks like it's hardcoded to utf-8
<fijal> and you communicate where is what out-of-band?
<lazka> no clue. just wanted to say that it might not be a such a headache for pypy as you said :)
<mattip> ... until people start randomly passing buffers between cpython and pypy
ambv has joined #pypy
commandoline has quit [Ping timeout: 245 seconds]
Graypup__ has joined #pypy
commandoline has joined #pypy
senyai has quit [Ping timeout: 245 seconds]
Graypup_ has quit [Ping timeout: 245 seconds]
irclogs_io_bot has quit [Ping timeout: 245 seconds]
irclogs_io_bot has joined #pypy
pepesza has quit [Ping timeout: 255 seconds]
pepesza has joined #pypy
<fijal> lazka: good
<fijal> lazka: I would enjoy if it's done better than I thought originally, but you can see why I'm skeptical
jacob22_ has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
froztbyte has quit [Ping timeout: 240 seconds]
lazka has quit [Ping timeout: 255 seconds]
ambv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
k1nd0f has joined #pypy
Zaab1t has joined #pypy
k1nd0f has quit [Ping timeout: 272 seconds]
Zaab1t has quit [Ping timeout: 272 seconds]
senyai has joined #pypy
ambv has joined #pypy
ambv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ambv has joined #pypy
k1nd0f has joined #pypy
antocuni has quit [Ping timeout: 250 seconds]
lritter has joined #pypy
ambv has quit [Quit: Textual IRC Client: www.textualapp.com]
Zaab1t has joined #pypy
fryguybo1 has joined #pypy
xcm has quit [Killed (livingstone.freenode.net (Nickname regained by services))]
inhahe_ has joined #pypy
xcm has joined #pypy
Zaabtop has joined #pypy
sknebel_ has joined #pypy
inhahe has quit [Ping timeout: 246 seconds]
sknebel has quit [Ping timeout: 246 seconds]
dante has quit [Ping timeout: 246 seconds]
commandoline_ has joined #pypy
Zaab1t has quit [Ping timeout: 255 seconds]
commandoline has quit [Ping timeout: 255 seconds]
marvin_ has quit [Ping timeout: 255 seconds]
fryguybob has quit [Ping timeout: 255 seconds]
tazle has quit [Ping timeout: 255 seconds]
dmalcolm has quit [Ping timeout: 255 seconds]
Zaabtop is now known as Zaab1t
tazle has joined #pypy
marvin has joined #pypy
dante has joined #pypy
dmalcolm has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
dddddd has joined #pypy
lritter has quit [Ping timeout: 246 seconds]
lritter has joined #pypy
fryguybo1 has quit [Quit: leaving]
fryguybob has joined #pypy
sknebel_ is now known as sknebel
lritter has quit [Remote host closed the connection]
lritter has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Ping timeout: 250 seconds]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<arigato> Alex_Gaynor: can I release cffi 1.12.2? no changes apart from a workaround to compile against the current prerelease of cpython 3.8
<Alex_Gaynor> arigato: I can do wheel builds ATM, but I can't upload them (pypi password isn't on this computer)
<arigato> it's fine if I can download them and "twine" them up myself
<Alex_Gaynor> 👍
<Alex_Gaynor> let me know when it's time to do the build
Zaab1t has joined #pypy
k1nd0f has quit [Ping timeout: 246 seconds]
<kenaan> arigo cffi/cffi 6b31f9a47c79 /: bump version number to 1.12.2
marky1991 has quit [Ping timeout: 255 seconds]
jcea has joined #pypy
<kenaan> arigo cffi/cffi 2224b65a8b65 /doc/source/whatsnew.rst: document
<kenaan> arigo cffi/cffi[release-1.12] 2c4239852fde /: hg merge default
<arigato> Alex_Gaynor: now
<kenaan> cfbolz py3.6 dca96cba7aee /pypy/objspace/std/: fix behaviour of Σ in combination with title
<kenaan> cfbolz default 5512e76a8a54 /rpython/rlib/: Utf8StringPosIterator to iterate over character, position pairs
<kenaan> cfbolz py3.6 ff451dfc00d9 /: merge default
<kenaan> cfbolz py3.6 f2a689373046 /pypy/objspace/std/unicodeobject.py: make performance of lower/upper/title/swapcase not terrible for strings containing Σ
<arigato> thanks
<arigato> done! thanks
<Alex_Gaynor> np
<kenaan> arigo cffi/cffi[release-1.12] e0c76668ecf5 /doc/source/installation.rst: md5/sha
<kenaan> arigo cffi/cffi 3f7e50919c84 /doc/source/installation.rst: hg merge release-1.12
<kenaan> arigo cffi/cffi[release-1.12] 85148822c1f5 /.hgtags: Added tag v1.12.2 for changeset e0c76668ecf5
<kenaan> arigo cffi/cffi d765c36df047 /.hgtags: hg merge release-1.12
k1nd0f has joined #pypy
Zaab1t has quit [Quit: bye bye friends]
Rhy0lite has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
froztbyte has joined #pypy
froztbyte has joined #pypy
froztbyte has quit [Changing host]
antocuni has joined #pypy
<kenaan> mattip py3.6 f9760faab53a /: make posix2 tests run to completion on win32
<kenaan> mattip default 25b25fdd6d5c /: test, fix for win32. The asserts should be py3.6 only, and theny point to unfinished utf8 changes
<kenaan> mattip py3.6 a16d58959cb9 /: merge default into branch
<kenaan> mattip py3.6 ea62fc146783 /rpython/rlib/rposix.py: redo unicode assert, this should use utf8 instead
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
<mattip> antocuni: ping
<mattip> antocuni: have you tried the multilinux2010 docker for building wheels?
marky1991 has quit [Read error: Connection reset by peer]
marky1991_2 has joined #pypy
marky1991_2 has quit [Read error: Connection reset by peer]
marky1991_2 has joined #pypy
marky1991_2 has quit [Read error: Connection reset by peer]
marky1991_2 has joined #pypy
<antocuni> mattip: nope, I'm just back from vacation and didn't have a chance to do anything yet
marky1991_2 has quit [Ping timeout: 255 seconds]
speeder39_ has joined #pypy
marky1991_2 has joined #pypy
<mattip> ok. I am thinking of proposing it for vanilla numpy, wanted to learn from your experience
k1nd0f has quit [Ping timeout: 244 seconds]
k1nd0f has joined #pypy
TsundereChen has joined #pypy
marky1991_2 has quit [Remote host closed the connection]
marky1991_2 has joined #pypy
Zaab1t has joined #pypy
<arigato> Alex_Gaynor: someone reports that the Windows builds for 1.12.1 and 1.12.2 are different (requires Microsoft Visual C++ 14.0)
<arigato> does this make any sense?
<Alex_Gaynor> arigato: I don't think we changed anything about those machines in the last few weeks? /cc reaperhulk
<arigato> ah
<Alex_Gaynor> Besides installing regular Windows security patches probably
<arigato> maybe he was just trying at exactly the wrong time
<arigato> and the binaries were not uploaded yet
<Alex_Gaynor> Ahh, seems possible
<cfbolz> mattip: nope, it doesn't, fix coming
<kenaan> cfbolz default 2a3bb59a81cb /rpython/rlib/rutf8.py: inlining breaks
<kenaan> cfbolz py3.6 243d81c93b41 /rpython/rlib/rutf8.py: merge default
<kenaan> cfbolz py3.6 ec74b34bb0fb /: merge
<kenaan> cfbolz default dbdf453749f7 /rpython/rlib/rutf8.py: merge
Zaab1t has quit [Quit: bye bye friends]
antocuni has quit [Ping timeout: 264 seconds]
<cfbolz> finally managed to make test_unicodedata.py pass
<mattip> yay
speeder39_ has quit [Quit: Connection closed for inactivity]
tazle_ has joined #pypy
marvin has quit [Ping timeout: 255 seconds]
tazle has quit [Ping timeout: 255 seconds]
commandoline_ has quit [Ping timeout: 246 seconds]
lritter has quit [Ping timeout: 255 seconds]
commandoline has joined #pypy
marvin has joined #pypy
dddddd has quit [Ping timeout: 255 seconds]
dddddd has joined #pypy
lritter has joined #pypy
k1nd0f has quit [Quit: Leaving]
Rhy0lite has quit [Quit: Leaving]
<Hodgestar> @cfbolz & anyone else thinking about the Cython-IR project (or similar things): Some miscellaneous thoughts / questions --
<Hodgestar> So I'm trying to clarify the goal for myself, which led to some questions.
<Hodgestar> So the first question is why do people really use Cython over say just C extensions or CFFI?
<fijal> because they are numeric people, that's one thing
<fijal> two, it's hard to do numpy in cffi
<Hodgestar> Conceptually its a complex interface from a Python-esque language to building C extensions with a bunch of calls back into the Python C API.
<fijal> three, performance on cpython matters
<Hodgestar> Which is a bit messy.
<Hodgestar> Buy-in from the community is certainly one issue.
<Hodgestar> And one does need C extensions of some sort to make CPython fast in cases it isn't (at least there aren't currently other options).
<Hodgestar> I would agree that Cython is arguably less crazy than heavily calling the C API directly (at least one doesn't have to learn a billion new functions).
<Hodgestar> I am also wondering a bit about the interface though. The learning curve for CFFI can be a bit steep (relatively) compared to being able to cut and paste a small Cython example into a Jupyter notebook.
<kenaan> cfbolz py3.6 2eeaa559be67 /pypy/interpreter/unicodehelper.py: more places that give the name of the encoding as 'utf8'
<fijal> cffi requires you to know C
<cfbolz> Hodgestar: cython is much much easier than getting refcounting right in C
<Hodgestar> cfbolz: Agreed.
<fijal> cfbolz: right, but why over cffi
<fijal> I don't think anyone here ponders why writing C API directly is a bad idea
<Hodgestar> So I think the other important part is the calls back into Python land.
<cfbolz> in cython you can create new data structures that need complicated fast algorithms, which is not really possible in cffi
<Hodgestar> For this to ever be fast in PyPy I imagine the IR would have to explain what those calls are supposed to do in Python itself (rather than what should happen at the CPython C API level).
<Hodgestar> cfbolz: I disagree a bit about that if the data structures are implemented purely in C?
<cfbolz> yes, but then they need to reference back to python objects, which is a mess
<cfbolz> not that much fun in cffi
<Hodgestar> Agreed. And not going to be fast on PyPy or other VMs anyway.
<fijal> it can be fast on pypy, I think
<fijal> but not on cpython
<fijal> (anyway, it's irrelevant whether it can or cannot be fast on pypy)
<Hodgestar> What this sort of implies for the IR is some sort of low-level language interleaved with Python code?
<fijal> yeah
<Hodgestar> With the idea that maybe something like a JIT could understand both and JIT across the boundary (so like a much more crazy version of what happens with regexes).
<fijal> I can imagine a mix of bytecodes that operate on python objects, C-level objects and wrapping/unwrapping
<fijal> so say
<fijal> o_1 = newint(13)
<Hodgestar> And a CPython version would need to compile both into a C extension with no real Python? Maybe it could do some sort of eval on things it didn't understand.
<fijal> o_2 = py_add(o_1, o_1)
<fijal> i_1 = unwrap_int(o_2)
<fijal> int_add(i_1, 13)
<fijal> I think the CPython version would compile with cython or something similar
<fijal> so really a mix of a+b and PyObject_Add(o1, o2)
<Hodgestar> Would it make any sense to put the Python part of the IR at more of the Python bytecode level? (or was that already what you were thinking)
<Hodgestar> cfbolz: I think I missed before that when you talk about complex data structures, you're thinking specifically of things like btrees or hashes that *link back to Python objects*.
<cfbolz> yes
jcea has quit [Remote host closed the connection]
<Hodgestar> So there one has the additional problem that PyPy would like to be able to know there is a reference to those & be able to move them around ideally.
<cfbolz> yep
<Hodgestar> Which maybe means the IR needs to contain the PyHandle idea in some form?
<Hodgestar> Or I guess the bit that uses the IR could do that if the IR is sufficiently clear on what is happening.
jcea has joined #pypy
<cfbolz> Hodgestar: as long as PyPy really executes the IR itself, it's all fine
<Hodgestar> Aside: Hmm. I'm wondering if one can handle the complex data structures over Python object case nicely in CFFI by passing in handles / IDs to the C side and then looking them up on the way back.
<Hodgestar> cfbolz: Yep, as long as the IR is really at the Python level and not the CPython C API level.
<cfbolz> it has to be, anyway
* Hodgestar nods.
<Hodgestar> cfbolz: How are you feeling about the WebASM as IR suggestion?
<cfbolz> -1
<cfbolz> that adds yet another layer of external constraints
<mattip> one of the things cython has going for it is "ctypedef"
<mattip> to convert python object attributes to a struct field
<mattip> users don't even know that array.shape becomes pure C code in cython, no python C-api involved
<nanonyme> Regarding the earlier mentioned hypothetical CFFI backend for Cython, I guess it would there generate that stuff which is mentioned in CFFI API as "purely for performance"? :)
<Hodgestar> nanonyme: Yes, one could add chunks of C in set_source. Not sure how much of the problem it would solve. Certainly dumping an entire C extension in there would not be that useful. One could imagine putting in code that didn't call the C API much, but that brings us back to the problem of crossing forwards and backwards between Python and C.
<Hodgestar> nanonyme: I do wonder if there was, e.g., a way to create small functions like that with CFFI easily whether people would find it useful.
<Hodgestar> cfbolz: Back to WebASM -- it's a big hammer, but it does at least appear to attempt to solve some similar problems and to have succeeded.
<cfbolz> no, it doesn't solve the hard parts at all
<cfbolz> the integration with javascript is very rudimentary
<Hodgestar> Ah. So WebASM -> Javascript is also slow? :/
<cfbolz> yes
<cfbolz> anyway, we need a good bridge <lowlevel code> <-> python
<cfbolz> not <-> js
<Hodgestar> They did get a lot faster at the end of last year.
<cfbolz> Hodgestar
<cfbolz> are you sure about the js integration getting faster?
<Hodgestar> (I'm not actually pushing the WebASM option here -- it looks yet another big and complicated piece to add to the picture -- but I'm exploring for the moment).
<cfbolz> Hodgestar: I talked to the V8 people in july, so maybe my knowledge is out of date, and v8 specific
<cfbolz> Hodgestar: but eg there is no GC integration between WebASM memory (which is all a big array) and js objects
<Hodgestar> I think WebASM can ask for more memory, but yes, the model does seem to be "give me another page of memory".
<Hodgestar> The simplified shared memory does actually look attractive, although likely that's a ship that's completely sailed for Python?
<Hodgestar> (maybe this was similar to mattip's "make everything a buffer" suggestion?)
<Hodgestar> I am off to sleep for now (still recovering from a nasty bug that flattened me yesterday and most of today).
forgottenone has quit [Quit: Konversation terminated!]
marky1991_2 has quit [Ping timeout: 250 seconds]
Ai9zO5AP has quit [Quit: WeeChat 2.3]
demonimin has quit [Quit: bye]
dan- has quit [Ping timeout: 258 seconds]
demonimin has joined #pypy
jacob22_ has quit [Remote host closed the connection]
jacob22 has joined #pypy
dan- has joined #pypy
dan- has quit [Changing host]
dan- has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
jcea has quit [Read error: Connection reset by peer]
<njs> I think "stick python bytecode and webasm into a blender" is a reasonable caricature of what we need
<njs> but it's only a caricature. there are a lot of important details :-)
lritter has quit [Ping timeout: 258 seconds]