[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-03 Thread Greg Ewing
On 4/04/20 9:29 am, Brett Cannon wrote: I think "needs" is a bit strong. It would be nice, though. Regardless, as long as this is a net improvement over the status quo I don't see this being rejected on the grounds that an LR or LALR parser would be better since we have a working PEG parser to

[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-03 Thread Brett Cannon
Greg Ewing wrote: > On 3/04/20 7:10 am, Guido van Rossum wrote: > > Since last fall's core sprint in London, Pablo > > Galindo Salgado, > > Lysandros Nikolaou and myself have been working on a new parser for > > CPython. We are now far enough along that we present a PEP we've written: > > https:/

[Python-Dev] Re: Any thoughts about a control flow optimizer for CPython?

2020-04-03 Thread Serhiy Storchaka
03.04.20 18:13, joannah nanjekye пише: From my CS theory, a control flow graph models a program flow and one of its main characteristics is it has one entry and exit point. IIRC, CPython’s compilation process involves generation of a control flow graph. Contrary to peephole optimizations, opt

[Python-Dev] Summary of Python tracker Issues

2020-04-03 Thread Python tracker
ACTIVITY SUMMARY (2020-03-27 - 2020-04-03) Python tracker at https://bugs.python.org/ To view or respond to any of the issues listed below, click on the issue. Do NOT respond to this message. Issues counts and deltas: open7401 (+44) closed 44526 (+40) total 51927 (+84) Open issues wi

[Python-Dev] Re: Any thoughts about a control flow optimizer for CPython?

2020-04-03 Thread joannah nanjekye
> I'm not familiar with it. Is there a summary online? I followed mostly the implementation here : https://github.com/v8/v8/tree/4b9b23521e6fd42373ebbcb20ebe03bf445494f9/src/compiler > started playing with moving the CFG optimizations from the peepholer My doubts have been on whether it was too

[Python-Dev] Re: Any thoughts about a control flow optimizer for CPython?

2020-04-03 Thread Mark Shannon
Hi Joannah, On 03/04/2020 4:13 pm, joannah nanjekye wrote: Hey all, From my CS theory, a control flow graph models a program flow and one of its main characteristics is it has one entry and exit point. IIRC, CPython's CFG has multiple exit points, but that shouldn't matter. CPython’s com

[Python-Dev] Any thoughts about a control flow optimizer for CPython?

2020-04-03 Thread joannah nanjekye
Hey all, >From my CS theory, a control flow graph models a program flow and one of its main characteristics is it has one entry and exit point. IIRC, CPython’s compilation process involves generation of a control flow graph. Contrary to peephole optimizations, optimizations on the control flow g

[Python-Dev] Problem with instantiating a C extension class from another class

2020-04-03 Thread Musbur
Hello, (I've asked this question before on python-list but only got scarce and ultimately unhelpful answers. Although this isn't about Python development itself, I'm assuming that there is more CPython knowledge on this list than on the other, so please bear with me.) I've written a C extension m

[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-03 Thread Pablo Galindo Salgado
>The only thing I'm missing from the PEP is more detail about how the > cross-language nature of the parser actions are handled. The example covers > just C, and the description of the actions says they're C expressions. The > only mention of Python code generation is for alternatives without actio

[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-03 Thread Pablo Galindo Salgado
> That paragraph seems rather confused. I think what it might be > trying to say is that a PEG parser allows you to write productions > with overlapping first sets (which would be "ambiguous" for an > LL parser), but still somehow guarantees that a unique parse tree > is produced. The latter sugges

[Python-Dev] Re: PEP 617: New PEG parser for CPython

2020-04-03 Thread Thomas Wouters
Thanks, Guido, Pablo, Lysandros, that's a great PEP. Also thanks to everyone else working on the PEG parser over the last year, like Emily. I know it's a lot of work but as someone who's intimately aware of the headaches caused by the LL(1) parser, I greatly appreciate it :). The only thing I'm mi