{"action":"created","issue":{"url":"https://api.github.com/repos/snowleopard/alga/issues/85","repository_url":"https://api.github.com/repos/snowleopard/alga","labels_url":"https://api.github.com/repos/snowleopard/alga/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/snowleopard/alga/issues/85/comments","events_url":"https://api.github.com/repos/snowleopard/alga/issues/85/events","html_url":"https://github.com/snowleopard/alga/issues/85","id":336401818,"node_id":"MDU6SXNzdWUzMzY0MDE4MTg=","number":85,"title":"Child groups of \"equal elevation\"?","user":{"login":"fosskers","id":229679,"node_id":"MDQ6VXNlcjIyOTY3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/229679?v=4","gravatar_id":"","url":"https://api.github.com/users/fosskers","html_url":"https://github.com/fosskers","followers_url":"https://api.github.com/users/fosskers/followers","following_url":"https://api.github.com/users/fosskers/following{/other_user}","gists_url":"https://api.github.com/users/fosskers/gists{/gist_id}","starred_url":"https://api.github.com/users/fosskers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fosskers/subscriptions","organizations_url":"https://api.github.com/users/fosskers/orgs","repos_url":"https://api.github.com/users/fosskers/repos","events_url":"https://api.github.com/users/fosskers/events{/privacy}","received_events_url":"https://api.github.com/users/fosskers/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-27T21:57:48Z","updated_at":"2018-06-28T19:02:34Z","closed_at":null,"author_association":"NONE","body":"Hi there, I'm the author of a particular package manager written in Haskell. About 6 months ago [you offered your help](https://www.reddit.com/r/haskell/comments/7lj388/haskell_sabbatical/drmzkwx/) for when I reached the stage of evaluating `algebraic-graphs`. I'm there now, so hi!\r\n\r\nHere's the general problem I'm looking to solve:\r\n\r\nPackages on a Linux system have dependencies, and these dependency relationships form a graph. I'd like to implement the function:\r\n```haskell\r\n-- | A `Package` contains a list of other `Package` names (Text) it depends on,\r\n-- which is a good starting point for a real Graph.\r\nsortPackages :: [Package] -> [[Package]]\r\n```\r\nthe return value of which corresponds to the following:\r\n![depgraph](https://user-images.githubusercontent.com/229679/42001732-c6f0c172-7a19-11e8-84ce-0f597c11f8d9.png)\r\n\r\nEach cyan box of packages are sibling-like and \"safe\" to build and install at the same time, since they aren't interdependent. For this example, I'd expect the output of `sortPackages` to resemble:\r\n```haskell\r\n[ [F, G], [C, D, E], [A, B] ]\r\n```\r\nLooking at your API, I suspect [these functions](https://hackage.haskell.org/package/algebraic-graphs-0.1.1.1/docs/Algebra-Graph-AdjacencyMap.html#g:7) are probably what I'm looking for. In the current version of my code, I'm using `topSort` from `Data.Graph` to naively get the overall safe ordering, then building one-at-a-time since `topSort` loses other \"elevation information\".\r\n\r\nCan `algebraic-graphs` help me here?\r\n\r\nPlease and thanks,\r\nColin"},"comment":{"url":"https://api.github.com/repos/snowleopard/alga/issues/comments/401139889","html_url":"https://github.com/snowleopard/alga/issues/85#issuecomment-401139889","issue_url":"https://api.github.com/repos/snowleopard/alga/issues/85","id":401139889,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTEzOTg4OQ==","user":{"login":"snowleopard","id":675286,"node_id":"MDQ6VXNlcjY3NTI4Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/675286?v=4","gravatar_id":"","url":"https://api.github.com/users/snowleopard","html_url":"https://github.com/snowleopard","followers_url":"https://api.github.com/users/snowleopard/followers","following_url":"https://api.github.com/users/snowleopard/following{/other_user}","gists_url":"https://api.github.com/users/snowleopard/gists{/gist_id}","starred_url":"https://api.github.com/users/snowleopard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowleopard/subscriptions","organizations_url":"https://api.github.com/users/snowleopard/orgs","repos_url":"https://api.github.com/users/snowleopard/repos","events_url":"https://api.github.com/users/snowleopard/events{/privacy}","received_events_url":"https://api.github.com/users/snowleopard/received_events","type":"User","site_admin":false},"created_at":"2018-06-28T19:02:34Z","updated_at":"2018-06-28T19:02:34Z","author_association":"OWNER","body":"I think my naive implementation will take sub-second time for graphs with <1000 vertices, so if you are going to do anything non-trivial with the packages, e.g. download or build them, it will be just noise.\r\n\r\nBut I'm still interested in implementing a fast version, so I'll keep thinking."}}
{"actor":{"display_login":"snowleopard"}}