This is an ancient thread, but has anyone done further work on an Elm 
decoder/code generator for Cap'n Proto (or similar binary serialization 
formats) ?   I see there is one for 
OCaml: https://github.com/pelzlpj/capnp-ocaml . Growing weary of packing 
and unpacking JSON on both client and server...

Thanks,
Eric

On Sunday, January 19, 2014 at 1:54:44 AM UTC-5, Peter Damoc wrote:
>
> Maybe Cap'n Proto could be added to the list:
>
> http://kentonv.github.io/capnproto/index.html
>
>
> On Sat, Jan 18, 2014 at 10:29 PM, Joey Eremondi <jmit...@gmail.com 
> <javascript:>> wrote:
>
>> Lots of these topics were brought up in my thread on Haskelm 
>> <https://groups.google.com/forum/#!topic/elm-discuss/dfc-Eyucro4>, but I 
>> didn't want to derail the discussion there.
>>
>> I'm want to know what people think about different formats for sharing 
>> data between a Haskell server and an Elm client. Here are the options I've 
>> thought of:
>>
>> 1. JSON.
>> Pros: Simple, can be derived in Haskell (and soon Elm?)
>> Cons: Text format, not made for ADTs.
>>
>> 2. BSON
>> Pros: Faster/smaller than JSON
>> Cons: Less common than JSON, still not functional
>>
>> 3. JSON where haskell types are converted to their internal JS 
>> representation for Elm.
>> For example, (Foo 3 4 "Hello") would be converted to {ctor:"Foo", _0:3, 
>> _1:4, _2:"Hello"}
>> Pros: no conversion necessary at Elm end
>> Cons: would need to be written using a Native function in Elm, would need 
>> to write custom TemplateHaskell to do the type conversions, other cons 
>> associated with JSON.
>>
>> 4. Custom binary format.
>> Pros: efficient, can be designed to suit ADTs. Haskell end can be derived 
>> using Cereal or Binary.
>> Cons: Custom Elm/JS decoder would need to be written (which is tricky, 
>> since Haskell's binary parsers/encoders seem to all be monadic in nature).
>>
>> Thoughts? Additions to the list?
>>
>> -- 
>> 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...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> -- 
> There is NO FATE, we are the creators.
> blog: http://damoc.ro/ 
>

-- 
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.

Reply via email to