Thanks Thomas, I've got it working! A small success but satisfying none the less.
On 12 April 2016 at 09:47, Thomas Leonard <[email protected]> wrote: > On 11 April 2016 at 23:18, Joel Hughes <[email protected]> wrote: > > Hello all, > > > > I was hoping for some ocaml Lwt advice related to mirage-dashboard. > > > > I can successfully retrieve json data about the latest releases from > various > > github repositories and print them one at a time. The next step is to > print > > them as one long json array. > > > > I'm getting mixed up when trying to collect each of these json strings > into > > one concatenated string. This is not the ultimate aim but it's a step > > towards building up useful data structures asynchronously. > > > > If anyone can have a look over what I'm doing, it'd be really helpful. > The > > branch below compiles but the resulting binary seems to hang without any > > computation. > > > > This is pretty novice stuff so be prepared for some mess: > > > https://github.com/rudenoise/mirage-dashboard/blob/json-stuff/src/mirage_dashboard.ml#L74 > > Hi Joel, > > You can't nest Lwt_main.run. You should just have one of these and > have everything else run inside it. > > Use >>= instead of |> to compose async functions. > > > Thanks in advance, > > > > Joel > > > -- > Dr Thomas Leonard http://roscidus.com/blog/ > GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA >
_______________________________________________ MirageOS-devel mailing list [email protected] http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
