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
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
jvesely has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
Arfrever has quit [Quit: 御出で]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
tsaka__ has quit [Remote host closed the connection]
tsaka__ has joined #pypy
_whitelogger has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
tsaka__ has quit [Remote host closed the connection]
tsaka__ has joined #pypy
adamholmberg has quit [Ping timeout: 255 seconds]
<simpson>
Stupid question: For bitvectors in RPython which might be really wide, do I want a list of bools or a bigint?
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
jcea has quit [Quit: jcea]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 255 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 260 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 255 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 240 seconds]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
jvesely has quit [Quit: jvesely]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 258 seconds]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
kipras has joined #pypy
Ai9zO5AP has quit [Quit: WeeChat 2.7.1]
tsaka__ has quit [Ping timeout: 272 seconds]
wleslie has quit [Ping timeout: 256 seconds]
lritter has joined #pypy
dddddd has quit [Ping timeout: 258 seconds]
kipras has quit [Read error: Connection reset by peer]
wleslie has joined #pypy
tsaka__ has joined #pypy
lritter has quit [Ping timeout: 256 seconds]
tsaka__ has quit [Ping timeout: 265 seconds]
tsaka__ has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 256 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
YannickJadoul has joined #pypy
adamholmberg has quit [Ping timeout: 260 seconds]
tsaka__ has quit [Quit: Konversation terminated!]
tsaka__ has joined #pypy
_whitelogger has joined #pypy
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 265 seconds]
<ronan>
simpson: AFAIR, we never implemented bitvectors in RPython, so you probably need to create your own class (backed by a list of ints).
<ronan>
simpson: bigints are probably close to what you need. A list of bools would be very bad, as each RPython bool is represented as a C int.
tos9 has quit [Ping timeout: 256 seconds]
tos9 has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
tsaka_ has joined #pypy
tsaka__ has quit [Quit: Konversation terminated!]
<arigato>
ronan: er, no? it becomes an array of "char"
<arigato>
not "int"
<arigato>
or even a "bool_t", but that's the same as a "char"
<cfbolz>
that's still bad of course?
<ronan>
arigato: oh, OK. That's still pretty bad for a bitvector though.
<arigato>
yes, of course
<Alex_Gaynor>
it's only 8x bad instead of 32 or 64x bad though :-)
<Alex_Gaynor>
(I suppose in reality it's even worse since it makes it way less likely to have stuff in cache)
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholmberg has joined #pypy
adamholmberg has quit [Remote host closed the connection]
adamholm_ has joined #pypy
adamholm_ has quit [Remote host closed the connection]
tsaka_ has quit [Ping timeout: 255 seconds]
adamholmberg has joined #pypy
adamholmberg has quit [Ping timeout: 255 seconds]
<Dejan>
Alex_Gaynor, IMHO it depends
<Dejan>
many operations can be done on a whole (native) word - to me it makes most sense to use native type for bitvectors
<Dejan>
sure I could be wrong :)
<Dejan>
in a way it can behave like dynamic arrays and grow by N*64 bits on 64bit arch which is quite similar to how some dynamic array implementations are implemented (when they have some strategy to grow to a page size, and then whole memory pages are allocated further on)
mattip has quit [Ping timeout: 260 seconds]
adamholmberg has joined #pypy
tsaka_ has joined #pypy
bitbit has quit [Quit: Leaving]
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
WGH has quit [Ping timeout: 260 seconds]
Ai9zO5AP has joined #pypy
dddddd has joined #pypy
bitbit has joined #pypy
xcm has quit [Remote host closed the connection]
xcm has joined #pypy
<mjacob>
simpson: i'd probably make it a wrapper around rbigint
<simpson>
mjacob, ronan: That's what I'm thinking, too.
<simpson>
Thanks for the discussion.
xcm is now known as Guest66954
Guest66954 has quit [Ping timeout: 256 seconds]
xcm has joined #pypy
jcea has joined #pypy
jcea has quit [Remote host closed the connection]
jcea has joined #pypy
jvesely has joined #pypy
YannickJadoul has quit [Quit: Leaving]
<mjacob>
ronan: i noticed some inconsistency between rstr's and rlist's __getslice__(). both require start >= 0. only rlist requires start <= length and stop >= start, but rstr doesn't. should we make it consistent?
<ronan>
mjacob: Yes, we probably should (unless it breaks things horribly for some absurd reason).
<mjacob>
ronan: so, which way around?
<ronan>
like rlist
<ronan>
it's the one that makes more sense
<mjacob>
ronan: rlib.buffer.Buffer's getslice() and __getslice__() should probably also be consistent
<mjacob>
ronan: why does it make more sense?
<ronan>
mjacob: well, if we're checking things, we should check all the things that should always be true
<mjacob>
ronan: but isn't the question to define "all the things that should always be true"?
<ronan>
yes, indeed
<mjacob>
so why should start <= length and stop >= start always be true?
<ronan>
because you get a segfault otherwise?
<mjacob>
ah, i think we're talking past each other
<mjacob>
it seems like rstr has special logic to support it