{"url":"https://api.github.com/repos/nushell/nushell/issues/3393","repository_url":"https://api.github.com/repos/nushell/nushell","labels_url":"https://api.github.com/repos/nushell/nushell/issues/3393/labels{/name}","comments_url":"https://api.github.com/repos/nushell/nushell/issues/3393/comments","events_url":"https://api.github.com/repos/nushell/nushell/issues/3393/events","html_url":"https://github.com/nushell/nushell/pull/3393","id":878067533,"node_id":"MDExOlB1bGxSZXF1ZXN0NjMxOTM1MTgz","number":3393,"title":"Port random integer & decimal to engine-p + related refactoring","user":{"login":"kubouch","id":25571562,"node_id":"MDQ6VXNlcjI1NTcxNTYy","avatar_url":"https://avatars.githubusercontent.com/u/25571562?v=4","gravatar_id":"","url":"https://api.github.com/users/kubouch","html_url":"https://github.com/kubouch","followers_url":"https://api.github.com/users/kubouch/followers","following_url":"https://api.github.com/users/kubouch/following{/other_user}","gists_url":"https://api.github.com/users/kubouch/gists{/gist_id}","starred_url":"https://api.github.com/users/kubouch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubouch/subscriptions","organizations_url":"https://api.github.com/users/kubouch/orgs","repos_url":"https://api.github.com/users/kubouch/repos","events_url":"https://api.github.com/users/kubouch/events{/privacy}","received_events_url":"https://api.github.com/users/kubouch/received_events","type":"User","user_view_type":"public","site_admin":false},"labels":[],"state":"closed","locked":false,"assignees":[],"milestone":null,"comments":3,"created_at":"2021-05-06T21:35:24Z","updated_at":"2021-05-09T14:41:59Z","closed_at":"2021-05-07T19:58:12Z","assignee":null,"author_association":"CONTRIBUTOR","issue_field_values":[],"type":null,"active_lock_reason":null,"draft":false,"pull_request":{"url":"https://api.github.com/repos/nushell/nushell/pulls/3393","html_url":"https://github.com/nushell/nushell/pull/3393","diff_url":"https://github.com/nushell/nushell/pull/3393.diff","patch_url":"https://github.com/nushell/nushell/pull/3393.patch","merged_at":"2021-05-07T19:58:12Z"},"body":"1. `random decimal` and `random integer` are now ported to engine-p\r\n1. `random decimal` accepts true decimal bounds, (e.g. `..3.14` won't get truncated to `..3` anymore)\r\n1. Both commands use Range instead of NumericRange. This made me create a few helper methods to the Range struct. It also opens a possibility to generate negative random integers in the future (once we get the negative ranges sorted out properly).\r\n1. Added `as_f64()` helper for Primitive\r\n1. Implemented `FromValue` for Tagged<Range>, so it can be easily extracted from CommandArgs\r\n\r\nAlso, `NumericRange` is now unused. Perhaps it could be removed but this would disable deserialization of Range. I don't know anything about deserialization so I left it there.\r\n\r\nList of all commands waiting to be ported to engine-p: #3390","closed_by":{"login":"sophiajt","id":547158,"node_id":"MDQ6VXNlcjU0NzE1OA==","avatar_url":"https://avatars.githubusercontent.com/u/547158?v=4","gravatar_id":"","url":"https://api.github.com/users/sophiajt","html_url":"https://github.com/sophiajt","followers_url":"https://api.github.com/users/sophiajt/followers","following_url":"https://api.github.com/users/sophiajt/following{/other_user}","gists_url":"https://api.github.com/users/sophiajt/gists{/gist_id}","starred_url":"https://api.github.com/users/sophiajt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sophiajt/subscriptions","organizations_url":"https://api.github.com/users/sophiajt/orgs","repos_url":"https://api.github.com/users/sophiajt/repos","events_url":"https://api.github.com/users/sophiajt/events{/privacy}","received_events_url":"https://api.github.com/users/sophiajt/received_events","type":"User","user_view_type":"public","site_admin":false},"reactions":{"url":"https://api.github.com/repos/nushell/nushell/issues/3393/reactions","total_count":0,"+1":0,"-1":0,"laugh":0,"hooray":0,"confused":0,"heart":0,"rocket":0,"eyes":0},"timeline_url":"https://api.github.com/repos/nushell/nushell/issues/3393/timeline","performed_via_github_app":null,"state_reason":null}