{"action":"created","issue":{"url":"https://api.github.com/repos/cmungall/biomake/issues/14","repository_url":"https://api.github.com/repos/cmungall/biomake","labels_url":"https://api.github.com/repos/cmungall/biomake/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/cmungall/biomake/issues/14/comments","events_url":"https://api.github.com/repos/cmungall/biomake/issues/14/events","html_url":"https://github.com/cmungall/biomake/issues/14","id":194738651,"number":14,"title":"Explore ways in which to pass prolog clauses into Make syntax","user":{"login":"cmungall","id":50745,"avatar_url":"https://avatars.githubusercontent.com/u/50745?v=3","gravatar_id":"","url":"https://api.github.com/users/cmungall","html_url":"https://github.com/cmungall","followers_url":"https://api.github.com/users/cmungall/followers","following_url":"https://api.github.com/users/cmungall/following{/other_user}","gists_url":"https://api.github.com/users/cmungall/gists{/gist_id}","starred_url":"https://api.github.com/users/cmungall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmungall/subscriptions","organizations_url":"https://api.github.com/users/cmungall/orgs","repos_url":"https://api.github.com/users/cmungall/repos","events_url":"https://api.github.com/users/cmungall/events{/privacy}","received_events_url":"https://api.github.com/users/cmungall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"cmungall","id":50745,"avatar_url":"https://avatars.githubusercontent.com/u/50745?v=3","gravatar_id":"","url":"https://api.github.com/users/cmungall","html_url":"https://github.com/cmungall","followers_url":"https://api.github.com/users/cmungall/followers","following_url":"https://api.github.com/users/cmungall/following{/other_user}","gists_url":"https://api.github.com/users/cmungall/gists{/gist_id}","starred_url":"https://api.github.com/users/cmungall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmungall/subscriptions","organizations_url":"https://api.github.com/users/cmungall/orgs","repos_url":"https://api.github.com/users/cmungall/repos","events_url":"https://api.github.com/users/cmungall/events{/privacy}","received_events_url":"https://api.github.com/users/cmungall/received_events","type":"User","site_admin":false},"assignees":[{"login":"cmungall","id":50745,"avatar_url":"https://avatars.githubusercontent.com/u/50745?v=3","gravatar_id":"","url":"https://api.github.com/users/cmungall","html_url":"https://github.com/cmungall","followers_url":"https://api.github.com/users/cmungall/followers","following_url":"https://api.github.com/users/cmungall/following{/other_user}","gists_url":"https://api.github.com/users/cmungall/gists{/gist_id}","starred_url":"https://api.github.com/users/cmungall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmungall/subscriptions","organizations_url":"https://api.github.com/users/cmungall/orgs","repos_url":"https://api.github.com/users/cmungall/repos","events_url":"https://api.github.com/users/cmungall/events{/privacy}","received_events_url":"https://api.github.com/users/cmungall/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-12-10T02:25:59Z","updated_at":"2016-12-10T06:39:27Z","closed_at":null,"body":"Currently if you want to use LP extensions then you need to use prolog/Makeprog syntax for the entire Makefile.\r\n\r\nThere are a variety of ways to smuggle in prolog syntax to the Makefile, but these have varying degrees of elegance.\r\n\r\nThe most straightforward is to embed the prolog in comments, e.g.\r\n\r\n```\r\n# PROLOG: mammals <-- Deps, {findall( t([X,'.',Y,'.alignment']),  mammal_pair(X,Y),  Deps )}.\r\n```\r\n\r\nThis should be straightforward to implement.\r\n\r\nBut this is a little unsatisfying, as it obscures the new target.\r\n\r\nA more makefile-esque way might be:\r\n\r\n```\r\nMYDEPS := $prolog( findall( t([X,'.',Y,'.alignment']),  mammal_pair(X,Y),  % ) )\r\n\r\n...\r\n\r\nmammals: $(MYDEPS)\r\n```\r\n\r\nThe challenge here is that prolog doesn't return values, it unifies, so we need a way to state that the 3rd argument of this `findall/3` clause should be bound to the stated variable. We could just use a symbol like `%` as I have above or some other convention.\r\n\r\nperhaps this is clearer if the pattern is specified in our `$prolog(...)` pseudo-make function:\r\n\r\n```\r\nMYDEPS := $prolog( %, findall( t([X,'.',Y,'.alignment']),  mammal_pair(X,Y),  % ) )\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cmungall/biomake/issues/comments/266183161","html_url":"https://github.com/cmungall/biomake/issues/14#issuecomment-266183161","issue_url":"https://api.github.com/repos/cmungall/biomake/issues/14","id":266183161,"user":{"login":"ihh","id":54113,"avatar_url":"https://avatars.githubusercontent.com/u/54113?v=3","gravatar_id":"","url":"https://api.github.com/users/ihh","html_url":"https://github.com/ihh","followers_url":"https://api.github.com/users/ihh/followers","following_url":"https://api.github.com/users/ihh/following{/other_user}","gists_url":"https://api.github.com/users/ihh/gists{/gist_id}","starred_url":"https://api.github.com/users/ihh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihh/subscriptions","organizations_url":"https://api.github.com/users/ihh/orgs","repos_url":"https://api.github.com/users/ihh/repos","events_url":"https://api.github.com/users/ihh/events{/privacy}","received_events_url":"https://api.github.com/users/ihh/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T06:39:27Z","updated_at":"2016-12-10T06:39:27Z","body":"The other thing that would be good is a way to attach Prolog goals to Makefile rules\r\n\r\ne.g.\r\n\r\n```\r\n$A.target: $A.dep {is_fasta_file(A)}\r\n    do_something $< >$@\r\n```\r\n\r\nobviously we already have this in the Prolog syntax ... again, shouldn't be too hard to implement this"}}
{"actor":{"display_login":"ihh"}}