{"id":16520348,"url":"https://github.com/benbusby/y2k","last_synced_at":"2025-04-13T16:19:59.906Z","repository":{"id":65146408,"uuid":"563981643","full_name":"benbusby/y2k","owner":"benbusby","description":"A 0-byte programming language encoded in pre-2000 timestamps","archived":false,"fork":false,"pushed_at":"2023-08-22T16:14:06.000Z","size":292,"stargazers_count":15,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-16T07:44:10.476Z","etag":null,"topics":["code-golf","compiler","esolang","esoteric-language","esoteric-programming-language","go","golang","interpreter","interpreter-language","interpreters","language","lightweight","programming-language","scripting-language","small"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benbusby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-09T18:36:14.000Z","updated_at":"2024-11-08T01:24:21.000Z","dependencies_parsed_at":"2024-06-20T01:47:36.892Z","dependency_job_id":"1ec96272-72aa-4e47-882b-dbeb6e90cb88","html_url":"https://github.com/benbusby/y2k","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbusby%2Fy2k","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbusby%2Fy2k/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbusby%2Fy2k/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbusby%2Fy2k/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbusby","download_url":"https://codeload.github.com/benbusby/y2k/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741531,"owners_count":21154328,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-golf","compiler","esolang","esoteric-language","esoteric-programming-language","go","golang","interpreter","interpreter-language","interpreters","language","lightweight","programming-language","scripting-language","small"],"created_at":"2024-10-11T16:50:33.027Z","updated_at":"2025-04-13T16:19:59.885Z","avatar_url":"https://github.com/benbusby.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  [![Y2K Logo](https://benbusby.com/assets/images/y2k.gif)](https://benbusby.com/assets/images/y2k.gif)\n  \n  [![MPL License](https://img.shields.io/github/license/benbusby/y2k)](LICENSE)\n  [![GitHub release](https://img.shields.io/github/v/release/benbusby/y2k)](https://github.com/benbusby/y2k/releases)\n  [![builds.sr.ht status](https://builds.sr.ht/~benbusby/y2k.svg)](https://builds.sr.ht/~benbusby/y2k?)\n  [![Go Report Card](https://goreportcard.com/badge/github.com/benbusby/y2k)](https://goreportcard.com/report/github.com/benbusby/y2k)\n\u003c/div\u003e\n\n___\n\n\u003ctable\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n        \u003cth width=\"500px\"\u003e\u003ca href=\"https://sr.ht/~benbusby/y2k\"\u003eSourceHut\u003c/a\u003e\u003c/th\u003e\n        \u003cth width=\"500px\"\u003e\u003ca href=\"https://github.com/benbusby/y2k\"\u003eGitHub\u003c/a\u003e\u003c/th\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n\u003c/table\u003e\n\nContents\n1. [Install](#install)\n2. [Features](#features)\n3. [Usage](#usage)\n4. [How It Works](#how-it-works)\n5. [Examples](#examples)\n    1. [Set and Print Variable](#set-and-print-variable)\n    2. [Modify Variable](#modify-and-print-variable)\n    3. [Print \"Hello World!\"](#hello-world)\n    4. [Area of a Circle](#area-of-a-circle)\n    5. [Fibonacci Sequence (N-terms)](#fibonacci-sequence)\n    6. [Fizz Buzz](#fizz-buzz)\n    7. [Count Up Forever (Golf Hack)](#count-up-forever)\n6. [FAQ](#faq)\n    1. [Why the pre-2000 timestamp limitation? Why the name Y2K?](#faq)\n    2. [What does 0-byte actually mean? How can a program be 0 bytes?](#faq)\n    3. [Why are there two ways to copy a variable's value to a new variable?](#faq)\n    4. [How would I show proof of my solution in a code golf submission?](#faq)\n    5. [Why doesn't Y2K have X feature?](#faq)\n7. [Contributing](#contributing)\n\n## Install\n\n### Binary (Windows, macOS, Linux)\nDownload from [the latest release](https://github.com/benbusby/y2k/releases)\n\n### Go\n`go install github.com/benbusby/y2k@latest`\n\n### From Source\n\n1. Install Go: https://go.dev/doc/install\n2. Clone and build project:\n```\ngit clone https://github.com/benbusby/y2k.git\ncd y2k\ngo build\n```\n\n## Features\n\n- Variable creation\n  - Supported types: `int`, `float`, `string`\n- Variable modification\n  - Supported operations: `+=`, `-=`, `/=`, `*=`, `**= (exponentiation)`, `= (overwrite)`\n  - Accepts primitive types (`int`, `float`, `string`) or variable IDs as arguments\n- Conditional logic\n  - Supported types: `if`, `while`\n  - Supported comparisons: `==`, `\u003e`, `\u003c`, and divisibility (`% N == 0`)\n- Print statements\n  - Supported types: `var`, `string`\n- Debug mode\n  - Outputs where/how each timestamp digit is being parsed\n- \"Raw\" file reading/writing\n  - Allows writing Y2K programs as file content (see [Examples](#examples)) and\n    exporting to a set of new 0-byte files with their timestamps modified,\n    rather than manually editing individual file timestamps.\n\n## Usage\n\n```\ny2k [args] \u003cinput\u003e\n\nArgs:\n  -d int\n        Set # of digits to parse at a time (default 1)\n  -debug\n        Enable to view interpreter steps in console\n  -export\n        Export a Y2K raw file to a set of timestamp-only files\n  -outdir string\n        Set the output directory for timestamp-only files when exporting a raw Y2K file.\n        This directory will be created if it does not exist. (default \"./y2k-out\")\n```\n\n____\n\n***Note:** See [CHEATSHEET.md](CHEATSHEET.md) for help with writing Y2K commands.*\n\nThe simple way to write Y2K programs is to write all commands to a file as\nregular file content first.\n\nFor example, from [the \"Set and Print Variable\" program](#set-and-print-variable):\n\n```elixir\n# set-and-print-var.y2k\n8124 # Create new variable 1 with type int (2) and size 4\n1999 # Insert 4 digits (1999) into variable 1\n\n9211 # Print variable 1\n```\n\n```shell\n$ y2k set-and-print-var.y2k\n1999\n```\n\nYou can then export this file to a set of empty 0-byte files (or in this\nexample, just one file) with their timestamps modified to achieve the same\nfunctionality as the raw file:\n\n```shell\n$ y2k -export set-and-print-var.y2k\nWriting ./y2k-out/0.y2k -- 812415009210000000 (1995-09-29 16:50:09.21 -0600 MDT)\n\n$ ls ./y2k-out/*.y2k -lo --time-style=\"+%s%9N\"\n-rw-r--r-- 1 benbusby 0 812415009210000000 ./y2k-out/0.y2k\n```\n\nThen you could pass the new output directory as input to `y2k`, and verify that\nthe program still functions the same, but with completely empty 0-byte files.\n\n```shell\n$ y2k ./y2k-out\n1999\n```\n\nSee [Examples](#examples) for more detailed breakdowns of current example programs.\n\n## How It Works\n\nTo preface, Y2K is obviously a fairly unconventional language. Since everything\nis interpreted using numbers, it can perhaps be a bit confusing at first to get\na feel for how to write programs. If you find any of the below documentation\nconfusing, please let me know!\n\nY2K works by reading all files in a specified directory (sorted numerically)\nand extracting each of their unix nanosecond timestamps. It then concatenates\neach timestamp, stripping the first digit off of each timestamp except for the\nfirst one. This is done to eliminate the potential issue of a command spanning\nacross multiple file timestamps where a 0 might be required at the beginning of\nthe timestamp. For example, if the number 1000 was being written to a variable\nand the 0s needed to be at the beginning of the next file timestamp, this would\nonly be possible if the timestamp was prefixed with a non-zero digit (otherwise\nleading 0s are ignored).\n\nAfter the timestamps have been concatenated into one long string, this string\nis passed into the top level `interpreter.Parse()` function, which will\ninterpret the first digit as a command ID in order to determine which action to\ntake. Command IDs are mapped to fields that are unique to that particular\ncommand, and the interpreter will use the next N-digits to parse out values for\neach of those fields. Some commands, such as setting and modifying variables,\nhave a \"Size\" field which tells the interpreter how many digits following the\ncommand fields will be used to store/use a specific value. For instance, if you\nwanted to store the number 100 in a variable, you would use the \"Create\nVariable\" command ID, and the \"Size\" field for that command would be 3. The\nfollowing 3 digits of the timestamp would be \"100\", and the interpreter would\nthen read and store that 3-digit value in the variable.\n\nOnce the interpreter finishes reading the command ID, the command fields, and\nany subsequent N-digit values (if applicable), it returns to the beginning to\nparse the next command ID.\n\n[CHEATSHEET.md](CHEATSHEET.md) contains a simplified breakdown of command IDs,\ncommand fields, and when values are needed for the different commands. Please also\nrefer to the following [Examples](#examples) section for simple programs that help to\ninform how the Y2K interpreter works.\n\n## Examples\n\nEach example below is taken directly from the [`examples`](examples) folder,\nbut with added explanation for how/why they work.\n\nAll examples can be exported to 0-byte solutions using the `-export` flag if\ndesired.\n\n\u003chr\u003e\n\n### Set and Print Variable\n[`examples/set-and-print-var.y2k`](examples/set-and-print-var.y2k)\n\nTimestamp:\n- `812419999211000000 (1995-09-29 18:13:19.211000000)`\n\nThis example simply sets an integer variable to the value `1999` and then\nprints that variable to the console.\n\n```elixir\n8124 # Create new variable 1 with type int (2) and size 4\n1999 # Insert 4 digits (1999) into variable 1\n\n9211 # Print variable 1\n```\n\nOutput: `1999`\n\n\u003chr\u003e\n\n### Modify and Print Variable\n[`examples/modify-and-print-var.y2k`](examples/modify-and-print-var.y2k)\n\nTimestamp:\n- `812419997120149211 (1995-09-29 18:13:17.120149211)`\n\nThis example expands on the previous example by modifying the variable's\nvalue after creating it. In this case, we're taking the original variable\nvalue (`1999`) and subtracting `4` from it to get `1995`.\n\n```elixir\n8124  # Create (8) a variable (1) with type \"int\" (2) and size 4\n1999  # Insert 4 digits (1999) into variable 1\n\n71201 # On variable 1, call function \"-=\" (2) with a primitive (0) 1-digit argument\n4     # Insert 1 digit (4) into function argument\n\n9211  # Print variable 1\n```\n\nOutput: `1995`\n\n\u003chr\u003e\n\n### Hello World\n[`examples/hello-world.y2k`](examples/hello-world.y2k)\n\nTimestamp(s):\n- `502090112340512121 (1985-11-28 22:28:32.340512121)`\n- `850049151812046300 (1996-12-08 05:45:51.812046300)`\n\nIn this example, we're printing the string \"Hello World!\". Since character\ncodes are easier to encapsulate with 2-digit codes (and the string we're\nprinting is a 2-digit number), we need to switch the interpreter to 2-digit\nparsing mode at the very beginning.\n\n```elixir\n5 0 2 # Switch interpreter to 2-digit parsing size\n\n09 01 12 # Begin printing a string with a size of 12\n\n34 05 12 12 15 00 # Write \"Hello \"\n49 15 18 12 04 63 # Write \"World!\"\n```\n\nOutput: `Hello World!`\n\n\u003chr\u003e\n\n### Area of a Circle\n[`examples/area-of-circle.y2k`](examples/area-of-circle.y2k)\n\nTimestamp(s):\n- `813913141592679501 (1995-10-17 00:59:01.592679501)`\n- `827131199211000000 (1996-03-17 23:39:59.211000000)`\n\nIn this example, we're introducing a couple of new concepts. One is the ability\nto include variables from the command line, and the other is modifying one\nvariable using another variable's value.\n\nTo include variable's from the command line, we simply pass the value after the\ninput. For example, `y2k my-program.y2k 10` would include a variable with the\nvalue `10` that we can access from the beginning of the program. Since most Y2K\nprograms create variables using sequential IDs (i.e. 0 -\u003e 1 -\u003e 2, etc),\nvariables added from the command line are added to the back of the variable\nmap, with descending IDs from there. So if you're running Y2K in the default\n1-digit parser mode, command line arguments are added as variables with IDs\nstarting at 9, then 8, and so on. As an example: `y2k my-program.y2k foo bar`\nwould have variable 9 set to \"foo\" and variable 8 set to \"bar\".\n\nThe other new concept is modifying a variable with the value from another\nvariable. In previous examples, we've used primitive types for arguments, but\nin this case we need to multiply our \"Pi\" variable (1) by our squared radius.\nTo do this, we set the third field to \"1\" to tell the interpreter that the\nvalue we're passing in is a variable ID, not a primitive type.\n\n```elixir\n8139      # Set variable 1 to type float (3) and size 9\n\n131415926 # Insert 9 digits (131415926) into variable 1, using the first\n          # digit (1) as the decimal placement (3.1415926)\n\n79501     # Modify variable 9 (CLI arg) using the \"**=\" function (5),\n          # with a non-variable (0) argument size of 1\n2         # Use the number 2 as the function argument (var9 **= 2)\n\n71311     # Modify variable 1 using the \"*=\" function (3), with a\n          # variable argument (1) with a variable ID size of 1\n9         # Use the variable ID 9 in the function argument (var1 *= var9)\n\n9211      # Print variable 1\n```\n\nOutput (`y2k examples/area-of-circle.y2k 10`):\n\n```\n314.15926\n```\n\nOutput (`y2k examples/area-of-circle.y2k 25`):\n\n```\n1963.495375\n```\n\n\u003chr\u003e\n\n### Fibonacci Sequence\n[`examples/fibonacci-n-terms.y2k`](examples/fibonacci-n-terms.y2k)\n\nTimestamp(s):\n- `812108221183210693 (1995-09-26 03:37:01.183210693)`\n- `811092117391117191 (1995-09-14 09:21:57.391117191)`\n- `812721113792011000 (1995-10-03 05:51:53.792011000)`\n\nFor this modification to the Fibonacci Sequence program, we're now using an\nargument from the command line as the number of terms to print. In this new\nprogram, we'll take the command line argument and create a new loop that\ndecrements that value until it reaches 0.\n\nWe need 3 variables for this program, not including the variable added from the\ncommand line: a variable for the \"current\" value, a \"placeholder\" variable to\ntrack the \"current\" value before it gets updated, and a \"next\" variable to track\nthe \"next\" value in the sequence. On each loop iteration, we 1) print \"current\", 2)\nset \"placeholder\" to \"current\", 3) set \"current\" to \"next\", 4) add \"placeholder\"\nto \"next\", and 5) decrement counter.\n\n```elixir\n8121 # Create variable 1 with type int (2) and size 1\n0    # Insert 1 digit (0) into variable 1\n8221 # Create variable 2 with type int (2) and size 1\n1    # Insert 1 digit (1) into variable 2\n8321 # Create variable 3 with type int (2) and size 1\n0    # Insert 1 digit (0) into variable 3\n\n# Init while loop (while var 9 \u003e 0)\n69311 # Create conditional using variable 9, with comparison \"\u003e\" (3),\n      # as a loop (1), and with a right hand value size of 1\n0     # Insert 1 digit (0) into conditional's right hand value\n\n# Begin while loop\n    9211 # Print var 9\n    739111 # var 3 = var 1\n    719112 # var 1 = var 2\n    721113 # var 2 += var 3\n    792011 # var 9 -= 1\n```\n\nOutput 1 (`y2k examples/fibonacci-n-terms.y2k 15`):\n\n```\n0\n1\n1\n2\n3\n5\n8\n13\n21\n34\n55\n89\n144\n233\n377\n```\n\nOutput 2 (`y2k examples/fibonacci-n-terms.y2k 20`):\n\n```\n0\n1\n1\n2\n3\n5\n8\n13\n21\n34\n55\n89\n144\n233\n377\n610\n987\n1597\n2584\n4181\n```\n\n\u003chr\u003e\n\n### Fizz Buzz\n[`examples/fizz-buzz.y2k`](examples/fizz-buzz.y2k)\n\nTimestamp(s):\n- `502080901043209262 (1985-11-28 19:55:01.043209262)`\n- `860808010428212626 (1997-04-11 19:20:10.428212626)`\n- `805000187919771118 (1995-07-05 21:09:47.919771118)`\n- `861213100711011614 (1997-04-16 11:51:40.711011614)`\n- `802159217420006140 (1995-06-03 00:00:17.420006140)`\n- `813921942000614015 (1995-10-17 03:25:42.000614015)`\n- `892184200092110000 (1998-04-09 22:56:40.092110000)`\n\nThe Fizz Buzz program highlights a few features that haven't been covered yet,\nnamely terminating and \"continue\"-ing conditionals. We also have to tell the\ninterpreter to switch between 1- and 2-digit parsing in order to create our\nwords \"fizz\" and \"buzz\" while maintaining the efficiency of 1-digit parsing.\n\nThe value `2000`, when used within a non-looped conditional, tells the\ninterpreter where the \"body\" of the statement needs to end. This is an\narbitrarily chosen value (but fits with the name of the language) that is used\nmultiple times in this program to tell the interpreter where an \"if\" statement\nends. There's also the new command ID `4` (aka `CONTINUE`), which returns an\nempty string to the parent parser function instead of the remainder of the\ntimestamp. Since this is being used inside a \"while\" loop, this returns the\ninterpreter back to the beginning of the loop to reevaluate instead of\ncontinuing to the next part of the timestamp.\n\n\n```elixir\n502 # Change interpreter to 2-digit parsing mode\n\n# Set variables 9 and 8 to \"fizz\" and \"buzz\" respectively\n08 09 01 04 # Create variable 9 with type string (1) and length 4\n32 09 26 26 # Insert 4 chars (\"Fizz\") into variable 9\n08 08 01 04 # Create variable 8 with type string (1) and length 4\n28 21 26 26 # Insert 4 chars (\"Buzz\") into variable 8\n\n05 00 01 # Change interpreter back to 1-digit parsing mode\n\n# Set variable 7 to \"fizzbuzz\"\n8791  # Create variable 7 with type \"copy\" (9) and length 1 (variable ID length)\n9     # Use 1 digit variable ID (9) to copy values from var 9 to var 7\n77111 # On variable 7, call function \"+=\" (5) using a variable (1) with a 1 digit ID\n8     # Use 1 digit variable ID (8) to append values from var 8 to var 7\n\n# Begin the loop from 0 to 100\n61213100 # while variable 1 \u003c 100 (implicit creation of var 1)\n    711011 # var 1 += 1\n    6140215 # if var 1 % 15 == 0\n        9217 # print var 7 (\"fizzbuzz\")\n           4 # continue\n    2000 # end-if\n    614013 # if var 1 % 3 == 0\n       9219 # print var 9 (\"fizz\")\n          4 # continue\n    2000 # end-if\n    614015 # if var 1 % 5 == 0\n        9218 # print var 8 (\"buzz\")\n           4 # continue\n    2000 # end-if\n    9211 # print var 1\n```\n\nOutput:\n```\n1\n2\nfizz\n4\nbuzz\nfizz\n7\n8\nfizz\nbuzz\n11\nfizz\n13\n14\nfizzbuzz\n16\n17\nfizz\n19\nbuzz\nfizz\n22\n23\nfizz\nbuzz\n26\nfizz\n28\n29\nfizzbuzz\n...\u003ccontinued\u003e...\n```\n\n\u003chr\u003e\n\n### Count Up Forever\n[`examples/count-up-forever.y2k`](examples/count-up-forever.y2k)\n\nTimestamp(s):\n- `611110721011921200 (1989-05-13 18:58:41.011921200)`\n\n*Originally from [this problem on\ncodegolf.stackexchange.com](https://codegolf.stackexchange.com/questions/63834/count-up-forever/).*\n\nYou may have noticed something \"sneaky\" in the Fizz Buzz example, which is the\nimplicit creation of variables when they're referenced without being explicitly\ncreated beforehand. This is somewhat similar to the `for i in val` behavior\nseen in other languages, where `i` is created from the context it's used in.\nCurrently, Y2K only supports initialization of integer variables with a value\nof `0`, but this could be expanded in future versions to support iterating over\nstrings, arrays, and so on.\n\nThis program -- a simple program to count up by 1 until killed -- highlights\nthat feature. In this example, we create variable 1 through its reference in\nthe while loop, and variable 2 the first time that we try to modify it.\n\nCreating variables this way isn't necessarily recommended, since it makes\nprograms more difficult to read and, as previously mentioned, can only be used\nfor creating variables with a value of 0. But it can be a useful way to\ncondense a solution into an even smaller footprint. In this case, we can fit\nthe solution to the problem in a single file timestamp (and in raw format is\nonly 15 bytes after comments and newlines are removed).\n\n```\n611110 # while var 1 == 0\n    721011 # var 2 += 1\n    9212   # print var 2\n```\n\nOutput:\n```\n1\n2\n3\n4\n5\n...\u003ccontinued until killed\u003e...\n```\n\n\u003chr\u003e\n\n## FAQ\n\n- **Why the pre-2000 timestamp limitation? Why the name Y2K?**\n\nThe language was originally designed to interpret timestamps of any length, but\nboth macOS and Go store Unix nanoseconds as an int64. The max value of an int64\nhas 19 digits (`9223372036854775807`) but it wouldn't be reliable to write\nprograms using all 19 digits, since there can be programs that exceed this\nvalue fairly easily (a program to print the letter 'c' would start with\n`923...`, for example). As a result, all timestamps for Y2K programs have 18\ndigits, which results in a maximum timestamp that falls around the year 2000¹.\n\nThe interpreter was also originally designed to only ever read 2 digits at a time.\nThese combined limitations reminded me of [the \"Y2K\nProblem\"](https://en.wikipedia.org/wiki/Year_2000_problem), hence the name.\n\n- **What does 0-byte actually mean? How can a program be 0 bytes?**\n\nSince the interpreter only reads file *timestamps* and not file *content*, each\n`.y2k` file can be completely empty (0 bytes) without affecting how each\nprogram is interpreted. And since every file has to have a timestamp associated\nwith it anyway, there aren't any extra bytes needed to achieve this\nfunctionality. Technically though, there's no such thing as a 0 byte file --\nthe metadata for that file does have to be stored somewhere. But for code\ngolfing purposes, I believe it would be counted as 0 bytes.\n\n- **Why are there two ways to copy a variable's value to a new variable?**\n\nThe method through the `SET` command (`8`) inserts a new reference to a\nvariable using the specified ID, whereas the method through the `MODIFY`\ncommand (`7`) updates the existing reference in the variable table. The former\ncan be useful for instantiating a new variable from an existing one, but can\ncause problems if you're within the scope of a condition that has referenced\nthat variable.\n\nFor example:\n\n```elixir\n81210 # int var 1 = 0\n82210 # int var 2 = 0\n\n# BAD\n# Loops infinitely, since the reference to Var 1 that\n# was used to create the loop is overwritten, and the\n# value of the original reference is never updated\n61213100 # While Var 1 \u003c 100\n    721101 # Var 2 += 1\n    81912  # Overwrite Var 1 with Var 2 values\n\n# GOOD\n# Loops as expected, Var 1's value is updated on each\n# iteration with Var 2's value\n61213100 # While Var 1 \u003c 100\n    721101 # Var 2 += 1\n    719112 # Copy Var 2 value to Var 1\n```\n\n- **How would I show proof of my solution in a code golf submission?**\n\nI'm not sure the best way to do this yet. Assuming you wrote your solution\nas a \"raw\" Y2K file, you can run `y2k -export my-program.y2k`, and then\nrun the following command:\n\n```shell\n$ ls ./y2k-out/*.y2k -lo --time-style=\"+%s%9N\"\n-rw-r--r-- 1 benbusby 0 502090134051212150 0.y2k\n-rw-r--r-- 1 benbusby 0 104915181204630000 1.y2k\n```\n\nYou could also include your raw Y2K file contents along with the 0-byte\nproof, to be extra thorough.\n\n- **Why doesn't Y2K have X feature?**\n\nThe language is still in development. Feel free to open an issue, or refer to\nthe [Contributing](#contributing) section if you'd like to help out!\n\n_____\n\n¹ Technically Sept. 2001, but close enough...\n\n## Contributing\n\nI would appreciate any input/contributions from anyone. Y2K still needs a lot\nof work, so feel free to submit a PR for a new feature, browse the issues tab\nto see if there's anything that you're interested in working on, or add a new\nexample program.\n\nThe main thing that would help is trying to solve current or past code-golfing\nproblems from https://codegolf.stackexchange.com. If there's a limitation in\nY2K (there are definitely a ton) that prevents you from solving the problem,\nopen an issue or PR so that it can be addressed!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbusby%2Fy2k","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbusby%2Fy2k","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbusby%2Fy2k/lists"}