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
<arigato>
is there a straightforward way to have hypothesis generate a set that is a subset of a fixed maximum set?
<antocuni>
cfbolz: I implemented HPy_Dump (see commit fa8d37991eef), which is the moral equivalent of _PyObject_Dump. It is meant to be called from e.g. gdb, so it makes sense to print to the C-level stderr directly and completely bypass the applevel mess of sys.stderr
<arigato>
a crazy algorithm to assign colors to vertices in a triangulated polygon so that a property is satisfied
<cfbolz>
heh
<cfbolz>
so now you're generating random meshes?
otisolsen70_ has quit [Remote host closed the connection]
<arigato>
no, the meshes are given as input to the algorithm
<arigato>
but it must work for any mesh
<cfbolz>
right, for testing
otisolsen70 has quit [Ping timeout: 246 seconds]
<cfbolz>
does it?
<arigato>
we have as input the mesh and an arbitrary subset E' of the edges in the triangulation, and the goal is the assign colors so that for each edge, we can look at the colors of the two vertices, and decide if that edge was in E' or not
<cfbolz>
wow
<arigato>
for a "real" usage
<cfbolz>
:-)
<cfbolz>
why "real" only?
<arigato>
I've got a scheme with 7 colors so far, and it seems to work "for most cases" and in corner cases where it fails I can duplicate a vertex and make two triangles use a differently-colored vertex
<arigato>
I mean, it's not for tests
<cfbolz>
right
<arigato>
nothing overly complicated, but definitely something that needs very exhaustive testing
<cfbolz>
yeah
<cfbolz>
what's the application?
<arigato>
drawing polygons in 3D, with some edges visible and some edges not, as specified by the user
<cfbolz>
ok
<arigato>
(and in the common case, all edges that are inside the triangulation are not visible)