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
<korvo> Okay, I hacked up states for RPLY's lexer. My diff is here: https://bpa.st/AICGJVTLWAIPOMD3PQ2MHCUHGY
<korvo> I guess I should set up a repo for this somewhere.
<korvo> Unlike #18/#79, my change is fairly surgical; I add a stack as an instance variable to the lexer, and I add two new hooks for rules. One hook checks the stack and the other hook modifies it. This is roughly what Flex does, with the corresponding crash-on-underflow semantics we "love" and "expect".
<korvo> But given all that, parsing Nix's string QLs was straightforward. Each QL comes apart into pieces, there's only three possible pieces to lex, and each piece checks/modifies the stack. Plain expressions also push and pop the stack. The nasty examples from earlier all parse.
jcea has quit [Ping timeout: 240 seconds]
itamarst has quit [Quit: Connection closed for inactivity]
[Arfrever] has quit [Ping timeout: 252 seconds]
[Arfrever] has joined #pypy
itamarst has joined #pypy
Dejan has joined #pypy
Dejan has quit [Quit: Leaving]
jcea has joined #pypy
<korvo> Okay, I'm happy to say that rpypkgs is now available on GitHub: https://github.com/rpypkgs/rpypkgs This should lower the bar for contributions. More importantly, it gives me access to many free hours of CI builders. Cachix is here: https://app.cachix.org/cache/rpypkgs