{"action":"created","issue":{"url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/13","repository_url":"https://api.github.com/repos/ocaml-sf/learn-ocaml","labels_url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/13/comments","events_url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/13/events","html_url":"https://github.com/ocaml-sf/learn-ocaml/pull/13","id":326539649,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwNjAwNjMw","number":13,"title":"Provide a single CLI front-end gathering all the commands","user":{"login":"AltGr","id":807966,"node_id":"MDQ6VXNlcjgwNzk2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/807966?v=4","gravatar_id":"","url":"https://api.github.com/users/AltGr","html_url":"https://github.com/AltGr","followers_url":"https://api.github.com/users/AltGr/followers","following_url":"https://api.github.com/users/AltGr/following{/other_user}","gists_url":"https://api.github.com/users/AltGr/gists{/gist_id}","starred_url":"https://api.github.com/users/AltGr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltGr/subscriptions","organizations_url":"https://api.github.com/users/AltGr/orgs","repos_url":"https://api.github.com/users/AltGr/repos","events_url":"https://api.github.com/users/AltGr/events{/privacy}","received_events_url":"https://api.github.com/users/AltGr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-05-25T14:10:04Z","updated_at":"2018-06-21T14:52:01Z","closed_at":"2018-05-30T09:19:47Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/pulls/13","html_url":"https://github.com/ocaml-sf/learn-ocaml/pull/13","diff_url":"https://github.com/ocaml-sf/learn-ocaml/pull/13.diff","patch_url":"https://github.com/ocaml-sf/learn-ocaml/pull/13.patch"},"body":"including grading, processing and simple_server.\n\nThe existing binaries are not changed at the moment (although the goal\nis to remove them at some point), but the new front-end, just\ninstalled as `learn-ocaml`, uses Cmdliner, more consistent options and\ninline documentation (see `learn-ocaml --help`). A script for (bash)\nshell-completion is even provided: source scripts/complete.sh.\n\nThis PR also includes:\n\n- some missing mlis\n- a fix for when users claim tokens that the server doesn't know about\n- a link to get back to the front page on the exercises page\n- an opam2 package definition, which makes it much easier to get all\n  the dependencies in place (just run `opam install .`, or `opam\n  install . --deps && make build opaminstall` if you prefer to build by\n  hand)\n- updated some dependencies (the pins are no longer needed)"},"comment":{"url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/comments/399131767","html_url":"https://github.com/ocaml-sf/learn-ocaml/pull/13#issuecomment-399131767","issue_url":"https://api.github.com/repos/ocaml-sf/learn-ocaml/issues/13","id":399131767,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTEzMTc2Nw==","user":{"login":"AltGr","id":807966,"node_id":"MDQ6VXNlcjgwNzk2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/807966?v=4","gravatar_id":"","url":"https://api.github.com/users/AltGr","html_url":"https://github.com/AltGr","followers_url":"https://api.github.com/users/AltGr/followers","following_url":"https://api.github.com/users/AltGr/following{/other_user}","gists_url":"https://api.github.com/users/AltGr/gists{/gist_id}","starred_url":"https://api.github.com/users/AltGr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AltGr/subscriptions","organizations_url":"https://api.github.com/users/AltGr/orgs","repos_url":"https://api.github.com/users/AltGr/repos","events_url":"https://api.github.com/users/AltGr/events{/privacy}","received_events_url":"https://api.github.com/users/AltGr/received_events","type":"User","site_admin":false},"created_at":"2018-06-21T14:52:01Z","updated_at":"2018-06-21T14:52:01Z","author_association":"COLLABORATOR","body":"Point 2 above seems like the best approach. Rather than importing javascript code, since it's generated from OCaml anyway, we could provide a client (in bytecode) that downloads the exercise from the server (already available as json), and runs the grading client-side. Just like what the javascript client does, actually, so it's just writing the CLI interface, and porting the code that is specific to jsoo (e.g. `XmlHTTPRequest` and uses of the browser's Json parser).\r\n\r\nOn it. Mockup:\r\n```\r\n$ learn-ocaml-client --server https://learn-ocaml.org exercise-id.ml\r\n> Fetching https://learn-ocaml.org/exercises/exercise-id.json\r\n> Decrypting & running the specific grader\r\n> Report: XX% complete\r\n<full report>\r\n> Submitting solution & grade back to server\r\n```\r\n"}}
{"actor":{"display_login":"AltGr"}}