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
Ai9zO5AP has quit [Quit: WeeChat 2.4]
ceridwen has joined #pypy
ceridwen has quit [Changing host]
ceridwen has joined #pypy
jcea has joined #pypy
omry has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
forgottenone has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
jacob22 has joined #pypy
dddddd has quit [Remote host closed the connection]
jcea has quit [Remote host closed the connection]
jcea1 has joined #pypy
jcea1 is now known as jcea
zmt00 has quit [Quit: Leaving]
zmt00 has joined #pypy
tsaka_ has joined #pypy
tsaka_ has quit [Ping timeout: 245 seconds]
dansan has quit [Read error: Connection reset by peer]
dansan has joined #pypy
dansan_ has joined #pypy
dansan has quit [Ping timeout: 272 seconds]
dansan has joined #pypy
omry has quit [Ping timeout: 256 seconds]
dansan_ has quit [Ping timeout: 252 seconds]
speeder39_ has joined #pypy
Ai9zO5AP has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
tsaka_ has joined #pypy
antocuni has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
Zaab1t has joined #pypy
dansan has quit [Ping timeout: 252 seconds]
lritter has joined #pypy
tsaka__ has joined #pypy
tsaka_ has quit [Ping timeout: 268 seconds]
Zaab1t has quit [Remote host closed the connection]
antocuni has quit [Ping timeout: 248 seconds]
forgottenone has joined #pypy
xcm has quit [Remote host closed the connection]
<mattip> at some point in cpython, type(c-api function) becomes "function"
<mattip> even though PyCFunction_tp_name is "builtin_function_or_method"
xcm has joined #pypy
mvantellingen has quit [Ping timeout: 252 seconds]
mvantellingen has joined #pypy
dddddd has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
antocuni has joined #pypy
adamholmberg has joined #pypy
Rhy0lite has joined #pypy
<mattip> wrong analysis. The issue is that we have 3 types: app-level python "function",
<mattip> rpython-level python function "builtin_function"
<mattip> and c-api "builtin_function_or_method"
<mattip> so a c-api function fails 'type(a) is types.BuiltinFunctionType'
<cfbolz> :-(
<mattip> if we wish 'type(a) is types.BuiltinFunctionType' to succeed for both a c-api function and something like len(),
<mattip> we need to cheat somehow
<cfbolz> mattip: we could probably cheat in pypy, because it's ok to have two different RPython classes that map to the same applevel class. eg we do that for W_IntObject and W_LongObject, which are both app-level type `int` in PyPy3. But's it's a bit of work
<cfbolz> mattip: is that the cause of one of the issues?
<mattip> I think so, I used the same version of numpy on both cpython and pypy and if I replace np.where for "a" a
<mattip> above, I get the failure
<mattip> in the 'types' module there is 'BuiltinFunctionType = type(len)'
<mattip> issue 3025 checks equivalence 'type(np.where) is types.BuiltinFunctionType',
<mattip> so the cheat would have to force type(len) and type(np.where) to be equivalent
<mattip> ahh, indeed w_long inherits from w_int, "class W_AbstractLongObject(W_AbstractIntObject):"
Zaabtop has joined #pypy
<antocuni> mattip: I think that the app-level type can be the same even if the rpython-type are unrelated
Zaabtop has quit [Client Quit]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<mattip> is it OK to change BuiltinFunction's typedef name from "builtin_function" to "builtin_function_or_method" ?
<mattip> strange this is the first time this issue has surfaced
<antocuni> why do you need to change the name?
<mattip> for compliance with cpython
<mattip> on cpython, type(len) -> "<type 'builtin_function_or_method'>"
<mattip> on pypy, "<type 'builtin_function'>"
<antocuni> ah I see
<antocuni> and CPython doesn't have a "<type 'builtin_function'>" at all. I wonder why we chose to change the name then
<mattip> maybe we started off the same then they changed it and we never caught up
<antocuni> I think the reason is that in pypy, they are never actually used for methods
<antocuni> e.g. type(dict.fromkeys), it's an instancemethod on pypy, a builtin_function_or_method on CPython
<antocuni> so the "_or_method" part is basically a lie on PyPy; but still, I don't see why to introduce an unnecessary difference in the name
<mattip> the name difference doesn't appear here http://doc.pypy.org/en/latest/cpython_differences.html
<antocuni> yes, already checked that
<antocuni> I think it is safe to change
<antocuni> but I wonder if I am missing anything
<mattip> the line with the name (in Objects/methodobject.c, PyCFunction_Type) in CPython came from a commit in 1992 :)
* mattip creating a branch
<antocuni> may I complain that going to EuroPython in Switzerland is incredibly expensive? :(
kipras has quit [Ping timeout: 272 seconds]
forgottenone has quit [Quit: Konversation terminated!]
<cfbolz> antocuni: it's in basel?
<antocuni> yes
<cfbolz> right :-(
<mattip> someone was complaining speakers don't really get a discount
<antocuni> 25% discount, but even with that it's still ~300 €
<cfbolz> they rarely do in python conferences
<antocuni> plus other ~350€ for an airbnb shared with armin and ronan
<antocuni> and the one-way train is other 120
<antocuni> I can afford it of course, but still
tsaka_ has joined #pypy
tsaka__ has quit [Ping timeout: 258 seconds]
tsaka_ has quit [Ping timeout: 272 seconds]
xcm has quit [Remote host closed the connection]
tsaka_ has joined #pypy
xcm has joined #pypy
tsaka_ has quit [Ping timeout: 248 seconds]
antocuni has quit [Ping timeout: 258 seconds]
agronholm has quit [Ping timeout: 252 seconds]
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
agronholm has joined #pypy
forgottenone has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Rhy0lite has quit [Quit: Leaving]
lritter has quit [Ping timeout: 248 seconds]
kipras has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
speeder39_ has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
ssbr has joined #pypy
dansan has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
jacob22_ has joined #pypy
jacob22 has quit [Read error: Connection reset by peer]
Ai9zO5AP has quit [Quit: WeeChat 2.4]
adamholmberg has quit [Remote host closed the connection]
glyph has quit [Quit: End of line.]
glyph has joined #pypy
jcea has quit [Remote host closed the connection]
jacob22_ has quit [Read error: Connection reset by peer]
jacob22_ has joined #pypy