{"id":23692382,"url":"https://github.com/cristian-5/pcg-random-wasm","last_synced_at":"2026-01-26T23:22:39.069Z","repository":{"id":192099963,"uuid":"624479407","full_name":"cristian-5/pcg-random-wasm","owner":"cristian-5","description":"PCG PRNG port in webassembly","archived":false,"fork":false,"pushed_at":"2024-11-09T18:49:47.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-02T20:46:25.935Z","etag":null,"topics":["pcg-random","prng","webassembly"],"latest_commit_sha":null,"homepage":"http://www.pcg-random.org","language":"WebAssembly","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cristian-5.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":"2023-04-06T14:59:27.000Z","updated_at":"2024-11-09T18:49:51.000Z","dependencies_parsed_at":"2023-09-02T15:02:07.438Z","dependency_job_id":"7ac64584-2c7d-4a69-abbe-a700763b7ce1","html_url":"https://github.com/cristian-5/pcg-random-wasm","commit_stats":null,"previous_names":["cristian-5/pcg-random-wasm"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cristian-5/pcg-random-wasm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristian-5%2Fpcg-random-wasm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristian-5%2Fpcg-random-wasm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristian-5%2Fpcg-random-wasm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristian-5%2Fpcg-random-wasm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristian-5","download_url":"https://codeload.github.com/cristian-5/pcg-random-wasm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristian-5%2Fpcg-random-wasm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28791168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["pcg-random","prng","webassembly"],"created_at":"2024-12-30T03:27:20.799Z","updated_at":"2026-01-26T23:22:39.055Z","avatar_url":"https://github.com/cristian-5.png","language":"WebAssembly","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## pcg-random-wasm\n\n🎲 **Web Assembly PCG** random number generator http://www.pcg-random.org .\\\n💗 **Handwritten**, **commented** port based on *Ph.D. Melissa E. O'Neill*'s work.\n\n\u003e PCG is a family of simple fast space-efficient statistically good algorithms for random number generation.\\\n\u003e Unlike many general-purpose RNGs, they are also hard to predict.\n\nThis project comes with a `p5.js` sketch to demonstrate uniform distribuition.\\\n⚠️ **Attention:** the sketch needs to be served by a web server, otherwise it won't work.\n\n### API usage:\n\n``` js\nWebAssembly.instantiateStreaming(fetch(\"pcg_prng.wasm\")).then(({ instance }) =\u003e {\n    const seed = instance.exports.pcg32_srandom;\n    const biased = instance.exports.pcg32_random_biased;\n    const unbiased = instance.exports.pcg32_random_unbiased;\n    seed(BigInt(Date.now()), BigInt(Date.now()));\n    console.log(biased(20, 30), unbiased(20, 30));\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristian-5%2Fpcg-random-wasm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristian-5%2Fpcg-random-wasm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristian-5%2Fpcg-random-wasm/lists"}