C# .NET and elm operations

Hi Viir,

I’m learning the git code of elm bot. Wonder how does it works with C# botengine. I didn’t touch those part before as I work on JAVA mainly, it’s very interresting.

  1. Does botengine have a elm interpreter?
  2. How does elm part reading out output from C# .net data structure? Through in memory JSON?
  3. The engine code should be C# right? Does elm compired to .net code and work together with C# code?

This is a general coding question more like. Feel free to give comments. Thanks

It has no Elm interpreter yet. At the moment, the Elm code is run by compiling it to Javascript and then running that in a Javascript engine.

At the interface the exchanged data is just a String:

Yes this string is currently interpreted as JSON for all events, as we can see here:

The parts specific for the project are mostly C#. The javascript engine is integrated from another project as an assembly.

No, the Elm code is certainly not compiled to .NET. At least for now, it runs as Javascript. As mentioned above, the interface is only one String per event and event response. They happen to be in the same process, but it is simple to split them into separate processes on separate machines.

The general approach to execute Elm code is reused from the Elm-fullstack (backend) implementation: GitHub - elm-fullstack/elm-fullstack: How to build full-stack apps using the Elm programming language. The scenario there is similar: We have some hosting app (in that case .NET core supporting both Linux and Windows) and model an app using the Elm programming language. I have not yet experimented with the interpreter route, but it looks like I will explore this too.

thanks for the example