Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guest post: Final Encoding in RPython Interpreters #146

Merged
merged 4 commits into from
Nov 14, 2024

Conversation

MostAwesomeDude
Copy link
Contributor

@MostAwesomeDude MostAwesomeDude commented Nov 11, 2024

As discussed on IRC, here's my adventures in transforming a Brainfuck interpreter to use final encoding. I'm enabling edits by maintainers so that y'all can revise and merge it.

If I get to have a thanks, I'd like to thank Armin for the idea, larstiq for pushing me to write it up, and CF Bolz for pointing out a formatting mistake. Also thank you, reviewer.

If I get to have a shoutout, I'd like to mention that rpypkgs is always open to contributions and that you can run this interpreter directly from the command line as github:rpypkgs/rpypkgs#bf if you have Nix installed and flakes enabled. Here's Mandelbrot:

$ nix-prefetch-url https://github.com/MG-K/pypy-tutorial-ko/raw/refs/heads/master/mandel.b
$ nix run github:rpypkgs/rpypkgs#bf -- /nix/store/ngnphbap9ncvz41d0fkvdh61n7j2bg21-mandel.b

@mattip
Copy link
Member

mattip commented Nov 12, 2024

Take this with a grain of salt, I was not part of the IRC discussion.

I think some additional context would be nice. You launch right into the interpreter without describing the problem you want to solve or who might be interested to read the post. Also you can mention "to find more uses of rpython, check out https://github.com/rpypkgs/rpypkgs" or so.

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the blog post!

posts/2024/11/guest-post-final-encoding-in-rpython.md Outdated Show resolved Hide resolved
posts/2024/11/guest-post-final-encoding-in-rpython.md Outdated Show resolved Hide resolved
@cfbolz
Copy link
Member

cfbolz commented Nov 12, 2024

If I get to have a thanks, I'd like to thank Armin for the idea, larstiq for pushing me to write it up, and CF Bolz for pointing out a formatting mistake. Also thank you, reviewer.

If I get to have a shoutout, I'd like to mention that rpypkgs is always open to contributions and that you can run this interpreter directly from the command line as github:rpypkgs/rpypkgs#bf if you have Nix installed and flakes enabled.

Please just add both of these to the post! Both make perfect sense, and we don't have a fixed format for guest blog posts or anything anyway.

Sorry about this! It's not my word, but Oleg Kiselyov's word; he finds
it to be a nice way to talk about the "syntactic signature of a semantic
domain", that sort of thing. I personally prefer "domain" but whatever.
I think I got everything. Thanks for reading!
@MostAwesomeDude
Copy link
Contributor Author

Bump incoming. Thanks for feedback! I addressed everything, added a couple more links, and also fixed the spell-checker.

I'm adding a link to this cleaned IRC log which contains me and Armin; I don't mind sharing this but Armin can always choose to remove it. There really isn't that much context: I was contemplating adding JSON output to another part of my Cammy interpreter, had some desires for generalizing that work, and realized that I could concretely test out one architectural idea on a small interpreter.

Copy link
Member

@mattip mattip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! I will give other reviewers a chance to take a look before merging soon.

@cfbolz cfbolz merged commit 74ddf51 into pypy:main Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants