{"id":13507333,"url":"https://github.com/jj1bdx/sfmt-erlang","last_synced_at":"2025-03-30T07:32:46.856Z","repository":{"id":51326932,"uuid":"755934","full_name":"jj1bdx/sfmt-erlang","owner":"jj1bdx","description":"sfmt-erlang: SIMD-oriented Fast Mersenne Twister (SFMT) for Erlang","archived":true,"fork":false,"pushed_at":"2022-01-20T00:38:38.000Z","size":2293,"stargazers_count":70,"open_issues_count":0,"forks_count":23,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T12:59:17.708Z","etag":null,"topics":["erlang","mersenne-twister","random","sfmt"],"latest_commit_sha":null,"homepage":"http://jj1bdx.github.io/sfmt-erlang/","language":"Erlang","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/jj1bdx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-04T05:18:35.000Z","updated_at":"2024-05-04T22:20:39.000Z","dependencies_parsed_at":"2022-09-05T20:11:40.128Z","dependency_job_id":null,"html_url":"https://github.com/jj1bdx/sfmt-erlang","commit_stats":null,"previous_names":[],"tags_count":47,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jj1bdx%2Fsfmt-erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jj1bdx%2Fsfmt-erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jj1bdx%2Fsfmt-erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jj1bdx%2Fsfmt-erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jj1bdx","download_url":"https://codeload.github.com/jj1bdx/sfmt-erlang/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222535179,"owners_count":16999233,"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":["erlang","mersenne-twister","random","sfmt"],"created_at":"2024-08-01T02:00:31.355Z","updated_at":"2024-11-01T06:31:47.253Z","avatar_url":"https://github.com/jj1bdx.png","language":"Erlang","funding_links":[],"categories":["Algorithms and Data structures"],"sub_categories":[],"readme":"[//]: # (-*- coding: utf-8 -*-)\n\n# sfmt-erlang: SIMD-oriented Fast Mersenne Twister (SFMT) for Erlang\n\n## This software is no longer maintained\n\n*CAUTION*: this software is no longer maintained. *Migrate to the default rand module for OTP 18 and later because they are well-supported and use faster and better algorithms.*\n\n## Version and credit information\n\n* Version 0.14.0 15-MAY-2021\n* Edited and written by Kenji Rikitake (Kenji Rikitake Professional Engineer's Office)\n* Email contact: \u003ckenji.rikitake@acm.org\u003e\n\n## Build and test commands\n\n* Building: `rebar3 compile`\n* C NIF Documentation: `doxygen` (requires Doxygen 1.9.1 or later)\n* Erlang Documentation: `rebar3 edoc`\n* Testing: `rebar3 ct`\n* Execution speed benchmark: execute `rebar3 shell` and run `sfmt_tests:test_speed()` and `sfmt_pure_tests:test_speed()`\n* Cleaning up: `rebar3 clean`\n\n## Use rebar3 to build since 0.14.0\n\n* Since 14.0, erlang.mk and mix.exs are removed. Use rebar3 to build.\n\n## Use 0.13.2 and later for OTP 23\n\n* erlang.mk is updated to stop using `-lerl_interface`. This is required for a successful build in OTP 23.\n\n## Security notice regarding the PHP mt_seed() vulnerability\n\nAmbionics Security published [an internal state retrieval algorithm of PHP `mt_rand()`](https://www.ambionics.io/blog/php-mt-rand-prediction) on 6-JAN-2020. sfmt-erlang uses the same seed-to-internal-state initialization algorithm at the function `init_gen_rand/1`.\n\nFor reducting the possibility of the internal state revelation, use `init_by_list32/1` instead, better combined with `rand:uniform/1`. [Raimo Niskanen published a piece of code for this purpose](http://erlang.org/pipermail/erlang-questions/2018-July/095875.html).\n\n*Note well that sfmt-erlang has no cryptographic security guarantee and MUST NOT be used for security purposes such as password generation.*\n\nAlso: Version 0.13.0 and 0.13.1 Erlang and C code files are identical. Users have no need to upgrade.\n\nThanks to Shiro Kawai for the notification of the seed initialization algorithm issue. \n\n## License\n\nCopyright (c) 2010-2021 Kenji Rikitake and Kyoto University. All rights\nreserved.\n\nCopyright (c) 2006,2007 Mutsuo Saito, Makoto Matsumoto and Hiroshima\nUniversity. All rights reserved.\n\nSee the file `LICENSE` for the license (new/simplified BSD license).\n\n## Details of SFMT algorithm\n\nThis software is based on SFMT ver. 1.3.3 (SIMD oriented Fast Mersenne\nTwister(SFMT)) by Mutsuo Saito (Hiroshima University) and Makoto Matsumoto\n(Hiroshima University). See\n\u003chttp://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/index.html\u003e for the further details.\n\nNote well: only (2^19937 - 1) period is supported.\n\n## Available modules\n\n* module `sfmt`: SFMT with C NIFs\n* module `sfmt_pure`: SFMT with pure Erlang\n* See [CHANGES.md](https://github.com/jj1bdx/sfmt-erlang/blob/master/CHANGES.md) for the detail of miscellaneous changes\n\n## C NIFs\n\n* Compiler requirement: C99 support (modern Clang and gcc will do): `\u003cinttypes.h\u003e` required\n* See `c_src/sfmt_nif.c` for the details\n* Also refer to sfmt-extstate at \u003chttp://github.com/jj1bdx/sfmt-extstate\u003e\n* The version number of this NIF is 101 (see `NIF_LOAD_INFO` macro value)\n\n## Tested platforms\n\n* macOS 10.15.7 with Erlang/OTP 24.0\n* Ubuntu 20.10 with Erlang/OTP 24.0\n* sfmt-erlang will work with older OTP versions\n\n## hex.pm support\n\n* hex is supported through rebar3\\_hex plugin\n* NIF building errors fixed (0.12.7 and later)\n* Package name: `sfmt`\n* Note: all builds including C and Erlang source compilation are done with rebar3\n\n## API compatible with the rand module\n\n    seed/3, uniform/0, uniform/1, uniform_s/1, uniform_s/3 \n\n## On HiPE usage\n\n* HiPE is removed from OTP 24, no longer configured\n* sfmt module is NIFnized so does not coexist with HiPE\n* On the other hand, `sfmt_pure` module can be compiled with HiPE or `+native \"+{hipe, [o3]}\"` erlc compile option, which will result in 40% to 100% speedup on 64-bit machines\n\n## TODO\n\n* No more new feature; more load testing needed\n* More documentation\n* Code upgrading/reloading behavior check\n\n## Code authors:\n\n* Kenji Rikitake\n* Mutsuo Saito\n* Makoto Matsumoto\n* Dan Gudmundsson\n* Michael Truog\n* Michael Chmielewski\n* David Whitlock\n* Pierre Fenoll\n\n## THANKS to:\n\n* Dave \"dizzyd\" Smith\n* Tuncer Ayaz\n* Tim Bates (random\\_mt.erl implementator of Mersenne Twister)\n* Richard O'Keefe\n* Yurii Rashkovskii\n* Kostis Sagonas\n* Michael Gebetsroither\n* Shunichi Shinohara\n* Loïc Hoguin\n* @timCF of GitHub\n* Shiro Kawai\n\n## ACKNOWLEDGMENTS\n\nDuring the compatibility test of this software, Kenji Rikitake\nused the supercomputer service provided by Academic Center for\nComputing and Media Studies (ACCMS), Kyoto University.\n\nErlang Solutions kindly gave Kenji Rikitake\nan opportunity to give a presentation\nabout this software at Erlang Factory SF Bay 2011.\n\nPepabo R\u0026D Institute of GMO Pepabo, Inc.\nkindly gives the financial support for this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjj1bdx%2Fsfmt-erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjj1bdx%2Fsfmt-erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjj1bdx%2Fsfmt-erlang/lists"}