{"id":37179885,"url":"https://github.com/ericlagergren/go-prng","last_synced_at":"2026-01-14T20:55:34.133Z","repository":{"id":34293205,"uuid":"38190639","full_name":"ericlagergren/go-prng","owner":"ericlagergren","description":"Various PRNG generators translated to Go","archived":true,"fork":false,"pushed_at":"2016-07-29T18:12:04.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-16T03:26:45.056Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericlagergren.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}},"created_at":"2015-06-28T07:37:28.000Z","updated_at":"2023-01-28T09:38:56.000Z","dependencies_parsed_at":"2022-09-14T03:31:08.514Z","dependency_job_id":null,"html_url":"https://github.com/ericlagergren/go-prng","commit_stats":null,"previous_names":["ericlagerg/go-prng"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ericlagergren/go-prng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlagergren%2Fgo-prng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlagergren%2Fgo-prng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlagergren%2Fgo-prng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlagergren%2Fgo-prng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericlagergren","download_url":"https://codeload.github.com/ericlagergren/go-prng/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericlagergren%2Fgo-prng/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28434500,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T18:57:19.464Z","status":"ssl_error","status_checked_at":"2026-01-14T18:52:48.501Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":[],"created_at":"2026-01-14T20:55:33.615Z","updated_at":"2026-01-14T20:55:34.111Z","avatar_url":"https://github.com/ericlagergren.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go-PRNG\n\n## What\n\nGo-PRNG is a collection of pseudo-random number generators. Each PRNG is\ngiven an easy-to-use interface, and some libraries implement math.Rand's\n`Source` interface.\n\n## Why\n\nI was generating random strings and was accidentally using the same seed,\ncausing me to generate the same strings. So, I went to use a quick and\ndirty XOR solution, and somehow ended up translating these PRNGs into Go.\n\n## How\n\n#### xorshift\n\n```go\nimport (\n\t\"fmt\"\n\t\n\tprng \"github.com/ericlagerg/go-prng/xorshift\"\n)\n\nfunc main() {\n\ts := new(prng.Shift128Plus)\n\ts.Seed()\n\tfmt.Println(s.Next())\n}\n```\n\n### mersennes twister\n\n```go\nimport (\n\t\"fmt\"\n\t\n\tprng \"github.com/ericlagerg/go-prng/mersenne_twister_64\"\n)\n\nfunc main() {\n\tm := NewMersenne()\n\tm.Seed(787094841)\n\tfmt.Println(m.Int64())\n}\n```\n\n## Documentation\n\n[godoc.org] [docs]\n\n## License\n\nIt depends on the algorithm.\n\n[Apache 2.0] [license].\n\n\n[docs]:     https://godoc.org/github.com/EricLagerg/go-prng\n[license]:  https://github.com/EricLagerg/go-prng/blob/master/apache.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlagergren%2Fgo-prng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericlagergren%2Fgo-prng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericlagergren%2Fgo-prng/lists"}