Re: [elm-discuss] Re: port module for JS interop.. without main/view ?
Do you think a correlating by Id is necessary ? If it is the simple case of having only 1 inbound and 1 outbound port in Elm and doing nothing async in Elm ... isn't a send/receive in JS basically synchronous ? A promise could still make sense but that Id would not be necessary. Some explanation in the Elm Guide would help a lot here. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: port module for JS interop.. without main/view ?
Thanks! Guess you mean somehow combining (join, merge..) 2 Observables (sending + receiving to/from a port) to correlate the request(=send) with the reply(=subscribe-callback) ? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: port module for JS interop.. without main/view ?
ok.. admittedly going a bit offtopic here.. Did you actually mean Rx Subject ? otherwise, how would Observable help with correlating a port-send to a port-subscription event ? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] Re: port module for JS interop.. without main/view ?
Hey thanks for that blog-post about this use-case, exactly what I aimed for initially. Meanwhile I discovered that the Elm.embed(node) interop-variant actually makes sense for me so I can use Elm's view afterall. Works great so far. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [elm-discuss] port module for JS interop.. without main/view ?
That is exactly what I did in Js ... I calLed that worker() function, assuming there was no requirement to have a view. Yet elm was complaining when I removed the view function from my (port) module. view is required in Html.App.program Removing main entirely does not work either.. elm just won't run anything in that case. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[elm-discuss] port module for JS interop.. without main/view ?
So I have this port module which lets me invoke elm-actions from JS and get back results into JS (Basically I just want to use this elm module like a library of elm functions, no Html rendering needed!) It seems I have to give it a main function and use Html.App.program, which in turn requires me to define a view function. Is there any way to expose ports to JS -without- defining a full blown main + view ? Just using Elm for implementing a library ? -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.