{"id":17325504,"url":"https://github.com/matoking/place-snapshot","last_synced_at":"2026-07-22T13:32:07.988Z","repository":{"id":143748889,"uuid":"554361099","full_name":"Matoking/place-snapshot","owner":"Matoking","description":"Application to render 2022 r/Place at given time to an image file. Implementations in both Rust and Python.","archived":false,"fork":false,"pushed_at":"2022-10-19T17:27:36.000Z","size":5499,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-22T17:50:59.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Matoking.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-10-19T17:26:05.000Z","updated_at":"2024-04-17T17:18:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"53413963-7fd9-4729-8391-497b7568098a","html_url":"https://github.com/Matoking/place-snapshot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Matoking/place-snapshot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matoking%2Fplace-snapshot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matoking%2Fplace-snapshot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matoking%2Fplace-snapshot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matoking%2Fplace-snapshot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Matoking","download_url":"https://codeload.github.com/Matoking/place-snapshot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Matoking%2Fplace-snapshot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35764375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-15T14:13:36.005Z","updated_at":"2026-07-22T13:32:07.968Z","avatar_url":"https://github.com/Matoking.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"place-snapshot\n==============\n\nSimple command-line application to parse the [r/Place](https://reddit.com/r/place/) GZIP\ncompressed dataset and render the canvas at given time into an PNG file.\nThe dataset is a GZIP compressed CSV file with 160 million rows.\n\nThis repository contains two implementations: one written in Rust and another\nwritten in Python.\n\n# Usage\n\n## Preparation\n\nTo actually do anything with this application, you'll need to download the r/Place\nGZIP compressed dataset, which you can find [here](https://reddit.com/r/place/comments/txvk2d/rplace_datasets_april_fools_2022/).\n\nIf you're in a hurry, you can download it using `wget`:\n\n```\n$ wget https://placedata.reddit.com/data/canvas-history/2022_place_canvas_history.csv.gzip\n```\n\nBoth implementations accept roughly the same command-line parameters and place (hehe)\nthe finished image file `place.png` into the working directory.\n\n## Rust\n\nInstall Cargo and Rust toolchain, then run the following command to build and render the PNG file:\n\n```\n# Remember '-r' flag in order to build in release mode\n$ cargo run -r -- --path 2022_place_canvas_history.csv.gzip \"2022-04-05 15:00:00\"\n```\n\nYou can also find the binary under `target/release`.\n\n## Python\n\nInstall Python 3, then create a virtualenv and install requirements as follows:\n\n```\npython3 -mvenv venv\nsource venv/bin/activate  # Activate virtualenv\npip install --upgrade pip setuptools  # Just in case your distro has old pip and setuptools\npip install -r requirements.txt\npython place-snapshot.py 2022_place_canvas_history.csv.gzip \"2022-04-05 15:00:00\"\n```\n\n# Motivation\n\nThis was a toy program to test writing a simple but practical application in\nboth Rust and Python and measure their performance after optimizing both of\nthem. The project also allowed to measure the effort required to write a\nnon-trivial program in Rust.\n\nAuthor had little prior experience in Rust and far more experience in writing Python.\n\n# Results\n\nAfter optimizing both programs to some degree, the Rust implementation is nearly\n5x as fast as the Python implementation.\n\n```\n# Tests performed on a Ryzen 5900X processor\n# Run Rust implementation three times\n# (rustc 1.64.0)\n$ perf stat -r 3 ./place-snapshot --path \"/home/matoking/2022_place_canvas_history.csv.gzip\" \"2022-04-04 18:00:00\"\n\n...\n\n            99.725 +- 0.112 seconds time elapsed  ( +-  0.11% )\n\n# Run Python implementation three times\n# (Python 3.10.8)\n$ perf stat -r 3 python place-snapshot.py \"/home/matoking/2022_place_canvas_history.csv.gzip\" \"2022-04-04 18:00:00\"\n\n            490.65 +- 1.22 seconds time elapsed  ( +-  0.25% )\n...\n\n```\n\nThe Rust implementation was fairly easy to write with basic Rust knowledge.\nBoth the Clippy linter and the compiler provide helpful hints when faced with\nerroneous Rust code. Many mistakes could be fixed by replacing the problematic\ncode with the one suggested by the compiler.\n\nMore complex programs might be harder to implement when dealing with more complicated\nprogram architecture. The program is single threaded and processes\na single file in serial, an approach that gels nicely with Rust's ownership model.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatoking%2Fplace-snapshot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatoking%2Fplace-snapshot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatoking%2Fplace-snapshot/lists"}