cfbolz 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 | if a pep adds a mere 25-30 [C-API] functions or so, it's a drop in the ocean (cough) - Armin
<kenaan>
Yannick_Jadoul py3.7 5972be85ad6d /pypy/objspace/std/: Making sure __class_getitem__ is a classmethod, even when not annotated with @classmethod
<astronavt>
"What is missing for a full 64-bit translation
<astronavt>
" presumably
thenewandy_ has joined #pypy
thenewandy_ has left #pypy [#pypy]
<simpson>
Yeah, Win64 has quite the ABI. Somehow even crazier than Win32.
igitoor has quit [*.net *.split]
nedbat has quit [*.net *.split]
awygle has quit [*.net *.split]
thenewandy has joined #pypy
<Alex_Gaynor>
I mean, the only thing that's crazy about it from pypy's perspective is that `sizeof(long) != sizeof(void *)`
<thenewandy>
hi. If I run: "import ctypes; ctypes.CDLL(None)" in pypy (7.1.1 windows 32-bit binary downloaded today)
<thenewandy>
then the interpreter exits without any messages
<thenewandy>
I was expecting an exception to be thrown. can anyone else reproduce this?
<thenewandy>
(I'm on a corporate machine which has some garbage software running on it which can make things behave stupidly - so this may not be a pypy bug)
<mattip>
so something is off with that particular pypy. It doesn't print anything (try it in a DOS window)?
<thenewandy>
correct
<mattip>
weird
<thenewandy>
the same thing happened with a colleague, who also has the corporate garbage
<thenewandy>
if it does turn out to be the corporate garbage, then I would consider this to be a feature, as I will use this as a reason to have said garbage removed
<thenewandy>
I guess I might be able to build pypy myself and see if I can watch it in a debugger
<mattip>
ok, thanks for checking. Something is strange. Let me check on another machine (I was checking on the machine that builds the package)
<thenewandy>
ok - and please don't invest too much in this, in case it is the corporate garbage - it is software that hooks into all system calls from everythig
<thenewandy>
and has been known to have really stupid bugs (on macOS it was making global initialization functions in shared libraries run multiple times)
<mattip>
yeah, works fine on another machine. Strange. It would be nice to have a simple reproducer in C.
<mattip>
cuz running a debugger on pypy is probably not going to fly
<thenewandy>
well, I've just done it on the binary
<thenewandy>
and the stack trace is promising
<thenewandy>
the crash is in "ctiuser.dll"
<thenewandy>
which apparently is part of "Carbon Black" which is the corporate AV
<thenewandy>
not the garbage I was expecting, but a different piece of corporate garbage
<mattip>
ahh, nice. Can you use some strace equivalent to see how we are calling it differently than when you call it from the simple C program?
<thenewandy>
I'll try... I don't typically use windows much, so I'll have to do a bit of digging to find it
<thenewandy>
Exception thrown at 0x70872DB3 (ctiuser.dll) in pypy.exe: 0xC0000005: Access violation reading location 0x00000000.
<thenewandy>
that is the exception in case you are interested...
<mattip>
I wonder how the C program gets around that
<thenewandy>
my two best guesses are:
<thenewandy>
1) AV heuristics decided different checks were needed in the two cases
<thenewandy>
2) My program was whitelisted because the AV is super slow and people complained, so somehow it could tell that this was a program I built
<mattip>
hard for us to fix either of those cases from our end
<mattip>
let us know if there is something we can do
<mattip>
maybe we should detect NULL and not even try on windows ...
<thenewandy>
I don't think you should do anything - the bug seems to be in someone else's software
<kenaan>
mattip default 5605eba9586b /pypy/module/_rawffi/: test, fix CDLL(None) on win32 should raise TypeError
tsaka_ has quit [Ping timeout: 265 seconds]
ronan__ has joined #pypy
ronan__ has quit [Client Quit]
ronan__ has joined #pypy
ajlawrence has joined #pypy
zeth has joined #pypy
mental has joined #pypy
antocuni has quit [Read error: Connection reset by peer]
antocuni has joined #pypy
<zeth>
Greetings I am at a sprint being run by ronan__
<kenaan>
cfbolz py3.6 535b4f6bdd4d /pypy/: somewhat messy code to be able to give the function name in TypeErrors produced by argument parsing more consistentl...
<ajlawrence>
I tried to do space.unicode_w but it does not work. Is there something like this in pypy?
<cfbolz>
ajlawrence: is this a py3.6 branch?
<cfbolz>
space.utf8_w
ajlawrence has quit [Ping timeout: 260 seconds]
antocuni has quit [Ping timeout: 276 seconds]
Taggnostr has quit [Remote host closed the connection]
Taggnostr has joined #pypy
adamholmberg has joined #pypy
lritter_ has quit [Remote host closed the connection]
<mattip>
cfbolz: did you see my comment on 535b4f6bdd4d ?
ajlawrence has joined #pypy
<kenaan>
andrewjlawrence winconsoleio 6257428ac55f /pypy/module/_io/interp_win32consoleio.py: Switched fsdecode call to fspath following other pypy io modules
<kenaan>
daka...@gmail.com py3.7 838c4df236cd /lib-python/3/test/test_dict.py: Skip CPython specific test
antocuni has joined #pypy
abrown has joined #pypy
ronan has quit [Quit: Ex-Chat]
ronan has joined #pypy
ronan has quit [Ping timeout: 264 seconds]
<antocuni>
cfbolz: what is the name of your json branch?
dmalcolm has joined #pypy
<cfbolz>
antocuni: json-decoder-maps
<antocuni>
ok
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
<kenaan>
cfbolz py3.6 060a31354521 /pypy/interpreter/argument.py: fix translation, I think
<cfbolz>
antocuni: should I open a pull request so you can add comments there? Or just commit questions if you want
<antocuni>
cfbolz: I'm looking at the commits on my machine
<antocuni>
if you prefer comments on the PR, feel free to open it, for me it's the same
<cfbolz>
antocuni: whatever is easiest for you
<mattip>
cfbolz: thanks, looks good
<antocuni>
cfbolz: I'll do the old way then :)
<cfbolz>
antocuni: +1
ajlawrence has joined #pypy
<antocuni>
cfbolz: general comment: smaller commits would be easier to review :-/
<ajlawrence>
cfbolz: I had to do space.realunicode_w. space.utf8 produced a str object.
jcea has quit [Remote host closed the connection]
<cfbolz>
antocuni: yes, sorry. It was actually a very very experimental fork that did entirely different things
<cfbolz>
So those smaller commits would have been completely useless
<antocuni>
sure, not a real problem anyway, just a random comment :)
<cfbolz>
No, I understand it's not totally fun to review, and somewhat overengineered
<cfbolz>
The results are really good though
dansan_ is now known as dansan
<antocuni>
I'm looking at simd.py right now, can't say that I fully understand it
<antocuni>
so consider it as not-really-reviewed
<antocuni>
how much speedup does it bring?
<cfbolz>
20%
<antocuni>
just simd.py?
<cfbolz>
Yes
<antocuni>
impressive
<cfbolz>
antocuni: ok, maybe armin could look at just simd
<cfbolz>
antocuni: the mean of the speedup of the whole branch over the old decoder is something like 2.7x faster, and 2.8x faster than ujson. also, memory usage of the deserialized data structure is 4x smaller than before, 6x smaller than cpython
<antocuni>
definitely worth a blog post when it's merged
<cfbolz>
yes, on it
<cfbolz>
node is still faster though, and smaller ;-)
<antocuni>
what does it do?
<cfbolz>
antocuni: I think all its VM data structures are smaller, and saving allocation means saving quite a bit of time too, for cache and other reasons
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
ajlawrence has quit [Remote host closed the connection]
<kenaan>
antocuni json-decoder-maps 557bf35c498d /pypy/module/_pypyjson/interp_decoder.py: some review comments; more to follow
<antocuni>
cfbolz: I need to go now; I think I reviewed all the logic which is "not maps"
<antocuni>
I'll continue tomorrow, but in the meantime I pushed some comments
<cfbolz>
antocuni: awesome, thanks!
<cfbolz>
(there's no rush)
<antocuni>
bye!
marky1991 has quit [Ping timeout: 276 seconds]
tsaka_ has quit [Quit: Konversation terminated!]
antocuni has quit [Ping timeout: 268 seconds]
speeder39_ has quit [Quit: Connection closed for inactivity]
marky1991 has joined #pypy
jcea has joined #pypy
marky1991 has quit [Ping timeout: 258 seconds]
xorAxAx has quit [Quit: Idle timeout reached: 172800s]
<mattip>
ajlawrence (for the logs): space.realunicode_w should be removed. See if you can use utf82wcharp/scoped_utf82wcharp instead
<mattip>
under the covers it does utf8.decode('utf8') which we want to avoid, we really would like to avoid unicode str anywhere
xorAxAx has joined #pypy
ajlawrence has joined #pypy
Rhy0lite has quit [Quit: Leaving]
<ajlawrence>
mattip: How do I use rpython.rlib._os_support._preferred_traits to get the unicode traits without a unicode path? Is that even a sensible thing to do?
<ajlawrence>
mattip: rwin32file requires the unicode traits to provide an api to the unicode file functions.
<mattip>
yeah, that sucks. But until we refactor that I guess you have no choice.
ajlawrence has quit [Remote host closed the connection]
<mattip>
someday we should do that whole dance differently, maybe using wcharp and ccharp as keys to make the choice
ajlawrence has joined #pypy
<mattip>
someday we should do that whole dance differently, maybe using wcharp and ccharp as keys to make the choice
marky1991 has joined #pypy
<mattip>
then you could use utf82wcharp or str2charp at a point where you know what you want
<kenaan>
andrewjlawrence winconsoleio 63fa74a8e4b7 /: Fixed construction
CrazyPython has joined #pypy
ajlawrence has quit [Remote host closed the connection]