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
BPL has quit [Quit: Leaving]
Rhy0lite has quit [Quit: Leaving]
lritter has quit [Ping timeout: 240 seconds]
lritter has joined #pypy
Smigwell has left #pypy [#pypy]
forgottenone has joined #pypy
dddddd has quit [Ping timeout: 240 seconds]
dnshane has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
dddddd has joined #pypy
dnshane has joined #pypy
forgottenone has quit [Quit: Konversation terminated!]
jcea has quit [Quit: jcea]
oberstet has joined #pypy
forgottenone has joined #pypy
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5419 [arigo: force build, py3.6]
<bbot2> Exception: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5419 [arigo: force build, py3.6]
forgottenone has quit [Ping timeout: 256 seconds]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5420 [arigo: force build, py3.6]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5420 [arigo: force build, py3.6]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5421 [arigo: force build, py3.6]
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5421 [arigo: force build, py3.6]
<bbot2> Started: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5422 [arigo: force build, py3.6]
<mattip> arigo: sorry, thanks
<mattip> I didn't realize you were working on windows
<arigo> NP
<arigo> yes, I'm fixing windows calling convensions with cffi, which were hopelessly broken
<arigo> also with cffi on cpython
<arigo> but now fixing the same with cffi on pypy
<arigo> not that libffi is sane on linux, I also know of one corner case signature that isn't called correctly
<arigo> but at least I can just blame libffi for that
<arigo> (I can't run the cffi tests on pypy2 on Windows, something about "please install version 14.2 of C++", but it works on pypy3 so that's good enough)
<mattip> I think you can force the version of msvc by running in a "Developer Command Prompt" dos cmd.exe
<mattip> so that the compiler is already set up
lritter has quit [Quit: Leaving]
todda7 has quit [Quit: Konversation terminated!]
todda7 has joined #pypy
_whitelogger has joined #pypy
todda7 has quit [Ping timeout: 272 seconds]
dddddd has quit [Ping timeout: 256 seconds]
dddddd has joined #pypy
<bbot2> Failure: http://buildbot.pypy.org/builders/pypy-c-jit-win-x86-32/builds/5422 [arigo: force build, py3.6]
<arigo> OK, seems to work now (on pypy3)
<arigo> mattip: could you maybe help me with https://foss.heptapod.net/pypy/pypy/-/issues/3253#note_141534 ?
<mattip> with "time.sleep(100) can be interrupted normally with a Ctrl-C on PyPy2, but for some reason not on PyPy3" ?
<mattip> yes, but it may take a few days
<arigo> more specifically, how do I get a debug build of pypy3 on windows
<arigo> "nmake" seems to stop with no error
<mattip> nmake -f Makefile <target>
<arigo> well with no error printed, but the job not done
<mattip> after nmake -f Makefile clean
<arigo> ah, thanks
<mattip> i find it more productive to use printf since the debugging experience is so horrible on windows, but ymmv
<mattip> especially when threads are involved
<mattip> btw, does it work on pypy2 with a msvc after visual 2008? Maybe something about the compiler/runtime?
<arigo> the code is very different between pypy2 and pypy3 (same as between cpython2 and cpython3)
<mattip> ahh
<arigo> mattip: OK, compilation (with a simple "pypy rpython") ends up failing with:
<arigo> rpython_translator.obj : error LNK2011: precompiled object is missing in link editing; the image risks not executing
<arigo> libpypy3-c.dll : fatal error LNK1120: 1 unresolved externs
<mattip> I admit I did not ever try debug build after I added the precompile stuff
<arigo> this is not even a debug build yet
<arigo> just a plain "pypy.exe rpython"
<arigo> (which works on the buildbot, so it must be me not having exactly the same version of the compiler or something)
todda7 has joined #pypy
<arigo> there is no information whatsoever in addition to what I pasted above, so I can't start to have a clue
<arigo> (e.g. "1 unresolved externs"---which one? can I have at least a name? no)
<mattip> maybe something messed up with the externals ? You need to "hg checkout win32_160" in the pypy\externals subrepo
<mattip> then add x:\full\path\to\pypy\externals\include to the INCLUDE env variable
<mattip> and same with LIB
<arigo> says we need to include the "file.obj" in the link command
<arigo> in this case, stdafx.obj
<mattip> it appears in the buildbot Makefile
<arigo> it fixes my problem if I add "stdafx.obj" on the link command in the Makefile
<mattip> line 1087
<arigo> the buildbot logs contain "jom.exe"
<arigo> OK, where is that from?
<mattip> if you install jom it builds on more than one core instead of nmake
<arigo> and maybe it then produces a different Makefile?
<mattip> stdafx.obj comes from translation/platform/windows.py line 469
<mattip> I only changed that this week, so the buildbot was running with plain nmake last week
<mattip> s/that/to jom.exe/
<arigo> "ah"
<arigo> I bet that's because self.version == 0
<mattip> ?
<arigo> and I bet that's, in turn, because running "cl.exe" gives an output in french here
<mattip> gaa
<arigo> so using regexps on the output of "cl.exe" looks like it won't work
<mattip> seems fragile. Sorry
<arigo> yes, it outputs "Compilateur d'optimisation Microsoft (R) C/C++ version 19.16.27034 pour x86"
<arigo> and that doesn't match the regexp which seems to search for Microsoft C/C++ without the "(R)" in the middle
<mattip> we should just get rid of those self.version checks in there, we don't support < 80 anyway
<arigo> OK, easy fix
Rhy0lite has joined #pypy
<arigo> cool, now VC's debugger works nicely on a debug build
<arigo> OK there are two copies of the function CtrlHandlerRoutine
<arigo> in module_8.c and in module_15.c
<arigo> each one sets its own copy of "static HANDLE interrupt_event"
<arigo> I bet we set one of them and check the other
<arigo> I have no clue why link.exe doesn't complain
<arigo> no, module_8 is not present in the Makefile
<arigo> the file is there but not used
<mattip> strange
jcea has joined #pypy
<mattip> I was having a hard time getting the code that instantiates the interrupt handler to run when I worked on module/_io/interp_win32consoleio.py
<mattip> I ended up importing sleep from interp_time
<arigo> I'm seeing a difference
<arigo> with cpython 3.6
<arigo> in cpython 3.6, they call SetConsoleCtrlHandler(foo, TRUE) where foo is a function that does nothing and return TRUE
<arigo> in pypy3 that function sets the interrupt_event and returns FALSE
<arigo> in cpython3.6, the interrupt_event is set elsewhere, in the signal module
<arigo> when receiving a SIGINT
<arigo> I tried to put a breakpoint in our function that sets the interrupt_event, and it's not called by ctrl-c
<arigo> at least not while the program is sleep()ing
<arigo> I know nothing about interp_win32consoleio.py though
<arigo> should I still try to follow CPython's logic?
<mattip> win32consoleio is disabled anyway for now
<arigo> ah OK
<mattip> so IMO following CPython is probably the safest path
todda7 has quit [Ping timeout: 240 seconds]
<arigo> success
<mattip> whohoo
<arigo> :-)
<mattip> I wonder how much C code in CPython is shared by windows and posix and how much has totally diverged
rubdos_ has joined #pypy
rubdos has quit [Ping timeout: 260 seconds]
Taggnostr has quit [Ping timeout: 244 seconds]
Taggnostr has joined #pypy
BPL has joined #pypy
Dejan has quit [Quit: Leaving]
todda7 has joined #pypy
todda7 has quit [Quit: Konversation terminated!]
todda7 has joined #pypy
<mattip> If you look at the weekly numpy wheel builds https://anaconda.org/scipy-wheels-nightly/numpy/files
<mattip> you will see a pp36-pypy36_pp73-win32.whl build. It passes all the current NumPy tests.
<mattip> that joins the x86_64 one, which was already released to PyPI
todda7 has quit [Read error: Connection reset by peer]
tsaka__ has joined #pypy
tsaka__ has quit [Ping timeout: 272 seconds]
<cfbolz> woooo
<mattip> not quite on PyPI yet, but it does provide an easy avenue for the "how do I install on windows" question
tsaka__ has joined #pypy
BPL has quit [Ping timeout: 256 seconds]
tsaka__ has quit [Read error: Connection reset by peer]
BPL has joined #pypy
tsaka__ has joined #pypy
todda7 has joined #pypy
tsaka__ has quit [Ping timeout: 265 seconds]
todda7 has quit [Ping timeout: 256 seconds]
speeder39_ has joined #pypy
_whitelogger has joined #pypy
speeder39_ has quit [Quit: Connection closed for inactivity]
BPL has quit [Quit: Leaving]