monte-language / typhon

A virtual machine for Monte.
Other
67 stars 10 forks source link

deCapnKit: safe serialization for capn #205

Open dckc opened 5 years ago

dckc commented 5 years ago

includes deSubGraphKit etc. ported from E-on-Java

fixes #203

example from uneval.updoc:

    def x := [1, x, 3]
    test(s(x), "[1, <**CYCLE**>, 3]")

$ monte eval fun/uneval.mt >cycle.msg

$ capnp convert binary:text capn/montevalue.capnp DataExpr <cycle.msg 
( defRec = (
    promIndex = 0,
    rValue = (
      call = (
        receiver = (noun = "_makeList"),
        message = (
          verb = "run",
          args = [
            ( defExpr = (
                index = 2,
                rValue = (
                  literal = (int = (int32 = 1)) ) ) ),
            (ibid = 0),
            ( defExpr = (
                index = 4,
                rValue = (
                  literal = (int = (int32 = 3)) ) ) ) ],
          namedArgs = [] ) ) ) ) )

recognize() is TODO