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 | hacking on TLS is fun, way more fun than arguing over petty shit, turns out
slav0nic has quit [Ping timeout: 265 seconds]
slav0nic has joined #pypy
slav0nic has quit [Ping timeout: 268 seconds]
Atque has joined #pypy
Atque has quit [Quit: ...]
indyZ has quit [Changing host]
indyZ has joined #pypy
otisolsen70 has joined #pypy
_whitelogger has quit [Ping timeout: 264 seconds]
_whitelogger has joined #pypy
<mattip> iwkse: cool, good luck
otisolsen70 has quit [Quit: Leaving]
otisolsen70 has joined #pypy
<cfbolz> arigo: thanks for the writeup
<cfbolz> arigo: I have a small reproducer!
<cfbolz> and it crashes CPython :-/
slav0nic has joined #pypy
<LarstiQ> cfbolz: is that due to "
<LarstiQ> So my conclusion is: catching a stack overflow error is not really safe, ever.
<cfbolz> I don't quite know why it crashes
<cfbolz> but basically if you catch stack overflow you don't know whether the finallys of functions on the stack successfully finished?
<cfbolz> LarstiQ: ^^
<LarstiQ> so then RuntimErrors are also in general not safe to catch?
<cfbolz> LarstiQ: no, it's specifically RecursionError
<LarstiQ> but that's a a subclass so any RuntimError might be the unsafe RecursionError?
<cfbolz> ah
<cfbolz> maybe, yes
<phlebas> cfbolz: isn't that a general issue with catching stack overflows in any system? the JVM has three different zones at the end of the stack to allow certain things to still work after stack overflows, but it's only ever improving your chances, you cannot assume in general that finally blocks will be run
<phlebas> even in Squeak, where your stack is on your heap and a stack overflow is basically an out of memory, you can recover, but you cannot be sure that all `ensure:` blocks have run, since they may have run out of memory, too
<cfbolz> phlebas: right
<cfbolz> It should be documented
<cfbolz> And we maybe want the 'several zones' approach
<phlebas> about the zones on the jvm: https://openjdk.java.net/jeps/270
<cfbolz> Thanks
Julian has joined #pypy
Julian has quit [Quit: leaving]
<cfbolz> So it seem cpython does stuff like that already
<phlebas> :D and mark opened a PR just 1 hour ago to fix it again
<iwkse> mattip: thanks :)
<iwkse> hi, do you know an efficient way to achieve something like this? https://bpa.st/KSQA Basically filtering by a key of an array of dictionaries
Joannah has joined #pypy
<iwkse> this seems to work res = map(lambda x: {'a': x['a']}, a)
<Joannah> I wonder if anyone knows a good way or can give an example of using a "xxx.a" link files with rffi. Examples given in this tutorial: https://mesapy.org/rpython-by-example/rffi/index.html are simple. In the PyPy code base, I only found a test case that is not as useful:
<Joannah> def test_link_files(self):
<Joannah>         tmpdir = udir.join('link_files' + self.__class__.__name__).ensure(dir=1)
<Joannah>         eci = ExternalCompilationInfo(link_files=['/foo/bar.a'])
<Joannah>         mk = self.platform.gen_makefile(['blip.c'], eci, path=tmpdir)
<Joannah>         mk.write()
<Joannah>         assert 'LINKFILES = /foo/bar.a' in tmpdir.join('Makefile').read()
<Joannah> I tried some things but its not recognizing some paths for header files in my C code.
Joannah has quit [Ping timeout: 256 seconds]
lritter has joined #pypy
slav0nic has quit [Ping timeout: 265 seconds]
xcm_ has joined #pypy
xcm has quit [Remote host closed the connection]