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
sugarbeet has quit [Ping timeout: 260 seconds]
sugarbeet has joined #pypy
jcea has quit [Ping timeout: 260 seconds]
itamarst has quit [Quit: Connection closed for inactivity]
marmoute has joined #pypy
itamarst has joined #pypy
jcea has joined #pypy
otisolsen70 has joined #pypy
slav0nic has joined #pypy
[Arfrever] has quit [Read error: Connection reset by peer]
[Arfrever] has joined #pypy
korvo has joined #pypy
<korvo> Hi! Corbin here. Still on vacation from IRC. Just dropping off a couple things.
<korvo> First: https://lobste.rs/s/m55u77/pypy_has_been_quietly_working_for_me_for#c_4j1dik speed.pypy.org is using a "no longer supported" CPython. Not like this particular person is in good faith, but is there a place to track this work? I know it's a 2hr task for whoever has sysadmin powers on that machine, and ironically it might be a CPython core task
<korvo> since IIRC they admin some Codespeeds.
<korvo> Second: I have a Nix flake containing a bootstrapped PyPy and many other RPython interpreters: https://osdn.net/users/corbin/pf/rpypkgs/wiki/FrontPage If anybody is interested in unbreaking Topaz or Pixie, I'd welcome contributions. I'll move it to Github if there's interest.
<korvo> Third: Building on that flake, I've started re-implementing the Nix interpreter in RPython; see the reguix/ directory in the flake. Again, if there's any interest in contribution, I can break it out into its own Github repository.
<korvo> That's all. Thanks for reading. I'll stick around for a few hours.
<cfbolz> korvo: no, it's not a cpython task, we would have to rerun the benchmarks on a newer cpython ourselves
<korvo> Okay. Are there blockers for this, or is it the sort of thing that somebody has to remember to do after each CPython release?
* korvo estimates whether there's room on the plate for rewriting Codespeed with Nix
<cfbolz> korvo: yes, it's a manual step
<nimaje> you also don't want to change your baseline to often, to be able to compare old results with new ones
<cfbolz> korvo: please don't. out codespeed is pretty much not maintained at this point
<cfbolz> *our
<cfbolz> if anything, we would like some new features in the web frontend
* korvo puts it on the "rewrite it for Nix" backburner, next to "rewrite Buildbot with Nix"
<korvo> Honestly, I'm more interested in talking about my flake. It's got a novel approach to RPython package management; instead of installing to a virtualenv, I just unpack the tarballs from PyPI to the build directory. I'm able to provide permanent versions of stuff like RPLY without ever calling `pip`.
<korvo> I also rewrote Brown's Brainfuck interpreter to use a proper AST and gave it some algebraic manipulations. It is now most of the way to a proper optimizing Brainfuck, and is around 30% faster on the Mandelbrot example. I included a DIVSPL toy as well; its JIT traces are as good as hand-written assembler.
sugarbeet has quit [Read error: Connection reset by peer]
<cfbolz> korvo: how large is the nix language?
sugarbeet has joined #pypy
<korvo> cfbolz: The syntax is like JSON with sugar and lambdas. The lexer has about 60 terminals and the parser has about 50 rules with about 20 grammar classes. I need to do quasiquotes but otherwise that's all done.
<korvo> There's a `builtins` dict with lots of operators. Also some stuff that I'm going to punt on for now, like interacting with the Nix store or downloading git repos. I'd need community buy-in before attempting to replace Nix for other people.
<korvo> Finally, there's "flakes", which are a managed alternative to directly evaluating expressions. The runtime has to do some extra work to evaluate a flake, and e.g. Tvix, written in Rust, has declared it too complex to implement.
<cfbolz> korvo: the size of the syntax is mostly not the problem, so I suspect the tricky part is the builtin operators?
<korvo> Yeah. Everything from integer maths to parsing XML to fetching tarballs is builtin. And interaction with the Nix store requires careful POSIX programming, which is a well-anticipated hassle; I'll do it but not yet.
<cfbolz> korvo: you could consider following weird thing:
<cfbolz> implement the builtins in regular python, instead of rpython
<cfbolz> (and ship a barebones pypy interpreter to run them)
slav0nic has quit [Ping timeout: 256 seconds]
korvo has quit [Ping timeout: 250 seconds]
korvo has joined #pypy
<korvo> cfbolz: I'll keep that in mind. My current hope is that I can use Nix itself to hardcode some paths into my RPython interpreter, and then I can use subprocessing to call those paths. I'm not too proud to run `git` or `curl` in a subprocess.
marmoute has quit [Ping timeout: 250 seconds]