{"action":"created","comment":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/226858087","pull_request_review_id":166780193,"id":226858087,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjg1ODA4Nw==","diff_hunk":"@@ -9,78 +9,150 @@\n \n \n \n+\n+\n ## This module implements complex numbers.\n-{.push checks:off, line_dir:off, stack_trace:off, debugger:off.}\n-# the user does not want to trace a part\n-# of the standard library!\n+## Complex numbers are currently implemented as generic on a 64-bit or 32-bit float.\n \n+{.push checks: off, line_dir: off, stack_trace: off, debugger: off.}\n+# the user does not want to trace a part of the standard library!\n \n-import\n-  math\n \n-const\n-  EPS = 1.0e-7 ## Epsilon used for float comparisons.\n+import math\n \n type\n-  Complex* = tuple[re, im: float]\n-    ## a complex number, consisting of a real and an imaginary part\n+  Complex*[T: SomeFloat] = tuple[re, im: T]","path":"lib/pure/complex.nim","position":25,"original_position":25,"commit_id":"4dc2b60173e4abe5d2f52053fee8dbf16049c9b0","original_commit_id":"f8691e1063c911c6bf9e741fc40526caf7fcd1d9","user":{"login":"krux02","id":929961,"node_id":"MDQ6VXNlcjkyOTk2MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/929961?v=4","gravatar_id":"","url":"https://api.github.com/users/krux02","html_url":"https://github.com/krux02","followers_url":"https://api.github.com/users/krux02/followers","following_url":"https://api.github.com/users/krux02/following{/other_user}","gists_url":"https://api.github.com/users/krux02/gists{/gist_id}","starred_url":"https://api.github.com/users/krux02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krux02/subscriptions","organizations_url":"https://api.github.com/users/krux02/orgs","repos_url":"https://api.github.com/users/krux02/repos","events_url":"https://api.github.com/users/krux02/events{/privacy}","received_events_url":"https://api.github.com/users/krux02/received_events","type":"User","site_admin":false},"body":"there should be still this (untested) syntax:\r\n\r\n```nim\r\nvar\r\n  a = 1.0 + 2.0 * im\r\n  b = a + 3.0 + 4.0 * im\r\n```\r\n\r\nI don't like the breaking change, but the old api was not very type safe. I disagree that any tuple of numbers is also a complex numbler. On top of that I think it is a good idea, if toComplex128 and toComplex64 is overloaded so that it also accepts a number for the imaginary part.","created_at":"2018-10-21T11:04:20Z","updated_at":"2018-10-21T11:04:20Z","html_url":"https://github.com/nim-lang/Nim/pull/9452#discussion_r226858087","pull_request_url":"https://api.github.com/repos/nim-lang/Nim/pulls/9452","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/comments/226858087"},"html":{"href":"https://github.com/nim-lang/Nim/pull/9452#discussion_r226858087"},"pull_request":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/9452"}},"in_reply_to_id":226830363},"pull_request":{"url":"https://api.github.com/repos/nim-lang/Nim/pulls/9452","id":224463560,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDYzNTYw","html_url":"https://github.com/nim-lang/Nim/pull/9452","diff_url":"https://github.com/nim-lang/Nim/pull/9452.diff","patch_url":"https://github.com/nim-lang/Nim/pull/9452.patch","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/9452","number":9452,"state":"open","locked":false,"title":"add generic complex type (supersedes #4666)","user":{"login":"narimiran","id":16516130,"node_id":"MDQ6VXNlcjE2NTE2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/16516130?v=4","gravatar_id":"","url":"https://api.github.com/users/narimiran","html_url":"https://github.com/narimiran","followers_url":"https://api.github.com/users/narimiran/followers","following_url":"https://api.github.com/users/narimiran/following{/other_user}","gists_url":"https://api.github.com/users/narimiran/gists{/gist_id}","starred_url":"https://api.github.com/users/narimiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narimiran/subscriptions","organizations_url":"https://api.github.com/users/narimiran/orgs","repos_url":"https://api.github.com/users/narimiran/repos","events_url":"https://api.github.com/users/narimiran/events{/privacy}","received_events_url":"https://api.github.com/users/narimiran/received_events","type":"User","site_admin":false},"body":"This is based on the work done in #4666, plus addressing the comments there by @yglukhov, @Araq, and @flyx.\r\n\r\nNow, after I've done this, I see there is also #7947.  \r\nSince the author of that PR (also) didn't respond to the comments raised, if there is something worth implementing and/or doing it that way, I'm willing to do it here so we can then close both #4666 and #7947.","created_at":"2018-10-20T09:25:38Z","updated_at":"2018-10-21T11:04:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"712c08c4b00826a91807df20d471777e8860f8a5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nim-lang/Nim/pulls/9452/commits","review_comments_url":"https://api.github.com/repos/nim-lang/Nim/pulls/9452/comments","review_comment_url":"https://api.github.com/repos/nim-lang/Nim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/9452/comments","statuses_url":"https://api.github.com/repos/nim-lang/Nim/statuses/4dc2b60173e4abe5d2f52053fee8dbf16049c9b0","head":{"label":"narimiran:complex","ref":"complex","sha":"4dc2b60173e4abe5d2f52053fee8dbf16049c9b0","user":{"login":"narimiran","id":16516130,"node_id":"MDQ6VXNlcjE2NTE2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/16516130?v=4","gravatar_id":"","url":"https://api.github.com/users/narimiran","html_url":"https://github.com/narimiran","followers_url":"https://api.github.com/users/narimiran/followers","following_url":"https://api.github.com/users/narimiran/following{/other_user}","gists_url":"https://api.github.com/users/narimiran/gists{/gist_id}","starred_url":"https://api.github.com/users/narimiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narimiran/subscriptions","organizations_url":"https://api.github.com/users/narimiran/orgs","repos_url":"https://api.github.com/users/narimiran/repos","events_url":"https://api.github.com/users/narimiran/events{/privacy}","received_events_url":"https://api.github.com/users/narimiran/received_events","type":"User","site_admin":false},"repo":{"id":107803320,"node_id":"MDEwOlJlcG9zaXRvcnkxMDc4MDMzMjA=","name":"Nim","full_name":"narimiran/Nim","private":false,"owner":{"login":"narimiran","id":16516130,"node_id":"MDQ6VXNlcjE2NTE2MTMw","avatar_url":"https://avatars2.githubusercontent.com/u/16516130?v=4","gravatar_id":"","url":"https://api.github.com/users/narimiran","html_url":"https://github.com/narimiran","followers_url":"https://api.github.com/users/narimiran/followers","following_url":"https://api.github.com/users/narimiran/following{/other_user}","gists_url":"https://api.github.com/users/narimiran/gists{/gist_id}","starred_url":"https://api.github.com/users/narimiran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narimiran/subscriptions","organizations_url":"https://api.github.com/users/narimiran/orgs","repos_url":"https://api.github.com/users/narimiran/repos","events_url":"https://api.github.com/users/narimiran/events{/privacy}","received_events_url":"https://api.github.com/users/narimiran/received_events","type":"User","site_admin":false},"html_url":"https://github.com/narimiran/Nim","description":"Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in the order of priority).","fork":true,"url":"https://api.github.com/repos/narimiran/Nim","forks_url":"https://api.github.com/repos/narimiran/Nim/forks","keys_url":"https://api.github.com/repos/narimiran/Nim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/narimiran/Nim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/narimiran/Nim/teams","hooks_url":"https://api.github.com/repos/narimiran/Nim/hooks","issue_events_url":"https://api.github.com/repos/narimiran/Nim/issues/events{/number}","events_url":"https://api.github.com/repos/narimiran/Nim/events","assignees_url":"https://api.github.com/repos/narimiran/Nim/assignees{/user}","branches_url":"https://api.github.com/repos/narimiran/Nim/branches{/branch}","tags_url":"https://api.github.com/repos/narimiran/Nim/tags","blobs_url":"https://api.github.com/repos/narimiran/Nim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/narimiran/Nim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/narimiran/Nim/git/refs{/sha}","trees_url":"https://api.github.com/repos/narimiran/Nim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/narimiran/Nim/statuses/{sha}","languages_url":"https://api.github.com/repos/narimiran/Nim/languages","stargazers_url":"https://api.github.com/repos/narimiran/Nim/stargazers","contributors_url":"https://api.github.com/repos/narimiran/Nim/contributors","subscribers_url":"https://api.github.com/repos/narimiran/Nim/subscribers","subscription_url":"https://api.github.com/repos/narimiran/Nim/subscription","commits_url":"https://api.github.com/repos/narimiran/Nim/commits{/sha}","git_commits_url":"https://api.github.com/repos/narimiran/Nim/git/commits{/sha}","comments_url":"https://api.github.com/repos/narimiran/Nim/comments{/number}","issue_comment_url":"https://api.github.com/repos/narimiran/Nim/issues/comments{/number}","contents_url":"https://api.github.com/repos/narimiran/Nim/contents/{+path}","compare_url":"https://api.github.com/repos/narimiran/Nim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/narimiran/Nim/merges","archive_url":"https://api.github.com/repos/narimiran/Nim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/narimiran/Nim/downloads","issues_url":"https://api.github.com/repos/narimiran/Nim/issues{/number}","pulls_url":"https://api.github.com/repos/narimiran/Nim/pulls{/number}","milestones_url":"https://api.github.com/repos/narimiran/Nim/milestones{/number}","notifications_url":"https://api.github.com/repos/narimiran/Nim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/narimiran/Nim/labels{/name}","releases_url":"https://api.github.com/repos/narimiran/Nim/releases{/id}","deployments_url":"https://api.github.com/repos/narimiran/Nim/deployments","created_at":"2017-10-21T17:58:29Z","updated_at":"2018-10-20T06:55:03Z","pushed_at":"2018-10-20T15:22:42Z","git_url":"git://github.com/narimiran/Nim.git","ssh_url":"git@github.com:narimiran/Nim.git","clone_url":"https://github.com/narimiran/Nim.git","svn_url":"https://github.com/narimiran/Nim","homepage":"http://nim-lang.org/","size":71969,"stargazers_count":0,"watchers_count":0,"language":"Nim","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"devel"}},"base":{"label":"nim-lang:devel","ref":"devel","sha":"863d3ef4ed7d18877a42f0060ebe63c34a27cf32","user":{"login":"nim-lang","id":603863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMzg2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/603863?v=4","gravatar_id":"","url":"https://api.github.com/users/nim-lang","html_url":"https://github.com/nim-lang","followers_url":"https://api.github.com/users/nim-lang/followers","following_url":"https://api.github.com/users/nim-lang/following{/other_user}","gists_url":"https://api.github.com/users/nim-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-lang/subscriptions","organizations_url":"https://api.github.com/users/nim-lang/orgs","repos_url":"https://api.github.com/users/nim-lang/repos","events_url":"https://api.github.com/users/nim-lang/events{/privacy}","received_events_url":"https://api.github.com/users/nim-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":842037,"node_id":"MDEwOlJlcG9zaXRvcnk4NDIwMzc=","name":"Nim","full_name":"nim-lang/Nim","private":false,"owner":{"login":"nim-lang","id":603863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYwMzg2Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/603863?v=4","gravatar_id":"","url":"https://api.github.com/users/nim-lang","html_url":"https://github.com/nim-lang","followers_url":"https://api.github.com/users/nim-lang/followers","following_url":"https://api.github.com/users/nim-lang/following{/other_user}","gists_url":"https://api.github.com/users/nim-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/nim-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nim-lang/subscriptions","organizations_url":"https://api.github.com/users/nim-lang/orgs","repos_url":"https://api.github.com/users/nim-lang/repos","events_url":"https://api.github.com/users/nim-lang/events{/privacy}","received_events_url":"https://api.github.com/users/nim-lang/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nim-lang/Nim","description":"Nim is a compiled, garbage-collected systems programming language with a design that focuses on efficiency, expressiveness, and elegance (in that order of priority).","fork":false,"url":"https://api.github.com/repos/nim-lang/Nim","forks_url":"https://api.github.com/repos/nim-lang/Nim/forks","keys_url":"https://api.github.com/repos/nim-lang/Nim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nim-lang/Nim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nim-lang/Nim/teams","hooks_url":"https://api.github.com/repos/nim-lang/Nim/hooks","issue_events_url":"https://api.github.com/repos/nim-lang/Nim/issues/events{/number}","events_url":"https://api.github.com/repos/nim-lang/Nim/events","assignees_url":"https://api.github.com/repos/nim-lang/Nim/assignees{/user}","branches_url":"https://api.github.com/repos/nim-lang/Nim/branches{/branch}","tags_url":"https://api.github.com/repos/nim-lang/Nim/tags","blobs_url":"https://api.github.com/repos/nim-lang/Nim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nim-lang/Nim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nim-lang/Nim/git/refs{/sha}","trees_url":"https://api.github.com/repos/nim-lang/Nim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nim-lang/Nim/statuses/{sha}","languages_url":"https://api.github.com/repos/nim-lang/Nim/languages","stargazers_url":"https://api.github.com/repos/nim-lang/Nim/stargazers","contributors_url":"https://api.github.com/repos/nim-lang/Nim/contributors","subscribers_url":"https://api.github.com/repos/nim-lang/Nim/subscribers","subscription_url":"https://api.github.com/repos/nim-lang/Nim/subscription","commits_url":"https://api.github.com/repos/nim-lang/Nim/commits{/sha}","git_commits_url":"https://api.github.com/repos/nim-lang/Nim/git/commits{/sha}","comments_url":"https://api.github.com/repos/nim-lang/Nim/comments{/number}","issue_comment_url":"https://api.github.com/repos/nim-lang/Nim/issues/comments{/number}","contents_url":"https://api.github.com/repos/nim-lang/Nim/contents/{+path}","compare_url":"https://api.github.com/repos/nim-lang/Nim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nim-lang/Nim/merges","archive_url":"https://api.github.com/repos/nim-lang/Nim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nim-lang/Nim/downloads","issues_url":"https://api.github.com/repos/nim-lang/Nim/issues{/number}","pulls_url":"https://api.github.com/repos/nim-lang/Nim/pulls{/number}","milestones_url":"https://api.github.com/repos/nim-lang/Nim/milestones{/number}","notifications_url":"https://api.github.com/repos/nim-lang/Nim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nim-lang/Nim/labels{/name}","releases_url":"https://api.github.com/repos/nim-lang/Nim/releases{/id}","deployments_url":"https://api.github.com/repos/nim-lang/Nim/deployments","created_at":"2010-08-16T20:38:58Z","updated_at":"2018-10-20T19:57:33Z","pushed_at":"2018-10-20T20:46:26Z","git_url":"git://github.com/nim-lang/Nim.git","ssh_url":"git@github.com:nim-lang/Nim.git","clone_url":"https://github.com/nim-lang/Nim.git","svn_url":"https://github.com/nim-lang/Nim","homepage":"https://nim-lang.org/","size":73669,"stargazers_count":5900,"watchers_count":5900,"language":"Nim","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":739,"mirror_url":null,"archived":false,"open_issues_count":1500,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":739,"open_issues":1500,"watchers":5900,"default_branch":"devel"}},"_links":{"self":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/9452"},"html":{"href":"https://github.com/nim-lang/Nim/pull/9452"},"issue":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/9452"},"comments":{"href":"https://api.github.com/repos/nim-lang/Nim/issues/9452/comments"},"review_comments":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/9452/comments"},"review_comment":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nim-lang/Nim/pulls/9452/commits"},"statuses":{"href":"https://api.github.com/repos/nim-lang/Nim/statuses/4dc2b60173e4abe5d2f52053fee8dbf16049c9b0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"krux02"}}