cfbolz changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "the modern world where network packets and compiler optimizations are effectively hostile"
<nimaje>
gcc_: like in most buildsystems setting CC should work
cstratak has quit [Quit: Leaving]
cstratak has joined #pypy
cstratak has quit [Quit: Leaving]
cstratak has joined #pypy
oberstet has quit [Ping timeout: 260 seconds]
gcc_ has quit [Ping timeout: 260 seconds]
antocuni has quit [Ping timeout: 240 seconds]
gcc_ has joined #pypy
<gcc_>
Hello! How does one specify the version of gcc to use when building PyPy? Thanks!
<nimaje>
gcc_: like in most buildsystems setting CC should work
oberstet has joined #pypy
<mihneas>
Hello,does anyone know why a ctypes Structure can`t have a duplicate field name , because on Cpython it does .
kipras`away is now known as kipras
gcc_ has quit [Ping timeout: 260 seconds]
<LarstiQ>
mihneas: how do you mean?
<mihneas>
When I run this https://pastebin.com/atTeR9Nw I,ve got "ValueError: duplicate field name a" and on Cpython it works with no error
<mihneas>
This error is raised from pypy/module/_rawffi/structure.py line 165
jeroud has quit [Ping timeout: 246 seconds]
jeroud has joined #pypy
nimaje1 has joined #pypy
nimaje1 is now known as nimaje
mihaid has joined #pypy
<mihaid>
Hello! Sorry to bother you guys but I was working on fixing the last errors (from the buildbots) on sendmsg / recvmsg, and I encountered a problem. In lib_python/3/test/_test_multiprocessing_with_forksever I encountered a ctypes error (not related with sendmsg/ recvmsg, but interesting none the less). I think it means that ctypes structures cannot
<mihaid>
be copied, but I am not sure how deal with this, so any advice would be useful. More details here: https://pastebin.com/sKyrU7iG
MarkMangoba has quit [Ping timeout: 255 seconds]
<LarstiQ>
mihneas: right, can you file a bug about that?
MarkMangoba has joined #pypy
<LarstiQ>
mihaid: hmm, that test comes straight from cpython?
<fijal>
mihneas: please file a bug, but also any reason to use ctypes over cffi?
<mihneas>
@LarstiQ I will do that
<mihaid>
@LarstiQ yes, it is included in the regression test suite I believe. Anyway, it originally popped up on one of the build bots as an error.
cstratak has quit [Remote host closed the connection]
<mihneas>
@fijal I want to implement the _swappedbytes_ for Little/Big endian structure and I want to make ctypes/test/test_byteswap.py pass all the tests.
<fijal>
oh ok
vkirilic_ has quit [Remote host closed the connection]
vkirilichev has joined #pypy
cstratak has joined #pypy
<LarstiQ>
mihneas: is that possibly a 3.5/3.6 change wrt 3.4?
<mihneas>
@LarstiQ Actually this is a problem I found for 2.7
Rhy0lite has joined #pypy
jcea has joined #pypy
inad922 has quit [Ping timeout: 240 seconds]
marky1991 has joined #pypy
vkirilichev has quit [Remote host closed the connection]
marr has quit [Ping timeout: 268 seconds]
pedronis has quit [Ping timeout: 240 seconds]
pedronis has joined #pypy
antocuni has joined #pypy
vkirilichev has joined #pypy
make_files has joined #pypy
<exarkun>
Python 3.4 changed the behavior of utf-... encoders to reject lone surrogates. In PyPy, it looks like the place to duplicate this change would be in rpython.rlib.runicode. A couple days ago fijal suggested default and py3.5 branches shouldn't have diverging rpython package.
<exarkun>
So ... ?
<fijal>
exarkun: I started a branch to deal with utf
<exarkun>
Ah ok
<fijal>
exarkun: so I think one option would be for you not to touch the unicode stuff at all?
<fijal>
especially the surrogate mess
<fijal>
unless you really like suffering
<exarkun>
Yea that's fine. Yesterday I did check in a small change fixing a couple simple things in test_codecs, but nothing deep, just some error messages.
<exarkun>
I can go find something else to look at very easily.
<exarkun>
As a general point though, what's the thing to do in a case like this? Generalize the rpython code in the default branch and then let the interpreter code use that generalization (eg an `allow_lone_surrogates` parameter) as necessary in the two branches?
<make_files>
Hey guys. Is there documentation on the entire process of building PyPy from source? Not how to do it, but what happens when it's going on?
adamholmberg has joined #pypy
cstratak has quit [Quit: Leaving]
<fijal>
yes, something like that
<fijal>
exarkun: so the idea (not sure how well it'll work) is to use utf8 internally ANYWAY
<fijal>
where that handling would happen in pypy
<fijal>
one option is to move pypy-specific parts of rpython into pypy
<fijal>
(I don't think anyone else can use parts of runicode AS IS anyway)
<fijal>
make_files: there is some but what exactly you're looking for?
<make_files>
fijal: I'm trying to understand how it builds the binaries, since it fails with some configurations.
cstratak has joined #pypy
vkirilichev has quit [Remote host closed the connection]
<exarkun>
some tests (`pytest.py ...`) fail locally with missing builtin modules, eg zipimport. how should I run the tests to have these modules?
cstratak has quit [Quit: Leaving]
cstratak has joined #pypy
<fijal>
make_files: it does a lot of steps and then makes C files
<fijal>
you can inspect C files in /tmp (assuming you're on linux)
<fijal>
exarkun: you need to enable them in conftest
<fijal>
I just run pyinteractive.py --allworkingmodules test-file.py
<exarkun>
so many ways to do it.
<fijal>
none of them good
<fijal>
exarkun: I generally try not to run the unittest-based cpython test
<fijal>
if I want them, I port them to pytest stuff somewhere else
<fijal>
unless it's work on pure python stuff, in which case I would work on translated pypy
vkirilichev has joined #pypy
<exarkun>
so ... never run a lib-python test: port failing lib-python tests to "native pypy tests" (pytest style) and run/fix those, causing the failing lib-python test to start passing?
<exarkun>
but how do you know if the lib-python test has been fixed or not if you don't run it? :)
<make_files>
fijal: How would I change the default compiler and linker for C files?
<fijal>
make_files: CC should be respected?
<fijal>
exarkun: you learn next day from buildbot
<fijal>
you can also modify the makefile (less ideal)
<make_files>
fijal: How? Or the makefile comment wasn't meant for my question?
<make_files>
fijal: Because I have tried using CC with no success.
<kenaan>
fijal extradoc f01eecaabd0f /blog/draft/remove-gil.rst: write a blog post draft
<fijal>
self.cc = cc or os.environ.get('CC', self.DEFAULT_CC)
<fijal>
it should definitely respect CC
<fijal>
arigato, antocuni: feel like reviewing?
[Arfrever] has quit [Ping timeout: 255 seconds]
[Arfrever] has joined #pypy
<fijal>
cfbolz:
<fijal>
that's the gist of it, I would write some technical detail section
<mihneas>
Hi guys,I have another problem: When i run this I've got the following traceback: https://pastebin.com/n51QGrhT but on Cpython things work without errors.
<LarstiQ>
mihneas: eh sorry, I meant to address the 3.5/3.6 question to mihaid
<LarstiQ>
mihaid: ^^
adamholmberg has joined #pypy
<mihaid>
LarstiQ: I don't know yet. Let me check.
vkirilichev has quit [Remote host closed the connection]
vkirilichev has joined #pypy
<ionelmc>
just noticed fijal submitted some code to alioth (that benchmark thing)
<ionelmc>
how come pypy ain't there?
<cfbolz>
ionelmc: at some point the benchmark game decided to not have alternate implementations
vkirilichev has quit [Remote host closed the connection]
yuyichao has quit [Ping timeout: 247 seconds]
<mihaid>
LarstiQ: I looked through the issues on the Python bug tracker, but I didn't find anything that matches this particularly. Is there any way / tool to when was a regression tests added?
<ionelmc>
cfbolz: i suppose they also reject numpy or any of those jit libs designed for numerical computation right?
<cfbolz>
no idea
vkirilichev has joined #pypy
<LarstiQ>
mihaid: look at the vcs history
yuyichao has joined #pypy
yuyichao_ has joined #pypy
yuyichao has quit [Ping timeout: 255 seconds]
marr has joined #pypy
mattip has joined #pypy
<make_files>
fijal: Hey again, after specifying in the Makefile I get this error OSError: /tmp/usession-release-pypy2.7-v5.8.0-17/gcctest: [Errno 2] No such file or directory.
<make_files>
What would be the cause?
<mattip>
make_files: probably that location does not exist. What does "ls
<mattip>
sorry, what did you specify, and is /tmp/usession-release-pypy2.7-v5.8.0-17 a directory?
<make_files>
Funnily enough, it does. With gcctest.c, gcctest.o and gcctest.
<mattip>
or are you running the top-level Makefile (which is not well maintained)?
<make_files>
I'm running the Makefile, using make.
<mattip>
"the Makefile" is the top-level Makefile, or step 2 in the link I provided?
<make_files>
Yes, the top level Makefile.
kipras is now known as kipras`away
<mattip>
well, that is a problem then, since 1) it is not well maintained, and 2) using that does not give you fine-grained control over
<mattip>
the 4 different stages in building a pypy interpreter
<mattip>
for instance, it forces the time-consuming first stage for each build of pypy-c
<mattip>
when you could do that first stage only once, and then run the second stage many times tweaking which compiler/ compiler flags you use
vkirilichev has quit [Remote host closed the connection]
<mattip>
the first stage on my machine takes ~30 minutes, the second takes ~15,
<mattip>
the first stage is RAM hungry and runs on one CPU, the second is a regular compilation and so can be parallelized
<make_files>
How would I run them individually? As far as I can tell, the command does all four.
make_files_ has joined #pypy
<make_files>
Or are they not automatic?
<mattip>
but you asked "How would I change the default compiler and linker for C files" - this is trivial with step two, and very difficult via your method
make_files__ has joined #pypy
make_files has quit [Ping timeout: 260 seconds]
<antocuni>
ouch, apparently eventlet has been broken since pypy 5.3 :(
<antocuni>
this is enough to crash on recent pypys
<antocuni>
it's weird that nobody didn't notice
make_files_ has quit [Ping timeout: 260 seconds]
<ndash>
i hope it means nobody uses eventlet anymore
<antocuni>
we are using it at work :)
<ndash>
sadness
<antocuni>
why?
make_files__ has quit [Ping timeout: 260 seconds]
oberstet has quit [Ping timeout: 260 seconds]
<exarkun>
it was a fragile hack in 2007 and now it's a 10 year old fragile hack?
<nanonyme>
Maybe fragile hacks mature like fine wine?
<exarkun>
may be.
<kenaan>
cfbolz default 6d1bf70e6214 /pypy/: remove the withcelldict option (translating without withcelldict is really not advisable, and many other related o...
<mattip>
maybe make_files is using a cross-compiler, which is why gcctest was not executable
<antocuni>
FWIW, here is the problem :https://github.com/eventlet/eventlet/issues/428
Fleche has joined #pypy
jwhisnant has quit [Ping timeout: 246 seconds]
jwhisnant has joined #pypy
jwhisnant has quit [Changing host]
jwhisnant has joined #pypy
jwhisnant has joined #pypy
jwhisnant has quit [Changing host]
antocuni has quit [Ping timeout: 240 seconds]
oberstet has joined #pypy
<kenaan>
rlamy cpyext-leakchecking ff315452ce6f /pypy/module/cpyext/: Don't incref the original object in PyMemoryView_FromObject()
<exarkun>
It looks like some other changes have been made to lib-python/3/test/ in the py3.5 branch so I guess I'll fix up the stat test suite there to cover this.
<pjenvey>
did cpython ever fix this?
<exarkun>
hm
<exarkun>
I guess that's worth checking.
<exarkun>
doesn't look like it
adamholmberg has joined #pypy
<cfbolz>
I am very productive: I am waiting for two translations at the same time
<kenaan>
exarkun py3.5 1c67ea9ef466 /lib-python/3/: Mark files of unknown type with `?` This mirrors CPython _stat.filemode behavior though it diverges from the (like...
Arfrever has joined #pypy
Arfrever has quit [Ping timeout: 260 seconds]
mattip has joined #pypy
Rhy0lite has quit [Quit: Leaving]
cstratak has joined #pypy
cstratak has quit [Max SendQ exceeded]
<cfbolz>
exarkun: should this be fed back to CPython?
<LarstiQ>
mattip: they are indeed using a cross compiler
<exarkun>
cfbolz: It's certainly a bug in CPython. Beyond that seems like a value judgement to me.
<cfbolz>
exarkun: is there a bug in the cpython tracker already?
<exarkun>
I didn't look for one
<cfbolz>
if not, we should be good citizens and file it, I suppose
<cfbolz>
mattip: I can make a todo to ping berkin about how they do it, but he's on summer internship atm
<mattip>
cfbolz: would be nice to document a process that works, we get questions every couple of months about cross compiling,
<cfbolz>
yes
vkirilichev has joined #pypy
<mattip>
it usually takes a while just to understand that is the problem since they say things like "how do I set cc"? and not "how do I cross-compile for a different CPU/machine"
<mattip>
maybe a big warning somewhere "RPython generated code must know alot about the target CPU in order to JIT"
tbodt has quit [Ping timeout: 240 seconds]
<kenaan>
cfbolz getarrayitem-into-bridges 6a7534bc78d2 /rpython/jit/metainterp/optimizeopt/heap.py: a bug somewhere in heap.py that affects the new code that I wrote. I did not manage to write a t...
<LarstiQ>
mattip: I did link that to them some days ago
<LarstiQ>
mattip: iirc they're working on pypy for openwrt
<mattip>
LarstiQ: nice. Sorry, missed that bit
* LarstiQ
off to bed now
<mattip>
LarstiQ: fwiw, it would help if they use the same IRC handle, but, well, whatever
vkirilichev has quit [Remote host closed the connection]
mvantellingen has quit [Ping timeout: 240 seconds]
_make has joined #pypy
mvantellingen has joined #pypy
exarkun has quit [Ping timeout: 248 seconds]
<_make>
Hey guys, I was here earlier looking for help on this error: OSError: /tmp/usession-release-pypy2.7-v5.8.0-20/gcctest: [Errno 2] No such file or directory after running the top level makefile. I have then tried to build using the instructions here http://doc.pypy.org/en/latest/build.html#run-the-translation, but I still get the same error after setting CC. Is there something that I'm missing.
<_make>
The gcctest.o, gcctest.c and gcctest are created in my /tmp/use... folder.
<mattip>
maybe we should just delete that Makefile, more trouble than it is worth
<mattip>
it prints a message - "this is not the recommended way", you would think after the fifth time they ask about it they would realize it is broken
<kenaan>
cfbolz default 5361e9bb4b15 /pypy/module/array/interp_array.py: add a jit driver for array.count and array.index
<mattip>
we should replace it with one that identifies the OS and CPU, looks for a release package, and downloads it or crashes if one is not available
tbodt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tbodt has joined #pypy
<njs>
fijal: your blog post should have some comment on what happened to the STM work
<njs>
fijal: the answer is reasonable ("it seemed like a good idea and we did a lot of work but it turns out it isn't for subtle reasons"), but without that people might reasonably wonder like, why are you asking for money again, didn't you just get a bunch of money, did you just throw it away or what
<njs>
(I would also be very interested in discussion of whether it makes sense to add something like "subinterpreters" to pypy, with each interpreter gettings its own GIL and communication by sending immutable objects across interpreter boundaries)