{"action":"created","issue":{"url":"https://api.github.com/repos/mirage/mirage/issues/441","labels_url":"https://api.github.com/repos/mirage/mirage/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/mirage/mirage/issues/441/comments","events_url":"https://api.github.com/repos/mirage/mirage/issues/441/events","html_url":"https://github.com/mirage/mirage/pull/441","id":99105616,"number":441,"title":"Functoria","user":{"login":"Drup","id":801124,"avatar_url":"https://avatars.githubusercontent.com/u/801124?v=3","gravatar_id":"","url":"https://api.github.com/users/Drup","html_url":"https://github.com/Drup","followers_url":"https://api.github.com/users/Drup/followers","following_url":"https://api.github.com/users/Drup/following{/other_user}","gists_url":"https://api.github.com/users/Drup/gists{/gist_id}","starred_url":"https://api.github.com/users/Drup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Drup/subscriptions","organizations_url":"https://api.github.com/users/Drup/orgs","repos_url":"https://api.github.com/users/Drup/repos","events_url":"https://api.github.com/users/Drup/events{/privacy}","received_events_url":"https://api.github.com/users/Drup/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-08-05T02:58:04Z","updated_at":"2015-08-22T22:58:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mirage/mirage/pulls/441","html_url":"https://github.com/mirage/mirage/pull/441","diff_url":"https://github.com/mirage/mirage/pull/441.diff","patch_url":"https://github.com/mirage/mirage/pull/441.patch"},"body":"This pull-request will, at term, replace all the internal of the mirage DSL by functoria: https://github.com/Drup/Functoria\r\nIt will also re-express all the combinators in the new DSL.\r\n\r\nThis new version of the DSL improves the following points:\r\n\r\n- The module application tree is fully explicit, which make it explorable and printable at configuration time.\r\n- It is possible to give parameters to the unikernel at configure, run time, or both and generate the configuration for all that.\r\n- Sharing should be easier to express.\r\n- The internal DSL to describe configurable devices should be easier to use (even if it uses classes *gasp*).\r\n- Since mirage and the DSL are now separated, it's guaranteed to be extendable externally.\r\n\r\nFor now, I translated very few configurables.\r\n\r\nWhat works now: the console example, with a key.\r\nWhat doesn't work: all the rest."},"comment":{"url":"https://api.github.com/repos/mirage/mirage/issues/comments/133761327","html_url":"https://github.com/mirage/mirage/pull/441#issuecomment-133761327","issue_url":"https://api.github.com/repos/mirage/mirage/issues/441","id":133761327,"user":{"login":"samoht","id":103693,"avatar_url":"https://avatars.githubusercontent.com/u/103693?v=3","gravatar_id":"","url":"https://api.github.com/users/samoht","html_url":"https://github.com/samoht","followers_url":"https://api.github.com/users/samoht/followers","following_url":"https://api.github.com/users/samoht/following{/other_user}","gists_url":"https://api.github.com/users/samoht/gists{/gist_id}","starred_url":"https://api.github.com/users/samoht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samoht/subscriptions","organizations_url":"https://api.github.com/users/samoht/orgs","repos_url":"https://api.github.com/users/samoht/repos","events_url":"https://api.github.com/users/samoht/events{/privacy}","received_events_url":"https://api.github.com/users/samoht/received_events","type":"User","site_admin":false},"created_at":"2015-08-22T22:58:47Z","updated_at":"2015-08-22T22:58:47Z","body":"> In general, far too much things are hardcoded in these combinators and the code should be moved to the respective libraries.\r\n\r\nI fully agree. Please feel free to create patches doing this (or create issues so that people who want to help can contribute).\r\n\r\n>  explicitly forbid this kind of things, so I have two choices: I add intermediate combinators or I add the combined functor in conduit. Which one should it be ?\r\n\r\nmove things in `conduit`. I'd rather simplify the DSL internal and make the library more uniform than adding more complexity in the DSL. Also it makes things easier for the ones who don't use the DSL.\r\n\r\n> first class modules are used to do some fancy initialization thing (Conduit_mirage.with_tcp). Can it be avoided (and transformed into a normal functor) ? It's completely unlike what the rest of the stack is doing.\r\n\r\nThis is indeed quite different from the rest. The annoying thing with conduit is that (i) it potentially has (or will have) a lot of optional compilation options (depending on whether you want tcp, tls and vchan) and (ii) you want to extend it easily without having to add dummy implementation for the implementation you don't want to depend on. See how it was before for instance: \r\n\r\nhttps://github.com/mirage/ocaml-conduit/blob/v0.7.2/lib/conduit_mirage.ml#L143\r\n\r\nUsing first-class modules you can pass a list of backend implementation instead of having a variable-arity functor (depending on your pre-processing options).\r\n\r\nTo be honnest I am not a huge fan of the current design of conduit as well, but I find it better than the previous one."}}