Using Erlang in a desktop application sounds great, do you have any code online somewhere? Or could you make a gist? I would love to see how you made that work.
Re:Neon: Node plus Rust
by lucaspiller on Thursday December 24, 2015 @04:55AM
(#10787698)
You might want to look into BERT [0], I think there is a JavaScript library. We used it a few years ago to call Ruby from Erlang, it wasn't fast at the time, but it did what we needed it to do.
[0] https://github.com/blog/531-introducing-bert-and-bert-rpc
I'm doing the same thing with a JVM. I had to fix the bug where named pipes on Windows were totally busted in Electron before I could make any progress.
Ah, I ran into that problem (I think?) and had been just using regular IP sockets as a stop-gap, planning to switch back over after it was fixed. I'm glad to hear someone with knowledge of Electron internals ran into it as well; I feel bad that I didn't file it as a bug, though.
If you're curious, the fix was here: https://github.com/atom/electron/issues/1968
It made it out into the regular release and I think it's fixed but TBH I haven't tested for a few months.
My work is all on GH here as well: https://github.com/orbitaljs There might be some synergy here between the projects.
Re:Neon: Node plus Rust
by arca_vorago on Thursday December 24, 2015 @07:05AM
(#10787913)
Give me this but with Elixir and Im sold.
Re:Neon: Node plus Rust
by alexnewman on Thursday December 24, 2015 @02:33PM
(#10789333)
why elixir over rust? I'd assume rust makes more sense because you don't need gc
Rather than trying to go whole-hog on linking the two worlds together at a process level, I've just embedded an Erlang release into the Electron package, which decompresses itself to the user's Library/APPDATA dir on Electron startup, transparently registers as a service (so it can continue to run for things like server sync when the app is quit), and then communicates with the app using Unix domain sockets.
It's a bit like the feeling of having a Service Worker, but one that just happens to be able to embed things like physics engines inside of it.