kentonv changed the topic of #sandstorm to: Welcome to #sandstorm: home of all things sandstorm.io. Say hi! | Have a question but no one is here? Try asking in the discussion group: https://groups.google.com/group/sandstorm-dev
nicoo has quit [Remote host closed the connection]
nicoo has joined #sandstorm
<indolering[m]>
I think this might be too big of a project for someone with no low-level memory management experience.
<indolering[m]>
It's one thing to wrap functions through introspection or macros, I could even handle parsing a byte stream.
<isd>
abliss : independently of static types, 'truthiness' is such a misfeature. An exception at least would have helped a lot here it sounds.
<indolering[m]>
But the TS, JS, and Lua code looks like it gets into manual memory management. And I'm not confident I can do that in a secure and bug-free way.
<simpson>
indolering[m]: I don't know a lot about Haxe, but you shouldn't need any low-level tools. You will have to read a structure of bytes and parse it somewhat, so you will have to do some pointer logic, but it can be done in a memory-safe fashion.
<indolering[m]>
Is there a dump of the parse tree that Capn Proto hands compiler plugins?
<indolering[m]>
Is it literally a linked list?
<indolering[m]>
You could certainly have a Haxe Capn Proto plugin that compiles down to native.
<isd>
Look at schema.capnp
<isd>
It feeds the plug-in a message whose root is a 'CodeGeneratorRequest', defined in that file.
<indolering[m]>
Yeah, I saw that.
<indolering[m]>
Okay, I'll try building a hello world serializer when I have the time.
<indolering[m]>
So FF is working on making WASM functions inline-able. That would appear to be the most efficient way forward WRT to a fast JavaScript port.
<indolering[m]>
The WASM interface specification appears to cover most of the Capn Proto schema.
<indolering[m]>
I would be really interested in building ergonomic wrappers and a build/testing/distribution (NPM, pip, etc) system around a WASM port.
<simpson>
You might find that a port is not necessary; Capn comes apart into pieces. The capnpc plugin will probably be paired with a support library natively written in the target language.
_whitelogger has joined #sandstorm
<isd>
Also, there's already a native js port, though it doesn't do rpc
<indolering[m]>
But a WASM port would handle type conversions (including strings and structs) via the Interface Spec. Then I can just forward all calls to the WASM module and wrap responses in the target language's version of a promise or response.
<simpson>
Is the goal to isolate computation using WASM?
<simpson>
Anyway, sure, go for it. You might want to work in a high-level language though.
<indolering[m]>
No, it's to leverage the WASM interface bindings and get a somewhat unified module loading experience without having to do compilation on each target.
<indolering[m]>
But the bindspec isn't ready yet.
<indolering[m]>
Interface spec*
<indolering[m]>
And yeah, I don't the time/skill to do a WASM port solo.
<kentonv>
uggghhhhhhhhhhhhhh, if Sandstorm serves an invalid certificate, and you click past the error in chrome... chrome still blocks all of the XHR and WebSocket requests so you cannot get to the admin UI to update the cert...
<JacobWeisz[m]>
I've about had it with browser behavior around PKI. The other day I encountered a broken cert on a site with HSTS. Absolutely no risk from this site and I knew whose it was, but Firefox refused to allow me to create an exception to view it anyways.
<JacobWeisz[m]>
I'm getting really sick of browsers on my computer refusing to do what I tell them to.
<JacobWeisz[m]>
Being on a computer with Internet Explorer is halfway necessary just because it's the only thing that'll let you circumvent the bullcrud Chrome team forces down everyone's throat, which Firefox then copies immediately.
<abliss>
But Jake, you're forgetting that the Chrome Developers know what's best. They know better than you, always. It's best for you and best for The Web!
<kentonv>
Yay I clicked the button in the UI and my sandcats server obtained and began using a valid certificate from Let's Encrypt.