Skip to content

Add Quine in Whitespace#4644

Merged
rzuckerm merged 3 commits intoTheRenegadeCoder:mainfrom
rzuckerm:whitespace-quine
Apr 16, 2025
Merged

Add Quine in Whitespace#4644
rzuckerm merged 3 commits intoTheRenegadeCoder:mainfrom
rzuckerm:whitespace-quine

Conversation

@rzuckerm
Copy link
Copy Markdown
Collaborator

@rzuckerm rzuckerm commented Apr 12, 2025

Congrats on taking the first step to contributing to the Sample Programs repository maintained by The Renegade Coder!
For simplicity, please make sure that your pull request includes one and only one contribution.

Please fill one of the sections below as applicable.
Please also add any other relevant information to the Notes section at the bottom.
You may delete or just ignore any other sections.
For more information please refer to our contributing documentation

I Am Adding a New Code Snippet in an Existing Language

  • I fixed Add Quine in Whitespace #4643
  • I did not include any extra folders/libraries
  • I named the pull request using Add {PROJECT} in {LANGUAGE} format

Other Notes

This code is literally all whitespace characters. Adding any type of annotation or commenting would make this code a lot larger and more complex. I generated the code using this repo:

  • src/whitespace_quine/__init__.py - A python script that generates the Whitespace sample program.
  • quine.ws.asm - The assembly language that the python script generates.
  • tests/test_quine.py - The unit test I used to verify that the Whitespace code generated by this sample program is identical to itself, using the same docker image that this site uses to run Whitespace samples. Here is the workflow run.

@rzuckerm rzuckerm added enhancement Any code that improves the repo quine See: https://sampleprograms.io/projects/quine/ labels Apr 12, 2025
@rzuckerm rzuckerm marked this pull request as ready for review April 12, 2025 19:04
@rzuckerm rzuckerm enabled auto-merge (squash) April 12, 2025 19:04
@rzuckerm rzuckerm marked this pull request as draft April 14, 2025 10:46
auto-merge was automatically disabled April 14, 2025 10:46

Pull request was converted to draft

@rzuckerm
Copy link
Copy Markdown
Collaborator Author

Please hold off on reviewing this. I have a better way to do this that should result in less code.

@rzuckerm
Copy link
Copy Markdown
Collaborator Author

OK, it's ready. The approach that I thought would make the code significantly smaller didn't work. However, I found a slight improvement that reduced the size by about 50 bytes.

@rzuckerm rzuckerm marked this pull request as ready for review April 15, 2025 00:39
@rzuckerm rzuckerm enabled auto-merge (squash) April 15, 2025 00:40
Copy link
Copy Markdown
Member

@jrg94 jrg94 left a comment

Choose a reason for hiding this comment

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

😀

@rzuckerm rzuckerm merged commit e31f27b into TheRenegadeCoder:main Apr 16, 2025
4 checks passed
@rzuckerm rzuckerm deleted the whitespace-quine branch April 16, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Any code that improves the repo quine See: https://sampleprograms.io/projects/quine/

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Quine in Whitespace

2 participants