Can't use proxies at all in TypeScript unless I set the target to ES6 - right now I want to keep it compiling to ES5 so it's immediately useful for a wider range of people.
It also seems like it's going to perform like crap: http://thecodebarbarian.com/thoughts-on-es6-proxies-performance.html I'll add it to the TODO, regardless; a separate ES6 build would be useful for many people. I could document it with the caveat that .get() will always be faster. On Thursday, May 11, 2017 at 11:10:16 AM UTC-4, Kenton Varda wrote: > > On Wed, May 10, 2017 at 11:17 PM, Mark Miller <[email protected] > <javascript:>> wrote: > >> https://kangax.github.io/compat-table/es6/ >> >> It looks like proxies are supported everywhere. >> > > Unfortunately a lot of people still use old browsers. > > http://caniuse.com/#feat=proxy -- click on the "usage relative" box. > > -Kenton > > >> >> >> On Wed, May 10, 2017 at 8:54 PM, Kenton Varda <[email protected] >> <javascript:>> wrote: >> >>> Sweet! >>> >>> Totally random comment from totally randomly opening a file and looking >>> at it: >>> >>> I see lists are accessed via a method .get(n). Have you considered using >>> proxies to allow array subscript [] syntax? I guess some 10-20% of browsers >>> still don't support proxies but that number will only go down. >>> >>> -Kenton >>> >>> On Tue, May 9, 2017 at 2:03 PM, Julián Díaz <[email protected] >>> <javascript:>> wrote: >>> >>>> I'm happy to report some real progress! >>>> >>>> https://github.com/jdiaz5513/capnp-ts >>>> >>>> Right now it's not very useful at all (I just barely have serialization >>>> working) but it's a solid starting point to wrap up the serialization API. >>>> The peanut gallery can start poking around to see how I organized things – >>>> it does depart slightly from the reference implementation but I'm still >>>> aiming to make an external API that's very similar to the C++ one. >>>> >>>> Once the Struct/List classes are complete I'll move on to the schema >>>> compiler, which looks like it'll be a cinch. Hoping I can keep up the >>>> steady progress from here. >>>> >>>> On Monday, April 10, 2017 at 1:45:01 AM UTC-4, Ian Denhardt wrote: >>>>> >>>>> 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 >>>>> builds will be smaller. The VM seems to be designed for small code >>>>> size >>>>> (sensibly, given its target use case). This obviously doesn't apply to >>>>> the asm.js output. >>>>> >>>>> That said, I agree having a pure JS implementation is preferable. >>>>> >>>> -- >>>> 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 [email protected] <javascript:>. >>>> Visit this group at https://groups.google.com/group/capnproto. >>>> >>> >>> -- >>> 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 [email protected] <javascript:>. >>> Visit this group at https://groups.google.com/group/capnproto. >>> >> >> >> >> -- >> Cheers, >> --MarkM >> >> -- >> 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 [email protected] <javascript:>. >> Visit this group at https://groups.google.com/group/capnproto. >> > > -- 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 [email protected]. Visit this group at https://groups.google.com/group/capnproto.
