<DRMacIver>
I've a really stupid niche question that I promise I have a good reason for: Is there a list somewhere of what pypy versions report as what version of the language in sys.version_info ?
<DRMacIver>
Ideally for programmatic use, though I'm happy to hand wrangle data
oberstet has joined #pypy
<fijal>
DRMacIver: you should be able to get the current running pypy version, if this is what you want
<DRMacIver>
fijal: It's not
<fijal>
ok, why would you do that?
<fijal>
I don't think there is a programatic list
<fijal>
(I'm relatively sure there isn't)
<DRMacIver>
I specifically want to be able to from a language version major, minor, micro to a list of pypy versions that can support it.
<fijal>
the best you can do is track release announcements
<DRMacIver>
I'm totally fine with scraping some HTML myself. :-)
<fijal>
or email
<fijal>
ah
<DRMacIver>
I'm, uh, writing some Python version management software because I hate joy, and it would be nice to be able to say "I want a pypy supporting this version of the language"
<fijal>
DRMacIver: release-x.x.x.rst would give you that
<fijal>
pypy/doc/release-*
<DRMacIver>
Thanks
<fijal>
not sure how hard it is to write heuristic
<fijal>
but since that's like 20-odd files, I'm sure it's manageable
<DRMacIver>
fijal: Actually if you could point me how to get the current pypy version at runtime that would be useful too :-)
<fijal>
sys.pypy_version_info
<DRMacIver>
Thanks
<DRMacIver>
Hmm. Scraping these isn't totally trivial.
<DRMacIver>
I'll probably leave this out for my initial draft implementation and just require specifying pypy installs by full identifier for now.
<fijal>
DRMacIver: I think it's easier to write a regex, take the hits and write the rest by hand
<DRMacIver>
But I'll look at this later, thanks
<DRMacIver>
fijal: Yeah, that's what I was doing, but particularly with the earlier ones where it's ambiguous whether a version number is pypy or CPython it's annoying
<DRMacIver>
There isn't a standard format you use for saying language compatibility
<DRMacIver>
(Which is fine, I have a very niche requirement here)
<DRMacIver>
mattip: And pypy micro versions never change language version?
<mattip>
correct
<DRMacIver>
Great. Thank you so much!
<mattip>
hope it helps, fwiw, the grep was "2\.7\." pypy/doc/release*.rst
* mattip
lurking :)
mattip has left #pypy ["bye"]
ramonvg has quit [Remote host closed the connection]
ceridwen has quit [Quit: Ex-Chat]
ceridwen has joined #pypy
<Cheery>
hm..
<Cheery>
I'm looking at a potentially fun problem.
<Cheery>
so in assembly program I have exit sites and landing sites.
<Cheery>
at every exit I should shuffle the variables such that they are in same memory locations as they are at the landing.
<Cheery>
also spilled variable slots require this treatment, but I cannot copy from spilled to spilled just like that.
<Cheery>
they must go through a register location.
<Cheery>
minimum amount of instructions for each operation like this.
<Cheery>
but probably that's one hard to solve problem.
<Cheery>
also if there are register spills, the registers are scarce.
<Cheery>
so they have to swap through in a sequence.
mat^2 has quit [Ping timeout: 240 seconds]
lesshaste has joined #pypy
<lesshaste>
what's the difference between pypy.exe and pypyw.exe?
<lesshaste>
in the windows distribution of pypy
<idnar>
lesshaste: I'm guessing it's like python.exe and pythonw.exe in CPython, in which case the 'w' variant doesn't start a console window which is what you normally want for some kind of GUI app
<lesshaste>
oh ok. I am currently running it from the terminal in any case
<lesshaste>
it doesn't seem to come with any documentation
<fijal>
Cheery: it's NP-complete or NP-hard to solve it perfectly, but good heuristics exist
<Cheery>
fijal: what is it called?
<Cheery>
hm.. it seems like a graph theory problem though.
<simpson>
Cheery: The graph-theoretic version is called "graph k-coloring"; your version is "fit a computation into k registers". The algorithms don't really change if you have to start with a portion of the graph pre-colored, as in your situation.
<fijal>
register allocation no?
<Cheery>
oh this is something that ended up left from the register allocation
<Cheery>
I have my program flow cut into extended basic blocks.. they should be familiar as pypy JIT appears to use something very similar
<Cheery>
iterated register coalescing to that attempts to coalesce as many moves as possible.
<Cheery>
but sometimes it doesn't succeed, and I will end up with exits and entries that do not have matching positioning of values into the registers.
<Cheery>
so I got to shuffle values at that point.
<Cheery>
also something related to minimum edit distance could be a match too.
<Cheery>
basically.
<Cheery>
[1,3,2,5,7] -> [1,2,3,5,7] by operations: swap [x] with
<Cheery>
[y]
<Cheery>
and move [x] to [y]
<Cheery>
and the destination form may have blanks.
<Cheery>
as well as source.
<simpson>
ISTR that that one is also NP-complete, assuming SETH or something else not-terribly-unreasonable.
mat^2 has quit [Ping timeout: 240 seconds]
mat^2 has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
arigato has joined #pypy
jamesaxl has joined #pypy
mat^2 has quit [Quit: Leaving]
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
tnorth has joined #pypy
<tnorth>
hi there
<simpson>
Hi.
cstratak has joined #pypy
<tnorth>
playing around with cffi: if I have a main C file calling functions from two others (via a .h), what would be the best approach?
<tnorth>
I tried making 3 separate ffi objects, but there is a dependency of one to the two others, which I don't know how to indicate to cffi
lesshaste has joined #pypy
lesshaste is now known as Guest1583
ramonvg has joined #pypy
<simpson>
Not sure, sorry. Maybe somebody else knows.
Guest1583 has quit [Ping timeout: 240 seconds]
<Cheery>
if I put my static libraries into 'LIB' environment var, does rpython know to instruct gcc on linux with it?
cstratak has quit [Ping timeout: 260 seconds]
Guest1583 has joined #pypy
<Cheery>
hmm.. no it doesn't.
<Cheery>
oh there are exact linux variants that I can use.
inhahe_ has quit []
Guest1583 has quit [Quit: Leaving]
lritter__ has joined #pypy
inhahe_ has joined #pypy
<arigato>
tnorth: usually you build all C files into the same ffi/lib object
<arigato>
consider the ffi/lib object similar to a .c source code that you would write with #include <a.h> and #include <b.h>: you still only write one .c file
mattip has joined #pypy
<mattip>
arigato: ping (cffi banch find-vcvars)
<arigato>
mattip: pong, but dinner
<mattip>
just wondering if you noticed it and had any opinions
<arigato>
I didn't :-)
<arigato>
I'll look, but later
<mattip>
thanks
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
antocuni has joined #pypy
arigato has quit [Quit: Leaving]
inhahe_ has quit []
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
jamesaxl has quit [Read error: Connection reset by peer]
jamesaxl has joined #pypy
amaury has joined #pypy
Tiberium has quit [Remote host closed the connection]