cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake | IRC logs: and | Matti: I made a bit of progress, the tests now only segfault towards the end
Atque has quit [Quit: ...]
Atque has joined #pypy
Atque has quit [Quit: ...]
Atque has joined #pypy
lritter has joined #pypy
Atque has quit [Quit: ...]
greedom has joined #pypy
greedom has quit [Remote host closed the connection]
rb has joined #pypy
<rb> hey there! i was interested in how pypy stores values like integers, object references etc. in memory. where in the source code do you recommend i should look?
<Corbin> might be a good starting point. The source code on its own might not be enlightening.
<Corbin> Huh, weird RPython quirk. How do I declare a method as a standalone function (say, because it's some higher-order NOT_RPYTHON generator) an then import the function a a method into a class?
<Corbin> I had tried using type() to build the class, but that doesn't seem to work.
<Corbin> I'm trying something like `def build(inst): return lambda self: self.insts.append(inst)` and getting an error like
<rb> Corbin: thanks!
<Corbin> rb: No worries. Maps aren't the whole story, so please feel free to ask followup questions for more details.
greedom has joined #pypy
<rb> Corbin: hahaha, maps of course!
<rb> the reason i asked is that i am working on an implementation of self, and was kind of stuck on how to use a value type to represent doubles while also preserving my 62-bit integers
<rb> so i'm trying to get "inspired"
<rb> it seems like everything comes back to self, eventually. v8, pypy, et al.
<Corbin> rb: Ah. The RPython toolchain supports tagged pointers, and the documentation specifically mentions Smalltalk as a family which could benefit from it. But even in that case, I gather that folks box doubles.
<Corbin> This could be because RPython JITs normally have no trouble unboxing.
<rb> yeah, that's fair. i was thinking of swapping the exponent and mantissa of a double, and then reserving 2 bits of the exponent to have a "reduced range" double, but that seems like it would be way too slow in practice
<rb> so i'll probably just have a boxed double as well, with the actual double residing in byte array segment
<Corbin> Cool idea, though.
<rb> right, a problem that someone had mentioned is what happens when nan :P
<rb> i don't want to create my own ieee754 spinoff, so i shelved that idea
<mattip> rb: see rpython/rlib/rstruct/ for some conversion routines
<rb> cheers
greedom has quit [Remote host closed the connection]
<mattip> CPython has migrated issues from to
<mattip> one github to rule them all
greedom has joined #pypy
lritter has quit [Quit: Leaving]
glyph has quit [Quit: End of line.]
glyph has joined #pypy
greedom has quit [Read error: Connection reset by peer]
<cfbolz> rb: to a first order of approximation, we just box everything. doing something else is very much going against the grain
<rb> i see
nimaje has quit [Quit: WeeChat 3.4.1]
nimaje has joined #pypy