Giter Club home page Giter Club logo

gfycatid_ex's People

Contributors

seymores avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

gfycatid_ex's Issues

Provide ability to use own seed and index.

ref: https://www.reddit.com/r/elixir/comments/7z449y/generates_human_readable_gfycat_style_url_id_in/dulqj8g/

Thought about offering a non-random version? Cause at the moment it's not quite usable for a use case such as gfycat, where you require them to be unique. Since overtime, it's likely to generate more and more of the same (especially if you use a lower number to generate) and you'll have to test against past results. At the moment the user could try and assist it to avoid definite repeats (rand being at the same state as what was generated another time), by exporting rand's state so you can jump to some new state, but that can still have collisions.

Would be nice if there was a variant where you could in addition provide a seed and an index in the permutation. So the seed would control the order of the permutation, and the index will be the unique result at that index. If index exceeds the permutated list return an error (the user can then know they've used up every possible combination of that length and will need to increase the length to retrieve more).

That way if the user increments the index, they're guaranteed a unique result. Which gives them a couple options for how they might want to interact with it. Such as storing the current index and incrementing it. Or mapping some other identifier of theirs to an index. etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.