cfbolz changed the topic of #pypy to: #pypy PyPy, the flexible snake https://pypy.org | IRC logs: https://quodlibet.duckdns.org/irc/pypy/latest.log.html#irc-end and https://libera.irclog.whitequark.org/pypy | the pypy angle is to shrug and copy the implementation of CPython as closely as possible, and staying out of design decisions
jcea has quit [Ping timeout: 246 seconds]
johnjaye has joined #pypy
<johnjaye> is _immutable_fields_ an rpython construct of some kind?
<larstiq> in the sense that you use it to tell rpython which fields to treat as immutable
<johnjaye> oh ok
<larstiq> how so?
<johnjaye> how so what
glyph has quit [*.net *.split]
infernix has quit [*.net *.split]
rwb has quit [*.net *.split]
jerith has quit [*.net *.split]
Hodgestar has quit [*.net *.split]
fijal has quit [*.net *.split]
[Arfrever] has quit [*.net *.split]
mattip has quit [*.net *.split]
Alex_Gaynor has quit [*.net *.split]
krono has quit [*.net *.split]
mwhudson has quit [*.net *.split]
commandoline has quit [*.net *.split]
nanonyme has quit [*.net *.split]
pjenvey has quit [*.net *.split]
mwhudson has joined #pypy
Hodgestar has joined #pypy
mattip has joined #pypy
fijal has joined #pypy
commandoline has joined #pypy
commandoline has quit [Changing host]
commandoline has joined #pypy
jerith has joined #pypy
Alex_Gaynor has joined #pypy
krono has joined #pypy
pjenvey has joined #pypy
krono has quit [Changing host]
krono has joined #pypy
Alex_Gaynor has joined #pypy
Alex_Gaynor has quit [Changing host]
pjenvey has quit [Changing host]
pjenvey has joined #pypy
<larstiq> why are you asking
rwb has joined #pypy
glyph has joined #pypy
[Arfrever] has joined #pypy
infernix has joined #pypy
<johnjaye> i'm reading some python code from pypy and I realized it's not python. it's rpython
<johnjaye> like at one point it says globals()[foo]=bar which literally creates variables with the value of foo from a list of strings
<johnjaye> also there's import statements that go import rpython.stuff
<johnjaye> but supposedly any rpython is valid python. so maybe that's a valid python construct somehow
<larstiq> right, rpython is a restricted subset of python
<johnjaye> well i don't know too much about it. or how pypy works. is that heptapod repo the main pypy?
<mattip> yes
<larstiq> you _can_ run pypy on top of cpython, and this is in fact how many tests work (see https://doc.pypy.org/en/latest/coding-guide.html#id29, "By default, they run on top of an untranslated PyPy which runs on top of the host interpreter. ")
<mattip> rpython is a subset of python2, so you need to use a python2 interpreter as the host
<mattip> the reason it is a subset is so that the rpython code can be annotated and translated into C
<mattip> so the definition of RPython is a bit fluid: anything that can be supported by the translation toolchain
<mattip> so there are two modes to tests:
<larstiq> where the rule of thumb is, the more dynamic it gets the less likely it's rpython?
<mattip> - pure python tests ("own" tests) that run in python
<mattip> - "translated" tests that run after translation
<mattip> "the more dynamic it gets" - yes, for instance closures are not supported in RPython
johnjaye has quit [Ping timeout: 240 seconds]
johnjaye has joined #pypy
<arigato> johnjaye: for the example of globals()[foo]=bar: that is very dynamic and not RPython at all if done inside a function, but we do that at import time. RPython is a two-step language: first, we import all modules and do sometimes very dynamic stuff to set up all functions and global constants etc., and then the remaining functions must not do anything dynamic any more, so that their code can be translated to efficient C code
<arigato> in other words, globals()[foo]=bar is normal Python (you can do that in plain Python)
<fijal> I just had the most strange pip invocation
<fijal> as soon as I pressed enter, the power went off and it started hailing
<fijal> like, as I pressed enter
<larstiq> that's just a tad bit worse than my pip invocations stalling forever with the new resolver algorithm
infernix has quit [Quit: ZNC - http://znc.sourceforge.net]
jcea has joined #pypy
infernix has joined #pypy
derpydoo has joined #pypy
infernix has quit [Quit: ZNC - http://znc.sourceforge.net]
derpydoo has quit [Quit: derpydoo]
infernix has joined #pypy
cfbolz has quit [Ping timeout: 265 seconds]
cfbolz has joined #pypy
<johnjaye> arigato: oh ok so it's fine intially but then not afterward in any functions.
<johnjaye> so if i understand rpython correctly, it is a subset of python where type inference is possible. this is then used with rpython libraries to make an interpreter for your language defined in EBNF or whatever.
xcm has quit [Quit: WeeChat 3.7]
xcm has joined #pypy
greedom has joined #pypy
greedom has quit [Remote host closed the connection]
derpydoo has joined #pypy
johnjaye has quit [Quit: WeeChat 4.0.0-dev]