{"id":21040996,"url":"https://github.com/chfoo/seedyrng","last_synced_at":"2026-03-17T23:34:59.763Z","repository":{"id":40523286,"uuid":"153842070","full_name":"chfoo/seedyrng","owner":"chfoo","description":"Pseudorandom number generator library for Haxe","archived":false,"fork":false,"pushed_at":"2020-04-06T21:08:33.000Z","size":23,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-01-02T06:12:41.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haxe","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/chfoo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-19T21:08:35.000Z","updated_at":"2024-12-11T22:44:35.000Z","dependencies_parsed_at":"2022-06-30T03:03:13.546Z","dependency_job_id":null,"html_url":"https://github.com/chfoo/seedyrng","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/chfoo/seedyrng","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fseedyrng","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fseedyrng/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fseedyrng/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fseedyrng/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chfoo","download_url":"https://codeload.github.com/chfoo/seedyrng/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chfoo%2Fseedyrng/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30635192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T22:38:22.569Z","status":"ssl_error","status_checked_at":"2026-03-17T22:38:11.804Z","response_time":56,"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":[],"created_at":"2024-11-19T13:49:40.645Z","updated_at":"2026-03-17T23:34:59.735Z","avatar_url":"https://github.com/chfoo.png","language":"Haxe","readme":"SeedyRNG\n========\n\nSeedyRNG (Seedy) is a pseudorandom number generator library for Haxe.\n\nSeedy is intended for generating numbers for applications that require reproducible sequences. Such examples include video game world generation or unit tests.\n\nIt provides a general featured interface such as producing an integer within a range or choosing an item from an array. It also allows you to use your own generator implementation if you desire.\n\nSeedy is deterministic or predictable which means it is *not* suitable for secure cryptographic purposes. (You may be interested in the [trandom library](https://lib.haxe.org/p/trandom) or a libsodium binding which provides an API to the OS cryptographic random number generator.)\n\nQuick start\n-----------\n\nRequires Haxe 3 or 4.\n\nInstall it from Haxelib:\n\n    haxelib install seedyrng\n\n(To install the latest from the git repository, use `haxelib git`.)\n\nIf you simply need a random integer:\n\n```haxe\nSeedy.randomInt(0, 10); // =\u003e Int\n```\n\nIf you need finer control, such as specifying the seed, use an instance of `Random`:\n\n```haxe\nvar random = new Random();\nrandom.setStringSeed(\"hello world!\");\nrandom.randomInt(0, 10); // =\u003e Int\n```\n\nBy default, the generator is xorshift128+. It is a relatively new generator based on the xorshift family. It is comparable to the popular Mersenne Twister but it is faster and simpler.\n\nIf you want to use another generator, you can specify it on the constructor:\n\n```haxe\nvar random = new Random(new GaloisLFSR32());\n// or\nvar random = new Random(new Xorshift64Plus());\n```\n\nThe included `Xorshift128Plus` generator may be very slow on targets withouts 64-bit integers. For a generator that is fast on all targets, it is recommended to use `Xorshift64Plus` instead.\n\nFor details on all the methods, see the [API documentation](https://chfoo.github.io/seedyrng/api/).\n\nRandomness testing\n------------------\n\nIf you desire, you can statistically test the generator using something like:\n\n    haxe hxml/app.cpp.hxml \u0026\u0026 out/cpp/Seedy | dieharder -g 200 -a\n\nAlternatively, you can [inspect a visualization](https://unix.stackexchange.com/a/289670) of the output:\n\n    export X=1000 Y=1000; haxe hxml/app.cpp.hxml \u0026\u0026 out/cpp/Seedy | head -c \"$((3*X*Y))\" | display -depth 8 -size \"${X}x${Y}\" RGB:-\n\nContributing\n------------\n\nPlease file bug reports, features, or pull requests using the repo's GitHub Issues.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfoo%2Fseedyrng","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchfoo%2Fseedyrng","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchfoo%2Fseedyrng/lists"}