Re: [capnproto] Re: CapnProto vs gRPC/Protobuf differences - semantics and use case

2023-03-17 Thread Ian Denhardt
I think this is mostly a good summary. I'd maybe call out/emphasize that I think the *most* fundamental difference at the serialization level (as opposed to RPC) is that Cap'n Proto is designed for efficient in-memory access, not requiring an up-front parsing step. Ironically, this is most

Re: [capnproto] how to distinguish different Message Types in tcp byte stream

2022-10-25 Thread Ian Denhardt
For distinguishing the type, I would recommend wrapping your messages in a common union type, e.g: struct Message { union { login @0 :Login; commandGetData @1 :CommandGetData; # etc. } } The rpc protocol itself does something similar on the wire; see rpc.capnp. For determining

Re: [capnproto] Speculation: QUIC as a transport layer for RPC

2022-07-31 Thread Ian Denhardt
I guess my question is, what even needs defining? It's tempting to try to use the independent streams for flow control, but: - By now capnp-c++ already has some built-in support for this that will need to stay there (and probably be extended eventually) for other transports. - The go

Re: [capnproto] UInt64 error for ts file!

2022-01-31 Thread Ian Denhardt
I think the typescript implementation was recently updated to use javascript's bigints for UInt64, rather than defining a special datatype for them. Quoting ruhdv (2022-01-31 08:30:06) >Hi > >I created a struct with a UInt64 property ... > >It like this in .capnp.d.ts file : > >

Re: [capnproto] flow limit related deadlock?

2021-11-23 Thread Ian Denhardt
Quoting Kenton Varda (2021-11-23 19:20:50) >On Tue, Nov 23, 2021 at 5:01 PM Ian Denhardt <[1]i...@zenhack.net> >wrote: > > Ok, I think I get it, let me know if I have this right: > [...] > >Right. Ok, great. Thanks for your patience. > C

Re: [capnproto] flow limit related deadlock?

2021-11-23 Thread Ian Denhardt
? Assuming of course there is something like the flow limit provided by the vat on the other side of the connection. -Ian Quoting Kenton Varda (2021-11-23 17:32:44) >On Tue, Nov 23, 2021 at 3:59 PM Ian Denhardt <[1]i...@zenhack.net> >wrote: > > What are apps *su

Re: [capnproto] flow limit related deadlock?

2021-11-23 Thread Ian Denhardt
(Adding Louis to cc per his request) Quoting Kenton Varda (2021-11-23 14:50:20) >On Tue, Nov 23, 2021 at 12:41 PM Ian Denhardt <[1]i...@zenhack.net> >wrote: > > Wouldn't releasing it on return allow the caller to cause runaway > memory > usa

Re: [capnproto] flow limit related deadlock?

2021-11-23 Thread Ian Denhardt
Quoting Kenton Varda (2021-11-23 13:02:32) >Hmm, I think the intention was that the flow limit should be released >on Return, independent of Finish. But I can totally believe I >implemented it wrong. Could we just change it to be based on Return? >FWIW by default there is no flow

[capnproto] flow limit related deadlock?

2021-11-23 Thread Ian Denhardt
Hey all, A few days ago one of my co-maintainers (Louis) alerted me to a deadlock in the Go implementation. We've pinned down the cause, and while trying to figure out how to fix it, I looked into how the C++ implementation handles backpressure. >From what I can tell, the only way backpressure

Re: [capnproto] Thinking about zig implementation

2021-11-14 Thread Ian Denhardt
Quoting Daurnimator (2021-11-14 19:00:47) > Some misc notes: > > - I recall issues with using zig structs, as there is no way to e.g. > little-endian integer type > - Zig doesn't have anonymous fields > - Things would be nicer with https://github.com/ziglang/zig/issues/6478 Yeah, I would

Re: [capnproto] generate make dependencies

2021-08-05 Thread Ian Denhardt
I've vaguely wanted this in the past, glad someone is interested and motivated enough to get their hands dirty :) Assuming you're interested in doing this only for C++, you'd want to make the changes in the capnpc-c++ code generator plugin. Maybe Kenton can provide more specific guidance than

Re: [capnproto] capnp-ts rpc (was: getTimer in RPC & transparent proxy?)

2021-03-29 Thread Ian Denhardt
Quoting Julián Díaz (2021-03-29 15:58:17) > I'll probably bring that back because the gulpfile never worked quite > as well as the Makefile did. +1. -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop

[capnproto] capnp-ts rpc (was: getTimer in RPC & transparent proxy?)

2021-03-28 Thread Ian Denhardt
Quoting Ryan Patterson (2021-03-25 22:04:01) >This might not be what you're looking for, but I took the >fasterthanlime fork of capnp-ts and upgraded all of the dependencies, >and in my test application I was able to use a go capnp server with a >Typescript capnp client over web

Re: [capnproto] getTimer in RPC & transparent proxy?

2021-03-25 Thread Ian Denhardt
Quoting pepij...@gmail.com (2021-03-25 12:38:43) > Similarly I saw a few mentions of HTTP and websocket stuff, but is > there actually a way to use Capnproto over a websocket? I need none of > that right now, but it's interesting to know what the options are. Not out of the box in the C++

Re: [capnproto] Schemas for "internal data"

2021-02-16 Thread Ian Denhardt
Quoting Matt Stern (2021-02-16 14:21:43) > Is this safe to do? If it's relevant, team A produces with C++ and > team B consumes with Java. No; the representations of Void and InternalData are different (I assume the latter is a struct), so you'll end up with two types that are wire-incompatible.

Re: [capnproto] Capnproto RPC for Java - progress

2020-11-26 Thread Ian Denhardt
Quoting Vaci (2020-11-26 11:54:48) >Hi, > >I now have a reasonably complete implementation of Capnproto RPC in >pure Java. Nice! > >The major features still missing are: > > * file descriptor passing Fwiw, you're in good company here -- I think the C++ implementation is the

Re: [capnproto] Schema Refactoring and Unique IDs

2020-11-25 Thread Ian Denhardt
The ID doesn't affect the encoding itself, so the basic things will still work. You can avoid changing the id by specifying it explicitly, e.g. struct Bar 0xfeefefffefeefefe { val @0 :UInt32; } You can discover the current id by running: capnp compile -ocapnp myschema.capnp Which will

[capnproto] enum brands?

2020-10-30 Thread Ian Denhardt
Hey all, I was looking at schema.capnp, and noticed that the enum variant of the Type struct has a brand field. This doesn't make sense to me: unless I'm missing something, enums can't contain pointers, so it doesn't make sense to have type parameters on an enum. What is this field for? -Ian --

Re: [capnproto] promise pipelining aware methods for consistent databases

2020-10-17 Thread Ian Denhardt
Quoting Smurf En Drek (2020-10-16 20:46:37) > To avoid this, I assume the methods should be made aware of them being > pipelined so they can pass a set of locks on some keys around between > method calls so that everything stays consistent, even with pipelined > calls. Are there Cap'nProto

Re: [capnproto] Implementing Level-3 Protocol (in Go)

2020-09-30 Thread Ian Denhardt
after next. >As it happens I am available at 13:00 PDT (15:00 CDT) Friday if you >still want to chat then. >-Kenton >On Fri, Sep 25, 2020 at 10:59 AM Ian Denhardt <[3]i...@zenhack.net> >wrote: > > Works for me. > Quoting lthibault (2020-09-2

Re: [capnproto] Implementing Level-3 Protocol (in Go)

2020-09-25 Thread Ian Denhardt
tember 25, 2020 at 10:52:25 AM UTC-4 rli...@gmail.com >wrote: > > I'm available next Friday (Oct 2) from 1p PT onward. > >On Friday, September 25, 2020 at 7:36:07 AM UTC-7 lthibault wrote: > > Sounds good to me � looking forward to it. > - Louis &

Re: [capnproto] Implementing Level-3 Protocol (in Go)

2020-09-24 Thread Ian Denhardt
I just opened an issue: https://github.com/capnproto/go-capnproto2/issues/160 I believe Kenton is in Texas these days. For my part I could manage most afternoons/evenings (eastern time) though Monday & Thursday afternoons are bad. But if Ross and/or Kenton are interested in joining us I

Re: [capnproto] Implementing Level-3 Protocol (in Go)

2020-09-23 Thread Ian Denhardt
Quoting lthibault (2020-09-23 14:41:13) > How do you suggest we proceed? I'm thinking it might be useful to get > synchronized over a Zoom call since (a) I could benefit from a guided > tour of v3 and (b) my initial high-level questions about the Level 3 > protocol remain open. Would be cool if

Re: [capnproto] Implementing Level-3 Protocol (in Go)

2020-09-23 Thread Ian Denhardt
If you're keen on working on this I can probably be roped in; I've used the go implementation a fair bit and contributed some patches, and it would be neat to have a level 3 implementation out there. Maybe you're aware of this, but you probably want to start from the v3 branch of the Go

Re: [capnproto] Standardized schema interchange

2020-09-16 Thread Ian Denhardt
Quoting Ryan Patterson (2020-09-16 00:44:05) > That said, I'm not convinced about your store use case. It doesn't > seem like something that needs to be integral to the capnp protocol, > since there's already a shared schema between the peers. Having slept on it I think you're right; the data

Re: [capnproto] Standardized schema interchange

2020-09-15 Thread Ian Denhardt
I was actually thinking about reflection like this this morning, though my use case is a bit different: I'm building a data store on top of capnproto, and would like to be able to introspect the stored objects without a-priori knowing their schema. This probably means needing to store the schema,

Re: [capnproto] Genric Enum ic Cap'p Proto

2020-05-10 Thread Ian Denhardt
The closest analogue to Rust's enums is a union. You could define `Result` like: struct Result(T, E) { union { ok @0 :T; err @1 :E; } } Note however that rust-style error checking has problems in an rpc context, in particular using this as a return value will defeat

Re: [capnproto] what is the syntax for declaring pointers

2020-05-04 Thread Ian Denhardt
ist(foo(b)) that is the problem capnp compile command >generates an error saying this is impossible > >On Mon, May 4, 2020 at 7:12 pm, Ian Denhardt wrote: > >"Pointers" aren't an explicit thing in the schema language. Data, Text, >structs, lists and int

Re: [capnproto] Why "Sorry, only pointer types can be used as generic parameters."?

2020-04-30 Thread Ian Denhardt
Quoting 'Kenton Varda' via Cap'n Proto (2020-04-30 18:51:40) >Yeah, I think if we really really wanted to do this, the approach I'd >take is to have the capnp code generator output full specializations >for each permutation of primitive type arguments. The really hard part >is

Re: [capnproto] Is it backwards compatible to change an integer from unsigned to signed?

2020-04-16 Thread Ian Denhardt
Yes, this is correct. Quoting Vitali Lovich (2020-04-16 19:45:05) >If I change UInt64 to Int64 provided that I know I never sent a value >that's > 2^63 - 1 ? Even if I did am I correct that it's the equivalent >behaviour of treating it equivalent to a C++ cast? > >-- >You

Re: [capnproto] Does setting the same "primitive" field repeatedly cause size to grow?

2020-04-16 Thread Ian Denhardt
Correct, setting a field with a primitive type will not allocate additional space. -Ian Quoting vlov...@gmail.com (2020-04-16 16:53:46) >I don't see this explicitly called out >in� [1]https://capnproto.org/cxx.html� but I just wanted to >double-check that something like this: >

Re: [capnproto] Cap'n Proto for Elm

2020-03-18 Thread Ian Denhardt
Did this ever go anywhere? I'm working on some elm <-> haskell interaction for a sandstorm app and this would be nice to have. Quoting prasanth somasundar (2019-05-29 05:00:46) >Hey Everyone, > >I'm thinking about building out a Cap'n Proto implementation in Elm for >the fun of it.

Re: [capnproto] DAG subgraphs

2020-02-17 Thread Ian Denhardt
Yes, the capnproto spec officially forbids sharing inside a message Different implementations may have varying levels of tolerance for this, but it's probably best not to bend the spec here. Have a look at schema.capnp, in particular the way the `Node` type is managed by id, for some inspiration.

Re: [capnproto] relaxing alignment requirements in capnproto-rust: am I missing anything?

2020-01-11 Thread Ian Denhardt
I'm generally supportive of this, but also worth considering if the change doesn't land: as an alternative to the current unsafe bytes_to_words, you could provide a version that returns a Result, which is Err unless the argument is not 8-byte aligned or the cpu architecture is known to be able to

Re: [capnproto] Thinking about zig implementation

2019-11-29 Thread Ian Denhardt
Zig is neat! Yes, you'll want to write a schema compiler plugin, and will also need to write some code to handle non-schema-specific details of the format; I would start by reading the encoding docs and build some support for reading "untyped" structs/lists/etc. You'll want to decide what

Re: [capnproto] Evolving the protocol to remove stale fields

2019-11-20 Thread Ian Denhardt
If it's a pointer type (structs, lists, interfaces), you can change the field's type to AnyPointer without affecting layout, which will let you delete the unused type definition. Other than that there's not really support for this; you'll see obsoleteFoo and deprecatedFoo in other codebases and

Re: [capnproto] guidance

2019-10-22 Thread Ian Denhardt
I'll weigh in on a few of these, though others will have to cover the C++ specific details; I've mostly used the Go and Haskell implementations. Quoting 'Newbugreport' via Cap'n Proto (2019-10-22 06:01:02) >2. The documentation describes capnp as a capability based system. This >is a new

Re: [capnproto] Using parametrized generic const for a value of a non-parametrized generic field of same type fails.

2019-09-20 Thread Ian Denhardt
Quoting Kenton Varda (2019-09-20 15:01:44) > As to the original question, again, I think what Kuba is trying to do > ought to work. I think I've come around to agreeing here. > And as to what's allowed at runtime, it seems reasonable that we could > support covariance on struct-typed setters.

Re: [capnproto] Using parametrized generic const for a value of a non-parametrized generic field of same type fails.

2019-09-19 Thread Ian Denhardt
ualize overarching design goals that might have driven this. >Now I do appreciate that implementation realities often curtail fully >developed designs, so I'm not trying to imply that the present way >Capnproto works is somehow inherently "bad" - it is what it

Re: [capnproto] Using parametrized generic const for a value of a non-parametrized generic field of same type fails.

2019-09-16 Thread Ian Denhardt
Quoting 'Kenton Varda' via Cap'n Proto (2019-09-16 16:14:59) >Anyway, I guess given that there's no such thing as a constant >capability currently, we don't need to worry about that? And covariance >is correct for all other types? So we could support it? It's sound for constants, but

Re: [capnproto] Strong type alias?

2019-09-16 Thread Ian Denhardt
+1. As a data point: in the Haskell runtime library's RPC support, I ended up manually defining newtype wrappers around Ids for Import/Export and Question/Answer -- this is kinda sad since the schema actually already define aliases, but the schema compiler doesn't convey this in any way to the

Re: [capnproto] Using Cap'n Proto structures directly as immutable data structures

2019-09-10 Thread Ian Denhardt
Quoting ezy...@mit.edu (2019-09-09 23:15:45) > So Cap'n Proto is first and foremost a serialization library, and only > incidentally a data structure description language (at least, until > https://groups.google.com/forum/#!searchin/capnproto/refcounted%7Csort: >

Re: [capnproto] Reading a multi-segment message with zero-copy

2019-07-20 Thread Ian Denhardt
Haven't looked at the code for the C++ implementation, but based on my knowledge of the wire format[1] I would assume: 1. read() 4 bytes to get the number of segments 2. read() the list of segment sizes 3. readv() to read in all the segments [1]:

Re: [capnproto] Re: Kademlia DHT with capnp

2019-07-10 Thread Ian Denhardt
With a hypothetical level-3 capnproto implementation, I don't think you actually need this feature; you could do something like this: interface Node { ping @0 (); store @1 (key :Data, val :Data); findNode @2 (id :NodeId) -> (results :List(Result)); findValue @3

Re: [capnproto] A critique of the schema language.

2019-06-27 Thread Ian Denhardt
Quoting Kenton Varda (2019-06-26 07:13:03) >One thing that is part of that is making sure related declarations can >be grouped together, so that they can easily be read and digested >together, without scrolling back and forth. I'd say this is the main >motivation for nested

[capnproto] A critique of the schema language.

2019-06-24 Thread Ian Denhardt
Hey all, A few weeks ago in the thread about the Elm implementation, I mentioned that I had a longer critique of the schema language that I'd been meaning to write up. I finally got around to it; the blog post is here:

Re: [capnproto] Cap'n Proto for Elm

2019-06-07 Thread Ian Denhardt
Quoting Kenton Varda (2019-06-07 09:45:37) >On Thu, Jun 6, 2019 at 7:41 PM Prasanth Somasundar ><[1]mezu...@live.com> wrote: > >Hey guys, >I've updated [2]the doc with a new write API suggestion. The gist is >that writes never happen to the byte array. Instead, we build a

RE: [capnproto] Cap'n Proto for Elm

2019-06-01 Thread Ian Denhardt
Quoting Prasanth Somasundar (2019-06-01 23:12:20) > What about just dumping everything into the same module, but without > the prefixed namespace for every value/type/type constructor. The > reason that we're prefixing everything with underscores is to avoid > name collisions, but we can simply

Re: [capnproto] Cap'n Proto for Elm

2019-06-01 Thread Ian Denhardt
Quoting Prasanth Somasundar (2019-06-01 04:21:18) >Except for module names. Like I said, I'll try to fix this as best I >can and see if it makes sense to pursue. My current plan is to >topologically sort the graph, break any cycles with extra generics, and >then hide the generics

Re: [capnproto] Cap'n Proto for Elm

2019-05-30 Thread Ian Denhardt
Quoting 'Kenton Varda' via Cap'n Proto (2019-05-30 14:22:59) >Actual line of code from Cloudflare Workers: >case PipelineDef::Stage::Worker::Global::Value::JSON: >So again, I'm not sure this is a problem specific to certain languages. >:) Oof, point taken. Slightly off topic for

RE: [capnproto] Cap'n Proto for Elm

2019-05-30 Thread Ian Denhardt
Quoting prasanth somasundar (2019-05-30 13:50:26) > I'm hoping that I can use `elm-bytes` in a better way than being > forced to decode it into a full Elm data type - though as I say this, > it seems that I'd need some buy-in that I can't be guaranteed. I may > end up with that solution in the

RE: [capnproto] Cap'n Proto for Elm

2019-05-30 Thread Ian Denhardt
Quoting prasanth somasundar (2019-05-29 22:08:27) > Thanks for the feedback. This is really helpful. You're welcome. > * Not supporting every feature/Optimize for well written schema > Very interesting point. I'm not generally good at making those sorts of > concessions, but I probably should

Re: [capnproto] Cap'n Proto for Elm

2019-05-29 Thread Ian Denhardt
Quoting David Renshaw (2019-05-29 21:33:03) >This has piqued my interest. Which parts of the schema language don't >map well to Haskell/Elm? The biggest one is nested namespaces, per discussion. Neither language has intra-module namespaces, so you either end up doing a bunch of complex

Re: [capnproto] Cap'n Proto for Elm

2019-05-29 Thread Ian Denhardt
Oops, forgot to cc the list. Quoting Ian Denhardt (2019-05-29 16:13:32) > Neat. Some feedback: > > * Re: why not the Haskell implementation, it's definitely stable enough > and complete enough to write a compiler plugin. At the serialization > layer there are only a couple

Re: [capnproto] Multithreading RPC servers

2019-05-25 Thread Ian Denhardt
Quoting 'Kenton Varda' via Cap'n Proto (2019-05-24 19:39:38) >I don't know much about how the Go implementation works -- I imagine >due to the nature of Go, it's more likely to utilize multiple threads. Indeed, with the Go implementation you should generally get as much CPU parallelism

Re: [capnproto] Multithreading RPC servers

2019-05-23 Thread Ian Denhardt
Quoting eamonn.nugent via Cap'n Proto (2019-05-23 20:50:04) >My question is: is there space in the capnproto protocol to have >multithreaded receivers, or have the scheduling use multiple threads >for its event queue? By receivers do you mean a single object? If so, the default is

Re: [capnproto] Safety of retroactive unionization

2019-05-14 Thread Ian Denhardt
Quoting Yaron Minsky (2019-05-14 16:06:29) > If I write something in the new spec that uses the age branch of the > union, the old struct can try to read it, and get very confused. > In particular, if someone tries to read the email for a struct that > actually populates age, they'll end up

[capnproto] What should an implementation do with a "reserved" pointer type?

2019-04-22 Thread Ian Denhardt
The encoding spec mentions in the description of capability pointers that values where B != 0 are reserved for future use, but doesn't describe what an implementation not recognizing such a pointer should do. What is the correct behavior here? -Ian -- You received this message because you are

Re: [capnproto] serialize to string

2019-02-11 Thread Ian Denhardt
Quoting 'Kenton Varda' via Cap'n Proto (2019-02-11 13:51:41) >However, if all you need to serialize is a single large >array of floats, then you could also just reinterpret your array as >bytes and read/write it directly. This is essentially what Cap'n Proto >will do under tho

Re: [capnproto] Announcing: level 1 RPC support in the Haskell implementation

2019-02-04 Thread Ian Denhardt
Quoting Kenton Varda (2019-02-04 12:21:07) >Shall I move Haskell into the "Serialization+RPC" category >on� [1]https://capnproto.org/otherlang.html ? Yes, thanks. > Out of curiosity, is there a WebAssembly story for Haskell? There are folks working on it, but not currently. There's a

[capnproto] Announcing: level 1 RPC support in the Haskell implementation

2019-01-27 Thread Ian Denhardt
Hey All, This morning I tagged version 0.4 of the Haskell implementation, which includes a Level 1 RPC implementation! It's a bit rough, there are some key gaps in the API, but it works. Links: * https://hackage.haskell.org/package/capnp * https://github.com/zenhack/haskell-capnp Cheers, -Ian

Re: [capnproto] Parallelism in capnp

2018-12-07 Thread Ian Denhardt
The C++ RPC implementation is not thread safe, if that's what you're asking. The only stable RPC implementation that is is the Go one. (The Haskell implementation I'm working on is as well, but it's not quite ready yet). Quoting Pappu (2018-12-07 16:38:07) >Hi, >I am new to capnp. Is

Re: [capnproto] Capn'Proto (C++) RPC return List as return value

2018-11-04 Thread Ian Denhardt
Quoting r.a.m...@gmail.com (2018-11-04 12:58:16) > interface AccountManager { > echo @0 (title: Text) -> (result: Text); > list @1 ()-> (accounts : List(Text)); > # get @1 (title: Text) -> (account: Account); > } This looks fine. >also I use following code for my server

Re: [capnproto] First (alpha) release of a Haskell implementation.

2018-08-28 Thread Ian Denhardt
Quoting Kenton Varda (2018-08-28 21:34:13) > has a split, where you can either parse the whole thing up front > and forget about it, or write very imperative-looking code with > explicit error checks everywhere. > >Interesting. I would think that for validation errors, at

Re: [capnproto] First (alpha) release of a Haskell implementation.

2018-08-27 Thread Ian Denhardt
Quoting Kenton Varda (2018-08-27 20:41:57) >Nice! Let me know when you want this added to the "other languages" >page. Go right ahead. >How does zero-copy work out in Haskell? It seems like you can't really >do zero-copy writes in a purely-functional way, right? The low-level

[capnproto] First (alpha) release of a Haskell implementation.

2018-08-26 Thread Ian Denhardt
Hey All, I've been working on a Haskell implementation of Cap'N Proto, and the other day finally tagged a first release and published the package: https://hackage.haskell.org/package/capnp The source repo is here: https://github.com/zenhack/haskell-capnp It's alpha quality, but

Re: [capnproto] Changing struct name with id changes generated c++

2018-02-21 Thread Ian Denhardt
Quoting n...@8thwall.com (2018-02-21 13:39:06) >Per capnp "evolving your schema" we tried changing the name of a struct >but keeping its id the same e.g. changing this: >struct MyMessageList { > mList @0: List(MyMessage); >} >struct MyMessage { > field0 @0: Int32; >

Re: [capnproto] RPC pipelining on a struct's union members

2017-05-31 Thread Ian Denhardt
This is also somewhat relevant to something I've been playing around with. Nothing particularly novel, just a set of interfaces for exporting unixy filsystems. It would be nice if I could get a union back (with variants for directory vs. regular file) when doing something like open. But, this

Re: [capnproto] Error reporting with async/push interfaces?

2017-05-27 Thread Ian Denhardt
� � # and stream.done() has completed successfully. >-Kenton > > On Tue, May 23, 2017 at 12:56 PM, Ian Denhardt <[1]i...@zenhack.net> >wrote: > > I'm talking about reporting an error to the receiver of the data, > not > the caller of write().� E.

Re: [capnproto] Error reporting with async/push interfaces?

2017-05-23 Thread Ian Denhardt
Kenton Varda (2017-05-23 11:42:44) >Hi Ian, >I'm not sure I understand. write() can throw an exception. Does that >not solve the problem? >-Kenton >On Mon, May 22, 2017 at 5:01 PM, Ian Denhardt <[1]i...@zenhack.net> >wrote: > > Are th

[capnproto] Error reporting with async/push interfaces?

2017-05-22 Thread Ian Denhardt
Are there established best practices for handling errors that occur with async/push style interfaces, such as sandstorm's Util.ByteStream[1]? That interface doesn't seem to supply a way to report e.g. an IO error that occurs while streaming, and since the call that obtained the ByteStream has

Re: [capnproto] Re: Reviving the JavaScript implementation

2017-04-09 Thread Ian Denhardt
Quoting Kenton Varda (2017-04-09 18:35:48) >1) libcapnp and libkj together add up to some 730k of code (text >segment) these days. Unless emscripten builds are significantly >smaller, that's probably too big. Hard to know without trying it, but it may well be the case that wasm

Re: [capnproto] Re: Reviving the JavaScript implementation

2017-04-08 Thread Ian Denhardt
Quoting Wink Saville (2017-04-07 23:31:43) > Of course its very early days for wasm, but I'm following it and just > beginning to play around with it. Worth pointing out, there's also Emscripten, which has been around a while. So that could be used while wasm support filters into things. Has

Re: [capnproto] Latest official release seems old

2017-04-08 Thread Ian Denhardt
Quoting Wink Saville (2017-04-07 23:57:48) >The last official release looks to be v0.5.3 from 2015, I see quite a >few commits to the repository since then, why no newer release? IIRC, there have been problems getting master to build with MSVC, so a new release has been blocked on that.

Re: [capnproto] RPC and DoS attacks?

2017-03-12 Thread Ian Denhardt
Quoting Kenton Varda (2017-03-11 23:25:28) >I'm not totally convinced that this is a solvable problem (nor that it >is in any way unique to Cap'n Proto). The trickiest problem that's occured to me is that capnproto's expressiveness gives you enough rope to hang yourself in ways that

Re: [capnproto] Proto3 removed field presence detection, has CapNProto done the same?

2017-03-09 Thread Ian Denhardt
Ideally the boilerplate could be cut down by having a standard type like: struct Option(T) { union { Some @0 :T; None @1 :Void; } } And then just do: struct Foo { age @0 :Option(Int32); } But the wire format doesn't really do what

Re: [capnproto] Haskell implementation

2016-08-13 Thread Ian Denhardt
Quoting Kenton Varda (2016-08-12 18:11:14) >Cool, keep us updated! >-Kenton Will do! -- You received this message because you are subscribed to the Google Groups "Cap'n Proto" group. To unsubscribe from this group and stop receiving emails from it, send an email to