antocuni changed the topic of #pypy to: PyPy, the flexible snake (IRC logs: https://botbot.me/freenode/pypy/ ) | use cffi for calling C | "PyPy: the Gradual Reduction of Magic (tm)"
jafd has quit [Quit: leaving]
oberstet2 has quit [Remote host closed the connection]
deathsparton has quit [Remote host closed the connection]
tayfun26 has joined #pypy
oberstet has quit [Ping timeout: 240 seconds]
Hotpot33 has joined #pypy
<Cheery>
for vectors I've created objects that have .x, .y, .z and each got a float on them.
<Cheery>
and I have few benchmarks that point out that whether the vector is directly or in the end of a pointer, it matters.
<cfbolz>
Cheery: what's "in the end of a pointer"?
<Cheery>
self.data = (x, y, z)
<Cheery>
vs. self.x =, self.y =, self.z =
<cfbolz>
Cheery: is that rpython, or regular python?
<Cheery>
rpython
<cfbolz>
the former is simply a tuple?
<cfbolz>
yes, of course the performance of those two will be different
jneen has joined #pypy
<jneen>
am i supposed to be able to use __repr__ and repr(...) in rpython? or should i just use a .dump() method or something
<jneen>
i'm getting: [translation:ERROR] MissingRTypeOperation: unimplemented operation: 'repr' on <InstanceRepr for qush.lex.Token>
<jneen>
when i use repr(...) on an object that implements __repr__, which is surprising to me
amaury has joined #pypy
demonimin has quit [Remote host closed the connection]
demonimin has joined #pypy
demonimin has joined #pypy
<cfbolz>
jneen: nope, __repr__ is not really supported
<cfbolz>
(a lot of __methods__ aren't, with few exceptions)
<jneen>
ha, i see
<jneen>
it seems repr on a *unicode* is even not supported so
<cfbolz>
right
yuyichao_ has quit [Ping timeout: 248 seconds]
<cfbolz>
jneen: yes, seems repr is really generally not supported
yuyichao_ has joined #pypy
<cfbolz>
jneen: how's your project going?
_aegis_ has quit [Ping timeout: 255 seconds]
_aegis_ has joined #pypy
<jneen>
i gave a presentation to the lab, there's a lot of design decisions to still work out, but i'm just getting back to the implementation
<jneen>
what was the safe transformation unicode -> int again
<jneen>
the unicode lib wants ints...
<cfbolz>
ord(unichar) ?
<jneen>
didn't compile :
<cfbolz>
uh?
<Cheery>
I'm looking at my quaternion & vector & matrix math code, but I'm really not satisfied to few things. One of the things that I'm not satisfied to is that it's all just double precision floats
<jneen>
"blocked block - operation cannot succeed" hang on i'll grab the annotations
<Cheery>
if I wanted to make a matrix of vectors or quaternions, my system couldn't do it.
<jneen>
hm, it seems i have a unicode string?
<jneen>
i can't find any functions that produce a different kind of unichar object though
<cfbolz>
jneen: that can be sort of tricky
<cfbolz>
unichar is really a unicode string of length 1
<cfbolz>
but sometimes the annotator is confused and cannot track the length
<jneen>
oh do i have to assert the length
<cfbolz>
so a hack that works then is this: ord(unichar[0])
<cfbolz>
that works too
<cfbolz>
(maybe?)
<Cheery>
to an extent I'm looking at this and enjoying that it's simple
<Cheery>
but at the same time I'm thinking that "parametric types would be fancy"
<Cheery>
rpython doesn't seem to have that concept though.
<Cheery>
only thing getting close to this is numpy
<Cheery>
but the format they use have quite lot of overhead.
<Cheery>
and when I checked they seem to allocate a storage and the ndarray record has a pointer to that storage
<jneen>
ok that worked lol
<cfbolz>
jneen: yes, it's a bit sad that that is necessary :-(
<Cheery>
cfbolz: basically I would want something like this: struct { type_header; shape; N bytes of data; } numerical record of size N
<Cheery>
or even so that the shape is encoded in the type header
<Cheery>
but the shape is a memoized object that describes the form of the data in that record.
<Cheery>
eg. it could say it's a vector, or vector of quaternions, or a complex number, or a tensor, etc.
<Cheery>
and the thing I specifically want is that rpython/JIT would handle this smart and produce fast code, while there would be little as necessary code to write in order to support the different forms.
<jneen>
a variant
<jneen>
i think you get that with a subclass hierarchy?
<jneen>
i have macropy macros to automate it...
<cfbolz>
Cheery: is your problem how to do the "N bytes of data" part?
<Cheery>
cfbolz: yup, at least that's what I think is the problem.
oberstet has joined #pypy
<cfbolz>
Cheery: you can maybe use rlib.rerased for that - it's a bit of a weird interface, but basically it's a way to cast a reference (eg an array of double) to a generic pointery type
<cfbolz>
it's what we use when implementing list strategies
amaury has quit [Quit: Konversation terminated!]
amaury has joined #pypy
jcea has joined #pypy
<Cheery>
cfbolz: this can reduce the amount of records I have to keep.. while I'm pondering about this I could probably try out something.
yuyichao has joined #pypy
yuyichao_ has quit [Read error: Connection reset by peer]
amaury has quit [Quit: Konversation terminated!]
deathsparton has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
<kenaan>
arigo cffi/cffi ef5175cb8e2e /testing/cffi1/test_recompiler.py: Add test for e8b85a3539f2
deathsparton has quit [Ping timeout: 264 seconds]
<cfbolz>
arigato: no worries, I was happy that I managed to find the problem at all :-)
<cfbolz>
arigato: anyway, the good news is that your changes to guard-compatible a year ago really fixed the problems they were supposed to - namely improving the performance of one-case guard_compatible to that of guard_value (or at least super super close)
Joghurt has joined #pypy
Joghurt is now known as Yoghurt
Yoghurt has quit [Client Quit]
Joghurt_ has joined #pypy
Joghurt_ is now known as Joghurt
forgottenone has joined #pypy
_main_ has joined #pypy
_main_ has quit [Read error: Connection reset by peer]
__main__ has quit [Ping timeout: 248 seconds]
<arigato>
good
__main__ has joined #pypy
realitix has joined #pypy
amaury_ has quit [Quit: Konversation terminated!]
amaury_ has joined #pypy
antocuni has quit [Ping timeout: 240 seconds]
<cfbolz>
arigato: with that rate of progress the branch will be done in another five years :-)
amaury_ has quit [Quit: Konversation terminated!]
realitix has quit [Ping timeout: 255 seconds]
yuyichao has joined #pypy
__main__ has quit [Read error: Connection reset by peer]
yuyichao has quit [Ping timeout: 248 seconds]
tbodt has joined #pypy
__main__ has joined #pypy
drolando has quit [Remote host closed the connection]
drolando has joined #pypy
mattip has joined #pypy
mvantellingen has quit [Quit: ZNC 1.6.3+deb1 - http://znc.in]
mvantellingen has joined #pypy
realitix has joined #pypy
Rhy0lite has quit [Quit: This computer has gone to sleep]
Rhy0lite has joined #pypy
realitix has quit [Ping timeout: 255 seconds]
Joghurt has quit [Quit: ChatZilla 0.9.93 [Firefox 52.5.2/20171208114127]]
Rhy0lite has quit [Quit: This computer has gone to sleep]
forgottenone has quit [Quit: Konversation terminated!]
realitix has joined #pypy
realitix has quit [Remote host closed the connection]
realitix has joined #pypy
marky1991 has quit [Read error: Connection reset by peer]
realitix has quit [Client Quit]
tav has joined #pypy
marky1991 has joined #pypy
mattip has left #pypy ["bye"]
marky1991 has quit [Ping timeout: 264 seconds]
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drolando has joined #pypy
marky1991 has joined #pypy
marky1991 has quit [Remote host closed the connection]
marky1991 has joined #pypy
drolando has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
amaury_ has joined #pypy
drolando has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
raynold has quit [Quit: Connection closed for inactivity]