{"action":"created","comment":{"url":"https://api.github.com/repos/VirtusLab/blog/pulls/comments/25186271","id":25186271,"diff_hunk":"@@ -0,0 +1,184 @@\n+#Path dependent types - modeling algebraic structures has never been easier\n+\n+Let's start with small refreshment of what actually the dependent typing is. Using [Wikipedia](http://en.wikipedia.org/wiki/Dependent_type) as a source:\n+>In computer science and logic, a dependent type is a type that depends on a value. \n+\n+Neat, huh? But what does it mean in practice? If you take a look at the Wikipedia's [list](http://en.wikipedia.org/wiki/Dependent_type#Comparison_of_languages_with_dependent_types)  of languages that implement dependent typing you might get strange sensation that it is something really obscure and esoteric. Languages mentioned there range from \"never heard of\" (Guru/Matita anyone?) to \"yeah, I recall reading about it on Reddit once or twice\" (Coq). Oh wait, there is F#. Ooops, sorry, it is not F# but [F*](http://research.microsoft.com/en-us/projects/fstar/) . Thanks goodness it **is** something from Microsoft at least. And look ma', no Haskell.  If it is not implemented in Haskell then truly, what problems can it solve? \n+Well, actually dependent typing is helpful in solving very down-to-earth problems. I bet that everyone programming in a language with sufficiently expressive type system  has wondered at least once - why my type system does not prevent me from, say, accessing head of empty list? This question is in fact the canonical showcase for dependent typing. Just imagine - if you could somehow encode the length of a list (a value) into its type then it'd be trivial to state that list of length 0 (type that depends on a value, mind you) has no head to be accessed. Standard library would have just been changed to (please bear with my completely made up syntax):","path":"path_dependent_types.md","position":7,"original_position":7,"commit_id":"dea395ce767edb34ab2098907abb816a001e9c34","original_commit_id":"dea395ce767edb34ab2098907abb816a001e9c34","user":{"login":"marcin-rzeznicki","id":3391348,"avatar_url":"https://avatars.githubusercontent.com/u/3391348?v=3","gravatar_id":"","url":"https://api.github.com/users/marcin-rzeznicki","html_url":"https://github.com/marcin-rzeznicki","followers_url":"https://api.github.com/users/marcin-rzeznicki/followers","following_url":"https://api.github.com/users/marcin-rzeznicki/following{/other_user}","gists_url":"https://api.github.com/users/marcin-rzeznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/marcin-rzeznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcin-rzeznicki/subscriptions","organizations_url":"https://api.github.com/users/marcin-rzeznicki/orgs","repos_url":"https://api.github.com/users/marcin-rzeznicki/repos","events_url":"https://api.github.com/users/marcin-rzeznicki/events{/privacy}","received_events_url":"https://api.github.com/users/marcin-rzeznicki/received_events","type":"User","site_admin":false},"body":"Na co byś zmienił?","created_at":"2015-02-23T18:09:57Z","updated_at":"2015-02-23T18:09:57Z","html_url":"https://github.com/VirtusLab/blog/pull/1#discussion_r25186271","pull_request_url":"https://api.github.com/repos/VirtusLab/blog/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/comments/25186271"},"html":{"href":"https://github.com/VirtusLab/blog/pull/1#discussion_r25186271"},"pull_request":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/VirtusLab/blog/pulls/1","id":29778340,"html_url":"https://github.com/VirtusLab/blog/pull/1","diff_url":"https://github.com/VirtusLab/blog/pull/1.diff","patch_url":"https://github.com/VirtusLab/blog/pull/1.patch","issue_url":"https://api.github.com/repos/VirtusLab/blog/issues/1","number":1,"state":"open","locked":false,"title":"New article on path dependent types","user":{"login":"marcin-rzeznicki","id":3391348,"avatar_url":"https://avatars.githubusercontent.com/u/3391348?v=3","gravatar_id":"","url":"https://api.github.com/users/marcin-rzeznicki","html_url":"https://github.com/marcin-rzeznicki","followers_url":"https://api.github.com/users/marcin-rzeznicki/followers","following_url":"https://api.github.com/users/marcin-rzeznicki/following{/other_user}","gists_url":"https://api.github.com/users/marcin-rzeznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/marcin-rzeznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcin-rzeznicki/subscriptions","organizations_url":"https://api.github.com/users/marcin-rzeznicki/orgs","repos_url":"https://api.github.com/users/marcin-rzeznicki/repos","events_url":"https://api.github.com/users/marcin-rzeznicki/events{/privacy}","received_events_url":"https://api.github.com/users/marcin-rzeznicki/received_events","type":"User","site_admin":false},"body":"Please review (as thoroughly as possible)","created_at":"2015-02-22T22:30:40Z","updated_at":"2015-02-23T18:09:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b4e89552a0423f4c60f492c42a0348a901d263aa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/VirtusLab/blog/pulls/1/commits","review_comments_url":"https://api.github.com/repos/VirtusLab/blog/pulls/1/comments","review_comment_url":"https://api.github.com/repos/VirtusLab/blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/VirtusLab/blog/issues/1/comments","statuses_url":"https://api.github.com/repos/VirtusLab/blog/statuses/dea395ce767edb34ab2098907abb816a001e9c34","head":{"label":"marcin-rzeznicki:master","ref":"master","sha":"dea395ce767edb34ab2098907abb816a001e9c34","user":{"login":"marcin-rzeznicki","id":3391348,"avatar_url":"https://avatars.githubusercontent.com/u/3391348?v=3","gravatar_id":"","url":"https://api.github.com/users/marcin-rzeznicki","html_url":"https://github.com/marcin-rzeznicki","followers_url":"https://api.github.com/users/marcin-rzeznicki/followers","following_url":"https://api.github.com/users/marcin-rzeznicki/following{/other_user}","gists_url":"https://api.github.com/users/marcin-rzeznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/marcin-rzeznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcin-rzeznicki/subscriptions","organizations_url":"https://api.github.com/users/marcin-rzeznicki/orgs","repos_url":"https://api.github.com/users/marcin-rzeznicki/repos","events_url":"https://api.github.com/users/marcin-rzeznicki/events{/privacy}","received_events_url":"https://api.github.com/users/marcin-rzeznicki/received_events","type":"User","site_admin":false},"repo":{"id":31165800,"name":"blog","full_name":"marcin-rzeznicki/blog","owner":{"login":"marcin-rzeznicki","id":3391348,"avatar_url":"https://avatars.githubusercontent.com/u/3391348?v=3","gravatar_id":"","url":"https://api.github.com/users/marcin-rzeznicki","html_url":"https://github.com/marcin-rzeznicki","followers_url":"https://api.github.com/users/marcin-rzeznicki/followers","following_url":"https://api.github.com/users/marcin-rzeznicki/following{/other_user}","gists_url":"https://api.github.com/users/marcin-rzeznicki/gists{/gist_id}","starred_url":"https://api.github.com/users/marcin-rzeznicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcin-rzeznicki/subscriptions","organizations_url":"https://api.github.com/users/marcin-rzeznicki/orgs","repos_url":"https://api.github.com/users/marcin-rzeznicki/repos","events_url":"https://api.github.com/users/marcin-rzeznicki/events{/privacy}","received_events_url":"https://api.github.com/users/marcin-rzeznicki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marcin-rzeznicki/blog","description":"Drafts of blog articles waiting for reviews and corrections","fork":true,"url":"https://api.github.com/repos/marcin-rzeznicki/blog","forks_url":"https://api.github.com/repos/marcin-rzeznicki/blog/forks","keys_url":"https://api.github.com/repos/marcin-rzeznicki/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marcin-rzeznicki/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marcin-rzeznicki/blog/teams","hooks_url":"https://api.github.com/repos/marcin-rzeznicki/blog/hooks","issue_events_url":"https://api.github.com/repos/marcin-rzeznicki/blog/issues/events{/number}","events_url":"https://api.github.com/repos/marcin-rzeznicki/blog/events","assignees_url":"https://api.github.com/repos/marcin-rzeznicki/blog/assignees{/user}","branches_url":"https://api.github.com/repos/marcin-rzeznicki/blog/branches{/branch}","tags_url":"https://api.github.com/repos/marcin-rzeznicki/blog/tags","blobs_url":"https://api.github.com/repos/marcin-rzeznicki/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marcin-rzeznicki/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marcin-rzeznicki/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/marcin-rzeznicki/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marcin-rzeznicki/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/marcin-rzeznicki/blog/languages","stargazers_url":"https://api.github.com/repos/marcin-rzeznicki/blog/stargazers","contributors_url":"https://api.github.com/repos/marcin-rzeznicki/blog/contributors","subscribers_url":"https://api.github.com/repos/marcin-rzeznicki/blog/subscribers","subscription_url":"https://api.github.com/repos/marcin-rzeznicki/blog/subscription","commits_url":"https://api.github.com/repos/marcin-rzeznicki/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/marcin-rzeznicki/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/marcin-rzeznicki/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/marcin-rzeznicki/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/marcin-rzeznicki/blog/contents/{+path}","compare_url":"https://api.github.com/repos/marcin-rzeznicki/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marcin-rzeznicki/blog/merges","archive_url":"https://api.github.com/repos/marcin-rzeznicki/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marcin-rzeznicki/blog/downloads","issues_url":"https://api.github.com/repos/marcin-rzeznicki/blog/issues{/number}","pulls_url":"https://api.github.com/repos/marcin-rzeznicki/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/marcin-rzeznicki/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/marcin-rzeznicki/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marcin-rzeznicki/blog/labels{/name}","releases_url":"https://api.github.com/repos/marcin-rzeznicki/blog/releases{/id}","created_at":"2015-02-22T14:39:50Z","updated_at":"2015-02-23T11:33:13Z","pushed_at":"2015-02-23T10:18:41Z","git_url":"git://github.com/marcin-rzeznicki/blog.git","ssh_url":"git@github.com:marcin-rzeznicki/blog.git","clone_url":"https://github.com/marcin-rzeznicki/blog.git","svn_url":"https://github.com/marcin-rzeznicki/blog","homepage":null,"size":182,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"VirtusLab:master","ref":"master","sha":"7b48090fae292fbbe8c70a6524ee430100f27b1d","user":{"login":"VirtusLab","id":5324131,"avatar_url":"https://avatars.githubusercontent.com/u/5324131?v=3","gravatar_id":"","url":"https://api.github.com/users/VirtusLab","html_url":"https://github.com/VirtusLab","followers_url":"https://api.github.com/users/VirtusLab/followers","following_url":"https://api.github.com/users/VirtusLab/following{/other_user}","gists_url":"https://api.github.com/users/VirtusLab/gists{/gist_id}","starred_url":"https://api.github.com/users/VirtusLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirtusLab/subscriptions","organizations_url":"https://api.github.com/users/VirtusLab/orgs","repos_url":"https://api.github.com/users/VirtusLab/repos","events_url":"https://api.github.com/users/VirtusLab/events{/privacy}","received_events_url":"https://api.github.com/users/VirtusLab/received_events","type":"Organization","site_admin":false},"repo":{"id":23397566,"name":"blog","full_name":"VirtusLab/blog","owner":{"login":"VirtusLab","id":5324131,"avatar_url":"https://avatars.githubusercontent.com/u/5324131?v=3","gravatar_id":"","url":"https://api.github.com/users/VirtusLab","html_url":"https://github.com/VirtusLab","followers_url":"https://api.github.com/users/VirtusLab/followers","following_url":"https://api.github.com/users/VirtusLab/following{/other_user}","gists_url":"https://api.github.com/users/VirtusLab/gists{/gist_id}","starred_url":"https://api.github.com/users/VirtusLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VirtusLab/subscriptions","organizations_url":"https://api.github.com/users/VirtusLab/orgs","repos_url":"https://api.github.com/users/VirtusLab/repos","events_url":"https://api.github.com/users/VirtusLab/events{/privacy}","received_events_url":"https://api.github.com/users/VirtusLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/VirtusLab/blog","description":"Drafts of blog articles waiting for reviews and corrections","fork":false,"url":"https://api.github.com/repos/VirtusLab/blog","forks_url":"https://api.github.com/repos/VirtusLab/blog/forks","keys_url":"https://api.github.com/repos/VirtusLab/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VirtusLab/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VirtusLab/blog/teams","hooks_url":"https://api.github.com/repos/VirtusLab/blog/hooks","issue_events_url":"https://api.github.com/repos/VirtusLab/blog/issues/events{/number}","events_url":"https://api.github.com/repos/VirtusLab/blog/events","assignees_url":"https://api.github.com/repos/VirtusLab/blog/assignees{/user}","branches_url":"https://api.github.com/repos/VirtusLab/blog/branches{/branch}","tags_url":"https://api.github.com/repos/VirtusLab/blog/tags","blobs_url":"https://api.github.com/repos/VirtusLab/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VirtusLab/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VirtusLab/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/VirtusLab/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VirtusLab/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/VirtusLab/blog/languages","stargazers_url":"https://api.github.com/repos/VirtusLab/blog/stargazers","contributors_url":"https://api.github.com/repos/VirtusLab/blog/contributors","subscribers_url":"https://api.github.com/repos/VirtusLab/blog/subscribers","subscription_url":"https://api.github.com/repos/VirtusLab/blog/subscription","commits_url":"https://api.github.com/repos/VirtusLab/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/VirtusLab/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/VirtusLab/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/VirtusLab/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/VirtusLab/blog/contents/{+path}","compare_url":"https://api.github.com/repos/VirtusLab/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VirtusLab/blog/merges","archive_url":"https://api.github.com/repos/VirtusLab/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VirtusLab/blog/downloads","issues_url":"https://api.github.com/repos/VirtusLab/blog/issues{/number}","pulls_url":"https://api.github.com/repos/VirtusLab/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/VirtusLab/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/VirtusLab/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VirtusLab/blog/labels{/name}","releases_url":"https://api.github.com/repos/VirtusLab/blog/releases{/id}","created_at":"2014-08-27T16:45:46Z","updated_at":"2015-01-15T10:27:17Z","pushed_at":"2014-09-23T15:04:46Z","git_url":"git://github.com/VirtusLab/blog.git","ssh_url":"git@github.com:VirtusLab/blog.git","clone_url":"https://github.com/VirtusLab/blog.git","svn_url":"https://github.com/VirtusLab/blog","homepage":null,"size":216,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/1"},"html":{"href":"https://github.com/VirtusLab/blog/pull/1"},"issue":{"href":"https://api.github.com/repos/VirtusLab/blog/issues/1"},"comments":{"href":"https://api.github.com/repos/VirtusLab/blog/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/VirtusLab/blog/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/VirtusLab/blog/statuses/dea395ce767edb34ab2098907abb816a001e9c34"}}}}