Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

cross platform solution for rand at CT (avoidining 'dummy seed' of windows and other cross platform issues) #12

Closed
@timotheecour

Description

@timotheecour

/cc @ba0f3

potential cross platform solution for rand at CT (avoidining 'dummy seed' of windows and other cross platform issues):

  • make nimble install tempfile installs a binary (these go automatically in ~/.nimble/bin IIRC, on posix), say, tempfile_helper
    this binary returns the seed random.randomize() (which we can improve later, independently), or a custom proc, and prints its value
  • call it at CT using gorgeEx (let's say we can assume it's in PATH, or maybe allow passing a string in API to specify path to bin containing it)

note

  • this would fix date +'%N' doesn't work on OSX #11
  • this would fix windows case at CT (currently not really working because of dummy seed)
  • this would be more robust than relying on date +'%N' , and allow making it further more random by allowing to use pid and threadid, all in a clean way using pure nim code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions