diff --git "a/pony/corpus.jsonl" "b/pony/corpus.jsonl" new file mode 100644--- /dev/null +++ "b/pony/corpus.jsonl" @@ -0,0 +1,7894 @@ +{"id": "Pony/src-builtin-runtime_options-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-collections-persistent-list-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-I16-_40.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_24.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: USize val)\n: ISize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6"} +{"id": "Pony/net-TCPListener-_3.txt", "contents": ": TCPListener tag^\n\nParameters\u00b6\n\nauth: TCPListenAuth val\nnotify: TCPListenNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nlimit: USize val = 0\nread_buffer_size: USize val = 16384\nyield_after_reading: USize val = 16384\nyield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPListener tag^\n\n\nip4\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-serialise-serialise-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-buffered-reader-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/format-FormatFixLarge-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatFixLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatFixLarge val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-Array-_2.txt", "contents": "\nModifying the Array can be done via update, insert and delete methods\nwhich alter the Array at an arbitrary index, moving elements left (when\ndeleting) or right (when inserting) as necessary.\nIterating over the elements of an Array can be done using the values method:\nfor element in array.values() do\n// do something with element\nend\n\nMemory allocation\u00b6\nArray allocates contiguous memory. It always allocates at least enough memory\nspace to hold all of its elements. Space is the number of elements the Array\ncan hold without allocating more memory. The space() method returns the\nnumber of elements an Array can hold. The size() method returns the number\nof elements the Array holds.\nDifferent data types require different amounts of memory. Array[U64] with size\nof 6 will take more memory than an Array[U8] of the same size.\nWhen creating an Array or adding more elements will calculate the next power\nof 2 of the requested number of elements and allocate that much space, with a\nlower bound of space for 8 elements."} +{"id": "Pony/src-builtin-iterator-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-Bool-_6.txt", "contents": "[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/4_traits-and-interfaces_5.txt", "contents": "## Nominal subtyping in Pony\n\nThe primary means of doing nominal subtyping in Pony is using __traits__. A __trait__ looks a bit like a __class__, but it uses the keyword `trait` and it can't have any fields.\n\n```pony\ntrait Named\nfun name(): String => \"Bob\"\n\nclass Bob is Named\n```\n\nHere, we have a trait `Named` that has a single function `name` that returns a String. It also provides a default implementation of `name` that returns the string literal \"Bob\".\n\nWe also have a class `Bob` that says it `is Named`. This means `Bob` is in the `Named` category. In Pony, we say _Bob provides Named_, or sometimes simply _Bob is Named_.\n\nSince `Bob` doesn't have its own `name` function, it uses the one from the trait. If the trait's function didn't have a default implementation, the compiler would complain that `Bob` had no implementation of `name`.\n\n```pony\ntrait Named\nfun name(): String => \"Bob\""} +{"id": "Pony/builtin-ILong-_46.txt", "contents": "\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_98.txt", "contents": "\nfun has_next(): Bool =>\n\"\"\"\nIndicates whether there are any values remaining in the iterator.\n\"\"\"\n_next isnt None\n\nfun ref next(): N->A ? =>\n\"\"\"\nReturn the next node in the iterator, advancing the iterator by one element.\n\nOrder of return is determined by `reverse` argument during creation.\n\"\"\"\nmatch _next\n| let next': N =>\nif _reverse then\n_next = next'.prev()\nelse\n_next = next'.next()\nend"} +{"id": "Pony/src-files-file_lines-_7.txt", "contents": "This class buffers the file contents to accumulate full lines. If the file\ndoes not contain linebreaks, the whole file content is read and buffered, which\nmight exceed memory resources. Take care.\n\"\"\"\nlet _reader: Reader = Reader\nlet _file: File\nlet _min_read_size: USize\nvar _last_line_length: USize\nvar _buffer_cursor: USize\n\"\"\"Internal cursor for keeping track until where in the file we already buffered.\"\"\"\nvar _cursor: USize\n\"\"\"Keeps track of the file position we update after every returned line.\"\"\"\nvar _has_next: Bool\n\nnew create(file: File, min_read_size: USize = 256) =>\n\"\"\"\nCreate a FileLines instance on a given file.\n\nThis instance returns lines from the position of the given `file`\nat the time this constructor is called. Later manipulation of the file position"} +{"id": "Pony/src-random-random-_20.txt", "contents": "t = t - range\nif t >= range then\nt = t % range\nend\nend\nwhile (l < t) do\nx = u64()\nm = x.u128() * range.u128()\nl = m.u64()\nend\nend\n(m >> 64).u64()\n\nfun ref real(): F64 =>\n\"\"\"\nA random number in [0, 1)\n\"\"\"\n(next() >> 11).f64() * (F64(1) / 9007199254740992)\n\nfun ref shuffle[A](array: Array[A]) =>"} +{"id": "Pony/builtin-I16-_26.txt", "contents": "I16 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U16 val)\n: I16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nI16 val\n\n\nshr_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_89.txt", "contents": "\n```pony\nactor Main\nnew create(env: Env) =>\ntry\n// construct a new string\nlet str = \"Hello\"\n\n// make an uppercased version\nlet str_upper = str.upper()\n// make a reversed version\nlet str_reversed = str.reverse()\n\n// add \" world\" to the end of our original string\nlet str_new = str.add(\" world\")\n\n// count occurrences of letter \"l\"\nlet count = str_new.count(\"l\")\n\n// find first occurrence of letter \"w\""} +{"id": "Pony/derived-authority_5.txt", "contents": "# Authority hierarchies\n\nLet's have a look at the authorizations available in the standard library's `net` package.\n\n```pony\nprimitive NetAuth\nnew create(from: AmbientAuth) =>\nNone\n\nprimitive DNSAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone\n\nprimitive UDPAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone\n\nprimitive TCPAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone"} +{"id": "Pony/src-builtin-signed-_94.txt", "contents": "\nfun fld_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.fld_partial[I128, U128](this, y)?\n\nfun mod_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.mod_partial[I128, U128](this, y)?\n\ntype Signed is (I8 | I16 | I32 | I64 | I128 | ILong | ISize)\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-stdin-_14.txt", "contents": "_set_notify(consume notify)\n_chunk_size = chunk_size\n\nbe dispose() =>\n\"\"\"\nClear the notifier in order to shut down input.\n\"\"\"\n_set_notify(None)\n\nfun ref _set_notify(notify: (InputNotify iso | None)) =>\n\"\"\"\nSet the notifier.\n\"\"\"\nif notify is None then\nif _use_event and not _event.is_null() then\n// Unsubscribe the event.\n@pony_asio_event_unsubscribe(_event)\n_event = AsioEvent.none()\nend\nelseif _notify is None then"} +{"id": "Pony/net-OSSockOpt-_425.txt", "contents": "fun box sctp_pcb_flags_frag_interleave()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_interleave_strms\u00b6\n[Source]\nfun box sctp_pcb_flags_interleave_strms()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_in_tcppool\u00b6\n[Source]"} +{"id": "Pony/src-net-dns-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-UnsignedInteger-_38.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/builtin-U8-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/as_4.txt", "contents": "actor Main\nnew create(env: Env) =>\nlet critters = Array[Critter].>push(Wombat).>push(Capybara)\nfor critter in critters.values() do\nenv.out.print(critter.wash())\ntry\nenv.out.print((critter as Capybara).swim())\nend\nend\n```\n\nYou can do the same with interfaces as well. In the example below, we have an Array of `Any` which is an interface where we want to try wash any entries that conform to the `Critter` interface.\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet anys = Array[Any ref].>push(Wombat).>push(Capybara)\nfor any in anys.values() do\ntry\nenv.out.print((any as Critter).wash())"} +{"id": "Pony/src-promises-promise-_33.txt", "contents": "\ntry\n(consume rejected').apply()?\nelse\np.reject()\nend\nend)\n\nouter\n\nfun tag add[B: Any #share = A](p: Promise[B]): Promise[(A, B)] =>\n\"\"\"\nAdd two promises into one promise that returns the result of both when\nthey are fulfilled. If either of the promises is rejected then the new\npromise is also rejected.\n\"\"\"\nlet p' = Promise[(A, B)]\n\nlet c =\nobject"} +{"id": "Pony/memory-allocation_2.txt", "contents": "# But Caveat Emptor\n\nBut Pony can use external C libraries via the **FFI** which does not have this luxury.\n\nSo you **can** use any external C library out there, but the question is if you **need to** and if you **should**.\n\nThe biggest problem is external heap memory, created by an external FFI call, or created to support an external call. But external stack space might also need some thoughts, esp. when being created from actors.\n\nPony does have **finalisers** (callbacks which are called by the garbage collector which may be used to free resources allocated by an FFI call); However, the garbage collector is _not timely_ (as with pure reference counting), it is not triggered immediately when some object goes out of scope.\n\nA blocked actor will keep its memory allocated, only a dead actor will release it eventually.\n"} +{"id": "Pony/src-pony_check-randomness-_18.txt", "contents": "\nfun ref ulong(\nmin: ULong = ULong.min_value(),\nmax: ULong = ULong.max_value())\n: ULong\n=>\n\"\"\"\nGenerate a ULong in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nu64(min.u64(), max.u64()).ulong()\n\nfun ref usize(\nmin: USize = USize.min_value(),\nmax: USize = USize.max_value())\n: USize\n=>\n\"\"\""} +{"id": "Pony/builtin-F32-_37.txt", "contents": ": I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nu128_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nadd_unsafe\u00b6"} +{"id": "Pony/1_classes_12.txt", "contents": "# What about inheritance?\n\nIn some object-oriented languages, a type can _inherit_ from another type, like how in Java something can __extend__ something else. Pony doesn't do that. Instead, Pony prefers _composition_ to _inheritance_. In other words, instead of getting code reuse by saying something __is__ something else, you get it by saying something __has__ something else.\n\nOn the other hand, Pony has a powerful __trait__ system (similar to Java 8 interfaces that can have default implementations) and a powerful __interface__ system (similar to Go interfaces, i.e. structurally typed).\n\nWe'll talk about all that stuff in detail later.\n"} +{"id": "Pony/src-collections-list_node-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-SignedInteger-_6.txt", "contents": "y: B)\n: A\n\nParameters\u00b6\n\ny: B\n\nReturns\u00b6\n\nA\n\n\nshr_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\nfun box shr_unsafe(\ny: B)\n: A\n"} +{"id": "Pony/builtin-I128-_30.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ISize-_34.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/serialisation_12.txt", "contents": "\nlet sx = Serialised(serialise, csw)?\nlet y = sx(deserialise)? as CStringWrapper\ny.print()\nelse\nenv.err.print(\"there was an error\")\nend\n```\n\n```c\n// custser.c\n"} +{"id": "Pony/src-net-tcp_connection-_130.txt", "contents": "\nfun ref get_so_sndbuf(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`\n\"\"\"\n_OSSocket.get_so_sndbuf(_fd)\n\nfun ref get_tcp_nodelay(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)`\n\"\"\"\n_OSSocket.getsockopt_u32(_fd, OSSockOpt.sol_socket(), OSSockOpt.tcp_nodelay())\n\n\nfun ref set_so_rcvbuf(bufsize: U32): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`\n\"\"\"\n_OSSocket.set_so_rcvbuf(_fd, bufsize)\n"} +{"id": "Pony/src-buffered-reader-_73.txt", "contents": "Peek at a big-endian I32.\n\"\"\"\npeek_u32_be(offset)?.i32()\n\nfun peek_i32_le(offset: USize = 0): I32 ? =>\n\"\"\"\nPeek at a little-endian I32.\n\"\"\"\npeek_u32_le(offset)?.i32()\n\nfun peek_u64_be(offset: USize = 0): U64 ? =>\n\"\"\"\nPeek at a big-endian U64.\n\"\"\"\n(peek_u32_be(offset)?.u64() << 32) or peek_u32_be(offset + 4)?.u64()\n\nfun peek_u64_le(offset: USize = 0): U64 ? =>\n\"\"\"\nPeek at a little-endian U64.\n\"\"\""} +{"id": "Pony/random-XorShift128Plus-_9.txt", "contents": "i64\u00b6\n[Source]\nfun ref i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n"} +{"id": "Pony/src-collections-map-_43.txt", "contents": "MapKeys[K, V, H, this->HashMap[K, V, H]](this)\n\nfun values(): MapValues[K, V, H, this->HashMap[K, V, H]]^ =>\n\"\"\"\nReturn an iterator over the values.\n\"\"\"\nMapValues[K, V, H, this->HashMap[K, V, H]](this)\n\nfun pairs(): MapPairs[K, V, H, this->HashMap[K, V, H]]^ =>\n\"\"\"\nReturn an iterator over the keys and values.\n\"\"\"\nMapPairs[K, V, H, this->HashMap[K, V, H]](this)\n\nclass MapKeys[K, V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[M->K]\n\"\"\"\nAn iterator over the keys in a map.\n\"\"\"\nlet _map: M"} +{"id": "Pony/src-builtin-signed-_59.txt", "contents": "fun min(y: I32): I32 => if this < y then this else y end\nfun max(y: I32): I32 => if this > y then this else y end\n\nfun fld(y: I32): I32 =>\n_SignedArithmetic.fld[I32, U32](this, y)\n\nfun fld_unsafe(y: I32): I32 =>\n_SignedUnsafeArithmetic.fld_unsafe[I32, U32](this, y)\n\nfun mod(y: I32): I32 =>\n_SignedArithmetic.mod[I32, U32](this, y)\n\nfun mod_unsafe(y: I32): I32 =>\n_SignedUnsafeArithmetic.mod_unsafe[I32, U32](this, y)\n\nfun addc(y: I32): (I32, Bool) =>\n@\"llvm.sadd.with.overflow.i32\"(this, y)\n\nfun subc(y: I32): (I32, Bool) =>\n@\"llvm.ssub.with.overflow.i32\"(this, y)"} +{"id": "Pony/src-itertools-iter-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/files-Path-_2.txt", "contents": "\nsep\u00b6\n[Source]\nReturn the path separator as a string.\nfun tag sep()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nis_abs\u00b6\n[Source]\nReturn true if the path is an absolute path.\nfun box is_abs(\npath: String val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_248.txt", "contents": "fun box local_peereuuid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_peerpid\u00b6\n[Source]\nfun box local_peerpid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_peeruuid\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_5.txt", "contents": "[Source]\nMaximum positive value representable.\nnew val max_value()\n: F64 val^\n\nReturns\u00b6\n\nF64 val^\n\n\nmin_normalised\u00b6\n[Source]\nMinimum positive value representable at full precision (ie a normalised\nnumber).\nnew val min_normalised()\n: F64 val^\n\nReturns\u00b6\n\nF64 val^"} +{"id": "Pony/collections-List-_40.txt", "contents": "let nodes = my_list.nodes() // node with \"a\" is before node with \"c\"\n\nfun box nodes()\n: ListNodes[A, this->ListNode[A] ref] ref^\n\nReturns\u00b6\n\nListNodes[A, this->ListNode[A] ref] ref^\n\n\nrnodes\u00b6\n[Source]\nReturn an iterator on the nodes in the List in reverse order.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet rnodes = my_list.rnodes() // node with \"c\" is before node with \"a\"\n\nfun box rnodes()\n: ListNodes[A, this->ListNode[A] ref] ref^\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-list-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-process-process_monitor-_44.txt", "contents": "\nmatch pipe.near_fd\n| _stdout.near_fd =>\nif _read_len >= _expect then\n_notifier.stdout(this, consume data)\nend\n| _stderr.near_fd =>\n_notifier.stderr(this, consume data)\n| _err.near_fd =>\nlet step: U8 = try data.read_u8(0)? else -1 end\nmatch step\n| _StepChdir() =>\n_notifier.failed(this, ProcessError(ChdirError))\n| _StepExecve() =>\n_notifier.failed(this, ProcessError(ExecveError))\nelse\n_notifier.failed(this, ProcessError(UnknownError))\nend\nend\n"} +{"id": "Pony/src-serialise-serialise-_9.txt", "contents": "\nThe [Serialise.signature](serialise-Serialise.md#signature) method is provided\nfor the purposes of comparing communicating Pony binaries to determine if they\nare the same. Confirming this before deserialising data can help mitigate the\nrisk of accidental serialisation across different Pony binaries, but does not on\nits own address the security issues of accepting data from untrusted sources.\n\"\"\"\n\nuse @\"internal.signature\"[Array[U8] val]()\nuse @pony_ctx[Pointer[None]]()\nuse @pony_alloc[Pointer[U8]](ctx: Pointer[None], size: USize)\nuse @pony_alloc_final[Pointer[U8]](ctx: Pointer[None], size: USize)\nuse @pony_serialise[None](ctx: Pointer[None], data: Any box, typ: Pointer[None],\narr_out: Array[U8] tag, alloc_fn: @{(Pointer[None], USize): Pointer[U8]},\nthrow_fn: @{(): None ?}) ?\nuse @pony_deserialise[Any iso^](ctx: Pointer[None], typ: Pointer[None],\narr_in: Array[U8] val, alloc_fn: @{(Pointer[None], USize): Pointer[U8]},\nalloc_final_fn: @{(Pointer[None], USize): Pointer[U8]}, throw_fn: @{(): None ?}) ?\n\nprimitive Serialise"} +{"id": "Pony/src-cli-env_vars-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38use \"collections\"\n\nprimitive EnvVars\nfun apply(\nenvs: (Array[String] box | None),\nprefix: String = \"\",\nsquash: Bool = false):\nMap[String, String] val\n=>\n\"\"\"\nTurns an array of strings that look like environment variables, ie.\nkey=value, into a map of string to string. Can optionally filter for\nkeys matching a 'prefix', and will squash resulting keys to lowercase\niff 'squash' is true."} +{"id": "Pony/builtin-U16-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_54.txt", "contents": "end\n// NOTE: this _moves_ the elements so second_list consequently ends up empty\nenv.out.print(\"Append *moves* the nodes from the second list so that now has \"\n+ my_second_list.size().string() + \" nodes.\") // 0\n\n// Create a third List from a Seq(ence)\n// (In this case a literal array of Strings)\nlet my_third_list = List[String].from([\"First\"; \"Second\"; \"Third\"])\nenv.out.print(\"A list created from an array of three strings has size: \"\n+ my_third_list.size().string()) // 3\nfor n in my_third_list.values() do\nenv.out.print(\"\\t\" + n.string())\nend\n\n// Map over the third List, concatenating some \"BOOM!'s\" into a new List\nlet new_list = my_third_list.map[String]({ (n) => n + \" BOOM!\" })\nenv.out.print(\"Mapping over our three-node list produces a new list of size: \"\n+ new_list.size().string()) // 3\nenv.out.print(\"Each node-value in the resulting list is now far more exciting:\")\nfor n in new_list.values() do"} +{"id": "Pony/src-buffered-writer-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/trust-boundary_2.txt", "contents": "# Safe packages\n\nThe normal way to handle that is to be sure you're using just the code you need to use in your program. Pretty simple! Don't use some random package from the internet without looking at the code and making sure it doesn't do nasty FFI stuff.\n\nBut we can do better than that.\n\nIn Pony, you can optionally declare a set of _safe_ packages on the `ponyc` command line, like this:\n\n```sh\nponyc --safe=files:net:process my_project\n```\n\nHere, we are declaring that only the `files`, `net` and `process` packages are allowed to use C-FFI calls. We've established our trust boundary: any other packages that try to use C-FFI calls will result in a compile-time error.\n"} +{"id": "Pony/builtin-I128-_60.txt", "contents": "U8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Integer-_49.txt", "contents": "\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n"} +{"id": "Pony/src-builtin-real-_71.txt", "contents": "fun sinh(): A\nfun tanh(): A\n\nfun acos(): A\nfun asin(): A\nfun atan(): A\nfun atan2(y: A): A\n\nfun acosh(): A\nfun asinh(): A\nfun atanh(): A\n\nfun copysign(sign: A): A\n\nfun string(): String iso^ =>\n_ToString._f64(f64())\n\ntype Number is (Int | Float)\n\ntype Int is (Signed | Unsigned)"} +{"id": "Pony/net-OSSockOpt-_148.txt", "contents": "fun box ipv6_pmtudisc_do()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_dont\u00b6\n[Source]\nfun box ipv6_pmtudisc_dont()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_interface\u00b6\n[Source]"} +{"id": "Pony/builtin-ArrayValues-_2.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: B->A ?\n\nReturns\u00b6\n\nB->A ?\n\n\nrewind\u00b6\n[Source]\nfun ref rewind()\n: ArrayValues[A, B] ref\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-generator-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/process-PipeError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: PipeError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I32-_12.txt", "contents": "fun box mod(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_31.txt", "contents": "fun box ipproto_ipv4()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipv6\u00b6\n[Source]\nfun box ipproto_ipv6()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_irtp\u00b6\n[Source]"} +{"id": "Pony/term-ANSITerm-_1.txt", "contents": ": ANSITerm tag^\n\nParameters\u00b6\n\nnotify: ANSINotify iso\nsource: DisposableActor tag\ntimers: Timers tag = reference\n\nReturns\u00b6\n\nANSITerm tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nReceives input from stdin.\nbe apply(\ndata: Array[U8 val] iso)\n"} +{"id": "Pony/src-builtin-string-_65.txt", "contents": "1292\n1293\n1294\n1295\n1296\n1297\n1298\n1299\n1300\n1301\n1302\n1303\n1304\n1305\n1306\n1307\n1308\n1309\n1310\n1311"} +{"id": "Pony/builtin-Integer-_5.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the operation overflows, the result is undefined.\nfun box mul_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n"} +{"id": "Pony/2_primitives_1.txt", "contents": "# What can you use a __primitive__ for?\n\nThere are three main uses of primitives (four, if you count built-in \"machine word\" primitives).\n\n1. As a \"marker value\". For example, Pony often uses the __primitive__ `None` to indicate that something has \"no value\". Of course, it _does_ have a value, so that you can check what it is, and the value is the single instance of `None`.\n2. As an \"enumeration\" type. By having a __union__ of __primitive__ types, you can have a type-safe enumeration. We'll cover __union__ types later.\n3. As a \"collection of functions\". Since primitives can have functions, you can group functions together in a primitive type. You can see this in the standard library, where path handling functions are grouped in the __primitive__ `Path`, for example.\n\n```pony\n// 2 \"marker values\"\nprimitive OpenedDoor\nprimitive ClosedDoor\n\n// An \"enumeration\" type\ntype DoorState is (OpenedDoor | ClosedDoor)\n\n// A collection of functions\nprimitive BasicMath\nfun add(a: U64, b: U64): U64 =>\na + b"} +{"id": "Pony/net-OSSockOpt-_68.txt", "contents": "fun box sol_ipx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_l2cap\u00b6\n[Source]\nfun box sol_l2cap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_local\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_3.txt", "contents": "ILong val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: ILong val^\n\nReturns\u00b6\n\nILong val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/src-cli-command_spec-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-path-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-I32-_50.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-int_properties-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-time-nanos-_2.txt", "contents": "\nfun from_millis(t: U64): U64 =>\nt * 1_000_000\n\nfun from_micros(t: U64): U64 =>\nt * 1_000\n\nfun from_seconds_f(t: F64): U64 =>\n(t * 1_000_000_000).trunc().u64()\n\nfun from_millis_f(t: F64): U64 =>\n(t * 1_000_000).trunc().u64()\n\nfun from_micros_f(t: F64): U64 =>\n(t * 1_000).trunc().u64()\n\nfun from_wall_clock(wall: (I64, I64)): U64 =>\n((wall._1 * 1000000000) + wall._2).u64()\n\n"} +{"id": "Pony/src-files-directory-_34.txt", "contents": "or @ponyint_o_directory()\nor @ponyint_o_cloexec())\n@fdopendir(fd)\nelse\n@opendir(path'.cstring())\nend\n\nif h.is_null() then\nerror\nend\n\nwhile true do\nlet p = @ponyint_unix_readdir(h)\nif p.is_null() then break end\nlist.push(recover String.from_cstring(consume p) end)\nend\n\n@closedir(h)\nelseif windows then\nvar find = @ponyint_windows_find_data()"} +{"id": "Pony/src-pony_check-property-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/reference-capabilities_0.txt", "contents": "# Reference Capabilities\n\nSo if the object _is_ the capability, what controls what we can do with the object? How do we express our _access rights_ on that object?\n\nIn Pony, we do it with _reference capabilities_.\n"} +{"id": "Pony/src-pony_check-randomness-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240use \"random\"\n\nclass ref Randomness\n\"\"\"\nSource of randomness, providing methods for generatic uniformly distributed\nvalues from a given closed interval: [min, max]\nin order for the user to be able to generate every possible value for a given\nprimitive numeric type.\n\nAll primitive number method create numbers in range [min, max)\n\"\"\"\nlet _random: Random"} +{"id": "Pony/itertools-Iter-_13.txt", "contents": "\ncount\u00b6\n[Source]\nReturn the number of values in the iterator.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.count()\n\n3\nfun ref count()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ncycle\u00b6\n[Source]\nRepeatedly cycle through the values from the iterator."} +{"id": "Pony/net-OSSockOpt-_587.txt", "contents": "fun box tcp_quickack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_repair\u00b6\n[Source]\nfun box tcp_repair()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_repair_options\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/format-PrefixSign-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: PrefixSign val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixSign val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-capsicum-cap_rights-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-promises-promise-_25.txt", "contents": "If there is no reject function, of if the reject function raises an error,\nthen the next promise in the chain will be rejected.\n\"\"\"\nlet attach = _Then[A, B](consume fulfill, consume rejected)\nlet promise = attach.promise()\n_attach(consume attach)\npromise\n\nfun tag flatten_next[B: Any #share](\nfulfill: Fulfill[A, Promise[B]],\nrejected: Reject[Promise[B]] = RejectAlways[Promise[B]])\n: Promise[B]\n=>\n\"\"\"\nChain a promise after this one and unwrap the promise returned from this\none.\n\n`flatten_next` is a companion to `next`. It operates in an identical\nfashion except for the type of the fulfilled promise. Whereas `next` takes\na function that returns a type `B`, `flatten_next` takes a function that"} +{"id": "Pony/collections-ListValues-_0.txt", "contents": "\n\n\n\n\n\n\nListValues[A: A, N: ListNode[A] #read]\u00b6\n[Source]\nIterate over the values in a List.\nclass ref ListValues[A: A, N: ListNode[A] #read] is\nIterator[N->A] ref\n\nImplements\u00b6\n\nIterator[N->A] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-builtin-env-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/buffered-Reader-_8.txt", "contents": "Returns\u00b6\n\nArray[U8 val] iso^ ?\n\n\nline\u00b6\n[Source]\nReturn a \\n or \\r\\n terminated line as a string. By default the newline is not\nincluded in the returned string, but it is removed from the buffer.\nSet keep_line_breaks to true to keep the line breaks in the returned line.\nfun ref line(\nkeep_line_breaks: Bool val = false)\n: String iso^ ?\n\nParameters\u00b6\n\nkeep_line_breaks: Bool val = false\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Cons-_6.txt", "contents": "[Source]\nBuilds a new list by reversing the elements in the list.\nfun val reverse()\n: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\nprepend\u00b6\n[Source]\nBuilds a new list with an element added to the front of this list.\nfun val prepend(\na: val->A!)\n: Cons[A] val\n\nParameters\u00b6\n\na: val->A!"} +{"id": "Pony/src-pony_check-generator-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-builtin-float-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/process--index-_2.txt", "contents": "\n// define a client that implements the ProcessNotify interface\nclass ProcessClient is ProcessNotify\nlet _env: Env\n\nnew iso create(env: Env) =>\n_env = env\n\nfun ref stdout(process: ProcessMonitor ref, data: Array[U8] iso) =>\nlet out = String.from_array(consume data)\n_env.out.print(\"STDOUT: \" + out)\n\nfun ref stderr(process: ProcessMonitor ref, data: Array[U8] iso) =>\nlet err = String.from_array(consume data)\n_env.out.print(\"STDERR: \" + err)\n\nfun ref failed(process: ProcessMonitor ref, err: ProcessError) =>\n_env.out.print(err.string())\n\nfun ref dispose(process: ProcessMonitor ref, child_exit_status: ProcessExitStatus) =>"} +{"id": "Pony/promises-Promises-_3.txt", "contents": "\nPromise[Array[A] val] tag\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Promises[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Promises[A] val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/src-builtin-signed-_85.txt", "contents": "\nfun divrem(y: I128): (I128, I128) =>\nifdef native128 then\n(this / y, this % y)\nelse\nif y == 0 then\nreturn (0, 0)\nend\n\nvar num: I128 = if this >= 0 then this else -this end\nvar den: I128 = if y >= 0 then y else -y end\n\n(let q, let r) = num.u128().divrem(den.u128())\n(var q', var r') = (q.i128(), r.i128())\n\nif this < 0 then\nr' = -r'\n\nif y > 0 then\nq' = -q'"} +{"id": "Pony/builtin-USize-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_29.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\nsinh\u00b6\n[Source]\nfun box sinh()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\ntanh\u00b6\n[Source]\nfun box tanh()\n: F32 val\n"} +{"id": "Pony/collections-HashMap-_6.txt", "contents": "V!\n\n\ninsert\u00b6\n[Source]\nSet a value in the map. Returns the new value, allowing reuse.\nfun ref insert(\nkey: K,\nvalue: V)\n: V!\n\nParameters\u00b6\n\nkey: K\nvalue: V\n\nReturns\u00b6\n\nV!\n"} +{"id": "Pony/promises-FulfillIdentity-_0.txt", "contents": "\n\n\n\n\n\n\nFulfillIdentity[A: Any #share]\u00b6\n[Source]\nAn identity function for fulfilling promises.\nclass iso FulfillIdentity[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: FulfillIdentity[A] iso^\n\nReturns\u00b6\n"} +{"id": "Pony/promises-Promise-_8.txt", "contents": "primitive FetchIssue\nfun apply(number: I64, repo: Repository): Promise[Issue] =>\nrepo.get_issue(number)\n\nprimitive PrintIssueTitle\nfun apply(out: OutStream, issue: Issue) =>\nout.print(issue.title())\n\nOur promise Issue, is no longer a Promise[Promise[Issue]]. By using\nflatten_next, we have a much more manageable Promise[Issue] instead.\nOther than unwrapping promises for you, flatten_next otherwise acts the\nsame as next so all the same rules apply to fulfillment and rejection.\nfun tag flatten_next[B: Any #share](\nfulfill: Fulfill[A, Promise[B] tag] iso,\nrejected: Reject[Promise[B] tag] iso = qualify)\n: Promise[B] tag\n\nParameters\u00b6\n\nfulfill: Fulfill[A, Promise[B] tag] iso"} +{"id": "Pony/buffered-Reader-_25.txt", "contents": "\nReturns\u00b6\n\nI16 val ?\n\n\npeek_i16_le\u00b6\n[Source]\nPeek at a little-endian I16.\nfun box peek_i16_le(\noffset: USize val = 0)\n: I16 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI16 val ?"} +{"id": "Pony/src-random-random-_14.txt", "contents": "\nfun ref u64(): U64 =>\n\"\"\"\nA random integer in [0, 2^64)\n\"\"\"\nnext()\n\nfun ref u128(): U128 =>\n\"\"\"\nA random integer in [0, 2^128)\n\"\"\"\n(next().u128() << 64) or next().u128()\n\nfun ref ulong(): ULong =>\n\"\"\"\nA random integer in [0, ULong.max_value()]\n\"\"\"\nifdef ilp32 or llp64 then\n(next() >> 32).ulong()\nelse"} +{"id": "Pony/net-OSSockOpt-_53.txt", "contents": "fun box ipproto_send()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_sep\u00b6\n[Source]\nfun box ipproto_sep()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_shim6\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-collections-persistent-vec-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-ISize-_10.txt", "contents": "\nISize val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nfld_unsafe\u00b6"} +{"id": "Pony/7_equality_6.txt", "contents": "# Primitives and equality\n\nAs you might remember from [Chapter 2](/types/primitives.md), primitives are the same as classes except for two important differences:\n\n* A primitive has no fields.\n* There is only one instance of a user-defined primitive.\n\nThis means, that every primitive of a given type, is always structurally equal and equal based on identity. So, for example, None is always None.\n\n```pony\nif None is None then\n// this is always true\nend\n\nif None == None then\n// this is also always true\nend\n```\n"} +{"id": "Pony/builtin-ULong-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_32.txt", "contents": "\n\ncopy_to\u00b6\n[Source]\nCopy len elements from this(src_idx) to dst(dst_idx).\nfun box copy_to(\ndst: Array[this->A!] ref,\nsrc_idx: USize val,\ndst_idx: USize val,\nlen: USize val)\n: None val\n\nParameters\u00b6\n\ndst: Array[this->A!] ref\nsrc_idx: USize val\ndst_idx: USize val\nlen: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-map-_11.txt", "contents": "# Usage\n```pony\nuse \"collections/persistent\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet m1 = Map[String, U32] // {}\n// Update returns a new map with the provided key set\n// to the provided value. The old map is unchanged.\nlet m2 = m1(\"a\") = 5 // {a: 5}\nlet m3 = m2(\"b\") = 10 // {a: 5, b: 10}\nlet m4 = m3.remove(\"a\")? // {b: 10}\n// You can create a new map from key value pairs.\nlet m5 = Map[String, U32].concat([(\"a\", 2); (\"b\", 3)].values()) // {a: 2, b: 3}\nend\n```\n\"\"\"\nlet _root: _MapSubNodes[K, V, H]\nlet _size: USize"} +{"id": "Pony/src-builtin-array-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-builtin-string-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/net-OSSockOpt-_128.txt", "contents": "fun box ipv6_addr_preferences()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_add_membership\u00b6\n[Source]\nfun box ipv6_add_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_authhdr\u00b6\n[Source]"} +{"id": "Pony/format-PrefixDefault-_1.txt", "contents": "new val create()\n: PrefixDefault val^\n\nReturns\u00b6\n\nPrefixDefault val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: PrefixDefault val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixDefault val\n\nReturns\u00b6"} +{"id": "Pony/src-itertools-iter-_104.txt", "contents": "_iter.next()?\nend)\n\nfun ref take(n: USize): Iter[A]^ =>\n\"\"\"\nReturn an iterator for the first n elements.\n"} +{"id": "Pony/src-files-file_info-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129use @pony_os_stat[Bool](path: Pointer[U8] tag, file: FileInfo tag)\nuse @pony_os_fstat[Bool](fd: I32, path: Pointer[U8] tag, file: FileInfo tag)\nuse @pony_os_fstatat[Bool](fd: I32, path: Pointer[U8] tag, file: FileInfo tag)"} +{"id": "Pony/src-builtin-unsigned-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-builtin-unsigned-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-I64-_38.txt", "contents": "fun box mul(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: I64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U32-_44.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: U32 val)\n: Bool val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-itertools-iter-_85.txt", "contents": "acc' = f(consume acc', a)?\nend\nacc'\n\nfun ref interleave(other: Iterator[A]): Iter[A!] =>\n\"\"\"\nReturn an iterator that alternates the values of the original iterator and\nthe other until both run out.\n"} +{"id": "Pony/builtin-F64-_48.txt", "contents": "fun box sub(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmul\u00b6\nfun box mul(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n"} +{"id": "Pony/pony_test-UnitTest-_4.txt", "contents": "fun ref set_up(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\ntear_down\u00b6\n[Source]\nTidy up after the test has completed.\nCalled for each run test, whether that test passed, succeeded or timed out.\nThe default is to do nothing.\nfun ref tear_down(\nh: TestHelper val)"} +{"id": "Pony/cli-CommandHelp-_0.txt", "contents": "\n\n\n\n\n\n\nCommandHelp\u00b6\n[Source]\nCommandHelp encapsulates the information needed to generate a user help\nmessage for a given CommandSpec, optionally with a specific command\nidentified to print help about. Use Help.general() or Help.for_command()\nto create a CommandHelp instance.\nclass box CommandHelp\n\nPublic Functions\u00b6\nfullname\u00b6\n[Source]\nfun box fullname()\n: String val"} +{"id": "Pony/files--index-_2.txt", "contents": "\nPublic Types\u00b6\n\nprimitive CreateFile\nclass Directory\nclass File\nprimitive FileAuth\nprimitive FileBadFileNumber\ntype FileCaps\nprimitive FileChmod\nprimitive FileChown\nprimitive FileCreate\nprimitive FileEOF\ntype FileErrNo\nprimitive FileError\nprimitive FileExec\nprimitive FileExists\nclass FileInfo\nclass FileLines\nprimitive FileLink"} +{"id": "Pony/src-builtin-float-_54.txt", "contents": "r = r << (ex' - 52)\nelse\nr = r >> (52 - ex')\nend\n\nr.u128()\n\nfun i128_unsafe(): I128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ni128()\n\nfun u128_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nu128()"} +{"id": "Pony/src-process-_process-_35.txt", "contents": "@write(err.far_fd, addressof step, USize(1))\n@_exit(_EXOSERR())\nend\n| None => None\nend\n\nstep = _StepExecve()\nif 0 > @execve(path.cstring(), argp.cpointer(),\nenvp.cpointer())\nthen\n@write(err.far_fd, addressof step, USize(1))\n@_exit(_EXOSERR())\nend\n\nfun tag _dup2(oldfd: U32, newfd: U32) =>\n\"\"\"\nCreates a copy of the file descriptor oldfd using the file\ndescriptor number specified in newfd. If the file descriptor newfd\nwas previously open, it is silently closed before being reused.\nIf dup2() fails because of EINTR we retry."} +{"id": "Pony/src-collections-set-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/itertools-Iter-_10.txt", "contents": "fun ref all(\nf: {(A!): Bool ?}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\n\nReturns\u00b6\n\nBool val\n\n\nany\u00b6\n[Source]\nReturn true if at least one value of the iterator matches the predicate\nf. This method short-circuits at the first value where the predicate\nreturns true, otherwise false is returned.\nExamples\u00b6\nIter[I64]([2; 4; 6].values())"} +{"id": "Pony/src-collections-persistent-vec-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-capsicum-cap-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/symbol-lookup-cheat-sheet_1.txt", "contents": "| Symbol | Usage |\n| ------- | ------------------------------------------------------------------------------- |\n| `,` | to separate parameters in a function signature, or the items of a tuple |\n| `.` | (1) to call a field or a function on a variable (field access or method call) |\n| | (2) to qualify a type/method with its package name |\n| `.>` | to call a method on an object and return the receiver (chaining) |\n| `'` | used as alternative name in parameters (prime) |\n| `\"` | to delineate a literal string |\n| `\"\"\"` | to delineate a documentation string |\n| `(` | (1) start of line: start of a tuple |\n| | (2) middle of line: method call |\n| `()` | (1) parentheses, for function or behavior parameters |\n| | (2) making a tuple (values separated by `,`) |\n| | (3) making an enumeration (values separated by |) |\n| `[` | (1) start of line: start of an array literal |\n| | (2) middle of line: generic formal parameters |\n| `[]` | (1) to indicate a generic type, for example `Range[U64]` |\n| | (2) to indicate the return type of an FFI function call |\n| `{}` | a function type |\n| `:` | (1) after a variable: is followed by the type name |"} +{"id": "Pony/signals-SignalNotify-_1.txt", "contents": "\nParameters\u00b6\n\ncount: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ndispose\u00b6\n[Source]\nCalled if the signal is disposed. This is also called if the notifier\nreturns false.\nfun ref dispose()\n: None val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/net-OSSockOpt-_439.txt", "contents": "fun box sctp_pcb_flags_was_aborted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_was_connected\u00b6\n[Source]\nfun box sctp_pcb_flags_was_connected()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_zero_copy_active\u00b6\n[Source]"} +{"id": "Pony/buffered-Reader-_16.txt", "contents": "\nReturns\u00b6\n\nI64 val ?\n\n\ni64_le\u00b6\n[Source]\nGet a little-endian I64.\nfun ref i64_le()\n: I64 val ?\n\nReturns\u00b6\n\nI64 val ?\n\n\nu128_be\u00b6\n[Source]\nGet a big-endian U128."} +{"id": "Pony/builtin-I16-_3.txt", "contents": "I16 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: I16 val^\n\nReturns\u00b6\n\nI16 val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I8-_18.txt", "contents": "fun box modc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6"} +{"id": "Pony/builtin-None-_2.txt", "contents": "[Source]\nfun box eq(\nthat: None val)\n: Bool val\n\nParameters\u00b6\n\nthat: None val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: None val)\n: Bool val\n"} +{"id": "Pony/builtin-F64-_23.txt", "contents": "F64 val\n\n\npow\u00b6\n[Source]\nfun box pow(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\npowi\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_463.txt", "contents": "fun box sctp_ss_priority()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_round_robin\u00b6\n[Source]\nfun box sctp_ss_round_robin()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_round_robin_packet\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-randomness-_24.txt", "contents": "fun ref bool(): Bool =>\n\"\"\"\nGenerate a random Bool value.\n\"\"\"\n(_random.next() % 2) == 0\n\nfun ref shuffle[T](array: Array[T] ref) =>\n_random.shuffle[T](array)\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_32.txt", "contents": "\"\"\"\nClear the screen.\n\"\"\"\n_out.write(ANSI.clear())\n_refresh_line()\n\nfun ref _swap() =>\n\"\"\"\nSwap the previous character with the current one.\n\"\"\"\ntry\nif (_cur_pos > 0) and (_cur_pos < _edit.size().isize()) then\n_edit(_cur_pos.usize())? =\n_edit((_cur_pos - 1).usize())? =\n_edit(_cur_pos.usize())?\nend\n\n_refresh_line()\nend\n"} +{"id": "Pony/src-collections-list-_96.txt", "contents": "\"\"\"\nIndicates whether there are any nodes remaining in the iterator.\n\"\"\"\n_next isnt None\n\nfun ref next(): N ? =>\n\"\"\"\nReturn the next node in the iterator, advancing the iterator by one element.\n\nOrder of return is determined by `reverse` argument during creation.\n\"\"\"\nmatch _next\n| let next': N =>\nif _reverse then\n_next = next'.prev()\nelse\n_next = next'.next()\nend\n\nnext'"} +{"id": "Pony/builtin-U16-_45.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: U16 val)\n: Bool val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/cli-ArgSpec-_9.txt", "contents": ": Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhelp_string\u00b6\n[Source]\nReturns a formated help string for this arg.\nfun box help_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ndeb_string\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_1.txt", "contents": "new val create(\nvalue: I16 val)\n: I16 val^\n\nParameters\u00b6\n\nvalue: I16 val\n\nReturns\u00b6\n\nI16 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/side-effect-ordering-in-function-call-expressions_0.txt", "contents": "# Function Call Side Effects\n\nConsider the following code:\n\n```pony\nclass Foo\nfun fn(x: U64) => None\n\nactor Main\nnew create(env: Env) =>\nvar x: U64 = 0\ntry foo()?.fn(x = 42) end\nenv.out.print(x.string())\n\nfun foo(): Foo ? => error\n```\n\nWhat do you think it will print? Probably `0` right? Or maybe you realized this code is in the gotchas section so it must be `42`. If you went with `42`, you'd be right. Why?\n\nExpressions for arguments in function calls are evaluated before the expression for the function receiver. The use of assignment expressions like `x = 42` is quite rare so we don't think many folks will be bitten by this. However, it's definitely something you want to be aware of. Also remember that if `fn` were to be called, it would be called with `0` (the result of the assignment expression).\n"} +{"id": "Pony/net-OSSockOpt-_210.txt", "contents": "fun box ip_fw_table_list()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_zero\u00b6\n[Source]\nfun box ip_fw_zero()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_hdrincl\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-map-_9.txt", "contents": "172\n173\n174\n175use mut = \"collections\"\n\ntype Map[K: (mut.Hashable val & Equatable[K]), V: Any #share] is\nHashMap[K, V, mut.HashEq[K]]\n\"\"\"\nA map that uses structural equality on the key.\n\"\"\"\n\ntype MapIs[K: Any #share, V: Any #share] is HashMap[K, V, mut.HashIs[K]]\n\"\"\"\nA map that uses identity comparison on the key.\n\"\"\"\n\nclass val HashMap[K: Any #share, V: Any #share, H: mut.HashFunction[K] val]\n\"\"\"\nA persistent map based on the Compressed Hash Array Mapped Prefix-tree from\n'Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM"} +{"id": "Pony/builtin-String-_75.txt", "contents": "u64\u00b6\n[Source]\nfun box u64(\nbase: U8 val = 0)\n: U64 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nU64 val ?\n\n\nu128\u00b6\n[Source]\nfun box u128(\nbase: U8 val = 0)\n: U128 val ?"} +{"id": "Pony/net-OSSockOpt-_325.txt", "contents": "fun box rose_qbitincl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_remote_procedure\u00b6\n[Source]\nfun box rose_remote_procedure()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_ship_absent\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_6.txt", "contents": "\nU128 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/src-itertools-iter-_116.txt", "contents": "Iter[(A, B, C, D, E)](\nobject is Iterator[(A, B, C, D, E)]\nlet _i1: Iterator[A] = _iter\nlet _i2: Iterator[B] = i2\nlet _i3: Iterator[C] = i3\nlet _i4: Iterator[D] = i4\nlet _i5: Iterator[E] = i5\n\nfun ref has_next(): Bool =>\n_i1.has_next()\nand _i2.has_next()\nand _i3.has_next()\nand _i4.has_next()\nand _i5.has_next()\n\nfun ref next(): (A, B, C, D, E) ? =>\n(_i1.next()?, _i2.next()?, _i3.next()?, _i4.next()?, _i5.next()?)\nend)\n\nprimitive _None"} +{"id": "Pony/buffered-Writer-_18.txt", "contents": "\ndata: F64 val\n\nReturns\u00b6\n\nNone val\n\n\nf64_be\u00b6\n[Source]\nWrite an F64 to the buffer in big-endian byte order.\nfun ref f64_be(\ndata: F64 val)\n: None val\n\nParameters\u00b6\n\ndata: F64 val\n\nReturns\u00b6"} +{"id": "Pony/cli-SyntaxError-_0.txt", "contents": "\n\n\n\n\n\n\nSyntaxError\u00b6\n[Source]\nSyntaxError summarizes a syntax error in a given parsed command line.\nclass val SyntaxError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\ntoken': String val,\nmsg': String val)\n: SyntaxError val^\n"} +{"id": "Pony/src-builtin-unsigned-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-files-file_path-_33.txt", "contents": "try\nFileInfo(this)?.directory\nelse\nfalse\nend\n\nfun val remove(): Bool =>\n\"\"\"\nRemove the file or directory. The directory contents will be removed as\nwell, recursively. Symlinks will be removed but not traversed.\n\"\"\"\nif not caps(FileRemove) then\nreturn false\nend\n\ntry\nlet info = FileInfo(this)?\n\nif info.directory and not info.symlink then\nlet directory = Directory(this)?"} +{"id": "Pony/src-cli-command_help-_11.txt", "contents": ": (CommandHelp | SyntaxError)\n=>\nif argv.size() > 0 then\ntry\nlet cname = argv(0)?\nif cs.commands().contains(cname) then\nmatch cs.commands()(cname)?\n| let ccs: CommandSpec box =>\nlet cch = CommandHelp._create(ch, ccs)\nreturn _parse(ccs, cch, argv.slice(1))\nend\nend\nreturn SyntaxError(cname, \"unknown command\")\nend\nend\nch\n\nclass box CommandHelp\n\"\"\"\nCommandHelp encapsulates the information needed to generate a user help"} +{"id": "Pony/4_traits-and-interfaces_10.txt", "contents": "# Differences between traits and interfaces\n\nIt is common for new Pony users to ask, __Should I use traits or interfaces in my own code?__ Both! Interfaces are more flexible, so if you're not sure what you want, use an interface. But traits are a powerful tool as well.\n"} +{"id": "Pony/pony_check-ASCIIAllWithNUL-_3.txt", "contents": "Returns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_262.txt", "contents": "fun box mrt_mfc_flags_all()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_mfc_flags_border_vif\u00b6\n[Source]\nfun box mrt_mfc_flags_border_vif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_mfc_flags_disable_wrongvif\u00b6\n[Source]"} +{"id": "Pony/8_sugar_4.txt", "contents": "```\n\nbecomes:\n\n```pony\nvar foo = Foo.create(x, 37 where crash = false)\n```\n\n__What if I want to use a constructor that isn't named create?__ Then the sugar can't help you and you have to write it out yourself.\n\n__If the create I want to call takes no arguments can I still put in the parentheses?__ No. Calls of the form `Type()` use the combined create-apply sugar (see below). To get `Type.create()` just use `Type`.\n"} +{"id": "Pony/net-OSSockOpt-_124.txt", "contents": "fun box ipport_userreserved()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292dstopts\u00b6\n[Source]\nfun box ipv6_2292dstopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292hoplimit\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/src-collections-list-_81.txt", "contents": "let my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet all_z = my_list.every( {(s: String): Bool => s == \"z\"} ) // false\n```\n\"\"\"\ntry\n_every(head()?, f)\nelse\ntrue\nend\n\nfun _every(ln: this->ListNode[A], f: {(this->A!): Bool} box): Bool =>\n\"\"\"\nPrivate helper for `every`, recursively working with `ListNode`s.\n\"\"\"\ntry\nif not(f(ln()?)) then\nfalse\nelse\n_every(ln.next() as this->ListNode[A], f)\nend"} +{"id": "Pony/net-OSSockOpt-_217.txt", "contents": "fun box ip_multicast_all()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_if\u00b6\n[Source]\nfun box ip_multicast_if()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_ifindex\u00b6\n[Source]"} +{"id": "Pony/3_actors_8.txt", "contents": "# Actor finalisers\n\nLike classes, actors can have finalisers. The finaliser definition is the same (`fun _final()`). All guarantees and restrictions for a class finaliser are also valid for an actor finaliser. In addition, an actor will not receive any further message after its finaliser is called.\n"} +{"id": "Pony/src-files-file-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/ini-IniIncompleteSection-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: IniIncompleteSection val)\n: Bool val\n\nParameters\u00b6\n\nthat: IniIncompleteSection val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_56.txt", "contents": "1112\n1113\n1114\n1115\n1116\n1117\n1118\n1119\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131"} +{"id": "Pony/net-OSSockOpt-_507.txt", "contents": "fun box so_numrcvpkt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_nwrite\u00b6\n[Source]\nfun box so_nwrite()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_oobinline\u00b6\n[Source]"} +{"id": "Pony/calling-c_17.txt", "contents": "PONY_API size_t pony_os_send(asio_event_t* ev, const char* buf, size_t len)\n{\nssize_t sent = send(ev->fd, buf, len, 0);\n\nif(sent < 0)\n{\nif(errno == EWOULDBLOCK || errno == EAGAIN)\nreturn 0;\n\npony_error();\n}\n\nreturn (size_t)sent;\n}\n```\n\nA function that calls the `pony_error` function should only be called from inside a `try` block in Pony. If this is not done, the call to `pony_error` will result in a call to C's `abort` function, which will terminate the program.\n"} +{"id": "Pony/builtin-U64-_1.txt", "contents": "new val create(\nvalue: U64 val)\n: U64 val^\n\nParameters\u00b6\n\nvalue: U64 val\n\nReturns\u00b6\n\nU64 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/builtin-U128-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/6_errors_0.txt", "contents": "# Errors\n\nPony doesn't feature exceptions as you might be familiar with them from languages like Python, Java, C++ et al. It does, however, provide a simple partial function mechanism to aid in error handling. Partial functions and the `error` keyword used to raise them look similar to exceptions in other languages but have some important semantic differences. Let's take a look at how you work with Pony's error and then how it differs from the exceptions you might be used to.\n"} +{"id": "Pony/src-files-file-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_bench-_runner-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-signed-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/examples_2.txt", "contents": "# Enumeration with values with namespace\n\n```pony\nprimitive Colours\nfun black(): U32 => 0xFF000000\nfun red(): U32 => 0xFFFF0000\n```\n"} +{"id": "Pony/buffered-Reader-_3.txt", "contents": "class ref Reader\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: Reader iso^\n\nReturns\u00b6\n\nReader iso^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturn the number of available bytes.\nfun box size()\n: USize val\n"} +{"id": "Pony/src-pony_check-generator-_85.txt", "contents": ".map[U^]({(t) => fn(consume t) })\n\nend)\n\nfun flat_map[U](fn: {(T): Generator[U]} box): Generator[U] =>\n\"\"\"\nFor each value of this generator, create a generator that is then combined.\n\"\"\"\n// TODO: enable proper shrinking:\nGenerator[U](\nobject is GenObj[U]\nfun generate(rnd: Randomness): GenerateResult[U] ? =>\nlet value: T = _gen.generate_value(rnd)?\nfn(consume value).generate_and_shrink(rnd)?\n\nend)\n\nfun union[U](other: Generator[U]): Generator[(T | U)] =>\n\"\"\"\nCreate a generator that produces the value of this generator or the other"} +{"id": "Pony/src-buffered-writer-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-NullablePointer-_3.txt", "contents": "[Source]\nReturns true if this is null (ie apply would raise an error).\nfun box is_none()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_434.txt", "contents": "fun box sctp_pcb_flags_socket_allgone()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_socket_cant_read\u00b6\n[Source]\nfun box sctp_pcb_flags_socket_cant_read()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_socket_gone\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_39.txt", "contents": "or rejected, immediately fulfill or reject the incoming step. Otherwise,\nkeep it in a list.\n\"\"\"\nif _value is _Pending then\n_list.push(consume attach)\nelseif _value is _Reject then\nattach.reject()\nelse\ntry attach(_value as A) end\nend\n\nprimitive Promises[A: Any #share]\nfun join(ps: Iterator[Promise[A]]): Promise[Array[A] val] =>\n\"\"\"\nCreate a promise that is fulfilled when all promises in the given sequence\nare fulfilled. If any promise in the sequence is rejected then the new\npromise is also rejected. The order that values appear in the final array\nis based on when each promise is fulfilled and not the order that they are\ngiven.\n"} +{"id": "Pony/src-net-tcp_connection-_111.txt", "contents": "false\n\nfun ref _complete_reads(len: U32) =>\n\"\"\"\nThe OS has informed us that `len` bytes of pending reads have completed.\nThis occurs only with IOCP on Windows.\n\"\"\"\nifdef windows then\nif len == 0 then\n// The socket has been closed from the other side, or a hard close has\n// cancelled the queued read.\n_readable = false\n_shutdown_peer = true\nclose()\nreturn\nend\n\n_read_buf_offset = _read_buf_offset + len.usize()\n\nwhile (not _muted) and (_read_buf_offset >= _expect)"} +{"id": "Pony/format-FormatUTF32-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatUTF32 val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatUTF32 val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_58.txt", "contents": "fun box ipproto_tcp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_tlsp\u00b6\n[Source]\nfun box ipproto_tlsp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_tp\u00b6\n[Source]"} +{"id": "Pony/files-FileTruncate-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/process-WaitpidError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: WaitpidError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-USize-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: USize val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-directory-_42.txt", "contents": "\"\"\"\nFileInfo._descriptor(_fd, path)?\n\nfun chmod(mode: FileMode box): Bool =>\n\"\"\"\nSet the FileMode for this directory.\n\"\"\"\n_FileDes.chmod(_fd, path, mode)\n\nfun chown(uid: U32, gid: U32): Bool =>\n\"\"\"\nSet the owner and group for this directory. Does nothing on Windows.\n\"\"\"\n_FileDes.chown(_fd, path, uid, gid)\n\nfun touch(): Bool =>\n\"\"\"\nSet the last access and modification times of the directory to now.\n\"\"\"\n_FileDes.touch(_fd, path)"} +{"id": "Pony/builtin-FloatingPoint-_50.txt", "contents": "\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_34.txt", "contents": "A\n\n\nsin\u00b6\n[Source]\nfun box sin()\n: A\n\nReturns\u00b6\n\nA\n\n\ntan\u00b6\n[Source]\nfun box tan()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_129.txt", "contents": "the kernel expects an option value of a C `uint32_t` type / Pony\ntype `U32`.\n\nThis function returns `0` on success, else the value of `errno` on\nfailure.\n\"\"\"\n_OSSocket.setsockopt_u32(_fd, level, option_name, option)\n\n\nfun ref get_so_error(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)`\n\"\"\"\n_OSSocket.get_so_error(_fd)\n\nfun ref get_so_rcvbuf(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`\n\"\"\"\n_OSSocket.get_so_rcvbuf(_fd)"} +{"id": "Pony/src-term-readline-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/net-OSSockOpt-_578.txt", "contents": "fun box tcp_maxolen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_maxseg\u00b6\n[Source]\nfun box tcp_maxseg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_maxwin\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_39.txt", "contents": "U128 val\n\n\nrotr\u00b6\n[Source]\nfun box rotr(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nadd_unsafe\u00b6\n[Source]"} +{"id": "Pony/process-ChdirError-_2.txt", "contents": "\nthat: ChdirError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ChdirError val)\n: Bool val\n\nParameters\u00b6\n\nthat: ChdirError val\n\nReturns\u00b6\n"} +{"id": "Pony/6_errors_6.txt", "contents": "__Will my then block really always be executed, even if I return inside the try?__ Yes, your `then` expression will __always__ be executed when the `try` block is complete. The only way it won't be is if the `try` never completes (due to an infinite loop), the machine is powered off, or the process is killed (and then, maybe).\n"} +{"id": "Pony/cli-ArgSpec-_6.txt", "contents": "\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\ndefault': (F64 val | None val) = reference\n\nReturns\u00b6\n\nArgSpec val^\n\n\nstring_seq\u00b6\n[Source]\nCreates an Arg with a ReadSeq[String] typed value that can be used like\n file1 file2 file3\nto yield a sequence of three strings equivalent to\ncmd.arg(\"file\").string_seq() (equiv) [\"file1\"; \"file2\"; \"file3\"].\nnew val string_seq(\nname': String val,"} +{"id": "Pony/builtin-U128-_58.txt", "contents": "USize val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/itertools-Iter-_17.txt", "contents": "\n2 4 6\nfun ref filter(\nf: {(A!): Bool ?}[A] box)\n: Iter[A!] ref^\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nfind\u00b6\n[Source]\nReturn the nth value in the iterator that satisfies the predicate f.\nExamples\u00b6\nIter[I64]([1; 2; 3].values())"} +{"id": "Pony/strings-CommonPrefix-_0.txt", "contents": "\n\n\n\n\n\n\nCommonPrefix\u00b6\n[Source]\nCreates a string that is the common prefix of the supplied strings, possibly\nempty.\nprimitive val CommonPrefix\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: CommonPrefix val^\n\nReturns\u00b6"} +{"id": "Pony/src-collections-range-_11.txt", "contents": "_idx = _min\nelse\n_empty = true\n_infinite = false\n_idx = _max // has_next() will return false without code modification\nend\n\nfun has_next(): Bool =>\nif _infinite then\nreturn true\nend\nif _forward then\n_idx < _max\nelse\n_idx > _max\nend\n\nfun ref next(): A ? =>\nif has_next() then\n_idx = _idx + _inc"} +{"id": "Pony/builtin-ULong-_10.txt", "contents": "ULong val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nhash\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/format-AlignLeft-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: AlignLeft val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignLeft val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_43.txt", "contents": "fun box neg()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: U64 val)\n: Bool val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/cli-CommandSpec-_6.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\noptions\u00b6\n[Source]\nReturns a map by name of the named options of this command.\nfun box options()\n: HashMap[String val, OptionSpec val, HashEq[String val] val] box\n\nReturns\u00b6\n\nHashMap[String val, OptionSpec val, HashEq[String val] val] box\n\n\ncommands\u00b6\n[Source]\nReturns a map by name of the child commands of this command."} +{"id": "Pony/random--index-_1.txt", "contents": "class Dice\nclass MT\ntype Rand\ntrait Random\nclass SplitMix64\nclass XorOshiro128Plus\nclass XorOshiro128StarStar\nclass XorShift128Plus\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/5_methods_5.txt", "contents": "_x = 0\n\nnew from_int(x: U32) =>\n_x = x\n\nclass Bar\nfun f() =>\nvar a: Foo = Foo.create()\nvar b: Foo = Foo.from_int(3)\n```\n\nFunctions are always called on an object. Again just specify the object, followed by a dot, followed by the name of the function to call. If the object to call on is omitted then the current object is used (i.e. `this`).\n\n```pony\nclass Foo\nvar _x: U32\n\nnew create() =>\n_x = 0\n"} +{"id": "Pony/net-OSSockOpt-_169.txt", "contents": "fun box ipv6_tlv_hao()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tlv_jumbo\u00b6\n[Source]\nfun box ipv6_tlv_jumbo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tlv_pad1\u00b6\n[Source]"} +{"id": "Pony/files-FileSeek-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_bench-MicroBenchmark-_1.txt", "contents": "[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nconfig\u00b6\n[Source]\nfun box config()\n: BenchConfig val\n\nReturns\u00b6\n\nBenchConfig val\n\n\noverhead\u00b6"} +{"id": "Pony/src-files-file_path-_36.txt", "contents": "Create a symlink to a file or directory.\n\nNote that on Windows a program must be running with elevated priviledges to\nbe able to create symlinks.\n\"\"\"\nif not caps(FileLink) or not link_name.caps(FileCreate) then\nreturn false\nend\n\nifdef windows then\ntry\nvar err: U32 = 0\n\n// look up the ID of the SE_CREATE_SYMBOLIC_LINK privilege\nlet priv_name = \"SeCreateSymbolicLinkPrivilege\"\nvar luid: U64 = 0\nvar ret = @LookupPrivilegeValueA(\nUSize(0),\npriv_name.cstring(),\naddressof luid)"} +{"id": "Pony/builtin-U64-_4.txt", "contents": "\nU64 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_405.txt", "contents": "fun box sctp_max_burst()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_max_cookie_life\u00b6\n[Source]\nfun box sctp_max_cookie_life()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_max_cwnd\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_0.txt", "contents": "\n\n\n\n\n\n\nansi_term.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-itertools-iter-_115.txt", "contents": "and _i3.has_next()\nand _i4.has_next()\n\nfun ref next(): (A, B, C, D) ? =>\n(_i1.next()?, _i2.next()?, _i3.next()?, _i4.next()?)\nend)\n\nfun ref zip4[B, C, D, E](\ni2: Iterator[B],\ni3: Iterator[C],\ni4: Iterator[D],\ni5: Iterator[E])\n: Iter[(A, B, C, D, E)]^\n=>\n\"\"\"\nZip five iterators together so that each call to next() results in\na tuple with the next value of each of the iterators. The number of\nitems returned is the minimum of the number of items returned by the\niterators.\n\"\"\""} +{"id": "Pony/files-Directory-_2.txt", "contents": "Public Functions\u00b6\nentries\u00b6\n[Source]\nThe entries will include everything in the directory, but it is not\nrecursive. The path for the entry will be relative to the directory, so it\nwill contain no directory separators. The entries will not include \".\" or\n\"..\".\nfun box entries()\n: Array[String val] iso^ ?\n\nReturns\u00b6\n\nArray[String val] iso^ ?\n\n\nopen\u00b6\n[Source]\nOpen a directory relative to this one. Raises an error if the path is not\nwithin this directory hierarchy.\nfun box open("} +{"id": "Pony/net-UDPSocket-_16.txt", "contents": "option_name: I32 val,\noption_max_size: USize val = 4)\n: (U32 val , Array[U8 val] iso^)\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\noption_max_size: USize val = 4\n\nReturns\u00b6\n\n(U32 val , Array[U8 val] iso^)\n\n\ngetsockopt_u32\u00b6\n[Source]\nWrapper for UDP sockets to the getsockopt(2) system call where\nthe kernel's returned option value is a C uint32_t type / Pony\ntype U32."} +{"id": "Pony/serialise-DeserialiseAuth-_2.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: DeserialiseAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: DeserialiseAuth val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-builtin-real-_53.txt", "contents": "\"\"\"\nCalculates the modulo of this number and `y` after floored division (`fld`).\nThe result has the sign of the divisor.\n\nIf y is `0` or the operation overflows, this function errors.\n\"\"\"\n\nfun neg_unsafe(): A =>\n\"\"\"\nUnsafe operation.\nIf the operation overflows, the result is undefined.\n\"\"\"\n-~this\n\nfun addc(y: A): (A, Bool)\n\"\"\"\nAdd `y` to this integer and return the result and a flag indicating overflow.\n\"\"\"\nfun subc(y: A): (A, Bool)\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_553.txt", "contents": "fun box tcpolen_sack_permitted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_signature\u00b6\n[Source]\nfun box tcpolen_signature()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_timestamp\u00b6\n[Source]"} +{"id": "Pony/src-files-file_info-_7.txt", "contents": "\nclass val FileInfo\n\"\"\"\nThis contains file system metadata for a path.\n\nA symlink will report information about itself, other than the size which\nwill be the size of the target. A broken symlink will report as much as it\ncan and will set the broken flag.\n\"\"\"\nlet filepath: FilePath\n\nlet mode: FileMode val = recover FileMode end\n\"\"\"UNIX-style file mode.\"\"\"\n\nlet hard_links: U32 = 0\n\"\"\"Number of hardlinks to this `filepath`.\"\"\"\n\nlet device: U64 = 0\n\"\"\"\nOS id of the device containing this `filepath`."} +{"id": "Pony/format-PrefixNumber-_0.txt", "contents": "\n\n\n\n\n\n\nPrefixNumber\u00b6\n[Source]\ntype PrefixNumber is\n(PrefixDefault val | PrefixSpace val | PrefixSign val)\n\nType Alias For\u00b6\n\n(PrefixDefault val | PrefixSpace val | PrefixSign val)\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property-_14.txt", "contents": "The smallest shrunken sample will then be reported to the user.\n\nA [Property1](pony_check-Property1.md) can be run with\n[Ponytest](pony_test--index.md).\nTo that end it needs to be wrapped into a\n[Property1UnitTest](pony_check-Property1UnitTest.md).\n\"\"\"\nfun name(): String\n\"\"\"\nThe name of the property used for reporting during execution.\n\"\"\"\n\nfun params(): PropertyParams =>\n\"\"\"\nReturns parameters to customize execution of this Property.\n\"\"\"\nPropertyParams\n\nfun gen(): Generator[T]\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_444.txt", "contents": "fun box sctp_pluggable_ss()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_primary_addr\u00b6\n[Source]\nfun box sctp_primary_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pr_assoc_status\u00b6\n[Source]"} +{"id": "Pony/debug-DebugStream-_0.txt", "contents": "\n\n\n\n\n\n\nDebugStream\u00b6\n[Source]\ntype DebugStream is\n(DebugOut val | DebugErr val)\n\nType Alias For\u00b6\n\n(DebugOut val | DebugErr val)\n\n\n\n\n"} +{"id": "Pony/src-files-file_path-_29.txt", "contents": "Walks a directory structure starting at this.\n\n`handler(dir_path, dir_entries)` will be called for each directory\nstarting with this one. The handler can control which subdirectories are\nexpanded by removing them from the `dir_entries` list.\n\"\"\"\ntry\nwith dir = Directory(this)? do\nvar entries: Array[String] ref = dir.entries()?\nhandler(this, entries)\nfor e in entries.values() do\nlet p = this.join(e)?\nlet info = FileInfo(p)?\nif info.directory and (follow_links or not info.symlink) then\np.walk(handler, follow_links)\nend\nend\nend\nelse\nreturn"} +{"id": "Pony/builtin-USize-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_19.txt", "contents": "var vec = this\nvar prev = value\nfor idx in mut.Range(i, _size) do\nvec = vec.update(idx, prev = this(idx)?)?\nend\nvec.push(this(_size - 1)?)\n\nfun val delete(i: USize): Vec[A] ? =>\n\"\"\"\nReturn a vector with an element deleted. Elements after this are moved\ndown by one index, compacting the vector. An out of bounds index raises an\nerror.\n\"\"\"\nif i >= _size then error end\nvar vec = pop()?\nfor idx in mut.Range(i + 1, _size) do\nvec = vec.update(idx - 1, this(idx)?)?\nend\nvec\n"} +{"id": "Pony/src-time-timers-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-builtin-platform-_0.txt", "contents": "\n\n\n\n\n\n\nplatform.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_check-generator-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-F32-_57.txt", "contents": "i32\u00b6\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nilong\u00b6\nfun box ilong()"} +{"id": "Pony/builtin-ULong-_12.txt", "contents": "(ULong val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , Bool val)\n\n\nmulc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-read_seq-_0.txt", "contents": "\n\n\n\n\n\n\nread_seq.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files-CreateFile-_0.txt", "contents": "\n\n\n\n\n\n\nCreateFile\u00b6\n[Source]\nOpen a File for read/write, creating if it doesn't exist, preserving the\ncontents if it does exist.\nprimitive val CreateFile\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: CreateFile val^\n\nReturns\u00b6"} +{"id": "Pony/src-term-ansi-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-buffered-reader-_53.txt", "contents": "(u8()?.u16() << 8) or u8()?.u16()\nend\nelse\nerror\nend\n\nfun ref u16_le(): U16 ? =>\n\"\"\"\nGet a little-endian U16.\n\"\"\"\nlet num_bytes = U16(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef littleendian then\ndata.read_u16(offset)?\nelse\ndata.read_u16(offset)?.bswap()"} +{"id": "Pony/builtin-ISize-_3.txt", "contents": "ISize val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: ISize val^\n\nReturns\u00b6\n\nISize val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_63.txt", "contents": "\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/term-ANSINotify-_6.txt", "contents": "Returns\u00b6\n\nNone val\n\n\ninsert\u00b6\n[Source]\nfun ref insert(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6"} +{"id": "Pony/reference-capabilities_9.txt", "contents": "# The list of reference capabilities\n\nThere are six reference capabilities in Pony and they all have strict definitions and rules on how they can be used. We'll get to all of that later, but for now here are their names and what you use them for:\n\n__Isolated__, written `iso`. This is for references to isolated data structures. If you have an `iso` variable then you know that there are no other variables that can access that data. So you can change it however you like and give it to another actor.\n\n__Value__, written `val`. This is for references to immutable data structures. If you have a `val` variable then you know that no-one can change the data. So you can read it and share it with other actors.\n\n__Reference__, written `ref`. This is for references to mutable data structures that are not isolated, in other words, \"normal\" data. If you have a `ref` variable then you can read and write the data however you like and you can have multiple variables that can access the same data. But you can't share it with other actors.\n\n__Box__. This is for references to data that is read-only to you. That data might be immutable and shared with other actors or there may be other variables using it in your actor that can change the data. Either way, the `box` variable can be used to safely read the data. This may sound a little pointless, but it allows you to write code that can work for both `val` and `ref` variables, as long as it doesn't write to the object.\n\n__Transition__, written `trn`. This is used for data structures that you want to write to, while also holding read-only (`box`) variables for them. You can also convert the `trn` variable to a `val` variable later if you wish, which stops anyone from changing the data and allows it be shared with other actors.\n\n__Tag__. This is for references used only for identification. You cannot read or write data using a `tag` variable. But you can store and compare `tag`s to check object identity and share `tag` variables with other actors.\n\nNote that if you have a variable referring to an actor then you can send messages to that actor regardless of what reference capability that variable has.\n"} +{"id": "Pony/builtin-U16-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_486.txt", "contents": "fun box so_dontlinger()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_dontroute\u00b6\n[Source]\nfun box so_dontroute()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_donttrunc\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_38.txt", "contents": "fun box ipproto_mpls()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mtp\u00b6\n[Source]\nfun box ipproto_mtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mux\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_48.txt", "contents": "I32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/ini-IniParse-_0.txt", "contents": "\n\n\n\n\n\n\nIniParse\u00b6\n[Source]\nThis is used to parse INI formatted text as a nested map of strings.\nprimitive val IniParse\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: IniParse val^\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_9.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nexpect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_isnt[A: A]\u00b6\n[Source]\nAssert that the 2 given expressions resolve to different instances.\nfun box assert_isnt[A: A](\nnot_expect: A,\nactual: A,"} +{"id": "Pony/builtin-USize-_23.txt", "contents": "fun box fld_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/builtin-F64-_21.txt", "contents": "(F64 val , U32 val)\n\n\nlog\u00b6\n[Source]\nfun box log()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nlog2\u00b6\n[Source]\nfun box log2()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_9.txt", "contents": "fun box min(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: I128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/itertools-Iter-_1.txt", "contents": "[Source]\nnew ref create(\niter: Iterator[A] ref)\n: Iter[A] ref^\n\nParameters\u00b6\n\niter: Iterator[A] ref\n\nReturns\u00b6\n\nIter[A] ref^\n\n\nmaybe\u00b6\n[Source]\nnew ref maybe(\nvalue: (A | None val))\n: Iter[A] ref^\n"} +{"id": "Pony/builtin-F64-_38.txt", "contents": "fun box add_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nsub_unsafe\u00b6\nfun box sub_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-array-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990class Array[A] is Seq[A]\n\"\"\""} +{"id": "Pony/time-Nanos-_3.txt", "contents": "\nParameters\u00b6\n\nt: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfrom_seconds_f\u00b6\n[Source]\nfun box from_seconds_f(\nt: F64 val)\n: U64 val\n\nParameters\u00b6\n\nt: F64 val\n"} +{"id": "Pony/builtin-Env-_3.txt", "contents": "[Source]\nThe command line used to start the program.\n\nlet vars: Array[String val] val\u00b6\n[Source]\nThe program's environment variables.\n\nlet exitcode: {(I32)} val\u00b6\n[Source]\nSets the environment's exit code. The exit code of the root environment will\nbe the exit code of the application, which defaults to 0.\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-CountdownIter-_0.txt", "contents": "\n\n\n\n\n\n\nCountdownIter[optional T: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[T] val)]\u00b6\n[Source]\nclass ref CountdownIter[optional T: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val) & Integer[T] val)] is\nIterator[T] ref\n\nImplements\u00b6\n\nIterator[T] ref\n"} +{"id": "Pony/src-collections-list_node-_0.txt", "contents": "\n\n\n\n\n\n\nlist_node.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I8-_52.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/examples_5.txt", "contents": "end\n```\n"} +{"id": "Pony/builtin-USize-_29.txt", "contents": "fun box rotr(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_568.txt", "contents": "fun box tcp_cookie_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_min\u00b6\n[Source]\nfun box tcp_cookie_min()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_out_never\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_53.txt", "contents": "new max_value() => 0x7FFF\n\nfun abs(): U16 => if this < 0 then (-this).u16() else this.u16() end\nfun bit_reverse(): I16 => @\"llvm.bitreverse.i16\"(this.u16()).i16()\nfun bswap(): I16 => @\"llvm.bswap.i16\"(this.u16()).i16()\nfun popcount(): U16 => @\"llvm.ctpop.i16\"(this.u16())\nfun clz(): U16 => @\"llvm.ctlz.i16\"(this.u16(), false)\nfun ctz(): U16 => @\"llvm.cttz.i16\"(this.u16(), false)\n\nfun clz_unsafe(): U16 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i16\"(this.u16(), true)\n\nfun ctz_unsafe(): U16 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/src-files-file_path-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-unsigned-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/format-AlignCenter-_2.txt", "contents": "fun box ne(\nthat: AlignCenter val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignCenter val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileRename-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-String-_56.txt", "contents": "\",\nn: USize val = 0)\n: Array[String val] iso^\n\nParameters\u00b6\n\ndelim: String val = \"\n\"\nn: USize val = 0\n\nReturns\u00b6\n\nArray[String val] iso^\n\n\nstrip\u00b6\n[Source]\nRemove all leading and trailing characters from the string that are in s.\nfun ref strip(\ns: String box = \""} +{"id": "Pony/net-OSSockOpt-_283.txt", "contents": "fun box netlink_rx_ring()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_scsitransport\u00b6\n[Source]\nfun box netlink_scsitransport()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_selinux\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_113.txt", "contents": "fun sctp_pcb_flags_frag_interleave():I32 => @pony_os_sockopt_option(I32(702))\nfun sctp_pcb_flags_interleave_strms():I32 => @pony_os_sockopt_option(I32(703))\nfun sctp_pcb_flags_in_tcppool():I32 => @pony_os_sockopt_option(I32(704))\nfun sctp_pcb_flags_multiple_asconfs():I32 => @pony_os_sockopt_option(I32(705))\nfun sctp_pcb_flags_needs_mapped_v4():I32 => @pony_os_sockopt_option(I32(706))\nfun sctp_pcb_flags_nodelay():I32 => @pony_os_sockopt_option(I32(707))\nfun sctp_pcb_flags_no_fragment():I32 => @pony_os_sockopt_option(I32(708))\nfun sctp_pcb_flags_pdapievnt():I32 => @pony_os_sockopt_option(I32(709))\nfun sctp_pcb_flags_portreuse():I32 => @pony_os_sockopt_option(I32(710))\nfun sctp_pcb_flags_recvassocevnt():I32 => @pony_os_sockopt_option(I32(711))\nfun sctp_pcb_flags_recvdataioevnt():I32 => @pony_os_sockopt_option(I32(712))\nfun sctp_pcb_flags_recvnsendfailevnt():I32 => @pony_os_sockopt_option(I32(713))\nfun sctp_pcb_flags_recvnxtinfo():I32 => @pony_os_sockopt_option(I32(714))\nfun sctp_pcb_flags_recvpaddrevnt():I32 => @pony_os_sockopt_option(I32(715))\nfun sctp_pcb_flags_recvpeererr():I32 => @pony_os_sockopt_option(I32(716))\nfun sctp_pcb_flags_recvrcvinfo():I32 => @pony_os_sockopt_option(I32(717))\nfun sctp_pcb_flags_recvsendfailevnt():I32 => @pony_os_sockopt_option(I32(718))\nfun sctp_pcb_flags_recvshutdownevnt():I32 => @pony_os_sockopt_option(I32(719))\nfun sctp_pcb_flags_socket_allgone():I32 => @pony_os_sockopt_option(I32(720))\nfun sctp_pcb_flags_socket_cant_read():I32 => @pony_os_sockopt_option(I32(721))"} +{"id": "Pony/guarantees_1.txt", "contents": "# What is denied\n\nWe're going to talk about reference capability guarantees in terms of what's _denied_. By this, we mean: what can other variables _not_ do when you have a variable with a certain reference capability?\n\nWe need to distinguish between the actor that contains the variable in question and _other_ actors.\n\nThis is important because data reads and writes from other actors may occur concurrently. If two actors can both read the same data and one of them changes it then it will change under the feet of the other actor. This leads to data-races and the need for locks. By ensuring this situation can never occur, Pony eliminates the need for locks.\n\nAll code within any one actor always executes sequentially. This means that data accesses from multiple variables within a single actor do not suffer from data-races.\n"} +{"id": "Pony/signals-Sig-_15.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nwinch\u00b6\n[Source]\nfun box winch()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\ninfo\u00b6\n[Source]\nfun box info()\n: U32 val\n"} +{"id": "Pony/src-term-readline-_24.txt", "contents": "_edit.clear()\nhome()\n| 0x17 => _delete_prev_word() // ctrl-w\n| 0x7F => _backspace() // backspace\n| if input < 0x20 => None // unknown control character\nelse\n// Insert.\n_edit.insert_byte(_cur_pos, input)\n_cur_pos = _cur_pos + 1\n_refresh_line()\nend\n\nfun ref prompt(term: ANSITerm ref, value: String) =>\n\"\"\"\nSet a new prompt, unblock, and handle the pending queue.\n\"\"\"\n_cur_prompt = value\n_blocked = false\n\ntry"} +{"id": "Pony/collections-Flags-_12.txt", "contents": "\nop_or\u00b6\n[Source]\nThe union of this and that.\nfun box op_or(\nthat: Flags[A, B] box)\n: Flags[A, B] iso^\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nFlags[A, B] iso^\n\n\nop_and\u00b6\n[Source]\nThe intersection of this and that."} +{"id": "Pony/src-net-proxy-_0.txt", "contents": "\n\n\n\n\n\n\nproxy.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/process-ProcessErrorType-_0.txt", "contents": "\n\n\n\n\n\n\nProcessErrorType\u00b6\n[Source]\ntype ProcessErrorType is\n(ExecveError val | PipeError val | ForkError val | WaitpidError val | WriteError val | KillError val | CapError val | ChdirError val | UnknownError val)\n\nType Alias For\u00b6\n\n(ExecveError val | PipeError val | ForkError val | WaitpidError val | WriteError val | KillError val | CapError val | ChdirError val | UnknownError val)\n\n\n\n\n"} +{"id": "Pony/builtin-U64-_27.txt", "contents": "U64 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nshr_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-randomness-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-I16-_45.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_0.txt", "contents": "\n\n\n\n\n\n\nvec.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/process-CapError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: CapError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-ASCIILetters-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIILetters val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/random-XorOshiro128StarStar-_13.txt", "contents": "\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\n[Source]\nfun ref real()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nshuffle[A: A]\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_75.txt", "contents": "| let prev_value: A! =>\nif (_prev_hash == cur_hash) and H.eq(prev_value, cur_value) then\nthis.next()?\nelse\n_prev_value = cur_value\n_prev_hash = cur_hash\ncur_value\nend\n| None =>\n_prev_value = cur_value\n_prev_hash = cur_hash\ncur_value\nend\nend)\n\nfun ref enum[B: (Real[B] val & Number) = USize](): Iter[(B, A)]^ =>\n\"\"\"\nAn iterator which yields the current iteration count as well as the next\nvalue from the iterator.\n"} +{"id": "Pony/builtin-I8-_8.txt", "contents": "fun box bitwidth()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_3.txt", "contents": "I32 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: I32 val^\n\nReturns\u00b6\n\nI32 val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-cli-command_parser-_31.txt", "contents": "| let se: SyntaxError => return se\nend\n| None => return SyntaxError(_short_string(c), \"unknown short option\")\nend\nend\noptions\n\nfun _parse_arg(token: String, arg_pos: USize): (Arg | SyntaxError) =>\ntry\nlet arg_spec = _spec.args()(arg_pos)?\n_ArgParser.parse(arg_spec, token)\nelse\nreturn SyntaxError(token, \"too many positional arguments\")\nend\n\nfun _option_with_name(name: String): (OptionSpec | None) =>\ntry\nreturn _spec.options()(name)?\nend\nmatch _parent"} +{"id": "Pony/net-OSSockOpt-_337.txt", "contents": "fun box sctp_auth_delete_key()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_key\u00b6\n[Source]\nfun box sctp_auth_key()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_supported\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_6.txt", "contents": "\nNil[A] val\n\n\nprepend\u00b6\n[Source]\nBuilds a new list with an element added to the front of this list.\nfun box prepend(\na: val->A!)\n: Cons[A] val\n\nParameters\u00b6\n\na: val->A!\n\nReturns\u00b6\n\nCons[A] val\n\n"} +{"id": "Pony/builtin-UnsignedInteger-_48.txt", "contents": "\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/term-ANSI-_8.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\nunderline\u00b6\n[Source]\nUnderlined text. Does nothing on Windows.\nfun box underline(\nstate: Bool val = true)\n: String val\n\nParameters\u00b6\n\nstate: Bool val = true\n\nReturns\u00b6\n\nString val"} +{"id": "Pony/src-collections-map-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/pony_check-GenObj-_1.txt", "contents": "rnd: Randomness ref\n\nReturns\u00b6\n\n(T^ | (T^ , Iterator[T^] ref)) ?\n\n\nshrink\u00b6\n[Source]\nfun box shrink(\nt: T)\n: (T^ , Iterator[T^] ref)\n\nParameters\u00b6\n\nt: T\n\nReturns\u00b6\n\n(T^ , Iterator[T^] ref)"} +{"id": "Pony/builtin-ISize-_55.txt", "contents": "\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ULong-_25.txt", "contents": "fun box modc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6"} +{"id": "Pony/builtin-I8-_7.txt", "contents": "\nReturns\u00b6\n\nU8 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nbitwidth\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_104.txt", "contents": "fun box icmp_port_unreach()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_prec_cutoff\u00b6\n[Source]\nfun box icmp_prec_cutoff()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_prec_violation\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_35.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n"} +{"id": "Pony/src-builtin-string-_162.txt", "contents": "offset: ISize = 0,\nbase: U8 = 0)\n: (A, USize /* chars used */) ?\n=>\n\"\"\"\nRead an integer from the specified location in this string. The integer\nvalue read and the number of bytes consumed are reported.\nThe base parameter specifies the base to use, 0 indicates using the prefix,\nif any, to detect base 2, 10 or 16.\nIf no integer is found at the specified location, then (0, 0) is returned,\nsince no characters have been used.\nAn integer out of range for the target type throws an error.\nA leading minus is allowed for signed integer types.\nUnderscore characters are allowed throughout the integer and are ignored.\n\"\"\"\nlet start_index = offset_to_index(offset)\nvar index = start_index\nvar value: A = 0\nvar had_digit = false\n"} +{"id": "Pony/builtin-SignedInteger-_22.txt", "contents": "(A , A) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nmod_partial\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_helper-_35.txt", "contents": "actual: ReadSeq[A],\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the contents of the 2 given ReadSeqs are equal.\n\nThe type parameter of this function is the type parameter of the\nelements in both ReadSeqs. For instance, when comparing two `Array[U8]`,\nyou should call this method as follows:\n\n```pony\nfun apply(h: TestHelper) =>\nlet a: Array[U8] = [1; 2; 3]\nlet b: Array[U8] = [1; 2; 3]\nh.assert_array_eq[U8](a, b)\n```\n\"\"\"\nvar ok = true"} +{"id": "Pony/src-signals-signal_handler-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-udp_notify-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41interface UDPNotify\n\"\"\"\nNotifications for UDP connections.\n\nFor an example of using this class please see the documentatoin for the\n`UDPSocket` actor.\n\"\"\"\nfun ref listening(sock: UDPSocket ref) =>\n\"\"\"\nCalled when the socket has been bound to an address.\n\"\"\""} +{"id": "Pony/src-cli-env_vars-_3.txt", "contents": "\nSo:\n`=`\nbecomes:\n`{KEY, VALUE}` or `{key, VALUE}`\n\"\"\"\nlet envsmap = recover Map[String, String]() end\nmatch envs\n| let envsarr: Array[String] box =>\nlet prelen = prefix.size().isize()\nfor e in envsarr.values() do\nlet eqpos = try e.find(\"=\")? else ISize.max_value() end\nlet ek: String val = e.substring(0, eqpos)\nlet ev: String val = e.substring(eqpos + 1)\nif (prelen == 0) or ek.at(prefix, 0) then\nif squash then\nenvsmap.update(ek.substring(prelen).lower(), ev)\nelse\nenvsmap.update(ek.substring(prelen), ev)\nend"} +{"id": "Pony/builtin-String-_39.txt", "contents": "\nString iso^\n\n\nupper_in_place\u00b6\n[Source]\nTransforms the string to upper case.\nfun ref upper_in_place()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nreverse\u00b6\n[Source]\nReturns a reversed version of the string.\nfun box reverse()\n: String iso^"} +{"id": "Pony/builtin-AsioEvent-_8.txt", "contents": "[Source]\nfun box oneshot()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nread_write_oneshot\u00b6\n[Source]\nfun box read_write_oneshot()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6"} +{"id": "Pony/src-backpressure-backpressure-_11.txt", "contents": "# Caveat\n\nThe runtime backpressure is a powerful system. By intervening, programmers can\ncreate deadlocks. Any call to `Backpressure.apply` should be matched by a\ncorresponding call to `Backpressure.release`. Authorization via the\n`ApplyReleaseBackpressureAuth` capability is required to apply or release\nbackpressure. By requiring that the caller have a token to apply or release a\nbackpressure, rouge 3rd party library code can't run wild and unknowingly\ninterfere with the runtime.\n\"\"\"\n\nuse @pony_apply_backpressure[None]()\nuse @pony_release_backpressure[None]()\n\nprimitive Backpressure\nfun apply(auth: ApplyReleaseBackpressureAuth) =>\n@pony_apply_backpressure()\n\nfun release(auth: ApplyReleaseBackpressureAuth) =>\n@pony_release_backpressure()"} +{"id": "Pony/net-TCPConnectAuth-_1.txt", "contents": "from: (AmbientAuth val | NetAuth val | TCPAuth val)\n\nReturns\u00b6\n\nTCPConnectAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: TCPConnectAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPConnectAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_bench--index-_5.txt", "contents": "Benchmark Overhead 552 ns 552 ns \u00b10.39% 300000\n_Timer (10000 ns) 10780 ns 10800 ns \u00b13.60% 10000\n\nIt is recommended that a PonyBench program is compiled with the --runtimebc\noption, if possible, and run with the --ponynoyield option.\nPublic Types\u00b6\n\nclass AsyncBenchContinue\ntrait AsyncMicroBenchmark\nclass AsyncOverheadBenchmark\nclass BenchConfig\ntype Benchmark\ninterface BenchmarkList\ntrait MicroBenchmark\nclass OverheadBenchmark\nactor PonyBench\n\n\n\n"} +{"id": "Pony/src-files-file-_59.txt", "contents": "end\nelse\nlet r = @fsync(_fd)\nif r < 0 then\n_errno = _get_error()\nend\nend\nend\n_unsynced_data = false\n_unsynced_metadata = false\n\nfun ref datasync() =>\n\"\"\"\nSync the file contents to physical storage.\n\"\"\"\nif path.caps(FileSync) and (_fd != -1) then\nifdef windows then\nlet r = @FlushFileBuffers(@_get_osfhandle(_fd))\nif r == true then\n_errno = FileError"} +{"id": "Pony/assert-Assert-_3.txt", "contents": "that: Assert val)\n: Bool val\n\nParameters\u00b6\n\nthat: Assert val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-udp_socket-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-builtin-string-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-collections-list-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/src-files-file_lines-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-persistent-vec-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-OSSockOpt-_584.txt", "contents": "fun box tcp_noopt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_nopush\u00b6\n[Source]\nfun box tcp_nopush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_notsent_lowat\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_51.txt", "contents": "1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031"} +{"id": "Pony/builtin-U16-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-AsioEvent-_3.txt", "contents": "flags: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ndisposable\u00b6\n[Source]\nReturns true if the event should be disposed of.\nfun box disposable(\nflags: U32 val)\n: Bool val\n\nParameters\u00b6\n\nflags: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U128-_38.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U16-_27.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/term-Readline-_16.txt", "contents": "Returns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I128-_14.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nmul\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/net-OSSockOpt-_302.txt", "contents": "fun box rds_info_connection_flag_connecting()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_connection_flag_sending\u00b6\n[Source]\nfun box rds_info_connection_flag_sending()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_connection_stats\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-process-process_monitor-_43.txt", "contents": "(_read_buf, let len, let errno) =\npipe.read(_read_buf = recover Array[U8] end, _read_len)\n\nlet next = _read_buf.space()\nmatch len\n| -1 =>\nif (errno == _EAGAIN()) then\nreturn // nothing to read right now, try again later\nend\npipe.close()\nreturn\n| 0 =>\npipe.close()\nreturn\nend\n\n_read_len = _read_len + len.usize()\n\nlet data = _read_buf = recover Array[U8] .> undefined(next) end\ndata.truncate(_read_len)"} +{"id": "Pony/src-builtin-string-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/src-builtin-float-_35.txt", "contents": "fun floor(): F32 => @\"llvm.floor.f32\"(this)\nfun round(): F32 => @\"llvm.round.f32\"(this)\nfun trunc(): F32 => @\"llvm.trunc.f32\"(this)\n\nfun min(y: F32): F32 => if this < y then this else y end\nfun max(y: F32): F32 => if this > y then this else y end\n\nfun fld(y: F32): F32 =>\n(this / y).floor()\n\nfun fld_unsafe(y: F32): F32 =>\n(this /~ y).floor()\n\nfun mod(y: F32): F32 =>\nlet r = this % y\nif r == F32(0.0) then\nr.copysign(y)\nelseif (r > 0) xor (y > 0) then\nr + y\nelse"} +{"id": "Pony/builtin-U64-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_56.txt", "contents": "fun ref set_ip_multicast_loop(loopback: Bool): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, IP_MULTICAST_LOOP, ...)`\n\"\"\"\nvar word: Array[U8] ref =\n_OSSocket.u32_to_bytes4(if loopback then 1 else 0 end)\n_OSSocket.setsockopt(_fd, OSSockOpt.sol_socket(), OSSockOpt.ip_multicast_loop(), word)\n\nfun ref set_ip_multicast_ttl(ttl: U8): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, IP_MULTICAST_TTL, ...)`\n\"\"\"\nvar word: Array[U8] ref = _OSSocket.u32_to_bytes4(ttl.u32())\n_OSSocket.setsockopt(_fd, OSSockOpt.sol_socket(), OSSockOpt.ip_multicast_ttl(), word)\n\nfun ref set_so_broadcast(state: Bool): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_BROADCAST, ...)`\n\"\"\"\nvar word: Array[U8] ref ="} +{"id": "Pony/src-builtin-string-_105.txt", "contents": "\nif s != _alloc then\n_size = s\nend\n\nfun ref truncate(len: USize) =>\n\"\"\"\nTruncates the string at the minimum of len and space. Ensures there is a\nnull terminator. Does not check for null terminators inside the string.\n\nNote that memory is not freed by this operation.\n\"\"\"\nif len >= _alloc then\n_size = len.min(_alloc)\nreserve(_alloc + 1)\nelse\n_size = len.min(_alloc - 1)\nend\n\n_set(_size, 0)"} +{"id": "Pony/calling-c_19.txt", "contents": "# Calling FFI functions from Interfaces or Traits\n\nWe mentioned in the previous section that FFI declarations are scoped to a single Pony package, with separate packages possibly defining different FFI signatures for the same C function. Importing an external package will not import any FFI declarations, since any name collisions would produce multiple declarations for the same C function name, and thus deciding which declaration to use would be ambiguous.\n\nGiven the above fact, if you define any default methods (or behaviors) in an interface or trait, you will not be able to perform an FFI call from them. For example, the code below will fail to compile:\n\n```pony\nuse @printf[I32](fmt: Pointer[None] tag, ...)\n\ntrait Foo\nfun apply() =>\n// Error: Can't call an FFI function in a default method or behavior\n@printf(\"Hello from trait Foo\\n\".cstring())\n\nactor Main is Foo\nnew create(env: Env) =>\nthis.apply()\n```\n\nIf the trait `Foo` above was part of the public API of a package, allowing its `apply` method to perform an FFI call would render `Foo` unusable for any external users, given that the declaration for `printf` would not be in scope."} +{"id": "Pony/calling-c_21.txt", "contents": "By making the change above, we avoid exposing the call to `printf` to any consumers of our trait, thus making it usable by external users.\n"} +{"id": "Pony/builtin-U64-_19.txt", "contents": "fun box divrem_partial(\ny: U64 val)\n: (U64 val , U64 val) ?\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , U64 val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U64 val)\n: U64 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-unit_test-_3.txt", "contents": "52\n53\n54\n55\n56\n57trait UnitTest\n\"\"\"\nEach unit test class must provide this trait. Simple tests only need to\ndefine the name() and apply() functions. The remaining functions specify\nadditional test options.\n\"\"\"\n\nfun name(): String\n\"\"\"\nReport the test name, which is used when printing test results and on the\ncommand line to select tests to run.\n\"\"\"\n\nfun exclusion_group(): String =>\n\"\"\""} +{"id": "Pony/builtin-FloatingPoint-_44.txt", "contents": "fun box div(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: A)\n: (A , A)\n\nParameters\u00b6"} +{"id": "Pony/builtin-I64-_51.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_20.txt", "contents": "Generator[(T1 , T2)] box\n\n\nzip3[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\nZip three generators into a generator of a 3-tuple\ncontaining the values generated by those three generators.\nfun box zip3[T1: T1, T2: T2, T3: T3](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box,\ngen3: Generator[T3] box)\n: Generator[(T1 , T2 , T3)] box\n\nParameters\u00b6\n\ngen1: Generator[T1] box\ngen2: Generator[T2] box\ngen3: Generator[T3] box\n\nReturns\u00b6"} +{"id": "Pony/src-cli-command_help-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/process-KillError-_0.txt", "contents": "\n\n\n\n\n\n\nKillError\u00b6\n[Source]\nprimitive val KillError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: KillError val^\n\nReturns\u00b6\n\nKillError val^"} +{"id": "Pony/builtin-I128-_63.txt", "contents": "USize val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: I128 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: I128 val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n"} +{"id": "Pony/4_traits-and-interfaces_11.txt", "contents": "## Private methods\n\nA key difference between traits and interfaces is that interfaces can't have private methods. So, if you need private methods, you'll need to use a trait and have users opt in via nominal typing. Interfaces can't have private methods because otherwise, users could use them to break encapsulation and access private methods on concrete types from other packages. For example:\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet x: String ref = \"sailor\".string()\nlet y: Foo = x\ny._set(0, 'f')\nenv.out.print(\"Hello, \" + x)\n\ninterface Foo\nfun ref _set(i: USize, value: U8): U8\n```\n\nIn the code above, the interface `Foo` allows access to the private `_set` method of `String` and allows for changing `sailor` to `failor` or it would anyway, if interfaces were allowed to have private methods.\n"} +{"id": "Pony/src-random-dice-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26class Dice\n\"\"\"\nA simple dice roller.\n\"\"\"\nvar r: Random\n"} +{"id": "Pony/builtin-Integer-_54.txt", "contents": "\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n"} +{"id": "Pony/src-pony_check-randomness-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-array-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-FloatingPoint-_16.txt", "contents": "is undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box neg_unsafe()\n: A\n\nReturns\u00b6\n\nA\n\n\neq_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box eq_unsafe(\ny: box->A)\n: Bool val\n"} +{"id": "Pony/builtin-StdStream-_0.txt", "contents": "\n\n\n\n\n\n\nStdStream\u00b6\n[Source]\nAsynchronous access to stdout and stderr. The constructors are private to\nensure that access is provided only via an environment.\nactor tag StdStream\n\nPublic Behaviours\u00b6\nprint\u00b6\n[Source]\nPrint some bytes and insert a newline afterwards.\nbe print(\ndata: (String val | Array[U8 val] val))\n"} +{"id": "Pony/src-pony_bench-_runner-_10.txt", "contents": "_fail()\nend\n\nbe _run_iteration(n: U64 = 0, a: U64 = 0) =>\nif n == _aggregator.iterations then\n_complete(a)\nelse\ntry\n_bench.before_iteration()?\nlet s =\nifdef x86 then\nTime.perf_begin()\nelse\nTime.nanos()\nend\n_bench()?\nlet e =\nifdef x86 then\nTime.perf_end()\nelse"} +{"id": "Pony/combining-capabilities_2.txt", "contents": "\n```pony\nclass Foo\nvar x: String ref\n\nclass Bar\nfun f() =>\nvar y: Foo trn = get_foo_trn()\nvar z: String box = y.x\n```\n"} +{"id": "Pony/builtin-U64-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-files-file_caps-_0.txt", "contents": "\n\n\n\n\n\n\nfile_caps.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-ISize-_16.txt", "contents": "\n(ISize val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: ISize val)\n: (ISize val , Bool val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\nfldc\u00b6"} +{"id": "Pony/collections-HashSet-_4.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nvalue: box->A!\n\nReturns\u00b6\n\nBool val\n\n\nclear\u00b6\n[Source]\nRemove all elements from the set.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/time-Nanos-_0.txt", "contents": "\n\n\n\n\n\n\nNanos\u00b6\n[Source]\nCollection of utility functions for converting various durations of time\nto nanoseconds, for passing to other functions in the time package.\nprimitive val Nanos\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Nanos val^\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-vec-_18.txt", "contents": "\"\"\"\nReturn a vector with the i-th element changed, raising an error if the\nindex is out of bounds.\n\"\"\"\nif i < _tail_offset() then\nlet root = (_root as _VecNode[A]).update(_depth, i, value)?\n_create(root, _tail, _size, _depth)\nelse\nlet tail =\nrecover val _tail.clone() .> update(i - _tail_offset(), value)? end\n_create(_root, tail, _size, _depth)\nend\n\nfun val insert(i: USize, value: val->A): Vec[A] ? =>\n\"\"\"\nReturn a vector with an element inserted. Elements after this are moved\nup by one index, extending the vector. An out of bounds index raises an\nerror.\n\"\"\"\nif i >= _size then error end"} +{"id": "Pony/builtin-Array-_0.txt", "contents": "\n\n\n\n\n\n\nArray[A: A]\u00b6\n[Source]\nContiguous, resizable memory to store elements of type A.\nUsage\u00b6\nCreating an Array of String:\nlet array: Array[String] = [\"dog\"; \"cat\"; \"wombat\"]\n// array.size() == 3\n// array.space() >= 3\n\nCreating an empty Array of String, which may hold at least 10 elements before\nrequesting more space:\nlet array = Array[String](10)\n// array.size() == 0"} +{"id": "Pony/net-TCPConnection-_21.txt", "contents": "qty: USize val = 0\n\nReturns\u00b6\n\nNone val ?\n\n\nset_nodelay\u00b6\n[Source]\nTurn Nagle on/off. Defaults to on. This can only be set on a connected\nsocket.\nfun ref set_nodelay(\nstate: Bool val)\n: None val\n\nParameters\u00b6\n\nstate: Bool val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-array-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-builtin-real-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/collections-BinaryHeap-_3.txt", "contents": "Returns\u00b6\n\nthis->A ?\n\n\npush\u00b6\n[Source]\nPush an item into the heap.\nThe time complexity of this operation is O(log(n)) with respect to the size\nof the heap.\nfun ref push(\nvalue: A)\n: None val\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_453.txt", "contents": "fun box sctp_sack_rwnd_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sat_network_burst_incr\u00b6\n[Source]\nfun box sctp_sat_network_burst_incr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sat_network_min\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_26.txt", "contents": "None val\n\n\ntrim_in_place\u00b6\n[Source]\nTrim the array to a portion of itself, covering from until to.\nUnlike slice, the operation does not allocate a new array nor copy elements.\nfun ref trim_in_place(\nfrom: USize val = 0,\nto: USize val = call)\n: None val\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/builtin-Iterator-_4.txt", "contents": "This might error, which does not necessarily mean that the Iterator is exhausted.\nfun ref next()\n: A ?\n\nReturns\u00b6\n\nA ?\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-Sort-_3.txt", "contents": "a: A\n\nReturns\u00b6\n\nA^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Sort[A, B] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Sort[A, B] val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-builtin-float-_39.txt", "contents": "else\n@\"llvm.sqrt.f32\"(this)\nend\n\nfun sqrt_unsafe(): F32 =>\n\"\"\"\nUnsafe operation.\nIf this is negative, the result is undefined.\n\"\"\"\n@\"llvm.sqrt.f32\"(this)\n\nfun cbrt(): F32 => @cbrtf(this)\nfun exp(): F32 => @\"llvm.exp.f32\"(this)\nfun exp2(): F32 => @\"llvm.exp2.f32\"(this)\n\nfun cos(): F32 => @\"llvm.cos.f32\"(this)\nfun sin(): F32 => @\"llvm.sin.f32\"(this)\nfun tan(): F32 => @tanf(this)\n\nfun cosh(): F32 => @coshf(this)"} +{"id": "Pony/src-collections-list_node-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-itertools-iter-_94.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.map[I64]({(x) => x * x })\n```\n`1 4 9`\n\"\"\"\nmap_stateful[B]({(a: A!): B ? => f(a) ? })\n\nfun ref nth(n: USize): A ? =>\n\"\"\"\nReturn the nth value of the iterator.\n"} +{"id": "Pony/files-File-_0.txt", "contents": "\n\n\n\n\n\n\nFile\u00b6\n[Source]\nOperations on a file.\nclass ref File\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nAttempt to open for read/write, creating if it doesn't exist, preserving\nthe contents if it does exist.\nSet errno according to result.\nnew ref create(\nfrom: FilePath val)"} +{"id": "Pony/aliasing_2.txt", "contents": "```pony\nfun test(a: Wombat trn) =>\nvar b: Wombat box = a // Allowed!\n```\n\n__What about aliasing other stuff?__ For both `iso` and `trn`, the guarantees require that aliases must give up on some ability (reading and writing for `iso`, writing for `trn`). For the other capabilities (`ref`, `val`, `box` and `tag`), aliases allow for the same operations, so such a reference can just be aliased as itself.\n"} +{"id": "Pony/src-builtin-real-_64.txt", "contents": "If any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis /~ y\n\nfun fld_unsafe(y: A): A\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\n\nfun divrem_unsafe(y: A): (A, A) =>\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics."} +{"id": "Pony/src-itertools-iter-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991"} +{"id": "Pony/src-net-tcp_listener-_18.txt", "contents": "Listens for IPv4 connections.\n\"\"\"\n_limit = limit\n_notify = consume notify\n_event =\n@pony_os_listen_tcp4(this, host.cstring(), service.cstring())\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_fd = @pony_asio_event_fd(_event)\n_notify_listening()\n\nnew ip6(\nauth: TCPListenAuth,\nnotify: TCPListenNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nlimit: USize = 0,\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,"} +{"id": "Pony/src-promises-promise-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/pony_check-Generators-_34.txt", "contents": "\nReturns\u00b6\n\nGenerator[I16 val] box\n\n\ni32\u00b6\n[Source]\nCreate a generator for I32 values.\nfun box i32(\nmin: I32 val = call,\nmax: I32 val = call)\n: Generator[I32 val] box\n\nParameters\u00b6\n\nmin: I32 val = call\nmax: I32 val = call\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Vec-_5.txt", "contents": "Parameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nVec[A] val ?\n\n\nremove\u00b6\n[Source]\nReturn a vector with n elements removed, beginning at index i.\nfun val remove(\ni: USize val,\nn: USize val)\n: Vec[A] val ?\n\nParameters\u00b6\n\ni: USize val"} +{"id": "Pony/src-pony_check-generator-_55.txt", "contents": "1092\n1093\n1094\n1095\n1096\n1097\n1098\n1099\n1100\n1101\n1102\n1103\n1104\n1105\n1106\n1107\n1108\n1109\n1110\n1111"} +{"id": "Pony/net-OSSockOpt-_394.txt", "contents": "fun box sctp_idata()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_iforward_cum_tsn\u00b6\n[Source]\nfun box sctp_iforward_cum_tsn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_initiation\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_6.txt", "contents": "\nU32 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U32 val"} +{"id": "Pony/files-FileLink-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileLink val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-list-_80.txt", "contents": "acc: B)\n: B\n=>\n\"\"\"\nPrivate helper for `fold`, recursively working with `ListNode`s.\n\"\"\"\nlet nextAcc: B = try f(acc, ln()?) else consume acc end\nlet h = try\nln.next() as this->ListNode[A]\nelse\nreturn nextAcc\nend\n\n_fold[B](h, f, consume nextAcc)\n\nfun every(f: {(this->A!): Bool} box): Bool =>\n\"\"\"\nReturns `true` if every element satisfies the predicate, otherwise returns `false`.\n\n```pony"} +{"id": "Pony/process-ProcessNotify-_4.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nexpect\u00b6\n[Source]\nCalled when the process monitor has been told to expect a certain quantity\nof bytes. This allows nested notifiers to change the expected quantity,\nwhich allows a lower level protocol to handle any framing.\nfun ref expect(\nprocess: ProcessMonitor ref,\nqty: USize val)\n: USize val\n\nParameters\u00b6\n\nprocess: ProcessMonitor ref\nqty: USize val"} +{"id": "Pony/src-builtin-float-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-collections-hashable-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-net-ossockopt-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-pony_check-generator-_143.txt", "contents": "min: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for unicode strings\nfrom the basic multilingual plane only,\nwith a minimum length of `min` codepoints (default: 0)\nand a maximum length of `max` codepoints (default: 100).\n\nNote that the byte length of the generated string can be up to 4 times\nthe size in code points.\n\"\"\"\nlet range_1 = u32(0x0, 0xD7FF)\nlet range_1_size: USize = 0xD7FF\n// excluding surrogate pairs\n// this might be duplicate work but increases efficiency\nlet range_2 = u32(0xE000, 0xFFFF)\nlet range_2_size = U32(0xFFFF - 0xE000).usize()\n"} +{"id": "Pony/net-OSSockOpt-_365.txt", "contents": "fun box sctp_cookie_echoed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cookie_wait\u00b6\n[Source]\nfun box sctp_cookie_wait()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cwnd_logging_enable\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-HashSet-_7.txt", "contents": "Return a set with elements that are in either this or that, but not both.\nfun val op_xor(\nthat: (HashSet[A, H] val | Iterator[A] ref))\n: HashSet[A, H] val\n\nParameters\u00b6\n\nthat: (HashSet[A, H] val | Iterator[A] ref)\n\nReturns\u00b6\n\nHashSet[A, H] val\n\n\nwithout\u00b6\n[Source]\nReturn a set with the elements of this that are not in that.\nfun val without(\nthat: (HashSet[A, H] val | Iterator[A] ref))\n: HashSet[A, H] val"} +{"id": "Pony/net-OSSockOpt-_150.txt", "contents": "fun box ipv6_pmtudisc_probe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_want\u00b6\n[Source]\nfun box ipv6_pmtudisc_want()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_cga\u00b6\n[Source]"} +{"id": "Pony/builtin-DisposableActor-_0.txt", "contents": "\n\n\n\n\n\n\nDisposableActor\u00b6\n[Source]\nAn interface used to asynchronously dispose of an actor.\ninterface tag DisposableActor\n\nPublic Behaviours\u00b6\ndispose\u00b6\n[Source]\nbe dispose()\n\n\n\n"} +{"id": "Pony/builtin-ILong-_50.txt", "contents": "\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U64-_11.txt", "contents": "fun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/itertools-Iter-_21.txt", "contents": "Parameters\u00b6\n\nf: {(A!): Iterator[B] ?}[A, B] box\n\nReturns\u00b6\n\nIter[B] ref^\n\n\nfold[B: B]\u00b6\n[Source]\nApply a function to every element, producing an accumulated value.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.fold[I64](0, {(sum, x) => sum + x })\n\n6\nfun ref fold[B: B](\nacc: B,\nf: {(B, A!): B^}[A, B] box)"} +{"id": "Pony/4_traits-and-interfaces_8.txt", "contents": "```\n\nBoth `Bob` and `Larry` are in the category `HasName`. `Bob` because it has declared that it is a `HasName` and `Larry` because it is structurally a `HasName`.\n"} +{"id": "Pony/src-builtin-array-_51.txt", "contents": "# Usage\n\nCreating an Array of String:\n```pony\nlet array: Array[String] = [\"dog\"; \"cat\"; \"wombat\"]\n// array.size() == 3\n// array.space() >= 3\n```\n\nCreating an empty Array of String, which may hold at least 10 elements before\nrequesting more space:\n```pony\nlet array = Array[String](10)\n// array.size() == 0\n// array.space() >= 10\n```\n\nAccessing elements can be done via the `apply(i: USize): this->A ?` method.\nThe provided index might be out of bounds so `apply` is partial and has to be\ncalled within a try-catch block or inside another partial method:"} +{"id": "Pony/collections-Reverse-_0.txt", "contents": "\n\n\n\n\n\n\nReverse[optional A: (Real[A] val & (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val))]\u00b6\n[Source]\nProduces a decreasing range [max, min] with step dec, for any Number type.\n(i.e. the reverse of Range)\nExample program:\nuse \"collections\"\nactor Main\nnew create(env: Env) =>\nfor e in Reverse(10, 2, 2) do\nenv.out.print(e.string())\nend\n\nWhich outputs:"} +{"id": "Pony/0_at-a-glance_3.txt", "contents": "# What guarantees does Pony's type system give me?\n\nThe Pony type system offers a lot of guarantees, even more than other statically typed languages.\n\n* If your program compiles, it won't crash.\n* There will never be an unhandled exception.\n* There's no such thing as `null`, so your program will never try to dereference `null`.\n* There will never be a data race.\n* Your program will never deadlock.\n* Your code will always be capabilities-secure.\n* All message passing is\n[causal](https://courses.cs.vt.edu/~cs5204/fall00/causal.html). (Not **casual**!)\n\nSome of those will make sense right now. Some of them may not mean much to you yet (like capabilities-security and causal messaging), but we'll get to those concepts later on.\n\n__If I use Pony's FFI to call code written in another language, does Pony make the same guarantees for the code I call?__ Sadly, no. Pony's type system can only guarantee code written in Pony. Code written in other languages get only the guarantees provided by that language.\n\nPony requires FFI parameters to be explicitly declared as Pony types in advance. The type system provides a guarantee at compile-time that no code-paths exist that violate the definitions you provided on the Pony side of your FFI call.\n\nThis guarantee cannot be inclusive of foreign code as the compiler has no way to verify that it won't violate Pony's type system guarantees at runtime.\n"} +{"id": "Pony/src-pony_check-ascii_range-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60primitive ASCIINUL\nfun apply(): String => \"\\x00\"\n\nprimitive ASCIIDigits\nfun apply(): String => \"0123456789\"\n\nprimitive ASCIIWhiteSpace\nfun apply(): String => \" \\t\\n\\r\\x0b\\x0c\"\n\nprimitive ASCIIPunctuation\nfun apply(): String => \"!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\"\n"} +{"id": "Pony/4_control-structures_7.txt", "contents": "for name in [\"Bob\"; \"Fred\"; \"Sarah\"].values() do\nname\nend\nmatch x\n| let s: String => env.out.print(\"x is \" + s)\n| None => env.out.print(\"x is None\")\nend\n```\n\nThis will give __x__ the value \"Sarah\" as it is the last name in our list. If our loop has 0 iterations, then the value of its `else` block will be the value of __x__. Or if there is no `else` block, the value will be `None`.\n\n```pony\nactor Main\nnew create(env: Env) =>\nvar x: (String | None) =\nfor name in Array[String].values() do\nname\nend\nmatch x\n| let s: String => env.out.print(\"x is \" + s)"} +{"id": "Pony/src-collections-persistent-map-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-cli-command_parser-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-collections-list-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/builtin-U8-_31.txt", "contents": "fun box sub_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/src-itertools-iter-_110.txt", "contents": "### Example\n\n```pony\nIter[USize]([as USize: 1; 2; 1; 1; 3; 4; 1].values())\n.unique()\n```\n`1 2 3 4`\n\"\"\"\nIter[A!](\nobject\nlet _set: HashSet[A!, H] = HashSet[A!, H]()\n\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): A! ? =>\nlet v = _iter.next()?\nif _set.contains(v) then\nnext()?\nelse"} +{"id": "Pony/pony_check-Generators-_32.txt", "contents": "Parameters\u00b6\n\nmin: ULong val = call\nmax: ULong val = call\n\nReturns\u00b6\n\nGenerator[ULong val] box\n\n\ni8\u00b6\n[Source]\nCreate a generator for I8 values.\nfun box i8(\nmin: I8 val = call,\nmax: I8 val = call)\n: Generator[I8 val] box\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-USize-_12.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\n(USize val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/files-File-_1.txt", "contents": ": File ref^\n\nParameters\u00b6\n\nfrom: FilePath val\n\nReturns\u00b6\n\nFile ref^\n\n\nopen\u00b6\n[Source]\nOpen for read only.\nSet _errno according to result.\nnew ref open(\nfrom: FilePath val)\n: File ref^\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_97.txt", "contents": "Create a generator for `Set` filled with values\nof the given generator `gen`.\nThe returned sets will have a size up to `max`,\nbut tend to have fewer than `max`\ndepending on the source generator `gen`.\n\nE.g. if the given generator is for `U8` values and `max` is set to 1024,\nthe set will only ever be of size 256 max.\n\nAlso for efficiency purposes and to not loop forever,\nthis generator will only try to add at most `max` values to the set.\nIf there are duplicates, the set won't grow.\n\"\"\"\nGenerator[Set[T]](\nobject is GenObj[Set[T]]\nlet _gen: GenObj[T] = gen\nfun generate(rnd: Randomness): GenerateResult[Set[T]] =>\nlet size = rnd.usize(0, max)\nlet result: Set[T] =\nSet[T].create(size).>union("} +{"id": "Pony/src-net-tcp_listener-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/net-OSSockOpt-_155.txt", "contents": "fun box ipv6_priority_11()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_12\u00b6\n[Source]\nfun box ipv6_priority_12()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_13\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_437.txt", "contents": "fun box sctp_pcb_flags_udptype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_unbound\u00b6\n[Source]\nfun box sctp_pcb_flags_unbound()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_wakeinput\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_0.txt", "contents": "\n\n\n\n\n\n\nsigned.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_check-int_properties-_0.txt", "contents": "\n\n\n\n\n\n\nint_properties.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/callbacks_5.txt", "contents": "# An example\n\nConsider SQLite, mentioned earlier. When the client code calls `sqlite3_exec`, an SQL query is executed against a database, and the callback function is called for each row returned by the SQL statement. Here's the signature for `sqlite3_exec`:\n\n```c\ntypedef int (*sqlite3_callback)(void*,int,char**, char**);\n\n...\n\nSQLITE_API int SQLITE_STDCALL sqlite3_exec(\nsqlite3 *db, /* The database on which the SQL executes */\nconst char *zSql, /* The SQL to be executed */\nsqlite3_callback xCallback, /* Invoke this callback routine */\nvoid *pArg, /* First argument to xCallback() */\nchar **pzErrMsg /* Write error messages here */\n)\n{\n...\nxCallback(pArg, nCol, azVals, azCols)\n..."} +{"id": "Pony/src-itertools-iter-_63.txt", "contents": "Allows stateful modification to the stream of elements from an iterator,\nsimilar to `filter_map`.\n\"\"\"\nIter[B](\nobject is Iterator[B]\nvar _next: (B | _None) = _None\n\nfun ref _find_next() =>\ntry\nmatch _next\n| _None =>\nif _iter.has_next() then\nmatch f(_iter.next()?)?\n| let b: B => _next = consume b\n| None => _find_next()\nend\nend\nend\nend\n"} +{"id": "Pony/net-OSSockOpt-_193.txt", "contents": "fun box ip_bindany()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_bindmulti\u00b6\n[Source]\nfun box ip_bindmulti()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_bind_address_no_port\u00b6\n[Source]"} +{"id": "Pony/random-MT-_3.txt", "contents": "\nu8\u00b6\nfun ref u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6"} +{"id": "Pony/src-net-tcp_connection-_101.txt", "contents": "\nbe _read_again() =>\n\"\"\"\nResume reading.\n\"\"\"\n_pending_reads()\n\nfun ref write_final(data: ByteSeq) =>\n\"\"\"\nWrite as much as possible to the socket. Set `_writeable` to `false` if not\neverything was written. On an error, close the connection. This is for data\nthat has already been transformed by the notifier. Data will be silently\ndiscarded if the connection has not yet been established though.\n\"\"\"\n// don't sent 0 byte payloads; windows doesn't like it (and it's wasteful)\nif data.size() == 0 then\nreturn\nend\n\nif _connected and not _closed then"} +{"id": "Pony/src-builtin-array-_68.txt", "contents": "\"\"\"\nif i < _size then\n_ptr._update(i, consume value)\nelse\nerror\nend\n\nfun ref insert(i: USize, value: A) ? =>\n\"\"\"\nInsert an element into the array. Elements after this are moved up by one\nindex, extending the array.\n\nWhen inserting right beyond the last element, at index `this.size()`,\nthe element will be appended, similar to `push()`,\nan insert at index `0` prepends the value to the array.\nAn insert into an index beyond `this.size()` raises an error.\n\n```pony\nlet array = Array[U8](4) // []\narray.insert(0, 0xDE)? // prepend: [0xDE]"} +{"id": "Pony/src-signals-sig-_10.txt", "contents": "end\n\nfun trap(): U32 =>\nifdef linux or bsd or osx then 5\nelse compile_error \"no SIGTRAP\"\nend\n\nfun abrt(): U32 => 6\n\nfun emt(): U32 =>\nifdef bsd or osx then 7\nelse compile_error \"no SIGEMT\"\nend\n\nfun fpe(): U32 =>\nifdef linux or bsd or osx then 8\nelse compile_error \"no SIGFPE\"\nend\n\nfun kill(): U32 => 9"} +{"id": "Pony/src-format-align-_0.txt", "contents": "\n\n\n\n\n\n\nalign.pony\n\n1\n2\n3\n4\n5\n6\n7\n8primitive AlignLeft\nprimitive AlignRight\nprimitive AlignCenter\n"} +{"id": "Pony/builtin-Stdin-_2.txt", "contents": "notify: (InputNotify iso | None val),\nchunk_size: USize val = 32)\n\nParameters\u00b6\n\nnotify: (InputNotify iso | None val)\nchunk_size: USize val = 32\n\n\ndispose\u00b6\n[Source]\nClear the notifier in order to shut down input.\nbe dispose()\n\n\n\n\n\n\n"} +{"id": "Pony/capsicum-Cap-_1.txt", "contents": "Cap val^\n\n\nPublic Functions\u00b6\nenter\u00b6\n[Source]\nThis places the current process into capability mode, a mode of execution\nin which processes may only issue system calls operating on file\ndescriptors or reading limited global system state. Access to global name\nspaces, such as file system or IPC name spaces, is prevented.\nfun box enter()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nread\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_484.txt", "contents": "fun box so_debug()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_detach_bpf\u00b6\n[Source]\nfun box so_detach_bpf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_detach_filter\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/buffered-Writer-_19.txt", "contents": "\nNone val\n\n\nu128_le\u00b6\n[Source]\nWrite a U128 to the buffer in little-endian byte order.\nfun ref u128_le(\ndata: U128 val)\n: None val\n\nParameters\u00b6\n\ndata: U128 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/builtin-U64-_8.txt", "contents": "fun box ctz_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_36.txt", "contents": "fun box op_or(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I8-_34.txt", "contents": "fun box op_or(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-float-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-files-file-_35.txt", "contents": "use @pony_os_errno[I32]()\n\nuse \"collections\"\n\nprimitive FileOK\nprimitive FileError\nprimitive FileEOF\nprimitive FileBadFileNumber\nprimitive FileExists\nprimitive FilePermissionDenied\n\nprimitive _EBADF\nfun apply(): I32 => 9\n\nprimitive _EEXIST\nfun apply(): I32 => 17\n\nprimitive _EACCES\nfun apply(): I32 => 13\n"} +{"id": "Pony/net-OSSockOpt-_541.txt", "contents": "fun box tcpf_ca_cwr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpf_ca_disorder\u00b6\n[Source]\nfun box tcpf_ca_disorder()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpf_ca_loss\u00b6\n[Source]"} +{"id": "Pony/calling-c_4.txt", "contents": "let size: USize = // ...\n// ...\n@memcpy(out, addressof ptr, size.bitwidth() / 8)\n@memcpy(outlen, addressof size, 1)\n```\n\nWhen dealing with `void*` return types from C, it is good practice to try to narrow the type down to the most specific Pony type that you expect to receive. In the example above, we chose `Pointer[U8]` as the return type, since we can use such a pointer to construct Pony Arrays and Strings.\n\nTo pass pointers to values to C the `addressof` operator can be used (previously `&`), just like taking an address in C. This is done in the standard library to pass the address of a `U32` to an FFI function that takes a `int*` as an out parameter:\n\n```pony\nuse @frexp[F64](value: F64, exponent: Pointer[U32])\n// ...\nvar exponent: U32 = 0\nvar mantissa = @frexp(this, addressof exponent)\n```\n"} +{"id": "Pony/net-OSSockOpt-_7.txt", "contents": "fun box ipproto_beetph()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_bha\u00b6\n[Source]\nfun box ipproto_bha()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_blt\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/builtin-String-_1.txt", "contents": "// make a reversed version\nlet str_reversed = str.reverse()\n\n// add \" world\" to the end of our original string\nlet str_new = str.add(\" world\")\n\n// count occurrences of letter \"l\"\nlet count = str_new.count(\"l\")\n\n// find first occurrence of letter \"w\"\nlet first_w = str_new.find(\"w\") ?\n// find first occurrence of letter \"d\"\nlet first_d = str_new.find(\"d\") ?\n\n// get substring capturing \"world\"\nlet substr = str_new.substring(first_w, first_d+1)\n// clone substring\nlet substr_clone = substr.clone()\n\n// print our substr"} +{"id": "Pony/src-files-directory-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-bureaucracy-registrar-_4.txt", "contents": "if _registry(key)? is value then\n_registry.remove(key)?\nend\nend\n\nfun tag apply[A: Any tag = Any tag](key: String): Promise[A] =>\n\"\"\"\nLookup by name. Returns a promise that will be fulfilled with the mapped\nvalue if it exists and is a subtype of A. Otherwise, the promise will be\nrejected.\n\"\"\"\nlet promise = Promise[A]\n_fetch[A](key, promise)\npromise\n\nbe _fetch[A: Any tag](key: String, promise: Promise[A]) =>\n\"\"\"\nFulfills or rejects the promise.\n\"\"\"\ntry"} +{"id": "Pony/net-NoProxy-_0.txt", "contents": "\n\n\n\n\n\n\nNoProxy\u00b6\n[Source]\nDefault implementation of a proxy that does not alter the supplied TCPConnectionNotify.\nactor MyClient\nnew create(host: String, service: String, proxy: Proxy = NoProxy) =>\nlet conn: TCPConnection = TCPConnection.create(\nTCPConnectAuth(env.root),\nproxy.apply(MyConnectionNotify.create()),\n\"localhost\",\n\"80\")\n\nclass val NoProxy is\nProxy ref"} +{"id": "Pony/src-builtin-string-_176.txt", "contents": "(3, 0xEF, 0xBF, 0xBD, 0)\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/itertools-Iter-_32.txt", "contents": "\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n\nIter[A] ref^\n\n\nskip_while\u00b6\n[Source]\nSkip values of the iterator while the predicate f returns true.\nExample\u00b6\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.skip_while({(x) => x < 4 })\n\n4 5 6\nfun ref skip_while(\nf: {(A!): Bool ?}[A] box)"} +{"id": "Pony/builtin-I128-_39.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nop_and\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/net-OSSockOpt-_397.txt", "contents": "fun box sctp_i_want_mapped_v4_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_last_packet_tracing\u00b6\n[Source]\nfun box sctp_last_packet_tracing()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_listen\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_522.txt", "contents": "fun box so_sco_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_security_authentication\u00b6\n[Source]\nfun box so_security_authentication()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_security_encryption_network\u00b6\n[Source]"} +{"id": "Pony/src-files-file-_40.txt", "contents": "flags = flags or @ponyint_o_creat() or @ponyint_o_trunc()\nend\nend\n\n_fd = ifdef windows then\n@_open(path.path.cstring(), flags, mode.i32())\nelse\n@open(path.path.cstring(), flags, mode)\nend\n\nif _fd == -1 then\n_errno = _get_error()\nelse\ntry\n_FileDes.set_rights(_fd, path, writeable)?\nelse\n_errno = FileError\nend\nend\nend"} +{"id": "Pony/files-FileLookup-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-path-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-net-tcp_connection-_55.txt", "contents": "1092\n1093\n1094\n1095\n1096\n1097\n1098\n1099\n1100\n1101\n1102\n1103\n1104\n1105\n1106\n1107\n1108\n1109\n1110\n1111"} +{"id": "Pony/src-net-tcp_connection_notify-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-itertools-iter-_50.txt", "contents": "992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011"} +{"id": "Pony/src-builtin-string-_92.txt", "contents": "_alloc = data.space()\n_ptr = (consume data).cpointer()._unsafe()\nif _alloc > _size then\n_set(_size, 0)\nend\n\nnew from_cpointer(str: Pointer[U8], len: USize, alloc: USize = 0) =>\n\"\"\"\nReturn a string from binary pointer data without making a\ncopy. This must be done only with C-FFI functions that return\npony_alloc'd character arrays. If a null pointer is given then an\nempty string is returned.\n\"\"\"\nif str.is_null() then\n_size = 0\n_alloc = 1\n_ptr = Pointer[U8]._alloc(_alloc)\n_set(0, 0)\nelse\n_size = len"} +{"id": "Pony/src-pony_check-property_helper-_35.txt", "contents": "loc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the 2 given expressions are not equal.\n\"\"\"\nif not_expect == actual then\n_fail(_fmt_msg(loc, \"Assert ne failed. \" + msg\n+ \" Expected (\" + not_expect.string() + \") != (\" + actual.string()\n+ \")\"))\nreturn false\nend\n\n_runner.log(\n_fmt_msg(loc, \"Assert ne passed. \" + msg\n+ \" Got (\" + not_expect.string() + \") != (\" + actual.string() + \")\"),\ntrue)\ntrue\n\nfun assert_array_eq[A: (Equatable[A] #read & Stringable #read)]("} +{"id": "Pony/net-OSSockOpt-_6.txt", "contents": "fun box ipproto_argus()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ax25\u00b6\n[Source]\nfun box ipproto_ax25()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_beetph\u00b6\n[Source]"} +{"id": "Pony/4_control-structures_4.txt", "contents": "\n__Why can't I just say \"else if\" like I do in C? Why the extra keyword?__ The relationship between `if` and `else` in C, and other similar languages, is ambiguous. For example:\n\n```c\n// C code\nif(a)\nif(b)\nprintf(\"a and b\\n\");\nelse\nprintf(\"not a\\n\");\n```\n\nHere it is not obvious whether the `else` is an alternative to the first or the second `if`. In fact here the `else` relates to the `if(b)` so our example contains a bug. Pony avoids this type of bug by handling `if` and `else` differently and the need for `elseif` comes out of that.\n"} +{"id": "Pony/src-files-file-_49.txt", "contents": "Returns false and closes the file if not all the bytes were written.\n\"\"\"\nqueue(data)\n\n_pending_writes()\n\nfun ref writev(data: ByteSeqIter box): Bool =>\n\"\"\"\nWrite an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\nqueue(bytes)\nend\n\n_pending_writes()\n\nfun ref queue(data: ByteSeq box) =>\n\"\"\"\nQueue data to be written\nNOTE: Queue'd data will always be written before normal print/write"} +{"id": "Pony/process-WaitpidError-_0.txt", "contents": "\n\n\n\n\n\n\nWaitpidError\u00b6\n[Source]\nprimitive val WaitpidError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: WaitpidError val^\n\nReturns\u00b6\n\nWaitpidError val^"} +{"id": "Pony/net-OSSockOpt-_293.txt", "contents": "fun box rds_cmsg_atomic_cswp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_atomic_fadd\u00b6\n[Source]\nfun box rds_cmsg_atomic_fadd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_cong_update\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_13.txt", "contents": "\nISize val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: ISize val)\n: (ISize val , Bool val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\nsubc\u00b6"} +{"id": "Pony/net-OSSockOpt-_623.txt", "contents": "fun box so_rcvtimeo_old()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvtimeo_new\u00b6\n[Source]\nfun box so_rcvtimeo_new()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndtimeo_old\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_121.txt", "contents": "fun box ipport_ephemerallast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_hifirstauto\u00b6\n[Source]\nfun box ipport_hifirstauto()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_hilastauto\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_36.txt", "contents": "_start_next_read()\n\nnew ip6(\nauth: UDPAuth,\nnotify: UDPNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nsize: USize = 1024)\n=>\n\"\"\"\nListens for IPv6 datagrams.\n\"\"\"\n_notify = consume notify\n_event =\n@pony_os_listen_udp6(this, host.cstring(), service.cstring())\n_fd = @pony_asio_event_fd(_event)\n@pony_os_sockname(_fd, _ip)\n_packet_size = size\n_read_buf = recover Array[U8] .> undefined(size) end\n_notify_listening()"} +{"id": "Pony/builtin-U8-_45.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: U8 val)\n: Bool val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_221.txt", "contents": "fun box ip_old_fw_add()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_del\u00b6\n[Source]\nfun box ip_old_fw_del()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_flush\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_39.txt", "contents": "\nbe fail_action(name: String, round: _Round, ph: PropertyHelper) =>\nif round != this._current_round then\n_logger.log(\"unexpected fail action \\\"\" + name + \"\\\" msg for \" + round.string() +\n\". Currently at \" + this._current_round.string(), true)\nreturn\nend\n_logger.log(\"Action failed: \" + name)\n_finish_action(name, false, round, ph)\n\nfun ref _finish_action(name: String, success: Bool, round: _Round, ph: PropertyHelper) =>\ntry\n_expected_actions.extract(name)?\n\n// call back into the helper to invoke the current run_notify\n// that we don't have access to otherwise\nif not success then\nph.complete(false)\nelseif _expected_actions.size() == 0 then\nph.complete(true)"} +{"id": "Pony/collections-persistent-Nil-_17.txt", "contents": "fun box take_while(\nf: {(val->A): Bool}[A] box)\n: Nil[A] val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nNil[A] val\n\n\ncontains[optional T: (A & HasEq[A!] #read)]\u00b6\n[Source]\nfun val contains[optional T: (A & HasEq[A!] #read)](\na: val->T)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-USize-_35.txt", "contents": "USize val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/format-FormatHexBare-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatHexBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexBare val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-builtin-real-_66.txt", "contents": "fun neg_unsafe(): A =>\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\n-~this\n\nfun eq_unsafe(y: box->A): Bool =>\n\"\"\"\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis ==~ y\n\nfun ne_unsafe(y: box->A): Bool =>\n\"\"\""} +{"id": "Pony/pony_check-PropertyHelper-_21.txt", "contents": "\ndisposable: DisposableActor tag\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/serialise--index-_0.txt", "contents": "\n\n\n\n\n\n\nSerialise package\u00b6\nThis package provides support for serialising and deserialising arbitrary data\nstructures.\nThe API is designed to require capability tokens, as otherwise serialising\nwould leak the bit patterns of all private information in a type if the\nresulting Array[U8] could be examined.\nDeserialisation is fundamentally unsafe currently: there isn't yet a\nverification pass to check that the resulting object graph maintains a\nwell-formed heap or that individual objects maintain any expected local\ninvariants. However, if only \"trusted\" data (i.e. data produced by Pony\nserialisation from the same binary) is deserialised, it will always maintain a\nwell-formed heap and all object invariants.\nNote that serialised data is not usable between different Pony binaries. This is"} +{"id": "Pony/time-Timers-_3.txt", "contents": "\n\ndispose\u00b6\n[Source]\nDispose of this set of timing wheels.\nbe dispose()\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-FloatingPoint-_39.txt", "contents": "fun box acosh()\n: A\n\nReturns\u00b6\n\nA\n\n\nasinh\u00b6\n[Source]\nfun box asinh()\n: A\n\nReturns\u00b6\n\nA\n\n\natanh\u00b6\n[Source]"} +{"id": "Pony/src-collections-flag-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-term-ansi-_22.txt", "contents": "\nfun blue(): String =>\n\"\"\"\nBlue text.\n\"\"\"\n\"\\x1B[34m\"\n\nfun magenta(): String =>\n\"\"\"\nMagenta text.\n\"\"\"\n\"\\x1B[35m\"\n\nfun cyan(): String =>\n\"\"\"\nCyan text.\n\"\"\"\n\"\\x1B[36m\"\n\nfun grey(): String =>"} +{"id": "Pony/src-pony_bench-_runner-_16.txt", "contents": "new val _create(run_async: _RunAsync, f: {(U64)} val) =>\n_run_async = run_async\n_f = f\n\nfun complete() =>\nlet e = Time.nanos()\n_f(e)\n\nfun fail() =>\n_run_async._fail()\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-capsicum-cap_rights-_10.txt", "contents": "if caps(FileTime) then set(Cap.futimes()) end\nif caps(FileTruncate) then set(Cap.ftruncate()) end\nif caps(FileWrite) then set(Cap.write()) end\nif caps(FileExec) then set(Cap.fexecve()) end\n\nnew descriptor(fd: I32) =>\n\"\"\"\nInitialises with the rights on the given file descriptor.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@__cap_rights_get(_version(), fd, addressof _r0)\nend\n\nfun ref set(cap: U64) =>\nifdef freebsd or \"capsicum\" then\n@__cap_rights_set(addressof _r0, cap, U64(0))\nend\n\nfun ref unset(cap: U64) =>\nifdef freebsd or \"capsicum\" then"} +{"id": "Pony/net-OSSockOpt-_273.txt", "contents": "fun box netlink_connector()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_crypto\u00b6\n[Source]\nfun box netlink_crypto()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_dnrtmsg\u00b6\n[Source]"} +{"id": "Pony/pony_check-Property3-_4.txt", "contents": "A method verifying that a certain property holds for all given\narg1,arg2, and arg3\nwith the help of PropertyHelper h.\nfun ref property3(\narg1: T1,\narg2: T2,\narg3: T3,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\narg1: T1\narg2: T2\narg3: T3\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?"} +{"id": "Pony/derived-authority_0.txt", "contents": "# Delegating and restricting authority\n\nAny interesting program will need to interact with the outside world, like accessing the network or the file system, or by creating and communicating with other programs. We call __ambient authority__ all those rights implicitly granted to the program to make these things possible, and because Pony makes this concept *explicit*, we need to take the time to talk about what it means and how it works. In other languages like for example C, you can always attempt to do an operation like I/O, and it will usually succeed save some runtime checks (your disk being full might make an operation fail, for example). But in Pony, any piece of code interacting with the outside world needs the authority to do so.\n\nThe operating system essentially knows nothing about the structure of any program it runs, in particular it is ignorant of any Pony specific concepts. In order to impose that some code is authorized for an operation like writing to disk, Pony requires a special argument to be passed, a capability bearing the authority required for the task at hand. The type system guarantees that inadequate capabilities for a task fail at compile time.\n\nRecall the definition of capability from the [Object Capabilities](/object-capabilities/object-capabilities.md) section:\n\n> A capability is an unforgeable token that (a) designates an object and (b) gives the program the authority to perform a specific set of actions on that object.\n\nIn Pony, the `Main` actor is created with an `Env` object, which holds the unforgeable `AmbientAuth` token in its root field. This value is the capability that represents the ambient authority given to us by the system.\n\nHere is a program that connects to example.com via TCP on port 80 and quits:\n\n```pony\nuse \"net\"\n\nclass MyTCPConnectionNotify is TCPConnectionNotify\nlet _out: OutStream\n"} +{"id": "Pony/builtin-UnsignedInteger-_16.txt", "contents": "fun box ctz()\n: A\n\nReturns\u00b6\n\nA\n\n\nclz_unsafe\u00b6\n[Source]\nCount leading zeroes.\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/builtin-I32-_15.txt", "contents": "fun box mulc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/pony_bench-PonyBench-_0.txt", "contents": "\n\n\n\n\n\n\nPonyBench\u00b6\n[Source]\nactor tag PonyBench\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew tag create(\nenv: Env val,\nlist: BenchmarkList tag)\n: PonyBench tag^\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-seq-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-persistent-vec-_26.txt", "contents": "vec\n\nfun val reverse(): Vec[A] =>\n\"\"\"\nReturn a vector with the elements in reverse order.\n\"\"\"\nvar vec = Vec[A]\nfor i in mut.Reverse(_size - 1, 0) do\ntry vec = vec.push(this(i)?) end\nend\nvec\n\nfun val keys(): VecKeys[A]^ =>\n\"\"\"\nReturn an iterator over the indices in the vector.\n\"\"\"\nVecKeys[A](this)\n\nfun val values(): VecValues[A]^ =>\n\"\"\""} +{"id": "Pony/cli-OptionSpec-_2.txt", "contents": "\n\nstring\u00b6\n[Source]\nCreates an Option with a String typed value that can be used like\n--file=dir/filename or -F=dir/filename or -Fdir/filename\nto yield an option value like\ncmd.option(\"file\").string() == \"dir/filename\".\nnew val string(\nname': String val,\ndescr': String val = \"\",\nshort': (U8 val | None val) = reference,\ndefault': (String val | None val) = reference)\n: OptionSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference"} +{"id": "Pony/src-term-ansi-_20.txt", "contents": "\"\"\"\nUnderlined text. Does nothing on Windows.\n\"\"\"\nif state then \"\\x1B[4m\" else \"\\x1B[24m\" end\n\nfun blink(state: Bool = true): String =>\n\"\"\"\nBlinking text. Does nothing on Windows.\n\"\"\"\nif state then \"\\x1B[5m\" else \"\\x1B[25m\" end\n\nfun reverse(state: Bool = true): String =>\n\"\"\"\nSwap foreground and background colour.\n\"\"\"\nif state then \"\\x1B[7m\" else \"\\x1B[27m\" end\n\nfun black(): String =>\n\"\"\"\nBlack text."} +{"id": "Pony/net-OSSockOpt-_301.txt", "contents": "fun box rds_info_connections()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_connection_flag_connected\u00b6\n[Source]\nfun box rds_info_connection_flag_connected()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_connection_flag_connecting\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_622.txt", "contents": "fun box udp_no_check6_tx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_vendor\u00b6\n[Source]\nfun box udp_vendor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvtimeo_old\u00b6\n[Source]"} +{"id": "Pony/pony_bench-BenchConfig-_1.txt", "contents": "\nParameters\u00b6\n\nsamples': USize val = 20\nmax_iterations': U64 val = 1000000000\nmax_sample_time': U64 val = 100000000\n\nReturns\u00b6\n\nBenchConfig val^\n\n\nPublic fields\u00b6\nlet samples: USize val\u00b6\n[Source]\nTotal number of samples to be measured. (Default: 20)\n\nlet max_iterations: U64 val\u00b6\n[Source]\nMaximum number of iterations to execute per sample. (Default: 1_000_000_000)"} +{"id": "Pony/src-builtin-array-_71.txt", "contents": "let last = _size.min(to)\nlet offset = last.min(from)\nlet size' = last - offset\n\n// use the new size' for alloc if we're not including the last used byte\n// from the original data and only include the extra allocated bytes if\n// we're including the last byte.\n_alloc = if last == _size then _alloc - offset else size' end\n\n_size = size'\n\n// if _alloc == 0 then we've trimmed all the memory originally allocated.\n// if we do _ptr._offset, we will spill into memory not allocated/owned\n// by this array and could potentially cause a segfault if we cross\n// a pagemap boundary into a pagemap address that hasn't been allocated\n// yet when `reserve` is called next.\nif _alloc == 0 then\n_ptr = Pointer[A]\nelse\n_ptr = _ptr._offset(offset)"} +{"id": "Pony/builtin-F64-_69.txt", "contents": "Parameters\u00b6\n\nthat: F64 val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U128-_12.txt", "contents": "fun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_346.txt", "contents": "fun box sctp_cause_nat_missing_state()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_no_error\u00b6\n[Source]\nfun box sctp_cause_no_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_no_user_data\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-ascii_range-_0.txt", "contents": "\n\n\n\n\n\n\nascii_range.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_579.txt", "contents": "fun box tcp_maxwin()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_max_sack\u00b6\n[Source]\nfun box tcp_max_sack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_max_winshift\u00b6\n[Source]"} +{"id": "Pony/2_ops_2.txt", "contents": "# Operator aliasing\n\nMost infix operators in Pony are actually aliases for functions. The left operand is the receiver the function is called on and the right operand is passed as an argument. For example, the following expressions are equivalent:\n\n```pony\nx + y\nx.add(y)\n```\n\nThis means that `+` is not a special symbol that can only be applied to magic types. Any type can provide its own `add` function and the programmer can then use `+` with that type if they want to.\n\nWhen defining your own `add` function there is no restriction on the types of the parameter or the return type. The right side of the `+` will have to match the parameter type and the whole `+` expression will have the type that `add` returns.\n\nHere's a full example for defining a type which allows the use of `+`. This is all you need:\n\n```pony\n// Define a suitable type\nclass Pair\nvar _x: U32 = 0\nvar _y: U32 = 0"} +{"id": "Pony/term-EraseLeft-_2.txt", "contents": "fun box ne(\nthat: EraseLeft val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseLeft val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/error-messages_4.txt", "contents": "To understand this error message, you have to have some background. The field `color` is mutable since it is declared with `var`, but the method `dye` does not have an explicit receiver reference capability. The default receiver reference capability is `box`, which allows `dye` to be called on any mutable or immutable `Wombat`; the `box` reference capability says that the method may read from but not write to the receiver. As a result, it is illegal to attempt to modify the receiver in the method.\n\nTo fix the error, you would need to give the `dye` method a mutable reference capability, such as `ref`: `fun ref dye(new_color: String) => ...`.\n"} +{"id": "Pony/builtin-Real-_6.txt", "contents": "A\n\n\ndiv\u00b6\n[Source]\nInteger division, rounded towards zero.\nfun box div(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndivrem\u00b6"} +{"id": "Pony/src-builtin-array-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-cli-command_spec-_41.txt", "contents": "to yield an option value like\n`cmd.option(\"ratio\").f64() == F64(1.039)`.\n\"\"\"\n_name = name'\n_descr = descr'\n_short = short'\n(_typ, _default, _required) = _init(_F64Type, default')\n\nnew val string_seq(\nname': String,\ndescr': String = \"\",\nshort': (U8 | None) = None)\n=>\n\"\"\"\nCreates an Option with a ReadSeq[String] typed value that can be used like\n`--files=file1 --files=files2 --files=files2`\nto yield a sequence of three strings equivalent to\n`cmd.option(\"ratio\").string_seq() (equiv) [\"file1\"; \"file2\"; \"file3\"]`.\n\"\"\"\n_name = name'"} +{"id": "Pony/src-builtin-unsigned-_75.txt", "contents": "end\n\nfun mulc(y: USize): (USize, Bool) =>\nifdef ilp32 then\n(let r, let o) =\n@\"llvm.umul.with.overflow.i32\"(this.u32(), y.u32())\n(r.usize(), o)\nelse\n(let r, let o) =\n@\"llvm.umul.with.overflow.i64\"(this.u64(), y.u64())\n(r.usize(), o)\nend\n\nfun divc(y: USize): (USize, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[USize](this, y)\n\nfun remc(y: USize): (USize, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[USize](this, y)\n\nfun add_partial(y: USize): USize ? =>"} +{"id": "Pony/src-pony_bench-_runner-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-time-posix_date-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59use @ponyint_gmtime[None](date: PosixDate, sec: I64, nsec: I64)\nuse @ponyint_timegm[I64](date: PosixDate tag)\nuse @ponyint_formattime[Pointer[U8]](date: PosixDate tag, fmt: Pointer[U8] tag) ?\n\nclass PosixDate\n\"\"\"\nRepresents a proleptic Gregorian date and time, without specifying a\ntime zone. The day of month, month, day of week, and day of year are all\nindexed from 1, i.e. January is 1, Monday is 1.\n\"\"\"\nvar nsec: I32 = 0\nvar sec: I32 = 0\nvar min: I32 = 0"} +{"id": "Pony/net-OSSockOpt-_560.txt", "contents": "fun box tcpopt_pad()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_sack\u00b6\n[Source]\nfun box tcpopt_sack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_sack_hdr\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_66.txt", "contents": "ifdef ilp32 or llp64 then\n@\"llvm.cttz.i32\"(this.u32(), false).ulong()\nelse\n@\"llvm.cttz.i64\"(this.u64(), true).ulong()\nend\n\nfun bitwidth(): ULong => ifdef ilp32 or llp64 then 32 else 64 end\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: ULong): ULong => if this < y then this else y end\nfun max(y: ULong): ULong => if this > y then this else y end\n\nfun hash(): USize =>\nifdef ilp32 or llp64 then\nu32().hash()\nelse\nu64().hash()\nend\n"} +{"id": "Pony/files-File-_18.txt", "contents": "chmod\u00b6\n[Source]\nSet the FileMode for this directory.\nfun box chmod(\nmode: FileMode box)\n: Bool val\n\nParameters\u00b6\n\nmode: FileMode box\n\nReturns\u00b6\n\nBool val\n\n\nchown\u00b6\n[Source]\nSet the owner and group for this directory. Does nothing on Windows.\nfun box chown("} +{"id": "Pony/files-FileMode-_2.txt", "contents": "var owner_read: Bool val\u00b6\n[Source]\ntrue if the owning user can read the file.\n\nvar owner_write: Bool val\u00b6\n[Source]\ntrue if the owning user can write to the file.\n\nvar owner_exec: Bool val\u00b6\n[Source]\ntrue if the owning user can execute the file.\n\nvar group_read: Bool val\u00b6\n[Source]\ntrue if members of the owning group can read the file.\n\nvar group_write: Bool val\u00b6\n[Source]\ntrue if members of the owning group can write to the file.\n"} +{"id": "Pony/builtin-I16-_22.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: I16 val)\n: (I16 val , I16 val) ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/recovering-capabilities_4.txt", "contents": "```pony\nlet key = recover val line.substring(0, i).>strip() end\n```\n\nThat's from `net/http/_PayloadBuilder`. We get a substring of `line`, which is a `String iso^`, then we call strip on it, which returns itself. But since strip is a `ref` function, it returns itself as a `String ref^` - so we use a `recover val` to end up with a `String val`.\n"} +{"id": "Pony/builtin-F32-_46.txt", "contents": "\n\ngt_unsafe\u00b6\nfun box gt_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\nstring\u00b6\nfun box string()\n: String iso^\n"} +{"id": "Pony/src-collections-flag-_12.txt", "contents": "Returns the bit encoding of the set flags.\n\"\"\"\n_value\n\nfun apply(flag: A): Bool =>\n\"\"\"\nReturns true if the flag is set.\n\"\"\"\n(_value and flag.value()) > 0\n\nfun ref all() =>\n\"\"\"\nSets all bits, including undefined flags.\n\"\"\"\n_value = -1\n\nfun ref clear() =>\n\"\"\"\nUnsets all flags.\n\"\"\""} +{"id": "Pony/src-signals-sig-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/format-FormatHexSmallBare-_1.txt", "contents": "new val create()\n: FormatHexSmallBare val^\n\nReturns\u00b6\n\nFormatHexSmallBare val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatHexSmallBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexSmallBare val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ULong-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: ULong val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-ULong-_7.txt", "contents": "\nULong val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/src-time-posix_date-_0.txt", "contents": "\n\n\n\n\n\n\nposix_date.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-persistent-list-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/pony_check-ASCIIWhiteSpace-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIWhiteSpace val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-map-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-U16-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/files-FileChmod-_2.txt", "contents": "\nthat: FileChmod val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileChmod val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileChmod val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_295.txt", "contents": "fun box rds_cmsg_masked_atomic_fadd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_rdma_args\u00b6\n[Source]\nfun box rds_cmsg_rdma_args()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_rdma_dest\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/net-OSSockOpt-_387.txt", "contents": "fun box sctp_get_local_addresses()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_local_addr_size\u00b6\n[Source]\nfun box sctp_get_local_addr_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_nonce_values\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_28.txt", "contents": "// file itself needs to be an executable\nif not filepath.caps(FileExec) then\n_notifier.failed(this, ProcessError(CapError, filepath.path\n+ \" is not an executable or we do not have execute capability.\"))\nreturn\nend\n\nlet ok = try\nFileInfo(filepath)?.file\nelse\nfalse\nend\nif not ok then\n// unable to stat the file path given so it may not exist\n// or may be a directory.\n_notifier.failed(this, ProcessError(ExecveError, filepath.path\n+ \" does not exist or is a directory.\"))\nreturn\nend\n"} +{"id": "Pony/collections-MaxHeap-_0.txt", "contents": "\n\n\n\n\n\n\nMaxHeap[A: Comparable[A] #read]\u00b6\n[Source]\ntype MaxHeap[A: Comparable[A] #read] is\nBinaryHeap[A, MaxHeapPriority[A] val] ref\n\nType Alias For\u00b6\n\nBinaryHeap[A, MaxHeapPriority[A] val] ref\n\n\n\n\n"} +{"id": "Pony/promises--index-_3.txt", "contents": "fun tag strings_to_sizes(sa: Array[String] val): Array[USize] val =>\nrecover\nlet len = Array[USize]\nfor s in sa.values() do\nlen.push(s.size())\nend\nlen\nend\nfun tag sizes_to_avg(sza: Array[USize] val): USize =>\nvar acc = USize(0)\nfor sz in sza.values() do\nacc = acc + sz\nend\nacc / sza.size()\nfun tag output(env: Env, sz: USize): None =>\nenv.out.print(sz.string())\n\nactor Main\nnew create(env: Env) =>\nlet promise = Promise[String]"} +{"id": "Pony/src-pony_check-pony_check-_9.txt", "contents": "# Property Based Testing\n\nIn _traditional_ unit testing, the developer specifies one or more input\nexamples manually for the class or system under test and asserts on certain\noutput conditions. The difficulty here is to find enough examples to cover\nall branches and cases of the class or system under test.\n\nIn property based testing, the developer defines a property, a kind of predicate\nfor the class or system under test that should hold for all kinds or just a\nsubset of possible input values. The property based testing engine then\ngenerates a big number of random input values and checks if the property holds\nfor all of them. The developer only needs to specify the possible set of input\nvalues using a Generator.\n\nThis testing technique is great for finding edge cases that would easily go\nunnoticed with manually constructed test samples. In general it can lead to much\nhigher coverage than traditional unit testing, with much less code to write.\n"} +{"id": "Pony/src-pony_check-generator-_135.txt", "contents": "Iter[String^].chain([\nshorten_iter\nmin_iter\n].values())\n(consume s, shrink_iter)\nend)\n\nfun ascii(\nmin: USize = 0,\nmax: USize = 100,\nrange: ASCIIRange = ASCIIAll)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for strings withing the given `range`,\nwith a minimum length of `min` (default: 0)\nand a maximum length of `max` (default: 100).\n\"\"\"\nlet range_bytes = range.apply()\nlet fallback = U8(0)"} +{"id": "Pony/builtin-F32-_20.txt", "contents": "exponent: I32 val)\n: F32 val\n\nParameters\u00b6\n\nx: F32 val\nexponent: I32 val\n\nReturns\u00b6\n\nF32 val\n\n\nfrexp\u00b6\n[Source]\nfun box frexp()\n: (F32 val , U32 val)\n\nReturns\u00b6\n"} +{"id": "Pony/src-process-_process-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/builtin-I16-_32.txt", "contents": "fun box rem_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-float-_48.txt", "contents": "\"\"\"\n// True if exponent is all 1s and mantissa is 0\n((bits() and 0x7FF0_0000_0000_0000) == 0x7FF0_0000_0000_0000) and // exp\n((bits() and 0x000F_FFFF_FFFF_FFFF) == 0) // mantissa\n\nfun nan(): Bool =>\n\"\"\"\nCheck whether this number is NaN.\n\"\"\"\n// True if exponent is all 1s and mantissa is non-0\n((bits() and 0x7FF0_0000_0000_0000) == 0x7FF0_0000_0000_0000) and // exp\n((bits() and 0x000F_FFFF_FFFF_FFFF) != 0) // mantissa\n\nfun ldexp(x: F64, exponent: I32): F64 =>\n@ldexp(x, exponent)\n\nfun frexp(): (F64, U32) =>\nvar exponent: U32 = 0\nvar mantissa = @frexp(this, addressof exponent)\n(mantissa, exponent)"} +{"id": "Pony/1_classes_1.txt", "contents": "# What goes in a class?\n\nA class is composed of:\n\n1. Fields.\n2. Constructors.\n3. Functions.\n"} +{"id": "Pony/builtin-U16-_26.txt", "contents": "fun box mod_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/serialise-SerialiseAuth-_1.txt", "contents": "Parameters\u00b6\n\nauth: AmbientAuth val\n\nReturns\u00b6\n\nSerialiseAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: SerialiseAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: SerialiseAuth val\n"} +{"id": "Pony/time-TimerNotify-_2.txt", "contents": "[Source]\nCalled if the timer is cancelled. This is also called if the notifier\nreturns false from its apply method.\nfun ref cancel(\ntimer: Timer ref)\n: None val\n\nParameters\u00b6\n\ntimer: Timer ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_466.txt", "contents": "fun box sctp_stream_reset_incoming()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_stream_reset_outgoing\u00b6\n[Source]\nfun box sctp_stream_reset_outgoing()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_str_logging_enable\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_225.txt", "contents": "fun box ip_origdstaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_passsec\u00b6\n[Source]\nfun box ip_passsec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pktinfo\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_75.txt", "contents": "fun peek_u128_le(offset: USize = 0): U128 ? =>\n\"\"\"\nPeek at a little-endian U128.\n\"\"\"\npeek_u64_le(offset)?.u128() or (peek_u64_le(offset + 8)?.u128() << 64)\n\nfun peek_i128_be(offset: USize = 0): I128 ? =>\n\"\"\"\nPeek at a big-endian I129.\n\"\"\"\npeek_u128_be(offset)?.i128()\n\nfun peek_i128_le(offset: USize = 0): I128 ? =>\n\"\"\"\nPeek at a little-endian I128.\n\"\"\"\npeek_u128_le(offset)?.i128()\n\nfun peek_f32_be(offset: USize = 0): F32 ? =>\n\"\"\""} +{"id": "Pony/src-debug-debug-_0.txt", "contents": "\n\n\n\n\n\n\ndebug.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_test-test_list-_0.txt", "contents": "\n\n\n\n\n\n\ntest_list.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-itertools-iter-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-collections-list-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-TCPConnectionNotify-_13.txt", "contents": "\nunthrottled\u00b6\n[Source]\nCalled when the connection stops experiencing TCP backpressure. Upon\nreceiving this notification, you should feel free to start making calls to\nwrite and writev again.\nfun ref unthrottled(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_177.txt", "contents": "fun box ipx_extended_address()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_filterptype\u00b6\n[Source]\nfun box ipx_filterptype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_8022\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_145.txt", "contents": "try\nlet delim_start = find(delim where offset = current)?\nresult.push(substring(current, delim_start))\ncurrent = delim_start + delim_size\nelse break end\nend\nresult.push(substring(current))\nconsume result\n\nfun split(delim: String = \" \\t\\v\\f\\r\\n\", n: USize = 0): Array[String] iso^ =>\n\"\"\"\nSplit the string into an array of strings with any character in the\ndelimiter string. By default, the string is split with whitespace\ncharacters. If `n > 0`, then the split count is limited to n.\n\nExample:\n\n```pony\nlet original: String = \"name,job;department\"\nlet delimiter: String = \".,;\""} +{"id": "Pony/term-ANSI-_17.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\nbright_blue\u00b6\n[Source]\nBright blue text.\nfun box bright_blue()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_magenta\u00b6\n[Source]\nBright magenta text."} +{"id": "Pony/src-collections-list-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/builtin-U128-_50.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: U128 val)\n: Bool val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U8-_40.txt", "contents": "U8 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_listener-_17.txt", "contents": "_notify = consume notify\n_event =\n@pony_os_listen_tcp(this, host.cstring(), service.cstring())\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_fd = @pony_asio_event_fd(_event)\n_notify_listening()\n\nnew ip4(\nauth: TCPListenAuth,\nnotify: TCPListenNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nlimit: USize = 0,\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\""} +{"id": "Pony/collections-Flags-_10.txt", "contents": "Parameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nNone val\n\n\nadd\u00b6\n[Source]\nThis with the flag set.\nfun box add(\nflag: A)\n: Flags[A, B] iso^\n\nParameters\u00b6\n\nflag: A\n"} +{"id": "Pony/builtin-SignedInteger-_57.txt", "contents": "I128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-array-_80.txt", "contents": "_size = 0\n\nfun ref push_u8[B: (A & Real[B] val & U8) = A](value: U8) =>\n\"\"\"\nAdd a U8 to the end of the array. This is only allowed for an array of U8s.\n\"\"\"\nlet u8_bytes = U8(0).bytewidth()\nreserve(_size + u8_bytes)\n_ptr._offset(_size)._convert[U8]()._update(0, value)\n_size = _size + u8_bytes\n\nfun ref push_u16[B: (A & Real[B] val & U8) = A](value: U16) =>\n\"\"\"\nAdd a U16 to the end of the array. This is only allowed for an array of U8s.\n\"\"\"\nlet u16_bytes = U16(0).bytewidth()\nreserve(_size + u16_bytes)\n_ptr._offset(_size)._convert[U16]()._update(0, value)\n_size = _size + u16_bytes\n"} +{"id": "Pony/src-pony_check-generator-_144.txt", "contents": "let code_point_gen =\nfrequency[U32]([\n(range_1_size, range_1)\n(range_2_size, range_2)\n])\nutf32_codepoint_string(code_point_gen, min, max)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command-_0.txt", "contents": "\n\n\n\n\n\n\ncommand.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/collections-RingBuffer-_3.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nGet the i-th element from the ring. If the i-th element has not yet been\nadded or is no longer available, this will raise an error.\nfun box apply(\ni: USize val)\n: this->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->A ?"} +{"id": "Pony/time-Timers-_2.txt", "contents": "[Source]\nSets a timer. Fire it if need be, schedule it on the right timing wheel,\nthen rearm the timer.\nbe apply(\ntimer: Timer iso)\n\nParameters\u00b6\n\ntimer: Timer iso\n\n\ncancel\u00b6\n[Source]\nCancels a timer.\nbe cancel(\ntimer: Timer tag)\n\nParameters\u00b6\n\ntimer: Timer tag"} +{"id": "Pony/src-buffered-reader-_52.txt", "contents": "(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef bigendian then\ndata.read_u16(offset)?\nelse\ndata.read_u16(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed"} +{"id": "Pony/src-builtin-string-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/serialisation_2.txt", "contents": "let sfoo = Serialised(serialise, foo1)?\nlet bytes_foo: Array[U8] val = sfoo.output(output)\n\nenv.out.print(\"serialised representation is \" +\nbytes_foo.size().string() +\n\" bytes long\")\n\n// deserialisation\nlet dfoo = Serialised.input(input, bytes_foo)\nlet foo2 = dfoo(deserialise)? as Foo\n\nenv.out.print(\"(foo1 == foo2) is \" + (foo1 == foo2).string())\nelse\nenv.err.print(\"there was an error\")\nend\n```\n"} +{"id": "Pony/src-collections-persistent-list-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-pony_check-generator-_129.txt", "contents": "\nfun shrink(i: I32): ValueAndShrink[I32] =>\nthat._int_shrink[I32](consume i, min)\nend)\n\nfun i64(\nmin: I64 = I64.min_value(),\nmax: I64 = I64.max_value())\n: Generator[I64]\n=>\n\"\"\"\nCreate a generator for I64 values.\n\"\"\"\nlet that = this\nGenerator[I64](\nobject is GenObj[I64]\nfun generate(rnd: Randomness): I64^ =>\nrnd.i64(min, max)\n\nfun shrink(i: I64): ValueAndShrink[I64] =>"} +{"id": "Pony/reference-capabilities_13.txt", "contents": "x = x'\n\nnew ref create_ref(x': U32) =>\nx = x'\n```\n\nBut, that's probably not what you'd really want to do. Better to use the capabilities recovery facilities of Pony that we'll cover later in the [Recovering Capabilities](/reference-capabilities/recovering-capabilities.md) section.\n"} +{"id": "Pony/src-net-ossockopt-_58.txt", "contents": "1152\n1153\n1154\n1155\n1156\n1157\n1158\n1159\n1160\n1161\n1162\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171"} +{"id": "Pony/src-files-path-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-cli-command_spec-_28.txt", "contents": "552\n553\n554\n555\n556use \"collections\"\nuse pc = \"collections/persistent\"\n\nprimitive _CommandSpecLeaf\nprimitive _CommandSpecParent\n\ntype _CommandSpecType is (_CommandSpecLeaf | _CommandSpecParent )\n\nclass CommandSpec\n\"\"\"\nCommandSpec describes the specification of a parent or leaf command. Each\ncommand has the following attributes:\n\n- a name: a simple string token that identifies the command.\n- a description: used in the syntax message.\n- a map of options: the valid options for this command."} +{"id": "Pony/net-OSSockOpt-_285.txt", "contents": "fun box netlink_tx_ring()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_unused\u00b6\n[Source]\nfun box netlink_unused()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_usersock\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/builtin-U8-_26.txt", "contents": "fun box mod_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/src-time-time-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-pony_test-pony_test-_36.txt", "contents": "# Exclusion groups\n\nBy default all tests are run concurrently. This may be a problem for some\ntests, eg if they manipulate an external file or use a system resource. To fix\nthis issue any number of tests may be put into an exclusion group.\n\nNo tests that are in the same exclusion group will be run concurrently.\n\nExclusion groups are identified by name, arbitrary strings may be used.\nMultiple exclusion groups may be used and tests in different groups may run\nconcurrently. Tests that do not specify an exclusion group may be run\nconcurrently with any other tests.\n\nThe command line option \"--sequential\" prevents any tests from running\nconcurrently, regardless of exclusion groups. This is intended for debugging\nrather than standard use.\n"} +{"id": "Pony/src-net-tcp_connection_notify-_12.txt", "contents": "want to continue receiving messages without yielding until you read\nmax_size on the TCPConnection. Return false to cause the TCPConnection\nto yield now.\n\nIncludes the number of times during the current behavior, that received has\nbeen called. This allows the notifier to end reads on a regular basis.\n\"\"\"\ntrue\n\nfun ref expect(conn: TCPConnection ref, qty: USize): USize =>\n\"\"\"\nCalled when the connection has been told to expect a certain quantity of\nbytes. This allows nested notifiers to change the expected quantity, which\nallows a lower level protocol to handle any framing (e.g. SSL).\n\"\"\"\nqty\n\nfun ref closed(conn: TCPConnection ref) =>\n\"\"\"\nCalled when the connection is closed."} +{"id": "Pony/builtin-SignedInteger-_25.txt", "contents": "fun box subc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-collections-persistent-list-_46.txt", "contents": "\nfun val _concat(l: List[A], acc: List[A]): List[A] =>\n\"\"\"\nPrivate helper for concat that recursively builds the new list.\n\"\"\"\nmatch l\n| let cons: Cons[A] => _concat(cons.tail(), acc.prepend(cons.head()))\nelse\nacc.reverse()\nend\n\nfun val map[B](f: {(val->A): val->B} box): List[B] =>\n\"\"\"\nBuilds a new list by applying a function to every member of the list.\n\"\"\"\n_map[B](this, f, Nil[B])\n\nfun _map[B](l: List[A], f: {(val->A): val->B} box, acc: List[B]): List[B] =>\n\"\"\"\nPrivate helper for map, recursively applying function to elements."} +{"id": "Pony/src-builtin-array-_90.txt", "contents": "\"\"\"\nReturns true if the array contains `value`, false otherwise.\n\nThe default predicate checks for matches by identity. To search for matches\nby structural equality, pass an object literal such as `{(l, r) => l == r}`.\n\"\"\"\nvar i = USize(0)\n\nwhile i < _size do\nif predicate(_ptr._apply(i), value) then\nreturn true\nend\n\ni = i + 1\nend\nfalse\n\nfun rfind(\nvalue: A!,\noffset: USize = -1,"} +{"id": "Pony/builtin-Seq-_0.txt", "contents": "\n\n\n\n\n\n\nSeq[A: A]\u00b6\n[Source]\nA sequence of elements.\ninterface ref Seq[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a sequence, reserving space for len elements.\nnew ref create(\nlen: USize val = 0)\n: Seq[A] ref^\n"} +{"id": "Pony/builtin-I8-_3.txt", "contents": "I8 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: I8 val^\n\nReturns\u00b6\n\nI8 val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-int_properties-_12.txt", "contents": "choice = choice'\nint1 = int1'\nint2 = int2'\n\nfun string(): String iso^ =>\nlet num1: String val = _StringifyIntArg(choice, int1)\nlet num2: String val = _StringifyIntArg(choice, int2)\n\"\".join([\"(\"; num1; \", \"; num2; \")\"].values())\n\n\ntype IntPairUnitTest is Property1UnitTest[IntPairPropertySample]\n\ntrait IntPairProperty is Property1[IntPairPropertySample]\n\"\"\"\nA property implementation for conveniently evaluating properties\nfor pairs of integers of all Pony integer types at once.\n\nThe property needs to be formulated inside the method `int_property`:\n\n```pony"} +{"id": "Pony/random-XorShift128Plus-_10.txt", "contents": "ilong\u00b6\n[Source]\nfun ref ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun ref isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n"} +{"id": "Pony/keywords_2.txt", "contents": "| `object` | to make an object literal |\n| `primitive` | declares a primitive type |\n| `recover` | removes the reference capability of a variable |\n| `ref` | reference capability \u2013 object (on which function is called) is mutable |\n| `repeat` | loop statement |\n| `return` | to return early from a function |\n| `tag` | reference capability \u2013 neither readable nor writeable, only object identity |\n| `then` | (1) in if conditional statement |\n| | (2) as a (finally) block in try |\n| `this` | the current object |\n| `trait` | used in nominal subtyping: `class Foo is TraitName` |\n| `trn` | reference capability \u2013 write uniqueness, no other actor can write to the object |\n| `try` | error handling |\n| `type` | to declare a type alias |\n| `until` | loop statement |\n| `use` | (1) using a package |\n| | (2) using an external library foo: use \"lib:foo\" |\n| | (3) declaration of an FFI signature |\n| | (4) add a search path for external libraries: `use \"path:/usr/local/lib\"` |\n| `var` | declaration of mutable variable: you can rebind this name to a new value |"} +{"id": "Pony/builtin-I16-_12.txt", "contents": "fun box mod(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/src-net-ossockopt-_81.txt", "contents": "fun icmp_prec_violation():I32 => @pony_os_sockopt_option(I32(62))\nfun icmp_prot_unreach():I32 => @pony_os_sockopt_option(I32(63))\nfun icmp_redirect():I32 => @pony_os_sockopt_option(I32(64))\nfun icmp_redir_host():I32 => @pony_os_sockopt_option(I32(65))\nfun icmp_redir_hosttos():I32 => @pony_os_sockopt_option(I32(66))\nfun icmp_redir_net():I32 => @pony_os_sockopt_option(I32(67))\nfun icmp_redir_nettos():I32 => @pony_os_sockopt_option(I32(68))\nfun icmp_source_quench():I32 => @pony_os_sockopt_option(I32(69))\nfun icmp_sr_failed():I32 => @pony_os_sockopt_option(I32(70))\nfun icmp_timestamp():I32 => @pony_os_sockopt_option(I32(71))\nfun icmp_timestampreply():I32 => @pony_os_sockopt_option(I32(72))\nfun icmp_time_exceeded():I32 => @pony_os_sockopt_option(I32(73))\nfun ipctl_acceptsourceroute():I32 => @pony_os_sockopt_option(I32(74))\nfun ipctl_defmtu():I32 => @pony_os_sockopt_option(I32(75))\nfun ipctl_defttl():I32 => @pony_os_sockopt_option(I32(76))\nfun ipctl_directedbroadcast():I32 => @pony_os_sockopt_option(I32(77))\nfun ipctl_fastforwarding():I32 => @pony_os_sockopt_option(I32(78))\nfun ipctl_forwarding():I32 => @pony_os_sockopt_option(I32(79))\nfun ipctl_gif_ttl():I32 => @pony_os_sockopt_option(I32(80))\nfun ipctl_intrdqdrops():I32 => @pony_os_sockopt_option(I32(81))"} +{"id": "Pony/src-net-dns-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/collections-BinaryHeap-_4.txt", "contents": "None val\n\n\npop\u00b6\n[Source]\nRemove the highest priority value from the heap and return it. For\nmax-heaps, the greatest item will be returned. For min-heaps, the smallest\nitem will be returned.\nThe time complexity of this operation is O(log(n)) with respect to the size\nof the heap.\nfun ref pop()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nappend\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_24.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/pony_bench-BenchmarkList-_1.txt", "contents": "bench: PonyBench tag\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-persistent-list-_57.txt", "contents": "\"\"\"\nvar cur: List[A] = this\nif cur.size() <= n then return cur end\nvar count = n\nvar res: List[A] = Nil[A]\nwhile count > 0 do\nmatch cur\n| let cons: Cons[A] =>\nres = res.prepend(cons.head())\ncur = cons.tail()\nelse\nreturn res.reverse()\nend\ncount = count - 1\nend\nres.reverse()\n\nfun val take_while(f: {(val->A): Bool} box): List[A] =>\n\"\"\"\nBuilds a list of elements satisfying the provided predicate until one does"} +{"id": "Pony/pony_check-IntPairProperty-_4.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\nparams\u00b6\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_test-test_helper-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-net-tcp_connection-_79.txt", "contents": "let _proxy_service: String\n\nnew create(proxy_host: String, proxy_service: String) =>\n_proxy_host = proxy_host\n_proxy_service = proxy_service\n\nfun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ =>\nExampleProxyNotify.create(consume wrap, _proxy_service, _proxy_service)\n\nclass iso ExampleProxyNotify is TCPConnectionNotify\n// Fictional proxy implementation that has no error\n// conditions, and always forwards the connection.\nlet _proxy_host: String\nlet _proxy_service: String\nvar _destination_host: (None | String) = None\nvar _destination_service: (None | String) = None\nlet _wrapped: TCPConnectionNotify iso\n\nnew iso create(wrap: TCPConnectionNotify iso, proxy_host: String, proxy_service: String) =>\n_wrapped = wrap"} +{"id": "Pony/builtin-USize-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_43.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: I8 val)\n: Bool val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_48.txt", "contents": "Create a new array that is a clone of a portion of this array. The range is\nexclusive and saturated.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not cloned.\nfun box slice(\nfrom: USize val = 0,\nto: USize val = call,\nstep: USize val = 1)\n: Array[this->A!] ref^\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\nstep: USize val = 1\n\nReturns\u00b6\n\nArray[this->A!] ref^\n"} +{"id": "Pony/src-buffered-writer-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/pony_check-Property2UnitTest-_1.txt", "contents": "new iso create(\np2: Property2[T1, T2] iso,\nname': (String val | None val) = reference)\n: Property2UnitTest[T1, T2] iso^\n\nParameters\u00b6\n\np2: Property2[T1, T2] iso\nname': (String val | None val) = reference\n\nReturns\u00b6\n\nProperty2UnitTest[T1, T2] iso^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val"} +{"id": "Pony/buffered-Reader-_27.txt", "contents": "Peek at a little-endian U32.\nfun box peek_u32_le(\noffset: USize val = 0)\n: U32 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU32 val ?\n\n\npeek_i32_be\u00b6\n[Source]\nPeek at a big-endian I32.\nfun box peek_i32_be(\noffset: USize val = 0)\n: I32 val ?"} +{"id": "Pony/src-builtin-string-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/builtin-I128-_13.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generator-_0.txt", "contents": "\n\n\n\n\n\n\nGenerator[T: T]\u00b6\n[Source]\nA Generator is capable of generating random values of a certain type T\ngiven a source of Randomness\nand knows how to shrink or simplify values of that type.\nWhen testing a property against one or more given Generators,\nthose generators' generate methods are being called many times\nto generate sample values that are then used to validate the property.\nWhen a failing sample is found, the PonyCheck engine is trying to find a\nsmaller or more simple sample by shrinking it with shrink.\nIf the generator did not provide any shrinked samples\nas a result of generate, its shrink method is called\nto obtain simpler results. PonyCheck obtains more shrunken samples until"} +{"id": "Pony/pony_test-TestHelper-_16.txt", "contents": "MUST be called by each long test to indicate the test has finished, unless\na timeout occurs. If you are using expect_action() then complete(true) will\nbe called once the last expected action has been completed via\ncomplete_action().\nThe \"success\" parameter specifies whether the test succeeded. However if\nany asserts fail the test will be considered a failure, regardless of the\nvalue of this parameter.\nOnce this is called tear_down() may be called at any time.\nfun box complete(\nsuccess: Bool val)\n: None val\n\nParameters\u00b6\n\nsuccess: Bool val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/net-OSSockOpt-_244.txt", "contents": "fun box ip_ttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_unblock_source\u00b6\n[Source]\nfun box ip_unblock_source()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_unicast_if\u00b6\n[Source]"} +{"id": "Pony/process-UnknownError-_2.txt", "contents": "\nthat: UnknownError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: UnknownError val)\n: Bool val\n\nParameters\u00b6\n\nthat: UnknownError val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F32-_17.txt", "contents": "\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/buffered-Reader-_17.txt", "contents": "fun ref u128_be()\n: U128 val ?\n\nReturns\u00b6\n\nU128 val ?\n\n\nu128_le\u00b6\n[Source]\nGet a little-endian U128.\nfun ref u128_le()\n: U128 val ?\n\nReturns\u00b6\n\nU128 val ?\n\n\ni128_be\u00b6"} +{"id": "Pony/builtin-I64-_27.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nI64 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U64 val)\n: I64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I8-_55.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_154.txt", "contents": "fun box ipv6_prefer_src_tmp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_10\u00b6\n[Source]\nfun box ipv6_priority_10()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_11\u00b6\n[Source]"} +{"id": "Pony/term-ANSINotify-_11.txt", "contents": "fn_key\u00b6\n[Source]\nfun ref fn_key(\ni: U8 val,\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\ni: U8 val\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/builtin-I8-_0.txt", "contents": "\n\n\n\n\n\n\nI8\u00b6\n[Source]\nprimitive val I8 is\nSignedInteger[I8 val, U8 val] val\n\nImplements\u00b6\n\nSignedInteger[I8 val, U8 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-Flags-_5.txt", "contents": "fun ref set(\nflag: A)\n: None val\n\nParameters\u00b6\n\nflag: A\n\nReturns\u00b6\n\nNone val\n\n\nunset\u00b6\n[Source]\nUnsets the flag.\nfun ref unset(\nflag: A)\n: None val\n"} +{"id": "Pony/builtin-I8-_41.txt", "contents": "fun box eq(\ny: I8 val)\n: Bool val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: I8 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/collections-Flag-_0.txt", "contents": "\n\n\n\n\n\n\nFlag[A: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[A] val)]\u00b6\n[Source]\nA flag should be a primitive with a value method that returns the bits that\nrepresent the flag. This allows a flag to encode a single bit, or any\ncombination of bits.\ninterface val Flag[A: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Integer[A] val)]\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()"} +{"id": "Pony/builtin-UnsignedInteger-_12.txt", "contents": ": A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nshr_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\nfun box shr_unsafe(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/term-ANSI-_1.txt", "contents": "\nANSI val^\n\n\nPublic Functions\u00b6\nup\u00b6\n[Source]\nMove the cursor up n lines. 0 is the same as 1.\nfun box up(\nn: U32 val = 0)\n: String val\n\nParameters\u00b6\n\nn: U32 val = 0\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/src-pony_test-test_helper-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/pony_check-ASCIINUL-_0.txt", "contents": "\n\n\n\n\n\n\nASCIINUL\u00b6\n[Source]\nprimitive val ASCIINUL\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIINUL val^\n\nReturns\u00b6\n\nASCIINUL val^"} +{"id": "Pony/src-pony_check-property_runner-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-collections-heap-_9.txt", "contents": "fun peek(): this->A ? =>\n\"\"\"\nReturn the highest priority item in the heap. For max-heaps, the greatest\nitem will be returned. For min-heaps, the smallest item will be returned.\n\"\"\"\n_data(0)?\n\nfun ref push(value: A) =>\n\"\"\"\nPush an item into the heap.\n\nThe time complexity of this operation is O(log(n)) with respect to the size\nof the heap.\n\"\"\"\n_data.push(value)\n_sift_up(size() - 1)\n\nfun ref pop(): A^ ? =>\n\"\"\"\nRemove the highest priority value from the heap and return it. For"} +{"id": "Pony/collections-Range-_2.txt", "contents": "\nNote that when using unsigned integers, a negative literal wraps around so while Range[ISize](0, 10, -1) is empty as above, Range[USize](0, 10, -1) produces a single value of min or [0] here.\nWhen using Range with floating point types (F32 and F64) inc steps < 1.0 are possible. If any arguments contains NaN, the Range is considered empty. It is also empty if the lower bound min or the step inc are +Inf or -Inf. However, if only the upper bound max is +Inf or -Inf and the step parameter inc has the same sign, then the Range is considered infinite and will iterate indefinitely.\nlet p_inf: F64 = F64.max_value() + F64.max_value()\nlet n_inf: F64 = -p_inf\nlet nan: F64 = F64(0) / F64(0)\n\nlet infinite_range1 = Range[F64](0, p_inf, 1)\nlet infinite_range2 = Range[F64](0, n_inf, -1_000_000)\ninfinite_range1.is_infinite() == true\ninfinite_range2.is_infinite() == true\n\nfor i in Range[F64](0.5, 100, nan) do\n// will not be executed as `inc` is nan\nend\nfor i in Range[F64](0.5, 100, p_inf) do\n// will not be executed as `inc` is +Inf\nend\n\nclass ref Range[optional A: (Real[A] val & (I8 val | I16 val | I32 val |"} +{"id": "Pony/src-buffered-reader-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-net-ossockopt-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/builtin-OutStream-_1.txt", "contents": "\ndata: (String val | Array[U8 val] val)\n\n\nwrite\u00b6\n[Source]\nPrint some bytes without inserting a newline afterwards.\nbe write(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nprintv\u00b6\n[Source]\nPrint an iterable collection of ByteSeqs.\nbe printv(\ndata: ByteSeqIter val)"} +{"id": "Pony/src-builtin-unsigned-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-read_seq-_2.txt", "contents": "\"\"\"\nReturns the number of elements in the sequence.\n\"\"\"\n\nfun apply(i: USize): this->A ?\n\"\"\"\nReturns the i-th element of the sequence. Raises an error if the index\nis out of bounds. Note that this returns this->A, not A.\n\"\"\"\n\nfun values(): Iterator[this->A]^\n\"\"\"\nReturns an iterator over the elements of the sequence. Note that this\niterates over this->A, not A.\n\"\"\"\n\ninterface box ReadElement[A]\n\"\"\"\nUsed to show that a ReadSeq can return an element of a specific unmodified\ntype."} +{"id": "Pony/files-Path-_9.txt", "contents": "fun box split(\npath: String val,\nseparator: String val = call)\n: (String val , String val)\n\nParameters\u00b6\n\npath: String val\nseparator: String val = call\n\nReturns\u00b6\n\n(String val , String val)\n\n\nbase\u00b6\n[Source]\nReturn the path after the last separator, or the whole path if there is no\nseparator.\nIf with_ext is false, the extension as defined by the ext() method"} +{"id": "Pony/builtin-FloatingPoint-_49.txt", "contents": "fun box ne(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-set-_30.txt", "contents": "_map.index(i)?._2\n\nfun values(): SetValues[A, H, this->HashSet[A, H]]^ =>\n\"\"\"\nReturn an iterator over the values.\n\"\"\"\nSetValues[A, H, this->HashSet[A, H]](this)\n\nclass SetValues[A, H: HashFunction[A!] val, S: HashSet[A, H] #read] is\nIterator[S->A]\n\"\"\"\nAn iterator over the values in a set.\n\"\"\"\nlet _set: S\nvar _i: USize = -1\nvar _count: USize = 0\n\nnew create(set: S) =>\n\"\"\"\nCreates an iterator for the given set."} +{"id": "Pony/builtin-SignedInteger-_23.txt", "contents": "fun box mod_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/net-OSSockOpt-_345.txt", "contents": "fun box sctp_cause_missing_param()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_nat_colliding_state\u00b6\n[Source]\nfun box sctp_cause_nat_colliding_state()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_nat_missing_state\u00b6\n[Source]"} +{"id": "Pony/files-FileLookup-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileLookup val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-buffered-reader-_76.txt", "contents": "Peek at a big-endian F32.\n\"\"\"\nF32.from_bits(peek_u32_be(offset)?)\n\nfun peek_f32_le(offset: USize = 0): F32 ? =>\n\"\"\"\nPeek at a little-endian F32.\n\"\"\"\nF32.from_bits(peek_u32_le(offset)?)\n\nfun peek_f64_be(offset: USize = 0): F64 ? =>\n\"\"\"\nPeek at a big-endian F64.\n\"\"\"\nF64.from_bits(peek_u64_be(offset)?)\n\nfun peek_f64_le(offset: USize = 0): F64 ? =>\n\"\"\"\nPeek at a little-endian F64.\n\"\"\""} +{"id": "Pony/src-pony_check-property_unit_test-_13.txt", "contents": "h.dispose_when_done(property_runner)\nproperty_runner.run()\n\nclass iso Property3UnitTest[T1, T2, T3] is UnitTest\n\nvar _prop3: ( Property3[T1, T2, T3] iso | None )\nlet _name: String\n\nnew iso create(p3: Property3[T1, T2, T3] iso, name': (String | None) = None) =>\n_name =\nmatch name'\n| None => p3.name()\n| let s: String => s\nend\n_prop3 = consume p3\n\nfun name(): String => _name\n\nfun ref apply(h: TestHelper) ? =>\nlet prop = ((_prop3 = None) as Property3[T1, T2, T3] iso^)"} +{"id": "Pony/format-FormatOctal-_1.txt", "contents": "new val create()\n: FormatOctal val^\n\nReturns\u00b6\n\nFormatOctal val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatOctal val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatOctal val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-pointer-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128struct Pointer[A]\n\"\"\"\nA Pointer[A] is a raw memory pointer. It has no descriptor and thus can't be\nincluded in a union or intersection, or be a subtype of any interface. Most"} +{"id": "Pony/builtin-ILong-_17.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: ILong val)\n: (ILong val , Bool val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/files-FileInfo-_0.txt", "contents": "\n\n\n\n\n\n\nFileInfo\u00b6\n[Source]\nThis contains file system metadata for a path.\nA symlink will report information about itself, other than the size which\nwill be the size of the target. A broken symlink will report as much as it\ncan and will set the broken flag.\nclass val FileInfo\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nThis will raise an error if the FileStat capability isn't available or the\npath doesn't exist."} +{"id": "Pony/src-builtin-iterator-_9.txt", "contents": "## Example\n\n```pony\n// Generates values from `from` to 0\nclass ref Countdown is Iterator[USize]\nvar _cur: USize\nvar _has_next: Bool = true\n\nnew ref create(from: USize) =>\n_cur = from\n\nfun ref has_next(): Bool =>\n_has_next\n\nfun ref next(): USize =>\nlet elem = _cur = _cur - 1\nif elem == 0 then\n_has_next = false\nend\nelem"} +{"id": "Pony/src-cli-command-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/files-FileTruncate-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileTruncate val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-SignedInteger-_13.txt", "contents": "A\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndiv_unsafe\u00b6\n[Source]"} +{"id": "Pony/ini-Ini-_3.txt", "contents": "[Source]\nfun box ne(\nthat: Ini val)\n: Bool val\n\nParameters\u00b6\n\nthat: Ini val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-net-ossockopt-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/process--index-_5.txt", "contents": "actor ProcessMonitor\ninterface ProcessNotify\nclass Signaled\nprimitive StartProcessAuth\nprimitive UnknownError\nprimitive WaitpidError\nprimitive WriteError\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-builtin-float-_55.txt", "contents": "\ntype Float is (F32 | F64)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/examples_11.txt", "contents": "fun tag expect_eq[A: (Equatable[A] #read & Stringable)]\n(expect: A, actual: A, msg: String = \"\"): Bool\n```\n"} +{"id": "Pony/src-term-readline-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-random-dice-_0.txt", "contents": "\n\n\n\n\n\n\ndice.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-builtin-runtime_options-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-file-_56.txt", "contents": "@_lseeki64(_fd, o, b)\nelse\nifdef linux then\n@lseek64(_fd, o, b)\nelse\n@lseek(_fd, o, b)\nend\nend\n\nif r < 0 then\n_errno = _get_error()\nend\nr.usize()\nelse\n0\nend\n\nfun ref size(): USize =>\n\"\"\"\nReturn the total length of the file."} +{"id": "Pony/builtin-F32-_18.txt", "contents": "F32 val\n\n\nfinite\u00b6\n[Source]\nCheck whether this number is finite, ie not +/-infinity and not NaN.\nfun box finite()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\ninfinite\u00b6\n[Source]\nCheck whether this number is +/-infinity\nfun box infinite()\n: Bool val\n"} +{"id": "Pony/src-process-process_monitor-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-files-path-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-collections-map-_47.txt", "contents": "\"\"\"\nlet _map: M\nvar _i: USize = -1\nvar _count: USize = 0\n\nnew create(map: M) =>\n\"\"\"\nCreates an iterator for the given map.\n\"\"\"\n_map = map\n\nfun has_next(): Bool =>\n\"\"\"\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map.\n\"\"\"\n_count < _map.size()\n\nfun ref next(): (M->K, M->V) ? =>\n\"\"\""} +{"id": "Pony/src-files-path-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/files-OpenFile-_1.txt", "contents": "OpenFile val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nfrom: FilePath val)\n: (File ref | FileOK val | FileError val |\nFileEOF val | FileBadFileNumber val | FileExists val |\nFilePermissionDenied val)\n\nParameters\u00b6\n\nfrom: FilePath val\n\nReturns\u00b6\n\n(File ref | FileOK val | FileError val |\nFileEOF val | FileBadFileNumber val | FileExists val |"} +{"id": "Pony/net-OSSockOpt-_573.txt", "contents": "fun box tcp_function_name_len_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_info\u00b6\n[Source]\nfun box tcp_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_keepalive\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_44.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: U16 val)\n: Bool val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-Directory-_7.txt", "contents": "\nParameters\u00b6\n\nmode: FileMode box\n\nReturns\u00b6\n\nBool val\n\n\nchown\u00b6\n[Source]\nSet the owner and group for this directory. Does nothing on Windows.\nfun box chown(\nuid: U32 val,\ngid: U32 val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-I8-_45.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_20.txt", "contents": "\nred_bg\u00b6\n[Source]\nRed background.\nfun box red_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ngreen_bg\u00b6\n[Source]\nGreen background.\nfun box green_bg()\n: String val\n\nReturns\u00b6\n"} +{"id": "Pony/format-FormatDefault-_0.txt", "contents": "\n\n\n\n\n\n\nFormatDefault\u00b6\n[Source]\nprimitive val FormatDefault is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_35.txt", "contents": "fun box ttyhook()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npdgetpid\u00b6\n[Source]\nfun box pdgetpid()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npdwait\u00b6\n[Source]"} +{"id": "Pony/collections-HashMap-_0.txt", "contents": "\n\n\n\n\n\n\nHashMap[K: K, V: V, H: HashFunction[K] val]\u00b6\n[Source]\nA quadratic probing hash map. Resize occurs at a load factor of 0.75. A\nresized map has 2 times the space. The hash function can be plugged in to the\ntype to create different kinds of maps.\nclass ref HashMap[K: K, V: V, H: HashFunction[K] val]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate an array with space for prealloc elements without triggering a\nresize. Defaults to 6.\nnew ref create("} +{"id": "Pony/builtin-I128-_21.txt", "contents": "Parameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6"} +{"id": "Pony/src-cli-command_parser-_18.txt", "contents": "let _spec: CommandSpec box\nlet _parent: (CommandParser box | None)\n\nnew box create(spec': CommandSpec box) =>\n\"\"\"\nCreates a new parser for a given command spec.\n\"\"\"\n_spec = spec'\n_parent = None\n\nnew box _sub(spec': CommandSpec box, parent': CommandParser box) =>\n_spec = spec'\n_parent = parent'\n\nfun parse(\nargv: Array[String] box,\nenvs: (Array[String] box | None) = None)\n: (Command | CommandHelp | SyntaxError)\n=>\n\"\"\""} +{"id": "Pony/src-pony_check-pony_check-_0.txt", "contents": "\n\n\n\n\n\n\npony_check.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-term-ansi_term-_24.txt", "contents": "match _escape\n| _EscapeNone =>\nif c == 0x1B then\n_escape = _EscapeStart\n_esc_buf.push(0x1B)\nelse\n_notify(this, c)\nend\n| _EscapeStart =>\nmatch c\n| 'b' =>\n// alt-left\n_esc_mod = 3\n_left()\n| 'f' =>\n// alt-right\n_esc_mod = 3\n_right()\n| 'O' =>\n_escape = _EscapeSS3"} +{"id": "Pony/src-builtin-real-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-math-is_prime-_9.txt", "contents": "\nfun _u8_prime_table_size(): USize => 54\n\nfun apply(n: A): Bool =>\nif n <= 3 then return n > 1 end\n\nlet table_end: USize =\niftype A <: U8 then\n_u8_prime_table_size()\nelse\n_low_prime_table_size()\nend\n\nvar table_index: USize = 0\nwhile table_index < table_end do\nlet prime = _low_prime_table(table_index)\ntable_index = table_index + 1\nif n == prime then return true end\nif (n %% prime) == 0 then return false end\nend"} +{"id": "Pony/builtin-I64-_0.txt", "contents": "\n\n\n\n\n\n\nI64\u00b6\n[Source]\nprimitive val I64 is\nSignedInteger[I64 val, U64 val] val\n\nImplements\u00b6\n\nSignedInteger[I64 val, U64 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/error-messages_5.txt", "contents": "# receiver type is not a subtype of target type\n\nSuppose you made a related, but slightly different error:\n\n```pony\nclass Rainbow\nlet colors: Array[String] = Array[String]\nfun add_stripe(color: String) =>\ncolors.push(color)\n```\n\nIn this example, rather than trying to change the value of a field, the code calls a method which attempts to modify the object referred to by the field.\n\nThe problem is very similar to that of the last section, but the error message is significantly more complicated:\n\n```error\nError:\n../a.pony:4:16: receiver type is not a subtype of target type\ncolors.push(color)\n^"} +{"id": "Pony/src-net-tcp_connection-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/builtin-ULong-_17.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Vec-_8.txt", "contents": "\nParameters\u00b6\n\niter: Iterator[val->A] ref\n\nReturns\u00b6\n\nVec[A] val\n\n\nfind\u00b6\n[Source]\nFind the nth appearance of value from the beginning of the vector,\nstarting at offset and examining higher indices, and using the\nsupplied predicate for comparisons. Returns the index of the value, or\nraise an error if the value isn't present.\nBy default, the search starts at the first element of the vector,\nreturns the first instance of value found, and uses object identity\nfor comparison.\nfun val find("} +{"id": "Pony/src-pony_check-generator-_59.txt", "contents": "1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191"} +{"id": "Pony/src-pony_test-test_helper-_33.txt", "contents": "return false\nend\n\nlog(\n_format_loc(loc) + \"Assert \" + check + \" passed. \" + msg\n+ \" Got (\" + (digestof not_expect).string() + \") isnt (\"\n+ (digestof actual).string() + \")\",\ntrue)\ntrue\n\nfun assert_ne[A: (Equatable[A] #read & Stringable #read)]\n(not_expect: A, actual: A, msg: String = \"\", loc: SourceLoc = __loc): Bool\n=>\n\"\"\"\nAssert that the 2 given expressions are not equal.\n\"\"\"\n_check_ne[A](\"ne\", not_expect, actual, msg, loc)\n\nfun _check_ne[A: (Equatable[A] #read & Stringable)]\n(check: String, not_expect: A, actual: A, msg: String, loc: SourceLoc)"} +{"id": "Pony/src-pony_check-property_runner-_44.txt", "contents": "class _EmptyIterator[T]\nfun ref has_next(): Bool => false\nfun ref next(): T^ ? => error\n\nprimitive _Stringify\nfun apply[T](t: T): (T^, String) =>\n\"\"\"turn anything into a string\"\"\"\nlet digest = (digestof t)\nlet s =\nmatch t\n| let str: Stringable =>\nstr.string()\n| let rs: ReadSeq[Stringable] =>\n\"[\" + \" \".join(rs.values()) + \"]\"\n| (let s1: Stringable, let s2: Stringable) =>\n\"(\" + s1.string() + \", \" + s2.string() + \")\"\n| (let s1: Stringable, let s2: ReadSeq[Stringable]) =>\n\"(\" + s1.string() + \", [\" + \" \".join(s2.values()) + \"])\"\n| (let s1: ReadSeq[Stringable], let s2: Stringable) =>\n\"([\" + \" \".join(s1.values()) + \"], \" + s2.string() + \")\""} +{"id": "Pony/random-MT-_0.txt", "contents": "\n\n\n\n\n\n\nMT\u00b6\n[Source]\nA Mersenne Twister. This is a non-cryptographic random number generator. This\nshould only be used for legacy applications that require a Mersenne Twister,\notherwise use Rand.\nclass ref MT is\nRandom ref\n\nImplements\u00b6\n\nRandom ref\n\n"} +{"id": "Pony/src-builtin-source_loc-_3.txt", "contents": "Line numbers start at 1.\n\"\"\"\n\nfun pos(): USize\n\"\"\"\nCharacter position on line.\nCharacter positions start at 1.\n\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Real-_16.txt", "contents": "[Source]\nfun box max(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-itertools-iter-_64.txt", "contents": "fun ref has_next(): Bool =>\nmatch _next\n| _None =>\nif _iter.has_next() then\n_find_next()\nhas_next()\nelse\nfalse\nend\nelse\ntrue\nend\n\nfun ref next(): B ? =>\nmatch _next = _None\n| let b: B =>\nconsume b\nelse\nif _iter.has_next() then\n_find_next()"} +{"id": "Pony/builtin-FloatingPoint-_64.txt", "contents": "I16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_291.txt", "contents": "fun box netrom_t4()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnrdv_multicast_addrs_per_sock\u00b6\n[Source]\nfun box nrdv_multicast_addrs_per_sock()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\npvd_config\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_80.txt", "contents": "_proxy_host = proxy_host\n_proxy_service = proxy_service\n\nfun ref proxy_via(host: String, service: String): (String, String) =>\n// Stash the original host & service; return the host & service\n// for the proxy; indicating that the initial TCP connection should\n// be made to the proxy\n_destination_host = host\n_destination_service = service\n(_proxy_host, _proxy_service)\n\nfun ref connected(conn: TCPConnection ref) =>\n// conn is the connection to the *proxy* server. We need to ask the\n// proxy server to forward this connection to our intended final\n// destination.\nconn.write((_destination_host + \"\\n\").array())\nconn.write((_destination_service + \"\\n\").array())\nwrapped.connected(conn)\n\nfun ref received(conn, data, times) => _wrapped.received(conn, data, times)"} +{"id": "Pony/pony_test-TestHelper-_7.txt", "contents": "\ntest: ITest box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_is[A: A]\u00b6\n[Source]\nAssert that the 2 given expressions resolve to the same instance\nfun box assert_is[A: A](\nexpect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n"} +{"id": "Pony/files-File-_12.txt", "contents": "position\u00b6\n[Source]\nReturn the current cursor position in the file.\nfun ref position()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nsize\u00b6\n[Source]\nReturn the total length of the file.\nfun ref size()\n: USize val\n\nReturns\u00b6\n\nUSize val"} +{"id": "Pony/pony_check-ASCIILetters-_2.txt", "contents": "\nthat: ASCIILetters val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIILetters val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIILetters val\n\nReturns\u00b6\n"} +{"id": "Pony/format-FormatSpec-_0.txt", "contents": "\n\n\n\n\n\n\nFormatSpec\u00b6\n[Source]\ntrait val FormatSpec\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-persistent-List-_2.txt", "contents": "Type Alias For\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file_path-_30.txt", "contents": "end\n\nfun val canonical(): FilePath ? =>\n\"\"\"\nReturn the equivalent canonical absolute path. Raise an error if there\nisn't one.\n\"\"\"\n_create(Path.canonical(path)?, caps)\n\nfun val exists(): Bool =>\n\"\"\"\nReturns true if the path exists. Returns false for a broken symlink.\n\"\"\"\ntry\nnot FileInfo(this)?.broken\nelse\nfalse\nend\n\nfun val mkdir(must_create: Bool = false): Bool =>"} +{"id": "Pony/src-encode-base64-base64-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/assert-Fact-_2.txt", "contents": "\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Fact val)\n: Bool val\n\nParameters\u00b6\n\nthat: Fact val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne("} +{"id": "Pony/error-messages_0.txt", "contents": "# A Short Guide to Pony Error Messages\n\nYou've been through the tutorial, you've watched some videos, and now you're ready to write some Pony code. You fire up your editor, shovel coal into the compiler, and... you find yourself looking at a string of gibberish.\n\nDon't panic! Pony's error messages try to be as helpful as possible and the ultimate goal is to improve them further. But, in the meantime, they can be a little intimidating.\n\nThis section tries to provide a short bestiary of Pony's error messages, along with a guide to understanding them.\n\nLet's start with a simple one.\n"} +{"id": "Pony/pony_check--index-_3.txt", "contents": "actor Main is TestList\nnew create(env: Env) => PonyTest(env, this)\n\nfun tag tests(test: PonyTest) =>\ntest(Property1UnitTest[String](MyStringProperty))\n\n\nRun as many Properties as you wish inside one\nPonyTest UnitTest using the convenience function\nPonyCheck.for_all providing a\nGenerator, the TestHelper\nand the actual property function. (Note that the property function is supplied\nin a second application of the result to for_all.)\n\nclass ListReversePropertyWithinAUnitTest is UnitTest\nfun name(): String => \"list/reverse/forall\"\n\nfun apply(h: TestHelper) =>\nlet gen = recover val Generators.list_of[USize](Generators.usize()) end\nPonyCheck.for_all[List[USize]](gen, h)("} +{"id": "Pony/src-process-process_monitor-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-I16-_61.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_36.txt", "contents": "\n\ni128\u00b6\n[Source]\nCreate a generator for I128 values.\nfun box i128(\nmin: I128 val = call,\nmax: I128 val = call)\n: Generator[I128 val] box\n\nParameters\u00b6\n\nmin: I128 val = call\nmax: I128 val = call\n\nReturns\u00b6\n\nGenerator[I128 val] box\n\n"} +{"id": "Pony/format-FormatOctalBare-_1.txt", "contents": "new val create()\n: FormatOctalBare val^\n\nReturns\u00b6\n\nFormatOctalBare val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatOctalBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatOctalBare val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U8-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_52.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/src-files-file-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_490.txt", "contents": "fun box so_hci_raw_direction()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_hci_raw_filter\u00b6\n[Source]\nfun box so_hci_raw_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_incoming_cpu\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_431.txt", "contents": "fun box sctp_pcb_flags_recvnxtinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvpaddrevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_recvpaddrevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvpeererr\u00b6\n[Source]"} +{"id": "Pony/assert-Assert-_1.txt", "contents": "\nAssert val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\ntest: Bool val,\nmsg: String val = \"\")\n: None val ?\n\nParameters\u00b6\n\ntest: Bool val\nmsg: String val = \"\"\n\nReturns\u00b6\n\nNone val ?"} +{"id": "Pony/src-builtin-float-_29.txt", "contents": "use @cbrt[F64](x: F64)\nuse @\"llvm.exp.f32\"[F32](x: F32)\nuse @\"llvm.exp.f64\"[F64](x: F64)\nuse @\"llvm.exp2.f32\"[F32](x: F32)\nuse @\"llvm.exp2.f64\"[F64](x: F64)\nuse @\"llvm.cos.f32\"[F32](x: F32)\nuse @\"llvm.cos.f64\"[F64](x: F64)\nuse @\"llvm.sin.f32\"[F32](x: F32)\nuse @\"llvm.sin.f64\"[F64](x: F64)\nuse @tanf[F32](x: F32)\nuse @coshf[F32](x: F32)\nuse @sinhf[F32](x: F32)\nuse @tanhf[F32](x: F32)\nuse @acosf[F32](x: F32)\nuse @asinf[F32](x: F32)\nuse @atanf[F32](x: F32)\nuse @atan2f[F32](x: F32, y: F32)\nuse @acoshf[F32](x: F32)\nuse @asinhf[F32](x: F32)\nuse @atanhf[F32](x: F32)"} +{"id": "Pony/src-term-ansi_term-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-String-_7.txt", "contents": "\nParameters\u00b6\n\nstr: Pointer[U8 val] ref\n\nReturns\u00b6\n\nString ref^\n\n\ncopy_cpointer\u00b6\n[Source]\nCreate a string by copying a fixed number of bytes from a pointer.\nnew ref copy_cpointer(\nstr: Pointer[U8 val] box,\nlen: USize val)\n: String ref^\n\nParameters\u00b6\n"} +{"id": "Pony/signals-SignalHandler-_0.txt", "contents": "\n\n\n\n\n\n\nSignalHandler\u00b6\n[Source]\nListen for a specific signal.\nIf the wait parameter is true, the program will not terminate until the SignalHandler's dispose method is called, or if the SignalNotify returns false, after handling the signal as this also disposes the SignalHandler and unsubscribes it.\nactor tag SignalHandler is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nConstructors\u00b6"} +{"id": "Pony/passing-and-sharing_2.txt", "contents": "# Sharing\n\nIf you want to __share__ an object amongst actors, then we have to make one of the following guarantees:\n\n1. Either _no_ actor can write to the object, in which case _any_ actor can read from it, or\n2. Only _one_ actor can write to the object, in which case _other_ actors can neither read from or write to the object.\n\nThe first guarantee is exactly what `val` does. It is _globally immutable_, so we know that _no_ actor can ever write to that object. As a result, you can freely send `val` objects to other actors, without needing to give up the ability to read from that object.\n\n__So I should use `val` when I want to share an immutable object amongst actors?__ Yes! If you don't need to share it, you can just use `ref` instead, or `box` if you want it to be immutable.\n\nThe second guarantee is what `tag` does. Not the part about only one actor writing (that's guaranteed by any mutable reference capability), but the part about not being able to read from or write to an object. That means you can freely pass `tag` objects to other actors, without needing to give up the ability to read from or write to that object.\n\n__What's the point in sending a tag reference to another actor if it can't then read or write the fields?__ Because `tag` __can__ be used to __identify__ objects and sometimes that's all you need. Also, if the object is an actor you can call behaviours on it even though you only have a `tag`.\n\n__So I should use `tag` when I want to share the identity of a mutable object amongst actors?__ Yes! Or, really, the identity of anything, whether it's mutable, immutable, or even an actor.\n"} +{"id": "Pony/src-builtin-signed-_73.txt", "contents": "\nfun fldc(y: ILong): (ILong, Bool) =>\n_SignedCheckedArithmetic.fld_checked[ILong, ULong](this, y)\n\nfun modc(y: ILong): (ILong, Bool) =>\n_SignedCheckedArithmetic.mod_checked[ILong, ULong](this, y)\n\nfun add_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.add_partial[ILong](this, y)?\n\nfun sub_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.sub_partial[ILong](this, y)?\n\nfun mul_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.mul_partial[ILong](this, y)?\n\nfun div_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.div_partial[ILong, ULong](this, y)?\n\nfun rem_partial(y: ILong): ILong ? =>"} +{"id": "Pony/src-buffered-reader-_57.txt", "contents": "end\nelse\nerror\nend\n\nfun ref u32_le(): U32 ? =>\n\"\"\"\nGet a little-endian U32.\n\"\"\"\nlet num_bytes = U32(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef littleendian then\ndata.read_u32(offset)?\nelse\ndata.read_u32(offset)?.bswap()\nend"} +{"id": "Pony/src-net-tcp_listen_notify-_3.txt", "contents": "Called if it wasn't possible to bind the listener to an address.\n\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:\n\n```pony\nfun ref not_listening(listen: TCPListener ref) =>\nNone\n```\n\"\"\"\n\nfun ref closed(listen: TCPListener ref) =>\n\"\"\"\nCalled when the listener is closed.\n\"\"\"\nNone\n\nfun ref connected(listen: TCPListener ref): TCPConnectionNotify iso^ ?\n\"\"\"\nCreate a new TCPConnectionNotify to attach to a new TCPConnection for a"} +{"id": "Pony/itertools-Iter-_34.txt", "contents": "fun ref step_by(\nn: USize val = 1)\n: Iter[A!] ref\n\nParameters\u00b6\n\nn: USize val = 1\n\nReturns\u00b6\n\nIter[A!] ref\n\n\ntake\u00b6\n[Source]\nReturn an iterator for the first n elements.\nExample\u00b6\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.take(3)\n"} +{"id": "Pony/examples_0.txt", "contents": "# Examples\n\nSmall _how do I_ examples for Pony. These will eventually find another home. Until then, they live here.\n"} +{"id": "Pony/src-pony_check-pony_check-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/calling-c_14.txt", "contents": "let data = String.from_cstring(pointer)\n```\n\nNote that the declaration for `list_pop` is still needed: if we don't add an explicit return type when calling `list_pop`, the default type will be the return type of the declaration.\n\nWhen specifying a different return type for an FFI function, make sure that the new type is [compatible](#type-signature-compatibility) with the type specified in the declaration.\n"} +{"id": "Pony/src-builtin-signed-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/builtin-I32-_4.txt", "contents": "\nU32 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: I32 val\n\nReturns\u00b6"} +{"id": "Pony/collections-List-_26.txt", "contents": "\niter: Iterator[A^] ref\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\ntruncate\u00b6\n[Source]\nPop tail elements until the list is len size.\nIf the list is already smaller than len, do nothing.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.truncate(1) // my_list is [\"a\"]\n\nfun ref truncate(\nlen: USize val)\n: None val"} +{"id": "Pony/pony_test-TestHelper-_3.txt", "contents": "\nParameters\u00b6\n\nmsg: String val = \"Test failed\"\n\nReturns\u00b6\n\nNone val\n\n\nassert_true\u00b6\n[Source]\nAssert that the given expression is true.\nfun box assert_true(\nactual: Bool val,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-Integer-_53.txt", "contents": "\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n"} +{"id": "Pony/src-builtin-signed-_52.txt", "contents": "fun div_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.div_partial[I8, U8](this, y)?\n\nfun rem_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.rem_partial[I8, U8](this, y)?\n\nfun divrem_partial(y: I8): (I8, I8) ? =>\n_SignedPartialArithmetic.divrem_partial[I8, U8](this, y)?\n\nfun fld_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.fld_partial[I8, U8](this, y)?\n\nfun mod_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.mod_partial[I8, U8](this, y)?\n\nprimitive I16 is SignedInteger[I16, U16]\nnew create(value: I16) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.i16()\n\nnew min_value() => -0x8000"} +{"id": "Pony/builtin-FloatingPoint-_63.txt", "contents": "F64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_test-test_helper-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-pony_check-for_all-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-real-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-builtin-signed-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/2_ops_8.txt", "contents": "# Unary operators\n\nThe unary operators are handled in the same manner, but with only one operand. For example, the following expressions are equivalent:\n\n```pony\n-x\nx.neg()\n```\n\nThe full list of unary operators that are aliases for functions is:\n\n---\n\n| Operator | Method | Description |\n| -------- | ------------ | ----------------------------- |\n| `-` | `neg()` | Arithmetic negation |\n| `not` | `op_not()` | Not, both bitwise and logical |\n| `-~` | `neg_unsafe()` | Unsafe arithmetic negation |\n\n---\n"} +{"id": "Pony/random-MT-_6.txt", "contents": "\nUSize val\n\n\ni8\u00b6\nfun ref i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\nfun ref i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val"} +{"id": "Pony/random-Random-_12.txt", "contents": "\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nA random integer in [0, n)\nNot biased with small values of n like int.\nfun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n"} +{"id": "Pony/capsicum-CapRights0-_4.txt", "contents": "cap: U64 val\n\nReturns\u00b6\n\nNone val\n\n\nlimit\u00b6\n[Source]\nLimits the fd to the encoded rights.\nfun box limit(\nfd: I32 val)\n: Bool val\n\nParameters\u00b6\n\nfd: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_69.txt", "contents": "_UnsignedPartialArithmetic.add_partial[ULong](this, y)?\n\nfun sub_partial(y: ULong): ULong ? =>\n_UnsignedPartialArithmetic.sub_partial[ULong](this, y)?\n\nfun mul_partial(y: ULong): ULong ? =>\n_UnsignedPartialArithmetic.mul_partial[ULong](this, y)?\n\nfun div_partial(y: ULong): ULong ? =>\n_UnsignedPartialArithmetic.div_partial[ULong](this, y)?\n\nfun rem_partial(y: ULong): ULong ? =>\n_UnsignedPartialArithmetic.rem_partial[ULong](this, y)?\n\nfun divrem_partial(y: ULong): (ULong, ULong) ? =>\n_UnsignedPartialArithmetic.divrem_partial[ULong](this, y)?\n\nprimitive USize is UnsignedInteger[USize]\nnew create(value: USize) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.usize()"} +{"id": "Pony/collections-HashSet-_14.txt", "contents": "op_xor[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nCreate a set with the elements that are in either set but not both.\nfun box op_xor[optional K: HashFunction[this->A!] val](\nthat: this->HashSet[A, H] ref)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6\n\nthat: this->HashSet[A, H] ref\n\nReturns\u00b6\n\nHashSet[this->A!, K] ref^\n\n\nwithout[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nCreate a set with the elements of this that are not in that.\nfun box without[optional K: HashFunction[this->A!] val]("} +{"id": "Pony/src-net-ossockopt-_56.txt", "contents": "1112\n1113\n1114\n1115\n1116\n1117\n1118\n1119\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131"} +{"id": "Pony/src-pony_test-pony_test-_55.txt", "contents": "// Not everything passed.\n_env.out.print(_Color.red() + \"**** FAILED: \" + fail_count.string()\n+ \" test\" + _plural(fail_count) + \", listed below:\" + _Color.reset())\n\n// Finally print our list of failed tests.\nfor rec in _records.values() do\nrec._list_failed()\nend\n\n_env.exitcode(-1)\n\nfun _plural(n: USize): String =>\n\"\"\"\nReturn a \"s\" or an empty string depending on whether the given number is 1.\nFor use when printing possibly plural words, eg \"test\" or \"tests\".\n\"\"\"\nif n == 1 then \"\" else \"s\" end\n\n\n"} +{"id": "Pony/pony_check-Generators-_40.txt", "contents": "[Source]\nCreate a generator for strings withing the given range,\nwith a minimum length of min (default: 0)\nand a maximum length of max (default: 100).\nfun box ascii(\nmin: USize val = 0,\nmax: USize val = 100,\nrange: (ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val |\nASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val |\nASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val |\nASCIIAll val | ASCIIAllWithNUL val) = reference)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0\nmax: USize val = 100\nrange: (ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val |\nASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val |\nASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val |"} +{"id": "Pony/builtin-DoNotOptimise-_1.txt", "contents": "\nDoNotOptimise val^\n\n\nPublic Functions\u00b6\napply[A: A]\u00b6\n[Source]\nPrevent the compiler from optimising out obj and any computation it is\nderived from. This doesn't prevent constant propagation.\nfun box apply[A: A](\nobj: A)\n: None val\n\nParameters\u00b6\n\nobj: A\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-random-random-_21.txt", "contents": "\"\"\"\nShuffle the elements of the array into a random order, mutating the array.\n\"\"\"\nvar i: USize = array.size()\ntry\nwhile i > 1 do\nlet ceil = i = i - 1\narray.swap_elements(i, int[USize](ceil))?\nend\nend\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/6_errors_5.txt", "contents": "# Try-then blocks\n\nIn addition to an `else` error handler, a `try` command can have a `then` block. This is executed after the rest of the `try`, whether or not an error is raised or handled. Expanding our example from earlier:\n\n```pony\ntry\ncallA()\nif not callB() then error end\ncallC()\nelse\ncallD()\nthen\ncallE()\nend\n```\n\nThe `callE()` will always be executed. If `callB()` returns true then the sequence executed is `callA()`, `callB()`, `callC()`, `callE()`. If `callB()` returns false then the sequence executed is `callA()`, `callB()`, `callD()`, `callE()`.\n\n__Do I have to have an else error handler to have a then block?__ No. You can have a `try`-`then` block without an `else` if you like.\n"} +{"id": "Pony/src-net-dns-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91use @pony_os_addrinfo[Pointer[U8]](family: U32, host: Pointer[U8] tag,"} +{"id": "Pony/src-pony_test-pony_test-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-net-tcp_connection-_124.txt", "contents": "if _throttled then\n_throttled = false\n_notify.unthrottled(this)\nend\n\n/**************************************/\n\nfun ref getsockopt(level: I32, option_name: I32, option_max_size: USize = 4):\n(U32, Array[U8] iso^) =>\n\"\"\"\nGeneral wrapper for TCP sockets to the `getsockopt(2)` system call.\n\nThe caller must provide an array that is pre-allocated to be\nat least as large as the largest data structure that the kernel\nmay return for the requested option.\n\nIn case of system call success, this function returns the 2-tuple:\n1. The integer `0`.\n2. An `Array[U8]` of data returned by the system call's `void *`\n4th argument. Its size is specified by the kernel via the"} +{"id": "Pony/net-OSSockOpt-_574.txt", "contents": "fun box tcp_keepalive()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_keepcnt\u00b6\n[Source]\nfun box tcp_keepcnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_keepidle\u00b6\n[Source]"} +{"id": "Pony/format-FormatHexSmall-_0.txt", "contents": "\n\n\n\n\n\n\nFormatHexSmall\u00b6\n[Source]\nprimitive val FormatHexSmall is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/ini-IniNoDelimiter-_2.txt", "contents": "fun box ne(\nthat: IniNoDelimiter val)\n: Bool val\n\nParameters\u00b6\n\nthat: IniNoDelimiter val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_139.txt", "contents": "_size - index)\n_set(index, value)\n_size = _size + 1\n_set(_size, 0)\n\nfun cut(from: ISize, to: ISize = ISize.max_value()): String iso^ =>\n\"\"\"\nReturns a version of the string with the given range deleted.\nIndex range [`from` .. `to`) is half-open.\n\"\"\"\nlet s = clone()\ns.cut_in_place(from, to)\ns\n\nfun ref cut_in_place(from: ISize, to: ISize = ISize.max_value()) =>\n\"\"\"\nCuts the given range out of the string.\nIndex range [`from` .. `to`) is half-open.\n\"\"\"\nlet start = offset_to_index(from)"} +{"id": "Pony/pony_check-PonyCheck-_3.txt", "contents": "\nParameters\u00b6\n\ngen1: Generator[T1] val\ngen2: Generator[T2] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll2[T1, T2] ref\n\n\nfor_all3[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\nfun box for_all3[T1: T1, T2: T2, T3: T3](\ngen1: Generator[T1] val,\ngen2: Generator[T2] val,\ngen3: Generator[T3] val,\nh: TestHelper val)\n: ForAll3[T1, T2, T3] ref"} +{"id": "Pony/net-OSSockOpt-_131.txt", "contents": "fun box ipv6_drop_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_dstopts\u00b6\n[Source]\nfun box ipv6_dstopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_flowinfo\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-collections-persistent-list-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-builtin-string-_164.txt", "contents": "end\n\nlet digit =\nif (char >= '0') and (char <= '9') then\nchar - '0'\nelseif (char >= 'A') and (char <= 'Z') then\n(char - 'A') + 10\nelseif (char >= 'a') and (char <= 'z') then\n(char - 'a') + 10\nelse\nbreak\nend\n\nif digit >= base' then\nbreak\nend\n\nvalue = if minus then\n(value *? base') -? digit\nelse"} +{"id": "Pony/src-pony_check-generator-_127.txt", "contents": "Generator[I8](\nobject is GenObj[I8]\nfun generate(rnd: Randomness): I8^ =>\nrnd.i8(min, max)\n\nfun shrink(i: I8): ValueAndShrink[I8] =>\nthat._int_shrink[I8](consume i, min)\nend)\n\nfun i16(\nmin: I16 = I16.min_value(),\nmax: I16 = I16.max_value())\n: Generator[I16]\n=>\n\"\"\"\nCreate a generator for I16 values.\n\"\"\"\nlet that = this\nGenerator[I16](\nobject is GenObj[I16]"} +{"id": "Pony/4_traits-and-interfaces_2.txt", "contents": "# Structural subtyping\n\nThere's another kind of subtyping, where the name doesn't matter. It's called __structural subtyping__, which means that it's all about how a type is built, and nothing to do with names.\n\nA concrete type is a member of a structural category if it happens to have all the needed elements, no matter what it happens to be called.\n\nStructural typing is very similar to [duck typing](https://en.wikipedia.org/wiki/Duck_typing) from dynamic programming languages, except that type compatibility is determined at compile time rather than at run time. If you've used Go, you'll recognise that Go interfaces are structural types.\n\nYou do not declare structural relationships ahead of time, instead it is done by checking if a given concrete type can fulfill the required interface. For example, in the code below, we have the interface `Stringable` from the standard library. Anything can be used as a `Stringable` so long as it provides the method `fun string(): String iso^`. In our example below, `ExecveError` provides the `Stringable` interface and can be used anywhere a `Stringable` is needed. Because `Stringable` is a structural type, `ExecveError` doesn't have to declare a relationship to `Stringable`, it simply has that relationship because it has \"the same shape\".\n\n```pony\ninterface box Stringable\n\"\"\"\nThings that can be turned into a String.\n\"\"\"\nfun string(): String iso^\n\"\"\"\nGenerate a string representation of this object.\n\"\"\"\n"} +{"id": "Pony/src-process-_process-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/collections-List-_39.txt", "contents": "let my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet contains_b = my_list.contains[String](\"b\") // true\n\nfun box contains[optional B: (A & HasEq[A!] #read)](\na: box->B)\n: Bool val\n\nParameters\u00b6\n\na: box->B\n\nReturns\u00b6\n\nBool val\n\n\nnodes\u00b6\n[Source]\nReturn an iterator on the nodes in the List in forward order.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])"} +{"id": "Pony/src-collections-list-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/src-cli-command_help-_15.txt", "contents": "fun _write_usage(w: Writer) =>\nw.write(\"usage: \" + fullname())\nif _any_options() then\nw.write(\" []\")\nend\nif _spec.commands().size() > 0 then\nw.write(\" \")\nend\nif _spec.args().size() > 0 then\nfor a in _spec.args().values() do\nw.write(\" \" + a.help_string())\nend\nelse\nw.write(\" [ ...]\")\nend\nw.write(\"\\n\")\n\nfun _write_options(w: Writer, options: Array[OptionSpec box] box) =>\nlet cols = Array[(USize,String,String)]()\nfor o in options.values() do"} +{"id": "Pony/builtin-I128-_35.txt", "contents": "fun box shl(\ny: U128 val)\n: I128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nI128 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-persistent-set-_12.txt", "contents": "var s' = create()\nfor v in iter do\nif contains(v) then\ns' = s' + v\nend\nend\ns'\n\nfun val op_xor(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>\n\"\"\"\nReturn a set with elements that are in either this or that, but not both.\n\"\"\"\nlet iter =\nmatch that\n| let s: HashSet[A, H] => s.values()\n| let i: Iterator[A] => i\nend\nvar s' = this\nfor v in iter do\nif contains(v) then"} +{"id": "Pony/debug--index-_1.txt", "contents": "Public Types\u00b6\n\nprimitive Debug\nprimitive DebugErr\nprimitive DebugOut\ntype DebugStream\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_535.txt", "contents": "fun box so_vm_sockets_peer_host_vm_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_trusted\u00b6\n[Source]\nfun box so_vm_sockets_trusted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_wantmore\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_connection-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/src-time-time-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/5_structs_3.txt", "contents": "## Fields\n\nPony struct fields are defined in the same way as they are for Pony classes, using `embed`, `let`, and `var`. An embed field is embedded in its parent object, like a C struct inside C struct. A var/let field is a pointer to an object allocated separately.\n\nFor example:\n\n```pony\nstruct Inner\nvar x: I32 = 0\n\nstruct Outer\nembed inner_embed: Inner = Inner\nvar inner_var: Inner = Inner\n\n```\n"} +{"id": "Pony/src-files-path-_33.txt", "contents": "else\nbacktrack = s.size().isize()\nend\n\nwhile i < n do\nc = path(i)?\n\nif is_sep(c) then\nmatch state\n| _PathDot2 =>\nif backtrack == -1 then\ns.append(\"..\")\ns.append(sep())\nelse\ns.delete(backtrack, -1)\n\ntry\nbacktrack = s.rfind(sep(), backtrack - 2)? + 1\nelse\nbacktrack = vol.size().isize()"} +{"id": "Pony/builtin-Integer-_24.txt", "contents": "Returns\u00b6\n\n(A , Bool val)\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n"} +{"id": "Pony/builtin-ULong-_45.txt", "contents": "fun box lt(\ny: ULong val)\n: Bool val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: ULong val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-buffered-reader-_77.txt", "contents": "F64.from_bits(peek_u64_le(offset)?)\n\nfun _peek_byte(offset: USize = 0): U8 ? =>\n\"\"\"\nGet the byte at the given offset without moving the cursor forward.\nRaise an error if the given offset is not yet available.\n\"\"\"\nvar offset' = offset\nvar iter = _chunks.nodes()\n\nwhile true do\nlet node = iter.next()?\n(var data, var node_offset) = node()?\noffset' = offset' + node_offset\n\nlet data_size = data.size()\nif offset' >= data_size then\noffset' = offset' - data_size\nelse\nreturn data(offset')?"} +{"id": "Pony/cli-Arg-_5.txt", "contents": "Returns the arg value as a ReadSeq[String], defaulting to empty.\nfun box string_seq()\n: ReadSeq[String val] val\n\nReturns\u00b6\n\nReadSeq[String val] val\n\n\ndeb_string\u00b6\n[Source]\nfun box deb_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_520.txt", "contents": "fun box so_rfcomm_fc_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rfcomm_mtu\u00b6\n[Source]\nfun box so_rfcomm_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rxq_ovfl\u00b6\n[Source]"} +{"id": "Pony/aliasing_3.txt", "contents": "# What counts as making an alias?\n\nThere are three things that count as making an alias:\n\n1. When you __assign__ a value to a variable or a field.\n2. When you __pass__ a value as an argument to a method.\n3. When you __call a method__, an alias of the receiver of the call is created. It is accessible as `this` within the method body.\n\nIn all three cases, you are making a new _name_ for the object. This might be the name of a local variable, the name of a field, or the name of a parameter to a method.\n"} +{"id": "Pony/src-builtin-string-_101.txt", "contents": "\"\"\"\nReturns the length of the string data in bytes.\n\"\"\"\n_size\n\nfun codepoints(from: ISize = 0, to: ISize = ISize.max_value()): USize =>\n\"\"\"\nReturns the number of unicode code points in the string between the two\noffsets. Index range [`from` .. `to`) is half-open.\n\"\"\"\nif _size == 0 then\nreturn 0\nend\n\nvar i = offset_to_index(from)\nlet j = offset_to_index(to).min(_size)\nvar n = USize(0)\n\nwhile i < j do\nif (_ptr._apply(i) and 0xC0) != 0x80 then"} +{"id": "Pony/src-net-ossockopt-_68.txt", "contents": "shared memory).\n\nMany functions may return `-1`, which means that the constant's\nvalue could not be determined at the Pony runtime library compile\ntime. One cause may be that the option truly isn't available,\nfor example, the option level constant `IPPROTO_3PC` is available\non MacOS 10.x but not on Linux 4.4. Another cause may be the\nPony runtime library's compilation did not include the correct\nheader file(s) for the target OS platform.\n\nA third cause of error is due to the regular expression-based\napproach used to harvest desirable constants. It is not fool-proof.\nThe regexp used is too broad and finds some macros that are not\nsupposed to be used with `getsockopt(2)` and `setsockopt(2)`.\nPlease consult your platform's documentation to verify the names\nof the option level and option name macros.\n\nThe following code fragments are equivalent: set the socket\nreceive buffer size for the file descriptor `fd` to `4455`.\n"} +{"id": "Pony/collections-ListNode-_6.txt", "contents": "list.\nIf the ListNode is not contained within a List the prepend will fail.\nfun ref prepend(\nthat: ListNode[A] ref)\n: Bool val\n\nParameters\u00b6\n\nthat: ListNode[A] ref\n\nReturns\u00b6\n\nBool val\n\n\nappend\u00b6\n[Source]\nAppend a node to this one. If that is already in a list, it is removed\nbefore it is appended. Returns true if that was removed from another\nlist."} +{"id": "Pony/src-debug-debug-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/collections-Range-_0.txt", "contents": "\n\n\n\n\n\n\nRange[optional A: (Real[A] val & (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val))]\u00b6\n[Source]\nProduces [min, max) with a step of inc for any Number type.\n// iterating with for-loop\nfor i in Range(0, 10) do\nenv.out.print(i.string())\nend\n\n// iterating over Range of U8 with while-loop\nlet range = Range[U8](5, 100, 5)\nwhile range.has_next() do\ntry\nhandle_u8(range.next()?)"} +{"id": "Pony/builtin-ArrayKeys-_2.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-ansi-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-U16-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_187.txt", "contents": "fun box ipx_reripnetnumber()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_route_no_router\u00b6\n[Source]\nfun box ipx_route_no_router()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_rt_8022\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_58.txt", "contents": "ILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/random-XorOshiro128Plus-_3.txt", "contents": "A random integer in [0, 2^64)\nfun ref next()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhas_next\u00b6\n[Source]\nfun tag has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nu8\u00b6"} +{"id": "Pony/9_object-literals_0.txt", "contents": "# Object Literals\n\nSometimes it's really convenient to be able to write a whole object inline. In Pony, this is called an object literal, and it does pretty much exactly what an object literal in JavaScript does: it creates an object that you can use immediately.\n\nBut Pony is statically typed, so an object literal also creates an anonymous type that the object literal fulfills. This is similar to anonymous classes in Java and C#. In Pony, an anonymous type can provide any number of traits and interfaces.\n"} +{"id": "Pony/net-OSSockOpt-_438.txt", "contents": "fun box sctp_pcb_flags_wakeinput()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_wakeoutput\u00b6\n[Source]\nfun box sctp_pcb_flags_wakeoutput()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_was_aborted\u00b6\n[Source]"} +{"id": "Pony/2_ops_5.txt", "contents": "| `<` | `lt()` | Less than |\n| `<=` | `le()` | Less than or equal |\n| `>=` | `ge()` | Greater than or equal |\n| `>` | `gt()` | Greater than |\n| `>~` | `gt_unsafe()` | Unsafe greater than |\n| `+~` | `add_unsafe()` | Unsafe Addition |\n| `-~` | `sub_unsafe()` | Unsafe Subtraction |\n| `*~` | `mul_unsafe()` | Unsafe Multiplication |\n| `/~` | `div_unsafe()` | Unsafe Division |\n| `%~` | `rem_unsafe()` | Unsafe Remainder |\n| `%%~` | `mod_unsafe()` | Unsafe Modulo | Starting with version `0.26.1` |\n| `<<~` | `shl_unsafe()` | Unsafe left bit shift |\n| `>>~` | `shr_unsafe()` | Unsafe right bit shift |\n| `==~` | `eq_unsafe()` | Unsafe equality |\n| `!=~` | `ne_unsafe()` | Unsafe non-equality |\n| `<~` | `lt_unsafe()` | Unsafe less than |\n| `<=~` | `le_unsafe()` | Unsafe less than or equal |\n| `>=~` | `ge_unsafe()` | Unsafe greater than or equal |\n| `+?` | `add_partial()?` | Partial Addition |\n| `-?` | `sub_partial()?` | Partial Subtraction |"} +{"id": "Pony/src-builtin-string-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-FloatingPoint-_25.txt", "contents": "\nBool val\n\n\ninfinite\u00b6\n[Source]\nfun box infinite()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnan\u00b6\n[Source]\nfun box nan()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/collections-Range-_6.txt", "contents": "None val\n\n\nis_infinite\u00b6\n[Source]\nfun box is_infinite()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nis_empty\u00b6\n[Source]\nfun box is_empty()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_socket-_32.txt", "contents": "\nnew create(\nout: OutStream,\ndestination: NetAddress)\n=>\n_out = out\n_destination = destination\n\nfun ref listening(sock: UDPSocket ref) =>\nsock.write(\"hello world\", _destination)\n\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8] iso,\nfrom: NetAddress)\n=>\n_out.print(\"GOT:\" + String.from_array(consume data))\nsock.dispose()\n\nfun ref not_listening(sock: UDPSocket ref) =>"} +{"id": "Pony/src-pony_bench-benchmark-_0.txt", "contents": "\n\n\n\n\n\n\nbenchmark.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-itertools-iter-_76.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.enum()\n```\n`(0, 1) (1, 2) (2, 3)`\n\"\"\"\nIter[(B, A)](\nobject\nvar _i: B = 0\n\nfun ref has_next(): Bool => _iter.has_next()\n\nfun ref next(): (B, A) ? =>\n(_i = _i + 1, _iter.next()?)\nend)\n\nfun ref filter(f: {(A!): Bool ?} box): Iter[A!]^ =>\n\"\"\""} +{"id": "Pony/buffered--index-_0.txt", "contents": "\n\n\n\n\n\n\nBuffered Package\u00b6\nThe Buffered package provides two classes, Writer and Reader, for\nwriting and reading messages using common encodings. These classes are\nuseful when dealing with things like network data and binary file\nformats.\nExample program\u00b6\nuse \"buffered\"\n\nactor Main\nnew create(env: Env) =>\nlet reader = Reader\nlet writer = Writer\n"} +{"id": "Pony/src-files-directory-_40.txt", "contents": "\nifdef linux or bsd then\nlet fd' =\n@openat(_fd, target.cstring(),\n@ponyint_o_rdwr()\nor @ponyint_o_creat()\nor @ponyint_o_cloexec(),\nI32(0x1B6))\nrecover File._descriptor(fd', path')? end\nelse\nrecover File(path') end\nend\n\nfun open_file(target: String): File iso^ ? =>\n\"\"\"\nOpen for read only, failing if it doesn't exist.\n\"\"\"\nif\nnot path.caps(FileRead)\nor (_fd == -1)"} +{"id": "Pony/src-net-tcp_connection-_67.txt", "contents": "\nfun ref connected(conn: TCPConnection ref) =>\nconn.write(\"hello world\")\n\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8] iso,\ntimes: USize)\n: Bool\n=>\n_out.print(\"GOT:\" + String.from_array(consume data))\nconn.close()\ntrue\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nTCPConnection(TCPConnectAuth(env.root),"} +{"id": "Pony/encode-base64-Base64-_6.txt", "contents": "not an error. Non-base64 data, other than whitespace (which can appear at\nany time), is an error.\nfun box decode[optional A: Seq[U8 val] iso](\ndata: ReadSeq[U8 val] box,\nat62: U8 val = 43,\nat63: U8 val = 47,\npad: U8 val = 61)\n: A^ ?\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\nat62: U8 val = 43\nat63: U8 val = 47\npad: U8 val = 61\n\nReturns\u00b6\n\nA^ ?\n"} +{"id": "Pony/pony_check-Generators-_38.txt", "contents": "Create a generator for ISize values.\nfun box isize(\nmin: ISize val = call,\nmax: ISize val = call)\n: Generator[ISize val] box\n\nParameters\u00b6\n\nmin: ISize val = call\nmax: ISize val = call\n\nReturns\u00b6\n\nGenerator[ISize val] box\n\n\nbyte_string\u00b6\n[Source]\nCreate a generator for strings\ngenerated from the bytes returned by the generator gen,"} +{"id": "Pony/src-collections-heap-_8.txt", "contents": "embed _data: Array[A]\n\nnew create(len: USize) =>\n\"\"\"\nCreate an empty heap with space for `len` elements.\n\"\"\"\n_data = Array[A](len)\n\nfun ref clear() =>\n\"\"\"\nRemove all elements from the heap.\n\"\"\"\n_data.clear()\n\nfun size(): USize =>\n\"\"\"\nReturn the number of elements in the heap.\n\"\"\"\n_data.size()\n"} +{"id": "Pony/src-collections-sort-_0.txt", "contents": "\n\n\n\n\n\n\nsort.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-hashable-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123use @memcmp[I32](dst: Pointer[None] tag, src: Pointer[None] tag, len: USize)\nuse @ponyint_hash_block[USize](ptr: Pointer[None] tag, size: USize)\nuse @ponyint_hash_block64[U64](ptr: Pointer[None] tag, size: USize)\n\ninterface Hashable\n\"\"\"\nAnything with a hash method is hashable.\n\"\"\"\nfun hash(): USize"} +{"id": "Pony/buffered-Writer-_14.txt", "contents": "\ndata: F32 val\n\nReturns\u00b6\n\nNone val\n\n\nu64_le\u00b6\n[Source]\nWrite a U64 to the buffer in little-endian byte order.\nfun ref u64_le(\ndata: U64 val)\n: None val\n\nParameters\u00b6\n\ndata: U64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_238.txt", "contents": "fun box ip_router_alert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rssbucketid\u00b6\n[Source]\nfun box ip_rssbucketid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rss_listen_bucket\u00b6\n[Source]"} +{"id": "Pony/src-net-net_address-_20.txt", "contents": "\"\"\"\n(@ntohl(_addr1),\n@ntohl(_addr2),\n@ntohl(_addr3),\n@ntohl(_addr4)\n)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_53.txt", "contents": "let _iter: Iterator[A]\n\nnew create(iter: Iterator[A]) =>\n_iter = iter\n\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): A ? =>\n_iter.next()?\n\nnew maybe(value: (A | None)) =>\n_iter =\nobject is Iterator[A]\nvar _value: (A | None) = consume value\n\nfun has_next(): Bool => _value isnt None\n\nfun ref next(): A ? => (_value = None) as A\nend"} +{"id": "Pony/src-builtin-unsigned-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/src-builtin-unsigned-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/pony_check-Randomness-_13.txt", "contents": "fun ref i128(\nmin: I128 val = call,\nmax: I128 val = call)\n: I128 val\n\nParameters\u00b6\n\nmin: I128 val = call\nmax: I128 val = call\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nGenerate a ILong in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/net-OSSockOpt-_400.txt", "contents": "fun box sctp_log_at_send_2_sctp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_maxburst_enable\u00b6\n[Source]\nfun box sctp_log_maxburst_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_rwnd_enable\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_81.txt", "contents": "### Example\n```pony\nIter[I64]([as I64: 1; -2; 4; 7; -5])\n.filter_map[USize](\n{(i: I64): (USize | None) => if i >= 0 then i.usize() end })\n```\n`1 4 7`\n```\n\"\"\"\nfilter_map_stateful[B]({(a: A!): (B^ | None) ? => f(a) ? })\n\nfun ref flat_map[B](f: {(A!): Iterator[B] ?} box): Iter[B]^ =>\n\"\"\"\nReturn an iterator over the values of the iterators produced from the\napplication of the given function.\n"} +{"id": "Pony/net-UDPSocket-_23.txt", "contents": "set_ip_multicast_loop\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, IP_MULTICAST_LOOP, ...)\nfun ref set_ip_multicast_loop(\nloopback: Bool val)\n: U32 val\n\nParameters\u00b6\n\nloopback: Bool val\n\nReturns\u00b6\n\nU32 val\n\n\nset_ip_multicast_ttl\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, IP_MULTICAST_TTL, ...)\nfun ref set_ip_multicast_ttl("} +{"id": "Pony/src-builtin-string-_81.txt", "contents": "1612\n1613\n1614\n1615\n1616\n1617\n1618\n1619\n1620\n1621\n1622\n1623\n1624\n1625\n1626\n1627\n1628\n1629\n1630\n1631"} +{"id": "Pony/builtin-I8-_44.txt", "contents": "fun box ge(\ny: I8 val)\n: Bool val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: I8 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-TCPConnectionNotify-_12.txt", "contents": "\nthrottled\u00b6\n[Source]\nCalled when the connection starts experiencing TCP backpressure. You should\nrespond to this by pausing additional calls to write and writev until\nyou are informed that pressure has been released. Failure to respond to\nthe throttled notification will result in outgoing data queuing in the\nconnection and increasing memory usage.\nfun ref throttled(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/builtin-DoNotOptimise-_0.txt", "contents": "\n\n\n\n\n\n\nDoNotOptimise\u00b6\n[Source]\nContains functions preventing some compiler optimisations, namely dead code\nremoval. This is useful for benchmarking purposes.\nprimitive val DoNotOptimise\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: DoNotOptimise val^\n\nReturns\u00b6"} +{"id": "Pony/builtin-I32-_43.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: I32 val)\n: Bool val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_49.txt", "contents": "cut\u00b6\n[Source]\nReturns a version of the string with the given range deleted.\nIndex range [from .. to) is half-open.\nfun box cut(\nfrom: ISize val,\nto: ISize val = call)\n: String iso^\n\nParameters\u00b6\n\nfrom: ISize val\nto: ISize val = call\n\nReturns\u00b6\n\nString iso^\n\n\ncut_in_place\u00b6"} +{"id": "Pony/generics-and-reference-capabilities_7.txt", "contents": "\nWe have `c` as an `iso` and are trying to assign it to `_c`. This creates two aliases to the same object, something that `iso` does not allow. To fix it for the `iso` case we have to `consume` the parameter. The correct constructor should be:\n\n```pony\nnew create(c: String iso) =>\n_c = consume c\n```\n\nA similar issue exists with the `set` method. Here we also need to consume the variable `c` that is passed in:\n\n```pony\nfun set(c: String iso) => _c = consume c\n```\n\nNow we have a version of `Foo` that is working correctly for `iso`. Note how applying the arrow type to the `get` method also works for `iso`. But here the result is a different one, by applying [viewpoint adaptation](/reference-capabilities/combining-capabilities.md) we get from `ref->iso` (with `ref` being the capability of the receiver, the `Foo` object referenced by `a`) to `iso`. Through the magic of [automatic receiver recovery](/reference-capabilities/recovering-capabilities.md) we can call the `string` method on it:\n\n```pony\nclass Foo\nvar _c: String iso\n"} +{"id": "Pony/src-builtin-real-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/trust-boundary_0.txt", "contents": "# Trust Boundary\n\nWe mentioned previously that the C-FFI can be used to break pretty much every guarantee that Pony makes. This is because, once you've called into C, you are executing arbitrary machine code that can stomp memory addresses, write to anything, and generally be pretty badly behaved.\n"} +{"id": "Pony/files-FileStream-_4.txt", "contents": "flush\u00b6\n[Source]\nFlush pending data to write.\nbe flush()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-real-_0.txt", "contents": "\n\n\n\n\n\n\nreal.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/collections-ListValues-_2.txt", "contents": "has_next\u00b6\n[Source]\nIndicates whether there are any values remaining in the iterator.\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturn the next node in the iterator, advancing the iterator by one element.\nOrder of return is determined by reverse argument during creation.\nfun ref next()\n: N->A ?\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-signed-_74.txt", "contents": "_SignedPartialArithmetic.rem_partial[ILong, ULong](this, y)?\n\nfun divrem_partial(y: ILong): (ILong, ILong) ? =>\n_SignedPartialArithmetic.divrem_partial[ILong, ULong](this, y)?\n\nfun fld_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.fld_partial[ILong, ULong](this, y)?\n\nfun mod_partial(y: ILong): ILong ? =>\n_SignedPartialArithmetic.mod_partial[ILong, ULong](this, y)?\n\nprimitive ISize is SignedInteger[ISize, USize]\nnew create(value: ISize) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.isize()\n\nnew min_value() =>\nifdef ilp32 then\n-0x8000_0000\nelse\n-0x8000_0000_0000_0000"} +{"id": "Pony/pony_check-GenObj-_4.txt", "contents": ": Iterator[(T^ | (T^ , Iterator[T^] ref))] ref^\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nIterator[(T^ | (T^ , Iterator[T^] ref))] ref^\n\n\nvalue_iter\u00b6\n[Source]\nfun box value_iter(\nrnd: Randomness ref)\n: Iterator[T^] ref\n\nParameters\u00b6\n\nrnd: Randomness ref"} +{"id": "Pony/src-net-udp_socket-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/bureaucracy-Custodian-_4.txt", "contents": "\nParameters\u00b6\n\nworker: DisposableActor tag\n\n\ndispose\u00b6\n[Source]\nDispose of the actors in the set and then clear the set.\nbe dispose()\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Integer-_12.txt", "contents": "Subtract y from this number.\nIf the operation overflows/underflows this function errors.\nfun box sub_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nmul_partial\u00b6\n[Source]\nMultiply y with this number.\nIf the operation overflows this function errors.\nfun box mul_partial("} +{"id": "Pony/collections-List-_21.txt", "contents": "\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nNone val\n\n\npop\u00b6\n[Source]\nRemoves the tail value, raising an error if the tail is empty.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.pop() end // Returns \"c\" and my_list is [\"a\"; \"b\"]\n\nfun ref pop()\n: A^ ?\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_529.txt", "contents": "fun box so_timestamp_monotonic()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_type\u00b6\n[Source]\nfun box so_type()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_upcallclosewait\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_49.txt", "contents": "\"\"\"\nif\nnot path.caps(FileLink)\nor not path.caps(FileLookup)\nor not path.caps(FileCreate)\nor not source.caps(FileLink)\nor (_fd == -1)\nthen\nreturn false\nend\n\ntry\nlet path' = FilePath.from(path, link_name, path.caps)?\n\nifdef linux or bsd then\n0 == @symlinkat(source.path.cstring(), _fd, link_name.cstring())\nelse\nsource.symlink(path')\nend\nelse"} +{"id": "Pony/src-promises-fulfill-_0.txt", "contents": "\n\n\n\n\n\n\nfulfill.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files-FileRemove-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileRemove val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-ReadSeq-_0.txt", "contents": "\n\n\n\n\n\n\nReadSeq[A: A]\u00b6\n[Source]\nThe readable interface of a sequence.\ninterface box ReadSeq[A: A]\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturns the number of elements in the sequence.\nfun box size()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_51.txt", "contents": "Bool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]"} +{"id": "Pony/net-DNS-_2.txt", "contents": "\nArray[NetAddress val] iso^\n\n\nip4\u00b6\n[Source]\nGets all IPv4 addresses for a host and service.\nfun box ip4(\nauth: DNSAuth val,\nhost: String val,\nservice: String val)\n: Array[NetAddress val] iso^\n\nParameters\u00b6\n\nauth: DNSAuth val\nhost: String val\nservice: String val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-map-_38.txt", "contents": "| (_, _) => return i\nend\nend\nerror\n\nfun index(i: USize): (this->K, this->V) ? =>\n\"\"\"\nReturns the key and value at a given index.\nRaise an error if the index is not populated.\n\"\"\"\n_array(i)? as (this->K, this->V)\n\nfun ref compact() =>\n\"\"\"\nMinimise the memory used for the map.\n\"\"\"\n_resize(((_size * 4) / 3).next_pow2().max(8))\n\nfun clone[H2: HashFunction[this->K!] val = H]()\n: HashMap[this->K!, this->V!, H2]^"} +{"id": "Pony/net-OSSockOpt-_61.txt", "contents": "fun box ipproto_ttp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_udp\u00b6\n[Source]\nfun box ipproto_udp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_udplite\u00b6\n[Source]"} +{"id": "Pony/src-builtin-seq-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_396.txt", "contents": "fun box sctp_initmsg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_interleaving_supported\u00b6\n[Source]\nfun box sctp_interleaving_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_i_want_mapped_v4_addr\u00b6\n[Source]"} +{"id": "Pony/collections-Flags-_8.txt", "contents": "\nintersect\u00b6\n[Source]\nThe intersection of this and that.\nfun ref intersect(\nthat: Flags[A, B] box)\n: None val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nNone val\n\n\ndifference\u00b6\n[Source]\nThe symmetric difference of this and that."} +{"id": "Pony/src-term-ansi_term-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/files-Directory-_12.txt", "contents": "\nParameters\u00b6\n\ntarget: String val\nuid: U32 val\ngid: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ntouchat\u00b6\n[Source]\nSet the last access and modification times of the directory to now.\nfun box touchat(\ntarget: String val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/itertools-Iter-_26.txt", "contents": ".intersperse(8)\n\n0 8 1 8 2\nfun ref intersperse(\nvalue: A,\nn: USize val = 1)\n: Iter[A!] ref\n\nParameters\u00b6\n\nvalue: A\nn: USize val = 1\n\nReturns\u00b6\n\nIter[A!] ref\n\n\nlast\u00b6\n[Source]"} +{"id": "Pony/collections-Reverse-_3.txt", "contents": "\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/src-net-ossockopt-_53.txt", "contents": "1052\n1053\n1054\n1055\n1056\n1057\n1058\n1059\n1060\n1061\n1062\n1063\n1064\n1065\n1066\n1067\n1068\n1069\n1070\n1071"} +{"id": "Pony/src-files-file-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/collections-HashSet-_3.txt", "contents": "[Source]\nReturn the value if its in the set, otherwise raise an error.\nfun box apply(\nvalue: box->A!)\n: this->A ?\n\nParameters\u00b6\n\nvalue: box->A!\n\nReturns\u00b6\n\nthis->A ?\n\n\ncontains\u00b6\n[Source]\nChecks whether the set contains the value.\nfun box contains(\nvalue: box->A!)"} +{"id": "Pony/src-builtin-any-_0.txt", "contents": "\n\n\n\n\n\n\nany.pony\n\n1interface tag Any\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/calling-c_20.txt", "contents": "\nFortunately, avoiding this limitation is relatively painless. Whenever you need to call an FFI function from a default method implementation, consider moving said function to a separate type:\n\n```pony\nuse @printf[I32](fmt: Pointer[None] tag, ...)\n\ntrait Foo\nfun apply() =>\n// OK\nPrintf(\"Hello from trait Foo\\n\")\n\nprimitive Printf\nfun apply(str: String) =>\n@printf(str.cstring())\n\nactor Main is Foo\nnew create(env: Env) =>\nthis.apply()\n```\n"} +{"id": "Pony/term-Readline-_13.txt", "contents": "alt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\npage_down\u00b6\n[Source]\nfun ref page_down(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val"} +{"id": "Pony/collections-persistent-Nil-_16.txt", "contents": "\ntake\u00b6\n[Source]\nThere are no elements to take from the empty list.\nfun box take(\nn: USize val)\n: Nil[A] val\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n\nNil[A] val\n\n\ntake_while\u00b6\n[Source]\nThere are no elements to take from the empty list."} +{"id": "Pony/recursion_1.txt", "contents": "```\n\nThe compiler can optimise a tail-recursive function to a loop, completely avoiding call stack growth. Note that this is an _optimisation_ which is only performed in release builds (i.e. builds without the `-d` flag passed to ponyc.) If you need to avoid stack growth in debug builds as well then you have to write your function as a loop manually.\n\nIf the tail-recursive version of your algorithm isn't practical to implement, there are other ways to control stack growth depending on your algorithm. For example, you can implement your algorithm using an explicit stack data structure instead of implicitly using the call stack to store data.\n\nNote that light recursion usually doesn't cause problems. Unless your amount of recursive calls is in the hundreds, you're unlikely to encounter this problem.\n"} +{"id": "Pony/src-itertools-iter-_84.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.fold[I64](0, {(sum, x) => sum + x })\n```\n`6`\n\"\"\"\nvar acc' = consume acc\nfor a in _iter do\nacc' = f(consume acc', a)\nend\nacc'\n\nfun ref fold_partial[B](acc: B, f: {(B, A!): B^ ?} box): B^ ? =>\n\"\"\"\nA partial version of `fold`.\n\"\"\"\nvar acc' = consume acc\nfor a in _iter do"} +{"id": "Pony/src-builtin-real-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-I8-_5.txt", "contents": "\nI8 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U64-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/pony_check-Property4-_1.txt", "contents": "The Generator for the first argument to your property4 method.\nfun box gen1()\n: Generator[T1] box\n\nReturns\u00b6\n\nGenerator[T1] box\n\n\ngen2\u00b6\n[Source]\nThe Generator for the second argument to your property4 method.\nfun box gen2()\n: Generator[T2] box\n\nReturns\u00b6\n\nGenerator[T2] box\n\n"} +{"id": "Pony/pony_check-Generator-_12.txt", "contents": "\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nIterator[(T^ , Iterator[T^] ref)] ref\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Integer-_38.txt", "contents": "y: box->A\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/5_methods_6.txt", "contents": "new from_int(x: U32) =>\n_x = x\n\nfun get(): U32 =>\n_x\n\nclass Bar\nfun f() =>\nvar a: Foo = Foo.from_int(3)\nvar b: U32 = a.get()\nvar c: U32 = g(b)\n\nfun g(x: U32): U32 =>\nx + 1\n\n```\n\nConstructors can also be called on an expression. Here an object is created of the same type as the specified expression - this is equivalent to directly specifying the type.\n\n```pony"} +{"id": "Pony/src-files-path-_29.txt", "contents": "Determine if a byte is a path separator.\n\"\"\"\nifdef windows then\n(c == '/') or (c == '\\\\')\nelse\nc == '/'\nend\n\nfun tag sep(): String =>\n\"\"\"\nReturn the path separator as a string.\n\"\"\"\nifdef windows then \"\\\\\" else \"/\" end\n\nfun is_abs(path: String): Bool =>\n\"\"\"\nReturn true if the path is an absolute path.\n\"\"\"\ntry\nifdef windows then"} +{"id": "Pony/src-net-tcp_connection-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-cli-command_spec-_53.txt", "contents": "\nnew val from_concat(ss0: _StringSeq val, ss1: _StringSeq val) =>\nstrings = ss0.strings.concat(ss1.strings.values())\n\nfun string(): String iso^ =>\nlet str = recover String() end\nstr.push('[')\nfor s in strings.values() do\nif str.size() > 1 then str.push(',') end\nstr.append(s)\nend\nstr.push(']')\nstr\n\nfun size(): USize => strings.size()\nfun apply(i: USize): this->String ? => strings(i)?\nfun values(): Iterator[this->String]^ => strings.values()\n\ntype _Value is (Bool | String | I64 | U64 | F64 | _StringSeq val)\n"} +{"id": "Pony/pony_bench-BenchmarkList-_0.txt", "contents": "\n\n\n\n\n\n\nBenchmarkList\u00b6\n[Source]\ninterface tag BenchmarkList\n\nPublic Functions\u00b6\nbenchmarks\u00b6\n[Source]\nfun tag benchmarks(\nbench: PonyBench tag)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-I8-_27.txt", "contents": "fun box shr_unsafe(\ny: U8 val)\n: I8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nI8 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-persistent-vec-_29.txt", "contents": "new create(v: Vec[A]) => _pairs = VecPairs[A](v)\n\nfun has_next(): Bool => _pairs.has_next()\n\nfun ref next(): val->A ? => _pairs.next()?._2\n\nclass VecPairs[A: Any #share]\nlet _leaf_nodes: Array[Array[A] val]\nvar _idx: USize = 0\nvar _i: USize = 0\n\nnew create(v: Vec[A]) =>\n_leaf_nodes = v._leaf_nodes()\n\nfun has_next(): Bool =>\n_leaf_nodes.size() > 0\n\nfun ref next(): (USize, A) ? =>\nvar leaves = _leaf_nodes(0)?\nlet v = leaves(_idx = _idx + 1)?"} +{"id": "Pony/collections-MinHeapPriority-_0.txt", "contents": "\n\n\n\n\n\n\nMinHeapPriority[A: Comparable[A] #read]\u00b6\n[Source]\nprimitive val MinHeapPriority[A: Comparable[A] #read] is\n_BinaryHeapPriority[A] val\n\nImplements\u00b6\n\n_BinaryHeapPriority[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_0.txt", "contents": "\n\n\n\n\n\n\n_process.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-Integer-_11.txt", "contents": "\nadd_partial\u00b6\n[Source]\nAdd y to this number.\nIf the operation overflows this function errors.\nfun box add_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nsub_partial\u00b6\n[Source]"} +{"id": "Pony/src-collections-list_node-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_check-property_helper-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/pony_check-Property1UnitTest-_2.txt", "contents": "create\u00b6\n[Source]\nWrap a Property1 to make it mimic the PonyTest\nUnitTest.\nIf name' is given, use this as the test name.\nIf not, use the property's name().\nnew iso create(\np1: Property1[T] iso,\nname': (String val | None val) = reference)\n: Property1UnitTest[T] iso^\n\nParameters\u00b6\n\np1: Property1[T] iso\nname': (String val | None val) = reference\n\nReturns\u00b6\n\nProperty1UnitTest[T] iso^\n"} +{"id": "Pony/net-OSSockOpt-_349.txt", "contents": "fun box sctp_cause_resource_shortage()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_restart_w_newaddr\u00b6\n[Source]\nfun box sctp_cause_restart_w_newaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_stale_cookie\u00b6\n[Source]"} +{"id": "Pony/4_traits-and-interfaces_4.txt", "contents": "# Nominal and structural subtyping in Pony\n\nWhen discussing subtyping in Pony, it is common to say that `trait` is nominal subtyping and `interface` is structural subtyping, however, that isn't really true.\n\nBoth `trait` and `interface` can establish a relationship via nominal subtyping. Only `interface` can be used for structural subtyping.\n"} +{"id": "Pony/src-builtin-string-_73.txt", "contents": "1452\n1453\n1454\n1455\n1456\n1457\n1458\n1459\n1460\n1461\n1462\n1463\n1464\n1465\n1466\n1467\n1468\n1469\n1470\n1471"} +{"id": "Pony/src-buffered-reader-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/builtin-FloatingPoint-_70.txt", "contents": "USize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ULong-_46.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: ULong val)\n: Bool val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/bureaucracy-Registrar-_3.txt", "contents": "fun tag apply[optional A: Any tag](\nkey: String val)\n: Promise[A] tag\n\nParameters\u00b6\n\nkey: String val\n\nReturns\u00b6\n\nPromise[A] tag\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U8-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_104.txt", "contents": "_set(_size, 0)\nend\nelseif (_size + 1) < _alloc then\n_alloc = (_size + 1)\nlet old_ptr = _ptr = Pointer[U8]._alloc(_alloc)\nold_ptr._copy_to(_ptr, _size)\n_set(_size, 0)\nend\n\nfun ref recalc() =>\n\"\"\"\nRecalculates the string length. This is only needed if the string is\nchanged via an FFI call. If a null terminator byte is not found within the\nallocated length, the size will not be changed.\n\"\"\"\nvar s: USize = 0\n\nwhile (s < _alloc) and (_ptr._apply(s) > 0) do\ns = s + 1\nend"} +{"id": "Pony/signals-Sig-_3.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\ntrap\u00b6\n[Source]\nfun box trap()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nabrt\u00b6\n[Source]\nfun box abrt()\n: U32 val\n"} +{"id": "Pony/src-collections-set-_17.txt", "contents": "fun size(): USize =>\n\"\"\"\nThe number of items in the set.\n\"\"\"\n_map.size()\n\nfun space(): USize =>\n\"\"\"\nThe available space in the set.\n\"\"\"\n_map.space()\n\nfun apply(value: box->A!): this->A ? =>\n\"\"\"\nReturn the value if its in the set, otherwise raise an error.\n\"\"\"\n_map(value)?\n\nfun contains(value: box->A!): Bool =>\n\"\"\""} +{"id": "Pony/files-FileRead-_2.txt", "contents": "\nthat: FileRead val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileRead val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileRead val\n\nReturns\u00b6\n"} +{"id": "Pony/capsicum-CapRights0-_2.txt", "contents": "descriptor\u00b6\n[Source]\nInitialises with the rights on the given file descriptor.\nnew ref descriptor(\nfd: I32 val)\n: CapRights0 ref^\n\nParameters\u00b6\n\nfd: I32 val\n\nReturns\u00b6\n\nCapRights0 ref^\n\n\nPublic Functions\u00b6\nset\u00b6\n[Source]\nfun ref set("} +{"id": "Pony/src-promises-promise-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-collections-list-_97.txt", "contents": "else\nerror\nend\n\nclass ListValues[A, N: ListNode[A] #read] is Iterator[N->A]\n\"\"\"\nIterate over the values in a `List`.\n\"\"\"\nvar _next: (N | None)\nlet _reverse: Bool\n\nnew create(head: (N | None), reverse: Bool = false) =>\n\"\"\"\nBuild the iterator over values.\n\n`reverse` of `false` iterates forward, while\n`reverse` of `true` iterates in reverse.\n\"\"\"\n_next = head\n_reverse = reverse"} +{"id": "Pony/net-OSSockOpt-_472.txt", "contents": "fun box sock_raw()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_rdm\u00b6\n[Source]\nfun box sock_rdm()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_seqpacket\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_55.txt", "contents": "\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\nfun box gt(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-random-xoroshiro-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/serialise-Serialise-_0.txt", "contents": "\n\n\n\n\n\n\nSerialise\u00b6\n[Source]\nprimitive val Serialise\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Serialise val^\n\nReturns\u00b6\n\nSerialise val^"} +{"id": "Pony/net-UDPSocket-_19.txt", "contents": "| 0 =>\n// System call was successful\n| let errno: U32 =>\n// System call failed\nend\n\nfun ref setsockopt(\nlevel: I32 val,\noption_name: I32 val,\noption: Array[U8 val] ref)\n: U32 val\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\noption: Array[U8 val] ref\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Real-_14.txt", "contents": "Parameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6"} +{"id": "Pony/src-files-file-_60.txt", "contents": "end\nelse\nlet r = @fdatasync(_fd)\nif r < 0 then\n_errno = _get_error()\nend\nend\nend\n_unsynced_data = false\n\nfun ref set_length(len: USize): Bool =>\n\"\"\"\nChange the file size. If it is made larger, the new contents are undefined.\n\"\"\"\nif path.caps(FileTruncate) and writeable and (_fd != -1) then\nlet pos = position()\nlet result = ifdef windows then\n@_chsize_s(_fd, len.i64())\nelse\nifdef linux then"} +{"id": "Pony/builtin-U128-_0.txt", "contents": "\n\n\n\n\n\n\nU128\u00b6\n[Source]\nprimitive val U128 is\nUnsignedInteger[U128 val] val\n\nImplements\u00b6\n\nUnsignedInteger[U128 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Vec-_10.txt", "contents": "Returns true if the vector contains value, false otherwise.\nfun val contains(\nvalue: val->A,\npredicate: {(A, A): Bool}[A] val = lambda)\n: Bool val\n\nParameters\u00b6\n\nvalue: val->A\npredicate: {(A, A): Bool}[A] val = lambda\n\nReturns\u00b6\n\nBool val\n\n\nslice\u00b6\n[Source]\nReturn a vector that is a clone of a portion of this vector. The range is\nexclusive and saturated."} +{"id": "Pony/pony_check-PonyCheck-_0.txt", "contents": "\n\n\n\n\n\n\nPonyCheck\u00b6\n[Source]\nprimitive val PonyCheck\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: PonyCheck val^\n\nReturns\u00b6\n\nPonyCheck val^"} +{"id": "Pony/pony_test-UnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nUnitTest\u00b6\n[Source]\nEach unit test class must provide this trait. Simple tests only need to\ndefine the name() and apply() functions. The remaining functions specify\nadditional test options.\ntrait ref UnitTest\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nReport the test name, which is used when printing test results and on the\ncommand line to select tests to run.\nfun box name()"} +{"id": "Pony/src-builtin-std_stream-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-array-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-net-tcp_connection_notify-_7.txt", "contents": "132\n133\n134\n135\n136interface TCPConnectionNotify\n\"\"\"\nNotifications for TCP connections.\n\nFor an example of using this class please see the documentation for the\n`TCPConnection` and `TCPListener` actors.\n\"\"\"\nfun ref accepted(conn: TCPConnection ref) =>\n\"\"\"\nCalled when a TCPConnection is accepted by a TCPListener.\n\"\"\"\nNone\n\nfun ref proxy_via(host: String, service: String): (String, String) =>\n\"\"\"\nCalled before before attempting to connect to the destination server"} +{"id": "Pony/src-format-prefix_spec-_0.txt", "contents": "\n\n\n\n\n\n\nprefix_spec.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11trait val PrefixSpec"} +{"id": "Pony/capsicum-Cap-_15.txt", "contents": "fun box fcntl()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nflock\u00b6\n[Source]\nfun box flock()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfpathconf\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_18.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: U32 val)\n: (U32 val , U32 val) ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-array-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/src-pony_check-generator-_84.txt", "contents": "fun shrink(u: U): ValueAndShrink[U] =>\n\"\"\"\nWe can only shrink if T is a subtype of U.\n\nThis method should in general not be called on this generator\nas it is always returning shrinks with the call to `generate`\nand they should be used for executing the shrink, but in case\na strange hierarchy of generators is used, which does not make use of\nthe pre-generated shrink results, we keep this method here.\n\"\"\"\nmatch u\n| let ut: T =>\n(let uts: T, let shrunken: Iterator[T^]) = _gen.shrink(consume ut)\n(fn(consume uts), _map_shrunken(shrunken))\nelse\n(consume u, Poperator[U].empty())\nend\n\nfun _map_shrunken(shrunken: Iterator[T^]): Iterator[U^] =>\nIter[T^](shrunken)"} +{"id": "Pony/src-bureaucracy-custodian-_4.txt", "contents": "72\n73use \"collections\"\n\nactor Custodian\n\"\"\"\nA Custodian keeps a set of actors to dispose. When the Custodian is disposed,\nit disposes of the actors in its set and then clears the set.\n"} +{"id": "Pony/files-FileBadFileNumber-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileBadFileNumber val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileBadFileNumber val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/pony_bench--index-_2.txt", "contents": "\nnew iso create(n: U64) =>\n_n = n\n\nfun name(): String =>\n\"_Fib(\" + _n.string() + \")\"\n\nfun apply() =>\nDoNotOptimise[U64](_fib(_n))\nDoNotOptimise.observe()\n\nfun _fib(n: U64): U64 =>\nif n < 2 then 1\nelse _fib(n - 1) + _fib(n - 2)\nend\n\nclass iso _Timer is AsyncMicroBenchmark\n// Asynchronous benchmark of timer.\nlet _ts: Timers = Timers\nlet _ns: U64"} +{"id": "Pony/src-net-udp_socket-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-net-net_address-_17.txt", "contents": "\nifdef linux or windows then\n(@ponyint_address_length(this)).u8()\nelse\nifdef bigendian then\n((_family >> 8) and 0xff).u8()\nelse\n(_family and 0xff).u8()\nend\nend\n\nfun family() : U8 =>\n\"\"\"\nReturns the `family`.\n\"\"\"\n\nifdef linux or windows then\nifdef bigendian then\n((_family >> 8) and 0xff).u8()\nelse"} +{"id": "Pony/builtin-ISize-_9.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/src-time-timer-_7.txt", "contents": "the `apply` method of the `TimerNotify` object that was passed to it\nwhen it was created.\n\nThe following example waits 5 seconds and then fires every 2\nseconds, and when it fires the `TimerNotify` object prints how many\ntimes it has been called:\n\n```pony\nuse \"time\"\n\nactor Main\nnew create(env: Env) =>\nlet timers = Timers\nlet timer = Timer(Notify(env), 5_000_000_000, 2_000_000_000)\ntimers(consume timer)\n\nclass Notify is TimerNotify\nlet _env: Env\nvar _counter: U32 = 0\n"} +{"id": "Pony/as_1.txt", "contents": "# Expressing a different type of an object\n\nIn Pony, each object is an instance of a single concrete type, which is the most specific type for that object. But the object can also be held as part of a \"wider\" abstract type such as an interface, trait, or type union which the concrete type is said to be a subtype of.\n\n`as` (like `match`) allows a program to check the runtime type of an abstract-typed value to see whether or not the object matches a given type which is more specific. If it doesn't match the more specific type, then a runtime `error` is raised. For example:\n\n```pony\nclass Cat\nfun pet() =>\n...\n\ntype Animal is (Cat | Fish | Snake)\n\nfun pet(animal: Animal) =>\ntry\n// raises error if not a Cat\nlet cat: Cat = animal as Cat\ncat.pet()\nend\n```"} +{"id": "Pony/src-builtin-unsigned-_57.txt", "contents": "\nfun subc(y: U32): (U32, Bool) =>\n@\"llvm.usub.with.overflow.i32\"(this, y)\n\nfun mulc(y: U32): (U32, Bool) =>\n@\"llvm.umul.with.overflow.i32\"(this, y)\n\nfun divc(y: U32): (U32, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[U32](this, y)\n\nfun remc(y: U32): (U32, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[U32](this, y)\n\nfun add_partial(y: U32): U32 ? =>\n_UnsignedPartialArithmetic.add_partial[U32](this, y)?\n\nfun sub_partial(y: U32): U32 ? =>\n_UnsignedPartialArithmetic.sub_partial[U32](this, y)?\n\nfun mul_partial(y: U32): U32 ? =>"} +{"id": "Pony/net-DNS-_6.txt", "contents": "is_ip4\u00b6\n[Source]\nReturns true if the host is a literal IPv4 address.\nfun box is_ip4(\nhost: String val)\n: Bool val\n\nParameters\u00b6\n\nhost: String val\n\nReturns\u00b6\n\nBool val\n\n\nis_ip6\u00b6\n[Source]\nReturns true if the host is a literal IPv6 address.\nfun box is_ip6("} +{"id": "Pony/src-files-file_info-_11.txt", "contents": "let symlink: Bool = false\n\"\"\"`true` if `filepath` points to a symbolic link.\"\"\"\n\nlet broken: Bool = false\n\"\"\"`true` if `filepath` points to a broken symlink.\"\"\"\n\nnew val create(from: FilePath) ? =>\n\"\"\"\nThis will raise an error if the FileStat capability isn't available or the\npath doesn't exist.\n\"\"\"\nif not from.caps(FileStat) then\nerror\nend\n\nfilepath = from\n\nif not @pony_os_stat(from.path.cstring(), this) then\nerror\nend"} +{"id": "Pony/builtin-FloatingPoint-_21.txt", "contents": "Returns\u00b6\n\nBool val\n\n\ngt_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box gt_unsafe(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_36.txt", "contents": "try\n_Stringify.apply[T](_shrinker.next()?)\nelse\n// no more shrink samples, report previous failed example\nfail(failed_repr, round_num)\nreturn\nend\n// callback for asynchronous shrinking or aborting on error case\nlet run_notify =\nrecover val\nthis~complete_shrink(failed_repr, current_repr)\nend\nlet helper = PropertyHelper(\n_env,\nthis,\nrun_notify,\nthis._current_round,\n_params.string()\n)\n_pass = true // will be set to false by fail calls"} +{"id": "Pony/builtin-Less-_0.txt", "contents": "\n\n\n\n\n\n\nLess\u00b6\n[Source]\nprimitive val Less is\nEquatable[(Less val | Equal val | Greater val)] ref\n\nImplements\u00b6\n\nEquatable[(Less val | Equal val | Greater val)] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_544.txt", "contents": "fun box tcpi_opt_ecn_seen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_sack\u00b6\n[Source]\nfun box tcpi_opt_sack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_syn_data\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-HashSet-_4.txt", "contents": "\nParameters\u00b6\n\nvalue: val->A\n\nReturns\u00b6\n\nHashSet[A, H] val\n\n\nsub\u00b6\n[Source]\nReturn a set with the value removed.\nfun val sub(\nvalue: val->A)\n: HashSet[A, H] val\n\nParameters\u00b6\n\nvalue: val->A"} +{"id": "Pony/src-pony_bench-benchmark-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/ponypath_3.txt", "contents": "## Windows\n\n1. Create folder at `C:\\Users\\\\pony`.\n2. Right click on \"Start\" and click on \"Control Panel\". Select \"System and Security\", then click on \"System\".\n3. From the menu on the left, select the \"Advanced systems settings\".\n4. Click the \"Environment Variables\" button at the bottom.\n5. Click \"New\" from the \"User variables\" section.\n6. Type `PONYPATH` into the \"Variable name\" field.\n7. Type `%PONYPATH%;%USERPROFILE%\\pony` into the \"Variable value\" field.\n8. Click OK.\n\nYou can also add to `PONYPATH` from the command prompt via:\n\n```bash\nsetx PONYPATH %PONYPATH%;%USERPROFILE%\\pony\n```\n"} +{"id": "Pony/src-pony_test-pony_test-_54.txt", "contents": "for rec in _records.values() do\nif rec._report(_verbose) then\npass_count = pass_count + 1\nelse\nfail_count = fail_count + 1\nend\nend\n\n// Next we print the pass / fail stats.\n_env.out.print(\"----\")\n_env.out.print(\"---- \" + _records.size().string() + \" test\"\n+ _plural(_records.size()) + \" ran.\")\n_env.out.print(_Color.green() + \"---- Passed: \" + pass_count.string()\n+ _Color.reset())\n\nif fail_count == 0 then\n// Success, nothing failed.\nreturn\nend\n"} +{"id": "Pony/src-builtin-string-_140.txt", "contents": "let finish = offset_to_index(to).min(_size)\n\nif (start < _size) and (start < finish) and (finish <= _size) then\nlet fragment_len = finish - start\nlet new_size = _size - fragment_len\nvar i = start\n\nwhile i < new_size do\n_set(i, _ptr._apply(i + fragment_len))\ni = i + 1\nend\n\n_size = _size - fragment_len\n_set(_size, 0)\nend\n\nfun ref remove(s: String box): USize =>\n\"\"\"\nRemove all instances of s from the string. Returns the count of removed\ninstances."} +{"id": "Pony/src-pony_check-generator-_50.txt", "contents": "992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011"} +{"id": "Pony/src-cli-command-_15.txt", "contents": "Returns the option value as an U64, defaulting to 0.\n\"\"\"\ntry _value as U64 else U64(0) end\n\nfun f64(): F64 =>\n\"\"\"\nReturns the option value as an F64, defaulting to 0.0.\n\"\"\"\ntry _value as F64 else F64(0) end\n\nfun string_seq(): ReadSeq[String] val =>\n\"\"\"\nReturns the option value as a ReadSeq[String], defaulting to empty.\n\"\"\"\ntry\n_value as _StringSeq val\nelse\nrecover val Array[String]() end\nend\n"} +{"id": "Pony/src-collections-set-_25.txt", "contents": "r.set(value)\nend\nend\n\nfor value in that.values() do\ntry\nthis(value)?\nelse\nr.set(value)\nend\nend\nr\n\nfun without[K: HashFunction[this->A!] val = H](\nthat: this->HashSet[A, H])\n: HashSet[this->A!, K]^\n=>\n\"\"\"\nCreate a set with the elements of this that are not in that.\n\"\"\""} +{"id": "Pony/10_partial-application_1.txt", "contents": "# A simple case\n\nA simple case is to create a \"callback\" function. For example:\n\n```pony\nclass Foo\nvar _f: F64 = 0\n\nfun ref addmul(add: F64, mul: F64): F64 =>\n_f = (_f + add) * mul\n\nclass Bar\nfun apply() =>\nlet foo: Foo = Foo\nlet f = foo~addmul(3)\nf(4)\n```\n\nThis is a bit of a silly example, but hopefully, the idea is clear. We partially apply the `addmul` function on `foo`, binding the receiver to `foo` and the `add` argument to `3`. We get back an object, `f`, that has an `apply` method that takes a `mul` argument. When it's called, it in turn calls `foo.addmul(3, mul)`.\n"} +{"id": "Pony/collections-List-_13.txt", "contents": "i: USize val)\n: this->ListNode[A] ref ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->ListNode[A] ref ?\n\n\nremove\u00b6\n[Source]\nRemove the i-th node, raising an error if the index is out of bounds, and\nreturning the removed node.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.remove(0)? end // Returns a ListNode[String] containing \"a\" and List now contains [\"b\"; \"c\"]\n\nfun ref remove("} +{"id": "Pony/builtin-ULong-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_41.txt", "contents": "fun set_time(atime: (I64, I64), mtime: (I64, I64)): Bool =>\n\"\"\"\nSet the last access and modification times of a path to the given values.\n\"\"\"\nif not caps(FileTime) then\nreturn false\nend\n\nifdef windows then\nvar tv: (I64, I64) = (atime._1, mtime._1)\n0 == @_utime64(path.cstring(), addressof tv)\nelse\nvar tv: (ILong, ILong, ILong, ILong) =\n( atime._1.ilong(), atime._2.ilong() / 1000,\nmtime._1.ilong(), mtime._2.ilong() / 1000 )\n\n0 == @utimes(path.cstring(), addressof tv)\nend\n\nstruct ref _TokenPrivileges"} +{"id": "Pony/src-files-directory-_41.txt", "contents": "then\nerror\nend\n\nlet path' = FilePath.from(path, target, path.caps - FileWrite)?\n\nifdef linux or bsd then\nlet fd' =\n@openat(_fd, target.cstring(),\n@ponyint_o_rdonly() or @ponyint_o_cloexec(),\nI32(0x1B6))\nrecover File._descriptor(fd', path')? end\nelse\nrecover File.open(path') end\nend\n\nfun info(): FileInfo ? =>\n\"\"\"\nReturn a FileInfo for this directory. Raise an error if the fd is invalid\nor if we don't have FileStat permission."} +{"id": "Pony/capsicum-Cap-_5.txt", "contents": "fun box mmap()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_r\u00b6\n[Source]\nfun box mmap_r()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_w\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-real-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/encode-base64-Base64-_2.txt", "contents": "[Source]\nEncode for MIME (RFC 2045).\nfun box encode_mime(\ndata: ReadSeq[U8 val] box)\n: String iso^\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\n\nReturns\u00b6\n\nString iso^\n\n\nencode_url[optional A: Seq[U8 val] iso]\u00b6\n[Source]\nEncode for URLs (RFC 4648). Padding characters are stripped by default.\nfun box encode_url[optional A: Seq[U8 val] iso](\ndata: ReadSeq[U8 val] box,"} +{"id": "Pony/builtin-U8-_37.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_38.txt", "contents": "I8 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_228.txt", "contents": "fun box ip_pmtudisc_interface()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_omit\u00b6\n[Source]\nfun box ip_pmtudisc_omit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_probe\u00b6\n[Source]"} +{"id": "Pony/process-Signaled-_4.txt", "contents": "\nthat: (Exited val | Signaled val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Array-_21.txt", "contents": "\n\nupdate_u128[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nWrite a U128 at offset. This is only allowed for an array of U8s.\nfun ref update_u128[optional B: (A & Real[B] val & U8 val)](\noffset: USize val,\nvalue: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\noffset: USize val\nvalue: U128 val\n\nReturns\u00b6\n\nU128 val ?\n\n"} +{"id": "Pony/src-builtin-array-_75.txt", "contents": "from_cpointer(start_ptr._unsafe(), size', alloc)\nelse\ncreate()\nend\nend\n\n(consume this, consume right)\n\n\nfun iso unchop(b: Array[A] iso):\n((Array[A] iso^, Array[A] iso^) | Array[A] iso^)\n=>\n\"\"\"\nUnchops two iso arrays to return the original array they were chopped from.\nBoth input arrays are isolated and mutable and were originally chopped from\na single array. This function checks that they are indeed two arrays chopped\nfrom the same original array and can be unchopped before doing the\nunchopping and returning the unchopped array. If the two arrays cannot be\nunchopped it returns both arrays without modifying them.\nThe operation does not allocate a new array pointer nor copy elements."} +{"id": "Pony/builtin-I8-_37.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_0.txt", "contents": "\n\n\n\n\n\n\nmap.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/pony_check-Generator-_4.txt", "contents": "As the returned value can also be iso, it needs to be consumed and\nreturned.\nIt is preferred to already return a ValueAndShrink from generate.\nfun box shrink(\nt: T)\n: (T^ , Iterator[T^] ref)\n\nParameters\u00b6\n\nt: T\n\nReturns\u00b6\n\n(T^ , Iterator[T^] ref)\n\n\ngenerate_value\u00b6\n[Source]\nfun box generate_value(\nrnd: Randomness ref)"} +{"id": "Pony/src-net-ossockopt-_112.txt", "contents": "fun sctp_partial_delivery_point():I32 => @pony_os_sockopt_option(I32(682))\nfun sctp_pcb_copy_flags():I32 => @pony_os_sockopt_option(I32(683))\nfun sctp_pcb_flags_accepting():I32 => @pony_os_sockopt_option(I32(684))\nfun sctp_pcb_flags_adaptationevnt():I32 => @pony_os_sockopt_option(I32(685))\nfun sctp_pcb_flags_assoc_resetevnt():I32 => @pony_os_sockopt_option(I32(686))\nfun sctp_pcb_flags_authevnt():I32 => @pony_os_sockopt_option(I32(687))\nfun sctp_pcb_flags_autoclose():I32 => @pony_os_sockopt_option(I32(688))\nfun sctp_pcb_flags_auto_asconf():I32 => @pony_os_sockopt_option(I32(689))\nfun sctp_pcb_flags_blocking_io():I32 => @pony_os_sockopt_option(I32(690))\nfun sctp_pcb_flags_boundall():I32 => @pony_os_sockopt_option(I32(691))\nfun sctp_pcb_flags_bound_v6():I32 => @pony_os_sockopt_option(I32(692))\nfun sctp_pcb_flags_close_ip():I32 => @pony_os_sockopt_option(I32(693))\nfun sctp_pcb_flags_connected():I32 => @pony_os_sockopt_option(I32(694))\nfun sctp_pcb_flags_donot_heartbeat():I32 => @pony_os_sockopt_option(I32(695))\nfun sctp_pcb_flags_dont_wake():I32 => @pony_os_sockopt_option(I32(696))\nfun sctp_pcb_flags_do_asconf():I32 => @pony_os_sockopt_option(I32(697))\nfun sctp_pcb_flags_do_not_pmtud():I32 => @pony_os_sockopt_option(I32(698))\nfun sctp_pcb_flags_dryevnt():I32 => @pony_os_sockopt_option(I32(699))\nfun sctp_pcb_flags_explicit_eor():I32 => @pony_os_sockopt_option(I32(700))\nfun sctp_pcb_flags_ext_rcvinfo():I32 => @pony_os_sockopt_option(I32(701))"} +{"id": "Pony/files-FileExec-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileExec val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/10_partial-application_4.txt", "contents": "# Partial application is just a lambda\n\nUnder the hood, we're assembling an object literal for partial application, just as if you had written a lambda yourself. It captures aliases of some of the lexical scope as fields and has an `apply` function that takes some, possibly reduced, number of arguments. This is actually done as sugar, by rewriting the abstract syntax tree for partial application to be an object literal, before code generation.\n\nThat means partial application results in an anonymous class and returns a `ref`. If you need another reference capability, you can wrap partial application in a `recover` expression. It also means that we can't consume unique fields for a lambda, as the apply method might be called many times.\n"} +{"id": "Pony/src-builtin-runtime_options-_10.txt", "contents": "\nvar ponygcinitial: USize = 14\n\"\"\"\nDefer garbage collection until an actor is using at least 2^N bytes.\nDefaults to 2^14.\n\"\"\"\n\nvar ponygcfactor: F64 = 2.0\n\"\"\"\nAfter GC, an actor will next be GC'd at a heap memory usage N times its\ncurrent value. This is a floating point value. Defaults to 2.0.\n\"\"\"\n\nvar ponynoyield: Bool = false\n\"\"\"\nDo not yield the CPU when no work is available.\n\"\"\"\n\nvar ponynoblock: Bool = false\n\"\"\""} +{"id": "Pony/4_traits-and-interfaces_6.txt", "contents": "\ntrait Bald\nfun hair(): Bool => false\n\nclass Bob is (Named & Bald)\n```\n\nIt is possible for a class to have relationships with multiple categories. In the above example, the class `Bob` _provides both Named and Bald_.\n\n```pony\ntrait Named\nfun name(): String => \"Bob\"\n\ntrait Bald is Named\nfun hair(): Bool => false\n\nclass Bob is Bald\n```\n\nIt is also possible to combine categories together. In the example above, all `Bald` classes are automatically `Named`. Consequently, the `Bob` class has access to both hair() and name() default implementation of their respective trait. One can think of the `Bald` category to be more specific than the `Named` one."} +{"id": "Pony/src-builtin-signed-_49.txt", "contents": "If this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i8\"(this.u8(), true)\n\nfun ctz_unsafe(): U8 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i8\"(this.u8(), true)\n\nfun bitwidth(): U8 => 8\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: I8): I8 => if this < y then this else y end\nfun max(y: I8): I8 => if this > y then this else y end\n\nfun fld(y: I8): I8 =>\n_SignedArithmetic.fld[I8, U8](this, y)"} +{"id": "Pony/net-OSSockOpt-_208.txt", "contents": "fun box ip_fw_table_add()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_table_del\u00b6\n[Source]\nfun box ip_fw_table_del()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_table_flush\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/src-pony_check-int_properties-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/pony_check-Property3UnitTest-_3.txt", "contents": "\nexclusion_group\u00b6\nfun box exclusion_group()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ntimed_out\u00b6\nfun ref timed_out(\nh: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6"} +{"id": "Pony/itertools-Iter-_25.txt", "contents": "0 4 1 5 2\nfun ref interleave_shortest(\nother: Iterator[A] ref)\n: Iter[A!] ref\n\nParameters\u00b6\n\nother: Iterator[A] ref\n\nReturns\u00b6\n\nIter[A!] ref\n\n\nintersperse\u00b6\n[Source]\nReturn an iterator that yields the value after every n elements of the\noriginal iterator.\nExample\u00b6\nIter[USize](Range(0, 3))"} +{"id": "Pony/src-builtin-real-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_check-generator-_86.txt", "contents": "with the same probability, returning a union type of this generator and\nthe other one.\n\"\"\"\nGenerator[(T | U)](\nobject is GenObj[(T | U)]\nfun generate(rnd: Randomness): GenerateResult[(T | U)] ? =>\nif rnd.bool() then\n_gen.generate_and_shrink(rnd)?\nelse\nother.generate_and_shrink(rnd)?\nend\n\nfun shrink(t: (T | U)): ValueAndShrink[(T | U)] =>\nmatch consume t\n| let tt: T => _gen.shrink(consume tt)\n| let tu: U => other.shrink(consume tu)\nend\nend\n)\n"} +{"id": "Pony/collections-HashEq-_2.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\neq\u00b6\n[Source]\nUse the structural equality function from the type parameter.\nfun box eq(\nx: box->A,\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\nx: box->A\ny: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-AsioEvent-_7.txt", "contents": "[Source]\nfun box signal()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nread_write\u00b6\n[Source]\nfun box read_write()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\noneshot\u00b6"} +{"id": "Pony/net-OSSockOpt-_195.txt", "contents": "fun box ip_bound_if()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_checksum\u00b6\n[Source]\nfun box ip_checksum()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_default_multicast_loop\u00b6\n[Source]"} +{"id": "Pony/src-serialise-serialise-_15.txt", "contents": "_data\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_test-test_helper-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-ByteSeq-_0.txt", "contents": "\n\n\n\n\n\n\nByteSeq\u00b6\n[Source]\ntype ByteSeq is\n(String val | Array[U8 val] val)\n\nType Alias For\u00b6\n\n(String val | Array[U8 val] val)\n\n\n\n\n"} +{"id": "Pony/collections-persistent-SetIs-_0.txt", "contents": "\n\n\n\n\n\n\nSetIs[A: Any #share]\u00b6\n[Source]\ntype SetIs[A: Any #share] is\nHashSet[A, HashIs[A] val] val\n\nType Alias For\u00b6\n\nHashSet[A, HashIs[A] val] val\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_255.txt", "contents": "fun box mcast_undefined()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_add_bw_upcall\u00b6\n[Source]\nfun box mrt_add_bw_upcall()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_add_mfc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-stdin-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-net-ossockopt-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/4_traits-and-interfaces_12.txt", "contents": "## Open world enumerations\n\nTraits allow you to create \"open world enumerations\" that others can participate in. For example:\n\n```pony\ntrait Color\n\nprimitive Red is Color\nprimitive Blue is Color\n```\n\nHere we are using a trait to provide a category of things, `Color`, that any other types can opt into by declaring itself to be a `Color`. This creates an \"open world\" of enumerations that you can't do using the more traditional Pony approach using type unions.\n\n```pony\nprimitive Red\nprimitive Blue\n\ntype Color is (Red | Blue)\n```\n"} +{"id": "Pony/serialise-Serialised-_4.txt", "contents": "\nParameters\u00b6\n\nauth: OutputSerialisedAuth val\n\nReturns\u00b6\n\nArray[U8 val] val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-UDPSocket-_3.txt", "contents": "\nfun ref not_listening(sock: UDPSocket ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\ntry\nlet destination =\nDNS.ip4(DNSAuth(env.root), \"localhost\", \"8989\")(0)?\nUDPSocket(UDPAuth(env.root),\nrecover MyUDPNotify(env.out, consume destination) end)\nend\n\nactor tag UDPSocket is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n"} +{"id": "Pony/src-pony_check-generator-_92.txt", "contents": "=>\n\"\"\"\nGenerate a `Seq[T]` where `T` must be sendable (i.e. it must have a\nreference capability of either `tag`, `val`, or `iso`).\n\nThe constraint of the elements being sendable stems from the fact that\nthere is no other way to populate the iso seq if the elements might be\nnon-sendable (i.e. ref), as then the seq would leak references via\nits elements.\n\"\"\"\nGenerator[S](\nobject is GenObj[S]\nlet _gen: GenObj[T] = gen\nfun generate(rnd: Randomness): GenerateResult[S] =>\nlet size = rnd.usize(min, max)\n\nlet result: S = recover iso S.create(size) end\nlet iter = _gen.value_iter(rnd)\nvar i = USize(0)\n"} +{"id": "Pony/builtin-I64-_21.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-persistent-set-_16.txt", "contents": "\"\"\"\nReturn an iterator over the values in the set.\n\"\"\"\n_map.values()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_136.txt", "contents": "fun box ipv6_fl_f_create()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_f_excl\u00b6\n[Source]\nfun box ipv6_fl_f_excl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_f_reflect\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419use \"time\"\n\nuse @_mkdir[I32](dir: Pointer[U8] tag) if windows\nuse @mkdir[I32](path: Pointer[U8] tag, mode: U32) if not windows\nuse @_rmdir[I32](path: Pointer[U8] tag) if windows\nuse @rmdir[I32](path: Pointer[U8] tag) if not windows\nuse @_unlink[I32](path: Pointer [U8] tag) if windows\nuse @unlink[I32](path: Pointer [U8] tag) if not windows\nuse @rename[I32](old_path: Pointer[U8] tag, new_path: Pointer[U8] tag)\nuse @pony_os_eexist[I32]()\nuse @CreateSymbolicLinkA[U8](src_name: Pointer[U8] tag,\ntarget_name: Pointer[U8] tag, flags: U32) if windows\nuse @symlink[I32](path: Pointer[U8] tag, path2: Pointer[U8] tag)"} +{"id": "Pony/src-collections-persistent-list-_40.txt", "contents": "(this, this)\n\nfun drop(n: USize): Nil[A] =>\n\"\"\"\nThere are no elements to drop from the empty list.\n\"\"\"\nthis\n\nfun drop_while(f: {(val->A): Bool} box): Nil[A] =>\n\"\"\"\nThere are no elements to drop from the empty list.\n\"\"\"\nthis\n\nfun take(n: USize): Nil[A] =>\n\"\"\"\nThere are no elements to take from the empty list.\n\"\"\"\nthis\n"} +{"id": "Pony/src-files-file_mode-_8.txt", "contents": "var any_exec: Bool = false\n\"\"\"`true if every user can execute the file.\"\"\"\n\nfun ref exec() =>\n\"\"\"\nSet the executable flag for everyone.\n\"\"\"\nowner_exec = true\ngroup_exec = true\nany_exec = true\n\nfun ref shared() =>\n\"\"\"\nSet the write flag for everyone to the same as owner_write.\n\"\"\"\ngroup_write = owner_write\nany_write = owner_write\n\nfun ref group() =>\n\"\"\""} +{"id": "Pony/builtin-USize-_20.txt", "contents": "fun box shr(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/collections-persistent-VecPairs-_0.txt", "contents": "\n\n\n\n\n\n\nVecPairs[A: Any #share]\u00b6\n[Source]\nclass ref VecPairs[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nv: Vec[A] val)\n: VecPairs[A] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-files-file_path-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-builtin-bool-_1.txt", "contents": "12primitive Bool is Stringable\nnew create(from: Bool) => from\n\nfun eq(y: Bool): Bool => this == y\nfun ne(y: Bool): Bool => this != y\nfun op_and(y: Bool): Bool => this and y\nfun op_or(y: Bool): Bool => this or y\nfun op_xor(y: Bool): Bool => this xor y\nfun op_not(): Bool => not this\n\nfun string(): String iso^ =>\n(if this then \"true\" else \"false\" end).string()\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-NetAddress-_0.txt", "contents": "\n\n\n\n\n\n\nNetAddress\u00b6\n[Source]\nRepresents an IPv4 or IPv6 address. The family field indicates the address\ntype. The addr field is either the IPv4 address or the IPv6 flow info. The\naddr1-4 fields are the IPv6 address, or invalid for an IPv4 address. The\nscope field is the IPv6 scope, or invalid for an IPv4 address.\nThis class is modelled after the C data structure for holding socket\naddresses for both IPv4 and IPv6 sockaddr_storage.\nUse the name method to obtain address/hostname and port/service as Strings.\nclass val NetAddress is\nEquatable[NetAddress val] ref\n\nImplements\u00b6"} +{"id": "Pony/builtin-I128-_7.txt", "contents": "\nReturns\u00b6\n\nU128 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nbitwidth\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_536.txt", "contents": "fun box so_wantmore()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_wantoobflag\u00b6\n[Source]\nfun box so_wantoobflag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_wifi_status\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_99.txt", "contents": "// to see if it's ok to unsubscribe.\nif not @pony_asio_event_get_disposable(event) then\n@pony_asio_event_unsubscribe(event)\nend\n@pony_os_socket_close(fd)\n_try_shutdown()\nend\nelse\n// It's not our event.\nif AsioEvent.disposable(flags) then\n// It's disposable, so dispose of it.\n@pony_asio_event_destroy(event)\nend\nend\nelse\n// At this point, it's our event.\nif AsioEvent.writeable(flags) then\n_writeable = true\n_complete_writes(arg)\nifdef not windows then"} +{"id": "Pony/src-pony_check-generator-_113.txt", "contents": "Zip four generators into a generator of a 4-tuple\ncontaining the values generated by those four generators.\n\"\"\"\nGenerator[(T1, T2, T3, T4)](\nobject is GenObj[(T1, T2, T3, T4)]\nfun generate(rnd: Randomness): GenerateResult[(T1, T2, T3, T4)] ? =>\n(let v1: T1, let shrinks1: Iterator[T1^]) =\ngen1.generate_and_shrink(rnd)?\n(let v2: T2, let shrinks2: Iterator[T2^]) =\ngen2.generate_and_shrink(rnd)?\n(let v3: T3, let shrinks3: Iterator[T3^]) =\ngen3.generate_and_shrink(rnd)?\n(let v4: T4, let shrinks4: Iterator[T4^]) =\ngen4.generate_and_shrink(rnd)?\n((consume v1, consume v2, consume v3, consume v4),\nIter[T1^](shrinks1).zip3[T2^, T3^, T4^](shrinks2, shrinks3, shrinks4))\n\nfun shrink(t: (T1, T2, T3, T4)): ValueAndShrink[(T1, T2, T3, T4)] =>\n(let t1, let t2, let t3, let t4) = consume t\n(let t11, let t1_shrunken) = gen1.shrink(consume t1)"} +{"id": "Pony/files-Directory-_1.txt", "contents": "directory, or if FileRead or FileStat permission isn't available.\nnew ref create(\nfrom: FilePath val)\n: Directory ref^ ?\n\nParameters\u00b6\n\nfrom: FilePath val\n\nReturns\u00b6\n\nDirectory ref^ ?\n\n\nPublic fields\u00b6\nlet path: FilePath val\u00b6\n[Source]\nThis is the filesystem path locating this directory on the file system\nand an object capability granting access to operate on this directory.\n"} +{"id": "Pony/net-OSSockOpt-_593.txt", "contents": "fun box tcp_thin_dupack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_thin_linear_timeouts\u00b6\n[Source]\nfun box tcp_thin_linear_timeouts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_timestamp\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-ULong-_24.txt", "contents": "ULong val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nmodc\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_21.txt", "contents": "fun box div_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-net-udp_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_test-pony_test-_38.txt", "contents": "# Setting up and tearing down a test environment\n"} +{"id": "Pony/src-builtin-array-_66.txt", "contents": "else\nerror\nend\n\nfun ref update_u32[B: (A & Real[B] val & U8) = A](offset: USize, value: U32): U32 ? =>\n\"\"\"\nWrite a U32 at offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u32_bytes = U32(0).bytewidth()\nif (offset + u32_bytes) <= _size then\n_ptr._offset(offset)._convert[U32]()._update(0, value)\nelse\nerror\nend\n\nfun ref update_u64[B: (A & Real[B] val & U8) = A](offset: USize, value: U64): U64 ? =>\n\"\"\"\nWrite a U64 at offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u64_bytes = U64(0).bytewidth()"} +{"id": "Pony/error-messages_8.txt", "contents": "# A note on compiler versions\n\nThe error messages shown in this section are from ponyc `0.2.1-1063-g6ae110f` release, the current head of the main branch at the time this is written. The messages from other versions of the compiler may be different, to a greater or lesser degree.\n"} +{"id": "Pony/src-collections-list-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-builtin-string-_108.txt", "contents": "\n// use the new size' for alloc if we're not including the last used byte\n// from the original data and only include the extra allocated bytes if\n// we're including the last byte.\nlet alloc = if last == _size then _alloc - offset else size' end\n\nif size' > 0 then\nfrom_cpointer(_ptr._offset(offset)._unsafe(), size', alloc)\nelse\ncreate()\nend\nend\n\nfun iso chop(split_point: USize): (String iso^, String iso^) =>\n\"\"\"\nChops the string in half at the split point requested and returns both\nthe left and right portions. The original string is trimmed in place and\nreturned as the left portion. If the split point is larger than the\nstring, the left portion is the original string and the right portion\nis a new empty string."} +{"id": "Pony/bureaucracy-Registrar-_1.txt", "contents": "Returns\u00b6\n\nRegistrar tag^\n\n\nPublic Behaviours\u00b6\nupdate\u00b6\n[Source]\nAdd, or change, a lookup mapping.\nbe update(\nkey: String val,\nvalue: Any tag)\n\nParameters\u00b6\n\nkey: String val\nvalue: Any tag\n\n\nremove\u00b6"} +{"id": "Pony/collections-persistent-HashMap-_8.txt", "contents": ": HashMap[K, V, H] val\n\nParameters\u00b6\n\nkey: K\nvalue: val->V\n\nReturns\u00b6\n\nHashMap[K, V, H] val\n\n\nsub\u00b6\n[Source]\nReturn this Map without the given key.\nfun val sub(\nkey: K)\n: HashMap[K, V, H] val\n\nParameters\u00b6"} +{"id": "Pony/random-XorOshiro128StarStar-_3.txt", "contents": ": U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhas_next\u00b6\n[Source]\nfun tag has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nu8\u00b6\n[Source]\nfun ref u8()"} +{"id": "Pony/src-files-directory-_36.txt", "contents": "\nconsume list\nend\n\nfun open(target: String): Directory iso^ ? =>\n\"\"\"\nOpen a directory relative to this one. Raises an error if the path is not\nwithin this directory hierarchy.\n\"\"\"\nif _fd == -1 then\nerror\nend\n\nlet path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\nlet fd' =\n@openat(_fd, target.cstring(),\n@ponyint_o_rdonly()\nor @ponyint_o_directory()"} +{"id": "Pony/ini-Ini-_1.txt", "contents": "Ini val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nThis accepts a string iterator and calls the IniNotify for each new entry.\nIf any errors are encountered, this will return false. Otherwise, it\nreturns true.\nfun box apply(\nlines: Iterator[String box] ref,\nf: IniNotify ref)\n: Bool val\n\nParameters\u00b6\n\nlines: Iterator[String box] ref\nf: IniNotify ref\n\nReturns\u00b6"} +{"id": "Pony/src-net-udp_socket-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/collections-MaxHeapPriority-_3.txt", "contents": "\nne\u00b6\n[Source]\nfun box ne(\nthat: MaxHeapPriority[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: MaxHeapPriority[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n"} +{"id": "Pony/builtin-U32-_4.txt", "contents": "\nU32 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-net-tcp_connection-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-builtin-signed-_80.txt", "contents": "\nfun mulc(y: ISize): (ISize, Bool) =>\nifdef ilp32 then\n(let r, let o) =\n@\"llvm.smul.with.overflow.i32\"(this.i32(), y.i32())\n(r.isize(), o)\nelse\n_SignedCheckedArithmetic._mul_checked[USize, ISize](this, y)\nend\n\nfun divc(y: ISize): (ISize, Bool) =>\n_SignedCheckedArithmetic.div_checked[ISize, USize](this, y)\n\nfun remc(y: ISize): (ISize, Bool) =>\n_SignedCheckedArithmetic.rem_checked[ISize, USize](this, y)\n\nfun fldc(y: ISize): (ISize, Bool) =>\n_SignedCheckedArithmetic.fld_checked[ISize, USize](this, y)\n\nfun modc(y: ISize): (ISize, Bool) =>"} +{"id": "Pony/src-net-net_address-_13.txt", "contents": "let _addr4: U32 = 0\n\"\"\"\nBits 97-128 of the IPv6 address in network byte order.\n\n`0` if this is an IPv4 address. Check with `ipv4()` and `ipv6()`.\n\"\"\"\n\nlet _scope: U32 = 0\n\"\"\"IPv6 scope identifier: Unicast, Anycast, Multicast and unassigned scopes.\"\"\"\n\nfun ip4(): Bool =>\n\"\"\"\nReturns true for an IPv4 address.\n\"\"\"\n@pony_os_ipv4(this)\n\nfun ip6(): Bool =>\n\"\"\"\nReturns true for an IPv6 address.\n\"\"\""} +{"id": "Pony/src-pony_check-property_runner-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/collections-MinHeap-_0.txt", "contents": "\n\n\n\n\n\n\nMinHeap[A: Comparable[A] #read]\u00b6\n[Source]\ntype MinHeap[A: Comparable[A] #read] is\nBinaryHeap[A, MinHeapPriority[A] val] ref\n\nType Alias For\u00b6\n\nBinaryHeap[A, MinHeapPriority[A] val] ref\n\n\n\n\n"} +{"id": "Pony/8_sugar_6.txt", "contents": "# Update\n\nThe `update` sugar allows any class to use an assignment to accept data. Many languages allow this for assigning into collections, for example, a simple C array, `a[3] = x;`.\n\nIn any assignment where the left-hand side is a function call, Pony will translate this to a call to update, with the value from the right-hand side as an extra argument. So:\n\n```pony\nfoo(37) = x\n```\n\nbecomes:\n\n```pony\nfoo.update(37 where value = x)\n```\n\nThe value from the right-hand side of the assignment is always passed to a parameter named `value`. Any object can allow this syntax simply by providing an appropriate function `update` with an argument `value`.\n\n__Does my update function have to have a single parameter that takes an integer?__ No, you can define update to take whatever parameters you like, as long as there is one called `value`. The following are all fine:\n"} +{"id": "Pony/src-builtin-std_stream-_7.txt", "contents": "be write(data: ByteSeq)\n\"\"\"\nPrint some bytes without inserting a newline afterwards.\n\"\"\"\n\nbe printv(data: ByteSeqIter)\n\"\"\"\nPrint an iterable collection of ByteSeqs.\n\"\"\"\n\nbe writev(data: ByteSeqIter)\n\"\"\"\nWrite an iterable collection of ByteSeqs.\n\"\"\"\n\nbe flush()\n\"\"\"\nFlush the stream.\n\"\"\"\n"} +{"id": "Pony/src-net-ossockopt-_66.txt", "contents": "1312\n1313\n1314\n1315\n1316\n1317\n1318\n1319\n1320\n1321\n1322\n1323\n1324\n1325\n1326use @pony_os_sockopt_level[I32](option: I32)\nuse @pony_os_sockopt_option[I32](option: I32)\n\nprimitive OSSockOpt\n\"\"\"\nConvenience functions to fetch the option level and option"} +{"id": "Pony/builtin-ULong-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/files-Directory-_10.txt", "contents": "Return a FileInfo for some path relative to this directory.\nfun box infoat(\ntarget: String val)\n: FileInfo val ?\n\nParameters\u00b6\n\ntarget: String val\n\nReturns\u00b6\n\nFileInfo val ?\n\n\nchmodat\u00b6\n[Source]\nSet the FileMode for some path relative to this directory.\nfun box chmodat(\ntarget: String val,\nmode: FileMode box)"} +{"id": "Pony/pony_check-PropertyHelper-_16.txt", "contents": "\nbe complete(s: String) =>\nif (s.size() % 2) == 0 then\n_ph.complete_action(\"is_even\")\nelse\n_ph.fail_action(\"is_even\")\n\nclass EvenStringProperty is Property1[String]\nfun name(): String => \"even_string\"\n\nfun gen(): Generator[String] =>\nGenerators.ascii()\n\nfun property(arg1: String, ph: PropertyHelper) =>\nph.expect_action(\"is_even\")\nAsyncActor(ph).check(arg1)\n\nfun box expect_action(\nname: String val)\n: None val"} +{"id": "Pony/src-pony_check-generator-_53.txt", "contents": "1052\n1053\n1054\n1055\n1056\n1057\n1058\n1059\n1060\n1061\n1062\n1063\n1064\n1065\n1066\n1067\n1068\n1069\n1070\n1071"} +{"id": "Pony/src-builtin-array-_82.txt", "contents": "Add a U128 to the end of the array. This is only allowed for an array of U8s.\n\"\"\"\nlet u128_bytes = U128(0).bytewidth()\nreserve(_size + u128_bytes)\n_ptr._offset(_size)._convert[U128]()._update(0, value)\n_size = _size + u128_bytes\n\nfun ref push(value: A) =>\n\"\"\"\nAdd an element to the end of the array.\n\"\"\"\nreserve(_size + 1)\n_ptr._update(_size, consume value)\n_size = _size + 1\n\nfun ref pop(): A^ ? =>\n\"\"\"\nRemove an element from the end of the array.\nThe removed element is returned.\n\"\"\""} +{"id": "Pony/builtin-U32-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_264.txt", "contents": "fun box mrt_pim()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_version\u00b6\n[Source]\nfun box mrt_version()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmsg_notification\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_65.txt", "contents": "USize val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: U128 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: U128 val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n"} +{"id": "Pony/buffered-Reader-_26.txt", "contents": "\n\npeek_u32_be\u00b6\n[Source]\nPeek at a big-endian U32.\nfun box peek_u32_be(\noffset: USize val = 0)\n: U32 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU32 val ?\n\n\npeek_u32_le\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-net-tcp_connection-_53.txt", "contents": "1052\n1053\n1054\n1055\n1056\n1057\n1058\n1059\n1060\n1061\n1062\n1063\n1064\n1065\n1066\n1067\n1068\n1069\n1070\n1071"} +{"id": "Pony/itertools-Iter-_23.txt", "contents": "Parameters\u00b6\n\nacc: B\nf: {(B, A!): B^ ?}[A, B] box\n\nReturns\u00b6\n\nB^ ?\n\n\ninterleave\u00b6\n[Source]\nReturn an iterator that alternates the values of the original iterator and\nthe other until both run out.\nExample\u00b6\nIter[USize](Range(0, 4))\n.interleave(Range(4, 6))\n\n0 4 1 5 2 3\nfun ref interleave("} +{"id": "Pony/src-time-time-_14.txt", "contents": "\"\"\"\nifdef osx then\nvar ts: (I64, I64) = (0, 0)\n@gettimeofday(addressof ts, USize(0))\n(ts._1, ts._2 * 1000)\nelseif linux or bsd then\n_clock_gettime(_ClockRealtime)\nelseif windows then\nvar ft: (U32, U32) = (0, 0)\n@GetSystemTimeAsFileTime(addressof ft)\nvar qft = ft._1.u64() or (ft._2.u64() << 32)\nvar epoch = qft.i64() - 116444736000000000\nvar sec = epoch / 10000000\nvar nsec = (epoch - (sec * 10000000)) * 100\n(sec, nsec)\nelse\ncompile_error \"unsupported platform\"\nend\n\nfun seconds(): I64 =>"} +{"id": "Pony/src-collections-list-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-net-ossockopt-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/net-OSSockOpt-_176.txt", "contents": "fun box ipx_dltitf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_dstype\u00b6\n[Source]\nfun box ipx_dstype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_extended_address\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_53.txt", "contents": "U8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981class List[A] is Seq[A]\n\"\"\"\nA doubly linked list.\n\nThe following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Doubly_linked_list).\n\nA doubly linked list is a linked data structure that consists of a set of sequentially\nlinked records called nodes (implemented in Pony via the collections.ListNode class). Each\nnode contains four fields: two link fields (references to the previous and to the next node in\nthe sequence of nodes), one data field, and the reference to the List in which it resides. A doubly\nlinked list can be conceptualized as two singly linked lists formed from the same data items, but"} +{"id": "Pony/builtin-SignedInteger-_33.txt", "contents": "A\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_222.txt", "contents": "fun box ip_old_fw_flush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_get\u00b6\n[Source]\nfun box ip_old_fw_get()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_resetlog\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_37.txt", "contents": "if is_sep(s(s.size()-1)?) and (s.size() > 1) then\ns.delete(-1, sep().size())\nend\nend\n\nif s.size() > 0 then\ns\nelse\n\".\"\nend\n\nfun normcase(path: String): String =>\n\"\"\"\nNormalizes the case of path for the runtime platform.\n\"\"\"\nif Platform.windows() then\nrecover val path.lower() .> replace(\"/\", \"\\\\\") end\nelseif Platform.osx() then\npath.lower()\nelse"} +{"id": "Pony/src-pony_check-property_runner-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-I16-_36.txt", "contents": "fun box add(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_39.txt", "contents": "if e == a then\nconsumed.update(i, true)?\nfound = true\nbreak\nend\nend\nif not found then\nmissing.push(e)\nend\nend\n\nlet extra = Array[box->A]\nfor (i, c) in consumed.pairs() do\nif not c then extra.push(actual(i)?) end\nend\n\nif (extra.size() != 0) or (missing.size() != 0) then\n_fail(\n_fmt_msg(loc, \"Assert EQ_UNORDERED failed. \" + msg\n+ \" Expected (\" + _print_array[A](expect) + \") == (\""} +{"id": "Pony/files-FileCreate-_2.txt", "contents": "\nthat: FileCreate val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileCreate val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileCreate val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-StringBytes-_0.txt", "contents": "\n\n\n\n\n\n\nStringBytes\u00b6\n[Source]\nclass ref StringBytes is\nIterator[U8 val] ref\n\nImplements\u00b6\n\nIterator[U8 val] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_53.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\nfun box lt(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/capability-subtyping_3.txt", "contents": "# Temporary unique access\n\nWe talked about aliasing and consuming, but what about when we just use a variable without making a new alias?\nIf `x` is `iso`, what type do we give to the expression `x`? It would be pretty useless if we could only use our `iso` variables as `tag`. We couldn't modify fields or call any methods.\n\nWhat we get is the bare `iso` capability. Like `ref`, this allows us to read and write, *but* we will have to keep the destination isolated. We will get into what kind of things we can do with it later, but for now, we will talk about subtyping.\n\n* `iso^` <: `iso`. As mentioned earlier, `iso^` can become *anything*. This isn't enormously useful, all told, but an `iso^` expression with no other names\nis stronger than a expression pointing to an existing `iso` name.\n* `trn^` <: `trn`. Similarly, we may use an expression that has no writable aliases, as an expression which has one unique writeable alias.\n* `iso` <: `tag`. We can't coerce `iso` to anything else since the original name is still around, but we can always drop down to `tag` (which is just `iso!`).\n* `trn` <: `box`. This is quite similar, we can forget our ability to write and just get a new `box` alias to store.\n"} +{"id": "Pony/arrow-types_0.txt", "contents": "# Arrow Types aka Viewpoints\n\nWhen we talked about __reference capability composition__ and __viewpoint adaptation__, we dealt with cases where we know the reference capability of the origin. However, sometimes we don't know the precise reference capability of the origin.\n\nWhen that happens, we can write a __viewpoint adapted type__, which we call an __arrow type__ because we write it with an `->`.\n"} +{"id": "Pony/src-builtin-signed-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-cli-command_spec-_40.txt", "contents": "=>\n\"\"\"\nCreates an Option with an U64 typed value that can be used like\n`--count=47 -C=47`\nto yield an option value like\n`cmd.option(\"count\").u64() == U64(47)`.\n\"\"\"\n_name = name'\n_descr = descr'\n_short = short'\n(_typ, _default, _required) = _init(_U64Type, default')\n\nnew val f64(name': String,\ndescr': String = \"\",\nshort': (U8 | None) = None,\ndefault': (F64 | None) = None)\n=>\n\"\"\"\nCreates an Option with a F64 typed value that can be used like\n`--ratio=1.039` or `-R=1.039`"} +{"id": "Pony/term-ANSINotify-_1.txt", "contents": "Parameters\u00b6\n\nterm: ANSITerm ref\ninput: U8 val\n\nReturns\u00b6\n\nNone val\n\n\nup\u00b6\n[Source]\nfun ref up(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_152.txt", "contents": "fun box ipv6_prefer_src_home()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_noncga\u00b6\n[Source]\nfun box ipv6_prefer_src_noncga()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_public\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_18.txt", "contents": "fun box modc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_377.txt", "contents": "fun box sctp_enable_reset_assoc_req()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_enable_reset_stream_req\u00b6\n[Source]\nfun box sctp_enable_reset_stream_req()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_enable_stream_reset\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_28.txt", "contents": "fun box setsockopt()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nshutdown\u00b6\n[Source]\nfun box shutdown()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbindat\u00b6\n[Source]"} +{"id": "Pony/collections-HashIs-_3.txt", "contents": "U64 val\n\n\neq\u00b6\n[Source]\nDetermine equality by identity rather than structurally.\nfun box eq(\nx: box->A!,\ny: box->A!)\n: Bool val\n\nParameters\u00b6\n\nx: box->A!\ny: box->A!\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/scheduling_0.txt", "contents": "# Scheduling\n\nThe Pony scheduler is not preemptive. This means that your actor has to yield control of the scheduler thread in order for another actor to execute. The normal way to do this is for your behavior to end. If your behavior doesn't end, you will continue to monopolize a scheduler thread and bad things will happen.\n"} +{"id": "Pony/builtin-SignedInteger-_20.txt", "contents": "fun box div_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: A)\n: A ?\n\nParameters\u00b6"} +{"id": "Pony/src-collections-list-_55.txt", "contents": "env.out.print(\"\\t\" + n.string())\nend\n\n// Filter the new list to extract 2 elements\nlet filtered_list = new_list.filter({ (n) => n.string().contains(\"d BOOM!\") })\nenv.out.print(\"Filtering our three-node list produces a new list of size: \"\n+ filtered_list.size().string()) // 2\nfor n in filtered_list.values() do\nenv.out.print(\"\\t\" + n.string()) // Second BOOM!\\nThird BOOM!\nend\n\n// Partition the filtered list\nlet partitioned_lists = filtered_list.partition({ (n) => n.string().contains(\"Second\") })\nenv.out.print(\"The size of our first partitioned list (matches predicate): \" + partitioned_lists._1.size().string()) // 1\nenv.out.print(\"The size of our second partitioned list (doesn't match predicate): \" + partitioned_lists._2.size().string()) // 1\nenv.out.print(\"Our matching partition elements are:\")\nfor n in partitioned_lists._1.values() do\nenv.out.print(\"\\t\" + n.string()) // Second BOOM!\nend\n```"} +{"id": "Pony/serialisation_5.txt", "contents": "## Custom Serialisation\n\nIn order to serialise an object from a pointer field, Pony needs to know how much space to set aside for that object and how to write a representation of that object into the reserved space. The programmer must provide two methods on the object:\n\n* `fun _serialise_space(): USize` -- This method returns the number of bytes that must be reserved for the object.\n* `fun _serialise(bytes: Pointer[U8] tag)` -- This method receives a pointer to the memory that has been set aside for serialising the object. The programmer must not write more bytes than were returned by the `_serialise_space` method.\n"} +{"id": "Pony/builtin-ILong-_5.txt", "contents": "\nILong val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_92.txt", "contents": "let my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet rnodes = my_list.rnodes() // node with \"c\" is before node with \"a\"\n```\n\"\"\"\nListNodes[A, this->ListNode[A]](_head, true)\n\nfun values(): ListValues[A, this->ListNode[A]]^ =>\n\"\"\"\nReturn an iterator on the values in the `List` in forward order.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet values = my_list.values() // value \"a\" is before value \"c\"\n```\n\"\"\"\nListValues[A, this->ListNode[A]](_head)\n\nfun rvalues(): ListValues[A, this->ListNode[A]]^ =>\n\"\"\"\nReturn an iterator on the values in the `List` in reverse order."} +{"id": "Pony/builtin-AsioEventNotify-_0.txt", "contents": "\n\n\n\n\n\n\nAsioEventNotify\u00b6\n[Source]\ntrait tag AsioEventNotify\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Integer-_47.txt", "contents": "\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n"} +{"id": "Pony/cli-EnvVars-_0.txt", "contents": "\n\n\n\n\n\n\nEnvVars\u00b6\n[Source]\nprimitive val EnvVars\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: EnvVars val^\n\nReturns\u00b6\n\nEnvVars val^"} +{"id": "Pony/pony_bench-PonyBench-_1.txt", "contents": "\nenv: Env val\nlist: BenchmarkList tag\n\nReturns\u00b6\n\nPonyBench tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nbe apply(\nbench: (MicroBenchmark iso | AsyncMicroBenchmark iso))\n\nParameters\u00b6\n\nbench: (MicroBenchmark iso | AsyncMicroBenchmark iso)\n\n"} +{"id": "Pony/7_type-expressions_6.txt", "contents": "```\n\nThose are all type aliases used by the standard library.\n\n__Is `Number` a type alias for a type expression that contains other type aliases?__ Yes! Fun, and convenient.\n"} +{"id": "Pony/src-net-proxy-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18interface Proxy\nfun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^\n\nclass val NoProxy is Proxy\n\"\"\"\nDefault implementation of a proxy that does not alter the supplied `TCPConnectionNotify`.\n\n```pony\nactor MyClient\nnew create(host: String, service: String, proxy: Proxy = NoProxy) =>\nlet conn: TCPConnection = TCPConnection.create(\nTCPConnectAuth(env.root),\nproxy.apply(MyConnectionNotify.create()),\n\"localhost\","} +{"id": "Pony/src-files-directory-_31.txt", "contents": "end\n\nif not FileInfo(from)?.directory then\nerror\nend\n\npath = from\n\nifdef posix then\n_fd =\n@open(from.path.cstring(),\n@ponyint_o_rdonly()\nor @ponyint_o_directory()\nor @ponyint_o_cloexec())\n\nif _fd == -1 then\nerror\nend\nelseif windows then\n_fd = 0"} +{"id": "Pony/collections-Flags-_21.txt", "contents": "fun box ne(\nthat: Flags[A, B] box)\n: Bool val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-F64-_22.txt", "contents": "F64 val\n\n\nlog10\u00b6\n[Source]\nfun box log10()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nlogb\u00b6\n[Source]\nfun box logb()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Randomness-_16.txt", "contents": "min: F32 val = 0.0,\nmax: F32 val = 1.0)\n: F32 val\n\nParameters\u00b6\n\nmin: F32 val = 0.0\nmax: F32 val = 1.0\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nGenerate a F64 in closed interval [min, max]\n(default: [0.0, 1.0]).\nfun ref f64(\nmin: F64 val = 0.0,"} +{"id": "Pony/src-net-tcp_connection_notify-_0.txt", "contents": "\n\n\n\n\n\n\ntcp_connection_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_537.txt", "contents": "fun box so_wifi_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp6_mss\u00b6\n[Source]\nfun box tcp6_mss()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_flag_lossrecovery\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_47.txt", "contents": "\nlet avail = data.size() - offset\nlet need = len - i\nlet copy_len = need.min(avail)\n\nout = recover\nlet r = consume ref out\ndata.copy_to(r, offset, i, copy_len)\nconsume r\nend\n\nif avail > need then\nnode()? = (data, offset + need)\nbreak\nend\n\ni = i + copy_len\n_chunks.shift()?\nend\n"} +{"id": "Pony/src-builtin-float-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/use-statement_0.txt", "contents": "# Use Statement\n\nTo use a package in your code you need to have a __use__ command. This tells the compiler to find the package you need and make the types defined in it available to you. Every Pony file that needs to know about a type from a package must have a use command for it.\n\nUse commands are a similar concept to Python and Java \"import\", C/C++ \"#include\" and C# \"using\" commands, but not exactly the same. They come at the beginning of Pony files and look like this:\n\n```pony\nuse \"collections\"\n```\n\nThis will find all of the publicly visible types defined in the _collections_ package and add them to the type namespace of the file containing the `use` command. These types are then available to use within that file, just as if they were defined locally.\n\nFor example, the standard library contains the package _time_. This contains the following definition (among others):\n\n```pony\nprimitive Time\nfun now(): (I64, I64)\n```\n\nTo access the _now_ function just add a use command:"} +{"id": "Pony/src-time-posix_date-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/collections-persistent-Vec-_13.txt", "contents": "[Source]\nReturn an iterator over the values in the vector.\nfun val values()\n: VecValues[A] ref^\n\nReturns\u00b6\n\nVecValues[A] ref^\n\n\npairs\u00b6\n[Source]\nReturn an iterator over the (index, value) pairs in the vector.\nfun val pairs()\n: VecPairs[A] ref^\n\nReturns\u00b6\n\nVecPairs[A] ref^\n"} +{"id": "Pony/generics-and-reference-capabilities_10.txt", "contents": "let b = Foo[String ref](recover ref \"World\".clone() end)\nenv.out.print(b.get().string())\n\nlet c = Foo[U8](42)\nenv.out.print(c.get().string())\n```\n\nIt's quite a bit of work to get a generic class or method to work across all capability types, in particular for `iso`. There are ways of restricting the generic to subsets of capabilities and that's the topic of the next section.\n"} +{"id": "Pony/builtin-Array-_29.txt", "contents": "obj2.other = obj1\n[obj1; obj2]\nend\n\nfun iso chop[optional B: (A & Any #send)](\nsplit_point: USize val)\n: (Array[A] iso^ , Array[A] iso^)\n\nParameters\u00b6\n\nsplit_point: USize val\n\nReturns\u00b6\n\n(Array[A] iso^ , Array[A] iso^)\n\n\nunchop\u00b6\n[Source]\nUnchops two iso arrays to return the original array they were chopped from."} +{"id": "Pony/src-pony_check-property_runner-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/net-OSSockOpt-_22.txt", "contents": "fun box ipproto_hopopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_icmp\u00b6\n[Source]\nfun box ipproto_icmp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_icmpv6\u00b6\n[Source]"} +{"id": "Pony/buffered-Writer-_16.txt", "contents": "i64_le\u00b6\n[Source]\nWrite an I64 to the buffer in little-endian byte order.\nfun ref i64_le(\ndata: I64 val)\n: None val\n\nParameters\u00b6\n\ndata: I64 val\n\nReturns\u00b6\n\nNone val\n\n\ni64_be\u00b6\n[Source]\nWrite an I64 to the buffer in big-endian byte order.\nfun ref i64_be("} +{"id": "Pony/src-net-ossockopt-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-net-tcp_listener-_19.txt", "contents": "yield_after_writing: USize = 16384)\n=>\n\"\"\"\nListens for IPv6 connections.\n\"\"\"\n_limit = limit\n_notify = consume notify\n_event =\n@pony_os_listen_tcp6(this, host.cstring(), service.cstring())\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_fd = @pony_asio_event_fd(_event)\n_notify_listening()\n\nbe set_notify(notify: TCPListenNotify iso) =>\n\"\"\"\nChange the notifier.\n\"\"\"\n_notify = consume notify"} +{"id": "Pony/net-UDPSocket-_0.txt", "contents": "\n\n\n\n\n\n\nUDPSocket\u00b6\n[Source]\nCreates a UDP socket that can be used for sending and receiving UDP messages.\nThe following examples create:\n\nan echo server that listens for connections and returns whatever message it\nreceives\na client that connects to the server, sends a message, and prints the\nmessage it receives in response\n\nThe server is implemented like this:\nuse \"net\"\n"} +{"id": "Pony/src-collections-list-_53.txt", "contents": "\n// Push a String literal onto our empty List\nmy_list.push(\"A single String\")\nenv.out.print(\"Adding one node to our empty list means it now has a size of \"\n+ my_list.size().string() + \".\") // 1\n\n// Get the first element of our List\ntry env.out.print(\"The first (index 0) node has the value: \"\n+ my_list.index(0)?()?.string()) end // A single String\n\n// Create a second List from a single String literal\nlet my_second_list = List[String].unit(\"Another String\")\n\n// Append the second List to the first\nmy_list.append_list(my_second_list)\nenv.out.print(\"A list created by appending our second single-node list onto our first has size: \"\n+ my_list.size().string()) // 2\nenv.out.print(\"The List nodes of our first list are now:\")\nfor n in my_list.values() do\nenv.out.print(\"\\t\" + n.string())"} +{"id": "Pony/src-net-ossockopt-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/collections-SetValues-_1.txt", "contents": "[Source]\nCreates an iterator for the given set.\nnew ref create(\nset: S)\n: SetValues[A, H, S] ref^\n\nParameters\u00b6\n\nset: S\n\nReturns\u00b6\n\nSetValues[A, H, S] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the set."} +{"id": "Pony/builtin-U32-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/signals-Sig-_1.txt", "contents": "\nSig val^\n\n\nPublic Functions\u00b6\nhup\u00b6\n[Source]\nfun box hup()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nint\u00b6\n[Source]\nfun box int()\n: U32 val\n"} +{"id": "Pony/collections-persistent-Set-_0.txt", "contents": "\n\n\n\n\n\n\nSet[A: (Hashable val & Equatable[A])]\u00b6\n[Source]\ntype Set[A: (Hashable val & Equatable[A])] is\nHashSet[A, HashEq[A] val] val\n\nType Alias For\u00b6\n\nHashSet[A, HashEq[A] val] val\n\n\n\n\n"} +{"id": "Pony/builtin-USize-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/cli-Option-_5.txt", "contents": "Returns the option value as a ReadSeq[String], defaulting to empty.\nfun box string_seq()\n: ReadSeq[String val] val\n\nReturns\u00b6\n\nReadSeq[String val] val\n\n\ndeb_string\u00b6\n[Source]\nfun box deb_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\n"} +{"id": "Pony/src-backpressure-backpressure-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/collections-HashFunction64-_1.txt", "contents": "\nHashFunction64[A] val^\n\n\nPublic Functions\u00b6\nhash64\u00b6\n[Source]\nCalculate the hash of some type. This is an alias of the type parameter to\nallow data structures to hash things without consuming them.\nfun box hash64(\nx: box->A!)\n: U64 val\n\nParameters\u00b6\n\nx: box->A!\n\nReturns\u00b6\n\nU64 val"} +{"id": "Pony/files-FileTime-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_88.txt", "contents": "fun ipx_address_notify():I32 => @pony_os_sockopt_option(I32(202))\nfun ipx_crtitf():I32 => @pony_os_sockopt_option(I32(203))\nfun ipx_dltitf():I32 => @pony_os_sockopt_option(I32(204))\nfun ipx_dstype():I32 => @pony_os_sockopt_option(I32(205))\nfun ipx_extended_address():I32 => @pony_os_sockopt_option(I32(206))\nfun ipx_filterptype():I32 => @pony_os_sockopt_option(I32(207))\nfun ipx_frame_8022():I32 => @pony_os_sockopt_option(I32(208))\nfun ipx_frame_8023():I32 => @pony_os_sockopt_option(I32(209))\nfun ipx_frame_etherii():I32 => @pony_os_sockopt_option(I32(210))\nfun ipx_frame_none():I32 => @pony_os_sockopt_option(I32(211))\nfun ipx_frame_snap():I32 => @pony_os_sockopt_option(I32(212))\nfun ipx_frame_tr_8022():I32 => @pony_os_sockopt_option(I32(213))\nfun ipx_getnetinfo():I32 => @pony_os_sockopt_option(I32(214))\nfun ipx_getnetinfo_norip():I32 => @pony_os_sockopt_option(I32(215))\nfun ipx_immediatespxack():I32 => @pony_os_sockopt_option(I32(216))\nfun ipx_internal():I32 => @pony_os_sockopt_option(I32(217))\nfun ipx_maxsize():I32 => @pony_os_sockopt_option(I32(218))\nfun ipx_max_adapter_num():I32 => @pony_os_sockopt_option(I32(219))\nfun ipx_mtu():I32 => @pony_os_sockopt_option(I32(220))\nfun ipx_node_len():I32 => @pony_os_sockopt_option(I32(221))"} +{"id": "Pony/net-OSSockOpt-_343.txt", "contents": "fun box sctp_cause_deleting_src_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_illegal_asconf_ack\u00b6\n[Source]\nfun box sctp_cause_illegal_asconf_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_invalid_param\u00b6\n[Source]"} +{"id": "Pony/promises-Promise-_1.txt", "contents": "Returns\u00b6\n\nPromise[A] tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nFulfill the promise.\nbe apply(\nvalue: A)\n\nParameters\u00b6\n\nvalue: A\n\n\nreject\u00b6\n[Source]\nReject the promise."} +{"id": "Pony/buffered-Reader-_30.txt", "contents": "\n\npeek_u64_le\u00b6\n[Source]\nPeek at a little-endian U64.\nfun box peek_u64_le(\noffset: USize val = 0)\n: U64 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU64 val ?\n\n\npeek_i64_be\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_21.txt", "contents": "String val\n\n\nyellow_bg\u00b6\n[Source]\nYellow background.\nfun box yellow_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nblue_bg\u00b6\n[Source]\nBlue background.\nfun box blue_bg()\n: String val\n"} +{"id": "Pony/src-pony_check-property_helper-_36.txt", "contents": "expect: ReadSeq[A],\nactual: ReadSeq[A],\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the contents of the 2 given ReadSeqs are equal.\n\"\"\"\nvar ok = true\n\nif expect.size() != actual.size() then\nok = false\nelse\ntry\nvar i: USize = 0\nwhile i < expect.size() do\nif expect(i)? != actual(i)? then\nok = false\nbreak"} +{"id": "Pony/src-builtin-unsigned-_74.txt", "contents": "fun addc(y: USize): (USize, Bool) =>\nifdef ilp32 then\n(let r, let o) =\n@\"llvm.uadd.with.overflow.i32\"(this.u32(), y.u32())\n(r.usize(), o)\nelse\n(let r, let o) =\n@\"llvm.uadd.with.overflow.i64\"(this.u64(), y.u64())\n(r.usize(), o)\nend\n\nfun subc(y: USize): (USize, Bool) =>\nifdef ilp32 then\n(let r, let o) =\n@\"llvm.usub.with.overflow.i32\"(this.u32(), y.u32())\n(r.usize(), o)\nelse\n(let r, let o) =\n@\"llvm.usub.with.overflow.i64\"(this.u64(), y.u64())\n(r.usize(), o)"} +{"id": "Pony/src-process-_process-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-Integer-_32.txt", "contents": "y: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/pony_check-ForAll3-_0.txt", "contents": "\n\n\n\n\n\n\nForAll3[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\nclass ref ForAll3[T1: T1, T2: T2, T3: T3]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\ngen3': Generator[T3] val,\nh: TestHelper val)\n: ForAll3[T1, T2, T3] ref^"} +{"id": "Pony/src-pony_test-test_helper-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-pony_check-generator-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/src-random-random-_11.txt", "contents": " Random package\n\nThe Random package provides support generating random numbers. The package\nprovides random number generators you can use in your code, a dice roller and\na trait for implementing your own random number generator.\n\nIf your application does not require a specific generator, use Rand.\n\nSeed values can contain up to 128 bits of randomness in the form of two U64s.\nA common non-cryptographically secure way to seed a generator is with\n`Time.now`.\n\n```pony\nlet rand = Rand\nlet n = rand.next()\n```\n\"\"\"\ntype Rand is XorOshiro128Plus\n\ntrait Random"} +{"id": "Pony/net-OSSockOpt-_561.txt", "contents": "fun box tcpopt_sack_hdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_sack_permitted\u00b6\n[Source]\nfun box tcpopt_sack_permitted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_sack_permit_hdr\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIILettersLower-_0.txt", "contents": "\n\n\n\n\n\n\nASCIILettersLower\u00b6\n[Source]\nprimitive val ASCIILettersLower\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIILettersLower val^\n\nReturns\u00b6\n\nASCIILettersLower val^"} +{"id": "Pony/builtin-Array-_50.txt", "contents": "\nreverse\u00b6\n[Source]\nCreate a new array with the elements in reverse order.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not copied.\nfun box reverse()\n: Array[this->A!] ref^\n\nReturns\u00b6\n\nArray[this->A!] ref^\n\n\nreverse_in_place\u00b6\n[Source]\nReverse the array in place.\nfun ref reverse_in_place()\n: None val\n"} +{"id": "Pony/builtin-ISize-_50.txt", "contents": "\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-encode-base64-base64-_13.txt", "contents": "\"\"\"\nencode(data, '+', '/', '=', 64)\n\nfun encode_mime(data: ReadSeq[U8]): String iso^ =>\n\"\"\"\nEncode for MIME (RFC 2045).\n\"\"\"\nencode(data, '+', '/', '=', 76)\n\nfun encode_url[A: Seq[U8] iso = String iso](\ndata: ReadSeq[U8],\npad: Bool = false)\n: A^\n=>\n\"\"\"\nEncode for URLs (RFC 4648). Padding characters are stripped by default.\n\"\"\"\nlet c: U8 = if pad then '=' else 0 end\nencode[A](data, '-', '_', c)\n"} +{"id": "Pony/builtin-String-_41.txt", "contents": "Add a byte to the end of the string.\nfun ref push(\nvalue: U8 val)\n: None val\n\nParameters\u00b6\n\nvalue: U8 val\n\nReturns\u00b6\n\nNone val\n\n\npop\u00b6\n[Source]\nRemove a byte from the end of the string.\nfun ref pop()\n: U8 val ?\n"} +{"id": "Pony/itertools-Iter-_22.txt", "contents": ": B^\n\nParameters\u00b6\n\nacc: B\nf: {(B, A!): B^}[A, B] box\n\nReturns\u00b6\n\nB^\n\n\nfold_partial[B: B]\u00b6\n[Source]\nA partial version of fold.\nfun ref fold_partial[B: B](\nacc: B,\nf: {(B, A!): B^ ?}[A, B] box)\n: B^ ?\n"} +{"id": "Pony/net-TCPAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: TCPAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/builtin-I16-_48.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_21.txt", "contents": "let _term: ANSITerm tag\n\nnew create(term: ANSITerm tag) =>\n_term = term\n\nfun apply(times: U32): Bool =>\n_term.size()\ntrue\n\nprimitive _TIOCGWINSZ\nfun apply(): ULong =>\nifdef linux then\n21523\nelseif osx or bsd then\n1074295912\nelse\n0\nend\n\nactor ANSITerm"} +{"id": "Pony/src-collections-flag-_14.txt", "contents": "fun ref union(that: Flags[A, B] box) =>\n\"\"\"\nThe union of this and that.\n\"\"\"\n_value = this._value or that._value\n\nfun ref intersect(that: Flags[A, B] box) =>\n\"\"\"\nThe intersection of this and that.\n\"\"\"\n_value = this._value and that._value\n\nfun ref difference(that: Flags[A, B] box) =>\n\"\"\"\nThe symmetric difference of this and that.\n\"\"\"\n_value = this._value xor that._value\n\nfun ref remove(that: Flags[A, B] box) =>\n\"\"\""} +{"id": "Pony/src-builtin-signed-_86.txt", "contents": "end\nelseif y < 0 then\nq' = -q'\nend\n\n(q', r')\nend\n\nfun div(y: I128): I128 =>\nifdef native128 then\nthis / y\nelse\n(let q, let r) = divrem(y)\nq\nend\n\nfun rem(y: I128): I128 =>\nifdef native128 then\nthis % y\nelse"} +{"id": "Pony/src-collections-persistent-vec-_28.txt", "contents": "fun _leaf_nodes(): Array[Array[A] val]^ =>\nlet lns = Array[Array[A] val](_size / 32)\nmatch _root\n| let vn: _VecNode[A] => vn.leaf_nodes(lns)\nend\nif _tail.size() > 0 then lns.push(_tail) end\nlns\n\nclass VecKeys[A: Any #share]\nembed _pairs: VecPairs[A]\n\nnew create(v: Vec[A]) => _pairs = VecPairs[A](v)\n\nfun has_next(): Bool => _pairs.has_next()\n\nfun ref next(): USize ? => _pairs.next()?._1\n\nclass VecValues[A: Any #share]\nembed _pairs: VecPairs[A]\n"} +{"id": "Pony/net-UDPSocket-_8.txt", "contents": "to: NetAddress val)\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\nto: NetAddress val\n\n\nwritev\u00b6\n[Source]\nWrite a sequence of sequences of bytes.\nbe writev(\ndata: ByteSeqIter val,\nto: NetAddress val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\nto: NetAddress val\n"} +{"id": "Pony/net-OSSockOpt-_149.txt", "contents": "fun box ipv6_pmtudisc_interface()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_omit\u00b6\n[Source]\nfun box ipv6_pmtudisc_omit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_probe\u00b6\n[Source]"} +{"id": "Pony/src-collections-heap-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/collections-persistent-Cons-_0.txt", "contents": "\n\n\n\n\n\n\nCons[A: A]\u00b6\n[Source]\nA list with a head and a tail, where the tail can be empty.\nclass val Cons[A: A] is\nReadSeq[val->A] box\n\nImplements\u00b6\n\nReadSeq[val->A] box\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-collections-map-_28.txt", "contents": "end\nend\nend\n\nfun ref upsert(key: K, value: V, f: {(V, V): V^} box): V! =>\n\"\"\"\nCombines a provided value with the current value for the provided key\nusing the provided function. If the provided key has not been added to\nthe map yet, it sets its value to the provided value and ignores the\nprovided function.\n\nAs a simple example, say we had a map with I64 values and we wanted to\nadd 4 to the current value for key \"test\", which let's say is currently 2.\nWe call\n\nm.upsert(\"test\", 4, {(current, provided) => current + provided })\n\nThis changes the value associated with \"test\" to 6.\n\nIf we have not yet added the key \"new-key\" to the map and we call"} +{"id": "Pony/lexicon_1.txt", "contents": "# Terminology\n\n**Braces**: { }. Synonymous with curly brackets.\n\n**Brackets**: This term is ambiguous. In the UK it usually means ( ) in the US is usually means [ ]. It should, therefore, be avoided for use for either of these. Can be used as a general term for any unspecified grouping punctuation, including { }.\n\n**Compatible type**: Two types are compatible if there can be any single object which is an instance of both types. Note that a suitable type for the single object does not have to have been defined, as long as it could be. For example, any two traits are compatible because a class could be defined that provides both of them, even if such a class has not been defined. Conversely, no two classes can ever be compatible because no object can be an instance of both.\n\n**Compound type**: A type combining multiple other types, i.e. union, intersection, and tuple. Opposite of a single type.\n\n**Concrete type**: An actor, class or primitive.\n\n**Curly brackets**: { }. Synonymous with braces.\n\n**Declaration** and **definition**: synonyms for each other, we do not draw the C distinction between forward declarations and full definitions.\n\n**Default method body**: Method body defined in a trait and optionally used by concrete types.\n\n**Entity**: Top level definition within a file, i.e. alias, trait, actor, class, primitive.\n"} +{"id": "Pony/builtin-SignedInteger-_12.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_4.txt", "contents": "msg: String val = \"Test failed\")\n: None val\n\nParameters\u00b6\n\nmsg: String val = \"Test failed\"\n\nReturns\u00b6\n\nNone val\n\n\nassert_false\u00b6\n[Source]\nAssert that the given expression is false.\nfun box assert_false(\npredicate: Bool val,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val"} +{"id": "Pony/src-pony_check-int_properties-_8.txt", "contents": "| 3 => \"U64(\" + int.u64().string() + \")\"\n| 4 => \"ULong(\" + int.ulong().string() + \")\"\n| 5 => \"USize(\" + int.usize().string() + \")\"\n| 6 => \"U128(\" + int.string() + \")\"\n| 7 => \"I8(\" + int.i8().string() + \")\"\n| 8 => \"I16(\" + int.i16().string() + \")\"\n| 9 => \"I32(\" + int.i32().string() + \")\"\n| 10 => \"I64(\" + int.i64().string() + \")\"\n| 11 => \"ILong(\" + int.ilong().string() + \")\"\n| 12 => \"ISize(\" + int.isize().string() + \")\"\n| 13 => \"I128(\" + int.i128().string() + \")\"\nelse\n\"\"\nend\nnum.clone()\n\nclass IntPropertySample is Stringable\nlet choice: U8\nlet int: U128\n"} +{"id": "Pony/src-collections-map-_32.txt", "contents": "end\n\nfun ref insert_if_absent(key: K, value: V): V! =>\n\"\"\"\nSet a value in the map if the key doesn't already exist in the Map.\nSaves an extra lookup when doing a pattern like:\n\n```pony\nif not my_map.contains(my_key) then\nmy_map(my_key) = my_value\nend\n```\n\nReturns the value, the same as `insert`, allowing 'insert_if_absent'\nto be used as a drop-in replacement for `insert`.\n\"\"\"\nlet value' = value\n\ntry\n(let i, let found) = _search(key)"} +{"id": "Pony/src-files-directory-_29.txt", "contents": "use @ponyint_windows_readdir[Pointer[U8] iso^](data: Pointer[_DirectoryEntry])\nif windows\nuse @FindFirstFileA[Pointer[_DirectoryHandle]](file_name: Pointer[U8] tag, data: Pointer[_DirectoryEntry])\nif windows\nuse @FindNextFileA[Bool](handle: Pointer[None] tag, data: Pointer[_DirectoryEntry])\nif windows\nuse @FindClose[Bool](handle: Pointer[_DirectoryHandle] tag) if windows\n\nprimitive _DirectoryHandle\nprimitive _DirectoryEntry\n\nclass Directory\n\"\"\"\nOperations on a directory.\n\nThe directory-relative functions (open, etc) use the *at interface on FreeBSD\nand Linux. This isn't available on OS X prior to 10.10, so it is not used. On\nFreeBSD, this allows the directory-relative functions to take advantage of\nCapsicum.\n\"\"\""} +{"id": "Pony/src-pony_check-property-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201use \"time\"\n\nclass val PropertyParams is Stringable\n\"\"\"\nParameters to control Property Execution.\n\n* seed: the seed for the source of Randomness\n* num_samples: the number of samples to produce from the property generator\n* max_shrink_rounds: the maximum rounds of shrinking to perform\n* max_generator_retries: the maximum number of retries to do if a generator fails to generate a sample\n* timeout: the timeout for the PonyTest runner, in nanoseconds"} +{"id": "Pony/src-collections-set-_0.txt", "contents": "\n\n\n\n\n\n\nset.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/pony_bench-AsyncBenchContinue-_1.txt", "contents": "\n\nfail\u00b6\n[Source]\nfun box fail()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_136.txt", "contents": "\nwhile n < offset do\nif iter.has_next() then\niter.next()?\nelse\nreturn\nend\n\nn = n + 1\nend\n\nn = 0\n\nwhile n < len do\nif iter.has_next() then\npush(iter.next()?)\nelse\nreturn\nend\n"} +{"id": "Pony/builtin-F32-_38.txt", "contents": "fun box add_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nsub_unsafe\u00b6\nfun box sub_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n"} +{"id": "Pony/src-process-process_monitor-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-ULong-_6.txt", "contents": "\nULong val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/src-promises-promise-_24.txt", "contents": "\nfun tag next[B: Any #share](\nfulfill: Fulfill[A, B],\nrejected: Reject[B] = RejectAlways[B])\n: Promise[B]\n=>\n\"\"\"\nChain a promise after this one.\n\nWhen this promise is fulfilled, the result of type A is passed to the\nfulfill function, generating in an intermediate result of type B. This\nis then used to fulfill the next promise in the chain.\n\nIf there is no fulfill function, or if the fulfill function raises an\nerror, then the next promise in the chain will be rejected.\n\nIf this promise is rejected, this step's reject function is called with no\ninput, generating an intermediate result of type B which is used to\nfulfill the next promise in the chain.\n"} +{"id": "Pony/builtin-U32-_7.txt", "contents": "\nU32 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/collections-HashEq64-_3.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: HashEq64[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: HashEq64[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/builtin-Bool-_4.txt", "contents": "[Source]\nfun box op_or(\ny: Bool val)\n: Bool val\n\nParameters\u00b6\n\ny: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: Bool val)\n: Bool val\n"} +{"id": "Pony/builtin-String-_45.txt", "contents": ": None val\n\nParameters\u00b6\n\niter: Iterator[U8 val] ref\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nclear\u00b6\n[Source]\nTruncate the string to zero length.\nfun ref clear()\n: None val\n\nReturns\u00b6"} +{"id": "Pony/src-cli-command-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/guarantees_2.txt", "contents": "# Mutable reference capabilities\n\nThe __mutable__ reference capabilities are `iso`, `trn` and `ref`. These reference capabilities are __mutable__ because they can be used to both read from and write to an object.\n\n* If an actor has an `iso` variable, no other variable can be used by _any_ actor to read from or write to that object. This means an `iso` variable is the only variable anywhere in the program that can read from or write to that object. It is _read and write unique_.\n* If an actor has a `trn` variable, no other variable can be used by _any_ actor to write to that object, and no other variable can be used by _other_ actors to read from or write to that object. This means a `trn` variable is the only variable anywhere in the program that can write to that object, but other variables held by the same actor may be able to read from it. It is _write unique_.\n* If an actor has a `ref` variable, no other variable can be used by _other_ actors to read from or write to that object. This means that other variables can be used to read from and write to the object, but only from within the same actor.\n\n__Why can they be used to write?__ Because they all stop _other_ actors from reading from or writing to the object. Since we know no other actor will be reading, it's safe for us to write to the object, without having to worry about data-races. And since we know no other actor will be writing, it's safe for us to read from the object, too.\n"} +{"id": "Pony/src-pony_test-test_helper-_42.txt", "contents": "\"\"\"\nMUST be called by each long test to indicate the test has finished, unless\na timeout occurs. If you are using expect_action() then complete(true) will\nbe called once the last expected action has been completed via\ncomplete_action().\n\nThe \"success\" parameter specifies whether the test succeeded. However if\nany asserts fail the test will be considered a failure, regardless of the\nvalue of this parameter.\n\nOnce this is called tear_down() may be called at any time.\n\"\"\"\n_runner.complete(success)\n\nfun expect_action(name: String) =>\n\"\"\"\nCan be called in a long test to set up expectations for one or more actions\nthat, when all completed, will complete the test.\n\nThis pattern is useful for cases where you have multiple things that need"} +{"id": "Pony/builtin-F64-_68.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: F64 val)\n: (Less val | Equal val | Greater val)\n"} +{"id": "Pony/src-time-time-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-real-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/src-pony_check-property-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-pony_check-generator-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/builtin-U16-_37.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Cons-_11.txt", "contents": "\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\nfold[B: B]\u00b6\n[Source]\nFolds the elements of the list using the supplied function.\nfun val fold[B: B](\nf: {(B, val->A): B^}[A, B] box,\nacc: B)\n: B\n\nParameters\u00b6\n\nf: {(B, val->A): B^}[A, B] box\nacc: B"} +{"id": "Pony/net-OSSockOpt-_445.txt", "contents": "fun box sctp_pr_assoc_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pr_stream_status\u00b6\n[Source]\nfun box sctp_pr_stream_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pr_supported\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_263.txt", "contents": "fun box mrt_mfc_flags_disable_wrongvif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_mfc_rp\u00b6\n[Source]\nfun box mrt_mfc_rp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_pim\u00b6\n[Source]"} +{"id": "Pony/pony_bench-OverheadBenchmark-_4.txt", "contents": "before_iteration\u00b6\n[Source]\nfun ref before_iteration()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\nafter\u00b6\n[Source]\nfun ref after()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n"} +{"id": "Pony/builtin-Iterator-_2.txt", "contents": "// Generates values from `from` to 0\nclass ref Countdown is Iterator[USize]\nvar _cur: USize\nvar _has_next: Bool = true\n\nnew ref create(from: USize) =>\n_cur = from\n\nfun ref has_next(): Bool =>\n_has_next\n\nfun ref next(): USize =>\nlet elem = _cur = _cur - 1\nif elem == 0 then\n_has_next = false\nend\nelem\n\ninterface ref Iterator[A: A]\n"} +{"id": "Pony/term-ANSI-_26.txt", "contents": "\n\nbright_blue_bg\u00b6\n[Source]\nBright blue background.\nfun box bright_blue_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_magenta_bg\u00b6\n[Source]\nBright magenta background.\nfun box bright_magenta_bg()\n: String val\n\nReturns\u00b6"} +{"id": "Pony/builtin-SignedInteger-_19.txt", "contents": "A ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-collections-ring_buffer-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78class RingBuffer[A]\n\"\"\"\nA ring buffer.\n\"\"\"\nembed _array: Array[A]\nlet _mod: USize\nvar _write: USize = 0\n\nnew create(len: USize) =>\n\"\"\"\nCreate a ring buffer with a fixed size. The size will be rounded up to the\nnext power of 2.\n\"\"\"\nlet n = len.max(2).next_pow2()"} +{"id": "Pony/builtin-Real-_30.txt", "contents": "U8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/format-AlignRight-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: AlignRight val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignRight val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_36.txt", "contents": "s\n\nclass val OptionSpec\n\"\"\"\nOptionSpec describes the specification of a named Option. They have a name,\ndescr(iption), a short-name, a typ(e), and a default value when they are not\nrequired.\n\nOptions can be placed anywhere before or after commands, and can be thought\nof as named arguments.\n\"\"\"\nlet _name: String\nlet _descr: String\nlet _short: (U8 | None)\nlet _typ: _ValueType\nlet _default: _Value\nlet _required: Bool\n\nfun tag _init(typ': _ValueType, default': (_Value | None))\n: (_ValueType, _Value, Bool)"} +{"id": "Pony/builtin-Array-_34.txt", "contents": "\n\nclear\u00b6\n[Source]\nRemove all elements from the array.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\npush_u8[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nAdd a U8 to the end of the array. This is only allowed for an array of U8s.\nfun ref push_u8[optional B: (A & Real[B] val & U8 val)](\nvalue: U8 val)\n: None val\n"} +{"id": "Pony/reference-capabilities_11.txt", "contents": "\n```pony\nlet a: String val = \"Hello, world!\"\nlet b: String = \"I'm a wombat!\" // Also a String val\n```\n\n__So do I have to specify a reference capability when I define a type?__ Only if you want to. There are sensible defaults that most types will use. These are `ref` for classes, `val` for primitives (i.e. immutable references), and `tag` for actors.\n"} +{"id": "Pony/builtin-I64-_28.txt", "contents": "I64 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/files-Path-_8.txt", "contents": "\nParameters\u00b6\n\nto: String val\ntarget: String val\n\nReturns\u00b6\n\nString val ?\n\n\nsplit\u00b6\n[Source]\nSplits the path into a pair, (head, tail) where tail is the last pathname\ncomponent and head is everything leading up to that. The tail part will\nnever contain a slash; if path ends in a slash, tail will be empty. If\nthere is no slash in path, head will be empty. If path is empty, both head\nand tail are empty. The path in head will be cleaned before it is returned.\nIn all cases, join(head, tail) returns a path to the same location as path\n(but the strings may differ). Also see the functions dir() and base()."} +{"id": "Pony/ponytest_0.txt", "contents": "# Testing with PonyTest\n\nPonyTest is Pony's unit testing framework. It is designed to be as simple as possible to use, both for the unit test writer and the user running the tests.\n\nEach unit test is a class, with a single test function. By default, all tests run concurrently.\n\nEach test run is provided with a helper object. This provides logging and assertion functions. By default log messages are only shown for tests that fail.\n\nWhen any assertion function fails the test is counted as a fail. However, tests can also indicate failure by raising an error in the test function.\n"} +{"id": "Pony/pony_check-ASCIIWhiteSpace-_2.txt", "contents": "\nthat: ASCIIWhiteSpace val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIWhiteSpace val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIWhiteSpace val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-reverse-_4.txt", "contents": "6\n4\n2\n```\n\nIf `dec` is 0, produces an infinite series of `max`.\n\nIf `dec` is negative, produces a range with `max` as the only value.\n\n\"\"\"\n\nlet _min: A\nlet _max: A\nlet _dec: A\nvar _idx: A\n\nnew create(max: A, min: A, dec: A = 1) =>\n_min = min\n_max = max\n_dec = dec"} +{"id": "Pony/src-promises-promise-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_125.txt", "contents": "fun box ipv6_2292hoplimit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292hopopts\u00b6\n[Source]\nfun box ipv6_2292hopopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292pktinfo\u00b6\n[Source]"} +{"id": "Pony/cli-Option-_0.txt", "contents": "\n\n\n\n\n\n\nOption\u00b6\n[Source]\nOption contains a spec and an effective value for a given option.\nclass val Option\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nspec': OptionSpec val,\nvalue': (Bool val | String val | I64 val |\nU64 val | F64 val | _StringSeq val))\n: Option val^"} +{"id": "Pony/src-itertools-iter-_60.txt", "contents": "object is Iterator[B]\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): B ? =>\nf(_iter.next()?)?\nend)\n\nfun ref filter_stateful(f: {ref(A!): Bool ?}): Iter[A!]^ =>\n\"\"\"\nAllows filtering of elements based on a stateful adapter, similar to\n`filter`.\n\"\"\"\nIter[A!](\nobject\nvar _next: (A! | _None) = _None\n\nfun ref _find_next() =>\ntry\nmatch _next"} +{"id": "Pony/src-builtin-signed-_83.txt", "contents": "fun clz_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i128\"(this.u128(), true)\n\nfun ctz_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i128\"(this.u128(), true)\n\nfun bitwidth(): U128 => 128\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: I128): I128 => if this < y then this else y end\nfun max(y: I128): I128 => if this > y then this else y end"} +{"id": "Pony/src-pony_check-generator-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/random-XorOshiro128Plus-_13.txt", "contents": "\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\n[Source]\nfun ref real()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n"} +{"id": "Pony/src-files-file_path-_25.txt", "contents": "caps': FileCaps val = recover val FileCaps .> all() end) ?\n=>\n\"\"\"\nCreate a new path from an existing `FilePath`.\n\npath' is relative to the existing `FilePath`,\nand the existing `FilePath` must be a prefix of the resulting path.\n\nThe resulting `FilePath` will have capabilities that are the intersection of\nthe supplied capabilities and the capabilities of the existing `FilePath`.\n\"\"\"\ncaps.union(caps')\nif not base.caps(FileLookup) then\nerror\nend\n\nlet tmp_path = Path.join(base.path, path')\ncaps.intersect(base.caps)\n\nif not tmp_path.at(base.path, 0) then"} +{"id": "Pony/files-Directory-_4.txt", "contents": "Parameters\u00b6\n\ntarget: String val\n\nReturns\u00b6\n\nBool val\n\n\ncreate_file\u00b6\n[Source]\nOpen for read/write, creating if it doesn't exist, preserving the contents\nif it does exist.\nfun box create_file(\ntarget: String val)\n: File iso^ ?\n\nParameters\u00b6\n\ntarget: String val"} +{"id": "Pony/src-pony_check-generator-_77.txt", "contents": "object is Iterator[ValueAndShrink[T]]\nfun ref has_next(): Bool => true\nfun ref next(): ValueAndShrink[T] ? =>\nmatch that.generate(rnd)?\n| let value_only: T => that.shrink(consume value_only)\n| (let v: T, let shrinks: Iterator[T^]) => (consume v, consume shrinks)\nend\nend\n\n\nclass box Generator[T] is GenObj[T]\n\"\"\"\nA Generator is capable of generating random values of a certain type `T`\ngiven a source of `Randomness`\nand knows how to shrink or simplify values of that type.\n\nWhen testing a property against one or more given Generators,\nthose generators' `generate` methods are being called many times\nto generate sample values that are then used to validate the property.\n"} +{"id": "Pony/capsicum-Cap-_16.txt", "contents": "fun box fpathconf()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfsck\u00b6\n[Source]\nfun box fsck()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfstat\u00b6\n[Source]"} +{"id": "Pony/builtin-Platform-_3.txt", "contents": "Bool val\n\n\nlinux\u00b6\n[Source]\nfun box linux()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nosx\u00b6\n[Source]\nfun box osx()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/1_variables_5.txt", "contents": "\nYou never have to declare variables as `let`, but if you know you're never going to change what a variable references then using `let` is a good way to catch errors. It can also serve as a useful comment, indicating what is referenced is not meant to be changed.\n"} +{"id": "Pony/src-process-_process-_45.txt", "contents": "var wr: _WaitResult = WaitpidError\nif h_process != 0 then\nvar exit_code: I32 = 0\nmatch @ponyint_win_process_wait(h_process, addressof exit_code)\n| 0 =>\nwr = Exited(exit_code)\nfinal_wait_result = wr\nwr\n| 1 => _StillRunning\n| let code: I32 =>\n// we might want to propagate that code to the user, but should it do\n// for other errors too\nfinal_wait_result = wr\nwr\nend\nelse\nfinal_wait_result = wr\nwr\nend\nend"} +{"id": "Pony/src-pony_check-generator-_126.txt", "contents": "\"\"\"\nlet that = this\nGenerator[ULong](\nobject is GenObj[ULong]\nfun generate(rnd: Randomness): ULong^ =>\nrnd.ulong(min, max)\n\nfun shrink(u: ULong): ValueAndShrink[ULong] =>\nthat._int_shrink[ULong](consume u, min)\nend)\n\nfun i8(\nmin: I8 = I8.min_value(),\nmax: I8 = I8.max_value())\n: Generator[I8]\n=>\n\"\"\"\nCreate a generator for I8 values.\n\"\"\"\nlet that = this"} +{"id": "Pony/builtin-U32-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_464.txt", "contents": "fun box sctp_ss_round_robin_packet()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_value\u00b6\n[Source]\nfun box sctp_ss_value()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_status\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_32.txt", "contents": "\nif element.size() > 0 then\nlet r = ifdef windows then\n@_mkdir(element.cstring())\nelse\n@mkdir(element.cstring(), U32(0x1FF))\nend\n\nif r != 0 then\nif @pony_os_errno() != @pony_os_eexist() then\nreturn false\nend\n\nif must_create and (offset < 0) then\nreturn false\nend\nend\nend\nuntil offset < 0 end\n"} +{"id": "Pony/net-OSSockOpt-_74.txt", "contents": "fun box af_coip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\naf_inet\u00b6\n[Source]\nfun box af_inet()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\naf_inet6\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-builtin-asio_event-_5.txt", "contents": "\nfun dispose(): U32 => 0\n\nfun read(): U32 => 1 << 0\n\nfun write(): U32 => 1 << 1\n\nfun timer(): U32 => 1 << 2\n\nfun signal(): U32 => 1 << 3\n\nfun read_write(): U32 => read() or write()\n\nfun oneshot(): U32 => 1 << 8\n\nfun read_write_oneshot(): U32 => read() or write() or oneshot()\n\n\n\n"} +{"id": "Pony/random-SplitMix64-_11.txt", "contents": "U64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)"} +{"id": "Pony/net-OSSockOpt-_546.txt", "contents": "fun box tcpi_opt_toe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_wscale\u00b6\n[Source]\nfun box tcpi_opt_wscale()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_cc\u00b6\n[Source]"} +{"id": "Pony/pony_bench--index-_4.txt", "contents": "\nBenchmark mean median deviation iterations\nNothing 1 ns 1 ns \u00b10.87% 3000000\n_Fib(5) 12 ns 12 ns \u00b11.02% 2000000\n_Fib(10) 185 ns 184 ns \u00b11.03% 1000000\n_Fib(20) 23943 ns 23898 ns \u00b11.11% 10000\n_Timer (10000ns) 10360 ns 10238 ns \u00b13.25% 10000\n\nThe --noadjust option outputs results of the overhead measured prior to each\nbenchmark run followed by the unadjusted benchmark result. An example of the\noutput of this program with --noadjust is as follows:\nBenchmark mean median deviation iterations\nBenchmark Overhead 604 ns 603 ns \u00b10.58% 300000\nNothing 553 ns 553 ns \u00b10.30% 300000\nBenchmark Overhead 555 ns 555 ns \u00b10.51% 300000\n_Fib(5) 574 ns 574 ns \u00b10.43% 300000\nBenchmark Overhead 554 ns 556 ns \u00b10.48% 300000\n_Fib(10) 822 ns 821 ns \u00b10.39% 200000\nBenchmark Overhead 554 ns 553 ns \u00b10.65% 300000\n_Fib(20) 30470 ns 30304 ns \u00b11.55% 5000"} +{"id": "Pony/c-abi_2.txt", "contents": "\nb.i32()\n```\n\nLet's say we wish to compare the pure Pony performance to an existing C function with the following header:\n\n```c"} +{"id": "Pony/src-collections-map-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-promises-promise-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/net-TCPConnection-_4.txt", "contents": "_out = out\n\nfun ref throttled(connection: TCPConnection ref) =>\n_out.print(\"Experiencing backpressure!\")\nBackpressure.apply(_auth)\n\nfun ref unthrottled(connection: TCPConnection ref) =>\n_out.print(\"Releasing backpressure!\")\nBackpressure.release(_auth)\n\nfun ref closed(connection: TCPConnection ref) =>\n// if backpressure has been applied, make sure we release\n// when shutting down\n_out.print(\"Releasing backpressure if applied!\")\nBackpressure.release(_auth)\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main"} +{"id": "Pony/collections-Flags-_14.txt", "contents": "Parameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nFlags[A, B] iso^\n\n\nwithout\u00b6\n[Source]\nThe flags in this that are not in that.\nfun box without(\nthat: Flags[A, B] box)\n: Flags[A, B] iso^\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n"} +{"id": "Pony/builtin-String-_17.txt", "contents": "None val\n\n\nrecalc\u00b6\n[Source]\nRecalculates the string length. This is only needed if the string is\nchanged via an FFI call. If a null terminator byte is not found within the\nallocated length, the size will not be changed.\nfun ref recalc()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\ntruncate\u00b6\n[Source]\nTruncates the string at the minimum of len and space. Ensures there is a\nnull terminator. Does not check for null terminators inside the string."} +{"id": "Pony/src-buffered-writer-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-builtin-array-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/net-OSSockOpt-_199.txt", "contents": "fun box ip_dummynet_configure()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dummynet_del\u00b6\n[Source]\nfun box ip_dummynet_del()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dummynet_flush\u00b6\n[Source]"} +{"id": "Pony/src-files-file-_57.txt", "contents": "\"\"\"\nlet pos = position()\n_seek(0, 2)\nlet len = position()\n_seek(pos.i64(), 0)\nlen\n\nfun ref seek_start(offset: USize) =>\n\"\"\"\nSet the cursor position relative to the start of the file.\n\"\"\"\nif path.caps(FileSeek) then\n_seek(offset.i64(), 0)\nend\n\nfun ref seek_end(offset: USize) =>\n\"\"\"\nSet the cursor position relative to the end of the file.\n\"\"\"\nif path.caps(FileSeek) then"} +{"id": "Pony/builtin-I64-_31.txt", "contents": "fun box div_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: I64 val)\n: (I64 val , I64 val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-F32-_64.txt", "contents": "\nI64 val\n\n\nilong_unsafe\u00b6\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val"} +{"id": "Pony/src-files-file_mode-_11.txt", "contents": "if group_read then m = m or 0x20 end\nif group_write then m = m or 0x10 end\nif group_exec then m = m or 0x8 end\nif any_read then m = m or 0x4 end\nif any_write then m = m or 0x2 end\nif any_exec then m = m or 0x1 end\nend\nm\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-path-_32.txt", "contents": "\"\"\"\nlet s = recover String(path.size()) end\nlet vol = volume(path)\ns.append(vol)\n\nvar state: _PathState = _PathOther\nvar i = vol.size()\nvar backtrack = ISize(-1)\nlet n = path.size()\n\ntry\nvar c = path(i)?\n\nif is_sep(c) then\ns.append(sep())\ni = i + 1\nstate = _PathSep\nelseif c == '.' then\ni = i + 1\nstate = _PathDot"} +{"id": "Pony/src-cli-command_parser-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-signed-_81.txt", "contents": "_SignedCheckedArithmetic.mod_checked[ISize, USize](this, y)\n\nfun add_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.add_partial[ISize](this, y)?\n\nfun sub_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.sub_partial[ISize](this, y)?\n\nfun mul_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.mul_partial[ISize](this, y)?\n\nfun div_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.div_partial[ISize, USize](this, y)?\n\nfun rem_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.rem_partial[ISize, USize](this, y)?\n\nfun divrem_partial(y: ISize): (ISize, ISize) ? =>\n_SignedPartialArithmetic.divrem_partial[ISize, USize](this, y)?\n"} +{"id": "Pony/src-pony_test-test_helper-_32.txt", "contents": "\"\"\"\nAssert that the 2 given expressions resolve to different instances.\n\"\"\"\n_check_isnt[A](\"isn't\", consume not_expect, consume actual, msg, loc)\n\nfun _check_isnt[A](\ncheck: String,\nnot_expect: A,\nactual: A,\nmsg: String,\nloc: SourceLoc)\n: Bool\n=>\n\"\"\"\nCheck that the 2 given expressions resolve to different instances.\n\"\"\"\nif not_expect is actual then\nfail(_format_loc(loc) + \"Assert \" + check + \" failed. \" + msg\n+ \" Expected (\" + (digestof not_expect).string() + \") isnt (\"\n+ (digestof actual).string() + \")\")"} +{"id": "Pony/builtin-USize-_42.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/pony_check-Poperator-_1.txt", "contents": "Constructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nseq: Seq[T] ref)\n: Poperator[T] ref^\n\nParameters\u00b6\n\nseq: Seq[T] ref\n\nReturns\u00b6\n\nPoperator[T] ref^\n\n\nempty\u00b6\n[Source]\nnew ref empty()\n: Poperator[T] ref^"} +{"id": "Pony/net-OSSockOpt-_251.txt", "contents": "fun box mcast_exclude()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_include\u00b6\n[Source]\nfun box mcast_include()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_join_group\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_17.txt", "contents": "fun box div_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-collections-list-_79.txt", "contents": "On the first iteration, the `B` argument in `f` is the value `acc`,\non the second iteration `B` is the result of the first iteration,\non the third iteration `B` is the result of the second iteration, and so on.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet folded = my_list.fold[String]( {(str: String, s: String): String => str + s }, \"z\") // \"zabc\"\n```\n\"\"\"\nlet h = try\nhead()?\nelse\nreturn acc\nend\n\n_fold[B](h, f, consume acc)\n\nfun _fold[B](\nln: this->ListNode[A],\nf: {(B!, this->A!): B^} box,"} +{"id": "Pony/files-FileLink-_0.txt", "contents": "\n\n\n\n\n\n\nFileLink\u00b6\n[Source]\nprimitive val FileLink\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileLink val^\n\nReturns\u00b6\n\nFileLink val^"} +{"id": "Pony/src-builtin-std_stream-_11.txt", "contents": "\"\"\"\nWrite the bytes and a newline without explicitly flushing.\n\"\"\"\n@pony_os_std_print(_stream, data.cpointer(), data.size())\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-udp_socket-_35.txt", "contents": "_start_next_read()\n\nnew ip4(\nauth: UDPAuth,\nnotify: UDPNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nsize: USize = 1024)\n=>\n\"\"\"\nListens for IPv4 datagrams.\n\"\"\"\n_notify = consume notify\n_event =\n@pony_os_listen_udp4(this, host.cstring(), service.cstring())\n_fd = @pony_asio_event_fd(_event)\n@pony_os_sockname(_fd, _ip)\n_packet_size = size\n_read_buf = recover Array[U8] .> undefined(size) end\n_notify_listening()"} +{"id": "Pony/itertools-Iter-_39.txt", "contents": "Zip three iterators together so that each call to next() results in\na tuple with the next value of the first iterator, the next value\nof the second iterator, and the value of the third iterator. The\nnumber of items returned is the minimum of the number of items\nreturned by the three iterators.\nfun ref zip2[B: B, C: C](\ni2: Iterator[B] ref,\ni3: Iterator[C] ref)\n: Iter[(A , B , C)] ref^\n\nParameters\u00b6\n\ni2: Iterator[B] ref\ni3: Iterator[C] ref\n\nReturns\u00b6\n\nIter[(A , B , C)] ref^\n\n"} +{"id": "Pony/src-builtin-std_stream-_9.txt", "contents": "\"\"\"\nPrint some bytes and insert a newline afterwards.\n\"\"\"\n_print(data)\n\nbe write(data: ByteSeq) =>\n\"\"\"\nPrint some bytes without inserting a newline afterwards.\n\"\"\"\n_write(data)\n\nbe printv(data: ByteSeqIter) =>\n\"\"\"\nPrint an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\n_print(bytes)\nend\n\nbe writev(data: ByteSeqIter) =>"} +{"id": "Pony/builtin-UnsignedInteger-_2.txt", "contents": "F64 val) & Real[B] val)](\na: B)\n: Real[A] val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: Real[A] val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/buffered-Writer-_20.txt", "contents": "u128_be\u00b6\n[Source]\nWrite a U128 to the buffer in big-endian byte order.\nfun ref u128_be(\ndata: U128 val)\n: None val\n\nParameters\u00b6\n\ndata: U128 val\n\nReturns\u00b6\n\nNone val\n\n\ni128_le\u00b6\n[Source]\nWrite an I128 to the buffer in little-endian byte order.\nfun ref i128_le("} +{"id": "Pony/net-UDPSocket-_21.txt", "contents": "option: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nget_so_error\u00b6\n[Source]\nWrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)\nfun ref get_so_error()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nget_so_rcvbuf\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_37.txt", "contents": "_stdout.dispose()\nend\n| _stderr.event =>\nif AsioEvent.readable(flags) then\n_pending_reads(_stderr)\nelseif AsioEvent.disposable(flags) then\n_stderr.dispose()\nend\n| _err.event =>\nif AsioEvent.readable(flags) then\n_pending_reads(_err)\nelseif AsioEvent.disposable(flags) then\n_err.dispose()\nend\nend\n_try_shutdown()\n\nbe timer_notify() =>\n\"\"\"\nWindows IO polling timer has fired"} +{"id": "Pony/src-builtin-real-_60.txt", "contents": "else\n(this << y') or (this >> (bitwidth() - y'))\nend\n\nfun rotr(y: A): A =>\nlet y' = y % bitwidth()\nif y' == y'.min_value() then\nthis._value()\nelse\n(this >> y') or (this << (bitwidth() - y'))\nend\n\nfun popcount(): A\nfun clz(): A\nfun ctz(): A\n\nfun clz_unsafe(): A\n\"\"\"\nCount leading zeroes.\n"} +{"id": "Pony/src-encode-base64-base64-_14.txt", "contents": "fun encode[A: Seq[U8] iso = String iso](\ndata: ReadSeq[U8],\nat62: U8 = '+',\nat63: U8 = '/',\npad: U8 = '=',\nlinelen: USize = 0,\nlinesep: String = \"\\r\\n\")\n: A^\n=>\n\"\"\"\nConfigurable encoding. The defaults are for RFC 4648.\n\"\"\"\nlet len = ((data.size() + 2) / 3) * 4\nlet out = recover A(len) end\nlet lineblocks = linelen / 4\n\nvar srclen = data.size()\nvar blocks = USize(0)\nvar i = USize(0)\n"} +{"id": "Pony/builtin-FloatingPoint-_9.txt", "contents": "A\n\n\nsub_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box sub_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/builtin-InputStream-_0.txt", "contents": "\n\n\n\n\n\n\nInputStream\u00b6\n[Source]\nAsynchronous access to some input stream.\ninterface tag InputStream\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nSet the notifier. Optionally, also sets the chunk size, dictating the\nmaximum number of bytes of each chunk that will be passed to the notifier.\nbe apply(\nnotify: (InputNotify iso | None val),\nchunk_size: USize val = 32)"} +{"id": "Pony/net-OSSockOpt-_373.txt", "contents": "fun box sctp_default_sndinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_delayed_sack\u00b6\n[Source]\nfun box sctp_delayed_sack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_del_vrf_id\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_56.txt", "contents": "\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n"} +{"id": "Pony/src-net-ossockopt-_116.txt", "contents": "fun sctp_selective_ack():I32 => @pony_os_sockopt_option(I32(762))\nfun sctp_set_debug_level():I32 => @pony_os_sockopt_option(I32(763))\nfun sctp_set_dynamic_primary():I32 => @pony_os_sockopt_option(I32(764))\nfun sctp_set_initial_dbg_seq():I32 => @pony_os_sockopt_option(I32(765))\nfun sctp_set_peer_primary_addr():I32 => @pony_os_sockopt_option(I32(766))\nfun sctp_shutdown():I32 => @pony_os_sockopt_option(I32(767))\nfun sctp_shutdown_ack():I32 => @pony_os_sockopt_option(I32(768))\nfun sctp_shutdown_ack_sent():I32 => @pony_os_sockopt_option(I32(769))\nfun sctp_shutdown_complete():I32 => @pony_os_sockopt_option(I32(770))\nfun sctp_shutdown_pending():I32 => @pony_os_sockopt_option(I32(771))\nfun sctp_shutdown_received():I32 => @pony_os_sockopt_option(I32(772))\nfun sctp_shutdown_sent():I32 => @pony_os_sockopt_option(I32(773))\nfun sctp_smallest_pmtu():I32 => @pony_os_sockopt_option(I32(774))\nfun sctp_ss_default():I32 => @pony_os_sockopt_option(I32(775))\nfun sctp_ss_fair_bandwith():I32 => @pony_os_sockopt_option(I32(776))\nfun sctp_ss_first_come():I32 => @pony_os_sockopt_option(I32(777))\nfun sctp_ss_priority():I32 => @pony_os_sockopt_option(I32(778))\nfun sctp_ss_round_robin():I32 => @pony_os_sockopt_option(I32(779))\nfun sctp_ss_round_robin_packet():I32 => @pony_os_sockopt_option(I32(780))\nfun sctp_ss_value():I32 => @pony_os_sockopt_option(I32(781))"} +{"id": "Pony/files-FileSync-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_66.txt", "contents": "fun box ipproto_xtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_atalk\u00b6\n[Source]\nfun box sol_atalk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_ax25\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_131.txt", "contents": "fun ref set_so_sndbuf(bufsize: U32): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`\n\"\"\"\n_OSSocket.set_so_sndbuf(_fd, bufsize)\n\nfun ref set_tcp_nodelay(state: Bool): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)`\n\"\"\"\nvar word: Array[U8] ref =\n_OSSocket.u32_to_bytes4(if state then 1 else 0 end)\n_OSSocket.setsockopt(_fd, OSSockOpt.sol_socket(), OSSockOpt.tcp_nodelay(), word)\n\n\n\n\n\n\n"} +{"id": "Pony/collections-Flags-_0.txt", "contents": "\n\n\n\n\n\n\nFlags[A: Flag[B] val, optional B: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[B] val)]\u00b6\n[Source]\nFlags is a set of flags. The flags that are recognised should be passed as\na union type for type parameter A. For example:\nprimitive SSE\nfun value(): U64 => 1\nprimitive AVX\nfun value(): U64 => 2\nprimitive RDTSCP\nfun value(): U64 => 4\ntype Features is Flags[(SSE | AVX | RDTSCP)]\nType parameter B is the underlying field used to store the flags.\nclass ref Flags[A: Flag[B] val, optional B: ((U8 val | U16 val | U32 val |"} +{"id": "Pony/src-builtin-string-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-process-_process-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/lexicon_0.txt", "contents": "# Lexicon\n\nWords are hard. We can all be saying the same thing but do we _mean_ the same thing? It's tough to know. Hopefully, this lexicon helps a little.\n"} +{"id": "Pony/src-itertools-iter-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-U16-_43.txt", "contents": "fun box eq(\ny: U16 val)\n: Bool val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: U16 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/backpressure-Backpressure-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nauth: ApplyReleaseBackpressureAuth val)\n: None val\n\nParameters\u00b6\n\nauth: ApplyReleaseBackpressureAuth val\n\nReturns\u00b6\n\nNone val\n\n\nrelease\u00b6\n[Source]"} +{"id": "Pony/src-builtin-asio_event-_4.txt", "contents": "\"\"\"\n(flags and (1 << 0)) != 0\n\nfun writeable(flags: U32): Bool =>\n\"\"\"\nReturns true if the flags contain the writeable flag.\n\"\"\"\n(flags and (1 << 1)) != 0\n\nfun disposable(flags: U32): Bool =>\n\"\"\"\nReturns true if the event should be disposed of.\n\"\"\"\nflags == 0\n\nfun oneshotable(flags: U32): Bool =>\n\"\"\"\nReturns true if the flags contain the oneshot flag.\n\"\"\"\n(flags and (1 << 8)) != 0"} +{"id": "Pony/src-collections-list-_73.txt", "contents": "fun clone(): List[this->A!]^ =>\n\"\"\"\nClone all elements into a new List.\n\nNote: elements are not copied, an additional reference to each element is created in the new List.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.clone() // my_list is [\"a\"; \"b\"; \"c\"], other_list is [\"a\"; \"b\"; \"c\"]\n```\n\"\"\"\nlet out = List[this->A!]\n\nfor v in values() do\nout.push(v)\nend\nout\n\nfun map[B](f: {(this->A!): B^} box): List[B]^ =>\n\"\"\""} +{"id": "Pony/builtin-ISize-_4.txt", "contents": "\nUSize val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: ISize val\n\nReturns\u00b6"} +{"id": "Pony/files-FileChmod-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileChmod val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-set-_16.txt", "contents": "312\n313\n314\n315type Set[A: (Hashable #read & Equatable[A] #read)] is HashSet[A, HashEq[A]]\n\ntype SetIs[A] is HashSet[A, HashIs[A!]]\n\nclass HashSet[A, H: HashFunction[A!] val] is Comparable[HashSet[A, H] box]\n\"\"\"\nA set, built on top of a HashMap. This is implemented as map of an alias of\na type to itself\n\"\"\"\nembed _map: HashMap[A!, A, H]\n\nnew create(prealloc: USize = 8) =>\n\"\"\"\nDefaults to a prealloc of 8.\n\"\"\"\n_map = _map.create(prealloc)\n"} +{"id": "Pony/src-collections-persistent-set-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-string-_59.txt", "contents": "1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191"} +{"id": "Pony/signals-Sig-_14.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nvtalrm\u00b6\n[Source]\nfun box vtalrm()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nprof\u00b6\n[Source]\nfun box prof()\n: U32 val\n"} +{"id": "Pony/src-pony_test-pony_test-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-builtin-float-_31.txt", "contents": "new e() => 2.71828182845904523536\n\nnew _nan() => compile_intrinsic\nnew _inf(negative: Bool) => compile_intrinsic\n\nnew from_bits(i: U32) => compile_intrinsic\nfun bits(): U32 => compile_intrinsic\nnew from[B: (Number & Real[B] val)](a: B) => a.f32()\n\nnew min_value() =>\n\"\"\"\nMinimum negative value representable.\n\"\"\"\nfrom_bits(0xFF7FFFFF)\n\nnew max_value() =>\n\"\"\"\nMaximum positive value representable.\n\"\"\"\nfrom_bits(0x7F7FFFFF)"} +{"id": "Pony/src-collections-reverse-_5.txt", "contents": "_idx = max\n\nfun has_next(): Bool =>\n(_idx >= _min) and (_idx <= _max)\n\nfun ref next(): A =>\nif has_next() then\n_idx = _idx - _dec\nelse\n_idx + _dec\nend\n\nfun ref rewind() =>\n_idx = _max\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_runner-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/net-OSSockOpt-_49.txt", "contents": "fun box ipproto_routing()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_rsvp\u00b6\n[Source]\nfun box ipproto_rsvp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_rvd\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_0.txt", "contents": "\n\n\n\n\n\n\nFloatingPoint[A: FloatingPoint[A] val]\u00b6\n[Source]\ntrait val FloatingPoint[A: FloatingPoint[A] val] is\nReal[A] val\n\nImplements\u00b6\n\nReal[A] val\n\n\nConstructors\u00b6\nmin_normalised\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-pony_test-test_helper-_36.txt", "contents": "\nif expect.size() != actual.size() then\nok = false\nelse\ntry\nvar i: USize = 0\nwhile i < expect.size() do\nif expect(i)? != actual(i)? then\nok = false\nbreak\nend\n\ni = i + 1\nend\nelse\nok = false\nend\nend\n\nif not ok then"} +{"id": "Pony/builtin-I16-_19.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/1_variables_2.txt", "contents": "\nvar y = \"Hello\"\n\nvar z: String\nz = \"Hello\"\n```\n\n__Can I miss out both the type and initial value for a variable?__ No. The compiler will complain that it can't figure out a type for that variable.\n\nAll local variable names start with a lowercase letter. If you want to you can end them with a _prime_ `'` (or more than one) which is useful when you need a second variable with almost the same meaning as the first. For example, you might have one variable called `time` and another called `time'`.\n\nThe chunk of code that a variable lives in is known as its __scope__. Exactly what its scope is depends on where it is defined. For example, the scope of a variable defined within the `then` expression of an `if` statement is that `then` expression. We haven't looked at `if` statements yet, but they're very similar to every other language.\n\n```pony\nif a > b then\nvar x = \"a is bigger\"\nenv.out.print(x) // OK\nend\n\nenv.out.print(x) // Illegal"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_3.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nbefore_iteration\u00b6\n[Source]\nfun ref before_iteration(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/src-builtin-string-_119.txt", "contents": "fun repeat_str(num: USize = 1, sep: String = \"\"): String iso^ =>\n\"\"\"\nReturns a copy of the string repeated `num` times with an optional\nseparator added inbetween repeats.\n\"\"\"\nvar c = num\nvar str = recover String((_size + sep.size()) * c) end\n\nwhile c > 0 do\nc = c - 1\nstr = (consume str)._append(this)\nif (sep.size() > 0) and (c != 0) then\nstr = (consume str)._append(sep)\nend\nend\n\nconsume str\n\nfun mul(num: USize): String iso^ =>\n\"\"\""} +{"id": "Pony/process-Exited-_1.txt", "contents": "Constructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\ncode: I32 val)\n: Exited val^\n\nParameters\u00b6\n\ncode: I32 val\n\nReturns\u00b6\n\nExited val^\n\n\nPublic Functions\u00b6\nexit_code\u00b6\n[Source]\nRetrieve the exit code of the exited process."} +{"id": "Pony/src-files-file-_61.txt", "contents": "@ftruncate64(_fd, len.i64())\nelse\n@ftruncate(_fd, len.i64())\nend\nend\n\nif pos >= len then\n_seek(0, 2)\nend\n\nif result == 0 then\ntrue\nelse\n_errno = _get_error()\nfalse\nend\nelse\nfalse\nend\n"} +{"id": "Pony/src-pony_test-unit_test-_6.txt", "contents": "\"\"\"\n\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/backpressure--index-_1.txt", "contents": "our Pony program that prevents them from sending. There's no way for the Pony\nruntime to detect this, so intervention by the programmer is needed.\nTCPConnection is a single example. This Backpressure package exists to allow\na programmer to indicate to the runtime that a given actor is experiencing\npressure and sending messages to it should be adjusted accordingly.\nAny actor that needs to be able to tell the runtime to \"send me messages\nslower\" due to external conditions can do so via this package. Additionally,\nactors that maintain their own internal queues of any sort, say for buffering,\nare also prime candidates for using this package. If an actor's internal\nqueue grows too large, it can call Backpressure.apply to let the runtime know\nit is under pressure.\nExample program\u00b6\n// Here we have a TCPConnectionNotify that upon construction\n// is given a ApplyReleaseBackpressureAuth token. This allows the notifier\n// to inform the Pony runtime when to apply and release backpressure\n// as the connection experiences it.\n// Note the calls to\n//\n// Backpressure.apply(_auth)\n// Backpressure.release(_auth)"} +{"id": "Pony/cli-CommandSpec-_1.txt", "contents": "class ref CommandSpec\n\nConstructors\u00b6\nparent\u00b6\n[Source]\nCreates a command spec that can accept options and child commands, but not\narguments.\nnew ref parent(\nname': String val,\ndescr': String val = \"\",\noptions': Array[OptionSpec val] box = call,\ncommands': Array[CommandSpec ref] box = call)\n: CommandSpec ref^ ?\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\noptions': Array[OptionSpec val] box = call\ncommands': Array[CommandSpec ref] box = call"} +{"id": "Pony/net-OSSockOpt-_436.txt", "contents": "fun box sctp_pcb_flags_stream_resetevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_tcptype\u00b6\n[Source]\nfun box sctp_pcb_flags_tcptype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_udptype\u00b6\n[Source]"} +{"id": "Pony/files-Path-_15.txt", "contents": "[Source]\nReturn the equivalent canonical absolute path. Raise an error if there\nisn't one.\nfun box canonical(\npath: String val)\n: String val ?\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nString val ?\n\n\nis_list_sep\u00b6\n[Source]\nDetermine if a byte is a path list separator.\nfun box is_list_sep("} +{"id": "Pony/recovering-capabilities_5.txt", "contents": "# How does this work?\n\nInside the `recover` expression, your code only has access to __sendable__ values from the enclosing lexical scope. In other words, you can only use `iso`, `val` and `tag` things from outside the `recover` expression.\n\nThis means that when the `recover` expression finishes, any aliases to the result of the expression other than `iso`, `val` and `tag` ones won't exist anymore. That makes it safe to \"lift\" the reference capability of the result of the expression.\n\nIf the `recover` expression could access __non-sendable__ values from the enclosing lexical scope, \"lifting\" the reference capability of the result wouldn't be safe. Some of those values could \"leak\" into an `iso` or `val` result, and result in data races.\n"} +{"id": "Pony/src-pony_test-pony_test-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-net-tcp_connection-_87.txt", "contents": "end\n(let host', let service') = _notify.proxy_via(host, service)\n_connect_count =\n@pony_os_connect_tcp6(this, host'.cstring(), service'.cstring(),\nfrom.cstring(), asio_flags)\n_notify_connecting()\n\nnew _accept(\nlisten: TCPListener,\nnotify: TCPConnectionNotify iso,\nfd: U32,\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\"\nA new connection accepted on a server.\n\"\"\"\n_listen = listen\n_notify = consume notify"} +{"id": "Pony/src-net-ossockopt-_117.txt", "contents": "fun sctp_status():I32 => @pony_os_sockopt_option(I32(782))\nfun sctp_stream_reset():I32 => @pony_os_sockopt_option(I32(783))\nfun sctp_stream_reset_incoming():I32 => @pony_os_sockopt_option(I32(784))\nfun sctp_stream_reset_outgoing():I32 => @pony_os_sockopt_option(I32(785))\nfun sctp_str_logging_enable():I32 => @pony_os_sockopt_option(I32(786))\nfun sctp_threshold_logging():I32 => @pony_os_sockopt_option(I32(787))\nfun sctp_timeouts():I32 => @pony_os_sockopt_option(I32(788))\nfun sctp_use_ext_rcvinfo():I32 => @pony_os_sockopt_option(I32(789))\nfun sctp_vrf_id():I32 => @pony_os_sockopt_option(I32(790))\nfun sctp_wake_logging_enable():I32 => @pony_os_sockopt_option(I32(791))\nfun sock_cloexec():I32 => @pony_os_sockopt_option(I32(792))\nfun sock_dgram():I32 => @pony_os_sockopt_option(I32(793))\nfun sock_maxaddrlen():I32 => @pony_os_sockopt_option(I32(794))\nfun sock_nonblock():I32 => @pony_os_sockopt_option(I32(795))\nfun sock_raw():I32 => @pony_os_sockopt_option(I32(796))\nfun sock_rdm():I32 => @pony_os_sockopt_option(I32(797))\nfun sock_seqpacket():I32 => @pony_os_sockopt_option(I32(798))\nfun sock_stream():I32 => @pony_os_sockopt_option(I32(799))\nfun somaxconn():I32 => @pony_os_sockopt_option(I32(800))\nfun sonpx_setoptshut():I32 => @pony_os_sockopt_option(I32(801))"} +{"id": "Pony/src-pony_check-randomness-_20.txt", "contents": "\nBehavior is undefined if `min` > `max`.\n\"\"\"\nmin + u16(0, (max - min).u16()).i16()\n\nfun ref i32(min: I32 = I32.min_value(), max: I32 = I32.max_value()): I32 =>\n\"\"\"\nGenerate a I32 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nmin + u32(0, (max - min).u32()).i32()\n\nfun ref i64(min: I64 = I64.min_value(), max: I64 = I64.max_value()): I64 =>\n\"\"\"\nGenerate a I64 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`."} +{"id": "Pony/src-collections-list-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/src-net-tcp_listener-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/collections-HashEq64-_0.txt", "contents": "\n\n\n\n\n\n\nHashEq64[A: (Hashable64 #read & Equatable[A] #read)]\u00b6\n[Source]\nprimitive val HashEq64[A: (Hashable64 #read & Equatable[A] #read)] is\nHashFunction64[A] val\n\nImplements\u00b6\n\nHashFunction64[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_55.txt", "contents": "fun value_of(s: String): _Value ? => s.u64()?\n\nprimitive _F64Type is _ValueType\nfun string(): String => \"F64\"\nfun value_of(s: String): _Value ? => s.f64()?\n\nprimitive _StringSeqType is _ValueType\nfun string(): String => \"ReadSeq[String]\"\nfun value_of(s: String): _Value => _StringSeq.from_string(s)\nfun is_seq(): Bool => true\nfun append(v1: _Value, v2: _Value): _Value =>\n\"\"\"\nWhen is_seq() returns true, append() is called during parsing to append\na new parsed value onto an existing value.\n\"\"\"\ntry\n_StringSeq.from_concat(v1 as _StringSeq val, v2 as _StringSeq val)\nelse\nv1\nend"} +{"id": "Pony/collections-persistent-Cons-_10.txt", "contents": "f: {(val->A)}[A] box)\n: None val\n\nParameters\u00b6\n\nf: {(val->A)}[A] box\n\nReturns\u00b6\n\nNone val\n\n\nfilter\u00b6\n[Source]\nBuilds a new list with those elements that satisfy a provided predicate.\nfun val filter(\nf: {(val->A): Bool}[A] box)\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-ILong-_10.txt", "contents": "\nILong val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nfld_unsafe\u00b6"} +{"id": "Pony/src-math-fibonacci-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/3_arithmetic_10.txt", "contents": "| -------------- | ----------------------------------------------------------------------------------------- |\n| `addc()` | Checked addition, second tuple element is `true` on overflow/underflow. |\n| `subc()` | Checked subtraction, second tuple element is `true` on overflow/underflow. |\n| `mulc()` | Checked multiplication, second tuple element is `true` on overflow. |\n| `divc()` | Checked division, second tuple element is `true` on overflow or division by zero. |\n| `remc()` | Checked remainder, second tuple element is `true` on overflow or division by zero. |\n| `modc()` | Checked modulo, second tuple element is `true` on overflow or division by zero. |\n| `fldc()` | Checked floored division, second tuple element is `true` on overflow or division by zero. |\n\n---\n"} +{"id": "Pony/src-pony_check-for_all-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-random-random-_19.txt", "contents": "\nNot biased with small values of `n` like `int`.\n\"\"\"\nN.from[U64](_u64_unbiased(U64.from[N](n)))\n\nfun ref _u64_unbiased(range: U64): U64 =>\n\"\"\"\nGenerates a U64 in the range `[0, n)`\nwhile avoiding bias.\n\nSee:\n- https://arxiv.org/abs/1805.10941\n- http://www.pcg-random.org/posts/bounded-rands.html\n\"\"\"\nvar x: U64 = next()\nvar m: U128 = x.u128() * range.u128()\nvar l: U64 = m.u64()\nif l < range then\nvar t: U64 = -range\nif t >= range then"} +{"id": "Pony/net-OSSockOpt-_159.txt", "contents": "fun box ipv6_priority_control()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_filler\u00b6\n[Source]\nfun box ipv6_priority_filler()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_interactive\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_52.txt", "contents": "\nNone val ?\n\n\nkeys\u00b6\n[Source]\nReturn an iterator over the indices in the array.\nfun box keys()\n: ArrayKeys[A, this->Array[A] ref] ref^\n\nReturns\u00b6\n\nArrayKeys[A, this->Array[A] ref] ref^\n\n\nvalues\u00b6\n[Source]\nReturn an iterator over the values in the array.\nfun box values()\n: ArrayValues[A, this->Array[A] ref] ref^"} +{"id": "Pony/net-OSSockOpt-_417.txt", "contents": "fun box sctp_pcb_flags_assoc_resetevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_authevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_authevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_autoclose\u00b6\n[Source]"} +{"id": "Pony/1_classes_9.txt", "contents": "fun ref set_hunger(to: U64 = 0): U64 => _hunger_level = to\n```\n\nThe first function, `hunger`, is pretty straight forward. It has a result type of `U64`, and it returns `_hunger_level`, which is a `U64`. The only thing a bit different here is that no `return` keyword is used. This is because the result of a function is the result of the last expression in the function, in this case, the value of `_hunger_level`.\n\n__Is there a `return` keyword in Pony?__ Yes. It's used to return \"early\" from a function, i.e. to return something right away and not keep running until the last expression.\n\nThe second function, `set_hunger`, introduces a _bunch_ of new concepts all at once. Let's go through them one by one.\n\n* The `ref` keyword right after `fun`\n\nThis is a __reference capability__. In this case, it means the _receiver_, i.e. the object on which the `set_hunger` function is being called, has to be a `ref` type. A `ref` type is a __reference type__, meaning that the object is __mutable__. We need this because we are writing a new value to the `_hunger_level` field.\n\n__What's the receiver reference capability of the `hunger` method?__ The default receiver reference capability if none is specified is `box`, which means \"I need to be able to read from this, but I won't write to it\".\n\n__What would happen if we left the `ref` keyword off the `set_hunger` method?__ The compiler would give you an error. It would see you were trying to modify a field and complain about it.\n\n* The `= 0` after the parameter `to`\n\nThis is a __default argument__. It means that if you don't include that argument at the call site, you will get the default argument. In this case, `to` will be zero if you don't specify it."} +{"id": "Pony/src-cli-command_spec-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/collections-persistent-HashSet-_12.txt", "contents": "that: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\nvalues\u00b6\n[Source]\nReturn an iterator over the values in the set.\nfun box values()\n: Iterator[A] ref^\n\nReturns\u00b6\n"} +{"id": "Pony/format-Format-_1.txt", "contents": "align. Specify whether fill characters should be added at the beginning or\nend of the generated string, or both.\nfill. The character to pad a string with if is is shorter than width.\n\nprimitive val Format\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Format val^\n\nReturns\u00b6\n\nFormat val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_23.txt", "contents": "\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nmodc\u00b6\n[Source]\nCalculate the modulo of this number after floored division by y and return the result and a flag indicating division by zero or overflow.\nThe result will have the sign of the divisor.\nfun box modc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n"} +{"id": "Pony/strings-CommonPrefix-_1.txt", "contents": "\nCommonPrefix val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\ndata: ReadSeq[Stringable box] box)\n: String iso^\n\nParameters\u00b6\n\ndata: ReadSeq[Stringable box] box\n\nReturns\u00b6\n\nString iso^\n\n"} +{"id": "Pony/src-files-file_mode-_10.txt", "contents": "is set, the path is made readable, and if any write flag is set, the path\nis made writeable.\n\"\"\"\nvar m: U32 = 0\n\nifdef windows then\nif owner_read or group_read or any_read then\nm = m or 0x100\nend\n\nif owner_write or group_write or any_write then\nm = m or 0x80\nend\nelse\nif setuid then m = m or 0x800 end\nif setgid then m = m or 0x400 end\nif sticky then m = m or 0x200 end\nif owner_read then m = m or 0x100 end\nif owner_write then m = m or 0x80 end\nif owner_exec then m = m or 0x40 end"} +{"id": "Pony/src-files-directory-_53.txt", "contents": "let path'' = FilePath.from(to.path, target, to.path.caps)?\n\nifdef linux or bsd then\n0 == @renameat(_fd, source.cstring(), to._fd, target.cstring())\nelse\npath'.rename(path'')\nend\nelse\nfalse\nend\n\nfun ref dispose() =>\n\"\"\"\nClose the directory.\n\"\"\"\nif _fd != -1 then\nifdef posix then\n@close(_fd)\nend\n"} +{"id": "Pony/builtin-Equatable-_1.txt", "contents": "that: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/c-abi_6.txt", "contents": "include \n\n// A fast, minimal memory, consistent hash algorithm\n// https://arxiv.org/abs/1406.2294\nint32_t jch_chash(uint64_t key, uint32_t num_buckets)\n{\nint b = -1;\nuint64_t j = 0;\n\ndo {\nb = j;\nkey = key * 2862933555777941757ULL + 1;\nj = (b + 1) * ((double)(1LL << 31) / ((double)(key >> 33) + 1));\n} while(j < num_buckets);\n\nreturn (int32_t)b;\n}\n```\n\nWe need to compile the native code to a shared library. This example is for MacOS. The exact details may vary on other platforms."} +{"id": "Pony/net-OSSockOpt-_90.txt", "contents": "fun box dso_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_maxwindow\u00b6\n[Source]\nfun box dso_maxwindow()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_nodelay\u00b6\n[Source]"} +{"id": "Pony/builtin-Seq-_4.txt", "contents": "value: A)\n: A^ ?\n\nParameters\u00b6\n\ni: USize val\nvalue: A\n\nReturns\u00b6\n\nA^ ?\n\n\nclear\u00b6\n[Source]\nRemoves all elements from the sequence.\nfun ref clear()\n: None val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-IntProperty-_4.txt", "contents": "\nString val\n\n\nparams\u00b6\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-buffered-reader-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-cli-command_help-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/c-abi_8.txt", "contents": "var _env: Env\n\nnew create(env: Env) =>\n_env = env\n\nlet bucket_size: U32 = 1000000\n\n_env.out.print(\"C implementation:\")\nfor i in Range[U64](1, 20) do\nlet hash = @jch_chash(i, bucket_size)\n_env.out.print(i.string() + \": \" + hash.string())\nend\n\n_env.out.print(\"Pony implementation:\")\nfor i in Range[U64](1, 20) do\nlet hash = jch(i, bucket_size)\n_env.out.print(i.string() + \": \" + hash.string())\nend\n\nfun jch(key: U64, buckets: U32): I32 =>"} +{"id": "Pony/builtin-F64-_43.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nne_unsafe\u00b6\nfun box ne_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-builtin-real-_58.txt", "contents": "fun bytewidth(): USize\n\nfun string(): String iso^ =>\n_ToString._u64(abs().u64(), i64() < 0)\n\ntrait val UnsignedInteger[A: UnsignedInteger[A] val] is Integer[A]\nfun abs(): A\n\nfun shl(y: A): A => this << y\nfun shr(y: A): A => this >> y\n\n// both fld and mod behave the same as div and rem for unsigned integers\nfun fld(y: A): A => this / y\nfun fldc(y: A): (A, Bool) => this.divc(y)\nfun fld_partial(y: A): A ? => this.div_partial(y)?\nfun fld_unsafe(y: A): A => this.div_unsafe(y)\n\nfun mod(y: A): A => this % y\nfun modc(y: A): (A, Bool) => this.remc(y)\nfun mod_partial(y: A): A ? => this.rem_partial(y)?"} +{"id": "Pony/builtin-RuntimeOptions-_5.txt", "contents": "\nvar ponyprintstatsinterval: U32 val\u00b6\n[Source]\nPrint actor stats before an actor is destroyed and print scheduler stats\nevery X seconds. Defaults to -1 (never).\n\nvar ponyversion: Bool val\u00b6\n[Source]\nPrint the version of the compiler and exit.\n\nvar ponyhelp: Bool val\u00b6\n[Source]\nPrint the runtime usage options and exit.\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Equal-_1.txt", "contents": "new val create()\n: Equal val^\n\nReturns\u00b6\n\nEqual val^\n\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6"} +{"id": "Pony/src-itertools-iter-_91.txt", "contents": "### Example\n```pony\nIter[USize](Range(0, 3))\n.intersperse(8)\n```\n`0 8 1 8 2`\n\"\"\"\nIter[A!](\nobject is Iterator[A!]\nvar _count: USize = 0\nlet _v: A = consume value\n\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): A! ? =>\nif (_count == n) then\n_count = 0\n_v\nelse"} +{"id": "Pony/builtin-I64-_37.txt", "contents": "I64 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nmul\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_35.txt", "contents": "1 2 3\nfun ref take(\nn: USize val)\n: Iter[A] ref^\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n\nIter[A] ref^\n\n\ntake_while\u00b6\n[Source]\nReturn an iterator that returns values while the predicate f returns\ntrue. This iterator short-circuits the first time that f returns false or\nraises an error.\nExample\u00b6"} +{"id": "Pony/src-buffered-reader-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-UnsignedInteger-_3.txt", "contents": "Real[A] val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: A\n\nReturns\u00b6"} +{"id": "Pony/src-buffered-reader-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-F64-_62.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\nfun box i16_unsafe()\n: I16 val"} +{"id": "Pony/src-pony_check-generator-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/pony_check-Generators-_15.txt", "contents": "Generate a random value from the given ReadSeq.\nThis generator will generate nothing if the given xs is empty.\nGenerators created with this method do not support shrinking.\nIf do_shrink is set to true, it will return the same value\nfor each shrink round. Otherwise it will return nothing.\nfun box one_of[T: T](\nxs: ReadSeq[T] box,\ndo_shrink: Bool val = false)\n: Generator[box->T] box\n\nParameters\u00b6\n\nxs: ReadSeq[T] box\ndo_shrink: Bool val = false\n\nReturns\u00b6\n\nGenerator[box->T] box\n\n"} +{"id": "Pony/files-Path-_3.txt", "contents": "\npath: String val\n\nReturns\u00b6\n\nBool val\n\n\njoin\u00b6\n[Source]\nJoin two paths together. If the next_path is absolute, simply return it.\nThe returned path will be cleaned.\nfun box join(\npath: String val,\nnext_path: String val)\n: String val\n\nParameters\u00b6\n\npath: String val"} +{"id": "Pony/net-OSSockOpt-_479.txt", "contents": "fun box so_bintime()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_bpf_extensions\u00b6\n[Source]\nfun box so_bpf_extensions()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_broadcast\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_51.txt", "contents": "U16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-ansi_term-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/files-Path-_20.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/4_control-structures_3.txt", "contents": "if a > b then\nenv.out.print(\"a is bigger\")\nelse\nenv.out.print(\"b bigger\")\nend\nend\n```\n\n\nAs an alternative Pony provides the `elseif` keyword that combines an `else` and an `if`. This works the same as saying `else if` in other languages and you can have as many `elseif`s as you like for each `if`.\n\n```pony\nif a == b then\nenv.out.print(\"they are the same\")\nelseif a > b then\nenv.out.print(\"a is bigger\")\nelse\nenv.out.print(\"b bigger\")\nend\n```"} +{"id": "Pony/net-OSSockOpt-_347.txt", "contents": "fun box sctp_cause_no_user_data()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_out_of_resc\u00b6\n[Source]\nfun box sctp_cause_out_of_resc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_protocol_violation\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_31.txt", "contents": "\nsqrt\u00b6\n[Source]\nfun box sqrt()\n: A\n\nReturns\u00b6\n\nA\n\n\nsqrt_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is negative, the result is undefined.\nfun box sqrt_unsafe()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-process-process_monitor-_42.txt", "contents": "If neither stdout nor stderr are open we close down and exit.\n\"\"\"\nif _stdin.is_closed() and\n_stdout.is_closed() and\n_stderr.is_closed()\nthen\n_close()\nend\n\nfun ref _pending_reads(pipe: _Pipe) =>\n\"\"\"\nRead from stdout or stderr while data is available. If we read 4 kb of\ndata, send ourself a resume message and stop reading, to avoid starving\nother actors.\nIt's safe to use the same buffer for stdout and stderr because of\ncausal messaging. Events get processed one _after_ another.\n\"\"\"\nif pipe.is_closed() then return end\nvar sum: USize = 0\nwhile true do"} +{"id": "Pony/src-capsicum-cap_rights-_13.txt", "contents": "\"\"\"\nifdef freebsd or \"capsicum\" then\n@cap_rights_contains(addressof _r0, addressof that._r0)\nelse\ntrue\nend\n\nfun _version(): I32 => 0\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/builtin-ISize-_41.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: ISize val)\n: Bool val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_282.txt", "contents": "fun box netlink_rdma()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_route\u00b6\n[Source]\nfun box netlink_route()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_rx_ring\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property-_13.txt", "contents": "generators' output and verifies a custom property with the help of a\n[PropertyHelper](pony_check-PropertyHelper.md).\n\nA property is verified if no failed assertion on\n[PropertyHelper](pony_check-PropertyHelper.md) has been\nreported for all the samples it consumed.\n\nThe property execution can be customized by returning a custom\n[PropertyParams](pony_check-PropertyParams.md) from the\n[`params()`](pony_check-Property1.md#params) method.\n\nThe [`gen()`](pony_check-Property1.md#gen) method is called exactly once to\ninstantiate the generator.\nThe generator produces\n[PropertyParams.num_samples](pony_check-PropertyParams.md#num_samples)\nsamples and each is passed to the\n[property](pony_check-Property1.md#property) method for verification.\n\nIf the property did not verify, the given sample is shrunken if the\ngenerator supports shrinking."} +{"id": "Pony/src-pony_test-test_helper-_24.txt", "contents": "This is useful for getting the [root authority](builtin-AmbientAuth.md) in\norder to access the filesystem (See [files](files--index.md)) or the network\n(See [net](net--index.md)) in your tests.\n\"\"\"\n\nnew val _create(runner: _TestRunner, env': Env) =>\n\"\"\"\nCreate a new TestHelper.\n\"\"\"\nenv = env'\n_runner = runner\n\nfun log(msg: String, verbose: Bool = false) =>\n\"\"\"\nLog the given message.\n\nThe verbose parameter allows messages to be printed only when the --verbose\ncommand line option is used. For example, by default assert failures are\nlogged, but passes are not. With --verbose both passes and fails are\nreported."} +{"id": "Pony/src-builtin-signed-_91.txt", "contents": "if y > 0 then\n(this > (max_value() - y))\nelse\n(this < (min_value() - y))\nend\n\n(this + y, overflow)\nend\n\nfun subc(y: I128): (I128, Bool) =>\nifdef native128 then\n@\"llvm.ssub.with.overflow.i128\"(this, y)\nelse\nlet overflow =\nif y > 0 then\n(this < (min_value() + y))\nelse\n(this > (max_value() + y))\nend\n"} +{"id": "Pony/src-buffered-reader-_56.txt", "contents": "let r =\nifdef bigendian then\ndata.read_u32(offset)?\nelse\ndata.read_u32(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed\n(u8()?.u32() << 24) or (u8()?.u32() << 16) or\n(u8()?.u32() << 8) or u8()?.u32()"} +{"id": "Pony/collections-HashMap-_18.txt", "contents": "Return an iterator over the keys and values.\nfun box pairs()\n: MapPairs[K, V, H, this->HashMap[K, V, H] ref] ref^\n\nReturns\u00b6\n\nMapPairs[K, V, H, this->HashMap[K, V, H] ref] ref^\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-F64-_19.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nnan\u00b6\n[Source]\nCheck whether this number is NaN.\nfun box nan()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nldexp\u00b6\n[Source]\nfun box ldexp(\nx: F64 val,"} +{"id": "Pony/net-OSSockOpt-_407.txt", "contents": "fun box sctp_max_sack_delay()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_mbcnt_logging_enable\u00b6\n[Source]\nfun box sctp_mbcnt_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_mbuf_logging_enable\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-U128-_30.txt", "contents": "U128 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nfld\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_51.txt", "contents": "Parameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nneg\u00b6\nfun box neg()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\neq\u00b6\nfun box eq("} +{"id": "Pony/builtin-U16-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/src-collections-list_node-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-map-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-TCPConnectAuth-_0.txt", "contents": "\n\n\n\n\n\n\nTCPConnectAuth\u00b6\n[Source]\nprimitive val TCPConnectAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: (AmbientAuth val | NetAuth val | TCPAuth val))\n: TCPConnectAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/term-ANSINotify-_10.txt", "contents": "\npage_down\u00b6\n[Source]\nfun ref page_down(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/net-OSSockOpt-_521.txt", "contents": "fun box so_rxq_ovfl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sco_conninfo\u00b6\n[Source]\nfun box so_sco_conninfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sco_mtu\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_67.txt", "contents": "fun addc(y: ULong): (ULong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.uadd.with.overflow.i32\"(this.u32(), y.u32())\n(r.ulong(), o)\nelse\n(let r, let o) =\n@\"llvm.uadd.with.overflow.i64\"(this.u64(), y.u64())\n(r.ulong(), o)\nend\n\nfun subc(y: ULong): (ULong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.usub.with.overflow.i32\"(this.u32(), y.u32())\n(r.ulong(), o)\nelse\n(let r, let o) =\n@\"llvm.usub.with.overflow.i64\"(this.u64(), y.u64())\n(r.ulong(), o)"} +{"id": "Pony/collections-HashMap-_2.txt", "contents": "\nUSize val\n\n\nspace\u00b6\n[Source]\nThe available space in the map. Resize will happen when\nsize / space >= 0.75.\nfun box space()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nGets a value from the map. Raises an error if no such item exists.\nfun box apply("} +{"id": "Pony/net-OSSockOpt-_260.txt", "contents": "fun box mrt_del_vif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_done\u00b6\n[Source]\nfun box mrt_done()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_init\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-HashSet-_2.txt", "contents": "\n\napply\u00b6\n[Source]\nReturn the value if it is in the set, otherwise raise an error.\nfun box apply(\nvalue: val->A)\n: val->A ?\n\nParameters\u00b6\n\nvalue: val->A\n\nReturns\u00b6\n\nval->A ?\n\n\ncontains\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_59.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_435.txt", "contents": "fun box sctp_pcb_flags_socket_gone()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_stream_changeevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_stream_changeevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_stream_resetevnt\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_430.txt", "contents": "fun box sctp_pcb_flags_recvdataioevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvnsendfailevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_recvnsendfailevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvnxtinfo\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_21.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: ISize val)\n: ISize val ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Seq-_3.txt", "contents": "is out of bounds.\nfun box apply(\ni: USize val)\n: this->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->A ?\n\n\nupdate\u00b6\n[Source]\nReplaces the i-th element of the sequence. Returns the previous value.\nRaises an error if the index is out of bounds.\nfun ref update(\ni: USize val,"} +{"id": "Pony/builtin-UnsignedInteger-_33.txt", "contents": "\nA\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_xor\u00b6"} +{"id": "Pony/src-random-xoroshiro-_7.txt", "contents": "var _x: U64\nvar _y: U64\n\nnew from_u64(x: U64 = 5489) =>\n\"\"\"\nUse seed x to seed a [SplitMix64](random-SplitMix64.md) and use this to\ninitialize the 128 bits of state.\n\"\"\"\nlet sm = SplitMix64(x)\n_x = sm.next()\n_y = sm.next()\n\nnew create(x: U64 = 5489, y: U64 = 0) =>\n_x = x\n_y = y\nnext()\n\nfun ref next(): U64 =>\nlet x = _x\nvar y = _y"} +{"id": "Pony/3_arithmetic_7.txt", "contents": "| `ilong()` | `ilong_unsafe()` |\n| `isize()` | `isize_unsafe()` |\n| `f32()` | `f32_unsafe()` |\n| `f64()` | `f64_unsafe()` |\n\n---\n"} +{"id": "Pony/builtin-I16-_35.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_43.txt", "contents": "fun box eq(\ny: USize val)\n: Bool val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: USize val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_38.txt", "contents": "\n// interface towards PropertyHelper\n\nbe expect_action(name: String, round: _Round) =>\nif round != this._current_round then\n_logger.log(\"unexpected expect action \\\"\" + name + \"\\\" call for \" + round.string() +\n\". Currently at \" + this._current_round.string(), true)\nreturn\nend\n_logger.log(\"Action expected: \" + name)\n_expected_actions.set(name)\n\nbe complete_action(name: String, round: _Round, ph: PropertyHelper) =>\nif round != this._current_round then\n_logger.log(\"unexpected complete action \\\"\" + name + \"\\\" msg for \" + round.string() +\n\". Currently at \" + this._current_round.string(), true)\nreturn\nend\n_logger.log(\"Action completed: \" + name)\n_finish_action(name, true, round, ph)"} +{"id": "Pony/src-format-format-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/pony_check-Generators-_17.txt", "contents": "Choose a value of one of the given Generators,\nwhile controlling the distribution with the associated weights.\nThe weights are of type USize and control how likely a value is chosen.\nThe likelihood of a value v to be chosen\nis weight_v / weights_sum.\nIf all weighted_generators have equal size the distribution\nwill be uniform.\nExample of a generator to output odd U8 values\ntwice as likely as even ones:\nGenerators.frequency[U8]([\n(1, Generators.u8().filter({(u) => (u, (u % 2) == 0 }))\n(2, Generators.u8().filter({(u) => (u, (u % 2) != 0 }))\n])\n\nfun box frequency[T: T](\nweighted_generators: ReadSeq[(USize val , Generator[T] box)] box)\n: Generator[T] box\n\nParameters\u00b6\n"} +{"id": "Pony/collections-List-_22.txt", "contents": "\nA^ ?\n\n\nunshift\u00b6\n[Source]\nAdds a new head value.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.unshift(\"d\") // my_list is [\"d\"; \"a\"; \"b\"; \"c\"]\n\nfun ref unshift(\na: A)\n: None val\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-pointer-_10.txt", "contents": "compile_intrinsic\n\nfun ref _insert(n: USize, len: USize): Pointer[A] =>\n\"\"\"\nCreates space for n new elements at the head, moving following elements.\nThe array length before this should be len, and the available space should\nbe at least n + len.\n\"\"\"\ncompile_intrinsic\n\nfun ref _delete(n: USize, len: USize): A^ =>\n\"\"\"\nDelete n elements from the head of pointer, compact remaining elements of\nthe underlying array. The array length before this should be n + len.\nReturns the first deleted element.\n\"\"\"\ncompile_intrinsic\n\nfun _copy_to(that: Pointer[this->A!], n: USize): this->Pointer[A] =>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_459.txt", "contents": "fun box sctp_shutdown_complete()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_pending\u00b6\n[Source]\nfun box sctp_shutdown_pending()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_received\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-String-_20.txt", "contents": "from: USize val = 0,\nto: USize val = call)\n: String val\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\n\nReturns\u00b6\n\nString val\n\n\nchop\u00b6\n[Source]\nChops the string in half at the split point requested and returns both\nthe left and right portions. The original string is trimmed in place and\nreturned as the left portion. If the split point is larger than the\nstring, the left portion is the original string and the right portion"} +{"id": "Pony/builtin-FloatingPoint-_67.txt", "contents": "U8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-File-_17.txt", "contents": "\nlen: USize val\n\nReturns\u00b6\n\nBool val\n\n\ninfo\u00b6\n[Source]\nReturn a FileInfo for this directory. Raise an error if the fd is invalid\nor if we don't have FileStat permission.\nfun box info()\n: FileInfo val ?\n\nReturns\u00b6\n\nFileInfo val ?\n\n"} +{"id": "Pony/pony_test-TestHelper-_5.txt", "contents": "\nactual: Bool val\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_error\u00b6\n[Source]\nAssert that the given test function throws an error when run.\nfun box assert_error(\ntest: ITest box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-files-path-_28.txt", "contents": "552\n553\n554use \"time\"\nuse @pony_os_realpath[Pointer[U8] iso^](path: Pointer[U8] tag)\nuse @pony_os_cwd[Pointer[U8]]()\n\nprimitive _PathSep\nprimitive _PathDot\nprimitive _PathDot2\nprimitive _PathOther\n\ntype _PathState is (_PathSep | _PathDot | _PathDot2 | _PathOther)\n\nprimitive Path\n\"\"\"\nOperations on paths that do not require a capability. The operations can be\nused to manipulate path names, but give no access to the resulting paths.\n\"\"\"\nfun is_sep(c: U8): Bool =>\n\"\"\""} +{"id": "Pony/src-files-path-_34.txt", "contents": "end\n\nif\n(s.size() == 0) or\n(s.compare_sub(\"../\", 3, backtrack) is Equal) or\nifdef windows then\ns.compare_sub(\"..\\\\\", 3, backtrack) is Equal\nelse\nfalse\nend\nthen\nbacktrack = -1\nend\nend\n| _PathOther =>\ns.append(sep())\nend\nstate = _PathSep\nelseif c == '.' then\nmatch state"} +{"id": "Pony/net-OSSockOpt-_580.txt", "contents": "fun box tcp_max_winshift()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_md5sig\u00b6\n[Source]\nfun box tcp_md5sig()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_md5sig_maxkeylen\u00b6\n[Source]"} +{"id": "Pony/net-DNS-_1.txt", "contents": "DNS val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nGets all IPv4 and IPv6 addresses for a host and service.\nfun box apply(\nauth: DNSAuth val,\nhost: String val,\nservice: String val)\n: Array[NetAddress val] iso^\n\nParameters\u00b6\n\nauth: DNSAuth val\nhost: String val\nservice: String val\n\nReturns\u00b6"} +{"id": "Pony/src-net-udp_socket-_47.txt", "contents": "\"\"\"\nifdef windows then\ntry\n@pony_os_recvfrom(_event, _read_buf.cpointer(),\n_read_buf.space(), _read_from) ?\nelse\n_readable = false\n_close()\nend\nend\n\nfun ref _write(data: ByteSeq, to: NetAddress) =>\n\"\"\"\nWrite the datagram to the socket.\n\"\"\"\nif not _closed then\ntry\n@pony_os_sendto(_fd, data.cpointer(), data.size(), to) ?\nelse\n_close()"} +{"id": "Pony/builtin-I8-_49.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_3.txt", "contents": "fun box right(\nn: U32 val = 0)\n: String val\n\nParameters\u00b6\n\nn: U32 val = 0\n\nReturns\u00b6\n\nString val\n\n\nleft\u00b6\n[Source]\nMove the cursor left n columns. 0 is the same as 1.\nfun box left(\nn: U32 val = 0)\n: String val\n"} +{"id": "Pony/builtin-U32-_42.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/src-buffered-reader-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-pony_check-property_helper-_42.txt", "contents": "\nIf all expected actions are completed successfully,\nthe property is considered successful.\n\nIf 1 action fails, the property is considered failing.\n\nCall `complete_action(name)` or `fail_action(name)`\nto mark some action as completed.\n\nExample:\n\n```pony\nactor AsyncActor\n\nlet _ph: PropertyHelper\n\nnew create(ph: PropertyHelper) =>\n_ph = ph\n\nbe complete(s: String) =>"} +{"id": "Pony/process-ChdirError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ChdirError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-signals-signal_handler-_4.txt", "contents": "\"\"\"\nListen for a specific signal.\nIf the wait parameter is true, the program will not terminate until the SignalHandler's dispose method is called, or if the SignalNotify returns false, after handling the signal as this also disposes the SignalHandler and unsubscribes it.\n\n\"\"\"\nlet _notify: SignalNotify\nlet _sig: U32\nvar _event: AsioEventID\n\nnew create(notify: SignalNotify iso, sig: U32, wait: Bool = false) =>\n\"\"\"\nCreate a signal handler.\n\"\"\"\n_notify = consume notify\n_sig = sig\n_event =\n@pony_asio_event_create(this, 0, AsioEvent.signal(), sig.u64(), wait)\n\nbe raise() =>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_289.txt", "contents": "fun box netrom_node()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_paclen\u00b6\n[Source]\nfun box netrom_paclen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_t1\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_451.txt", "contents": "fun box sctp_rttvar_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sack_cmt_dac\u00b6\n[Source]\nfun box sctp_sack_cmt_dac()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sack_logging_enable\u00b6\n[Source]"} +{"id": "Pony/net-DNS-_5.txt", "contents": "\n\nbroadcast_ip6\u00b6\n[Source]\nLink-local IP6 broadcast address.\nfun box broadcast_ip6(\nauth: DNSAuth val,\nservice: String val)\n: Array[NetAddress val] iso^\n\nParameters\u00b6\n\nauth: DNSAuth val\nservice: String val\n\nReturns\u00b6\n\nArray[NetAddress val] iso^\n\n"} +{"id": "Pony/src-cli-command_spec-_29.txt", "contents": "- an optional help option+command name for help parsing\n- one of:\n- a Map of child commands.\n- an Array of arguments.\n\"\"\"\nlet _type: _CommandSpecType\nlet _name: String\nlet _descr: String\nlet _options: Map[String, OptionSpec] = _options.create()\nvar _help_name: String = \"\"\nvar _help_info: String = \"\"\n\n// A parent commands can have sub-commands; leaf commands can have args.\nlet _commands: Map[String, CommandSpec box] = _commands.create()\nlet _args: Array[ArgSpec] = _args.create()\n\nnew parent(\nname': String,\ndescr': String = \"\",\noptions': Array[OptionSpec] box = Array[OptionSpec](),"} +{"id": "Pony/builtin-I128-_34.txt", "contents": "I128 val ?\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val ?\n\n\nshl\u00b6\n[Source]"} +{"id": "Pony/pony_check-Randomness-_7.txt", "contents": "fun ref ulong(\nmin: ULong val = call,\nmax: ULong val = call)\n: ULong val\n\nParameters\u00b6\n\nmin: ULong val = call\nmax: ULong val = call\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nGenerate a USize in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/src-promises-promise-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-pointer-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-process-process_monitor-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-I64-_22.txt", "contents": "I64 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val ?\n\n\ndivrem_partial\u00b6\n[Source]"} +{"id": "Pony/src-files-file_info-_8.txt", "contents": "Device IDs consist of a major and minor device id,\ndenoting the type of device and the instance of this type on the system.\n\"\"\"\n\nlet inode: U64 = 0\n\"\"\"UNIX specific INODE number of `filepath`. Is 0 on Windows.\"\"\"\n\nlet uid: U32 = 0\n\"\"\"UNIX-style user ID of the owner of `filepath`.\"\"\"\n\nlet gid: U32 = 0\n\"\"\"UNIX-style user ID of the owning group of `filepath`.\"\"\"\n\nlet size: USize = 0\n\"\"\"\nTotal size of `filepath` in bytes.\n\nIn case of a symlink this is the size of the target, not the symlink itself.\n\"\"\"\n"} +{"id": "Pony/builtin-I32-_42.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: I32 val)\n: Bool val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_114.txt", "contents": "fun sctp_pcb_flags_socket_gone():I32 => @pony_os_sockopt_option(I32(722))\nfun sctp_pcb_flags_stream_changeevnt():I32 => @pony_os_sockopt_option(I32(723))\nfun sctp_pcb_flags_stream_resetevnt():I32 => @pony_os_sockopt_option(I32(724))\nfun sctp_pcb_flags_tcptype():I32 => @pony_os_sockopt_option(I32(725))\nfun sctp_pcb_flags_udptype():I32 => @pony_os_sockopt_option(I32(726))\nfun sctp_pcb_flags_unbound():I32 => @pony_os_sockopt_option(I32(727))\nfun sctp_pcb_flags_wakeinput():I32 => @pony_os_sockopt_option(I32(728))\nfun sctp_pcb_flags_wakeoutput():I32 => @pony_os_sockopt_option(I32(729))\nfun sctp_pcb_flags_was_aborted():I32 => @pony_os_sockopt_option(I32(730))\nfun sctp_pcb_flags_was_connected():I32 => @pony_os_sockopt_option(I32(731))\nfun sctp_pcb_flags_zero_copy_active():I32 => @pony_os_sockopt_option(I32(732))\nfun sctp_pcb_status():I32 => @pony_os_sockopt_option(I32(733))\nfun sctp_peeloff():I32 => @pony_os_sockopt_option(I32(734))\nfun sctp_peer_addr_params():I32 => @pony_os_sockopt_option(I32(735))\nfun sctp_peer_addr_thlds():I32 => @pony_os_sockopt_option(I32(736))\nfun sctp_peer_auth_chunks():I32 => @pony_os_sockopt_option(I32(737))\nfun sctp_pktdrop_supported():I32 => @pony_os_sockopt_option(I32(738))\nfun sctp_pluggable_cc():I32 => @pony_os_sockopt_option(I32(739))\nfun sctp_pluggable_ss():I32 => @pony_os_sockopt_option(I32(740))\nfun sctp_primary_addr():I32 => @pony_os_sockopt_option(I32(741))"} +{"id": "Pony/object-capabilities_4.txt", "contents": "# Capabilities and concurrency\n\nThe object-capability model on its own does not address concurrency. It makes clear _what_ will happen if there is simultaneous access to an object, but it does not prescribe a single method of controlling this.\n\nCombining capabilities with the actor-model is a good start, and has been done before in languages such as [E](http://erights.org/) and Joule.\n\nPony does this and also uses a system of _reference capabilities_ in the type system.\n"} +{"id": "Pony/net-OSSockOpt-_44.txt", "contents": "fun box ipproto_pigp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pim\u00b6\n[Source]\nfun box ipproto_pim()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_prm\u00b6\n[Source]"} +{"id": "Pony/random-Dice-_2.txt", "contents": "count: U64 val,\nsides: U64 val)\n: U64 val\n\nParameters\u00b6\n\ncount: U64 val\nsides: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-persistent-map-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-FloatingPoint-_43.txt", "contents": "A\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndiv\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/files-FileStream-_3.txt", "contents": "Print an iterable collection of ByteSeqs.\nbe printv(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nwritev\u00b6\n[Source]\nWrite an iterable collection of ByteSeqs.\nbe writev(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n"} +{"id": "Pony/src-files-path-_55.txt", "contents": "\"\"\"\nlet letters =\n\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\"\nlet s = recover String(len) end\nvar n = USize(0)\nvar r = Time.nanos().usize()\n\ntry\nwhile n < len do\nlet c = letters(r % letters.size())?\nr = r / letters.size()\ns.push(c)\nn = n + 1\nend\nend\ns\n\n\n\n"} +{"id": "Pony/builtin-SignedInteger-_5.txt", "contents": "[Source]\nfun box shr(\ny: B)\n: A\n\nParameters\u00b6\n\ny: B\n\nReturns\u00b6\n\nA\n\n\nshl_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf bits differing from the final sign bit are shifted-out, the result is\nundefined.\nfun box shl_unsafe("} +{"id": "Pony/builtin-ILong-_62.txt", "contents": "\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: ILong val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: ILong val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n"} +{"id": "Pony/src-builtin-nullable_pointer-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-real-_63.txt", "contents": "\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis -~ y\n\nfun mul_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis *~ y\n\nfun div_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation."} +{"id": "Pony/files-FileLines-_2.txt", "contents": "Parameters\u00b6\n\nfile: File ref\nmin_read_size: USize val = 256\n\nReturns\u00b6\n\nFileLines ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun ref has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/src-collections-map-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/src-term-ansi_term-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-signals-sig-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/ponycheck_4.txt", "contents": "# Integration with PonyTest\n\nPonyCheck properties need to be executed. The test runner for PonyCheck is [PonyTest](https://stdlib.ponylang.io/pony_test--index). To integrate [`Property1`](https://stdlib.ponylang.io/pony_check-Property1) into [PonyTest](https://stdlib.ponylang.io/pony_test--index), `Property1` needs to be wrapped inside a [`Property1UnitTest`](hhttps://stdlib.ponylang.io/pony_check-Property1UnitTest) and passed to the PonyTest `apply` method as a regular PonyTest [`UnitTest`](https://stdlib.ponylang.io/pony_test-UnitTest):\n\n```pony\nuse \"pony_test\"\nuse \"pony_check\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nfun tag tests(test: PonyTest) =>\ntest(Property1UnitTest[String](_MyFirstProperty))\n```\n\nIt is also possible to integrate any number of properties directly into one\n[`UnitTest`](https://stdlib.ponylang.io/pony_test-UnitTest) using the [`PonyCheck.for_all`](https://stdlib.ponylang.io/pony_check-PonyCheck) convenience function:\n\n```pony"} +{"id": "Pony/src-itertools-iter-_108.txt", "contents": "(_next = None) as A!\nelse error\nend\n\nfun ref _try_next(): Bool =>\nif _done then false\nelseif not _iter.has_next() then\n_done = true\nfalse\nelse\n_next =\ntry _iter.next()?\nelse\n_done = true\nreturn false\nend\n_done = try not f(_next as A!)? else true end\nnot _done\nend\nend)"} +{"id": "Pony/builtin-USize-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_159.txt", "contents": "i = i + 1\nend\n_size < that._size\n\nfun le(that: String box): Bool =>\n\"\"\"\nReturns true if this is lexically less than or equal to that. Needs to be\nmade UTF-8 safe.\n\"\"\"\nlet len = _size.min(that._size)\nvar i: USize = 0\n\nwhile i < len do\nif _ptr._apply(i) < that._ptr._apply(i) then\nreturn true\nelseif _ptr._apply(i) > that._ptr._apply(i) then\nreturn false\nend\ni = i + 1\nend"} +{"id": "Pony/buffered-Reader-_13.txt", "contents": "u32_le\u00b6\n[Source]\nGet a little-endian U32.\nfun ref u32_le()\n: U32 val ?\n\nReturns\u00b6\n\nU32 val ?\n\n\ni32_be\u00b6\n[Source]\nGet a big-endian I32.\nfun ref i32_be()\n: I32 val ?\n\nReturns\u00b6\n\nI32 val ?"} +{"id": "Pony/src-collections-persistent-list-_54.txt", "contents": "fun val partition(f: {(val->A): Bool} box): (List[A], List[A]) =>\n\"\"\"\nBuilds a pair of lists, the first of which is made up of the elements\nsatisfying the supplied predicate and the second of which is made up of\nthose that do not.\n\"\"\"\nvar hits: List[A] = Nil[A]\nvar misses: List[A] = Nil[A]\nvar cur: List[A] = this\nwhile true do\nmatch cur\n| let cons: Cons[A] =>\nlet next = cons.head()\nif f(next) then\nhits = hits.prepend(next)\nelse\nmisses = misses.prepend(next)\nend\ncur = cons.tail()\nelse"} +{"id": "Pony/src-collections-hashable-_11.txt", "contents": "\"\"\"\nHash the identity rather than the contents.\n\"\"\"\n(digestof x).hash()\n\nfun hash64(x: box->A!): U64 =>\n\"\"\"\nHash the identity rather than the contents.\n\"\"\"\n(digestof x).hash64()\n\nfun eq(x: box->A!, y: box->A!): Bool =>\n\"\"\"\nDetermine equality by identity rather than structurally.\n\"\"\"\nx is y\n\nprimitive HashByteSeq is\n(HashFunction[ByteSeq box] & HashFunction64[ByteSeq box])\n\"\"\""} +{"id": "Pony/builtin-ArrayKeys-_0.txt", "contents": "\n\n\n\n\n\n\nArrayKeys[A: A, B: Array[A] #read]\u00b6\n[Source]\nclass ref ArrayKeys[A: A, B: Array[A] #read] is\nIterator[USize val] ref\n\nImplements\u00b6\n\nIterator[USize val] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Cons-_16.txt", "contents": ": (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\ntake\u00b6\n[Source]\nBuilds a list of the first n elements.\nfun val take(\nn: USize val)\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n"} +{"id": "Pony/src-collections-list-_69.txt", "contents": "=>\n\"\"\"\nAppend len elements from a sequence, starting from the given offset.\n\nWhen len is -1, all elements of sequence are pushed.\n\nDoes not remove elements from sequence.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.append(other_list) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is unchanged\n```\n\"\"\"\nif offset >= seq.size() then\nreturn\nend\n\nlet copy_len = len.min(seq.size() - offset)\nreserve(_size + copy_len)"} +{"id": "Pony/src-net-tcp_connection-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/src-builtin-signed-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/src-pony_check-generator-_122.txt", "contents": "\nfun u32(\nmin: U32 = U32.min_value(),\nmax: U32 = U32.max_value())\n: Generator[U32]\n=>\n\"\"\"\nCreate a generator for U32 values.\n\"\"\"\nlet that = this\nGenerator[U32](\nobject is GenObj[U32]\nfun generate(rnd: Randomness): U32^ =>\nrnd.u32(min, max)\n\nfun shrink(u: U32): ValueAndShrink[U32] =>\nthat._int_shrink[U32](consume u, min)\nend)\n\nfun u64("} +{"id": "Pony/src-pony_check-generator-_80.txt", "contents": "As the returned value can also be `iso`, it needs to be consumed and\nreturned.\n\nIt is preferred to already return a `ValueAndShrink` from `generate`.\n\"\"\"\n_gen.shrink(consume t)\n\nfun generate_value(rnd: Randomness): T^ ? =>\n_gen.generate_value(rnd)?\n\nfun generate_and_shrink(rnd: Randomness): ValueAndShrink[T] ? =>\n_gen.generate_and_shrink(rnd)?\n\nfun filter(predicate: {(T): (T^, Bool)} box): Generator[T] =>\n\"\"\"\nApply `predicate` to the values generated by this Generator\nand only yields values for which `predicate` returns `true`.\n\nExample:\n"} +{"id": "Pony/src-pony_check-for_all-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109use \"pony_test\"\n\nclass ForAll[T]"} +{"id": "Pony/src-net-ossockopt-_74.txt", "contents": "fun ipproto_mux():I32 => @pony_os_sockopt_level(I32(4071))\nfun ipproto_nd():I32 => @pony_os_sockopt_level(I32(4072))\nfun ipproto_nhrp():I32 => @pony_os_sockopt_level(I32(4073))\nfun ipproto_none():I32 => @pony_os_sockopt_level(I32(4074))\nfun ipproto_nsp():I32 => @pony_os_sockopt_level(I32(4075))\nfun ipproto_nvpii():I32 => @pony_os_sockopt_level(I32(4076))\nfun ipproto_old_divert():I32 => @pony_os_sockopt_level(I32(4077))\nfun ipproto_ospfigp():I32 => @pony_os_sockopt_level(I32(4078))\nfun ipproto_pfsync():I32 => @pony_os_sockopt_level(I32(4079))\nfun ipproto_pgm():I32 => @pony_os_sockopt_level(I32(4080))\nfun ipproto_pigp():I32 => @pony_os_sockopt_level(I32(4081))\nfun ipproto_pim():I32 => @pony_os_sockopt_level(I32(4082))\nfun ipproto_prm():I32 => @pony_os_sockopt_level(I32(4083))\nfun ipproto_pup():I32 => @pony_os_sockopt_level(I32(4084))\nfun ipproto_pvp():I32 => @pony_os_sockopt_level(I32(4085))\nfun ipproto_raw():I32 => @pony_os_sockopt_level(I32(4086))\nfun ipproto_rccmon():I32 => @pony_os_sockopt_level(I32(4087))\nfun ipproto_rdp():I32 => @pony_os_sockopt_level(I32(4088))\nfun ipproto_reserved_253():I32 => @pony_os_sockopt_level(I32(4089))\nfun ipproto_reserved_254():I32 => @pony_os_sockopt_level(I32(4090))"} +{"id": "Pony/builtin-USize-_11.txt", "contents": "fun box addc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\n(USize val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-files-file_mode-_0.txt", "contents": "\n\n\n\n\n\n\nfile_mode.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/pony_check-Poperator-_3.txt", "contents": ": T^ ?\n\nReturns\u00b6\n\nT^ ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_helper-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-I128-_32.txt", "contents": "fun box rem_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: I128 val)\n: (I128 val , I128 val) ?\n\nParameters\u00b6"} +{"id": "Pony/ini-IniNotify-_0.txt", "contents": "\n\n\n\n\n\n\nIniNotify\u00b6\n[Source]\nNotifications for INI parsing.\ninterface ref IniNotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nThis is called for every valid entry in the INI file. If key/value pairs\noccur before a section name, the section can be an empty string. Return\nfalse to halt processing.\nfun ref apply(\nsection: String val,"} +{"id": "Pony/src-term-ansi_term-_25.txt", "contents": "_esc_buf.push(c)\n| '[' =>\n_escape = _EscapeCSI\n_esc_buf.push(c)\nelse\n_esc_flush()\nend\n| _EscapeSS3 =>\nmatch c\n| 'A' => _up()\n| 'B' => _down()\n| 'C' => _right()\n| 'D' => _left()\n| 'H' => _home()\n| 'F' => _end()\n| 'P' => _fn_key(1)\n| 'Q' => _fn_key(2)\n| 'R' => _fn_key(3)\n| 'S' => _fn_key(4)\nelse"} +{"id": "Pony/src-pony_check-property-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-U128-_35.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_listener-_20.txt", "contents": "\nbe dispose() =>\n\"\"\"\nStop listening.\n\"\"\"\nclose()\n\nfun local_address(): NetAddress =>\n\"\"\"\nReturn the bound IP address.\n\"\"\"\nlet ip = recover NetAddress end\n@pony_os_sockname(_fd, ip)\nip\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nWhen we are readable, we accept new connections until none remain.\n\"\"\"\nif event isnt _event then"} +{"id": "Pony/process-Signaled-_2.txt", "contents": "fun box signal()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/collections-ListNode-_4.txt", "contents": "fun box apply()\n: this->A ?\n\nReturns\u00b6\n\nthis->A ?\n\n\nupdate\u00b6\n[Source]\nReplace the item and return the previous one. Raise an error if we have no\nprevious value.\nfun ref update(\nvalue: (A | None val))\n: A^ ?\n\nParameters\u00b6\n\nvalue: (A | None val)\n"} +{"id": "Pony/builtin-U16-_1.txt", "contents": "new val create(\nvalue: U16 val)\n: U16 val^\n\nParameters\u00b6\n\nvalue: U16 val\n\nReturns\u00b6\n\nU16 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-collections-list-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/backpressure--index-_3.txt", "contents": "_out.print(\"Releasing backpressure!\")\nBackpressure.release(_auth)\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nlet socket = TCPConnection(TCPConnectAuth(env.root),\nrecover SlowDown(\nApplyReleaseBackpressureAuth(env.root), env.out) end, \"\", \"7669\")\n\nCaveat\u00b6\nThe runtime backpressure is a powerful system. By intervening, programmers can\ncreate deadlocks. Any call to Backpressure.apply should be matched by a\ncorresponding call to Backpressure.release. Authorization via the\nApplyReleaseBackpressureAuth capability is required to apply or release\nbackpressure. By requiring that the caller have a token to apply or release a\nbackpressure, rouge 3rd party library code can't run wild and unknowingly\ninterfere with the runtime."} +{"id": "Pony/net-OSSockOpt-_516.txt", "contents": "fun box so_rcvbuf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvbufforce\u00b6\n[Source]\nfun box so_rcvbufforce()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvlowat\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/files-FileMkdir-_2.txt", "contents": "\nthat: FileMkdir val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileMkdir val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileMkdir val\n\nReturns\u00b6\n"} +{"id": "Pony/backpressure--index-_2.txt", "contents": "//\n// that apply and release backpressure as needed\n\nuse \"backpressure\"\nuse \"collections\"\nuse \"net\"\n\nclass SlowDown is TCPConnectionNotify\nlet _auth: ApplyReleaseBackpressureAuth\nlet _out: OutStream\n\nnew iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>\n_auth = auth\n_out = out\n\nfun ref throttled(connection: TCPConnection ref) =>\n_out.print(\"Experiencing backpressure!\")\nBackpressure.apply(_auth)\n\nfun ref unthrottled(connection: TCPConnection ref) =>"} +{"id": "Pony/src-net-net_address-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-debug-debug-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-float-_49.txt", "contents": "\nfun log(): F64 => @\"llvm.log.f64\"(this)\nfun log2(): F64 => @\"llvm.log2.f64\"(this)\nfun log10(): F64 => @\"llvm.log10.f64\"(this)\nfun logb(): F64 => @logb(this)\n\nfun pow(y: F64): F64 => @\"llvm.pow.f64\"(this, y)\nfun powi(y: I32): F64 =>\nifdef windows then\npow(y.f64())\nelse\n@\"llvm.powi.f64\"(this, y)\nend\n\nfun sqrt(): F64 =>\nif this < 0.0 then\n_nan()\nelse\n@\"llvm.sqrt.f64\"(this)\nend"} +{"id": "Pony/builtin-I8-_6.txt", "contents": "\nU8 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U8 val"} +{"id": "Pony/net-OSSockOpt-_138.txt", "contents": "fun box ipv6_fl_s_any()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_s_excl\u00b6\n[Source]\nfun box ipv6_fl_s_excl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_s_none\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_21.txt", "contents": "fun box div_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6"} +{"id": "Pony/6_type-aliases_8.txt", "contents": "# Other stuff\n\nType aliases get used for a lot of things, but this gives you the general idea. Just remember that a type alias is always a convenience: you could replace every use of the type alias with the full type after the `is`.\n\nIn fact, that's exactly what the compiler does.\n"} +{"id": "Pony/pony_check-ForAll4-_0.txt", "contents": "\n\n\n\n\n\n\nForAll4[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\nclass ref ForAll4[T1: T1, T2: T2, T3: T3, T4: T4]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\ngen3': Generator[T3] val,\ngen4': Generator[T4] val,\nh: TestHelper val)"} +{"id": "Pony/net-OSSockOpt-_551.txt", "contents": "fun box tcpolen_nop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_pad\u00b6\n[Source]\nfun box tcpolen_pad()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_sack\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_62.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\nfun box i16_unsafe()\n: I16 val"} +{"id": "Pony/src-collections-map-_33.txt", "contents": "let key' = key\n\nif not found then\n_array(i)? = (consume key, consume value)\n\n_size = _size + 1\n\nif (_size * 4) > (_array.size() * 3) then\n_resize(_array.size() * 2)\nend\nend\n\n_array(i)? as (_, V)\nelse\n// This is unreachable, since index will never be out-of-bounds.\nvalue'\nend\n\nfun ref remove(key: box->K!): (K^, V^) ? =>\n\"\"\""} +{"id": "Pony/backpressure-ApplyReleaseBackpressureAuth-_0.txt", "contents": "\n\n\n\n\n\n\nApplyReleaseBackpressureAuth\u00b6\n[Source]\nprimitive val ApplyReleaseBackpressureAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: AmbientAuth val)\n: ApplyReleaseBackpressureAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/builtin-I8-_30.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-ambient_auth-_0.txt", "contents": "\n\n\n\n\n\n\nambient_auth.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files--index-_3.txt", "contents": "primitive FileLookup\nprimitive FileMkdir\nclass FileMode\nprimitive FileOK\nclass FilePath\nprimitive FilePermissionDenied\nprimitive FileRead\nprimitive FileRemove\nprimitive FileRename\nprimitive FileSeek\nprimitive FileStat\nactor FileStream\nprimitive FileSync\nprimitive FileTime\nprimitive FileTruncate\nprimitive FileWrite\nprimitive OpenFile\nprimitive Path\ninterface WalkHandler\n"} +{"id": "Pony/src-collections-list-_57.txt", "contents": "\n```pony\nlet my_list = List[String].unit(\"element\")\n```\n\"\"\"\npush(consume a)\n\nnew from(seq: Array[A^]) =>\n\"\"\"\nCreates a list equivalent to the provided Array (both node number and order are preserved).\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\n```\n\"\"\"\nfor value in seq.values() do\npush(consume value)\nend\n\nfun ref reserve(len: USize) =>"} +{"id": "Pony/src-net-tcp_connection-_93.txt", "contents": "Start reading off this TCPConnection again after having been muted.\n\"\"\"\n_muted = false\nif not _reading then\n_pending_reads()\nend\n\nbe set_notify(notify: TCPConnectionNotify iso) =>\n\"\"\"\nChange the notifier.\n\"\"\"\n_notify = consume notify\n\nbe dispose() =>\n\"\"\"\nClose the connection gracefully once all writes are sent.\n\"\"\"\nclose()\n\nfun local_address(): NetAddress =>"} +{"id": "Pony/builtin-I16-_46.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-env-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-collections-persistent-list-_55.txt", "contents": "break\nend\nend\n(hits.reverse(), misses.reverse())\n\nfun val drop(n: USize): List[A] =>\n\"\"\"\nBuilds a list by dropping the first n elements.\n\"\"\"\nvar cur: List[A] = this\nif cur.size() <= n then return Nil[A] end\nvar count = n\nwhile count > 0 do\nmatch cur\n| let cons: Cons[A] =>\ncur = cons.tail()\ncount = count - 1\nend\nend\ncur"} +{"id": "Pony/src-collections-heap-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-ossockopt-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-net-udp_socket-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-builtin-pointer-_0.txt", "contents": "\n\n\n\n\n\n\npointer.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_check-generator-_119.txt", "contents": "| Equal => error\n| Greater =>\nlet minuend: T = _next_minuend()\nlet old = _cur\n_cur = _cur - minuend\nif old < _cur then\n_overflow = true\nend\nold\nend\nend\n\nlet min_iter =\nmatch relation\n| let _: (Less | Greater) => Poperator[T]([min])\n| Equal => Poperator[T].empty()\nend\n\nlet shrunken_iter = Iter[T].chain(\n["} +{"id": "Pony/builtin-SignedInteger-_26.txt", "contents": "\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_85.txt", "contents": "fun ipv6_multicast_if():I32 => @pony_os_sockopt_option(I32(142))\nfun ipv6_multicast_loop():I32 => @pony_os_sockopt_option(I32(143))\nfun ipv6_nexthop():I32 => @pony_os_sockopt_option(I32(144))\nfun ipv6_origdstaddr():I32 => @pony_os_sockopt_option(I32(145))\nfun ipv6_pathmtu():I32 => @pony_os_sockopt_option(I32(146))\nfun ipv6_pktinfo():I32 => @pony_os_sockopt_option(I32(147))\nfun ipv6_pmtudisc_do():I32 => @pony_os_sockopt_option(I32(148))\nfun ipv6_pmtudisc_dont():I32 => @pony_os_sockopt_option(I32(149))\nfun ipv6_pmtudisc_interface():I32 => @pony_os_sockopt_option(I32(150))\nfun ipv6_pmtudisc_omit():I32 => @pony_os_sockopt_option(I32(151))\nfun ipv6_pmtudisc_probe():I32 => @pony_os_sockopt_option(I32(152))\nfun ipv6_pmtudisc_want():I32 => @pony_os_sockopt_option(I32(153))\nfun ipv6_prefer_src_cga():I32 => @pony_os_sockopt_option(I32(154))\nfun ipv6_prefer_src_coa():I32 => @pony_os_sockopt_option(I32(155))\nfun ipv6_prefer_src_home():I32 => @pony_os_sockopt_option(I32(156))\nfun ipv6_prefer_src_noncga():I32 => @pony_os_sockopt_option(I32(157))\nfun ipv6_prefer_src_public():I32 => @pony_os_sockopt_option(I32(158))\nfun ipv6_prefer_src_pubtmp_default():I32 => @pony_os_sockopt_option(I32(159))\nfun ipv6_prefer_src_tmp():I32 => @pony_os_sockopt_option(I32(160))\nfun ipv6_priority_10():I32 => @pony_os_sockopt_option(I32(161))"} +{"id": "Pony/src-process-process_monitor-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-process-process_monitor-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/backpressure-Backpressure-_3.txt", "contents": "\nthat: Backpressure val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Backpressure val)\n: Bool val\n\nParameters\u00b6\n\nthat: Backpressure val\n\nReturns\u00b6\n"} +{"id": "Pony/process-WriteError-_0.txt", "contents": "\n\n\n\n\n\n\nWriteError\u00b6\n[Source]\nprimitive val WriteError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: WriteError val^\n\nReturns\u00b6\n\nWriteError val^"} +{"id": "Pony/src-net-tcp_connection-_119.txt", "contents": "if _muted then\nhard_close()\nelse\n_close()\nend\nend\n\nfun ref _close() =>\n_closed = true\n_try_shutdown()\n\nfun ref _try_shutdown() =>\n\"\"\"\nIf we have closed and we have no remaining writes or pending connections,\nthen shutdown.\n\"\"\"\nif not _closed then\nreturn\nend\n"} +{"id": "Pony/src-math-fibonacci-_3.txt", "contents": "fib_j * (fib_j + (fib_i * 2))\nelseif (n % 4) == 1 then\n(((fib_j * 2) + fib_i) * ((fib_j * 2) - fib_i)) + 2\nelse\n(((fib_j * 2) + fib_i) * ((fib_j * 2) - fib_i)) - 2\nend\nend\n\n//The generator stops on overflow.\nfun has_next(): Bool => _last <= _next\n\nfun ref next(): A =>\n_last = _next = _uber_next = _next + _uber_next\n_last\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_47.txt", "contents": "use @\"llvm.uadd.with.overflow.i16\"[(U16, Bool)](a: U16, b: U16)\nuse @\"llvm.uadd.with.overflow.i32\"[(U32, Bool)](a: U32, b: U32)\nuse @\"llvm.uadd.with.overflow.i64\"[(U64, Bool)](a: U64, b: U64)\nuse @\"llvm.uadd.with.overflow.i128\"[(U128, Bool)](a: U128, b: U128)\nuse @\"llvm.usub.with.overflow.i8\"[(U8, Bool)](a: U8, b: U8)\nuse @\"llvm.usub.with.overflow.i16\"[(U16, Bool)](a: U16, b: U16)\nuse @\"llvm.usub.with.overflow.i32\"[(U32, Bool)](a: U32, b: U32)\nuse @\"llvm.usub.with.overflow.i64\"[(U64, Bool)](a: U64, b: U64)\nuse @\"llvm.usub.with.overflow.i128\"[(U128, Bool)](a: U128, b: U128)\nuse @\"llvm.umul.with.overflow.i8\"[(U8, Bool)](a: U8, b: U8)\nuse @\"llvm.umul.with.overflow.i16\"[(U16, Bool)](a: U16, b: U16)\nuse @\"llvm.umul.with.overflow.i32\"[(U32, Bool)](a: U32, b: U32)\nuse @\"llvm.umul.with.overflow.i64\"[(U64, Bool)](a: U64, b: U64)\nuse @\"llvm.umul.with.overflow.i128\"[(U128, Bool)](a: U128, b: U128)\n\nprimitive U8 is UnsignedInteger[U8]\nnew create(value: U8) => value\nnew from[B: (Number & Real[B] val)](a: B) => a.u8()\n\nnew min_value() => 0"} +{"id": "Pony/src-buffered-reader-_65.txt", "contents": "else\n// single array did not have all the bytes needed\n(u8()?.u128() << 120) or (u8()?.u128() << 112) or\n(u8()?.u128() << 104) or (u8()?.u128() << 96) or\n(u8()?.u128() << 88) or (u8()?.u128() << 80) or\n(u8()?.u128() << 72) or (u8()?.u128() << 64) or\n(u8()?.u128() << 56) or (u8()?.u128() << 48) or\n(u8()?.u128() << 40) or (u8()?.u128() << 32) or\n(u8()?.u128() << 24) or (u8()?.u128() << 16) or\n(u8()?.u128() << 8) or u8()?.u128()\nend\nelse\nerror\nend\n\nfun ref u128_le(): U128 ? =>\n\"\"\"\nGet a little-endian U128.\n\"\"\"\nlet num_bytes = U128(0).bytewidth()"} +{"id": "Pony/collections-Flags-_3.txt", "contents": "[Source]\nReturns true if the flag is set.\nfun box apply(\nflag: A)\n: Bool val\n\nParameters\u00b6\n\nflag: A\n\nReturns\u00b6\n\nBool val\n\n\nall\u00b6\n[Source]\nSets all bits, including undefined flags.\nfun ref all()\n: None val"} +{"id": "Pony/builtin-UnsignedInteger-_56.txt", "contents": "\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-unsigned-_65.txt", "contents": "else\n@\"llvm.cttz.i64\"(this.u64(), false).ulong()\nend\n\nfun clz_unsafe(): ULong =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\nifdef ilp32 or llp64 then\n@\"llvm.ctlz.i32\"(this.u32(), true).ulong()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), true).ulong()\nend\n\nfun ctz_unsafe(): ULong =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\""} +{"id": "Pony/builtin-U64-_44.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: U64 val)\n: Bool val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_16.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , I128 val)\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-math-greatest_common_divisor-_2.txt", "contents": "32\n33\n34\n35\n36\n37primitive GreatestCommonDivisor\n\"\"\"\nGet greatest common divisor of x and y.\n\nProviding 0 will result in an error.\n\nExample usage:\n\n```pony\nuse \"math\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet gcd = GreatestCommonDivisor[I64](10, 20)?"} +{"id": "Pony/net-UDPSocket-_13.txt", "contents": "group: String val,\nto: String val = \"\")\n\nParameters\u00b6\n\ngroup: String val\nto: String val = \"\"\n\n\ndispose\u00b6\n[Source]\nStop listening.\nbe dispose()\n\n\nPublic Functions\u00b6\nlocal_address\u00b6\n[Source]\nReturn the bound IP address.\nfun box local_address()"} +{"id": "Pony/src-promises-promise-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-buffered-writer-_23.txt", "contents": "\nfun ref f32_le(data: F32) =>\n\"\"\"\nWrite an F32 to the buffer in little-endian byte order.\n\"\"\"\nu32_le(data.bits())\n\nfun ref f32_be(data: F32) =>\n\"\"\"\nWrite an F32 to the buffer in big-endian byte order.\n\"\"\"\nu32_be(data.bits())\n\nfun ref u64_le(data: U64) =>\n\"\"\"\nWrite a U64 to the buffer in little-endian byte order.\n\"\"\"\nlet num_bytes = U64(0).bytewidth()\nifdef littleendian then\n_current.push_u64(data)"} +{"id": "Pony/src-net-ossockopt-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/cli-Help-_0.txt", "contents": "\n\n\n\n\n\n\nHelp\u00b6\n[Source]\nprimitive val Help\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Help val^\n\nReturns\u00b6\n\nHelp val^"} +{"id": "Pony/net-TCPListener-_0.txt", "contents": "\n\n\n\n\n\n\nTCPListener\u00b6\n[Source]\nListens for new network connections.\nThe following program creates an echo server that listens for\nconnections on port 8989 and echoes back any data it receives.\nuse \"net\"\n\nclass MyTCPConnectionNotify is TCPConnectionNotify\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8] iso,\ntimes: USize)\n: Bool"} +{"id": "Pony/files-FileAuth-_1.txt", "contents": "from: AmbientAuth val\n\nReturns\u00b6\n\nFileAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/collections-ListNode-_0.txt", "contents": "\n\n\n\n\n\n\nListNode[A: A]\u00b6\n[Source]\nA node in a doubly linked list.\nSee Pony collections.List\nclass for usage examples.\nEach node contains four fields: two link fields (references to the previous and\nto the next node in the sequence of nodes), one data field, and the reference to\nthe List in which it resides.\nAs you would expect functions are provided to create a ListNode, update a\nListNode's contained item, and pop the item from the ListNode.\nAdditional functions are provided to operate on a ListNode as part of a Linked\nList. These provide for prepending, appending, removal, and safe traversal in\nboth directions. The Ponylang"} +{"id": "Pony/src-net-tcp_connection-_70.txt", "contents": "## Write\n\nThe TCP protocol has built-in backpressure support. This is generally\nexperienced as the outgoing write buffer becoming full and being unable\nto write all requested data to the socket. In `TCPConnection`, this is\nhidden from the programmer. When this occurs, `TCPConnection` will buffer\nthe extra data until such time as it is able to be sent. Left unchecked,\nthis could result in uncontrolled queuing. To address this,\n`TCPConnectionNotify` implements two methods `throttled` and `unthrottled`\nthat are called when backpressure is applied and released.\n\nUpon receiving a `throttled` notification, your application has two choices\non how to handle it. One is to inform the Pony runtime that it can no\nlonger make progress and that runtime backpressure should be applied to\nany actors sending this one messages. For example, you might construct your\napplication like:\n\n```pony\n// Here we have a TCPConnectionNotify that upon construction\n// is given a ApplyReleaseBackpressureAuth token. This allows the notifier"} +{"id": "Pony/src-capsicum-cap_rights-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-OutStream-_0.txt", "contents": "\n\n\n\n\n\n\nOutStream\u00b6\n[Source]\nAsnychronous access to some output stream.\ninterface tag OutStream\n\nPublic Behaviours\u00b6\nprint\u00b6\n[Source]\nPrint some bytes and insert a newline afterwards.\nbe print(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6"} +{"id": "Pony/src-files-file_stream-_4.txt", "contents": "\nbe flush() =>\n\"\"\"\nFlush pending data to write.\n\"\"\"\n_file.flush()\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_helper-_29.txt", "contents": "=>\n\"\"\"\nAssert that the given expression is true.\n\"\"\"\nif not predicate then\n_fail(_fmt_msg(loc, \"Assert true failed. \" + msg))\nreturn false\nend\n_runner.log(_fmt_msg(loc, \"Assert true passed. \" + msg))\ntrue\n\nfun assert_error(\ntest: {(): None ?} box,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the given test function throws an error when run.\n\"\"\""} +{"id": "Pony/src-assert-assert-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_connection-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-buffered-reader-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/9_object-literals_4.txt", "contents": "# Lambdas\n\nArbitrarily complex closures are nice, but sometimes we just want a simple closure. In Pony, you can use the lambdas for that. A lambda is written as a function (implicitly named `apply`) enclosed in curly brackets:\n\n```pony\n{(s: String): String => \"lambda: \" + s }\n```\n\nThis produces the same code as:\n\n```pony\nobject\nfun apply(s: String): String => \"lambda: \" + s\nend\n```\n\nThe reference capability of the lambda object can be declared by appending it after the closing curly bracket:\n\n```pony\n{(s: String): String => \"lambda: \" + s } iso"} +{"id": "Pony/builtin-String-_11.txt", "contents": "cpointer\u00b6\n[Source]\nReturns a C compatible pointer to the underlying string allocation.\nfun box cpointer(\noffset: USize val = 0)\n: Pointer[U8 val] tag\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nPointer[U8 val] tag\n\n\ncstring\u00b6\n[Source]\nReturns a C compatible pointer to a null-terminated version of the\nstring, safe to pass to an FFI function that doesn't accept a size"} +{"id": "Pony/src-term-readline-_38.txt", "contents": "end\n\nout.append(\"\\r\")\nout.append(ANSI.right(pos.u32()))\n_out.write(consume out)\nend\n\nfun ref _add_history(line: String) =>\n\"\"\"\nAdd a line to the history, trimming an earlier line if necessary.\n\"\"\"\ntry\nif (_history.size() > 0) and (_history(_history.size() - 1)? == line) then\n_cur_line = _history.size()\nreturn\nend\nend\n\nif (_maxlen > 0) and (_history.size() >= _maxlen) then\ntry"} +{"id": "Pony/net-OSSockOpt-_357.txt", "contents": "fun box sctp_closed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_clr_stat_log\u00b6\n[Source]\nfun box sctp_clr_stat_log()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_base\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_59.txt", "contents": "fun mod_unsafe(y: A): A => this.rem_unsafe(y)\n\nfun shl_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\n\"\"\"\nthis <<~ y\n\nfun shr_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\n\"\"\"\nthis >>~ y\n\nfun rotl(y: A): A =>\nlet y' = y % bitwidth()\nif y' == y'.min_value() then\nthis._value()"} +{"id": "Pony/src-net-tcp_connection-_89.txt", "contents": "\n_readable = true\n_queue_read()\n_pending_reads()\n\nbe write(data: ByteSeq) =>\n\"\"\"\nWrite a single sequence of bytes. Data will be silently discarded if the\nconnection has not yet been established though.\n\"\"\"\nif _connected and not _closed then\n_in_sent = true\nwrite_final(_notify.sent(this, data))\n_in_sent = false\nend\n\nbe writev(data: ByteSeqIter) =>\n\"\"\"\nWrite a sequence of sequences of bytes. Data will be silently discarded if\nthe connection has not yet been established though."} +{"id": "Pony/signals-Sig-_10.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\ntstp\u00b6\n[Source]\nfun box tstp()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\ncont\u00b6\n[Source]\nfun box cont()\n: U32 val\n"} +{"id": "Pony/term-ANSINotify-_14.txt", "contents": "Returns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file_mode-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110class FileMode\n\"\"\""} +{"id": "Pony/term-ANSI-_14.txt", "contents": "cyan\u00b6\n[Source]\nCyan text.\nfun box cyan()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ngrey\u00b6\n[Source]\nGrey text.\nfun box grey()\n: String val\n\nReturns\u00b6\n\nString val"} +{"id": "Pony/src-net-tcp_connection-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/builtin-U8-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/ponytest_8.txt", "contents": "# Tear down\n\nEach unit test object may define a `tear_down()` function. This is called after the test has finished allowing the tearing down of any complex environment that had to be set up for the test.\n\nThe `tear_down()` function is called for each test regardless of whether it passed or failed. If a test times out tear_down() will be called after `timed_out()` returns.\n\nWhen a test is in an exclusion group, the `tear_down()` call is considered part of the tests run. The next test in the exclusion group will not start until after `tear_down()` returns on the current test.\n\nThe test's `TestHelper` is handed to `tear_down()` and it is permitted to log messages and call assert functions during tear down.\n"} +{"id": "Pony/collections-HashByteSeq-_0.txt", "contents": "\n\n\n\n\n\n\nHashByteSeq\u00b6\n[Source]\nHash and equality functions for arbitrary ByteSeq.\nprimitive val HashByteSeq is\nHashFunction[(String box | Array[U8 val] box)] val,\nHashFunction64[(String box | Array[U8 val] box)] val\n\nImplements\u00b6\n\nHashFunction[(String box | Array[U8 val] box)] val\nHashFunction64[(String box | Array[U8 val] box)] val\n\n"} +{"id": "Pony/builtin-USize-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/compiler-args_0.txt", "contents": "# Compiler Arguments\n\n`ponyc`, the compiler, is usually called in the project directory, where it finds the `.pony` files and its dependencies automatically. There it will create the binary based on the directory name. You can override this and tune the compilation with several options as described via `ponyc --help` and you can pass a separate source directory as an argument.\n\n```bash\nponyc [OPTIONS] \n```\n\nThe most useful options are `--debug`, `--path` or just `-p`, `--output` or just `-o` and `--docs` or `-g`.\n\n`--debug` will skip the LLVM optimizations passes. This should not be mixed up with `make config=debug`, the default make configuration target. `config=debug` will create DWARF symbols, and add slower assertions to ponyc, but not to the generated binaries. For those, you can omit DWARF symbols with the `--strip` or `-s` option.\n\n`--path` or `-p` take a `:` separated path list as the argument and adds those to the compile-time library paths for the linker to find source packages and the native libraries, static or dynamic, being linked at compile-time or via the FFI at run-time. The system adds several paths already, e.g. on windows it queries the registry to find the compiler run-time paths, you can also use `use \"lib:path\"` statements in the source code and as a final possibility, you can add `-p` paths. But if you want the generated binary to accept such a path to find a dynamic library on your client system, you need to handle that in your source code by yourself. See the `options` package for this.\n\n`--output` or `-o` takes a directory name where the final binary is created.\n\n`--docs` or -`g` creates a directory of the package with documentation in [Read the Docs](http://readthedocs.org) format, i.e. markdown with nice navigation.\n\nLet's study the documentation of the builtin standard library:\n"} +{"id": "Pony/format-FormatHexBare-_1.txt", "contents": "new val create()\n: FormatHexBare val^\n\nReturns\u00b6\n\nFormatHexBare val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatHexBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexBare val\n\nReturns\u00b6"} +{"id": "Pony/src-cli-command_help-_10.txt", "contents": "192\n193use \"buffered\"\n\nprimitive Help\nfun general(cs: CommandSpec box): CommandHelp =>\n\"\"\"\nCreates a command help that can print a general program help message.\n\"\"\"\nCommandHelp._create(None, cs)\n\nfun for_command(cs: CommandSpec box, argv: Array[String] box)\n: (CommandHelp | SyntaxError)\n=>\n\"\"\"\nCreates a command help for a specific command that can print a detailed\nhelp message.\n\"\"\"\n_parse(cs, CommandHelp._create(None, cs), argv)\n\nfun _parse(cs: CommandSpec box, ch: CommandHelp, argv: Array[String] box)"} +{"id": "Pony/builtin-ULong-_28.txt", "contents": "fun box shr_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: ULong val)\n: ULong val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-real-_62.txt", "contents": "new val min_normalised()\nnew val epsilon()\nfun tag radix(): U8\nfun tag precision2(): U8\nfun tag precision10(): U8\nfun tag min_exp2(): I16\nfun tag min_exp10(): I16\nfun tag max_exp2(): I16\nfun tag max_exp10(): I16\n\nfun add_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis +~ y\n\nfun sub_unsafe(y: A): A =>"} +{"id": "Pony/builtin-U128-_20.txt", "contents": "[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_130.txt", "contents": "fun tcp_vendor():I32 => @pony_os_sockopt_option(I32(1042))\nfun tcp_window_clamp():I32 => @pony_os_sockopt_option(I32(1043))\nfun tipc_addr_id():I32 => @pony_os_sockopt_option(I32(1044))\nfun tipc_addr_mcast():I32 => @pony_os_sockopt_option(I32(1045))\nfun tipc_addr_name():I32 => @pony_os_sockopt_option(I32(1046))\nfun tipc_addr_nameseq():I32 => @pony_os_sockopt_option(I32(1047))\nfun tipc_cfg_srv():I32 => @pony_os_sockopt_option(I32(1048))\nfun tipc_cluster_scope():I32 => @pony_os_sockopt_option(I32(1049))\nfun tipc_conn_shutdown():I32 => @pony_os_sockopt_option(I32(1050))\nfun tipc_conn_timeout():I32 => @pony_os_sockopt_option(I32(1051))\nfun tipc_critical_importance():I32 => @pony_os_sockopt_option(I32(1052))\nfun tipc_destname():I32 => @pony_os_sockopt_option(I32(1053))\nfun tipc_dest_droppable():I32 => @pony_os_sockopt_option(I32(1054))\nfun tipc_errinfo():I32 => @pony_os_sockopt_option(I32(1055))\nfun tipc_err_no_name():I32 => @pony_os_sockopt_option(I32(1056))\nfun tipc_err_no_node():I32 => @pony_os_sockopt_option(I32(1057))\nfun tipc_err_no_port():I32 => @pony_os_sockopt_option(I32(1058))\nfun tipc_err_overload():I32 => @pony_os_sockopt_option(I32(1059))\nfun tipc_high_importance():I32 => @pony_os_sockopt_option(I32(1060))\nfun tipc_importance():I32 => @pony_os_sockopt_option(I32(1061))"} +{"id": "Pony/src-term-ansi-_0.txt", "contents": "\n\n\n\n\n\n\nansi.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-cli-command_parser-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/collections-List-_29.txt", "contents": "\nList[B] ref^\n\n\nflat_map[B: B]\u00b6\n[Source]\nBuilds a new List by applying a function to every element of the List,\nproducing a new List for each element, then flattened into a single List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.flat_map[String]( {(s: String): List[String] => List[String].from( [\"m\"; s] )} ) // other_list is [\"m\"; \"a\"; \"m\"; \"b\"; \"m\"; c\"]\n\nfun box flat_map[B: B](\nf: {(this->A!): List[B]}[A, B] box)\n: List[B] ref^\n\nParameters\u00b6\n\nf: {(this->A!): List[B]}[A, B] box\n\nReturns\u00b6"} +{"id": "Pony/pony_check-Generators-_41.txt", "contents": "ASCIIAll val | ASCIIAllWithNUL val) = reference\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nascii_printable\u00b6\n[Source]\nCreate a generator for strings of printable ASCII characters,\nwith a minimum length of min (default: 0)\nand a maximum length of max (default: 100).\nfun box ascii_printable(\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0"} +{"id": "Pony/net-TCPConnection-_29.txt", "contents": "\nsetsockopt\u00b6\n[Source]\nGeneral wrapper for TCP sockets to the setsockopt(2) system call.\nThe caller is responsible for the correct size and byte contents of\nthe option array for the requested level and option_name,\nincluding using the appropriate machine endian byte order.\nThis function returns 0 on success, else the value of errno on\nfailure.\nUsage example:\n// connected() is a callback function for class TCPConnectionNotify\nfun ref connected(conn: TCPConnection ref) =>\nlet sb = Writer\n\nsb.u32_le(7744) // Our desired socket buffer size\nlet sbytes = Array[U8]\nfor bs in sb.done().values() do\nsbytes.append(bs)\nend\nmatch conn.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)"} +{"id": "Pony/builtin-F64-_20.txt", "contents": "exponent: I32 val)\n: F64 val\n\nParameters\u00b6\n\nx: F64 val\nexponent: I32 val\n\nReturns\u00b6\n\nF64 val\n\n\nfrexp\u00b6\n[Source]\nfun box frexp()\n: (F64 val , U32 val)\n\nReturns\u00b6\n"} +{"id": "Pony/src-itertools-iter-_112.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2].values())\n.zip[I64]([3; 4].values())\n```\n`(1, 3) (2, 4)`\n\"\"\"\nIter[(A, B)](\nobject is Iterator[(A, B)]\nlet _i1: Iterator[A] = _iter\nlet _i2: Iterator[B] = i2\n\nfun ref has_next(): Bool =>\n_i1.has_next() and _i2.has_next()\n\nfun ref next(): (A, B) ? =>\n(_i1.next()?, _i2.next()?)\nend)\n"} +{"id": "Pony/net-OSSockOpt-_114.txt", "contents": "fun box ipctl_gif_ttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_intrdqdrops\u00b6\n[Source]\nfun box ipctl_intrdqdrops()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_intrdqmaxlen\u00b6\n[Source]"} +{"id": "Pony/backpressure-ApplyReleaseBackpressureAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ApplyReleaseBackpressureAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: ApplyReleaseBackpressureAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/src-net-tcp_connection_notify-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-term-ansi-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-buffered-writer-_28.txt", "contents": "\"\"\"\n// if `data` is 1 cacheline or less in size\n// copy it into the existing `_current` array\n// to coalesce multiple tiny arrays\n// into a single bigger array\nif data.size() <= 64 then\nmatch data\n| let d: String =>\nlet a = d.array()\n_current.copy_from(a, 0, _current.size(), a.size())\n| let d: Array[U8] val =>\n_current.copy_from(d, 0, _current.size(), d.size())\nend\n_size = _size + data.size()\nelse\n_append_current()\n_chunks.push(data)\n_size = _size + data.size()\nend\n"} +{"id": "Pony/builtin-F64-_9.txt", "contents": "precision (ie a normalised number).\nfun tag min_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmin_exp10\u00b6\n[Source]\nMinimum exponent value such that (10^exponent) - 1 is representable at full\nprecision (ie a normalised number).\nfun tag min_exp10()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n"} +{"id": "Pony/random-XorOshiro128StarStar-_11.txt", "contents": "U64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)"} +{"id": "Pony/builtin-Array-_4.txt", "contents": "8\n\n\n9\n16\n\n\n16\n16\n\n\n17\n32\n\n\n\nCall the compact() method to ask the GC to reclaim unused space. There are\nno guarantees that the GC will actually reclaim any space.\nclass ref Array[A: A] is\nSeq[A] ref"} +{"id": "Pony/src-capsicum-cap-_9.txt", "contents": "fun fsck(): U64 => _id(0, 1 << 18)\nfun fstat(): U64 => _id(0, 1 << 19)\nfun fstatat(): U64 => fstat() or lookup()\nfun fstatfs(): U64 => _id(0, 1 << 20)\nfun futimes(): U64 => _id(0, 1 << 21)\nfun futimesat(): U64 => futimes() or lookup()\n\nfun linkat(): U64 => _id(0, 1 << 22) or lookup()\nfun mkdirat(): U64 => _id(0, 1 << 23) or lookup()\nfun mkfifoat(): U64 => _id(0, 1 << 24) or lookup()\nfun mknodat(): U64 => _id(0, 1 << 25) or lookup()\nfun renameat(): U64 => _id(0, 1 << 26) or lookup()\nfun symlinkat(): U64 => _id(0, 1 << 27) or lookup()\nfun unlinkat(): U64 => _id(0, 1 << 28) or lookup()\n\nfun accept(): U64 => _id(0, 1 << 29)\nfun bind(): U64 => _id(0, 1 << 30)\nfun connect(): U64 => _id(0, 1 << 31)\nfun getpeername(): U64 => _id(0, 1 << 32)\nfun getsockname(): U64 => _id(0, 1 << 33)"} +{"id": "Pony/net-TCPConnectionNotify-_1.txt", "contents": ": None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n\n\nproxy_via\u00b6\n[Source]\nCalled before before attempting to connect to the destination server\nIn order to connect via proxy, return the host & service for the proxy\nserver.\nAn implementation of this function might look like:\nlet _proxy_host = \"some-proxy.example.com\"\nlet _proxy_service = \"80\"\nvar _destination_host: ( None | String )"} +{"id": "Pony/builtin-Integer-_35.txt", "contents": "y: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-collections-list-_66.txt", "contents": "```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.prepend_list(other_list) // my_list is [\"d\"; \"e\"; \"f\"; \"a\"; \"b\"; \"c\"], other_list is empty\n```\n\"\"\"\nif this isnt that then\nwhile that._size > 0 do\ntry prepend_node(that.tail()?) end\nend\nend\n\nfun ref push(a: A) =>\n\"\"\"\nAdds a new tail value.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.push(\"d\") // my_list is [\"a\"; \"b\"; \"c\"; \"d\"]\n```"} +{"id": "Pony/src-builtin-seq-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-F32-_14.txt", "contents": "\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_59.txt", "contents": "ILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_41.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I16-_37.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-AsioEvent-_0.txt", "contents": "\n\n\n\n\n\n\nAsioEvent\u00b6\n[Source]\nFunctions for asynchronous event notification.\nprimitive val AsioEvent\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: AsioEvent val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-String-_74.txt", "contents": "Returns\u00b6\n\nU16 val ?\n\n\nu32\u00b6\n[Source]\nfun box u32(\nbase: U8 val = 0)\n: U32 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nU32 val ?\n\n"} +{"id": "Pony/src-buffered-reader-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/collections-persistent-HashMap-_7.txt", "contents": "Add the K, V pairs from the given iterator to the map.\nfun val concat(\niter: Iterator[(val->K , val->V)] ref)\n: HashMap[K, V, H] val\n\nParameters\u00b6\n\niter: Iterator[(val->K , val->V)] ref\n\nReturns\u00b6\n\nHashMap[K, V, H] val\n\n\nadd\u00b6\n[Source]\nReturn this Map with the given (key, value) mapping.\nfun val add(\nkey: K,\nvalue: val->V)"} +{"id": "Pony/itertools-Iter-_8.txt", "contents": "Parameters\u00b6\n\nf: {ref(A!): Bool ?}[A] ref\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nfilter_map_stateful[B: B]\u00b6\n[Source]\nAllows stateful modification to the stream of elements from an iterator,\nsimilar to filter_map.\nfun ref filter_map_stateful[B: B](\nf: {ref(A!): (B^ | None) ?}[A, B] ref)\n: Iter[B] ref^\n\nParameters\u00b6\n\nf: {ref(A!): (B^ | None) ?}[A, B] ref"} +{"id": "Pony/builtin-String-_69.txt", "contents": "i32\u00b6\n[Source]\nfun box i32(\nbase: U8 val = 0)\n: I32 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nI32 val ?\n\n\ni64\u00b6\n[Source]\nfun box i64(\nbase: U8 val = 0)\n: I64 val ?"} +{"id": "Pony/pony_check-IntProperty-_0.txt", "contents": "\n\n\n\n\n\n\nIntProperty\u00b6\n[Source]\nA property implementation for conveniently evaluating properties\nfor all Pony Integer types at once.\nThe property needs to be formulated inside the method int_property:\nclass DivisionByZeroProperty is IntProperty\nfun name(): String => \"div/0\"\n\nfun int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)? =>\nh.assert_eq[T](T.from[U8](0), x / T.from[U8](0))\n\ntrait ref IntProperty is\nProperty1[IntPropertySample ref] ref"} +{"id": "Pony/serialise-OutputSerialisedAuth-_3.txt", "contents": "\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-pony_check-_10.txt", "contents": "# How PonyCheck implements Property Based Testing\n\nA property based test in PonyCheck consists of the following:\n\n* A name (mostly for integration into PonyTest)\n* One or more generators, depending on how your property is laid out.\nThere are tons of them defined in the primitive\n[Generators](pony_check-Generators.md).\n* A `property` method that asserts a certain property for each sample\ngenerated by the [Generator(s)](pony_check-Generator.md) with the help of\n[PropertyHelper](pony_check-PropertyHelper.md), which tries to expose a\nsimilar API as [TestHelper](pony_test-TestHelper.md).\n* Optionally, the method `params()` can be used to configure how PonyCheck\nexecutes the property by specifying a custom\n[PropertyParams](pony_check-PropertyParams.md) object.\n\nThe classical list-reverse example:\n\n```pony\nuse \"collections\""} +{"id": "Pony/src-net-tcp_connection_notify-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-format-format-_14.txt", "contents": "elseif A <: I128 then\n_FormatInt.u128(abs.u128(), neg, fmt, prefix, prec, width, align, fill)\nelseif A <: (U64 | I64) then\n_FormatInt.u64(abs.u64(), neg, fmt, prefix, prec, width, align, fill)\nelseif A <: (U32 | I32) then\n_FormatInt.u32(abs.u32(), neg, fmt, prefix, prec, width, align, fill)\nelseif A <: (U16 | I16) then\n_FormatInt.u16(abs.u16(), neg, fmt, prefix, prec, width, align, fill)\nelseif A <: (U8 | I8) then\n_FormatInt.u8(abs.u8(), neg, fmt, prefix, prec, width, align, fill)\nelseif A <: (USize | ISize) then\nifdef ilp32 then\n_FormatInt.u32(abs.u32(), neg, fmt, prefix, prec, width, align, fill)\nelse\n_FormatInt.u64(abs.u64(), neg, fmt, prefix, prec, width, align, fill)\nend\nelseif A <: (ULong | ILong) then\nifdef ilp32 or llp64 then\n_FormatInt.u32(abs.u32(), neg, fmt, prefix, prec, width, align, fill)\nelse"} +{"id": "Pony/src-builtin-unsigned-_58.txt", "contents": "_UnsignedPartialArithmetic.mul_partial[U32](this, y)?\n\nfun div_partial(y: U32): U32 ? =>\n_UnsignedPartialArithmetic.div_partial[U32](this, y)?\n\nfun rem_partial(y: U32): U32 ? =>\n_UnsignedPartialArithmetic.rem_partial[U32](this, y)?\n\nfun divrem_partial(y: U32): (U32, U32) ? =>\n_UnsignedPartialArithmetic.divrem_partial[U32](this, y)?\n\nprimitive U64 is UnsignedInteger[U64]\nnew create(value: U64) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.u64()\n\nnew min_value() => 0\nnew max_value() => 0xFFFF_FFFF_FFFF_FFFF\n\nfun next_pow2(): U64 =>\nlet x = (this - 1).clz()"} +{"id": "Pony/builtin-F32-_60.txt", "contents": "U32 val\n\n\nu64\u00b6\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nulong\u00b6\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n"} +{"id": "Pony/src-builtin-signed-_89.txt", "contents": "\"\"\"\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis %~ y\nelse\nthis % y\nend\n\nfun f32(): F32 =>\nf64().f32()\n\nfun f64(): F64 =>\nif this < 0 then\n-(-u128()).f64()\nelse\nu128().f64()\nend"} +{"id": "Pony/net-OSSockOpt-_86.txt", "contents": "fun box dso_conaccept()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_conaccess\u00b6\n[Source]\nfun box dso_conaccess()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_condata\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_56.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/collections-HashSet-_19.txt", "contents": "Parameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nReturns true if every element in that is also in this, and this has more\nelements than that.\nfun box gt(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box"} +{"id": "Pony/ponytest_7.txt", "contents": "# Exclusion groups\n\nBy default, all tests are run concurrently. This may be a problem for some tests, e.g. if they manipulate an external file or use a system resource. To fix this issue any number of tests may be put into an exclusion group.\n\nNo tests that are in the same exclusion group will be run concurrently.\n\nExclusion groups are identified by name, arbitrary strings may be used. Multiple exclusion groups may be used and tests in different groups may run concurrently. Tests that do not specify an exclusion group may be run concurrently with any other tests.\n\nThe command line option `--sequential` prevents any tests from running concurrently, regardless of exclusion groups. This is intended for debugging rather than standard use.\n"} +{"id": "Pony/src-net-tcp_connection-_57.txt", "contents": "1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151"} +{"id": "Pony/src-net-ossockopt-_71.txt", "contents": "fun ipproto_carp():I32 => @pony_os_sockopt_level(I32(4011))\nfun ipproto_cftp():I32 => @pony_os_sockopt_level(I32(4012))\nfun ipproto_chaos():I32 => @pony_os_sockopt_level(I32(4013))\nfun ipproto_cmtp():I32 => @pony_os_sockopt_level(I32(4014))\nfun ipproto_comp():I32 => @pony_os_sockopt_level(I32(4015))\nfun ipproto_cphb():I32 => @pony_os_sockopt_level(I32(4016))\nfun ipproto_cpnx():I32 => @pony_os_sockopt_level(I32(4017))\nfun ipproto_dccp():I32 => @pony_os_sockopt_level(I32(4018))\nfun ipproto_ddp():I32 => @pony_os_sockopt_level(I32(4019))\nfun ipproto_dgp():I32 => @pony_os_sockopt_level(I32(4020))\nfun ipproto_divert():I32 => @pony_os_sockopt_level(I32(4021))\nfun ipproto_done():I32 => @pony_os_sockopt_level(I32(4022))\nfun ipproto_dstopts():I32 => @pony_os_sockopt_level(I32(4023))\nfun ipproto_egp():I32 => @pony_os_sockopt_level(I32(4024))\nfun ipproto_emcon():I32 => @pony_os_sockopt_level(I32(4025))\nfun ipproto_encap():I32 => @pony_os_sockopt_level(I32(4026))\nfun ipproto_eon():I32 => @pony_os_sockopt_level(I32(4027))\nfun ipproto_esp():I32 => @pony_os_sockopt_level(I32(4028))\nfun ipproto_etherip():I32 => @pony_os_sockopt_level(I32(4029))\nfun ipproto_fragment():I32 => @pony_os_sockopt_level(I32(4030))"} +{"id": "Pony/builtin-I128-_38.txt", "contents": "fun box add_unsafe(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: I128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/src-files-file-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/buffered-Writer-_15.txt", "contents": "\nNone val\n\n\nu64_be\u00b6\n[Source]\nWrite a U64 to the buffer in big-endian byte order.\nfun ref u64_be(\ndata: U64 val)\n: None val\n\nParameters\u00b6\n\ndata: U64 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/collections-persistent-VecValues-_1.txt", "contents": "v: Vec[A] val\n\nReturns\u00b6\n\nVecValues[A] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-directory-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-itertools-iter-_67.txt", "contents": "\nfun ref any(f: {(A!): Bool ?} box): Bool =>\n\"\"\"\nReturn true if at least one value of the iterator matches the predicate\n`f`. This method short-circuits at the first value where the predicate\nreturns true, otherwise false is returned.\n"} +{"id": "Pony/src-builtin-iterator-_10.txt", "contents": "```\n\n\"\"\"\n\nfun ref has_next(): Bool\n\"\"\"\nReturns `true` if this Iterator is not yet exhausted.\nThat means that a value returned from a subsequent call to `next()`\nis a valid part of this iterator.\n\nReturns `false` if this Iterator is exhausted.\n\nThe behavior of `next()` after this function returned `false` is undefined,\nit might throw an error or return values which are not part of this Iterator.\n\"\"\"\n\nfun ref next(): A ?\n\"\"\"\nGenerate the next value.\n"} +{"id": "Pony/src-collections-list-_94.txt", "contents": "fun ref _set_head(head': (ListNode[A] | None)) =>\n\"\"\"\nPrivate method to control mutating `_head` field.\n\"\"\"\n_head = head'\n\nfun ref _set_tail(tail': (ListNode[A] | None)) =>\n\"\"\"\nPrivate method to control mutating `_tail` field.\n\"\"\"\n_tail = tail'\n\nfun ref _set_both(node: ListNode[A]) =>\n\"\"\"\nPrivate method to set both `_head` and `_tail` to the same node,\ncreating a `List` with a `_size` of 1.\n\"\"\"\nnode._set_list(this)\n_head = node\n_tail = node"} +{"id": "Pony/src-net-tcp_connection-_102.txt", "contents": "ifdef windows then\ntry\n// Add an IOCP write.\n_pending_writev_windows .> push((data.size(), data.cpointer()))\n_pending_writev_total = _pending_writev_total + data.size()\n\n// Write as much data as possible\n// Returns how many we sent or 0 if we are experiencing backpressure\nlet len = @pony_os_writev(_event,\n_pending_writev_windows.cpointer(_pending_sent), I32(1))?\n\nif len == 0 then\n_apply_backpressure()\nelse\n_pending_sent = _pending_sent + len\nend\nend\nelse\n_pending_writev_posix .> push((data.cpointer(), data.size()))\n_pending_writev_total = _pending_writev_total + data.size()"} +{"id": "Pony/src-collections-set-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-I32-_0.txt", "contents": "\n\n\n\n\n\n\nI32\u00b6\n[Source]\nprimitive val I32 is\nSignedInteger[I32 val, U32 val] val\n\nImplements\u00b6\n\nSignedInteger[I32 val, U32 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/pony_check-Randomness-_4.txt", "contents": "fun ref u32(\nmin: U32 val = call,\nmax: U32 val = call)\n: U32 val\n\nParameters\u00b6\n\nmin: U32 val = call\nmax: U32 val = call\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nGenerate a U64 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/builtin-U32-_20.txt", "contents": "fun box shr(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-signed-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-collections-ring_buffer-_7.txt", "contents": "\nfun ref push(value: A): Bool =>\n\"\"\"\nAdd an element to the ring. If the ring is full, this will drop the oldest\nelement in the ring. Returns true if an element was dropped.\n\"\"\"\nvar full = false\n\nif _write < space() then\n_array.push(consume value)\nelse\ntry _array(_write and _mod)? = consume value end\nfull = true\nend\n\n_write = _write + 1\nfull\n\nfun ref clear() =>\n\"\"\""} +{"id": "Pony/builtin-F32-_67.txt", "contents": ": ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\nfun box f32_unsafe()\n: F32 val\n"} +{"id": "Pony/src-builtin-signed-_88.txt", "contents": "\"\"\"\nifdef native128 then\n(this *~ y, this /~ y)\nelse\ndivrem(y)\nend\n\nfun div_unsafe(y: I128): I128 =>\n\"\"\"\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis /~ y\nelse\nthis / y\nend\n\nfun rem_unsafe(y: I128): I128 =>"} +{"id": "Pony/builtin-String-_66.txt", "contents": "Returns\u00b6\n\nBool val\n\n\noffset_to_index\u00b6\n[Source]\nfun box offset_to_index(\ni: ISize val)\n: USize val\n\nParameters\u00b6\n\ni: ISize val\n\nReturns\u00b6\n\nUSize val\n\n"} +{"id": "Pony/net-TCPConnection-_24.txt", "contents": "\n\nclose\u00b6\n[Source]\nAttempt to perform a graceful shutdown. Don't accept new writes. If the\nconnection isn't muted then we won't finish closing until we get a zero\nlength read. If the connection is muted, perform a hard close and shut\ndown immediately.\nfun ref close()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nhard_close\u00b6\n[Source]\nWhen an error happens, do a non-graceful close.\nfun ref hard_close()"} +{"id": "Pony/builtin-Array-_53.txt", "contents": "\nReturns\u00b6\n\nArrayValues[A, this->Array[A] ref] ref^\n\n\npairs\u00b6\n[Source]\nReturn an iterator over the (index, value) pairs in the array.\nfun box pairs()\n: ArrayPairs[A, this->Array[A] ref] ref^\n\nReturns\u00b6\n\nArrayPairs[A, this->Array[A] ref] ref^\n\n\n\n\n"} +{"id": "Pony/builtin-ISize-_58.txt", "contents": "\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_unit_test-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-String-_59.txt", "contents": "\nParameters\u00b6\n\ns: String box = \"\n\"\n\nReturns\u00b6\n\nNone val\n\n\nadd\u00b6\n[Source]\nReturn a string that is a concatenation of this and that.\nfun box add(\nthat: String box)\n: String iso^\n\nParameters\u00b6\n"} +{"id": "Pony/combining-capabilities_4.txt", "contents": "## Reading from an `iso` variable\n\nAnything read through an `iso` origin has to maintain the isolation guarantee that the origin has. The key thing to remember is that the `iso` can be sent to another actor and it can also become any other reference capability. So when we read a field, we need to get a result that won't ever break the isolation guarantees that the origin makes, that is, _read and write uniqueness_.\n\nAn `iso` field makes the same guarantees as an `iso` origin, so that's fine to read. A `val` field is _globally immutable_, which means it's always ok to read it, no matter what the origin is (well, other than `tag`).\n\nEverything else, though, can break our isolation guarantees. That's why other reference capabilities are seen as `tag`: it's the only type that is neither readable nor writable.\n"} +{"id": "Pony/src-collections-set-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-string-_173.txt", "contents": "fun ref next(): U8 ? =>\n_string(_i = _i + 1)?\n\nclass StringRunes is Iterator[U32]\nlet _string: String box\nvar _i: USize\n\nnew create(string: String box) =>\n_string = string\n_i = 0\n\nfun has_next(): Bool =>\n_i < _string.size()\n\nfun ref next(): U32 ? =>\n(let rune, let len) = _string.utf32(_i.isize())?\n_i = _i + len.usize()\nrune\n\nprimitive _UTF32Encoder"} +{"id": "Pony/src-builtin-string-_53.txt", "contents": "1052\n1053\n1054\n1055\n1056\n1057\n1058\n1059\n1060\n1061\n1062\n1063\n1064\n1065\n1066\n1067\n1068\n1069\n1070\n1071"} +{"id": "Pony/annotations_4.txt", "contents": "## Annotations in the Pony compiler\n\nThe following annotations are recognised by the Pony compiler. Note that the Pony compiler will ignore annotations that it doesn't recognise, as well as the annotations described here if they're encountered in an unexpected place.\n"} +{"id": "Pony/net-OSSockOpt-_105.txt", "contents": "fun box icmp_prec_violation()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_prot_unreach\u00b6\n[Source]\nfun box icmp_prot_unreach()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_redirect\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_1.txt", "contents": "new val create(\nvalue: ILong val)\n: ILong val^\n\nParameters\u00b6\n\nvalue: ILong val\n\nReturns\u00b6\n\nILong val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/collections-HashIs-_4.txt", "contents": "\nne\u00b6\n[Source]\nfun box ne(\nthat: HashIs[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: HashIs[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n"} +{"id": "Pony/src-pony_bench-benchmark-_8.txt", "contents": "let samples: USize\n\"\"\"\nTotal number of samples to be measured. (Default: 20)\n\"\"\"\nlet max_iterations: U64\n\"\"\"\nMaximum number of iterations to execute per sample. (Default: 1_000_000_000)\n\"\"\"\nlet max_sample_time: U64\n\"\"\"\nMaximum time to execute a sample in Nanoseconds. (Default: 100_000_000)\n\"\"\"\n\nnew val create(\nsamples': USize = 20,\nmax_iterations': U64 = 1_000_000_000,\nmax_sample_time': U64 = 100_000_000)\n=>\nsamples = samples'\nmax_iterations = max_iterations'"} +{"id": "Pony/src-pony_check-generator-_0.txt", "contents": "\n\n\n\n\n\n\ngenerator.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U16-_32.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Array-_43.txt", "contents": "\niter: Iterator[A^] ref\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nfind\u00b6\n[Source]\nFind the nth appearance of value from the beginning of the array,\nstarting at offset and examining higher indices, and using the supplied\npredicate for comparisons. Returns the index of the value, or raise an\nerror if the value isn't present.\nBy default, the search starts at the first element of the array, returns\nthe first instance of value found, and uses object identity for\ncomparison.\nfun box find("} +{"id": "Pony/capsicum-Cap-_6.txt", "contents": "fun box mmap_w()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_x\u00b6\n[Source]\nfun box mmap_x()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_rw\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-list-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-pony_check-property_unit_test-_0.txt", "contents": "\n\n\n\n\n\n\nproperty_unit_test.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-cli-command_spec-_49.txt", "contents": "to yield an arg value like\n`cmd.arg(\"count\").u64() == U64(47)`.\n\"\"\"\n_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_U64Type, default')\n\nnew val f64(name': String,\ndescr': String = \"\",\ndefault': (F64 | None) = None)\n=>\n\"\"\"\nCreates an Arg with a F64 typed value that can be used like\n` 1.039`\nto yield an arg value like\n`cmd.arg(\"ratio\").f64() == F64(1.039)`.\n\"\"\"\n_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_F64Type, default')"} +{"id": "Pony/src-time-time-_12.txt", "contents": "if windows\nuse @QueryPerformanceFrequency[I32](frequency: Pointer[(U32, U32)]) if windows\nuse @QueryPerformanceCounter[I32](count: Pointer[(U32, U32)]) if windows\n\ntype _Clock is (_ClockRealtime | _ClockMonotonic)\n\nprimitive _ClockRealtime\nfun apply(): U32 =>\nifdef linux or bsd then\n0\nelse\ncompile_error \"no clock_gettime realtime clock\"\nend\n\nprimitive _ClockMonotonic\nfun apply(): U32 =>\nifdef linux then\n1\nelseif bsd then\n4"} +{"id": "Pony/3_arithmetic_6.txt", "contents": "```\n\nHere is a full list of all available conversions for numeric types:\n\n---\n\n| Safe conversion | Unsafe conversion |\n| --------------- | ----------------- |\n| `u8()` | `u8_unsafe()` |\n| `u16()` | `u16_unsafe()` |\n| `u32()` | `u32_unsafe()` |\n| `u64()` | `u64_unsafe()` |\n| `u128()` | `u128_unsafe()` |\n| `ulong()` | `ulong_unsafe()` |\n| `usize()` | `usize_unsafe()` |\n| `i8()` | `i8_unsafe()` |\n| `i16()` | `i16_unsafe()` |\n| `i32()` | `i32_unsafe()` |\n| `i64()` | `i64_unsafe()` |\n| `i128()` | `i128_unsafe()` |"} +{"id": "Pony/src-collections-persistent-vec-_25.txt", "contents": "predicate: {(A, A): Bool} val = {(l: A, r: A): Bool => l is r })\n: Bool\n=>\n\"\"\"\nReturns true if the vector contains `value`, false otherwise.\n\"\"\"\nfor v in values() do\nif predicate(v, value) then return true end\nend\nfalse\n\nfun val slice(from: USize = 0, to: USize = -1, step: USize = 1): Vec[A] =>\n\"\"\"\nReturn a vector that is a clone of a portion of this vector. The range is\nexclusive and saturated.\n\"\"\"\nvar vec = Vec[A]\nfor i in mut.Range(0, if _size < to then _size else to end, step) do\ntry vec.push(this(i)?) end\nend"} +{"id": "Pony/src-builtin-pointer-_12.txt", "contents": "compile_intrinsic\n\nfun tag lt(that: Pointer[A] tag): Bool =>\n\"\"\"\nReturn true if this address is less than that address.\n\"\"\"\ncompile_intrinsic\n\nfun tag ne(that: Pointer[A] tag): Bool => not eq(that)\nfun tag le(that: Pointer[A] tag): Bool => lt(that) or eq(that)\nfun tag ge(that: Pointer[A] tag): Bool => not lt(that)\nfun tag gt(that: Pointer[A] tag): Bool => not le(that)\n\nfun tag hash(): USize =>\n\"\"\"\nReturns a hash of the address.\n\"\"\"\nusize().hash()\n\nfun tag hash64(): U64 =>"} +{"id": "Pony/net-OSSockOpt-_32.txt", "contents": "fun box ipproto_irtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_kryptolan\u00b6\n[Source]\nfun box ipproto_kryptolan()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_larp\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/format-FormatDefault-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatDefault val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatDefault val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-String-_29.txt", "contents": "fun box repeat_str(\nnum: USize val = 1,\nsep: String val = \"\")\n: String iso^\n\nParameters\u00b6\n\nnum: USize val = 1\nsep: String val = \"\"\n\nReturns\u00b6\n\nString iso^\n\n\nmul\u00b6\n[Source]\nReturns a copy of the string repeated num times.\nfun box mul(\nnum: USize val)"} +{"id": "Pony/src-files-file_caps-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69use \"collections\"\n\nprimitive FileCreate"} +{"id": "Pony/pony_check-Property1UnitTest-_4.txt", "contents": "h: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nexclusion_group\u00b6\nfun box exclusion_group()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ntimed_out\u00b6\nfun ref timed_out(\nh: TestHelper val)\n: None val"} +{"id": "Pony/builtin-I8-_31.txt", "contents": "I8 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: I8 val)\n: (I8 val , I8 val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , I8 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_44.txt", "contents": "Create a PonyTest object and use it to run the tests from the given\nTestList\n\"\"\"\n_env = env\n_process_opts()\n_groups.push((\"\", _SimultaneousGroup))\n@ponyint_assert_disable_popups()\nlist.tests(this)\n_all_tests_applied()\n\nbe apply(test: UnitTest iso) =>\n\"\"\"\nRun the given test, subject to our filters and options.\n\"\"\"\nif _do_nothing then\nreturn\nend\n\nvar name = test.name()\n"} +{"id": "Pony/src-net-ossockopt-_120.txt", "contents": "fun so_label():I32 => @pony_os_sockopt_option(I32(842))\nfun so_linger():I32 => @pony_os_sockopt_option(I32(843))\nfun so_linger_sec():I32 => @pony_os_sockopt_option(I32(844))\nfun so_linkinfo():I32 => @pony_os_sockopt_option(I32(845))\nfun so_listenincqlen():I32 => @pony_os_sockopt_option(I32(846))\nfun so_listenqlen():I32 => @pony_os_sockopt_option(I32(847))\nfun so_listenqlimit():I32 => @pony_os_sockopt_option(I32(848))\nfun so_lock_filter():I32 => @pony_os_sockopt_option(I32(849))\nfun so_mark():I32 => @pony_os_sockopt_option(I32(850))\nfun so_max_msg_size():I32 => @pony_os_sockopt_option(I32(851))\nfun so_max_pacing_rate():I32 => @pony_os_sockopt_option(I32(852))\nfun so_multipoint():I32 => @pony_os_sockopt_option(I32(853))\nfun so_netsvc_marking_level():I32 => @pony_os_sockopt_option(I32(854))\nfun so_net_service_type():I32 => @pony_os_sockopt_option(I32(855))\nfun so_nke():I32 => @pony_os_sockopt_option(I32(856))\nfun so_noaddrerr():I32 => @pony_os_sockopt_option(I32(857))\nfun so_nofcs():I32 => @pony_os_sockopt_option(I32(858))\nfun so_nosigpipe():I32 => @pony_os_sockopt_option(I32(859))\nfun so_notifyconflict():I32 => @pony_os_sockopt_option(I32(860))\nfun so_no_check():I32 => @pony_os_sockopt_option(I32(861))"} +{"id": "Pony/builtin-FloatingPoint-_65.txt", "contents": "I64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-builtin-real-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-FloatingPoint-_57.txt", "contents": "I64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Property3UnitTest-_5.txt", "contents": "h: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nlabel\u00b6\nfun box label()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/src-builtin-seq-_5.txt", "contents": "Reserve space for len elements.\n\"\"\"\n\nfun size(): USize\n\"\"\"\nReturns the number of elements in the sequence.\n\"\"\"\n\nfun apply(i: USize): this->A ?\n\"\"\"\nReturns the i-th element of the sequence. Raises an error if the index\nis out of bounds.\n\"\"\"\n\nfun ref update(i: USize, value: A): A^ ?\n\"\"\"\nReplaces the i-th element of the sequence. Returns the previous value.\nRaises an error if the index is out of bounds.\n\"\"\"\n"} +{"id": "Pony/builtin-I64-_24.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val ?\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-Directory-_16.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nrename\u00b6\n[Source]\nRename source (which is relative to this directory) to target (which is\nrelative to the to directory).\nfun box rename(\nsource: String val,\nto: Directory box,\ntarget: String val)\n: Bool val\n\nParameters\u00b6\n\nsource: String val\nto: Directory box\ntarget: String val"} +{"id": "Pony/net-OSSockOpt-_170.txt", "contents": "fun box ipv6_tlv_pad1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tlv_padn\u00b6\n[Source]\nfun box ipv6_tlv_padn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tlv_routeralert\u00b6\n[Source]"} +{"id": "Pony/src-builtin-std_stream-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108use @pony_os_stdout[Pointer[U8]]()\nuse @pony_os_stderr[Pointer[U8]]()\nuse @pony_os_std_flush[None](file: Pointer[None] tag)\nuse @pony_os_std_print[None](file: Pointer[None] tag, buffer: Pointer[U8] tag,"} +{"id": "Pony/builtin-ULong-_21.txt", "contents": "ULong val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nfldc\u00b6\n[Source]"} +{"id": "Pony/net--index-_1.txt", "contents": "primitive TCPAuth\nprimitive TCPConnectAuth\nactor TCPConnection\ninterface TCPConnectionNotify\nprimitive TCPListenAuth\ninterface TCPListenNotify\nactor TCPListener\nprimitive UDPAuth\ninterface UDPNotify\nactor UDPSocket\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-path-_40.txt", "contents": "\nif to_vol != target_vol then\nerror\nend\n\nto_i = to_vol.size().isize()\nend\n\nvar to_0 = to_i\nvar target_i = to_i\nvar target_0 = target_i\n\nwhile true do\nto_i = try\nto_clean.find(sep(), to_i)?\nelse\nto_clean.size().isize()\nend\n\ntarget_i = try"} +{"id": "Pony/collections-BinaryHeap-_1.txt", "contents": "\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nBinaryHeap[A, P] ref^\n\n\nPublic Functions\u00b6\nclear\u00b6\n[Source]\nRemove all elements from the heap.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/net-OSSockOpt-_73.txt", "contents": "fun box sol_tipc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_udp\u00b6\n[Source]\nfun box sol_udp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\naf_coip\u00b6\n[Source]"} +{"id": "Pony/reference-capabilities_1.txt", "contents": "# Rights are part of a capability\n\nIf you open a file in UNIX and get a file descriptor back, that file descriptor is a token that designates an object - but it isn't a capability. To be a capability, we need to open that file with some permission - some access right. For example:\n\n```C\nint fd = open(\"/etc/passwd\", O_RDWR);\n```\n\nNow we have a token and a set of rights.\n\nIn Pony, every reference has both a type and a reference capability. In fact, the reference capability is _part_ of its type. These allow you to specify which of your objects can be shared with other actors and allow the compiler to check that what you're doing is concurrency safe.\n"} +{"id": "Pony/builtin-ILong-_48.txt", "contents": "\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-list-_47.txt", "contents": "\"\"\"\nmatch l\n| let cons: Cons[A] =>\n_map[B](cons.tail(), f, acc.prepend(f(cons.head())))\nelse\nacc.reverse()\nend\n\nfun val flat_map[B](f: {(val->A): List[B]} box): List[B] =>\n\"\"\"\nBuilds a new list by applying a function to every member of the list and\nusing the elements of the resulting lists.\n\"\"\"\n_flat_map[B](this, f, Nil[B])\n\nfun _flat_map[B](l: List[A], f: {(val->A): List[B]} box, acc: List[B]):\nList[B] =>\n\"\"\"\nPrivate helper for flat_map, recursively working on elements.\n\"\"\""} +{"id": "Pony/src-promises-promise-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-builtin-string-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-StdStream-_3.txt", "contents": "Flush any data out to the os (ignoring failures).\nbe flush()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-array-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-U128-_4.txt", "contents": "\nU128 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/signals-Sig-_2.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nquit\u00b6\n[Source]\nfun box quit()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nill\u00b6\n[Source]\nfun box ill()\n: U32 val\n"} +{"id": "Pony/src-pony_check-generator-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/builtin-Array-_27.txt", "contents": "\n\ntrim\u00b6\n[Source]\nReturn a shared portion of this array, covering from until to.\nBoth the original and the new array are immutable, as they share memory.\nThe operation does not allocate a new array pointer nor copy elements.\nfun val trim(\nfrom: USize val = 0,\nto: USize val = call)\n: Array[A] val\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\n\nReturns\u00b6\n\nArray[A] val"} +{"id": "Pony/src-collections-list-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/cli-CommandSpec-_4.txt", "contents": "\nReturns\u00b6\n\nNone val ?\n\n\nadd_help\u00b6\n[Source]\nAdds a standard help option and, optionally command, to a root command.\nfun ref add_help(\nhname: String val = \"help\",\ndescr': String val = \"\")\n: None val ?\n\nParameters\u00b6\n\nhname: String val = \"help\"\ndescr': String val = \"\"\n\nReturns\u00b6"} +{"id": "Pony/src-net-udp_socket-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/6_errors_3.txt", "contents": "# Partial functions\n\nPony does not require that all errors are handled immediately as in our previous examples. Instead, functions can raise errors that are handled by whatever code calls them. These are called partial functions (this is a mathematical term meaning a function that does not have a defined result for all possible inputs, i.e. arguments). Partial functions __must__ be marked as such in Pony with a `?`, both in the function signature (after the return type) and at the call site (after the closing parentheses).\n\nFor example, a somewhat contrived version of the factorial function that accepts a signed integer will error if given a negative input. It's only partially defined over its valid input type.\n\n```pony\nfun factorial(x: I32): I32 ? =>\nif x < 0 then error end\nif x == 0 then\n1\nelse\nx * factorial(x - 1)?\nend\n```\n\nEverywhere that an error can be generated in Pony (an error command, a call to a partial function, or certain built-in language constructs) must appear within a `try` block or a function that is marked as partial. This is checked at compile time, ensuring that an error cannot escape handling and crash the program.\n\nPrior to Pony 0.16.0, call sites of partial functions were not required to be marked with a `?`. This often led to confusion about the possibilities for control flow when reading code. Having every partial function call site clearly marked makes it very easy for the reader to immediately understand everywhere that a block of code may jump away to the nearest error handler, making the possible control flow paths more obvious and explicit.\n"} +{"id": "Pony/src-net-tcp_connection-_81.txt", "contents": "fun ref connect_failed(conn: TCPConnection ref) => None\n```\n\n\"\"\"\nvar _listen: (TCPListener | None) = None\nvar _notify: TCPConnectionNotify\nvar _connect_count: U32\nvar _fd: U32 = -1\nvar _event: AsioEventID = AsioEvent.none()\nvar _connected: Bool = false\nvar _readable: Bool = false\nvar _reading: Bool = false\nvar _writeable: Bool = false\nvar _throttled: Bool = false\nvar _closed: Bool = false\nvar _shutdown: Bool = false\nvar _shutdown_peer: Bool = false\nvar _in_sent: Bool = false\nembed _pending_writev_posix: Array[(Pointer[U8] tag, USize)] = _pending_writev_posix.create()\nembed _pending_writev_windows: Array[(USize, Pointer[U8] tag)] = _pending_writev_windows.create()"} +{"id": "Pony/serialisation_13.txt", "contents": "include "} +{"id": "Pony/src-term-readline-_29.txt", "contents": "fun ref home(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nBeginning of the line.\n\"\"\"\n_cur_pos = 0\n_refresh_line()\n\nfun ref end_key(\nctrl: Bool = false,\nalt: Bool = false,\nshift: Bool = false)\n=>\n\"\"\"\nEnd of the line.\n\"\"\"\n_cur_pos = _edit.size().isize()\n_refresh_line()\n\nfun ref _backspace() =>\n\"\"\""} +{"id": "Pony/src-buffered-reader-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-encode-base64-base64-_15.txt", "contents": "try\nwhile srclen >= 3 do\nlet in1 = data(i)?\nlet in2 = data(i + 1)?\nlet in3 = data(i + 2)?\n\nlet out1 = in1 >> 2\nlet out2 = ((in1 and 0x03) << 4) + (in2 >> 4)\nlet out3 = ((in2 and 0x0f) << 2) + (in3 >> 6)\nlet out4 = in3 and 0x3f\n\nout.push(_enc_byte(out1, at62, at63)?)\nout.push(_enc_byte(out2, at62, at63)?)\nout.push(_enc_byte(out3, at62, at63)?)\nout.push(_enc_byte(out4, at62, at63)?)\n\ni = i + 3\nblocks = blocks + 1\nsrclen = srclen - 3\n"} +{"id": "Pony/capsicum-Cap-_33.txt", "contents": "fun box sem_wait()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nevent\u00b6\n[Source]\nfun box event()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nkqueue_event\u00b6\n[Source]"} +{"id": "Pony/src-builtin-asio_event-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-property_runner-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-itertools-iter-_73.txt", "contents": "_store.push(_iter.next()?)\nreturn _store(_store.size() - 1)?\nend\n\n_first_time_through = false\nend\n\nif not _store_iter.has_next() then\n_store_iter.rewind()\nend\n\n_store_iter.next()?\nend)\n\nfun ref dedup[H: HashFunction[A] val = HashIs[A]](): Iter[A!]^ =>\n\"\"\"\nReturn an iterator that removes duplicates from consecutive identical\nelements. Equality is determined by the HashFunction `H`.\n"} +{"id": "Pony/random-MT-_4.txt", "contents": "fun ref u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\nfun ref u128()\n: U128 val"} +{"id": "Pony/builtin-U64-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_43.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: ILong val)\n: Bool val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list_node-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/pony_check-Randomness-_8.txt", "contents": "fun ref usize(\nmin: USize val = call,\nmax: USize val = call)\n: USize val\n\nParameters\u00b6\n\nmin: USize val = call\nmax: USize val = call\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nGenerate a I8 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/4_control-structures_6.txt", "contents": "else\nfalse\nend\n```\n\n__But what if my if doesn't have an else?__ Any `else` branch that doesn't exist gives an implicit `None`.\n\n```pony\nvar x: (String | None) =\nif friendly then\n\"Hello\"\nend\n```\n\nThe same rules that apply to the value of an `if` expression applies to loops as well. Let's take a look at what a loop value would look like:\n\n```pony\nactor Main\nnew create(env: Env) =>\nvar x: (String | None) ="} +{"id": "Pony/src-collections-persistent-vec-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-SignedInteger-_58.txt", "contents": "ISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/term-ANSI-_16.txt", "contents": "\nString val\n\n\nbright_green\u00b6\n[Source]\nBright green text.\nfun box bright_green()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_yellow\u00b6\n[Source]\nBright yellow text.\nfun box bright_yellow()\n: String val"} +{"id": "Pony/net-OSSockOpt-_271.txt", "contents": "fun box netlink_add_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_audit\u00b6\n[Source]\nfun box netlink_audit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_broadcast_error\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_7.txt", "contents": "\nReturns\u00b6\n\nU32 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbitwidth\u00b6\n[Source]"} +{"id": "Pony/src-files-file_info-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-U16-_0.txt", "contents": "\n\n\n\n\n\n\nU16\u00b6\n[Source]\nprimitive val U16 is\nUnsignedInteger[U16 val] val\n\nImplements\u00b6\n\nUnsignedInteger[U16 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-files-file-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/term--index-_0.txt", "contents": "\n\n\n\n\n\n\nTerm package\u00b6\nThe Term package provides support for building text-based user interfaces in ANSI terminals.\nPublic Types\u00b6\n\nprimitive ANSI\ninterface ANSINotify\nactor ANSITerm\nprimitive EraseLeft\nprimitive EraseLine\nprimitive EraseRight\nclass Readline\ninterface ReadlineNotify\n"} +{"id": "Pony/src-net-ossockopt-_115.txt", "contents": "fun sctp_pr_assoc_status():I32 => @pony_os_sockopt_option(I32(742))\nfun sctp_pr_stream_status():I32 => @pony_os_sockopt_option(I32(743))\nfun sctp_pr_supported():I32 => @pony_os_sockopt_option(I32(744))\nfun sctp_reconfig_supported():I32 => @pony_os_sockopt_option(I32(745))\nfun sctp_recvnxtinfo():I32 => @pony_os_sockopt_option(I32(746))\nfun sctp_recvrcvinfo():I32 => @pony_os_sockopt_option(I32(747))\nfun sctp_recv_rwnd_logging_enable():I32 => @pony_os_sockopt_option(I32(748))\nfun sctp_remote_udp_encaps_port():I32 => @pony_os_sockopt_option(I32(749))\nfun sctp_reset_assoc():I32 => @pony_os_sockopt_option(I32(750))\nfun sctp_reset_streams():I32 => @pony_os_sockopt_option(I32(751))\nfun sctp_reuse_port():I32 => @pony_os_sockopt_option(I32(752))\nfun sctp_rtoinfo():I32 => @pony_os_sockopt_option(I32(753))\nfun sctp_rttvar_logging_enable():I32 => @pony_os_sockopt_option(I32(754))\nfun sctp_sack_cmt_dac():I32 => @pony_os_sockopt_option(I32(755))\nfun sctp_sack_logging_enable():I32 => @pony_os_sockopt_option(I32(756))\nfun sctp_sack_nonce_sum():I32 => @pony_os_sockopt_option(I32(757))\nfun sctp_sack_rwnd_logging_enable():I32 => @pony_os_sockopt_option(I32(758))\nfun sctp_sat_network_burst_incr():I32 => @pony_os_sockopt_option(I32(759))\nfun sctp_sat_network_min():I32 => @pony_os_sockopt_option(I32(760))\nfun sctp_sb_logging_enable():I32 => @pony_os_sockopt_option(I32(761))"} +{"id": "Pony/builtin-U8-_25.txt", "contents": "(U8 val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nmod_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_41.txt", "contents": "\nfun u128_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun ulong_unsafe(): ULong =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun usize_unsafe(): USize =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\""} +{"id": "Pony/src-net-tcp_connection-_84.txt", "contents": "end\n(let host', let service') = _notify.proxy_via(host, service)\n_connect_count =\n@pony_os_connect_tcp(this, host'.cstring(), service'.cstring(),\nfrom.cstring(), asio_flags)\n_notify_connecting()\n\nnew ip4(\nauth: TCPConnectAuth,\nnotify: TCPConnectionNotify iso,\nhost: String,\nservice: String,\nfrom: String = \"\",\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\"\nConnect via IPv4.\n\"\"\""} +{"id": "Pony/examples_1.txt", "contents": "# Enumeration with values\n\n```pony\nprimitive Black fun apply(): U32 => 0xFF000000\nprimitive Red fun apply(): U32 => 0xFFFF0000\n```\n"} +{"id": "Pony/builtin-U32-_45.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: U32 val)\n: Bool val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/4_traits-and-interfaces_3.txt", "contents": "primitive ExecveError\nfun string(): String iso^ => \"ExecveError\".clone()\n```\n"} +{"id": "Pony/src-net-tcp_connection-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/term-EraseLine-_0.txt", "contents": "\n\n\n\n\n\n\nEraseLine\u00b6\n[Source]\nprimitive val EraseLine\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: EraseLine val^\n\nReturns\u00b6\n\nEraseLine val^"} +{"id": "Pony/src-pony_test-test_helper-_31.txt", "contents": "\"\"\"\nCheck that the 2 given expressions are equal.\n\"\"\"\nif expect != actual then\nfail(_format_loc(loc) + \"Assert \" + check + \" failed. \" + msg\n+ \" Expected (\" + expect.string() + \") == (\" + actual.string() + \")\")\nreturn false\nend\n\nlog(_format_loc(loc) + \"Assert \" + check + \" passed. \" + msg\n+ \" Got (\" + expect.string() + \") == (\" + actual.string() + \")\", true)\ntrue\n\nfun assert_isnt[A](\nnot_expect: A,\nactual: A,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>"} +{"id": "Pony/src-itertools-iter-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-net-ossockopt-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/net-TCPConnection-_31.txt", "contents": "U32 val\n\n\nsetsockopt_u32\u00b6\n[Source]\nGeneral wrapper for TCP sockets to the setsockopt(2) system call where\nthe kernel expects an option value of a C uint32_t type / Pony\ntype U32.\nThis function returns 0 on success, else the value of errno on\nfailure.\nfun ref setsockopt_u32(\nlevel: I32 val,\noption_name: I32 val,\noption: U32 val)\n: U32 val\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val"} +{"id": "Pony/src-term-ansi_term-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-U8-_2.txt", "contents": "F64 val) & Real[B] val)](\na: B)\n: U8 val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nU8 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: U8 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-auth-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23primitive NetAuth\nnew create(from: AmbientAuth) =>\nNone\n\nprimitive DNSAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone\n\nprimitive UDPAuth"} +{"id": "Pony/net-OSSockOpt-_174.txt", "contents": "fun box ipv6_xfrm_policy()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_address\u00b6\n[Source]\nfun box ipx_address()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_address_notify\u00b6\n[Source]"} +{"id": "Pony/1_variables_10.txt", "contents": "# Embedded Fields\n\nUnlike local variables, some types of fields can be declared using `embed`. Specifically, only classes or structs can be embedded - interfaces, traits, primitives and numeric types cannot. A field declared using `embed` is similar to one declared using `let`, but at the implementation level, the memory for the embedded class is laid out directly within the outer class. Contrast this with `let` or `var`, where the implementation uses pointers to reference the field class. Embedded fields can be passed to other functions in exactly the same way as `let` or `var` fields. Embedded fields must be initialised from a constructor expression.\n\n__Why would I use `embed`?__ `embed` avoids a pointer indirection when accessing a field and a separate memory allocation when creating that field. By default, it is advised to use `embed` if possible. However, since an embedded field is allocated alongside its parent object, exterior references to the field forbids garbage collection of the parent, which can result in higher memory usage if a field outlives its parent. Use `let` if this is a concern for you.\n"} +{"id": "Pony/builtin-I32-_61.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_33.txt", "contents": "| 24 => _fn_key(12)\n| 25 => _fn_key(13)\n| 26 => _fn_key(14)\n| 28 => _fn_key(15)\n| 29 => _fn_key(16)\n| 31 => _fn_key(17)\n| 32 => _fn_key(18)\n| 33 => _fn_key(19)\n| 34 => _fn_key(20)\nend\n\nfun ref _up() =>\n\"\"\"\nUp arrow.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.up(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _down() =>"} +{"id": "Pony/recursion_0.txt", "contents": "# Recursion\n\nRecursive functions in Pony can cause many problems. Every function call in a program adds a frame on the system call stack, which is bounded. If the stack grows too big it will overflow, usually crashing the program. This is an out-of-memory type of error and it cannot be prevented by the guarantees offered by Pony.\n\nIf you have a heavy recursive algorithm, you must take some precautions in your code to avoid stack overflows. Most recursive functions can be easily transformed into tail-recursive function which are less problematic. A tail-recursive function is a function in which the recursive call is the last instruction of the function. Here is an example with a factorial function:\n\n```pony\nfun recursive_factorial(x: U32): U32 =>\nif x == 0 then\n1\nelse\nx * recursive_factorial(x - 1)\nend\n\nfun tail_recursive_factorial(x: U32, y: U32): U32 =>\nif x == 0 then\ny\nelse\ntail_recursive_factorial(x - 1, x * y)\nend"} +{"id": "Pony/pony_check-PropertyRunner-_4.txt", "contents": "\nParameters\u00b6\n\nfailed_repr: String val\n\n\nexpect_action\u00b6\n[Source]\nbe expect_action(\nname: String val,\nround: (_Shrink val | _Run val))\n\nParameters\u00b6\n\nname: String val\nround: (_Shrink val | _Run val)\n\n\ncomplete_action\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_13.txt", "contents": "fun box mulc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-math-least_common_multiple-_0.txt", "contents": "\n\n\n\n\n\n\nleast_common_multiple.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/time-Timer-_1.txt", "contents": "let timers = Timers\nlet timer = Timer(Notify(env), 5_000_000_000, 2_000_000_000)\ntimers(consume timer)\n\nclass Notify is TimerNotify\nlet _env: Env\nvar _counter: U32 = 0\n\nnew iso create(env: Env) =>\n_env = env\n\nfun ref apply(timer: Timer, count: U64): Bool =>\n_env.out.print(_counter.string())\n_counter = _counter + 1\ntrue\n\nclass ref Timer\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/1_variables_1.txt", "contents": "# Local variables\n\nLocal variables in Pony work very much as they do in other languages, allowing you to store temporary values while you perform calculations. Local variables live within a chunk of code (they are _local_ to that chunk) and are created every time that code chunk executes and disposed of when it completes.\n\nTo define a local variable the `var` keyword is used (`let` can also be used, but we'll get to that later). Right after the `var` comes the variable's name, and then you can (optionally) put a `:` followed by the variable's type. For example:\n\n```pony\nvar x: String = \"Hello\"\n```\n\nHere, we're assigning the __string literal__ `\"Hello\"` to `x`.\n\nYou don't have to give a value to the variable when you define it: you can assign one later if you prefer. If you try to read the value from a variable before you've assigned one, the compiler will complain instead of allowing the dreaded _uninitialised variable_ bug.\n\nEvery variable has a type, but you don't have to specify it in the declaration if you provide an initial value. The compiler will automatically use the type of the initial value of the variable.\n\nThe following definitions of `x`, `y` and `z` are all effectively identical.\n\n```pony\nvar x: String = \"Hello\""} +{"id": "Pony/collections-List-_5.txt", "contents": "let filtered_list = new_list.filter({ (n) => n.string().contains(\"d BOOM!\") })\nenv.out.print(\"Filtering our three-node list produces a new list of size: \"\n+ filtered_list.size().string()) // 2\nfor n in filtered_list.values() do\nenv.out.print(\"\\t\" + n.string()) // Second BOOM!\\nThird BOOM!\nend\n\n// Partition the filtered list\nlet partitioned_lists = filtered_list.partition({ (n) => n.string().contains(\"Second\") })\nenv.out.print(\"The size of our first partitioned list (matches predicate): \" + partitioned_lists._1.size().string()) // 1\nenv.out.print(\"The size of our second partitioned list (doesn't match predicate): \" + partitioned_lists._2.size().string()) // 1\nenv.out.print(\"Our matching partition elements are:\")\nfor n in partitioned_lists._1.values() do\nenv.out.print(\"\\t\" + n.string()) // Second BOOM!\nend\n\nclass ref List[A: A] is\nSeq[A] ref\n\nImplements\u00b6"} +{"id": "Pony/net-OSSockOpt-_55.txt", "contents": "fun box ipproto_spacer()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_srpc\u00b6\n[Source]\nfun box ipproto_srpc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_st\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_354.txt", "contents": "fun box sctp_cc_option()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_opt_rtcc_setmode\u00b6\n[Source]\nfun box sctp_cc_opt_rtcc_setmode()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_opt_steady_step\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_47.txt", "contents": "Returns\u00b6\n\nString iso^\n\n\nadd\u00b6\nfun box add(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nsub\u00b6"} +{"id": "Pony/src-builtin-real-_46.txt", "contents": "\nfun hash64(): U64 =>\nvar x = u64()\n\nx = (not x) + (x << 21)\nx = x xor (x >> 24)\nx = (x + (x << 3)) + (x << 8)\nx = x xor (x >> 14)\nx = (x + (x << 2)) + (x << 4)\nx = x xor (x >> 28)\nx = x + (x << 31)\n\nx\n\nfun _value(): A => compile_intrinsic\n\ntrait val Integer[A: Integer[A] val] is Real[A]\nfun add_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation."} +{"id": "Pony/src-net-tcp_listener-_26.txt", "contents": "if _closed then\nreturn\nend\n\n_closed = true\n\nif not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\n\n@pony_os_socket_close(_fd)\n_fd = -1\n\n_notify.closed(this)\nend\n\n\n\n\n\n"} +{"id": "Pony/src-net-udp_notify-_4.txt", "contents": "\"\"\"\nCalled when new data is received on the socket.\n\"\"\"\nNone\n\nfun ref closed(sock: UDPSocket ref) =>\n\"\"\"\nCalled when the socket is closed.\n\"\"\"\nNone\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-ListNode-_5.txt", "contents": "Returns\u00b6\n\nA^ ?\n\n\npop\u00b6\n[Source]\nRemove the item from the node, if we have one, otherwise raise an error.\nfun ref pop()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nprepend\u00b6\n[Source]\nPrepend a node to this one. If that is already in a list, it is removed\nbefore it is prepended. Returns true if that was removed from another"} +{"id": "Pony/builtin-F64-_55.txt", "contents": "\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\nfun box gt(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-builtin-string-_126.txt", "contents": "\nif (i + s.size()) <= _size then\n@memcmp(_ptr._offset(i), s._ptr, s._size) == 0\nelse\nfalse\nend\n\nfun ref delete(offset: ISize, len: USize = 1) =>\n\"\"\"\nDelete len bytes at the supplied offset, compacting the string in place.\n\"\"\"\nlet i = offset_to_index(offset)\n\nif i < _size then\nlet n = len.min(_size - i)\n_size = _size - n\n_ptr._offset(i)._delete(n, _size - i)\n_set(_size, 0)\nend\n"} +{"id": "Pony/collections-persistent-VecPairs-_1.txt", "contents": "v: Vec[A] val\n\nReturns\u00b6\n\nVecPairs[A] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/src-encode-base64-base64-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-F64-_57.txt", "contents": "i32\u00b6\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nilong\u00b6\nfun box ilong()"} +{"id": "Pony/serialise-DeserialiseAuth-_0.txt", "contents": "\n\n\n\n\n\n\nDeserialiseAuth\u00b6\n[Source]\nThis is a capability token that allows the holder to deserialise objects. It\ndoes not allow the holder to serialise objects or examine serialised data.\nprimitive val DeserialiseAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nauth: AmbientAuth val)\n: DeserialiseAuth val^\n"} +{"id": "Pony/src-files-file-_51.txt", "contents": "\nfun ref _pending_writes(): Bool =>\n\"\"\"\nWrite pending data.\nReturns false if the file wasn't opened with write permission.\nReturns false and closes the file and discards all pending data\nif not all the bytes were written.\nReturns true if it sent all pending data.\n\"\"\"\ntry\n(let result, let num_written, let new_pending_total) =\n_write_to_disk()?\n_pending_writev_total = new_pending_total\nif _pending_writev_total == 0 then\n_pending_writev.clear()\n_unsynced_data = true\n_unsynced_metadata = true\nelse\nif num_written > 0 then\n_unsynced_data = true"} +{"id": "Pony/builtin-ISize-_15.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: ISize val)\n: (ISize val , Bool val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/6_errors_10.txt", "contents": "# Comparison to exceptions in other languages\n\nPony errors behave very much the same as those in C++, Java, C#, Python, and Ruby. The key difference is that Pony errors do not have a type or instance associated with them. This makes them the same as C++ exceptions would be if a fixed literal was always thrown, e.g. `throw 3;`. This difference simplifies error handling for the programmer and allows for much better runtime error handling performance.\n\nThe `else` handler in a `try` expression is just like a `catch(...)` in C++, `catch(Exception e)` in Java or C#, `except:` in Python, or `rescue` in Ruby. Since exceptions do not have types there is no need for handlers to specify types or to have multiple handlers in a single try block.\n\nThe `then` block in a `try` expression is just like a `finally` in Java, C#, or Python and `ensure` in Ruby.\n\nIf required, error handlers can \"reraise\" by using the `error` command within the handler.\n"} +{"id": "Pony/src-builtin-seq-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81interface Seq[A]\n\"\"\"\nA sequence of elements.\n\"\"\"\nnew create(len: USize = 0)\n\"\"\"\nCreate a sequence, reserving space for len elements.\n\"\"\"\n\nfun ref reserve(len: USize)\n\"\"\""} +{"id": "Pony/src-builtin-string-_90.txt", "contents": "let first_w = str_new.find(\"w\") ?\n// find first occurrence of letter \"d\"\nlet first_d = str_new.find(\"d\") ?\n\n// get substring capturing \"world\"\nlet substr = str_new.substring(first_w, first_d+1)\n// clone substring\nlet substr_clone = substr.clone()\n\n// print our substr\nenv.out.print(consume substr)\nend\n```\n\"\"\"\nvar _size: USize\nvar _alloc: USize\nvar _ptr: Pointer[U8]\n\nnew create(len: USize = 0) =>\n\"\"\""} +{"id": "Pony/src-net-tcp_connection_notify-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-I16-_15.txt", "contents": "fun box mulc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_358.txt", "contents": "fun box sctp_cmt_base()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_max\u00b6\n[Source]\nfun box sctp_cmt_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_mptcp\u00b6\n[Source]"} +{"id": "Pony/src-collections-map-_40.txt", "contents": "\nfun _search(key: box->K!): (USize, Bool) =>\n\"\"\"\nReturn a slot number and whether or not it's currently occupied.\n\"\"\"\nvar idx_del = _array.size()\nlet mask = idx_del - 1\nlet h = H.hash(key).usize()\nvar idx = h and mask\n\ntry\nfor i in Range(0, _array.size()) do\nlet entry = _array(idx)?\n\nmatch entry\n| (let k: this->K!, _) =>\nif H.eq(k, key) then\nreturn (idx, true)\nend\n| _MapEmpty =>"} +{"id": "Pony/src-files-directory-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542use \"time\"\n\nuse @ponyint_o_rdonly[I32]()\nuse @ponyint_o_rdwr[I32]()\nuse @ponyint_o_creat[I32]()\nuse @ponyint_o_trunc[I32]()\nuse @ponyint_o_directory[I32]()\nuse @ponyint_o_cloexec[I32]()\nuse @ponyint_at_removedir[I32]()\nuse @openat[I32](fd: I32, path: Pointer[U8] tag, flags: I32, ...)"} +{"id": "Pony/collections-Flags-_7.txt", "contents": "Returns\u00b6\n\nNone val\n\n\nunion\u00b6\n[Source]\nThe union of this and that.\nfun ref union(\nthat: Flags[A, B] box)\n: None val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/src-cli-command_spec-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/collections-Flags-_9.txt", "contents": "fun ref difference(\nthat: Flags[A, B] box)\n: None val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nNone val\n\n\nremove\u00b6\n[Source]\nUnset flags that are set in that.\nfun ref remove(\nthat: Flags[A, B] box)\n: None val\n"} +{"id": "Pony/net-TCPConnection-_7.txt", "contents": "recover ThrowItAway end, \"\", \"7669\")\n\nIn general, unless you have a very specific use case, we strongly advise that\nyou don't implement a load shedding scheme where you drop data.\nRead\u00b6\nIf your application is unable to keep up with data being sent to it over\na TCPConnection you can use the builtin read backpressure support to\npause reading the socket which will in turn start to exert backpressure on\nthe corresponding writer on the other end of that socket.\nThe mute behavior allow any other actors in your application to request\nthe cessation of additional reads until such time as unmute is called.\nPlease note that this cessation is not guaranteed to happen immediately as\nit is the result of an asynchronous behavior call and as such will have to\nwait for existing messages in the TCPConnection's mailbox to be handled.\nOn non-windows platforms, your TCPConnection will not notice if the\nother end of the connection closes until you unmute it. Unix type systems\nlike FreeBSD, Linux and OSX learn about a closed connection upon read. On\nthese platforms, you must call unmute on a muted connection to have\nit close. Without calling unmute the TCPConnection actor will never\nexit."} +{"id": "Pony/builtin-String-_58.txt", "contents": ": None val\n\nParameters\u00b6\n\ns: String box = \"\n\"\n\nReturns\u00b6\n\nNone val\n\n\nlstrip\u00b6\n[Source]\nRemove all leading characters within the string that are in s. By default,\nleading whitespace is removed.\nfun ref lstrip(\ns: String box = \"\n\")\n: None val"} +{"id": "Pony/src-ini-ini-_9.txt", "contents": " Example code\n```pony\n// Parses the file 'example.ini' in the current working directory\n// Output all the content\nuse \"ini\"\nuse \"files\"\n\nactor Main\nnew create(env:Env) =>\ntry\nlet ini_file = File(FilePath(FileAuth(env.root), \"example.ini\"))\nlet sections = IniParse(ini_file.lines())?\nfor section in sections.keys() do\nenv.out.print(\"Section name is: \" + section)\nfor key in sections(section)?.keys() do\nenv.out.print(key + \" = \" + sections(section)?(key)?)\nend\nend\nend\n```"} +{"id": "Pony/src-builtin-real-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/builtin-ILong-_33.txt", "contents": "[Source]\nfun box neg_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-Randomness-_6.txt", "contents": "fun ref u128(\nmin: U128 val = call,\nmax: U128 val = call)\n: U128 val\n\nParameters\u00b6\n\nmin: U128 val = call\nmax: U128 val = call\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nGenerate a ULong in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/src-collections-map-_25.txt", "contents": "\nclass HashMap[K, V, H: HashFunction[K] val]\n\"\"\"\nA quadratic probing hash map. Resize occurs at a load factor of 0.75. A\nresized map has 2 times the space. The hash function can be plugged in to the\ntype to create different kinds of maps.\n\"\"\"\nvar _size: USize = 0\nvar _array: Array[((K, V) | _MapEmpty | _MapDeleted)]\n\nnew create(prealloc: USize = 6) =>\n\"\"\"\nCreate an array with space for prealloc elements without triggering a\nresize. Defaults to 6.\n\"\"\"\nlet len = (prealloc * 4) / 3\nlet n = len.max(8).next_pow2()\n_array = _array.init(_MapEmpty, n)\n\nfun size(): USize =>"} +{"id": "Pony/src-collections-persistent-set-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-files-directory-_51.txt", "contents": "let fi = FileInfo(path')?\n\nif fi.directory and not fi.symlink then\nlet directory = open(target)?\n\nfor entry in directory.entries()?.values() do\nif not directory.remove(entry) then\nreturn false\nend\nend\n\n0 == @unlinkat(_fd, target.cstring(), @ponyint_at_removedir())\nelse\n0 == @unlinkat(_fd, target.cstring(), 0)\nend\nelse\npath'.remove()\nend\nelse\nfalse"} +{"id": "Pony/net-OSSockOpt-_588.txt", "contents": "fun box tcp_repair_options()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_repair_queue\u00b6\n[Source]\nfun box tcp_repair_queue()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_rxt_conndroptime\u00b6\n[Source]"} +{"id": "Pony/src-files-file_lines-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-files-file-_58.txt", "contents": "_seek(-offset.i64(), 2)\nend\n\nfun ref seek(offset: ISize) =>\n\"\"\"\nMove the cursor position.\n\"\"\"\nif path.caps(FileSeek) then\n_seek(offset.i64(), 1)\nend\n\nfun ref sync() =>\n\"\"\"\nSync the file contents to physical storage.\n\"\"\"\nif path.caps(FileSync) and (_fd != -1) then\nifdef windows then\nlet r = @FlushFileBuffers(@_get_osfhandle(_fd))\nif r == true then\n_errno = FileError"} +{"id": "Pony/pony_check-ASCIINUL-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIINUL val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_8.txt", "contents": "fun box ipproto_blt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_brsatmon\u00b6\n[Source]\nfun box ipproto_brsatmon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_carp\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Cons-_3.txt", "contents": "\nval->A ?\n\n\nvalues\u00b6\n[Source]\nReturns an iterator over the elements of the list.\nfun box values()\n: Iterator[val->A] ref^\n\nReturns\u00b6\n\nIterator[val->A] ref^\n\n\nis_empty\u00b6\n[Source]\nReturns a Bool indicating if the list is empty.\nfun box is_empty()\n: Bool val"} +{"id": "Pony/format-FormatExp-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatExp val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatExp val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/net-TCPListener-_7.txt", "contents": "[Source]\nChange the notifier.\nbe set_notify(\nnotify: TCPListenNotify iso)\n\nParameters\u00b6\n\nnotify: TCPListenNotify iso\n\n\ndispose\u00b6\n[Source]\nStop listening.\nbe dispose()\n\n\nPublic Functions\u00b6\nlocal_address\u00b6\n[Source]\nReturn the bound IP address."} +{"id": "Pony/bureaucracy-Custodian-_1.txt", "contents": "\nactor Actor2\nbe dispose() => None // dispose of resources here.\n\nactor Actor3\nbe dispose() => None // dispose of resources here.\n\nactor Main\nnew create(env: Env) =>\nlet actor1 = Actor1\nlet actor2 = Actor2\nlet actor3 = Actor3\n\nlet custodian = Custodian\ncustodian(actor1)\ncustodian(actor2)\ncustodian(actor3)\n\nSignalHandler(TermHandler(custodian), Sig.term())\n"} +{"id": "Pony/src-collections-list-_84.txt", "contents": "those that do not.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\n(let lt_b, let gt_b) = my_list.partition( {(s: String): Bool => s < \"b\"} ) // lt_b is [\"a\"], while gt_b is [\"b\"; \"c\"]\n```\n\"\"\"\nlet l1 = List[this->A!]\nlet l2 = List[this->A!]\nfor item in values() do\nif f(item) then l1.push(item) else l2.push(item) end\nend\n(l1, l2)\n\nfun drop(n: USize): List[this->A!]^ =>\n\"\"\"\nBuilds a `List` by dropping the first `n` elements.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])"} +{"id": "Pony/src-random-xorshift-_3.txt", "contents": "\nnew from_u64(x: U64 = 5489) =>\n\"\"\"\nUse seed x to seed a [SplitMix64](random-SplitMix64.md) and use this to\ninitialize the 128 bits of state.\n\"\"\"\nlet sm = SplitMix64(x)\n_x = sm.next()\n_y = sm.next()\n\nnew create(x: U64 = 5489, y: U64 = 0) =>\n\"\"\"\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed.\n\"\"\"\n_x = x\n_y = y\nnext()\n\nfun ref next(): U64 =>"} +{"id": "Pony/promises-Fulfill-_0.txt", "contents": "\n\n\n\n\n\n\nFulfill[A: Any #share, B: Any #share]\u00b6\n[Source]\nA function from A to B that is called when a promise is fulfilled.\ninterface iso Fulfill[A: Any #share, B: Any #share]\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nvalue: A)\n: B ?\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_180.txt", "contents": "fun box ipx_frame_snap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_tr_8022\u00b6\n[Source]\nfun box ipx_frame_tr_8022()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_getnetinfo\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_24.txt", "contents": "fun box connect()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ngetpeername\u00b6\n[Source]\nfun box getpeername()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ngetsockname\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_52.txt", "contents": "```pony\nlet array: Array[String] = [\"dog\"; \"cat\"; \"wombat\"]\nlet is_second_element_wobat = try\n// indexes start from 0, so 1 is the second element\narray(1)? == \"wombat\"\nelse\nfalse\nend\n```\n\nAdding and removing elements to and from the end of the Array can be done via\n`push` and `pop` methods. You could treat the array as a LIFO stack using\nthose methods:\n```pony\nwhile (array.size() > 0) do\nlet elem = array.pop()?\n// do something with element\nend\n```\n"} +{"id": "Pony/src-builtin-unsigned-_84.txt", "contents": "Unsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\n(this *~ y, this /~ y)\nelse\ndivrem(y)\nend\n\nfun div_unsafe(y: U128): U128 =>\n\"\"\"\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis /~ y\nelse\nthis / y"} +{"id": "Pony/src-time-nanos-_0.txt", "contents": "\n\n\n\n\n\n\nnanos.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/term-ANSI-_15.txt", "contents": "\n\nwhite\u00b6\n[Source]\nWhite text.\nfun box white()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_red\u00b6\n[Source]\nBright red text.\nfun box bright_red()\n: String val\n\nReturns\u00b6"} +{"id": "Pony/src-buffered-reader-_40.txt", "contents": "792\n793\n794\n795\n796\n797use \"collections\"\n\nclass Reader\n\"\"\"\nStore network data and provide a parsing interface.\n\n`Reader` provides a way to extract typed data from a sequence of\nbytes. The `Reader` manages the underlying data structures to\nprovide a read cursor over a contiguous sequence of bytes. It is\nuseful for decoding data that is received over a network or stored\nin a file. Chunk of bytes are added to the `Reader` using the\n`append` method, and typed data is extracted using the getter\nmethods.\n\nFor example, suppose we have a UDP-based network data protocol where"} +{"id": "Pony/builtin-F64-_56.txt", "contents": "\n\ni8\u00b6\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\nfun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n"} +{"id": "Pony/src-pony_test-pony_test-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\"\"\""} +{"id": "Pony/promises--index-_0.txt", "contents": "\n\n\n\n\n\n\nPromises Package\u00b6\nA Promise represents a value that will be available at a later\ntime. Promises can either be fulfilled with a value or rejected. Any\nnumber of function handlers can be added to the Promise, to be\ncalled when the Promise is fulfilled or rejected. These handlers\nthemselves are also wrapped in Promises so that they can be chained\ntogether in order for the fulfilled value of one Promise to be used\nto compute a value which will be used to fulfill the next Promise in\nthe chain, or so that if the Promise is rejected then the subsequent\nreject functions will also be called. The input and output types of a\nfulfill handler do not have to be the same, so a chain of fulfill\nhandlers can transform the original value into something new.\nFulfill and reject handlers can either be specified as classes that"} +{"id": "Pony/src-term-ansi_term-_36.txt", "contents": "\"\"\"\nHome key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.home(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _end() =>\n\"\"\"\nEnd key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.end_key(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _page_up() =>\n\"\"\"\nPage up key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()"} +{"id": "Pony/src-builtin-array-_69.txt", "contents": "array.insert(array.size(), 0xBE)? // append: [0xDE; 0xBE]\narray.insert(1, 0xAD)? // insert: [0xDE; 0xAD; 0xBE]\narray.insert(array.size() + 1, 0xEF)? // error\n```\n\"\"\"\nif i <= _size then\nreserve(_size + 1)\n_ptr._offset(i)._insert(1, _size - i)\n_ptr._update(i, consume value)\n_size = _size + 1\nelse\nerror\nend\n\nfun ref delete(i: USize): A^ ? =>\n\"\"\"\nDelete an element from the array. Elements after this are moved down by one\nindex, compacting the array.\nAn out of bounds index raises an error.\nThe deleted element is returned."} +{"id": "Pony/src-pony_bench-pony_bench-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-persistent-vec-_17.txt", "contents": "\"\"\"\n_size\n\nfun _tail_offset(): USize =>\n\"\"\"\nReturn the amount of values in the root.\n\"\"\"\n_size - _tail.size()\n\nfun apply(i: USize): val->A ? =>\n\"\"\"\nGet the i-th element, raising an error if the index is out of bounds.\n\"\"\"\nif i < _tail_offset() then\n(_root as _VecNode[A])(_depth, i)?\nelse\n_tail(i - _tail_offset())?\nend\n\nfun val update(i: USize, value: val->A): Vec[A] ? =>"} +{"id": "Pony/src-pony_check-generator-_62.txt", "contents": "1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251"} +{"id": "Pony/src-net-ossockopt-_131.txt", "contents": "fun tipc_link_state():I32 => @pony_os_sockopt_option(I32(1062))\nfun tipc_low_importance():I32 => @pony_os_sockopt_option(I32(1063))\nfun tipc_max_bearer_name():I32 => @pony_os_sockopt_option(I32(1064))\nfun tipc_max_if_name():I32 => @pony_os_sockopt_option(I32(1065))\nfun tipc_max_link_name():I32 => @pony_os_sockopt_option(I32(1066))\nfun tipc_max_media_name():I32 => @pony_os_sockopt_option(I32(1067))\nfun tipc_max_user_msg_size():I32 => @pony_os_sockopt_option(I32(1068))\nfun tipc_medium_importance():I32 => @pony_os_sockopt_option(I32(1069))\nfun tipc_node_recvq_depth():I32 => @pony_os_sockopt_option(I32(1070))\nfun tipc_node_scope():I32 => @pony_os_sockopt_option(I32(1071))\nfun tipc_ok():I32 => @pony_os_sockopt_option(I32(1072))\nfun tipc_published():I32 => @pony_os_sockopt_option(I32(1073))\nfun tipc_reserved_types():I32 => @pony_os_sockopt_option(I32(1074))\nfun tipc_retdata():I32 => @pony_os_sockopt_option(I32(1075))\nfun tipc_sock_recvq_depth():I32 => @pony_os_sockopt_option(I32(1076))\nfun tipc_src_droppable():I32 => @pony_os_sockopt_option(I32(1077))\nfun tipc_subscr_timeout():I32 => @pony_os_sockopt_option(I32(1078))\nfun tipc_sub_cancel():I32 => @pony_os_sockopt_option(I32(1079))\nfun tipc_sub_ports():I32 => @pony_os_sockopt_option(I32(1080))\nfun tipc_sub_service():I32 => @pony_os_sockopt_option(I32(1081))"} +{"id": "Pony/compiler-args_2.txt", "contents": "# Runtime options for Pony programs\n\nBesides using the `cli` package, there are also several built-in options for the generated binary (_not for use with ponyc_) starting with `--pony*`, see `ponyc --help`, to tweak runtime performance. You can override the number of initial threads, tune cycle detection (_CD_), the garbage collector and even turn off yield, which is not really recommended.\n"} +{"id": "Pony/src-buffered-reader-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/files-FileAuth-_0.txt", "contents": "\n\n\n\n\n\n\nFileAuth\u00b6\n[Source]\nprimitive val FileAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: AmbientAuth val)\n: FileAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/collections-persistent-VecKeys-_0.txt", "contents": "\n\n\n\n\n\n\nVecKeys[A: Any #share]\u00b6\n[Source]\nclass ref VecKeys[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nv: Vec[A] val)\n: VecKeys[A] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/pony_check-PonyCheck-_5.txt", "contents": "h: TestHelper val)\n: ForAll4[T1, T2, T3, T4] ref\n\nParameters\u00b6\n\ngen1: Generator[T1] val\ngen2: Generator[T2] val\ngen3: Generator[T3] val\ngen4: Generator[T4] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll4[T1, T2, T3, T4] ref\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: PonyCheck val)"} +{"id": "Pony/src-net-ossockopt-_63.txt", "contents": "1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271"} +{"id": "Pony/net-TCPListenNotify-_1.txt", "contents": ": None val\n\nParameters\u00b6\n\nlisten: TCPListener ref\n\nReturns\u00b6\n\nNone val\n\n\nnot_listening\u00b6\n[Source]\nCalled if it wasn't possible to bind the listener to an address.\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:\nfun ref not_listening(listen: TCPListener ref) =>\nNone\n\nfun ref not_listening("} +{"id": "Pony/collections-persistent-MapValues-_0.txt", "contents": "\n\n\n\n\n\n\nMapValues[K: Any #share, V: Any #share, H: HashFunction[K] val]\u00b6\n[Source]\nclass ref MapValues[K: Any #share, V: Any #share, H: HashFunction[K] val]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nm: HashMap[K, V, H] val)\n: MapValues[K, V, H] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_389.txt", "contents": "fun box sctp_get_peer_addresses()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_peer_addr_info\u00b6\n[Source]\nfun box sctp_get_peer_addr_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_remote_addr_size\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_22.txt", "contents": "U8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/files-Directory-_9.txt", "contents": "[Source]\nSet the last access and modification times of the directory to the given\nvalues.\nfun box set_time(\natime: (I64 val , I64 val),\nmtime: (I64 val , I64 val))\n: Bool val\n\nParameters\u00b6\n\natime: (I64 val , I64 val)\nmtime: (I64 val , I64 val)\n\nReturns\u00b6\n\nBool val\n\n\ninfoat\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_36.txt", "contents": "Returns\u00b6\n\nNone val\n\n\npush_u32[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nAdd a U32 to the end of the array. This is only allowed for an array of U8s.\nfun ref push_u32[optional B: (A & Real[B] val & U8 val)](\nvalue: U32 val)\n: None val\n\nParameters\u00b6\n\nvalue: U32 val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/builtin-I128-_20.txt", "contents": ": I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nrem_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box rem_unsafe(\ny: I128 val)\n: I128 val\n"} +{"id": "Pony/src-itertools-iter-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/term-Readline-_6.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nleft\u00b6\n[Source]\nMove left.\nfun ref left(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U64-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_60.txt", "contents": "1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211"} +{"id": "Pony/cli--index-_1.txt", "contents": "intarg> := ['-'] numchar...\nfloatarg ::= ['-'] numchar... ['.' numchar...]\nstringarg ::= anychar\n\nSome examples:\nusage: ls [] [ ...]\nusage: make [] [] [ ...]\nusage: chat [] [] [ ...]\n\nUsage\u00b6\nThe types in the cli package are broken down into three groups:\nSpecs\u00b6\nPony programs use constructors to create the spec objects to specify their\ncommand line syntax. Many aspects of the spec are checked for correctness at\ncompile time, and the result represents everything the parser needs to know\nwhen parsing a command line or forming syntax help messages.\nOption and Arg value types\u00b6\nOptions and Args parse values from the command line as one of four Pony types:\nBool, String, I64 and F64. Values of each of these types can then be\nretrieved using the corresponding accessor funtions."} +{"id": "Pony/builtin-Integer-_17.txt", "contents": "\nmod_partial\u00b6\n[Source]\nCalculates the modulo of this number and y after floored division (fld).\nThe result has the sign of the divisor.\nIf y is 0 or the operation overflows, this function errors.\nfun box mod_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nneg_unsafe\u00b6"} +{"id": "Pony/src-itertools-iter-_66.txt", "contents": "### Examples\n\n```pony\nIter[I64]([2; 4; 6].values())\n.all({(x) => (x % 2) == 0 })\n```\n`true`\n\n```pony\nIter[I64]([2; 3; 4].values())\n.all({(x) => (x % 2) == 0 })\n```\n`false`\n\"\"\"\nfor x in _iter do\nif not (try f(x)? else false end) then\nreturn false\nend\nend\ntrue"} +{"id": "Pony/src-builtin-string-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/builtin-U32-_23.txt", "contents": "fun box fld_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-time-time-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-I64-_56.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/consume-and-destructive-read_2.txt", "contents": "\nBy default, a `consume` expression returns a type with the capability of the variable that you are assigning to. You can see this in the example above, where we say that `b` is `Wombat iso`, and as such the result of the `consume` expression is `Wombat iso`. We could also have said that `b` is a `Wombat val`, but we can instead give an explicit reference capability to the `consume` expression:\n\n```pony\nfun test(a: AnIncrediblyLongTypeName iso) =>\nvar b = consume val a\n```\n\nThe expression in line 2 of the example above is equivalent to saying `var b: AnIncrediblyLongTypeName val = consume a`.\n\n__Can I `consume` a field?__ Definitely not! Consuming something means it is empty, that is, it has no value. There's no way to be sure no other alias to the object will access that field. If we tried to access a field that was empty, we would crash. But there's a way to do what you want to do: _destructive read_.\n"} +{"id": "Pony/net-OSSockOpt-_341.txt", "contents": "fun box sctp_blk_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_bound\u00b6\n[Source]\nfun box sctp_bound()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_cookie_in_shutdown\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_79.txt", "contents": "ifdef ilp32 then\n(let r, let o) =\n@\"llvm.sadd.with.overflow.i32\"(this.i32(), y.i32())\n(r.isize(), o)\nelse\n(let r, let o) =\n@\"llvm.sadd.with.overflow.i64\"(this.i64(), y.i64())\n(r.isize(), o)\nend\n\nfun subc(y: ISize): (ISize, Bool) =>\nifdef ilp32 then\n(let r, let o) =\n@\"llvm.ssub.with.overflow.i32\"(this.i32(), y.i32())\n(r.isize(), o)\nelse\n(let r, let o) =\n@\"llvm.ssub.with.overflow.i64\"(this.i64(), y.i64())\n(r.isize(), o)\nend"} +{"id": "Pony/src-files-path-_42.txt", "contents": "to_0 = to_i\ntarget_0 = target_i\nend\n\nif\n((to_i - to_0) == 2)\nand (to_clean.compare_sub(\"..\", 2, to_0) is Equal)\nthen\nerror\nend\n\nif to_0.usize() != to_clean.size() then\nlet result = recover String end\n\ntry\nwhile true do\nto_i = to_clean.find(sep(), to_i)? + 1\nresult.append(\"..\")\nresult.append(sep())\nend"} +{"id": "Pony/net-OSSockOpt-_371.txt", "contents": "fun box sctp_data_sack_immediately()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_unordered\u00b6\n[Source]\nfun box sctp_data_unordered()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_default_prinfo\u00b6\n[Source]"} +{"id": "Pony/1_hello-world_2.txt", "contents": "# Compiling the program\n\nNow compile it:\n\n```bash\n$ ponyc\nBuilding .\nBuilding builtin\nGenerating\nOptimising\nWriting ./helloworld.o\nLinking ./helloworld\n```\n\n(If you're using Docker, you'd write something like `$ docker run -v Some_Absolute_Path/helloworld:/src/main ponylang/ponyc`, depending of course on what the absolute path to your `helloworld` directory is.)\n\nLook at that! It built the current directory, `.`, plus the stuff that is built into Pony, `builtin`, it generated some code, optimised it, created an object file (don't worry if you don't know what that is), and linked it into an executable with whatever libraries were needed. If you're a C/C++ programmer, that will all make sense to you, otherwise, it probably won't, but that's ok, you can ignore it.\n\n__Wait, it linked too?__ Yes. You won't need a build system (like `make`) for Pony. It handles that for you (including handling the order of dependencies when you link to C libraries, but we'll get to that later).\n"} +{"id": "Pony/random-XorOshiro128StarStar-_6.txt", "contents": ": U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun ref ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun ref usize()"} +{"id": "Pony/recovering-capabilities_2.txt", "contents": "# What does this look like?\n\nThe `recover` expression wraps a list of expressions and is terminated by an `end`, like this:\n\n```pony\nrecover Array[String].create() end\n```\n\nThis expression returns an `Array[String] iso`, instead of the usual `Array[String] ref` you would get. The reason it is `iso` and not any of the other mutable reference capabilities is because there is a default reference capability when you don't specify one. The default for any mutable reference capability is `iso` and the default for any immutable reference capability is `val`.\n\nHere's a more complicated example from the standard library:\n\n```pony\nrecover\nvar s = String((prec + 1).max(width.max(31)))\nvar value = x\n\ntry\nif value == 0 then\ns.push(table(0)?)"} +{"id": "Pony/builtin-SignedInteger-_45.txt", "contents": "fun box max(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_78.txt", "contents": "When a failing sample is found, the PonyCheck engine is trying to find a\nsmaller or more simple sample by shrinking it with `shrink`.\nIf the generator did not provide any shrinked samples\nas a result of `generate`, its `shrink` method is called\nto obtain simpler results. PonyCheck obtains more shrunken samples until\nthe property is not failing anymore.\nThe last failing sample, which is considered the most simple one,\nis then reported to the user.\n\"\"\"\nlet _gen: GenObj[T]\n\nnew create(gen: GenObj[T]) =>\n_gen = gen\n\nfun generate(rnd: Randomness): GenerateResult[T] ? =>\n\"\"\"\nLet this generator generate a value\ngiven a source of `Randomness`.\n\nAlso allow for returning a value and pre-generated shrink results"} +{"id": "Pony/src-net-tcp_connection-_120.txt", "contents": "if\nnot _shutdown and\n(_connect_count == 0) and\n(_pending_writev_total == 0)\nthen\n_shutdown = true\n\nif _connected then\n@pony_os_socket_shutdown(_fd)\nelse\n_shutdown_peer = true\nend\nend\n\nif _connected and _shutdown and _shutdown_peer then\nhard_close()\nend\n\nfun ref hard_close() =>\n\"\"\""} +{"id": "Pony/src-buffered-writer-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-U16-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_30.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-files-file-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671use @_open[I32](path: Pointer[U8] tag, flags: I32, ...) if windows"} +{"id": "Pony/src-collections-list-_86.txt", "contents": "\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.drop(1) // [\"a\"]\n```\n\"\"\"\nlet l = List[this->A!]\n\nif size() > 0 then\ntry\nvar node = head()?\n\nfor i in Range(0, n.min(size())) do\nl.push(node()?)\nnode = node.next() as this->ListNode[A]\nend\nend\nend\nl\n"} +{"id": "Pony/reference-capabilities_7.txt", "contents": "## Every actor is single threaded\n\nThe code within a single actor is never run concurrently. This means that, within a single actor, data updates cannot cause problems. It's only when we want to share data between actors that we have problems.\n\n__OK, safely sharing data concurrently is tricky. How do reference capabilities help?__\n\nBy sharing only immutable data and exchanging only isolated data we can have safe concurrent programs without locks. The problem is that it's very difficult to do that correctly. If you accidentally hang on to a reference to some isolated data you've handed over or change something you've shared as immutable then everything goes wrong. What you need is for the compiler to force you to live up to your promises. Pony reference capabilities allow the compiler to do just that.\n"} +{"id": "Pony/src-encode-base64-base64-_0.txt", "contents": "\n\n\n\n\n\n\nbase64.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-USize-_14.txt", "contents": "fun box remc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\n(USize val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_75.txt", "contents": "fun box af_inet6()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nbluetooth_proto_sco\u00b6\n[Source]\nfun box bluetooth_proto_sco()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_nr_pkt_types\u00b6\n[Source]"} +{"id": "Pony/src-builtin-platform-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25primitive Platform\nfun bsd(): Bool => freebsd() or dragonfly() or openbsd()\nfun freebsd(): Bool => compile_intrinsic\nfun dragonfly(): Bool => compile_intrinsic\nfun openbsd(): Bool => compile_intrinsic\nfun linux(): Bool => compile_intrinsic\nfun osx(): Bool => compile_intrinsic"} +{"id": "Pony/src-pony_check-generator-_74.txt", "contents": "\nfun ref has_next(): Bool =>\n_cur > _to\n\nfun ref next(): T =>\nlet res = _cur - 1\n_cur = res\nres\n\ntrait box GenObj[T]\nfun generate(rnd: Randomness): GenerateResult[T] ?\n\nfun shrink(t: T): ValueAndShrink[T] =>\n(consume t, Poperator[T].empty())\n\nfun generate_value(rnd: Randomness): T^ ? =>\n\"\"\"\nSimply generate a value and ignore any possible\nshrink values.\n\"\"\""} +{"id": "Pony/calling-c_5.txt", "contents": "## Get and Pass Pointers to FFI\n\nIf you want to receive a pointer to an opaque C type, using a pointer to a primitive can be useful:\n\n```pony\nuse @XOpenDisplay[Pointer[_XDisplayHandle]](name: Pointer[U8] tag)\nuse @eglGetDisplay[Pointer[_EGLDisplayHandle]](disp: Pointer[_XDisplayHandle])\n\nprimitive _XDisplayHandle\nprimitive _EGLDisplayHandle\n\nlet x_dpy = @XOpenDisplay(Pointer[U8])\nif x_dpy.is_null() then\nenv.out.print(\"XOpenDisplay failed\")\nend\n\nlet e_dpy = @eglGetDisplay(x_dpy)\nif e_dpy.is_null() then\nenv.out.print(\"eglGetDisplay failed\")\nend"} +{"id": "Pony/src-files-file-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-itertools-iter-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/3_actors_3.txt", "contents": "# Message Passing\n\nIf you are familiar with actor-based languages like Erlang, you are familiar with the concept of \"message passing\". It's how actors communicate with one another. Behaviours are the Pony equivalent. When you call a behavior on an actor, you are sending it a message.\n\nIf you aren't familiar with message passing, don't worry about it. We've got you covered. All will be explained below.\n"} +{"id": "Pony/builtin-U64-_17.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-stdin-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-USize-_46.txt", "contents": "fun box ge(\ny: USize val)\n: Bool val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: USize val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/combining-capabilities_9.txt", "contents": "## Reading from a `tag` variable\n\nThis one is easy: `tag` variables are opaque! They can't be read from.\n"} +{"id": "Pony/src-net-tcp_connection-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/time-PosixDate-_1.txt", "contents": "nanoseconds: I64 val = 0)\n: PosixDate ref^\n\nParameters\u00b6\n\nseconds: I64 val = 0\nnanoseconds: I64 val = 0\n\nReturns\u00b6\n\nPosixDate ref^\n\n\nPublic fields\u00b6\nvar nsec: I32 val\u00b6\n[Source]\n\nvar sec: I32 val\u00b6\n[Source]\n"} +{"id": "Pony/net-OSSockOpt-_614.txt", "contents": "fun box tipc_sub_ports()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_sub_service\u00b6\n[Source]\nfun box tipc_sub_service()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_top_srv\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_72.txt", "contents": "fun peek_i16_le(offset: USize = 0): I16 ? =>\n\"\"\"\nPeek at a little-endian I16.\n\"\"\"\npeek_u16_le(offset)?.i16()\n\nfun peek_u32_be(offset: USize = 0): U32 ? =>\n\"\"\"\nPeek at a big-endian U32.\n\"\"\"\n(peek_u16_be(offset)?.u32() << 16) or peek_u16_be(offset + 2)?.u32()\n\nfun peek_u32_le(offset: USize = 0): U32 ? =>\n\"\"\"\nPeek at a little-endian U32.\n\"\"\"\npeek_u16_le(offset)?.u32() or (peek_u16_le(offset + 2)?.u32() << 16)\n\nfun peek_i32_be(offset: USize = 0): I32 ? =>\n\"\"\""} +{"id": "Pony/whitespace_1.txt", "contents": "# Mostly insignificant whitespace\n\nPony reads a bit like Python, which is a _whitespace significant_ language. That is, the amount of indentation on a line means something in Python. In Pony, the amount of indentation is meaningless.\n\nThat means Pony programmers can format their code in whatever way suits them.\n\nThere are three exceptions:\n\n1. A `-` at the beginning of a line starts a new expression (unary negation), whereas a `-` in the middle of an expression is a binary operator (subtraction).\n2. A `(` at the beginning of a line starts a new expression (a tuple), whereas a `(` in the middle of an expression is a method call.\n3. A `[` at the beginning of a line starts a new expression (an array literal), whereas a `[` in the middle of an expression is generic formal parameters.\n\nThat stuff may seem a little esoteric right now, but we'll explain it all later. The `-` part should make sense though.\n\n```pony\na - b\n```\n\nThat means \"subtract b from a\".\n"} +{"id": "Pony/src-files-file_info-_10.txt", "contents": "Time of the last change either the attributes (number of links, owner,\ngroup, file mode, ...) or the content of `filepath`\nas a tuple of seconds and nanoseconds since the epoch:\n\n```pony\n(let c_secs: I64, let c_nanos: I64) = file_info.change_time\n```\n\nOn Windows this will be the file creation time.\n\"\"\"\n\nlet file: Bool = false\n\"\"\"`true` if `filepath` points to an a regular file.\"\"\"\n\nlet directory: Bool = false\n\"\"\"`true` if `filepath` points to a directory.\"\"\"\n\nlet pipe: Bool = false\n\"\"\"`true` if `filepath` points to a named pipe.\"\"\"\n"} +{"id": "Pony/src-collections-persistent-list-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-builtin-env-_10.txt", "contents": "i\n\nfun tag _strings_from_pointers(\ndata: Pointer[Pointer[U8]] val,\nlen: USize)\n: Array[String] iso^\n=>\nlet array = recover Array[String](len) end\nvar i: USize = 0\n\nwhile i < len do\nlet entry = data._apply(i = i + 1)\narray.push(recover String.copy_cstring(entry) end)\nend\n\narray\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_16.txt", "contents": "fun box ipproto_emcon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_encap\u00b6\n[Source]\nfun box ipproto_encap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_eon\u00b6\n[Source]"} +{"id": "Pony/files-Directory-_0.txt", "contents": "\n\n\n\n\n\n\nDirectory\u00b6\n[Source]\nOperations on a directory.\nThe directory-relative functions (open, etc) use the *at interface on FreeBSD\nand Linux. This isn't available on OS X prior to 10.10, so it is not used. On\nFreeBSD, this allows the directory-relative functions to take advantage of\nCapsicum.\nclass ref Directory\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nThis will raise an error if the path doesn't exist or it is not a"} +{"id": "Pony/src-builtin-string-_98.txt", "contents": "reserve(_size)\n_set(i, encoded._2)\nif encoded._1 > 1 then\n_set(i + 1, encoded._3)\nif encoded._1 > 2 then\n_set(i + 2, encoded._4)\nif encoded._1 > 3 then\n_set(i + 3, encoded._5)\nend\nend\nend\n_set(_size, 0)\n\nfun _copy_to(ptr: Pointer[U8] ref, copy_len: USize,\nfrom_offset: USize = 0, to_offset: USize = 0) =>\n\"\"\"\nCopy `copy_len` bytes from this to that at specified offsets.\n\"\"\"\n_ptr._offset(from_offset)._copy_to(ptr._offset(to_offset), copy_len)\n"} +{"id": "Pony/net-OSSockOpt-_422.txt", "contents": "fun box sctp_pcb_flags_dont_wake()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_do_asconf\u00b6\n[Source]\nfun box sctp_pcb_flags_do_asconf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_do_not_pmtud\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-pony_test-test_helper-_43.txt", "contents": "to happen to complete your test, but don't want to have to collect them\nall yourself into a single actor that calls the complete method.\n\nThe order of calls to expect_action don't matter - the actions may be\ncompleted in any other order to complete the test.\n\"\"\"\n_runner.expect_action(name)\n\nfun complete_action(name: String) =>\n\"\"\"\nMUST be called for each action expectation that was set up in a long test\nto fulfill the expectations. Any expectations that are still outstanding\nwhen the long test timeout runs out will be printed by name when it fails.\n\nCompleting all outstanding actions is enough to finish the test. There's no\nneed to also call the complete method when the actions are finished.\n\nCalling the complete method will finish the test immediately, without\nwaiting for any outstanding actions to be completed.\n\"\"\""} +{"id": "Pony/src-pony_test-pony_test-_41.txt", "contents": "## Example\n\nThe following example creates a temporary directory in the [set_up()](pony_test-UnitTest.md#set_up) function\nand removes it in the [tear_down()](pony_test-UnitTest.md#tear_down) function, thus\nsimplifying the test function itself:\n\n```pony\nuse \"pony_test\"\nuse \"files\"\n\nclass iso TempDirTest\nvar tmp_dir: (FilePath | None) = None\n\nfun name(): String => \"temp-dir\"\n\nfun ref set_up(h: TestHelper)? =>\ntmp_dir = FilePath.mkdtemp(FileAuth(h.env.root), \"temp-dir\")?\n\nfun ref tear_down(h: TestHelper) =>\ntry"} +{"id": "Pony/src-builtin-float-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/net-OSSockOpt-_141.txt", "contents": "fun box ipv6_hopopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_ipsec_policy\u00b6\n[Source]\nfun box ipv6_ipsec_policy()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_join_anycast\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_423.txt", "contents": "fun box sctp_pcb_flags_do_not_pmtud()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_dryevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_dryevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_explicit_eor\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_39.txt", "contents": "\nA\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem\u00b6"} +{"id": "Pony/src-math-least_common_multiple-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24primitive LeastCommonMultiple\n\"\"\"\nGet the least common multiple of x and y where both x and y >= 1.\n\nProviding 0 or numbers that overflow the integer width will result in an\nerror.\n\nExample usage:"} +{"id": "Pony/term-EraseRight-_0.txt", "contents": "\n\n\n\n\n\n\nEraseRight\u00b6\n[Source]\nprimitive val EraseRight\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: EraseRight val^\n\nReturns\u00b6\n\nEraseRight val^"} +{"id": "Pony/format-FormatGeneral-_0.txt", "contents": "\n\n\n\n\n\n\nFormatGeneral\u00b6\n[Source]\nprimitive val FormatGeneral is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/net-TCPListener-_4.txt", "contents": "Listens for IPv4 connections.\nnew tag ip4(\nauth: TCPListenAuth val,\nnotify: TCPListenNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nlimit: USize val = 0,\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)\n: TCPListener tag^\n\nParameters\u00b6\n\nauth: TCPListenAuth val\nnotify: TCPListenNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nlimit: USize val = 0\nread_buffer_size: USize val = 16384"} +{"id": "Pony/pony_check-Generators-_45.txt", "contents": "\nParameters\u00b6\n\ngen: Generator[U32 val] box\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nunicode\u00b6\n[Source]\nCreate a generator for unicode strings,\nwith a minimum length of min codepoints (default: 0)\nand a maximum length of max codepoints (default: 100).\nNote that the byte length of the generated string can be up to 4 times\nthe size in code points.\nfun box unicode("} +{"id": "Pony/3_arithmetic_1.txt", "contents": "# Integers\n"} +{"id": "Pony/builtin-F64-_64.txt", "contents": "\nI64 val\n\n\nilong_unsafe\u00b6\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val"} +{"id": "Pony/files-WalkHandler-_1.txt", "contents": "Parameters\u00b6\n\ndir_path: FilePath val\ndir_entries: Array[String val] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_82.txt", "contents": "else\ntrue\nend\n\nfun exists(f: {(this->A!): Bool} box): Bool =>\n\"\"\"\nReturns `true` if at least one element satisfies the predicate, otherwise returns `false`.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet b_exists = my_list.exists( {(s: String): Bool => s == \"b\"} ) // true\n```\n\"\"\"\ntry\n_exists(head()?, f)\nelse\nfalse\nend\n\nfun _exists(ln: this->ListNode[A], f: {(this->A!): Bool} box): Bool =>"} +{"id": "Pony/src-collections-set-_26.txt", "contents": "let r = HashSet[this->A!, K](size())\n\nfor value in values() do\ntry\nthat(value)?\nelse\nr.set(value)\nend\nend\nr\n\nfun clone[K: HashFunction[this->A!] val = H](): HashSet[this->A!, K]^ =>\n\"\"\"\nCreate a clone. The element type may be different due to aliasing and\nviewpoint adaptation.\n\"\"\"\nlet r = HashSet[this->A!, K](size())\n\nfor value in values() do\nr.set(value)"} +{"id": "Pony/src-collections-persistent-list-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-builtin-seq-_6.txt", "contents": "fun ref clear()\n\"\"\"\nRemoves all elements from the sequence.\n\"\"\"\n\nfun ref push(value: A)\n\"\"\"\nAdds an element to the end of the sequence.\n\"\"\"\n\nfun ref pop(): A^ ?\n\"\"\"\nRemoves an element from the end of the sequence.\n\"\"\"\n\nfun ref unshift(value: A)\n\"\"\"\nAdds an element to the beginning of the sequence.\n\"\"\"\n"} +{"id": "Pony/encode-base64-Base64-_8.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: Base64 val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-PropertyParams-_0.txt", "contents": "\n\n\n\n\n\n\nPropertyParams\u00b6\n[Source]\nParameters to control Property Execution.\n\nseed: the seed for the source of Randomness\nnum_samples: the number of samples to produce from the property generator\nmax_shrink_rounds: the maximum rounds of shrinking to perform\nmax_generator_retries: the maximum number of retries to do if a generator fails to generate a sample\ntimeout: the timeout for the PonyTest runner, in nanoseconds\nasync: if true the property is expected to finish asynchronously by calling\nPropertyHelper.complete(...)\n\nclass val PropertyParams is"} +{"id": "Pony/builtin-UnsignedInteger-_20.txt", "contents": "[Source]\nfun box sub_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: A)\n: A\n"} +{"id": "Pony/combining-capabilities_5.txt", "contents": "## Reading from a `trn` variable\n\nThis is like `iso`, but with a weaker guarantee (_write uniqueness_ as opposed to _read and write uniqueness_). That makes a big difference since now we can return something readable when we enforce our guarantees.\n\nAn `iso` field makes stronger guarantees than `trn`, and can't alias anything readable inside the `trn` origin, so it's perfectly safe to read.\n\nOn the other hand, `trn` and `ref` fields have to be returned as `box`. It might seem a bit odd that `trn` has to be returned as `box`, since after all it guarantees write uniqueness itself and we might expect it to behave like `iso`. The issue is that `trn`, unlike `iso`, *can* alias with some `box` variables in the origin. And that `trn` origin still has to make the guarantee that nothing else can write to fields that it can read. On the other hand, `trn` still can't be returned as `val`, because then we might leave the original field in place and create a `val` alias, while that field can still be used to write! So we have to view it as `box`.\n\nImmutable and opaque capabilities, though, can never violate write uniqueness, so `val`, `box`, and `tag` are viewed as themselves.\n"} +{"id": "Pony/capsicum-Cap-_30.txt", "contents": "fun box sock_client()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsock_server\u00b6\n[Source]\nfun box sock_server()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmac_get\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_426.txt", "contents": "fun box sctp_pcb_flags_in_tcppool()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_multiple_asconfs\u00b6\n[Source]\nfun box sctp_pcb_flags_multiple_asconfs()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_needs_mapped_v4\u00b6\n[Source]"} +{"id": "Pony/collections-List-_0.txt", "contents": "\n\n\n\n\n\n\nList[A: A]\u00b6\n[Source]\nA doubly linked list.\nThe following is paraphrased from Wikipedia.\nA doubly linked list is a linked data structure that consists of a set of sequentially\nlinked records called nodes (implemented in Pony via the collections.ListNode class). Each\nnode contains four fields: two link fields (references to the previous and to the next node in\nthe sequence of nodes), one data field, and the reference to the List in which it resides. A doubly\nlinked list can be conceptualized as two singly linked lists formed from the same data items, but\nin opposite sequential orders.\nAs you would expect. functions are provided to perform all the common list operations such as\ncreation, traversal, node addition and removal, iteration, mapping, filtering, etc.\nExample program\u00b6"} +{"id": "Pony/src-term-readline-_35.txt", "contents": "\n_edit = strings.CommonPrefix(r)\nend_key()\nend\n\nfun ref _dispatch(term: ANSITerm) =>\n\"\"\"\nSend a finished line to the notifier.\n\"\"\"\nif _edit.size() > 0 then\nlet line: String = _edit = recover String end\n\nif _blocked then\n_queue.push(line)\nelse\n_add_history(line)\n_out.write(\"\\n\")\n_handle_line(term, line)\nend\nend"} +{"id": "Pony/term-ANSI-_22.txt", "contents": "Returns\u00b6\n\nString val\n\n\nmagenta_bg\u00b6\n[Source]\nMagenta background.\nfun box magenta_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ncyan_bg\u00b6\n[Source]\nCyan background.\nfun box cyan_bg()"} +{"id": "Pony/term-ANSINotify-_5.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\ndelete\u00b6\n[Source]\nfun ref delete(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n"} +{"id": "Pony/src-builtin-array-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-ISize-_62.txt", "contents": "\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: ISize val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: ISize val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n"} +{"id": "Pony/builtin-U128-_36.txt", "contents": "U128 val ?\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nshl_unsafe\u00b6\n[Source]"} +{"id": "Pony/5_methods_15.txt", "contents": "\nprimitive Foo\nfun object_wrong(f: Factory, o1: Option, o2: Option): Object =>\nf.>add_option(o1).>add_option(o2).>make_object() // Error! The expression returns a Factory\n\nfun object_right(f: Factory, o1: Option, o2: Option): Object =>\nf.>add_option(o1).>add_option(o2).make_object() // Works. The expression returns an Object\n```\n"} +{"id": "Pony/src-pony_check-randomness-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-String-_52.txt", "contents": "from: String box,\nto: String box,\nn: USize val = 0)\n: USize val\n\nParameters\u00b6\n\nfrom: String box\nto: String box\nn: USize val = 0\n\nReturns\u00b6\n\nUSize val\n\n\nsplit_by\u00b6\n[Source]\nSplit the string into an array of strings that are delimited by delim in\nthe original string. If n > 0, then the split count is limited to n."} +{"id": "Pony/6_type-aliases_0.txt", "contents": "# Type Aliases\n\nA __type alias__ is just a way to give a different name to a type. This may sound a bit silly: after all, types already have names! However, Pony can express some complicated types, and it can be convenient to have a short way to talk about them.\n\nWe'll give a couple examples of using type aliases, just to get the feel of them.\n"} +{"id": "Pony/src-builtin-iterator-_11.txt", "contents": "This might error, which does not necessarily mean that the Iterator is exhausted.\n\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/process-Exited-_2.txt", "contents": "fun box exit_code()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_23.txt", "contents": "_out.write(\"\\n\")\nterm.dispose()\nelse\ndelete()\nend\n| 0x05 => end_key() // ctrl-e\n| 0x06 => right() // ctrl-f\n| 0x08 => _backspace() // ctrl-h\n| 0x09 => _tab()\n| 0x0A => _dispatch(term) // LF\n| 0x0B =>\n// ctrl-k, delete to the end of the line.\n_edit.truncate(_cur_pos.usize())\n| 0x0C => _clear() // ctrl-l\n| 0x0D => _dispatch(term) // CR\n| 0x0E => down() // ctrl-n\n| 0x10 => up() // ctrl-p\n| 0x14 => _swap() // ctrl-t\n| 0x15 =>\n// ctrl-u, delete the whole line."} +{"id": "Pony/net-TCPConnectionNotify-_7.txt", "contents": "[Source]\nCalled when data is sent on the connection. This gives the notifier an\nopportunity to modify sent data before it is written. To swallow data,\nreturn an empty string.\nfun ref sent(\nconn: TCPConnection ref,\ndata: (String val | Array[U8 val] val))\n: (String val | Array[U8 val] val)\n\nParameters\u00b6\n\nconn: TCPConnection ref\ndata: (String val | Array[U8 val] val)\n\nReturns\u00b6\n\n(String val | Array[U8 val] val)\n\n\nsentv\u00b6"} +{"id": "Pony/src-pony_test-pony_test-_47.txt", "contents": "end\n\nfor g in _groups.values() do\nif g._1 == name then\nreturn g._2\nend\nend\n\n// Group doesn't exist yet, make it.\n// We only need one simultaneous group, which we've already made. All new\n// groups are exclusive.\nlet g = _ExclusiveGroup\n_groups.push((name, g))\ng\n\nbe _test_started(id: USize) =>\n\"\"\"\nA test has started running, update status info.\nThe id parameter is the test identifier handed out when we created the test\nhelper."} +{"id": "Pony/collections-HashMap-_11.txt", "contents": "Add K, V pairs from the iterator to the map.\nfun ref concat(\niter: Iterator[(K^ , V^)] ref)\n: None val\n\nParameters\u00b6\n\niter: Iterator[(K^ , V^)] ref\n\nReturns\u00b6\n\nNone val\n\n\nadd[optional H2: HashFunction[this->K!] val]\u00b6\n[Source]\nThis with the new (key, value) mapping.\nfun box add[optional H2: HashFunction[this->K!] val](\nkey: this->K!,\nvalue: this->V!)"} +{"id": "Pony/src-pony_bench-pony_bench-_0.txt", "contents": "\n\n\n\n\n\n\npony_bench.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/1_variables_9.txt", "contents": "new ref create(name': String, level: U64) =>\nname = name'\n_hunger_level = level\n\nfun ref set_hunger_level(hunger_level: U64) =>\n_hunger_level = hunger_level // Ok, _hunger_level is of var type\n\nfun ref set_name(name' : String) =>\nname = name' // Error, can't assign to a let definition more than once\n```\n\n__Can field declarations appear after methods?__ No. If `var` or `let` keywords appear after a `fun` or `be` declaration, they will be treated as variables within the method body rather than fields within the type declaration. As a result, fields must appear prior to methods in the type declaration\n"} +{"id": "Pony/src-builtin-unsigned-_82.txt", "contents": "if den <= num then\nnum = num - den\nquot = quot + qbit\nend\n\nden = den >> 1\nqbit = qbit >> 1\nend\n(quot, num)\nend\n\nfun div(y: U128): U128 =>\nifdef native128 then\nthis / y\nelse\n(let q, let r) = divrem(y)\nq\nend\n\nfun rem(y: U128): U128 =>"} +{"id": "Pony/src-itertools-iter-_77.txt", "contents": "Return an iterator that only returns items that match the predicate `f`.\n"} +{"id": "Pony/src-pony_check-generator-_112.txt", "contents": "Iter[T1^](shrinks1).zip2[T2^, T3^](shrinks2, shrinks3))\n\nfun shrink(t: (T1, T2, T3)): ValueAndShrink[(T1, T2, T3)] =>\n(let t1, let t2, let t3) = consume t\n(let t11, let t1_shrunken: Iterator[T1^]) = gen1.shrink(consume t1)\n(let t21, let t2_shrunken: Iterator[T2^]) = gen2.shrink(consume t2)\n(let t31, let t3_shrunken: Iterator[T3^]) = gen3.shrink(consume t3)\n\nlet shrunken = Iter[T1^](t1_shrunken).zip2[T2^, T3^](t2_shrunken, t3_shrunken)\n((consume t11, consume t21, consume t31), shrunken)\nend)\n\nfun zip4[T1, T2, T3, T4](\ngen1: Generator[T1],\ngen2: Generator[T2],\ngen3: Generator[T3],\ngen4: Generator[T4])\n: Generator[(T1, T2, T3, T4)]\n=>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_557.txt", "contents": "fun box tcpopt_eol()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_fastopen\u00b6\n[Source]\nfun box tcpopt_fastopen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_fast_open\u00b6\n[Source]"} +{"id": "Pony/calling-c_15.txt", "contents": "## Variadic C functions\n\nSome C functions are variadic, that is, they can take a variable number of parameters. To interact with these functions, you should also specify that fact in the FFI signature:\n\n```pony\nuse @printf[I32](fmt: Pointer[U8] tag, ...)\n// ...\nlet run_ns: I64 = _current_t - _last_t\nlet rate: I64 = (_partial_count.i64() * 1_000_000_000) / run_ns\n@printf(\"Elapsed: %lld,%lld\\n\".cstring(), run_ns, rate)\n```\n\nIn the example above, the compiler will type-check the first argument to `printf`, but will not be able to check any other argument, since it lacks the necessary type information. It is __very__ important that you use `...` in the FFI signature if the corresponding C function is variadic: if you don't, the compiler might generate a program that is incorrect or crash on some platforms while appearing to work correctly on others.\n"} +{"id": "Pony/src-buffered-reader-_45.txt", "contents": "\"\"\"\nif _available >= n then\n_available = _available - n\nvar rem = n\n\nwhile rem > 0 do\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nlet avail = data.size() - offset\n\nif avail > rem then\nnode()? = (data, offset + rem)\nbreak\nend\n\nrem = rem - avail\n_chunks.shift()?\nend\n\nelse"} +{"id": "Pony/collections-persistent-HashMap-_6.txt", "contents": "\n\ncontains\u00b6\n[Source]\nCheck whether the node contains the provided key.\nfun val contains(\nk: K)\n: Bool val\n\nParameters\u00b6\n\nk: K\n\nReturns\u00b6\n\nBool val\n\n\nconcat\u00b6\n[Source]"} +{"id": "Pony/src-ini-ini-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\"\"\""} +{"id": "Pony/builtin-U32-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_61.txt", "contents": "\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-unsigned-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-files-path-_52.txt", "contents": "s(i)? = '/'\nend\n\ni = i + 1\nend\nend\n\ns\nelse\npath\nend\n\nfun canonical(path: String): String ? =>\n\"\"\"\nReturn the equivalent canonical absolute path. Raise an error if there\nisn't one.\n\"\"\"\nlet cstring = @pony_os_realpath(path.cstring())\n\nif cstring.is_null() then"} +{"id": "Pony/pony_check-PonyCheck-_6.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: PonyCheck val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: PonyCheck val)\n: Bool val\n\nParameters\u00b6\n\nthat: PonyCheck val"} +{"id": "Pony/src-itertools-iter-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-cli-command_spec-_31.txt", "contents": "args': Array[ArgSpec] box = Array[ArgSpec]()) ?\n=>\n\"\"\"\nCreates a command spec that can accept options and arguments, but not child\ncommands.\n\"\"\"\n_type = _CommandSpecLeaf\n_name = _assertName(name')?\n_descr = descr'\nfor o in options'.values() do\n_options.update(o.name(), o)\nend\nfor a in args'.values() do\n_args.push(a)\nend\n\nfun tag _assertName(nm: String): String ? =>\nfor b in nm.values() do\nif (b != '-') and (b != '_') and\nnot ((b >= '0') and (b <= '9')) and"} +{"id": "Pony/builtin-USize-_33.txt", "contents": "USize val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: USize val)\n: (USize val , USize val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\n(USize val , USize val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-UDPSocket-_10.txt", "contents": "state: Bool val\n\n\nset_multicast_interface\u00b6\n[Source]\nBy default, the OS will choose which address is used to send packets bound\nfor multicast addresses. This can be used to force a specific interface. To\nrevert to allowing the OS to choose, call with an empty string.\nbe set_multicast_interface(\nfrom: String val = \"\")\n\nParameters\u00b6\n\nfrom: String val = \"\"\n\n\nset_multicast_loopback\u00b6\n[Source]\nBy default, packets sent to a multicast address will be received by the\nsending system if it has subscribed to that address. Disabling loopback"} +{"id": "Pony/net-OSSockOpt-_284.txt", "contents": "fun box netlink_selinux()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_sock_diag\u00b6\n[Source]\nfun box netlink_sock_diag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_tx_ring\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_50.txt", "contents": "\nnew val string_seq(\nname': String,\ndescr': String = \"\")\n=>\n\"\"\"\nCreates an Arg with a ReadSeq[String] typed value that can be used like\n` file1 file2 file3`\nto yield a sequence of three strings equivalent to\n`cmd.arg(\"file\").string_seq() (equiv) [\"file1\"; \"file2\"; \"file3\"]`.\n\"\"\"\n_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_StringSeqType, _StringSeq.empty())\n\nfun name(): String =>\n\"\"\"\nReturns the name of this arg.\n\"\"\"\n_name"} +{"id": "Pony/pony_check-IntProperty-_1.txt", "contents": "\nImplements\u00b6\n\nProperty1[IntPropertySample ref] ref\n\n\nPublic Functions\u00b6\ngen\u00b6\n[Source]\nfun box gen()\n: Generator[IntPropertySample ref] box\n\nReturns\u00b6\n\nGenerator[IntPropertySample ref] box\n\n\nproperty\u00b6\n[Source]\nfun ref property("} +{"id": "Pony/as_0.txt", "contents": "# As Operator\n\nThe `as` operator in Pony has two related uses. First, it provides a safe way to increase the specificity of an object's type. Second, it gives the programmer a way to specify the type of the items in an array literal.\n"} +{"id": "Pony/src-builtin-string-_137.txt", "contents": "n = n + 1\nend\nend\n\nfun ref clear() =>\n\"\"\"\nTruncate the string to zero length.\n\"\"\"\n_set(0, 0)\n_size = 0\n\nfun insert(offset: ISize, that: String): String iso^ =>\n\"\"\"\nReturns a version of the string with the given string inserted at the given\noffset.\n\"\"\"\nlet s = clone()\ns.insert_in_place(offset, that)\ns\n"} +{"id": "Pony/src-pony_bench-pony_bench-_15.txt", "contents": "end\n\nlist.benchmarks(this)\n\nbe apply(bench: Benchmark) =>\nmatch consume bench\n| let b: MicroBenchmark =>\n_bench_q.push((b.overhead(), true))\n_bench_q.push((consume b, false))\n| let b: AsyncMicroBenchmark =>\n_bench_q.push((b.overhead(), true))\n_bench_q.push((consume b, false))\nend\n\nif not _running then\n_running = true\n_next_benchmark()\nend\n\nbe _next_benchmark() =>"} +{"id": "Pony/src-collections-map-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/buffered-Writer-_4.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nreserve_current\u00b6\n[Source]\nReserve space for size bytes in _current.\nfun ref reserve_current(\nsize': USize val)\n: None val\n\nParameters\u00b6\n\nsize': USize val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-builtin-signed-_55.txt", "contents": "_SignedUnsafeArithmetic.mod_unsafe[I16, U16](this, y)\n\nfun addc(y: I16): (I16, Bool) =>\n@\"llvm.sadd.with.overflow.i16\"(this, y)\n\nfun subc(y: I16): (I16, Bool) =>\n@\"llvm.ssub.with.overflow.i16\"(this, y)\n\nfun mulc(y: I16): (I16, Bool) =>\n@\"llvm.smul.with.overflow.i16\"(this, y)\n\nfun divc(y: I16): (I16, Bool) =>\n_SignedCheckedArithmetic.div_checked[I16, U16](this, y)\n\nfun remc(y: I16): (I16, Bool) =>\n_SignedCheckedArithmetic.rem_checked[I16, U16](this, y)\n\nfun fldc(y: I16): (I16, Bool) =>\n_SignedCheckedArithmetic.fld_checked[I16, U16](this, y)\n"} +{"id": "Pony/derived-authority_2.txt", "contents": "\nThe `Connect` actor uses this derived authority when it creates a TCP connection:\n\n```pony\nTCPConnection(auth, MyTCPConnectionNotify(out), \"example.com\", \"80\")\n```\n\nThe `TCPConnection` requires an authority as first parameter, and since the compiler checks that the correct type was passed, this guarantees that a `TCPConnection` can only be created by an actor holding the required authorization.\n\nThe implementation of the `TCPConnection` constructor does not even use the authorization parameter at run time, all it does is require it to be of the right type. The type checking done by the compiler is sufficient for this guarantee.\n"} +{"id": "Pony/term-ANSI-_25.txt", "contents": "bright_green_bg\u00b6\n[Source]\nBright green background.\nfun box bright_green_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_yellow_bg\u00b6\n[Source]\nBright yellow background.\nfun box bright_yellow_bg()\n: String val\n\nReturns\u00b6\n\nString val"} +{"id": "Pony/builtin-U16-_47.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/process-ProcessNotify-_2.txt", "contents": "process: ProcessMonitor ref\ndata: Array[U8 val] iso\n\nReturns\u00b6\n\nNone val\n\n\nstderr\u00b6\n[Source]\nProcessMonitor calls this when new data is received on STDERR of the\nforked process\nfun ref stderr(\nprocess: ProcessMonitor ref,\ndata: Array[U8 val] iso)\n: None val\n\nParameters\u00b6\n\nprocess: ProcessMonitor ref"} +{"id": "Pony/process--index-_3.txt", "contents": "match child_exit_status\n| let exited: Exited =>\n_env.out.print(\"Child exit code: \" + exited.exit_code().string())\n| let signaled: Signaled =>\n_env.out.print(\"Child terminated by signal: \" + signaled.signal().string())\nend\n\nProcess portability\u00b6\nThe ProcessMonitor supports spawning processes on Linux, FreeBSD, OSX and\nWindows.\nShutting down ProcessMonitor and external process\u00b6\nWhen a process is spawned using ProcessMonitor, and it is not necessary to\ncommunicate to it any further using stdin and stdout or stderr, calling\ndone_writing() will close stdin to\nthe child process. Processes expecting input will be notified of an EOF on\ntheir stdin and can terminate.\nIf a running program needs to be canceled and the\nProcessMonitor should be shut down, calling\ndispose will terminate the child process\nand clean up all resources."} +{"id": "Pony/src-builtin-unsigned-_55.txt", "contents": "new create(value: U32) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.u32()\n\nnew min_value() => 0\nnew max_value() => 0xFFFF_FFFF\n\nfun next_pow2(): U32 =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): U32 => this\nfun bit_reverse(): U32 => @\"llvm.bitreverse.i32\"(this)\nfun bswap(): U32 => @\"llvm.bswap.i32\"(this)\nfun popcount(): U32 => @\"llvm.ctpop.i32\"(this)\nfun clz(): U32 => @\"llvm.ctlz.i32\"(this, false)\nfun ctz(): U32 => @\"llvm.cttz.i32\"(this, false)\n\nfun clz_unsafe(): U32 =>\n\"\"\"\nUnsafe operation."} +{"id": "Pony/builtin-I32-_32.txt", "contents": "fun box rem_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_105.txt", "contents": "\nGenerator[box->T](\nobject is GenObj[box->T]\nfun generate(rnd: Randomness): GenerateResult[box->T] ? =>\nlet idx = rnd.usize(0, xs.size() - 1)\nlet res = xs(idx)?\nif do_shrink then\n(res, Iter[box->T].repeat_value(res))\nelse\nres\nend\nend)\n\nfun one_of_safe[T](xs: ReadSeq[T], do_shrink: Bool = false): Generator[box->T] ? =>\n\"\"\"\nVersion of `one_of` that will error if `xs` is empty.\n\"\"\"\nFact(xs.size() > 0, \"cannot use one_of_safe on empty ReadSeq\")?\nGenerators.one_of[T](xs, do_shrink)\n"} +{"id": "Pony/net-UDPSocket-_5.txt", "contents": "\nReturns\u00b6\n\nUDPSocket tag^\n\n\nip4\u00b6\n[Source]\nListens for IPv4 datagrams.\nnew tag ip4(\nauth: UDPAuth val,\nnotify: UDPNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nsize: USize val = 1024)\n: UDPSocket tag^\n\nParameters\u00b6\n\nauth: UDPAuth val"} +{"id": "Pony/random-Random-_5.txt", "contents": "\n\nu128\u00b6\n[Source]\nA random integer in [0, 2^128)\nfun ref u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nA random integer in [0, ULong.max_value()]\nfun ref ulong()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ISize-_8.txt", "contents": "\nUSize val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/src-builtin-signed-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/src-files-file_lines-_10.txt", "contents": "\nfun ref _read_line(): String iso^ ? =>\nlet line = _reader.line(where keep_line_breaks = true)?\nlet len = line.size()\n_last_line_length = len\n\n// advance the cursor to the end of the returned line\n_inc_public_file_cursor(len)\n\n// strip trailing line break\nline.truncate(\nlen - if (len >= 2) and (line.at_offset(-2)? == '\\r') then 2 else 1 end)\nconsume line\n\nfun ref _fill_buffer(): Bool =>\n\"\"\"\nread from file and fill the reader-buffer.\n\nReturns `true` if data could be read from the file.\n"} +{"id": "Pony/src-collections-persistent-list-_44.txt", "contents": "fun head(): val->A =>\n\"\"\"\nReturns the head of the list.\n\"\"\"\n_head\n\nfun tail(): List[A] =>\n\"\"\"\nReturns the tail of the list.\n\"\"\"\n_tail\n\nfun val reverse(): List[A] =>\n\"\"\"\nBuilds a new list by reversing the elements in the list.\n\"\"\"\n_reverse(this, Nil[A])\n\nfun val _reverse(l: List[A], acc: List[A]): List[A] =>\n\"\"\""} +{"id": "Pony/builtin-ISize-_39.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , ISize val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/whitespace_3.txt", "contents": "# Semicolons\n\nIn Pony, you don't end an expression with a `;`, unlike C, C++, Java, C#, etc. In fact, you don't need to end it at all! The compiler knows when an expression has finished, like Python or Ruby.\n\nHowever, sometimes it's convenient to put more than one expression on the same line. When you want to do that, you __must__ separate them with a `;`.\n\n__Why? Can't the compiler tell an expression has finished?__ Yes, it can. The compiler doesn't really need the `;`. However, it turns out the programmer does! By requiring a `;` between expressions on the same line, the compiler can catch some pretty common syntax errors for you.\n"} +{"id": "Pony/src-collections-persistent-vec-_24.txt", "contents": "Find the `nth` appearance of `value` from the beginning of the vector,\nstarting at `offset` and examining higher indices, and using the\nsupplied `predicate` for comparisons. Returns the index of the value, or\nraise an error if the value isn't present.\n\nBy default, the search starts at the first element of the vector,\nreturns the first instance of `value` found, and uses object identity\nfor comparison.\n\"\"\"\nvar n: USize = 0\nfor i in mut.Range(offset, _size) do\nif predicate(this(i)?, value) then\nif n == nth then return i end\nn = n + 1\nend\nend\nerror\n\nfun val contains(\nvalue: val->A,"} +{"id": "Pony/builtin-I128-_50.txt", "contents": "I16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_45.txt", "contents": "\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_278.txt", "contents": "fun box netlink_iscsi()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_kobject_uevent\u00b6\n[Source]\nfun box netlink_kobject_uevent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_listen_all_nsid\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-Hashable64-_0.txt", "contents": "\n\n\n\n\n\n\nHashable64\u00b6\n[Source]\nA version of Hashable that returns 64-bit hashes on every platform.\ninterface ref Hashable64\n\nPublic Functions\u00b6\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_socket-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-pony_check-ascii_range-_5.txt", "contents": "primitive ASCIIAll\n\"\"\"\nRepresents all ASCII characters,\nexcluding the NUL (\\x00) character for its special treatment in C strings.\n\"\"\"\nfun apply(): String =>\nASCIIPrintable() + ASCIINonPrintable()\n\nprimitive ASCIIAllWithNUL\n\"\"\"\nRepresents all ASCII characters,\nincluding the NUL (\\x00) character for its special treatment in C strings.\n\"\"\"\nfun apply(): String =>\nASCIIAll() + ASCIINUL()\n\ntype ASCIIRange is\n( ASCIINUL\n| ASCIIDigits\n| ASCIIWhiteSpace"} +{"id": "Pony/src-builtin-asio_event-_0.txt", "contents": "\n\n\n\n\n\n\nasio_event.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-list_node-_14.txt", "contents": "+ my_list_node.apply()?) // My Node item\nend\n\n// Update the item contained in the ListNode\ntry\nmy_list_node.update(\"My updated Node item\")?\nenv.out.print(\"My node has the updated item value: \"\n+ my_list_node.apply()?) // My updated Node item\nend\n// Pop the item from the ListNode\ntry\nmy_list_node.pop()?\nenv.out.print(\"Popped the item from the ListNode\")\nmy_list_node.apply()? // This will error as the item is now None\nelse\nenv.out.print(\"The ListNode has no (None) item.\")\nend\n```\n\"\"\"\nvar _item: (A | None)"} +{"id": "Pony/src-net-udp_socket-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-buffered-reader-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/3_arithmetic_4.txt", "contents": "## Unsafe Integer Arithmetic\n\nUnsafe integer arithmetic comes close to what you can expect from integer arithmetic in C. No checks, _raw speed_, possibilities of overflow, underflow or division by zero. Like in C, overflow, underflow and division by zero scenarios are undefined. Don't rely on the results in these cases. It could be anything and is highly platform specific. Division by zero might even crash your program with a `SIGFPE`. Our suggestion is to use these operators only if you can make sure you can exclude these cases.\n\nHere is a list with all unsafe operations defined on Integers:\n\n---\n\n| Operator | Method | Undefined in case of |\n| -------- | ------------ | ------------------------------------------------------------- |\n| `+~` | `add_unsafe()` | Overflow E.g. `I32.max_value() +~ I32(1)` |\n| `-~` | `sub_unsafe()` | Overflow |\n| `*~` | `mul_unsafe()` | Overflow. |\n| `/~` | `div_unsafe()` | Division by zero and overflow. E.g. `I32.min_value() / I32(-1)` |\n| `%~` | `rem_unsafe()` | Division by zero and overflow. |\n| `%%~` | `mod_unsafe()` | Division by zero and overflow. |\n| `-~` | `neg_unsafe()` | Overflow. E.g. `-~I32.max_value()` |\n| `>>~` | `shr_unsafe()` | If non-zero bits are shifted out. E.g. `I32(1) >>~ U32(2)` |\n| `<<~` | `shl_unsafe()` | If bits differing from the final sign bit are shifted out. |\n"} +{"id": "Pony/9_object-literals_5.txt", "contents": "```\n\nThis produces the same code as:\n\n```pony\nobject iso\nfun apply(s: String): String => \"lambda: \" + s\nend\n```\n\nLambdas can be used to capture from the lexical scope in the same way as object literals can assign from the lexical scope to a field. This is done by adding a second argument list after the parameters:\n\n```pony\nclass Foo\nnew create(env:Env) =>\nfoo({(s: String)(env) => env.out.print(s) })\n\nfun foo(f: {(String)}) =>\nf(\"Hello World\")\n```"} +{"id": "Pony/as_6.txt", "contents": "```\n\nThinking of the `as` keyword as \"an attempt to match that will error if not matched\" is a good mental model to have. If you don't care about handling the \"not matched\" case that causes an error when using `as`, you can rewrite an `as` to use match without an error like:\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet anys = Array[Any ref].>push(Wombat).>push(Capybara)\nfor any in anys.values() do\nmatch any\n| let critter: Critter =>\nenv.out.print(critter.wash())\nend\nend\n```\n\nYou can learn more about matching on type in the [captures section of the match documentation](/pattern-matching/match.md#captures).\n"} +{"id": "Pony/builtin-Array-_9.txt", "contents": "\nsize\u00b6\n[Source]\nThe number of elements in the array.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nspace\u00b6\n[Source]\nThe available space in the array.\nfun box space()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_110.txt", "contents": "// do a trim in place instead of a clear to free up memory\n_pending_writev_windows.trim_in_place(_pending_writev_windows.size())\n_pending_sent = 0\nelse\n// do a trim in place instead of a clear to free up memory\n_pending_writev_posix.trim_in_place(_pending_writev_posix.size())\nend\nreturn true\nelse\nifdef windows then\n// do a trim in place instead of many shifts for efficiency\n_pending_writev_windows.trim_in_place(num_to_send)\n_pending_sent = _pending_sent - num_to_send\nelse\n// do a trim in place instead of many shifts for efficiency\n_pending_writev_posix.trim_in_place(num_to_send)\nend\nend\nend\n"} +{"id": "Pony/src-net-udp_socket-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/3_arithmetic_11.txt", "contents": "# Floating Point\n\nPony default arithmetic on floating point numbers (`F32`, `F64`) behave as defined in the floating point standard IEEE 754.\n\nThat means e.g. that division by `+0` returns `Inf` and by `-0` returns `-Inf`.\n"} +{"id": "Pony/src-files-file_lines-_8.txt", "contents": "is not accounted for. As a result iterating with this class will always return the full\nfile content without gaps or repeated lines.\n\n`min_read_size` determines the minimum amount of bytes to read from the file\nin one go. This class keeps track of the line lengths in the current file\nand uses the length of the last line as amount of bytes to read next, but it\nwill never read less than `min_read_size`.\n\"\"\"\n_file = file\n_buffer_cursor = _file.position()\n_cursor = _file.position()\n_min_read_size = min_read_size\n_last_line_length = min_read_size\n_has_next = _file.valid()\n\nfun ref has_next(): Bool =>\n_has_next\n\nfun ref next(): String iso^ ? =>\n\"\"\""} +{"id": "Pony/src-random-mt-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-pointer-_9.txt", "contents": "Set index i and return the previous value.\n\"\"\"\ncompile_intrinsic\n\nfun _offset(n: USize): this->Pointer[A] =>\n\"\"\"\nReturn a pointer to the n-th element.\n\"\"\"\ncompile_intrinsic\n\nfun tag offset(n: USize): Pointer[A] tag =>\n\"\"\"\nReturn a tag pointer to the n-th element.\n\"\"\"\n_unsafe()._offset(n)\n\nfun tag _element_size(): USize =>\n\"\"\"\nReturn the size of a single element in an array of type A.\n\"\"\""} +{"id": "Pony/src-cli-command_parser-_19.txt", "contents": "Parses all of the command line tokens and env vars and returns a Command,\nor the first SyntaxError.\n\"\"\"\nlet tokens = argv.clone()\ntry tokens.shift()? end // argv[0] is the program name, so skip it\nlet options: Map[String,Option] ref = options.create()\nlet args: Map[String,Arg] ref = args.create()\n_parse_command(\ntokens, options, args,\nEnvVars(envs, _spec.name().upper() + \"_\", true),\nfalse)\n\nfun _fullname(): String =>\nmatch _parent\n| let p: CommandParser box => p._fullname() + \"/\" + _spec.name()\nelse\n_spec.name()\nend\n\nfun _root_spec(): CommandSpec box =>"} +{"id": "Pony/pony_check-IntUnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nIntUnitTest\u00b6\n[Source]\ntype IntUnitTest is\nProperty1UnitTest[IntPropertySample ref] iso\n\nType Alias For\u00b6\n\nProperty1UnitTest[IntPropertySample ref] iso\n\n\n\n\n"} +{"id": "Pony/builtin-I8-_62.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: I8 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Integer-_2.txt", "contents": "F64 val) & Real[B] val)](\na: B)\n: Real[A] val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: Real[A] val^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_296.txt", "contents": "fun box rds_cmsg_rdma_dest()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_rdma_map\u00b6\n[Source]\nfun box rds_cmsg_rdma_map()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_rdma_status\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_20.txt", "contents": ": NetAddress val\n\nReturns\u00b6\n\nNetAddress val\n\n\nexpect\u00b6\n[Source]\nA received call on the notifier must contain exactly qty bytes. If\nqty is zero, the call can contain any amount of data. This has no effect\nif called in the sent notifier callback.\nErrors if qty exceeds the max buffer size as indicated by the\nread_buffer_size supplied when the connection was created.\nfun ref expect(\nqty: USize val = 0)\n: None val ?\n\nParameters\u00b6\n"} +{"id": "Pony/serialisation_8.txt", "contents": "### Fixed Versus Variable Object Sizes\n\nThe programmer must write their custom serialisation and deserialisation code in such a way that it is aware of how many bytes are available in the byte arrays that are passed to the methods. If the objects are always of a fixed size then the functions can read and write that many bytes to the buffer. However, if the objects are of varying sizes (for example, if the object was a string), then the serialized representation must include information that the deserialisation code can use to ensure that it does not read beyond the end of the memory occupied by the object. The custom serialisation system does not provide a mechanism for doing this, so it is up to the program to choose a mechanism and implement it. In the case of a string, the serialisation format could consist of a 4-byte header that encodes the length of the string, followed by a string of the specified length. These additional four bytes must be included in the value returned by `_serialise_space()`. The deserialisation function would then start by reading the first four bytes of the array to obtain the size of the string and then read only that many bytes from the array.\n"} +{"id": "Pony/builtin-F32-_11.txt", "contents": "I16 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nceil\u00b6\n[Source]\nfun box ceil()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/debug-DebugErr-_0.txt", "contents": "\n\n\n\n\n\n\nDebugErr\u00b6\n[Source]\nprimitive val DebugErr\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: DebugErr val^\n\nReturns\u00b6\n\nDebugErr val^"} +{"id": "Pony/net-UDPNotify-_2.txt", "contents": "sock: UDPSocket ref)\n: None val\n\nParameters\u00b6\n\nsock: UDPSocket ref\n\nReturns\u00b6\n\nNone val\n\n\nreceived\u00b6\n[Source]\nCalled when new data is received on the socket.\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8 val] iso,\nfrom: NetAddress val)\n: None val"} +{"id": "Pony/7_type-expressions_2.txt", "contents": "var z = x._2\n```\n\nNote that there's no way to assign to an element of a tuple. Instead, you can just reassign the entire tuple, like this:\n\n```pony\nx = (\"wombat\", x._2)\n```\n\n__Why use a tuple instead of a class?__ Tuples are a way to express a collection of values that doesn't have any associated code or expected behaviour. Basically, if you just need a quick collection of things, maybe to return more than one value from a function, for example, you can use a tuple.\n"} +{"id": "Pony/src-term-ansi_term-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-string-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-F32-_61.txt", "contents": "\nusize\u00b6\nfun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6"} +{"id": "Pony/collections-HashSet-_2.txt", "contents": "fun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nspace\u00b6\n[Source]\nThe available space in the set.\nfun box space()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6"} +{"id": "Pony/net-OSSockOpt-_547.txt", "contents": "fun box tcpolen_cc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_cc_appa\u00b6\n[Source]\nfun box tcpolen_cc_appa()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_eol\u00b6\n[Source]"} +{"id": "Pony/format-FormatUTF32-_0.txt", "contents": "\n\n\n\n\n\n\nFormatUTF32\u00b6\n[Source]\nprimitive val FormatUTF32 is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-collections-map-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/net-UDPSocket-_15.txt", "contents": "2. An undefined value that must be ignored.\nUsage example:\n// listening() is a callback function for class UDPNotify\nfun ref listening(sock: UDPSocket ref) =>\nmatch sock.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)\n| (0, let gbytes: Array[U8] iso) =>\ntry\nlet br = Reader.create().>append(consume gbytes)\nifdef littleendian then\nlet buffer_size = br.u32_le()?\nelse\nlet buffer_size = br.u32_be()?\nend\nend\n| (let errno: U32, _) =>\n// System call failed\nend\n\nfun ref getsockopt(\nlevel: I32 val,"} +{"id": "Pony/builtin-I16-_5.txt", "contents": "\nI16 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-F32-_15.txt", "contents": "F32 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Pointer-_7.txt", "contents": "\n\ngt\u00b6\n[Source]\nfun tag gt(\nthat: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n\nthat: Pointer[A] tag\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nReturns a hash of the address."} +{"id": "Pony/format-FormatExpLarge-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatExpLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatExpLarge val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/collections-persistent-MapIs-_0.txt", "contents": "\n\n\n\n\n\n\nMapIs[K: Any #share, V: Any #share]\u00b6\n[Source]\nA map that uses identity comparison on the key.\ntype MapIs[K: Any #share, V: Any #share] is\nHashMap[K, V, HashIs[K] val] val\n\nType Alias For\u00b6\n\nHashMap[K, V, HashIs[K] val] val\n\n\n\n"} +{"id": "Pony/itertools-Iter-_18.txt", "contents": ".find({(x) => (x % 2) == 0 })\n\n2\nIter[I64]([1; 2; 3; 4].values())\n.find({(x) => (x % 2) == 0 }, 2)\n\n4\nfun ref find(\nf: {(A!): Bool ?}[A] box,\nn: USize val = 1)\n: A! ?\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\nn: USize val = 1\n\nReturns\u00b6\n\nA! ?"} +{"id": "Pony/src-encode-base64-base64-_17.txt", "contents": "out.push(pad)\nend\n\nout.push(pad)\nend\n\nif lineblocks > 0 then\nout.append(linesep)\nend\nelse\nout.clear()\nend\n\nout\n\nfun decode_url[A: Seq[U8] iso = Array[U8] iso](data: ReadSeq[U8]): A^ ? =>\n\"\"\"\nDecode for URLs (RFC 4648).\n\"\"\"\ndecode[A](data, '-', '_')?"} +{"id": "Pony/net-TCPConnectionNotify-_4.txt", "contents": "None val\n\n\nconnected\u00b6\n[Source]\nCalled when we have successfully connected to the server.\nfun ref connected(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n\n\nconnect_failed\u00b6"} +{"id": "Pony/src-process-process_monitor-_29.txt", "contents": "try\n_stdin = _Pipe.outgoing()?\nelse\n_stdin.close()\n_notifier.failed(this, ProcessError(PipeError,\n\"Failed to open pipe for stdin.\"))\nreturn\nend\n\ntry\n_stdout = _Pipe.incoming()?\nelse\n_stdin.close()\n_stdout.close()\n_notifier.failed(this, ProcessError(PipeError,\n\"Failed to open pipe for stdout.\"))\nreturn\nend\n\ntry"} +{"id": "Pony/src-files-path-_44.txt", "contents": "try\nlet i = path.rfind(separator)?.usize()\n(clean(path.trim(0, i)), path.trim(i+separator.size()))\nelse\n(\"\", path)\nend\n\nfun base(path: String, with_ext: Bool = true): String =>\n\"\"\"\nReturn the path after the last separator, or the whole path if there is no\nseparator.\nIf `with_ext` is `false`, the extension as defined by the `ext()` method\nwill be omitted from the result.\n\"\"\"\nlet b = try\npath.trim(path.rfind(sep())?.usize() + 1)\nelse\npath\nend\n"} +{"id": "Pony/builtin-ILong-_9.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-IntPairProperty-_1.txt", "contents": "\nImplements\u00b6\n\nProperty1[IntPairPropertySample ref] ref\n\n\nPublic Functions\u00b6\ngen\u00b6\n[Source]\nfun box gen()\n: Generator[IntPairPropertySample ref] box\n\nReturns\u00b6\n\nGenerator[IntPairPropertySample ref] box\n\n\nproperty\u00b6\n[Source]\nfun ref property("} +{"id": "Pony/builtin-F32-_43.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nne_unsafe\u00b6\nfun box ne_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/net-OSSockOpt-_348.txt", "contents": "fun box sctp_cause_protocol_violation()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_request_refused\u00b6\n[Source]\nfun box sctp_cause_request_refused()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_resource_shortage\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_309.txt", "contents": "fun box rds_info_tcp_sockets()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_canceled\u00b6\n[Source]\nfun box rds_rdma_canceled()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_dontwait\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_362.txt", "contents": "fun box sctp_connect_x()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_connect_x_complete\u00b6\n[Source]\nfun box sctp_connect_x_complete()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_connect_x_delayed\u00b6\n[Source]"} +{"id": "Pony/src-pony_bench-pony_bench-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-process-process_monitor-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-pony_check-generator-_76.txt", "contents": "object is Iterator[GenerateResult[T]]\nfun ref has_next(): Bool => true\nfun ref next(): GenerateResult[T] ? => that.generate(rnd)?\nend\n\nfun value_iter(rnd: Randomness): Iterator[T^] =>\nlet that: GenObj[T] = this\n\nobject is Iterator[T^]\nfun ref has_next(): Bool => true\nfun ref next(): T^ ? =>\nmatch that.generate(rnd)?\n| let value_only: T => consume value_only\n| (let v: T, _) => consume v\nend\nend\n\nfun value_and_shrink_iter(rnd: Randomness): Iterator[ValueAndShrink[T]] =>\nlet that: GenObj[T] = this\n"} +{"id": "Pony/builtin-ILong-_13.txt", "contents": "\nILong val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: ILong val)\n: (ILong val , Bool val)\n"} +{"id": "Pony/src-process-process_monitor-_49.txt", "contents": "_stdin.close_near()\nreturn\nend\nelseif (len.usize() + offset) < data.size() then\n// Send remaining data later.\nnode()? = (data, offset + len.usize())\nreturn\nelse\n// This pending chunk has been fully sent.\n_pending.shift()?\nif (_pending.size() == 0) then\nBackpressure.release(_backpressure_auth)\n// check if the client has signaled it is done\nif _done_writing then\n_stdin.close_near()\nend\nend\nend\nelse\n// handle error"} +{"id": "Pony/annotations_7.txt", "contents": "end\n```\n"} +{"id": "Pony/src-builtin-unsigned-_56.txt", "contents": "If this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i32\"(this, true)\n\nfun ctz_unsafe(): U32 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i32\"(this, true)\n\nfun bitwidth(): U32 => 32\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: U32): U32 => if this < y then this else y end\nfun max(y: U32): U32 => if this > y then this else y end\n\nfun addc(y: U32): (U32, Bool) =>\n@\"llvm.uadd.with.overflow.i32\"(this, y)"} +{"id": "Pony/builtin-F64-_45.txt", "contents": "\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\nge_unsafe\u00b6\nfun box ge_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-pony_check-generator-_133.txt", "contents": "min: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for strings\ngenerated from the bytes returned by the generator `gen`,\nwith a minimum length of `min` (default: 0)\nand a maximum length of `max` (default: 100).\n\"\"\"\nGenerator[String](\nobject is GenObj[String]\nfun generate(rnd: Randomness): GenerateResult[String] =>\nlet size = rnd.usize(min, max)\nlet gen_iter = Iter[U8^](gen.value_iter(rnd))\n.take(size)\nlet arr: Array[U8] iso = recover Array[U8](size) end\nfor b in gen_iter do\narr.push(b)\nend"} +{"id": "Pony/builtin-ILong-_19.txt", "contents": "[Source]\nfun box add_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: ILong val)\n: ILong val ?\n"} +{"id": "Pony/builtin-String-_46.txt", "contents": "\nNone val\n\n\ninsert\u00b6\n[Source]\nReturns a version of the string with the given string inserted at the given\noffset.\nfun box insert(\noffset: ISize val,\nthat: String val)\n: String iso^\n\nParameters\u00b6\n\noffset: ISize val\nthat: String val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Less-_3.txt", "contents": "Parameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-Sort-_2.txt", "contents": "create\u00b6\n[Source]\nnew val create()\n: Sort[A, B] val^\n\nReturns\u00b6\n\nSort[A, B] val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nSort the given seq.\nfun box apply(\na: A)\n: A^\n\nParameters\u00b6\n"} +{"id": "Pony/src-time-timers-_11.txt", "contents": "new create(slop: USize = 20) =>\n\"\"\"\nCreate a timer handler with the specified number of slop bits. No slop bits\nmeans trying for nanosecond resolution. 10 slop bits is approximately\nmicrosecond resolution, 20 slop bits is approximately millisecond\nresolution.\n\"\"\"\n_slop = slop\n_set_time()\n\nfor i in Range(0, _wheels()) do\n_wheel.push(_TimingWheel(i))\nend\n\nbe apply(timer: Timer iso) =>\n\"\"\"\nSets a timer. Fire it if need be, schedule it on the right timing wheel,\nthen rearm the timer.\n\"\"\"\nlet timer': Timer ref = consume timer"} +{"id": "Pony/garbage-collection_0.txt", "contents": "# Garbage Collection with Pony-ORCA\n\nPony-ORCA is a fully concurrent protocol for garbage collection in the actor paradigm. It allows cheap and small actors to perform garbage collection concurrently with any number of other actors, and this number can go into the millions since one actor needs only 256 bytes on 64bit systems. It does not require any form of synchronization across actors except those introduced through the actor paradigm, i.e. **message send** and **message receive**.\n\nPony-ORCA, yes _the killer whale_, is based on ideas from ownership and deferred, distributed, weighted **reference counting**. It adapts messaging systems of actors to keep the reference count consistent. The main challenges in concurrent garbage collection are the detection of cycles of sleeping actors in the actor's graph, in the presence of the concurrent mutation of this graph. With message passing, you get deferred direct reference counting, a dedicated actor for the detection of (cyclic) garbage, and a confirmation protocol (to deal with the mutation of the actor graph).\n\n1. _Soundness_: the technique collects only dead actors.\n\n2. _Completeness_: the technique collects all dead actors eventually.\n\n3. _Concurrency_: the technique does not require a stop-the-world step, clocks, time stamps, versioning, thread coordination, actor introspection, shared memory, read/write barriers or cache coherency.\n\nThe type system ensures at compile time that your program can **never have data races**. It's **deadlock free**... Because Pony has **no locks**!\n\nWhen an actor has completed local execution and has no pending messages on its queue, it is _blocked_. An actor is _dead_, if it is blocked and all actors that have a reference to it are blocked, transitively. A collection of dead actors depends on being able to collect closed cycles of blocked actors.\n\nThe Pony type system guarantees race and deadlock free concurrency and soundness by adhering to the following principles:\n"} +{"id": "Pony/src-collections-persistent-vec-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/0_at-a-glance_0.txt", "contents": "# The Pony Type System at a Glance\n\nPony is a _statically typed_ language, like Java, C#, C++, and many others. This means the compiler knows the type of everything in your program. This is different from _dynamically typed_ languages, such as Python, Lua, JavaScript, and Ruby.\n"} +{"id": "Pony/src-files-file-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-promises-promise-_36.txt", "contents": "let p2 = Promise[String val]\nlet p3 = Promise[String val]\n\np3.join([p1; p2].values())\n.next[None]({(a: Array[String val] val) =>\nfor s in a.values() do\nenv.out.print(s)\nend\n})\n\np2(\"second\")\np3(\"third\")\np1(\"first\")\n```\n\"\"\"\nPromises[A].join(\n[this]\n.> concat(ps)\n.values())\n"} +{"id": "Pony/src-cli-command_spec-_33.txt", "contents": "let help_option = OptionSpec.bool(_help_name, _help_info, 'h', false)\n_options.update(_help_name, help_option)\nif is_parent() then\nlet help_cmd = CommandSpec.leaf(_help_name, \"\", Array[OptionSpec](), [\nArgSpec.string(\"command\" where default' = \"\")\n])?\n_commands.update(_help_name, help_cmd)\nend\n\nfun name(): String =>\n\"\"\"\nReturns the name of this command.\n\"\"\"\n_name\n\nfun descr(): String =>\n\"\"\"\nReturns the description for this command.\n\"\"\"\n_descr"} +{"id": "Pony/src-pony_test-test_helper-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-random-random-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-OSSockOpt-_607.txt", "contents": "fun box tipc_max_link_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_max_media_name\u00b6\n[Source]\nfun box tipc_max_media_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_max_user_msg_size\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_24.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/ponycheck_6.txt", "contents": "# Additional resources\n\nYou can learn more about PonyCheck specifics by checking out the [API documentation](https://stdlib.ponylang.io/pony_check--index/). You can also find some [example tests](https://github.com/ponylang/ponyc/tree/main/examples/pony_check) in [ponyc GitHub repository](https://github.com/ponylang/ponyc).\n\nTo learn more about testing in Pony in general, there's a [testing section](http://patterns.ponylang.io/testing.html) in the [Pony Patterns](http://patterns.ponylang.io/) book which isn't specific to `PonyCheck`.\n"} +{"id": "Pony/src-format-format-_13.txt", "contents": "end\n\ns .> recalc()\nend\n\nfun int[A: (Int & Integer[A])](\nx: A,\nfmt: FormatInt = FormatDefault,\nprefix: PrefixNumber = PrefixDefault,\nprec: USize = -1,\nwidth: USize = 0,\nalign: Align = AlignRight,\nfill: U32 = ' ')\n: String iso^\n=>\nlet zero = x.from[USize](0)\n(let abs, let neg) = if x < zero then (-x, true) else (x, false) end\n\niftype A <: U128 then\n_FormatInt.u128(x.u128(), false, fmt, prefix, prec, width, align, fill)"} +{"id": "Pony/src-net-tcp_connection-_117.txt", "contents": "@pony_asio_event_set_readable(_event, false)\n_readable = false\n_reading = false\n@pony_asio_event_resubscribe_read(_event)\nreturn\nend\n\n_read_buf_offset = _read_buf_offset + len\nsum = sum + len\nend\nelse\n// The socket has been closed from the other side.\n_shutdown_peer = true\nhard_close()\nend\nend\n\n_reading = false\n\nfun ref _notify_connecting() =>"} +{"id": "Pony/builtin-String-_68.txt", "contents": "Returns\u00b6\n\nI8 val ?\n\n\ni16\u00b6\n[Source]\nfun box i16(\nbase: U8 val = 0)\n: I16 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nI16 val ?\n\n"} +{"id": "Pony/process-Signaled-_0.txt", "contents": "\n\n\n\n\n\n\nSignaled\u00b6\n[Source]\nProcess exit status: Process was terminated by a signal.\nclass val Signaled is\nStringable box,\nEquatable[(Exited val | Signaled val)] ref\n\nImplements\u00b6\n\nStringable box\nEquatable[(Exited val | Signaled val)] ref\n\n"} +{"id": "Pony/src-collections-persistent-list-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-files-file-_53.txt", "contents": "Returns false if the file wasn't opened with write permission.\nRaises an error if not all the bytes were written.\nReturns true if it sent all pending data.\nReturns num_processed and new pending_total also.\n\"\"\"\nvar num_to_send: I32 = 0\nvar num_sent: USize = 0\nvar bytes_to_send: USize = 0\nvar pending_total = _pending_writev_total\n\nif (not writeable) or (_fd == -1) then\nreturn (false, num_sent, pending_total)\nend\n\n// TODO: Make writev_batch_size user configurable\nlet writev_batch_size = @pony_os_writev_max()\nwhile pending_total > 0 do\n// Determine the number of bytes and buffers to send.\nnum_to_send = _pending_writev.size().i32() - num_sent.i32()\nif num_to_send <= writev_batch_size then"} +{"id": "Pony/pony_check-Property1UnitTest-_7.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_275.txt", "contents": "fun box netlink_ecryptfs()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_fib_lookup\u00b6\n[Source]\nfun box netlink_fib_lookup()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_firewall\u00b6\n[Source]"} +{"id": "Pony/process-StartProcessAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: StartProcessAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: StartProcessAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/builtin-ULong-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_18.txt", "contents": "F64 val\n\n\nfinite\u00b6\n[Source]\nCheck whether this number is finite, ie not +/-infinity and not NaN.\nfun box finite()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\ninfinite\u00b6\n[Source]\nCheck whether this number is +/-infinity\nfun box infinite()\n: Bool val\n"} +{"id": "Pony/serialise-SerialiseAuth-_2.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: SerialiseAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: SerialiseAuth val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-collections-persistent-vec-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_569.txt", "contents": "fun box tcp_cookie_out_never()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_pair_size\u00b6\n[Source]\nfun box tcp_cookie_pair_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_transactions\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_52.txt", "contents": "The result has the sign of the dividend.\n\nIf y is `0` or the operation overflows, this function errors.\n\"\"\"\n\nfun divrem_partial(y: A): (A, A) ?\n\"\"\"\nDivides this number by y and calculates the remainder of the operation.\n\nIf y is `0` or the operation overflows, this function errors.\n\"\"\"\n\nfun fld_partial(y: A): A ?\n\"\"\"\nFloored integer division, rounded towards negative infinity.\n\nIf y is `0` or the operation overflows, this function errors\n\"\"\"\n\nfun mod_partial(y: A): A ?"} +{"id": "Pony/src-files-file-_43.txt", "contents": "Internal constructor from a file descriptor and a path.\n\"\"\"\nif not from.caps(FileRead) or (fd == -1) then\nerror\nend\n\npath = from\nwriteable = from.caps(FileWrite)\n_fd = fd\n\n_FileDes.set_rights(_fd, path, writeable)?\n\nfun errno(): FileErrNo =>\n\"\"\"\nReturns the last error code set for this File\n\"\"\"\n_errno\n\nfun ref clear_errno() =>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_305.txt", "contents": "fun box rds_info_iwarp_connections()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_last\u00b6\n[Source]\nfun box rds_info_last()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_message_flag_ack\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_help-_0.txt", "contents": "\n\n\n\n\n\n\ncommand_help.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-files-file-_39.txt", "contents": "\nnew create(from: FilePath) =>\n\"\"\"\nAttempt to open for read/write, creating if it doesn't exist, preserving\nthe contents if it does exist.\nSet errno according to result.\n\"\"\"\npath = from\nwriteable = true\n_fd = -1\n\nif not from.caps(FileRead) or not from.caps(FileWrite) then\n_errno = FileError\nelse\nvar flags: I32 = @ponyint_o_rdwr()\nlet mode = FileMode.u32() // default file permissions\nif not path.exists() then\nif not path.caps(FileCreate) then\n_errno = FileError\nelse"} +{"id": "Pony/builtin-String-_61.txt", "contents": "\nString iso^\n\n\ncompare\u00b6\n[Source]\nLexically compare two strings.\nfun box compare(\nthat: String box)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: String box\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n"} +{"id": "Pony/src-builtin-signed-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/src-collections-list-_71.txt", "contents": "```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.concat(other_list.values()) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is unchanged\n```\n\"\"\"\ntry\nfor i in Range(0, offset) do\nif iter.has_next() then\niter.next()?\nelse\nreturn\nend\nend\n\nfor i in Range(0, len) do\nif iter.has_next() then\npush(iter.next()?)\nelse\nreturn"} +{"id": "Pony/files-FileCreate-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_bench-Benchmark-_0.txt", "contents": "\n\n\n\n\n\n\nBenchmark\u00b6\n[Source]\ntype Benchmark is\n(MicroBenchmark iso | AsyncMicroBenchmark iso)\n\nType Alias For\u00b6\n\n(MicroBenchmark iso | AsyncMicroBenchmark iso)\n\n\n\n\n"} +{"id": "Pony/src-collections-persistent-set-_15.txt", "contents": "\"\"\"\nfor v in values() do\nif not that.contains(v) then return false end\nend\ntrue\n\nfun gt(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturn true if every element in that is also in this, and this has more\nelements than that.\n\"\"\"\n(size() > that.size()) and (that <= this)\n\nfun ge(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturn true if every element in that is also in this.\n\"\"\"\nthat <= this\n\nfun values(): Iterator[A]^ =>"} +{"id": "Pony/src-capsicum-cap_rights-_0.txt", "contents": "\n\n\n\n\n\n\ncap_rights.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files-File-_21.txt", "contents": "\nBool val\n\n\nlines\u00b6\n[Source]\nReturns an iterator for reading lines from the file.\nfun ref lines()\n: FileLines ref\n\nReturns\u00b6\n\nFileLines ref\n\n\ndispose\u00b6\n[Source]\nClose the file. Future operations will do nothing.\nfun ref dispose()\n: None val"} +{"id": "Pony/src-files-file_info-_9.txt", "contents": "let access_time: (I64, I64) = (0, 0)\n\"\"\"\nTime of last access as a tuple of seconds and nanoseconds since the epoch:\n\n```pony\n(let a_secs: I64, let a_nanos: I64) = file_info.access_time\n```\n\"\"\"\n\nlet modified_time: (I64, I64) = (0, 0)\n\"\"\"\nTime of last modification as tuple of seconds and nanoseconds since the epoch:\n\n```pony\n(let m_secs: I64, let m_nanos: I64) = file_info.modified_time\n```\n\"\"\"\n\nlet change_time: (I64, I64) = (0, 0)\n\"\"\""} +{"id": "Pony/term-Readline-_11.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\ninsert\u00b6\n[Source]\nfun ref insert(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/src-cli-command_parser-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-backpressure-backpressure-_0.txt", "contents": "\n\n\n\n\n\n\nbackpressure.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/itertools-Iter-_40.txt", "contents": "zip3[B: B, C: C, D: D]\u00b6\n[Source]\nZip four iterators together so that each call to next() results in\na tuple with the next value of each of the iterators. The number of\nitems returned is the minimum of the number of items returned by the\niterators.\nfun ref zip3[B: B, C: C, D: D](\ni2: Iterator[B] ref,\ni3: Iterator[C] ref,\ni4: Iterator[D] ref)\n: Iter[(A , B , C , D)] ref^\n\nParameters\u00b6\n\ni2: Iterator[B] ref\ni3: Iterator[C] ref\ni4: Iterator[D] ref\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileChmod-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_51.txt", "contents": "# Example program\nThere are a _lot_ of functions in List. The following code picks out a few common examples.\n\nIt outputs:\n\nA new empty list has 0 nodes.\nAdding one node to our empty list means it now has a size of 1.\nThe first (index 0) node has the value: A single String\nA list created by appending our second single-node list onto our first has size: 2\nThe List nodes of our first list are now:\nA single String\nAnother String\nAppend *moves* the nodes from the second list so that now has 0 nodes.\nA list created from an array of three strings has size: 3\nFirst\nSecond\nThird\nMapping over our three-node list produces a new list of size: 3\nEach node-value in the resulting list is now far more exciting:\nFirst BOOM!"} +{"id": "Pony/serialisation_1.txt", "contents": "\nnew create(s: String, u: U32) =>\n_s = s\n_u = u\n\nfun eq(foo: Foo box): Bool =>\n(_s == foo._s) and (_u == foo._u)\n\nactor Main\nnew create(env: Env) =>\ntry\n// get serialization authorities\nlet serialise = SerialiseAuth(env.root)\nlet output = OutputSerialisedAuth(env.root)\nlet deserialise = DeserialiseAuth(env.root)\nlet input = InputSerialisedAuth(env.root)\n\nlet foo1 = Foo(\"abc\", 123)\n\n// serialisation"} +{"id": "Pony/src-builtin-string-_168.txt", "contents": "if the result would over- or underflow,\nthe offset exceeds the size of this string or\nthere are leftover characters in the string after conversion.\n\nExamples:\n\n```pony\n\"1.5\".f32()? == F32(1.5)\n\"1.19208e-07\".f32()? == F32(1.19208e-07)\n\"NaN\".f32()?.nan() == true\n```\n\"\"\"\nlet index = offset_to_index(offset)\nif index < _size then\nlet ptr = this.cstring()\nvar endp: Pointer[U8] box = Pointer[U8]\n@pony_os_clear_errno()\nlet res = @strtof(ptr.offset(index), addressof endp)\nlet errno: I32 = @pony_os_errno()\nif (errno != 0) or (endp != ptr.offset(_size)) then"} +{"id": "Pony/net-DNSAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: DNSAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: DNSAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/src-builtin-array-_61.txt", "contents": "if _size.next_pow2() != _alloc.next_pow2() then\n_alloc = _size.next_pow2()\nlet old_ptr = _ptr = Pointer[A]._alloc(_alloc)\nold_ptr._copy_to(_ptr._convert[A!](), _size)\nend\nelseif _size < _alloc then\n_alloc = _size\nlet old_ptr = _ptr = Pointer[A]._alloc(_alloc)\nold_ptr._copy_to(_ptr._convert[A!](), _size)\nend\n\nfun ref undefined[B: (A & Real[B] val & Number) = A](len: USize) =>\n\"\"\"\nResize to len elements, populating previously empty elements with random\nmemory. This is only allowed for an array of numbers.\n\"\"\"\nreserve(len)\n_size = len\n\nfun read_u8[B: (A & Real[B] val & U8) = A](offset: USize): U8 ? =>"} +{"id": "Pony/collections-HashMap-_14.txt", "contents": "Returns\u00b6\n\nUSize val ?\n\n\nindex\u00b6\n[Source]\nReturns the key and value at a given index.\nRaise an error if the index is not populated.\nfun box index(\ni: USize val)\n: (this->K , this->V) ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\n(this->K , this->V) ?"} +{"id": "Pony/collections-SetValues-_2.txt", "contents": "fun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturns the next value, or raises an error if there isn't one. If values\nare added during iteration, this may not return all values.\nfun ref next()\n: S->A ?\n\nReturns\u00b6\n\nS->A ?\n\n"} +{"id": "Pony/net-OSSockOpt-_322.txt", "contents": "fun box rose_max_digis()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_mtu\u00b6\n[Source]\nfun box rose_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_network_congestion\u00b6\n[Source]"} +{"id": "Pony/pony_test--index-_6.txt", "contents": "failed.\nExclusion groups\u00b6\nBy default all tests are run concurrently. This may be a problem for some\ntests, eg if they manipulate an external file or use a system resource. To fix\nthis issue any number of tests may be put into an exclusion group.\nNo tests that are in the same exclusion group will be run concurrently.\nExclusion groups are identified by name, arbitrary strings may be used.\nMultiple exclusion groups may be used and tests in different groups may run\nconcurrently. Tests that do not specify an exclusion group may be run\nconcurrently with any other tests.\nThe command line option \"--sequential\" prevents any tests from running\nconcurrently, regardless of exclusion groups. This is intended for debugging\nrather than standard use.\nLabels\u00b6\nTest can have label. Labels are used to filter which tests are run, by setting\ncommand line argument --label=[some custom label]. It can be used to separate\nunit tests from integration tests.\nBy default label is empty. You can set it up by overriding label(): String\nmethod in unit test.\nuse \"pony_test\""} +{"id": "Pony/src-builtin-string-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-USize-_24.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_test--index-_3.txt", "contents": "to either of these constructors to perform additional tasks.\nTest names\u00b6\nTests are identified by names, which are used when printing test results and on\nthe command line to select which tests to run. These names are independent of\nthe names of the test classes in the Pony source code.\nArbitrary strings can be used for these names, but for large projects it is\nstrongly recommended to use a hierarchical naming scheme to make it easier to\nselect groups of tests.\nYou can skip any tests whose names start with a given string by using the\n--exclude=[prefix] command line option.\nYou can run only tests whose names start with a given string by using the\n--only=[prefix] command line option.\nAggregation\u00b6\nOften it is desirable to run a collection of unit tests from multiple different\nsource files. For example, if several packages within a bundle each have their\nown unit tests it may be useful to run all tests for the bundle together.\nThis can be achieved by writing an aggregate test list class, which calls the\nlist function for each package. The following is an example that aggregates the\ntests from packages foo and bar.\nuse \"pony_test\""} +{"id": "Pony/pony_check-ASCIIPrintable-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIPrintable\u00b6\n[Source]\nprimitive val ASCIIPrintable\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIPrintable val^\n\nReturns\u00b6\n\nASCIIPrintable val^"} +{"id": "Pony/src-cli-command_help-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/files-FileInfo-_4.txt", "contents": "let change_time: (I64 val , I64 val)\u00b6\n[Source]\nTime of the last change either the attributes (number of links, owner,\ngroup, file mode, ...) or the content of filepath\nas a tuple of seconds and nanoseconds since the epoch:\n(let c_secs: I64, let c_nanos: I64) = file_info.change_time\n\nOn Windows this will be the file creation time.\n\nlet file: Bool val\u00b6\n[Source]\ntrue if filepath points to an a regular file.\n\nlet directory: Bool val\u00b6\n[Source]\ntrue if filepath points to a directory.\n\nlet pipe: Bool val\u00b6\n[Source]\ntrue if filepath points to a named pipe."} +{"id": "Pony/collections-HashSet-_20.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nReturns true if every element in that is also in this.\nfun box ge(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/pony_check-Property1UnitTest-_3.txt", "contents": "\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\napply\u00b6\n[Source]\nfun ref apply(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n"} +{"id": "Pony/src-itertools-iter-_71.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.count()\n```\n`3`\n\"\"\"\nvar sum: USize = 0\nfor _ in _iter do\nsum = sum + 1\nend\nsum\n\nfun ref cycle(): Iter[A!]^ =>\n\"\"\"\nRepeatedly cycle through the values from the iterator.\n\nWARNING: The values returned by the original iterator are cached, so\nthe input iterator should be finite.\n"} +{"id": "Pony/src-files-directory-_0.txt", "contents": "\n\n\n\n\n\n\ndirectory.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/5_structs_2.txt", "contents": "# What goes in a struct?\n\nThe same as a class! A struct is composed of some combination of:\n\n1. Fields\n2. Constructors\n3. Functions\n"} +{"id": "Pony/src-pony_bench-benchmark-_9.txt", "contents": "max_sample_time = max_sample_time'\n\nclass iso OverheadBenchmark is MicroBenchmark\n\"\"\"\nDefault benchmark for measuring synchronous overhead.\n\"\"\"\nfun name(): String =>\n\"Benchmark Overhead\"\n\nfun ref apply() =>\nDoNotOptimise[None](None)\nDoNotOptimise.observe()\n\nclass iso AsyncOverheadBenchmark is AsyncMicroBenchmark\n\"\"\"\nDefault benchmark for measuring asynchronous overhead.\n\"\"\"\nfun name(): String =>\n\"Benchmark Overhead\"\n"} +{"id": "Pony/builtin-I128-_49.txt", "contents": "Bool val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/random-SplitMix64-_6.txt", "contents": ": U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun ref ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun ref usize()"} +{"id": "Pony/builtin-FloatingPoint-_61.txt", "contents": "U128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_18.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , Bool val)\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_stream-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-collections-reverse-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-encode-base64-base64-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/signals-Sig-_19.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Sig val)\n: Bool val\n\nParameters\u00b6\n\nthat: Sig val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/builtin-U32-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: U32 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_parser-_21.txt", "contents": "\nwhile tokens.size() > 0 do\nlet token = try tokens.shift()? else \"\" end\nif (token == \"--\") and (opt_stop == false) then\nopt_stop = true\n\nelseif not opt_stop and (token.compare_sub(\"--\", 2, 0) == Equal) then\nmatch _parse_long_option(token.substring(2), tokens)\n| let o: Option =>\nif o.spec()._typ_p().is_seq() then\noptions.upsert(o.spec().name(), o, {(x, n) => x._append(n) })\nelse\noptions.update(o.spec().name(), o)\nend\n| let se: SyntaxError => return se\nend\n\nelseif not opt_stop and\n((token.compare_sub(\"-\", 1, 0) == Equal) and (token.size() > 1)) then\nmatch _parse_short_options(token.substring(1), tokens)"} +{"id": "Pony/pony_check-Randomness-_5.txt", "contents": "fun ref u64(\nmin: U64 val = call,\nmax: U64 val = call)\n: U64 val\n\nParameters\u00b6\n\nmin: U64 val = call\nmax: U64 val = call\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nGenerate a U128 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/src-builtin-array-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/src-pony_check-generator-_70.txt", "contents": "1392\n1393\n1394\n1395\n1396\n1397\n1398\n1399\n1400\n1401\n1402\n1403\n1404\n1405\n1406\n1407\n1408\n1409\n1410\n1411"} +{"id": "Pony/builtin-U64-_45.txt", "contents": "fun box lt(\ny: U64 val)\n: Bool val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: U64 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_29.txt", "contents": "fun box ipproto_ipcv()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipeip\u00b6\n[Source]\nfun box ipproto_ipeip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipip\u00b6\n[Source]"} +{"id": "Pony/generics-and-reference-capabilities_4.txt", "contents": "actor Main\nnew create(env:Env) =>\nlet a = Foo(recover ref String end)\nenv.out.print(a.get().string())\na.set(recover ref String end)\nenv.out.print(a.get().string())\n```\n\nThat compiles and runs, so `ref` is valid now. The real test though is `iso`. Let's convert the class to `iso` and walk through what is needed to get it to compile. We'll then revisit our generic class to get it working:\n"} +{"id": "Pony/guarantees_3.txt", "contents": "# Immutable reference capabilities\n\nThe __immutable__ reference capabilities are `val` and `box`. These reference capabilities are __immutable__ because they can be used to read from an object, but not to write to it.\n\n* If an actor has a `val` variable, no other variable can be used by _any_ actor to write to that object. This means that the object can't _ever_ change. It is _globally immutable_.\n* If an actor has a `box` variable, no other variable can be used by _other_ actors to write to that object. This means that other actors may be able to read the object and other variables in the same actor may be able to write to it (although not both). In either case, it is safe for us to read. The object is _locally immutable_.\n\n__Why can they be used to read but not write?__ Because these reference capabilities only stop _other_ actors from writing to the object. That means there is no guarantee that _other_ actors aren't reading from the object, which means it's not safe for us to write to it. It's safe for more than one actor to read from an object at the same time though, so we're allowed to do that.\n"} +{"id": "Pony/src-builtin-signed-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-pony_check-randomness-_15.txt", "contents": "min + _random.int((max - min).u64() + 1).u32()\nend\n\nfun ref u64(min: U64 = U64.min_value(), max: U64 = U64.max_value()): U64 =>\n\"\"\"\nGenerate a U64 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nif (min == U64.min_value()) and (max == U64.max_value()) then\n_random.u64()\nelseif min > U32.max_value().u64() then\n(u32((min >> 32).u32(), (max >> 32).u32()).u64() << 32) or _random.u32().u64()\nelseif max > U32.max_value().u64() then\nlet high = (u32((min >> 32).u32(), (max >> 32).u32()).u64() << 32).u64()\nlet low =\nif high > 0 then\n_random.u32().u64()\nelse"} +{"id": "Pony/src-pony_bench-_runner-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161use \"time\"\n\nuse @pony_ctx[Pointer[None]]()\nuse @pony_triggergc[None](ctx: Pointer[None])\n\ntrait tag _Runner\nbe apply()\n\nactor _RunSync is _Runner\nlet _ponybench: PonyBench\nembed _aggregator: _Aggregator"} +{"id": "Pony/net-OSSockOpt-_338.txt", "contents": "fun box sctp_auth_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_autoclose\u00b6\n[Source]\nfun box sctp_autoclose()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auto_asconf\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-tcp_connection-_103.txt", "contents": "_pending_writes()\nend\nend\n\nfun ref _complete_writes(len: U32) =>\n\"\"\"\nThe OS has informed us that `len` bytes of pending writes have completed.\nThis occurs only with IOCP on Windows.\n\"\"\"\nifdef windows then\nif len == 0 then\n// IOCP reported a failed write on this chunk. Non-graceful shutdown.\nhard_close()\nreturn\nend\n\ntry\n_manage_pending_buffer(len.usize(),\n_pending_writev_total, _pending_writev_windows.size())?\nend"} +{"id": "Pony/src-serialise-serialise-_11.txt", "contents": "does not allow the holder to serialise objects or examine serialised data.\n\"\"\"\nnew create(auth: AmbientAuth) =>\nNone\n\nprimitive OutputSerialisedAuth\n\"\"\"\nThis is a capability token that allows the holder to examine serialised data.\nThis should only be provided to types that need to write serialised data to\nsome output stream, such as a file or socket. A type with the [SerialiseAuth](serialise-SerialiseAuth.md)\ncapability should usually not also have OutputSerialisedAuth, as the\ncombination gives the holder the ability to examine the bitwise contents of\nany object it has a reference to.\n\"\"\"\nnew create(auth: AmbientAuth) =>\nNone\n\nprimitive InputSerialisedAuth\n\"\"\"\nThis is a capability token that allows the holder to treat arbitrary"} +{"id": "Pony/src-collections-list-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/cli-ArgSpec-_7.txt", "contents": "descr': String val = \"\")\n: ArgSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\n\nReturns\u00b6\n\nArgSpec val^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nReturns the name of this arg.\nfun box name()\n: String val\n"} +{"id": "Pony/src-buffered-writer-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/files-CreateFile-_3.txt", "contents": "[Source]\nfun box ne(\nthat: CreateFile val)\n: Bool val\n\nParameters\u00b6\n\nthat: CreateFile val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-persistent-list-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-net-tcp_listener-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-net-udp_socket-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-collections-set-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/10_partial-application_0.txt", "contents": "# Partial Application\n\nPartial application lets us supply _some_ of the arguments to a constructor, function, or behaviour, and get back something that lets us supply the rest of the arguments later.\n"} +{"id": "Pony/src-term-readline-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-collections-list-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/builtin-ISize-_49.txt", "contents": "\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/whitespace_2.txt", "contents": "```pony\na\n-b\n```\n\nThat means \"first do a, then, in a new expression, do a unary negation of b\".\n"} +{"id": "Pony/src-pony_check-generator-_121.txt", "contents": "that._int_shrink[U8](consume u, min)\nend)\n\nfun u16(\nmin: U16 = U16.min_value(),\nmax: U16 = U16.max_value())\n: Generator[U16]\n=>\n\"\"\"\ncreate a generator for U16 values\n\"\"\"\nlet that = this\nGenerator[U16](\nobject is GenObj[U16]\nfun generate(rnd: Randomness): U16^ =>\nrnd.u16(min, max)\n\nfun shrink(u: U16): ValueAndShrink[U16] =>\nthat._int_shrink[U16](consume u, min)\nend)"} +{"id": "Pony/src-builtin-array-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/pony_check-Property3-_0.txt", "contents": "\n\n\n\n\n\n\nProperty3[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\ntrait ref Property3[T1: T1, T2: T2, T3: T3] is\nProperty1[(T1 , T2 , T3)] ref\n\nImplements\u00b6\n\nProperty1[(T1 , T2 , T3)] ref\n\n\nPublic Functions\u00b6\ngen1\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-bool-_0.txt", "contents": "\n\n\n\n\n\n\nbool.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-files-path-_51.txt", "contents": "end\nend\n\ns\nelse\npath\nend\n\nfun to_slash(path: String): String =>\n\"\"\"\nChanges each OS specific separator in the path to /.\n\"\"\"\nifdef windows then\nlet s = path.clone()\nlet len = s.size()\nvar i = USize(0)\n\ntry\nwhile i < len do\nif s(i)? == '\\\\' then"} +{"id": "Pony/builtin-Real-_11.txt", "contents": "Parameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6"} +{"id": "Pony/src-net-ossockopt-_103.txt", "contents": "fun rose_qbitincl():I32 => @pony_os_sockopt_option(I32(502))\nfun rose_remote_procedure():I32 => @pony_os_sockopt_option(I32(503))\nfun rose_ship_absent():I32 => @pony_os_sockopt_option(I32(504))\nfun rose_t1():I32 => @pony_os_sockopt_option(I32(505))\nfun rose_t2():I32 => @pony_os_sockopt_option(I32(506))\nfun rose_t3():I32 => @pony_os_sockopt_option(I32(507))\nfun scm_hci_raw_direction():I32 => @pony_os_sockopt_option(I32(508))\nfun scm_timestamp():I32 => @pony_os_sockopt_option(I32(509))\nfun scm_timestamping():I32 => @pony_os_sockopt_option(I32(510))\nfun scm_timestampns():I32 => @pony_os_sockopt_option(I32(511))\nfun scm_wifi_status():I32 => @pony_os_sockopt_option(I32(512))\nfun sctp_abort_association():I32 => @pony_os_sockopt_option(I32(513))\nfun sctp_adaptation_layer():I32 => @pony_os_sockopt_option(I32(514))\nfun sctp_adaption_layer():I32 => @pony_os_sockopt_option(I32(515))\nfun sctp_add_streams():I32 => @pony_os_sockopt_option(I32(516))\nfun sctp_add_vrf_id():I32 => @pony_os_sockopt_option(I32(517))\nfun sctp_asconf():I32 => @pony_os_sockopt_option(I32(518))\nfun sctp_asconf_ack():I32 => @pony_os_sockopt_option(I32(519))\nfun sctp_asconf_supported():I32 => @pony_os_sockopt_option(I32(520))\nfun sctp_associnfo():I32 => @pony_os_sockopt_option(I32(521))"} +{"id": "Pony/collections-persistent-Cons-_15.txt", "contents": "Builds a list by dropping the first n elements.\nfun val drop(\nn: USize val)\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\ndrop_while\u00b6\n[Source]\nBuilds a list by dropping elements from the front of the list until one\nfails to satisfy the provided predicate.\nfun val drop_while(\nf: {(val->A): Bool}[A] box)"} +{"id": "Pony/src-pony_check-for_all-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-UDPNotify-_4.txt", "contents": "\nsock: UDPSocket ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/promises-RejectAlways-_1.txt", "contents": "RejectAlways[A] iso^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply()\n: A ?\n\nReturns\u00b6\n\nA ?\n\n\n\n\n\n\n\n"} +{"id": "Pony/capsicum-Cap-_8.txt", "contents": "fun box mmap_wx()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_rwx\u00b6\n[Source]\nfun box mmap_rwx()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ncreat\u00b6\n[Source]"} +{"id": "Pony/capability-matrix_1.txt", "contents": "# Local and global aliases\n\nBefore anything else, we want to clarify what we mean by \"local\" and \"global\" aliases.\n\nA local alias is a reference to the same variable that exists in the same actor. Whenever you pass a value around, and it's not the argument of an actor's behavior, this is the kind of alias we are working with.\n\nOn the other hand, a global alias is a reference to the same variable that can exist in a _different_ actor. That is, it describes the properties of how two or more actors could interact with the same reference.\n\nEach reference capability in Pony is actually a pair of local guarantees and global guarantees. For instance, `ref` doesn't deny any read/write capabilities inside the actor, but denies other actors from reading or writing to that reference.\n\nYou may recall from the [Reference Capability Guarantees](guarantees.md) section that mutable references cannot be safely shared between actors, while immutable references can be read by multiple actors. In general, global properties are always as restrictive or more restrictive than the local properties to that reference - what is denied globally must also be denied locally. For example, it's not possible to write to an immutable reference in either a global or local alias. It's also not possible to read from or write to an opaque reference, `tag`. Therefore, some combinations of local and global aliases are impossible, and have no designated capabilities.\n"} +{"id": "Pony/src-builtin-string-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-term-ansi-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-collections-list-_93.txt", "contents": "\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet rvalues = my_list.rvalues() // value \"c\" is before value \"a\"\n```\n\"\"\"\nListValues[A, this->ListNode[A]](_head, true)\n\nfun ref _increment() =>\n\"\"\"\nPrivate method to control mutating `_size` field.\n\"\"\"\n_size = _size + 1\n\nfun ref _decrement() =>\n\"\"\"\nPrivate method to control mutating `_size` field.\n\"\"\"\n_size = _size - 1\n"} +{"id": "Pony/src-pony_check-property_helper-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/time-Time-_7.txt", "contents": "\nthat: Time val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/net-OSSockOpt-_391.txt", "contents": "fun box sctp_get_stat_log()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_vrf_ids\u00b6\n[Source]\nfun box sctp_get_vrf_ids()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_had_no_tcb\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_23.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val ?\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_116.txt", "contents": "fun map4[T1, T2, T3, T4, T5](\ngen1: Generator[T1],\ngen2: Generator[T2],\ngen3: Generator[T3],\ngen4: Generator[T4],\nfn: {(T1, T2, T3, T4): T5^})\n: Generator[T5]\n=>\n\"\"\"\nConvenience combinator for mapping 4 generators into 1.\n\"\"\"\nGenerators.zip4[T1, T2, T3, T4](gen1, gen2, gen3, gen4)\n.map[T5]({(arg) =>\n(let arg1, let arg2, let arg3, let arg4) = consume arg\nfn(consume arg1, consume arg2, consume arg3, consume arg4)\n})\n\nfun bool(): Generator[Bool] =>\n\"\"\"\nCreate a generator of bool values."} +{"id": "Pony/net-TCPConnection-_3.txt", "contents": "// is given a ApplyReleaseBackpressureAuth token. This allows the notifier\n// to inform the Pony runtime when to apply and release backpressure\n// as the connection experiences it.\n// Note the calls to\n//\n// Backpressure.apply(_auth)\n// Backpressure.release(_auth)\n//\n// that apply and release backpressure as needed\n\nuse \"backpressure\"\nuse \"collections\"\nuse \"net\"\n\nclass SlowDown is TCPConnectionNotify\nlet _auth: ApplyReleaseBackpressureAuth\nlet _out: OutStream\n\nnew iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>\n_auth = auth"} +{"id": "Pony/src-builtin-env-_7.txt", "contents": "\"\"\"The program's environment variables.\"\"\"\n\nlet exitcode: {(I32)} val\n\"\"\"\nSets the environment's exit code. The exit code of the root environment will\nbe the exit code of the application, which defaults to 0.\n\"\"\"\n\nnew _create(\nargc: U32,\nargv: Pointer[Pointer[U8]] val,\nenvp: Pointer[Pointer[U8]] val)\n=>\n\"\"\"\nBuilds an environment from the command line. This is done before the Main\nactor is created.\n\"\"\"\nroot = AmbientAuth._create()\n@pony_os_stdout_setup()\n"} +{"id": "Pony/src-net-tcp_connection-_106.txt", "contents": "// Have more buffers than a single writev can handle.\n// Iterate over buffers being sent to add up total.\nnum_to_send = writev_batch_size\nbytes_to_send = 0\nfor d in Range[USize](0, num_to_send, 1) do\nbytes_to_send = bytes_to_send + _pending_writev_posix(d)?._2\nend\nend\n\n// Write as much data as possible.\nvar len = @pony_os_writev(_event,\n_pending_writev_posix.cpointer(), num_to_send.i32()) ?\n\nif _manage_pending_buffer(len, bytes_to_send, num_to_send)? then\nreturn true\nend\n\nbytes_sent = bytes_sent + len\nelse\n// Non-graceful shutdown on error."} +{"id": "Pony/src-net-tcp_connection-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-files-file-_45.txt", "contents": "\"\"\"\nReturns true if the file is currently open.\n\"\"\"\nnot (_fd == -1)\n\n\nfun ref read(len: USize): Array[U8] iso^ =>\n\"\"\"\nReturns up to len bytes.\n\"\"\"\nif _fd != -1 then\nlet result = recover Array[U8] .> undefined(len) end\n\nlet r =\n(ifdef windows then\n@_read(_fd, result.cpointer(), len.i32())\nelse\n@read(_fd, result.cpointer(), len)\nend)\n.isize()"} +{"id": "Pony/pony_test--index-_1.txt", "contents": "Each test run is provided with a helper object. This provides logging and\nassertion functions. By default log messages are only shown for tests that\nfail.\nWhen any assertion function fails the test is counted as a fail. However, tests\ncan also indicate failure by raising an error in the test function.\nExample program\u00b6\nTo use PonyTest simply write a class for each test and a TestList type that\ntells the PonyTest object about the tests. Typically the TestList will be Main\nfor the package.\nThe following is a complete program with 2 trivial tests.\nuse \"pony_test\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>\nNone\n\nfun tag tests(test: PonyTest) =>"} +{"id": "Pony/src-net-ossockopt-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/time-Timer-_2.txt", "contents": "[Source]\nCreate a new timer. The expiration time should be a nanosecond count\nuntil the first expiration. The interval should also be in nanoseconds.\nnew iso create(\nnotify: TimerNotify iso,\nexpiration: U64 val,\ninterval: U64 val = 0)\n: Timer iso^\n\nParameters\u00b6\n\nnotify: TimerNotify iso\nexpiration: U64 val\ninterval: U64 val = 0\n\nReturns\u00b6\n\nTimer iso^\n\n"} +{"id": "Pony/collections-persistent-Nil-_4.txt", "contents": "is_non_empty\u00b6\n[Source]\nReturns a Bool indicating if the list is non-empty.\nfun box is_non_empty()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhead\u00b6\n[Source]\nReturns an error, since Nil has no head.\nfun box head()\n: val->A ?\n\nReturns\u00b6\n\nval->A ?"} +{"id": "Pony/capability-matrix_2.txt", "contents": "# Reference capability matrix\n\nWithout further ado, here's the reference capability matrix:\n\n---\n\n|   | Deny global read/write aliases | Deny global write aliases | Don't deny any global aliases |\n| --------------------------------- | ------------------------------ | ------------------------- | ----------------------------- |\n| __Deny local read/write aliases__ | __`iso`__ | |\n| __Deny local write aliases__ | `trn` | __`val`__ |\n| __Don't deny any local aliases__ | `ref` | `box` | __`tag`__ |\n|   | _(Mutable)_ | _(Immutable)_ | _(Opaque)_ |\n\n---\n\nIn the context of the matrix, \"denying a capability\" means that any other alias to that reference is not allowed to do that action. For example, since `trn` denies other local write aliases (but allows reads), this is the only reference that allows writing to the object; and since it denies both read and write aliases to other actors, it's safe to write inside this actor, thus being mutable. And since `box` does not break any guarantees that `trn` makes (local reads are allowed, but global writes are forbidden), we can create `box` aliases to a `trn` reference.\n\nYou'll notice that the top-right side is empty. That's because, as previously discussed, we cannot make any local guarantees that are more restrictive than the global guarantees, or we'd end up with invalid capabilities that could be written to in this actor but read somewhere else at the same time.\n\nThe matrix also helps visualizing other concepts previously discussed in this chapter:"} +{"id": "Pony/pony_check-Generators-_14.txt", "contents": "If the generator generates key-value pairs with\nduplicate keys (based on identity),\nthe pair that is generated later will overwrite earlier entries in the map.\nfun box map_is_of[K: K, V: V](\ngen: Generator[(K , V)] box,\nmax: USize val = 100)\n: Generator[HashMap[K, V, HashIs[K] val] ref] box\n\nParameters\u00b6\n\ngen: Generator[(K , V)] box\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[HashMap[K, V, HashIs[K] val] ref] box\n\n\none_of[T: T]\u00b6\n[Source]"} +{"id": "Pony/src-collections-hashable-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-itertools-iter-_89.txt", "contents": "### Example\n\n```pony\nIter[USize](Range(0, 4))\n.interleave_shortest(Range(4, 6))\n```\n`0 4 1 5 2`\n\"\"\"\nIter[A!](\nobject is Iterator[A!]\nvar _use_original: Bool = true\n\nfun ref has_next(): Bool =>\nif _use_original then\n_iter.has_next()\nelse\nother.has_next()\nend\n\nfun ref next(): A! ? =>"} +{"id": "Pony/src-buffered-reader-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-net-udp_socket-_49.txt", "contents": "if _closed and not _readable and not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\nend\nelse\n// Unsubscribe immediately.\nif not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\n_readable = false\nend\nend\n\n_closed = true\n\nif _fd != -1 then\n_notify.closed(this)\n// On windows, this will also cancel all outstanding IOCP operations.\n@pony_os_socket_close(_fd)\n_fd = -1\nend\n"} +{"id": "Pony/src-pony_check-generator-_109.txt", "contents": "\nfun frequency_safe[T](\nweighted_generators: ReadSeq[WeightedGenerator[T]])\n: Generator[T] ?\n=>\n\"\"\"\nVersion of `frequency` that errors if the given `weighted_generators` is\nempty.\n\"\"\"\nFact(weighted_generators.size() > 0,\n\"cannot use frequency_safe on empty ReadSeq[WeightedGenerator]\")?\nGenerators.frequency[T](weighted_generators)\n\nfun zip2[T1, T2](\ngen1: Generator[T1],\ngen2: Generator[T2])\n: Generator[(T1, T2)]\n=>\n\"\"\"\nZip two generators into a generator of a 2-tuple"} +{"id": "Pony/src-builtin-iterator-_5.txt", "contents": "Thus every call to `next()` should be preceeded with a call to `has_next()` to\ncheck for exhaustiveness.\n"} +{"id": "Pony/format-FormatDefault-_1.txt", "contents": "new val create()\n: FormatDefault val^\n\nReturns\u00b6\n\nFormatDefault val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatDefault val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatDefault val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-array-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/builtin-String-_34.txt", "contents": ": USize val\n\nParameters\u00b6\n\ns: String box\noffset: ISize val = 0\n\nReturns\u00b6\n\nUSize val\n\n\nat\u00b6\n[Source]\nReturns true if the substring s is present at the given offset.\nfun box at(\ns: String box,\noffset: ISize val = 0)\n: Bool val\n"} +{"id": "Pony/src-process-process_monitor-_0.txt", "contents": "\n\n\n\n\n\n\nprocess_monitor.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/4_control-structures_9.txt", "contents": "And finally, here the value of __x__ is \"no names!\"\n"} +{"id": "Pony/net-NetAddress-_9.txt", "contents": "a._2 = _addr2 // Bits 33-64 of the IPv6 address in host byte order.a._3 = _addr3 // Bits 65-96 of the IPv6 address in host byte order.\n`a._4 = _addr4 // Bits 97-128 of the IPv6 address in host byte order.\nThe contents of the 4-tuple returned are valid only if ip6() is True.\nfun box ipv6_addr()\n: (U32 val , U32 val , U32 val ,\nU32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val , U32 val ,\nU32 val)\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: NetAddress val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U16-_10.txt", "contents": "U16 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\naddc\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_7.txt", "contents": "\nU64 val\n\n\nradix\u00b6\n[Source]\nExponent radix.\nfun tag radix()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nprecision2\u00b6\n[Source]\nMantissa precision in bits.\nfun tag precision2()\n: U8 val"} +{"id": "Pony/src-cli-command_spec-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-U64-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U8-_28.txt", "contents": "U8 val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nrotr\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_29.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , U128 val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U8-_35.txt", "contents": "U8 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/serialise-Serialise-_2.txt", "contents": "that: Serialise val)\n: Bool val\n\nParameters\u00b6\n\nthat: Serialise val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Serialise val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_393.txt", "contents": "fun box sctp_heartbeat_request()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_hmac_ident\u00b6\n[Source]\nfun box sctp_hmac_ident()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_idata\u00b6\n[Source]"} +{"id": "Pony/calling-c_18.txt", "contents": "# Type signature compatibility\n\nSince type signature declarations are scoped to a single Pony package, separate packages might define different FFI signatures for the same C function. In this case, as well as the case where you specify a different return type for an FFI call, the compiler will make sure that all calls and declarations are compatible with each other. Two functions are compatible if their arguments and return types are compatible. Two types are compatible with each other if they have the same ABI size and they can be safely cast to each other. The compiler allows the following type casts:\n\n* Any `struct` type can be cast to any other `struct` (as they are both pointer types)\n* Pointers and integers can be cast to each other.\n\nConsider the following example:\n\n```pony\n// In library lib_a\nuse @memcmp[I32](dst: Pointer[None] tag, src: Pointer[None] tag, len: USize)\n\n// In library lib_b\nuse @memcmp[I32](dst: Pointer[None] tag, src: USize, len: U64)\n```\n\nThese two declarations have different types for the `src` and `len` parameters. In the case of `src`, the types are compatible since an integer can be cast as a pointer, and vice versa. For `len`, the types will not be compatible on 32 bit platforms, where `USize` is equivalent to `U32`. It is important to take the rules around casting into account when writing type declarations in libraries that will be used by others, as it will avoid any compatibility problems with other libraries.\n"} +{"id": "Pony/term-ANSINotify-_0.txt", "contents": "\n\n\n\n\n\n\nANSINotify\u00b6\n[Source]\nReceive input from an ANSITerm.\ninterface ref ANSINotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nterm: ANSITerm ref,\ninput: U8 val)\n: None val\n"} +{"id": "Pony/src-promises-promise-_35.txt", "contents": "p.next[None](\n{(b) => c.fulfill_b(b) },\n{() => p'.reject() })\n\np'\n\nfun tag join(ps: Iterator[Promise[A]]): Promise[Array[A] val] =>\n\"\"\"\nCreate a promise that is fulfilled when the receiver and all promises in\nthe given iterator are fulfilled. If the receiver or any promise in the\nsequence is rejected then the new promise is also rejected.\n\nJoin `p1` and `p2` with an existing promise, `p3`.\n```pony\nuse \"promises\"\n\nactor Main\nnew create(env: Env) =>\n\nlet p1 = Promise[String val]"} +{"id": "Pony/format-FormatHexSmallBare-_0.txt", "contents": "\n\n\n\n\n\n\nFormatHexSmallBare\u00b6\n[Source]\nprimitive val FormatHexSmallBare is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_26.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-persistent-list-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/files-File-_2.txt", "contents": "\nfrom: FilePath val\n\nReturns\u00b6\n\nFile ref^\n\n\nPublic fields\u00b6\nlet path: FilePath val\u00b6\n[Source]\nThis is the filesystem path locating this file on the file system\nand an object capability granting access to operate on this file.\n\nlet writeable: Bool val\u00b6\n[Source]\ntrue if the underlying file descriptor has been opened as writeable.\n\nPublic Functions\u00b6\nerrno\u00b6"} +{"id": "Pony/net-OSSockOpt-_211.txt", "contents": "fun box ip_hdrincl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_ipsec_policy\u00b6\n[Source]\nfun box ip_ipsec_policy()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_max_group_src_filter\u00b6\n[Source]"} +{"id": "Pony/files-OpenFile-_3.txt", "contents": "fun box ne(\nthat: OpenFile val)\n: Bool val\n\nParameters\u00b6\n\nthat: OpenFile val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-array-_100.txt", "contents": "this\n\nclass ArrayPairs[A, B: Array[A] #read] is Iterator[(USize, B->A)]\nlet _array: B\nvar _i: USize\n\nnew create(array: B) =>\n_array = array\n_i = 0\n\nfun has_next(): Bool =>\n_i < _array.size()\n\nfun ref next(): (USize, B->A) ? =>\n(_i, _array(_i = _i + 1)?)\n\n\n\n\n"} +{"id": "Pony/src-term-ansi_term-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-backpressure-backpressure-_10.txt", "contents": "recover SlowDown(\nApplyReleaseBackpressureAuth(env.root), env.out) end, \"\", \"7669\")\n```\n"} +{"id": "Pony/builtin-Less-_2.txt", "contents": "[Source]\nfun box eq(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n\nParameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n"} +{"id": "Pony/builtin-U128-_25.txt", "contents": "fun box add_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-files-file_path-_0.txt", "contents": "\n\n\n\n\n\n\nfile_path.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-F32-_28.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\ntan\u00b6\n[Source]\nfun box tan()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\ncosh\u00b6\n[Source]\nfun box cosh()\n: F32 val\n"} +{"id": "Pony/builtin-F32-_44.txt", "contents": "lt_unsafe\u00b6\nfun box lt_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\nle_unsafe\u00b6\nfun box le_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_329.txt", "contents": "fun box scm_timestamping()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nscm_timestampns\u00b6\n[Source]\nfun box scm_timestampns()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nscm_wifi_status\u00b6\n[Source]"} +{"id": "Pony/collections-HashIs-_2.txt", "contents": "x: box->A!\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nHash the identity rather than the contents.\nfun box hash64(\nx: box->A!)\n: U64 val\n\nParameters\u00b6\n\nx: box->A!\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Lists-_4.txt", "contents": "\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\neq[optional T: Equatable[T] val]\u00b6\n[Source]\nChecks whether two lists are equal.\nfun box eq[optional T: Equatable[T] val](\nl1: (Cons[T] val | Nil[T] val),\nl2: (Cons[T] val | Nil[T] val))\n: Bool val ?\n\nParameters\u00b6\n\nl1: (Cons[T] val | Nil[T] val)\nl2: (Cons[T] val | Nil[T] val)\n\nReturns\u00b6"} +{"id": "Pony/src-net-tcp_connection-_62.txt", "contents": "1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251"} +{"id": "Pony/time-Nanos-_7.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Nanos val)\n: Bool val\n\nParameters\u00b6\n\nthat: Nanos val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/net-OSSockOpt-_99.txt", "contents": "fun box icmp_host_unreach()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_host_unr_tos\u00b6\n[Source]\nfun box icmp_host_unr_tos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_info_reply\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_131.txt", "contents": "fun ref reverse_in_place() =>\n\"\"\"\nReverses the byte order in the string. This needs to be changed to handle\nUTF-8 correctly.\n\"\"\"\nif _size > 1 then\nvar i: USize = 0\nvar j = _size - 1\n\nwhile i < j do\nlet x = _ptr._apply(i)\n_set(i, _ptr._apply(j))\n_set(j, x)\ni = i + 1\nj = j - 1\nend\nend\n\nfun ref push(value: U8) =>\n\"\"\""} +{"id": "Pony/calling-c_2.txt", "contents": "```\n\nFFI functions have the @ symbol before its name, and FFI signatures are declared using the `use` command. The types specified here are considered authoritative, and any FFI calls that use different parameter types will result in a compile error.\n\nThe use @ command can take a condition just like other `use` commands. This is useful in this case, since the `_mkdir` function only exists in Windows.\n\nIf the name of the C function that you want to call is also a [reserved keyword in Pony](/appendices/keywords.md) (such as `box`), you will need to wrap the name in double quotes (`@\"box\"`). If you forget to do so, your program will not compile.\n\nAn FFI signature is public to all Pony files inside the same package, so you only need to write them once.\n"} +{"id": "Pony/files-FileExec-_2.txt", "contents": "\nthat: FileExec val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileExec val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileExec val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U64-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/cli-OptionSpec-_8.txt", "contents": "Returns\u00b6\n\nOptionSpec val^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nReturns the name of this option.\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ndescr\u00b6\n[Source]\nReturns the description for this option."} +{"id": "Pony/src-net-ossockopt-_98.txt", "contents": "fun netlink_ecryptfs():I32 => @pony_os_sockopt_option(I32(402))\nfun netlink_fib_lookup():I32 => @pony_os_sockopt_option(I32(403))\nfun netlink_firewall():I32 => @pony_os_sockopt_option(I32(404))\nfun netlink_generic():I32 => @pony_os_sockopt_option(I32(405))\nfun netlink_inet_diag():I32 => @pony_os_sockopt_option(I32(406))\nfun netlink_ip6_fw():I32 => @pony_os_sockopt_option(I32(407))\nfun netlink_iscsi():I32 => @pony_os_sockopt_option(I32(408))\nfun netlink_kobject_uevent():I32 => @pony_os_sockopt_option(I32(409))\nfun netlink_listen_all_nsid():I32 => @pony_os_sockopt_option(I32(410))\nfun netlink_list_memberships():I32 => @pony_os_sockopt_option(I32(411))\nfun netlink_netfilter():I32 => @pony_os_sockopt_option(I32(412))\nfun netlink_nflog():I32 => @pony_os_sockopt_option(I32(413))\nfun netlink_no_enobufs():I32 => @pony_os_sockopt_option(I32(414))\nfun netlink_pktinfo():I32 => @pony_os_sockopt_option(I32(415))\nfun netlink_rdma():I32 => @pony_os_sockopt_option(I32(416))\nfun netlink_route():I32 => @pony_os_sockopt_option(I32(417))\nfun netlink_rx_ring():I32 => @pony_os_sockopt_option(I32(418))\nfun netlink_scsitransport():I32 => @pony_os_sockopt_option(I32(419))\nfun netlink_selinux():I32 => @pony_os_sockopt_option(I32(420))\nfun netlink_sock_diag():I32 => @pony_os_sockopt_option(I32(421))"} +{"id": "Pony/src-net-ossockopt-_62.txt", "contents": "1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251"} +{"id": "Pony/net-OSSockOpt-_54.txt", "contents": "fun box ipproto_shim6()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_skip\u00b6\n[Source]\nfun box ipproto_skip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_spacer\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-net-tcp_connection-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/src-pony_check-property_runner-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-set-_22.txt", "contents": ": HashSet[this->A!, K]^\n=>\n\"\"\"\nAdd a value to the set.\n\"\"\"\nclone[K]() .> set(value)\n\nfun sub[K: HashFunction[this->A!] val = H](\nvalue: box->this->A!)\n: HashSet[this->A!, K]^\n=>\n\"\"\"\nRemove a value from the set.\n\"\"\"\nclone[K]() .> unset(value)\n\nfun op_or[K: HashFunction[this->A!] val = H](\nthat: this->HashSet[A, H])\n: HashSet[this->A!, K]^\n=>"} +{"id": "Pony/src-collections-flag-_10.txt", "contents": "192\n193\n194interface val Flag[A: (Unsigned & Integer[A] val)]\n\"\"\"\nA flag should be a primitive with a value method that returns the bits that\nrepresent the flag. This allows a flag to encode a single bit, or any\ncombination of bits.\n\"\"\"\nfun value(): A\n\nclass Flags[A: Flag[B] val, B: (Unsigned & Integer[B] val) = U64] is\nComparable[Flags[A, B] box]\n\"\"\"\nFlags is a set of flags. The flags that are recognised should be passed as\na union type for type parameter A. For example:\n\nprimitive SSE\nfun value(): U64 => 1\n\nprimitive AVX"} +{"id": "Pony/src-files-directory-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/pony_test-TestList-_1.txt", "contents": "test(_TestClass2)\ntest(_TestClass3)\n\nfun tag tests(\ntest: PonyTest tag)\n: None val\n\nParameters\u00b6\n\ntest: PonyTest tag\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n"} +{"id": "Pony/process-KillError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: KillError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U64-_0.txt", "contents": "\n\n\n\n\n\n\nU64\u00b6\n[Source]\nprimitive val U64 is\nUnsignedInteger[U64 val] val\n\nImplements\u00b6\n\nUnsignedInteger[U64 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_36.txt", "contents": "\nfun ref _handle_line(term: ANSITerm, line: String) =>\n\"\"\"\nDispatch a single line.\n\"\"\"\nlet promise = Promise[String]\n\npromise.next[Any tag](\nrecover term~prompt() end,\nrecover term~dispose() end)\n\n_notify(line, promise)\n_cur_pos = 0\n_blocked = true\n\nfun ref _refresh_line() =>\n\"\"\"\nRefresh the line on screen.\n\"\"\"\nif not _blocked then"} +{"id": "Pony/pony_check-Generators-_26.txt", "contents": "\nGenerator[Bool val] box\n\n\nu8\u00b6\n[Source]\nCreate a generator for U8 values.\nfun box u8(\nmin: U8 val = call,\nmax: U8 val = call)\n: Generator[U8 val] box\n\nParameters\u00b6\n\nmin: U8 val = call\nmax: U8 val = call\n\nReturns\u00b6\n\nGenerator[U8 val] box"} +{"id": "Pony/src-pony_test-test_helper-_44.txt", "contents": "_runner.complete_action(name, true)\n\nfun fail_action(name: String) =>\n\"\"\"\nCall to fail an action, which will also cause the entire test to fail\nimmediately, without waiting the rest of the outstanding actions.\n\nThe name of the failed action will be included in the failure output.\n\nUsually the action name should be an expected action set up by a call to\nexpect_action, but failing unexpected actions will also fail the test.\n\"\"\"\n_runner.complete_action(name, false)\n\nfun dispose_when_done(disposable: DisposableActor) =>\n\"\"\"\nPass a disposable actor to be disposed of when the test is complete.\nThe actor will be disposed no matter whether the test succeeds or fails.\n\nIf the test is already tearing down, the actor will be disposed immediately."} +{"id": "Pony/pony_check-ASCIILettersLower-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-FloatingPoint-_19.txt", "contents": "y: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box le_unsafe(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A"} +{"id": "Pony/src-time-timers-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-signed-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-signals-sig-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-file-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-net-ossockopt-_91.txt", "contents": "fun ip_fw_get():I32 => @pony_os_sockopt_option(I32(262))\nfun ip_fw_nat_cfg():I32 => @pony_os_sockopt_option(I32(263))\nfun ip_fw_nat_del():I32 => @pony_os_sockopt_option(I32(264))\nfun ip_fw_nat_get_config():I32 => @pony_os_sockopt_option(I32(265))\nfun ip_fw_nat_get_log():I32 => @pony_os_sockopt_option(I32(266))\nfun ip_fw_resetlog():I32 => @pony_os_sockopt_option(I32(267))\nfun ip_fw_table_add():I32 => @pony_os_sockopt_option(I32(268))\nfun ip_fw_table_del():I32 => @pony_os_sockopt_option(I32(269))\nfun ip_fw_table_flush():I32 => @pony_os_sockopt_option(I32(270))\nfun ip_fw_table_getsize():I32 => @pony_os_sockopt_option(I32(271))\nfun ip_fw_table_list():I32 => @pony_os_sockopt_option(I32(272))\nfun ip_fw_zero():I32 => @pony_os_sockopt_option(I32(273))\nfun ip_hdrincl():I32 => @pony_os_sockopt_option(I32(274))\nfun ip_ipsec_policy():I32 => @pony_os_sockopt_option(I32(275))\nfun ip_max_group_src_filter():I32 => @pony_os_sockopt_option(I32(276))\nfun ip_max_memberships():I32 => @pony_os_sockopt_option(I32(277))\nfun ip_max_sock_mute_filter():I32 => @pony_os_sockopt_option(I32(278))\nfun ip_max_sock_src_filter():I32 => @pony_os_sockopt_option(I32(279))\nfun ip_max_source_filter():I32 => @pony_os_sockopt_option(I32(280))\nfun ip_minttl():I32 => @pony_os_sockopt_option(I32(281))"} +{"id": "Pony/src-buffered-reader-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-F32-_54.txt", "contents": "le\u00b6\nfun box le(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\nfun box ge(\ny: F32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_unit_test-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_267.txt", "contents": "fun box ndrv_deldmxspec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_delmulticast\u00b6\n[Source]\nfun box ndrv_delmulticast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_demuxtype_ethertype\u00b6\n[Source]"} +{"id": "Pony/buffered-Writer-_21.txt", "contents": "data: I128 val)\n: None val\n\nParameters\u00b6\n\ndata: I128 val\n\nReturns\u00b6\n\nNone val\n\n\ni128_be\u00b6\n[Source]\nWrite an I128 to the buffer in big-endian byte order.\nfun ref i128_be(\ndata: I128 val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_37.txt", "contents": "fun box ipproto_micp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mobile\u00b6\n[Source]\nfun box ipproto_mobile()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mpls\u00b6\n[Source]"} +{"id": "Pony/builtin-Equal-_0.txt", "contents": "\n\n\n\n\n\n\nEqual\u00b6\n[Source]\nprimitive val Equal is\nEquatable[(Less val | Equal val | Greater val)] ref\n\nImplements\u00b6\n\nEquatable[(Less val | Equal val | Greater val)] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-HashSet-_5.txt", "contents": "\nReturns\u00b6\n\nHashSet[A, H] val\n\n\nop_or\u00b6\n[Source]\nReturn a set with the elements of both this and that.\nfun val op_or(\nthat: (HashSet[A, H] val | Iterator[A] ref))\n: HashSet[A, H] val\n\nParameters\u00b6\n\nthat: (HashSet[A, H] val | Iterator[A] ref)\n\nReturns\u00b6\n\nHashSet[A, H] val"} +{"id": "Pony/src-process-process_monitor-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/process-ExecveError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ExecveError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-string-_118.txt", "contents": "\nfun ref update_offset(offset: ISize, value: U8): U8 ? =>\n\"\"\"\nChanges a byte in the string, returning the previous byte at that offset.\nRaise an error if the offset is out of bounds.\n\"\"\"\nthis(offset_to_index(offset))? = value\n\nfun clone(): String iso^ =>\n\"\"\"\nReturns a copy of the string. The resulting string is\nnull-terminated even if the original is not.\n\"\"\"\nlet len = _size\nlet str = recover String(len) end\n_ptr._copy_to(str._ptr._unsafe(), len)\nstr._size = len\nstr._set(len, 0)\nstr\n"} +{"id": "Pony/src-term-ansi_term-_27.txt", "contents": "| _EscapeMod =>\nmatch c\n| 'A' => _up()\n| 'B' => _down()\n| 'C' => _right()\n| 'D' => _left()\n| 'H' => _home()\n| 'F' => _end()\n| '~' => _keypad()\n| if (c >= '0') and (c <= '9') =>\n// Escape modifier.\n_esc_mod = (_esc_mod * 10) + (c - '0')\n_esc_buf.push(c)\nelse\n_esc_flush()\nend\nend\nend\n\n// If we are in the middle of an escape sequence, set a timer for 25 ms."} +{"id": "Pony/cli-ArgSpec-_4.txt", "contents": "\nReturns\u00b6\n\nArgSpec val^\n\n\nu64\u00b6\n[Source]\nCreates an Arg with an U64 typed value that can be used like\n 47\nto yield an arg value like\ncmd.arg(\"count\").u64() == U64(47).\nnew val u64(\nname': String val,\ndescr': String val = \"\",\ndefault': (U64 val | None val) = reference)\n: ArgSpec val^\n\nParameters\u00b6\n"} +{"id": "Pony/collections-HashIs-_0.txt", "contents": "\n\n\n\n\n\n\nHashIs[A: A]\u00b6\n[Source]\nprimitive val HashIs[A: A] is\nHashFunction[A] val,\nHashFunction64[A] val\n\nImplements\u00b6\n\nHashFunction[A] val\nHashFunction64[A] val\n\n\nConstructors\u00b6"} +{"id": "Pony/src-net-tcp_connection-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991"} +{"id": "Pony/src-buffered-reader-_48.txt", "contents": "out\n\n\nfun ref read_until(separator: U8): Array[U8] iso^ ? =>\n\"\"\"\nFind the first occurrence of the separator and return the block of bytes\nbefore its position. The separator is not included in the returned array,\nbut it is removed from the buffer. To read a line of text, prefer line()\nthat handles \\n and \\r\\n.\n\"\"\"\nlet b = block(_distance_of(separator)? - 1)?\nu8()?\nb\n\nfun ref line(keep_line_breaks: Bool = false): String iso^ ? =>\n\"\"\"\nReturn a \\n or \\r\\n terminated line as a string. By default the newline is not\nincluded in the returned string, but it is removed from the buffer.\nSet `keep_line_breaks` to `true` to keep the line breaks in the returned line.\n\"\"\""} +{"id": "Pony/src-net-ossockopt-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/pony_check-PropertyResultNotify-_2.txt", "contents": "\nsuccess: Bool val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-SignedInteger-_9.txt", "contents": "[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: B\n\nReturns\u00b6\n\nB\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: B\n\nReturns\u00b6\n"} +{"id": "Pony/ini-IniParse-_1.txt", "contents": "IniParse val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nThis accepts a string iterator and returns a nested map of strings. If\nparsing fails, an error is raised.\nfun box apply(\nlines: Iterator[String val] ref)\n: HashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref^ ?\n\nParameters\u00b6\n\nlines: Iterator[String val] ref\n\nReturns\u00b6\n\nHashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref^ ?\n"} +{"id": "Pony/time-PosixDate-_2.txt", "contents": "var min: I32 val\u00b6\n[Source]\n\nvar hour: I32 val\u00b6\n[Source]\n\nvar day_of_month: I32 val\u00b6\n[Source]\n\nvar month: I32 val\u00b6\n[Source]\n\nvar year: I32 val\u00b6\n[Source]\n\nvar day_of_week: I32 val\u00b6\n[Source]\n\nvar day_of_year: I32 val\u00b6\n[Source]"} +{"id": "Pony/src-serialise-serialise-_10.txt", "contents": "fun signature(): Array[U8] val =>\n\"\"\"\nReturns a byte array that is unique to this compiled Pony binary, for the\npurposes of comparing before deserialising any data from that source.\nIt is statistically impossible for two serialisation-incompatible Pony\nbinaries to have the same serialise signature.\n\"\"\"\n@\"internal.signature\"()\n\nprimitive SerialiseAuth\n\"\"\"\nThis is a capability that allows the holder to serialise objects. It does not\nallow the holder to examine serialised data or to deserialise objects.\n\"\"\"\nnew create(auth: AmbientAuth) =>\nNone\n\nprimitive DeserialiseAuth\n\"\"\"\nThis is a capability token that allows the holder to deserialise objects. It"} +{"id": "Pony/src-promises-promise-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-TCPConnection-_13.txt", "contents": "yield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPConnection tag^\n\n\nip4\u00b6\n[Source]\nConnect via IPv4.\nnew tag ip4(\nauth: TCPConnectAuth val,\nnotify: TCPConnectionNotify iso,\nhost: String val,\nservice: String val,\nfrom: String val = \"\",\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)\n: TCPConnection tag^"} +{"id": "Pony/src-term-readline-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/net-TCPConnection-_6.txt", "contents": "\nfun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>\nif not _throttled then\ndata\nelse\nrecover Array[String] end\nend\n\nfun ref throttled(connection: TCPConnection ref) =>\n_throttled = true\n\nfun ref unthrottled(connection: TCPConnection ref) =>\n_throttled = false\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nTCPConnection(TCPConnectAuth(env.root),"} +{"id": "Pony/capability-matrix_3.txt", "contents": "\n* __Sendable capabilities__. If we want to send references to a different actor, we must make sure that the global and local aliases make the same guarantees. It'd be unsafe to send a `trn` to another actor, since we could possibly hold `box` references locally. Only `iso`, `val`, and `tag` have the same global and local restrictions \u2013 all of which are in the main diagonal of the matrix.\n* __Ephemeral subtyping__. If we have an ephemeral capability (for instance, `iso^` after consuming an isolated variable), we can be more permissive for the new alias, i.e. remove restrictions, such as allowing local aliases with read capabilities, and receive the reference into a `trn^`; or both read and write, which gives us `ref`. The same is true for more global alias, and we can get `val`, `box`, or `tag`. Visually, this would be equivalent to walking downwards and/or to-the-right starting from the capability in the matrix.\n* __Recovering capabilities__. This is when we \"lift\" a capability, from a mutable reference to `iso` or an immutable reference to `val`. The matrix equivalent would be walking upwards starting from the capability \u2013 quite literally lifting in this case.\n* __Aliasing__. With a bit more of imagination, it's possible to picture aliasing `iso` and `trn` as reflecting them on the secondary diagonal of the matrix onto `tag` and `box`, respectively. The reason for that lies on which restrictions arise from the local guarantees. An `iso` doesn't allow different aliases to read or write, which `tag` enforces; and `trn` doesn't allow different aliases to write but allows them to do local reads, fitting `box`'s restrictions.\n\nWe want to emphasize that trying to apply the reference capability matrix to some capabilities problems is not guaranteed to work (viewpoint adaptation is one example). The matrix is the original definition of the reference capabilities, presented here as a mnemonic device. Whenever you struggle with reference capabilities, we recommend that you reread the corresponding section of this chapter to understand why something is not allowed by the compiler.\n"} +{"id": "Pony/src-itertools-iter-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/src-collections-map-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-collections-sort-_5.txt", "contents": "# Example program\nThe following takes an reverse-alphabetical array of Strings (\"third\", \"second\", \"first\"),\nand sorts it in place alphabetically using the default String Comparator.\n\nIt outputs:\n\n> first\n> second\n> third\n\n```pony\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>\nlet array = [ \"third\"; \"second\"; \"first\" ]\nlet sorted_array = Sort[Array[String], String](array)\nfor e in sorted_array.values() do\nenv.out.print(e) // prints \"first \\n second \\n third\"\nend"} +{"id": "Pony/src-time-time-_19.txt", "contents": "ts\nelse\ncompile_error \"perf_end only supported on x86\"\nend\n\nfun _clock_gettime(clock: _Clock): (I64, I64) =>\n\"\"\"\nReturn a clock time on linux and bsd.\n\"\"\"\nifdef lp64 and (linux or bsd) then\nvar ts: (I64, I64) = (0, 0)\n@clock_gettime(clock(), addressof ts)\nts\nelseif ilp32 and (linux or bsd) then\nvar ts: (I32, I32) = (0, 0)\n@clock_gettime(clock(), addressof ts)\n(ts._1.i64(), ts._2.i64())\nelse\ncompile_error \"no clock_gettime\"\nend"} +{"id": "Pony/serialisation_14.txt", "contents": "include \n\nextern char *get_string()\n{\nreturn \"hello world\\n\";\n}\n\nextern size_t serialise_space(char *s)\n{\n// space for the size and the string (without the null)\nreturn 4 + strlen(s);\n}\n\nextern void serialise(char *buff, char *s)\n{\nsize_t sz = strlen(s);\nunsigned char *ubuff = (unsigned char *) buff;\n// write the size as a 32-bit big-endian integer\nubuff[0] = (sz >> 24) & 0xFF;\nubuff[1] = (sz >> 16) & 0xFF;"} +{"id": "Pony/0_literals_2.txt", "contents": "# Numeric Literals\n\nNumeric literals can be used to encode any signed or unsigned integer or floating point number.\n\nIn most cases Pony is able to infer the concrete type of the literal from the context where it is used (e.g. assignment to a field or local variable or as argument to a method/behaviour call).\n\nIt is possible to help the compiler determine the concrete type of the literal using a constructor of one of the numeric types:\n\n* `U8`, `U16`, `U32`, `U64`, `U128`, `USize`, `ULong`\n* `I8`, `I16`, `I32`, `I64`, `I128`, `ISize`, `ILong`\n* `F32`, `F64`\n\n```pony\nlet my_explicit_unsigned: U32 = 42_000\nlet my_constructor_unsigned = U8(1)\nlet my_constructor_float = F64(1.234)\n```\n\nInteger literals can be given as decimal, hexadecimal or binary:\n"} +{"id": "Pony/src-net-ossockopt-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/pony_check-ASCIILettersUpper-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/divide-by-zero_2.txt", "contents": "\nDefining division as partial leads to code littered with `try`s attempting to deal with the possibility of division by zero. Even if you had asserted that your denominator was not zero, you'd still need to protect against divide by zero because, at this time, the compiler can't detect that value dependent typing.\n\nPony also offers [Unsafe Division](/expressions/arithmetic.md#unsafe-integer-arithmetic), which declares division by zero as undefined, as in C:\n\n```pony\n// the value of x is undefined\nlet x = I64(1) /~ I64(0)\n```\n\nBut declaring this case as undefined does not help us out here. As a programmer you'd still need to guard that case in order to not poison your program with undefined values or risking terminating your program with a `SIGFPE`. So, in order to maintain a practical API and avoid undefined behaviour, _normal_ division on integers in Pony is defined to be `0`. To avoid `0`s silently creeping through your divisions, use [Partial or Checked Division](/expressions/arithmetic.md#partial-and-checked-arithmetic).\n"} +{"id": "Pony/builtin-SignedInteger-_0.txt", "contents": "\n\n\n\n\n\n\nSignedInteger[A: SignedInteger[A, B] val, B: UnsignedInteger[B] val]\u00b6\n[Source]\ntrait val SignedInteger[A: SignedInteger[A, B] val, B: UnsignedInteger[B] val] is\nInteger[A] val\n\nImplements\u00b6\n\nInteger[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-random-random-_16.txt", "contents": "\"\"\"\nA random integer in [-2^15, 2^15)\n\"\"\"\nu16().i16()\n\nfun ref i32(): I32 =>\n\"\"\"\nA random integer in [-2^31, 2^31)\n\"\"\"\nu32().i32()\n\nfun ref i64(): I64 =>\n\"\"\"\nA random integer in [-2^63, 2^63)\n\"\"\"\nu64().i64()\n\nfun ref i128(): I128 =>\n\"\"\"\nA random integer in [-2^127, 2^127)"} +{"id": "Pony/files-Directory-_13.txt", "contents": "\ntarget: String val\n\nReturns\u00b6\n\nBool val\n\n\nset_time_at\u00b6\n[Source]\nSet the last access and modification times of the directory to the given\nvalues.\nfun box set_time_at(\ntarget: String val,\natime: (I64 val , I64 val),\nmtime: (I64 val , I64 val))\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_112.txt", "contents": "fun box ipctl_defttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_directedbroadcast\u00b6\n[Source]\nfun box ipctl_directedbroadcast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_fastforwarding\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_6.txt", "contents": "[Source]\nErases content. The direction to erase is dictated by the direction\nparameter. Use EraseLeft to erase everything from the cursor to the\nbeginning of the line. Use EraseLine to erase the entire line. Use\nEraseRight to erase everything from the cursor to the end of the line.\nThe default direction is EraseRight.\nfun box erase(\ndirection: (EraseLeft val | EraseLine val | EraseRight val) = reference)\n: String val\n\nParameters\u00b6\n\ndirection: (EraseLeft val | EraseLine val | EraseRight val) = reference\n\nReturns\u00b6\n\nString val\n\n\nreset\u00b6"} +{"id": "Pony/src-process-_process-_39.txt", "contents": "\"\"\"\nPure Pony implementaton of C macros for investigating\nthe status returned by `waitpid()`.\n\"\"\"\n\nfun exited(wstatus: I32): Bool =>\ntermsig(wstatus) == 0\n\nfun exit_code(wstatus: I32): I32 =>\n(wstatus and 0xff00) >> 8\n\nfun signaled(wstatus: I32): Bool =>\n((termsig(wstatus) + 1) >> 1).i8() > 0\n\nfun termsig(wstatus: I32): I32 =>\n(wstatus and 0x7f)\n\nfun stopped(wstatus: I32): Bool =>\n(wstatus and 0xff) == 0x7f\n"} +{"id": "Pony/builtin-U8-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_32.txt", "contents": "U64 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ndiv_unsafe\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIAllWithNUL-_2.txt", "contents": "\nParameters\u00b6\n\nthat: ASCIIAllWithNUL val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIAllWithNUL val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIAllWithNUL val\n"} +{"id": "Pony/src-itertools-iter-_92.txt", "contents": "_count = _count + 1\n_iter.next()?\nend\nend)\n\nfun ref last(): A ? =>\n\"\"\"\nReturn the last value of the iterator.\n"} +{"id": "Pony/pony_check-PropertyHelper-_17.txt", "contents": "\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n\nNone val\n\n\ncomplete_action\u00b6\n[Source]\nComplete an expected action successfully.\nIf all expected actions are completed successfully,\nthe property is considered successful.\nIf 1 action fails, the property is considered failing.\nIf the action name was not expected, i.e. was not registered using\nexpect_action, nothing happens.\nfun val complete_action(\nname: String val)"} +{"id": "Pony/net-OSSockOpt-_15.txt", "contents": "fun box ipproto_dstopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_egp\u00b6\n[Source]\nfun box ipproto_egp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_emcon\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_610.txt", "contents": "fun box tipc_ok()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_published\u00b6\n[Source]\nfun box tipc_published()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_reserved_types\u00b6\n[Source]"} +{"id": "Pony/collections-List-_23.txt", "contents": "None val\n\n\nshift\u00b6\n[Source]\nRemoves the head value, raising an error if the head is empty.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.shift() end // Returns \"a\" and my_list is [\"b\"; \"c\"]\n\nfun ref shift()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nappend\u00b6\n[Source]\nAppend len elements from a sequence, starting from the given offset."} +{"id": "Pony/collections-Flags-_19.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nReturns true if the flags set on this are a superset of the flags set on\nthat or they are the same. Flags is only partially ordered, so ge is not\nthe opposite of lt.\nfun box ge(\nthat: Flags[A, B] box)\n: Bool val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ILong-_16.txt", "contents": "[Source]\nfun box divc(\ny: ILong val)\n: (ILong val , Bool val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: ILong val)\n: (ILong val , Bool val)\n"} +{"id": "Pony/src-pony_check-property_helper-_33.txt", "contents": "\"\"\"\nif not_expect is actual then\n_fail(_fmt_msg(loc, \"Assert isn't failed. \" + msg\n+ \" Expected (\" + (digestof not_expect).string() + \") isnt (\"\n+ (digestof actual).string() + \")\"))\nreturn false\nend\n\n_runner.log(\n_fmt_msg(loc, \"Assert isn't passed. \" + msg\n+ \" Got (\" + (digestof not_expect).string() + \") isnt (\"\n+ (digestof actual).string() + \")\"),\ntrue)\ntrue\n\nfun assert_eq[A: (Equatable[A] #read & Stringable #read)](\nexpect: A,\nactual: A,\nmsg: String = \"\",\nloc: SourceLoc = __loc)"} +{"id": "Pony/format-FormatFix-_1.txt", "contents": "new val create()\n: FormatFix val^\n\nReturns\u00b6\n\nFormatFix val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatFix val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatFix val\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Cons-_14.txt", "contents": "partition\u00b6\n[Source]\nBuilds a pair of lists, the first of which is made up of the elements\nsatisfying the supplied predicate and the second of which is made up of\nthose that do not.\nfun val partition(\nf: {(val->A): Bool}[A] box)\n: ((Cons[A] val | Nil[A] val) , (Cons[A] val | Nil[A] val))\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\n((Cons[A] val | Nil[A] val) , (Cons[A] val | Nil[A] val))\n\n\ndrop\u00b6\n[Source]"} +{"id": "Pony/format-FormatHexBare-_0.txt", "contents": "\n\n\n\n\n\n\nFormatHexBare\u00b6\n[Source]\nprimitive val FormatHexBare is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_16.txt", "contents": "(I64 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , Bool val)\n\n\nremc\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/net-OSSockOpt-_11.txt", "contents": "fun box ipproto_comp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_cphb\u00b6\n[Source]\nfun box ipproto_cphb()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_cpnx\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_64.txt", "contents": "_set_both(node)\nend\n\nfun ref append_node(node: ListNode[A]) =>\n\"\"\"\nAdds a node to the tail of the list.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet new_tail = ListNode[String](\"0\")\nmy_list.append_node(new_head) // [\"a\"; \"b\"; \"c\", \"0\"]\n```\n\"\"\"\nmatch _tail\n| let tail': ListNode[A] =>\ntail'.append(node)\nelse\n_set_both(node)\nend\n"} +{"id": "Pony/src-net-tcp_connection-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/src-cli-command-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_111.txt", "contents": "fun box ipctl_acceptsourceroute()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_defmtu\u00b6\n[Source]\nfun box ipctl_defmtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_defttl\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_33.txt", "contents": "U128 val ?\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/net-OSSockOpt-_318.txt", "contents": "fun box rds_trans_tcp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_access_barred\u00b6\n[Source]\nfun box rose_access_barred()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_defer\u00b6\n[Source]"} +{"id": "Pony/files-OpenFile-_2.txt", "contents": "FilePermissionDenied val)\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: OpenFile val)\n: Bool val\n\nParameters\u00b6\n\nthat: OpenFile val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-builtin-seq-_0.txt", "contents": "\n\n\n\n\n\n\nseq.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-builtin-float-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-collections-list-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-FloatingPoint-_47.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/term-Readline-_0.txt", "contents": "\n\n\n\n\n\n\nReadline\u00b6\n[Source]\nLine editing, history, and tab completion.\nclass ref Readline is\nANSINotify ref\n\nImplements\u00b6\n\nANSINotify ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/builtin-Integer-_19.txt", "contents": "y: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nsubc\u00b6\n[Source]\nSubtract y from this integer and return the result and a flag indicating overflow.\nfun box subc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-real-_67.txt", "contents": "Unsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis !=~ y\n\nfun lt_unsafe(y: box->A): Bool =>\n\"\"\"\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis <~ y\n\nfun le_unsafe(y: box->A): Bool =>\n\"\"\"\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is"} +{"id": "Pony/collections-persistent-VecKeys-_1.txt", "contents": "v: Vec[A] val\n\nReturns\u00b6\n\nVecKeys[A] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_32.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_455.txt", "contents": "fun box sctp_selective_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_set_debug_level\u00b6\n[Source]\nfun box sctp_set_debug_level()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_set_dynamic_primary\u00b6\n[Source]"} +{"id": "Pony/src-assert-assert-_0.txt", "contents": "\n\n\n\n\n\n\nassert.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_bench-pony_bench-_11.txt", "contents": "DoNotOptimise[U64](_fib(_n))\nDoNotOptimise.observe()\n\nfun _fib(n: U64): U64 =>\nif n < 2 then 1\nelse _fib(n - 1) + _fib(n - 2)\nend\n\nclass iso _Timer is AsyncMicroBenchmark\n// Asynchronous benchmark of timer.\nlet _ts: Timers = Timers\nlet _ns: U64\n\nnew iso create(ns: U64) =>\n_ns = ns\n\nfun name(): String =>\n\"_Timer (\" + _ns.string() + \" ns)\"\n\nfun apply(c: AsyncBenchContinue) =>"} +{"id": "Pony/src-process-process_error-_4.txt", "contents": "\nfun string(): String iso^ =>\nmatch message\n| let m: String =>\nrecover\nlet etc = error_type.string()\nlet err = String(etc.size() + 2 + m.size())\nerr.append(consume etc)\nerr.append(\": \")\nerr.append(m)\nerr\nend\nelse\nerror_type.string()\nend\n\ntype ProcessErrorType is\n( ExecveError\n| PipeError\n| ForkError"} +{"id": "Pony/builtin-I32-_20.txt", "contents": "I32 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/files-Directory-_11.txt", "contents": ": Bool val\n\nParameters\u00b6\n\ntarget: String val\nmode: FileMode box\n\nReturns\u00b6\n\nBool val\n\n\nchownat\u00b6\n[Source]\nSet the FileMode for some path relative to this directory.\nfun box chownat(\ntarget: String val,\nuid: U32 val,\ngid: U32 val)\n: Bool val"} +{"id": "Pony/src-builtin-signed-_62.txt", "contents": "primitive I64 is SignedInteger[I64, U64]\nnew create(value: I64) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.i64()\n\nnew min_value() => -0x8000_0000_0000_0000\nnew max_value() => 0x7FFF_FFFF_FFFF_FFFF\n\nfun abs(): U64 => if this < 0 then (-this).u64() else this.u64() end\nfun bit_reverse(): I64 => @\"llvm.bitreverse.i64\"(this.u64()).i64()\nfun bswap(): I64 => @\"llvm.bswap.i64\"(this.u64()).i64()\nfun popcount(): U64 => @\"llvm.ctpop.i64\"(this.u64())\nfun clz(): U64 => @\"llvm.ctlz.i64\"(this.u64(), false)\nfun ctz(): U64 => @\"llvm.cttz.i64\"(this.u64(), false)\n\nfun clz_unsafe(): U64 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i64\"(this.u64(), true)"} +{"id": "Pony/pony_check-ASCIIAll-_1.txt", "contents": "\nASCIIAll val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIAll val)\n: Bool val"} +{"id": "Pony/debug--index-_0.txt", "contents": "\n\n\n\n\n\n\nDebug package\u00b6\nProvides facilities to create output to either STDOUT or STDERR that will\nonly appear when the platform is debug configured. To create a binary with\ndebug configured, pass the -d flag to ponyc when compiling e.g.:\nponyc -d\nExample code\u00b6\nuse \"debug\"\n\nactor Main\nnew create(env: Env) =>\nDebug.out(\"This will only be seen when configured for debug info\")\nenv.out.print(\"This will always be seen\")\n"} +{"id": "Pony/src-random-random-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-heap-_12.txt", "contents": "while (i = i - 1) > 0 do\n_sift_down(i, n)\nend\n\nfun ref _sift_up(n: USize) =>\nvar idx = n\ntry\nwhile true do\nlet parent_idx = (idx - 1) / 2\nif (parent_idx == idx) or not P(_data(idx)?, _data(parent_idx)?) then\nbreak\nend\n_data.swap_elements(parent_idx, idx)?\nidx = parent_idx\nend\nend\n\nfun ref _sift_down(start: USize, n: USize): Bool =>\nvar idx = start\ntry"} +{"id": "Pony/src-ini-ini-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/net-OSSockOpt-_232.txt", "contents": "fun box ip_recvdstaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recverr\u00b6\n[Source]\nfun box ip_recverr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvflowid\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-generator-_56.txt", "contents": "1112\n1113\n1114\n1115\n1116\n1117\n1118\n1119\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131"} +{"id": "Pony/net-OSSockOpt-_188.txt", "contents": "fun box ipx_rt_8022()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_rt_bluebook\u00b6\n[Source]\nfun box ipx_rt_bluebook()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_rt_routed\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-net-tcp_connection-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-cli-command_parser-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-buffered-reader-_70.txt", "contents": "_available = _available - 1\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\n\nfun peek_u8(offset: USize = 0): U8 ? =>\n\"\"\"\nPeek at a U8 at the given offset. Raise an error if there isn't enough\ndata.\n\"\"\"\n_peek_byte(offset)?\n\nfun peek_i8(offset: USize = 0): I8 ? =>\n\"\"\"\nPeek at an I8.\n\"\"\""} +{"id": "Pony/src-pony_bench-_runner-_15.txt", "contents": "be _after_iteration_done_cont(e: U64) =>\nif _n == _aggregator.iterations then\n_bench.after(_after_cont)\nelse\n_bench.before_iteration(_before_iteration_cont)\nend\n\nbe _after_done_cont(e: U64) =>\n_aggregator.complete(_name, _a)\n\nbe _fail() =>\n_ponybench._fail(_name)\n\nfun ref _gc_next_behavior() =>\n@pony_triggergc(@pony_ctx())\n\nclass val AsyncBenchContinue\nlet _run_async: _RunAsync\nlet _f: {(U64)} val\n"} +{"id": "Pony/src-ini-ini-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/cli-OptionSpec-_9.txt", "contents": "fun box descr()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nrequired\u00b6\n[Source]\nReturns true iff this option is required to be present in the command line.\nfun box required()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhelp_string\u00b6"} +{"id": "Pony/src-collections-set-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-OSSockOpt-_179.txt", "contents": "fun box ipx_frame_etherii()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_none\u00b6\n[Source]\nfun box ipx_frame_none()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_snap\u00b6\n[Source]"} +{"id": "Pony/random-SplitMix64-_1.txt", "contents": "\n\nConstructors\u00b6\nfrom_u64\u00b6\n[Source]\nnew ref from_u64(\nx: U64 val = 5489)\n: SplitMix64 ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\n\nReturns\u00b6\n\nSplitMix64 ref^\n\n\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-bureaucracy-registrar-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48use \"collections\"\nuse \"promises\"\n\nactor Registrar"} +{"id": "Pony/combining-capabilities_6.txt", "contents": "## Reading from a `ref` variable\n\nA `ref` origin doesn't modify its fields at all. This is because a `ref` origin doesn't make any guarantees that are incompatible with its fields.\n"} +{"id": "Pony/src-builtin-string-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/net-TCPConnection-_8.txt", "contents": "Proxy support\u00b6\nUsing the proxy_via callback in a TCPConnectionNotify it is possible\nto implement proxies. The function takes the intended destination host\nand service as parameters and returns a 2-tuple of the proxy host and\nservice.\nThe proxy TCPConnectionNotify should decorate another implementation of\nTCPConnectionNotify passing relevent data through.\nExample proxy implementation\u00b6\nactor Main\nnew create(env: Env) =>\nMyClient.create(\n\"example.com\", // we actually want to connect to this host\n\"80\",\nExampleProxy.create(\"proxy.example.com\", \"80\")) // we connect via this proxy\n\nactor MyClient\nnew create(host: String, service: String, proxy: Proxy = NoProxy) =>\nlet conn: TCPConnection = TCPConnection.create(\nTCPConnectAuth(env.root),\nproxy.apply(MyConnectionNotify.create()),"} +{"id": "Pony/src-itertools-iter-_0.txt", "contents": "\n\n\n\n\n\n\niter.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/cli-OptionSpec-_6.txt", "contents": "--ratio=1.039 or -R=1.039\nto yield an option value like\ncmd.option(\"ratio\").f64() == F64(1.039).\nnew val f64(\nname': String val,\ndescr': String val = \"\",\nshort': (U8 val | None val) = reference,\ndefault': (F64 val | None val) = reference)\n: OptionSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference\ndefault': (F64 val | None val) = reference\n\nReturns\u00b6\n\nOptionSpec val^"} +{"id": "Pony/src-builtin-float-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-Stringable-_0.txt", "contents": "\n\n\n\n\n\n\nStringable\u00b6\n[Source]\nThings that can be turned into a String.\ninterface box Stringable\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nGenerate a string representation of this object.\nfun box string()\n: String iso^\n\nReturns\u00b6"} +{"id": "Pony/c-abi_1.txt", "contents": "# Writing a C library for Pony\n\nWriting your own C library for use by Pony is almost as easy as using existing libraries.\n\nLet's look at a complete example of a C function we may wish to provide to Pony. Let's consider a pure Pony implementation of a [Jump Consistent Hash](https://arxiv.org/abs/1406.2294):\n\n```pony\n// Jump consistent hashing in Pony, with an inline pseudo random generator\n// https://arxiv.org/abs/1406.2294\n\nfun jch(key: U64, buckets: U32): I32 =>\nvar k = key\nvar b = I64(0)\nvar j = I64(0)\n\nwhile j < buckets.i64() do\nb = j\nk = (k * 2862933555777941757) + 1\nj = ((b + 1).f64() * (I64(1 << 31).f64() / ((k >> 33) + 1).f64())).i64()\nend"} +{"id": "Pony/src-files-file-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/0_literals_7.txt", "contents": "\nenv.out.print(pony + \" \" + pony_hex_escaped + \" \" + pony_unicode_escape)\nfor b in pony.values() do\nenv.out.print(Format.int[U8](b, FormatHex))\nend\n\n```\n\nAll string literals support multi-line strings:\n\n```pony\n\nlet stacked_ponies = \"\n\ud83d\udc0e\n\ud83d\udc0e\n\ud83d\udc0e\n\"\n```\n"} +{"id": "Pony/src-pony_check-int_properties-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-time-posix_date-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-files-directory-_33.txt", "contents": "if not path.caps(FileRead) or (_fd == -1) then\nerror\nend\n\nlet path' = path.path\nlet fd' = _fd\n\nrecover\nlet list = Array[String]\n\nifdef posix then\nif fd' == -1 then\nerror\nend\n\nlet h =\nifdef linux or bsd then\nlet fd =\n@openat(fd', \".\".cstring(),\n@ponyint_o_rdonly()"} +{"id": "Pony/src-pony_check-pony_check-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151\"\"\""} +{"id": "Pony/term-ANSI-_4.txt", "contents": "Parameters\u00b6\n\nn: U32 val = 0\n\nReturns\u00b6\n\nString val\n\n\ncursor\u00b6\n[Source]\nMove the cursor to line y, column x. 0 is the same as 1. This indexes from\nthe top left corner of the screen.\nfun box cursor(\nx: U32 val = 0,\ny: U32 val = 0)\n: String val\n\nParameters\u00b6\n"} +{"id": "Pony/use-statement_5.txt", "contents": "# Scheme indicators\n\nThe string we give to a `use` command is known as the _specifier_. This consists of a _scheme_ indicator and a _locator_, separated by a colon. The scheme indicator tells the `use` command what we want it to do, for example, the scheme indicator for including a package is \"package\". If no colon is found within the specifier string then the use command assumes you meant \"package\".\n\nThe following two use commands are exactly equivalent:\n\n```pony\nuse \"foo\"\nuse \"package:foo\"\n```\n\nIf you are using a locator string that includes a colon, for example, an absolute path in Windows, then you __have__ to include the \"package\" scheme specifier:\n\n```pony\nuse \"C:/foo/bar\" // Error, scheme \"C\" is unknown\nuse \"package:C:/foo/bar\" // OK\n```\n\nTo allow use commands to be portable across operating systems, and to avoid confusion with escape characters, '/' should always be used as the path separator in use commands, even on Windows.\n"} +{"id": "Pony/builtin-F64-_25.txt", "contents": "F64 val\n\n\nsqrt_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is negative, the result is undefined.\nfun box sqrt_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncbrt\u00b6\n[Source]\nfun box cbrt()\n: F64 val\n"} +{"id": "Pony/net-OSSockOpt-_197.txt", "contents": "fun box ip_dontfrag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_drop_membership\u00b6\n[Source]\nfun box ip_drop_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_drop_source_membership\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_43.txt", "contents": "max: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nascii_letters\u00b6\n[Source]\nCreate a generator for strings of ASCII letters,\nwith a minimum length of min (default: 0)\nand a maximum length of max (default: 100).\nfun box ascii_letters(\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0"} +{"id": "Pony/promises-Fulfill-_1.txt", "contents": "\nvalue: A\n\nReturns\u00b6\n\nB ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_304.txt", "contents": "fun box rds_info_first()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_ib_connections\u00b6\n[Source]\nfun box rds_info_ib_connections()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_iwarp_connections\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_28.txt", "contents": "\"\"\"\nlet _disposables: Array[DisposableActor] = Array[DisposableActor]\n\"\"\"\nDisosable actors that are disposed of after every round.\n\"\"\"\nvar _shrinker: Iterator[T^] = _EmptyIterator[T^]\nvar _sample_repr: String = \"\"\nvar _pass: Bool = true\n\nnew create(\np1: Property1[T] iso,\nparams: PropertyParams,\nnotify: PropertyResultNotify,\nlogger: PropertyLogger,\nenv: Env\n) =>\n_env = env\n_prop1 = consume p1\n_params = params\n_logger = logger"} +{"id": "Pony/strings-CommonPrefix-_2.txt", "contents": "eq\u00b6\n[Source]\nfun box eq(\nthat: CommonPrefix val)\n: Bool val\n\nParameters\u00b6\n\nthat: CommonPrefix val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: CommonPrefix val)\n: Bool val"} +{"id": "Pony/src-process-_process-_23.txt", "contents": "452\n453\n454\n455\n456use \"signals\"\nuse \"files\"\nuse @pony_os_errno[I32]()\nuse @ponyint_wnohang[I32]() if posix\nuse @ponyint_win_process_create[USize](appname: Pointer[U8] tag,\ncmdline: Pointer[U8] tag, environ: Pointer[U8] tag, wdir: Pointer[U8] tag,\nstdin_fd: U32, stdout_fd: U32, stderr_fd: U32,\nerror_code: Pointer[U32], error_msg: Pointer[Pointer[U8]] tag)\nuse @ponyint_win_process_wait[I32](hProc: USize, code: Pointer[I32])\nuse @ponyint_win_process_kill[I32](hProc: USize)\nuse @execve[I32](path: Pointer[U8] tag, argp: Pointer[Pointer[U8] tag] tag,\nenvp: Pointer[Pointer[U8] tag] tag)\nuse @fork[I32]()\nuse @chdir[I32](path: Pointer[U8] tag)\nuse @dup2[I32](fildes: U32, fildes2: U32)\nuse @write[ISize](fd: U32, buf: Pointer[U8] tag, size: USize)"} +{"id": "Pony/collections-persistent-HashSet-_13.txt", "contents": "Iterator[A] ref^\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: HashSet[A, H] box)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_21.txt", "contents": "fun box mknodat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nrenameat\u00b6\n[Source]\nfun box renameat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsymlinkat\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-net-tcp_connection-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-ILong-_47.txt", "contents": "\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_84.txt", "contents": "\nfun fld(y: I128): I128 => _SignedArithmetic.fld[I128, U128](this, y)\n\nfun fld_unsafe(y: I128): I128 =>\n_SignedUnsafeArithmetic.fld_unsafe[I128, U128](this, y)\n\nfun mod(y: I128): I128 =>\n_SignedArithmetic.mod[I128, U128](this, y)\n\nfun mod_unsafe(y: I128): I128 =>\n_SignedUnsafeArithmetic.mod_unsafe[I128, U128](this, y)\n\nfun hash(): USize => u128().hash()\nfun hash64(): U64 => u128().hash64()\n\nfun string(): String iso^ =>\n_ToString._u128(abs().u128(), this < 0)\n\nfun mul(y: I128): I128 =>\n(u128() * y.u128()).i128()"} +{"id": "Pony/src-pony_check-generator-_137.txt", "contents": "ascii(min, max, ASCIIPrintable)\n\nfun ascii_numeric(\nmin: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for strings of numeric ASCII characters,\nwith a minimum length of `min` (default: 0)\nand a maximum length of `max` (default: 100).\n\"\"\"\nascii(min, max, ASCIIDigits)\n\nfun ascii_letters(\nmin: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\""} +{"id": "Pony/pony_check-Randomness-_18.txt", "contents": "\nBool val\n\n\nshuffle[T: T]\u00b6\n[Source]\nfun ref shuffle[T: T](\narray: Array[T] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[T] ref\n\nReturns\u00b6\n\nNone val\n\n\n"} +{"id": "Pony/src-net-ossockopt-_65.txt", "contents": "1292\n1293\n1294\n1295\n1296\n1297\n1298\n1299\n1300\n1301\n1302\n1303\n1304\n1305\n1306\n1307\n1308\n1309\n1310\n1311"} +{"id": "Pony/builtin-F64-_63.txt", "contents": "\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_82.txt", "contents": "fun fld_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.fld_partial[ISize, USize](this, y)?\n\nfun mod_partial(y: ISize): ISize ? =>\n_SignedPartialArithmetic.mod_partial[ISize, USize](this, y)?\n\nprimitive I128 is SignedInteger[I128, U128]\nnew create(value: I128) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.i128()\n\nnew min_value() => -0x8000_0000_0000_0000_0000_0000_0000_0000\nnew max_value() => 0x7FFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF\n\nfun abs(): U128 => if this < 0 then (-this).u128() else this.u128() end\nfun bit_reverse(): I128 => @\"llvm.bitreverse.i128\"(this.u128()).i128()\nfun bswap(): I128 => @\"llvm.bswap.i128\"(this.u128()).i128()\nfun popcount(): U128 => @\"llvm.ctpop.i128\"(this.u128())\nfun clz(): U128 => @\"llvm.ctlz.i128\"(this.u128(), false)\nfun ctz(): U128 => @\"llvm.cttz.i128\"(this.u128(), false)\n"} +{"id": "Pony/ini--index-_1.txt", "contents": "actor Main\nnew create(env:Env) =>\ntry\nlet ini_file = File(FilePath(FileAuth(env.root), \"example.ini\"))\nlet sections = IniParse(ini_file.lines())?\nfor section in sections.keys() do\nenv.out.print(\"Section name is: \" + section)\nfor key in sections(section)?.keys() do\nenv.out.print(key + \" = \" + sections(section)?(key)?)\nend\nend\nend\n\nPublic Types\u00b6\n\nprimitive Ini\ntype IniError\nprimitive IniIncompleteSection\ntype IniMap\nprimitive IniNoDelimiter"} +{"id": "Pony/object-capabilities_0.txt", "contents": "# Object Capabilities\n\nPony's capabilities-secure type system is based on the object-capability model. That sounds complicated, but really it's elegant and simple. The core idea is this:\n\n> A capability is an unforgeable token that (a) designates an object and (b) gives the program the authority to perform a specific set of actions on that object.\n\nSo what's that token? It's an address. A pointer. A reference. It's just... an object.\n"} +{"id": "Pony/src-net-tcp_connection-_61.txt", "contents": "1212\n1213\n1214\n1215\n1216\n1217\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1231"} +{"id": "Pony/builtin-I16-_47.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_63.txt", "contents": "\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list_node-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/collections-List-_1.txt", "contents": "There are a lot of functions in List. The following code picks out a few common examples.\nIt outputs:\nA new empty list has 0 nodes.\nAdding one node to our empty list means it now has a size of 1.\nThe first (index 0) node has the value: A single String\nA list created by appending our second single-node list onto our first has size: 2\nThe List nodes of our first list are now:\nA single String\nAnother String\nAppend *moves* the nodes from the second list so that now has 0 nodes.\nA list created from an array of three strings has size: 3\nFirst\nSecond\nThird\nMapping over our three-node list produces a new list of size: 3\nEach node-value in the resulting list is now far more exciting:\nFirst BOOM!\nSecond BOOM!\nThird BOOM!\nFiltering our three-node list produces a new list of size: 2"} +{"id": "Pony/files-FilePath-_8.txt", "contents": "mkdir\u00b6\n[Source]\nCreates the directory. Will recursively create each element. Returns true\nif the directory exists when we're done, false if it does not. If we do not\nhave the FileStat permission, this will return false even if the directory\ndoes exist.\nfun val mkdir(\nmust_create: Bool val = false)\n: Bool val\n\nParameters\u00b6\n\nmust_create: Bool val = false\n\nReturns\u00b6\n\nBool val\n\n\nremove\u00b6"} +{"id": "Pony/net-UDPNotify-_3.txt", "contents": "\nParameters\u00b6\n\nsock: UDPSocket ref\ndata: Array[U8 val] iso\nfrom: NetAddress val\n\nReturns\u00b6\n\nNone val\n\n\nclosed\u00b6\n[Source]\nCalled when the socket is closed.\nfun ref closed(\nsock: UDPSocket ref)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/src-builtin-array-_79.txt", "contents": "_ptr._offset(src_idx)._copy_to(dst._ptr._offset(dst_idx), len)\n\nif dst._size < (dst_idx + len) then\ndst._size = dst_idx + len\nend\n\nfun ref remove(i: USize, n: USize) =>\n\"\"\"\nRemove n elements from the array, beginning at index i.\n\"\"\"\nif i < _size then\nlet count = n.min(_size - i)\n_size = _size - count\n_ptr._offset(i)._delete(count, _size - i)\nend\n\nfun ref clear() =>\n\"\"\"\nRemove all elements from the array.\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_524.txt", "contents": "fun box so_select_err_queue()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_setclp\u00b6\n[Source]\nfun box so_setclp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_setfib\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/src-collections-persistent-list-_48.txt", "contents": "match l\n| let cons: Cons[A] =>\n_flat_map[B](cons.tail(), f, _rev_prepend[B](f(cons.head()), acc))\nelse\nacc.reverse()\nend\n\nfun tag _rev_prepend[B](l: List[B], target: List[B]): List[B] =>\n\"\"\"\nPrepends l in reverse order onto target\n\"\"\"\nmatch l\n| let cns: Cons[B] =>\n_rev_prepend[B](cns.tail(), target.prepend(cns.head()))\nelse\ntarget\nend\n\nfun val for_each(f: {(val->A)} box) =>\n\"\"\""} +{"id": "Pony/backpressure-ApplyReleaseBackpressureAuth-_1.txt", "contents": "from: AmbientAuth val\n\nReturns\u00b6\n\nApplyReleaseBackpressureAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: ApplyReleaseBackpressureAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: ApplyReleaseBackpressureAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Real-_12.txt", "contents": "\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6"} +{"id": "Pony/builtin-Platform-_7.txt", "contents": "Bool val\n\n\nllp64\u00b6\n[Source]\nfun box llp64()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nilp32\u00b6\n[Source]\nfun box ilp32()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_41.txt", "contents": "if idx_del <= mask then\nreturn (idx_del, false)\nelse\nreturn (idx, false)\nend\n| _MapDeleted =>\nif idx_del > mask then\nidx_del = idx\nend\nend\n\nidx = (h + ((i + (i * i)) / 2)) and mask\nend\nend\n\n(idx_del, false)\n\nfun ref _resize(len: USize) =>\n\"\"\"\nChange the available space."} +{"id": "Pony/net-UDPSocket-_1.txt", "contents": "class MyUDPNotify is UDPNotify\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8] iso,\nfrom: NetAddress)\n=>\nsock.write(consume data, from)\n\nfun ref not_listening(sock: UDPSocket ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nUDPSocket(UDPAuth(env.root),\nMyUDPNotify, \"\", \"8989\")\n\nThe client is implemented like this:\nuse \"net\"\n\nclass MyUDPNotify is UDPNotify"} +{"id": "Pony/src-pony_check-property-_17.txt", "contents": "\"\"\"\nThe Generator for the first argument to your `property3` method.\n\"\"\"\n\nfun gen2(): Generator[T2]\n\"\"\"\nThe Generator for the second argument to your `property3` method.\n\"\"\"\n\nfun gen3(): Generator[T3]\n\"\"\"\nThe Generator for the third argument to your `property3` method.\n\"\"\"\n\nfun gen(): Generator[(T1, T2, T3)] =>\nGenerators.zip3[T1, T2, T3](\ngen1(),\ngen2(),\ngen3())\n"} +{"id": "Pony/pony_check-PropertyParams-_2.txt", "contents": "\nnum_samples': USize val = 100\nseed': U64 val = call\nmax_shrink_rounds': USize val = 10\nmax_generator_retries': USize val = 5\ntimeout': U64 val = 60000000000\nasync': Bool val = false\n\nReturns\u00b6\n\nPropertyParams val^\n\n\nPublic fields\u00b6\nlet seed: U64 val\u00b6\n[Source]\n\nlet num_samples: USize val\u00b6\n[Source]\n"} +{"id": "Pony/net-OSSockOpt-_356.txt", "contents": "fun box sctp_cc_rfc2581()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_rtcc\u00b6\n[Source]\nfun box sctp_cc_rtcc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_closed\u00b6\n[Source]"} +{"id": "Pony/builtin-Pointer-_3.txt", "contents": "Returns\u00b6\n\nBool val\n\n\neq\u00b6\n[Source]\nReturn true if this address is that address.\nfun tag eq(\nthat: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n\nthat: Pointer[A] tag\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/src-random-mt-_8.txt", "contents": "\"\"\"\ntry\n_index = 0\nvar x = _state(0)?\nvar i: USize = 0\n\nwhile i < _m() do\nx = _lower(i, x)?\ni = i + 1\nend\n\nx = _state(_m())?\ni = _m()\n\nwhile i < _n1() do\nx = _upper(i, x)?\ni = i + 1\nend\n\n_wrap()?"} +{"id": "Pony/src-process-process_monitor-_46.txt", "contents": "Resume reading on file descriptor.\n\"\"\"\nmatch near_fd\n| _stdout.near_fd => _pending_reads(_stdout)\n| _stderr.near_fd => _pending_reads(_stderr)\nend\n\nfun ref _write_final(data: ByteSeq) =>\n\"\"\"\nWrite as much as possible to the pipe if it is open and there are no\npending writes. Save everything unwritten into _pending and apply\nbackpressure.\n\"\"\"\nif (not _closed) and not _stdin.is_closed() and (_pending.size() == 0) then\n// Send as much data as possible.\n(let len, let errno) = _stdin.write(data, 0)\n\nif len == -1 then // write error\nif errno == _EAGAIN() then\n// Resource temporarily unavailable, send data later."} +{"id": "Pony/pony_check-GenObj-_3.txt", "contents": "[Source]\nGenerate a value and also return a shrink result,\neven if the generator does not return any when calling generate.\nfun box generate_and_shrink(\nrnd: Randomness ref)\n: (T^ , Iterator[T^] ref) ?\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\n(T^ , Iterator[T^] ref) ?\n\n\niter\u00b6\n[Source]\nfun box iter(\nrnd: Randomness ref)"} +{"id": "Pony/builtin-Integer-_37.txt", "contents": "y: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/ini-Ini-_0.txt", "contents": "\n\n\n\n\n\n\nIni\u00b6\n[Source]\nA streaming parser for INI formatted lines of test.\nprimitive val Ini\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Ini val^\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ILong-_30.txt", "contents": "[Source]\nfun box mul_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: ILong val)\n: ILong val\n"} +{"id": "Pony/9_object-literals_6.txt", "contents": "\nIt's also possible to use a _capture list_ to create new names for things. A capture list is a second parenthesised list after the parameters:\n\n```pony\nnew create(env:Env) =>\nfoo({(s: String)(myenv = env) => myenv.out.print(s) })\n```\n\nThe type of a lambda is also declared using curly brackets. Within the brackets, the function parameter types are specified within parentheses followed by an optional colon and return type. The example above uses `{(String)}` to be the type of a lambda function that takes a `String` as an argument and returns nothing.\n\nIf the lambda object is not declared with a specific reference capability, the reference capability is inferred from the structure of the lambda. If the lambda does not have any captured references, it will be `val` by default; if it does have captured references, it will be `ref` by default. The following is an example of a `val` lambda object:\n\n```pony\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>\nlet l = List[U32]\nl.>push(10).>push(20).>push(30).push(40)\nlet r = reduce(l, 0, {(a:U32, b:U32): U32 => a + b })"} +{"id": "Pony/pony_check-Randomness-_0.txt", "contents": "\n\n\n\n\n\n\nRandomness\u00b6\n[Source]\nSource of randomness, providing methods for generatic uniformly distributed\nvalues from a given closed interval: [min, max]\nin order for the user to be able to generate every possible value for a given\nprimitive numeric type.\nAll primitive number method create numbers in range [min, max)\nclass ref Randomness\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create("} +{"id": "Pony/pony_check-Property3-_1.txt", "contents": "The Generator for the first argument to your property3 method.\nfun box gen1()\n: Generator[T1] box\n\nReturns\u00b6\n\nGenerator[T1] box\n\n\ngen2\u00b6\n[Source]\nThe Generator for the second argument to your property3 method.\nfun box gen2()\n: Generator[T2] box\n\nReturns\u00b6\n\nGenerator[T2] box\n\n"} +{"id": "Pony/builtin-I32-_56.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_307.txt", "contents": "fun box rds_info_recv_messages()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_retrans_messages\u00b6\n[Source]\nfun box rds_info_retrans_messages()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_send_messages\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-set-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-String-_15.txt", "contents": "USize val\n\n\nspace\u00b6\n[Source]\nReturns the space available for data, not including the null terminator.\nfun box space()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nreserve\u00b6\n[Source]\nReserve space for len bytes. An additional byte will be reserved for the\nnull terminator.\nfun ref reserve(\nlen: USize val)"} +{"id": "Pony/src-collections-persistent-vec-_30.txt", "contents": "\nif _idx == leaves.size() then\n_leaf_nodes.shift()?\n_idx = 0\nend\n(_i = _i + 1, v)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_99.txt", "contents": "\nnext'()?\nelse\nerror\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-_process-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-signed-_72.txt", "contents": "else\n(let r, let o) =\n@\"llvm.ssub.with.overflow.i64\"(this.i64(), y.i64())\n(r.ilong(), o)\nend\n\nfun mulc(y: ILong): (ILong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.smul.with.overflow.i32\"(this.i32(), y.i32())\n(r.ilong(), o)\nelse\n_SignedCheckedArithmetic._mul_checked[ULong, ILong](this, y)\nend\n\nfun divc(y: ILong): (ILong, Bool) =>\n_SignedCheckedArithmetic.div_checked[ILong, ULong](this, y)\n\nfun remc(y: ILong): (ILong, Bool) =>\n_SignedCheckedArithmetic.rem_checked[ILong, ULong](this, y)"} +{"id": "Pony/builtin-ULong-_36.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-cli-command_spec-_52.txt", "contents": "\"\"\"\n\"<\" + _name + \">\"\n\nfun deb_string(): String =>\n_name + \"[\" + _typ.string() + \"]\" +\nif not _required then \"(=\" + _default.string() + \")\" else \"\" end\n\nclass _StringSeq is ReadSeq[String]\n\"\"\"\n_StringSeq is a wrapper / helper class for working with String sequence\nvalues while parsing. It assists in collecting the strings as they are\nparsed, and producing a ReadSeq[String] as a result.\n\"\"\"\nlet strings: pc.Vec[String]\n\nnew val empty() =>\nstrings = pc.Vec[String]\n\nnew val from_string(s: String) =>\nstrings = (pc.Vec[String]).push(s)"} +{"id": "Pony/src-itertools-iter-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/files-FileTime-_0.txt", "contents": "\n\n\n\n\n\n\nFileTime\u00b6\n[Source]\nprimitive val FileTime\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileTime val^\n\nReturns\u00b6\n\nFileTime val^"} +{"id": "Pony/capsicum-CapRights0-_0.txt", "contents": "\n\n\n\n\n\n\nCapRights0\u00b6\n[Source]\nVersion 0 of the capsicum cap_rights_t structure.\nclass ref CapRights0\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nInitialises with no rights.\nnew ref create()\n: CapRights0 ref^\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-stdin-_10.txt", "contents": "192\n193\n194use @pony_asio_event_create[AsioEventID](owner: AsioEventNotify, fd: U32,\nflags: U32, nsec: U64, noisy: Bool)\nuse @pony_asio_event_unsubscribe[None](event: AsioEventID)\nuse @pony_asio_event_destroy[None](event: AsioEventID)\nuse @pony_os_stdin_read[USize](buffer: Pointer[U8] tag, size: USize)\n\ninterface InputNotify\n\"\"\"\nNotification for data arriving via an input stream.\n\"\"\"\nfun ref apply(data: Array[U8] iso) =>\n\"\"\"\nCalled when data is available on the stream.\n\"\"\"\nNone\n\nfun ref dispose() =>\n\"\"\""} +{"id": "Pony/pony_check-Property4UnitTest-_3.txt", "contents": "\nexclusion_group\u00b6\nfun box exclusion_group()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ntimed_out\u00b6\nfun ref timed_out(\nh: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/capsicum-Cap-_38.txt", "contents": "fun box exattr_list()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nexattr_set\u00b6\n[Source]\nfun box exattr_set()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nacl_check\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_86.txt", "contents": "end\n\nfun f64(): F64 =>\nif this == 0 then\nreturn 0\nend\n\nvar a = this\nlet sd = bitwidth() - clz()\nvar e = (sd - 1).u64()\n\nif sd > 53 then\nmatch sd\n| 54 => a = a << 1\n| 55 => None\nelse\na = (a >> (sd - 55)) or\nif (a and (-1 >> ((bitwidth() + 55) - sd))) != 0 then 1 else 0 end\nend\n"} +{"id": "Pony/src-term-ansi-_25.txt", "contents": "\nfun bright_cyan(): String =>\n\"\"\"\nBright cyan text.\n\"\"\"\n\"\\x1B[96m\"\n\nfun bright_grey(): String =>\n\"\"\"\nBright grey text.\n\"\"\"\n\"\\x1B[37m\"\n\nfun black_bg(): String =>\n\"\"\"\nBlack background.\n\"\"\"\n\"\\x1B[40m\"\n\nfun red_bg(): String =>"} +{"id": "Pony/src-signals-signal_handler-_5.txt", "contents": "Raise the signal.\n\"\"\"\nSignalRaise(_sig)\n\nbe dispose() =>\n\"\"\"\nDispose of the signal handler.\n\"\"\"\n_dispose()\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nCalled when the signal is received, or when the AsioEventID can be\ndestroyed.\n\"\"\"\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(event)\nelseif event is _event then\nif not _notify(arg) then\n_dispose()"} +{"id": "Pony/net-OSSockOpt-_326.txt", "contents": "fun box rose_ship_absent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_t1\u00b6\n[Source]\nfun box rose_t1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_t2\u00b6\n[Source]"} +{"id": "Pony/linking-c_1.txt", "contents": "# Use for external libraries\n\nTo link an external library to Pony code another variant of the use command is used. The `lib` specifier is used to tell the compiler you want to link to a library. For example:\n\n```pony\nuse \"lib:foo\"\n```\n\nAs with other `use` commands a condition may be specified. This is particularly useful when the library has slightly different names on different platforms.\n\nHere's a real example from the standard library:\n\n```pony\nuse \"path:/usr/local/opt/libressl/lib\" if osx\nuse \"lib:ssl\" if not windows\nuse \"lib:crypto\" if not windows\nuse \"lib:libssl-32\" if windows\nuse \"lib:libcrypto-32\" if windows\n\nuse @SSL_load_error_strings[None]()"} +{"id": "Pony/builtin-Platform-_5.txt", "contents": "Bool val\n\n\nx86\u00b6\n[Source]\nfun box x86()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\narm\u00b6\n[Source]\nfun box arm()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/5_structs_1.txt", "contents": "# Structs are \"classes for FFI\"\n\nA `struct` is a class like mechanism used to pass data back and forth with C code via Pony's Foreign Function Interface.\n\nLike classes, Pony structs can contain both fields and methods. Unlike classes, Pony structs have the same binary layout as C structs and can be transparently used in C functions. Structs do not have a type descriptor, which means they cannot be used in algebraic types or implement traits/interfaces.\n"} +{"id": "Pony/src-builtin-signed-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-U32-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_39.txt", "contents": "fun box divrem(\ny: I8 val)\n: (I8 val , I8 val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , I8 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-net-ossockopt-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991"} +{"id": "Pony/src-collections-list-_52.txt", "contents": "Second BOOM!\nThird BOOM!\nFiltering our three-node list produces a new list of size: 2\nSecond BOOM!\nThird BOOM!\nThe size of our first partitioned list (matches predicate): 1\nThe size of our second partitioned list (doesn't match predicate): 1\nOur matching partition elements are:\nSecond BOOM!\n\n```pony\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>\n\n// Create a new empty List of type String\nlet my_list = List[String]()\n\nenv.out.print(\"A new empty list has \" + my_list.size().string() + \" nodes.\") // 0"} +{"id": "Pony/term-ANSI-_23.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\ngrey_bg\u00b6\n[Source]\nGrey background.\nfun box grey_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nwhite_bg\u00b6\n[Source]"} +{"id": "Pony/2_ops_4.txt", "contents": "\nThe full list of infix operators that are aliases for functions is:\n\n---\n\n| Operator | Method | Description | Note |\n| -------- | -------------- | ----------------------------- | ------------------------------ |\n| `+` | `add()` | Addition |\n| `-` | `sub()` | Subtraction |\n| `*` | `mul()` | Multiplication |\n| `/` | `div()` | Division |\n| `%` | `rem()` | Remainder |\n| `%%` | `mod()` | Modulo | Starting with version `0.26.1` |\n| `<<` | `shl()` | Left bit shift |\n| `>>` | `shr()` | Right bit shift |\n| `and` | `op_and()` | And, both bitwise and logical |\n| `or` | `op_or()` | Or, both bitwise and logical |\n| `xor` | `op_xor()` | Xor, both bitwise and logical |\n| `==` | `eq()` | Equality |\n| `!=` | `ne()` | Non-equality |"} +{"id": "Pony/src-files-file-_63.txt", "contents": "\"\"\"\nSet the last access and modification times of the directory to now.\n\"\"\"\n_FileDes.touch(_fd, path)\n\nfun set_time(atime: (I64, I64), mtime: (I64, I64)): Bool =>\n\"\"\"\nSet the last access and modification times of the directory to the given\nvalues.\n\"\"\"\n_FileDes.set_time(_fd, path, atime, mtime)\n\nfun ref lines(): FileLines =>\n\"\"\"\nReturns an iterator for reading lines from the file.\n\"\"\"\nFileLines(this)\n\nfun ref dispose() =>\n\"\"\""} +{"id": "Pony/src-pony_check-generator-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/builtin-SignedInteger-_21.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: A)\n: (A , A) ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_245.txt", "contents": "fun box ip_unicast_if()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_xfrm_policy\u00b6\n[Source]\nfun box ip_xfrm_policy()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_connwait\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_55.txt", "contents": "1092\n1093\n1094\n1095\n1096\n1097\n1098\n1099\n1100\n1101\n1102\n1103\n1104\n1105\n1106\n1107\n1108\n1109\n1110\n1111"} +{"id": "Pony/process-ForkError-_2.txt", "contents": "\nthat: ForkError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ForkError val)\n: Bool val\n\nParameters\u00b6\n\nthat: ForkError val\n\nReturns\u00b6\n"} +{"id": "Pony/src-buffered-reader-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/builtin-F32-_34.txt", "contents": "copysign\u00b6\n[Source]\nfun box copysign(\nsign: F32 val)\n: F32 val\n\nParameters\u00b6\n\nsign: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n"} +{"id": "Pony/src-math-is_prime-_8.txt", "contents": "| 180 => 1087 | 181 => 1091 | 182 => 1093 | 183 => 1097 | 184 => 1103\n| 185 => 1109 | 186 => 1117 | 187 => 1123 | 188 => 1129 | 189 => 1151\n| 190 => 1153 | 191 => 1163 | 192 => 1171 | 193 => 1181 | 194 => 1187\n| 195 => 1193 | 196 => 1201 | 197 => 1213 | 198 => 1217 | 199 => 1223\n| 200 => 1229 | 201 => 1231 | 202 => 1237 | 203 => 1249 | 204 => 1259\n| 205 => 1277 | 206 => 1279 | 207 => 1283 | 208 => 1289 | 209 => 1291\n| 210 => 1297 | 211 => 1301 | 212 => 1303 | 213 => 1307 | 214 => 1319\n| 215 => 1321 | 216 => 1327 | 217 => 1361 | 218 => 1367 | 219 => 1373\n| 220 => 1381 | 221 => 1399 | 222 => 1409 | 223 => 1423 | 224 => 1427\n| 225 => 1429 | 226 => 1433 | 227 => 1439 | 228 => 1447 | 229 => 1451\n| 230 => 1453 | 231 => 1459 | 232 => 1471 | 233 => 1481 | 234 => 1483\n| 235 => 1487 | 236 => 1489 | 237 => 1493 | 238 => 1499 | 239 => 1511\n| 240 => 1523 | 241 => 1531 | 242 => 1543 | 243 => 1549 | 244 => 1553\n| 245 => 1559 | 246 => 1567 | 247 => 1571 | 248 => 1579 | 249 => 1583\n| 250 => 1597 | 251 => 1601 | 252 => 1607 | 253 => 1609 | 254 => 1613\n| 255 => 1619\nelse 0\nend\n\nfun _low_prime_table_size(): USize => 256"} +{"id": "Pony/files-FilePath-_11.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nchmod\u00b6\n[Source]\nSet the FileMode for a path.\nfun box chmod(\nmode: FileMode box)\n: Bool val\n\nParameters\u00b6\n\nmode: FileMode box\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/src-itertools-iter-_99.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.skip(3)\n```\n`4 5 6`\n\n```pony\nIter[I64]([1; 2; 3].values())\n.skip(3)\n.has_next()\n```\n`false`\n\"\"\"\nvar c = n\ntry\nwhile _iter.has_next() and (c > 0) do\n_iter.next()?\nc = c - 1"} +{"id": "Pony/net-OSSockOpt-_9.txt", "contents": "fun box ipproto_carp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_cftp\u00b6\n[Source]\nfun box ipproto_cftp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_chaos\u00b6\n[Source]"} +{"id": "Pony/buffered-Writer-_13.txt", "contents": "data: F32 val)\n: None val\n\nParameters\u00b6\n\ndata: F32 val\n\nReturns\u00b6\n\nNone val\n\n\nf32_be\u00b6\n[Source]\nWrite an F32 to the buffer in big-endian byte order.\nfun ref f32_be(\ndata: F32 val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_13.txt", "contents": "[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box divrem_unsafe(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/process-ExecveError-_2.txt", "contents": "\nthat: ExecveError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ExecveError val)\n: Bool val\n\nParameters\u00b6\n\nthat: ExecveError val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-time-_21.txt", "contents": "let qpc = pc._1.u64() or (pc._2.u64() << 32)\n(qpc, qpf)\nelse\ncompile_error \"no QueryPerformanceCounter\"\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/builtin-I128-_42.txt", "contents": "I128 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: I128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I32-_27.txt", "contents": "fun box shr_unsafe(\ny: U32 val)\n: I32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nI32 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/collections-List-_41.txt", "contents": "\nListNodes[A, this->ListNode[A] ref] ref^\n\n\nvalues\u00b6\n[Source]\nReturn an iterator on the values in the List in forward order.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet values = my_list.values() // value \"a\" is before value \"c\"\n\nfun box values()\n: ListValues[A, this->ListNode[A] ref] ref^\n\nReturns\u00b6\n\nListValues[A, this->ListNode[A] ref] ref^\n\n\nrvalues\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_25.txt", "contents": "\nA ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\ndiv_partial\u00b6"} +{"id": "Pony/builtin-U8-_12.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_37.txt", "contents": "A\n\n\nasin\u00b6\n[Source]\nfun box asin()\n: A\n\nReturns\u00b6\n\nA\n\n\natan\u00b6\n[Source]\nfun box atan()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-reverse-_0.txt", "contents": "\n\n\n\n\n\n\nreverse.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-list-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/pony_check-PropertyRunner-_1.txt", "contents": "params: PropertyParams val,\nnotify: PropertyResultNotify val,\nlogger: PropertyLogger val,\nenv: Env val)\n: PropertyRunner[T] tag^\n\nParameters\u00b6\n\np1: Property1[T] iso\nparams: PropertyParams val\nnotify: PropertyResultNotify val\nlogger: PropertyLogger val\nenv: Env val\n\nReturns\u00b6\n\nPropertyRunner[T] tag^\n\n\nPublic Behaviours\u00b6"} +{"id": "Pony/src-itertools-iter-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/builtin-I64-_60.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/0_literals_13.txt", "contents": "U64(0xA)\n\"0xA\"\n]\n```\n\nHere `my_stringable_array` is coerced to `Array[Stringable] ref`. This works because `Stringable` is a trait that both `String` and `U64` implement.\n\nIt is also possible to return an array with a different [Reference Capability](/reference-capabilities/index.md) than `ref` just by specifying it on the type:\n\n```pony\nlet my_immutable_array: Array[Stringable] val =\n[\nU64(0xBEEF)\n\"0xBEEF\"\n]\n```\n\nThis way array literals can be used for creating arrays of any [Reference Capability](/reference-capabilities/index.md).\n"} +{"id": "Pony/builtin-String-_78.txt", "contents": "read_int[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[A] val)]\u00b6\n[Source]\nRead an integer from the specified location in this string. The integer\nvalue read and the number of bytes consumed are reported.\nThe base parameter specifies the base to use, 0 indicates using the prefix,\nif any, to detect base 2, 10 or 16.\nIf no integer is found at the specified location, then (0, 0) is returned,\nsince no characters have been used.\nAn integer out of range for the target type throws an error.\nA leading minus is allowed for signed integer types.\nUnderscore characters are allowed throughout the integer and are ignored.\nfun box read_int[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val) & Integer[A] val)](\noffset: ISize val = 0,\nbase: U8 val = 0)\n: (A , USize val) ?\n"} +{"id": "Pony/arrow-types_3.txt", "contents": "# Using `box->` as a viewpoint\n\nThere's one more way we use arrow types, and it's also related to generics. Sometimes we want to talk about a type parameter as it is seen by some unknown type, _as long as that type can read the type parameter_.\n\nIn other words, the unknown type will be a subtype of `box`, but that's all we know. Here's an example from the standard library:\n\n```pony\ninterface Comparable[A: Comparable[A] box]\nfun eq(that: box->A): Bool => this is that\nfun ne(that: box->A): Bool => not eq(that)\n```\n\nHere, we say that something is `Comparable[A]` if and only if it has functions `eq` and `ne` and those functions have a single parameter of type `box->A` and return a `Bool`. In other words, whatever `A` is bound to, we only need to be able to read it.\n"} +{"id": "Pony/src-itertools-iter-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/builtin-FloatingPoint-_14.txt", "contents": "Unsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box rem_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod_unsafe\u00b6\n[Source]\nUnsafe operation."} +{"id": "Pony/capability-subtyping_1.txt", "contents": "# Simple subtypes\n\nSubtyping is about _substitutability_. That is, if we need to supply a certain type, what other types can we substitute instead? Reference capabilities are one important component. We can start by going through a few simpler cases, and then we will talk about the full chart.\n\nFirst, let's focus on the four capabilities `ref`, `val`, `box`, and `tag`. These have a very useful property: they alias to themselves (and unalias to themselves, as well). This will make the subtyping a lot simpler to work with. Afterwards we can talk about `iso` and `trn`, whose subtyping is more intricate.\n\nTo keep things brief, let's add a small shorthand. We will use the `<:` symbol to mean \"is a subtype of\", or you can read it as \"can be used as\".\n\n* `ref <: box`. A `ref` can be written to and read from, while `box` only needs the ability to read.\n* `val <: box`. A `val` can be read from and is globally immutable, while `box` only requires the ability to read.\n* `box <: tag`. A `box` can be read from, while a `tag` doesn't have any permissions at all. In fact, anything can be used as `tag`.\n\nThat's all there is to those four. A `ref` could have other mutable aliases, so it can't become `val`, which requires global uniqueness. Likewise,\n`val` can't become `ref` since it can't be used to write (and there could be other `val` aliases requiring immutability).\n\nAlso keep in mind, subtyping is _transitive_. That means that since `val <: box` and `box <: tag`, we also get `val <: tag`. The basic cases will be explained below, and transitivity can be used to derive all other subtyping relationships for capabilities.\n"} +{"id": "Pony/builtin-USize-_27.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-signals-sig-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180primitive Sig\n\"\"\"\nDefine the portable signal numbers. Other signals can be used, but they are\nnot guaranteed to be portable.\n\"\"\"\nfun hup(): U32 => 1\nfun int(): U32 => 2\nfun quit(): U32 => 3\n\nfun ill(): U32 =>\nifdef linux or bsd or osx then 4\nelse compile_error \"no SIGINT\""} +{"id": "Pony/net-NetAddress-_1.txt", "contents": "\nEquatable[NetAddress val] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: NetAddress iso^\n\nReturns\u00b6\n\nNetAddress iso^\n\n\nPublic Functions\u00b6\nip4\u00b6\n[Source]\nReturns true for an IPv4 address.\nfun box ip4()"} +{"id": "Pony/builtin-I8-_47.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/recovering-capabilities_1.txt", "contents": "# Why is this useful?\n\nThis most straightforward use of `recover` is to get an `iso` that you can pass to another actor. But it can be used for many other things as well, such as:\n\n* Creating a cyclic immutable data structure. That is, you can create a complex mutable data structure inside a `recover` expression, \"lift\" the resulting `ref` to a `val`.\n* \"Borrow\" an `iso` as a `ref`, do a series of complex mutable operations on it, and return it as an `iso` again.\n* \"Extract\" a mutable field from an `iso` and return it as an `iso`.\n"} +{"id": "Pony/src-term-ansi_term-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-pony_test-test_helper-_28.txt", "contents": "Assert that the gived test function does not throw an error when run.\n\"\"\"\ntry\ntest()?\nlog(_format_loc(loc) + \"Assert no error passed. \" + msg, true)\ntrue\nelse\nfail(_format_loc(loc) + \"Assert no error failed. \" + msg)\ntrue\nend\n\nfun assert_is[A](\nexpect: A,\nactual: A,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the 2 given expressions resolve to the same instance"} +{"id": "Pony/builtin-SignedInteger-_41.txt", "contents": "Bool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]"} +{"id": "Pony/cli-SyntaxError-_1.txt", "contents": "Parameters\u00b6\n\ntoken': String val\nmsg': String val\n\nReturns\u00b6\n\nSyntaxError val^\n\n\nPublic Functions\u00b6\ntoken\u00b6\n[Source]\nfun box token()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/net-OSSockOpt-_364.txt", "contents": "fun box sctp_cookie_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cookie_echo\u00b6\n[Source]\nfun box sctp_cookie_echo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cookie_echoed\u00b6\n[Source]"} +{"id": "Pony/serialise-OutputSerialisedAuth-_1.txt", "contents": "new val create(\nauth: AmbientAuth val)\n: OutputSerialisedAuth val^\n\nParameters\u00b6\n\nauth: AmbientAuth val\n\nReturns\u00b6\n\nOutputSerialisedAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: OutputSerialisedAuth val)\n: Bool val\n"} +{"id": "Pony/src-collections-set-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/time-Timers-_1.txt", "contents": "[Source]\nCreate a timer handler with the specified number of slop bits. No slop bits\nmeans trying for nanosecond resolution. 10 slop bits is approximately\nmicrosecond resolution, 20 slop bits is approximately millisecond\nresolution.\nnew tag create(\nslop: USize val = 20)\n: Timers tag^\n\nParameters\u00b6\n\nslop: USize val = 20\n\nReturns\u00b6\n\nTimers tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6"} +{"id": "Pony/src-signals-sig-_0.txt", "contents": "\n\n\n\n\n\n\nsig.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-UnsignedInteger-_7.txt", "contents": "\n(A , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nfld_unsafe\u00b6"} +{"id": "Pony/src-net-ossockopt-_132.txt", "contents": "fun tipc_top_srv():I32 => @pony_os_sockopt_option(I32(1082))\nfun tipc_wait_forever():I32 => @pony_os_sockopt_option(I32(1083))\nfun tipc_withdrawn():I32 => @pony_os_sockopt_option(I32(1084))\nfun tipc_zone_scope():I32 => @pony_os_sockopt_option(I32(1085))\nfun ttcp_client_snd_wnd():I32 => @pony_os_sockopt_option(I32(1086))\nfun udp_cork():I32 => @pony_os_sockopt_option(I32(1087))\nfun udp_encap():I32 => @pony_os_sockopt_option(I32(1088))\nfun udp_encap_espinudp():I32 => @pony_os_sockopt_option(I32(1089))\nfun udp_encap_espinudp_maxfraglen():I32 => @pony_os_sockopt_option(I32(1090))\nfun udp_encap_espinudp_non_ike():I32 => @pony_os_sockopt_option(I32(1091))\nfun udp_encap_espinudp_port():I32 => @pony_os_sockopt_option(I32(1092))\nfun udp_encap_l2tpinudp():I32 => @pony_os_sockopt_option(I32(1093))\nfun udp_nocksum():I32 => @pony_os_sockopt_option(I32(1094))\nfun udp_no_check6_rx():I32 => @pony_os_sockopt_option(I32(1095))\nfun udp_no_check6_tx():I32 => @pony_os_sockopt_option(I32(1096))\nfun udp_vendor():I32 => @pony_os_sockopt_option(I32(1097))\nfun so_rcvtimeo_old():I32 => @pony_os_sockopt_option(I32(1098))\nfun so_rcvtimeo_new():I32 => @pony_os_sockopt_option(I32(1099))\nfun so_sndtimeo_old():I32 => @pony_os_sockopt_option(I32(1100))\nfun so_sndtimeo_new():I32 => @pony_os_sockopt_option(I32(1101))"} +{"id": "Pony/net-OSSockOpt-_624.txt", "contents": "fun box so_sndtimeo_old()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndtimeo_new\u00b6\n[Source]\nfun box so_sndtimeo_new()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyRunner-_3.txt", "contents": "complete_shrink\u00b6\n[Source]\nbe complete_shrink(\nfailed_repr: String val,\nlast_repr: String val,\nshrink_round: (_Shrink val | _Run val),\nsuccess: Bool val)\n\nParameters\u00b6\n\nfailed_repr: String val\nlast_repr: String val\nshrink_round: (_Shrink val | _Run val)\nsuccess: Bool val\n\n\ndo_shrink\u00b6\n[Source]\nbe do_shrink(\nfailed_repr: String val)"} +{"id": "Pony/builtin-ULong-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/builtin-RuntimeOptions-_4.txt", "contents": "After GC, an actor will next be GC'd at a heap memory usage N times its\ncurrent value. This is a floating point value. Defaults to 2.0.\n\nvar ponynoyield: Bool val\u00b6\n[Source]\nDo not yield the CPU when no work is available.\n\nvar ponynoblock: Bool val\u00b6\n[Source]\nDo not send block messages to the cycle detector.\n\nvar ponypin: Bool val\u00b6\n[Source]\nPin scheduler threads to CPU cores. The ASIO thread can also be pinned if\n--ponypinasio is set.\n\nvar ponypinasio: Bool val\u00b6\n[Source]\nPin the ASIO thread to a CPU the way scheduler threads are pinned to CPUs.\nRequires --ponypin to be set to have any effect."} +{"id": "Pony/4_control-structures_8.txt", "contents": "| None => env.out.print(\"x is None\")\nend\n```\n\nHere __x__ would be `None`.\n\nYou can also avoid needing `None` at all by providing a __default value__ for when the loop has __0 iterations__ by providing an `else` block.\n\n```pony\nactor Main\nnew create(env: Env) =>\nvar x: String =\nfor name in Array[String].values() do\nname\nelse\n\"no names!\"\nend\nenv.out.print(\"x is \" + x)\n```\n"} +{"id": "Pony/src-buffered-reader-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-term-ansi_term-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-FloatingPoint-_26.txt", "contents": "\nBool val\n\n\nldexp\u00b6\n[Source]\nfun box ldexp(\nx: A,\nexponent: I32 val)\n: A\n\nParameters\u00b6\n\nx: A\nexponent: I32 val\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/src-files-file-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-I16-_17.txt", "contents": "(I16 val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , Bool val)\n\n\nmodc\u00b6\n[Source]"} +{"id": "Pony/src-signals-signal_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-buffered-reader-_61.txt", "contents": "(u8()?.u64() << 24) or (u8()?.u64() << 16) or\n(u8()?.u64() << 8) or u8()?.u64()\nend\nelse\nerror\nend\n\nfun ref u64_le(): U64 ? =>\n\"\"\"\nGet a little-endian U64.\n\"\"\"\nlet num_bytes = U64(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef littleendian then\ndata.read_u64(offset)?\nelse"} +{"id": "Pony/net-OSSockOpt-_526.txt", "contents": "fun box so_sndbufforce()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndlowat\u00b6\n[Source]\nfun box so_sndlowat()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndtimeo\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/collections-List-_28.txt", "contents": "Returns\u00b6\n\nList[this->A!] ref^\n\n\nmap[B: B]\u00b6\n[Source]\nBuilds a new List by applying a function to every element of the List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.map[String]( {(s: String): String => \"m: \" + s } ) // other_list is [\"m: a\"; \"m: b\"; \"m: c\"]\n\nfun box map[B: B](\nf: {(this->A!): B^}[A, B] box)\n: List[B] ref^\n\nParameters\u00b6\n\nf: {(this->A!): B^}[A, B] box\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_0.txt", "contents": "\n\n\n\n\n\n\nproperty_helper.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-builtin-float-_38.txt", "contents": "var exponent: U32 = 0\nvar mantissa = @frexp(f64(), addressof exponent)\n(mantissa.f32(), exponent)\n\nfun log(): F32 => @\"llvm.log.f32\"(this)\nfun log2(): F32 => @\"llvm.log2.f32\"(this)\nfun log10(): F32 => @\"llvm.log10.f32\"(this)\nfun logb(): F32 => @logbf(this)\n\nfun pow(y: F32): F32 => @\"llvm.pow.f32\"(this, y)\nfun powi(y: I32): F32 =>\nifdef windows then\npow(y.f32())\nelse\n@\"llvm.powi.f32\"(this, y)\nend\n\nfun sqrt(): F32 =>\nif this < 0.0 then\n_nan()"} +{"id": "Pony/src-files-file_lines-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123use \"buffered\"\n\nclass FileLines is Iterator[String iso^]\n\"\"\"\nIterate over the lines in a file.\n\nReturns lines without trailing line breaks.\nAdvances the file cursor to the end of each line returned from `next`.\n"} +{"id": "Pony/src-process-process_error-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-itertools-iter-_109.txt", "contents": "\nfun ref unique[H: HashFunction[A] val = HashIs[A]](): Iter[A!]^ =>\n\"\"\"\nReturn an iterator that filters out elements that have already been\nproduced. Uniqueness is determined by the HashFunction `H`.\n"} +{"id": "Pony/src-builtin-unsigned-_90.txt", "contents": "\nfun add_partial(y: U128): U128 ? =>\n_UnsignedPartialArithmetic.add_partial[U128](this, y)?\n\nfun sub_partial(y: U128): U128 ? =>\n_UnsignedPartialArithmetic.sub_partial[U128](this, y)?\n\nfun mul_partial(y: U128): U128 ? =>\n_UnsignedPartialArithmetic.mul_partial[U128](this, y)?\n\nfun div_partial(y: U128): U128 ? =>\n_UnsignedPartialArithmetic.div_partial[U128](this, y)?\n\nfun rem_partial(y: U128): U128 ? =>\n_UnsignedPartialArithmetic.rem_partial[U128](this, y)?\n\nfun divrem_partial(y: U128): (U128, U128) ? =>\n_UnsignedPartialArithmetic.divrem_partial[U128](this, y)?\n\ntype Unsigned is (U8 | U16 | U32 | U64 | U128 | ULong | USize)"} +{"id": "Pony/builtin-I64-_45.txt", "contents": "Bool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: I64 val)\n: Bool val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nBool val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_156.txt", "contents": "fun box ipv6_priority_13()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_14\u00b6\n[Source]\nfun box ipv6_priority_14()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_15\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_45.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: USize val)\n: Bool val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/src-collections-map-_44.txt", "contents": "var _i: USize = -1\nvar _count: USize = 0\n\nnew create(map: M) =>\n\"\"\"\nCreates an iterator for the given map.\n\"\"\"\n_map = map\n\nfun has_next(): Bool =>\n\"\"\"\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map.\n\"\"\"\n_count < _map.size()\n\nfun ref next(): M->K ? =>\n\"\"\"\nReturns the next key, or raises an error if there isn't one. If keys are\nadded during iteration, this may not return all keys."} +{"id": "Pony/src-itertools-iter-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/collections-persistent-HashSet-_6.txt", "contents": "\n\nop_and\u00b6\n[Source]\nReturn a set with the elements that are in both this and that.\nfun val op_and(\nthat: (HashSet[A, H] val | Iterator[A] ref))\n: HashSet[A, H] val\n\nParameters\u00b6\n\nthat: (HashSet[A, H] val | Iterator[A] ref)\n\nReturns\u00b6\n\nHashSet[A, H] val\n\n\nop_xor\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_14.txt", "contents": "\nParameters\u00b6\n\nauth: TCPConnectAuth val\nnotify: TCPConnectionNotify iso\nhost: String val\nservice: String val\nfrom: String val = \"\"\nread_buffer_size: USize val = 16384\nyield_after_reading: USize val = 16384\nyield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPConnection tag^\n\n\nip6\u00b6\n[Source]\nConnect via IPv6."} +{"id": "Pony/cli-ArgSpec-_3.txt", "contents": "ArgSpec val^\n\n\ni64\u00b6\n[Source]\nCreates an Arg with an I64 typed value that can be used like\n 42\nto yield an arg value like\ncmd.arg(\"count\").i64() == I64(42).\nnew val i64(\nname': String val,\ndescr': String val = \"\",\ndefault': (I64 val | None val) = reference)\n: ArgSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\ndefault': (I64 val | None val) = reference"} +{"id": "Pony/builtin-I8-_40.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/collections-Set-_0.txt", "contents": "\n\n\n\n\n\n\nSet[A: (Hashable #read & Equatable[A] #read)]\u00b6\n[Source]\ntype Set[A: (Hashable #read & Equatable[A] #read)] is\nHashSet[A, HashEq[A] val] ref\n\nType Alias For\u00b6\n\nHashSet[A, HashEq[A] val] ref\n\n\n\n\n"} +{"id": "Pony/builtin-U16-_39.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-buffered-writer-_22.txt", "contents": "\"\"\"\nlet num_bytes = U32(0).bytewidth()\nifdef bigendian then\n_current.push_u32(data)\nelse\n_current.push_u32(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref i32_le(data: I32) =>\n\"\"\"\nWrite an I32 to the buffer in little-endian byte order.\n\"\"\"\nu32_le(data.u32())\n\nfun ref i32_be(data: I32) =>\n\"\"\"\nWrite an I32 to the buffer in big-endian byte order.\n\"\"\"\nu32_be(data.u32())"} +{"id": "Pony/collections-persistent-HashSet-_3.txt", "contents": "Check whether the set contains the value.\nfun box contains(\nvalue: val->A)\n: Bool val\n\nParameters\u00b6\n\nvalue: val->A\n\nReturns\u00b6\n\nBool val\n\n\nadd\u00b6\n[Source]\nReturn a set with the value added.\nfun val add(\nvalue: val->A)\n: HashSet[A, H] val"} +{"id": "Pony/src-pony_check-generator-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/src-net-ossockopt-_123.txt", "contents": "fun so_setfib():I32 => @pony_os_sockopt_option(I32(902))\nfun so_sndbuf():I32 => @pony_os_sockopt_option(I32(903))\nfun so_sndbufforce():I32 => @pony_os_sockopt_option(I32(904))\nfun so_sndlowat():I32 => @pony_os_sockopt_option(I32(905))\nfun so_sndtimeo():I32 => @pony_os_sockopt_option(I32(906))\nfun so_timestamp():I32 => @pony_os_sockopt_option(I32(907))\nfun so_timestamping():I32 => @pony_os_sockopt_option(I32(908))\nfun so_timestampns():I32 => @pony_os_sockopt_option(I32(909))\nfun so_timestamp_monotonic():I32 => @pony_os_sockopt_option(I32(910))\nfun so_type():I32 => @pony_os_sockopt_option(I32(911))\nfun so_upcallclosewait():I32 => @pony_os_sockopt_option(I32(912))\nfun so_update_accept_context():I32 => @pony_os_sockopt_option(I32(913))\nfun so_useloopback():I32 => @pony_os_sockopt_option(I32(914))\nfun so_user_cookie():I32 => @pony_os_sockopt_option(I32(915))\nfun so_vendor():I32 => @pony_os_sockopt_option(I32(916))\nfun so_vm_sockets_buffer_max_size():I32 => @pony_os_sockopt_option(I32(917))\nfun so_vm_sockets_buffer_min_size():I32 => @pony_os_sockopt_option(I32(918))\nfun so_vm_sockets_buffer_size():I32 => @pony_os_sockopt_option(I32(919))\nfun so_vm_sockets_connect_timeout():I32 => @pony_os_sockopt_option(I32(920))\nfun so_vm_sockets_nonblock_txrx():I32 => @pony_os_sockopt_option(I32(921))"} +{"id": "Pony/src-pony_check-property_helper-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/pony_check-Generators-_21.txt", "contents": "\nGenerator[(T1 , T2 , T3)] box\n\n\nzip4[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\nZip four generators into a generator of a 4-tuple\ncontaining the values generated by those four generators.\nfun box zip4[T1: T1, T2: T2, T3: T3, T4: T4](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box,\ngen3: Generator[T3] box,\ngen4: Generator[T4] box)\n: Generator[(T1 , T2 , T3 , T4)] box\n\nParameters\u00b6\n\ngen1: Generator[T1] box\ngen2: Generator[T2] box\ngen3: Generator[T3] box"} +{"id": "Pony/src-builtin-std_stream-_10.txt", "contents": "\"\"\"\nWrite an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\n_write(bytes)\nend\n\nbe flush() =>\n\"\"\"\nFlush any data out to the os (ignoring failures).\n\"\"\"\n@pony_os_std_flush(_stream)\n\nfun ref _write(data: ByteSeq) =>\n\"\"\"\nWrite the bytes without explicitly flushing.\n\"\"\"\n@pony_os_std_write(_stream, data.cpointer(), data.size())\n\nfun ref _print(data: ByteSeq) =>"} +{"id": "Pony/src-files-directory-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-U8-_13.txt", "contents": "(U8 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , Bool val)\n\n\nremc\u00b6\n[Source]"} +{"id": "Pony/src-random-mt-_10.txt", "contents": "fun ref _upper(i: USize, x: U64): U64 ? =>\nlet y = _state(i + 1)?\n_state(i)? = _state(i - _m())? xor _mix(x, y)\ny\n\nfun ref _wrap(): U64 ? =>\nlet x = _state(_n1())?\nlet y = _state(0)?\n_state(_n1())? = _state(_m() - 1)? xor _mix(x, y)\ny\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_check-ascii_range-_6.txt", "contents": "| ASCIIPunctuation\n| ASCIILettersLower\n| ASCIILettersUpper\n| ASCIILetters\n| ASCIIPrintable\n| ASCIINonPrintable\n| ASCIIAll\n| ASCIIAllWithNUL)\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-promises-promise-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/debug-Debug-_4.txt", "contents": "fun box eq(\nthat: Debug val)\n: Bool val\n\nParameters\u00b6\n\nthat: Debug val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Debug val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-PropertyParams-_4.txt", "contents": "String iso^\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_619.txt", "contents": "fun box udp_encap_espinudp_maxfraglen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap_espinudp_non_ike\u00b6\n[Source]\nfun box udp_encap_espinudp_non_ike()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap_espinudp_port\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_34.txt", "contents": "fun box rem_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/random-XorShift128Plus-_13.txt", "contents": ": N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\n[Source]\nfun ref real()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n"} +{"id": "Pony/src-term-readline-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/buffered-Reader-_12.txt", "contents": "Get a little-endian I16.\nfun ref i16_le()\n: I16 val ?\n\nReturns\u00b6\n\nI16 val ?\n\n\nu32_be\u00b6\n[Source]\nGet a big-endian U32.\nfun ref u32_be()\n: U32 val ?\n\nReturns\u00b6\n\nU32 val ?\n\n"} +{"id": "Pony/src-format-format-_0.txt", "contents": "\n\n\n\n\n\n\nformat.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U16-_35.txt", "contents": "U16 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/files-File-_9.txt", "contents": "fun ref writev(\ndata: ByteSeqIter box)\n: Bool val\n\nParameters\u00b6\n\ndata: ByteSeqIter box\n\nReturns\u00b6\n\nBool val\n\n\nqueue\u00b6\n[Source]\nQueue data to be written\nNOTE: Queue'd data will always be written before normal print/write\nrequested data\nfun ref queue(\ndata: (String box | Array[U8 val] box))"} +{"id": "Pony/net-OSSockOpt-_549.txt", "contents": "fun box tcpolen_fast_open_empty()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_fast_open_max\u00b6\n[Source]\nfun box tcpolen_fast_open_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_fast_open_min\u00b6\n[Source]"} +{"id": "Pony/derived-authority_4.txt", "contents": "# Authorization-friendly interface\n\nConsider the above example again, but this time let's think of the `Connect` actor being part of a 3rd party package that we are building. Our goal is to write the actor in such a way that users of our package can grant it only the authority necessary for it to function.\n\nAs the package author, it is then our responsibility to realize that the minimal authority possible is the `TCPConnectAuth`. We should only request `TCPConnectAuth` from our users. Our current implementation already satisfies this requirement. Rather than requesting a less specific authority like `AmbientAuth` from our users and creating the `TCPConnectAuth` in our library, we only ask for the `TCPConnetAuth` that is required.\n"} +{"id": "Pony/pony_check-Property2-_2.txt", "contents": "gen\u00b6\n[Source]\nfun box gen()\n: Generator[(T1 , T2)] box\n\nReturns\u00b6\n\nGenerator[(T1 , T2)] box\n\n\nproperty\u00b6\n[Source]\nfun ref property(\narg1: (T1 , T2),\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\narg1: (T1 , T2)"} +{"id": "Pony/6_errors_1.txt", "contents": "# Raising and handling errors\n\nAn error is raised with the command `error`. At any point, the code may decide to declare an `error` has occurred. Code execution halts at that point, and the call chain is unwound until the nearest enclosing error handler is found. This is all checked at compile time so errors cannot cause the whole program to crash.\n\nError handlers are declared using the `try`-`else` syntax.\n\n```pony\ntry\ncallA()\nif not callB() then error end\ncallC()\nelse\ncallD()\nend\n```\n\nIn the above code `callA()` will always be executed and so will `callB()`. If the result of `callB()` is true then we will proceed to `callC()` in the normal fashion and `callD()` will not then be executed.\n\nHowever, if `callB()` returns false, then an error will be raised. At this point, execution will stop and the nearest enclosing error handler will be found and executed. In this example that is, our else block and so `callD()` will be executed.\n"} +{"id": "Pony/files-FilePath-_13.txt", "contents": "[Source]\nSet the last access and modification times of a path to now.\nfun box touch()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nset_time\u00b6\n[Source]\nSet the last access and modification times of a path to the given values.\nfun box set_time(\natime: (I64 val , I64 val),\nmtime: (I64 val , I64 val))\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-ULong-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_24.txt", "contents": "fun box mod_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-SignedInteger-_39.txt", "contents": "fun box mod(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/cli-Option-_1.txt", "contents": "\nParameters\u00b6\n\nspec': OptionSpec val\nvalue': (Bool val | String val | I64 val |\nU64 val | F64 val | _StringSeq val)\n\nReturns\u00b6\n\nOption val^\n\n\nPublic Functions\u00b6\nspec\u00b6\n[Source]\nfun box spec()\n: OptionSpec val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_280.txt", "contents": "fun box netlink_netfilter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_nflog\u00b6\n[Source]\nfun box netlink_nflog()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_no_enobufs\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_20.txt", "contents": "fun val remove(i: USize, n: USize): Vec[A] ? =>\n\"\"\"\nReturn a vector with n elements removed, beginning at index i.\n\"\"\"\nif i >= _size then error end\nvar vec = this\nfor _ in mut.Range(0, n) do vec = vec.pop()? end\nfor idx in mut.Range(i, _size - n) do\nvec = vec.update(idx, this(idx + n)?)?\nend\nvec\n\nfun val push(value: val->A): Vec[A] =>\n\"\"\"\nReturn a vector with the value added to the end.\n\"\"\"\n// push tail into root when it becomes full\nlet size' = _size + 1\nlet tail = recover val _tail.clone() .> push(value) end\nif tail.size() < 32 then"} +{"id": "Pony/capsicum-Cap-_2.txt", "contents": "fun box read()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nwrite\u00b6\n[Source]\nfun box write()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nseek_tell\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_223.txt", "contents": "fun box ip_old_fw_resetlog()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_zero\u00b6\n[Source]\nfun box ip_old_fw_zero()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_onesbcast\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/serialise-Serialise-_3.txt", "contents": "that: Serialise val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/format-FormatHex-_0.txt", "contents": "\n\n\n\n\n\n\nFormatHex\u00b6\n[Source]\nprimitive val FormatHex is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/process-ProcessNotify-_6.txt", "contents": "fun ref dispose(\nprocess: ProcessMonitor ref,\nchild_exit_status: (Exited val | Signaled val))\n: None val\n\nParameters\u00b6\n\nprocess: ProcessMonitor ref\nchild_exit_status: (Exited val | Signaled val)\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_runner-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-I64-_57.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_57.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_39.txt", "contents": "fun box ipproto_mux()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_nd\u00b6\n[Source]\nfun box ipproto_nd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_nhrp\u00b6\n[Source]"} +{"id": "Pony/format-FormatOctalBare-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatOctalBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatOctalBare val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/pony_check-PonyCheck-_7.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_114.txt", "contents": "\nfun ref zip3[B, C, D](i2: Iterator[B], i3: Iterator[C], i4: Iterator[D])\n: Iter[(A, B, C, D)]^\n=>\n\"\"\"\nZip four iterators together so that each call to next() results in\na tuple with the next value of each of the iterators. The number of\nitems returned is the minimum of the number of items returned by the\niterators.\n\"\"\"\nIter[(A, B, C, D)](\nobject is Iterator[(A, B, C, D)]\nlet _i1: Iterator[A] = _iter\nlet _i2: Iterator[B] = i2\nlet _i3: Iterator[C] = i3\nlet _i4: Iterator[D] = i4\n\nfun ref has_next(): Bool =>\n_i1.has_next()\nand _i2.has_next()"} +{"id": "Pony/7_type-expressions_1.txt", "contents": "# Tuples\n\nA __tuple__ type is a sequence of types. For example, if we wanted something that was a `String` followed by a `U64`, we would write this:\n\n```pony\nvar x: (String, U64)\nx = (\"hi\", 3)\nx = (\"bye\", 7)\n```\n\nAll type expressions are written in parentheses, and the elements of a tuple are separated by a comma. We can also destructure a tuple using assignment:\n\n```pony\n(var y, var z) = x\n```\n\nOr we can access the elements of a tuple directly:\n\n```pony\nvar y = x._1"} +{"id": "Pony/src-net-tcp_listener-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/pony_test-TestHelper-_9.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nexpect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_isnt[A: A]\u00b6\n[Source]\nAssert that the 2 given expressions resolve to different instances.\nfun box assert_isnt[A: A](\nnot_expect: A,\nactual: A,"} +{"id": "Pony/src-collections-flag-_17.txt", "contents": "let f = recover Flags[A, B] end\nf._value = this._value xor that._value\nf\n\nfun without(that: Flags[A, B] box): Flags[A, B] iso^ =>\n\"\"\"\nThe flags in this that are not in that.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value and not that._value\nf\n\nfun clone(): Flags[A, B] iso^ =>\n\"\"\"\nCreate a clone.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value\nf\n"} +{"id": "Pony/files-File-_13.txt", "contents": "\n\nseek_start\u00b6\n[Source]\nSet the cursor position relative to the start of the file.\nfun ref seek_start(\noffset: USize val)\n: None val\n\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nNone val\n\n\nseek_end\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_81.txt", "contents": "fun ref push_u32[B: (A & Real[B] val & U8) = A](value: U32) =>\n\"\"\"\nAdd a U32 to the end of the array. This is only allowed for an array of U8s.\n\"\"\"\nlet u32_bytes = U32(0).bytewidth()\nreserve(_size + u32_bytes)\n_ptr._offset(_size)._convert[U32]()._update(0, value)\n_size = _size + u32_bytes\n\nfun ref push_u64[B: (A & Real[B] val & U8) = A](value: U64) =>\n\"\"\"\nAdd a U64 to the end of the array. This is only allowed for an array of U8s.\n\"\"\"\nlet u64_bytes = U64(0).bytewidth()\nreserve(_size + u64_bytes)\n_ptr._offset(_size)._convert[U64]()._update(0, value)\n_size = _size + u64_bytes\n\nfun ref push_u128[B: (A & Real[B] val & U8) = A](value: U128) =>\n\"\"\""} +{"id": "Pony/random-SplitMix64-_4.txt", "contents": ": U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun ref u32()"} +{"id": "Pony/src-pony_check-property_runner-_29.txt", "contents": "_notify = notify\n_rnd = Randomness(_params.seed)\n_gen = _prop1.gen()\n\n\n// RUNNING PROPERTIES //\n\nbe complete_run(round: _Round, success: Bool) =>\n\"\"\"\nComplete a property run.\n\nThis behaviour is called from the PropertyHelper\nor from the actor itself.\n\"\"\"\n\n// verify that this is an expected call\nif this._current_round != round then\n_logger.log(\"unexpected \" + if success then \"finish\" else \"fail\" end + \" msg for \" + round.string() +\n\". expecting \" + this._current_round.string(), true)\nreturn"} +{"id": "Pony/builtin-I32-_51.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/files-FilePath-_2.txt", "contents": "path' is relative to the existing FilePath,\nand the existing FilePath must be a prefix of the resulting path.\nThe resulting FilePath will have capabilities that are the intersection of\nthe supplied capabilities and the capabilities of the existing FilePath.\nnew val from(\nbase: FilePath val,\npath': String val,\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)\n: FilePath val^ ?\n\nParameters\u00b6\n\nbase: FilePath val\npath': String val\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover\n\nReturns\u00b6\n\nFilePath val^ ?\n"} +{"id": "Pony/files-Directory-_6.txt", "contents": "\n\ninfo\u00b6\n[Source]\nReturn a FileInfo for this directory. Raise an error if the fd is invalid\nor if we don't have FileStat permission.\nfun box info()\n: FileInfo val ?\n\nReturns\u00b6\n\nFileInfo val ?\n\n\nchmod\u00b6\n[Source]\nSet the FileMode for this directory.\nfun box chmod(\nmode: FileMode box)\n: Bool val"} +{"id": "Pony/builtin-I128-_51.txt", "contents": "I64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U128-_47.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: U128 val)\n: Bool val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_1.txt", "contents": "new val create(\nvalue: I128 val)\n: I128 val^\n\nParameters\u00b6\n\nvalue: I128 val\n\nReturns\u00b6\n\nI128 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-builtin-string-_157.txt", "contents": "let c2 = that._ptr._apply(k)\nif\nnot ((c1 == c2) or\n(ignore_case and ((c1 or 0x20) == (c2 or 0x20)) and\n((c1 or 0x20) >= 'a') and ((c1 or 0x20) <= 'z')))\nthen\n// this and that differ here\nreturn if c1.i32() > c2.i32() then Greater else Less end\nend\n\nj = j + 1\nk = k + 1\ni = i - 1\nend\nEqual\n\nfun eq(that: String box): Bool =>\n\"\"\"\nReturns true if the two strings have the same contents.\n\"\"\""} +{"id": "Pony/files-WalkHandler-_0.txt", "contents": "\n\n\n\n\n\n\nWalkHandler\u00b6\n[Source]\nA handler for FilePath.walk.\ninterface ref WalkHandler\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\ndir_path: FilePath val,\ndir_entries: Array[String val] ref)\n: None val\n"} +{"id": "Pony/builtin-U64-_15.txt", "contents": "(U64 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val ?\n\n\nsub_partial\u00b6\n[Source]"} +{"id": "Pony/4_traits-and-interfaces_7.txt", "contents": "\n```pony\nclass Larry\nfun name(): String => \"Larry\"\n```\n\nHere, we have a class `Larry` that has a `name` function with the same signature. But `Larry` does __not__ provide `Named`!\n\n__Wait, why not?__ Because `Larry` doesn't say it `is Named`. Remember, traits are __nominal__: a type that wants to provide a trait has to explicitly declare that it does. And `Larry` doesn't.\n\nYou can also do nominal subtyping using the keyword `interface`. __Interfaces__ in Pony are primarily used for structural subtyping. Like traits, interfaces can also have default method implementations, but in order to use default method implementations, an interface must be used in a nominal fashion. For example:\n\n```pony\ninterface HasName\nfun name(): String => \"Bob\"\n\nclass Bob is HasName\n\nclass Larry\nfun name(): String => \"Larry\""} +{"id": "Pony/src-pony_check-property_runner-_30.txt", "contents": "end\n\n_pass = success // in case of sync property - signal failure\n\nif not success then\n// found a bad example, try to shrink it\nif not _shrinker.has_next() then\n_logger.log(\"no shrinks available\")\nfail(_sample_repr, 0)\nelse\n// prepare next round\n_prepare_next_round()\n// set rounds to shrinking\nthis._current_round = _Shrink.create(0) // reset rounds for shrinking\n// start shrinking process\ndo_shrink(_sample_repr)\nend\nelse\n// property holds, recurse\n_prepare_next_round()"} +{"id": "Pony/src-collections-map-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-term-ansi_term-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-collections-persistent-set-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/7_type-expressions_4.txt", "contents": "# Intersections\n\nAn __intersection__ uses a `&` (pronounced \"and\" when reading the type) between its elements. It represents the exact opposite of a union: it is a _single_ value that is _all_ of the specified types, at the same time!\n\nThis can be very useful for combining traits or interfaces, for example. Here's something from the standard library:\n\n```pony\ntype Map[K: (Hashable box & Comparable[K] box), V] is HashMap[K, V, HashEq[K]]\n```\n\nThat's a fairly complex type alias, but let's look at the constraint of `K`. It's `(Hashable box & Comparable[K] box)`, which means `K` is `Hashable` _and_ it is `Comparable[K]`, at the same time.\n"} +{"id": "Pony/builtin-ArrayPairs-_0.txt", "contents": "\n\n\n\n\n\n\nArrayPairs[A: A, B: Array[A] #read]\u00b6\n[Source]\nclass ref ArrayPairs[A: A, B: Array[A] #read] is\nIterator[(USize val , B->A)] ref\n\nImplements\u00b6\n\nIterator[(USize val , B->A)] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_34.txt", "contents": "fun box sub(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/builtin-SignedInteger-_3.txt", "contents": "Real[A] val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: B\n\nReturns\u00b6"} +{"id": "Pony/cli-Option-_2.txt", "contents": "OptionSpec val\n\n\nbool\u00b6\n[Source]\nReturns the option value as a Bool, defaulting to false.\nfun box bool()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nstring\u00b6\n[Source]\nReturns the option value as a String, defaulting to empty.\nfun box string()\n: String val\n"} +{"id": "Pony/builtin-USize-_22.txt", "contents": "(USize val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-builtin-string-_114.txt", "contents": "// Not a continuation byte.\nerr\nelse\n(((c.u32() << 6) + c2.u32()) - 0x3080, 2)\nend\nend\nelseif c < 0xF0 then\n// 3-byte.\nif (i + 2) >= _size then\n// Not enough bytes.\nerr\nelse\nlet c2 = _ptr._apply(i + 1)\nlet c3 = _ptr._apply(i + 2)\nif\n// Not continuation bytes.\n((c2 and 0xC0) != 0x80) or\n((c3 and 0xC0) != 0x80) or\n// Overlong encoding.\n((c == 0xE0) and (c2 < 0xA0))"} +{"id": "Pony/src-net-tcp_connection-_96.txt", "contents": "\"\"\"\nif _connected then\nset_tcp_nodelay(state)\nend\n\nfun ref set_keepalive(secs: U32) =>\n\"\"\"\nSets the TCP keepalive timeout to approximately `secs` seconds. Exact\ntiming is OS dependent. If `secs` is zero, TCP keepalive is disabled. TCP\nkeepalive is disabled by default. This can only be set on a connected\nsocket.\n\"\"\"\nif _connected then\n@pony_os_keepalive(_fd, secs)\nend\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nHandle socket events.\n\"\"\""} +{"id": "Pony/process-Exited-_0.txt", "contents": "\n\n\n\n\n\n\nExited\u00b6\n[Source]\nProcess exit status: Process exited with an exit code.\nclass val Exited is\nStringable box,\nEquatable[(Exited val | Signaled val)] ref\n\nImplements\u00b6\n\nStringable box\nEquatable[(Exited val | Signaled val)] ref\n\n"} +{"id": "Pony/src-builtin-real-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/calling-c_12.txt", "contents": "use @list_push[None](list: Pointer[_List], data: Pointer[None])\nuse @list_pop[Pointer[None]](list: Pointer[_List])\n\nprimitive _List\n```\n\nWe can use these declarations to create lists of different types, and insert elements into them:\n\n```pony\nstruct Point\nvar x: U64 = 0\nvar y: U64 = 0\n\nlet list_of_points = @list_create()\n@list_push(list_of_points, NullablePointer[Point].create(Point))\n\nlet list_of_strings = @list_create()\n@list_push(list_of_strings, \"some data\".cstring())\n```\n"} +{"id": "Pony/builtin-I32-_44.txt", "contents": "fun box ge(\ny: I32 val)\n: Bool val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: I32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/passing-and-sharing_1.txt", "contents": "# Passing\n\nFor an object to be mutable, we need to be sure that no _other_ actor can read from or write to that object. The three mutable reference capabilities (`iso`, `trn`, and `ref`) all make that guarantee.\n\nBut what if we want to pass a mutable object from one actor to another? To do that, we need to be sure that the actor that is _sending_ the mutable object also _gives up_ the ability to both read from and write to that object.\n\nThis is exactly what `iso` does. It is _read and write unique_, there can only be one reference at a time that can be used for reading or writing. If you send an `iso` object to another actor, you will be giving up the ability to read from or write to that object.\n\n__So I should use `iso` when I want to pass a mutable object between actors?__ Yes! If you don't need to pass it, you can just use `ref` instead.\n"} +{"id": "Pony/builtin-InputNotify-_0.txt", "contents": "\n\n\n\n\n\n\nInputNotify\u00b6\n[Source]\nNotification for data arriving via an input stream.\ninterface ref InputNotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nCalled when data is available on the stream.\nfun ref apply(\ndata: Array[U8 val] iso)\n: None val\n"} +{"id": "Pony/builtin-ULong-_19.txt", "contents": "fun box divrem_partial(\ny: ULong val)\n: (ULong val , ULong val) ?\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , ULong val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: ULong val)\n: ULong val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-Property2-_0.txt", "contents": "\n\n\n\n\n\n\nProperty2[T1: T1, T2: T2]\u00b6\n[Source]\ntrait ref Property2[T1: T1, T2: T2] is\nProperty1[(T1 , T2)] ref\n\nImplements\u00b6\n\nProperty1[(T1 , T2)] ref\n\n\nPublic Functions\u00b6\ngen1\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_54.txt", "contents": "le\u00b6\nfun box le(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\nfun box ge(\ny: F64 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_583.txt", "contents": "fun box tcp_mss_desired()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_nodelay\u00b6\n[Source]\nfun box tcp_nodelay()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_noopt\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_39.txt", "contents": "with a minimum length of min (default: 0)\nand a maximum length of max (default: 100).\nfun box byte_string(\ngen: Generator[U8 val] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\ngen: Generator[U8 val] box\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nascii\u00b6"} +{"id": "Pony/builtin-USize-_30.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_178.txt", "contents": "fun box ipx_frame_8022()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_8023\u00b6\n[Source]\nfun box ipx_frame_8023()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_frame_etherii\u00b6\n[Source]"} +{"id": "Pony/pony_check-Property2UnitTest-_4.txt", "contents": "\nNone val\n\n\nset_up\u00b6\nfun ref set_up(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\ntear_down\u00b6\nfun ref tear_down("} +{"id": "Pony/src-buffered-reader-_50.txt", "contents": "\ni = i + copy_len\n_chunks.shift()?\nend\n\nlet trunc_len: USize =\nif keep_line_breaks then\n0\nelseif (len >= 2) and (out.at_offset(-2)? == '\\r') then\n2\nelse\n1\nend\nout.truncate(len - trunc_len)\n\nconsume out\n\nfun ref u8(): U8 ? =>\n\"\"\"\nGet a U8. Raise an error if there isn't enough data."} +{"id": "Pony/random-XorOshiro128Plus-_2.txt", "contents": "Create with the specified seed. Returned values are deterministic for a\ngiven seed.\nnew ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: XorOshiro128Plus ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nXorOshiro128Plus ref^\n\n\nPublic Functions\u00b6\nnext\u00b6\n[Source]"} +{"id": "Pony/calling-c_13.txt", "contents": "We can also get elements out of the list, although we won't be able to do anything with them:\n\n```pony\n// Compiler error: couldn't find 'x' in 'Pointer'\nlet point_x = @list_pop(list_of_points)\npoint.x\n\n// Compiler error: wanted Pointer[U8 val] ref^, got Pointer[None val] ref\nlet head = String.from_cstring(@list_pop(list_of_strings))\n```\n\nWe can fix this problem by adding an explicit return type when calling `list_pop`:\n\n```pony\n// OK\nlet point = @list_pop[Point](list_of_points)\nlet x_coord = point.x\n\n// OK\nlet pointer = @list_pop[Pointer[U8]](list_of_strings)"} +{"id": "Pony/src-builtin-string-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-pony_check-generator-_79.txt", "contents": "as a `ValueAndShrink[T]` instance, a tuple of `(T^, Seq[T])`.\nThis helps propagating shrink results through all kinds of Generator\ncombinators like `filter`, `map` and `flat_map`.\n\nIf implementing a custom `Generator` based on another one,\nwith a Generator Combinator, you should use shrunken values\nreturned by `generate` to also return shrunken values based on them.\n\nIf generating an example value is costly, it might be more efficient\nto simply return the generated value and only shrink in big steps or do no\nshrinking at all.\nIf generating values is lightweight, shrunken values should also be\nreturned.\n\"\"\"\n_gen.generate(rnd)?\n\nfun shrink(t: T): ValueAndShrink[T] =>\n\"\"\"\nSimplify the given value.\n"} +{"id": "Pony/pony_check-PropertyRunner-_0.txt", "contents": "\n\n\n\n\n\n\nPropertyRunner[T: T]\u00b6\n[Source]\nActor executing a Property1 implementation\nin a way that allows garbage collection between single\nproperty executions, because it uses recursive behaviours\nfor looping.\nactor tag PropertyRunner[T: T]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew tag create(\np1: Property1[T] iso,"} +{"id": "Pony/builtin-ILong-_35.txt", "contents": "[Source]\nfun box op_xor(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/pony_check--index-_6.txt", "contents": "class IntPropertySample\ntype IntUnitTest\nprimitive PonyCheck\nclass Poperator\ntrait Property1\nclass Property1UnitTest\ntrait Property2\nclass Property2UnitTest\ntrait Property3\nclass Property3UnitTest\ntrait Property4\nclass Property4UnitTest\nclass PropertyHelper\ninterface PropertyLogger\nclass PropertyParams\ninterface PropertyResultNotify\nactor PropertyRunner\nclass Randomness\ntype ValueAndShrink\ntype WeightedGenerator"} +{"id": "Pony/builtin-Platform-_1.txt", "contents": "\n\nPublic Functions\u00b6\nbsd\u00b6\n[Source]\nfun box bsd()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nfreebsd\u00b6\n[Source]\nfun box freebsd()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-String-_85.txt", "contents": "Parameters\u00b6\n\nthat: String box\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\nthat: String box)\n: Bool val\n\nParameters\u00b6\n\nthat: String box\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_63.txt", "contents": "let my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.tail()? end // Returns a ListNode[String] containing \"c\"\n```\n\"\"\"\n_tail as this->ListNode[A]\n\nfun ref prepend_node(node: ListNode[A]) =>\n\"\"\"\nAdds a node to the head of the list.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet new_head = ListNode[String](\"0\")\nmy_list.prepend_node(new_head) // [\"0\", \"a\"; \"b\"; \"c\"]\n```\n\"\"\"\nmatch _head\n| let head': ListNode[A] =>\nhead'.prepend(node)\nelse"} +{"id": "Pony/process-ProcessMonitor-_3.txt", "contents": "\ndata: (String val | Array[U8 val] val)\n\n\nwrite\u00b6\n[Source]\nWrite to STDIN of the child process.\nbe write(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nprintv\u00b6\n[Source]\nPrint an iterable collection of ByteSeqs.\nbe printv(\ndata: ByteSeqIter val)"} +{"id": "Pony/pony_test-UnitTest-_2.txt", "contents": "[Source]\nRun the test.\nRaising an error is interpreted as a test failure.\nfun ref apply(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\ntimed_out\u00b6\n[Source]\nTear down a possibly hanging test.\nCalled when the timeout specified by to long_test() expires."} +{"id": "Pony/src-builtin-string-_125.txt", "contents": "if j < 0 then\nreturn 0\nelseif (j == 0) and (this == s) then\nreturn 1\nend\n\ntry\nwhile k <= j do\nk = find(s, k)? + s.size().isize()\ni = i + 1\nend\nend\n\ni\n\nfun at(s: String box, offset: ISize = 0): Bool =>\n\"\"\"\nReturns true if the substring s is present at the given offset.\n\"\"\"\nlet i = offset_to_index(offset)"} +{"id": "Pony/cli--index-_0.txt", "contents": "\n\n\n\n\n\n\nCLI Package\u00b6\nThe CLI package provides enhanced Posix+GNU command line parsing with the\nfeature of commands that can be specified in a hierarchy.\nSee RFC-0038 for more background.\nThe general EBNF of a command line is:\ncommand_line ::= root_command (option | command)* (option | arg)*\ncommand ::= alphanum_word\nalphanum_word ::= alphachar(alphachar | numchar | '_' | '-')*\noption ::= longoption | shortoptionset\nlongoption ::= '--'alphanum_word['='arg | ' 'arg]\nshortoptionset := '-'alphachar[alphachar]...['='arg | ' 'arg]\narg := boolarg | intarg | floatarg | stringarg\nboolarg := 'true' | 'false'"} +{"id": "Pony/collections-MinHeapPriority-_3.txt", "contents": "\nne\u00b6\n[Source]\nfun box ne(\nthat: MinHeapPriority[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: MinHeapPriority[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n"} +{"id": "Pony/src-collections-flag-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-tcp_connection-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/term-EraseRight-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: EraseRight val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseRight val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_58.txt", "contents": "if alloc > len then\n_alloc = alloc\nelse\n_alloc = len\nend\nend\n\n_ptr = ptr\n\nfun _copy_to(\nptr: Pointer[this->A!],\ncopy_len: USize,\nfrom_offset: USize = 0,\nto_offset: USize = 0)\n=>\n\"\"\"\nCopy copy_len elements from this to that at specified offsets.\n\"\"\"\n_ptr._offset(from_offset)._copy_to(ptr._offset(to_offset), copy_len)\n"} +{"id": "Pony/src-pony_check-generator-_103.txt", "contents": "Create a generator for `MapIs` from a generator of key-value tuples.\nThe generated maps will have a size up to `max`,\nbut tend to have fewer entries depending on the source generator `gen`.\n\nIf the generator generates key-value pairs with\nduplicate keys (based on identity),\nthe pair that is generated later will overwrite earlier entries in the map.\n\"\"\"\nGenerator[MapIs[K, V]](\nobject is GenObj[MapIs[K, V]]\nfun generate(rnd: Randomness): GenerateResult[MapIs[K, V]] =>\nlet size = rnd.usize(0, max)\n\nlet result: MapIs[K, V] =\nMapIs[K, V].create(size).>concat(\nIter[(K^, V^)](gen.value_iter(rnd))\n.take(size)\n)\nlet shrink_iter: Iterator[MapIs[K, V]^] =\nIter[USize](CountdownIter(size, 0)) //Range(size, 0, -1))"} +{"id": "Pony/net-OSSockOpt-_415.txt", "contents": "fun box sctp_partial_delivery_point()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_copy_flags\u00b6\n[Source]\nfun box sctp_pcb_copy_flags()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_accepting\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_31.txt", "contents": "\nNone val\n\n\nskip\u00b6\n[Source]\nSkip the first n values of the iterator.\nExample\u00b6\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.skip(3)\n\n4 5 6\nIter[I64]([1; 2; 3].values())\n.skip(3)\n.has_next()\n\nfalse\nfun ref skip(\nn: USize val)\n: Iter[A] ref^"} +{"id": "Pony/builtin-SignedInteger-_30.txt", "contents": "A\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_xor\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_84.txt", "contents": "fun ipv6_fl_a_put():I32 => @pony_os_sockopt_option(I32(122))\nfun ipv6_fl_a_renew():I32 => @pony_os_sockopt_option(I32(123))\nfun ipv6_fl_f_create():I32 => @pony_os_sockopt_option(I32(124))\nfun ipv6_fl_f_excl():I32 => @pony_os_sockopt_option(I32(125))\nfun ipv6_fl_f_reflect():I32 => @pony_os_sockopt_option(I32(126))\nfun ipv6_fl_f_remote():I32 => @pony_os_sockopt_option(I32(127))\nfun ipv6_fl_s_any():I32 => @pony_os_sockopt_option(I32(128))\nfun ipv6_fl_s_excl():I32 => @pony_os_sockopt_option(I32(129))\nfun ipv6_fl_s_none():I32 => @pony_os_sockopt_option(I32(130))\nfun ipv6_fl_s_process():I32 => @pony_os_sockopt_option(I32(131))\nfun ipv6_fl_s_user():I32 => @pony_os_sockopt_option(I32(132))\nfun ipv6_hoplimit():I32 => @pony_os_sockopt_option(I32(133))\nfun ipv6_hopopts():I32 => @pony_os_sockopt_option(I32(134))\nfun ipv6_ipsec_policy():I32 => @pony_os_sockopt_option(I32(135))\nfun ipv6_join_anycast():I32 => @pony_os_sockopt_option(I32(136))\nfun ipv6_leave_anycast():I32 => @pony_os_sockopt_option(I32(137))\nfun ipv6_minhopcount():I32 => @pony_os_sockopt_option(I32(138))\nfun ipv6_mtu():I32 => @pony_os_sockopt_option(I32(139))\nfun ipv6_mtu_discover():I32 => @pony_os_sockopt_option(I32(140))\nfun ipv6_multicast_hops():I32 => @pony_os_sockopt_option(I32(141))"} +{"id": "Pony/builtin-U32-_41.txt", "contents": "fun box divrem(\ny: U32 val)\n: (U32 val , U32 val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-I32-_53.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_292.txt", "contents": "fun box pvd_config()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cancel_sent_to\u00b6\n[Source]\nfun box rds_cancel_sent_to()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_atomic_cswp\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_17.txt", "contents": "(I8 val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , Bool val)\n\n\nmodc\u00b6\n[Source]"} +{"id": "Pony/pony_test-TestHelper-_2.txt", "contents": "msg: String val,\nverbose: Bool val = false)\n: None val\n\nParameters\u00b6\n\nmsg: String val\nverbose: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nfail\u00b6\n[Source]\nFlag the test as having failed.\nfun box fail(\nmsg: String val = \"Test failed\")\n: None val"} +{"id": "Pony/src-pony_check-property-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-TCPAuth-_1.txt", "contents": "from: (AmbientAuth val | NetAuth val)\n\nReturns\u00b6\n\nTCPAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: TCPAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/src-process-process_monitor-_39.txt", "contents": "| let wr: _WaitResult =>\nNone\nelse\nmatch _child.wait()\n| let sr: _StillRunning =>\nif not _polling_child then\n_polling_child = true\nlet timers = _ensure_timers()\nlet pm: ProcessMonitor tag = this\nlet tn =\nobject iso is TimerNotify\nfun ref apply(timer: Timer, count: U64): Bool =>\npm._wait_for_child()\ntrue\nend\nlet timer = Timer(consume tn, _process_poll_interval, _process_poll_interval)\ntimers(consume timer)\nend\n| let exit_status: ProcessExitStatus =>\n// process child exit code or termination signal"} +{"id": "Pony/src-cli-command-_16.txt", "contents": "fun deb_string(): String =>\n_spec.deb_string() + \"=\" + _value.string()\n\nclass val Arg\n\"\"\"\nArg contains a spec and an effective value for a given arg.\n\"\"\"\nlet _spec: ArgSpec\nlet _value: _Value\n\nnew val create(spec': ArgSpec, value': _Value) =>\n_spec = spec'\n_value = value'\n\nfun _append(next: Arg): Arg =>\nArg(_spec, _spec._typ_p().append(_value, next._value))\n\nfun spec(): ArgSpec => _spec\n\nfun bool(): Bool =>"} +{"id": "Pony/net-OSSockOpt-_406.txt", "contents": "fun box sctp_max_cwnd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_max_hb_interval\u00b6\n[Source]\nfun box sctp_max_hb_interval()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_max_sack_delay\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_32.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I16-_51.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_25.txt", "contents": "[Source]\nfun box shl(\ny: ULong val)\n: ILong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nILong val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: ULong val)\n: ILong val\n"} +{"id": "Pony/builtin-I32-_10.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_path-_35.txt", "contents": "else\n0 == @unlink(path.cstring())\nend\nend\nelse\nfalse\nend\n\nfun rename(new_path: FilePath): Bool =>\n\"\"\"\nRename a file or directory.\n\"\"\"\nif not caps(FileRename) or not new_path.caps(FileCreate) then\nreturn false\nend\n\n0 == @rename(path.cstring(), new_path.path.cstring())\n\nfun val symlink(link_name: FilePath): Bool =>\n\"\"\""} +{"id": "Pony/term-ANSITerm-_3.txt", "contents": "\ndispose\u00b6\n[Source]\nStop accepting input, inform the notifier we have closed, and dispose of\nour source.\nbe dispose()\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-cli-command_spec-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/collections-ListNode-_10.txt", "contents": "[Source]\nReturn the next node.\nfun box next()\n: (this->ListNode[A] ref | None val)\n\nReturns\u00b6\n\n(this->ListNode[A] ref | None val)\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Array-_16.txt", "contents": "Reads a U128 from offset. This is only allowed for an array of U8s.\nfun box read_u128[optional B: (A & Real[B] val & U8 val)](\noffset: USize val)\n: U128 val ?\n\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nU128 val ?\n\n\napply\u00b6\n[Source]\nGet the i-th element, raising an error if the index is out of bounds.\nfun box apply(\ni: USize val)\n: this->A ?"} +{"id": "Pony/src-pony_check-generator-_96.txt", "contents": "let cloned = array.clone()\nrnd.shuffle[this->T!](cloned)\ncloned.values()\nend\n)\n\nfun list_of[T](\ngen: Generator[T],\nmin: USize = 0,\nmax: USize = 100)\n: Generator[List[T]]\n=>\nGenerators.seq_of[T, List[T]](gen, min, max)\n\nfun set_of[T: (Hashable #read & Equatable[T] #read)](\ngen: Generator[T],\nmax: USize = 100)\n: Generator[Set[T]]\n=>\n\"\"\""} +{"id": "Pony/src-files-path-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-builtin-signed-_64.txt", "contents": "\nfun mod(y: I64): I64 =>\n_SignedArithmetic.mod[I64, U64](this, y)\n\nfun mod_unsafe(y: I64): I64 =>\n_SignedUnsafeArithmetic.mod_unsafe[I64, U64](this, y)\n\nfun hash(): USize => u64().hash()\n\nfun addc(y: I64): (I64, Bool) =>\n@\"llvm.sadd.with.overflow.i64\"(this, y)\n\nfun subc(y: I64): (I64, Bool) =>\n@\"llvm.ssub.with.overflow.i64\"(this, y)\n\nfun mulc(y: I64): (I64, Bool) =>\n_SignedCheckedArithmetic._mul_checked[U64, I64](this, y)\n\nfun divc(y: I64): (I64, Bool) =>\n_SignedCheckedArithmetic.div_checked[I64, U64](this, y)"} +{"id": "Pony/guarantees_4.txt", "contents": "# Opaque reference capabilities\n\nThere's only one __opaque__ reference capability, which is `tag`. A `tag` variable makes no guarantees about other variables at all. As a result, it can't be used to either read from or write to the object; hence the name __opaque__.\n\nIt's still useful though: you can do identity comparison with it, you can call behaviours on it, and you can call functions on it that only need a `tag` receiver.\n\n__Why can't `tag` be used to read or write?__ Because `tag` doesn't stop _other_ actors from writing to the object. That means if we tried to read, we would have no guarantee that there wasn't some other actor writing to the object, so we might get a race condition.\n"} +{"id": "Pony/src-net-tcp_listener-_25.txt", "contents": "_count = _count + 1\nelse\n@pony_os_socket_close(ns)\nend\n\nfun ref _notify_listening() =>\n\"\"\"\nInform the notifier that we're listening.\n\"\"\"\nif not _event.is_null() then\n_notify.listening(this)\nelse\n_closed = true\n_notify.not_listening(this)\nend\n\nfun ref close() =>\n\"\"\"\nDispose of resources.\n\"\"\""} +{"id": "Pony/term-ReadlineNotify-_2.txt", "contents": "\nline: String val\n\nReturns\u00b6\n\nSeq[String val] box\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/net-OSSockOpt-_108.txt", "contents": "fun box icmp_redir_nettos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_source_quench\u00b6\n[Source]\nfun box icmp_source_quench()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_sr_failed\u00b6\n[Source]"} +{"id": "Pony/src-random-random-_12.txt", "contents": "\"\"\"\nThe `Random` trait should be implemented by all random number generators. The\nonly method you need to implement is `fun ref next(): 64`. Once that method\nhas been implemented, the `Random` trait provides default implementations of\nconversions to other number types.\n\"\"\"\nnew create(x: U64 = 5489, y: U64 = 0)\n\"\"\"\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed.\n\"\"\"\n\nfun tag has_next(): Bool =>\n\"\"\"\nIf used as an iterator, this always has another value.\n\"\"\"\ntrue\n\nfun ref next(): U64\n\"\"\""} +{"id": "Pony/src-pony_check-generator-_72.txt", "contents": "1432\n1433\n1434\n1435\n1436\n1437\n1438\n1439use \"collections\"\nuse \"assert\"\nuse \"itertools\"\nuse \"debug\"\n\ntype ValueAndShrink[T1] is (T1^, Iterator[T1^])\n\"\"\"\nPossible return type for\n[`Generator.generate`](pony_check-Generator.md#generate).\nRepresents a generated value and an Iterator of shrunken values.\n\"\"\"\n\ntype GenerateResult[T2] is (T2^ | ValueAndShrink[T2])"} +{"id": "Pony/src-builtin-string-_158.txt", "contents": "if _size == that._size then\n@memcmp(_ptr, that._ptr, _size) == 0\nelse\nfalse\nend\n\nfun lt(that: String box): Bool =>\n\"\"\"\nReturns true if this is lexically less than that. Needs to be made UTF-8\nsafe.\n\"\"\"\nlet len = _size.min(that._size)\nvar i: USize = 0\n\nwhile i < len do\nif _ptr._apply(i) < that._ptr._apply(i) then\nreturn true\nelseif _ptr._apply(i) > that._ptr._apply(i) then\nreturn false\nend"} +{"id": "Pony/generics-and-reference-capabilities_0.txt", "contents": "# Generics and Reference Capabilities\n\nIn the examples presented previously we've explicitly set the reference capability to `val`:\n\n```pony\nclass Foo[A: Any val]\n```\n\nIf the capability is left out of the type parameter then the generic class or function can accept any reference capability. This would look like:\n\n```pony\nclass Foo[A: Any]\n```\n\nIt can be made shorter because `Any` is the default constraint, leaving us with:\n\n```pony\nclass Foo[A]\n```\n"} +{"id": "Pony/collections-persistent-HashMap-_5.txt", "contents": "HashMap[K, V, H] val ?\n\n\nget_or_else\u00b6\n[Source]\nGet the value associated with provided key if present. Otherwise,\nreturn the provided alternate value.\nfun val get_or_else(\nk: K,\nalt: val->V)\n: val->V\n\nParameters\u00b6\n\nk: K\nalt: val->V\n\nReturns\u00b6\n\nval->V"} +{"id": "Pony/builtin-None-_1.txt", "contents": "new val create()\n: None val^\n\nReturns\u00b6\n\nNone val^\n\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6"} +{"id": "Pony/builtin-F64-_26.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\nexp\u00b6\n[Source]\nfun box exp()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nexp2\u00b6\n[Source]\nfun box exp2()\n: F64 val\n"} +{"id": "Pony/src-term-ansi-_26.txt", "contents": "\"\"\"\nRed background.\n\"\"\"\n\"\\x1B[41m\"\n\nfun green_bg(): String =>\n\"\"\"\nGreen background.\n\"\"\"\n\"\\x1B[42m\"\n\nfun yellow_bg(): String =>\n\"\"\"\nYellow background.\n\"\"\"\n\"\\x1B[43m\"\n\nfun blue_bg(): String =>\n\"\"\"\nBlue background."} +{"id": "Pony/net-OSSockOpt-_528.txt", "contents": "fun box so_timestamping()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_timestampns\u00b6\n[Source]\nfun box so_timestampns()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_timestamp_monotonic\u00b6\n[Source]"} +{"id": "Pony/collections-Hashable-_0.txt", "contents": "\n\n\n\n\n\n\nHashable\u00b6\n[Source]\nAnything with a hash method is hashable.\ninterface ref Hashable\n\nPublic Functions\u00b6\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-itertools-iter-_97.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.map[None]({(x) => env.out.print(x.string()) })\n.run()\n```\n```\n1\n2\n3\n```\n\"\"\"\nif not _iter.has_next() then return end\ntry\n_iter.next()?\nrun(on_error)\nelse\non_error()\nend"} +{"id": "Pony/builtin-ULong-_42.txt", "contents": "(ULong val , ULong val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nneg\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_379.txt", "contents": "fun box sctp_established()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_event\u00b6\n[Source]\nfun box sctp_event()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_events\u00b6\n[Source]"} +{"id": "Pony/pony_bench-OverheadBenchmark-_2.txt", "contents": "apply\u00b6\n[Source]\nfun ref apply()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nconfig\u00b6\n[Source]\nfun box config()\n: BenchConfig val\n\nReturns\u00b6\n\nBenchConfig val\n\n"} +{"id": "Pony/src-signals-signal_handler-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62use @pony_asio_event_create[AsioEventID](\nowner: AsioEventNotify,\nfd: U32,\nflags: U32,\nnsec: U64,\nnoisy: Bool)\nuse @pony_asio_event_unsubscribe[None](event: AsioEventID)\nuse @pony_asio_event_destroy[None](event: AsioEventID)\n\nactor SignalHandler is AsioEventNotify"} +{"id": "Pony/src-net-tcp_connection-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/builtin-Integer-_10.txt", "contents": "\n\nmod_unsafe\u00b6\n[Source]\nCalculates the modulo of this number after floored division by y.\nUnsafe Operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box mod_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/builtin-Real-_29.txt", "contents": "ILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/process-CapError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/signals-Sig-_9.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nstkflt\u00b6\n[Source]\nfun box stkflt()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nstop\u00b6\n[Source]\nfun box stop()\n: U32 val\n"} +{"id": "Pony/src-pony_check-randomness-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-I64-_55.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-capsicum-cap_rights-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130use \"files\"\nuse @__cap_rights_init[Pointer[U64]](version: I32, ...)"} +{"id": "Pony/src-collections-persistent-list-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/net-OSSockOpt-_403.txt", "contents": "fun box sctp_ltrace_error_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_map_logging_enable\u00b6\n[Source]\nfun box sctp_map_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_maxburst\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_33.txt", "contents": "fun _help_name(): String =>\n_root_spec().help_name()\n\nprimitive _OptionParser\nfun parse(\nspec: OptionSpec,\ntarg: (String|None),\nargs: Array[String] ref)\n: (Option | SyntaxError)\n=>\n// Grab the token-arg if provided, else consume an arg if one is required.\nlet arg = match targ\n| (let fn: None) if spec._requires_arg() =>\ntry args.shift()? else None end\nelse\ntarg\nend\n// Now convert the arg to Type, detecting missing or mis-typed args\nmatch arg\n| let a: String =>"} +{"id": "Pony/src-builtin-real-_39.txt", "contents": "\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun isize_unsafe(): ISize =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun u8_unsafe(): U8 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n"} +{"id": "Pony/src-pony_test-test_helper-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/1_hello-world_3.txt", "contents": "# Running the program\n\nNow we can run the program:\n\n```bash\n$ ./helloworld\nHello, world!\n```\n\nCongratulations, you've written your first Pony program! Next, we'll explain what some of that code does.\n"} +{"id": "Pony/builtin-U128-_27.txt", "contents": "U128 val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val ?\n\n\nrem_partial\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_16.txt", "contents": "fun box sub_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6"} +{"id": "Pony/5_methods_7.txt", "contents": "class Foo\nvar _x: U32\n\nnew create() =>\n_x = 0\n\nnew from_int(x: U32) =>\n_x = x\n\nclass Bar\nfun f() =>\nvar a: Foo = Foo.create()\nvar b: Foo = a.from_int(3)\n```\n\nWe can even reuse the variable name in the assignment expression to call the constructor.\n\n```pony\nclass Bar\nfun f() =>"} +{"id": "Pony/builtin-FloatingPoint-_11.txt", "contents": "\ndiv_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box div_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n"} +{"id": "Pony/collections-HashByteSeq-_2.txt", "contents": "x: (String box | Array[U8 val] box)\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64(\nx: (String box | Array[U8 val] box))\n: U64 val\n\nParameters\u00b6\n\nx: (String box | Array[U8 val] box)\n\nReturns\u00b6\n\nU64 val"} +{"id": "Pony/bureaucracy-Custodian-_3.txt", "contents": "Custodian tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nAdd an actor to be disposed of.\nbe apply(\nworker: DisposableActor tag)\n\nParameters\u00b6\n\nworker: DisposableActor tag\n\n\nremove\u00b6\n[Source]\nRemoves an actor from the set of things to be disposed.\nbe remove(\nworker: DisposableActor tag)"} +{"id": "Pony/src-builtin-signed-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-collections-list-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/pony_check-Generators-_37.txt", "contents": "ilong\u00b6\n[Source]\nCreate a generator for ILong values.\nfun box ilong(\nmin: ILong val = call,\nmax: ILong val = call)\n: Generator[ILong val] box\n\nParameters\u00b6\n\nmin: ILong val = call\nmax: ILong val = call\n\nReturns\u00b6\n\nGenerator[ILong val] box\n\n\nisize\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-HashMap-_4.txt", "contents": "value: val->V\n\nReturns\u00b6\n\nHashMap[K, V, H] val\n\n\nremove\u00b6\n[Source]\nTry to remove the provided key from the Map.\nfun val remove(\nk: K)\n: HashMap[K, V, H] val ?\n\nParameters\u00b6\n\nk: K\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ULong-_16.txt", "contents": "fun box sub_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_41.txt", "contents": "_dispose()\n\nfun ref _dispose() =>\nfor disposable in Poperator[DisposableActor](_disposables) do\ndisposable.dispose()\nend\n\nbe log(msg: String, verbose: Bool = false) =>\n_logger.log(msg, verbose)\n\n// end interface towards PropertyHelper\n\nfun ref complete() =>\n\"\"\"\nComplete the Property execution successfully.\n\"\"\"\n_notify.complete(true)\n\nfun ref fail(repr: String, rounds: USize = 0, err: Bool = false) =>\n\"\"\""} +{"id": "Pony/src-promises-promise-_41.txt", "contents": "p1(\"first\")\n```\n\"\"\"\nlet p' = Promise[Array[A] val]\nlet ps' = Array[Promise[A]] .> concat(consume ps)\n\nif ps'.size() == 0 then\np'(recover Array[A] end)\nreturn p'\nend\n\nlet j = _Join[A](p', ps'.size())\nfor p in ps'.values() do\np.next[None]({(a)(j) => j(a)}, {() => p'.reject()})\nend\n\np'\n\nactor _Join[A: Any #share]\nembed _xs: Array[A]"} +{"id": "Pony/net-OSSockOpt-_481.txt", "contents": "fun box so_bsp_state()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_busy_poll\u00b6\n[Source]\nfun box so_busy_poll()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_conaccess\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_99.txt", "contents": "else\n_i\nend\n\nclass ArrayValues[A, B: Array[A] #read] is Iterator[B->A]\nlet _array: B\nvar _i: USize\n\nnew create(array: B) =>\n_array = array\n_i = 0\n\nfun has_next(): Bool =>\n_i < _array.size()\n\nfun ref next(): B->A ? =>\n_array(_i = _i + 1)?\n\nfun ref rewind(): ArrayValues[A, B] =>\n_i = 0"} +{"id": "Pony/builtin-USize-_6.txt", "contents": "\nUSize val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U16-_13.txt", "contents": "(U16 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , Bool val)\n\n\nremc\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_38.txt", "contents": "[Source]\nfun box div(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: ISize val)\n: (ISize val , ISize val)\n"} +{"id": "Pony/builtin-FloatingPoint-_5.txt", "contents": "\nU8 val\n\n\nprecision2\u00b6\n[Source]\nfun tag precision2()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nprecision10\u00b6\n[Source]\nfun tag precision10()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-array-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/builtin-UnsignedInteger-_15.txt", "contents": "fun box popcount()\n: A\n\nReturns\u00b6\n\nA\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: A\n\nReturns\u00b6\n\nA\n\n\nctz\u00b6\n[Source]"} +{"id": "Pony/src-collections-map-_37.txt", "contents": "r(key) = value\nr\n\nfun sub[H2: HashFunction[this->K!] val = H](key: this->K!)\n: HashMap[this->K!, this->V!, H2]^\n=>\n\"\"\"\nThis without the given key.\n\"\"\"\nlet r = clone[H2]()\ntry r.remove(key)? end\nr\n\nfun next_index(prev: USize = -1): USize ? =>\n\"\"\"\nGiven an index, return the next index that has a populated key and value.\nRaise an error if there is no next populated index.\n\"\"\"\nfor i in Range(prev + 1, _array.size()) do\nmatch _array(i)?"} +{"id": "Pony/annotations_8.txt", "contents": "## `nodoc`\n\nRecognised on objects and methods (`actor`, `class`, `struct`, `primitive`, `trait`, `interface`, `new`, `be`, `fun`). Indicates to the documentation system that the item and any of its children shouldn't be included in generated output.\n\n```pony\nclass \\nodoc\\Foo\n\"\"\"\nWe don't want this class and its methods to appear in generated documentation\n\"\"\"\n```\n"} +{"id": "Pony/builtin--index-_4.txt", "contents": "primitive U32\nprimitive U64\nprimitive U8\nprimitive ULong\nprimitive USize\ntype Unsigned\ntrait UnsignedInteger\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_0.txt", "contents": "\n\n\n\n\n\n\nossockopt.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-term-readline-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/net-OSSockOpt-_418.txt", "contents": "fun box sctp_pcb_flags_autoclose()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_auto_asconf\u00b6\n[Source]\nfun box sctp_pcb_flags_auto_asconf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_blocking_io\u00b6\n[Source]"} +{"id": "Pony/src-process-process_notify-_0.txt", "contents": "\n\n\n\n\n\n\nprocess_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-map-_39.txt", "contents": "=>\n\"\"\"\nCreate a clone. The key and value types may be different due to aliasing\nand viewpoint adaptation.\n\"\"\"\nlet r = HashMap[this->K!, this->V!, H2](_size)\n\nfor (k, v) in pairs() do\nr(k) = v\nend\nr\n\nfun ref clear() =>\n\"\"\"\nRemove all entries.\n\"\"\"\n_size = 0\n// Our default prealloc of 6 corresponds to an array alloc size of 8.\nlet n: USize = 8\n_array = _array.init(_MapEmpty, n)"} +{"id": "Pony/net-OSSockOpt-_261.txt", "contents": "fun box mrt_init()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_mfc_bw_upcall\u00b6\n[Source]\nfun box mrt_mfc_bw_upcall()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_mfc_flags_all\u00b6\n[Source]"} +{"id": "Pony/src-bureaucracy-custodian-_8.txt", "contents": "\"\"\"\nfor worker in _workers.values() do\nworker.dispose()\nend\n\n_workers.clear()\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-process_monitor-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-process-_process-_43.txt", "contents": "fun tag _make_cmdline(args: Array[String] val): String =>\nvar cmdline: String = \"\"\nfor arg in args.values() do\n// quote args with spaces on Windows\nvar next = arg\nifdef windows then\ntry\nif arg.contains(\" \") and (not arg(0)? == '\"') then\nnext = \"\\\"\" + arg + \"\\\"\"\nend\nend\nend\ncmdline = cmdline + next + \" \"\nend\ncmdline\n\nfun tag _make_environ(vars: Array[String] val): Array[U8] =>\nvar size: USize = 0\nfor varr in vars.values() do\nsize = size + varr.size() + 1 // name=value\\0"} +{"id": "Pony/src-process-_process-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/generic-constraints_1.txt", "contents": "# Capability Constraints\n\nThe type parameter constraint for a generic class or method can constrain to a particular capability as seen previously:\n\n```pony\nclass Foo[A: Any val]\n```\n\nWithout the constraint, the generic must work for all possible capabilities. Sometimes you don't want to be limited to a specific capability and you can't support all capabilities. The solution for this is generic constraint qualifiers. These represent classes of capabilities that are accepted in the generic. The valid qualifiers are:\n\n| ▷ | Capabilities allowed | Description |\n| -------- | ---------------------------- | --------------------------------------------------------------- |\n| `#read` | `ref`, `val`, `box` | Anything you can read from |\n| `#send` | `iso`, `val`, `tag` | Anything you can send to an actor |\n| `#share` | `val`, `tag` | Anything you can send to more than one actor |\n| `#any` | `iso`, `trn`, `ref`, `val`, `box`, `tag` | Default of a constraint |\n| `#alias` | `ref`, `val`, `box`, `tag` | Set of capabilities that alias as themselves (used by compiler) |\n\nIn the previous section, we went through extra work to support `iso`. If there's no requirement for `iso` support we can use `#read` and support `ref`, `val`, and `box`:\n"} +{"id": "Pony/itertools-Iter-_41.txt", "contents": "Iter[(A , B , C , D)] ref^\n\n\nzip4[B: B, C: C, D: D, E: E]\u00b6\n[Source]\nZip five iterators together so that each call to next() results in\na tuple with the next value of each of the iterators. The number of\nitems returned is the minimum of the number of items returned by the\niterators.\nfun ref zip4[B: B, C: C, D: D, E: E](\ni2: Iterator[B] ref,\ni3: Iterator[C] ref,\ni4: Iterator[D] ref,\ni5: Iterator[E] ref)\n: Iter[(A , B , C , D , E)] ref^\n\nParameters\u00b6\n\ni2: Iterator[B] ref\ni3: Iterator[C] ref"} +{"id": "Pony/net-OSSockOpt-_414.txt", "contents": "fun box sctp_packet_truncated()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pad_chunk\u00b6\n[Source]\nfun box sctp_pad_chunk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_partial_delivery_point\u00b6\n[Source]"} +{"id": "Pony/2_ops_9.txt", "contents": "# Precedence\n\nIn Pony, unary operators always bind stronger than any infix operators: `not a == b` will be interpreted as `(not a) == b` instead of `not (a == b)`.\n\nWhen using infix operators in complex expressions a key question is the __precedence__, i.e. which operator is evaluated first. Given this expression:\n\n```pony\n1 + 2 * 3 // Compilation failed.\n```\n\nWe will get a value of 9 if we evaluate the addition first and 7 if we evaluate the multiplication first. In mathematics, there are rules about the order in which to evaluate operators and most programming languages follow this approach.\n\nThe problem with this is that the programmer has to remember the order and people aren't very good at things like that. Most people will remember to do multiplication before addition, but what about left bit shifting versus bitwise and? Sometimes people misremember (or guess wrong) and that leads to bugs. Worse, those bugs are often very hard to spot.\n\nPony takes a different approach and outlaws infix precedence. Any expression where more than one infix operator is used __must__ use parentheses to remove the ambiguity. If you fail to do this the compiler will complain.\n\nThis means that the example above is illegal in Pony and should be rewritten as:\n\n```pony\n1 + (2 * 3) // 7"} +{"id": "Pony/src-collections-hashable-_0.txt", "contents": "\n\n\n\n\n\n\nhashable.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files-FilePath-_4.txt", "contents": "prefix: String val = \"\"\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover\n\nReturns\u00b6\n\nFilePath val^ ?\n\n\nPublic fields\u00b6\nlet path: String val\u00b6\n[Source]\nAbsolute filesystem path.\n\nlet caps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref\u00b6\n[Source]\nSet of capabilities for operations on path.\n\nPublic Functions\u00b6\njoin\u00b6\n[Source]"} +{"id": "Pony/src-bureaucracy-custodian-_6.txt", "contents": "new create(env: Env) =>\nlet actor1 = Actor1\nlet actor2 = Actor2\nlet actor3 = Actor3\n\nlet custodian = Custodian\ncustodian(actor1)\ncustodian(actor2)\ncustodian(actor3)\n\nSignalHandler(TermHandler(custodian), Sig.term())\n\nclass TermHandler is SignalNotify\nlet _custodian: Custodian\n\nnew iso create(custodian: Custodian) =>\n_custodian = custodian\n\nfun ref apply(count: U32): Bool =>\n_custodian.dispose()"} +{"id": "Pony/builtin-Iterator-_1.txt", "contents": "\nThe For-loop provides a more concise way of iteration:\nfor elem in iterator do\n// do something with elem\nend\n\nIteration using While is more flexible as it allows to continue iterating if a call to next() errors.\nThe For-loop does not allow this.\nImplementing Iterators\u00b6\nIterator implementations need to adhere to the following rules to be considered well-behaved:\n\nIf the Iterator is exhausted, has_next() needs to return false.\nOnce has_next() returned false it is not allowed to switch back to true\n(Unless the Iterator supports rewinding)\nhas_next() does not change its returned value if next() has not been called.\nThat means, that between two calls to next() any number of calls to has_next()\nneed to return the same value. (Unless the Iterator supports rewinding)\nA call to next() erroring does not necessarily denote exhaustiveness.\n\nExample\u00b6"} +{"id": "Pony/src-process-_process-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_253.txt", "contents": "fun box mcast_leave_group()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_leave_source_group\u00b6\n[Source]\nfun box mcast_leave_source_group()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_msfilter\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnectionNotify-_3.txt", "contents": "\n\nconnecting\u00b6\n[Source]\nCalled if name resolution succeeded for a TCPConnection and we are now\nwaiting for a connection to the server to succeed. The count is the number\nof connections we're trying. The notifier will be informed each time the\ncount changes, until a connection is made or connect_failed() is called.\nfun ref connecting(\nconn: TCPConnection ref,\ncount: U32 val)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\ncount: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_test-pony_test-_48.txt", "contents": "\"\"\"\n_started = _started + 1\n\ntry\nif not _no_prog then\n_env.out.print(\n_started.string() + \" test\" + _plural(_started)\n+ \" started, \" + _finished.string() + \" complete: \"\n+ _records(id)?.name + \" started\")\nend\nend\n\nbe _test_complete(id: USize, pass: Bool, log: Array[String] val) =>\n\"\"\"\nA test has completed, restore its result and update our status info.\nThe id parameter is the test identifier handed out when we created the test\nhelper.\n\"\"\"\n_finished = _finished + 1\n"} +{"id": "Pony/src-builtin-array-_89.txt", "contents": "while i < _size do\nif predicate(_ptr._apply(i), value) then\nif n == nth then\nreturn i\nend\n\nn = n + 1\nend\n\ni = i + 1\nend\n\nerror\n\nfun contains(\nvalue: A!,\npredicate: {(box->A!, box->A!): Bool} val =\n{(l: box->A!, r: box->A!): Bool => l is r })\n: Bool\n=>"} +{"id": "Pony/net-OSSockOpt-_450.txt", "contents": "fun box sctp_reuse_port()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_rtoinfo\u00b6\n[Source]\nfun box sctp_rtoinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_rttvar_logging_enable\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_6.txt", "contents": "alloc: USize val = 0\n\nReturns\u00b6\n\nString ref^\n\n\nfrom_cstring\u00b6\n[Source]\nReturn a string from a pointer to a null-terminated cstring\nwithout making a copy. The data is not copied. This must be done\nonly with C-FFI functions that return pony_alloc'd character\narrays. The pointer is scanned for the first null byte, which will\nbe interpreted as the null terminator. Note that the scan is\nunbounded; the pointed to data must be null-terminated within\nthe allocated array to preserve memory safety. If a null pointer\nis given then an empty string is returned.\nnew ref from_cstring(\nstr: Pointer[U8 val] ref)\n: String ref^"} +{"id": "Pony/src-collections-set-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/promises--index-_2.txt", "contents": "actor Main\nnew create(env: Env) =>\nlet promise = Promise[String]\npromise.next[String](recover PrintFulfill(env, \"foo\") end)\npromise.next[String](recover PrintFulfill(env, \"bar\") end)\npromise.next[String](recover PrintFulfill(env, \"baz\") end)\npromise(\"fulfilled\")\n\nIn the following code, the fulfill functions are chained together so\nthat the fulfilled value of the first one is used to generate a value\nwhich fulfills the second one, which in turn is used to compute a\nvalue which fulfills the third one, which in turn is used to compute a\nvalue which fulfills the fourth one. The output is the average length\nof the words passed on the command line or 0 if there are no command\nline arguments.\nuse \"promises\"\n\nprimitive Computation\nfun tag string_to_strings(s: String): Array[String] val =>\nrecover s.split() end"} +{"id": "Pony/src-itertools-iter-_113.txt", "contents": "fun ref zip2[B, C](i2: Iterator[B], i3: Iterator[C]): Iter[(A, B, C)]^ =>\n\"\"\"\nZip three iterators together so that each call to next() results in\na tuple with the next value of the first iterator, the next value\nof the second iterator, and the value of the third iterator. The\nnumber of items returned is the minimum of the number of items\nreturned by the three iterators.\n\"\"\"\nIter[(A, B, C)](\nobject is Iterator[(A, B, C)]\nlet _i1: Iterator[A] = _iter\nlet _i2: Iterator[B] = i2\nlet _i3: Iterator[C] = i3\n\nfun ref has_next(): Bool =>\n_i1.has_next() and _i2.has_next() and _i3.has_next()\n\nfun ref next(): (A, B, C) ? =>\n(_i1.next()?, _i2.next()?, _i3.next()?)\nend)"} +{"id": "Pony/itertools-Iter-_3.txt", "contents": "new ref chain(\nouter_iterator: Iterator[Iterator[A] ref] ref)\n: Iter[A] ref^\n\nParameters\u00b6\n\nouter_iterator: Iterator[Iterator[A] ref] ref\n\nReturns\u00b6\n\nIter[A] ref^\n\n\nrepeat_value\u00b6\n[Source]\nCreate an iterator that returns the given value forever.\nExample\u00b6\nIter[U32].repeat_value(7)\n\n7 7 7 7 7 7 7 7 7 ..."} +{"id": "Pony/net-OSSockOpt-_427.txt", "contents": "fun box sctp_pcb_flags_needs_mapped_v4()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_nodelay\u00b6\n[Source]\nfun box sctp_pcb_flags_nodelay()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_no_fragment\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_80.txt", "contents": "\nlet mask = U64(0x00000000FFFFFFFF)\n\nvar lo = (x_lo and mask) * (y_lo and mask)\nvar t = lo >> 32\nlo = lo and mask\nt = t + ((x_lo >> 32) * (y_lo and mask))\nlo = lo + ((t and mask) << 32)\n\nvar hi = t >> 32\nt = lo >> 32\nlo = lo and mask\nt = t + ((y_lo >> 32) * (x_lo and mask))\nlo = lo + ((t and mask) << 32)\nhi = hi + (t >> 32)\nhi = hi + ((x_lo >> 32) * (y_lo >> 32))\nhi = hi + (x_hi * y_lo) + (x_lo * y_hi)\n\n(hi.u128() << 64) or lo.u128()\nend"} +{"id": "Pony/src-builtin-env-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-cli-command_parser-_27.txt", "contents": "if not args.contains(ars.name()) then // latest arg may be a seq\nif ars.required() then\nreturn SyntaxError(ars.name(), \"missing value for required argument\")\nend\nargs.update(ars.name(), Arg(ars, ars._default_p()))\nend\nend\narg_pos = arg_pos + 1\nend\n\n// Specifying only the parent and not a leaf command is an error.\nif _spec.is_parent() then\nreturn SyntaxError(_spec.name(), \"missing subcommand\")\nend\n\n// A successfully parsed and populated leaf Command.\nCommand._create(_spec, _fullname(), consume options, args)\n\nfun _parse_long_option(\ntoken: String,"} +{"id": "Pony/builtin-I128-_58.txt", "contents": "I64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_313.txt", "contents": "fun box rds_rdma_readwrite()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_remote_error\u00b6\n[Source]\nfun box rds_rdma_remote_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_silent\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_listener-_15.txt", "contents": "None\n\nclass MyTCPListenNotify is TCPListenNotify\nfun ref connected(listen: TCPListener ref): TCPConnectionNotify iso^ =>\nMyTCPConnectionNotify\n\nfun ref not_listening(listen: TCPListener ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nTCPListener(TCPListenAuth(env.root),\nrecover MyTCPListenNotify end, \"\", \"8989\")\n```\n\"\"\"\nvar _notify: TCPListenNotify\nvar _fd: U32\nvar _event: AsioEventID = AsioEvent.none()\nvar _closed: Bool = false\nlet _limit: USize"} +{"id": "Pony/builtin-Number-_0.txt", "contents": "\n\n\n\n\n\n\nNumber\u00b6\n[Source]\ntype Number is\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val)\n\nType Alias For\u00b6\n\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val)\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_21.txt", "contents": "fun box ipproto_hip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_hmp\u00b6\n[Source]\nfun box ipproto_hmp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_hopopts\u00b6\n[Source]"} +{"id": "Pony/src-files-file_lines-_12.txt", "contents": "end\n// reset position to not disturb other operations on the file\n// we only actually advance the cursor if the line is returned.\n_file.seek_start(current_pos)\nresult\n\nfun ref _read_last_line(): String iso^ ? =>\nlet block = _reader.block(_reader.size())?\n_inc_public_file_cursor(block.size())\nString.from_iso_array(consume block)\n\nfun ref _inc_public_file_cursor(amount: USize) =>\n_cursor = _cursor + amount\n_file.seek_start(_cursor)\n\n\n\n\n\n"} +{"id": "Pony/src-collections-set-_24.txt", "contents": "try\nthat(value)?\nr.set(value)\nend\nend\nr\n\nfun op_xor[K: HashFunction[this->A!] val = H](\nthat: this->HashSet[A, H])\n: HashSet[this->A!, K]^\n=>\n\"\"\"\nCreate a set with the elements that are in either set but not both.\n\"\"\"\nlet r = HashSet[this->A!, K](size().max(that.size()))\n\nfor value in values() do\ntry\nthat(value)?\nelse"} +{"id": "Pony/src-builtin-string-_175.txt", "contents": ")\nelseif value < 0xE000 then\n// UTF-16 surrogate pairs are not allowed.\n(3, 0xEF, 0xBF, 0xBD, 0)\nelseif value < 0x10000 then\n( 3,\n((value >> 12) or 0xE0).u8(),\n(((value >> 6) and 0x3F) or 0x80).u8(),\n((value and 0x3F) or 0x80).u8(),\n0\n)\nelseif value < 0x110000 then\n( 4,\n((value >> 18) or 0xF0).u8(),\n(((value >> 12) and 0x3F) or 0x80).u8(),\n(((value >> 6) and 0x3F) or 0x80).u8(),\n((value and 0x3F) or 0x80).u8()\n)\nelse\n// Code points beyond 0x10FFFF are not allowed."} +{"id": "Pony/builtin-ILong-_55.txt", "contents": "\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ISize-_29.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/files-FilePath-_12.txt", "contents": "\nchown\u00b6\n[Source]\nSet the owner and group for a path. Does nothing on Windows.\nfun box chown(\nuid: U32 val,\ngid: U32 val)\n: Bool val\n\nParameters\u00b6\n\nuid: U32 val\ngid: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ntouch\u00b6"} +{"id": "Pony/7_equality_5.txt", "contents": "```pony\ninterface Equatable[A: Equatable[A] #read]\nfun eq(that: box->A): Bool => this is that\nfun ne(that: box->A): Bool => not eq(that)\n```\n"} +{"id": "Pony/src-builtin-array-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-builtin-string-_97.txt", "contents": "_ptr = Pointer[U8]._alloc(_alloc)\n_set(0, encoded._2)\nif encoded._1 > 1 then\n_set(1, encoded._3)\nif encoded._1 > 2 then\n_set(2, encoded._4)\nif encoded._1 > 3 then\n_set(3, encoded._5)\nend\nend\nend\n_set(_size, 0)\n\nfun ref push_utf32(value: U32) =>\n\"\"\"\nPush a UTF-32 code point.\n\"\"\"\nlet encoded = _UTF32Encoder.encode(value)\nlet i = _size\n_size = _size + encoded._1"} +{"id": "Pony/pony_check-Generators-_4.txt", "contents": "Generator[T] box\n\n\nseq_of[T: T, S: Seq[T] ref]\u00b6\n[Source]\nCreate a Seq from the values of the given Generator with an optional\nminimum and maximum size.\nDefaults are 0 and 100, respectively.\nfun box seq_of[T: T, S: Seq[T] ref](\ngen: Generator[T] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[S] box\n\nParameters\u00b6\n\ngen: Generator[T] box\nmin: USize val = 0\nmax: USize val = 100\n"} +{"id": "Pony/src-files-directory-_50.txt", "contents": "false\nend\n\nfun remove(target: String): Bool =>\n\"\"\"\nRemove the file or directory. The directory contents will be removed as\nwell, recursively. Symlinks will be removed but not traversed.\n\"\"\"\nif\nnot path.caps(FileLookup)\nor not path.caps(FileRemove)\nor (_fd == -1)\nthen\nreturn false\nend\n\ntry\nlet path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then"} +{"id": "Pony/collections-MapKeys-_2.txt", "contents": "fun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturns the next key, or raises an error if there isn't one. If keys are\nadded during iteration, this may not return all keys.\nfun ref next()\n: M->K ?\n\nReturns\u00b6\n\nM->K ?\n\n"} +{"id": "Pony/src-builtin-runtime_options-_8.txt", "contents": "\n/* NOTE: if you change any of the field docstrings, update `options.h` in\n* the runtime to keep them in sync.\n*/\n\nvar ponymaxthreads: U32 = 0\n\"\"\"\nUse N scheduler threads. Defaults to the number of cores (not hyperthreads)\navailable.\nThis can't be larger than the number of cores available.\n\"\"\"\n\nvar ponyminthreads: U32 = 0\n\"\"\"\nMinimum number of active scheduler threads allowed.\nDefaults to 0, meaning that all scheduler threads are allowed to be\nsuspended when no work is available.\nThis can't be larger than --ponymaxthreads if provided, or the physical\ncores available.\n\"\"\""} +{"id": "Pony/builtin-Integer-_57.txt", "contents": "\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n"} +{"id": "Pony/3_actors_7.txt", "contents": "# Actors are cheap\n\nIf you've done concurrent programming before, you'll know that threads can be expensive. Context switches can cause problems, each thread needs a stack (which can be a lot of memory), and you need lots of locks and other mechanisms to write thread-safe code.\n\nBut actors are cheap. Really cheap. The extra cost of an actor, as opposed to an object, is about 256 bytes of memory. Bytes, not kilobytes! And there are no locks and no context switches. An actor that isn't executing consumes no resources other than the few extra bytes of memory.\n\nIt's pretty normal to write a Pony program that uses hundreds of thousands of actors.\n"} +{"id": "Pony/builtin-ULong-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: I64 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nI64 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: I64 val^\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-AsioEventID-_0.txt", "contents": "\n\n\n\n\n\n\nAsioEventID\u00b6\n[Source]\ntype AsioEventID is\nPointer[AsioEvent val] tag\n\nType Alias For\u00b6\n\nPointer[AsioEvent val] tag\n\n\n\n\n"} +{"id": "Pony/pony_check-PropertyHelper-_3.txt", "contents": "concurrent tests.\nfun box log(\nmsg: String val,\nverbose: Bool val = false)\n: None val\n\nParameters\u00b6\n\nmsg: String val\nverbose: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nfail\u00b6\n[Source]\nFlag the test as having failed.\nfun box fail("} +{"id": "Pony/6_errors_8.txt", "contents": "Multiple objects can be set up for disposal:\n\n```pony\nwith obj = SomeObjectThatNeedsDisposing(), other = SomeOtherDisposableObject() do\n// use obj\nend\n```\n\nThe value of a `with` expression is the value of the last expression in the block.\n"} +{"id": "Pony/src-files-path-_45.txt", "contents": "if with_ext then\nb\nelse\nlet e_size = ext(b).size()\n\nif e_size > 0 then\nb.trim(0, b.size() - e_size - 1)\nelse\nb\nend\nend\n\nfun dir(path: String): String =>\n\"\"\"\nReturn a cleaned path before the last separator, or the whole path if there\nis no separator.\n\"\"\"\ntry\nclean(path.trim(0, path.rfind(sep())?.usize()))\nelse"} +{"id": "Pony/net-OSSockOpt-_35.txt", "contents": "fun box ipproto_maxid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_meas\u00b6\n[Source]\nfun box ipproto_meas()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mh\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_69.txt", "contents": "\"\"\"\nthis >~ y\n\nfun abs(): A\nfun ceil(): A\nfun floor(): A\nfun round(): A\nfun trunc(): A\n\nfun finite(): Bool\nfun infinite(): Bool\nfun nan(): Bool\n\nfun ldexp(x: A, exponent: I32): A\nfun frexp(): (A, U32)\nfun log(): A\nfun log2(): A\nfun log10(): A\nfun logb(): A\n"} +{"id": "Pony/src-net-tcp_connection-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-F64-_0.txt", "contents": "\n\n\n\n\n\n\nF64\u00b6\n[Source]\nprimitive val F64 is\nFloatingPoint[F64 val] val\n\nImplements\u00b6\n\nFloatingPoint[F64 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_56.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_495.txt", "contents": "fun box so_label()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_linger\u00b6\n[Source]\nfun box so_linger()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_linger_sec\u00b6\n[Source]"} +{"id": "Pony/builtin-NullablePointer-_0.txt", "contents": "\n\n\n\n\n\n\nNullablePointer[A: A]\u00b6\n[Source]\nA NullablePointer[A] is used to encode a possibly-null type. It should\nonly be used for structs that need to be passed to and from the C FFI.\nAn optional type for anything that isn't a struct should be encoded as a\nunion type, for example (A | None).\nstruct ref NullablePointer[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nThis re-encodes the type of that from A to NullablePointer[A], allowing\nthat to be assigned to a field or variable of type NullablePointer[A]. It"} +{"id": "Pony/builtin-ISize-_1.txt", "contents": "new val create(\nvalue: ISize val)\n: ISize val^\n\nParameters\u00b6\n\nvalue: ISize val\n\nReturns\u00b6\n\nISize val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-itertools-iter-_54.txt", "contents": "\nnew chain(outer_iterator: Iterator[Iterator[A]]) =>\n\"\"\"\nTake an iterator of iterators and return an Iter containing the\nitems of the first one, then the second one, and so on.\n"} +{"id": "Pony/builtin-I16-_21.txt", "contents": "fun box div_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6"} +{"id": "Pony/1_variables_7.txt", "contents": "\nAlternatively, these fields could be assigned in the constructor method:\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U32\n\nnew create(hunger: U32) =>\nname = \"Fantastibat\"\n_hunger_level = hunger\n```\n\nIf the assignment is not done at the definition level or in the constructor, an error is raised by the compiler. This is true for both `var` and `let` fields.\n\nPlease note that the assignment of a value to a field has to be explicit. The below example raises an error when compiled, even when the field is of `var` type:\n\n```pony\nclass Wombat\nlet name: String"} +{"id": "Pony/src-pony_check-property_unit_test-_9.txt", "contents": "fun name(): String => \"my_property\"\n\nfun gen(): Generator[String] =>\nGenerators.ascii_printable()\n\nfun property(arg1: String, h: PropertyHelper) =>\nh.assert_true(arg1.size() > 0)\n\nactor Main is TestList\nnew create(env: Env) => PonyTest(env, this)\n\nfun tag tests(test: PonyTest) =>\ntest(Property1UnitTest[String](MyProperty))\n\n```\n\"\"\"\n\nvar _prop1: ( Property1[T] iso | None )\nlet _name: String\n"} +{"id": "Pony/3_actors_2.txt", "contents": "be eat(amount: U64) =>\n_hunger_level = _hunger_level - amount.min(_hunger_level)\n```\n\nHere we have an `Aardvark` that can eat asynchronously. Clever Aardvark.\n"} +{"id": "Pony/builtin-I8-_20.txt", "contents": "I8 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/process-ProcessMonitor-_1.txt", "contents": "create\u00b6\n[Source]\nCreate infrastructure to communicate with a forked child process and\nregister the asio events. Fork child process and notify our user about\nincoming data via the notifier.\nnew tag create(\nauth: StartProcessAuth val,\nbackpressure_auth: ApplyReleaseBackpressureAuth val,\nnotifier: ProcessNotify iso,\nfilepath: FilePath val,\nargs: Array[String val] val,\nvars: Array[String val] val,\nwdir: (FilePath val | None val) = reference,\nprocess_poll_interval: U64 val = call)\n: ProcessMonitor tag^\n\nParameters\u00b6\n\nauth: StartProcessAuth val\nbackpressure_auth: ApplyReleaseBackpressureAuth val"} +{"id": "Pony/files-Directory-_17.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\ndispose\u00b6\n[Source]\nClose the directory.\nfun ref dispose()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n"} +{"id": "Pony/debug-DebugOut-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: DebugOut val)\n: Bool val\n\nParameters\u00b6\n\nthat: DebugOut val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_0.txt", "contents": "\n\n\n\n\n\n\nUSize\u00b6\n[Source]\nprimitive val USize is\nUnsignedInteger[USize val] val\n\nImplements\u00b6\n\nUnsignedInteger[USize val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/5_structs_6.txt", "contents": "## Functions\n\nLike Pony classes, Pony structs can also have functions. Everything you know about functions on Pony classes applies to structs as well.\n"} +{"id": "Pony/src-pony_check-property_unit_test-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-collections-set-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-files-file_caps-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-ossockopt-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/net-OSSockOpt-_476.txt", "contents": "fun box so_atmpvc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_atmqos\u00b6\n[Source]\nfun box so_atmqos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_atmsap\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_60.txt", "contents": "1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211"} +{"id": "Pony/builtin-ISize-_32.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nop_and\u00b6"} +{"id": "Pony/6_type-aliases_5.txt", "contents": "trait HasName\nfun name(): String => \"Bob\"\n\ntrait HasAge\nfun age(): U32 => 42\n\ntrait HasFeelings\nfun feeling(): String => \"Great!\"\n\ntype Person is (HasName & HasAge & HasFeelings)\n```\n\nThere's another new concept here: the type has a `&` in it. This is similar to the `|` of a __union__ type: it means this is an __intersection__ type. That is, it's something that must be _all_ of `HasName`, `HasAge` _and_ `HasFeelings`.\n\nBut the use of `type` here is exactly the same as the enumeration example above, it's just providing a name for a type that is otherwise a bit tedious to type out over and over.\n\nAnother example, this time from the standard library, is `SetIs`. Here's the actual definition:\n\n```pony\ntype SetIs[A] is HashSet[A, HashIs[A!]]"} +{"id": "Pony/files-FileExists-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileExists val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileExists val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_25.txt", "contents": "fun box modc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6"} +{"id": "Pony/builtin-I128-_45.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: I128 val)\n: Bool val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-IntProperty-_2.txt", "contents": "sample: IntPropertySample ref,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\nsample: IntPropertySample ref\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nint_property[T: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[T] val)]\u00b6\n[Source]\nfun ref int_property[T: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |"} +{"id": "Pony/src-buffered-writer-_27.txt", "contents": "else\n_current.push_u128(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref i128_le(data: I128) =>\n\"\"\"\nWrite an I128 to the buffer in little-endian byte order.\n\"\"\"\nu128_le(data.u128())\n\nfun ref i128_be(data: I128) =>\n\"\"\"\nWrite an I128 to the buffer in big-endian byte order.\n\"\"\"\nu128_be(data.u128())\n\nfun ref write(data: ByteSeq) =>\n\"\"\"\nWrite a ByteSeq to the buffer."} +{"id": "Pony/src-cli-command_spec-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-pony_check-generator-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-builtin-string-_117.txt", "contents": "Returns the i-th byte. Raise an error if the index is out of bounds.\n\"\"\"\nif i < _size then _ptr._apply(i) else error end\n\nfun ref update(i: USize, value: U8): U8 ? =>\n\"\"\"\nChange the i-th byte. Raise an error if the index is out of bounds.\n\"\"\"\nif i < _size then\n_set(i, value)\nelse\nerror\nend\n\nfun at_offset(offset: ISize): U8 ? =>\n\"\"\"\nReturns the byte at the given offset. Raise an error if the offset is out\nof bounds.\n\"\"\"\nthis(offset_to_index(offset))?"} +{"id": "Pony/src-random-random-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\"\"\""} +{"id": "Pony/src-pony_check-generator-_68.txt", "contents": "1352\n1353\n1354\n1355\n1356\n1357\n1358\n1359\n1360\n1361\n1362\n1363\n1364\n1365\n1366\n1367\n1368\n1369\n1370\n1371"} +{"id": "Pony/src-pony_check-property_helper-_43.txt", "contents": "if (s.size() % 2) == 0 then\n_ph.complete_action(\"is_even\")\nelse\n_ph.fail_action(\"is_even\")\n\nclass EvenStringProperty is Property1[String]\nfun name(): String => \"even_string\"\n\nfun gen(): Generator[String] =>\nGenerators.ascii()\n\nfun property(arg1: String, ph: PropertyHelper) =>\nph.expect_action(\"is_even\")\nAsyncActor(ph).check(arg1)\n```\n\n\"\"\"\n_runner.expect_action(name, _run)\n\nfun val complete_action(name: String) =>"} +{"id": "Pony/net-OSSockOpt-_554.txt", "contents": "fun box tcpolen_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_tstamp_appa\u00b6\n[Source]\nfun box tcpolen_tstamp_appa()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_window\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_26.txt", "contents": "\n// Try again\nprimitive _EAGAIN\nfun apply(): I32 =>\nifdef bsd or osx then 35\nelseif linux then 11\nelseif windows then 22\nelse compile_error \"no EAGAIN\" end\n\n// Invalid argument\nprimitive _EINVAL\nfun apply(): I32 => 22\n\nprimitive _EXOSERR\nfun apply(): I32 => 71\n\n// For handling errors between @fork and @execve\nprimitive _StepChdir\nfun apply(): U8 => 1\n"} +{"id": "Pony/pony_test-TestHelper-_21.txt", "contents": "None val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-NetAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: NetAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: NetAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/src-builtin-string-_83.txt", "contents": "1652\n1653\n1654\n1655\n1656\n1657\n1658\n1659\n1660\n1661\n1662\n1663\n1664\n1665\n1666\n1667\n1668\n1669\n1670\n1671"} +{"id": "Pony/capsicum-Cap-_13.txt", "contents": "fun box fchmod()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchmodat\u00b6\n[Source]\nfun box fchmodat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchown\u00b6\n[Source]"} +{"id": "Pony/builtin-Int-_0.txt", "contents": "\n\n\n\n\n\n\nInt\u00b6\n[Source]\ntype Int is\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)\n\nType Alias For\u00b6\n\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_121.txt", "contents": "fun so_no_ddp():I32 => @pony_os_sockopt_option(I32(862))\nfun so_no_offload():I32 => @pony_os_sockopt_option(I32(863))\nfun so_np_extensions():I32 => @pony_os_sockopt_option(I32(864))\nfun so_nread():I32 => @pony_os_sockopt_option(I32(865))\nfun so_numrcvpkt():I32 => @pony_os_sockopt_option(I32(866))\nfun so_nwrite():I32 => @pony_os_sockopt_option(I32(867))\nfun so_oobinline():I32 => @pony_os_sockopt_option(I32(868))\nfun so_original_dst():I32 => @pony_os_sockopt_option(I32(869))\nfun so_passcred():I32 => @pony_os_sockopt_option(I32(870))\nfun so_passsec():I32 => @pony_os_sockopt_option(I32(871))\nfun so_peek_off():I32 => @pony_os_sockopt_option(I32(872))\nfun so_peercred():I32 => @pony_os_sockopt_option(I32(873))\nfun so_peerlabel():I32 => @pony_os_sockopt_option(I32(874))\nfun so_peername():I32 => @pony_os_sockopt_option(I32(875))\nfun so_peersec():I32 => @pony_os_sockopt_option(I32(876))\nfun so_port_scalability():I32 => @pony_os_sockopt_option(I32(877))\nfun so_priority():I32 => @pony_os_sockopt_option(I32(878))\nfun so_protocol():I32 => @pony_os_sockopt_option(I32(879))\nfun so_protocol_info():I32 => @pony_os_sockopt_option(I32(880))\nfun so_prototype():I32 => @pony_os_sockopt_option(I32(881))"} +{"id": "Pony/src-builtin-array-_54.txt", "contents": "# Memory allocation\nArray allocates contiguous memory. It always allocates at least enough memory\nspace to hold all of its elements. Space is the number of elements the Array\ncan hold without allocating more memory. The `space()` method returns the\nnumber of elements an Array can hold. The `size()` method returns the number\nof elements the Array holds.\n\nDifferent data types require different amounts of memory. Array[U64] with size\nof 6 will take more memory than an Array[U8] of the same size.\n\nWhen creating an Array or adding more elements will calculate the next power\nof 2 of the requested number of elements and allocate that much space, with a\nlower bound of space for 8 elements.\n\nHere's a few examples of the space allocated when initialising an Array with\nvarious number of elements:\n\n| size | space |\n|------|-------|\n| 0 | 0 |"} +{"id": "Pony/net-OSSockOpt-_110.txt", "contents": "fun box icmp_timestampreply()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_time_exceeded\u00b6\n[Source]\nfun box icmp_time_exceeded()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_acceptsourceroute\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_43.txt", "contents": "fun box lt(\ny: I64 val)\n: Bool val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: I64 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/files-FileAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/format-FormatHexSmall-_1.txt", "contents": "new val create()\n: FormatHexSmall val^\n\nReturns\u00b6\n\nFormatHexSmall val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatHexSmall val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexSmall val\n\nReturns\u00b6"} +{"id": "Pony/src-signals-sig-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_95.txt", "contents": "fun box icmp_echoreply()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_exc_fragtime\u00b6\n[Source]\nfun box icmp_exc_fragtime()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_exc_ttl\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_6.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/random-SplitMix64-_9.txt", "contents": ": I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun ref ilong()"} +{"id": "Pony/src-files-file_path-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/net-OSSockOpt-_175.txt", "contents": "fun box ipx_address_notify()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_crtitf\u00b6\n[Source]\nfun box ipx_crtitf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_dltitf\u00b6\n[Source]"} +{"id": "Pony/random-XorShift128Plus-_0.txt", "contents": "\n\n\n\n\n\n\nXorShift128Plus\u00b6\n[Source]\nThis is an implementation of xorshift+, as detailed at:\nhttp://xoroshiro.di.unimi.it\nThis should only be used for legacy applications that specifically require\nXorShift128Plus, otherwise use Rand.\nclass ref XorShift128Plus is\nRandom ref\n\nImplements\u00b6\n\nRandom ref\n"} +{"id": "Pony/src-itertools-iter-_105.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.take(3)\n```\n`1 2 3`\n\"\"\"\nIter[A](\nobject\nvar _countdown: USize = n\n\nfun ref has_next(): Bool =>\n(_countdown > 0) and _iter.has_next()\n\nfun ref next(): A ? =>\nif _countdown > 0 then\n_countdown = _countdown - 1\n_iter.next()?\nelse"} +{"id": "Pony/builtin-SignedInteger-_63.txt", "contents": "\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/process-ForkError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/4_control-structures_18.txt", "contents": "## Repeat\n\nThe final loop construct that Pony provides is `repeat` `until`. Here we evaluate the expression in the loop and then evaluate a condition expression to see if we're done or we should go round again.\n\nThis is similar to `do` `while` in C++, C# and Java, except that the termination condition is reversed; i.e. those languages terminate the loop when the condition expression is false, but Pony terminates the loop when the condition expression is true.\n\nThe differences between `while` and `repeat` in Pony are:\n\n1. We always go around the loop at least once with `repeat`, whereas with `while` we may not go round at all.\n2. The termination condition is reversed.\n\nSuppose we're trying to create something and we want to keep trying until it's good enough:\n\n```pony\nactor Main\nnew create(env: Env) =>\nvar counter = U64(1)\nrepeat\nenv.out.print(\"hello!\")\ncounter = counter + 1"} +{"id": "Pony/src-time-timers-_18.txt", "contents": "\nfun ref _set_time(): U64 =>\n\"\"\"\nSet the current time with precision reduced by the slop bits. Return the\nelapsed time.\n\"\"\"\nlet previous = _current = Time.nanos() >> _slop.u64()\n_current - previous\n\nfun ref _get_wheel(rem: U64): _TimingWheel ? =>\n\"\"\"\nGet the hierarchical timing wheel for the given time until expiration.\n\"\"\"\nlet t = rem.min(_expiration_max())\nlet i = ((t.bitwidth() - t.clz()) - 1).usize() / _bits()\n_wheel(i)?\n\nfun tag _expiration_max(): U64 =>\n\"\"\"\nGet the maximum time the timing wheels cover. Anything beyond this is"} +{"id": "Pony/src-signals-sig-_16.txt", "contents": "end\n\nfun info(): U32 =>\nifdef bsd or osx then 29\nelse compile_error \"no SIGINFO\"\nend\n\nfun pwr(): U32 =>\nifdef linux then 30\nelse compile_error \"no SIGPWR\"\nend\n\nfun usr1(): U32 =>\nifdef bsd or osx then 30\nelseif linux then 10\nelse compile_error \"no SIGUSR1\"\nend\n\nfun usr2(): U32 =>\nifdef not \"scheduler_scaling_pthreads\" then"} +{"id": "Pony/random-Dice-_1.txt", "contents": "Parameters\u00b6\n\nfrom: Random ref\n\nReturns\u00b6\n\nDice ref^\n\n\nPublic fields\u00b6\nvar r: Random ref\u00b6\n[Source]\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nReturn the sum of count rolls of a die with the given number of sides.\nThe die is numbered from 1 to sides. For example, count = 2 and\nsides = 6 will return a value between 2 and 12.\nfun ref apply("} +{"id": "Pony/net-OSSockOpt-_1.txt", "contents": "any double underscore (__) is converted to a\nsingle underscore (_).\n\nThese constants are not stable between Pony releases.\nValues returned by this function may be held by long-lived variables\nby the calling process: values cannot change while the process runs.\nProgrammers must not cache any of these values for purposes of\nsharing them for use by any other Pony program (for example,\nsharing via serialization & deserialization or via direct\nshared memory).\nMany functions may return -1, which means that the constant's\nvalue could not be determined at the Pony runtime library compile\ntime. One cause may be that the option truly isn't available,\nfor example, the option level constant IPPROTO_3PC is available\non MacOS 10.x but not on Linux 4.4. Another cause may be the\nPony runtime library's compilation did not include the correct\nheader file(s) for the target OS platform.\nA third cause of error is due to the regular expression-based\napproach used to harvest desirable constants. It is not fool-proof.\nThe regexp used is too broad and finds some macros that are not"} +{"id": "Pony/time-Time-_4.txt", "contents": "cycles\u00b6\n[Source]\nProcessor cycle count. Don't use this for performance timing, as it does\nnot control for out-of-order execution.\nfun box cycles()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nperf_begin\u00b6\n[Source]\nGet a cycle count for beginning a performance testing block. This will\nwill prevent instructions from before this call leaking into the block and\ninstructions after this call being executed earlier.\nfun box perf_begin()\n: U64 val\n"} +{"id": "Pony/collections-persistent-HashMap-_0.txt", "contents": "\n\n\n\n\n\n\nHashMap[K: Any #share, V: Any #share, H: HashFunction[K] val]\u00b6\n[Source]\nA persistent map based on the Compressed Hash Array Mapped Prefix-tree from\n'Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM\nCollections' by Michael J. Steindorfer and Jurgen J. Vinju\nUsage\u00b6\nuse \"collections/persistent\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet m1 = Map[String, U32] // {}\n// Update returns a new map with the provided key set"} +{"id": "Pony/src-cli-command_help-_12.txt", "contents": "message for a given CommandSpec, optionally with a specific command\nidentified to print help about. Use `Help.general()` or `Help.for_command()`\nto create a CommandHelp instance.\n\"\"\"\nlet _parent: (CommandHelp box | None)\nlet _spec: CommandSpec box\n\nnew _create(parent': (CommandHelp box | None), spec': CommandSpec box) =>\n_parent = parent'\n_spec = spec'\n\nfun fullname(): String =>\nmatch _parent\n| let p: CommandHelp => p.fullname() + \" \" + _spec.name()\nelse\n_spec.name()\nend\n\nfun string(): String => fullname()\n"} +{"id": "Pony/src-builtin-signed-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/net-OSSockOpt-_368.txt", "contents": "fun box sctp_data()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_first_frag\u00b6\n[Source]\nfun box sctp_data_first_frag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_frag_mask\u00b6\n[Source]"} +{"id": "Pony/serialise--index-_1.txt", "contents": "due to the use of type identifiers rather than a heavy-weight self-describing\nserialisation schema. This also means it isn't safe to deserialise something\nserialised by the same program compiled for a different platform.\nThe Serialise.signature method is provided\nfor the purposes of comparing communicating Pony binaries to determine if they\nare the same. Confirming this before deserialising data can help mitigate the\nrisk of accidental serialisation across different Pony binaries, but does not on\nits own address the security issues of accepting data from untrusted sources.\nPublic Types\u00b6\n\nprimitive DeserialiseAuth\nprimitive InputSerialisedAuth\nprimitive OutputSerialisedAuth\nprimitive Serialise\nprimitive SerialiseAuth\nclass Serialised\n\n\n\n"} +{"id": "Pony/builtin-U128-_60.txt", "contents": "I64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/strings-CommonPrefix-_3.txt", "contents": "\nParameters\u00b6\n\nthat: CommonPrefix val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-SignedInteger-_37.txt", "contents": "fun box rem(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Vec-_4.txt", "contents": "\nParameters\u00b6\n\ni: USize val\nvalue: val->A\n\nReturns\u00b6\n\nVec[A] val ?\n\n\ndelete\u00b6\n[Source]\nReturn a vector with an element deleted. Elements after this are moved\ndown by one index, compacting the vector. An out of bounds index raises an\nerror.\nfun val delete(\ni: USize val)\n: Vec[A] val ?\n"} +{"id": "Pony/collections-BinaryHeapPriority-_0.txt", "contents": "\n\n\n\n\n\n\nBinaryHeapPriority[A: Comparable[A] #read]\u00b6\n[Source]\ntype BinaryHeapPriority[A: Comparable[A] #read] is\n(_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))\n\nType Alias For\u00b6\n\n(_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))\n\n\n\n\n"} +{"id": "Pony/src-collections-set-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_6.txt", "contents": "after_iteration\u00b6\n[Source]\nfun ref after_iteration(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_runner-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-cli-command-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-files-file_path-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/capsicum-Cap-_41.txt", "contents": "fun box kqueue_change()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nkqueue\u00b6\n[Source]\nfun box kqueue()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_55.txt", "contents": "\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I32-_58.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-buffered-writer-_18.txt", "contents": "var _current: Array[U8] iso = recover Array[U8] end\nvar _size: USize = 0\n\nfun ref reserve_chunks(size': USize) =>\n\"\"\"\nReserve space for size' chunks.\n\nThis needs to be recalled after every call to `done`\nas `done` resets the chunks.\n\"\"\"\n_chunks.reserve(size')\n\nfun ref reserve_current(size': USize) =>\n\"\"\"\nReserve space for size bytes in `_current`.\n\"\"\"\n_current.reserve(_current.size() + size')\n\nfun size(): USize =>\n_size"} +{"id": "Pony/src-collections-map-_29.txt", "contents": "\nm.upsert(\"new-key\", 4, {(current, provided) => current + provided })\n\nthen \"new-key\" is added to the map with a value of 4.\n\nReturns the value that we set the key to\n\"\"\"\n\n(let i, let found) = _search(key)\nlet value' = value\n\ntry\nif found then\n(let pkey, let pvalue) = (_array(i)? = _MapEmpty) as (K^, V^)\n\nlet new_value = f(consume pvalue, consume value)\nlet new_value' = new_value\n\n_array(i)? = (consume pkey, consume new_value)\n"} +{"id": "Pony/builtin-ISize-_40.txt", "contents": "\nISize val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: ISize val)\n: Bool val\n"} +{"id": "Pony/collections-persistent-HashSet-_1.txt", "contents": "create\u00b6\n[Source]\nnew val create()\n: HashSet[A, H] val^\n\nReturns\u00b6\n\nHashSet[A, H] val^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturn the number of elements in the set.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val"} +{"id": "Pony/symbol-lookup-cheat-sheet_2.txt", "contents": "| | (2) to indicate a function return type |\n| | (3) a type constraint |\n| `;` | only used to separate expressions on the same line |\n| `=` | (1) (destructive) assignment |\n| | (2) in: use alias = package name |\n| | (3) supply default argument for method |\n| | (4) supply default type for generics |\n| `!` | (1) boolean negation |\n| | (2) a type that is an alias of another type |\n| `?` | (1) partial functions |\n| | (2) a call to a C function that could raise an error |\n| `-` | (1) start of line: unary negation |\n| | (2) middle of line: subtraction |\n| `_` | (1) to indicate a private variable, constructor, function, behavior |\n| | (2) to ignore a tuple item in a pattern match |\n| `~` | partial application |\n| `^` | an ephemeral type |\n| | | (1) separates the types in an enumeration (the value can be any of these types) |\n| | (2) starts a branch in a match |\n| `&` | (1) separates the types in a complex type (the value is of all of these types) |"} +{"id": "Pony/builtin-U32-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/process-ForkError-_0.txt", "contents": "\n\n\n\n\n\n\nForkError\u00b6\n[Source]\nprimitive val ForkError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ForkError val^\n\nReturns\u00b6\n\nForkError val^"} +{"id": "Pony/builtin-U32-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/src-net-net_address-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/cli-Help-_1.txt", "contents": "\n\nPublic Functions\u00b6\ngeneral\u00b6\n[Source]\nCreates a command help that can print a general program help message.\nfun box general(\ncs: CommandSpec box)\n: CommandHelp box\n\nParameters\u00b6\n\ncs: CommandSpec box\n\nReturns\u00b6\n\nCommandHelp box\n\n\nfor_command\u00b6"} +{"id": "Pony/src-net-ossockopt-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-pony_check-pony_check-_13.txt", "contents": "and the actual property function. (Note that the property function is supplied\nin a second application of the result to `for_all`.)\n\n```pony\nclass ListReversePropertyWithinAUnitTest is UnitTest\nfun name(): String => \"list/reverse/forall\"\n\nfun apply(h: TestHelper) =>\nlet gen = recover val Generators.list_of[USize](Generators.usize()) end\nPonyCheck.for_all[List[USize]](gen, h)(\n{(sample, ph) =>\nph.array_eq[Usize](arg1, arg1.reverse().reverse())\n})\n// ... possibly more properties, using `PonyCheck.for_all`\n```\n\nIndependently of how you integrate with [PonyTest](pony_test--index.md),\nthe PonyCheck machinery will instantiate the provided Generator, and will\nexecute it for a configurable number of samples.\n"} +{"id": "Pony/src-pony_test-test_helper-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-strings-common_prefix-_2.txt", "contents": "fun apply(data: ReadSeq[Stringable]): String iso^ =>\nvar res = \"\".clone()\ntry\nlet iter = data.values()\nif iter.has_next() then\nres = iter.next()?.string()\nfor d in iter do\nvar idx: USize = 0\nlet s = d.string()\nwhile (idx < res.size()) and (idx < s.size()) do\nif res(idx)? != s(idx)? then\nbreak\nend\nidx = idx + 1\nend\nres = res.substring(0, idx.isize())\nend\nend\nend\nres"} +{"id": "Pony/builtin-I64-_62.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: I64 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileExec-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-SignedInteger-_18.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-persistent-list-_58.txt", "contents": "not.\n\"\"\"\nvar cur: List[A] = this\nvar res: List[A] = Nil[A]\nwhile true do\nmatch cur\n| let cons: Cons[A] =>\nif f(cons.head()) then\nres = res.prepend(cons.head())\ncur = cons.tail()\nelse\nbreak\nend\nelse\nreturn res.reverse()\nend\nend\nres.reverse()\n\n"} +{"id": "Pony/random-XorOshiro128Plus-_11.txt", "contents": "[Source]\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |"} +{"id": "Pony/src-pony_check-generator-_65.txt", "contents": "1292\n1293\n1294\n1295\n1296\n1297\n1298\n1299\n1300\n1301\n1302\n1303\n1304\n1305\n1306\n1307\n1308\n1309\n1310\n1311"} +{"id": "Pony/pony_check-Property4-_2.txt", "contents": "gen3\u00b6\n[Source]\nThe Generator for the third argument to your property4 method.\nfun box gen3()\n: Generator[T3] box\n\nReturns\u00b6\n\nGenerator[T3] box\n\n\ngen4\u00b6\n[Source]\nThe Generator for the fourth argument to your property4 method.\nfun box gen4()\n: Generator[T4] box\n\nReturns\u00b6\n\nGenerator[T4] box"} +{"id": "Pony/src-itertools-iter-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-promises-promise-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-builtin-signed-_92.txt", "contents": "(this - y, overflow)\nend\n\nfun mulc(y: I128): (I128, Bool) =>\n// using llvm.smul.with.overflow.i128 would require to link\n// llvm compiler-rt where the function implementing it lives: https://github.com/llvm-mirror/compiler-rt/blob/master/lib/builtins/muloti4.c\n// See this bug for reference:\n// the following implementation is more or less exactly was __muloti4 is\n// doing\n_SignedCheckedArithmetic._mul_checked[U128, I128](this, y)\n\nfun divc(y: I128): (I128, Bool) =>\n_SignedCheckedArithmetic.div_checked[I128, U128](this, y)\n\nfun remc(y: I128): (I128, Bool) =>\n_SignedCheckedArithmetic.rem_checked[I128, U128](this, y)\n\nfun fldc(y: I128): (I128, Bool) =>\n_SignedCheckedArithmetic.fld_checked[I128, U128](this, y)\n"} +{"id": "Pony/net-OSSockOpt-_146.txt", "contents": "fun box ipv6_nexthop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_origdstaddr\u00b6\n[Source]\nfun box ipv6_origdstaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pathmtu\u00b6\n[Source]"} +{"id": "Pony/backpressure-Backpressure-_0.txt", "contents": "\n\n\n\n\n\n\nBackpressure\u00b6\n[Source]\nprimitive val Backpressure\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Backpressure val^\n\nReturns\u00b6\n\nBackpressure val^"} +{"id": "Pony/random-Random-_2.txt", "contents": ": Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nA random integer in [0, 2^64)\nfun ref next()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/format-Format-_3.txt", "contents": "Returns\u00b6\n\nString iso^\n\n\nint[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[A])]\u00b6\n[Source]\nfun box int[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val) & Integer[A])](\nx: A,\nfmt: (FormatDefault val | FormatUTF32 val | FormatBinary val |\nFormatBinaryBare val | FormatOctal val | FormatOctalBare val |\nFormatHex val | FormatHexBare val | FormatHexSmall val |\nFormatHexSmallBare val) = reference,\nprefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,\nprec: USize val = call,\nwidth: USize val = 0,"} +{"id": "Pony/builtin-Integer-_36.txt", "contents": "\n\nlt\u00b6\n[Source]\nfun box lt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le("} +{"id": "Pony/builtin-F64-_49.txt", "contents": "y: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ndiv\u00b6\nfun box div(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n"} +{"id": "Pony/src-collections-list-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/src-pony_test-pony_test-_34.txt", "contents": "# Long tests\n\nSimple tests run within a single function. When that function exits, either\nreturning or raising an error, the test is complete. This is not viable for\ntests that need to use actors.\n\nLong tests allow for delayed completion. Any test can call long_test() on its\nTestHelper to indicate that it needs to keep running. When the test is finally\ncomplete it calls complete() on its TestHelper.\n\nThe complete() function takes a Bool parameter to specify whether the test was\na success. If any asserts fail then the test will be considered a failure\nregardless of the value of this parameter. However, complete() must still be\ncalled.\n\nSince failing tests may hang, a timeout must be specified for each long test.\nWhen the test function exits a timer is started with the specified timeout. If\nthis timer fires before complete() is called the test is marked as a failure\nand the timeout is reported.\n"} +{"id": "Pony/src-time-time-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-list-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-random-xoroshiro-_8.txt", "contents": "let r = (x * 5).rotl(7) * 9\ny = x xor y\n\n_x = x.rotl(24) xor y xor (y << 16)\n_y = y.rotl(37)\nr\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I16-_43.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: I16 val)\n: Bool val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_216.txt", "contents": "fun box ip_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_mtu_discover\u00b6\n[Source]\nfun box ip_mtu_discover()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_all\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_15.txt", "contents": "fun box mulc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-collections-persistent-list-_56.txt", "contents": "\nfun val drop_while(f: {(val->A): Bool} box): List[A] =>\n\"\"\"\nBuilds a list by dropping elements from the front of the list until one\nfails to satisfy the provided predicate.\n\"\"\"\nvar cur: List[A] = this\nwhile true do\nmatch cur\n| let cons: Cons[A] =>\nif f(cons.head()) then cur = cons.tail() else break end\nelse\nreturn Nil[A]\nend\nend\ncur\n\nfun val take(n: USize): List[A] =>\n\"\"\"\nBuilds a list of the first n elements."} +{"id": "Pony/src-pony_check-property_runner-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/builtin-U8-_21.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-signed-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-float-_50.txt", "contents": "\nfun sqrt_unsafe(): F64 =>\n\"\"\"\nUnsafe operation.\nIf this is negative, the result is undefined.\n\"\"\"\n@\"llvm.sqrt.f64\"(this)\n\nfun cbrt(): F64 => @cbrt(this)\nfun exp(): F64 => @\"llvm.exp.f64\"(this)\nfun exp2(): F64 => @\"llvm.exp2.f64\"(this)\n\nfun cos(): F64 => @\"llvm.cos.f64\"(this)\nfun sin(): F64 => @\"llvm.sin.f64\"(this)\nfun tan(): F64 => @tan(this)\n\nfun cosh(): F64 => @cosh(this)\nfun sinh(): F64 => @sinh(this)\nfun tanh(): F64 => @tanh(this)\n"} +{"id": "Pony/trust-boundary_1.txt", "contents": "# Trust boundaries\n\nWhen we talk about trust, we don't mean things you trust because you think they are perfect. Instead, we mean things you _have_ to trust in order to get things done, even though you know they are _imperfect_.\n\nIn Pony, when you use the C-FFI, you are basically declaring that you trust the C code that's being executed. That's fine, because you may need it to get work done. But what about trusting someone else's code to use the C-FFI? You may need to, but you definitely want to know that it's happening.\n"} +{"id": "Pony/src-builtin-string-_132.txt", "contents": "Add a byte to the end of the string.\n\"\"\"\nreserve(_size + 1)\n_set(_size, value)\n_size = _size + 1\n_set(_size, 0)\n\nfun ref pop(): U8 ? =>\n\"\"\"\nRemove a byte from the end of the string.\n\"\"\"\nif _size > 0 then\n_size = _size - 1\n_ptr._offset(_size)._delete(1, 0)\nelse\nerror\nend\n\nfun ref unshift(value: U8) =>\n\"\"\""} +{"id": "Pony/collections-HashMap-_3.txt", "contents": "key: box->K!)\n: this->V ?\n\nParameters\u00b6\n\nkey: box->K!\n\nReturns\u00b6\n\nthis->V ?\n\n\nupdate\u00b6\n[Source]\nSets a value in the map. Returns the old value if there was one, otherwise\nreturns None. If there was no previous value, this may trigger a resize.\nfun ref update(\nkey: K,\nvalue: V)\n: (V^ | None val)"} +{"id": "Pony/2_how-it-works_2.txt", "contents": "# Line 2\n\n```pony\nnew create(env: Env) =>\n```\n\nThis is a __constructor__. The keyword `new` means it's a function that creates a new instance of the type. In this case, it creates a new __Main__.\n\nUnlike other languages, constructors in Pony have names. That means there can be more than one way to construct an instance of a type. In this case, the name of the constructor is `create`.\n\nThe parameters of a function come next. In this case, our constructor has a single parameter called `env` that is of the type `Env`.\n\nIn Pony, the type of something always comes after its name and is separated by a colon. In C, C++, Java or C#, you might say `Env env`, but we do it the other way around (like Go, Pascal, Rust, TypeScript, and a bunch of other languages).\n\nIt turns out, our `Main` actor __has__ to have a constructor called `create` that takes a single parameter of type `Env`. That's how all programs start! So the beginning of your program is essentially the body of that constructor.\n\n__Wait, what's the body?__ It's the code that comes after the `=>`.\n"} +{"id": "Pony/src-pony_check-property_helper-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-collections-persistent-map-_18.txt", "contents": "new create(m: HashMap[K, V, H]) =>\n_stack.push(m._root_node().iter())\n\nfun has_next(): Bool =>\n_stack.size() > 0\n\nfun ref next(): (K, V) ? =>\nlet iter = _stack(_stack.size() - 1)?\nlet x = iter.next()?\nif not iter.has_next() then _stack.pop()? end\nmatch x\n| let e: _MapEntry[K, V, H] => (e.key, e.value)\n| let i: _MapIter[K, V, H] =>\n_stack.push(i)\nnext()?\nend\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_134.txt", "contents": "String.from_iso_array(consume arr)\n\nfun shrink(s: String): ValueAndShrink[String] =>\n\"\"\"\nshrink string until `min` length.\n\"\"\"\nvar str: String = s.trim(0, s.size()-1)\nlet shorten_iter: Iterator[String^] =\nobject is Iterator[String^]\nfun ref has_next(): Bool => str.size() > min\nfun ref next(): String^ =>\nstr = str.trim(0, str.size()-1)\nend\nlet min_iter =\nif s.size() > min then\nPoperator[String]([s.trim(0, min)])\nelse\nPoperator[String].empty()\nend\nlet shrink_iter ="} +{"id": "Pony/src-pony_check-property_helper-_40.txt", "contents": "+ _print_array[A](actual) + \"):\"\n+ \"\\nMissing: \" + _print_array[box->A](missing)\n+ \"\\nExtra: \" + _print_array[box->A](extra)\n)\n)\nreturn false\nend\n_runner.log(\n_fmt_msg(\nloc,\n\"Assert EQ_UNORDERED passed. \"\n+ msg\n+ \" Got (\"\n+ _print_array[A](expect)\n+ \") == (\"\n+ _print_array[A](actual)\n+ \")\"\n),\ntrue\n)"} +{"id": "Pony/collections-List-_8.txt", "contents": "\n\nfrom\u00b6\n[Source]\nCreates a list equivalent to the provided Array (both node number and order are preserved).\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\n\nnew ref from(\nseq: Array[A^] ref)\n: List[A] ref^\n\nParameters\u00b6\n\nseq: Array[A^] ref\n\nReturns\u00b6\n\nList[A] ref^\n\n"} +{"id": "Pony/src-process-process_monitor-_47.txt", "contents": "_pending.push((data, 0))\nBackpressure.apply(_backpressure_auth)\nelse\n// Notify caller of error, close fd and done.\n_notifier.failed(this, ProcessError(WriteError))\n_stdin.close_near()\nend\nelseif len.usize() < data.size() then\n// Send any remaining data later.\n_pending.push((data, len.usize()))\nBackpressure.apply(_backpressure_auth)\nend\nelse\n// Send later, when the pipe is available for writing.\n_pending.push((data, 0))\nBackpressure.apply(_backpressure_auth)\nend\n\nfun ref _pending_writes() =>\n\"\"\""} +{"id": "Pony/src-builtin-real-_55.txt", "contents": "fun modc(y: A): (A, Bool)\n\"\"\"\nCalculate the modulo of this number after floored division by `y` and return the result and a flag indicating division by zero or overflow.\n\nThe result will have the sign of the divisor.\n\"\"\"\n\nfun op_and(y: A): A => this and y\nfun op_or(y: A): A => this or y\nfun op_xor(y: A): A => this xor y\nfun op_not(): A => not this\n\nfun bit_reverse(): A\n\"\"\"\nReverse the order of the bits within the integer.\nFor example, 0b11101101 (237) would return 0b10110111 (183).\n\"\"\"\n\nfun bswap(): A\n"} +{"id": "Pony/src-pony_test-pony_test-_31.txt", "contents": "# Test names\n\nTests are identified by names, which are used when printing test results and on\nthe command line to select which tests to run. These names are independent of\nthe names of the test classes in the Pony source code.\n\nArbitrary strings can be used for these names, but for large projects it is\nstrongly recommended to use a hierarchical naming scheme to make it easier to\nselect groups of tests.\n\nYou can skip any tests whose names start with a given string by using the\n`--exclude=[prefix]` command line option.\n\nYou can run only tests whose names start with a given string by using the\n`--only=[prefix]` command line option.\n"} +{"id": "Pony/src-files-file-_67.txt", "contents": "end\nend\nend\n// close file\nifdef windows then\n@_close(_fd)\nelse\n@close(_fd)\nend\nend\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_25.txt", "contents": "let line = _queue.shift()?\n_add_history(line)\n_out.print(_cur_prompt + line)\n_handle_line(term, line)\nelse\n_refresh_line()\nend\n\nfun ref closed() =>\n\"\"\"\nNo more input is available.\n\"\"\"\n_save_history()\n\nfun ref up(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nPrevious line.\n\"\"\"\ntry\nif _cur_line > 0 then"} +{"id": "Pony/process-KillError-_2.txt", "contents": "\nthat: KillError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: KillError val)\n: Bool val\n\nParameters\u00b6\n\nthat: KillError val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_333.txt", "contents": "fun box sctp_asconf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_asconf_ack\u00b6\n[Source]\nfun box sctp_asconf_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_asconf_supported\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_56.txt", "contents": "fun box ipproto_st()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_svmtp\u00b6\n[Source]\nfun box ipproto_svmtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_swipe\u00b6\n[Source]"} +{"id": "Pony/collections-Flags-_13.txt", "contents": "fun box op_and(\nthat: Flags[A, B] box)\n: Flags[A, B] iso^\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nFlags[A, B] iso^\n\n\nop_xor\u00b6\n[Source]\nThe symmetric difference of this and that.\nfun box op_xor(\nthat: Flags[A, B] box)\n: Flags[A, B] iso^\n"} +{"id": "Pony/src-pony_check-generator-_67.txt", "contents": "1332\n1333\n1334\n1335\n1336\n1337\n1338\n1339\n1340\n1341\n1342\n1343\n1344\n1345\n1346\n1347\n1348\n1349\n1350\n1351"} +{"id": "Pony/src-net-ossockopt-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-pony_test-pony_test-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/4_control-structures_15.txt", "contents": "## For\n\nFor iterating over a collection of items Pony uses the `for` keyword. This is very similar to `foreach` in C#, `for`..`in` in Python and `for` in Java when used with a collection. It is very different to `for` in C and C++.\n\nThe Pony `for` loop iterates over a collection of items using an iterator. On each iteration, round the loop, we ask the iterator if there are any more elements to process, and if there are, we ask it for the next one.\n\nThe format of `for` loop looks like that:\n```pony\nfor loop_var in collection_iterator do\nloop_body\nend\n```\n\nFor example, to print out all the strings in an array:\n\n```pony\nfor name in [\"Bob\"; \"Fred\"; \"Sarah\"].values() do\nenv.out.print(name)\nend\n```"} +{"id": "Pony/collections-List-_36.txt", "contents": "Returns\u00b6\n\nList[this->A!] ref^\n\n\ntake\u00b6\n[Source]\nBuilds a List by keeping the first n elements.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.drop(1) // [\"a\"]\n\nfun box take(\nn: USize val)\n: List[this->A!] ref\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U16-_31.txt", "contents": "fun box sub_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_350.txt", "contents": "fun box sctp_cause_stale_cookie()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_unrecog_chunk\u00b6\n[Source]\nfun box sctp_cause_unrecog_chunk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_unrecog_param\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_26.txt", "contents": "I32 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U32 val)\n: I32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nI32 val\n\n\nshr_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_23.txt", "contents": "F32 val\n\n\npow\u00b6\n[Source]\nfun box pow(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\npowi\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_51.txt", "contents": "\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_586.txt", "contents": "fun box tcp_pcap_out()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_queue_seq\u00b6\n[Source]\nfun box tcp_queue_seq()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_quickack\u00b6\n[Source]"} +{"id": "Pony/src-collections-range-_0.txt", "contents": "\n\n\n\n\n\n\nrange.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/buffered-Reader-_19.txt", "contents": "\nf32_be\u00b6\n[Source]\nGet a big-endian F32.\nfun ref f32_be()\n: F32 val ?\n\nReturns\u00b6\n\nF32 val ?\n\n\nf32_le\u00b6\n[Source]\nGet a little-endian F32.\nfun ref f32_le()\n: F32 val ?\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-range-_7.txt", "contents": "// iterating over Range of U8 with while-loop\nlet range = Range[U8](5, 100, 5)\nwhile range.has_next() do\ntry\nhandle_u8(range.next()?)\nend\nend\n```\n\nSupports `min` being smaller than `max` with negative `inc`\nbut only for signed integer types and floats:\n\n```pony\nvar previous = 11\nfor left in Range[I64](10, -5, -1) do\nif not (left < previous) then\nerror\nend\nprevious = left\nend"} +{"id": "Pony/builtin-Pointer-_1.txt", "contents": "\nReturns\u00b6\n\nPointer[A] ref^\n\n\nPublic Functions\u00b6\noffset\u00b6\n[Source]\nReturn a tag pointer to the n-th element.\nfun tag offset(\nn: USize val)\n: Pointer[A] tag\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/buffered-Writer-_5.txt", "contents": "\n\nsize\u00b6\n[Source]\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nu8\u00b6\n[Source]\nWrite a byte to the buffer.\nfun ref u8(\ndata: U8 val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-AmbientAuth-_2.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: AmbientAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Array-_14.txt", "contents": "\nReturns\u00b6\n\nU16 val ?\n\n\nread_u32[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nReads a U32 from offset. This is only allowed for an array of U8s.\nfun box read_u32[optional B: (A & Real[B] val & U8 val)](\noffset: USize val)\n: U32 val ?\n\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nU32 val ?"} +{"id": "Pony/src-files-directory-_35.txt", "contents": "let search = path' + \"\\\\*\"\nlet h = @FindFirstFileA(search.cstring(), find)\n\nif h.usize() == -1 then\nerror\nend\n\nrepeat\nlet p = @ponyint_windows_readdir(find)\n\nif not p.is_null() then\nlist.push(recover String.from_cstring(consume p) end)\nend\nuntil not @FindNextFileA(h, find) end\n\n@FindClose(h)\n@ponyint_windows_find_data_free(find)\nelse\ncompile_error \"unsupported platform\"\nend"} +{"id": "Pony/src-collections-persistent-set-_0.txt", "contents": "\n\n\n\n\n\n\nset.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-udp_socket-_29.txt", "contents": "572\n573use \"collections\"\n\nuse @pony_os_listen_udp[AsioEventID](owner: AsioEventNotify,\nhost: Pointer[U8] tag, service: Pointer[U8] tag)\nuse @pony_os_listen_udp4[AsioEventID](owner: AsioEventNotify,\nhost: Pointer[U8] tag, service: Pointer[U8] tag)\nuse @pony_os_listen_udp6[AsioEventID](owner: AsioEventNotify,\nhost: Pointer[U8] tag, service: Pointer[U8] tag)\nuse @pony_os_sendto[USize](fd: U32, buffer: Pointer[U8] tag,\nsize: USize, to: NetAddress tag) ?\nuse @pony_os_recvfrom[USize](event: AsioEventID, buffer: Pointer[U8] tag,\nsize: USize, from: NetAddress tag) ?\nuse @pony_os_multicast_join[None](fd: U32, group: Pointer[U8] tag,\nto: Pointer[U8] tag)\nuse @pony_os_multicast_leave[None](fd: U32, group: Pointer[U8] tag,\nto: Pointer[U8] tag)\nuse @pony_os_multicast_interface[None](fd: U32, from: Pointer[U8] tag)\n\nactor UDPSocket is AsioEventNotify"} +{"id": "Pony/src-net-tcp_connection-_127.txt", "contents": "2. An undefined value that must be ignored.\n\"\"\"\n_OSSocket.getsockopt_u32(_fd, level, option_name)\n\nfun ref setsockopt(level: I32, option_name: I32, option: Array[U8]): U32 =>\n\"\"\"\nGeneral wrapper for TCP sockets to the `setsockopt(2)` system call.\n\nThe caller is responsible for the correct size and byte contents of\nthe `option` array for the requested `level` and `option_name`,\nincluding using the appropriate machine endian byte order.\n\nThis function returns `0` on success, else the value of `errno` on\nfailure.\n\nUsage example:\n\n```pony\n// connected() is a callback function for class TCPConnectionNotify\nfun ref connected(conn: TCPConnection ref) =>"} +{"id": "Pony/src-collections-sort-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_check-generator-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/net-OSSockOpt-_51.txt", "contents": "fun box ipproto_satmon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_sccsp\u00b6\n[Source]\nfun box ipproto_sccsp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_sctp\u00b6\n[Source]"} +{"id": "Pony/src-serialise-serialise-_8.txt", "contents": " Serialise package\n\nThis package provides support for serialising and deserialising arbitrary data\nstructures.\n\nThe API is designed to require capability tokens, as otherwise serialising\nwould leak the bit patterns of all private information in a type if the\nresulting Array[U8] could be examined.\n\nDeserialisation is fundamentally unsafe currently: there isn't yet a\nverification pass to check that the resulting object graph maintains a\nwell-formed heap or that individual objects maintain any expected local\ninvariants. However, if only \"trusted\" data (i.e. data produced by Pony\nserialisation from the same binary) is deserialised, it will always maintain a\nwell-formed heap and all object invariants.\n\nNote that serialised data is not usable between different Pony binaries. This is\ndue to the use of type identifiers rather than a heavy-weight self-describing\nserialisation schema. This also means it isn't safe to deserialise something\nserialised by the same program compiled for a different platform."} +{"id": "Pony/src-files-file_path-_22.txt", "contents": "if not windows\nuse @_chmod[I32](path: Pointer[U8] tag, mode: U32)\nif windows\nuse @chmod[I32](path: Pointer[U8] tag, mode: U32)\nif not windows\nuse @chown[I32](path: Pointer[U8] tag, uid: U32, gid: U32)\nif not windows\nuse @utimes[I32](path: Pointer[U8] tag,\ntv: Pointer[(ILong, ILong, ILong, ILong)]) if not windows\nuse @_utime64[I32](path: Pointer[U8] tag, times: Pointer[(I64, I64)])\nif windows\nuse @LookupPrivilegeValueA[U8](system_name: Pointer[None] tag,\npriv_name: Pointer[U8] tag, luid: Pointer[U64]) if windows\nuse @GetCurrentProcess[USize]() if windows\nuse @OpenProcessToken[U8](handle: Pointer[None] tag, access: U32,\ntoken_handle: Pointer[None] tag) if windows\nuse @AdjustTokenPrivileges[U8](handle: Pointer[None], disable_privileges: U8,\nnew_state: _TokenPrivileges, buf_len: U32, prev_state: Pointer[None],\nret_len: Pointer[None]) if windows\nuse @CloseHandle[Bool](handle: Pointer[None]) if windows"} +{"id": "Pony/src-builtin-read_seq-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27interface box ReadSeq[A]\n\"\"\"\nThe readable interface of a sequence.\n\"\"\"\nfun size(): USize"} +{"id": "Pony/src-net-tcp_connection-_76.txt", "contents": "## Read\n\nIf your application is unable to keep up with data being sent to it over\na `TCPConnection` you can use the builtin read backpressure support to\npause reading the socket which will in turn start to exert backpressure on\nthe corresponding writer on the other end of that socket.\n\nThe `mute` behavior allow any other actors in your application to request\nthe cessation of additional reads until such time as `unmute` is called.\nPlease note that this cessation is not guaranteed to happen immediately as\nit is the result of an asynchronous behavior call and as such will have to\nwait for existing messages in the `TCPConnection`'s mailbox to be handled.\n\nOn non-windows platforms, your `TCPConnection` will not notice if the\nother end of the connection closes until you unmute it. Unix type systems\nlike FreeBSD, Linux and OSX learn about a closed connection upon read. On\nthese platforms, you **must** call `unmute` on a muted connection to have\nit close. Without calling `unmute` the `TCPConnection` actor will never\nexit.\n"} +{"id": "Pony/pony_check-Randomness-_2.txt", "contents": "fun ref u8(\nmin: U8 val = call,\nmax: U8 val = call)\n: U8 val\n\nParameters\u00b6\n\nmin: U8 val = call\nmax: U8 val = call\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nGenerate a U16 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/builtin-ArrayValues-_1.txt", "contents": "new ref create(\narray: B)\n: ArrayValues[A, B] ref^\n\nParameters\u00b6\n\narray: B\n\nReturns\u00b6\n\nArrayValues[A, B] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/collections-HashSet-_6.txt", "contents": "Remove a value from the set.\nfun ref unset(\nvalue: box->A!)\n: None val\n\nParameters\u00b6\n\nvalue: box->A!\n\nReturns\u00b6\n\nNone val\n\n\nextract\u00b6\n[Source]\nRemove a value from the set and return it. Raises an error if the value\nwasn't in the set.\nfun ref extract(\nvalue: box->A!)"} +{"id": "Pony/0_literals_14.txt", "contents": "## `As` Expression\n\nIt is also possible to give the literal a hint on what kind of type it should coerce the array elements to using an `as` Expression. The expression with the desired array element type needs to be added right after the opening square bracket, delimited by a colon:\n\n```pony\nlet my_as_array =\n[ as Stringable:\nU64(0xFFEF)\n\"0xFFEF\"\nU64(1 + 1)\n]\n```\n\nThis array literal is coerced to be an `Array[Stringable] ref` according to the `as` expression.\n\nIf a type is specified on the left-hand side, it needs to exactly match the type in the `as` expression.\n"} +{"id": "Pony/src-builtin-runtime_options-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/buffered-Reader-_22.txt", "contents": "\n\npeek_i8\u00b6\n[Source]\nPeek at an I8.\nfun box peek_i8(\noffset: USize val = 0)\n: I8 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI8 val ?\n\n\npeek_u16_be\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_helper-_27.txt", "contents": "\"\"\"\nLog the given message.\n\nThe verbose parameter allows messages to be printed only when the\n`--verbose` command line option is used. For example, by default assert\nfailures are logged, but passes are not. With `--verbose`, both passes and\nfails are reported.\n\nLogs are printed one test at a time to avoid interleaving log lines from\nconcurrent tests.\n\"\"\"\n_runner.log(msg, verbose)\n\nfun fail(msg: String = \"Test failed\") =>\n\"\"\"\nFlag the test as having failed.\n\"\"\"\n_fail(msg)\n\nfun assert_false("} +{"id": "Pony/src-bureaucracy-registrar-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-USize-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/debug-Debug-_0.txt", "contents": "\n\n\n\n\n\n\nDebug\u00b6\n[Source]\nThis is a debug only print utility.\nprimitive val Debug\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Debug val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_122.txt", "contents": "@pony_asio_event_unsubscribe(_event)\n_readable = false\n_writeable = false\n@pony_asio_event_set_readable(_event, false)\n@pony_asio_event_set_writeable(_event, false)\n\n// On windows, this will also cancel all outstanding IOCP operations.\n@pony_os_socket_close(_fd)\n_fd = -1\n\n_notify.closed(this)\n\ntry (_listen as TCPListener)._conn_closed() end\n\n\n// Check this when a connection gets its first writeable event.\nfun _is_sock_connected(fd: U32): Bool =>\nifdef windows then\n(let errno: U32, let value: U32) = _OSSocket.get_so_connect_time(fd)\n(errno == 0) and (value != 0xffffffff)"} +{"id": "Pony/builtin-Bool-_3.txt", "contents": "\nBool val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: Bool val)\n: Bool val\n\nParameters\u00b6\n\ny: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nop_or\u00b6"} +{"id": "Pony/src-net-ossockopt-_111.txt", "contents": "fun sctp_max_burst():I32 => @pony_os_sockopt_option(I32(662))\nfun sctp_max_cookie_life():I32 => @pony_os_sockopt_option(I32(663))\nfun sctp_max_cwnd():I32 => @pony_os_sockopt_option(I32(664))\nfun sctp_max_hb_interval():I32 => @pony_os_sockopt_option(I32(665))\nfun sctp_max_sack_delay():I32 => @pony_os_sockopt_option(I32(666))\nfun sctp_mbcnt_logging_enable():I32 => @pony_os_sockopt_option(I32(667))\nfun sctp_mbuf_logging_enable():I32 => @pony_os_sockopt_option(I32(668))\nfun sctp_mobility_base():I32 => @pony_os_sockopt_option(I32(669))\nfun sctp_mobility_fasthandoff():I32 => @pony_os_sockopt_option(I32(670))\nfun sctp_mobility_prim_deleted():I32 => @pony_os_sockopt_option(I32(671))\nfun sctp_nagle_logging_enable():I32 => @pony_os_sockopt_option(I32(672))\nfun sctp_nodelay():I32 => @pony_os_sockopt_option(I32(673))\nfun sctp_nrsack_supported():I32 => @pony_os_sockopt_option(I32(674))\nfun sctp_nr_selective_ack():I32 => @pony_os_sockopt_option(I32(675))\nfun sctp_operation_error():I32 => @pony_os_sockopt_option(I32(676))\nfun sctp_packed():I32 => @pony_os_sockopt_option(I32(677))\nfun sctp_packet_dropped():I32 => @pony_os_sockopt_option(I32(678))\nfun sctp_packet_log_size():I32 => @pony_os_sockopt_option(I32(679))\nfun sctp_packet_truncated():I32 => @pony_os_sockopt_option(I32(680))\nfun sctp_pad_chunk():I32 => @pony_os_sockopt_option(I32(681))"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_0.txt", "contents": "\n\n\n\n\n\n\nAsyncOverheadBenchmark\u00b6\n[Source]\nDefault benchmark for measuring asynchronous overhead.\nclass iso AsyncOverheadBenchmark is\nAsyncMicroBenchmark iso\n\nImplements\u00b6\n\nAsyncMicroBenchmark iso\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-collections-list_node-_15.txt", "contents": "var _list: (List[A] | None) = None\nvar _prev: (ListNode[A] | None) = None\nvar _next: (ListNode[A] | None) = None\n\nnew create(item: (A | None) = None) =>\n\"\"\"\nCreate a node. Initially, it is not in any list.\n\"\"\"\n_item = consume item\n\nfun apply(): this->A ? =>\n\"\"\"\nReturn the item, if we have one, otherwise raise an error.\n\"\"\"\n_item as this->A\n\nfun ref update(value: (A | None)): A^ ? =>\n\"\"\"\nReplace the item and return the previous one. Raise an error if we have no\nprevious value."} +{"id": "Pony/term-Readline-_12.txt", "contents": "ctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\npage_up\u00b6\n[Source]\nfun ref page_up(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val"} +{"id": "Pony/src-collections-persistent-list-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/pony_check-Property1UnitTest-_1.txt", "contents": "Generators.ascii_printable()\n\nfun property(arg1: String, h: PropertyHelper) =>\nh.assert_true(arg1.size() > 0)\n\nactor Main is TestList\nnew create(env: Env) => PonyTest(env, this)\n\nfun tag tests(test: PonyTest) =>\ntest(Property1UnitTest[String](MyProperty))\n\nclass iso Property1UnitTest[T: T] is\nUnitTest ref\n\nImplements\u00b6\n\nUnitTest ref\n\n\nConstructors\u00b6"} +{"id": "Pony/builtin-Bool-_0.txt", "contents": "\n\n\n\n\n\n\nBool\u00b6\n[Source]\nprimitive val Bool is\nStringable box\n\nImplements\u00b6\n\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/net-OSSockOpt-_504.txt", "contents": "fun box so_notifyconflict()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_no_check\u00b6\n[Source]\nfun box so_no_check()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_no_ddp\u00b6\n[Source]"} +{"id": "Pony/object-capabilities_2.txt", "contents": "# What about global variables?\n\nThey're bad! Because you can get them without either constructing them or being passed them.\n\nGlobal variables are a form of what is called _ambient authority_. Another form of ambient authority is unfettered access to the file system.\n\nPony has no global variables and no global functions. That doesn't mean all ambient authority is magically gone - we still need to be careful about the file system, for example. Having no global variables is necessary, but not sufficient, to eliminate ambient authority.\n"} +{"id": "Pony/6_errors_9.txt", "contents": "# Language constructs that can raise errors\n\nThe only language construct that can raise an error, other than the `error` command or calling a partial method, is the `as` command. This converts the given value to the specified type if it can be. If it can't then an error is raised. This means that the `as` command can only be used inside a try block or a partial method.\n"} +{"id": "Pony/signals-Sig-_4.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nemt\u00b6\n[Source]\nfun box emt()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nfpe\u00b6\n[Source]\nfun box fpe()\n: U32 val\n"} +{"id": "Pony/builtin-Iterator-_0.txt", "contents": "\n\n\n\n\n\n\nIterator[A: A]\u00b6\n[Source]\nIterators generate a series of values, one value at a time on each call to next().\nAn Iterator is considered exhausted, once its has_next() method returns false.\nThus every call to next() should be preceeded with a call to has_next() to\ncheck for exhaustiveness.\nUsage\u00b6\nGiven the rules for using Iterators mentioned above, basic usage\nof an iterator looks like this:\nwhile iterator.has_next() do\nlet elem = iterator.next()?\n// do something with elem\nend"} +{"id": "Pony/builtin-F32-_4.txt", "contents": "\na: B\n\nReturns\u00b6\n\nF32 val^\n\n\nmin_value\u00b6\n[Source]\nMinimum negative value representable.\nnew val min_value()\n: F32 val^\n\nReturns\u00b6\n\nF32 val^\n\n\nmax_value\u00b6"} +{"id": "Pony/pony_check-Property4UnitTest-_5.txt", "contents": "h: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nlabel\u00b6\nfun box label()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/net-OSSockOpt-_478.txt", "contents": "fun box so_attach_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_bindtodevice\u00b6\n[Source]\nfun box so_bindtodevice()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_bintime\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_62.txt", "contents": "\"\"\"\nReads a U8 from offset. This is only allowed for an array of U8s.\n\"\"\"\nif offset < _size then\n_ptr._offset(offset)._convert[U8]()._apply(0)\nelse\nerror\nend\n\nfun read_u16[B: (A & Real[B] val & U8) = A](offset: USize): U16 ? =>\n\"\"\"\nReads a U16 from offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u16_bytes = U16(0).bytewidth()\nif (offset + u16_bytes) <= _size then\n_ptr._offset(offset)._convert[U16]()._apply(0)\nelse\nerror\nend\n"} +{"id": "Pony/builtin-FloatingPoint-_56.txt", "contents": "I16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U16-_42.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_20.txt", "contents": "I64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/error-messages_2.txt", "contents": "x = 12\n^\n```\n\nWhat happened is that you declared `x` as a constant, by writing `let x`, and then tried to assign a new value to it, 12. To fix the error, replace `let` with `var` or reconsider what value you want `x` to have.\n\nThat one error resulted in two error messages. The first, pointing to the `x`, describes the specific problem, that `x` was defined with `let`. The second, pointing to the `=` describes a more general error, that whatever is on the left side of the assignment is not something that can be assigned to. You would get that same error message if you attempted to assign a value to a literal, like `3`.\n"} +{"id": "Pony/format-PrefixSpace-_0.txt", "contents": "\n\n\n\n\n\n\nPrefixSpace\u00b6\n[Source]\nprimitive val PrefixSpace is\nPrefixSpec val\n\nImplements\u00b6\n\nPrefixSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-collections-hashable-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-term-readline-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402use \"collections\"\nuse \"files\"\nuse \"promises\"\nuse strings = \"strings\"\n\nclass Readline is ANSINotify\n\"\"\"\nLine editing, history, and tab completion.\n\"\"\"\nlet _notify: ReadlineNotify"} +{"id": "Pony/src-net-tcp_connection-_82.txt", "contents": "\nvar _pending_sent: USize = 0\nvar _pending_writev_total: USize = 0\nvar _read_buf: Array[U8] iso\nvar _read_buf_offset: USize = 0\nvar _max_received_called: USize = 50\n\nlet _read_buffer_size: USize\n\nlet _yield_after_reading: USize\nlet _yield_after_writing: USize\n\nvar _expect: USize = 0\n\nvar _muted: Bool = false\n\nnew create(\nauth: TCPConnectAuth,\nnotify: TCPConnectionNotify iso,\nhost: String,"} +{"id": "Pony/net-OSSockOpt-_231.txt", "contents": "fun box ip_portrange_high()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_portrange_low\u00b6\n[Source]\nfun box ip_portrange_low()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvdstaddr\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_100.txt", "contents": "fun box icmp_info_reply()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_info_request\u00b6\n[Source]\nfun box icmp_info_request()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_net_ano\u00b6\n[Source]"} +{"id": "Pony/files-FileTime-_2.txt", "contents": "\nthat: FileTime val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileTime val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileTime val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_12.txt", "contents": "Assert that the 2 given expressions are not equal.\nfun box assert_ne[A: (Equatable[A] #read & Stringable #read)](\nnot_expect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nnot_expect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/collections-List-_32.txt", "contents": "acc: B\n\nReturns\u00b6\n\nB\n\n\nevery\u00b6\n[Source]\nReturns true if every element satisfies the predicate, otherwise returns false.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet all_z = my_list.every( {(s: String): Bool => s == \"z\"} ) // false\n\nfun box every(\nf: {(this->A!): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(this->A!): Bool}[A] box"} +{"id": "Pony/files-FileStream-_1.txt", "contents": "create\u00b6\n[Source]\nnew tag create(\nfile: File iso)\n: FileStream tag^\n\nParameters\u00b6\n\nfile: File iso\n\nReturns\u00b6\n\nFileStream tag^\n\n\nPublic Behaviours\u00b6\nprint\u00b6\n[Source]\nPrint some bytes and insert a newline afterwards.\nbe print("} +{"id": "Pony/src-process-_process-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/2_how-it-works_1.txt", "contents": "# Line 1\n\n```pony\nactor Main\n```\n\nThis is a __type declaration__. The keyword `actor` means we are going to define an actor, which is a bit like a class in Python, Java, C#, C++, etc. Pony has classes too, which we'll see later.\n\nThe difference between an actor and a class is that an actor can have __asynchronous__ methods, called __behaviours__. We'll talk more about that later.\n\nA Pony program has to have a `Main` actor. It's kind of like the `main` function in C or C++, or the `main` method in Java, or the `Main` method in C#. It's where the action starts.\n"} +{"id": "Pony/src-random-mt-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-random-mt-_6.txt", "contents": "Create with the specified seed. Returned values are deterministic for a\ngiven seed.\n\"\"\"\n_state = Array[U64](_n())\n_index = _n()\n\nvar seed = x xor y\n\n_state.push(seed)\nvar i: USize = 1\n\nwhile i < _n() do\nseed = ((seed xor (seed >> 62)) * 6364136223846793005) + i.u64()\n_state.push(seed)\ni = i + 1\nend\n\nfun ref next(): U64 =>\n\"\"\"\nA random integer in [0, 2^64)"} +{"id": "Pony/random-XorOshiro128StarStar-_7.txt", "contents": ": USize val\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nfun ref i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun ref i16()"} +{"id": "Pony/src-collections-persistent-list-_49.txt", "contents": "Applies the supplied function to every element of the list in order.\n\"\"\"\n_for_each(this, f)\n\nfun _for_each(l: List[A], f: {(val->A)} box) =>\n\"\"\"\nPrivate helper for for_each, recursively working on elements.\n\"\"\"\nmatch l\n| let cons: Cons[A] =>\nf(cons.head())\n_for_each(cons.tail(), f)\nend\n\nfun val filter(f: {(val->A): Bool} box): List[A] =>\n\"\"\"\nBuilds a new list with those elements that satisfy a provided predicate.\n\"\"\"\n_filter(this, f, Nil[A])\n"} +{"id": "Pony/net-OSSockOpt-_429.txt", "contents": "fun box sctp_pcb_flags_portreuse()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvassocevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_recvassocevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvdataioevnt\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_18.txt", "contents": "fun box ipproto_etherip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_fragment\u00b6\n[Source]\nfun box ipproto_fragment()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ggp\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-list-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-I128-_12.txt", "contents": "fun box mod(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: I128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/src-ini-ini-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-U64-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_15.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F64-_28.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\ntan\u00b6\n[Source]\nfun box tan()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncosh\u00b6\n[Source]\nfun box cosh()\n: F64 val\n"} +{"id": "Pony/1_variables_4.txt", "contents": "# Var vs. let\n\nLocal variables are declared with either a `var` or a `let`. Using `var` means the variable can be assigned and reassigned as many times as you like. Using `let` means the variable can only be assigned once.\n\n```pony\nvar x: U32 = 3\nlet y: U32 = 4\nx = 5 // OK\ny = 6 // Error, y is let\n```\n\nUsing `let` instead of `var` also means the variable has to be assigned immediately.\n\n```pony\nlet x: U32 = 3 // Ok\nlet y: U32 // Error, can't declare a let local without assigning to it\ny = 6 // Error, can't reassign to a let local\n```\n\nNote that a variable having been declared with `let` only restricts reassignment, and does not influence the mutability of the object it references. This is the job of reference capabilities, explained later in this tutorial."} +{"id": "Pony/src-random-xoroshiro-_0.txt", "contents": "\n\n\n\n\n\n\nxoroshiro.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-builtin-string-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-builtin-unsigned-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-ArrayKeys-_1.txt", "contents": "new ref create(\narray: B)\n: ArrayKeys[A, B] ref^\n\nParameters\u00b6\n\narray: B\n\nReturns\u00b6\n\nArrayKeys[A, B] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/net-DNS-_0.txt", "contents": "\n\n\n\n\n\n\nDNS\u00b6\n[Source]\nHelper functions for resolving DNS queries.\nprimitive val DNS\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: DNS val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-int_properties-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-udp_socket-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-net-ossockopt-_52.txt", "contents": "1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046\n1047\n1048\n1049\n1050\n1051"} +{"id": "Pony/src-builtin-float-_36.txt", "contents": "r\nend\n\nfun mod_unsafe(y: F32): F32 =>\nlet r = this %~ y\nif r == F32(0.0) then\nr.copysign(y)\nelseif (r > 0) xor (y > 0) then\nr + y\nelse\nr\nend\n\nfun finite(): Bool =>\n\"\"\"\nCheck whether this number is finite, ie not +/-infinity and not NaN.\n\"\"\"\n// True if exponent is not all 1s\n(bits() and 0x7F800000) != 0x7F800000\n"} +{"id": "Pony/src-builtin-string-_107.txt", "contents": "// by this string and could potentially cause a segfault if we cross\n// a pagemap boundary into a pagemap address that hasn't been allocated\n// yet when `reserve` is called next.\nif _alloc == 0 then\n_ptr = Pointer[U8]\nelse\n_ptr = _ptr._offset(offset)\nend\n\nfun val trim(from: USize = 0, to: USize = -1): String val =>\n\"\"\"\nReturn a shared portion of this string, covering `from` until `to`.\nBoth the original and the new string are immutable, as they share memory.\nThe operation does not allocate a new string pointer nor copy elements.\n\"\"\"\nlet last = _size.min(to)\nlet offset = last.min(from)\n\nrecover\nlet size' = last - offset"} +{"id": "Pony/src-builtin-runtime_options-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-files-file-_54.txt", "contents": "bytes_to_send = pending_total\nelse\n// We have more buffers than a single writev can handle.\n// We must iterate over the buffers being sent to add up to the total.\nnum_to_send = writev_batch_size\nbytes_to_send = 0\nvar counter: I32 = num_sent.i32()\nrepeat\nbytes_to_send = bytes_to_send + _pending_writev(counter.usize())?._2\ncounter = counter + 1\nuntil counter >= num_to_send end\nend\n\n// Write as much data as possible (vectored i/o).\n// On Windows only write 1 buffer at a time.\nvar len = ifdef windows then\n@_write(_fd, _pending_writev(num_sent)?._1,\nbytes_to_send.i32()).isize()\nelse\n@writev(_fd, _pending_writev.cpointer(num_sent),"} +{"id": "Pony/pony_check-Randomness-_10.txt", "contents": "fun ref i16(\nmin: I16 val = call,\nmax: I16 val = call)\n: I16 val\n\nParameters\u00b6\n\nmin: I16 val = call\nmax: I16 val = call\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nGenerate a I32 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/capsicum-Cap-_18.txt", "contents": "fun box fstatfs()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfutimes\u00b6\n[Source]\nfun box futimes()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfutimesat\u00b6\n[Source]"} +{"id": "Pony/builtin-RuntimeOptions-_0.txt", "contents": "\n\n\n\n\n\n\nRuntimeOptions\u00b6\n[Source]\nPony struct for the Pony runtime options C struct that can be used to\noverride the Pony runtime defaults via code compiled into the program.\nThe way this is done is by adding the following function to your Main actor:\nfun @runtime_override_defaults(rto: RuntimeOptions) =>\n\nand then overriding the fields of rto (the RuntimeOptions instance) as\nneeded.\nNOTE: Command line arguments still any values set via\n@runtime_override_defaults.\nThe following example overrides the --ponyhelp argument to default it to\ntrue instead of false causing the compiled program to always display"} +{"id": "Pony/src-builtin-signed-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/1_classes_2.txt", "contents": "## Fields\n\nThese are just like fields in C structures or fields in classes in C++, C#, Java, Python, Ruby, or basically any language, really. There are three kinds of fields: `var`, `let`, and `embed` fields. A `var` field can be assigned to over and over again, but a `let` field is assigned to in the constructor and never again. Embed fields will be covered in more detail in the documentation on [variables](/expressions/variables.md).\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U64\n```\n\nHere, a `Wombat` has a `name`, which is a `String`, and a `_hunger_level`, which is a `U64` (an unsigned 64-bit integer).\n\n__What does the leading underscore mean?__ It means something is __private__. A __private__ field can only be accessed by code in the same type. A __private__ constructor, function, or behaviour can only be accessed by code in the same package. We'll talk more about packages later.\n"} +{"id": "Pony/src-net-tcp_connection-_64.txt", "contents": "1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286use \"collections\"\n\nuse @pony_asio_event_create[AsioEventID](owner: AsioEventNotify, fd: U32,\nflags: U32, nsec: U64, noisy: Bool)\nuse @pony_asio_event_unsubscribe[None](event: AsioEventID)\nuse @pony_asio_event_destroy[None](event: AsioEventID)"} +{"id": "Pony/net-OSSockOpt-_558.txt", "contents": "fun box tcpopt_fast_open()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_maxseg\u00b6\n[Source]\nfun box tcpopt_maxseg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_multipath\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_44.txt", "contents": "this % y\n\nfun neg(): A => -this\n\nfun fld(y: A): A\n\"\"\"\nFloored integer division, rounded towards negative infinity.\n\"\"\"\nfun mod(y: A): A\n\"\"\"\nCalculate the modulo after floored integer division, rounded towards negative infinity (`fld`).\n\nThe result has the sign of the divisor.\n\"\"\"\n\nfun eq(y: box->A): Bool => this == y\nfun ne(y: box->A): Bool => this != y\nfun lt(y: box->A): Bool => this < y\nfun le(y: box->A): Bool => this <= y\nfun ge(y: box->A): Bool => this >= y"} +{"id": "Pony/src-pony_check-ascii_range-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/0_what-you-need_0.txt", "contents": "# What You Need\n\nTo get started, you'll need a text editor and the [ponyc](https://github.com/ponylang/ponyc) compiler. Or if you are on a not supported platform or don't want to install the compiler you can use the [Pony's Playground](https://playground.ponylang.io/).\n"} +{"id": "Pony/builtin--index-_1.txt", "contents": "primitive AmbientAuth\ninterface Any\nclass Array\nclass ArrayKeys\nclass ArrayPairs\nclass ArrayValues\nprimitive AsioEvent\ntype AsioEventID\ntrait AsioEventNotify\nprimitive Bool\ntype ByteSeq\ninterface ByteSeqIter\ninterface Comparable\ntype Compare\ninterface DisposableActor\nprimitive DoNotOptimise\nclass Env\nprimitive Equal\ninterface Equatable\nprimitive F32"} +{"id": "Pony/pony_check-Property1-_2.txt", "contents": "fun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nparams\u00b6\n[Source]\nReturns parameters to customize execution of this Property.\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val\n\n\ngen\u00b6"} +{"id": "Pony/builtin-ULong-_31.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F64-_59.txt", "contents": "Returns\u00b6\n\nU8 val\n\n\nu16\u00b6\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/pony_check-ASCIILettersUpper-_2.txt", "contents": "\nthat: ASCIILettersUpper val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIILettersUpper val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIILettersUpper val\n\nReturns\u00b6\n"} +{"id": "Pony/files-File-_11.txt", "contents": "Parameters\u00b6\n\ndata: ByteSeqIter box\n\nReturns\u00b6\n\nNone val\n\n\nflush\u00b6\n[Source]\nFlush any queued data\nfun ref flush()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/net-OSSockOpt-_87.txt", "contents": "fun box dso_condata()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_conreject\u00b6\n[Source]\nfun box dso_conreject()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_cork\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_153.txt", "contents": "fun box ipv6_prefer_src_public()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_pubtmp_default\u00b6\n[Source]\nfun box ipv6_prefer_src_pubtmp_default()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_tmp\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_109.txt", "contents": "fun sctp_get_addr_len():I32 => @pony_os_sockopt_option(I32(622))\nfun sctp_get_asoc_vrf():I32 => @pony_os_sockopt_option(I32(623))\nfun sctp_get_assoc_id_list():I32 => @pony_os_sockopt_option(I32(624))\nfun sctp_get_assoc_number():I32 => @pony_os_sockopt_option(I32(625))\nfun sctp_get_local_addresses():I32 => @pony_os_sockopt_option(I32(626))\nfun sctp_get_local_addr_size():I32 => @pony_os_sockopt_option(I32(627))\nfun sctp_get_nonce_values():I32 => @pony_os_sockopt_option(I32(628))\nfun sctp_get_packet_log():I32 => @pony_os_sockopt_option(I32(629))\nfun sctp_get_peer_addresses():I32 => @pony_os_sockopt_option(I32(630))\nfun sctp_get_peer_addr_info():I32 => @pony_os_sockopt_option(I32(631))\nfun sctp_get_remote_addr_size():I32 => @pony_os_sockopt_option(I32(632))\nfun sctp_get_sndbuf_use():I32 => @pony_os_sockopt_option(I32(633))\nfun sctp_get_stat_log():I32 => @pony_os_sockopt_option(I32(634))\nfun sctp_get_vrf_ids():I32 => @pony_os_sockopt_option(I32(635))\nfun sctp_had_no_tcb():I32 => @pony_os_sockopt_option(I32(636))\nfun sctp_heartbeat_ack():I32 => @pony_os_sockopt_option(I32(637))\nfun sctp_heartbeat_request():I32 => @pony_os_sockopt_option(I32(638))\nfun sctp_hmac_ident():I32 => @pony_os_sockopt_option(I32(639))\nfun sctp_idata():I32 => @pony_os_sockopt_option(I32(640))\nfun sctp_iforward_cum_tsn():I32 => @pony_os_sockopt_option(I32(641))"} +{"id": "Pony/builtin-Real-_31.txt", "contents": "U32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/recovering-capabilities_6.txt", "contents": "# Automatic receiver recovery\n\nWhen you have an `iso` or `trn` receiver, you normally can't call `ref` methods on it. That's because the receiver is also an argument to a method, which means both the method body and the caller have access to the receiver at the same time. And _that_ means we have to alias the receiver when we call a method on it. The alias of an `iso` is a `tag` (which isn't a subtype of `ref`) and the alias of a `trn` is a `box` (also not a subtype of `ref`).\n\nBut we can get around this! If all the arguments to the method (other than the receiver, which is the implicit argument being recovered) _at the call-site_ are __sendable__, and the return type of the method is either __sendable__ or isn't used _at the call-site_, then we can \"automatically recover\" the receiver. That just means we don't have to alias the receiver - and _that_ means we can call `ref` methods on an `iso` or `trn`, since `iso` and `trn` are both subtypes of `ref`.\n\nNotice that this technique looks mostly at the call-site, rather than at the definition of the method being called. That makes it more flexible. For example, if the method being called wants a `ref` argument, and we pass it an `iso` argument, that's __sendable__ at the call-site, so we can still do automatic receiver recovery.\n\nThis may sound a little complicated, but in practice, it means you can write code that treats an `iso` mostly like a `ref`, and the compiler will complain when it's wrong. For example:\n\n```pony\nlet s = recover String end\ns.append(\"hi\")\n```\n\nHere, we create a `String iso` and then append some text to it. The append method takes a `ref` receiver and a `box` parameter. We can automatically recover the `iso` receiver since we pass a `val` parameter, so everything is fine.\n"} +{"id": "Pony/net-OSSockOpt-_42.txt", "contents": "fun box ipproto_old_divert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ospfigp\u00b6\n[Source]\nfun box ipproto_ospfigp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pfsync\u00b6\n[Source]"} +{"id": "Pony/0_literals_4.txt", "contents": "# Character Literals\n\nCharacter literals are enclosed with single quotes (`'`).\n\nCharacter literals, unlike String literals, encode to a single numeric value. Usually this is a single byte, a `U8`. But they can be coerced to any integer type:\n\n```pony\nlet big_a: U8 = 'A' // 65\nlet hex_escaped_big_a: U8 = '\\x41' // 65\nlet newline: U32 = '\\n' // 10\n```\n\nThe following escape sequences are supported:\n\n* `\\x4F` hex escape sequence with 2 hex digits (up to `0xFF`)\n* `\\a`, `\\b`, `\\e`, `\\f`, `\\n`, `\\r`, `\\t`, `\\v`, `\\\\`, `\\0`, `\\'`\n"} +{"id": "Pony/collections-persistent-Cons-_2.txt", "contents": "fun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nReturns the i-th element of the list. Errors if the index is out of bounds.\nfun box apply(\ni: USize val)\n: val->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U8-_11.txt", "contents": "fun box addc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-ArrayValues-_0.txt", "contents": "\n\n\n\n\n\n\nArrayValues[A: A, B: Array[A] #read]\u00b6\n[Source]\nclass ref ArrayValues[A: A, B: Array[A] #read] is\nIterator[B->A] ref\n\nImplements\u00b6\n\nIterator[B->A] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_8.txt", "contents": "\nReturns\u00b6\n\nU8 val\n\n\nprecision10\u00b6\n[Source]\nMantissa precision in decimal digits.\nfun tag precision10()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmin_exp2\u00b6\n[Source]\nMinimum exponent value such that (2^exponent) - 1 is representable at full"} +{"id": "Pony/collections-RingBuffer-_1.txt", "contents": "\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nRingBuffer[A] ref^\n\n\nPublic Functions\u00b6\nhead\u00b6\n[Source]\nThe first read that will succeed. If nothing has been written to the ring,\nthis will raise an error.\nfun box head()\n: USize val ?\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Array-_30.txt", "contents": "Both input arrays are isolated and mutable and were originally chopped from\na single array. This function checks that they are indeed two arrays chopped\nfrom the same original array and can be unchopped before doing the\nunchopping and returning the unchopped array. If the two arrays cannot be\nunchopped it returns both arrays without modifying them.\nThe operation does not allocate a new array pointer nor copy elements.\nfun iso unchop(\nb: Array[A] iso)\n: ((Array[A] iso^ , Array[A] iso^) | Array[A] iso^)\n\nParameters\u00b6\n\nb: Array[A] iso\n\nReturns\u00b6\n\n((Array[A] iso^ , Array[A] iso^) | Array[A] iso^)\n\n\ncopy_from[optional B: (A & Real[B] val & U8 val)]\u00b6"} +{"id": "Pony/builtin-U32-_46.txt", "contents": "fun box ge(\ny: U32 val)\n: Bool val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: U32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-serialise-serialise-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-net-tcp_connection-_69.txt", "contents": "# Backpressure support\n"} +{"id": "Pony/builtin-UnsignedInteger-_4.txt", "contents": "\nA\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nshr\u00b6"} +{"id": "Pony/pony_check-ASCIILettersLower-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIILettersLower val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_54.txt", "contents": "\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/whitespace_5.txt", "contents": "\nnew create(env: Env) =>\n\"\"\"\nThis is documentation for my create method\n\"\"\"\nNone\n\ntrait Readable\nfun val read()\n\"\"\"\nThis is documentation for my unimplemented read method\n\"\"\"\n```\n"} +{"id": "Pony/process-PipeError-_0.txt", "contents": "\n\n\n\n\n\n\nPipeError\u00b6\n[Source]\nprimitive val PipeError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: PipeError val^\n\nReturns\u00b6\n\nPipeError val^"} +{"id": "Pony/src-net-ossockopt-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/builtin-ULong-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_10.txt", "contents": "var _destination_service: (None | String) = None\nlet _wrapped: TCPConnectionNotify iso\n\nnew iso create(wrap: TCPConnectionNotify iso, proxy_host: String, proxy_service: String) =>\n_wrapped = wrap\n_proxy_host = proxy_host\n_proxy_service = proxy_service\n\nfun ref proxy_via(host: String, service: String): (String, String) =>\n// Stash the original host & service; return the host & service\n// for the proxy; indicating that the initial TCP connection should\n// be made to the proxy\n_destination_host = host\n_destination_service = service\n(_proxy_host, _proxy_service)\n\nfun ref connected(conn: TCPConnection ref) =>\n// conn is the connection to the *proxy* server. We need to ask the\n// proxy server to forward this connection to our intended final\n// destination."} +{"id": "Pony/promises-Promise-_5.txt", "contents": "GitHub(\"my token\").get_repo(\"ponylang/ponyc\")\n\n//\n// do something with the repo once the promise is fulfilled\n// in our case, get the issue\n//\n\nlet issue = Promise[Promise[Issue]] =\nrepo.next[Promise[Issue]](FetchIssue~apply(1))\n\n// once we get the issue, print the title\nissue.next[None](PrintIssueTitle~apply(env.out))\n\nprimitive FetchIssue\nfun apply(number: I64, repo: Repository): Promise[Issue] =>\nrepo.get_issue(number)\n\nprimitive PrintIssueTitle\nfun apply(out: OutStream, issue: Promise[Issue]) =>\n// O NO! We can't print the title"} +{"id": "Pony/src-cli-command_spec-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-array-_65.txt", "contents": "error\nend\n\nfun ref update_u8[B: (A & Real[B] val & U8) = A](offset: USize, value: U8): U8 ? =>\n\"\"\"\nWrite a U8 at offset. This is only allowed for an array of U8s.\n\"\"\"\nif offset < _size then\n_ptr._offset(offset)._convert[U8]()._update(0, value)\nelse\nerror\nend\n\nfun ref update_u16[B: (A & Real[B] val & U8) = A](offset: USize, value: U16): U16 ? =>\n\"\"\"\nWrite a U16 at offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u16_bytes = U16(0).bytewidth()\nif (offset + u16_bytes) <= _size then\n_ptr._offset(offset)._convert[U16]()._update(0, value)"} +{"id": "Pony/promises-Promise-_3.txt", "contents": ": Promise[B] tag\n\nParameters\u00b6\n\nfulfill: Fulfill[A, B] iso\nrejected: Reject[B] iso = qualify\n\nReturns\u00b6\n\nPromise[B] tag\n\n\nflatten_next[B: Any #share]\u00b6\n[Source]\nChain a promise after this one and unwrap the promise returned from this\none.\nflatten_next is a companion to next. It operates in an identical\nfashion except for the type of the fulfilled promise. Whereas next takes\na function that returns a type B, flatten_next takes a function that\nreturns Promise[B]."} +{"id": "Pony/src-pony_check-pony_check-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-float-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-SignedInteger-_11.txt", "contents": "USize val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-randomness-_23.txt", "contents": "Behavior is undefined if `min` > `max`.\n\"\"\"\nmin + usize(0, (max - min).usize()).isize()\n\n\nfun ref f32(min: F32 = 0.0, max: F32 = 1.0): F32 =>\n\"\"\"\nGenerate a F32 in closed interval [min, max]\n(default: [0.0, 1.0]).\n\"\"\"\n(_random.real().f32() * (max-min)) + min\n\n\nfun ref f64(min: F64 = 0.0, max: F64 = 1.0): F64 =>\n\"\"\"\nGenerate a F64 in closed interval [min, max]\n(default: [0.0, 1.0]).\n\"\"\"\n(_random.real() * (max-min)) + min\n"} +{"id": "Pony/collections-ListNode-_9.txt", "contents": "fun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nprev\u00b6\n[Source]\nReturn the previous node.\nfun box prev()\n: (this->ListNode[A] ref | None val)\n\nReturns\u00b6\n\n(this->ListNode[A] ref | None val)\n\n\nnext\u00b6"} +{"id": "Pony/pony_check-ForAll-_2.txt", "contents": "\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Array-_11.txt", "contents": "compact\u00b6\n[Source]\nTry to remove unused space, making it available for garbage collection. The\nrequest may be ignored.\nfun ref compact()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nundefined[optional B: (A & Real[B] val & (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val))]\u00b6\n[Source]\nResize to len elements, populating previously empty elements with random\nmemory. This is only allowed for an array of numbers.\nfun ref undefined[optional B: (A & Real[B] val & (I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |"} +{"id": "Pony/files-FileMode-_0.txt", "contents": "\n\n\n\n\n\n\nFileMode\u00b6\n[Source]\nThis stores a UNIX-style mode broken out into a Bool for each bit. For other\noperating systems, the mapping will be approximate. For example, on Windows,\nif the file is readable all the read Bools will be set, and if the file is\nwriteable, all the write Bools will be set.\nThe default mode is read/write for the owner, read-only for everyone else.\nclass ref FileMode\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()"} +{"id": "Pony/builtin-Env-_1.txt", "contents": "out': OutStream tag,\nerr': OutStream tag,\nargs': Array[String val] val,\nvars': Array[String val] val,\nexitcode': {(I32)} val)\n: Env val^\n\nParameters\u00b6\n\nroot': AmbientAuth val\ninput': InputStream tag\nout': OutStream tag\nerr': OutStream tag\nargs': Array[String val] val\nvars': Array[String val] val\nexitcode': {(I32)} val\n\nReturns\u00b6\n\nEnv val^"} +{"id": "Pony/src-collections-persistent-set-_11.txt", "contents": "let iter =\nmatch that\n| let s: HashSet[A, H] => s.values()\n| let i: Iterator[A] => i\nend\nvar s' = this\nfor v in iter do\ns' = s' + v\nend\ns'\n\nfun val op_and(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>\n\"\"\"\nReturn a set with the elements that are in both this and that.\n\"\"\"\nlet iter =\nmatch that\n| let s: HashSet[A, H] => s.values()\n| let i: Iterator[A] => i\nend"} +{"id": "Pony/builtin-U16-_25.txt", "contents": "(U16 val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\nmod_unsafe\u00b6\n[Source]"} +{"id": "Pony/backpressure--index-_0.txt", "contents": "\n\n\n\n\n\n\nBackpressure Package\u00b6\nThe Backpressure package allows Pony programmers to participate in Pony's\nruntime backpressure system. The goal of the backpressure system is to prevent\nan actor's mailbox from growing at an unbounded rate.\nAt a high level, the runtime backpressure system works by adjusting the\nscheduling of actors. When an actor becomes overloaded, the Pony runtime will\ndeprioritize scheduling the actors that are sending to it. This change in\nscheduling allows the overloaded actor to catch up.\nThe Pony runtime can detect overloading based on message queue size. However,\nthe overloading of some types of actors is harder to detect. Let's take the\ncase of actors like TCPConnection.\nTCPConnection manages a socket for sending data to and receiving data from\nanother process. TCP connections can experience backpressure from outside"} +{"id": "Pony/builtin-UnsignedInteger-_35.txt", "contents": "\nA\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: A\n\nReturns\u00b6\n\nA\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: A\n\nReturns\u00b6"} +{"id": "Pony/src-files-file_lines-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-ossockopt-_127.txt", "contents": "fun tcp_ccalgoopt():I32 => @pony_os_sockopt_option(I32(982))\nfun tcp_cc_info():I32 => @pony_os_sockopt_option(I32(983))\nfun tcp_congestion():I32 => @pony_os_sockopt_option(I32(984))\nfun tcp_connectiontimeout():I32 => @pony_os_sockopt_option(I32(985))\nfun tcp_connection_info():I32 => @pony_os_sockopt_option(I32(986))\nfun tcp_cookie_in_always():I32 => @pony_os_sockopt_option(I32(987))\nfun tcp_cookie_max():I32 => @pony_os_sockopt_option(I32(988))\nfun tcp_cookie_min():I32 => @pony_os_sockopt_option(I32(989))\nfun tcp_cookie_out_never():I32 => @pony_os_sockopt_option(I32(990))\nfun tcp_cookie_pair_size():I32 => @pony_os_sockopt_option(I32(991))\nfun tcp_cookie_transactions():I32 => @pony_os_sockopt_option(I32(992))\nfun tcp_cork():I32 => @pony_os_sockopt_option(I32(993))\nfun tcp_defer_accept():I32 => @pony_os_sockopt_option(I32(994))\nfun tcp_enable_ecn():I32 => @pony_os_sockopt_option(I32(995))\nfun tcp_fastopen():I32 => @pony_os_sockopt_option(I32(996))\nfun tcp_function_blk():I32 => @pony_os_sockopt_option(I32(997))\nfun tcp_function_name_len_max():I32 => @pony_os_sockopt_option(I32(998))\nfun tcp_info():I32 => @pony_os_sockopt_option(I32(999))\nfun tcp_keepalive():I32 => @pony_os_sockopt_option(I32(1000))\nfun tcp_keepcnt():I32 => @pony_os_sockopt_option(I32(1001))"} +{"id": "Pony/src-builtin-array-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/encode-base64-Base64-_3.txt", "contents": "pad: Bool val = false)\n: A^\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\npad: Bool val = false\n\nReturns\u00b6\n\nA^\n\n\nencode[optional A: Seq[U8 val] iso]\u00b6\n[Source]\nConfigurable encoding. The defaults are for RFC 4648.\nfun box encode[optional A: Seq[U8 val] iso](\ndata: ReadSeq[U8 val] box,\nat62: U8 val = 43,\nat63: U8 val = 47,"} +{"id": "Pony/files-FileWrite-_0.txt", "contents": "\n\n\n\n\n\n\nFileWrite\u00b6\n[Source]\nprimitive val FileWrite\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileWrite val^\n\nReturns\u00b6\n\nFileWrite val^"} +{"id": "Pony/src-time-timers-_15.txt", "contents": "end\nend\n\n_pending.clear()\n\nvar nsec = _next()\n\nif _event.is_null() then\nif nsec != -1 then\n// Create a new event.\n_event =\n@pony_asio_event_create(this, 0, AsioEvent.timer(), nsec, true)\nend\nelse\nif nsec != -1 then\n// Update an existing event.\n@pony_asio_event_setnsec(_event, nsec)\nelse\n// Unsubscribe an existing event.\n@pony_asio_event_unsubscribe(_event)"} +{"id": "Pony/collections-MapKeys-_0.txt", "contents": "\n\n\n\n\n\n\nMapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read]\u00b6\n[Source]\nAn iterator over the keys in a map.\nclass ref MapKeys[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[M->K] ref\n\nImplements\u00b6\n\nIterator[M->K] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/5_methods_16.txt", "contents": "# Anonymous methods\n\nPony has anonymous methods (or Lambdas). They look like this:\n\n```pony\nuse \"collections\"\n\nactor Main\nnew create(env: Env) =>\nlet list_of_numbers = List[U32].from([1; 2; 3; 4])\nlet is_odd = {(n: U32): Bool => (n % 2) == 1}\nfor odd_number in list_of_numbers.filter(is_odd).values() do\nenv.out.print(odd_number.string())\nend\n```\n\nThey are presented more in-depth in the [Object Literals section](/expressions/object-literals.md).\n"} +{"id": "Pony/src-builtin-stdin-_12.txt", "contents": "actor Stdin is AsioEventNotify\n\"\"\"\nAsynchronous access to stdin. The constructor is private to ensure that\naccess is provided only via an environment.\n\nReading from stdin is done by registering an `InputNotify`:\n\n```pony\nactor Main\nnew create(env: Env) =>\n// do not forget to call `env.input.dispose` at some point\nenv.input(\nobject iso is InputNotify\nfun ref apply(data: Array[U8] iso) =>\nenv.out.write(String.from_iso_array(consume data))\n\nfun ref dispose() =>\nenv.out.print(\"Done.\")\nend,\n512)"} +{"id": "Pony/src-backpressure-backpressure-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_601.txt", "contents": "fun box tipc_dest_droppable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_errinfo\u00b6\n[Source]\nfun box tipc_errinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_err_no_name\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property-_11.txt", "contents": "* async: if true the property is expected to finish asynchronously by calling\n`PropertyHelper.complete(...)`\n\"\"\"\nlet seed: U64\nlet num_samples: USize\nlet max_shrink_rounds: USize\nlet max_generator_retries: USize\nlet timeout: U64\nlet async: Bool\n\nnew val create(\nnum_samples': USize = 100,\nseed': U64 = Time.millis(),\nmax_shrink_rounds': USize = 10,\nmax_generator_retries': USize = 5,\ntimeout': U64 = 60_000_000_000,\nasync': Bool = false)\n=>\nnum_samples = num_samples'\nseed = seed'"} +{"id": "Pony/net-OSSockOpt-_40.txt", "contents": "fun box ipproto_nhrp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_none\u00b6\n[Source]\nfun box ipproto_none()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_nsp\u00b6\n[Source]"} +{"id": "Pony/builtin-HasEq-_0.txt", "contents": "\n\n\n\n\n\n\nHasEq[A: A]\u00b6\n[Source]\ninterface ref HasEq[A: A]\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_277.txt", "contents": "fun box netlink_inet_diag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_ip6_fw\u00b6\n[Source]\nfun box netlink_ip6_fw()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_iscsi\u00b6\n[Source]"} +{"id": "Pony/1_variables_6.txt", "contents": "# Fields\n\nIn Pony, fields are variables that live within objects. They work like fields in other object-oriented languages.\n\nFields have the same lifetime as the object they're in, rather than being scoped. They are set up by the object constructor and disposed of along with the object.\n\nIf the name of a field starts with `_`, it's __private__. That means only the type the field is in can have code that reads or writes that field. Otherwise, the field is __public__ and can be read or written from anywhere.\n\nJust like local variables, fields can be `var` or `let`. Nevertheless, rules for field assignment differ a bit from variable assignment. No matter the type of the field (either `var` or `let`), either:\n\n1. an initial value has to be assigned in their definition or\n2. an initial value has to be assigned in the constructor method.\n\nIn the example below, the initial value of the two fields of the class `Wombat` is assigned at the definition level:\n\n```pony\nclass Wombat\nlet name: String = \"Fantastibat\"\nvar _hunger_level: U32 = 0\n```"} +{"id": "Pony/term-ANSI-_0.txt", "contents": "\n\n\n\n\n\n\nANSI\u00b6\n[Source]\nThese strings can be embedded in text when writing to a StdStream to create\na text-based UI.\nprimitive val ANSI\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ANSI val^\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_286.txt", "contents": "fun box netlink_usersock()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_xfrm\u00b6\n[Source]\nfun box netlink_xfrm()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_idle\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_47.txt", "contents": "\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/src-time-timers-_17.txt", "contents": "\nfun _next(): U64 =>\n\"\"\"\nReturn the next time at which the timing wheels should be advanced. This is\nadjusted for slop, so it yields nanoseconds. If no events are pending, this\nreturns -1.\n\"\"\"\nvar next: U64 = -1\n\ntry\nfor i in Range(0, _wheels()) do\nnext = next.min(_wheel(i)?.next(_current))\nend\nend\n\nif next != -1 then\nnext = next << _slop.u64()\nend\n\nnext"} +{"id": "Pony/net-OSSockOpt-_116.txt", "contents": "fun box ipctl_intrqmaxlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_keepfaith\u00b6\n[Source]\nfun box ipctl_keepfaith()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_maxid\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_68.txt", "contents": "recover MyTCPConnectionNotify(env.out) end, \"\", \"8989\")\n```\n\nNote: when writing to the connection data will be silently discarded if the\nconnection has not yet been established.\n"} +{"id": "Pony/net-NetAddress-_7.txt", "contents": "\nport\u00b6\n[Source]\nReturns port number in host byte order.\nfun box port()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nscope\u00b6\n[Source]\nReturns IPv6 scope identifier: Unicast, Anycast, Multicast and\nunassigned scopes.\nfun box scope()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ArrayValues-_3.txt", "contents": "\nArrayValues[A, B] ref\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-Range-_4.txt", "contents": "\nParameters\u00b6\n\nmin: A\nmax: A\ninc: A = 1\n\nReturns\u00b6\n\nRange[A] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-posix_date-_4.txt", "contents": "var hour: I32 = 0\nvar day_of_month: I32 = 1\nvar month: I32 = 1\nvar year: I32 = 1970\nvar day_of_week: I32 = 4\nvar day_of_year: I32 = 1\n\nnew create(seconds: I64 = 0, nanoseconds: I64 = 0) =>\n\"\"\"\nCreate a date from a POSIX time. Negative arguments will be changed to zero.\n\"\"\"\n@ponyint_gmtime(this,\n_negative_to_zero(seconds),\n_negative_to_zero(nanoseconds))\n\nfun time(): I64 =>\n\"\"\"\nReturn a POSIX time. Treats the date as UTC.\n\"\"\"\n@ponyint_timegm(this)"} +{"id": "Pony/src-net-net_address-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-time-timer-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-pony_check-generator-_117.txt", "contents": "\"\"\"\nGenerator[Bool](\nobject is GenObj[Bool]\nfun generate(rnd: Randomness): Bool =>\nrnd.bool()\nend)\n\nfun _int_shrink[T: (Int & Integer[T] val)](t: T^, min: T): ValueAndShrink[T] =>\n\"\"\"\n\"\"\"\nlet relation = t.compare(min)\nlet t_copy: T = T.create(t)\n//Debug(t.string() + \" is \" + relation.string() + \" than min \" + min.string())\nlet sub_iter =\nobject is Iterator[T^]\nvar _cur: T = t_copy\nvar _subtract: F64 = 1.0\nvar _overflow: Bool = false\n\nfun ref _next_minuend(): T =>"} +{"id": "Pony/builtin-Array-_31.txt", "contents": "[Source]\nCopy len elements from src(src_idx) to this(dst_idx).\nOnly works for Array[U8].\nfun ref copy_from[optional B: (A & Real[B] val & U8 val)](\nsrc: Array[U8 val] box,\nsrc_idx: USize val,\ndst_idx: USize val,\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nsrc: Array[U8 val] box\nsrc_idx: USize val\ndst_idx: USize val\nlen: USize val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-files-file-_65.txt", "contents": "_pending_writev.clear()\nend\n\nfun ref _seek(offset: I64, base: I32) =>\n\"\"\"\nMove the cursor position.\n\"\"\"\nif _fd != -1 then\nlet r = ifdef windows then\n@_lseeki64(_fd, offset, base)\nelse\nifdef linux then\n@lseek64(_fd, offset, base)\nelse\n@lseek(_fd, offset, base)\nend\nend\nif r < 0 then\n_errno = _get_error()\nend"} +{"id": "Pony/src-collections-map-_35.txt", "contents": "return the provided alternate value.\n\"\"\"\n(let i, let found) = _search(key)\n\nif found then\ntry\n_array(i)? as (_, this->V)\nelse\n// This should never happen as we have already\n// proven that _array(i) exists\nconsume alt\nend\nelse\nconsume alt\nend\n\nfun contains(k: box->K!): Bool =>\n\"\"\"\nChecks whether the map contains the key k\n\"\"\""} +{"id": "Pony/src-builtin-real-_51.txt", "contents": "If the operation overflows/underflows this function errors.\n\"\"\"\n\nfun mul_partial(y: A): A ?\n\"\"\"\nMultiply y with this number.\n\nIf the operation overflows this function errors.\n\"\"\"\n\nfun div_partial(y: A): A ?\n\"\"\"\nDivides this number by `y`, rounds the result towards zero.\n\nIf y is `0` or the operation overflows, this function errors.\n\"\"\"\n\nfun rem_partial(y: A): A ?\n\"\"\"\nCalculates the remainder of this number divided by y."} +{"id": "Pony/builtin-Real-_13.txt", "contents": "[Source]\nfun box le(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: box->A)\n: Bool val\n"} +{"id": "Pony/src-process-_process-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-HashEq64-_2.txt", "contents": "Returns\u00b6\n\nU64 val\n\n\neq\u00b6\n[Source]\nUse the structural equality function from the type parameter.\nfun box eq(\nx: box->A,\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\nx: box->A\ny: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-UnsignedInteger-_59.txt", "contents": "\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-net-ossockopt-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/src-net-udp_socket-_40.txt", "contents": "end\n\nbe multicast_join(group: String, to: String = \"\") =>\n\"\"\"\nAdd a multicast group. This can be limited to packets arriving on a\nspecific interface.\n\"\"\"\nif not _closed then\n@pony_os_multicast_join(_fd, group.cstring(), to.cstring())\nend\n\nbe multicast_leave(group: String, to: String = \"\") =>\n\"\"\"\nDrop a multicast group. This can be limited to packets arriving on a\nspecific interface. No attempt is made to check that this socket has\npreviously added this group.\n\"\"\"\nif not _closed then\n@pony_os_multicast_leave(_fd, group.cstring(), to.cstring())\nend"} +{"id": "Pony/net-OSSockOpt-_511.txt", "contents": "fun box so_peerlabel()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_peername\u00b6\n[Source]\nfun box so_peername()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_peersec\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_46.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/files-Path-_16.txt", "contents": "c: U8 val)\n: Bool val\n\nParameters\u00b6\n\nc: U8 val\n\nReturns\u00b6\n\nBool val\n\n\nlist_sep\u00b6\n[Source]\nReturn the path list separator as a string.\nfun box list_sep()\n: String val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F64-_42.txt", "contents": "F64 val\n\n\nneg_unsafe\u00b6\nfun box neg_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\neq_unsafe\u00b6\nfun box eq_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val"} +{"id": "Pony/builtin-U16-_7.txt", "contents": "\nU16 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/src-time-time-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/strings--index-_0.txt", "contents": "\n\n\n\n\n\n\nStrings package\u00b6\nThe Strings package provides utilities for working with sequences of strings.\nPublic Types\u00b6\n\nprimitive CommonPrefix\n\n\n\n\n\n\n\n"} +{"id": "Pony/buffered-Writer-_3.txt", "contents": ": Writer iso^\n\nReturns\u00b6\n\nWriter iso^\n\n\nPublic Functions\u00b6\nreserve_chunks\u00b6\n[Source]\nReserve space for size' chunks.\nThis needs to be recalled after every call to done\nas done resets the chunks.\nfun ref reserve_chunks(\nsize': USize val)\n: None val\n\nParameters\u00b6\n\nsize': USize val"} +{"id": "Pony/src-net-udp_socket-_33.txt", "contents": "None\n\nactor Main\nnew create(env: Env) =>\ntry\nlet destination =\nDNS.ip4(DNSAuth(env.root), \"localhost\", \"8989\")(0)?\nUDPSocket(UDPAuth(env.root),\nrecover MyUDPNotify(env.out, consume destination) end)\nend\n```\n\"\"\"\nvar _notify: UDPNotify\nvar _fd: U32\nvar _event: AsioEventID\nvar _readable: Bool = false\nvar _closed: Bool = false\nvar _packet_size: USize\nvar _read_buf: Array[U8] iso\nvar _read_from: NetAddress iso = NetAddress"} +{"id": "Pony/src-net-udp_socket-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/net-OSSockOpt-_48.txt", "contents": "fun box ipproto_reserved_253()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_reserved_254\u00b6\n[Source]\nfun box ipproto_reserved_254()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_routing\u00b6\n[Source]"} +{"id": "Pony/builtin-Pointer-_2.txt", "contents": "Pointer[A] tag\n\n\nusize\u00b6\n[Source]\nConvert the pointer into an integer.\nfun tag usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nis_null\u00b6\n[Source]\nReturn true for a null pointer, false for anything else.\nfun tag is_null()\n: Bool val\n"} +{"id": "Pony/collections-persistent-Nil-_13.txt", "contents": "fun box exists(\nf: {(val->A): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nBool val\n\n\npartition\u00b6\n[Source]\nThe only partition of the empty list is two empty lists.\nfun box partition(\nf: {(val->A): Bool}[A] box)\n: (Nil[A] val , Nil[A] val)\n"} +{"id": "Pony/src-files-file_mode-_6.txt", "contents": "This stores a UNIX-style mode broken out into a Bool for each bit. For other\noperating systems, the mapping will be approximate. For example, on Windows,\nif the file is readable all the read Bools will be set, and if the file is\nwriteable, all the write Bools will be set.\n\nThe default mode is read/write for the owner, read-only for everyone else.\n\"\"\"\nvar setuid: Bool = false\n\"\"\"`true` if the SETUID bit is set.\"\"\"\n\nvar setgid: Bool = false\n\"\"\"`true` if the SETGID bit is set.\"\"\"\n\nvar sticky: Bool = false\n\"\"\"`true` if the sticky bit is set.\"\"\"\n\nvar owner_read: Bool = true\n\"\"\"`true` if the owning user can read the file.\"\"\"\n\nvar owner_write: Bool = true"} +{"id": "Pony/src-itertools-iter-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/src-random-xoroshiro-_6.txt", "contents": "\"\"\"\nlet x = _x\nvar y = _y\nlet r = x + y\n\ny = x xor y\n_x = x.rotl(24) xor y xor (y << 16)\n_y = y.rotl(37)\nr\n\nclass XorOshiro128StarStar is Random\n\"\"\"\nThis is an implementation of xoroshiro128**, as detailed at:\n\nhttp://xoshiro.di.unimi.it/\n\nThis Rand implementation is slightly slower than [XorOshiro128Plus](random-XorOshiro128Plus.md)\nbut does not exhibit \"mild dependencies in Hamming weights\" (the lower four bits might fail linearity tests).\n\"\"\"\n"} +{"id": "Pony/builtin-U8-_38.txt", "contents": "fun box add(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/itertools-Iter-_9.txt", "contents": "\nReturns\u00b6\n\nIter[B] ref^\n\n\nall\u00b6\n[Source]\nReturn false if at least one value of the iterator fails to match the\npredicate f. This method short-circuits at the first value where the\npredicate returns false, otherwise true is returned.\nExamples\u00b6\nIter[I64]([2; 4; 6].values())\n.all({(x) => (x % 2) == 0 })\n\ntrue\nIter[I64]([2; 3; 4].values())\n.all({(x) => (x % 2) == 0 })\n\nfalse"} +{"id": "Pony/src-collections-persistent-set-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158use mut = \"collections\"\n\ntype Set[A: (mut.Hashable val & Equatable[A])] is HashSet[A, mut.HashEq[A]]\n\ntype SetIs[A: Any #share] is HashSet[A, mut.HashIs[A]]\n\nclass val HashSet[A: Any #share, H: mut.HashFunction[A] val]\nis Comparable[HashSet[A, H] box]\n\"\"\"\nA set, built on top of persistent Map. This is implemented as map of an\nalias of a type to itself.\n\"\"\"\nlet _map: HashMap[A, A, H]\n"} +{"id": "Pony/src-builtin-nullable_pointer-_2.txt", "contents": "32\n33\n34\n35struct NullablePointer[A]\n\"\"\"\nA NullablePointer[A] is used to encode a possibly-null type. It should\n_only_ be used for structs that need to be passed to and from the C FFI.\n\nAn optional type for anything that isn't a struct should be encoded as a\nunion type, for example (A | None).\n\"\"\"\nnew create(that: A) =>\n\"\"\"\nThis re-encodes the type of `that` from A to NullablePointer[A], allowing\n`that` to be assigned to a field or variable of type NullablePointer[A]. It\ndoesn't allocate a wrapper object: there is no containing object for `that`.\n\"\"\"\ncompile_intrinsic\n\nnew none() =>"} +{"id": "Pony/src-math-is_prime-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102primitive IsPrime[A: (UnsignedInteger[A] val & Unsigned)]\n\"\"\"\nPrimality test using 6k \u00b1 1 method.\n\nAll integers (excluding 2 and 3), can be expressed as (6k + i),\nwhere i = \u22121, 0, 1, 2, 3, or 4. Since 2 divides (6k + 0), (6k + 2),\nand (6k + 4), while 3 divides (6k + 3) that leaves only (6k - 1) and (6k + 1)\nfor expressing primes.\n\"\"\"\n"} +{"id": "Pony/src-math-is_prime-_6.txt", "contents": "// Using a match table like below provides information to LLVM\n// to allocate static globals rather than stack or heap allocation.\nfun _low_prime_table(index: USize): A val =>\nmatch index\n| 0 => 2 | 1 => 3 | 2 => 5 | 3 => 7 | 4 => 11\n| 5 => 13 | 6 => 17 | 7 => 19 | 8 => 23 | 9 => 29\n| 10 => 31 | 11 => 37 | 12 => 41 | 13 => 43 | 14 => 47\n| 15 => 53 | 16 => 59 | 17 => 61 | 18 => 67 | 19 => 71\n| 20 => 73 | 21 => 79 | 22 => 83 | 23 => 89 | 24 => 97\n| 25 => 101 | 26 => 103 | 27 => 107 | 28 => 109 | 29 => 113\n| 30 => 127 | 31 => 131 | 32 => 137 | 33 => 139 | 34 => 149\n| 35 => 151 | 36 => 157 | 37 => 163 | 38 => 167 | 39 => 173\n| 40 => 179 | 41 => 181 | 42 => 191 | 43 => 193 | 44 => 197\n| 45 => 199 | 46 => 211 | 47 => 223 | 48 => 227 | 49 => 229\n| 50 => 233 | 51 => 239 | 52 => 241 | 53 => 251 | 54 => 257\n| 55 => 263 | 56 => 269 | 57 => 271 | 58 => 277 | 59 => 281\n| 60 => 283 | 61 => 293 | 62 => 307 | 63 => 311 | 64 => 313\n| 65 => 317 | 66 => 331 | 67 => 337 | 68 => 347 | 69 => 349\n| 70 => 353 | 71 => 359 | 72 => 367 | 73 => 373 | 74 => 379\n| 75 => 383 | 76 => 389 | 77 => 397 | 78 => 401 | 79 => 409"} +{"id": "Pony/src-builtin-unsigned-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/collections-persistent-MapValues-_2.txt", "contents": "fun ref next()\n: val->V ?\n\nReturns\u00b6\n\nval->V ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_68.txt", "contents": "end\n\nfun mulc(y: ULong): (ULong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.umul.with.overflow.i32\"(this.u32(), y.u32())\n(r.ulong(), o)\nelse\n(let r, let o) =\n@\"llvm.umul.with.overflow.i64\"(this.u64(), y.u64())\n(r.ulong(), o)\nend\n\nfun divc(y: ULong): (ULong, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[ULong](this, y)\n\nfun remc(y: ULong): (ULong, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[ULong](this, y)\n\nfun add_partial(y: ULong): ULong ? =>"} +{"id": "Pony/src-files-file-_36.txt", "contents": "type FileErrNo is\n( FileOK\n| FileError\n| FileEOF\n| FileBadFileNumber\n| FileExists\n| FilePermissionDenied\n)\n\nprimitive CreateFile\n\"\"\"\nOpen a File for read/write, creating if it doesn't exist, preserving the\ncontents if it does exist.\n\"\"\"\nfun apply(from: FilePath): (File | FileErrNo) =>\nlet file = File(from)\nlet err = file.errno()\n\nmatch err\n| FileOK => file"} +{"id": "Pony/src-cli-command_parser-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349use \"collections\"\n\nclass CommandParser"} +{"id": "Pony/src-time-timer-_9.txt", "contents": "Create a new timer. The expiration time should be a nanosecond count\nuntil the first expiration. The interval should also be in nanoseconds.\n\"\"\"\n_expiration = expiration + Time.nanos()\n_interval = interval\n_notify = consume notify\n_node = ListNode[Timer]\ntry _node()? = this end\n\nnew abs(notify: TimerNotify, expiration: (I64, I64), interval: U64 = 0) =>\n\"\"\"\nCreates a new timer with an absolute expiration time rather than a relative\ntime. The expiration time is wall-clock adjusted system time.\n\"\"\"\n_expiration = _abs_expiration_time(expiration)\n_interval = interval\n_notify = notify\n_node = ListNode[Timer]\ntry _node()? = this end\n"} +{"id": "Pony/builtin-ILong-_15.txt", "contents": "\n(ILong val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: ILong val)\n: (ILong val , Bool val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , Bool val)\n\n\ndivc\u00b6"} +{"id": "Pony/derived-authority_6.txt", "contents": "\nprimitive TCPListenAuth\nnew create(from: (AmbientAuth | NetAuth | TCPAuth)) =>\nNone\n\nprimitive TCPConnectAuth\nnew create(from: (AmbientAuth | NetAuth | TCPAuth)) =>\nNone\n```\n\nLook at the constructor for `TCPConnectAuth`:\n\n```pony\nnew create(from: (AmbientAuth | NetAuth | TCPAuth))\n```\n\nyou might notice that this looks like a hierarchy of authorities:\n\n`AmbientAuth >> NetAuth >> TCPAuth >> TCPConnectAuth`\n"} +{"id": "Pony/src-bureaucracy-custodian-_7.txt", "contents": "true\n```\n\"\"\"\nembed _workers: SetIs[DisposableActor] = _workers.create()\n\nbe apply(worker: DisposableActor) =>\n\"\"\"\nAdd an actor to be disposed of.\n\"\"\"\n_workers.set(worker)\n\nbe remove(worker: DisposableActor) =>\n\"\"\"\nRemoves an actor from the set of things to be disposed.\n\"\"\"\n_workers.unset(worker)\n\nbe dispose() =>\n\"\"\"\nDispose of the actors in the set and then clear the set."} +{"id": "Pony/src-promises-promise-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/format-FormatGeneral-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatGeneral val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatGeneral val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-U8-_24.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-TCPAuth-_0.txt", "contents": "\n\n\n\n\n\n\nTCPAuth\u00b6\n[Source]\nprimitive val TCPAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: (AmbientAuth val | NetAuth val))\n: TCPAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/src-process-_process-_33.txt", "contents": "| 0 => _child_fork(path, argp, envp, wdir, err, stdin, stdout, stderr)\nend\n\nfun tag _make_argv(args: Array[String] box): Array[Pointer[U8] tag] =>\n\"\"\"\nConvert an array of String parameters into an array of\nC pointers to same strings.\n\"\"\"\nlet argv = Array[Pointer[U8] tag](args.size() + 1)\nfor s in args.values() do\nargv.push(s.cstring())\nend\nargv.push(Pointer[U8]) // nullpointer to terminate list of args\nargv\n\nfun _child_fork(\npath: String,\nargp: Array[Pointer[U8] tag],\nenvp: Array[Pointer[U8] tag],\nwdir: (FilePath | None),"} +{"id": "Pony/src-random-splitmix64-_2.txt", "contents": "\nhttp://xoshiro.di.unimi.it/ and http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf\n\nUsing [XorOshiro128StarStar](random-XorOshiro128StarStar.md) or [XorOshiro128Plus](random-XorOshiro128Plus.md)\nshould be prefered unless using only 64 bit of state is a requirement.\n\"\"\"\n// state\nvar _x: U64\n\nnew from_u64(x: U64 = 5489) =>\n_x = x\n\nnew create(x: U64 = 5489, y: U64 = 0) =>\n\"\"\"\nOnly x is used, y is discarded.\n\"\"\"\n_x = x\n\nfun ref next(): U64 =>\n_x = _x + U64(0x9e3779b97f4a7c15)"} +{"id": "Pony/files-Directory-_3.txt", "contents": "target: String val)\n: Directory iso^ ?\n\nParameters\u00b6\n\ntarget: String val\n\nReturns\u00b6\n\nDirectory iso^ ?\n\n\nmkdir\u00b6\n[Source]\nCreates a directory relative to this one. Returns false if the path is\nnot within this directory hierarchy or if FileMkdir permission is missing.\nfun box mkdir(\ntarget: String val)\n: Bool val\n"} +{"id": "Pony/collections--index-_1.txt", "contents": "type BinaryHeapPriority\ninterface Flag\nclass Flags\nprimitive HashByteSeq\nprimitive HashEq\nprimitive HashEq64\ninterface HashFunction\ninterface HashFunction64\nprimitive HashIs\nclass HashMap\nclass HashSet\ninterface Hashable\ninterface Hashable64\nclass List\nclass ListNode\nclass ListNodes\nclass ListValues\ntype Map\ntype MapIs\nclass MapKeys"} +{"id": "Pony/random-MT-_9.txt", "contents": ": ISize val\n\nReturns\u00b6\n\nISize val\n\n\nint_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-signed-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/builtin-Real-_8.txt", "contents": ": A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/random-Random-_6.txt", "contents": "\nULong val\n\n\nusize\u00b6\n[Source]\nA random integer in [0, USize.max_value()]\nfun ref usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nA random integer in [-2^7, 2^7)\nfun ref i8()\n: I8 val"} +{"id": "Pony/builtin-I16-_53.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_72.txt", "contents": "end\n\nfun val trim(from: USize = 0, to: USize = -1): Array[A] val =>\n\"\"\"\nReturn a shared portion of this array, covering `from` until `to`.\nBoth the original and the new array are immutable, as they share memory.\nThe operation does not allocate a new array pointer nor copy elements.\n\"\"\"\nlet last = _size.min(to)\nlet offset = last.min(from)\n\nrecover\nlet size' = last - offset\n\n// use the new size' for alloc if we're not including the last used byte\n// from the original data and only include the extra allocated bytes if\n// we're including the last byte.\nlet alloc = if last == _size then _alloc - offset else size' end\n\nif size' > 0 then"} +{"id": "Pony/src-builtin-string-_50.txt", "contents": "992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011"} +{"id": "Pony/src-builtin-float-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547use @\"llvm.fabs.f32\"[F32](x: F32)\nuse @\"llvm.fabs.f64\"[F64](x: F64)\nuse @\"llvm.ceil.f32\"[F32](x: F32)\nuse @\"llvm.ceil.f64\"[F64](x: F64)\nuse @\"llvm.floor.f32\"[F32](x: F32)"} +{"id": "Pony/derived-authority_3.txt", "contents": "# Restrict, then delegate your authority\n\nIn order to handle our own code and that of others more safely, and also to understand our code better, we want to split up the authority, and only grant the particular authority a piece of code actually requires.\n\nThe first parameter of the `TCPConnection` constructor has the type `TCPConnectAuth`. This is what we call \"the most specific authority\". All classes in the standard library that require an authority token only accept a single type of token; the token of \"most specific authority\". In the case of `TCPConnection`, this is `TCPConnectAuth`.\n\nNow imagine we don't trust the `Connect` actor, so we don't want to provide it with more authority than needed. For example, there is no point in granting it filesystem access, since it is supposed to do network things (specifically, TCP), not access the filesystem. Instead of passing the entire `AmbientAuth` (the root of all authority), we \"downgrade\" that to a `TCPConnectAuth` (the most restrictive authority in `net`), pass it to the `Connect` actor, and have that pass it to the `TCPConnection` constructor:\n\n```pony\nactor Connect\nnew create(out: OutStream, auth: TCPConnectAuth) =>\nTCPConnection(auth, MyTCPConnectionNotify(out), \"example.com\", \"80\")\n\nactor Main\nnew create(env: Env) =>\ntry Connect(env.out, TCPConnectAuth(env.root)) end\n```\n\nNow we are sure it cannot access the filesystem or listen on a TCP or UDP port. Pay close mind to the authority that code you are calling is asking for. Never give `AmbientAuth` to __any__ code you do not trust completely both now and in the future. You should always create the most specific authority and give the library that authority. If the library is asking for more authority than it needs, __do not use the library__.\n"} +{"id": "Pony/src-files-path-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-term-ansi-_21.txt", "contents": "\"\"\"\n\"\\x1B[30m\"\n\nfun red(): String =>\n\"\"\"\nRed text.\n\"\"\"\n\"\\x1B[31m\"\n\nfun green(): String =>\n\"\"\"\nGreen text.\n\"\"\"\n\"\\x1B[32m\"\n\nfun yellow(): String =>\n\"\"\"\nYellow text.\n\"\"\"\n\"\\x1B[33m\""} +{"id": "Pony/src-promises-promise-_43.txt", "contents": "class iso _PromiseFulFill[A: Any #share, B: Any #share] is Fulfill[A, Promise[B]]\n\"\"\"\nFulfill discarding its input value of `A` and returning a promise of type `B`.\n\"\"\"\nnew iso create() => None\nfun ref apply(value: A): Promise[B] => Promise[B]\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_test-pony_test-_39.txt", "contents": "## Set Up\n\nAny kind of fixture or environment necessary for executing a [UnitTest](pony_test-UnitTest.md)\ncan be set up either in the tests constructor or in a function called [set_up()](pony_test-UnitTest.md#set_up).\n\n[set_up()](pony_test-UnitTest.md#set_up) is called before the test is executed. It is partial,\nif it errors, the test is not executed but reported as failing during set up.\nThe test's [TestHelper](pony_test-TestHelper.md) is handed to [set_up()](pony_test-UnitTest.md#set_up)\nin order to log messages or access the tests [Env](builtin-Env.md) via [TestHelper.env](pony_test-TestHelper.md#let-env-env-val).\n"} +{"id": "Pony/src-pony_check-property-_16.txt", "contents": "\nfun gen(): Generator[(T1, T2)] =>\nGenerators.zip2[T1, T2](\ngen1(),\ngen2())\n\nfun ref property(arg1: (T1, T2), h: PropertyHelper) ? =>\n(let x, let y) = consume arg1\nproperty2(consume x, consume y, h)?\n\nfun ref property2(arg1: T1, arg2: T2, h: PropertyHelper) ?\n\"\"\"\nA method verifying that a certain property holds for all given\n`arg1` and `arg2`\nwith the help of [PropertyHelper](pony_check-PropertyHelper.md) `h`.\n\"\"\"\n\ntrait Property3[T1, T2, T3] is Property1[(T1, T2, T3)]\n\nfun gen1(): Generator[T1]"} +{"id": "Pony/src-builtin-string-_120.txt", "contents": "Returns a copy of the string repeated `num` times.\n\"\"\"\nrepeat_str(num)\n\nfun find(s: String box, offset: ISize = 0, nth: USize = 0): ISize ? =>\n\"\"\"\nReturn the index of the n-th instance of s in the string starting from the\nbeginning. Raise an error if there is no n-th occurrence of s or s is empty.\n\"\"\"\nvar i = offset_to_index(offset)\nvar steps = nth + 1\n\nwhile i < _size do\nvar j: USize = 0\n\nlet same = while j < s._size do\nif _ptr._apply(i + j) != s._ptr._apply(j) then\nbreak false\nend\nj = j + 1"} +{"id": "Pony/promises-Promise-_6.txt", "contents": "// We don't have an issue, we have a promise for an issue\n\nTake a look at what happens in the example, when we get to\nPrintIssueTitle, we can't print anything because we \"don't have anything\".\nIn order to print the issue title, we need an Issue not a\nPromise[Issue].\nWe could solve this by doing something like this:\nprimitive PrintIssueTitle\nfun apply(out: OutStream, issue: Promise[Issue]) =>\nissue.next[None](ActuallyPrintIssueTitle~apply(out))\n\nprimitive ActuallyPrintIssueTitle\nfun apply(out: OutStream, issue: Issue) =>\nout.print(issue.title())\n\nThat will work, however, it is kind of awful. When looking at:\nlet repo: Promise[Repoository] =\nGitHub(\"my token\").get_repo(\"ponylang/ponyc\")\nlet issue = Promise[Promise[Issue]] =\nrepo.next[Promise[Issue]](FetchIssue~apply(1))"} +{"id": "Pony/builtin-U32-_21.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U32-_14.txt", "contents": "fun box remc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6"} +{"id": "Pony/time-Nanos-_2.txt", "contents": "from_millis\u00b6\n[Source]\nfun box from_millis(\nt: U64 val)\n: U64 val\n\nParameters\u00b6\n\nt: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfrom_micros\u00b6\n[Source]\nfun box from_micros(\nt: U64 val)\n: U64 val"} +{"id": "Pony/pony_check-ForAll4-_1.txt", "contents": ": ForAll4[T1, T2, T3, T4] ref^\n\nParameters\u00b6\n\ngen1': Generator[T1] val\ngen2': Generator[T2] val\ngen3': Generator[T3] val\ngen4': Generator[T4] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll4[T1, T2, T3, T4] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nprop: {(T1, T2, T3, T4, PropertyHelper) ?}[T1, T2, T3, T4] val)"} +{"id": "Pony/builtin-U64-_10.txt", "contents": "U64 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhash\u00b6\n[Source]"} +{"id": "Pony/examples_12.txt", "contents": "# Operator overloading (easy for copy and paste)\n\n```pony\nfun add(other: A): A\nfun sub(other: A): A\nfun mul(other: A): A\nfun div(other: A): A\nfun rem(other: A): A\nfun mod(other: A): A\nfun eq(other: A): Bool\nfun ne(other: A): Bool\nfun lt(other: A): Bool\nfun le(other: A): Bool\nfun ge(other: A): Bool\nfun gt(other: A): Bool\nfun shl(other: A): A\nfun shr(other: A): A\nfun op_and(other:A): A\nfun op_or(other: A): A\nfun op_xor(othr: A): A"} +{"id": "Pony/ini--index-_0.txt", "contents": "\n\n\n\n\n\n\nIni package\u00b6\nThe Ini package provides support for parsing\nINI file formatted text.\n\nCurrently does not support multi-line entries.\nAny keys not in a section will be placed in the section \"\"\n\nExample code\u00b6\n// Parses the file 'example.ini' in the current working directory\n// Output all the content\nuse \"ini\"\nuse \"files\"\n"} +{"id": "Pony/src-term-readline_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18use \"promises\"\n\ninterface ReadlineNotify\n\"\"\"\nNotifier for readline.\n\"\"\"\nfun ref apply(line: String, prompt: Promise[String]) =>\n\"\"\"\nReceives finished lines. The next prompt is set by fulfilling the promise.\nIf the promise is rejected, readline will stop handling input.\n\"\"\"\nNone\n\nfun ref tab(line: String): Seq[String] box =>"} +{"id": "Pony/net-OSSockOpt-_172.txt", "contents": "fun box ipv6_unicast_hops()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_unicast_if\u00b6\n[Source]\nfun box ipv6_unicast_if()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_use_min_mtu\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_40.txt", "contents": "\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/cli-Command-_2.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\noption\u00b6\n[Source]\nReturns the Option by name, defaulting to a fake Option if unknown.\nfun box option(\nname: String val)\n: Option val\n\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F64-_17.txt", "contents": "\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-time-_17.txt", "contents": "@clock_gettime_nsec_np(_ClockUptimeRaw())\nelseif linux or bsd then\nvar ts = _clock_gettime(_ClockMonotonic)\n((ts._1 * 1000000000) + ts._2).u64()\nelseif windows then\n_subseconds_from_query_performance_counter(1000000000)\nelse\ncompile_error \"unsupported platform\"\nend\n\nfun cycles(): U64 =>\n\"\"\"\nProcessor cycle count. Don't use this for performance timing, as it does\nnot control for out-of-order execution.\n\"\"\"\n@\"llvm.readcyclecounter\"()\n\nfun perf_begin(): U64 =>\n\"\"\"\nGet a cycle count for beginning a performance testing block. This will"} +{"id": "Pony/src-pony_check-property_helper-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-I128-_31.txt", "contents": "I128 val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val ?\n\n\nrem_partial\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_28.txt", "contents": "U16 val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nrotr\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_50.txt", "contents": "ISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_505.txt", "contents": "fun box so_no_ddp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_no_offload\u00b6\n[Source]\nfun box so_no_offload()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_np_extensions\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_30.txt", "contents": "| 0 =>\n// System call was successful\n| let errno: U32 =>\n// System call failed\nend\n\nfun ref setsockopt(\nlevel: I32 val,\noption_name: I32 val,\noption: Array[U8 val] ref)\n: U32 val\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\noption: Array[U8 val] ref\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Property1UnitTest-_5.txt", "contents": "\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nset_up\u00b6\nfun ref set_up(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-ASCIINonPrintable-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIINonPrintable val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-pointer-_13.txt", "contents": "\"\"\"\nReturns a 64-bit hash of the address.\n\"\"\"\nusize().hash64()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_100.txt", "contents": "end\nend\nthis\n\nfun ref skip_while(f: {(A!): Bool ?} box): Iter[A!]^ =>\n\"\"\"\nSkip values of the iterator while the predicate `f` returns true.\n"} +{"id": "Pony/src-promises-promise-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/builtin-FloatingPoint-_41.txt", "contents": "A\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/src-pony_bench-pony_bench-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/buffered-Reader-_11.txt", "contents": ": U16 val ?\n\nReturns\u00b6\n\nU16 val ?\n\n\ni16_be\u00b6\n[Source]\nGet a big-endian I16.\nfun ref i16_be()\n: I16 val ?\n\nReturns\u00b6\n\nI16 val ?\n\n\ni16_le\u00b6\n[Source]"} +{"id": "Pony/process-ProcessError-_0.txt", "contents": "\n\n\n\n\n\n\nProcessError\u00b6\n[Source]\nclass val ProcessError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nerror_type': (ExecveError val | PipeError val | ForkError val |\nWaitpidError val | WriteError val | KillError val |\nCapError val | ChdirError val | UnknownError val),\nmessage': (String val | None val) = reference)\n: ProcessError val^"} +{"id": "Pony/src-files-file_path-_31.txt", "contents": "\"\"\"\nCreates the directory. Will recursively create each element. Returns true\nif the directory exists when we're done, false if it does not. If we do not\nhave the FileStat permission, this will return false even if the directory\ndoes exist.\n\"\"\"\nif not caps(FileMkdir) then\nreturn false\nend\n\nvar offset: ISize = 0\n\nrepeat\nlet element = try\noffset = path.find(Path.sep(), offset)? + 1\npath.substring(0, offset - 1)\nelse\noffset = -1\npath\nend"} +{"id": "Pony/src-pony_check-property_runner-_34.txt", "contents": "be _run_finished(round: _Round) =>\nif not _params.async and _pass then\n// otherwise complete_run has already been called\ncomplete_run(round, true)\nend\n\n// SHRINKING //\n\nbe complete_shrink(failed_repr: String, last_repr: String, shrink_round: _Round, success: Bool) =>\n\n// verify that this is an expected call\nif this._current_round != shrink_round then\n_logger.log(\"unexpected \" + if success then \"complete\" else \"fail\" end + \" msg for \" + shrink_round.string() +\n\". Currently at \" + _current_round.string(), true)\nreturn\nend\n\n_pass = success // in case of sync property - signal failure\n\nif success then"} +{"id": "Pony/collections-BinaryHeap-_6.txt", "contents": "Add len iterated elements, starting from the given offset.\nfun ref concat(\niter: Iterator[A^] ref,\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n\niter: Iterator[A^] ref\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nvalues\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/buffered-Reader-_15.txt", "contents": "\nU64 val ?\n\n\nu64_le\u00b6\n[Source]\nGet a little-endian U64.\nfun ref u64_le()\n: U64 val ?\n\nReturns\u00b6\n\nU64 val ?\n\n\ni64_be\u00b6\n[Source]\nGet a big-endian I64.\nfun ref i64_be()\n: I64 val ?"} +{"id": "Pony/builtin-Stdin-_1.txt", "contents": "fun ref dispose() =>\nenv.out.print(\"Done.\")\nend,\n512)\n\nNote: For reading user input from a terminal, use the term package.\nactor tag Stdin is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nSet the notifier. Optionally, also sets the chunk size, dictating the\nmaximum number of bytes of each chunk that will be passed to the notifier.\nbe apply("} +{"id": "Pony/capsicum-Cap-_27.txt", "contents": "fun box recv()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsend\u00b6\n[Source]\nfun box send()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsetsockopt\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_212.txt", "contents": "fun box ip_max_group_src_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_max_memberships\u00b6\n[Source]\nfun box ip_max_memberships()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_max_sock_mute_filter\u00b6\n[Source]"} +{"id": "Pony/files-File-_6.txt", "contents": "\nlen: USize val\n\nReturns\u00b6\n\nString iso^\n\n\nprint\u00b6\n[Source]\nSame as write, buts adds a newline.\nfun ref print(\ndata: (String box | Array[U8 val] box))\n: Bool val\n\nParameters\u00b6\n\ndata: (String box | Array[U8 val] box)\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-nullable_pointer-_3.txt", "contents": "\"\"\"\nThis returns a null pointer typed as a NullablePointer[A].\n\"\"\"\ncompile_intrinsic\n\nfun apply(): this->A ? =>\n\"\"\"\nThis re-encodes the type of `this` from NullablePointer[A] to A, allowing\n`this` to be assigned to a field of variable of type A. If `this` is a null\npointer, an error is raised.\n\"\"\"\ncompile_intrinsic\n\nfun is_none(): Bool =>\n\"\"\"\nReturns true if `this` is null (ie apply would raise an error).\n\"\"\"\ncompile_intrinsic\n\n"} +{"id": "Pony/src-term-ansi_term-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387use \"time\"\nuse \"signals\"\nuse @ioctl[I32](fx: I32, cmd: ULong, ...) if posix\n\nstruct _TermSize"} +{"id": "Pony/builtin-String-_12.txt", "contents": "argument, expecting a null-terminator. If the underlying string\nis already null terminated, this is returned; otherwise the string\nis copied into a new, null-terminated allocation.\nfun box cstring()\n: Pointer[U8 val] tag\n\nReturns\u00b6\n\nPointer[U8 val] tag\n\n\narray\u00b6\n[Source]\nReturns an Array[U8] that reuses the underlying data pointer.\nfun val array()\n: Array[U8 val] val\n\nReturns\u00b6\n\nArray[U8 val] val"} +{"id": "Pony/src-net-tcp_listener-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-U16-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_10.txt", "contents": "USize val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\naddc\u00b6\n[Source]"} +{"id": "Pony/process-WriteError-_2.txt", "contents": "\nthat: WriteError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: WriteError val)\n: Bool val\n\nParameters\u00b6\n\nthat: WriteError val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_18.txt", "contents": ": None val\n\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n\nNone val\n\n\nfail_action\u00b6\n[Source]\nMark an expected action as failed.\nIf all expected actions are completed successfully,\nthe property is considered successful.\nIf 1 action fails, the property is considered failing.\nfun val fail_action(\nname: String val)\n: None val"} +{"id": "Pony/src-math-is_prime-_0.txt", "contents": "\n\n\n\n\n\n\nis_prime.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_595.txt", "contents": "fun box tcp_vendor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_window_clamp\u00b6\n[Source]\nfun box tcp_window_clamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_addr_id\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_11.txt", "contents": "I8 val\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/time-Nanos-_4.txt", "contents": "Returns\u00b6\n\nU64 val\n\n\nfrom_millis_f\u00b6\n[Source]\nfun box from_millis_f(\nt: F64 val)\n: U64 val\n\nParameters\u00b6\n\nt: F64 val\n\nReturns\u00b6\n\nU64 val\n\n"} +{"id": "Pony/src-net-tcp_connection-_83.txt", "contents": "service: String,\nfrom: String = \"\",\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\"\nConnect via IPv4 or IPv6. If `from` is a non-empty string, the connection\nwill be made from the specified interface.\n\"\"\"\n_read_buf = recover Array[U8] .> undefined(read_buffer_size) end\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_notify = consume notify\nlet asio_flags =\nifdef not windows then\nAsioEvent.read_write_oneshot()\nelse\nAsioEvent.read_write()"} +{"id": "Pony/builtin-Real-_27.txt", "contents": "I16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_143.txt", "contents": "n: USize = USize.max_value())\n: Array[String] iso^\n=>\n\"\"\"\nSplit the string into an array of strings that are delimited by `delim` in\nthe original string. If `n > 0`, then the split count is limited to n.\n\nExample:\n\n```pony\nlet original: String = \"Hello!\"\nlet delimiter: String = \"><\"\nlet split_array: Array[String] = original.split_by(delimiter)\nenv.out.print(\"OUTPUT:\")\nfor value in split_array.values() do\nenv.out.print(value)\nend\n\n// OUTPUT:\n// \n_c = c\n\nfun get(): A => _c\n\nfun ref set(c: A) => _c = c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo[U32](42)\nenv.out.print(a.get().string())\na.set(21)\nenv.out.print(a.get().string())"} +{"id": "Pony/net-OSSockOpt-_163.txt", "contents": "fun box ipv6_recverr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvhoplimit\u00b6\n[Source]\nfun box ipv6_recvhoplimit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvhopopts\u00b6\n[Source]"} +{"id": "Pony/format--index-_3.txt", "contents": "primitive PrefixDefault\ntype PrefixNumber\nprimitive PrefixSign\nprimitive PrefixSpace\ntrait PrefixSpec\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_399.txt", "contents": "fun box sctp_lock_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_at_send_2_outq\u00b6\n[Source]\nfun box sctp_log_at_send_2_outq()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_at_send_2_sctp\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_29.txt", "contents": "fun box sub_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/src-term-readline-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_473.txt", "contents": "fun box sock_seqpacket()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_stream\u00b6\n[Source]\nfun box sock_stream()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsomaxconn\u00b6\n[Source]"} +{"id": "Pony/6_type-aliases_4.txt", "contents": "# Complex types\n\nIf a type is complicated, it can be nice to give it a mnemonic name. For example, if we want to say that a type must implement more than one interface, we could say:\n\n```pony\ninterface HasName\nfun name(): String\n\ninterface HasAge\nfun age(): U32\n\ninterface HasFeelings\nfun feeling(): String\n\ntype Person is (HasName & HasAge & HasFeelings)\n```\n\nThis use of complex types applies to traits, not just interfaces:\n\n```pony"} +{"id": "Pony/src-process-process_monitor-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-itertools-iter-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/collections-persistent-MapValues-_1.txt", "contents": "m: HashMap[K, V, H] val\n\nReturns\u00b6\n\nMapValues[K, V, H] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/collections-MinHeapPriority-_2.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: MinHeapPriority[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: MinHeapPriority[A] val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/assert-Fact-_1.txt", "contents": "\nFact val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\ntest: Bool val,\nmsg: String val = \"\")\n: None val ?\n\nParameters\u00b6\n\ntest: Bool val\nmsg: String val = \"\"\n\nReturns\u00b6\n\nNone val ?"} +{"id": "Pony/builtin-U32-_8.txt", "contents": "fun box ctz_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_34.txt", "contents": "\nILong val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nop_xor\u00b6"} +{"id": "Pony/net-TCPConnectionNotify-_0.txt", "contents": "\n\n\n\n\n\n\nTCPConnectionNotify\u00b6\n[Source]\nNotifications for TCP connections.\nFor an example of using this class please see the documentation for the\nTCPConnection and TCPListener actors.\ninterface ref TCPConnectionNotify\n\nPublic Functions\u00b6\naccepted\u00b6\n[Source]\nCalled when a TCPConnection is accepted by a TCPListener.\nfun ref accepted(\nconn: TCPConnection ref)"} +{"id": "Pony/2_how-it-works_0.txt", "contents": "# Hello World -- How It Works\n\nLet's look at our `helloworld` code again:\n\n```pony\nactor Main\nnew create(env: Env) =>\nenv.out.print(\"Hello, world!\")\n```\n\nLet's go through that line by line.\n"} +{"id": "Pony/net-OSSockOpt-_227.txt", "contents": "fun box ip_pmtudisc_do()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_dont\u00b6\n[Source]\nfun box ip_pmtudisc_dont()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_interface\u00b6\n[Source]"} +{"id": "Pony/2_ops_10.txt", "contents": "```\n\nRepeated use of a single operator, however, is fine:\n\n```pony\n1 + 2 + 3 // 6\n```\n\nMeanwhile, mixing unary and infix operators do not need additional parentheses as unary operators always bind more closely, so if our example above used a negative three:\n\n```pony\n1 + 2 * -3 // Compilation failed.\n```\n\nWe would still need parentheses to remove the ambiguity for our infix operators like we did above, but not for the unary arithmetic negative (`-`):\n\n```pony\n1 + (2 * -3) // -5\n```\n"} +{"id": "Pony/builtin-U8-_27.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_68.txt", "contents": "U32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-buffered-reader-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/format-PrefixSpace-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: PrefixSpace val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixSpace val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-builtin-string-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/4_control-structures_10.txt", "contents": "# Loops\n\n`if` allows you to choose what to do, but in order to do something more than once, you want a loop.\n"} +{"id": "Pony/src-encode-base64-base64-_19.txt", "contents": "for i in Range(0, data.size()) do\ninput = data(i)?\n\nlet value =\nmatch input\n| ' ' | '\\t' | '\\r' | '\\n' => continue\n| pad => break\n| at62 => 62\n| at63 => 63\n| if (input >= 'A') and (input <= 'Z') =>\n(input - 'A')\n| if (input >= 'a') and (input <= 'z') =>\n((input - 'a') + 26)\n| if (input >= '0') and (input <= '9') =>\n((input - '0') + 52)\nelse\nerror\nend\n\nmatch state"} +{"id": "Pony/src-term-ansi-_17.txt", "contents": "if n <= 1 then\n\"\\x1B[C\"\nelse\n\"\\x1B[\" + n.string() + \"C\"\nend\n\nfun left(n: U32 = 0): String =>\n\"\"\"\nMove the cursor left n columns. 0 is the same as 1.\n\"\"\"\nif n <= 1 then\n\"\\x1B[D\"\nelse\n\"\\x1B[\" + n.string() + \"D\"\nend\n\nfun cursor(x: U32 = 0, y: U32 = 0): String =>\n\"\"\"\nMove the cursor to line y, column x. 0 is the same as 1. This indexes from\nthe top left corner of the screen."} +{"id": "Pony/src-time-timers-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-UDPSocket-_6.txt", "contents": "notify: UDPNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nsize: USize val = 1024\n\nReturns\u00b6\n\nUDPSocket tag^\n\n\nip6\u00b6\n[Source]\nListens for IPv6 datagrams.\nnew tag ip6(\nauth: UDPAuth val,\nnotify: UDPNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nsize: USize val = 1024)\n: UDPSocket tag^"} +{"id": "Pony/src-buffered-reader-_55.txt", "contents": "\"\"\"\nGet a big-endian I16.\n\"\"\"\nu16_be()?.i16()\n\nfun ref i16_le(): I16 ? =>\n\"\"\"\nGet a little-endian I16.\n\"\"\"\nu16_le()?.i16()\n\nfun ref u32_be(): U32 ? =>\n\"\"\"\nGet a big-endian U32.\n\"\"\"\nlet num_bytes = U32(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then"} +{"id": "Pony/src-net-ossockopt-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-process-process_error-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-buffered-reader-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-net-tcp_connection_notify-_11.txt", "contents": "\"\"\"\ndata\n\nfun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>\n\"\"\"\nCalled when multiple chunks of data are sent to the connection in a single\ncall. This gives the notifier an opportunity to modify the sent data chunks\nbefore they are written. To swallow the send, return an empty\nArray[String].\n\"\"\"\ndata\n\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8] iso,\ntimes: USize)\n: Bool\n=>\n\"\"\"\nCalled when new data is received on the connection. Return true if you"} +{"id": "Pony/net-OSSockOpt-_380.txt", "contents": "fun box sctp_events()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_explicit_eor\u00b6\n[Source]\nfun box sctp_explicit_eor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_flight_logging_enable\u00b6\n[Source]"} +{"id": "Pony/net-TCPListener-_8.txt", "contents": "fun box local_address()\n: NetAddress val\n\nReturns\u00b6\n\nNetAddress val\n\n\nclose\u00b6\n[Source]\nDispose of resources.\nfun ref close()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\n"} +{"id": "Pony/src-itertools-iter-_103.txt", "contents": "### Example\n```pony\nIter[USize](Range(0, 10))\n.step_by(2)\n```\n`1 3 5 7 9`\n\"\"\"\nIter[A!](\nobject is Iterator[A!]\nlet _step: USize = if n == 0 then 1 else n end\n\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): A! ? =>\nvar steps_to_burn: USize = _step - 1\nwhile steps_to_burn != 0 do\ntry _iter.next()? end\nsteps_to_burn = steps_to_burn - 1\nend"} +{"id": "Pony/src-builtin-stringable-_1.txt", "contents": "fun string(): String iso^\n\"\"\"\nGenerate a string representation of this object.\n\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-builtin-stdin-_13.txt", "contents": "```\n\n**Note:** For reading user input from a terminal, use the [term](term--index.md) package.\n\"\"\"\nvar _notify: (InputNotify | None) = None\nvar _chunk_size: USize = 32\nvar _event: AsioEventID = AsioEvent.none()\nlet _use_event: Bool\n\nnew _create(use_event: Bool) =>\n\"\"\"\nCreate an asynchronous stdin provider.\n\"\"\"\n_use_event = use_event\n\nbe apply(notify: (InputNotify iso | None), chunk_size: USize = 32) =>\n\"\"\"\nSet the notifier. Optionally, also sets the chunk size, dictating the\nmaximum number of bytes of each chunk that will be passed to the notifier.\n\"\"\""} +{"id": "Pony/builtin-I8-_29.txt", "contents": "fun box sub_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-AsioEvent-_1.txt", "contents": "AsioEvent val^\n\n\nPublic Functions\u00b6\nnone\u00b6\n[Source]\nAn empty event.\nfun box none()\n: Pointer[AsioEvent val] tag\n\nReturns\u00b6\n\nPointer[AsioEvent val] tag\n\n\nreadable\u00b6\n[Source]\nReturns true if the flags contain the readable flag.\nfun box readable(\nflags: U32 val)"} +{"id": "Pony/src-builtin-string-_66.txt", "contents": "1312\n1313\n1314\n1315\n1316\n1317\n1318\n1319\n1320\n1321\n1322\n1323\n1324\n1325\n1326\n1327\n1328\n1329\n1330\n1331"} +{"id": "Pony/builtin-ISize-_31.txt", "contents": "[Source]\nfun box divrem_unsafe(\ny: ISize val)\n: (ISize val , ISize val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , ISize val)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/builtin-U64-_21.txt", "contents": "U64 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfldc\u00b6\n[Source]"} +{"id": "Pony/src-random-random-_0.txt", "contents": "\n\n\n\n\n\n\nrandom.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U128-_23.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_56.txt", "contents": "1112\n1113\n1114\n1115\n1116\n1117\n1118\n1119\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131"} +{"id": "Pony/builtin-U32-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_5.txt", "contents": "x: U32 val = 0\ny: U32 val = 0\n\nReturns\u00b6\n\nString val\n\n\nclear\u00b6\n[Source]\nClear the screen and move the cursor to the top left corner.\nfun box clear()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nerase\u00b6"} +{"id": "Pony/src-builtin-string-_150.txt", "contents": "if _size > 0 then\nlet chars = Array[U32](s.size())\nvar i = _size - 1\nvar truncate_at = _size\n\nfor rune in s.runes() do\nchars.push(rune)\nend\n\nrepeat\ntry\nmatch utf32(i.isize())?\n| (0xFFFD, 1) => None\n| (let c: U32, _) =>\nif not chars.contains(c) then\nbreak\nend\ntruncate_at = i\nend\nelse"} +{"id": "Pony/src-builtin-string-_171.txt", "contents": "end\n\nfun hash(): USize =>\n@ponyint_hash_block(_ptr, _size)\n\nfun hash64(): U64 =>\n@ponyint_hash_block64(_ptr, _size)\n\nfun string(): String iso^ =>\nclone()\n\nfun values(): StringBytes^ =>\n\"\"\"\nReturn an iterator over the bytes in the string.\n\"\"\"\nStringBytes(this)\n\nfun runes(): StringRunes^ =>\n\"\"\"\nReturn an iterator over the codepoints in the string."} +{"id": "Pony/net-TCPListenNotify-_0.txt", "contents": "\n\n\n\n\n\n\nTCPListenNotify\u00b6\n[Source]\nNotifications for TCP listeners.\nFor an example of using this class, please see the documentation for the\nTCPListener actor.\ninterface ref TCPListenNotify\n\nPublic Functions\u00b6\nlistening\u00b6\n[Source]\nCalled when the listener has been bound to an address.\nfun ref listening(\nlisten: TCPListener ref)"} +{"id": "Pony/builtin-DoNotOptimise-_2.txt", "contents": "\n\nobserve\u00b6\n[Source]\nPrevent the compiler from optimising out writes to an object marked by\nthe apply function.\nfun box observe()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: DoNotOptimise val)\n: Bool val\n"} +{"id": "Pony/net-UDPAuth-_1.txt", "contents": "from: (AmbientAuth val | NetAuth val)\n\nReturns\u00b6\n\nUDPAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: UDPAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: UDPAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/capsicum-CapRights0-_7.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\ncontains\u00b6\n[Source]\nCheck that this is a superset of the rights in that.\nfun box contains(\nthat: CapRights0 ref)\n: Bool val\n\nParameters\u00b6\n\nthat: CapRights0 ref\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-pony_test-test_helper-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-capsicum-cap_rights-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-string-_78.txt", "contents": "1552\n1553\n1554\n1555\n1556\n1557\n1558\n1559\n1560\n1561\n1562\n1563\n1564\n1565\n1566\n1567\n1568\n1569\n1570\n1571"} +{"id": "Pony/src-net-ossockopt-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/random-MT-_8.txt", "contents": "i128\u00b6\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\nfun ref ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\nfun ref isize()"} +{"id": "Pony/collections-Flags-_15.txt", "contents": "Returns\u00b6\n\nFlags[A, B] iso^\n\n\nclone\u00b6\n[Source]\nCreate a clone.\nfun box clone()\n: Flags[A, B] iso^\n\nReturns\u00b6\n\nFlags[A, B] iso^\n\n\neq\u00b6\n[Source]\nReturns true if this has the same flags set as that.\nfun box eq("} +{"id": "Pony/src-collections-heap-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-Float-_0.txt", "contents": "\n\n\n\n\n\n\nFloat\u00b6\n[Source]\ntype Float is\n(F32 val | F64 val)\n\nType Alias For\u00b6\n\n(F32 val | F64 val)\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_100.txt", "contents": "ptr._update(_size, 0)\nptr\n\nfun val array(): Array[U8] val =>\n\"\"\"\nReturns an Array[U8] that reuses the underlying data pointer.\n\"\"\"\nrecover\nArray[U8].from_cpointer(_ptr._unsafe(), _size, _alloc)\nend\n\nfun iso iso_array(): Array[U8] iso^ =>\n\"\"\"\nReturns an Array[U8] iso that reuses the underlying data pointer.\n\"\"\"\nrecover\nArray[U8].from_cpointer(_ptr._unsafe(), _size, _alloc)\nend\n\nfun size(): USize =>"} +{"id": "Pony/debug-DebugOut-_0.txt", "contents": "\n\n\n\n\n\n\nDebugOut\u00b6\n[Source]\nprimitive val DebugOut\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: DebugOut val^\n\nReturns\u00b6\n\nDebugOut val^"} +{"id": "Pony/src-backpressure-backpressure-_5.txt", "contents": "92\n93\n94\n95\n96\"\"\""} +{"id": "Pony/src-process-process_monitor-_40.txt", "contents": "_final_wait_result = exit_status\n_notifier.dispose(this, exit_status)\n_dispose_timers()\n| let wpe: WaitpidError =>\n_final_wait_result = wpe\n_notifier.failed(this, ProcessError(WaitpidError))\n_dispose_timers()\nend\nend\n\nfun ref _ensure_timers(): Timers tag =>\nmatch _timers\n| None =>\nlet ts = Timers\n_timers = ts\nts\n| let ts: Timers => ts\nend\n\nfun ref _dispose_timers() =>"} +{"id": "Pony/src-files-file-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/src-files-file_path-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-builtin-unsigned-_87.txt", "contents": "if (a and 4) != 0 then\na = a or 1\nend\n\na = (a + 1) >> 2\n\nif (a and (1 << 53)) != 0 then\na = a >> 1\ne = e + 1\nend\nelse\na = a << (53 - sd)\nend\n\nF64.from_bits(((e + 1023) << 52) or (a.u64() and 0xF_FFFF_FFFF_FFFF))\n\nfun f32_unsafe(): F32 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined."} +{"id": "Pony/format-AlignRight-_0.txt", "contents": "\n\n\n\n\n\n\nAlignRight\u00b6\n[Source]\nprimitive val AlignRight\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: AlignRight val^\n\nReturns\u00b6\n\nAlignRight val^"} +{"id": "Pony/builtin-F32-_8.txt", "contents": "\nReturns\u00b6\n\nU8 val\n\n\nprecision10\u00b6\n[Source]\nMantissa precision in decimal digits.\nfun tag precision10()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmin_exp2\u00b6\n[Source]\nMinimum exponent value such that (2^exponent) - 1 is representable at full"} +{"id": "Pony/net-OSSockOpt-_276.txt", "contents": "fun box netlink_firewall()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_generic\u00b6\n[Source]\nfun box netlink_generic()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_inet_diag\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_32.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-itertools-iter-_52.txt", "contents": "1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046use \"collections\"\n\nclass Iter[A] is Iterator[A]\n\"\"\"\nWrapper class containing methods to modify iterators.\n\"\"\""} +{"id": "Pony/src-ini-ini-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-unsigned-_61.txt", "contents": "fun subc(y: U64): (U64, Bool) =>\n@\"llvm.usub.with.overflow.i64\"(this, y)\n\nfun mulc(y: U64): (U64, Bool) =>\n@\"llvm.umul.with.overflow.i64\"(this, y)\n\nfun divc(y: U64): (U64, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[U64](this, y)\n\nfun remc(y: U64): (U64, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[U64](this, y)\n\nfun add_partial(y: U64): U64 ? =>\n_UnsignedPartialArithmetic.add_partial[U64](this, y)?\n\nfun sub_partial(y: U64): U64 ? =>\n_UnsignedPartialArithmetic.sub_partial[U64](this, y)?\n\nfun mul_partial(y: U64): U64 ? =>\n_UnsignedPartialArithmetic.mul_partial[U64](this, y)?"} +{"id": "Pony/src-builtin-array-_67.txt", "contents": "if (offset + u64_bytes) <= _size then\n_ptr._offset(offset)._convert[U64]()._update(0, value)\nelse\nerror\nend\n\nfun ref update_u128[B: (A & Real[B] val & U8) = A](offset: USize, value: U128): U128 ? =>\n\"\"\"\nWrite a U128 at offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u128_bytes = U128(0).bytewidth()\nif (offset + u128_bytes) <= _size then\n_ptr._offset(offset)._convert[U128]()._update(0, value)\nelse\nerror\nend\n\nfun ref update(i: USize, value: A): A^ ? =>\n\"\"\"\nChange the i-th element, raising an error if the index is out of bounds."} +{"id": "Pony/pony_check-Randomness-_9.txt", "contents": "fun ref i8(\nmin: I8 val = call,\nmax: I8 val = call)\n: I8 val\n\nParameters\u00b6\n\nmin: I8 val = call\nmax: I8 val = call\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nGenerate a I16 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/net-OSSockOpt-_355.txt", "contents": "fun box sctp_cc_opt_steady_step()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_opt_use_dccc_ecn\u00b6\n[Source]\nfun box sctp_cc_opt_use_dccc_ecn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_rfc2581\u00b6\n[Source]"} +{"id": "Pony/files-FileRename-_0.txt", "contents": "\n\n\n\n\n\n\nFileRename\u00b6\n[Source]\nprimitive val FileRename\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileRename val^\n\nReturns\u00b6\n\nFileRename val^"} +{"id": "Pony/src-files-file_path-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-ULong-_47.txt", "contents": "Bool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: ULong val)\n: Bool val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nBool val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/files-FileOK-_2.txt", "contents": "fun box ne(\nthat: FileOK val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileOK val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileCaps-_0.txt", "contents": "\n\n\n\n\n\n\nFileCaps\u00b6\n[Source]\ntype FileCaps is\nFlags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref\n\nType Alias For\u00b6\n\nFlags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] ref\n\n\n\n\n"} +{"id": "Pony/files-FileRead-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-process_monitor-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498use \"backpressure\"\nuse \"collections\"\nuse \"files\"\nuse \"time\"\n\nactor ProcessMonitor is AsioEventNotify\n\"\"\"\nFork+execs / creates a child process and monitors it. Notifies a client about\nSTDOUT / STDERR events.\n\"\"\"\nlet _notifier: ProcessNotify\nlet _backpressure_auth: ApplyReleaseBackpressureAuth\n\nvar _stdin: _Pipe = _Pipe.none()"} +{"id": "Pony/builtin-U64-_41.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: U64 val)\n: (U64 val , U64 val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/process-WaitpidError-_2.txt", "contents": "\nthat: WaitpidError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: WaitpidError val)\n: Bool val\n\nParameters\u00b6\n\nthat: WaitpidError val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/buffered-Reader-_18.txt", "contents": "[Source]\nGet a big-endian I129.\nfun ref i128_be()\n: I128 val ?\n\nReturns\u00b6\n\nI128 val ?\n\n\ni128_le\u00b6\n[Source]\nGet a little-endian I128.\nfun ref i128_le()\n: I128 val ?\n\nReturns\u00b6\n\nI128 val ?\n"} +{"id": "Pony/3_actors_1.txt", "contents": "# Behaviours\n\nA __behaviour__ is like a __function__, except that functions are _synchronous_ and behaviours are _asynchronous_. In other words, when you call a function, the body of the function is executed immediately, and the result of the call is the result of the body of the function. This is just like method invocation in any other object-oriented language.\n\nBut when you call a behaviour, the body is __not__ executed immediately. Instead, the body of the behaviour will execute at some indeterminate time in the future.\n\nA behaviour looks like a function, but instead of being introduced with the keyword `fun`, it is introduced with the keyword `be`.\n\nLike a function, a behaviour can have parameters. Unlike a function, it doesn't have a receiver capability (a behaviour can be called on a receiver of any capability) and you can't specify a return type.\n\n__So what does a behaviour return?__ Behaviours always return `None`, like a function without explicit result type, because they can't return something they calculate (since they haven't run yet).\n\n```pony\nactor Aardvark\nlet name: String\nvar _hunger_level: U64 = 0\n\nnew create(name': String) =>\nname = name'\n"} +{"id": "Pony/src-pony_test-pony_test-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-ini-ini-_15.txt", "contents": "value.rstrip()\nend\nend\n\nif not f(section, consume current, consume value) then\nreturn ok\nend\nelse\nok = false\n\nif not f.errors(lineno, IniNoDelimiter) then\nreturn false\nend\nend\nend\nend\nend\nok\n\n"} +{"id": "Pony/src-pony_bench-_runner-_14.txt", "contents": "_start_time = 0\n_bench.before_iteration(_before_iteration_cont)\n\nbe _before_iteration_done_cont(e: U64) =>\n_run_iteration()\n\nbe _run_iteration() =>\ntry\n_n = _n + 1\n_gc_next_behavior()\n_start_time = Time.nanos()\n_bench(_iteration_cont)?\nelse\n_fail()\nend\n\nbe _iteration_done_cont(e: U64) =>\n_a = _a + (e - _start_time)\n_bench.after_iteration(_after_iteration_cont)\n"} +{"id": "Pony/src-random-xorshift-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-string-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/src-net-net_address-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/files-Directory-_15.txt", "contents": "source: FilePath val\nlink_name: String val\n\nReturns\u00b6\n\nBool val\n\n\nremove\u00b6\n[Source]\nRemove the file or directory. The directory contents will be removed as\nwell, recursively. Symlinks will be removed but not traversed.\nfun box remove(\ntarget: String val)\n: Bool val\n\nParameters\u00b6\n\ntarget: String val\n"} +{"id": "Pony/builtin-I64-_59.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/files-FileMkdir-_0.txt", "contents": "\n\n\n\n\n\n\nFileMkdir\u00b6\n[Source]\nprimitive val FileMkdir\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileMkdir val^\n\nReturns\u00b6\n\nFileMkdir val^"} +{"id": "Pony/src-net-ossockopt-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/examples_7.txt", "contents": "# How to use the `cli` package to parse command line arguments\n\n```pony\nuse \"cli\"\n\nactor Main\nnew create(env: Env) =>\nlet command_spec =\ntry\nCommandSpec.leaf(\n\"pony-embed\",\n\"sample program\",\n[ OptionSpec.string(\"output\", \"output filename\", 'o') ],\n[ ArgSpec.string(\"input\", \"source of input\" where default' = \"-\") ]\n)? .> add_help()?\nelse\nenv.exitcode(1)\nreturn\nend\nlet command ="} +{"id": "Pony/pony_check-Generator-_10.txt", "contents": "Returns\u00b6\n\nGenerator[(T | U)] box\n\n\niter\u00b6\n[Source]\nfun box iter(\nrnd: Randomness ref)\n: Iterator[(T^ | (T^ , Iterator[T^] ref))] ref^\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nIterator[(T^ | (T^ , Iterator[T^] ref))] ref^\n\n"} +{"id": "Pony/src-strings-common_prefix-_0.txt", "contents": "\n\n\n\n\n\n\ncommon_prefix.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I8-_59.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991"} +{"id": "Pony/src-builtin-float-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-builtin-runtime_options-_7.txt", "contents": "and then overriding the fields of `rto` (the `RuntimeOptions` instance) as\nneeded.\n\nNOTE: Command line arguments still any values set via\n`@runtime_override_defaults`.\n\n\nThe following example overrides the `--ponyhelp` argument to default it to\n`true` instead of `false` causing the compiled program to always display\nthe Pony runtime help:\n\n```\nactor Main\nnew create(env: Env) =>\nenv.out.print(\"Hello, world.\")\n\nfun @runtime_override_defaults(rto: RuntimeOptions) =>\nrto.ponyhelp = true\n```\n\"\"\""} +{"id": "Pony/builtin-I16-_27.txt", "contents": "fun box shr_unsafe(\ny: U16 val)\n: I16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nI16 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_375.txt", "contents": "fun box sctp_ecn_cwr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ecn_echo\u00b6\n[Source]\nfun box sctp_ecn_echo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ecn_supported\u00b6\n[Source]"} +{"id": "Pony/src-random-mt-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101class MT is Random\n\"\"\"\nA Mersenne Twister. This is a non-cryptographic random number generator. This\nshould only be used for legacy applications that require a Mersenne Twister,\notherwise use Rand.\n\"\"\"\nembed _state: Array[U64]\nvar _index: USize\n\nnew create(x: U64 = 5489, y: U64 = 0) =>\n\"\"\""} +{"id": "Pony/files-File-_14.txt", "contents": "Set the cursor position relative to the end of the file.\nfun ref seek_end(\noffset: USize val)\n: None val\n\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nNone val\n\n\nseek\u00b6\n[Source]\nMove the cursor position.\nfun ref seek(\noffset: ISize val)\n: None val"} +{"id": "Pony/builtin-Integer-_14.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nrem_partial\u00b6\n[Source]\nCalculates the remainder of this number divided by y.\nThe result has the sign of the dividend.\nIf y is 0 or the operation overflows, this function errors.\nfun box rem_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_72.txt", "contents": "fun ipproto_ggp():I32 => @pony_os_sockopt_level(I32(4031))\nfun ipproto_gmtp():I32 => @pony_os_sockopt_level(I32(4032))\nfun ipproto_gre():I32 => @pony_os_sockopt_level(I32(4033))\nfun ipproto_hello():I32 => @pony_os_sockopt_level(I32(4034))\nfun ipproto_hip():I32 => @pony_os_sockopt_level(I32(4035))\nfun ipproto_hmp():I32 => @pony_os_sockopt_level(I32(4036))\nfun ipproto_hopopts():I32 => @pony_os_sockopt_level(I32(4037))\nfun ipproto_icmp():I32 => @pony_os_sockopt_level(I32(4038))\nfun ipproto_icmpv6():I32 => @pony_os_sockopt_level(I32(4039))\nfun ipproto_idp():I32 => @pony_os_sockopt_level(I32(4040))\nfun ipproto_idpr():I32 => @pony_os_sockopt_level(I32(4041))\nfun ipproto_idrp():I32 => @pony_os_sockopt_level(I32(4042))\nfun ipproto_igmp():I32 => @pony_os_sockopt_level(I32(4043))\nfun ipproto_igp():I32 => @pony_os_sockopt_level(I32(4044))\nfun ipproto_igrp():I32 => @pony_os_sockopt_level(I32(4045))\nfun ipproto_il():I32 => @pony_os_sockopt_level(I32(4046))\nfun ipproto_inlsp():I32 => @pony_os_sockopt_level(I32(4047))\nfun ipproto_inp():I32 => @pony_os_sockopt_level(I32(4048))\nfun ipproto_ip():I32 => @pony_os_sockopt_level(I32(4049))\nfun ipproto_ipcomp():I32 => @pony_os_sockopt_level(I32(4050))"} +{"id": "Pony/0_literals_10.txt", "contents": "## String Literal Instances\n\nWhen a single string literal is used several times in your Pony program, all of them will be converted to a single common instance. This means they will always be equal based on identity.\n\n```pony\nlet pony = \"\ud83d\udc0e\"\nlet another_pony = \"\ud83d\udc0e\"\nif pony is another_pony then\n// True, therefore this line will run.\nend\n```\n"} +{"id": "Pony/src-term-ansi_term-_30.txt", "contents": "be dispose() =>\n\"\"\"\nStop accepting input, inform the notifier we have closed, and dispose of\nour source.\n\"\"\"\nif not _closed then\n_esc_clear()\n_notify.closed()\n_source.dispose()\n_closed = true\nend\n\nbe _timeout() =>\n\"\"\"\nOur timer since receiving an ESC has expired. Send the buffered data as if\nit was not an escape sequence.\n\"\"\"\n_timer = None\n_esc_flush()\n"} +{"id": "Pony/src-files-file_mode-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-AsioEvent-_4.txt", "contents": "Bool val\n\n\noneshotable\u00b6\n[Source]\nReturns true if the flags contain the oneshot flag.\nfun box oneshotable(\nflags: U32 val)\n: Bool val\n\nParameters\u00b6\n\nflags: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ndispose\u00b6"} +{"id": "Pony/src-collections-sort-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-random-xoroshiro-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_bench-pony_bench-_10.txt", "contents": "class iso _Nothing is MicroBenchmark\n// Benchmark absolutely nothing.\nfun name(): String => \"Nothing\"\n\nfun apply() =>\n// prevent compiler from optimizing out this operation\nDoNotOptimise[None](None)\nDoNotOptimise.observe()\n\nclass iso _Fib is MicroBenchmark\n// Benchmark non-tail-recursive fibonacci\nlet _n: U64\n\nnew iso create(n: U64) =>\n_n = n\n\nfun name(): String =>\n\"_Fib(\" + _n.string() + \")\"\n\nfun apply() =>"} +{"id": "Pony/callbacks_6.txt", "contents": "}\n```\n\n`sqlite3_callback` is the type of the callback function that will be called by `sqlite3_exec` for each row returned by the `sql` statement. The first argument to the callback function is the pointer `pArg` that was passed to `sqlite3_exec`, the second argument is the number of columns in the row being processed, the third argument is data for each column, and the fourth argument is the name of each column.\n\nHere's the skeleton of some Pony code that uses `sqlite3_exec` to query an SQLite database, with examples of both the bare method way and the bare lambda way:\n\n```pony\nuse @sqlite3_exec[I32](db: Pointer[None] tag, sql: Pointer[U8] tag,\ncallback: Pointer[None], data: Pointer[None], err_msg: Pointer[Pointer[U8] tag] tag)\n\nclass SQLiteClient\nfun client_code() =>\n...\n@sqlite3_exec(db, sql.cstring(), addressof this.method_callback,\nthis, addressof zErrMsg)\n...\n\nfun @method_callback(client: SQLiteClient, argc: I32,\nargv: Pointer[Pointer[U8]], azColName: Pointer[Pointer[U8]]): I32"} +{"id": "Pony/builtin-I8-_26.txt", "contents": "I8 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U8 val)\n: I8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nI8 val\n\n\nshr_unsafe\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_19.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Nil[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Nil[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_234.txt", "contents": "fun box ip_recvopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvorigdstaddr\u00b6\n[Source]\nfun box ip_recvorigdstaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvpktinfo\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_114.txt", "contents": "(let t21, let t2_shrunken) = gen2.shrink(consume t2)\n(let t31, let t3_shrunken) = gen3.shrink(consume t3)\n(let t41, let t4_shrunken) = gen4.shrink(consume t4)\n\nlet shrunken = Iter[T1^](t1_shrunken)\n.zip3[T2^, T3^, T4^](t2_shrunken, t3_shrunken, t4_shrunken)\n((consume t11, consume t21, consume t31, consume t41), shrunken)\nend)\n\nfun map2[T1, T2, T3](\ngen1: Generator[T1],\ngen2: Generator[T2],\nfn: {(T1, T2): T3^})\n: Generator[T3]\n=>\n\"\"\"\nConvenience combinator for mapping 2 generators into 1.\n\"\"\"\nGenerators.zip2[T1, T2](gen1, gen2)\n.map[T3]({(arg) =>"} +{"id": "Pony/builtin-ILong-_51.txt", "contents": "\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-generator-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/collections-persistent-Nil-_18.txt", "contents": "\na: val->T\n\nReturns\u00b6\n\nBool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Nil[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Nil[A] val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-env-_6.txt", "contents": "let root: AmbientAuth\n\"\"\"\nThe root capability.\n\"\"\"\n\nlet input: InputStream\n\"\"\"\nStdin represented as an actor.\n\"\"\"\n\nlet out: OutStream\n\"\"\"Stdout\"\"\"\n\nlet err: OutStream\n\"\"\"Stderr\"\"\"\n\nlet args: Array[String] val\n\"\"\"The command line used to start the program.\"\"\"\n\nlet vars: Array[String] val"} +{"id": "Pony/src-pony_check-randomness-_13.txt", "contents": "\nnew ref create(seed1: U64 = 42, seed2: U64 = 0) =>\n_random = Rand(seed1, seed2)\n\nfun ref u8(min: U8 = U8.min_value(), max: U8 = U8.max_value()): U8 =>\n\"\"\"\nGenerate a U8 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nif (min == U8.min_value()) and (max == U8.max_value()) then\n_random.u8()\nelse\nmin + _random.int((max - min).u64() + 1).u8()\nend\n\nfun ref u16(min: U16 = U16.min_value(), max: U16 = U16.max_value()): U16 =>\n\"\"\"\nGenerate a U16 in closed interval [min, max]"} +{"id": "Pony/src-process-process_error-_6.txt", "contents": "primitive WriteError\nfun string(): String iso^ => \"WriteError\".clone()\n\nprimitive KillError // Not thrown at this time\nfun string(): String iso^ => \"KillError\".clone()\n\nprimitive CapError\nfun string(): String iso^ => \"CapError\".clone()\n\nprimitive ChdirError\nfun string(): String iso^ => \"ChdirError\".clone()\n\nprimitive UnknownError\nfun string(): String iso^ => \"UnknownError\".clone()\n\n\n\n\n\n"} +{"id": "Pony/cli-Command-_1.txt", "contents": "Returns\u00b6\n\nString iso^\n\n\nspec\u00b6\n[Source]\nReturns the spec for this command.\nfun box spec()\n: CommandSpec box\n\nReturns\u00b6\n\nCommandSpec box\n\n\nfullname\u00b6\n[Source]\nReturns the full name of this command, with its parents prefixed.\nfun box fullname()"} +{"id": "Pony/builtin-U128-_59.txt", "contents": "I16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I16-_60.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_77.txt", "contents": "fun box dccp_single_opt_maxlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_available_ccids\u00b6\n[Source]\nfun box dccp_sockopt_available_ccids()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_ccid\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-collections-hashable-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/encode-base64-Base64-_4.txt", "contents": "pad: U8 val = 61,\nlinelen: USize val = 0,\nlinesep: String val = \"\n\")\n: A^\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\nat62: U8 val = 43\nat63: U8 val = 47\npad: U8 val = 61\nlinelen: USize val = 0\nlinesep: String val = \"\n\"\n\nReturns\u00b6\n\nA^\n"} +{"id": "Pony/pony_check-Generators-_35.txt", "contents": "\nGenerator[I32 val] box\n\n\ni64\u00b6\n[Source]\nCreate a generator for I64 values.\nfun box i64(\nmin: I64 val = call,\nmax: I64 val = call)\n: Generator[I64 val] box\n\nParameters\u00b6\n\nmin: I64 val = call\nmax: I64 val = call\n\nReturns\u00b6\n\nGenerator[I64 val] box"} +{"id": "Pony/random-XorShift128Plus-_14.txt", "contents": "\nshuffle[A: A]\u00b6\n[Source]\nfun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n"} +{"id": "Pony/builtin-F64-_44.txt", "contents": "lt_unsafe\u00b6\nfun box lt_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\nle_unsafe\u00b6\nfun box le_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_475.txt", "contents": "fun box so_acceptconn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_acceptfilter\u00b6\n[Source]\nfun box so_acceptfilter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_atmpvc\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIPunctuation-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIPunctuation\u00b6\n[Source]\nprimitive val ASCIIPunctuation\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIPunctuation val^\n\nReturns\u00b6\n\nASCIIPunctuation val^"} +{"id": "Pony/builtin-SourceLoc-_0.txt", "contents": "\n\n\n\n\n\n\nSourceLoc\u00b6\n[Source]\nRepresents a location in a Pony source file, as reported by __loc.\ninterface val SourceLoc\n\nPublic Functions\u00b6\nfile\u00b6\n[Source]\nName and path of source file.\nfun box file()\n: String val\n\nReturns\u00b6"} +{"id": "Pony/builtin-InputNotify-_1.txt", "contents": "Parameters\u00b6\n\ndata: Array[U8 val] iso\n\nReturns\u00b6\n\nNone val\n\n\ndispose\u00b6\n[Source]\nCalled when no more data will arrive on the stream.\nfun ref dispose()\n: None val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/net-OSSockOpt-_372.txt", "contents": "fun box sctp_default_prinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_default_send_param\u00b6\n[Source]\nfun box sctp_default_send_param()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_default_sndinfo\u00b6\n[Source]"} +{"id": "Pony/src-time-timer-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126use \"collections\"\n\nclass Timer\n\"\"\"\nThe `Timer` class represents a timer that fires after an expiration\ntime, and then fires at an interval. When a `Timer` fires, it calls"} +{"id": "Pony/collections-HashMap-_17.txt", "contents": ": MapKeys[K, V, H, this->HashMap[K, V, H] ref] ref^\n\nReturns\u00b6\n\nMapKeys[K, V, H, this->HashMap[K, V, H] ref] ref^\n\n\nvalues\u00b6\n[Source]\nReturn an iterator over the values.\nfun box values()\n: MapValues[K, V, H, this->HashMap[K, V, H] ref] ref^\n\nReturns\u00b6\n\nMapValues[K, V, H, this->HashMap[K, V, H] ref] ref^\n\n\npairs\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_563.txt", "contents": "fun box tcpopt_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_tstamp_hdr\u00b6\n[Source]\nfun box tcpopt_tstamp_hdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_window\u00b6\n[Source]"} +{"id": "Pony/capsicum-CapRights0-_1.txt", "contents": "\nCapRights0 ref^\n\n\nfrom\u00b6\n[Source]\nInitialises with the rights from a FileCaps.\nnew ref from(\ncaps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] box)\n: CapRights0 ref^\n\nParameters\u00b6\n\ncaps: Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] box\n\nReturns\u00b6\n\nCapRights0 ref^\n\n"} +{"id": "Pony/builtin-USize-_44.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: USize val)\n: Bool val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_5.txt", "contents": "\nParameters\u00b6\n\npredicate: Bool val\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_true\u00b6\n[Source]\nAssert that the given expression is true.\nfun box assert_true(\npredicate: Bool val,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val"} +{"id": "Pony/buffered-Writer-_1.txt", "contents": "big-endian 32-bit integer\nlist_size - the number of items in the following list of items\nas a big-endian 32-bit integer\nzero or more items of the following data:\na big-endian 64-bit floating point number\na string that starts with a big-endian 32-bit integer that\nspecifies the length of the string, followed by a number of\nbytes that represent the string\n\nA message would be something like this:\n[message_length][list_size][float1][string1][float2][string2]...\n\nThe following program uses a write buffer to encode an array of\ntuples as a message of this type:\nuse \"buffered\"\n\nactor Main\nnew create(env: Env) =>\nlet wb = Writer\nlet messages = [[(F32(3597.82), \"Anderson\"); (F32(-7979.3), \"Graham\")]"} +{"id": "Pony/src-itertools-iter-_62.txt", "contents": "end\nelse\ntrue\nend\n\nfun ref next(): A! ? =>\nmatch _next = _None\n| let a: A! => a\nelse\nif _iter.has_next() then\n_find_next()\nnext()?\nelse\nerror\nend\nend\nend)\n\nfun ref filter_map_stateful[B](f: {ref(A!): (B^ | None) ?}): Iter[B]^ =>\n\"\"\""} +{"id": "Pony/src-term-readline-_37.txt", "contents": "let len = 40 + _cur_prompt.size() + _edit.size()\nlet out = recover String(len) end\n\n// Move to the left edge.\nout.append(\"\\r\")\n\n// Print the prompt.\nout.append(_cur_prompt)\n\n// Print the current line.\nout.append(_edit.clone())\n\n// Erase to the right edge.\nout.append(ANSI.erase())\n\n// Set the cursor position.\nvar pos = _cur_prompt.codepoints()\n\nif _cur_pos > 0 then\npos = pos + _edit.codepoints(0, _cur_pos)"} +{"id": "Pony/builtin-String-_30.txt", "contents": ": String iso^\n\nParameters\u00b6\n\nnum: USize val\n\nReturns\u00b6\n\nString iso^\n\n\nfind\u00b6\n[Source]\nReturn the index of the n-th instance of s in the string starting from the\nbeginning. Raise an error if there is no n-th occurrence of s or s is empty.\nfun box find(\ns: String box,\noffset: ISize val = 0,\nnth: USize val = 0)\n: ISize val ?"} +{"id": "Pony/src-collections-list-_68.txt", "contents": "my_list.unshift(\"d\") // my_list is [\"d\"; \"a\"; \"b\"; \"c\"]\n```\n\"\"\"\nprepend_node(ListNode[A](consume a))\n\nfun ref shift(): A^ ? =>\n\"\"\"\nRemoves the head value, raising an error if the head is empty.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.shift() end // Returns \"a\" and my_list is [\"b\"; \"c\"]\n```\n\"\"\"\nhead()? .> remove().pop()?\n\nfun ref append(\nseq: (ReadSeq[A] & ReadElement[A^]),\noffset: USize = 0,\nlen: USize = -1)"} +{"id": "Pony/builtin-USize-_21.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-timer_notify-_2.txt", "contents": "Called with the the number of times the timer has fired since this was last\ncalled. Usually, the value of `count` will be 1. If it is not 1, it means\nthat the timer isn't firing on schedule.\n\nFor example, if your timer is set to fire every 10 milliseconds, and\n`count` is 2, that means it has been between 20-29 milliseconds since the\nlast time your timer fired. Non 1 values for a timer are rare and indicate\na system under heavy load.\n\nReturn true to reschedule the timer (if it has an interval), or\nfalse to cancel the timer (even if it has an interval).\n\"\"\"\ntrue\n\nfun ref cancel(timer: Timer) =>\n\"\"\"\nCalled if the timer is cancelled. This is also called if the notifier\nreturns false from its `apply` method.\n\"\"\"\nNone"} +{"id": "Pony/src-net-ossockopt-_57.txt", "contents": "1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151"} +{"id": "Pony/src-collections-persistent-list-_45.txt", "contents": "Private helper for reverse, recursively working on elements.\n\"\"\"\nmatch l\n| let cons: Cons[A] => _reverse(cons.tail(), acc.prepend(cons.head()))\nelse\nacc\nend\n\nfun val prepend(a: val->A!): Cons[A] =>\n\"\"\"\nBuilds a new list with an element added to the front of this list.\n\"\"\"\nCons[A](consume a, this)\n\nfun val concat(l: List[A]): List[A] =>\n\"\"\"\nBuilds a new list that is the concatenation of this list and the provided\nlist.\n\"\"\"\n_concat(l, this.reverse())"} +{"id": "Pony/builtin-U64-_37.txt", "contents": "U64 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nop_not\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_503.txt", "contents": "fun box so_nofcs()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_nosigpipe\u00b6\n[Source]\nfun box so_nosigpipe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_notifyconflict\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-String-_62.txt", "contents": "compare_sub\u00b6\n[Source]\nLexically compare at most n bytes of the substring of this starting at\noffset with the substring of that starting at that_offset. The\ncomparison is case sensitive unless ignore_case is true.\nIf the substring of this is a proper prefix of the substring of that,\nthen this is Less than that. Likewise, if that is a proper prefix of\nthis, then this is Greater than that.\nBoth offset and that_offset can be negative, in which case the offsets\nare computed from the end of the string.\nIf n + offset is greater than the length of this, or n + that_offset\nis greater than the length of that, then the number of positions compared\nwill be reduced to the length of the longest substring.\nNeeds to be made UTF-8 safe.\nfun box compare_sub(\nthat: String box,\nn: USize val,\noffset: ISize val = 0,\nthat_offset: ISize val = 0,\nignore_case: Bool val = false)"} +{"id": "Pony/src-math-greatest_common_divisor-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-Bool-_5.txt", "contents": "Parameters\u00b6\n\ny: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nstring\u00b6"} +{"id": "Pony/net-OSSockOpt-_594.txt", "contents": "fun box tcp_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_user_timeout\u00b6\n[Source]\nfun box tcp_user_timeout()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_vendor\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_493.txt", "contents": "fun box so_l2cap_iflow()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_imtu\u00b6\n[Source]\nfun box so_l2cap_imtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_oflow\u00b6\n[Source]"} +{"id": "Pony/cli--index-_5.txt", "contents": "return\nend\n\nlet upper = cmd.option(\"upper\").bool()\nlet words = cmd.arg(\"words\").string_seq()\nfor word in words.values() do\nenv.out.write(if upper then word.upper() else word end + \" \")\nend\nenv.out.print(\"\")\n\nPublic Types\u00b6\n\nclass Arg\nclass ArgSpec\nclass Command\nclass CommandHelp\nclass CommandParser\nclass CommandSpec\nprimitive EnvVars\nprimitive Help"} +{"id": "Pony/6_type-aliases_3.txt", "contents": "primitive ColourList\nfun apply(): Array[Colour] =>\n[Red; Green; Blue]\n\nfor colour in ColourList().values() do\nenv.out.print(colour().string())\nend\n```\n"} +{"id": "Pony/src-builtin-float-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-U64-_40.txt", "contents": "fun box mul(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: U64 val)\n: U64 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-real-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/net-OSSockOpt-_448.txt", "contents": "fun box sctp_recv_rwnd_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_remote_udp_encaps_port\u00b6\n[Source]\nfun box sctp_remote_udp_encaps_port()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_reset_assoc\u00b6\n[Source]"} +{"id": "Pony/0_literals_3.txt", "contents": "```pony\nlet my_decimal_int: I32 = 1024\nlet my_hexadecimal_int: I32 = 0x400\nlet my_binary_int: I32 = 0b10000000000\n```\n\nFloating Point literals are expressed as standard floating point or scientific notation:\n\n```pony\nlet my_double_precision_float: F64 = 0.009999999776482582092285156250\nlet my_scientific_float: F32 = 42.12e-4\n```\n"} +{"id": "Pony/builtin-U16-_40.txt", "contents": "U16 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_30.txt", "contents": "min: U128 val = call,\nmax: U128 val = call)\n: Generator[U128 val] box\n\nParameters\u00b6\n\nmin: U128 val = call\nmax: U128 val = call\n\nReturns\u00b6\n\nGenerator[U128 val] box\n\n\nusize\u00b6\n[Source]\nCreate a generator for USize values.\nfun box usize(\nmin: USize val = call,\nmax: USize val = call)"} +{"id": "Pony/serialise-Serialised-_0.txt", "contents": "\n\n\n\n\n\n\nSerialised\u00b6\n[Source]\nThis represents serialised data. How it can be used depends on the other\ncapabilities a caller holds.\nclass val Serialised\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nA caller with SerialiseAuth can create serialised data from any object.\nnew ref create(\nauth: SerialiseAuth val,\ndata: Any box)"} +{"id": "Pony/files-FileCreate-_0.txt", "contents": "\n\n\n\n\n\n\nFileCreate\u00b6\n[Source]\nprimitive val FileCreate\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileCreate val^\n\nReturns\u00b6\n\nFileCreate val^"} +{"id": "Pony/term-ReadlineNotify-_1.txt", "contents": ": None val\n\nParameters\u00b6\n\nline: String val\nprompt: Promise[String val] tag\n\nReturns\u00b6\n\nNone val\n\n\ntab\u00b6\n[Source]\nReturn tab completion possibilities.\nfun ref tab(\nline: String val)\n: Seq[String val] box\n\nParameters\u00b6"} +{"id": "Pony/builtin-F64-_60.txt", "contents": "U32 val\n\n\nu64\u00b6\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nulong\u00b6\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n"} +{"id": "Pony/src-process-process_monitor-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-builtin-unsigned-_51.txt", "contents": "\nfun rem_partial(y: U8): U8 ? =>\n_UnsignedPartialArithmetic.rem_partial[U8](this, y)?\n\nfun divrem_partial(y: U8): (U8, U8) ? =>\n_UnsignedPartialArithmetic.divrem_partial[U8](this, y)?\n\nprimitive U16 is UnsignedInteger[U16]\nnew create(value: U16) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.u16()\n\nnew min_value() => 0\nnew max_value() => 0xFFFF\n\nfun next_pow2(): U16 =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): U16 => this\nfun bit_reverse(): U16 => @\"llvm.bitreverse.i16\"(this)"} +{"id": "Pony/src-cli-command_spec-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/net-TCPConnection-_17.txt", "contents": "writev\u00b6\n[Source]\nWrite a sequence of sequences of bytes. Data will be silently discarded if\nthe connection has not yet been established though.\nbe writev(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nmute\u00b6\n[Source]\nTemporarily suspend reading off this TCPConnection until such time as\nunmute is called.\nbe mute()\n\n\nunmute\u00b6"} +{"id": "Pony/src-builtin-array-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/consume-and-destructive-read_3.txt", "contents": "# Destructive read\n\nThere's another way to _move_ a value from one name to another. Earlier, we talked about how assignment in Pony returns the _old_ value of the left-hand side, rather than the new value. This is called _destructive read_, and we can use it to do what we want to do, even with fields.\n\n```pony\nclass Aardvark\nvar buddy: Wombat iso\n\nnew create() =>\nbuddy = recover Wombat end\n\nfun ref test(a: Wombat iso) =>\nvar b: Wombat iso = buddy = consume a // Allowed!\n```\n\nHere, we consume `a`, assign it to the field `buddy`, and assign the _old_ value of `buddy` to `b`.\n\n__Why is it ok to destructively read fields when we can't consume them?__ Because when we do a destructive read, we assign to the field so it always has a value. Unlike `consume`, there's no time when the field is empty. That means it's safe and the compiler doesn't complain.\n"} +{"id": "Pony/src-builtin-string-_63.txt", "contents": "1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271"} +{"id": "Pony/src-buffered-writer-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-map-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-file-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-I16-_25.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nI16 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U16 val)\n: I16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ISize-_26.txt", "contents": "[Source]\nfun box shl_unsafe(\ny: USize val)\n: ISize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nISize val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: USize val)\n: ISize val\n"} +{"id": "Pony/src-net-dns-_0.txt", "contents": "\n\n\n\n\n\n\ndns.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_531.txt", "contents": "fun box so_useloopback()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_user_cookie\u00b6\n[Source]\nfun box so_user_cookie()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vendor\u00b6\n[Source]"} +{"id": "Pony/1_classes_8.txt", "contents": "## Functions\n\nFunctions in Pony are like methods in Java, C#, C++, Ruby, Python, or pretty much any other object oriented language. They are introduced with the keyword `fun`. They can have parameters like constructors do, and they can also have a result type (if no result type is given, it defaults to `None`).\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U64\nvar _thirst_level: U64 = 1\n\nnew create(name': String) =>\nname = name'\n_hunger_level = 0\n\nnew hungry(name': String, hunger': U64) =>\nname = name'\n_hunger_level = hunger'\n\nfun hunger(): U64 => _hunger_level\n"} +{"id": "Pony/net-OSSockOpt-_120.txt", "contents": "fun box ipctl_stats()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_ephemeralfirst\u00b6\n[Source]\nfun box ipport_ephemeralfirst()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_ephemerallast\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_51.txt", "contents": "Bool val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-time-_20.txt", "contents": "\nfun _subseconds_from_query_performance_counter(subseconds: U64): U64 =>\n(let qpc, let qpf) = _query_performance_counter()\nif qpf <= subseconds then\nqpc * (subseconds / qpf)\nelse\n(qpc * subseconds) / qpf\nend\n\n\nfun _query_performance_counter(): (U64 /* qpc */, U64 /* qpf */) =>\n\"\"\"\nReturn QPC and QPF.\n\"\"\"\nifdef windows then\nvar pf: (U32, U32) = (0, 0)\nvar pc: (U32, U32) = (0, 0)\n@QueryPerformanceFrequency(addressof pf)\n@QueryPerformanceCounter(addressof pc)\nlet qpf = pf._1.u64() or (pf._2.u64() << 32)"} +{"id": "Pony/src-files-file_caps-_4.txt", "contents": "fun value(): U32 => 1 << 0\n\nprimitive FileChmod\nfun value(): U32 => 1 << 1\n\nprimitive FileChown\nfun value(): U32 => 1 << 2\n\nprimitive FileLink\nfun value(): U32 => 1 << 3\n\nprimitive FileLookup\nfun value(): U32 => 1 << 4\n\nprimitive FileMkdir\nfun value(): U32 => 1 << 5\n\nprimitive FileRead\nfun value(): U32 => 1 << 6\n"} +{"id": "Pony/builtin-U8-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/serialise-OutputSerialisedAuth-_0.txt", "contents": "\n\n\n\n\n\n\nOutputSerialisedAuth\u00b6\n[Source]\nThis is a capability token that allows the holder to examine serialised data.\nThis should only be provided to types that need to write serialised data to\nsome output stream, such as a file or socket. A type with the SerialiseAuth\ncapability should usually not also have OutputSerialisedAuth, as the\ncombination gives the holder the ability to examine the bitwise contents of\nany object it has a reference to.\nprimitive val OutputSerialisedAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyHelper-_2.txt", "contents": "params: String val\n\nReturns\u00b6\n\nPropertyHelper val^\n\n\nPublic fields\u00b6\nlet env: Env val\u00b6\n[Source]\n\nPublic Functions\u00b6\nlog\u00b6\n[Source]\nLog the given message.\nThe verbose parameter allows messages to be printed only when the\n--verbose command line option is used. For example, by default assert\nfailures are logged, but passes are not. With --verbose, both passes and\nfails are reported.\nLogs are printed one test at a time to avoid interleaving log lines from"} +{"id": "Pony/net-OSSockOpt-_440.txt", "contents": "fun box sctp_pcb_flags_zero_copy_active()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_status\u00b6\n[Source]\nfun box sctp_pcb_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_peeloff\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_40.txt", "contents": "USize val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/collections-Flag-_1.txt", "contents": ": A\n\nReturns\u00b6\n\nA\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-time-posix_date-_5.txt", "contents": "\nfun ref normal() =>\n\"\"\"\nNormalise all the fields of the date. For example, if the hour is 24, it is\nset to 0 and the day is advanced. This allows fields to be changed naively,\neg. adding 1000 to hours to advance the time by 1000 hours, and then\nnormalising the date.\n\"\"\"\n@ponyint_gmtime(this, time(), nsec.i64())\n\nfun format(fmt: String): String ? =>\n\"\"\"\nFormat the time as for strftime.\n\nWill return an empty string if the format string is \"%p\" or \"%P\".\n\"\"\"\nrecover\nString.from_cstring(@ponyint_formattime(this, fmt.cstring())?)\nend\n"} +{"id": "Pony/src-bureaucracy-custodian-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-time-timers-_0.txt", "contents": "\n\n\n\n\n\n\ntimers.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/consume-and-destructive-read_1.txt", "contents": "# Consuming a variable\n\nSometimes, you want to _move_ an object from one variable to another. In other words, you don't want to make a _second_ name for the object, you want to move the object from some existing name to a different one.\n\nYou can do this by using `consume`. When you `consume` a variable you take the value out of it, effectively leaving the variable empty. No code can read from that variable again until a new value is written to it. Consuming a local variable or a parameter allows you to move it to a new location, most importantly for `iso` and `trn`.\n\n```pony\nfun test(a: Wombat iso) =>\nvar b: Wombat iso = consume a // Allowed!\n```\n\nThe compiler is happy with that because by consuming `a`, you've said the value can't be used again and the compiler will complain if you try to.\n\n```pony\nfun test(a: Wombat iso) =>\nvar b: Wombat iso = consume a // Allowed!\nvar c: Wombat tag = a // Not allowed!\n```\n\nHere's an example of that. When you try to assign `a` to `c`, the compiler will complain."} +{"id": "Pony/builtin-U64-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: U64 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileStream-_2.txt", "contents": "data: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nwrite\u00b6\n[Source]\nPrint some bytes without inserting a newline afterwards.\nbe write(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nprintv\u00b6\n[Source]"} +{"id": "Pony/collections-List-_7.txt", "contents": "\nList[A] ref^\n\n\nunit\u00b6\n[Source]\nCreates a list with 1 node of element.\nlet my_list = List[String].unit(\"element\")\n\nnew ref unit(\na: A)\n: List[A] ref^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nList[A] ref^"} +{"id": "Pony/pony_check-IntPropertySample-_1.txt", "contents": "new ref create(\nchoice': U8 val,\nint': U128 val)\n: IntPropertySample ref^\n\nParameters\u00b6\n\nchoice': U8 val\nint': U128 val\n\nReturns\u00b6\n\nIntPropertySample ref^\n\n\nPublic fields\u00b6\nlet choice: U8 val\u00b6\n[Source]\n\nlet int: U128 val\u00b6"} +{"id": "Pony/src-net-tcp_connection-_74.txt", "contents": "else\n\"\"\nend\n\nfun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>\nif not _throttled then\ndata\nelse\nrecover Array[String] end\nend\n\nfun ref throttled(connection: TCPConnection ref) =>\n_throttled = true\n\nfun ref unthrottled(connection: TCPConnection ref) =>\n_throttled = false\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n"} +{"id": "Pony/net-OSSockOpt-_411.txt", "contents": "fun box sctp_nrsack_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_nr_selective_ack\u00b6\n[Source]\nfun box sctp_nr_selective_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_operation_error\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_97.txt", "contents": "if event isnt _event then\nif AsioEvent.writeable(flags) then\n// A connection has completed.\nvar fd = @pony_asio_event_fd(event)\n_connect_count = _connect_count - 1\n\nif not _connected and not _closed then\n// We don't have a connection yet.\nif _is_sock_connected(fd) then\n// The connection was successful, make it ours.\n_fd = fd\n_event = event\n_connected = true\n_writeable = true\n_readable = true\n\n_notify.connected(this)\n_queue_read()\n_pending_reads()\n"} +{"id": "Pony/ini-IniIncompleteSection-_2.txt", "contents": "fun box ne(\nthat: IniIncompleteSection val)\n: Bool val\n\nParameters\u00b6\n\nthat: IniIncompleteSection val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file_mode-_7.txt", "contents": "\"\"\"`true` if the owning user can write to the file.\"\"\"\n\nvar owner_exec: Bool = false\n\"\"\"`true` if the owning user can execute the file.\"\"\"\n\nvar group_read: Bool = true\n\"\"\"`true` if members of the owning group can read the file.\"\"\"\n\nvar group_write: Bool = false\n\"\"\"`true` if members of the owning group can write to the file.\"\"\"\n\nvar group_exec: Bool = false\n\"\"\"`true` if members of the owning group can execute the file.\"\"\"\n\nvar any_read: Bool = true\n\"\"\"`true` if every user can read the file.\"\"\"\n\nvar any_write: Bool = false\n\"\"\"`true` if every user can write to the file.\"\"\"\n"} +{"id": "Pony/src-collections-persistent-set-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/calling-c_6.txt", "contents": "```\n\nThe above example would also work if we used `Pointer[None]` for all the pointer types. By using a pointer to a primitive, we are adding a level of type safety, as the compiler will ensure that we don't pass a pointer to any other type as a parameter to `eglGetDisplay`. It is important to note that these primitives should __not be used anywhere except as a type parameter__ of `Pointer[]`, to avoid misuse.\n"} +{"id": "Pony/builtin-USize-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_test-test_helper-_29.txt", "contents": "\"\"\"\n_check_is[A](\"is\", consume expect, consume actual, msg, loc)\n\nfun _check_is[A](\ncheck: String,\nexpect: A,\nactual: A,\nmsg: String,\nloc: SourceLoc)\n: Bool\n=>\n\"\"\"\nCheck that the 2 given expressions resolve to the same instance\n\"\"\"\nif expect isnt actual then\nfail(_format_loc(loc) + \"Assert \" + check + \" failed. \" + msg\n+ \" Expected (\" + (digestof expect).string() + \") is (\"\n+ (digestof actual).string() + \")\")\nreturn false\nend"} +{"id": "Pony/builtin-I32-_30.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-time-timers-_13.txt", "contents": "be dispose() =>\n\"\"\"\nDispose of this set of timing wheels.\n\"\"\"\nfor wheel in _wheel.values() do\nwheel.clear()\nend\n_map.clear()\n\nif not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\n_event = AsioEvent.none()\nend\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nWhen the event fires, advance the timing wheels.\n\"\"\"\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(event)"} +{"id": "Pony/src-cli-command_parser-_35.txt", "contents": "fun parse(typ: _ValueType, arg: String): (_Value | SyntaxError) =>\ntry\ntyp.value_of(arg)?\nelse\nSyntaxError(arg, \"unable to convert '\" + arg + \"' to \" + typ.string())\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_5.txt", "contents": ": None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n\n\nafter_iteration\u00b6\n[Source]\nfun ref after_iteration(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val"} +{"id": "Pony/compiler-args_1.txt", "contents": "```bash\npip install mkdocs\nponyc packages/stdlib --docs && cd stdlib-docs && mkdocs serve\n```\n\nAnd point your web browser to [127.0.0.1:8000](http://127.0.0.1:8000) serving a live-reloading local version of the docs.\n\nNote that there is _no built-in debugger_ to interactively step through your program and interpret the results. But ponyc creates proper DWARF symbols and you can step through your programs with a conventional debugger, such as GDB or LLDB.\n"} +{"id": "Pony/builtin-F64-_36.txt", "contents": "Returns\u00b6\n\nI128 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\ni128_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box i128_unsafe()"} +{"id": "Pony/files-FileError-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileError val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_42.txt", "contents": "(tmp_dir as FilePath).remove()\nend\n\nfun apply(h: TestHelper)? =>\nlet dir = tmp_dir as FilePath\n// do something inside the temporary directory\n```\n\n\"\"\"\n\nuse \"time\"\nuse @ponyint_assert_disable_popups[None]()\n\nactor PonyTest\n\"\"\"\nMain test framework actor that organises tests, collates information and\nprints results.\n\"\"\"\n\nembed _groups: Array[(String, _Group)] = Array[(String, _Group)]"} +{"id": "Pony/net-OSSockOpt-_298.txt", "contents": "fun box rds_cong_monitor_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_free_mr\u00b6\n[Source]\nfun box rds_free_mr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_get_mr\u00b6\n[Source]"} +{"id": "Pony/cli-CommandSpec-_7.txt", "contents": "fun box commands()\n: HashMap[String val, CommandSpec box, HashEq[String val] val] box\n\nReturns\u00b6\n\nHashMap[String val, CommandSpec box, HashEq[String val] val] box\n\n\nargs\u00b6\n[Source]\nReturns an array of the positional arguments of this command.\nfun box args()\n: Array[ArgSpec val] box\n\nReturns\u00b6\n\nArray[ArgSpec val] box\n\n\nis_leaf\u00b6"} +{"id": "Pony/net-OSSockOpt-_604.txt", "contents": "fun box tipc_high_importance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_importance\u00b6\n[Source]\nfun box tipc_importance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_link_state\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/collections-List-_10.txt", "contents": "Returns the number of items in the list.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.size() // 3\n\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nGet the i-th element, raising an error if the index is out of bounds.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.apply(1)? end // \"b\"\n\nfun box apply(\ni: USize val = 0)"} +{"id": "Pony/4_control-structures_13.txt", "contents": "\nSo first we ask if there are any more names to get. If there are then we get a name and see if it's \"Jack\" or \"Jill\". If it is we're done and we break out of the loop, handing back the name we've found. If not we try again.\n\nThe line `name'` appears at the end of the loop so that will be our value returned from the last iteration if neither \"Jack\" nor \"Jill\" is found.\n\nThe `else` block provides our value of \"Herbert\" if there are no names available at all.\n\n__Can I break out of multiple, nested loops like the Java labeled break?__ No, Pony does not support that. If you need to break out of multiple loops you should probably refactor your code or use a worker function.\n"} +{"id": "Pony/src-pony_check-property_runner-_32.txt", "contents": "error\n\nbe run() =>\nif this._current_round.round() >= _params.num_samples then\ncomplete() // all samples have been successful\nreturn\nend\n\n// prepare property run\n(var sample, _shrinker) =\ntry\n_generate_with_retry(_params.max_generator_retries)?\nelse\n// break out if we were not able to generate a sample\n_notify.fail(\n\"Unable to generate samples from the given iterator, tried \" +\n_params.max_generator_retries.string() + \" times.\" +\n\" (round: \" + this._current_round.string() + \")\")\n_notify.complete(false)\nreturn"} +{"id": "Pony/signals-Sig-_17.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nusr2\u00b6\n[Source]\nfun box usr2()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nrt\u00b6\n[Source]\nfun box rt(\nn: U32 val)\n: U32 val ?"} +{"id": "Pony/src-builtin-runtime_options-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_65.txt", "contents": "fun box ipproto_wsn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_xnet\u00b6\n[Source]\nfun box ipproto_xnet()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_xtp\u00b6\n[Source]"} +{"id": "Pony/capsicum-CapRights0-_6.txt", "contents": "[Source]\nRemove the rights in that from this.\nfun ref remove(\nthat: CapRights0 ref)\n: None val\n\nParameters\u00b6\n\nthat: CapRights0 ref\n\nReturns\u00b6\n\nNone val\n\n\nclear\u00b6\n[Source]\nClear all rights.\nfun ref clear()\n: None val"} +{"id": "Pony/pony_check-ASCIIAllWithNUL-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIAllWithNUL\u00b6\n[Source]\nRepresents all ASCII characters,\nincluding the NUL (\\x00) character for its special treatment in C strings.\nprimitive val ASCIIAllWithNUL\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIAllWithNUL val^\n\nReturns\u00b6"} +{"id": "Pony/builtin-StringBytes-_2.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: U8 val ?\n\nReturns\u00b6\n\nU8 val ?\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_117.txt", "contents": "\nclass _EmptyIter[A]\nfun ref has_next(): Bool => false\nfun ref next(): A ? => error\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U16-_41.txt", "contents": "fun box divrem(\ny: U16 val)\n: (U16 val , U16 val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , U16 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/random-MT-_5.txt", "contents": "\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\nfun ref ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\nfun ref usize()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-time-timer-_11.txt", "contents": "\nif _interval > 0 then\n_interval = (_interval >> bits.u64()).max(1)\nend\n\nfun ref _fire(current: U64): Bool =>\n\"\"\"\nA timer is fired if its expiration time is in the past. The notifier is\ncalled with a count based on the elapsed time since expiration and the\ntimer interval. The expiration time is set to the next expiration. Returns\ntrue if the timer should be rescheduled, false otherwise.\n\"\"\"\nlet elapsed = current - _expiration\n\nif elapsed < (1 << 63) then\nlet count = (elapsed / _interval) + 1\n_expiration = _expiration + (count * _interval)\n\nif not _notify(this, count) then\n_notify.cancel(this)"} +{"id": "Pony/src-debug-debug-_9.txt", "contents": "fun _stream(stream: DebugStream): Pointer[U8] =>\nmatch stream\n| DebugOut => @pony_os_stdout()\n| DebugErr => @pony_os_stderr()\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_87.txt", "contents": "type WeightedGenerator[T] is (USize, Generator[T] box)\n\"\"\"\nA generator with an associated weight, used in Generators.frequency.\n\"\"\"\n\nprimitive Generators\n\"\"\"\nConvenience combinators and factories for common types and kind of Generators.\n\"\"\"\n\nfun unit[T](t: T, do_shrink: Bool = false): Generator[box->T] =>\n\"\"\"\nGenerate a reference to the same value over and over again.\n\nThis reference will be of type `box->T` and not just `T`\nas this generator will need to keep a reference to the given value.\n\"\"\"\nGenerator[box->T](\nobject is GenObj[box->T]\nlet _t: T = consume t"} +{"id": "Pony/builtin-I32-_59.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Platform-_11.txt", "contents": "Bool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Platform val)\n: Bool val\n\nParameters\u00b6\n\nthat: Platform val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/calling-c_11.txt", "contents": "## Return-type Polymorphism\n\nWe mentioned before that you should use the `Pointer[None]` type in Pony when dealing with values of `void*` type in C. This is very useful for function parameters, but when we use `Pointer[None]` for the return type of a C function, we won't be able to access the value that the pointer points to. Let's imagine a generic list in C:\n\n```C\nstruct List;\n\nstruct List* list_create();\nvoid list_free(struct List* list);\n\nvoid list_push(struct List* list, void *data);\nvoid* list_pop(struct List* list);\n```\n\nFollowing the advice from previous sections, we can write the following Pony declarations:\n\n```pony\nuse @list_create[Pointer[_List]]()\nuse @list_free[None](list: Pointer[_List])\n"} +{"id": "Pony/src-encode-base64-base64-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-U16-_30.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_help-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_606.txt", "contents": "fun box tipc_max_bearer_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_max_if_name\u00b6\n[Source]\nfun box tipc_max_if_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_max_link_name\u00b6\n[Source]"} +{"id": "Pony/backpressure-Backpressure-_4.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I8-_58.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_37.txt", "contents": "\nfun f32(): F32 => compile_intrinsic\nfun f64(): F64 => compile_intrinsic\n\nfun i8_unsafe(): I8 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun i16_unsafe(): I16 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun i32_unsafe(): I32 =>\n\"\"\""} +{"id": "Pony/src-net-tcp_connection-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-Array-_37.txt", "contents": "\npush_u64[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nAdd a U64 to the end of the array. This is only allowed for an array of U8s.\nfun ref push_u64[optional B: (A & Real[B] val & U8 val)](\nvalue: U64 val)\n: None val\n\nParameters\u00b6\n\nvalue: U64 val\n\nReturns\u00b6\n\nNone val\n\n\npush_u128[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nAdd a U128 to the end of the array. This is only allowed for an array of U8s."} +{"id": "Pony/src-builtin-real-_48.txt", "contents": "Integer division, rounded towards zero.\n\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nthis /~ y\n\nfun divrem_unsafe(y: A): (A, A) =>\n\"\"\"\nCalculates the quotient of this number and `y` and the remainder.\n\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\n(this /~ y, this %~ y)\n\nfun rem_unsafe(y: A): A =>\n\"\"\""} +{"id": "Pony/collections--index-_2.txt", "contents": "class MapPairs\nclass MapValues\ntype MaxHeap\nprimitive MaxHeapPriority\ntype MinHeap\nprimitive MinHeapPriority\nclass Range\nclass Reverse\nclass RingBuffer\ntype Set\ntype SetIs\nclass SetValues\nprimitive Sort\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/builtin-I16-_31.txt", "contents": "I16 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: I16 val)\n: (I16 val , I16 val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , I16 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-set-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-encode-base64-base64-_12.txt", "contents": "# Example code\n\n```pony\nuse \"encode/base64\"\n\nactor Main\nnew create(env: Env) =>\nenv.out.print(Base64.encode(\"foobar\"))\ntry\nenv.out.print(Base64.decode[String iso](\"Zm9vYmFy\")?)\nend\n```\n\"\"\"\nuse \"collections\"\nuse \"assert\"\n\nprimitive Base64\nfun encode_pem(data: ReadSeq[U8]): String iso^ =>\n\"\"\"\nEncode for PEM (RFC 1421)."} +{"id": "Pony/src-time-time-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/format-FormatGeneralLarge-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatGeneralLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatGeneralLarge val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-I32-_39.txt", "contents": "fun box divrem(\ny: I32 val)\n: (I32 val , I32 val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , I32 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_183.txt", "contents": "fun box ipx_maxsize()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_max_adapter_num\u00b6\n[Source]\nfun box ipx_max_adapter_num()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_mtu\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_23.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_test-TestHelper-_1.txt", "contents": "\nPublic fields\u00b6\nlet env: Env val\u00b6\n[Source]\nThe process environment.\nThis is useful for getting the root authority in\norder to access the filesystem (See files) or the network\n(See net) in your tests.\n\nPublic Functions\u00b6\nlog\u00b6\n[Source]\nLog the given message.\nThe verbose parameter allows messages to be printed only when the --verbose\ncommand line option is used. For example, by default assert failures are\nlogged, but passes are not. With --verbose both passes and fails are\nreported.\nLogs are printed one test at a time to avoid interleaving log lines from\nconcurrent tests.\nfun box log("} +{"id": "Pony/src-collections-list-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/net-OSSockOpt-_384.txt", "contents": "fun box sctp_from_middle_box()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_fr_logging_enable\u00b6\n[Source]\nfun box sctp_fr_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_addr_len\u00b6\n[Source]"} +{"id": "Pony/cli-Help-_4.txt", "contents": "\nthat: Help val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-persistent-VecPairs-_2.txt", "contents": "fun ref next()\n: (USize val , A) ?\n\nReturns\u00b6\n\n(USize val , A) ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/buffered-Writer-_0.txt", "contents": "\n\n\n\n\n\n\nWriter\u00b6\n[Source]\nA buffer for building messages.\nWriter provides an way to create byte sequences using common\ndata encodings. The Writer manages the underlying arrays and\nsizes. It is useful for encoding data to send over a network or\nstore in a file. Once a message has been built you can call done()\nto get the message's ByteSeqs, and you can then reuse the\nWriter for creating a new message.\nFor example, suppose we have a TCP-based network data protocol where\nmessages consist of the following:\n\nmessage_length - the number of bytes in the message as a"} +{"id": "Pony/builtin-ISize-_46.txt", "contents": "\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Lists-_2.txt", "contents": "h: val->A,\nt: (Cons[A] val | Nil[A] val))\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nh: val->A\nt: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\napply\u00b6\n[Source]\nBuilds a new list from an Array\nfun box apply(\narr: Array[val->A] ref)\n: (Cons[A] val | Nil[A] val)"} +{"id": "Pony/src-files-path-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/files-FileBadFileNumber-_0.txt", "contents": "\n\n\n\n\n\n\nFileBadFileNumber\u00b6\n[Source]\nprimitive val FileBadFileNumber\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileBadFileNumber val^\n\nReturns\u00b6\n\nFileBadFileNumber val^"} +{"id": "Pony/annotations_1.txt", "contents": "# What can be annotated\n\nAnnotations are allowed after any scoping keyword or symbol. The full list is:\n\n- `actor`\n- `class`\n- `struct`\n- `primitive`\n- `trait`\n- `interface`\n- `new`\n- `fun`\n- `be`\n- `if` (only as a condition, not as a guard)\n- `ifdef`\n- `elseif`\n- `else`\n- `while`\n- `repeat`\n- `until`"} +{"id": "Pony/src-process-process_error-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63class val ProcessError\nlet error_type: ProcessErrorType\nlet message: (String | None)\n\nnew val create(error_type': ProcessErrorType,\nmessage': (String | None) = None)\n=>\nerror_type = error_type'\nmessage = message'"} +{"id": "Pony/builtin-U128-_24.txt", "contents": "(U128 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]"} +{"id": "Pony/ponypath_2.txt", "contents": "## Unix/Mac\n\nEdit/add the `rc` file corresponding to your chosen shell (`echo $SHELL` will tell you what shell you are running). For example, if using bash, add the following to your `~/.bashrc`:\n\n```bash\nexport PONYPATH=$PONYPATH:$HOME/pony\n```\n\n(Then run `source ~/.bashrc` to add this variable to a running session. New terminal session will automatically source `~/.bashrc`.)\n"} +{"id": "Pony/builtin-SignedInteger-_32.txt", "contents": "A\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: A\n\nReturns\u00b6\n\nA\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/0_at-a-glance_1.txt", "contents": "# Static vs Dynamic: What's the difference?\n\nIn both kinds of language, your data has a type. So what's the difference?\n\nWith a _dynamically typed_ language, a variable can point to objects of different types at different times. This is flexible, because if you have a variable `x`, you can assign an integer to it, then assign a string to it, and your compiler or interpreter doesn't complain.\n\n__But what if I try to do a string operation on `x` after assigning an integer to it?__ Generally speaking, your program will raise an error. You might be able to handle the error in some way, depending on the language, but if you don't, your program will crash.\n\nWhen you use a _statically typed_ language, a variable has a type. That is, it can only point to objects of a certain type (although in Pony, a type can actually be a collection of types, as we'll see later). If you have an `x` that expects to point to an integer, you can't assign a string to it. Your compiler complains, and it complains __before__ you ever try to run your program.\n"} +{"id": "Pony/builtin-ILong-_40.txt", "contents": "[Source]\nfun box rem(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/term-EraseLeft-_0.txt", "contents": "\n\n\n\n\n\n\nEraseLeft\u00b6\n[Source]\nprimitive val EraseLeft\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: EraseLeft val^\n\nReturns\u00b6\n\nEraseLeft val^"} +{"id": "Pony/buffered-Reader-_33.txt", "contents": "\nReturns\u00b6\n\nU128 val ?\n\n\npeek_u128_le\u00b6\n[Source]\nPeek at a little-endian U128.\nfun box peek_u128_le(\noffset: USize val = 0)\n: U128 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU128 val ?"} +{"id": "Pony/src-builtin-array-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/net-OSSockOpt-_182.txt", "contents": "fun box ipx_immediatespxack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_internal\u00b6\n[Source]\nfun box ipx_internal()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_maxsize\u00b6\n[Source]"} +{"id": "Pony/time-Time-_1.txt", "contents": "Time val^\n\n\nPublic Functions\u00b6\nnow\u00b6\n[Source]\nThe wall-clock adjusted system time with nanoseconds.\nReturn: (seconds, nanoseconds)\nfun box now()\n: (I64 val , I64 val)\n\nReturns\u00b6\n\n(I64 val , I64 val)\n\n\nseconds\u00b6\n[Source]\nThe wall-clock adjusted system time.\nfun box seconds()"} +{"id": "Pony/collections-persistent-Vec-_1.txt", "contents": "\nVec[A] val^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturn the amount of values in the vector.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nGet the i-th element, raising an error if the index is out of bounds.\nfun box apply("} +{"id": "Pony/src-term-readline-_40.txt", "contents": "\nfun _save_history() =>\n\"\"\"\nWrite the history back to a file.\n\"\"\"\ntry\nwith file = File(_path as FilePath) do\nfor line in _history.values() do\nfile.print(line)\nend\nend\nend\n\n\n\n\n\n\n\n"} +{"id": "Pony/random-Random-_14.txt", "contents": "shuffle[A: A]\u00b6\n[Source]\nShuffle the elements of the array into a random order, mutating the array.\nfun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_361.txt", "contents": "fun box sctp_cmt_rpv2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_use_dac\u00b6\n[Source]\nfun box sctp_cmt_use_dac()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_connect_x\u00b6\n[Source]"} +{"id": "Pony/term-ANSINotify-_4.txt", "contents": "shift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\nright\u00b6\n[Source]\nfun ref right(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val"} +{"id": "Pony/builtin-FloatingPoint-_71.txt", "contents": "F64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n"} +{"id": "Pony/builtin-FloatingPoint-_22.txt", "contents": "\nBool val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: A\n\nReturns\u00b6\n\nA\n\n\nceil\u00b6\n[Source]\nfun box ceil()\n: A\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_603.txt", "contents": "fun box tipc_err_no_port()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_err_overload\u00b6\n[Source]\nfun box tipc_err_overload()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_high_importance\u00b6\n[Source]"} +{"id": "Pony/pony_bench-BenchConfig-_0.txt", "contents": "\n\n\n\n\n\n\nBenchConfig\u00b6\n[Source]\nConfiguration of a benchmark.\nclass val BenchConfig\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nsamples': USize val = 20,\nmax_iterations': U64 val = 1000000000,\nmax_sample_time': U64 val = 100000000)\n: BenchConfig val^"} +{"id": "Pony/builtin-USize-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_listener-_21.txt", "contents": "return\nend\n\nif AsioEvent.readable(flags) then\n_accept(arg)\nend\n\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(_event)\n_event = AsioEvent.none()\nend\n\nbe _conn_closed() =>\n\"\"\"\nAn accepted connection has closed. If we have dropped below the limit, try\nto accept new connections.\n\"\"\"\n_count = _count - 1\n\nif _paused and (_count < _limit) then"} +{"id": "Pony/src-collections-persistent-list-_31.txt", "contents": "l4_head == 1\nLists[U32].eq(l4, Lists[U32]([1; 2; 3]))?\nLists[U32].eq(l4_tail, Lists[U32]([2; 3]))?\n\nlet doubled = l4.map[U32]({(x) => x * 2 })\n\nLists[U32].eq(doubled, Lists[U32]([2; 4; 6]))?\nend\n```\n\"\"\"\n\nprimitive Lists[A]\n\"\"\"\nA primitive containing helper functions for constructing and\ntesting Lists.\n\"\"\"\n\nfun empty(): List[A] =>\n\"\"\"\nReturns an empty list."} +{"id": "Pony/src-collections-map-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-I32-_5.txt", "contents": "\nI32 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-pony_check-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-tcp_connection-_104.txt", "contents": "\nif _pending_sent < 16 then\n// If fewer than 16 asynchronous writes are scheduled, remove\n// backpressure. The choice of 16 is rather arbitrary and probably\n// needs to be tuned.\n_release_backpressure()\nend\nend\n\nbe _write_again() =>\n\"\"\"\nResume writing.\n\"\"\"\n_pending_writes()\n\nfun ref _pending_writes(): Bool =>\n\"\"\"\nSend pending data. If any data can't be sent, keep it and mark as not\nwriteable. On an error, dispose of the connection. Returns whether\nit sent all pending data or not."} +{"id": "Pony/src-collections-list-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/src-net-ossockopt-_79.txt", "contents": "fun dccp_sockopt_tx_ccid():I32 => @pony_os_sockopt_option(I32(22))\nfun dso_acceptmode():I32 => @pony_os_sockopt_option(I32(23))\nfun dso_conaccept():I32 => @pony_os_sockopt_option(I32(24))\nfun dso_conaccess():I32 => @pony_os_sockopt_option(I32(25))\nfun dso_condata():I32 => @pony_os_sockopt_option(I32(26))\nfun dso_conreject():I32 => @pony_os_sockopt_option(I32(27))\nfun dso_cork():I32 => @pony_os_sockopt_option(I32(28))\nfun dso_disdata():I32 => @pony_os_sockopt_option(I32(29))\nfun dso_info():I32 => @pony_os_sockopt_option(I32(30))\nfun dso_linkinfo():I32 => @pony_os_sockopt_option(I32(31))\nfun dso_max():I32 => @pony_os_sockopt_option(I32(32))\nfun dso_maxwindow():I32 => @pony_os_sockopt_option(I32(33))\nfun dso_nodelay():I32 => @pony_os_sockopt_option(I32(34))\nfun dso_seqpacket():I32 => @pony_os_sockopt_option(I32(35))\nfun dso_services():I32 => @pony_os_sockopt_option(I32(36))\nfun dso_stream():I32 => @pony_os_sockopt_option(I32(37))\nfun icmp_address():I32 => @pony_os_sockopt_option(I32(38))\nfun icmp_addressreply():I32 => @pony_os_sockopt_option(I32(39))\nfun icmp_dest_unreach():I32 => @pony_os_sockopt_option(I32(40))\nfun icmp_echo():I32 => @pony_os_sockopt_option(I32(41))"} +{"id": "Pony/src-builtin-signed-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-builtin-array-_60.txt", "contents": "Reserve space for len elements, including whatever elements are already in\nthe array. Array space grows geometrically.\n\"\"\"\nif _alloc < len then\n_alloc = len.next_pow2().max(len).max(8)\n_ptr = _ptr._realloc(_alloc, _size)\nend\n\nfun _element_size(): USize =>\n\"\"\"\nElement size in bytes for an element.\n\"\"\"\n_ptr._element_size()\n\nfun ref compact() =>\n\"\"\"\nTry to remove unused space, making it available for garbage collection. The\nrequest may be ignored.\n\"\"\"\nif _size <= (512 / _ptr._element_size()) then"} +{"id": "Pony/src-builtin-array-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/builtin-U128-_61.txt", "contents": "ILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_28.txt", "contents": "fun box ipproto_ip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipcomp\u00b6\n[Source]\nfun box ipproto_ipcomp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipcv\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_38.txt", "contents": "\nlower_in_place\u00b6\n[Source]\nTransforms the string to lower case. Currently only knows ASCII case.\nfun ref lower_in_place()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nupper\u00b6\n[Source]\nReturns an upper case version of the string. Currently only knows ASCII\ncase.\nfun box upper()\n: String iso^\n\nReturns\u00b6"} +{"id": "Pony/collections-MaxHeapPriority-_0.txt", "contents": "\n\n\n\n\n\n\nMaxHeapPriority[A: Comparable[A] #read]\u00b6\n[Source]\nprimitive val MaxHeapPriority[A: Comparable[A] #read] is\n_BinaryHeapPriority[A] val\n\nImplements\u00b6\n\n_BinaryHeapPriority[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/pony_test--index-_0.txt", "contents": "\n\n\n\n\n\n\nPonyTest package\u00b6\nThe PonyTest package provides a unit testing framework. It is designed to be as\nsimple as possible to use, both for the unit test writer and the user running\nthe tests.\nTo help simplify test writing and distribution this package depends on as few\nother packages as possible. Currently the required packages are:\n\nbuiltin\ntime\ncollections\n\nEach unit test is a class, with a single test function. By default all tests\nrun concurrently."} +{"id": "Pony/consume-and-destructive-read_0.txt", "contents": "# Consume and Destructive Read\n\nAn important part of Pony's capabilities is being able to say \"I'm done with this thing.\" We'll cover two means of handling this situation: consuming a variable and destructive reads.\n"} +{"id": "Pony/net-OSSockOpt-_166.txt", "contents": "fun box ipv6_recvrthdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvtclass\u00b6\n[Source]\nfun box ipv6_recvtclass()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_router_alert\u00b6\n[Source]"} +{"id": "Pony/src-files-file_caps-_5.txt", "contents": "primitive FileRemove\nfun value(): U32 => 1 << 7\n\nprimitive FileRename\nfun value(): U32 => 1 << 8\n\nprimitive FileSeek\nfun value(): U32 => 1 << 9\n\nprimitive FileStat\nfun value(): U32 => 1 << 10\n\nprimitive FileSync\nfun value(): U32 => 1 << 11\n\nprimitive FileTime\nfun value(): U32 => 1 << 12\n\nprimitive FileTruncate\nfun value(): U32 => 1 << 13"} +{"id": "Pony/src-files-directory-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-collections-range-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/0_at-a-glance_2.txt", "contents": "# Types are guarantees\n\nWhen the compiler knows what types things are, it can make sure some things in your program work without you having to run it or test it. These things are the _guarantees_ that a language's type system provides.\n\nThe more powerful a type system is, the more things it can prove about your program without having to run it.\n\n__Do dynamic types make guarantees too?__ Yes, but they do it at runtime. For example, if you call a method that doesn't exist, you will usually get some kind of exception. But you'll only find out when you try to run your program.\n"} +{"id": "Pony/process-Signaled-_1.txt", "contents": "Constructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nsig: U32 val)\n: Signaled val^\n\nParameters\u00b6\n\nsig: U32 val\n\nReturns\u00b6\n\nSignaled val^\n\n\nPublic Functions\u00b6\nsignal\u00b6\n[Source]\nRetrieve the signal number that exited the process."} +{"id": "Pony/pony_test-PonyTest-_0.txt", "contents": "\n\n\n\n\n\n\nPonyTest\u00b6\n[Source]\nMain test framework actor that organises tests, collates information and\nprints results.\nactor tag PonyTest\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a PonyTest object and use it to run the tests from the given\nTestList\nnew tag create(\nenv: Env val,"} +{"id": "Pony/pony_check-PonyCheck-_4.txt", "contents": "\nParameters\u00b6\n\ngen1: Generator[T1] val\ngen2: Generator[T2] val\ngen3: Generator[T3] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll3[T1, T2, T3] ref\n\n\nfor_all4[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\nfun box for_all4[T1: T1, T2: T2, T3: T3, T4: T4](\ngen1: Generator[T1] val,\ngen2: Generator[T2] val,\ngen3: Generator[T3] val,\ngen4: Generator[T4] val,"} +{"id": "Pony/builtin-I16-_49.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/src-builtin-iterator-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-net-tcp_listener-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-promises-promise-_42.txt", "contents": "let _space: USize\nlet _p: Promise[Array[A] val]\n\nnew create(p: Promise[Array[A] val], space: USize) =>\n(_xs, _space, _p) = (Array[A](space), space, p)\n\nbe apply(a: A) =>\n_xs.push(a)\nif _xs.size() == _space then\nlet len = _xs.size()\nlet xs = recover Array[A](len) end\nfor x in _xs.values() do\nxs.push(x)\nend\n_p(consume xs)\nend\n\nprimitive _None\n\n"} +{"id": "Pony/builtin-Stdin-_0.txt", "contents": "\n\n\n\n\n\n\nStdin\u00b6\n[Source]\nAsynchronous access to stdin. The constructor is private to ensure that\naccess is provided only via an environment.\nReading from stdin is done by registering an InputNotify:\nactor Main\nnew create(env: Env) =>\n// do not forget to call `env.input.dispose` at some point\nenv.input(\nobject iso is InputNotify\nfun ref apply(data: Array[U8] iso) =>\nenv.out.write(String.from_iso_array(consume data))\n"} +{"id": "Pony/net-OSSockOpt-_50.txt", "contents": "fun box ipproto_rvd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_satexpak\u00b6\n[Source]\nfun box ipproto_satexpak()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_satmon\u00b6\n[Source]"} +{"id": "Pony/src-collections-set-_20.txt", "contents": "\"\"\"\nRemove everything that isn't in that.\n\"\"\"\nlet start_size = _map.size()\nvar seen: USize = 0\nvar i: USize = -1\n\nwhile seen < start_size do\ntry\ni = next_index(i)?\nif not that.contains(index(i)?) then\nunset(index(i)?)\nend\nend\nseen = seen + 1\nend\n\nfun ref difference(that: Iterator[A^]) =>\n\"\"\"\nRemove elements in this which are also in that. Add elements in that which"} +{"id": "Pony/src-math-fibonacci-_2.txt", "contents": "32\n33class Fibonacci[A: (Integer[A] val & Unsigned) = U64] is Iterator[A]\n\"\"\"\nUseful for microbenchmarks to impress your friends. Look y'all, Pony goes\nfast! We suppose if you are into Agile planning poker that you could also\nuse this in conjunction with `Random` to assign User Story Points.\n\"\"\"\nvar _last: A = 0\nvar _next: A = 0\nvar _uber_next: A = 1\n\nfun apply(n: U8): A =>\nif n == 0 then 0\nelseif n == 1 then 1\nelse\nlet j = n / 2\nlet fib_j = apply(j)\nlet fib_i = apply(j - 1)\n\nif (n % 2) == 0 then"} +{"id": "Pony/builtin-ILong-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: ILong val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nILong val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: ILong val^\n\nReturns\u00b6\n"} +{"id": "Pony/examples_8.txt", "contents": "match CommandParser(command_spec).parse(env.args, env.vars)\n| let c: Command => c\n| let ch: CommandHelp =>\nch.print_help(env.out)\nenv.exitcode(0)\nreturn\n| let se: SyntaxError =>\nenv.err.print(se.string())\nenv.exitcode(1)\nreturn\nend\nlet input_source = command.arg(\"input\").string()\nlet output_filename = command.option(\"output\").string()\nenv.out.print(\"Loading data from \" + input_source + \". Writing output to \" + output_filename)\n// ...\n```\n"} +{"id": "Pony/pony_check-ASCIIDigits-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIDigits\u00b6\n[Source]\nprimitive val ASCIIDigits\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIDigits val^\n\nReturns\u00b6\n\nASCIIDigits val^"} +{"id": "Pony/builtin-ArrayPairs-_1.txt", "contents": "new ref create(\narray: B)\n: ArrayPairs[A, B] ref^\n\nParameters\u00b6\n\narray: B\n\nReturns\u00b6\n\nArrayPairs[A, B] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/src-process-process_monitor-_45.txt", "contents": "_read_len = 0\n_read_buf_size()\n\nsum = sum + len.usize()\nif sum > (1 << 12) then\n// If we've read 4 kb, yield and read again later.\n_read_again(pipe.near_fd)\nreturn\nend\nend\n\nfun ref _read_buf_size() =>\nif _expect > 0 then\n_read_buf.undefined(_expect)\nelse\n_read_buf.undefined(_max_size)\nend\n\nbe _read_again(near_fd: U32) =>\n\"\"\""} +{"id": "Pony/src-pony_bench-pony_bench-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-itertools-iter-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/object-capabilities_1.txt", "contents": "# How is that unforgeable?\n\nSince Pony has no pointer arithmetic and is both type-safe and memory-safe, object references can't be \"invented\" (i.e. forged) by the program. You can only get one by constructing an object or being passed an object.\n\n__What about the C-FFI?__ Using the C-FFI can break this guarantee. We'll talk about the __C-FFI trust boundary__ later, and how to control it.\n"} +{"id": "Pony/builtin-U128-_8.txt", "contents": "fun box ctz_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_97.txt", "contents": "fun box icmp_frag_needed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_host_ano\u00b6\n[Source]\nfun box icmp_host_ano()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_host_isolated\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_34.txt", "contents": "fun box rem_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-DNSAuth-_0.txt", "contents": "\n\n\n\n\n\n\nDNSAuth\u00b6\n[Source]\nprimitive val DNSAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: (AmbientAuth val | NetAuth val))\n: DNSAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-USize-_15.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-array-_73.txt", "contents": "from_cpointer(_ptr._offset(offset)._unsafe(), size', alloc)\nelse\ncreate()\nend\nend\n\nfun iso chop[B: (A & Any #send) = A](split_point: USize): (Array[A] iso^, Array[A] iso^) =>\n\"\"\"\nChops the array in half at the split point requested and returns both\nthe left and right portions. The original array is trimmed in place and\nreturned as the left portion. If the split point is larger than the\narray, the left portion is the original array and the right portion\nis a new empty array.\nThe operation does not allocate a new array pointer nor copy elements.\n\nThe entry type must be sendable so that the two halves can be isolated.\nOtherwise, two entries may have shared references to mutable data,\nor even to each other, such as in the code below:\n\n```pony"} +{"id": "Pony/src-builtin-float-_45.txt", "contents": "\"\"\"\n-307\n\nfun tag max_exp2(): I16 =>\n\"\"\"\nMaximum exponent value such that (2^exponent) - 1 is representable.\n\"\"\"\n1024\n\nfun tag max_exp10(): I16 =>\n\"\"\"\nMaximum exponent value such that (10^exponent) - 1 is representable.\n\"\"\"\n308\n\nfun abs(): F64 => @\"llvm.fabs.f64\"(this)\nfun ceil(): F64 => @\"llvm.ceil.f64\"(this)\nfun floor(): F64 => @\"llvm.floor.f64\"(this)\nfun round(): F64 => @\"llvm.round.f64\"(this)\nfun trunc(): F64 => @\"llvm.trunc.f64\"(this)"} +{"id": "Pony/builtin-I128-_0.txt", "contents": "\n\n\n\n\n\n\nI128\u00b6\n[Source]\nprimitive val I128 is\nSignedInteger[I128 val, U128 val] val\n\nImplements\u00b6\n\nSignedInteger[I128 val, U128 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_32.txt", "contents": "nth: USize val = 0)\n: ISize val ?\n\nParameters\u00b6\n\ns: String box\noffset: ISize val = call\nnth: USize val = 0\n\nReturns\u00b6\n\nISize val ?\n\n\ncontains\u00b6\n[Source]\nReturns true if contains s as a substring, false otherwise.\nfun box contains(\ns: String box,\noffset: ISize val = 0,"} +{"id": "Pony/4_control-structures_17.txt", "contents": "where T is the type of the objects in the collection. You don't need to worry about this unless you're writing your own iterators. To use existing collections, such as those provided in the standard library, you can just use `for` and it will all work. If you do write your own iterators, note that we use structural typing, so your iterator doesn't need to declare that it provides any particular type.\n\nYou can think of the above example as being equivalent to:\n\n```pony\nlet iterator = [\"Bob\"; \"Fred\"; \"Sarah\"].values()\nwhile iterator.has_next() do\nlet name = iterator.next()?\nenv.out.print(name)\nend\n```\n\nNote that the variable __name__ is declared _let_, so you cannot assign to the control variable within the loop.\n\n__Can I use break and continue with for loops?__ Yes, `for` loops can have `else` expressions attached and can use `break` and `continue` just as for `while`.\n"} +{"id": "Pony/collections-persistent-VecValues-_2.txt", "contents": "fun ref next()\n: val->A ?\n\nReturns\u00b6\n\nval->A ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/6_type-aliases_6.txt", "contents": "```\n\nAgain there's something new here. After the name `SetIs` comes the name `A` in square brackets. That's because `SetIs` is a __generic type__. That is, you can give a `SetIs` another type as a parameter, to make specific kinds of set. If you've used Java or C#, this will be pretty familiar. If you've used C++, the equivalent concept is templates, but they work quite differently.\n\nAnd again the use of `type` just provides a more convenient way to refer to the type we're aliasing:\n\n```pony\nHashSet[A, HashIs[A!]]\n```\n\nThat's another __generic type__. It means a `SetIs` is really a kind of `HashSet`. Another concept has snuck in, which is `!` types. This is a type that is the __alias__ of another type. That's tricky stuff that you only need when writing complex generic types, so we'll leave it for later.\n\nOne more example, again from the standard library, is the `Map` type that gets used a lot. It's actually a type alias. Here's the real definition of `Map`:\n\n```pony\ntype Map[K: (Hashable box & Comparable[K] box), V] is HashMap[K, V, HashEq[K]]\n```\n\nUnlike our previous example, the first type parameter, `K`, has a type associated with it. This is a __constraint__, which means when you parameterise a `Map`, the type you pass for `K` must be a subtype of the constraint.\n"} +{"id": "Pony/net-OSSockOpt-_46.txt", "contents": "fun box ipproto_pvp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_raw\u00b6\n[Source]\nfun box ipproto_raw()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_rccmon\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_85.txt", "contents": "_read_buf = recover Array[U8] .> undefined(read_buffer_size) end\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_notify = consume notify\nlet asio_flags =\nifdef not windows then\nAsioEvent.read_write_oneshot()\nelse\nAsioEvent.read_write()\nend\n(let host', let service') = _notify.proxy_via(host, service)\n_connect_count =\n@pony_os_connect_tcp4(this, host'.cstring(), service'.cstring(),\nfrom.cstring(), asio_flags)\n_notify_connecting()\n\nnew ip6(\nauth: TCPConnectAuth,\nnotify: TCPConnectionNotify iso,"} +{"id": "Pony/src-time-timers-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/format-AlignRight-_2.txt", "contents": "fun box ne(\nthat: AlignRight val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignRight val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/src-net-ossockopt-_100.txt", "contents": "fun rds_cmsg_masked_atomic_fadd():I32 => @pony_os_sockopt_option(I32(442))\nfun rds_cmsg_rdma_args():I32 => @pony_os_sockopt_option(I32(443))\nfun rds_cmsg_rdma_dest():I32 => @pony_os_sockopt_option(I32(444))\nfun rds_cmsg_rdma_map():I32 => @pony_os_sockopt_option(I32(445))\nfun rds_cmsg_rdma_status():I32 => @pony_os_sockopt_option(I32(446))\nfun rds_cong_monitor():I32 => @pony_os_sockopt_option(I32(447))\nfun rds_cong_monitor_size():I32 => @pony_os_sockopt_option(I32(448))\nfun rds_free_mr():I32 => @pony_os_sockopt_option(I32(449))\nfun rds_get_mr():I32 => @pony_os_sockopt_option(I32(450))\nfun rds_get_mr_for_dest():I32 => @pony_os_sockopt_option(I32(451))\nfun rds_ib_abi_version():I32 => @pony_os_sockopt_option(I32(452))\nfun rds_ib_gid_len():I32 => @pony_os_sockopt_option(I32(453))\nfun rds_info_connections():I32 => @pony_os_sockopt_option(I32(454))\nfun rds_info_connection_flag_connected():I32 => @pony_os_sockopt_option(I32(455))\nfun rds_info_connection_flag_connecting():I32 => @pony_os_sockopt_option(I32(456))\nfun rds_info_connection_flag_sending():I32 => @pony_os_sockopt_option(I32(457))\nfun rds_info_connection_stats():I32 => @pony_os_sockopt_option(I32(458))\nfun rds_info_counters():I32 => @pony_os_sockopt_option(I32(459))\nfun rds_info_first():I32 => @pony_os_sockopt_option(I32(460))\nfun rds_info_ib_connections():I32 => @pony_os_sockopt_option(I32(461))"} +{"id": "Pony/src-pony_check-generator-_82.txt", "contents": "\"\"\"\nshrink `t` using the generator this one filters upon\nand call the filter predicate on the shrunken values\n\"\"\"\n(let s, let shrunken: Iterator[T^]) = _gen.shrink(consume t)\n(consume s, _filter_shrunken(shrunken))\n\nfun _filter_shrunken(shrunken: Iterator[T^]): Iterator[T^] =>\nIter[T^](shrunken)\n.filter_map[T^]({\n(t: T): (T^| None) =>\nmatch predicate(consume t)\n| (let matching: T, true) => consume matching\nend\n})\nend)\n\nfun map[U](fn: {(T): U^} box)\n: Generator[U]\n=>"} +{"id": "Pony/itertools-Iter-_4.txt", "contents": "new ref repeat_value(\nvalue: A)\n: Iter[A] ref^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nIter[A] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun ref has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-env-_9.txt", "contents": "input = input'\nout = out'\nerr = err'\nargs = args'\nvars = vars'\nexitcode = exitcode'\n\nfun tag _count_strings(data: Pointer[Pointer[U8]] val): USize =>\nif data.is_null() then\nreturn 0\nend\n\nvar i: USize = 0\n\nwhile\nlet entry = data._apply(i)\nnot entry.is_null()\ndo\ni = i + 1\nend"} +{"id": "Pony/src-cli-command-_14.txt", "contents": "fun bool(): Bool =>\n\"\"\"\nReturns the option value as a Bool, defaulting to false.\n\"\"\"\ntry _value as Bool else false end\n\nfun string(): String =>\n\"\"\"\nReturns the option value as a String, defaulting to empty.\n\"\"\"\ntry _value as String else \"\" end\n\nfun i64(): I64 =>\n\"\"\"\nReturns the option value as an I64, defaulting to 0.\n\"\"\"\ntry _value as I64 else I64(0) end\n\nfun u64(): U64 =>\n\"\"\""} +{"id": "Pony/src-builtin-float-_37.txt", "contents": "fun infinite(): Bool =>\n\"\"\"\nCheck whether this number is +/-infinity\n\"\"\"\n// True if exponent is all 1s and mantissa is 0\n((bits() and 0x7F800000) == 0x7F800000) and // exp\n((bits() and 0x007FFFFF) == 0) // mantissa\n\nfun nan(): Bool =>\n\"\"\"\nCheck whether this number is NaN.\n\"\"\"\n// True if exponent is all 1s and mantissa is non-0\n((bits() and 0x7F800000) == 0x7F800000) and // exp\n((bits() and 0x007FFFFF) != 0) // mantissa\n\nfun ldexp(x: F32, exponent: I32): F32 =>\n@ldexpf(x, exponent)\n\nfun frexp(): (F32, U32) =>"} +{"id": "Pony/files-Path-_17.txt", "contents": "String val\n\n\nsplit_list\u00b6\n[Source]\nSeparate a list of paths into an array of cleaned paths.\nfun box split_list(\npath: String val)\n: Array[String val] iso^\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nArray[String val] iso^\n\n\nrandom\u00b6"} +{"id": "Pony/pony_check-ASCIIAll-_2.txt", "contents": "\nParameters\u00b6\n\nthat: ASCIIAll val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIAll val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIAll val\n"} +{"id": "Pony/src-collections-map-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_5.txt", "contents": "fun box ipproto_ahip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_apes\u00b6\n[Source]\nfun box ipproto_apes()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_argus\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_41.txt", "contents": "fun box eq(\ny: I16 val)\n: Bool val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: I16 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-Real-_2.txt", "contents": "I64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val) & Real[B] val)](\na: B)\n: Real[A] val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()"} +{"id": "Pony/symbol-lookup-cheat-sheet_0.txt", "contents": "# Symbol Lookup Cheat Sheet\n\nPony, like just about any other programming language, has plenty of odd symbols that make up its syntax. If you don't remember what one means, it can be hard to search for them. Below you'll find a table with various Pony symbols and what you should search the tutorial for in order to learn more about the symbol.\n\n| Symbol | Search Keywords |\n| ------ | --------------------- |\n| `!` | Alias |\n| `->` | Arrow type, viewpoint |\n| `.>` | Chaining |\n| `^` | Ephemeral |\n| `@` | FFI |\n| `&` | Intersection |\n| `=>` | Match arrow |\n| `~` | Partial application |\n| `?` | Partial function |\n| `'` | Prime |\n| `<:` | Subtype |\n\nHere is a more elaborate explanation of Pony's use of special characters: (a line with (2) or (3) means an alternate usage of the symbol of the previous line)\n"} +{"id": "Pony/builtin-U32-_28.txt", "contents": "U32 val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nrotr\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-udp_socket-_41.txt", "contents": "\nbe dispose() =>\n\"\"\"\nStop listening.\n\"\"\"\nif not _closed then\n_close()\nend\n\nfun local_address(): NetAddress =>\n\"\"\"\nReturn the bound IP address.\n\"\"\"\n_ip\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nWhen we are readable, we accept new connections until none remain.\n\"\"\"\nif event isnt _event then"} +{"id": "Pony/src-files-directory-_32.txt", "contents": "else\ncompile_error \"unsupported platform\"\nend\n\n_FileDes.set_rights(_fd, path)?\n\nnew iso _relative(path': FilePath, fd': I32) =>\n\"\"\"\nInternal constructor. Capsicum rights are already set by inheritence.\n\"\"\"\npath = path'\n_fd = fd'\n\nfun entries(): Array[String] iso^ ? =>\n\"\"\"\nThe entries will include everything in the directory, but it is not\nrecursive. The path for the entry will be relative to the directory, so it\nwill contain no directory separators. The entries will not include \".\" or\n\"..\".\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_321.txt", "contents": "fun box rose_invalid_facility()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_local_procedure\u00b6\n[Source]\nfun box rose_local_procedure()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_max_digis\u00b6\n[Source]"} +{"id": "Pony/src-pony_bench-pony_bench-_14.txt", "contents": "option, if possible, and run with the `--ponynoyield` option.\n\"\"\"\n// TODO more examples in tutorial\n\nactor PonyBench\nlet _env: Env\nlet _output_manager: _OutputManager\nembed _bench_q: Array[(Benchmark, Bool)] = Array[(Benchmark, Bool)]\nvar _running: Bool = false\n\nnew create(env: Env, list: BenchmarkList) =>\n_env = consume env\nifdef debug then\n_env.err.print(\"***WARNING*** Benchmark was built as DEBUG. Timings may be affected.\")\nend\n\n_output_manager =\nif _env.args.contains(\"-csv\", {(a, b) => a == b })\nthen _CSVOutput(_env)\nelse _TerminalOutput(_env)"} +{"id": "Pony/net--index-_0.txt", "contents": "\n\n\n\n\n\n\nNet package\u00b6\nThe Net package provides support for creating UDP and TCP clients and\nservers, reading and writing network data, and establishing UDP and\nTCP connections.\nPublic Types\u00b6\n\nprimitive DNS\nprimitive DNSAuth\nclass NetAddress\nprimitive NetAuth\nclass NoProxy\nprimitive OSSockOpt\ninterface Proxy"} +{"id": "Pony/src-collections-persistent-list-_35.txt", "contents": "fun values(): Iterator[val->A]^ =>\n\"\"\"\nReturns an empty iterator over the elements of the empty list.\n\"\"\"\nobject ref is Iterator[val->A]\nfun has_next(): Bool => false\nfun ref next(): val->A! ? => error\nend\n\nfun is_empty(): Bool =>\n\"\"\"\nReturns a Bool indicating if the list is empty.\n\"\"\"\ntrue\n\nfun is_non_empty(): Bool =>\n\"\"\"\nReturns a Bool indicating if the list is non-empty.\n\"\"\"\nfalse"} +{"id": "Pony/src-collections-list_node-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/9_object-literals_7.txt", "contents": "env.out.print(\"Result: \" + r.string())\n\nfun reduce(l: List[U32], acc: U32, f: {(U32, U32): U32} val): U32 =>\ntry\nlet acc' = f(acc, l.shift()?)\nreduce(l, acc', f)\nelse\nacc\nend\n```\n\nThe `reduce` method in this example requires the lambda type for the `f` parameter to require a reference capability of `val`. The lambda object passed in as an argument does not need to declare an explicit reference capability because `val` is the default for a lambda that does not capture anything.\n\nAs mentioned previously the lambda desugars to an object literal with an `apply` method. The reference capability for the `apply` method defaults to `box` like any other method. In a lambda that captures references, this needs to be `ref` if the function needs to modify any of the captured variables or call `ref` methods on them. The reference capability for the method (versus the reference capability for the object which was described above) is defined by putting the capability before the parenthesized argument list.\n\n```pony\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>"} +{"id": "Pony/src-collections-map-_26.txt", "contents": "\"\"\"\nThe number of items in the map.\n\"\"\"\n_size\n\nfun space(): USize =>\n\"\"\"\nThe available space in the map. Resize will happen when\nsize / space >= 0.75.\n\"\"\"\n_array.space()\n\nfun apply(key: box->K!): this->V ? =>\n\"\"\"\nGets a value from the map. Raises an error if no such item exists.\n\"\"\"\n(let i, let found) = _search(key)\n\nif found then\n_array(i)? as (_, this->V)"} +{"id": "Pony/process-Exited-_4.txt", "contents": "\nthat: (Exited val | Signaled val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/random-XorOshiro128Plus-_8.txt", "contents": "[Source]\nfun ref i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6"} +{"id": "Pony/builtin-U64-_30.txt", "contents": "U64 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-map-_31.txt", "contents": "Set a value in the map. Returns the new value, allowing reuse.\n\"\"\"\nlet value' = value\ntry\n(let i, let found) = _search(key)\nlet key' = key\n_array(i)? = (consume key, consume value)\n\nif not found then\n_size = _size + 1\n\nif (_size * 4) > (_array.size() * 3) then\n_resize(_array.size() * 2)\nend\nend\n\nvalue'\nelse\n// This is unreachable, since index will never be out-of-bounds.\nvalue'"} +{"id": "Pony/random-XorOshiro128StarStar-_4.txt", "contents": ": U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun ref u32()"} +{"id": "Pony/net-OSSockOpt-_235.txt", "contents": "fun box ip_recvpktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvretopts\u00b6\n[Source]\nfun box ip_recvretopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvrssbucketid\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_47.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyParams-_1.txt", "contents": "Stringable box\n\nImplements\u00b6\n\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nnum_samples': USize val = 100,\nseed': U64 val = call,\nmax_shrink_rounds': USize val = 10,\nmax_generator_retries': USize val = 5,\ntimeout': U64 val = 60000000000,\nasync': Bool val = false)\n: PropertyParams val^\n\nParameters\u00b6"} +{"id": "Pony/builtin-Array-_12.txt", "contents": "ULong val | USize val | F32 val |\nF64 val))](\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\nread_u8[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nReads a U8 from offset. This is only allowed for an array of U8s.\nfun box read_u8[optional B: (A & Real[B] val & U8 val)](\noffset: USize val)\n: U8 val ?"} +{"id": "Pony/promises-Promise-_10.txt", "contents": "Returns\u00b6\n\nPromise[(A , B)] tag\n\n\njoin\u00b6\n[Source]\nCreate a promise that is fulfilled when the receiver and all promises in\nthe given iterator are fulfilled. If the receiver or any promise in the\nsequence is rejected then the new promise is also rejected.\nJoin p1 and p2 with an existing promise, p3.\nuse \"promises\"\n\nactor Main\nnew create(env: Env) =>\n\nlet p1 = Promise[String val]\nlet p2 = Promise[String val]\nlet p3 = Promise[String val]\n"} +{"id": "Pony/src-format-format_spec-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_145.txt", "contents": "fun box ipv6_multicast_if()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_multicast_loop\u00b6\n[Source]\nfun box ipv6_multicast_loop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_nexthop\u00b6\n[Source]"} +{"id": "Pony/promises-Promise-_2.txt", "contents": "be reject()\n\n\nPublic Functions\u00b6\nnext[B: Any #share]\u00b6\n[Source]\nChain a promise after this one.\nWhen this promise is fulfilled, the result of type A is passed to the\nfulfill function, generating in an intermediate result of type B. This\nis then used to fulfill the next promise in the chain.\nIf there is no fulfill function, or if the fulfill function raises an\nerror, then the next promise in the chain will be rejected.\nIf this promise is rejected, this step's reject function is called with no\ninput, generating an intermediate result of type B which is used to\nfulfill the next promise in the chain.\nIf there is no reject function, of if the reject function raises an error,\nthen the next promise in the chain will be rejected.\nfun tag next[B: Any #share](\nfulfill: Fulfill[A, B] iso,\nrejected: Reject[B] iso = qualify)"} +{"id": "Pony/serialise-InputSerialisedAuth-_2.txt", "contents": "that: InputSerialisedAuth val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: InputSerialisedAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: InputSerialisedAuth val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/builtin-Integer-_28.txt", "contents": "\n\nadd\u00b6\n[Source]\nfun box add(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub\u00b6\n[Source]\nfun box sub("} +{"id": "Pony/src-files-directory-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/time-PosixDate-_4.txt", "contents": ": None val\n\nReturns\u00b6\n\nNone val\n\n\nformat\u00b6\n[Source]\nFormat the time as for strftime.\nWill return an empty string if the format string is \"%p\" or \"%P\".\nfun box format(\nfmt: String val)\n: String val ?\n\nParameters\u00b6\n\nfmt: String val\n\nReturns\u00b6"} +{"id": "Pony/net-TCPConnection-_35.txt", "contents": "bufsize: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nset_so_sndbuf\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)\nfun ref set_so_sndbuf(\nbufsize: U32 val)\n: U32 val\n\nParameters\u00b6\n\nbufsize: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-pony_check-_16.txt", "contents": "gen1: Generator[T1] val,\ngen2: Generator[T2] val,\ngen3: Generator[T3] val,\nh: TestHelper)\n: ForAll3[T1, T2, T3]\n=>\nForAll3[T1, T2, T3](gen1, gen2, gen3, h)\n\nfun for_all4[T1, T2, T3, T4](\ngen1: Generator[T1] val,\ngen2: Generator[T2] val,\ngen3: Generator[T3] val,\ngen4: Generator[T4] val,\nh: TestHelper)\n: ForAll4[T1, T2, T3, T4]\n=>\nForAll4[T1, T2, T3, T4](gen1, gen2, gen3, gen4, h)\n\n\n"} +{"id": "Pony/collections-ListNodes-_0.txt", "contents": "\n\n\n\n\n\n\nListNodes[A: A, N: ListNode[A] #read]\u00b6\n[Source]\nIterate over the nodes in a List.\nclass ref ListNodes[A: A, N: ListNode[A] #read] is\nIterator[N] ref\n\nImplements\u00b6\n\nIterator[N] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/assert-Assert-_2.txt", "contents": "\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Assert val)\n: Bool val\n\nParameters\u00b6\n\nthat: Assert val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne("} +{"id": "Pony/src-files-file_lines-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/pony_check-PropertyRunner-_9.txt", "contents": "\nrepr: String val\nrounds: USize val = 0\nerr: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileMode-_5.txt", "contents": "[Source]\nClear all of the any-user flags.\nfun ref group()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nprivate\u00b6\n[Source]\nClear all of the group and any-user flags.\nfun ref private()\n: None val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/encode-base64-Base64-_7.txt", "contents": "\neq\u00b6\n[Source]\nfun box eq(\nthat: Base64 val)\n: Bool val\n\nParameters\u00b6\n\nthat: Base64 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Base64 val)"} +{"id": "Pony/encode-base64-Base64-_1.txt", "contents": "\n\nPublic Functions\u00b6\nencode_pem\u00b6\n[Source]\nEncode for PEM (RFC 1421).\nfun box encode_pem(\ndata: ReadSeq[U8 val] box)\n: String iso^\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\n\nReturns\u00b6\n\nString iso^\n\n\nencode_mime\u00b6"} +{"id": "Pony/2_how-it-works_3.txt", "contents": "# Line 3\n\n```pony\nenv.out.print(\"Hello, world!\")\n```\n\nThis is your program! What the heck is it doing?\n\nIn Pony, a dot is either a field access or a method call, much like other languages. If the name after the dot has parentheses after it, it's a method call. Otherwise, it's a field access.\n\nSo here, we start with a reference to `env`. We then look up the field `out` on our object `env`. As it happens, that field represents `stdout`, i.e. usually it means printing to your console. Then, we call the `print` method on `env.out`. The stuff inside the parentheses are the arguments to the function. In this case, we are passing a __string literal__, i.e. the stuff in double quotes. The `env.out.print` method will implicitly add a `\\n` after the string literal, so make sure to not add an extra `\\n` if you only wants to output one single line.\n\nIn Pony, string literals can be in double quotes, `\"`, in which case they follow C/C++ style escaping (using stuff like \\n), or they can be triple-quoted, `\"\"\"` like in Python, in which case they are considered raw data.\n\nIn Pony, `print` only support String type. So make sure to convert variables to String type through `.string()` method.\n\n__What's an `Env`, anyway?__ It's the \"environment\" your program was invoked with. That means it has command line arguments, environment variables, `stdin`, `stdout`, and `stderr`. Pony has no global variables, so these things are explicitly passed to your program.\n"} +{"id": "Pony/builtin-ULong-_44.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: ULong val)\n: Bool val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_123.txt", "contents": "else\n(let errno: U32, let value: U32) = _OSSocket.get_so_error(fd)\n(errno == 0) and (value == 0)\nend\n\nfun ref _apply_backpressure() =>\nif not _throttled then\n_throttled = true\n_notify.throttled(this)\nend\nifdef not windows then\n_writeable = false\n\n// this is safe because asio thread isn't currently subscribed\n// for a write event so will not be writing to the readable flag\n@pony_asio_event_set_writeable(_event, false)\n@pony_asio_event_resubscribe_write(_event)\nend\n\nfun ref _release_backpressure() =>"} +{"id": "Pony/collections-BinaryHeap-_2.txt", "contents": "\n\nsize\u00b6\n[Source]\nReturn the number of elements in the heap.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\npeek\u00b6\n[Source]\nReturn the highest priority item in the heap. For max-heaps, the greatest\nitem will be returned. For min-heaps, the smallest item will be returned.\nfun box peek()\n: this->A ?\n"} +{"id": "Pony/pony_check-ASCIIDigits-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIDigits val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_8.txt", "contents": "\nI16 val\n\n\nadd_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box add_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F32-_5.txt", "contents": "[Source]\nMaximum positive value representable.\nnew val max_value()\n: F32 val^\n\nReturns\u00b6\n\nF32 val^\n\n\nmin_normalised\u00b6\n[Source]\nMinimum positive value representable at full precision (ie a normalised\nnumber).\nnew val min_normalised()\n: F32 val^\n\nReturns\u00b6\n\nF32 val^"} +{"id": "Pony/src-builtin-float-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/pony_check-PropertyRunner-_8.txt", "contents": "Complete the Property execution successfully.\nfun ref complete()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nfail\u00b6\n[Source]\nComplete the Property execution\nwhile signalling failure to the PropertyResultNotify.\nfun ref fail(\nrepr: String val,\nrounds: USize val = 0,\nerr: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U8-_42.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/pony_test--index-_5.txt", "contents": "Long tests allow for delayed completion. Any test can call long_test() on its\nTestHelper to indicate that it needs to keep running. When the test is finally\ncomplete it calls complete() on its TestHelper.\nThe complete() function takes a Bool parameter to specify whether the test was\na success. If any asserts fail then the test will be considered a failure\nregardless of the value of this parameter. However, complete() must still be\ncalled.\nSince failing tests may hang, a timeout must be specified for each long test.\nWhen the test function exits a timer is started with the specified timeout. If\nthis timer fires before complete() is called the test is marked as a failure\nand the timeout is reported.\nOn a timeout the timed_out() function is called on the unit test object. This\nshould perform whatever test specific tidy up is required to allow the program\nto exit. There is no need to call complete() if a timeout occurs, although it\nis not an error to do so.\nNote that the timeout is only relevant when a test hangs and would otherwise\nprevent the test program from completing. Setting a very long timeout on tests\nthat should not be able to hang is perfectly acceptable and will not make the\ntest take any longer if successful.\nTimeouts should not be used as the standard method of detecting if a test has"} +{"id": "Pony/builtin-F32-_56.txt", "contents": "\n\ni8\u00b6\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\nfun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n"} +{"id": "Pony/divide-by-zero_0.txt", "contents": "# Divide by Zero\n\nWhat's 1 divided by 0? How about 10 divided by 0? What is the result you get in your favorite programming language?\n\nIn math, divide by zero is undefined. There is no answer to that question as the expression 1/0 has no meaning. In many programming languages, the answer is a runtime exception that the user has to handle. In Pony, things are a bit different.\n"} +{"id": "Pony/builtin-U32-_33.txt", "contents": "U32 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: U32 val)\n: (U32 val , U32 val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-collections-persistent-map-_12.txt", "contents": "\nnew val create() =>\n_root = _MapSubNodes[K, V, H]\n_size = 0\n\nnew val _create(r: _MapSubNodes[K, V, H], s: USize) =>\n_root = r\n_size = s\n\nfun val apply(k: K): val->V ? =>\n\"\"\"\nAttempt to get the value corresponding to k.\n\"\"\"\n_root(0, H.hash(k).u32(), k)? as V\n\nfun val size(): USize =>\n\"\"\"\nReturn the amount of key-value pairs in the Map.\n\"\"\"\n_size"} +{"id": "Pony/src-net-ossockopt-_107.txt", "contents": "fun sctp_cookie_echoed():I32 => @pony_os_sockopt_option(I32(582))\nfun sctp_cookie_wait():I32 => @pony_os_sockopt_option(I32(583))\nfun sctp_cwnd_logging_enable():I32 => @pony_os_sockopt_option(I32(584))\nfun sctp_cwnd_monitor_enable():I32 => @pony_os_sockopt_option(I32(585))\nfun sctp_cwr_in_same_window():I32 => @pony_os_sockopt_option(I32(586))\nfun sctp_cwr_reduce_override():I32 => @pony_os_sockopt_option(I32(587))\nfun sctp_data():I32 => @pony_os_sockopt_option(I32(588))\nfun sctp_data_first_frag():I32 => @pony_os_sockopt_option(I32(589))\nfun sctp_data_frag_mask():I32 => @pony_os_sockopt_option(I32(590))\nfun sctp_data_last_frag():I32 => @pony_os_sockopt_option(I32(591))\nfun sctp_data_middle_frag():I32 => @pony_os_sockopt_option(I32(592))\nfun sctp_data_not_frag():I32 => @pony_os_sockopt_option(I32(593))\nfun sctp_data_sack_immediately():I32 => @pony_os_sockopt_option(I32(594))\nfun sctp_data_unordered():I32 => @pony_os_sockopt_option(I32(595))\nfun sctp_default_prinfo():I32 => @pony_os_sockopt_option(I32(596))\nfun sctp_default_send_param():I32 => @pony_os_sockopt_option(I32(597))\nfun sctp_default_sndinfo():I32 => @pony_os_sockopt_option(I32(598))\nfun sctp_delayed_sack():I32 => @pony_os_sockopt_option(I32(599))\nfun sctp_del_vrf_id():I32 => @pony_os_sockopt_option(I32(600))\nfun sctp_disable_fragments():I32 => @pony_os_sockopt_option(I32(601))"} +{"id": "Pony/collections-MaxHeapPriority-_2.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: MaxHeapPriority[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: MaxHeapPriority[A] val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/src-collections-list-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-net-ossockopt-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/net-OSSockOpt-_545.txt", "contents": "fun box tcpi_opt_syn_data()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_timestamps\u00b6\n[Source]\nfun box tcpi_opt_timestamps()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_toe\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_17.txt", "contents": "fun box fstat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfstatat\u00b6\n[Source]\nfun box fstatat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfstatfs\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Vec-_9.txt", "contents": "value: val->A,\noffset: USize val = 0,\nnth: USize val = 0,\npredicate: {(A, A): Bool}[A] val = lambda)\n: USize val ?\n\nParameters\u00b6\n\nvalue: val->A\noffset: USize val = 0\nnth: USize val = 0\npredicate: {(A, A): Bool}[A] val = lambda\n\nReturns\u00b6\n\nUSize val ?\n\n\ncontains\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_41.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: ULong val)\n: (ULong val , ULong val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_83.txt", "contents": "fun ipv6_2292hoplimit():I32 => @pony_os_sockopt_option(I32(102))\nfun ipv6_2292hopopts():I32 => @pony_os_sockopt_option(I32(103))\nfun ipv6_2292pktinfo():I32 => @pony_os_sockopt_option(I32(104))\nfun ipv6_2292pktoptions():I32 => @pony_os_sockopt_option(I32(105))\nfun ipv6_2292rthdr():I32 => @pony_os_sockopt_option(I32(106))\nfun ipv6_addrform():I32 => @pony_os_sockopt_option(I32(107))\nfun ipv6_addr_preferences():I32 => @pony_os_sockopt_option(I32(108))\nfun ipv6_add_membership():I32 => @pony_os_sockopt_option(I32(109))\nfun ipv6_authhdr():I32 => @pony_os_sockopt_option(I32(110))\nfun ipv6_autoflowlabel():I32 => @pony_os_sockopt_option(I32(111))\nfun ipv6_checksum():I32 => @pony_os_sockopt_option(I32(112))\nfun ipv6_dontfrag():I32 => @pony_os_sockopt_option(I32(113))\nfun ipv6_drop_membership():I32 => @pony_os_sockopt_option(I32(114))\nfun ipv6_dstopts():I32 => @pony_os_sockopt_option(I32(115))\nfun ipv6_flowinfo():I32 => @pony_os_sockopt_option(I32(116))\nfun ipv6_flowinfo_flowlabel():I32 => @pony_os_sockopt_option(I32(117))\nfun ipv6_flowinfo_priority():I32 => @pony_os_sockopt_option(I32(118))\nfun ipv6_flowinfo_send():I32 => @pony_os_sockopt_option(I32(119))\nfun ipv6_flowlabel_mgr():I32 => @pony_os_sockopt_option(I32(120))\nfun ipv6_fl_a_get():I32 => @pony_os_sockopt_option(I32(121))"} +{"id": "Pony/files-FilePermissionDenied-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FilePermissionDenied val)\n: Bool val\n\nParameters\u00b6\n\nthat: FilePermissionDenied val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-collections-flag-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-pony_bench-pony_bench-_9.txt", "contents": "# Example Program\n\nThe following is a complete program with multiple trivial benchmarks followed\nby their output.\n\n```pony\nuse \"time\"\nuse \"pony_bench\"\n\nactor Main is BenchmarkList\nnew create(env: Env) =>\nPonyBench(env, this)\n\nfun tag benchmarks(bench: PonyBench) =>\nbench(_Nothing)\nbench(_Fib(5))\nbench(_Fib(10))\nbench(_Fib(20))\nbench(_Timer(10_000))\n"} +{"id": "Pony/random-SplitMix64-_3.txt", "contents": ": U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhas_next\u00b6\n[Source]\nfun tag has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nu8\u00b6\n[Source]\nfun ref u8()"} +{"id": "Pony/net-OSSockOpt-_96.txt", "contents": "fun box icmp_exc_ttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_filter\u00b6\n[Source]\nfun box icmp_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_frag_needed\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIILetters-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-StringRunes-_2.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: U32 val ?\n\nReturns\u00b6\n\nU32 val ?\n\n\n\n\n\n\n\n"} +{"id": "Pony/capsicum-Cap-_39.txt", "contents": "fun box acl_check()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nacl_delete\u00b6\n[Source]\nfun box acl_delete()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nacl_get\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_50.txt", "contents": "\ndivrem\u00b6\nfun box divrem(\ny: F64 val)\n: (F64 val , F64 val)\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\n(F64 val , F64 val)\n\n\nrem\u00b6\nfun box rem(\ny: F64 val)\n: F64 val\n"} +{"id": "Pony/pony_check--index-_0.txt", "contents": "\n\n\n\n\n\n\nPackage\n\nPonyCheck is a library for property based testing\nwith tight integration into PonyTest.\nProperty Based Testing\u00b6\nIn traditional unit testing, the developer specifies one or more input\nexamples manually for the class or system under test and asserts on certain\noutput conditions. The difficulty here is to find enough examples to cover\nall branches and cases of the class or system under test.\nIn property based testing, the developer defines a property, a kind of predicate\nfor the class or system under test that should hold for all kinds or just a\nsubset of possible input values. The property based testing engine then\ngenerates a big number of random input values and checks if the property holds"} +{"id": "Pony/src-promises-promise-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/term-ANSINotify-_13.txt", "contents": "fun ref size(\nrows: U16 val,\ncols: U16 val)\n: None val\n\nParameters\u00b6\n\nrows: U16 val\ncols: U16 val\n\nReturns\u00b6\n\nNone val\n\n\nclosed\u00b6\n[Source]\nfun ref closed()\n: None val\n"} +{"id": "Pony/process-PipeError-_2.txt", "contents": "\nthat: PipeError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: PipeError val)\n: Bool val\n\nParameters\u00b6\n\nthat: PipeError val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_parser-_30.txt", "contents": "let c =\ntry\nshorts.shift()?\nelse\n0 // TODO(cq) Should never error since checked\nend\nmatch _option_with_short(c)\n| let os: OptionSpec =>\nif os._requires_arg() and (shorts.size() > 0) then\n// opt needs an arg, so consume the remainder of the shorts for targ\nif targ is None then\ntarg = shorts.clone()\nshorts.truncate(0)\nelse\nreturn SyntaxError(_short_string(c), \"ambiguous args for short option\")\nend\nend\nlet arg = if shorts.size() == 0 then targ else None end\nmatch _OptionParser.parse(os, arg, args)\n| let o: Option => options.push(o)"} +{"id": "Pony/assert-Assert-_0.txt", "contents": "\n\n\n\n\n\n\nAssert\u00b6\n[Source]\nThis is a debug only assertion. If the test is false, it will print any\nsupplied error message to stderr and raise an error.\nprimitive val Assert\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Assert val^\n\nReturns\u00b6"} +{"id": "Pony/src-capsicum-cap_rights-_9.txt", "contents": "\nif caps(FileLink) then\nset(Cap.linkat())\nset(Cap.symlinkat())\nend\n\nif caps(FileLookup) then set(Cap.lookup()) end\nif caps(FileMkdir) then set(Cap.mkdirat()) end\nif caps(FileRead) then set(Cap.read()) end\nif caps(FileRemove) then set(Cap.unlinkat()) end\nif caps(FileRename) then set(Cap.renameat()) end\nif caps(FileSeek) then set(Cap.seek()) end\n\nif caps(FileStat) then\nset(Cap.fstat())\nset(Cap.fstatfs())\nset(Cap.fcntl())\nend\n\nif caps(FileSync) then set(Cap.fsync()) end"} +{"id": "Pony/src-term-ansi-_27.txt", "contents": "\"\"\"\n\"\\x1B[44m\"\n\nfun magenta_bg(): String =>\n\"\"\"\nMagenta background.\n\"\"\"\n\"\\x1B[45m\"\n\nfun cyan_bg(): String =>\n\"\"\"\nCyan background.\n\"\"\"\n\"\\x1B[46m\"\n\nfun grey_bg(): String =>\n\"\"\"\nGrey background.\n\"\"\"\n\"\\x1B[100m\""} +{"id": "Pony/net-OSSockOpt-_62.txt", "contents": "fun box ipproto_udplite()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_vines\u00b6\n[Source]\nfun box ipproto_vines()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_visa\u00b6\n[Source]"} +{"id": "Pony/builtin-Comparable-_2.txt", "contents": "\nthat: box->A\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/src-itertools-iter-_56.txt", "contents": "end\nend\n\nif outer_iterator.has_next() then\ntry\ninner_iterator = outer_iterator.next()?\nreturn has_next()\nend\nend\n\nfalse\n\nfun ref next(): A ? =>\nif inner_iterator isnt None then\nlet iter = inner_iterator as Iterator[A]\n\nif iter.has_next() then\nreturn iter.next()?\nend\nend"} +{"id": "Pony/builtin-I64-_42.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: I64 val)\n: Bool val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]"} +{"id": "Pony/src-builtin-std_stream-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-SignedInteger-_1.txt", "contents": "new val create(\nvalue: A)\n: Real[A] val^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nReal[A] val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/collections-persistent-HashSet-_0.txt", "contents": "\n\n\n\n\n\n\nHashSet[A: Any #share, H: HashFunction[A] val]\u00b6\n[Source]\nA set, built on top of persistent Map. This is implemented as map of an\nalias of a type to itself.\nclass val HashSet[A: Any #share, H: HashFunction[A] val] is\nComparable[HashSet[A, H] box] ref\n\nImplements\u00b6\n\nComparable[HashSet[A, H] box] ref\n\n\nConstructors\u00b6"} +{"id": "Pony/builtin-String-_79.txt", "contents": "Parameters\u00b6\n\noffset: ISize val = 0\nbase: U8 val = 0\n\nReturns\u00b6\n\n(A , USize val) ?\n\n\nf32\u00b6\n[Source]\nConvert this string starting at the given offset\nto a 32-bit floating point number (F32).\nThis method errors if this string cannot be parsed to a float,\nif the result would over- or underflow,\nthe offset exceeds the size of this string or\nthere are leftover characters in the string after conversion.\nExamples:\n\"1.5\".f32()? == F32(1.5)"} +{"id": "Pony/src-collections-map-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/process-ProcessError-_2.txt", "contents": "let message: (String val | None val)\u00b6\n[Source]\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileCreate-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileCreate val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/bureaucracy-Custodian-_2.txt", "contents": "class TermHandler is SignalNotify\nlet _custodian: Custodian\n\nnew iso create(custodian: Custodian) =>\n_custodian = custodian\n\nfun ref apply(count: U32): Bool =>\n_custodian.dispose()\ntrue\n\nactor tag Custodian\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew tag create()\n: Custodian tag^\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_15.txt", "contents": "\nBool val\n\n\nexpect_action\u00b6\n[Source]\nExpect some action of the given name to complete\nfor the property to hold.\nIf all expected actions are completed successfully,\nthe property is considered successful.\nIf 1 action fails, the property is considered failing.\nCall complete_action(name) or fail_action(name)\nto mark some action as completed.\nExample:\nactor AsyncActor\n\nlet _ph: PropertyHelper\n\nnew create(ph: PropertyHelper) =>\n_ph = ph"} +{"id": "Pony/files-File-_7.txt", "contents": "\nBool val\n\n\nprintv\u00b6\n[Source]\nPrint an iterable collection of ByteSeqs.\nfun ref printv(\ndata: ByteSeqIter box)\n: Bool val\n\nParameters\u00b6\n\ndata: ByteSeqIter box\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/random-MT-_10.txt", "contents": "N\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\nfun ref int[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_4.txt", "contents": "\napply\u00b6\n[Source]\nfun ref apply(\nc: AsyncBenchContinue val)\n: None val ?\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val ?\n\n\nafter\u00b6\n[Source]\nfun ref after(\nc: AsyncBenchContinue val)"} +{"id": "Pony/src-cli-command-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-String-_19.txt", "contents": "from: USize val = 0,\nto: USize val = call)\n: None val\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\ntrim\u00b6\n[Source]\nReturn a shared portion of this string, covering from until to.\nBoth the original and the new string are immutable, as they share memory.\nThe operation does not allocate a new string pointer nor copy elements.\nfun val trim("} +{"id": "Pony/itertools-Iter-_38.txt", "contents": "Example\u00b6\nIter[I64]([1; 2].values())\n.zip[I64]([3; 4].values())\n\n(1, 3) (2, 4)\nfun ref zip[B: B](\ni2: Iterator[B] ref)\n: Iter[(A , B)] ref^\n\nParameters\u00b6\n\ni2: Iterator[B] ref\n\nReturns\u00b6\n\nIter[(A , B)] ref^\n\n\nzip2[B: B, C: C]\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_202.txt", "contents": "fun box ip_flowtype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_freebind\u00b6\n[Source]\nfun box ip_freebind()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw3\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_23.txt", "contents": "None val\n\n\nwrite_final\u00b6\n[Source]\nWrite as much as possible to the socket. Set _writeable to false if not\neverything was written. On an error, close the connection. This is for data\nthat has already been transformed by the notifier. Data will be silently\ndiscarded if the connection has not yet been established though.\nfun ref write_final(\ndata: (String val | Array[U8 val] val))\n: None val\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-pony_check-property_runner-_23.txt", "contents": "452use \"debug\"\nuse \"collections\"\n\nclass val _Shrink is Equatable[_Round]\n\"\"\"\nAn execution of a property during the shrinking process.\n\"\"\"\nlet _round: USize\n\nnew val create(round': USize) =>\n_round = round'\n\nfun round(): USize => _round\n\nfun inc(): _Round =>\n_Shrink.create(this._round + 1)\n\nfun eq(other: box->_Round): Bool =>\nmatch other\n| let s: _Shrink => s._round == this._round"} +{"id": "Pony/src-builtin-signed-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/src-files-file_path-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/ponypath_0.txt", "contents": "# `PONYPATH`\n\nWhen searching for Pony packages, `ponyc` checks both the installation directory (where the standard libraries reside) and any directories listed in the optional environment variable `PONYPATH`.\n"} +{"id": "Pony/pony_check-Generators-_47.txt", "contents": "Note that the byte length of the generated string can be up to 4 times\nthe size in code points.\nfun box unicode_bmp(\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\neq\u00b6\n[Source]\nfun box eq("} +{"id": "Pony/net-NetAddress-_5.txt", "contents": "\n\nhost_eq\u00b6\n[Source]\nfun box host_eq(\nthat: NetAddress box)\n: Bool val\n\nParameters\u00b6\n\nthat: NetAddress box\n\nReturns\u00b6\n\nBool val\n\n\nlength\u00b6\n[Source]\nFor platforms (OSX/FreeBSD) with length field as part of"} +{"id": "Pony/builtin-ILong-_39.txt", "contents": "\nILong val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: ILong val)\n: (ILong val , ILong val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , ILong val)\n\n\nrem\u00b6"} +{"id": "Pony/reference-capabilities_12.txt", "contents": "# How to create objects with different capabilities\n\nWhen you write a constructor, by default, that constructor will either create a new object with `ref` or `tag` as the capability. In the case of actors, the constructor will always create a `tag`. For classes, it defaults to `ref` but you can create with other capabilities. Let's take a look at an example:\n\n```pony\nclass Foo\nlet x: U32\n\nnew val create(x': U32) =>\nx = x'\n```\n\nNow when you call `Foo.create(1)`, you'll get a `Foo val` instead of `Foo ref`.\nBut what if you want to create both `val` and `ref` `Foo`s? You could do something like this:\n\n```pony\nclass Foo\nlet x: U32\n\nnew val create_val(x': U32) =>"} +{"id": "Pony/builtin-Greater-_2.txt", "contents": "[Source]\nfun box eq(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n\nParameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n"} +{"id": "Pony/src-pony_check-generator-_66.txt", "contents": "1312\n1313\n1314\n1315\n1316\n1317\n1318\n1319\n1320\n1321\n1322\n1323\n1324\n1325\n1326\n1327\n1328\n1329\n1330\n1331"} +{"id": "Pony/random-XorOshiro128StarStar-_1.txt", "contents": "\nConstructors\u00b6\nfrom_u64\u00b6\n[Source]\nUse seed x to seed a SplitMix64 and use this to\ninitialize the 128 bits of state.\nnew ref from_u64(\nx: U64 val = 5489)\n: XorOshiro128StarStar ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\n\nReturns\u00b6\n\nXorOshiro128StarStar ref^\n\n\ncreate\u00b6"} +{"id": "Pony/src-buffered-writer-_17.txt", "contents": "actor Main\nnew create(env: Env) =>\nlet wb = Writer\nlet messages = [[(F32(3597.82), \"Anderson\"); (F32(-7979.3), \"Graham\")]\n[(F32(3.14159), \"Hopper\"); (F32(-83.83), \"Jones\")]]\nfor items in messages.values() do\nwb.i32_be((items.size() / 2).i32())\nfor (f, s) in items.values() do\nwb.f32_be(f)\nwb.i32_be(s.size().i32())\nwb.write(s.array())\nend\nlet wb_msg = Writer\nwb_msg.i32_be(wb.size().i32())\nwb_msg.writev(wb.done())\nenv.out.writev(wb_msg.done())\nend\n```\n\"\"\"\nvar _chunks: Array[ByteSeq] iso = recover Array[ByteSeq] end"} +{"id": "Pony/src-cli-command_spec-_32.txt", "contents": "not ((b >= 'A') and (b <= 'Z')) and\nnot ((b >= 'a') and (b <= 'z')) then\nerror\nend\nend\nnm\n\nfun ref add_command(cmd: CommandSpec box) ? =>\n\"\"\"\nAdds an additional child command to this parent command.\n\"\"\"\nif is_leaf() then error end\n_commands.update(cmd.name(), cmd)\n\nfun ref add_help(hname: String = \"help\", descr': String = \"\") ? =>\n\"\"\"\nAdds a standard help option and, optionally command, to a root command.\n\"\"\"\n_help_name = hname\n_help_info = descr'"} +{"id": "Pony/src-builtin-array-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-I8-_23.txt", "contents": "(I8 val , I8 val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\nmod_partial\u00b6\n[Source]"} +{"id": "Pony/net-NoProxy-_1.txt", "contents": "\nImplements\u00b6\n\nProxy ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: NoProxy iso^\n\nReturns\u00b6\n\nNoProxy iso^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_16.txt", "contents": "U16 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/src-format-format-_8.txt", "contents": " Format package\n\nThe Format package provides support for formatting strings. It can be\nused to set things like width, padding and alignment, as well as\ncontrolling the way numbers are displayed (decimal, octal,\nhexadecimal).\n"} +{"id": "Pony/net-OSSockOpt-_626.txt", "contents": "\nthat: OSSockOpt val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-iterator-_7.txt", "contents": "Iteration using `While` is more flexible as it allows to continue iterating if a call to `next()` errors.\nThe `For`-loop does not allow this.\n"} +{"id": "Pony/src-pony_bench-benchmark-_6.txt", "contents": "`after_iteration` methods respectively that run before/after each iteration.\n\"\"\"\nfun name(): String\nfun config(): BenchConfig => BenchConfig\nfun overhead(): MicroBenchmark^ => OverheadBenchmark\nfun ref before() ? => None\nfun ref before_iteration() ? => None\nfun ref apply() ?\nfun ref after() ? => None\nfun ref after_iteration() ? => None\n\ntrait iso AsyncMicroBenchmark\n\"\"\"\nAsynchronous benchmarks must provide this trait. The `apply` method defines a\nsingle iteration in a sample. Each phase of the sample completes when the\ngiven `AsyncBenchContinue` has its `complete` method invoked. Setup and\nTeardown are defined by the `before` and `after` methods respectively. The\n`before` method runs before a sample of benchmarks and `after` runs after\nthe all iterations in the sample have completed. If your benchmark requires\nsetup and/or teardown to occur beween each iteration of the benchmark, then"} +{"id": "Pony/builtin-U128-_22.txt", "contents": "fun box subc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-ILong-_28.txt", "contents": "[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/collections-List-_33.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nexists\u00b6\n[Source]\nReturns true if at least one element satisfies the predicate, otherwise returns false.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet b_exists = my_list.exists( {(s: String): Bool => s == \"b\"} ) // true\n\nfun box exists(\nf: {(this->A!): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(this->A!): Bool}[A] box\n"} +{"id": "Pony/time-Timer-_0.txt", "contents": "\n\n\n\n\n\n\nTimer\u00b6\n[Source]\nThe Timer class represents a timer that fires after an expiration\ntime, and then fires at an interval. When a Timer fires, it calls\nthe apply method of the TimerNotify object that was passed to it\nwhen it was created.\nThe following example waits 5 seconds and then fires every 2\nseconds, and when it fires the TimerNotify object prints how many\ntimes it has been called:\nuse \"time\"\n\nactor Main\nnew create(env: Env) =>"} +{"id": "Pony/src-collections-persistent-set-_9.txt", "contents": "new val create() =>\n_map = HashMap[A, A, H]\n\nnew val _create(map': HashMap[A, A, H]) =>\n_map = map'\n\nfun size(): USize =>\n\"\"\"\nReturn the number of elements in the set.\n\"\"\"\n_map.size()\n\nfun apply(value: val->A): val->A ? =>\n\"\"\"\nReturn the value if it is in the set, otherwise raise an error.\n\"\"\"\n_map(value)?\n\nfun contains(value: val->A): Bool =>\n\"\"\""} +{"id": "Pony/9_object-literals_10.txt", "contents": "# Primitive literals\n\nWhen an anonymous type has no fields and no behaviours (like, for example, an object literal declared as a lambda literal), the compiler generates it as an anonymous primitive, unless a non-`val` reference capability is explicitly given. This means no memory allocation is needed to generate an instance of that type.\n\nIn other words, in Pony, a lambda that doesn't close over anything has no memory allocation overhead. Nice.\n\nA primitive literal is always returned as a `val`.\n"} +{"id": "Pony/4_control-structures_0.txt", "contents": "# Control Structures\n\nTo do real work in a program you have to be able to make decisions, iterate through collections of items and perform actions repeatedly. For this, you need control structures. Pony has control structures that will be familiar to programmers who have used most languages, such as `if`, `while` and `for`, but in Pony, they work slightly differently.\n"} +{"id": "Pony/net-OSSockOpt-_328.txt", "contents": "fun box scm_hci_raw_direction()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nscm_timestamp\u00b6\n[Source]\nfun box scm_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nscm_timestamping\u00b6\n[Source]"} +{"id": "Pony/format-Format-_8.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-random-splitmix64-_3.txt", "contents": "var z: U64 = _x\nz = (z xor (z >> 30)) * U64(0xbf58476d1ce4e5b9)\nz = (z xor (z >> 27)) * U64(0x94d049bb133111eb)\nz xor (z >> 31)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-cli-command_spec-_46.txt", "contents": "\nfun tag _init(typ': _ValueType, default': (_Value | None))\n: (_ValueType, _Value, Bool)\n=>\nmatch default'\n| None => (typ', false, true)\n| let d: _Value => (typ', d, false)\nend\n\nnew val bool(\nname': String,\ndescr': String = \"\",\ndefault': (Bool | None) = None)\n=>\n\"\"\"\nCreates an Arg with a Bool typed value that can be used like\n` true`\nto yield an arg value like\n`cmd.arg(\"opt\").bool() == true`.\n\"\"\""} +{"id": "Pony/term-ANSI-_10.txt", "contents": "Swap foreground and background colour.\nfun box reverse(\nstate: Bool val = true)\n: String val\n\nParameters\u00b6\n\nstate: Bool val = true\n\nReturns\u00b6\n\nString val\n\n\nblack\u00b6\n[Source]\nBlack text.\nfun box black()\n: String val\n"} +{"id": "Pony/pony_test--index-_7.txt", "contents": "\nclass iso _I8AddTest is UnitTest\nfun name(): String => \"_I8AddTest\"\nfun label(): String => \"simple\"\nfun apply(h: TestHelper) =>\nh.assert_eq[I8](1, 1)\n\nSetting up and tearing down a test environment\u00b6\nSet Up\u00b6\nAny kind of fixture or environment necessary for executing a UnitTest\ncan be set up either in the tests constructor or in a function called set_up().\nset_up() is called before the test is executed. It is partial,\nif it errors, the test is not executed but reported as failing during set up.\nThe test's TestHelper is handed to set_up()\nin order to log messages or access the tests Env via TestHelper.env.\nTear Down\u00b6\nEach unit test object may define a tear_down() function. This is called after\nthe test has finished to allow tearing down of any complex environment that had\nto be set up for the test.\nThe tear_down() function is called for each test regardless of whether it"} +{"id": "Pony/serialisation_7.txt", "contents": "## Considerations\n"} +{"id": "Pony/builtin-I32-_33.txt", "contents": "I32 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_17.txt", "contents": "fun box div_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6"} +{"id": "Pony/builtin-String-_3.txt", "contents": "len: USize val = 0)\n: String ref^\n\nParameters\u00b6\n\nlen: USize val = 0\n\nReturns\u00b6\n\nString ref^\n\n\nfrom_array\u00b6\n[Source]\nCreate a string from an array, reusing the underlying data pointer.\nnew val from_array(\ndata: Array[U8 val] val)\n: String val^\n\nParameters\u00b6"} +{"id": "Pony/src-files-file_path-_40.txt", "contents": "fun chown(uid: U32, gid: U32): Bool =>\n\"\"\"\nSet the owner and group for a path. Does nothing on Windows.\n\"\"\"\nifdef windows then\nfalse\nelse\nif caps(FileChown) then\n0 == @chown(path.cstring(), uid, gid)\nelse\nfalse\nend\nend\n\nfun touch(): Bool =>\n\"\"\"\nSet the last access and modification times of a path to now.\n\"\"\"\nset_time(Time.now(), Time.now())\n"} +{"id": "Pony/net-OSSockOpt-_401.txt", "contents": "fun box sctp_log_rwnd_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_sack_arrivals_enable\u00b6\n[Source]\nfun box sctp_log_sack_arrivals_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_log_try_advance\u00b6\n[Source]"} +{"id": "Pony/calling-c_8.txt", "contents": "iov.len = data.size()\n@writev(1, iov, 1) // Will print \"Hello from Pony!\"\n```\n\nAs you saw, a `IOVec` instance in Pony is equivalent to `struct iovec*`. In some cases, like the above example, it can be cumbersome to define a `struct` type in Pony if you only want to use it in a single place. You can also use a pointer to a tuple type as a shorthand for a struct: let's rework the above example:\n\n```pony\nuse @writev[USize](fd: U32, iov: Pointer[(Pointer[U8] tag, USize)] tag, iovcnt: I32)\n\nlet data = \"Hello from Pony!\"\nvar iov = (data.cpointer(), data.size())\n@writev(1, addressof iov, 1) // Will print \"Hello from Pony!\"\n```\n\nIn the example above, the type `Pointer[(Pointer[U8] tag, USize)] tag` is equivalent to the `IOVec` struct type we defined earlier. That is, _a struct type is equivalent to a pointer to a tuple type with the fields of the struct as elements, in the same order as the original struct type defined them_.\n\n**Can I pass struct types by value, instead of passing a pointer?** Not at the moment. This is a known limitation of the current FFI system, but it is something the Pony team is interested in fixing.\n"} +{"id": "Pony/collections-persistent-MapPairs-_2.txt", "contents": "fun ref next()\n: (K , V) ?\n\nReturns\u00b6\n\n(K , V) ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-ForAll3-_1.txt", "contents": "\nParameters\u00b6\n\ngen1': Generator[T1] val\ngen2': Generator[T2] val\ngen3': Generator[T3] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll3[T1, T2, T3] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nprop: {(T1, T2, T3, PropertyHelper) ?}[T1, T2, T3] val)\n: None val ?\n"} +{"id": "Pony/cli-CommandHelp-_3.txt", "contents": "None val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-TCPConnection-_2.txt", "contents": "recover MyTCPConnectionNotify(env.out) end, \"\", \"8989\")\n\nNote: when writing to the connection data will be silently discarded if the\nconnection has not yet been established.\nBackpressure support\u00b6\nWrite\u00b6\nThe TCP protocol has built-in backpressure support. This is generally\nexperienced as the outgoing write buffer becoming full and being unable\nto write all requested data to the socket. In TCPConnection, this is\nhidden from the programmer. When this occurs, TCPConnection will buffer\nthe extra data until such time as it is able to be sent. Left unchecked,\nthis could result in uncontrolled queuing. To address this,\nTCPConnectionNotify implements two methods throttled and unthrottled\nthat are called when backpressure is applied and released.\nUpon receiving a throttled notification, your application has two choices\non how to handle it. One is to inform the Pony runtime that it can no\nlonger make progress and that runtime backpressure should be applied to\nany actors sending this one messages. For example, you might construct your\napplication like:\n// Here we have a TCPConnectionNotify that upon construction"} +{"id": "Pony/cli-OptionSpec-_3.txt", "contents": "default': (String val | None val) = reference\n\nReturns\u00b6\n\nOptionSpec val^\n\n\ni64\u00b6\n[Source]\nCreates an Option with an I64 typed value that can be used like\n--count=42 -C=42\nto yield an option value like\ncmd.option(\"count\").i64() == I64(42).\nnew val i64(\nname': String val,\ndescr': String val = \"\",\nshort': (U8 val | None val) = reference,\ndefault': (I64 val | None val) = reference)\n: OptionSpec val^\n"} +{"id": "Pony/serialise-DeserialiseAuth-_1.txt", "contents": "Parameters\u00b6\n\nauth: AmbientAuth val\n\nReturns\u00b6\n\nDeserialiseAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: DeserialiseAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: DeserialiseAuth val\n"} +{"id": "Pony/time-Time-_2.txt", "contents": ": I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nmillis\u00b6\n[Source]\nMonotonic unadjusted milliseconds.\nfun box millis()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmicros\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-unsigned-_72.txt", "contents": "else\n@\"llvm.ctlz.i64\"(this.u64(), false).usize()\nend\n\nfun ctz(): USize =>\nifdef ilp32 then\n@\"llvm.cttz.i32\"(this.u32(), false).usize()\nelse\n@\"llvm.cttz.i64\"(this.u64(), false).usize()\nend\n\nfun clz_unsafe(): USize =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\nifdef ilp32 then\n@\"llvm.ctlz.i32\"(this.u32(), true).usize()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), true).usize()"} +{"id": "Pony/src-signals-signal_handler-_6.txt", "contents": "end\nend\n\nfun ref _dispose() =>\n\"\"\"\nDispose of the AsioEventID.\n\"\"\"\nif not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\n_event = AsioEvent.none()\n_notify.dispose()\nend\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-array-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-capsicum-cap_rights-_11.txt", "contents": "@__cap_rights_clear(addressof _r0, cap, U64(0))\nend\n\nfun limit(fd: I32): Bool =>\n\"\"\"\nLimits the fd to the encoded rights.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@cap_rights_limit(fd, addressof _r0) == 0\nelse\ntrue\nend\n\nfun ref merge(that: CapRights0) =>\n\"\"\"\nMerge the rights in that into this.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@cap_rights_merge(addressof _r0, addressof that._r0)\nend"} +{"id": "Pony/builtin-U128-_62.txt", "contents": "U8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-randomness-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-collections-list_node-_17.txt", "contents": "var in_list = false\n\nmatch _list\n| let list': List[A] =>\nin_list = that._list isnt None\nthat.remove()\n\nmatch _prev\n| let prev': ListNode[A] =>\nprev'._next = that\nelse\nlist'._set_head(that)\nend\n\nthat._list = list'\nthat._prev = _prev\nthat._next = this\n_prev = that\nlist'._increment()\nend"} +{"id": "Pony/random-SplitMix64-_8.txt", "contents": ": I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun ref i64()"} +{"id": "Pony/src-pony_check-generator-_106.txt", "contents": "fun frequency[T](\nweighted_generators: ReadSeq[WeightedGenerator[T]])\n: Generator[T]\n=>\n\"\"\"\nChoose a value of one of the given Generators,\nwhile controlling the distribution with the associated weights.\n\nThe weights are of type `USize` and control how likely a value is chosen.\nThe likelihood of a value `v` to be chosen\nis `weight_v` / `weights_sum`.\nIf all `weighted_generators` have equal size the distribution\nwill be uniform.\n\nExample of a generator to output odd `U8` values\ntwice as likely as even ones:\n\n```pony\nGenerators.frequency[U8]([\n(1, Generators.u8().filter({(u) => (u, (u % 2) == 0 }))"} +{"id": "Pony/src-time-timer-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/itertools-Iter-_12.txt", "contents": "collect[optional B: Seq[A!] ref]\u00b6\n[Source]\nPush each value from the iterator into the collection coll.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.collect(Array[I64](3))\n\n[1, 2, 3]\nfun ref collect[optional B: Seq[A!] ref](\ncoll: B)\n: B^\n\nParameters\u00b6\n\ncoll: B\n\nReturns\u00b6\n\nB^\n"} +{"id": "Pony/2_ops_3.txt", "contents": "\nnew create(x: U32, y: U32) =>\n_x = x\n_y = y\n\n// Define a + function\nfun add(other: Pair): Pair =>\nPair(_x + other._x, _y + other._y)\n\n// Now let's use it\nclass Foo\nfun foo() =>\nvar x = Pair(1, 2)\nvar y = Pair(3, 4)\nvar z = x + y\n```\n\nIt is possible to overload infix operators to some degree using union types or f-bounded polymorphism, but this is beyond the scope of this tutorial. See the Pony standard library for further information.\n\nYou do not have to worry about any of this if you don't want to. You can simply use the existing infix operators for numbers just like any other language and not provide them for your own types."} +{"id": "Pony/builtin-FloatingPoint-_59.txt", "contents": "U8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Real-_19.txt", "contents": "I16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/backpressure-Backpressure-_2.txt", "contents": "fun box release(\nauth: ApplyReleaseBackpressureAuth val)\n: None val\n\nParameters\u00b6\n\nauth: ApplyReleaseBackpressureAuth val\n\nReturns\u00b6\n\nNone val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Backpressure val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-String-_8.txt", "contents": "str: Pointer[U8 val] box\nlen: USize val\n\nReturns\u00b6\n\nString ref^\n\n\ncopy_cstring\u00b6\n[Source]\nCreate a string by copying a null-terminated C string. Note that\nthe scan is unbounded; the pointed to data must be null-terminated\nwithin the allocated array to preserve memory safety. If a null\npointer is given then an empty string is returned.\nnew ref copy_cstring(\nstr: Pointer[U8 val] box)\n: String ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-random-random-_18.txt", "contents": "\nfun ref int[N: (Unsigned val & Real[N] val) = U64](n: N): N =>\n\"\"\"\nA random integer in [0, n)\n\nUses fixed-point inversion if platform supports native 128 bit operations\notherwise uses floating-point multiplication.\n\"\"\"\nifdef native128 then\n// TODO: once we have specialized generic functions, chose smaller int\n// types for smaller N.\nN.from[U64](((next().u128() * n.u128()) >> 64).u64())\nelse\nint_fp_mult[N](n)\nend\n\n\nfun ref int_unbiased[N: (Unsigned val & Real[N] val) = U64](n: N): N =>\n\"\"\"\nA random integer in [0, n)"} +{"id": "Pony/files-FileSync-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileSync val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-pony_test-_51.txt", "contents": "\nfun ref _process_opts() =>\n\"\"\"\nProcess our command line options.\nAll command line arguments given must be recognised and make sense.\nState for specified options is stored in object fields.\nWe don't use the options package because we aren't already dependencies.\n\"\"\"\nvar exe_name = \"\"\n\nfor arg in _env.args.values() do\nif exe_name == \"\" then\nexe_name = arg\ncontinue\nend\n\nif arg == \"--sequential\" then\n_sequential = true\nelseif arg == \"--verbose\" then\n_verbose = true"} +{"id": "Pony/src-net-tcp_connection-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/net-OSSockOpt-_308.txt", "contents": "fun box rds_info_send_messages()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_sockets\u00b6\n[Source]\nfun box rds_info_sockets()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_tcp_sockets\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_24.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/random-XorShift128Plus-_4.txt", "contents": "u8\u00b6\n[Source]\nfun ref u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n"} +{"id": "Pony/8_sugar_3.txt", "contents": "# Create\n\nTo create an object you need to specify the type and call a constructor. Pony allows you to miss out the constructor and will insert a call to `create()` for you. So:\n\n```pony\nvar foo = Foo\n```\n\nbecomes:\n\n```pony\nvar foo = Foo.create()\n```\n\nNormally types are not valid things to appear in expressions, so omitting the constructor call is not ambiguous. Remember that you can easily spot that a name is a type because it will start with a capital letter.\n\nIf arguments are needed for `create` these can be provided as if calling the type. Default and named arguments can be used as normal.\n\n```pony\nvar foo = Foo(x, 37 where crash = false)"} +{"id": "Pony/src-capsicum-cap-_7.txt", "contents": "descriptors or reading limited global system state. Access to global name\nspaces, such as file system or IPC name spaces, is prevented.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@cap_enter() == 0\nelse\nfalse\nend\n\nfun read(): U64 => _id(0, 1 << 0)\nfun write(): U64 => _id(0, 1 << 1)\nfun seek_tell(): U64 => _id(0, 1 << 2)\nfun seek(): U64 => _id(0, 1 << 3) or seek_tell()\nfun pread(): U64 => seek() or read()\nfun pwrite(): U64 => seek() or write()\n\nfun mmap(): U64 => _id(0, 1 << 4)\nfun mmap_r(): U64 => mmap() or seek() or read()\nfun mmap_w(): U64 => mmap() or seek() or write()\nfun mmap_x(): U64 => mmap() or seek() or _id(0, 1 << 5)"} +{"id": "Pony/src-collections-persistent-vec-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-String-_51.txt", "contents": "Remove all instances of s from the string. Returns the count of removed\ninstances.\nfun ref remove(\ns: String box)\n: USize val\n\nParameters\u00b6\n\ns: String box\n\nReturns\u00b6\n\nUSize val\n\n\nreplace\u00b6\n[Source]\nReplace up to n occurrences of from in this with to. If n is 0, all\noccurrences will be replaced. Returns the count of replaced occurrences.\nfun ref replace("} +{"id": "Pony/net-OSSockOpt-_497.txt", "contents": "fun box so_listenincqlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_listenqlen\u00b6\n[Source]\nfun box so_listenqlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_listenqlimit\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_31.txt", "contents": "\nprimitive _StillRunning\n\ntype _WaitResult is (ProcessExitStatus | WaitpidError | _StillRunning)\n\n\ninterface _Process\nfun kill()\nfun ref wait(): _WaitResult\n\"\"\"\nOnly polls, does not actually wait for the process to finish,\nin order to not block a scheduler thread.\n\"\"\"\n\n\nclass _ProcessNone is _Process\nfun kill() => None\nfun ref wait(): _WaitResult => Exited(255)\n\nclass _ProcessPosix is _Process"} +{"id": "Pony/builtin-Env-_0.txt", "contents": "\n\n\n\n\n\n\nEnv\u00b6\n[Source]\nAn environment holds the command line and other values injected into the\nprogram by default by the runtime.\nclass val Env\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nBuild an artificial environment. A root capability must be supplied.\nnew val create(\nroot': AmbientAuth val,\ninput': InputStream tag,"} +{"id": "Pony/serialise-SerialiseAuth-_0.txt", "contents": "\n\n\n\n\n\n\nSerialiseAuth\u00b6\n[Source]\nThis is a capability that allows the holder to serialise objects. It does not\nallow the holder to examine serialised data or to deserialise objects.\nprimitive val SerialiseAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nauth: AmbientAuth val)\n: SerialiseAuth val^\n"} +{"id": "Pony/random-XorOshiro128Plus-_5.txt", "contents": "[Source]\nfun ref u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6"} +{"id": "Pony/src-ini-ini-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_530.txt", "contents": "fun box so_upcallclosewait()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_update_accept_context\u00b6\n[Source]\nfun box so_update_accept_context()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_useloopback\u00b6\n[Source]"} +{"id": "Pony/combining-capabilities_7.txt", "contents": "## Reading from a `val` variable\n\nA `val` origin is deeply and globally immutable, so all of its fields are also `val`. The only exception is a `tag` field. Since we can't read from it, we also can't guarantee that nobody can write to it, so it stays `tag`.\n"} +{"id": "Pony/src-process-_process-_37.txt", "contents": "else\n// Couldn't SIGTERM, as a last resort SIGKILL\n@kill(pid, Sig.kill())\nend\nend\nend\n\nfun ref wait(): _WaitResult =>\n\"\"\"Only polls, does not block.\"\"\"\nif pid > 0 then\nvar wstatus: I32 = 0\nlet options: I32 = 0 or _WNOHANG()\n// poll, do not block\nmatch @waitpid(pid, addressof wstatus, options)\n| let err: I32 if err < 0 =>\n// one could possibly do at some point:\n//let wpe = WaitPidError(@pony_os_errno())\nWaitpidError\n| let exited_pid: I32 if exited_pid == pid => // our process changed state\nif _WaitPidStatus.exited(wstatus) then"} +{"id": "Pony/builtin-U32-_39.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_socket-_45.txt", "contents": "_read_again()\nreturn\nend\nend\nelse\n_close()\nend\nend\n\nfun ref _complete_reads(len: U32) =>\n\"\"\"\nThe OS has informed as that len bytes of pending reads have completed.\nThis occurs only with IOCP on Windows.\n\"\"\"\nifdef windows then\nif _read_buf.space() == 0 then\n// Socket has been closed\n_readable = false\n_close()\nreturn"} +{"id": "Pony/net-OSSockOpt-_519.txt", "contents": "fun box so_reuseport()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_reuseshareuid\u00b6\n[Source]\nfun box so_reuseshareuid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rfcomm_fc_info\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_27.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\ncos\u00b6\n[Source]\nfun box cos()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nsin\u00b6\n[Source]\nfun box sin()\n: F64 val\n"} +{"id": "Pony/src-buffered-reader-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-string-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-net-tcp_connection_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-cli-command_parser-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-pony_check-generator-_128.txt", "contents": "fun generate(rnd: Randomness): I16^ =>\nrnd.i16(min, max)\n\nfun shrink(i: I16): ValueAndShrink[I16] =>\nthat._int_shrink[I16](consume i, min)\nend)\n\nfun i32(\nmin: I32 = I32.min_value(),\nmax: I32 = I32.max_value())\n: Generator[I32]\n=>\n\"\"\"\nCreate a generator for I32 values.\n\"\"\"\nlet that = this\nGenerator[I32](\nobject is GenObj[I32]\nfun generate(rnd: Randomness): I32^ =>\nrnd.i32(min, max)"} +{"id": "Pony/src-builtin-real-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/builtin-F32-_66.txt", "contents": "u32_unsafe\u00b6\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nulong_unsafe\u00b6\nfun box ulong_unsafe()"} +{"id": "Pony/src-files-directory-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-collections-map-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-process-process_monitor-_41.txt", "contents": "match _timers\n| let ts: Timers =>\nts.dispose()\n_timers = None\nend\n\nfun ref _setup_windows_timers() =>\nlet timers = _ensure_timers()\nlet pm: ProcessMonitor tag = this\nlet tn =\nobject iso is TimerNotify\nfun ref apply(timer: Timer, count: U64): Bool =>\npm.timer_notify()\ntrue\nend\nlet timer = Timer(consume tn, 50_000_000, 10_000_000)\ntimers(consume timer)\n\nfun ref _try_shutdown() =>\n\"\"\""} +{"id": "Pony/src-math-greatest_common_divisor-_0.txt", "contents": "\n\n\n\n\n\n\ngreatest_common_divisor.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-buffered-reader-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-collections-map-_46.txt", "contents": "fun has_next(): Bool =>\n\"\"\"\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map.\n\"\"\"\n_count < _map.size()\n\nfun ref next(): M->V ? =>\n\"\"\"\nReturns the next value, or raises an error if there isn't one. If values\nare added during iteration, this may not return all values.\n\"\"\"\n_i = _map.next_index(_i)?\n_count = _count + 1\n_map.index(_i)?._2\n\nclass MapPairs[K, V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[(M->K, M->V)]\n\"\"\"\nAn iterator over the keys and values in a map."} +{"id": "Pony/src-pony_test-pony_test-_46.txt", "contents": "return\nend\n\nvar index = _records.size()\n_records.push(_TestRecord(_env, name))\n\nvar group = _find_group(test.exclusion_group())\ngroup(_TestRunner(this, index, consume test, group, _verbose, _env,\n_timers))\n\nfun ref _find_group(group_name: String): _Group =>\n\"\"\"\nFind the group to use for the given group name, subject to the\n--sequential flag.\n\"\"\"\nvar name = group_name\n\nif _sequential then\n// Use the same group for all tests.\nname = \"all\""} +{"id": "Pony/builtin-SignedInteger-_44.txt", "contents": "Bool val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmax\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_30.txt", "contents": "y: A\n\nReturns\u00b6\n\nA\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/src-collections-ring_buffer-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/promises-Promise-_13.txt", "contents": "\ntimeout\u00b6\n[Source]\nReject the promise after the given expiration in nanoseconds.\nfun tag timeout(\nexpiration: U64 val)\n: None val\n\nParameters\u00b6\n\nexpiration: U64 val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_69.txt", "contents": "```c\n/* In C */\nint option_value = 4455;\nsetsockopt(fd, SOL_SOCKET, SO_RCVBUF, &option_value, 4);\n\n/* In Pony */\nvar option: I32 = 4455;\n@setsockopt[I32](fd, OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(),\naddressof option, I32(4))\n```\n\"\"\"\n\n/* Constants are from\n* macOS Sierra 10.12.6\n* Ubuntu Linux Xenial/16.04 LTS + kernel 4.4.0-109-generic\n* FreeBSD 11.1-RELEASE\n* Windows Winsock function reference for getsockopt & setsockopt:\n* https://msdn.microsoft.com/en-us/library/windows/desktop/ms738544(v=vs.85).aspx\n* https://msdn.microsoft.com/en-us/library/windows/desktop/ms740476(v=vs.85).aspx\n"} +{"id": "Pony/src-net-tcp_listener-_22.txt", "contents": "_paused = false\n_accept()\nend\n\nfun ref _accept(ns: U32 = 0) =>\n\"\"\"\nAccept connections as long as we have spawned fewer than our limit.\n\"\"\"\nifdef windows then\nif ns == -1 then\n// Unsubscribe when we get an invalid socket in the event.\n@pony_asio_event_unsubscribe(_event)\nreturn\nend\n\nif ns > 0 then\nif _closed then\n@pony_os_socket_close(ns)\nreturn\nend"} +{"id": "Pony/src-files-path-_35.txt", "contents": "| _PathSep =>\nstate = _PathDot\n| _PathDot =>\nstate = _PathDot2\n| _PathDot2 =>\nbacktrack = s.size().isize()\ns.append(\"...\")\nstate = _PathOther\n| _PathOther =>\ns.append(\".\")\nend\nelse\nmatch state\n| _PathSep =>\nbacktrack = s.size().isize()\n| _PathDot =>\nbacktrack = s.size().isize()\ns.append(\".\")\n| _PathDot2 =>\nbacktrack = s.size().isize()"} +{"id": "Pony/files-FileEOF-_2.txt", "contents": "fun box ne(\nthat: FileEOF val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileEOF val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileLines-_3.txt", "contents": "\nnext\u00b6\n[Source]\nReturns the next line in the file.\nfun ref next()\n: String iso^ ?\n\nReturns\u00b6\n\nString iso^ ?\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_133.txt", "contents": "fun box ipv6_flowinfo_priority()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_flowinfo_send\u00b6\n[Source]\nfun box ipv6_flowinfo_send()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_flowlabel_mgr\u00b6\n[Source]"} +{"id": "Pony/src-net-net_address-_16.txt", "contents": "and (this._port == that._port)\nand (host_eq(that))\nand (this._scope == that._scope)\n\nfun host_eq(that: NetAddress box): Bool =>\nif ip4() then\nthis._addr == that._addr\nelse\n(this._addr1 == that._addr1)\nand (this._addr2 == that._addr2)\nand (this._addr3 == that._addr3)\nand (this._addr4 == that._addr4)\nend\n\nfun length() : U8 =>\n\"\"\"\nFor platforms (OSX/FreeBSD) with `length` field as part of\nits `struct sockaddr` definition, returns the `length`.\nElse (Linux/Windows) returns the size of `sockaddr_in` or `sockaddr_in6`.\n\"\"\""} +{"id": "Pony/format-FormatHex-_1.txt", "contents": "new val create()\n: FormatHex val^\n\nReturns\u00b6\n\nFormatHex val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatHex val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHex val\n\nReturns\u00b6"} +{"id": "Pony/src-term-ansi-_23.txt", "contents": "\"\"\"\nGrey text.\n\"\"\"\n\"\\x1B[90m\"\n\nfun white(): String =>\n\"\"\"\nWhite text.\n\"\"\"\n\"\\x1B[97m\"\n\nfun bright_red(): String =>\n\"\"\"\nBright red text.\n\"\"\"\n\"\\x1B[91m\"\n\nfun bright_green(): String =>\n\"\"\"\nBright green text."} +{"id": "Pony/src-net-tcp_listener-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/net-TCPListenAuth-_0.txt", "contents": "\n\n\n\n\n\n\nTCPListenAuth\u00b6\n[Source]\nprimitive val TCPListenAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: (AmbientAuth val | NetAuth val | TCPAuth val))\n: TCPListenAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/term-ReadlineNotify-_0.txt", "contents": "\n\n\n\n\n\n\nReadlineNotify\u00b6\n[Source]\nNotifier for readline.\ninterface ref ReadlineNotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nReceives finished lines. The next prompt is set by fulfilling the promise.\nIf the promise is rejected, readline will stop handling input.\nfun ref apply(\nline: String val,\nprompt: Promise[String val] tag)"} +{"id": "Pony/pony_check-Generators-_25.txt", "contents": "Parameters\u00b6\n\ngen1: Generator[T1] box\ngen2: Generator[T2] box\ngen3: Generator[T3] box\ngen4: Generator[T4] box\nfn: {(T1, T2, T3, T4): T5^}[T1, T2, T3, T4, T5] ref\n\nReturns\u00b6\n\nGenerator[T5] box\n\n\nbool\u00b6\n[Source]\nCreate a generator of bool values.\nfun box bool()\n: Generator[Bool val] box\n\nReturns\u00b6"} +{"id": "Pony/builtin-U16-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: U16 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-random-mt-_7.txt", "contents": "\"\"\"\nif _index >= _n() then\n_populate()\nend\n\ntry\nvar x = _state(_index)?\n_index = _index + 1\n\nx = x xor ((x >> 29) and 0x5555555555555555)\nx = x xor ((x << 17) and 0x71d67fffeda60000)\nx = x xor ((x << 37) and 0xfff7eee000000000)\nx xor (x >> 43)\nelse\n0\nend\n\nfun ref _populate() =>\n\"\"\"\nRepopulates the state array."} +{"id": "Pony/builtin-ILong-_23.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , ILong val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-format-format_spec-_0.txt", "contents": "\n\n\n\n\n\n\nformat_spec.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U8-_34.txt", "contents": "fun box rem_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_77.txt", "contents": "\nnew min_value() => 0\nnew max_value() => 0xFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF\n\nfun next_pow2(): U128 =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): U128 => this\nfun bit_reverse(): U128 => @\"llvm.bitreverse.i128\"(this)\nfun bswap(): U128 => @\"llvm.bswap.i128\"(this)\nfun popcount(): U128 => @\"llvm.ctpop.i128\"(this)\nfun clz(): U128 => @\"llvm.ctlz.i128\"(this, false)\nfun ctz(): U128 => @\"llvm.cttz.i128\"(this, false)\n\nfun clz_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\""} +{"id": "Pony/builtin-OutStream-_2.txt", "contents": "\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nwritev\u00b6\n[Source]\nWrite an iterable collection of ByteSeqs.\nbe writev(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nflush\u00b6\n[Source]\nFlush the stream."} +{"id": "Pony/src-term-ansi-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/collections-persistent-Cons-_8.txt", "contents": "(Cons[A] val | Nil[A] val)\n\n\nmap[B: B]\u00b6\n[Source]\nBuilds a new list by applying a function to every member of the list.\nfun val map[B: B](\nf: {(val->A): val->B}[A, B] box)\n: (Cons[B] val | Nil[B] val)\n\nParameters\u00b6\n\nf: {(val->A): val->B}[A, B] box\n\nReturns\u00b6\n\n(Cons[B] val | Nil[B] val)\n\n\nflat_map[B: B]\u00b6"} +{"id": "Pony/src-builtin-string-_116.txt", "contents": "// Overlong encoding.\n((c == 0xF0) and (c2 < 0x90)) or\n// UTF32 would be > 0x10FFFF.\n((c == 0xF4) and (c2 >= 0x90))\nthen\nerr\nelse\n(((c.u32() << 18) +\n(c2.u32() << 12) +\n(c3.u32() << 6) +\nc4.u32()) - 0x3C82080, 4)\nend\nend\nelse\n// UTF32 would be > 0x10FFFF.\nerr\nend\n\nfun apply(i: USize): U8 ? =>\n\"\"\""} +{"id": "Pony/src-cli-command_help-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/pony_check-CountdownIter-_2.txt", "contents": "\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun ref has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: T\n\nReturns\u00b6\n\nT"} +{"id": "Pony/builtin-ISize-_6.txt", "contents": "\nUSize val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nclz_unsafe\u00b6\n[Source]\nfun box clz_unsafe()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/files-File-_19.txt", "contents": "uid: U32 val,\ngid: U32 val)\n: Bool val\n\nParameters\u00b6\n\nuid: U32 val\ngid: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ntouch\u00b6\n[Source]\nSet the last access and modification times of the directory to now.\nfun box touch()\n: Bool val\n"} +{"id": "Pony/builtin-USize-_25.txt", "contents": "(USize val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\nmod_unsafe\u00b6\n[Source]"} +{"id": "Pony/collections-persistent--index-_0.txt", "contents": "\n\n\n\n\n\n\nPersistent Collections Package\u00b6\nList - A persistent list with functional transformations.\nMap - A persistent map based on the Compressed Hash Array Mapped Prefix-tree\nfrom 'Optimizing Hash-Array Mapped Tries for Fast and Lean Immutable JVM\nCollections' by Michael J. Steindorfer and Jurgen J. Vinju.\nSet - A persistent set implemented as a persistent map of an alias of a type\nto itself.\nVec - A persistent vector based on the Hash Array Mapped Trie from 'Ideal Hash\nTrees' by Phil Bagwell.\nPublic Types\u00b6\n\nclass Cons\nclass HashMap"} +{"id": "Pony/src-collections-persistent-map-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-persistent-list-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/term-ANSI-_28.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ANSI val)\n: Bool val\n\nParameters\u00b6\n\nthat: ANSI val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/src-builtin-signed-_76.txt", "contents": "@\"llvm.bswap.i32\"(this.u32()).isize()\nelse\n@\"llvm.bswap.i64\"(this.u64()).isize()\nend\n\nfun popcount(): USize =>\nifdef ilp32 then\n@\"llvm.ctpop.i32\"(this.u32()).usize()\nelse\n@\"llvm.ctpop.i64\"(this.u64()).usize()\nend\n\nfun clz(): USize =>\nifdef ilp32 then\n@\"llvm.ctlz.i32\"(this.u32(), false).usize()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), false).usize()\nend\n\nfun ctz(): USize =>"} +{"id": "Pony/src-cli-command_spec-_44.txt", "contents": "end\n\nfun _has_short(sh: U8): Bool =>\nmatch _short\n| let ss: U8 => sh == ss\nelse\nfalse\nend\n\nfun help_string(): String =>\n\"\"\"\nReturns a formated help string for this option.\n\"\"\"\nlet s =\nmatch _short\n| let ss: U8 => \"-\" + String.from_utf32(ss.u32()) + \", \"\nelse\n\" \"\nend\ns + \"--\" + _name +"} +{"id": "Pony/collections-HashMap-_15.txt", "contents": "\n\ncompact\u00b6\n[Source]\nMinimise the memory used for the map.\nfun ref compact()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nclone[optional H2: HashFunction[this->K!] val]\u00b6\n[Source]\nCreate a clone. The key and value types may be different due to aliasing\nand viewpoint adaptation.\nfun box clone[optional H2: HashFunction[this->K!] val]()\n: HashMap[this->K!, this->V!, H2] ref^\n"} +{"id": "Pony/src-builtin-array-_96.txt", "contents": "fun ref reverse_in_place() =>\n\"\"\"\nReverse the array in place.\n\"\"\"\nif _size > 1 then\nvar i: USize = 0\nvar j = _size - 1\n\nwhile i < j do\nlet x = _ptr._apply(i)\n_ptr._update(i, _ptr._apply(j))\n_ptr._update(j, x)\ni = i + 1\nj = j - 1\nend\nend\n\nfun ref swap_elements(i: USize, j: USize) ? =>\n\"\"\"\nSwap the element at index i with the element at index j."} +{"id": "Pony/builtin-Integer-_21.txt", "contents": "[Source]\nDivide this integer by y and return the result and a flag indicating overflow or division by zero.\nfun box divc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nremc\u00b6\n[Source]\nCalculate the remainder of this number divided by y and return the result and a flag indicating division by zero or overflow.\nThe result will have the sign of the dividend.\nfun box remc("} +{"id": "Pony/builtin-U8-_29.txt", "contents": "fun box rotr(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/src-buffered-reader-_74.txt", "contents": "peek_u32_le(offset)?.u64() or (peek_u32_le(offset + 4)?.u64() << 32)\n\nfun peek_i64_be(offset: USize = 0): I64 ? =>\n\"\"\"\nPeek at a big-endian I64.\n\"\"\"\npeek_u64_be(offset)?.i64()\n\nfun peek_i64_le(offset: USize = 0): I64 ? =>\n\"\"\"\nPeek at a little-endian I64.\n\"\"\"\npeek_u64_le(offset)?.i64()\n\nfun peek_u128_be(offset: USize = 0): U128 ? =>\n\"\"\"\nPeek at a big-endian U128.\n\"\"\"\n(peek_u64_be(offset)?.u128() << 64) or peek_u64_be(offset + 8)?.u128()\n"} +{"id": "Pony/pony_check-Generators-_11.txt", "contents": "Returns\u00b6\n\nGenerator[HashSet[T, HashEq[T] val] ref] box\n\n\nset_is_of[T: T]\u00b6\n[Source]\nCreate a generator for SetIs filled with values\nof the given generator gen.\nThe returned SetIs will have a size up to max,\nbut tend to have fewer entries\ndepending on the source generator gen.\nE.g. if the given generator is for U8 values and max is set to 1024\nthe set will only ever be of size 256 max.\nAlso for efficiency purposes and to not loop forever,\nthis generator will only try to add at most max values to the set.\nIf there are duplicates, the set won't grow.\nfun box set_is_of[T: T](\ngen: Generator[T] box,\nmax: USize val = 100)"} +{"id": "Pony/src-builtin-signed-_71.txt", "contents": "_SignedUnsafeArithmetic.mod_unsafe[ILong, ULong](this, y)\n\nfun hash(): USize => ulong().hash()\n\nfun addc(y: ILong): (ILong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.sadd.with.overflow.i32\"(this.i32(), y.i32())\n(r.ilong(), o)\nelse\n(let r, let o) =\n@\"llvm.sadd.with.overflow.i64\"(this.i64(), y.i64())\n(r.ilong(), o)\nend\n\nfun subc(y: ILong): (ILong, Bool) =>\nifdef ilp32 or llp64 then\n(let r, let o) =\n@\"llvm.ssub.with.overflow.i32\"(this.i32(), y.i32())\n(r.ilong(), o)"} +{"id": "Pony/builtin-U128-_7.txt", "contents": "\nU128 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/builtin-ULong-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_8.txt", "contents": "fun box bitwidth()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/generics-and-reference-capabilities_8.txt", "contents": "new create(c: String iso) =>\n_c = consume c\n\nfun get(): this->String iso => _c\n\nfun ref set(c: String iso) => _c = consume c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo(recover iso String end)\nenv.out.print(a.get().string())\na.set(recover iso String end)\nenv.out.print(a.get().string())\n```\n"} +{"id": "Pony/src-collections-heap-_11.txt", "contents": "_make_heap()\n\nfun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1) =>\n\"\"\"\nAdd len iterated elements, starting from the given offset.\n\"\"\"\n_data.concat(iter, offset, len)\n_make_heap()\n\nfun values(): ArrayValues[A, this->Array[A]]^ =>\n\"\"\"\nReturn an iterator for the elements in the heap. The order of elements is\narbitrary.\n\"\"\"\n_data.values()\n\nfun ref _make_heap() =>\nlet n = size()\nif n < 2 then return end\nvar i = (n / 2)"} +{"id": "Pony/net-OSSockOpt-_194.txt", "contents": "fun box ip_bind_address_no_port()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_block_source\u00b6\n[Source]\nfun box ip_block_source()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_bound_if\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-collections-persistent-list-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-collections-flag-_18.txt", "contents": "fun eq(that: Flags[A, B] box): Bool =>\n\"\"\"\nReturns true if this has the same flags set as that.\n\"\"\"\n_value == that._value\n\nfun lt(that: Flags[A, B] box): Bool =>\n\"\"\"\nReturns true if the flags set on this are a strict subset of the flags set\non that. Flags is only partially ordered, so lt is not the opposite of ge.\n\"\"\"\n(_value != that._value) and ((_value and not that._value) == 0)\n\nfun le(that: Flags[A, B] box): Bool =>\n\"\"\"\nReturns true if the flags set on this are a subset of the flags set on\nthat or they are the same. Flags is only partially ordered, so le is not\nthe opposite of te.\n\"\"\"\n((_value and not that._value) == 0)"} +{"id": "Pony/src-builtin-float-_40.txt", "contents": "fun sinh(): F32 => @sinhf(this)\nfun tanh(): F32 => @tanhf(this)\n\nfun acos(): F32 => @acosf(this)\nfun asin(): F32 => @asinf(this)\nfun atan(): F32 => @atanf(this)\nfun atan2(y: F32): F32 => @atan2f(this, y)\n\nfun acosh(): F32 => @acoshf(this)\nfun asinh(): F32 => @asinhf(this)\nfun atanh(): F32 => @atanhf(this)\n\nfun copysign(sign: F32): F32 => @\"llvm.copysign.f32\"(this, sign)\n\nfun hash(): USize => bits().hash()\nfun hash64(): U64 => bits().hash64()\n\nfun i128(): I128 => f64().i128()\nfun u128(): U128 => f64().u128()\n"} +{"id": "Pony/builtin-I128-_44.txt", "contents": "I128 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: I128 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/serialise-Serialised-_2.txt", "contents": "auth: InputSerialisedAuth val,\ndata: Array[U8 val] val)\n: Serialised ref^\n\nParameters\u00b6\n\nauth: InputSerialisedAuth val\ndata: Array[U8 val] val\n\nReturns\u00b6\n\nSerialised ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nA caller with DeserialiseAuth can create an object graph from serialised\ndata.\nfun box apply("} +{"id": "Pony/builtin-String-_80.txt", "contents": "\"1.19208e-07\".f32()? == F32(1.19208e-07)\n\"NaN\".f32()?.nan() == true\n\nfun box f32(\noffset: ISize val = 0)\n: F32 val ?\n\nParameters\u00b6\n\noffset: ISize val = 0\n\nReturns\u00b6\n\nF32 val ?\n\n\nf64\u00b6\n[Source]\nConvert this string starting at the given offset\nto a 64-bit floating point number (F64)."} +{"id": "Pony/src-builtin-string-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/src-builtin-signed-_65.txt", "contents": "\nfun remc(y: I64): (I64, Bool) =>\n_SignedCheckedArithmetic.rem_checked[I64, U64](this, y)\n\nfun fldc(y: I64): (I64, Bool) =>\n_SignedCheckedArithmetic.fld_checked[I64, U64](this, y)\n\nfun modc(y: I64): (I64, Bool) =>\n_SignedCheckedArithmetic.mod_checked[I64, U64](this, y)\n\nfun add_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.add_partial[I64](this, y)?\n\nfun sub_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.sub_partial[I64](this, y)?\n\nfun mul_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.mul_partial[I64](this, y)?\n\nfun div_partial(y: I64): I64 ? =>"} +{"id": "Pony/format-FormatGeneralLarge-_0.txt", "contents": "\n\n\n\n\n\n\nFormatGeneralLarge\u00b6\n[Source]\nprimitive val FormatGeneralLarge is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_10.txt", "contents": "Create a generator for Set filled with values\nof the given generator gen.\nThe returned sets will have a size up to max,\nbut tend to have fewer than max\ndepending on the source generator gen.\nE.g. if the given generator is for U8 values and max is set to 1024,\nthe set will only ever be of size 256 max.\nAlso for efficiency purposes and to not loop forever,\nthis generator will only try to add at most max values to the set.\nIf there are duplicates, the set won't grow.\nfun box set_of[T: (Hashable #read & Equatable[T] #read)](\ngen: Generator[T] box,\nmax: USize val = 100)\n: Generator[HashSet[T, HashEq[T] val] ref] box\n\nParameters\u00b6\n\ngen: Generator[T] box\nmax: USize val = 100\n"} +{"id": "Pony/builtin-String-_53.txt", "contents": "Example:\nlet original: String = \"Hello!\"\nlet delimiter: String = \"><\"\nlet split_array: Array[String] = original.split_by(delimiter)\nenv.out.print(\"OUTPUT:\")\nfor value in split_array.values() do\nenv.out.print(value)\nend\n\n// OUTPUT:\n// Hello!\n\nAdjacent delimiters result in a zero length entry in the array. For\nexample, \"1CutCut2\".split_by(\"Cut\") => [\"1\", \"\", \"2\"].\nAn empty delimiter results in an array that contains a single element equal\nto the whole string.\nIf you want to split the string with each individual character of delim,\nuse split."} +{"id": "Pony/src-collections-hashable-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_connection-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/src-pony_test-pony_test-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/pony_check-GenObj-_5.txt", "contents": "\nReturns\u00b6\n\nIterator[T^] ref\n\n\nvalue_and_shrink_iter\u00b6\n[Source]\nfun box value_and_shrink_iter(\nrnd: Randomness ref)\n: Iterator[(T^ , Iterator[T^] ref)] ref\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nIterator[(T^ , Iterator[T^] ref)] ref\n"} +{"id": "Pony/src-itertools-iter-_107.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.take_while({(x) => x < 4 })\n```\n`1 2 3`\n\"\"\"\nIter[A!](\nobject\nvar _done: Bool = false\nvar _next: (A! | None) = None\n\nfun ref has_next(): Bool =>\nif _next isnt None then true\nelse _try_next()\nend\n\nfun ref next(): A! ? =>\nif (_next isnt None) or _try_next() then"} +{"id": "Pony/src-cli-command_spec-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/pony_check-Generator-_7.txt", "contents": "Parameters\u00b6\n\npredicate: {(T): (T^, Bool)}[T] box\n\nReturns\u00b6\n\nGenerator[T] box\n\n\nmap[U: U]\u00b6\n[Source]\nApply fn to each value of this iterator\nand yield the results.\nExample:\nlet single_code_point_string_gen =\nGenerators.u32()\n.map[String]({(u) => String.from_utf32(u) })\n\nfun box map[U: U](\nfn: {(T): U^}[T, U] box)"} +{"id": "Pony/annotations_9.txt", "contents": "## `nosupertype`\n\nRecognised on objects(`actor`, `class`, `primitive`, `struct`). A type annotated with `nosupertype` will not be a subtype of any other type (except _), even if the type structurally provides an interface. If a `nosupertype` type has a provides list, a compiler error is reported. As a result, a `nosupertype` type is excluded from both nominal and structural subtyping.\n\nHere's an example of how `nosupertype` can be important:\n\n```pony\nclass Empty\n\nclass Foo\nfun foo[A: Any](a: (A | Empty val)) =>\nmatch consume a\n| let a': A => None\nend\n```\n\nThe above code won't compile because you could supply `Empty ref`. Doing so results in a compiler error about an unsafe match because we would need to distinguish between `Empty val` and `Empty ref` at runtime.\n\nBy adding `nosupertype` to the definition of `Empty`, we declare that `Empty` is not a subtype of `Any` and thereby allow the code to compile as there is no longer an unsafe match.\n"} +{"id": "Pony/itertools-Iter-_33.txt", "contents": ": Iter[A!] ref^\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nstep_by\u00b6\n[Source]\nReturn an iterator that yields every nth element of the\noriginal iterator. n == 0 is treated like n == 1 rather than an error.\nExample\u00b6\nIter[USize](Range(0, 10))\n.step_by(2)\n\n1 3 5 7 9"} +{"id": "Pony/src-term-readline-_27.txt", "contents": "end\n\nfun ref left(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nMove left.\n\"\"\"\nif _cur_pos == 0 then\nreturn\nend\n\ntry\nrepeat\n_cur_pos = _cur_pos - 1\nuntil\n(_cur_pos == 0) or\n((_edit.at_offset(_cur_pos)? and 0xC0) != 0x80)\nend\n\n_refresh_line()\nend"} +{"id": "Pony/src-builtin-stdin-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-string-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/builtin-ULong-_15.txt", "contents": "(ULong val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\nsub_partial\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_58.txt", "contents": "1152\n1153\n1154\n1155\n1156\n1157\n1158\n1159\n1160\n1161\n1162\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171"} +{"id": "Pony/pony_check-WeightedGenerator-_0.txt", "contents": "\n\n\n\n\n\n\nWeightedGenerator[T: T]\u00b6\n[Source]\nA generator with an associated weight, used in Generators.frequency.\ntype WeightedGenerator[T: T] is\n(USize val , Generator[T] box)\n\nType Alias For\u00b6\n\n(USize val , Generator[T] box)\n\n\n\n"} +{"id": "Pony/files-FileMode-_4.txt", "contents": "fun ref exec()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nshared\u00b6\n[Source]\nSet the write flag for everyone to the same as owner_write.\nfun ref shared()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\ngroup\u00b6"} +{"id": "Pony/collections-HashByteSeq-_1.txt", "contents": "Constructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: HashByteSeq val^\n\nReturns\u00b6\n\nHashByteSeq val^\n\n\nPublic Functions\u00b6\nhash\u00b6\n[Source]\nfun box hash(\nx: (String box | Array[U8 val] box))\n: USize val\n\nParameters\u00b6\n"} +{"id": "Pony/collections-HashMap-_4.txt", "contents": "\nParameters\u00b6\n\nkey: K\nvalue: V\n\nReturns\u00b6\n\n(V^ | None val)\n\n\nupsert\u00b6\n[Source]\nCombines a provided value with the current value for the provided key\nusing the provided function. If the provided key has not been added to\nthe map yet, it sets its value to the provided value and ignores the\nprovided function.\nAs a simple example, say we had a map with I64 values and we wanted to\nadd 4 to the current value for key \"test\", which let's say is currently 2.\nWe call"} +{"id": "Pony/builtin-I16-_14.txt", "contents": "(I16 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , Bool val)\n\n\nmulc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/net-OSSockOpt-_198.txt", "contents": "fun box ip_drop_source_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dummynet3\u00b6\n[Source]\nfun box ip_dummynet3()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dummynet_configure\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection_notify-_13.txt", "contents": "\"\"\"\nNone\n\nfun ref throttled(conn: TCPConnection ref) =>\n\"\"\"\nCalled when the connection starts experiencing TCP backpressure. You should\nrespond to this by pausing additional calls to `write` and `writev` until\nyou are informed that pressure has been released. Failure to respond to\nthe `throttled` notification will result in outgoing data queuing in the\nconnection and increasing memory usage.\n\"\"\"\nNone\n\nfun ref unthrottled(conn: TCPConnection ref) =>\n\"\"\"\nCalled when the connection stops experiencing TCP backpressure. Upon\nreceiving this notification, you should feel free to start making calls to\n`write` and `writev` again.\n\"\"\"\nNone"} +{"id": "Pony/src-builtin-array-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/random-Random-_9.txt", "contents": "[Source]\nA random integer in [-2^127, 2^127)\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nA random integer in [ILong.min_value(), ILong.max_value()]\nfun ref ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n"} +{"id": "Pony/2_ops_6.txt", "contents": "| `*?` | `mul_partial()?` | Partial Multiplication |\n| `/?` | `div_partial()?` | Partial Division |\n| `%?` | `rem_partial()?` | Partial Remainder |\n| `%%?` | `mod_partial()?` | Partial Modulo | Starting with version `0.26.1` |\n\n---\n"} +{"id": "Pony/src-itertools-iter-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/callbacks_2.txt", "contents": "Since bare methods have no receiver, they cannot reference the `this` identifier in their body (either explicitly or implicitly through field access), cannot use `this` viewpoint adapted types, and cannot specify a receiver capability.\n"} +{"id": "Pony/net-DNS-_8.txt", "contents": "that: DNS val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: DNS val)\n: Bool val\n\nParameters\u00b6\n\nthat: DNS val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-collections-persistent-list-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-builtin-float-_44.txt", "contents": "\"\"\"\n53\n\nfun tag precision10(): U8 =>\n\"\"\"\nMantissa precision in decimal digits.\n\"\"\"\n15\n\nfun tag min_exp2(): I16 =>\n\"\"\"\nMinimum exponent value such that (2^exponent) - 1 is representable at full\nprecision (ie a normalised number).\n\"\"\"\n-1021\n\nfun tag min_exp10(): I16 =>\n\"\"\"\nMinimum exponent value such that (10^exponent) - 1 is representable at full\nprecision (ie a normalised number)."} +{"id": "Pony/src-net-tcp_connection-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/collections-ListNode-_8.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nhas_prev\u00b6\n[Source]\nReturn true if there is a previous node.\nfun box has_prev()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhas_next\u00b6\n[Source]\nReturn true if there is a next node."} +{"id": "Pony/src-builtin-string-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/format-AlignLeft-_2.txt", "contents": "fun box ne(\nthat: AlignLeft val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignLeft val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-set-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-FloatingPoint-_15.txt", "contents": "If any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box mod_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nneg_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result"} +{"id": "Pony/src-net-tcp_connection-_108.txt", "contents": "while len > 0 do\n(let iov_p, let iov_s) =\nifdef windows then\n(let tmp_s, let tmp_p) = _pending_writev_windows(num_sent)?\n(tmp_p, tmp_s)\nelse\n_pending_writev_posix(num_sent)?\nend\nif iov_s <= len then\nnum_sent = num_sent + 1\nlen = len - iov_s\n_pending_writev_total = _pending_writev_total - iov_s\nelse\nifdef windows then\n_pending_writev_windows(num_sent)? = (iov_s-len, iov_p.offset(len))\nelse\n_pending_writev_posix(num_sent)? = (iov_p.offset(len), iov_s-len)\nend\n_pending_writev_total = _pending_writev_total - len\nlen = 0"} +{"id": "Pony/format-FormatHexSmallBare-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatHexSmallBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexSmallBare val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-net-tcp_connection-_52.txt", "contents": "1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046\n1047\n1048\n1049\n1050\n1051"} +{"id": "Pony/src-builtin-signed-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/net-OSSockOpt-_220.txt", "contents": "fun box ip_nat_xxx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_nodefrag\u00b6\n[Source]\nfun box ip_nodefrag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_old_fw_add\u00b6\n[Source]"} +{"id": "Pony/src-buffered-writer-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/1_hello-world_1.txt", "contents": "# The code\n\nThen, create a file in that directory called `main.pony`.\n\n__Does the name of the file matter?__ Not to the compiler, no. Pony doesn't care about filenames other than that they end in `.pony`. But it might matter to you! By giving files good names, it can be easier to find the code you're looking for later.\n\nIn your file, put the following code:\n\n```pony\nactor Main\nnew create(env: Env) =>\nenv.out.print(\"Hello, world!\")\n```\n"} +{"id": "Pony/collections-HashIs-_1.txt", "contents": "create\u00b6\n[Source]\nnew val create()\n: HashIs[A] val^\n\nReturns\u00b6\n\nHashIs[A] val^\n\n\nPublic Functions\u00b6\nhash\u00b6\n[Source]\nHash the identity rather than the contents.\nfun box hash(\nx: box->A!)\n: USize val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-U8-_8.txt", "contents": "fun box ctz_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/builtin-Greater-_1.txt", "contents": "new val create()\n: Greater val^\n\nReturns\u00b6\n\nGreater val^\n\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6"} +{"id": "Pony/builtin-ISize-_53.txt", "contents": "\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_462.txt", "contents": "fun box sctp_ss_fair_bandwith()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_first_come\u00b6\n[Source]\nfun box sctp_ss_first_come()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_priority\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIPrintable-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/reference-capabilities_5.txt", "contents": "## Isolated data is safe\n\nIf a block of data has only one reference to it then we call it __isolated__. Since there is only one reference to it, isolated data cannot be __shared__ by multiple threads, so there are no concurrency problems. Isolated data can be passed between multiple threads. As long as only one of them has a reference to it at a time then the data is still safe from concurrency problems.\n"} +{"id": "Pony/net-OSSockOpt-_615.txt", "contents": "fun box tipc_top_srv()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_wait_forever\u00b6\n[Source]\nfun box tipc_wait_forever()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_withdrawn\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_460.txt", "contents": "fun box sctp_shutdown_received()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_sent\u00b6\n[Source]\nfun box sctp_shutdown_sent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_smallest_pmtu\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_helper-_34.txt", "contents": ": Bool\n=>\n\"\"\"\nAssert that the 2 given expressions are equal.\n\"\"\"\nif expect != actual then\n_fail(_fmt_msg(loc, \"Assert eq failed. \" + msg\n+ \" Expected (\" + expect.string() + \") == (\" + actual.string() + \")\"))\nreturn false\nend\n\n_runner.log(_fmt_msg(loc, \"Assert eq passed. \" + msg\n+ \" Got (\" + expect.string() + \") == (\" + actual.string() + \")\"),\ntrue)\ntrue\n\nfun assert_ne[A: (Equatable[A] #read & Stringable #read)](\nnot_expect: A,\nactual: A,\nmsg: String = \"\","} +{"id": "Pony/net-OSSockOpt-_226.txt", "contents": "fun box ip_pktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pktoptions\u00b6\n[Source]\nfun box ip_pktoptions()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_do\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_63.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_67.txt", "contents": "-0x8000_0000\nelse\n-0x8000_0000_0000_0000\nend\n\nnew max_value() =>\nifdef ilp32 or llp64 then\n0x7FFF_FFFF\nelse\n0x7FFF_FFFF_FFFF_FFFF\nend\n\nfun abs(): ULong => if this < 0 then (-this).ulong() else this.ulong() end\n\nfun bit_reverse(): ILong =>\nifdef ilp32 or llp64 then\n@\"llvm.bitreverse.i32\"(this.u32()).ilong()\nelse\n@\"llvm.bitreverse.i64\"(this.u64()).ilong()\nend"} +{"id": "Pony/src-builtin-float-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/builtin-U16-_46.txt", "contents": "fun box ge(\ny: U16 val)\n: Bool val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: U16 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_101.txt", "contents": "fun box icmp_net_ano()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_net_unknown\u00b6\n[Source]\nfun box icmp_net_unknown()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_net_unreach\u00b6\n[Source]"} +{"id": "Pony/format-Align-_0.txt", "contents": "\n\n\n\n\n\n\nAlign\u00b6\n[Source]\ntype Align is\n(AlignLeft val | AlignRight val | AlignCenter val)\n\nType Alias For\u00b6\n\n(AlignLeft val | AlignRight val | AlignCenter val)\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_118.txt", "contents": "// f(x) = x + (2^-5 * x^2)\nT.from[F64](_subtract = _subtract + (0.03125 * _subtract * _subtract))\n\nfun ref has_next(): Bool =>\nmatch relation\n| Less => (_cur < min) and not _overflow\n| Equal => false\n| Greater => (_cur > min) and not _overflow\nend\n\nfun ref next(): T^ ? =>\nmatch relation\n| Less =>\nlet minuend: T = _next_minuend()\nlet old = _cur\n_cur = _cur + minuend\nif old > _cur then\n_overflow = true\nend\nold"} +{"id": "Pony/builtin-String-_71.txt", "contents": "Returns\u00b6\n\nI128 val ?\n\n\nilong\u00b6\n[Source]\nfun box ilong(\nbase: U8 val = 0)\n: ILong val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nILong val ?\n\n"} +{"id": "Pony/src-pony_check-property_runner-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-U128-_40.txt", "contents": "fun box add_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-randomness-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/pony_bench-MicroBenchmark-_2.txt", "contents": "[Source]\nfun box overhead()\n: MicroBenchmark iso^\n\nReturns\u00b6\n\nMicroBenchmark iso^\n\n\nbefore\u00b6\n[Source]\nfun ref before()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\nbefore_iteration\u00b6"} +{"id": "Pony/pony_check-IntPairProperty-_3.txt", "contents": "ULong val | USize val) & Integer[T] val)](\nx: T,\ny: T,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\nx: T\ny: T\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nname\u00b6\nfun box name()\n: String val"} +{"id": "Pony/src-process-_process-_27.txt", "contents": "primitive _StepExecve\nfun apply(): U8 => 2\n\nprimitive _WNOHANG\nfun apply(): I32 =>\nifdef posix then\n@ponyint_wnohang()\nelse\ncompile_error \"no clue what WNOHANG is on this platform.\"\nend\n\nclass val Exited is (Stringable & Equatable[ProcessExitStatus])\n\"\"\"\nProcess exit status: Process exited with an exit code.\n\"\"\"\nlet _exit_code: I32\n\nnew val create(code: I32) =>\n_exit_code = code\n"} +{"id": "Pony/src-pony_check-for_all-_0.txt", "contents": "\n\n\n\n\n\n\nfor_all.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_575.txt", "contents": "fun box tcp_keepidle()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_keepinit\u00b6\n[Source]\nfun box tcp_keepinit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_keepintvl\u00b6\n[Source]"} +{"id": "Pony/format-FormatUTF32-_1.txt", "contents": "new val create()\n: FormatUTF32 val^\n\nReturns\u00b6\n\nFormatUTF32 val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatUTF32 val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatUTF32 val\n\nReturns\u00b6"} +{"id": "Pony/process-ForkError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ForkError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-unsigned-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-collections-set-_19.txt", "contents": "try _map.remove(value)? end\n\nfun ref extract(value: box->A!): A^ ? =>\n\"\"\"\nRemove a value from the set and return it. Raises an error if the value\nwasn't in the set.\n\"\"\"\n_map.remove(value)?._2\n\nfun ref union(that: Iterator[A^]) =>\n\"\"\"\nAdd everything in that to the set.\n\"\"\"\nfor value in that do\nset(consume value)\nend\n\nfun ref intersect[K: HashFunction[box->A!] val = H](\nthat: HashSet[box->A!, K])\n=>"} +{"id": "Pony/net-OSSockOpt-_512.txt", "contents": "fun box so_peersec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_port_scalability\u00b6\n[Source]\nfun box so_port_scalability()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_priority\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/pony_check-Generators-_3.txt", "contents": "Otherwise we would end up with\nan alias for T which is T!.\n(e.g. String iso would be returned as String iso!,\nwhich aliases as a String tag).\nExample:\nGenerators.repeatedly[Writer]({(): Writer^ =>\nlet writer = Writer.>write(\"consume me, please\")\nconsume writer\n})\n\nfun box repeatedly[T: T](\nf: {(): T^ ?}[T] box)\n: Generator[T] box\n\nParameters\u00b6\n\nf: {(): T^ ?}[T] box\n\nReturns\u00b6\n"} +{"id": "Pony/recovering-capabilities_3.txt", "contents": "else\nwhile value != 0 do\nlet index = ((value = value / base) - (value * base))\ns.push(table(index.usize())?)\nend\nend\nend\n\n_extend_digits(s, prec')\ns.append(typestring)\ns.append(prestring)\n_pad(s, width, align, fill)\ns\nend\n```\n\nThat's from `format/_FormatInt`. It creates a `String ref`, does a bunch of stuff with it, and finally returns it as a `String iso`.\n\nYou can also give an explicit reference capability:\n"} +{"id": "Pony/src-collections-set-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/files-File-_10.txt", "contents": ": None val\n\nParameters\u00b6\n\ndata: (String box | Array[U8 val] box)\n\nReturns\u00b6\n\nNone val\n\n\nqueuev\u00b6\n[Source]\nQueue an iterable collection of ByteSeqs to be written\nNOTE: Queue'd data will always be written before normal print/write\nrequested data\nfun ref queuev(\ndata: ByteSeqIter box)\n: None val\n"} +{"id": "Pony/builtin-U8-_17.txt", "contents": "fun box div_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6"} +{"id": "Pony/buffered-Reader-_1.txt", "contents": "list_size - the number of items in the following list of items\nas a big-endian 32-bit integer\nzero or more items of the following data:\na big-endian 64-bit floating point number\na string that starts with a big-endian 32-bit integer that\nspecifies the length of the string, followed by a number of\nbytes that represent the string\n\nA message would be something like this:\n[message_length][list_size][float1][string1][float2][string2]...\n\nThe following program uses a Reader to decode a message of\nthis type and print them:\nuse \"buffered\"\nuse \"collections\"\n\nclass Notify is InputNotify\nlet _env: Env\nnew create(env: Env) =>\n_env = env"} +{"id": "Pony/src-net-ossockopt-_118.txt", "contents": "fun so_acceptconn():I32 => @pony_os_sockopt_option(I32(802))\nfun so_acceptfilter():I32 => @pony_os_sockopt_option(I32(803))\nfun so_atmpvc():I32 => @pony_os_sockopt_option(I32(804))\nfun so_atmqos():I32 => @pony_os_sockopt_option(I32(805))\nfun so_atmsap():I32 => @pony_os_sockopt_option(I32(806))\nfun so_attach_bpf():I32 => @pony_os_sockopt_option(I32(807))\nfun so_attach_filter():I32 => @pony_os_sockopt_option(I32(808))\nfun so_bindtodevice():I32 => @pony_os_sockopt_option(I32(809))\nfun so_bintime():I32 => @pony_os_sockopt_option(I32(810))\nfun so_bpf_extensions():I32 => @pony_os_sockopt_option(I32(811))\nfun so_broadcast():I32 => @pony_os_sockopt_option(I32(812))\nfun so_bsdcompat():I32 => @pony_os_sockopt_option(I32(813))\nfun so_bsp_state():I32 => @pony_os_sockopt_option(I32(814))\nfun so_busy_poll():I32 => @pony_os_sockopt_option(I32(815))\nfun so_conaccess():I32 => @pony_os_sockopt_option(I32(816))\nfun so_condata():I32 => @pony_os_sockopt_option(I32(817))\nfun so_conditional_accept():I32 => @pony_os_sockopt_option(I32(818))\nfun so_connect_time():I32 => @pony_os_sockopt_option(I32(819))\nfun so_debug():I32 => @pony_os_sockopt_option(I32(820))\nfun so_detach_bpf():I32 => @pony_os_sockopt_option(I32(821))"} +{"id": "Pony/1_variables_3.txt", "contents": "```\n\nVariables only exist from when they are defined until the end of the current scope. For our variable `x` this is the `end` at the end of the then expression: after that, it cannot be used.\n"} +{"id": "Pony/src-files-directory-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-term-ansi_term-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/files-FileExists-_0.txt", "contents": "\n\n\n\n\n\n\nFileExists\u00b6\n[Source]\nprimitive val FileExists\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileExists val^\n\nReturns\u00b6\n\nFileExists val^"} +{"id": "Pony/annotations_5.txt", "contents": "### `packed`\n\nRecognised on a `struct` declaration. Removes padding in the associated `struct`, making it ABI-compatible with a packed C structure with compatible members (declared with the `__attribute__((packed))` extension or the `#pragma pack` preprocessor directive in many C compilers).\n\n```pony\nstruct \\packed\\ MyPackedStruct\nvar x: U8\nvar y: U32\n```\n"} +{"id": "Pony/src-net-ossockopt-_61.txt", "contents": "1212\n1213\n1214\n1215\n1216\n1217\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1231"} +{"id": "Pony/builtin-F32-_21.txt", "contents": "(F32 val , U32 val)\n\n\nlog\u00b6\n[Source]\nfun box log()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nlog2\u00b6\n[Source]\nfun box log2()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-float-_32.txt", "contents": "\nnew min_normalised() =>\n\"\"\"\nMinimum positive value representable at full precision (ie a normalised\nnumber).\n\"\"\"\nfrom_bits(0x00800000)\n\nnew epsilon() =>\n\"\"\"\nMinimum positive value such that (1 + epsilon) != 1.\n\"\"\"\nfrom_bits(0x34000000)\n\nfun tag radix(): U8 =>\n\"\"\"\nExponent radix.\n\"\"\"\n2\n"} +{"id": "Pony/net-OSSockOpt-_126.txt", "contents": "fun box ipv6_2292pktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292pktoptions\u00b6\n[Source]\nfun box ipv6_2292pktoptions()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_2292rthdr\u00b6\n[Source]"} +{"id": "Pony/garbage-collection_1.txt", "contents": "# Pony-ORCA characteristics\n\n1. An actor may perform garbage collection concurrently with other actors while they are executing any kind of behaviour.\n\n2. An actor may decide whether to garbage collect an object solely based on its own local state, without consultation with or inspecting the state of any other actor.\n\n3. No synchronization between actors is required during garbage collection, other than potential message sends.\n\n4. An actor may garbage collect between its normal behaviours, i.e. it need not wait until its message queue is empty.\n\n5. Pony-ORCA can be applied to several other programming languages, provided that they satisfy the following two requirements:\n\n* **Actor behaviours are atomic**.\n\n* **Message delivery is causal**. [Causal](https://www.google.com/search?q=causal+definition): messages arrive before any messages they may have caused if they have the same destination. So there needs to be some kind of causal ordering guarantee, but fewer requirements than with comparable concurrent, fast garbage collectors.\n"} +{"id": "Pony/builtin-U8-_16.txt", "contents": "U8 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_5.txt", "contents": "\nU16 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Real-_21.txt", "contents": "ILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_25.txt", "contents": "(I128 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , Bool val)\n\n\ndivc\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/src-buffered-writer-_21.txt", "contents": "\"\"\"\nWrite an I16 to the buffer in big-endian byte order.\n\"\"\"\nu16_be(data.u16())\n\nfun ref u32_le(data: U32) =>\n\"\"\"\nWrite a U32 to the buffer in little-endian byte order.\n\"\"\"\nlet num_bytes = U32(0).bytewidth()\nifdef littleendian then\n_current.push_u32(data)\nelse\n_current.push_u32(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref u32_be(data: U32) =>\n\"\"\"\nWrite a U32 to the buffer in big-endian byte order."} +{"id": "Pony/src-term-ansi-_16.txt", "contents": "if n <= 1 then\n\"\\x1B[A\"\nelse\n\"\\x1B[\" + n.string() + \"A\"\nend\n\nfun down(n: U32 = 0): String =>\n\"\"\"\nMove the cursor down n lines. 0 is the same as 1.\n\"\"\"\nif n <= 1 then\n\"\\x1B[B\"\nelse\n\"\\x1B[\" + n.string() + \"B\"\nend\n\nfun right(n: U32 = 0): String =>\n\"\"\"\nMove the cursor right n columns. 0 is the same as 1.\n\"\"\""} +{"id": "Pony/builtin-UnsignedInteger-_53.txt", "contents": "\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I128-_61.txt", "contents": "U32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F64-_1.txt", "contents": "new val create(\nvalue: F64 val = 0)\n: F64 val^\n\nParameters\u00b6\n\nvalue: F64 val = 0\n\nReturns\u00b6\n\nF64 val^\n\n\npi\u00b6\n[Source]\nnew val pi()\n: F64 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-ansi_term-_29.txt", "contents": "\nbe prompt(value: String) =>\n\"\"\"\nPass a prompt along to the notifier.\n\"\"\"\n_notify.prompt(this, value)\n\nbe size() =>\n_size()\n\nfun ref _size() =>\n\"\"\"\nPass the window size to the notifier.\n\"\"\"\nlet ws: _TermSize = _TermSize\nifdef posix then\n@ioctl(0, _TIOCGWINSZ(), ws) // do error handling\n_notify.size(ws.row, ws.col)\nend\n"} +{"id": "Pony/src-builtin-string-_149.txt", "contents": "cur.push(_ptr._apply(i))\ni = i + 1\nend\n\nresult.push(consume cur)\nend\n\nconsume result\n\nfun ref strip(s: String box = \" \\t\\v\\f\\r\\n\") =>\n\"\"\"\nRemove all leading and trailing characters from the string that are in s.\n\"\"\"\nthis .> lstrip(s) .> rstrip(s)\n\nfun ref rstrip(s: String box = \" \\t\\v\\f\\r\\n\") =>\n\"\"\"\nRemove all trailing characters within the string that are in s. By default,\ntrailing whitespace is removed.\n\"\"\""} +{"id": "Pony/src-random-mt-_9.txt", "contents": "end\n\nfun tag _n(): USize => 312\nfun tag _m(): USize => 156\nfun tag _n1(): USize => _n() - 1\n\nfun tag _mask(x: U64, y: U64): U64 =>\n(x and 0xffffffff80000000) or (y and 0x000000007fffffff)\n\nfun tag _matrix(x: U64): U64 => (x and 1) * 0xb5026f5aa96619e9\n\nfun tag _mix(x: U64, y: U64): U64 =>\nlet z = _mask(x, y)\n(z >> 1) xor _matrix(z)\n\nfun ref _lower(i: USize, x: U64): U64 ? =>\nlet y = _state(i + 1)?\n_state(i)? = _state(i + _m())? xor _mix(x, y)\ny\n"} +{"id": "Pony/src-net-net_address-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-process-process_notify-_3.txt", "contents": "52\n53\n54interface ProcessNotify\n\"\"\"\nNotifications for Process connections.\n\"\"\"\n\nfun ref created(process: ProcessMonitor ref) =>\n\"\"\"\nProcessMonitor calls this when it is created.\n\"\"\"\n\nfun ref stdout(process: ProcessMonitor ref, data: Array[U8] iso) =>\n\"\"\"\nProcessMonitor calls this when new data is received on STDOUT of the\nforked process\n\"\"\"\n\nfun ref stderr(process: ProcessMonitor ref, data: Array[U8] iso) =>\n\"\"\""} +{"id": "Pony/cli-ArgSpec-_1.txt", "contents": " true\nto yield an arg value like\ncmd.arg(\"opt\").bool() == true.\nnew val bool(\nname': String val,\ndescr': String val = \"\",\ndefault': (Bool val | None val) = reference)\n: ArgSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\ndefault': (Bool val | None val) = reference\n\nReturns\u00b6\n\nArgSpec val^\n\n"} +{"id": "Pony/src-builtin-real-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-collections-list-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/term-Readline-_9.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nend_key\u00b6\n[Source]\nEnd of the line.\nfun ref end_key(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-Real-_1.txt", "contents": "\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nvalue: A)\n: Real[A] val^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nReal[A] val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |"} +{"id": "Pony/src-files-file_info-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-cli-command_spec-_30.txt", "contents": "commands': Array[CommandSpec] box = Array[CommandSpec]()) ?\n=>\n\"\"\"\nCreates a command spec that can accept options and child commands, but not\narguments.\n\"\"\"\n_type = _CommandSpecParent\n_name = _assertName(name')?\n_descr = descr'\nfor o in options'.values() do\n_options.update(o.name(), o)\nend\nfor c in commands'.values() do\n_commands.update(c.name(), c)\nend\n\nnew leaf(\nname': String,\ndescr': String = \"\",\noptions': Array[OptionSpec] box = Array[OptionSpec](),"} +{"id": "Pony/builtin-U128-_52.txt", "contents": "I16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U64-_29.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nrotr\u00b6\n[Source]\nfun box rotr(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Cons-_5.txt", "contents": "fun box head()\n: val->A\n\nReturns\u00b6\n\nval->A\n\n\ntail\u00b6\n[Source]\nReturns the tail of the list.\nfun box tail()\n: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\nreverse\u00b6"} +{"id": "Pony/builtin-U32-_6.txt", "contents": "\nU32 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Nil-_8.txt", "contents": "fun box map[B: B](\nf: {(val->A): val->B}[A, B] box)\n: Nil[B] val\n\nParameters\u00b6\n\nf: {(val->A): val->B}[A, B] box\n\nReturns\u00b6\n\nNil[B] val\n\n\nflat_map[B: B]\u00b6\n[Source]\nFlatmapping a function from A to B over the empty list yields the\nempty list of Bs.\nfun box flat_map[B: B](\nf: {(val->A): List[B]}[A, B] box)\n: Nil[B] val"} +{"id": "Pony/builtin-I128-_10.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/term-ANSINotify-_9.txt", "contents": "\n\npage_up\u00b6\n[Source]\nfun ref page_up(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/builtin-Integer-_31.txt", "contents": "\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem\u00b6\n[Source]\nfun box rem("} +{"id": "Pony/builtin-SignedInteger-_38.txt", "contents": "A\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/aliasing_4.txt", "contents": "# Alias types\n\nOccasionally we'll want to talk about the type of an alias generically. An alias type is a way of saying \"whatever we can safely alias this thing as\". We'll discuss generic types later, which will put this to use, but for now it will help us talk about aliases of capabilities in the future.\n\nWe indicate an alias type by putting a `!` at the end. Here's an example:\n\n```pony\nfun test(a: A) =>\nvar b: A! = a\n```\n\nHere, we're using `A` as a __type variable__, which we'll cover later. So `A!` means \"an alias of whatever type `A` is\". We can also use it to talk about capabilities: we could have written the statements about `iso` and `trn` as just `iso!` = `tag` and `trn!` = `box`.\n"} +{"id": "Pony/bureaucracy-Registrar-_0.txt", "contents": "\n\n\n\n\n\n\nRegistrar\u00b6\n[Source]\nA Registrar keeps a map of lookup string to anything. Generally, this is used\nto keep a directory of long-lived service-providing actors that can be\nlooked up name.\nactor tag Registrar\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew tag create()\n: Registrar tag^\n"} +{"id": "Pony/files-FileSeek-_0.txt", "contents": "\n\n\n\n\n\n\nFileSeek\u00b6\n[Source]\nprimitive val FileSeek\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileSeek val^\n\nReturns\u00b6\n\nFileSeek val^"} +{"id": "Pony/src-time-time-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\"\"\""} +{"id": "Pony/random-XorShift128Plus-_3.txt", "contents": "[Source]\nA random integer in [0, 2^64)\nfun ref next()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhas_next\u00b6\n[Source]\nfun tag has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-format-format-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-I64-_35.txt", "contents": "I64 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nop_not\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_24.txt", "contents": "use @kill[I32](pid_t: I32, sig: U32)\nuse @waitpid[I32](pid: I32, stat_loc: Pointer[I32] tag, opts: I32)\nuse @_exit[None](status: I32)\n\n// for Windows System Error Codes see: https://docs.microsoft.com/de-de/windows/desktop/Debug/system-error-codes\nprimitive _ERRORBADEXEFORMAT\nfun apply(): U32 =>\n\"\"\"\nERROR_BAD_EXE_FORMAT\n%1 is not a valid Win32 application.\n\"\"\"\n193 // 0xC1\n\nprimitive _ERRORDIRECTORY\nfun apply(): U32 =>\n\"\"\"\nThe directory name is invalid.\n\"\"\"\n267 // 0x10B\n"} +{"id": "Pony/src-term-ansi-_18.txt", "contents": "\"\"\"\nif (x <= 1) and (y <= 1) then\n\"\\x1B[H\"\nelse\n\"\\x1B[\" + y.string() + \";\" + x.string() + \"H\"\nend\n\nfun clear(): String =>\n\"\"\"\nClear the screen and move the cursor to the top left corner.\n\"\"\"\n\"\\x1B[H\\x1B[2J\"\n\nfun erase(direction: _EraseDirection = EraseRight): String =>\n\"\"\"\nErases content. The direction to erase is dictated by the `direction`\nparameter. Use `EraseLeft` to erase everything from the cursor to the\nbeginning of the line. Use `EraseLine` to erase the entire line. Use\n`EraseRight` to erase everything from the cursor to the end of the line.\nThe default direction is `EraseRight`."} +{"id": "Pony/src-collections-list-_77.txt", "contents": "end\n\nfun filter(f: {(this->A!): Bool} box): List[this->A!]^ =>\n\"\"\"\nBuilds a new `List` with those elements that satisfy the predicate.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.filter( {(s: String): Bool => s == \"b\" } ) // other_list is [\"b\"]\n```\n\"\"\"\ntry\n_filter(head()?, f, List[this->A!])\nelse\nList[this->A!]\nend\n\nfun _filter(\nln: this->ListNode[A],\nf: {(this->A!): Bool} box,"} +{"id": "Pony/src-builtin-unsigned-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/9_object-literals_3.txt", "contents": "class Foo\nfun foo(str: String): Hashable iso^ =>\nobject iso is Hashable\nlet s: String = str\nfun apply(): String => s\nfun hash(): USize => s.hash()\nend\n```\n\nWe can also implicitly capture values from the lexical scope by using them in the object literal. Sometimes values that aren't local variables, aren't fields, and aren't parameters of a function are called _free variables_. By using them in a function, we are _closing over_ them - that is, capturing them. The code above could be written without the field `s`:\n\n```pony\nuse \"collections\"\n\nclass Foo\nfun foo(str: String): Hashable iso^ =>\nobject iso is Hashable\nfun apply(): String => str\nfun hash(): USize => str.hash()\nend"} +{"id": "Pony/collections-persistent-Vec-_11.txt", "contents": "fun val slice(\nfrom: USize val = 0,\nto: USize val = call,\nstep: USize val = 1)\n: Vec[A] val\n\nParameters\u00b6\n\nfrom: USize val = 0\nto: USize val = call\nstep: USize val = 1\n\nReturns\u00b6\n\nVec[A] val\n\n\nreverse\u00b6\n[Source]\nReturn a vector with the elements in reverse order."} +{"id": "Pony/src-pony_check-property_helper-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/capsicum-Cap-_29.txt", "contents": "fun box bindat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nconnectat\u00b6\n[Source]\nfun box connectat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsock_client\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_52.txt", "contents": "\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-net-tcp_connection-_65.txt", "contents": "use @pony_asio_event_fd[U32](event: AsioEventID)\nuse @pony_asio_event_resubscribe_read[None](event: AsioEventID)\nuse @pony_asio_event_resubscribe_write[None](event: AsioEventID)\nuse @pony_asio_event_get_disposable[Bool](event: AsioEventID)\nuse @pony_asio_event_set_writeable[None](event: AsioEventID, writeable: Bool)\nuse @pony_asio_event_set_readable[None](event: AsioEventID, readable: Bool)\nuse @pony_os_recv[USize](event: AsioEventID, buffer: Pointer[U8] tag,\nsize: USize) ?\nuse @pony_os_writev[USize](ev: AsioEventID, wsa: Pointer[(USize, Pointer[U8] tag)] tag,\nwsacnt: I32) ? if windows\nuse @pony_os_writev[USize](ev: AsioEventID, iov: Pointer[(Pointer[U8] tag, USize)] tag,\niovcnt: I32) ? if not windows\nuse @pony_os_writev_max[I32]()\nuse @pony_os_keepalive[None](fd: U32, secs: U32)\nuse @pony_os_socket_close[None](fd: U32)\nuse @pony_os_socket_shutdown[None](fd: U32)\nuse @pony_os_connect_tcp[U32](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag, from: Pointer[U8] tag, flags: U32)\nuse @pony_os_connect_tcp4[U32](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag, from: Pointer[U8] tag, flags: U32)"} +{"id": "Pony/src-bureaucracy-custodian-_0.txt", "contents": "\n\n\n\n\n\n\ncustodian.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_577.txt", "contents": "fun box tcp_maxburst()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_maxhlen\u00b6\n[Source]\nfun box tcp_maxhlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_maxolen\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_helper-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465interface val _PropertyRunNotify\n\"\"\"\nSimple callback for notifying the runner\nthat a run completed.\n\"\"\"\nfun apply(round: _Round, success: Bool)\n"} +{"id": "Pony/builtin-Unsigned-_0.txt", "contents": "\n\n\n\n\n\n\nUnsigned\u00b6\n[Source]\ntype Unsigned is\n(U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)\n\nType Alias For\u00b6\n\n(U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val)\n\n\n\n\n"} +{"id": "Pony/src-net-tcp_connection-_112.txt", "contents": "and (_read_buf_offset > 0) do\n// get data to be distributed and update `_read_buf_offset`\nlet chop_at = if _expect == 0 then _read_buf_offset else _expect end\n(let data, _read_buf) = (consume _read_buf).chop(chop_at)\n_read_buf_offset = _read_buf_offset - chop_at\n\n_notify.received(this, consume data, 1)\n_read_buf_size()\nend\n\n_queue_read()\nend\n\nfun ref _read_buf_size() =>\n\"\"\"\nResize the read buffer if it is empty or smaller than the next payload size\n\"\"\"\nif _read_buf.size() <= _expect then\n_read_buf.undefined(_read_buffer_size)\nend"} +{"id": "Pony/pony_check-Generators-_2.txt", "contents": "\nGenerator[box->T] box\n\n\nnone[T: None val]\u00b6\n[Source]\nfun box none[T: None val]()\n: Generator[(T | None val)] box\n\nReturns\u00b6\n\nGenerator[(T | None val)] box\n\n\nrepeatedly[T: T]\u00b6\n[Source]\nGenerate values by calling the lambda f repeatedly,\nonce for every invocation of generate.\nf needs to return an ephemeral type T^, that means\nin most cases it needs to consume its returned value."} +{"id": "Pony/collections-List-_30.txt", "contents": "\nList[B] ref^\n\n\nfilter\u00b6\n[Source]\nBuilds a new List with those elements that satisfy the predicate.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.filter( {(s: String): Bool => s == \"b\" } ) // other_list is [\"b\"]\n\nfun box filter(\nf: {(this->A!): Bool}[A] box)\n: List[this->A!] ref^\n\nParameters\u00b6\n\nf: {(this->A!): Bool}[A] box\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-readline-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/buffered-Writer-_6.txt", "contents": "\ndata: U8 val\n\nReturns\u00b6\n\nNone val\n\n\nu16_le\u00b6\n[Source]\nWrite a U16 to the buffer in little-endian byte order.\nfun ref u16_le(\ndata: U16 val)\n: None val\n\nParameters\u00b6\n\ndata: U16 val\n\nReturns\u00b6"} +{"id": "Pony/collections-List-_15.txt", "contents": "None val\n\n\nhead\u00b6\n[Source]\nShow the head of the list, raising an error if the head is empty.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.head()? end // Returns a ListNode[String] containing \"a\"\n\nfun box head()\n: this->ListNode[A] ref ?\n\nReturns\u00b6\n\nthis->ListNode[A] ref ?\n\n\ntail\u00b6\n[Source]\nShow the tail of the list, raising an error if the tail is empty."} +{"id": "Pony/builtin-I128-_56.txt", "contents": "USize val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_126.txt", "contents": "fun tcpolen_window():I32 => @pony_os_sockopt_option(I32(962))\nfun tcpopt_cc():I32 => @pony_os_sockopt_option(I32(963))\nfun tcpopt_ccecho():I32 => @pony_os_sockopt_option(I32(964))\nfun tcpopt_ccnew():I32 => @pony_os_sockopt_option(I32(965))\nfun tcpopt_eol():I32 => @pony_os_sockopt_option(I32(966))\nfun tcpopt_fastopen():I32 => @pony_os_sockopt_option(I32(967))\nfun tcpopt_fast_open():I32 => @pony_os_sockopt_option(I32(968))\nfun tcpopt_maxseg():I32 => @pony_os_sockopt_option(I32(969))\nfun tcpopt_multipath():I32 => @pony_os_sockopt_option(I32(970))\nfun tcpopt_nop():I32 => @pony_os_sockopt_option(I32(971))\nfun tcpopt_pad():I32 => @pony_os_sockopt_option(I32(972))\nfun tcpopt_sack():I32 => @pony_os_sockopt_option(I32(973))\nfun tcpopt_sack_hdr():I32 => @pony_os_sockopt_option(I32(974))\nfun tcpopt_sack_permitted():I32 => @pony_os_sockopt_option(I32(975))\nfun tcpopt_sack_permit_hdr():I32 => @pony_os_sockopt_option(I32(976))\nfun tcpopt_signature():I32 => @pony_os_sockopt_option(I32(977))\nfun tcpopt_timestamp():I32 => @pony_os_sockopt_option(I32(978))\nfun tcpopt_tstamp_hdr():I32 => @pony_os_sockopt_option(I32(979))\nfun tcpopt_window():I32 => @pony_os_sockopt_option(I32(980))\nfun tcp_ca_name_max():I32 => @pony_os_sockopt_option(I32(981))"} +{"id": "Pony/annotations_10.txt", "contents": "```pony\nclass \\nosupertype\\ Empty\n\nclass Foo\nfun foo[A: Any](a: (A | Empty val)) =>\nmatch consume a\n| let a': A => None\nend\n```\n\n`nosupertype` is particularly valuable when constructing generic classes like collections that need a marker class to describe \"lack of an item\".\n"} +{"id": "Pony/src-serialise-serialise-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/0_literals_15.txt", "contents": "## Arrays and References\n\nConstructing an array with a literal creates new references to its elements. Thus, to be 100% technically correct, array literal elements are inferred to be the alias of the actual element type. If all elements are of type `T` the array literal will be inferred as `Array[T!] ref` that is as an array of aliases of the type `T`.\n\nIt is thus necessary to use elements that can have more than one reference of the same type (e.g. types with `val` or `ref` capability) or use ephemeral types for other capabilities (as returned from [constructors](/types/classes.md#constructors) or the [consume expression](/reference-capabilities/consume-and-destructive-read.md)).\n"} +{"id": "Pony/src-files-file_path-_37.txt", "contents": "if ret == 0 then\nreturn false\nend\n\n// get current process pseudo-handle\nlet handle = @GetCurrentProcess()\nif handle == 0 then\nreturn false\nend\n\n// get security token\nvar token: USize = 0\nlet rights: U32 = 0x0020 // TOKEN_ADJUST_PRIVILEGES\nret = @OpenProcessToken(handle, rights, addressof token)\nif ret == 0 then\nreturn false\nend\n\n// try to turn on SE_CREATE_SYMBOLIC_LINK privilege\n// this won't work unless we are administrator or have Developer Mode on"} +{"id": "Pony/pony_test-TestHelper-_11.txt", "contents": "not_expect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nnot_expect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_array_eq[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]"} +{"id": "Pony/src-signals-sig-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/capsicum-Cap-_43.txt", "contents": "\nthat: Cap val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-F32-_25.txt", "contents": "F32 val\n\n\nsqrt_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is negative, the result is undefined.\nfun box sqrt_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\ncbrt\u00b6\n[Source]\nfun box cbrt()\n: F32 val\n"} +{"id": "Pony/src-net-net_address-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-U8-_5.txt", "contents": "\nU8 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/assert-Fact-_0.txt", "contents": "\n\n\n\n\n\n\nFact\u00b6\n[Source]\nThis is an assertion that is always enabled. If the test is false, it will\nprint any supplied error message to stderr and raise an error.\nprimitive val Fact\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Fact val^\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-int_properties-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_540.txt", "contents": "fun box tcpci_opt_timestamps()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_opt_wscale\u00b6\n[Source]\nfun box tcpci_opt_wscale()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpf_ca_cwr\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_162.txt", "contents": "fun box ipv6_priority_uncharacterized()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvdstopts\u00b6\n[Source]\nfun box ipv6_recvdstopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recverr\u00b6\n[Source]"} +{"id": "Pony/src-collections-map-_34.txt", "contents": "Delete a value from the map and return it. Raises an error if there was no\nvalue for the given key.\n\"\"\"\ntry\n(let i, let found) = _search(key)\n\nif found then\n_size = _size - 1\n\nmatch _array(i)? = _MapDeleted\n| (let k: K, let v: V) =>\nreturn (consume k, consume v)\nend\nend\nend\nerror\n\nfun get_or_else(key: box->K!, alt: this->V): this->V =>\n\"\"\"\nGet the value associated with provided key if present. Otherwise,"} +{"id": "Pony/collections-persistent-HashMap-_2.txt", "contents": "\nPublic Functions\u00b6\napply\u00b6\n[Source]\nAttempt to get the value corresponding to k.\nfun val apply(\nk: K)\n: val->V ?\n\nParameters\u00b6\n\nk: K\n\nReturns\u00b6\n\nval->V ?\n\n\nsize\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_0.txt", "contents": "\n\n\n\n\n\n\nIter[A: A]\u00b6\n[Source]\nWrapper class containing methods to modify iterators.\nclass ref Iter[A: A] is\nIterator[A] ref\n\nImplements\u00b6\n\nIterator[A] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/builtin-SignedInteger-_54.txt", "contents": "F32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_140.txt", "contents": "fun box ipv6_fl_s_user()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_hoplimit\u00b6\n[Source]\nfun box ipv6_hoplimit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_hopopts\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-builtin-string-_69.txt", "contents": "1372\n1373\n1374\n1375\n1376\n1377\n1378\n1379\n1380\n1381\n1382\n1383\n1384\n1385\n1386\n1387\n1388\n1389\n1390\n1391"} +{"id": "Pony/builtin-USize-_38.txt", "contents": "fun box add(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-signed-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-I16-_24.txt", "contents": "fun box mod_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-Bool-_2.txt", "contents": "Parameters\u00b6\n\ny: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: Bool val)\n: Bool val\n\nParameters\u00b6\n\ny: Bool val\n\nReturns\u00b6"} +{"id": "Pony/5_methods_12.txt", "contents": "\nNote how in `b` above, the arguments were given out of order by using `where` followed using the name of the arguments.\n\n__Should I specify `where` for each named argument?__ No. There must be only one `where` in a method call.\n\nNamed and positional arguments can be used together in a single call. Just start with the positional arguments you want to specify, then a `where` and finally the named arguments. But be careful, each argument must be specified only once.\n\nDefault arguments can also be used in combination with positional and named arguments - just miss out any for which you want to use the default.\n\n```pony\nclass Foo\nfun f(a: U32 = 1, b: U32 = 2, c: U32 = 3, d: U32 = 4, e: U32 = 5): U32 =>\n0\n\nfun g() =>\nf(6, 7 where d = 8)\n// Equivalent to:\nf(6, 7, 3, 8, 5)\n```\n"} +{"id": "Pony/cli-Option-_4.txt", "contents": ": U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nf64\u00b6\n[Source]\nReturns the option value as an F64, defaulting to 0.0.\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nstring_seq\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/pony_check-Property1UnitTest-_6.txt", "contents": "\nNone val ?\n\n\ntear_down\u00b6\nfun ref tear_down(\nh: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nlabel\u00b6\nfun box label()"} +{"id": "Pony/builtin-U32-_10.txt", "contents": "U32 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\naddc\u00b6\n[Source]"} +{"id": "Pony/signals-Sig-_11.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nchld\u00b6\n[Source]\nfun box chld()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nttin\u00b6\n[Source]\nfun box ttin()\n: U32 val\n"} +{"id": "Pony/promises-Promise-_4.txt", "contents": "Why is flatten_next valuable given that next could take a B that is of\na type like Promise[String]? Let's start with some code to demonstrate the\nproblem that arises when returning Promise[Promise[B]] from next.\nLet's say we have a library for accessing the GitHub REST API:\nclass GitHub\nnew create(personal_access_token: String)\n\nfun get_repo(repo: String): Promise[Repository]\n\nclass Repository\nfun get_issue(number: I64): Promise[Issue]\n\nclass Issue\nfun title(): String\n\nAnd we want to use this promise based API to look up the title of an issue.\nWithout flatten_next, we could attempt to do the following using next:\nactor Main\nnew create(env: Env) =>\nlet repo: Promise[Repository] ="} +{"id": "Pony/src-files-file_mode-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-Array-_18.txt", "contents": "offset: USize val\nvalue: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nupdate_u16[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nWrite a U16 at offset. This is only allowed for an array of U8s.\nfun ref update_u16[optional B: (A & Real[B] val & U8 val)](\noffset: USize val,\nvalue: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\noffset: USize val\nvalue: U16 val"} +{"id": "Pony/src-term-ansi_term-_26.txt", "contents": "_esc_flush()\nend\n| _EscapeCSI =>\nmatch c\n| 'A' => _up()\n| 'B' => _down()\n| 'C' => _right()\n| 'D' => _left()\n| 'H' => _home()\n| 'F' => _end()\n| '~' => _keypad()\n| ';' =>\n_escape = _EscapeMod\n| if (c >= '0') and (c <= '9') =>\n// Escape number.\n_esc_num = (_esc_num * 10) + (c - '0')\n_esc_buf.push(c)\nelse\n_esc_flush()\nend"} +{"id": "Pony/builtin-DoNotOptimise-_3.txt", "contents": "Parameters\u00b6\n\nthat: DoNotOptimise val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: DoNotOptimise val)\n: Bool val\n\nParameters\u00b6\n\nthat: DoNotOptimise val\n\nReturns\u00b6"} +{"id": "Pony/src-process-_process-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/1_classes_7.txt", "contents": "let _hawk: Hawk = Hawk\n```\n\nThis is explained later, in more detail in the [sugar](/expressions/sugar.md) section.\n"} +{"id": "Pony/src-itertools-iter-_87.txt", "contents": "// _iter might be empty, get next value from other\nif _iter.has_next() then\n_iter.next()?\nelse\nother.next()?\nend\nelse\n_use_original = not _use_original\n\n// other might be empty, get next value from _iter\nif other.has_next() then\nother.next()?\nelse\n_iter.next()?\nend\nend\nend)\n\nfun ref interleave_shortest(other: Iterator[A]): Iter[A!] =>\n\"\"\""} +{"id": "Pony/src-net-ossockopt-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-net-tcp_connection_notify-_9.txt", "contents": "Called if name resolution succeeded for a TCPConnection and we are now\nwaiting for a connection to the server to succeed. The count is the number\nof connections we're trying. The notifier will be informed each time the\ncount changes, until a connection is made or connect_failed() is called.\n\"\"\"\nNone\n\nfun ref connected(conn: TCPConnection ref) =>\n\"\"\"\nCalled when we have successfully connected to the server.\n\"\"\"\nNone\n\nfun ref connect_failed(conn: TCPConnection ref)\n\"\"\"\nCalled when we have failed to connect to all possible addresses for the\nserver. At this point, the connection will never be established.\n\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:"} +{"id": "Pony/8_sugar_2.txt", "contents": "foo(x, 37 where crash = false)\n```\n\nbecomes:\n\n```pony\nvar foo = Foo.create()\nfoo.apply(x, 37 where crash = false)\n```\n\n__Do I still need to provide the arguments to apply?__ Yes, only the `apply` will be added for you, the correct number and type of arguments must be supplied. Default and named arguments can be used as normal.\n\n__How do I call a function foo if apply is added?__ The `apply` sugar is only added when calling an object, not when calling a method. The compiler can tell the difference and only adds the `apply` when appropriate.\n"} +{"id": "Pony/random-XorOshiro128StarStar-_5.txt", "contents": ": U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun ref u128()"} +{"id": "Pony/files-FileOK-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileOK val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileOK val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_47.txt", "contents": "String iso^\n\n\ninsert_in_place\u00b6\n[Source]\nInserts the given string at the given offset. Appends the string if the\noffset is out of bounds.\nfun ref insert_in_place(\noffset: ISize val,\nthat: String box)\n: None val\n\nParameters\u00b6\n\noffset: ISize val\nthat: String box\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-builtin-unsigned-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-collections-persistent-list-_39.txt", "contents": "\"\"\"\nconsume acc\n\nfun every(f: {(val->A): Bool} box): Bool =>\n\"\"\"\nAny predicate is true of every member of the empty list.\n\"\"\"\ntrue\n\nfun exists(f: {(val->A): Bool} box): Bool =>\n\"\"\"\nFor any predicate, there is no element that satisfies it in the empty\nlist.\n\"\"\"\nfalse\n\nfun partition(f: {(val->A): Bool} box): (Nil[A], Nil[A]) =>\n\"\"\"\nThe only partition of the empty list is two empty lists.\n\"\"\""} +{"id": "Pony/pony_check-ASCIINonPrintable-_2.txt", "contents": "\nthat: ASCIINonPrintable val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIINonPrintable val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIINonPrintable val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/1_variables_12.txt", "contents": "# Shadowing\n\nSome programming languages let you declare a variable with the same name as an existing variable, and then there are rules about which one you get. This is called _shadowing_, and it's a source of bugs. If you accidentally shadow a variable in Pony, the compiler will complain.\n\nIf you need a variable with _nearly_ the same name, you can use a prime `'`.\n"} +{"id": "Pony/src-process-process_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-time-timer_notify-_0.txt", "contents": "\n\n\n\n\n\n\ntimer_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/term-ANSI-_19.txt", "contents": "[Source]\nBright grey text.\nfun box bright_grey()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nblack_bg\u00b6\n[Source]\nBlack background.\nfun box black_bg()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/src-term-ansi_term-_22.txt", "contents": "\"\"\"\nHandles ANSI escape codes from stdin.\n\"\"\"\nlet _timers: Timers\nvar _timer: (Timer tag | None) = None\nlet _notify: ANSINotify\nlet _source: DisposableActor\nvar _escape: _EscapeState = _EscapeNone\nvar _esc_num: U8 = 0\nvar _esc_mod: U8 = 0\nembed _esc_buf: Array[U8] = Array[U8]\nvar _closed: Bool = false\n\nnew create(\nnotify: ANSINotify iso,\nsource: DisposableActor,\ntimers: Timers = Timers)\n=>\n\"\"\"\nCreate a new ANSI term."} +{"id": "Pony/src-builtin-float-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-files-path-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-pony_check-generator-_90.txt", "contents": "min: USize = 0,\nmax: USize = 100)\n: Generator[S]\n=>\n\"\"\"\nCreate a `Seq` from the values of the given Generator with an optional\nminimum and maximum size.\n\nDefaults are 0 and 100, respectively.\n\"\"\"\n\nGenerator[S](\nobject is GenObj[S]\nlet _gen: GenObj[T] = gen\nfun generate(rnd: Randomness): GenerateResult[S] =>\nlet size = rnd.usize(min, max)\n\nlet result: S =\nIter[T^](_gen.value_iter(rnd))\n.take(size)"} +{"id": "Pony/src-process-process_monitor-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-collections-list-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/buffered-Writer-_12.txt", "contents": "i32_be\u00b6\n[Source]\nWrite an I32 to the buffer in big-endian byte order.\nfun ref i32_be(\ndata: I32 val)\n: None val\n\nParameters\u00b6\n\ndata: I32 val\n\nReturns\u00b6\n\nNone val\n\n\nf32_le\u00b6\n[Source]\nWrite an F32 to the buffer in little-endian byte order.\nfun ref f32_le("} +{"id": "Pony/builtin-I16-_58.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/builtin-U16-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_40.txt", "contents": "fun box atanh()\n: A\n\nReturns\u00b6\n\nA\n\n\ncopysign\u00b6\n[Source]\nfun box copysign(\nsign: A)\n: A\n\nParameters\u00b6\n\nsign: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-nullable_pointer-_0.txt", "contents": "\n\n\n\n\n\n\nnullable_pointer.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-term-ansi_term-_23.txt", "contents": "\"\"\"\n_timers = timers\n_notify = consume notify\n_source = source\n\nifdef not windows then\nSignalHandler(recover _TermResizeNotify(this) end, Sig.winch())\nend\n\n_size()\n\nbe apply(data: Array[U8] iso) =>\n\"\"\"\nReceives input from stdin.\n\"\"\"\nif _closed then\nreturn\nend\n\nfor c in (consume data).values() do"} +{"id": "Pony/src-builtin-string-_76.txt", "contents": "1512\n1513\n1514\n1515\n1516\n1517\n1518\n1519\n1520\n1521\n1522\n1523\n1524\n1525\n1526\n1527\n1528\n1529\n1530\n1531"} +{"id": "Pony/src-cli-command_parser-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-files-file_path-_34.txt", "contents": "\nfor entry in directory.entries()?.values() do\nif not join(entry)?.remove() then\nreturn false\nend\nend\nend\n\nifdef windows then\n// _unlink() on Windows can't remove readonly files\n// so we change mode to _S_IWRITE just in case\n@_chmod(path.cstring(), U32(0x0080))\nif info.directory and not info.symlink then\n0 == @_rmdir(path.cstring())\nelse\n0 == @_unlink(path.cstring())\nend\nelse\nif info.directory and not info.symlink then\n0 == @rmdir(path.cstring())"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_5.txt", "contents": "Returns\u00b6\n\nNone val\n\n\nafter\u00b6\n[Source]\nfun ref after(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/src-builtin-unsigned-_70.txt", "contents": "\nnew min_value() => 0\n\nnew max_value() =>\nifdef ilp32 then\n0xFFFF_FFFF\nelse\n0xFFFF_FFFF_FFFF_FFFF\nend\n\nfun next_pow2(): USize =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): USize => this\n\nfun bit_reverse(): USize =>\nifdef ilp32 then\n@\"llvm.bitreverse.i32\"(this.u32()).usize()\nelse"} +{"id": "Pony/builtin-UnsignedInteger-_27.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: A)\n: (A , A) ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/src-buffered-reader-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-pony_test-pony_test-_52.txt", "contents": "elseif arg == \"--noprog\" then\n_no_prog = true\nelseif arg == \"--list\" then\n_list_only = true\nelseif arg.compare_sub(\"--exclude=\", 10) is Equal then\n_exclude = arg.substring(10)\nelseif arg.compare_sub(\"--label=\", 8) is Equal then\n_label = arg.substring(8)\nelseif arg.compare_sub(\"--only=\", 7) is Equal then\n_only = arg.substring(7)\nelse\n_env.out.print(\"Unrecognised argument \\\"\" + arg + \"\\\"\")\n_env.out.print(\"\")\n_env.out.print(\"Usage:\")\n_env.out.print(\" \" + exe_name + \" [options]\")\n_env.out.print(\"\")\n_env.out.print(\"Options:\")\n_env.out.print(\" --exclude=prefix - Don't run tests whose names \"\n+ \"start with the given prefix.\")\n_env.out.print(\" --only=prefix - Only run tests whose names \""} +{"id": "Pony/src-capsicum-cap-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/buffered-Reader-_9.txt", "contents": "String iso^ ?\n\n\nu8\u00b6\n[Source]\nGet a U8. Raise an error if there isn't enough data.\nfun ref u8()\n: U8 val ?\n\nReturns\u00b6\n\nU8 val ?\n\n\ni8\u00b6\n[Source]\nGet an I8.\nfun ref i8()\n: I8 val ?\n"} +{"id": "Pony/5_methods_10.txt", "contents": "__Do I have to provide default values for all of my arguments?__ No, you can provide defaults for as many, or as few, as you like.\n"} +{"id": "Pony/src-itertools-iter-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-random-xoroshiro-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79class XorOshiro128Plus is Random\n\"\"\"\nThis is an implementation of xoroshiro128+, as detailed at:\n\nhttp://xoroshiro.di.unimi.it\n\nThis is currently the default Rand implementation.\n\"\"\"\n// state\nvar _x: U64\nvar _y: U64\n\nnew from_u64(x: U64 = 5489) =>"} +{"id": "Pony/src-cli-command_parser-_26.txt", "contents": "if not os.required() then\noptions.update(os.name(), Option(os, os._default_p()))\nend\nend\nend\nend\n\n// Check for missing options and error if any exist.\nfor os in _spec.options().values() do\nif not options.contains(os.name()) then\nif os.required() then\nreturn SyntaxError(os.name(), \"missing value for required option\")\nend\nend\nend\n\n// Check for missing args and error if found.\nwhile arg_pos < _spec.args().size() do\ntry\nlet ars = _spec.args()(arg_pos)?"} +{"id": "Pony/src-builtin-stdin-_19.txt", "contents": "end\ntrue\nelse\n// No notifier. Stop reading.\n_close_event()\nfalse\nend\n\nfun ref _close_event() =>\n\"\"\"\nClose the event.\n\"\"\"\nif not _event.is_null() then\n@pony_asio_event_unsubscribe(_event)\n_event = AsioEvent.none()\nend\n\n\n\n"} +{"id": "Pony/src-net-udp_socket-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/format-Format-_7.txt", "contents": "\nthat: Format val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Format val)\n: Bool val\n\nParameters\u00b6\n\nthat: Format val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Array-_51.txt", "contents": "Returns\u00b6\n\nNone val\n\n\nswap_elements\u00b6\n[Source]\nSwap the element at index i with the element at index j.\nIf either i or j are out of bounds, an error is raised.\nfun ref swap_elements(\ni: USize val,\nj: USize val)\n: None val ?\n\nParameters\u00b6\n\ni: USize val\nj: USize val\n\nReturns\u00b6"} +{"id": "Pony/callbacks_1.txt", "contents": "# Bare functions\n\nClassic Pony functions have a receiver, which acts as an implicit argument to the function. Because of this, classic functions can't be used as callbacks with many C APIs. Instead, you can use _bare functions_, which are functions with no receiver.\n\nYou can define a bare function by prefixing the function name with the @ symbol.\n\n```pony\nclass C\nfun @callback() =>\n...\n```\n\nThe function can then be passed as a callback to a C API with the `addressof` operator.\n\n```pony\n@setup_callback(addressof C.callback)\n```\n\nNote that it is possible to use an object reference instead of a type as the left-hand side of the method access.\n"} +{"id": "Pony/collections-HashSet-_18.txt", "contents": "fun box lt(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nReturns true if every element in this is also in that.\nfun box le(\nthat: HashSet[A, H] box)\n: Bool val\n"} +{"id": "Pony/pony_test-TestHelper-_15.txt", "contents": "Indicate that this is a long running test that may continue after the\ntest function exits.\nOnce this function is called, complete() must be called to finish the test,\nunless a timeout occurs.\nThe timeout is specified in nanseconds.\nfun box long_test(\ntimeout: U64 val)\n: None val\n\nParameters\u00b6\n\ntimeout: U64 val\n\nReturns\u00b6\n\nNone val\n\n\ncomplete\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_94.txt", "contents": "fun ip_recvpktinfo():I32 => @pony_os_sockopt_option(I32(322))\nfun ip_recvretopts():I32 => @pony_os_sockopt_option(I32(323))\nfun ip_recvrssbucketid():I32 => @pony_os_sockopt_option(I32(324))\nfun ip_recvtos():I32 => @pony_os_sockopt_option(I32(325))\nfun ip_recvttl():I32 => @pony_os_sockopt_option(I32(326))\nfun ip_retopts():I32 => @pony_os_sockopt_option(I32(327))\nfun ip_router_alert():I32 => @pony_os_sockopt_option(I32(328))\nfun ip_rssbucketid():I32 => @pony_os_sockopt_option(I32(329))\nfun ip_rss_listen_bucket():I32 => @pony_os_sockopt_option(I32(330))\nfun ip_rsvp_off():I32 => @pony_os_sockopt_option(I32(331))\nfun ip_rsvp_on():I32 => @pony_os_sockopt_option(I32(332))\nfun ip_rsvp_vif_off():I32 => @pony_os_sockopt_option(I32(333))\nfun ip_rsvp_vif_on():I32 => @pony_os_sockopt_option(I32(334))\nfun ip_sendsrcaddr():I32 => @pony_os_sockopt_option(I32(335))\nfun ip_striphdr():I32 => @pony_os_sockopt_option(I32(336))\nfun ip_tos():I32 => @pony_os_sockopt_option(I32(337))\nfun ip_traffic_mgt_background():I32 => @pony_os_sockopt_option(I32(338))\nfun ip_transparent():I32 => @pony_os_sockopt_option(I32(339))\nfun ip_ttl():I32 => @pony_os_sockopt_option(I32(340))\nfun ip_unblock_source():I32 => @pony_os_sockopt_option(I32(341))"} +{"id": "Pony/src-net-udp_socket-_51.txt", "contents": "```pony\n// listening() is a callback function for class UDPNotify\nfun ref listening(sock: UDPSocket ref) =>\nmatch sock.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)\n| (0, let gbytes: Array[U8] iso) =>\ntry\nlet br = Reader.create().>append(consume gbytes)\nifdef littleendian then\nlet buffer_size = br.u32_le()?\nelse\nlet buffer_size = br.u32_be()?\nend\nend\n| (let errno: U32, _) =>\n// System call failed\nend\n```\n\"\"\"\n_OSSocket.getsockopt(_fd, level, option_name, option_max_size)\n"} +{"id": "Pony/src-files-directory-_45.txt", "contents": "try\nlet path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\n0 == @fchmodat(_fd, target.cstring(), mode.u32(), I32(0))\nelse\npath'.chmod(mode)\nend\nelse\nfalse\nend\n\nfun chownat(target: String, uid: U32, gid: U32): Bool =>\n\"\"\"\nSet the FileMode for some path relative to this directory.\n\"\"\"\nif\nnot path.caps(FileChown)\nor not path.caps(FileLookup)\nor (_fd == -1)"} +{"id": "Pony/builtin-F64-_15.txt", "contents": "F64 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-net-net_address-_11.txt", "contents": "addr1-4 fields are the IPv6 address, or invalid for an IPv4 address. The\nscope field is the IPv6 scope, or invalid for an IPv4 address.\n\nThis class is modelled after the C data structure for holding socket\naddresses for both IPv4 and IPv6 `sockaddr_storage`.\n\nUse the `name` method to obtain address/hostname and port/service as Strings.\n\"\"\"\nlet _family: U16 = 0\n\nlet _port: U16 = 0\n\"\"\"\nPort number in network byte order.\n\"\"\"\n\nlet _addr: U32 = 0\n\"\"\"\nIPv4 address in network byte order.\nWill be `0` for IPv6 addresses. Check with `ipv4()` and `ipv6()`.\n\"\"\""} +{"id": "Pony/cli-CommandSpec-_3.txt", "contents": "descr': String val = \"\"\noptions': Array[OptionSpec val] box = call\nargs': Array[ArgSpec val] box = call\n\nReturns\u00b6\n\nCommandSpec ref^ ?\n\n\nPublic Functions\u00b6\nadd_command\u00b6\n[Source]\nAdds an additional child command to this parent command.\nfun ref add_command(\ncmd: CommandSpec box)\n: None val ?\n\nParameters\u00b6\n\ncmd: CommandSpec box"} +{"id": "Pony/src-net-dns-_6.txt", "contents": ": Array[NetAddress] iso^\n=>\n\"\"\"\nGets all IPv4 addresses for a host and service.\n\"\"\"\n_resolve(auth, 1, host, service)\n\nfun ip6(auth: DNSAuth, host: String, service: String)\n: Array[NetAddress] iso^\n=>\n\"\"\"\nGets all IPv6 addresses for a host and service.\n\"\"\"\n_resolve(auth, 2, host, service)\n\nfun broadcast_ip4(auth: DNSAuth, service: String)\n: Array[NetAddress] iso^\n=>\n\"\"\"\nLink-local IP4 broadcast address."} +{"id": "Pony/src-files-directory-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/files--index-_1.txt", "contents": "The Path primitive can be used to do path-related operations on\nstrings and characters.\nExample program\u00b6\nThis program opens the files that are given as command line arguments\nand prints their contents.\nuse \"files\"\n\nactor Main\nnew create(env: Env) =>\nfor file_name in env.args.slice(1).values() do\nlet path = FilePath(FileAuth(env.root), file_name)\nmatch OpenFile(path)\n| let file: File =>\nwhile file.errno() is FileOK do\nenv.out.write(file.read(1024))\nend\nelse\nenv.err.print(\"Error opening file '\" + file_name + \"'\")\nend\nend"} +{"id": "Pony/src-collections-hashable-_8.txt", "contents": "\"\"\"\n\nfun eq(x: box->A!, y: box->A!): Bool\n\"\"\"\nDetermine equality between two keys with the same hash. This is done with\nviewpoint adapted aliases to allow data structures to determine equality\nin a box fun without consuming keys.\n\"\"\"\n\ninterface val HashFunction64[A]\n\"\"\"\nA pluggable hash function with 64-bit hashes.\n\"\"\"\nnew val create()\n\"\"\"\nData structures create instances internally. Use a primitive if possible.\n\"\"\"\n\nfun hash64(x: box->A!): U64\n\"\"\""} +{"id": "Pony/builtin-U128-_55.txt", "contents": "U8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_75.txt", "contents": "let g = this\nmatch g.generate(rnd)?\n| let t: T => consume t\n| (let t: T, _) => consume t\nend\n\nfun generate_and_shrink(rnd: Randomness): ValueAndShrink[T] ? =>\n\"\"\"\nGenerate a value and also return a shrink result,\neven if the generator does not return any when calling `generate`.\n\"\"\"\nlet g = this\nmatch g.generate(rnd)?\n| let t: T => g.shrink(consume t)\n| (let t: T, let shrinks: Iterator[T^])=> (consume t, shrinks)\nend\n\nfun iter(rnd: Randomness): Iterator[GenerateResult[T]]^ =>\nlet that: GenObj[T] = this\n"} +{"id": "Pony/pony_check-Property4UnitTest-_1.txt", "contents": "new iso create(\np4: Property4[T1, T2, T3, T4] iso,\nname': (String val | None val) = reference)\n: Property4UnitTest[T1, T2, T3, T4] iso^\n\nParameters\u00b6\n\np4: Property4[T1, T2, T3, T4] iso\nname': (String val | None val) = reference\n\nReturns\u00b6\n\nProperty4UnitTest[T1, T2, T3, T4] iso^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val"} +{"id": "Pony/src-net-udp_socket-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-collections-persistent-list-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/files-FilePath-_5.txt", "contents": "Return a new path relative to this one.\nfun val join(\npath': String val,\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)\n: FilePath val ?\n\nParameters\u00b6\n\npath': String val\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover\n\nReturns\u00b6\n\nFilePath val ?\n\n\nwalk\u00b6\n[Source]\nWalks a directory structure starting at this.\nhandler(dir_path, dir_entries) will be called for each directory"} +{"id": "Pony/src-format-align-_1.txt", "contents": "type Align is\n( AlignLeft\n| AlignRight\n| AlignCenter )\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_299.txt", "contents": "fun box rds_get_mr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_get_mr_for_dest\u00b6\n[Source]\nfun box rds_get_mr_for_dest()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_ib_abi_version\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/pony_check-Property2UnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nProperty2UnitTest[T1: T1, T2: T2]\u00b6\n[Source]\nclass iso Property2UnitTest[T1: T1, T2: T2] is\nUnitTest ref\n\nImplements\u00b6\n\nUnitTest ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyHelper-_0.txt", "contents": "\n\n\n\n\n\n\nPropertyHelper\u00b6\n[Source]\nHelper for PonyCheck properties.\nMirrors the TestHelper API as closely as possible.\nContains assertion functions and functions for completing asynchronous\nproperties, for expecting and completing or failing actions.\nInternally a new PropertyHelper will be created for each call to\na property with a new sample and also for every shrink run.\nSo don't assume anything about the identity of the PropertyHelper inside of\nyour Properties.\nThis class is val by default so it can be safely passed around to other\nactors.\nIt exposes the process Env as public env field in order to"} +{"id": "Pony/src-itertools-iter-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-collections-map-_27.txt", "contents": "else\nerror\nend\n\nfun ref update(key: K, value: V): (V^ | None) =>\n\"\"\"\nSets a value in the map. Returns the old value if there was one, otherwise\nreturns None. If there was no previous value, this may trigger a resize.\n\"\"\"\ntry\n(let i, let found) = _search(key)\n\nmatch _array(i)? = (consume key, consume value)\n| (_, let v: V) =>\nreturn consume v\nelse\n_size = _size + 1\n\nif (_size * 4) > (_array.size() * 3) then\n_resize(_array.size() * 2)"} +{"id": "Pony/pony_check-ValueAndShrink-_0.txt", "contents": "\n\n\n\n\n\n\nValueAndShrink[T1: T1]\u00b6\n[Source]\nPossible return type for\nGenerator.generate.\nRepresents a generated value and an Iterator of shrunken values.\ntype ValueAndShrink[T1: T1] is\n(T1^ , Iterator[T1^] ref)\n\nType Alias For\u00b6\n\n(T1^ , Iterator[T1^] ref)\n\n"} +{"id": "Pony/src-pony_check-generator-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/src-net-ossockopt-_129.txt", "contents": "fun tcp_notsent_lowat():I32 => @pony_os_sockopt_option(I32(1022))\nfun tcp_pcap_in():I32 => @pony_os_sockopt_option(I32(1023))\nfun tcp_pcap_out():I32 => @pony_os_sockopt_option(I32(1024))\nfun tcp_queue_seq():I32 => @pony_os_sockopt_option(I32(1025))\nfun tcp_quickack():I32 => @pony_os_sockopt_option(I32(1026))\nfun tcp_repair():I32 => @pony_os_sockopt_option(I32(1027))\nfun tcp_repair_options():I32 => @pony_os_sockopt_option(I32(1028))\nfun tcp_repair_queue():I32 => @pony_os_sockopt_option(I32(1029))\nfun tcp_rxt_conndroptime():I32 => @pony_os_sockopt_option(I32(1030))\nfun tcp_rxt_findrop():I32 => @pony_os_sockopt_option(I32(1031))\nfun tcp_saved_syn():I32 => @pony_os_sockopt_option(I32(1032))\nfun tcp_save_syn():I32 => @pony_os_sockopt_option(I32(1033))\nfun tcp_sendmoreacks():I32 => @pony_os_sockopt_option(I32(1034))\nfun tcp_syncnt():I32 => @pony_os_sockopt_option(I32(1035))\nfun tcp_s_data_in():I32 => @pony_os_sockopt_option(I32(1036))\nfun tcp_s_data_out():I32 => @pony_os_sockopt_option(I32(1037))\nfun tcp_thin_dupack():I32 => @pony_os_sockopt_option(I32(1038))\nfun tcp_thin_linear_timeouts():I32 => @pony_os_sockopt_option(I32(1039))\nfun tcp_timestamp():I32 => @pony_os_sockopt_option(I32(1040))\nfun tcp_user_timeout():I32 => @pony_os_sockopt_option(I32(1041))"} +{"id": "Pony/builtin-I64-_4.txt", "contents": "\nU64 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_34.txt", "contents": "fun box ipproto_leaf2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_max\u00b6\n[Source]\nfun box ipproto_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_maxid\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_47.txt", "contents": "Returns\u00b6\n\nString iso^\n\n\nadd\u00b6\nfun box add(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nsub\u00b6"} +{"id": "Pony/src-builtin-float-_34.txt", "contents": "\"\"\"\nMinimum exponent value such that (10^exponent) - 1 is representable at full\nprecision (ie a normalised number).\n\"\"\"\n-37\n\nfun tag max_exp2(): I16 =>\n\"\"\"\nMaximum exponent value such that (2^exponent) - 1 is representable.\n\"\"\"\n128\n\nfun tag max_exp10(): I16 =>\n\"\"\"\nMaximum exponent value such that (10^exponent) - 1 is representable.\n\"\"\"\n38\n\nfun abs(): F32 => @\"llvm.fabs.f32\"(this)\nfun ceil(): F32 => @\"llvm.ceil.f32\"(this)"} +{"id": "Pony/src-net-tcp_listener-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-Real-_32.txt", "contents": "U128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-USize-_28.txt", "contents": "USize val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nrotr\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940use @\"llvm.sadd.with.overflow.i8\"[(I8, Bool)](a: I8, b: I8)\nuse @\"llvm.sadd.with.overflow.i16\"[(I16, Bool)](a: I16, b: I16)\nuse @\"llvm.sadd.with.overflow.i32\"[(I32, Bool)](a: I32, b: I32)\nuse @\"llvm.sadd.with.overflow.i64\"[(I64, Bool)](a: I64, b: I64)\nuse @\"llvm.sadd.with.overflow.i128\"[(I128, Bool)](a: I128, b: I128)\nuse @\"llvm.ssub.with.overflow.i8\"[(I8, Bool)](a: I8, b: I8)\nuse @\"llvm.ssub.with.overflow.i16\"[(I16, Bool)](a: I16, b: I16)\nuse @\"llvm.ssub.with.overflow.i32\"[(I32, Bool)](a: I32, b: I32)\nuse @\"llvm.ssub.with.overflow.i64\"[(I64, Bool)](a: I64, b: I64)\nuse @\"llvm.ssub.with.overflow.i128\"[(I128, Bool)](a: I128, b: I128)\nuse @\"llvm.smul.with.overflow.i8\"[(I8, Bool)](a: I8, b: I8)\nuse @\"llvm.smul.with.overflow.i16\"[(I16, Bool)](a: I16, b: I16)"} +{"id": "Pony/builtin-USize-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: USize val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nUSize val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: USize val^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_186.txt", "contents": "fun box ipx_receive_broadcast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_recvhdr\u00b6\n[Source]\nfun box ipx_recvhdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_reripnetnumber\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-itertools-iter-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-I64-_23.txt", "contents": "fun box divrem_partial(\ny: I64 val)\n: (I64 val , I64 val) ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , I64 val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-env-_8.txt", "contents": "input = Stdin._create(@pony_os_stdin_setup())\nout = StdStream._out()\nerr = StdStream._err()\n\nargs = _strings_from_pointers(argv, argc.usize())\nvars = _strings_from_pointers(envp, _count_strings(envp))\n\nexitcode = {(code: I32) => @pony_exitcode(code) }\n\nnew val create(\nroot': AmbientAuth,\ninput': InputStream, out': OutStream,\nerr': OutStream, args': Array[String] val,\nvars': Array[String] val,\nexitcode': {(I32)} val)\n=>\n\"\"\"\nBuild an artificial environment. A root capability must be supplied.\n\"\"\"\nroot = root'"} +{"id": "Pony/builtin-I32-_41.txt", "contents": "fun box eq(\ny: I32 val)\n: Bool val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: I32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/debug-Debug-_5.txt", "contents": "\nthat: Debug val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file-_52.txt", "contents": "_unsynced_metadata = true\nend\nfor d in Range[USize](0, num_written, 1) do\n_pending_writev.shift()?\nend\nend\nreturn result\nelse\n// TODO: error recovery? EINTR?\n\n// check error\n_errno = _get_error()\n\ndispose()\nreturn false\nend\n\nfun _write_to_disk(): (Bool, USize, USize) ? =>\n\"\"\"\nWrite pending data."} +{"id": "Pony/ponycheck_5.txt", "contents": "class _ListReverseProperties is UnitTest\nfun name(): String => \"list/properties\"\n\nfun apply(h: TestHelper) ? =>\nlet gen1 = Generators.seq_of[USize, Array[USize]](Generators.usize())\nPonyCheck.for_all[Array[USize]](gen1, h)({\n(arg1: Array[USize], ph: PropertyHelper) =>\nph.assert_array_eq[USize](arg1, arg1.reverse().reverse())\n})\nlet gen2 = Generators.seq_of[USize, Array[USize]](1, Generators.usize())\nPonyCheck.for_all[Array[USize]](gen2, h)({\n(arg1: Array[USize], ph: PropertyHelper) =>\nph.assert_array_eq[USize](arg1, arg1.reverse())\n})\n```\n"} +{"id": "Pony/files-File-_3.txt", "contents": "[Source]\nReturns the last error code set for this File\nfun box errno()\n: (FileOK val | FileError val | FileEOF val |\nFileBadFileNumber val | FileExists val | FilePermissionDenied val)\n\nReturns\u00b6\n\n(FileOK val | FileError val | FileEOF val |\nFileBadFileNumber val | FileExists val | FilePermissionDenied val)\n\n\nclear_errno\u00b6\n[Source]\nClears the last error code set for this File.\nClears the error indicator for the stream.\nfun ref clear_errno()\n: None val\n\nReturns\u00b6"} +{"id": "Pony/src-net-tcp_connection_notify-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_test-test_helper-_34.txt", "contents": ": Bool\n=>\n\"\"\"\nCheck that the 2 given expressions are not equal.\n\"\"\"\nif not_expect == actual then\nfail(_format_loc(loc) + \"Assert \" + check + \" failed. \" + msg\n+ \" Expected (\" + not_expect.string() + \") != (\" + actual.string()\n+ \")\")\nreturn false\nend\n\nlog(\n_format_loc(loc) + \"Assert \" + check + \" passed. \" + msg\n+ \" Got (\" + not_expect.string() + \") != (\" + actual.string() + \")\",\ntrue)\ntrue\n\nfun assert_array_eq[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A],"} +{"id": "Pony/src-files-file_path-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-net-tcp_connection-_77.txt", "contents": "# Proxy support\n\nUsing the `proxy_via` callback in a `TCPConnectionNotify` it is possible\nto implement proxies. The function takes the intended destination host\nand service as parameters and returns a 2-tuple of the proxy host and\nservice.\n\nThe proxy `TCPConnectionNotify` should decorate another implementation of\n`TCPConnectionNotify` passing relevent data through.\n"} +{"id": "Pony/pony_test-TestHelper-_17.txt", "contents": "\nexpect_action\u00b6\n[Source]\nCan be called in a long test to set up expectations for one or more actions\nthat, when all completed, will complete the test.\nThis pattern is useful for cases where you have multiple things that need\nto happen to complete your test, but don't want to have to collect them\nall yourself into a single actor that calls the complete method.\nThe order of calls to expect_action don't matter - the actions may be\ncompleted in any other order to complete the test.\nfun box expect_action(\nname: String val)\n: None val\n\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Comparable-_5.txt", "contents": "\nthat: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-ansi-_24.txt", "contents": "\"\"\"\n\"\\x1B[92m\"\n\nfun bright_yellow(): String =>\n\"\"\"\nBright yellow text.\n\"\"\"\n\"\\x1B[93m\"\n\nfun bright_blue(): String =>\n\"\"\"\nBright blue text.\n\"\"\"\n\"\\x1B[94m\"\n\nfun bright_magenta(): String =>\n\"\"\"\nBright magenta text.\n\"\"\"\n\"\\x1B[95m\""} +{"id": "Pony/builtin-U32-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: U32 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nU32 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: U32 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-readline-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-FloatingPoint-_23.txt", "contents": "\nA\n\n\nfloor\u00b6\n[Source]\nfun box floor()\n: A\n\nReturns\u00b6\n\nA\n\n\nround\u00b6\n[Source]\nfun box round()\n: A\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-HashMap-_1.txt", "contents": "// to the provided value. The old map is unchanged.\nlet m2 = m1(\"a\") = 5 // {a: 5}\nlet m3 = m2(\"b\") = 10 // {a: 5, b: 10}\nlet m4 = m3.remove(\"a\")? // {b: 10}\n// You can create a new map from key value pairs.\nlet m5 = Map[String, U32].concat([(\"a\", 2); (\"b\", 3)].values()) // {a: 2, b: 3}\nend\n\nclass val HashMap[K: Any #share, V: Any #share, H: HashFunction[K] val]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: HashMap[K, V, H] val^\n\nReturns\u00b6\n\nHashMap[K, V, H] val^\n"} +{"id": "Pony/examples_10.txt", "contents": "fun apply(h: TestHelper) =>\nh.assert_eq[U32](2 + 2, 4)\n```\n\nSome assertions you can make with `TestHelper` are\n\n```pony\nfun tag log(msg: String, verbose: Bool = false)\nbe fail() =>\nbe assert_failed(msg: String) =>\nfun tag assert_true(actual: Bool, msg: String = \"\") ?\nfun tag expect_true(actual: Bool, msg: String = \"\"): Bool\nfun tag assert_false(actual: Bool, msg: String = \"\") ?\nfun tag expect_false(actual: Bool, msg: String = \"\"): Bool\nfun tag assert_error(test: ITest, msg: String = \"\") ?\nfun tag expect_error(test: ITest box, msg: String = \"\"): Bool\nfun tag assert_is (expect: Any, actual: Any, msg: String = \"\") ?\nfun tag expect_is (expect: Any, actual: Any, msg: String = \"\"): Bool\nfun tag assert_eq[A: (Equatable[A] #read & Stringable)]\n(expect: A, actual: A, msg: String = \"\") ?"} +{"id": "Pony/pony_check-Generators-_31.txt", "contents": ": Generator[USize val] box\n\nParameters\u00b6\n\nmin: USize val = call\nmax: USize val = call\n\nReturns\u00b6\n\nGenerator[USize val] box\n\n\nulong\u00b6\n[Source]\nCreate a generator for ULong values.\nfun box ulong(\nmin: ULong val = call,\nmax: ULong val = call)\n: Generator[ULong val] box\n"} +{"id": "Pony/src-builtin-stdin-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_527.txt", "contents": "fun box so_sndtimeo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_timestamp\u00b6\n[Source]\nfun box so_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_timestamping\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_59.txt", "contents": "Returns\u00b6\n\nU8 val\n\n\nu16\u00b6\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\nfun box u32()\n: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_parser-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/files-FileExec-_0.txt", "contents": "\n\n\n\n\n\n\nFileExec\u00b6\n[Source]\nprimitive val FileExec\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileExec val^\n\nReturns\u00b6\n\nFileExec val^"} +{"id": "Pony/signals-Sig-_0.txt", "contents": "\n\n\n\n\n\n\nSig\u00b6\n[Source]\nDefine the portable signal numbers. Other signals can be used, but they are\nnot guaranteed to be portable.\nprimitive val Sig\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Sig val^\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Nil-_14.txt", "contents": "Parameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\n(Nil[A] val , Nil[A] val)\n\n\ndrop\u00b6\n[Source]\nThere are no elements to drop from the empty list.\nfun box drop(\nn: USize val)\n: Nil[A] val\n\nParameters\u00b6\n\nn: USize val\n"} +{"id": "Pony/bureaucracy-Custodian-_0.txt", "contents": "\n\n\n\n\n\n\nCustodian\u00b6\n[Source]\nA Custodian keeps a set of actors to dispose. When the Custodian is disposed,\nit disposes of the actors in its set and then clears the set.\nExample program\u00b6\nImagine you have a program with 3 actors that you need to shutdown when it\nreceives a TERM signal. We can set up a Custodian that knows about each\nof our actors and when a TERM signal is received, is disposed of.\nuse \"bureaucracy\"\nuse \"signals\"\n\nactor Actor1\nbe dispose() => None // dispose of resources here."} +{"id": "Pony/0_what-you-need_4.txt", "contents": "# Compiling your program\n\nIf you are in the same directory as your program, you can just do:\n\n```bash\nponyc\n```\n\nThat tells the Pony compiler that your current working directory contains your source code, and to please compile it. If your source code is in some other directory, you can tell ponyc where it is:\n\n```bash\nponyc path/to/my/code\n```\n\nThere are other options as well, but we'll cover those later.\n"} +{"id": "Pony/builtin-ILong-_8.txt", "contents": "\nULong val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: ILong val)\n: ILong val\n"} +{"id": "Pony/collections-persistent-List-_0.txt", "contents": "\n\n\n\n\n\n\nList[A: A]\u00b6\n[Source]\nA persistent list with functional transformations.\nUsage\u00b6\nuse \"collections/persistent\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet l1 = Lists[U32]([2; 4; 6; 8]) // List(2, 4, 6, 8)\n\nlet empty = Lists[U32].empty() // List()\n"} +{"id": "Pony/net-OSSockOpt-_316.txt", "contents": "fun box rds_trans_count()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_trans_ib\u00b6\n[Source]\nfun box rds_trans_ib()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_trans_iwarp\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-time-timers-_12.txt", "contents": "_map(timer') = timer'\ntimer'._slop(_slop)\n_fire(timer')\n_advance()\n\nbe cancel(timer: Timer tag) =>\n\"\"\"\nCancels a timer.\n\"\"\"\ntry\n(_, let timer') = _map.remove(timer)?\ntimer'._cancel()\n\nif (_map.size() == 0) and (not _event.is_null()) then\n// Unsubscribe an existing event.\n@pony_asio_event_unsubscribe(_event)\n_event = AsioEvent.none()\nend\nend\n"} +{"id": "Pony/builtin-FloatingPoint-_24.txt", "contents": "\nA\n\n\ntrunc\u00b6\n[Source]\nfun box trunc()\n: A\n\nReturns\u00b6\n\nA\n\n\nfinite\u00b6\n[Source]\nfun box finite()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-SignedInteger-_31.txt", "contents": "fun box op_xor(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_75.txt", "contents": "Private helper for `map`, recursively working with `ListNode`s.\n\"\"\"\ntry acc.push(f(ln()?)) end\n\ntry\n_map[B](ln.next() as this->ListNode[A], f, acc)\nelse\nacc\nend\n\nfun flat_map[B](f: {(this->A!): List[B]} box): List[B]^ =>\n\"\"\"\nBuilds a new `List` by applying a function to every element of the `List`,\nproducing a new `List` for each element, then flattened into a single `List`.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.flat_map[String]( {(s: String): List[String] => List[String].from( [\"m\"; s] )} ) // other_list is [\"m\"; \"a\"; \"m\"; \"b\"; \"m\"; c\"]\n```\n\"\"\""} +{"id": "Pony/src-collections-set-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-builtin-string-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/net-OSSockOpt-_158.txt", "contents": "fun box ipv6_priority_9()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_bulk\u00b6\n[Source]\nfun box ipv6_priority_bulk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_control\u00b6\n[Source]"} +{"id": "Pony/src-ini-ini-_10.txt", "contents": "\"\"\"\nprimitive IniIncompleteSection\nprimitive IniNoDelimiter\n\ntype IniError is\n( IniIncompleteSection\n| IniNoDelimiter\n)\n\ninterface IniNotify\n\"\"\"\nNotifications for INI parsing.\n\"\"\"\nfun ref apply(section: String, key: String, value: String): Bool\n\"\"\"\nThis is called for every valid entry in the INI file. If key/value pairs\noccur before a section name, the section can be an empty string. Return\nfalse to halt processing.\n\"\"\"\n"} +{"id": "Pony/src-process-auth-_0.txt", "contents": "\n\n\n\n\n\n\nauth.pony\n\n1\n2\n3primitive StartProcessAuth\nnew create(from: AmbientAuth) =>\nNone\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_167.txt", "contents": "fun box ipv6_router_alert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_rthdr\u00b6\n[Source]\nfun box ipv6_rthdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_rthdrdstopts\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-collections-persistent-vec-_27.txt", "contents": "Return an iterator over the values in the vector.\n\"\"\"\nVecValues[A](this)\n\nfun val pairs(): VecPairs[A]^ =>\n\"\"\"\nReturn an iterator over the (index, value) pairs in the vector.\n\"\"\"\nVecPairs[A](this)\n\nfun _pow32(n: USize): USize =>\n\"\"\"\nRaise 32 to the power of n.\n\"\"\"\nif n == 0 then\n1\nelse\n32 << ((n - 1) * 5)\nend\n"} +{"id": "Pony/net-UDPSocket-_20.txt", "contents": "U32 val\n\n\nsetsockopt_u32\u00b6\n[Source]\nWrapper for UDP sockets to the setsockopt(2) system call where\nthe kernel expects an option value of a C uint32_t type / Pony\ntype U32.\nThis function returns 0 on success, else the value of errno on\nfailure.\nfun ref setsockopt_u32(\nlevel: I32 val,\noption_name: I32 val,\noption: U32 val)\n: U32 val\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val"} +{"id": "Pony/ponytest_5.txt", "contents": "bar.Main.make().tests(test)\n```\n\nAggregate test classes may themselves be aggregated. Every test list class may contain any combination of its own tests and aggregated lists.\n"} +{"id": "Pony/builtin-U64-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: U64 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nU64 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: U64 val^\n\nReturns\u00b6\n"} +{"id": "Pony/time-TimerNotify-_0.txt", "contents": "\n\n\n\n\n\n\nTimerNotify\u00b6\n[Source]\nNotifications for timer.\ninterface ref TimerNotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nCalled with the the number of times the timer has fired since this was last\ncalled. Usually, the value of count will be 1. If it is not 1, it means\nthat the timer isn't firing on schedule.\nFor example, if your timer is set to fire every 10 milliseconds, and\ncount is 2, that means it has been between 20-29 milliseconds since the"} +{"id": "Pony/builtin-U128-_5.txt", "contents": "\nU128 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-compare-_0.txt", "contents": "\n\n\n\n\n\n\ncompare.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U64-_5.txt", "contents": "\nU64 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/src-ini-ini-_0.txt", "contents": "\n\n\n\n\n\n\nini.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I8-_14.txt", "contents": "(I8 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , Bool val)\n\n\nmulc\u00b6\n[Source]"} +{"id": "Pony/src-collections-hashable-_12.txt", "contents": "Hash and equality functions for arbitrary ByteSeq.\n\"\"\"\nfun hash(x: ByteSeq box): USize =>\n@ponyint_hash_block(x.cpointer(), x.size())\n\nfun hash64(x: ByteSeq box): U64 =>\n@ponyint_hash_block64(x.cpointer(), x.size())\n\nfun eq(x: ByteSeq box, y: ByteSeq box): Bool =>\nif x.size() == y.size() then\n@memcmp(x.cpointer(), y.cpointer(), x.size()) == 0\nelse\nfalse\nend\n\n\n\n\n\n"} +{"id": "Pony/collections-HashSet-_5.txt", "contents": "\n\nset\u00b6\n[Source]\nAdd a value to the set.\nfun ref set(\nvalue: A)\n: None val\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nNone val\n\n\nunset\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_123.txt", "contents": "fun box ipport_reserved()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_reservedstart\u00b6\n[Source]\nfun box ipport_reservedstart()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_userreserved\u00b6\n[Source]"} +{"id": "Pony/collections-Hashable-_1.txt", "contents": "USize val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-flag-_0.txt", "contents": "\n\n\n\n\n\n\nflag.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_check-randomness-_16.txt", "contents": "u32(min.u32(), U32.max_value()).u64()\nend\nhigh or low\nelse\n// range within U32 range\nu32(min.u32(), max.u32()).u64()\nend\n\nfun ref u128(\nmin: U128 = U128.min_value(),\nmax: U128 = U128.max_value())\n: U128\n=>\n\"\"\"\nGenerate a U128 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nif (min == U128.min_value()) and (max == U128.max_value()) then"} +{"id": "Pony/builtin-ULong-_0.txt", "contents": "\n\n\n\n\n\n\nULong\u00b6\n[Source]\nprimitive val ULong is\nUnsignedInteger[ULong val] val\n\nImplements\u00b6\n\nUnsignedInteger[ULong val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_62.txt", "contents": "\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-ini-ini-_12.txt", "contents": "If any errors are encountered, this will return false. Otherwise, it\nreturns true.\n\"\"\"\nvar section = \"\"\nvar lineno = USize(0)\nvar ok = true\n\nfor line in lines do\nlineno = lineno + 1\nvar current = line.clone()\ncurrent.strip()\n\nif current.size() == 0 then\ncontinue\nend\n\ntry\nmatch current(0)?\n| ';' | '#' =>\n// Skip comments."} +{"id": "Pony/capsicum-Cap-_7.txt", "contents": "fun box mmap_rw()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_rx\u00b6\n[Source]\nfun box mmap_rx()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap_wx\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_508.txt", "contents": "fun box so_oobinline()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_original_dst\u00b6\n[Source]\nfun box so_original_dst()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_passcred\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Cons-_9.txt", "contents": "[Source]\nBuilds a new list by applying a function to every member of the list and\nusing the elements of the resulting lists.\nfun val flat_map[B: B](\nf: {(val->A): List[B]}[A, B] box)\n: (Cons[B] val | Nil[B] val)\n\nParameters\u00b6\n\nf: {(val->A): List[B]}[A, B] box\n\nReturns\u00b6\n\n(Cons[B] val | Nil[B] val)\n\n\nfor_each\u00b6\n[Source]\nApplies the supplied function to every element of the list in order.\nfun val for_each("} +{"id": "Pony/builtin-U64-_26.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val ?\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_113.txt", "contents": "fun box ipctl_fastforwarding()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_forwarding\u00b6\n[Source]\nfun box ipctl_forwarding()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_gif_ttl\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_28.txt", "contents": "\n(A , A) ?\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: A\n\nReturns\u00b6\n\nA\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: A)\n: (A , Bool val)\n"} +{"id": "Pony/src-collections-range-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-I128-_52.txt", "contents": "ILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_441.txt", "contents": "fun box sctp_peeloff()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_peer_addr_params\u00b6\n[Source]\nfun box sctp_peer_addr_params()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_peer_addr_thlds\u00b6\n[Source]"} +{"id": "Pony/builtin-InputStream-_1.txt", "contents": "\nParameters\u00b6\n\nnotify: (InputNotify iso | None val)\nchunk_size: USize val = 32\n\n\ndispose\u00b6\n[Source]\nClear the notifier in order to shut down input.\nbe dispose()\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/generics-and-reference-capabilities_6.txt", "contents": "```\n\nThis fails to compile. The first error is:\n\n```error\nmain.pony:5:8: right side must be a subtype of left side\n_c = c\n^\nInfo:\nmain.pony:4:17: String iso! is not a subtype of String iso: iso! is not a subtype of iso\nnew create(c: String iso) =>\n^\n```\n\nThe error is telling us that we are aliasing the `String iso` - The `!` in `iso!` means it is an alias of an existing `iso`. Looking at the code shows the problem:\n\n```pony\nnew create(c: String iso) =>\n_c = c\n```"} +{"id": "Pony/src-collections-sort-_7.txt", "contents": "l = l + 1\nelseif a(k.usize())? >= q then\nwhile (a(g.usize())? > q) and (k < g) do g = g - 1 end\n_swap(a, k, g)?\ng = g - 1\nif a(k.usize())? < p then\n_swap(a, k, l)?\nl = l + 1\nend\nend\nk = k + 1\nend\n(l, g) = (l - 1, g + 1)\n// swap pivots to final positions\n_swap(a, lo, l)?\n_swap(a, hi, g)?\n// recursively sort 3 partitions\n_sort(a, lo, l - 1)?\n_sort(a, l + 1, g - 1)?\n_sort(a, g + 1, hi)?"} +{"id": "Pony/src-pony_check-property_helper-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/signals-Sig-_7.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\npipe\u00b6\n[Source]\nfun box pipe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nalrm\u00b6\n[Source]\nfun box alrm()\n: U32 val\n"} +{"id": "Pony/builtin-F64-_10.txt", "contents": "\nmax_exp2\u00b6\n[Source]\nMaximum exponent value such that (2^exponent) - 1 is representable.\nfun tag max_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmax_exp10\u00b6\n[Source]\nMaximum exponent value such that (10^exponent) - 1 is representable.\nfun tag max_exp10()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-SetValues-_0.txt", "contents": "\n\n\n\n\n\n\nSetValues[A: A, H: HashFunction[A!] val, S: HashSet[A, H] #read]\u00b6\n[Source]\nAn iterator over the values in a set.\nclass ref SetValues[A: A, H: HashFunction[A!] val, S: HashSet[A, H] #read] is\nIterator[S->A] ref\n\nImplements\u00b6\n\nIterator[S->A] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-builtin-unsigned-_88.txt", "contents": "\"\"\"\nf64_unsafe().f32_unsafe()\n\nfun f64_unsafe(): F64 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nf64()\n\nfun addc(y: U128): (U128, Bool) =>\nifdef native128 then\n@\"llvm.uadd.with.overflow.i128\"(this, y)\nelse\nlet overflow = this > (max_value() - y)\n(this + y, overflow)\nend\n\nfun subc(y: U128): (U128, Bool) =>\nifdef native128 then"} +{"id": "Pony/src-builtin-signed-_66.txt", "contents": "_SignedPartialArithmetic.div_partial[I64, U64](this, y)?\n\nfun rem_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.rem_partial[I64, U64](this, y)?\n\nfun divrem_partial(y: I64): (I64, I64) ? =>\n_SignedPartialArithmetic.divrem_partial[I64, U64](this, y)?\n\nfun fld_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.fld_partial[I64, U64](this, y)?\n\nfun mod_partial(y: I64): I64 ? =>\n_SignedPartialArithmetic.mod_partial[I64, U64](this, y)?\n\nprimitive ILong is SignedInteger[ILong, ULong]\nnew create(value: ILong) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.ilong()\n\nnew min_value() =>\nifdef ilp32 or llp64 then"} +{"id": "Pony/builtin-SignedInteger-_43.txt", "contents": "\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I8-_60.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_13.txt", "contents": "y: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\ndiv_partial\u00b6\n[Source]\nDivides this number by y, rounds the result towards zero.\nIf y is 0 or the operation overflows, this function errors.\nfun box div_partial(\ny: A)\n: A ?\n"} +{"id": "Pony/builtin-F64-_40.txt", "contents": "\ndiv_unsafe\u00b6\nfun box div_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ndivrem_unsafe\u00b6\nfun box divrem_unsafe(\ny: F64 val)\n: (F64 val , F64 val)\n"} +{"id": "Pony/src-builtin-string-_172.txt", "contents": "\"\"\"\nStringRunes(this)\n\nfun ref _set(i: USize, value: U8): U8 =>\n\"\"\"\nUnsafe update, used internally.\n\"\"\"\n_ptr._update(i, value)\n\nclass StringBytes is Iterator[U8]\nlet _string: String box\nvar _i: USize\n\nnew create(string: String box) =>\n_string = string\n_i = 0\n\nfun has_next(): Bool =>\n_i < _string.size()\n"} +{"id": "Pony/net-NetAddress-_2.txt", "contents": ": Bool val\n\nReturns\u00b6\n\nBool val\n\n\nip6\u00b6\n[Source]\nReturns true for an IPv6 address.\nfun box ip6()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nname\u00b6\n[Source]"} +{"id": "Pony/format-FormatFix-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatFix val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatFix val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/capsicum-Cap-_42.txt", "contents": "fun box eq(\nthat: Cap val)\n: Bool val\n\nParameters\u00b6\n\nthat: Cap val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Cap val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-files-file_path-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/net-OSSockOpt-_60.txt", "contents": "fun box ipproto_trunk1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_trunk2\u00b6\n[Source]\nfun box ipproto_trunk2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ttp\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-itertools-iter-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/builtin-UnsignedInteger-_45.txt", "contents": "[Source]\nfun box gt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: A)\n: A\n"} +{"id": "Pony/random-XorOshiro128StarStar-_14.txt", "contents": "fun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U128-_19.txt", "contents": "[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nf32_unsafe\u00b6"} +{"id": "Pony/builtin-F64-_58.txt", "contents": ": ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\nfun box u8()\n: U8 val\n"} +{"id": "Pony/collections-Sort-_1.txt", "contents": "and sorts it in place alphabetically using the default String Comparator.\nIt outputs:\n\nfirst\nsecond\nthird\n\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>\nlet array = [ \"third\"; \"second\"; \"first\" ]\nlet sorted_array = Sort[Array[String], String](array)\nfor e in sorted_array.values() do\nenv.out.print(e) // prints \"first \\n second \\n third\"\nend\n\nprimitive val Sort[A: Seq[B] ref, B: Comparable[B] #read]\n\nConstructors\u00b6"} +{"id": "Pony/builtin-I32-_9.txt", "contents": "fun box min(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/src-files-path-_39.txt", "contents": "fun rel(to: String, target: String): String ? =>\n\"\"\"\nReturns a path such that Path.join(to, Path.rel(to, target)) == target.\nRaises an error if this isn't possible.\n\"\"\"\nvar to_clean = clean(to)\nvar target_clean = clean(target)\n\nif to_clean == target_clean then\nreturn \".\"\nend\n\nvar to_i: ISize = 0\n\nifdef windows then\nto_clean = abs(to_clean)\ntarget_clean = abs(target_clean)\n\nlet to_vol = volume(to_clean)\nlet target_vol = volume(target_clean)"} +{"id": "Pony/net-OSSockOpt-_502.txt", "contents": "fun box so_nke()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_noaddrerr\u00b6\n[Source]\nfun box so_noaddrerr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_nofcs\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/src-cli-command_spec-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-Array-_15.txt", "contents": "\n\nread_u64[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nReads a U64 from offset. This is only allowed for an array of U8s.\nfun box read_u64[optional B: (A & Real[B] val & U8 val)](\noffset: USize val)\n: U64 val ?\n\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nU64 val ?\n\n\nread_u128[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]"} +{"id": "Pony/builtin-StringBytes-_1.txt", "contents": "new ref create(\nstring: String box)\n: StringBytes ref^\n\nParameters\u00b6\n\nstring: String box\n\nReturns\u00b6\n\nStringBytes ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_336.txt", "contents": "fun box sctp_auth_chunk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_deactivate_key\u00b6\n[Source]\nfun box sctp_auth_deactivate_key()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_delete_key\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_73.txt", "contents": "end\n\nfun ctz_unsafe(): USize =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\nifdef ilp32 then\n@\"llvm.cttz.i32\"(this.u32(), true).usize()\nelse\n@\"llvm.cttz.i64\"(this.u64(), true).usize()\nend\n\nfun bitwidth(): USize => ifdef ilp32 then 32 else 64 end\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: USize): USize => if this < y then this else y end\nfun max(y: USize): USize => if this > y then this else y end\n"} +{"id": "Pony/capability-subtyping_2.txt", "contents": "# Subtypes of unique capabilities\n\nWhen it comes to talking about unique capabilities, the situation is a bit more complex. With variables, we only had the six basic capabilities,\nbut we're talking about expressions here. We will have to work with aliased and unaliased forms of the capabilities.\n\nFrom here, let's talk about ephemeral capabilities. Remember that the way to get an ephemeral capability is by _unaliasing_, that is, moving a value out of a\nnamed location with `consume` or destructive read.\n\nSubtyping here is surprisingly simple: `iso^` is a sub-capability of absolutely everything, and `trn^` is a sub-capability of `ref` and `val`. Let's go through the interesting cases again with these two:\n\n* `iso^ <: trn^`. An `iso^` guarantees there's no readable or writable aliases, whereas `trn^` just needs no writable aliases.\n* `trn^ <: ref`. A `trn^` reference can be used to read and write, which is enough for `ref`.\n* `trn^ <: val`. A `trn^` reference has no writable aliases. A `val` requires global immutability, so we can forget our writable access in order to get `val`, since we know no other aliases can write.\n"} +{"id": "Pony/builtin-Integer-_33.txt", "contents": "\n\nfld\u00b6\n[Source]\nfun box fld(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod\u00b6\n[Source]\nfun box mod("} +{"id": "Pony/src-time-timer-_12.txt", "contents": "return false\nend\nend\n\n(_interval > 0) or ((_expiration - current) < (1 << 63))\n\nfun _next(): U64 =>\n\"\"\"\nReturns the next expiration time.\n\"\"\"\n_expiration\n\nfun tag _abs_expiration_time(wall: (I64, I64)): U64 =>\n\"\"\"\nConverts a wall-clock adjusted system time to absolute expiration time\n\"\"\"\nlet wall_now = Time.now()\nTime.nanos()\n+ (((wall._1 * 1000000000) + wall._2)\n- ((wall_now._1 * 1000000000) + wall_now._2)).u64()"} +{"id": "Pony/src-promises-promise-_32.txt", "contents": "\nfun ref apply(value: A) =>\nlet fulfill' = f = _PromiseFulFill[A, B]\n\ntry\nlet inner = (consume fulfill').apply(value)?\n\ninner.next[None](\n{(fulfilled: B) => p(fulfilled)},\n{()? => p.reject(); error})\nelse\np.reject()\nend\nend,\nobject iso\nvar r: Reject[Promise[B]] = consume rejected\nlet p: Promise[B] = outer\n\nfun ref apply() =>\nlet rejected' = r = RejectAlways[Promise[B]]"} +{"id": "Pony/net-OSSockOpt-_300.txt", "contents": "fun box rds_ib_abi_version()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_ib_gid_len\u00b6\n[Source]\nfun box rds_ib_gid_len()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_connections\u00b6\n[Source]"} +{"id": "Pony/builtin-Stringable-_1.txt", "contents": "\nString iso^\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-buffered-reader-_66.txt", "contents": "if _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef littleendian then\ndata.read_u128(offset)?\nelse\ndata.read_u128(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr"} +{"id": "Pony/src-pony_check-ascii_range-_4.txt", "contents": "primitive ASCIILettersLower\nfun apply(): String => \"abcdefghijklmnopqrstuvwxyz\"\n\nprimitive ASCIILettersUpper\nfun apply(): String => \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n\nprimitive ASCIILetters\nfun apply(): String => ASCIILettersLower() + ASCIILettersUpper()\n\nprimitive ASCIIPrintable\nfun apply(): String =>\nASCIIDigits()\n+ ASCIILetters()\n+ ASCIIPunctuation()\n+ ASCIIWhiteSpace()\n\nprimitive ASCIINonPrintable\nfun apply(): String =>\n\"\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\x0e\\x0f\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f\"\n"} +{"id": "Pony/pony_test--index-_9.txt", "contents": "tmp_dir = FilePath.mkdtemp(FileAuth(h.env.root), \"temp-dir\")?\n\nfun ref tear_down(h: TestHelper) =>\ntry\n(tmp_dir as FilePath).remove()\nend\n\nfun apply(h: TestHelper)? =>\nlet dir = tmp_dir as FilePath\n// do something inside the temporary directory\n\nPublic Types\u00b6\n\ninterface ITest\nactor PonyTest\nclass TestHelper\ntrait TestList\ntrait UnitTest\n\n"} +{"id": "Pony/builtin-I32-_17.txt", "contents": "(I32 val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , Bool val)\n\n\nmodc\u00b6\n[Source]"} +{"id": "Pony/serialisation_6.txt", "contents": "## Custom Deserialisation\n\nCustom deserialisation is handled by a `fun ref _deserialise(bytes: Pointer[U8] tag)` method. This method receives a pointer to the character array that stores the serialised representation of the object (or objects) that the `Pointer` fields should point to. The programmer must copy out any bytes that will be used by the deserialised object.\n\nThe custom deserialisation method is expected to modify the values of the objects `Pointer` fields, so the fields must be declared `var` so that they can be modified.\n"} +{"id": "Pony/builtin-U32-_27.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Property4UnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nProperty4UnitTest[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\nclass iso Property4UnitTest[T1: T1, T2: T2, T3: T3, T4: T4] is\nUnitTest ref\n\nImplements\u00b6\n\nUnitTest ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_6.txt", "contents": "\nU16 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I16-_10.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-set-_23.txt", "contents": "\"\"\"\nCreate a set with the elements of both this and that.\n\"\"\"\nlet r = clone[K]()\n\nfor value in that.values() do\nr.set(value)\nend\nr\n\nfun op_and[K: HashFunction[this->A!] val = H](\nthat: this->HashSet[A, H])\n: HashSet[this->A!, K]^\n=>\n\"\"\"\nCreate a set with the elements that are in both this and that.\n\"\"\"\nlet r = HashSet[this->A!, K](size().min(that.size()))\n\nfor value in values() do"} +{"id": "Pony/builtin-U32-_1.txt", "contents": "new val create(\nvalue: U32 val)\n: U32 val^\n\nParameters\u00b6\n\nvalue: U32 val\n\nReturns\u00b6\n\nU32 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-pony_bench-pony_bench-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-U128-_45.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U64-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/src-term-readline-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/net-UDPAuth-_0.txt", "contents": "\n\n\n\n\n\n\nUDPAuth\u00b6\n[Source]\nprimitive val UDPAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: (AmbientAuth val | NetAuth val))\n: UDPAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/5_methods_18.txt", "contents": "# Precedence\n\nWe have talked about [precedence of operators](/expressions/ops.md#precedence) before, and in Pony, method calls and field accesses have higher precedence than any operators.\n\nTo sum up, in complex expressions,\n\n1. Method calls and field accesses have higher precedence than any operators.\n2. Unary operator have higher precedence than infix operators.\n3. When mixing infix operators in complex expressions, we must use parentheses to specify any precedence explicitly.\n"} +{"id": "Pony/src-builtin-string-_52.txt", "contents": "1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046\n1047\n1048\n1049\n1050\n1051"} +{"id": "Pony/signals--index-_1.txt", "contents": "// Create a TERM handler\nlet signal = SignalHandler(TermHandler(env), Sig.term())\n// Raise TERM signal\nsignal.raise()\n\nclass TermHandler is SignalNotify\nlet _env: Env\n\nnew iso create(env: Env) =>\n_env = env\n\nfun ref apply(count: U32): Bool =>\n_env.out.print(\"TERM signal received\")\ntrue\n\nSignal portability\u00b6\nThe Sig primitive provides support for portable signal handling across Linux,\nFreeBSD and OSX. Signals are not supported on Windows and attempting to use\nthem will cause a compilation error.\nShutting down handlers\u00b6"} +{"id": "Pony/net-OSSockOpt-_608.txt", "contents": "fun box tipc_max_user_msg_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_medium_importance\u00b6\n[Source]\nfun box tipc_medium_importance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_node_recvq_depth\u00b6\n[Source]"} +{"id": "Pony/collections-ListValues-_3.txt", "contents": "N->A ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Less-_1.txt", "contents": "new val create()\n: Less val^\n\nReturns\u00b6\n\nLess val^\n\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6"} +{"id": "Pony/collections-List-_34.txt", "contents": "Returns\u00b6\n\nBool val\n\n\npartition\u00b6\n[Source]\nBuilds a pair of Lists, the first of which is made up of the elements\nsatisfying the predicate and the second of which is made up of\nthose that do not.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\n(let lt_b, let gt_b) = my_list.partition( {(s: String): Bool => s < \"b\"} ) // lt_b is [\"a\"], while gt_b is [\"b\"; \"c\"]\n\nfun box partition(\nf: {(this->A!): Bool}[A] box)\n: (List[this->A!] ref^ , List[this->A!] ref^)\n\nParameters\u00b6\n\nf: {(this->A!): Bool}[A] box"} +{"id": "Pony/builtin-U64-_39.txt", "contents": "U64 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmul\u00b6\n[Source]"} +{"id": "Pony/0_literals_12.txt", "contents": "## Type inference\n\nIf the type of the array is not specified, the resulting type of the literal array expression is `Array[T] ref` where `T` (the type of the elements) is inferred as the union of all the element types:\n\n```pony\nlet my_heterogenous_array =\n[\nU64(42)\n\"42\"\nU64.min_value()\n]\n```\n\nIn the above example the resulting array type will be `Array[(U64|String)] ref` because the array contains `String` and `U64` elements.\n\nIf the variable or call argument the array literal is assigned to has a type, the literal is coerced to that type:\n\n```pony\nlet my_stringable_array: Array[Stringable] ref =\n["} +{"id": "Pony/src-builtin-string-_96.txt", "contents": "else\nvar i: USize = 0\n\nwhile str._apply(i) != 0 do\ni = i + 1\nend\n\n_size = i\n_alloc = i + 1\n_ptr = Pointer[U8]._alloc(_alloc)\nstr._copy_to(_ptr, _alloc)\nend\n\nnew from_utf32(value: U32) =>\n\"\"\"\nCreate a UTF-8 string from a single UTF-32 code point.\n\"\"\"\nlet encoded = _UTF32Encoder.encode(value)\n_size = encoded._1\n_alloc = _size + 1"} +{"id": "Pony/src-collections-persistent-vec-_23.txt", "contents": "end\n\nfun val concat(iter: Iterator[val->A]): Vec[A] =>\n\"\"\"\nReturn a vector with the values of the given iterator added to the end.\n\"\"\"\nvar v = this\nfor a in iter do\nv = v.push(a)\nend\nv\n\nfun val find(\nvalue: val->A,\noffset: USize = 0,\nnth: USize = 0,\npredicate: {(A, A): Bool} val = {(l: A, r: A): Bool => l is r })\n: USize ?\n=>\n\"\"\""} +{"id": "Pony/pony_check--index-_5.txt", "contents": "primitive ASCIILettersUpper\nprimitive ASCIINUL\nprimitive ASCIINonPrintable\nprimitive ASCIIPrintable\nprimitive ASCIIPunctuation\ntype ASCIIRange\nprimitive ASCIIWhiteSpace\nclass CountdownIter\nclass ForAll\nclass ForAll2\nclass ForAll3\nclass ForAll4\ntrait GenObj\ntype GenerateResult\nclass Generator\nprimitive Generators\ntrait IntPairProperty\nclass IntPairPropertySample\ntype IntPairUnitTest\ntrait IntProperty"} +{"id": "Pony/src-cli-command_parser-_23.txt", "contents": "else\nreturn SyntaxError(token, \"unknown command\")\nend\nelse\nmatch _parse_arg(token, arg_pos)\n| let a: Arg =>\nif a.spec()._typ_p().is_seq() then\nargs.upsert(a.spec().name(), a, {(x, n) => x._append(n) })\nelse\nargs.update(a.spec().name(), a)\narg_pos = arg_pos + 1\nend\n| let se: SyntaxError => return se\nend\nend\nend\nend\n\n// If it's a help option, return a general or specific CommandHelp.\ntry"} +{"id": "Pony/src-builtin-array-_85.txt", "contents": "end\n\n_size = _size + n\n\nfun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1) =>\n\"\"\"\nAdd len iterated elements to the end of the array, starting from the given\noffset.\n\"\"\"\n\nvar n = USize(0)\n\ntry\nwhile n < offset do\nif iter.has_next() then\niter.next()?\nelse\nreturn\nend\n"} +{"id": "Pony/src-format-format-_11.txt", "contents": "make it long enough.\n* align. Specify whether fill characters should be added at the beginning or\nend of the generated string, or both.\n* fill. The character to pad a string with if is is shorter than width.\n\"\"\"\nfun apply(\nstr: String,\nfmt: FormatDefault = FormatDefault,\nprefix: PrefixDefault = PrefixDefault,\nprec: USize = -1,\nwidth: USize = 0,\nalign: Align = AlignLeft,\nfill: U32 = ' ')\n: String iso^\n=>\nlet copy_len = str.size().min(prec.usize())\nlet len = copy_len.max(width.usize())\nrecover\nlet s = String(len)\n"} +{"id": "Pony/net-OSSockOpt-_109.txt", "contents": "fun box icmp_sr_failed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_timestamp\u00b6\n[Source]\nfun box icmp_timestamp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_timestampreply\u00b6\n[Source]"} +{"id": "Pony/stdlib--index-_0.txt", "contents": "\n\n\n\n\n\n\nPony Standard Library\u00b6\nThis package represents the test suite for the Pony standard library.\nFor every new package, please add a Main actor and tests to the package in a\nfile called 'test.pony'. Then add a corresponding use directive and a line to\nthe main actor constructor of this package to invoke those tests.\nAll tests can be run by compiling and running packages/stdlib.\n\n\n\n\n\n\n"} +{"id": "Pony/random-Random-_10.txt", "contents": "\nisize\u00b6\n[Source]\nA random integer in [ISize.min_value(), ISize.max_value()]\nfun ref isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nint_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nA random integer in [0, n)\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N"} +{"id": "Pony/src-builtin-real-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-pony_check-generator-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-files-path-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-net-udp_socket-_52.txt", "contents": "fun ref getsockopt_u32(level: I32, option_name: I32): (U32, U32) =>\n\"\"\"\nWrapper for UDP sockets to the `getsockopt(2)` system call where\nthe kernel's returned option value is a C `uint32_t` type / Pony\ntype `U32`.\n\nIn case of system call success, this function returns the 2-tuple:\n1. The integer `0`.\n2. The `*option_value` returned by the kernel converted to a Pony `U32`.\n\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of `errno`.\n2. An undefined value that must be ignored.\n\"\"\"\n_OSSocket.getsockopt_u32(_fd, level, option_name)\n\nfun ref setsockopt(level: I32, option_name: I32, option: Array[U8]): U32 =>\n\"\"\"\nGeneral wrapper for UDP sockets to the `setsockopt(2)` system call.\n"} +{"id": "Pony/src-net-tcp_connection-_51.txt", "contents": "1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031"} +{"id": "Pony/src-files-file_path-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/derived-authority_7.txt", "contents": "where in this paragraph, \">>\" means \"grants at least as much authority as\". In fact, the `AmbientAuth` encompasses all ambient authority and is a strictly larger authority than `NetAuth`, which grants access to the network, which is more powerful than `TCPAuth` which is restricted to the TCP protocol. Finally, `TCPConnectAuth` is good only for creating a `TCPConnection`.\n\nThis hierarchy is established by means of the constructor of the weaker authority accepting one of the stronger authorities, for example:\n\n```pony\nprimitive TCPAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone\n```\n\nWhere `TCPAuth` grants less authority than `NetAuth`. `NetAuth` can be used to create any of the derived authorities `DNSAuth`, `UDPAuth`, `TCPAuth`, `TCPListenAuth`, `TCPConnectAuth` whereas `TCPAuth` can only be used to derive `TCPListenAuth` and `TCPConnectAuth`.\n"} +{"id": "Pony/builtin-ILong-_12.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/builtin-None-_3.txt", "contents": "Parameters\u00b6\n\nthat: None val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Real-_3.txt", "contents": ": Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nPublic Functions\u00b6\nadd\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-cli-command_spec-_42.txt", "contents": "_descr = descr'\n_short = short'\n(_typ, _default, _required) = _init(_StringSeqType, _StringSeq.empty())\n\nfun name(): String =>\n\"\"\"\nReturns the name of this option.\n\"\"\"\n_name\n\nfun descr(): String =>\n\"\"\"\nReturns the description for this option.\n\"\"\"\n_descr\n\nfun _typ_p(): _ValueType => _typ\n\nfun _default_p(): _Value => _default\n"} +{"id": "Pony/builtin-UnsignedInteger-_23.txt", "contents": "[Source]\nfun box rem_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: A)\n: A ?\n"} +{"id": "Pony/src-pony_bench-pony_bench-_13.txt", "contents": "_Timer (10000ns) 10360 ns 10238 ns \u00b13.25% 10000\n```\nThe `--noadjust` option outputs results of the overhead measured prior to each\nbenchmark run followed by the unadjusted benchmark result. An example of the\noutput of this program with `--noadjust` is as follows:\n```\nBenchmark mean median deviation iterations\nBenchmark Overhead 604 ns 603 ns \u00b10.58% 300000\nNothing 553 ns 553 ns \u00b10.30% 300000\nBenchmark Overhead 555 ns 555 ns \u00b10.51% 300000\n_Fib(5) 574 ns 574 ns \u00b10.43% 300000\nBenchmark Overhead 554 ns 556 ns \u00b10.48% 300000\n_Fib(10) 822 ns 821 ns \u00b10.39% 200000\nBenchmark Overhead 554 ns 553 ns \u00b10.65% 300000\n_Fib(20) 30470 ns 30304 ns \u00b11.55% 5000\nBenchmark Overhead 552 ns 552 ns \u00b10.39% 300000\n_Timer (10000 ns) 10780 ns 10800 ns \u00b13.60% 10000\n```\n\nIt is recommended that a PonyBench program is compiled with the `--runtimebc`"} +{"id": "Pony/src-itertools-iter-_61.txt", "contents": "| _None =>\nif _iter.has_next() then\nlet a = _iter.next()?\nif try f(a)? else false end then\n_next = a\nelse\n_find_next()\nend\nend\nend\nend\n\nfun ref has_next(): Bool =>\nmatch _next\n| _None =>\nif _iter.has_next() then\n_find_next()\nhas_next()\nelse\nfalse"} +{"id": "Pony/builtin-I128-_33.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , I128 val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-net-ossockopt-_51.txt", "contents": "1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031"} +{"id": "Pony/src-term-ansi-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-itertools-iter-_101.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.skip_while({(x) => x < 4 })\n```\n`4 5 6`\n\"\"\"\nfilter_stateful(\nobject\nvar _done: Bool = false\n\nfun ref apply(a: A!): Bool =>\nif _done then return true end\nif try f(a)? else false end then\nfalse\nelse\n_done = true\ntrue\nend"} +{"id": "Pony/builtin-ReadSeq-_1.txt", "contents": "\nUSize val\n\n\napply\u00b6\n[Source]\nReturns the i-th element of the sequence. Raises an error if the index\nis out of bounds. Note that this returns this->A, not A.\nfun box apply(\ni: USize val)\n: this->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->A ?\n"} +{"id": "Pony/src-pony_check-pony_check-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-I8-_19.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-net_address-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199use @ntohl[U32](netlong: U32)\nuse @ntohs[U16](netshort: U16)\nuse @pony_os_ipv4[Bool](addr: NetAddress tag)\nuse @pony_os_ipv6[Bool](addr: NetAddress tag)\nuse @ponyint_address_length[U32](addr: NetAddress tag)\nuse @pony_os_nameinfo[Bool](addr: NetAddress tag,\nhost: Pointer[Pointer[U8] iso] tag, serv: Pointer[Pointer[U8] iso] tag,\nreverse_dns: Bool, service_name: Bool)\n\nclass val NetAddress is Equatable[NetAddress]\n\"\"\"\nRepresents an IPv4 or IPv6 address. The family field indicates the address\ntype. The addr field is either the IPv4 address or the IPv6 flow info. The"} +{"id": "Pony/src-pony_check-generator-_141.txt", "contents": "(consume s, shrink_iter)\nend)\n\nfun _trim_codepoints(s: String, trim_to: USize): String =>\nrecover val\nIter[U32](s.runes())\n.take(trim_to)\n.fold[String ref](\nString.create(trim_to),\n{(acc, cp) => acc.>push_utf32(cp) })\nend\n\nfun unicode(\nmin: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for unicode strings,\nwith a minimum length of `min` codepoints (default: 0)"} +{"id": "Pony/builtin-I32-_60.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_24.txt", "contents": "\nILong val ?\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val ?\n\n\nshl\u00b6"} +{"id": "Pony/src-pony_check-generator-_93.txt", "contents": "for elem in iter do\nif i >= size then break end\n\nresult.push(consume elem)\ni = i + 1\nend\n// create shrink_iter with smaller seqs and elements generated from _gen.value_iter\nlet shrink_iter =\nIter[USize](CountdownIter(size, min)) //Range(size, min, -1))\n// .skip(1)\n.map_stateful[S^]({\n(s: USize): S^ =>\nlet res = recover iso S.create(s) end\nlet s_iter = _gen.value_iter(rnd)\nvar j = USize(0)\n\nfor s_elem in s_iter do\nif j >= s then break end\nres.push(consume s_elem)\nj = j + 1"} +{"id": "Pony/builtin-U8-_41.txt", "contents": "fun box divrem(\ny: U8 val)\n: (U8 val , U8 val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , U8 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-String-_44.txt", "contents": "\nParameters\u00b6\n\nseq: ReadSeq[U8 val] box\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nconcat\u00b6\n[Source]\nAdd len iterated bytes to the end of the string, starting from the given\noffset.\nfun ref concat(\niter: Iterator[U8 val] ref,\noffset: USize val = 0,\nlen: USize val = call)"} +{"id": "Pony/src-buffered-reader-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-builtin-stdin-_16.txt", "contents": "be _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nWhen the event fires, read from stdin.\n\"\"\"\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(event)\nelseif (_event is event) and AsioEvent.readable(flags) then\n_read()\nend\n\nbe _read_again() =>\n\"\"\"\nResume reading.\n\"\"\"\n_read()\n\nfun ref _read(): Bool =>\n\"\"\"\nRead a chunk of data from stdin. Read a maximum of _chunk_size bytes, send\nourself a resume message and stop reading to avoid starving other actors."} +{"id": "Pony/src-format-format-_9.txt", "contents": " Example program\n\n```pony\nuse \"format\"\n\nactor Main\nfun disp(desc: String, v: I32, fmt: FormatInt = FormatDefault): String =>\nFormat(desc where width = 10)\n+ \":\"\n+ Format.int[I32](v where width = 10, align = AlignRight, fmt = fmt)\n\nnew create(env: Env) =>\ntry\n(let x, let y) = (env.args(1)?.i32()?, env.args(2)?.i32()?)\nenv.out.print(disp(\"x\", x))\nenv.out.print(disp(\"y\", y))\nenv.out.print(disp(\"hex(x)\", x, FormatHex))\nenv.out.print(disp(\"hex(y)\", y, FormatHex))\nenv.out.print(disp(\"x * y\", x * y))\nelse"} +{"id": "Pony/3_actors_0.txt", "contents": "# Actors\n\nAn __actor__ is similar to a __class__, but with one critical difference: an actor can have __behaviours__.\n"} +{"id": "Pony/src-builtin-real-_61.txt", "contents": "Unsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n\nfun ctz_unsafe(): A\n\"\"\"\nCount trailing zeroes.\n\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n\nfun bitwidth(): A\n\nfun bytewidth(): USize\n\nfun string(): String iso^ =>\n_ToString._u64(u64(), false)\n\ntrait val FloatingPoint[A: FloatingPoint[A] val] is Real[A]"} +{"id": "Pony/src-encode-base64-base64-_16.txt", "contents": "if (lineblocks > 0) and (blocks == lineblocks) then\nout.append(linesep)\nblocks = 0\nend\nend\n\nif srclen >= 1 then\nlet in1 = data(i)?\nlet in2 = if srclen == 2 then data(i + 1)? else 0 end\n\nlet out1 = in1 >> 2\nlet out2 = ((in1 and 0x03) << 4) + (in2 >> 4)\nlet out3 = (in2 and 0x0f) << 2\n\nout.push(_enc_byte(out1, at62, at63)?)\nout.push(_enc_byte(out2, at62, at63)?)\n\nif srclen == 2 then\nout.push(_enc_byte(out3, at62, at63)?)\nelse"} +{"id": "Pony/builtin-U64-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_27.txt", "contents": "bit_reverse\u00b6\n[Source]\nReverse the order of the bits within the integer.\nFor example, 0b11101101 (237) would return 0b10110111 (183).\nfun box bit_reverse()\n: A\n\nReturns\u00b6\n\nA\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/src-builtin-unsigned-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-U16-_34.txt", "contents": "fun box rem_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Real-_10.txt", "contents": "The result has the sign of the divisor.\nfun box mod(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: box->A)\n: Bool val\n"} +{"id": "Pony/builtin-I16-_50.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_48.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: I128 val)\n: Bool val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/random-XorOshiro128Plus-_0.txt", "contents": "\n\n\n\n\n\n\nXorOshiro128Plus\u00b6\n[Source]\nThis is an implementation of xoroshiro128+, as detailed at:\nhttp://xoroshiro.di.unimi.it\nThis is currently the default Rand implementation.\nclass ref XorOshiro128Plus is\nRandom ref\n\nImplements\u00b6\n\nRandom ref\n\n"} +{"id": "Pony/src-builtin-real-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-pony_check-poperator-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22class ref Poperator[T] is Iterator[T^]\n\"\"\"\nIterate over a [Seq](builtin-Seq.md) descructively by `pop`ing its elements.\n\nOnce `has_next()` returns `false`, the [Seq](builtin-Seq.md) is empty.\n\nNominee for the annual pony class-naming awards.\n\"\"\"\n\nlet _seq: Seq[T]"} +{"id": "Pony/src-pony_check-generator-_63.txt", "contents": "1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271"} +{"id": "Pony/net-OSSockOpt-_488.txt", "contents": "fun box so_exclusiveaddruse()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_get_filter\u00b6\n[Source]\nfun box so_get_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_group_id\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_47.txt", "contents": "Bool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: U64 val)\n: Bool val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nBool val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_167.txt", "contents": "let lead_char = _ptr._apply(index)\nlet base_char = _ptr._apply(index + 1) and not 0x20\n\nif (lead_char == '0') and (base_char == 'B') then\nreturn (2, 2)\nend\n\nif (lead_char == '0') and (base_char == 'X') then\nreturn (16, 2)\nend\n\n// No base specified, default to decimal\n(10, 0)\n\nfun f32(offset: ISize = 0): F32 ? =>\n\"\"\"\nConvert this string starting at the given offset\nto a 32-bit floating point number ([F32](builtin-F32.md)).\n\nThis method errors if this string cannot be parsed to a float,"} +{"id": "Pony/src-term-ansi_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/format-FormatInt-_0.txt", "contents": "\n\n\n\n\n\n\nFormatInt\u00b6\n[Source]\ntype FormatInt is\n(FormatDefault val | FormatUTF32 val | FormatBinary val | FormatBinaryBare val | FormatOctal val | FormatOctalBare val | FormatHex val | FormatHexBare val | FormatHexSmall val | FormatHexSmallBare val)\n\nType Alias For\u00b6\n\n(FormatDefault val | FormatUTF32 val | FormatBinary val | FormatBinaryBare val | FormatOctal val | FormatOctalBare val | FormatHex val | FormatHexBare val | FormatHexSmall val | FormatHexSmallBare val)\n\n\n\n\n"} +{"id": "Pony/builtin-U32-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_64.txt", "contents": "if _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then\nlet r =\nifdef bigendian then\ndata.read_u128(offset)?\nelse\ndata.read_u128(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr"} +{"id": "Pony/src-net-ossockopt-_64.txt", "contents": "1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286\n1287\n1288\n1289\n1290\n1291"} +{"id": "Pony/src-cli-command-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-promises-promise-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-cli-env_vars-_4.txt", "contents": "end\nend\nend\nenvsmap\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_168.txt", "contents": "fun box ipv6_rthdrdstopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tclass\u00b6\n[Source]\nfun box ipv6_tclass()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_tlv_hao\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_54.txt", "contents": "ILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_392.txt", "contents": "fun box sctp_had_no_tcb()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_heartbeat_ack\u00b6\n[Source]\nfun box sctp_heartbeat_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_heartbeat_request\u00b6\n[Source]"} +{"id": "Pony/builtin-Greater-_0.txt", "contents": "\n\n\n\n\n\n\nGreater\u00b6\n[Source]\nprimitive val Greater is\nEquatable[(Less val | Equal val | Greater val)] ref\n\nImplements\u00b6\n\nEquatable[(Less val | Equal val | Greater val)] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-builtin-array-_86.txt", "contents": "n = n + 1\nend\nend\n\nn = 0\n\n// If a concrete len is specified, we take the caller at their word\n// and reserve that much space, even though we can't verify that the\n// iterator actually has that many elements available. Reserving ahead\n// of time lets us take a fast path of direct pointer access.\nif len != -1 then\nreserve(_size + len)\n\ntry\nwhile n < len do\nif iter.has_next() then\n_ptr._update(_size + n, iter.next()?)\nelse\nbreak\nend"} +{"id": "Pony/pony_check-ASCIINonPrintable-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_54.txt", "contents": "\"\"\"\n@\"llvm.cttz.i16\"(this.u16(), true)\n\nfun bitwidth(): U16 => 16\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: I16): I16 => if this < y then this else y end\nfun max(y: I16): I16 => if this > y then this else y end\n\nfun fld(y: I16): I16 =>\n_SignedArithmetic.fld[I16, U16](this, y)\n\nfun fld_unsafe(y: I16): I16 =>\n_SignedUnsafeArithmetic.fld_unsafe[I16, U16](this, y)\n\nfun mod(y: I16): I16 =>\n_SignedArithmetic.mod[I16, U16](this, y)\n\nfun mod_unsafe(y: I16): I16 =>"} +{"id": "Pony/src-builtin-string-_151.txt", "contents": "break\nend\nuntil (i = i - 1) == 0 end\n\ntruncate(truncate_at)\nend\n\nfun ref lstrip(s: String box = \" \\t\\v\\f\\r\\n\") =>\n\"\"\"\nRemove all leading characters within the string that are in s. By default,\nleading whitespace is removed.\n\"\"\"\nif _size > 0 then\nlet chars = Array[U32](s.size())\nvar i = USize(0)\n\nfor rune in s.runes() do\nchars.push(rune)\nend\n"} +{"id": "Pony/pony_check-PropertyRunner-_2.txt", "contents": "complete_run\u00b6\n[Source]\nComplete a property run.\nThis behaviour is called from the PropertyHelper\nor from the actor itself.\nbe complete_run(\nround: (_Shrink val | _Run val),\nsuccess: Bool val)\n\nParameters\u00b6\n\nround: (_Shrink val | _Run val)\nsuccess: Bool val\n\n\nrun\u00b6\n[Source]\nbe run()\n\n"} +{"id": "Pony/src-files-file_stream-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39actor FileStream is OutStream\n\"\"\"\nAsynchronous access to a File object. Wraps file operations print, write,\nprintv and writev. The File will be disposed through File._final.\n\"\"\"\nlet _file: File\n\nnew create(file: File iso) =>\n_file = consume file\n\nbe print(data: ByteSeq) =>\n\"\"\"\nPrint some bytes and insert a newline afterwards."} +{"id": "Pony/term-ANSI-_18.txt", "contents": "fun box bright_magenta()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_cyan\u00b6\n[Source]\nBright cyan text.\nfun box bright_cyan()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_grey\u00b6"} +{"id": "Pony/builtin-F64-_24.txt", "contents": "fun box powi(\ny: I32 val)\n: F64 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nF64 val\n\n\nsqrt\u00b6\n[Source]\nfun box sqrt()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-net-tcp_connection-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/builtin-ULong-_18.txt", "contents": "ULong val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val ?\n\n\ndivrem_partial\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_471.txt", "contents": "fun box sock_maxaddrlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_nonblock\u00b6\n[Source]\nfun box sock_nonblock()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_raw\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_26.txt", "contents": "error\nend\npath = tmp_path\n\nnew val mkdtemp(\nbase: (FileAuth | FilePath),\nprefix: String = \"\",\ncaps': FileCaps val = recover val FileCaps .> all() end) ?\n=>\n\"\"\"\nCreate a temporary directory and returns a path to it. The directory's name\nwill begin with `prefix`.\n\nIf `FileAuth` is provided, the resulting `FilePath` will\nbe relative to the program's working directory. Otherwise, it will be\nrelative to the existing `FilePath`, and the existing `FilePath` must be a\nprefix of the resulting path.\n\nThe resulting `FilePath` will have capabilities that are the intersection\nof the supplied capabilities and the capabilities on the base."} +{"id": "Pony/src-process-process_monitor-_32.txt", "contents": "_stdin.begin(this)\n_stdout.begin(this)\n_stderr.begin(this)\nelse\n_notifier.failed(this, ProcessError(ForkError))\nreturn\nend\n\n// Asio is not wired up for Windows, so use a timer for now.\nifdef windows then\n_setup_windows_timers()\nend\n_notifier.created(this)\n\n\nbe print(data: ByteSeq) =>\n\"\"\"\nPrint some bytes and append a newline.\n\"\"\"\nif not _done_writing then"} +{"id": "Pony/src-collections-flag-_11.txt", "contents": "fun value(): U64 => 2\n\nprimitive RDTSCP\nfun value(): U64 => 4\n\ntype Features is Flags[(SSE | AVX | RDTSCP)]\n\nType parameter B is the underlying field used to store the flags.\n\"\"\"\nvar _value: B = 0\n\nnew iso create(value': B = 0) =>\n\"\"\"\nCreate a Flags instance with an optional initial value.\nDefault is 0 (no flags set).\n\"\"\"\n_value = value'\n\nfun value(): B =>\n\"\"\""} +{"id": "Pony/builtin-Integer-_16.txt", "contents": "\n(A , A) ?\n\n\nfld_partial\u00b6\n[Source]\nFloored integer division, rounded towards negative infinity.\nIf y is 0 or the operation overflows, this function errors\nfun box fld_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n"} +{"id": "Pony/builtin-UnsignedInteger-_64.txt", "contents": "\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n"} +{"id": "Pony/format-PrefixSign-_1.txt", "contents": "new val create()\n: PrefixSign val^\n\nReturns\u00b6\n\nPrefixSign val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: PrefixSign val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixSign val\n\nReturns\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_18.txt", "contents": "\nA\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6"} +{"id": "Pony/src-pony_test-test_helper-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447interface ITest\nfun apply() ?\n\nclass val TestHelper\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_559.txt", "contents": "fun box tcpopt_multipath()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_nop\u00b6\n[Source]\nfun box tcpopt_nop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_pad\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_20.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_115.txt", "contents": "while (_read_buf_offset >= _expect) and (_read_buf_offset > 0) do\n// get data to be distributed and update `_read_buf_offset`\nlet chop_at = if _expect == 0 then _read_buf_offset else _expect end\n(let data, _read_buf) = (consume _read_buf).chop(chop_at)\n_read_buf_offset = _read_buf_offset - chop_at\n\n// increment max reads\nreceived_called = received_called + 1\n\n// check if we should yield to let another actor run\nif (not _notify.received(this, consume data,\nreceived_called))\nor (received_called >= _max_received_called)\nthen\n_read_again()\n_reading = false\nreturn\nend\nend\n"} +{"id": "Pony/capsicum-Cap-_34.txt", "contents": "fun box kqueue_event()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nioctl\u00b6\n[Source]\nfun box ioctl()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nttyhook\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_9.txt", "contents": "fun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-flag-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-term-readline-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/net-UDPSocket-_14.txt", "contents": ": NetAddress val\n\nReturns\u00b6\n\nNetAddress val\n\n\ngetsockopt\u00b6\n[Source]\nGeneral wrapper for UDP sockets to the getsockopt(2) system call.\nThe caller must provide an array that is pre-allocated to be\nat least as large as the largest data structure that the kernel\nmay return for the requested option.\nIn case of system call success, this function returns the 2-tuple:\n1. The integer 0.\n2. An Array[U8] of data returned by the system call's void *\n4th argument. Its size is specified by the kernel via the\nsystem call's sockopt_len_t * 5th argument.\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of errno."} +{"id": "Pony/builtin-ISize-_33.txt", "contents": "[Source]\nfun box op_and(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/builtin-SignedInteger-_60.txt", "contents": "U64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/format-Format-_2.txt", "contents": "fun box apply(\nstr: String val,\nfmt: FormatDefault val = reference,\nprefix: PrefixDefault val = reference,\nprec: USize val = call,\nwidth: USize val = 0,\nalign: (AlignLeft val | AlignRight val | AlignCenter val) = reference,\nfill: U32 val = 32)\n: String iso^\n\nParameters\u00b6\n\nstr: String val\nfmt: FormatDefault val = reference\nprefix: PrefixDefault val = reference\nprec: USize val = call\nwidth: USize val = 0\nalign: (AlignLeft val | AlignRight val | AlignCenter val) = reference\nfill: U32 val = 32\n"} +{"id": "Pony/src-net-ossockopt-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-string-_122.txt", "contents": "\nvar steps = nth + 1\n\nwhile i < _size do\nvar j: USize = 0\n\nlet same = while j < s._size do\nif _ptr._apply(i + j) != s._ptr._apply(j) then\nbreak false\nend\nj = j + 1\ntrue\nelse\nfalse\nend\n\nif same and ((steps = steps - 1) == 1) then\nreturn i.isize()\nend\n"} +{"id": "Pony/src-capsicum-cap_rights-_8.txt", "contents": "Version 0 of the capsicum cap_rights_t structure.\n\"\"\"\nvar _r0: U64 = 0\nvar _r1: U64 = 0\n\nnew create() =>\n\"\"\"\nInitialises with no rights.\n\"\"\"\nclear()\n\nnew from(caps: FileCaps box) =>\n\"\"\"\nInitialises with the rights from a FileCaps.\n\"\"\"\nclear()\n\nif caps(FileCreate) then set(Cap.creat()) end\nif caps(FileChmod) then set(Cap.fchmod()) end\nif caps(FileChown) then set(Cap.fchown()) end"} +{"id": "Pony/src-pony_check-property_helper-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-UnsignedInteger-_43.txt", "contents": "Parameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-pointer-_8.txt", "contents": "fun tag _unsafe(): Pointer[A] ref =>\n\"\"\"\nUnsafe change in reference capability.\n\"\"\"\ncompile_intrinsic\n\nfun _convert[B](): this->Pointer[B] =>\n\"\"\"\nConvert from Pointer[A] to Pointer[B].\n\"\"\"\ncompile_intrinsic\n\nfun _apply(i: USize): this->A =>\n\"\"\"\nRetrieve index i.\n\"\"\"\ncompile_intrinsic\n\nfun ref _update(i: USize, value: A!): A^ =>\n\"\"\""} +{"id": "Pony/src-net-tcp_connection-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-promises-promise-_29.txt", "contents": "fun apply(out: OutStream, issue: Promise[Issue]) =>\nissue.next[None](ActuallyPrintIssueTitle~apply(out))\n\nprimitive ActuallyPrintIssueTitle\nfun apply(out: OutStream, issue: Issue) =>\nout.print(issue.title())\n```\n\nThat will work, however, it is kind of awful. When looking at:\n\n```pony\nlet repo: Promise[Repoository] =\nGitHub(\"my token\").get_repo(\"ponylang/ponyc\")\nlet issue = Promise[Promise[Issue]] =\nrepo.next[Promise[Issue]](FetchIssue~apply(1))\nissue.next[None](PrintIssueTitle~apply(env.out))\n```\n\nit can be hard to follow what is going on. We can only tell what is\nhappening because we gave `PrintIssueTitle` a very misleading name; it"} +{"id": "Pony/src-pony_check-generator-_124.txt", "contents": ": Generator[U128]\n=>\n\"\"\"\nCreate a generator for U128 values.\n\"\"\"\nlet that = this\nGenerator[U128](\nobject is GenObj[U128]\nfun generate(rnd: Randomness): U128^ =>\nrnd.u128(min, max)\n\nfun shrink(u: U128): ValueAndShrink[U128] =>\nthat._int_shrink[U128](consume u, min)\nend)\n\nfun usize(\nmin: USize = USize.min_value(),\nmax: USize = USize.max_value())\n: Generator[USize]\n=>"} +{"id": "Pony/builtin-Array-_23.txt", "contents": "Insert an element into the array. Elements after this are moved up by one\nindex, extending the array.\nWhen inserting right beyond the last element, at index this.size(),\nthe element will be appended, similar to push(),\nan insert at index 0 prepends the value to the array.\nAn insert into an index beyond this.size() raises an error.\nlet array = Array[U8](4) // []\narray.insert(0, 0xDE)? // prepend: [0xDE]\narray.insert(array.size(), 0xBE)? // append: [0xDE; 0xBE]\narray.insert(1, 0xAD)? // insert: [0xDE; 0xAD; 0xBE]\narray.insert(array.size() + 1, 0xEF)? // error\n\nfun ref insert(\ni: USize val,\nvalue: A)\n: None val ?\n\nParameters\u00b6\n\ni: USize val"} +{"id": "Pony/itertools-Iter-_36.txt", "contents": "Iter[I64]([1; 2; 3; 4; 5; 6].values())\n.take_while({(x) => x < 4 })\n\n1 2 3\nfun ref take_while(\nf: {(A!): Bool ?}[A] box)\n: Iter[A!] ref^\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nunique[optional H: HashFunction[A] val]\u00b6\n[Source]\nReturn an iterator that filters out elements that have already been"} +{"id": "Pony/collections-HashFunction64-_2.txt", "contents": "\n\neq\u00b6\n[Source]\nDetermine equality between two keys with the same hash. This is done with\nviewpoint adapted aliases to allow data structures to determine equality\nin a box fun without consuming keys.\nfun box eq(\nx: box->A!,\ny: box->A!)\n: Bool val\n\nParameters\u00b6\n\nx: box->A!\ny: box->A!\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-term-ansi_term-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-Array-_47.txt", "contents": "Returns\u00b6\n\nUSize val ?\n\n\nclone\u00b6\n[Source]\nClone the array.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not cloned.\nfun box clone()\n: Array[this->A!] ref^\n\nReturns\u00b6\n\nArray[this->A!] ref^\n\n\nslice\u00b6\n[Source]"} +{"id": "Pony/src-collections-range-_12.txt", "contents": "else\nerror\nend\n\nfun ref rewind() =>\n_idx = _min\n\nfun is_infinite(): Bool =>\n_infinite\n\nfun is_empty(): Bool =>\n_empty\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_test-pony_test-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/itertools-Iter-_24.txt", "contents": "other: Iterator[A] ref)\n: Iter[A!] ref\n\nParameters\u00b6\n\nother: Iterator[A] ref\n\nReturns\u00b6\n\nIter[A!] ref\n\n\ninterleave_shortest\u00b6\n[Source]\nReturn an iterator that alternates the values of the original iterator and\nthe other until one of them runs out.\nExample\u00b6\nIter[USize](Range(0, 4))\n.interleave_shortest(Range(4, 6))\n"} +{"id": "Pony/src-files-path-_38.txt", "contents": "path\nend\n\nfun cwd(): String =>\n\"\"\"\nReturns the program's working directory. Setting the working directory is\nnot supported, as it is not concurrency-safe.\n\"\"\"\nrecover String.from_cstring(@pony_os_cwd()) end\n\nfun abs(path: String): String =>\n\"\"\"\nReturns a cleaned, absolute path.\n\"\"\"\nif is_abs(path) then\nclean(path)\nelse\njoin(cwd(), path)\nend\n"} +{"id": "Pony/src-pony_check-property_unit_test-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-path-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/c-abi_5.txt", "contents": "endif\n```\n\nNote the use of `extern \"C\"`. If the library is built as C++ then we need to tell the compiler not to mangle the function name, otherwise, Pony won't be able to find it. For libraries built as C, this is not needed, of course.\n\nThe implementation of the previous header would be something like:\n\n```c"} +{"id": "Pony/net-OSSockOpt-_352.txt", "contents": "fun box sctp_cause_unsupported_hmacid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_user_initiated_abt\u00b6\n[Source]\nfun box sctp_cause_user_initiated_abt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_hstcp\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_33.txt", "contents": "nth: USize val = 0)\n: Bool val\n\nParameters\u00b6\n\ns: String box\noffset: ISize val = 0\nnth: USize val = 0\n\nReturns\u00b6\n\nBool val\n\n\ncount\u00b6\n[Source]\nCounts the non-overlapping occurrences of s in the string.\nfun box count(\ns: String box,\noffset: ISize val = 0)"} +{"id": "Pony/time-Nanos-_1.txt", "contents": "\nNanos val^\n\n\nPublic Functions\u00b6\nfrom_seconds\u00b6\n[Source]\nfun box from_seconds(\nt: U64 val)\n: U64 val\n\nParameters\u00b6\n\nt: U64 val\n\nReturns\u00b6\n\nU64 val\n\n"} +{"id": "Pony/src-builtin-string-_74.txt", "contents": "1472\n1473\n1474\n1475\n1476\n1477\n1478\n1479\n1480\n1481\n1482\n1483\n1484\n1485\n1486\n1487\n1488\n1489\n1490\n1491"} +{"id": "Pony/src-collections-list_node-_19.txt", "contents": "\nmatch _next\n| let next': ListNode[A] =>\nnext'._prev = that\nelse\nlist'._set_tail(that)\nend\n\nthat._list = list'\nthat._prev = this\nthat._next = _next\n_next = that\nlist'._increment()\nend\nin_list\n\nfun ref remove() =>\n\"\"\"\nRemove a node from a list.\n"} +{"id": "Pony/process-ProcessMonitor-_4.txt", "contents": "\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nwritev\u00b6\n[Source]\nWrite an iterable collection of ByteSeqs.\nbe writev(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\ndone_writing\u00b6\n[Source]\nSet the _done_writing flag to true. If _pending is empty we can close the"} +{"id": "Pony/src-collections-persistent-map-_16.txt", "contents": "Return this Map without the given key.\n\"\"\"\ntry\nremove(key)?\nelse\nthis\nend\n\nfun val keys(): MapKeys[K, V, H] => MapKeys[K, V, H](this)\n\nfun val values(): MapValues[K, V, H] => MapValues[K, V, H](this)\n\nfun val pairs(): MapPairs[K, V, H] => MapPairs[K, V, H](this)\n\nfun _root_node(): _MapSubNodes[K, V, H] => _root\n\nclass MapKeys[K: Any #share, V: Any #share, H: mut.HashFunction[K] val]\nembed _pairs: MapPairs[K, V, H]\n\nnew create(m: HashMap[K, V, H]) => _pairs = MapPairs[K, V, H](m)"} +{"id": "Pony/builtin-StringRunes-_0.txt", "contents": "\n\n\n\n\n\n\nStringRunes\u00b6\n[Source]\nclass ref StringRunes is\nIterator[U32 val] ref\n\nImplements\u00b6\n\nIterator[U32 val] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/buffered-Reader-_4.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\nclear\u00b6\n[Source]\nDiscard all pending data.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nappend\u00b6\n[Source]\nAdd a chunk of data.\nfun ref append("} +{"id": "Pony/collections-HashMap-_8.txt", "contents": "\nReturns\u00b6\n\nV!\n\n\nremove\u00b6\n[Source]\nDelete a value from the map and return it. Raises an error if there was no\nvalue for the given key.\nfun ref remove(\nkey: box->K!)\n: (K^ , V^) ?\n\nParameters\u00b6\n\nkey: box->K!\n\nReturns\u00b6\n"} +{"id": "Pony/src-debug-debug-_6.txt", "contents": "# Example code\n\n```pony\nuse \"debug\"\n\nactor Main\nnew create(env: Env) =>\nDebug.out(\"This will only be seen when configured for debug info\")\nenv.out.print(\"This will always be seen\")\n```\n\"\"\"\nuse @fprintf[I32](stream: Pointer[U8] tag, fmt: Pointer[U8] tag, ...)\nuse @pony_os_stdout[Pointer[U8]]()\nuse @pony_os_stderr[Pointer[U8]]()\n\nprimitive DebugOut\nprimitive DebugErr\n\ntype DebugStream is (DebugOut | DebugErr)\n"} +{"id": "Pony/builtin-U8-_19.txt", "contents": "(U8 val , U8 val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nshr\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_31.txt", "contents": "fun box sub_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-files-path-_53.txt", "contents": "error\nelse\nrecover String.from_cstring(consume cstring) end\nend\n\nfun is_list_sep(c: U8): Bool =>\n\"\"\"\nDetermine if a byte is a path list separator.\n\"\"\"\nifdef windows then c == ';' else c == ':' end\n\nfun list_sep(): String =>\n\"\"\"\nReturn the path list separator as a string.\n\"\"\"\nifdef windows then \";\" else \":\" end\n\nfun split_list(path: String): Array[String] iso^ =>\n\"\"\"\nSeparate a list of paths into an array of cleaned paths."} +{"id": "Pony/files-OpenFile-_0.txt", "contents": "\n\n\n\n\n\n\nOpenFile\u00b6\n[Source]\nOpen a File for read only.\nprimitive val OpenFile\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: OpenFile val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_stream-_3.txt", "contents": "\"\"\"\n_file.print(data)\n\nbe write(data: ByteSeq) =>\n\"\"\"\nPrint some bytes without inserting a newline afterwards.\n\"\"\"\n_file.write(data)\n\nbe printv(data: ByteSeqIter) =>\n\"\"\"\nPrint an iterable collection of ByteSeqs.\n\"\"\"\n_file.printv(data)\n\nbe writev(data: ByteSeqIter) =>\n\"\"\"\nWrite an iterable collection of ByteSeqs.\n\"\"\"\n_file.writev(data)"} +{"id": "Pony/src-pony_test-test_helper-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/net-OSSockOpt-_582.txt", "contents": "fun box tcp_mss()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_mss_default\u00b6\n[Source]\nfun box tcp_mss_default()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_mss_desired\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-string-_106.txt", "contents": "\nfun ref trim_in_place(from: USize = 0, to: USize = -1) =>\n\"\"\"\nTrim the string to a portion of itself, covering `from` until `to`.\nUnlike slice, the operation does not allocate a new string nor copy\nelements.\n\"\"\"\nlet last = _size.min(to)\nlet offset = last.min(from)\nlet size' = last - offset\n\n// use the new size' for alloc if we're not including the last used byte\n// from the original data and only include the extra allocated bytes if\n// we're including the last byte.\n_alloc = if last == _size then _alloc - offset else size' end\n\n_size = size'\n\n// if _alloc == 0 then we've trimmed all the memory originally allocated.\n// if we do _ptr._offset, we will spill into memory not allocated/owned"} +{"id": "Pony/src-collections-persistent-vec-_22.txt", "contents": "end\n_create(root', recover Array[A] end, size', _depth)\nend\n\nfun val pop(): Vec[A] ? =>\n\"\"\"\nReturn a vector with the value at the end removed.\n\"\"\"\n// root is popped when tail is empty\nlet size' = _size - 1\nif _tail.size() > 0 then\nlet tail = _tail.trim(0, _tail.size() - 1)\n_create(_root, tail, size', _depth)\nelse\n(let root, var tail) = (_root as _VecNode[A]).pop(_depth, size')?\ntail = tail.trim(0, tail.size() - 1)\nif _depth == 0\nthen _create(None, tail, size', -1)\nelse _create(root, tail, size', _depth)\nend"} +{"id": "Pony/src-builtin-unsigned-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/capsicum-Cap-_40.txt", "contents": "fun box acl_get()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nacl_set\u00b6\n[Source]\nfun box acl_set()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nkqueue_change\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-U128-_57.txt", "contents": "U128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_99.txt", "contents": "fun cpointer(offset: USize = 0): Pointer[U8] tag =>\n\"\"\"\nReturns a C compatible pointer to the underlying string allocation.\n\"\"\"\n_ptr._offset(offset)\n\nfun cstring(): Pointer[U8] tag =>\n\"\"\"\nReturns a C compatible pointer to a null-terminated version of the\nstring, safe to pass to an FFI function that doesn't accept a size\nargument, expecting a null-terminator. If the underlying string\nis already null terminated, this is returned; otherwise the string\nis copied into a new, null-terminated allocation.\n\"\"\"\nif is_null_terminated() then\nreturn _ptr\nend\n\nlet ptr = Pointer[U8]._alloc(_size + 1)\n_ptr._copy_to(ptr._unsafe(), _size)"} +{"id": "Pony/src-builtin-string-_85.txt", "contents": "1692\n1693\n1694\n1695\n1696\n1697\n1698\n1699\n1700\n1701\n1702\n1703\n1704\n1705\n1706\n1707\n1708\n1709\n1710\n1711"} +{"id": "Pony/src-pony_check-property_runner-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-persistent-Vec-_6.txt", "contents": "n: USize val\n\nReturns\u00b6\n\nVec[A] val ?\n\n\npush\u00b6\n[Source]\nReturn a vector with the value added to the end.\nfun val push(\nvalue: val->A)\n: Vec[A] val\n\nParameters\u00b6\n\nvalue: val->A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_46.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/random-SplitMix64-_10.txt", "contents": ": ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun ref isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nint_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |"} +{"id": "Pony/pony_check-GenObj-_2.txt", "contents": "\n\ngenerate_value\u00b6\n[Source]\nSimply generate a value and ignore any possible\nshrink values.\nfun box generate_value(\nrnd: Randomness ref)\n: T^ ?\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nT^ ?\n\n\ngenerate_and_shrink\u00b6"} +{"id": "Pony/src-pony_test-pony_test-_45.txt", "contents": "// Ignore any tests that satisfy our \"exclude\" filter\nif (_exclude != \"\") and name.at(_exclude, 0) then\nreturn\nend\n\n// Ignore any tests that don't satisfy our \"only\" filter\nif (_only != \"\") and (not name.at(_only, 0)) then\nreturn\nend\n\n// Ignore tests when label arg is set and test label doesn't match\nif (_label != \"\") and (_label != test.label()) then\nreturn\nend\n\n_any_found = true\n\nif _list_only then\n// Don't actually run tests, just list them\n_env.out.print(name)"} +{"id": "Pony/builtin-ILong-_44.txt", "contents": "\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: ILong val)\n: Bool val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6"} +{"id": "Pony/src-net-tcp_connection-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-U128-_11.txt", "contents": "fun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nstring\u00b6\n[Source]"} +{"id": "Pony/4_control-structures_5.txt", "contents": "# Control structures are expressions\n\nThe big difference for control structures between Pony and other languages is that in Pony everything is an expression. In languages like C++ and Java `if` is a statement, not an expression. This means that you can't have an `if` inside an expression, there has to be a separate conditional operator '?'.\n\nIn Pony control flow statements like this are all expressions that hand back a value. Your `if` statement hands you back a value. Your `for` loop (which we'll get to a bit later) hands you back a value.\n\nThis means you can use `if` directly in a calculation:\n\n```pony\nx = 1 + if lots then 100 else 2 end\n```\n\nThis will give __x__ a value of either 3 or 101, depending on the variable __lots__.\n\nIf the `then` and `else` branches of an `if` produce different types then the `if` produces a __union__ of the two.\n\n```pony\nvar x: (String | Bool) =\nif friendly then\n\"Hello\""} +{"id": "Pony/src-net-tcp_connection-_98.txt", "contents": "// Don't call _complete_writes, as Windows will see this as a\n// closed connection.\nifdef not windows then\nif _pending_writes() then\n// Sent all data; release backpressure.\n_release_backpressure()\nend\nend\nelse\n// The connection failed, unsubscribe the event and close.\n@pony_asio_event_unsubscribe(event)\n@pony_os_socket_close(fd)\n_notify_connecting()\nend\nelse\n// There is a possibility that a non-Windows system has\n// already unsubscribed this event already. (Windows might\n// be vulnerable to this race, too, I'm not sure.) It's a\n// bug to do a second time. Look at the disposable status\n// of the event (not the flags that this behavior's args!)"} +{"id": "Pony/src-builtin-array-_55.txt", "contents": "| 1 | 8 |\n| 8 | 8 |\n| 9 | 16 |\n| 16 | 16 |\n| 17 | 32 |\n\nCall the `compact()` method to ask the GC to reclaim unused space. There are\nno guarantees that the GC will actually reclaim any space.\n\"\"\"\nvar _size: USize\nvar _alloc: USize\nvar _ptr: Pointer[A]\n\nnew create(len: USize = 0) =>\n\"\"\"\nCreate an array with zero elements, but space for len elements.\n\"\"\"\n_size = 0\n\nif len > 0 then"} +{"id": "Pony/builtin-ULong-_43.txt", "contents": "fun box neg()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: ULong val)\n: Bool val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_10.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-ansi_notify-_3.txt", "contents": "fun ref apply(term: ANSITerm ref, input: U8) =>\nNone\n\nfun ref up(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref down(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref left(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref right(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref delete(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref insert(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone"} +{"id": "Pony/files-FilePath-_3.txt", "contents": "\nmkdtemp\u00b6\n[Source]\nCreate a temporary directory and returns a path to it. The directory's name\nwill begin with prefix.\nIf FileAuth is provided, the resulting FilePath will\nbe relative to the program's working directory. Otherwise, it will be\nrelative to the existing FilePath, and the existing FilePath must be a\nprefix of the resulting path.\nThe resulting FilePath will have capabilities that are the intersection\nof the supplied capabilities and the capabilities on the base.\nnew val mkdtemp(\nbase: (FileAuth val | FilePath val),\nprefix: String val = \"\",\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)\n: FilePath val^ ?\n\nParameters\u00b6\n\nbase: (FileAuth val | FilePath val)"} +{"id": "Pony/builtin-Integer-_34.txt", "contents": "y: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-U128-_14.txt", "contents": "fun box div(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: U128 val)\n: U128 val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_30.txt", "contents": "fun box ipproto_ipip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ippc\u00b6\n[Source]\nfun box ipproto_ippc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ipv4\u00b6\n[Source]"} +{"id": "Pony/term-EraseRight-_2.txt", "contents": "fun box ne(\nthat: EraseRight val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseRight val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-MapValues-_2.txt", "contents": "fun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturns the next value, or raises an error if there isn't one. If values\nare added during iteration, this may not return all values.\nfun ref next()\n: M->V ?\n\nReturns\u00b6\n\nM->V ?\n\n"} +{"id": "Pony/builtin-F64-_67.txt", "contents": ": ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\nfun box f32_unsafe()\n: F32 val\n"} +{"id": "Pony/keywords_0.txt", "contents": "# Keywords\n\nThis listing explains the usage of every Pony keyword.\n\n| Keyword | Usage |\n| ----------------- | ------------------------------------------------------------------------------------------------------ |\n| `actor` | defines an actor |\n| `as` | conversion of a value to another Type (can raise an error) |\n| `be` | behavior, executed asynchronously |\n| `box` | default reference capability \u2013 object is readable, but not writable |\n| `break` | to step out of a loop statement |\n| `class` | defines a class |\n| `compile_error` | will provoke a compile error |\n| `compile_intrinsic` | implementation is written in C and not available as Pony code |\n| `continue` | continues a loop with the next iteration |\n| `consume` | move a value to a new variable, leaving the original variable empty |\n| `digestof` | create a `USize` value that summarizes the Pony object, similar to a Java object's `hashCode()` value. |\n| `do` | loop statement, or after a with statement |\n| `else` | conditional statement in if, for, while, repeat, try (as a catch block), match |\n| `elseif` | conditional statement, also used with `ifdef` |"} +{"id": "Pony/calling-c_0.txt", "contents": "# Calling C from Pony\n\nFFI is built into Pony and native libraries may be directly referenced in Pony code. There is no need to code or configure bindings, wrappers or interfaces.\n"} +{"id": "Pony/src-random-random-_13.txt", "contents": "A random integer in [0, 2^64)\n\"\"\"\n\nfun ref u8(): U8 =>\n\"\"\"\nA random integer in [0, 2^8)\n\"\"\"\n(next() >> 56).u8()\n\nfun ref u16(): U16 =>\n\"\"\"\nA random integer in [0, 2^16)\n\"\"\"\n(next() >> 48).u16()\n\nfun ref u32(): U32 =>\n\"\"\"\nA random integer in [0, 2^32)\n\"\"\"\n(next() >> 32).u32()"} +{"id": "Pony/src-collections-list-_88.txt", "contents": "end\nend\nl\n\nfun reverse(): List[this->A!]^ =>\n\"\"\"\nBuilds a new `List` by reversing the elements in the `List`.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.reverse() // [\"c\"; \"b\"; \"a\"]\n```\n\"\"\"\ntry\n_reverse(head()?, List[this->A!])\nelse\nList[this->A!]\nend\n\nfun _reverse(ln: this->ListNode[A], acc: List[this->A!]): List[this->A!]^ =>"} +{"id": "Pony/net-OSSockOpt-_43.txt", "contents": "fun box ipproto_pfsync()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pgm\u00b6\n[Source]\nfun box ipproto_pgm()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pigp\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_9.txt", "contents": "\nfld\u00b6\n[Source]\nFloored integer division, rounded towards negative infinity.\nfun box fld(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod\u00b6\n[Source]\nCalculate the modulo after floored integer division, rounded towards negative infinity (fld)."} +{"id": "Pony/src-collections-persistent-map-_0.txt", "contents": "\n\n\n\n\n\n\nmap.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/files-FileWrite-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/net-OSSockOpt-_532.txt", "contents": "fun box so_vendor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_buffer_max_size\u00b6\n[Source]\nfun box so_vm_sockets_buffer_max_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_buffer_min_size\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_404.txt", "contents": "fun box sctp_maxburst()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_maxseg\u00b6\n[Source]\nfun box sctp_maxseg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_max_burst\u00b6\n[Source]"} +{"id": "Pony/builtin-Iterator-_3.txt", "contents": "Public Functions\u00b6\nhas_next\u00b6\n[Source]\nReturns true if this Iterator is not yet exhausted.\nThat means that a value returned from a subsequent call to next()\nis a valid part of this iterator.\nReturns false if this Iterator is exhausted.\nThe behavior of next() after this function returned false is undefined,\nit might throw an error or return values which are not part of this Iterator.\nfun ref has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nGenerate the next value."} +{"id": "Pony/net-OSSockOpt-_237.txt", "contents": "fun box ip_recvttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_retopts\u00b6\n[Source]\nfun box ip_retopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_router_alert\u00b6\n[Source]"} +{"id": "Pony/src-builtin-stdin-_17.txt", "contents": "\"\"\"\ntry\nlet notify = _notify as InputNotify\nvar sum: USize = 0\n\nwhile true do\nlet chunk_size = _chunk_size\nvar data = recover Array[U8] .> undefined(chunk_size) end\n\nlet len = @pony_os_stdin_read(data.cpointer(), data.size())\n\nmatch len\n| -1 =>\n// Error, possibly would block. Try again.\nreturn true\n| 0 =>\n// EOF. Close everything, stop reading.\n_close_event()\nnotify.dispose()\n_notify = None"} +{"id": "Pony/net-TCPConnection-_25.txt", "contents": ": None val\n\nReturns\u00b6\n\nNone val\n\n\ngetsockopt\u00b6\n[Source]\nGeneral wrapper for TCP sockets to the getsockopt(2) system call.\nThe caller must provide an array that is pre-allocated to be\nat least as large as the largest data structure that the kernel\nmay return for the requested option.\nIn case of system call success, this function returns the 2-tuple:\n1. The integer 0.\n2. An Array[U8] of data returned by the system call's void *\n4th argument. Its size is specified by the kernel via the\nsystem call's sockopt_len_t * 5th argument.\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of errno."} +{"id": "Pony/builtin-String-_4.txt", "contents": "\ndata: Array[U8 val] val\n\nReturns\u00b6\n\nString val^\n\n\nfrom_iso_array\u00b6\n[Source]\nCreate a string from an array, reusing the underlying data pointer\nnew iso from_iso_array(\ndata: Array[U8 val] iso)\n: String iso^\n\nParameters\u00b6\n\ndata: Array[U8 val] iso\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_57.txt", "contents": "\nfun fld_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.fld_partial[I16, U16](this, y)?\n\nfun mod_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.mod_partial[I16, U16](this, y)?\n\n\nprimitive I32 is SignedInteger[I32, U32]\nnew create(value: I32) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.i32()\n\nnew min_value() => -0x8000_0000\nnew max_value() => 0x7FFF_FFFF\n\nfun abs(): U32 => if this < 0 then (-this).u32() else this.u32() end\nfun bit_reverse(): I32 => @\"llvm.bitreverse.i32\"(this.u32()).i32()\nfun bswap(): I32 => @\"llvm.bswap.i32\"(this.u32()).i32()\nfun popcount(): U32 => @\"llvm.ctpop.i32\"(this.u32())\nfun clz(): U32 => @\"llvm.ctlz.i32\"(this.u32(), false)"} +{"id": "Pony/src-buffered-reader-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-Real-_33.txt", "contents": "USize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-ossockopt-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/net-NetAddress-_8.txt", "contents": "\nU32 val\n\n\nipv4_addr\u00b6\n[Source]\nReturns IPV4 address (_addr field in the class) if ip4() is True.\nIf ip4() is False then the contents are invalid.\nfun box ipv4_addr()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nipv6_addr\u00b6\n[Source]\nReturns IPV6 address as the 4-tuple (say a).\na._1 = _addr1 // Bits 0-32 of the IPv6 address in host byte order."} +{"id": "Pony/builtin-UnsignedInteger-_9.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/src-process-_process-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/format-FormatExp-_0.txt", "contents": "\n\n\n\n\n\n\nFormatExp\u00b6\n[Source]\nprimitive val FormatExp is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_585.txt", "contents": "fun box tcp_notsent_lowat()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_pcap_in\u00b6\n[Source]\nfun box tcp_pcap_in()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_pcap_out\u00b6\n[Source]"} +{"id": "Pony/cli-ArgSpec-_10.txt", "contents": "fun box deb_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/term-ANSI-_2.txt", "contents": "\ndown\u00b6\n[Source]\nMove the cursor down n lines. 0 is the same as 1.\nfun box down(\nn: U32 val = 0)\n: String val\n\nParameters\u00b6\n\nn: U32 val = 0\n\nReturns\u00b6\n\nString val\n\n\nright\u00b6\n[Source]\nMove the cursor right n columns. 0 is the same as 1."} +{"id": "Pony/pony_check-ASCIINUL-_2.txt", "contents": "\nthat: ASCIINUL val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIINUL val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIINUL val\n\nReturns\u00b6\n"} +{"id": "Pony/process--index-_0.txt", "contents": "\n\n\n\n\n\n\nProcess package\u00b6\nThe Process package provides support for handling Unix style processes.\nFor each external process that you want to handle, you need to create a\nProcessMonitor and a corresponding ProcessNotify object. Each\nProcessMonitor runs as it own actor and upon receiving data will call its\ncorresponding ProcessNotify's method.\nExample program\u00b6\nThe following program will spawn an external program and write to it's\nSTDIN. Output received on STDOUT of the child process is forwarded to the\nProcessNotify client and printed.\nuse \"backpressure\"\nuse \"process\"\nuse \"files\""} +{"id": "Pony/builtin-SignedInteger-_53.txt", "contents": "ULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-runtime_options-_9.txt", "contents": "\nvar ponynoscale: Bool = false\n\"\"\"\nDon't scale down the scheduler threads.\nSee --ponymaxthreads on how to specify the number of threads explicitly.\nCan't be used with --ponyminthreads.\n\"\"\"\n\nvar ponysuspendthreshold: U32 = 0\n\"\"\"\nAmount of idle time before a scheduler thread suspends itself to minimize\nresource consumption (max 1000 ms, min 1 ms).\nDefaults to 1 ms.\n\"\"\"\n\nvar ponycdinterval: U32 = 100\n\"\"\"\nRun cycle detection every N ms (max 1000 ms, min 10 ms).\nDefaults to 100 ms.\n\"\"\""} +{"id": "Pony/builtin-AsioEvent-_2.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nflags: U32 val\n\nReturns\u00b6\n\nBool val\n\n\nwriteable\u00b6\n[Source]\nReturns true if the flags contain the writeable flag.\nfun box writeable(\nflags: U32 val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/as_3.txt", "contents": "`as` can also be used to get a more specific type of an object from an alias to it that is an interface or a trait. Let's say, for example, that you have a library for doing things with furry, rodent-like creatures. It provides a `Critter` interface which programmers can then use to create specific types of critters.\n\n```pony\ninterface Critter\nfun wash(): String\n```\n\nThe programmer uses this library to create a `Wombat` and a `Capybara` class. But the `Capybara` class provides a new method, `swim()`, that is not part of the `Critter` class. The programmer wants to store all of the critters in an array, in order to carry out actions on groups of critters. Now assume that when capybaras finish washing they want to go for a swim. The programmer can accomplish that by using `as` to attempt to use each `Critter` object in the `Array[Critter]` as a `Capybara`. If this fails because the `Critter` is not a `Capybara`, then an error is raised; the program can swallow this error and go on to the next item.\n\n```pony\ninterface Critter\nfun wash(): String\n\nclass Wombat is Critter\nfun wash(): String => \"I'm a clean wombat!\"\n\nclass Capybara is Critter\nfun wash(): String => \"I feel squeaky clean!\"\nfun swim(): String => \"I'm swimming like a fish!\"\n"} +{"id": "Pony/src-builtin-real-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/collections-MinHeapPriority-_1.txt", "contents": "new val create()\n: MinHeapPriority[A] val^\n\nReturns\u00b6\n\nMinHeapPriority[A] val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nx: A,\ny: A)\n: Bool val\n\nParameters\u00b6\n\nx: A\ny: A"} +{"id": "Pony/src-collections-set-_28.txt", "contents": "(size() < that.size()) and (this <= that)\n\nfun le(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns true if every element in this is also in that.\n\"\"\"\ntry\nfor value in values() do\nthat(value)?\nend\ntrue\nelse\nfalse\nend\n\nfun gt(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns true if every element in that is also in this, and this has more\nelements than that.\n\"\"\""} +{"id": "Pony/files-FileRename-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileRename val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I128-_55.txt", "contents": "U128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-int_properties-_13.txt", "contents": "class CommutativeMultiplicationProperty is IntPairProperty\nfun name(): String => \"commutativity/mul\"\n\nfun int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)? =>\nh.assert_eq[T](x * y, y * x)\n```\n\"\"\"\nfun gen(): Generator[IntPairPropertySample] =>\nGenerators.map3[U8, U128, U128, IntPairPropertySample](\nGenerators.u8(),\nGenerators.u128(),\nGenerators.u128(),\n{(choice, int1, int2) => IntPairPropertySample(choice, int1, int2) })\n\nfun ref property(sample: IntPairPropertySample, h: PropertyHelper) ? =>\nlet x = sample.int1\nlet y = sample.int2\nmatch sample.choice % 14\n| 0 => int_property[U8](x.u8(), y.u8(), h)?\n| 1 => int_property[U16](x.u16(), y.u16(), h)?"} +{"id": "Pony/src-promises-promise-_26.txt", "contents": "returns `Promise[B]`.\n\nWhy is `flatten_next` valuable given that next could take a `B` that is of\na type like `Promise[String]`? Let's start with some code to demonstrate the\nproblem that arises when returning `Promise[Promise[B]]` from `next`.\n\nLet's say we have a library for accessing the GitHub REST API:\n\n```pony\nclass GitHub\nnew create(personal_access_token: String)\n\nfun get_repo(repo: String): Promise[Repository]\n\nclass Repository\nfun get_issue(number: I64): Promise[Issue]\n\nclass Issue\nfun title(): String\n```"} +{"id": "Pony/src-net-net_address-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-net-ossockopt-_124.txt", "contents": "fun so_vm_sockets_peer_host_vm_id():I32 => @pony_os_sockopt_option(I32(922))\nfun so_vm_sockets_trusted():I32 => @pony_os_sockopt_option(I32(923))\nfun so_wantmore():I32 => @pony_os_sockopt_option(I32(924))\nfun so_wantoobflag():I32 => @pony_os_sockopt_option(I32(925))\nfun so_wifi_status():I32 => @pony_os_sockopt_option(I32(926))\nfun tcp6_mss():I32 => @pony_os_sockopt_option(I32(927))\nfun tcpci_flag_lossrecovery():I32 => @pony_os_sockopt_option(I32(928))\nfun tcpci_flag_reordering_detected():I32 => @pony_os_sockopt_option(I32(929))\nfun tcpci_opt_ecn():I32 => @pony_os_sockopt_option(I32(930))\nfun tcpci_opt_sack():I32 => @pony_os_sockopt_option(I32(931))\nfun tcpci_opt_timestamps():I32 => @pony_os_sockopt_option(I32(932))\nfun tcpci_opt_wscale():I32 => @pony_os_sockopt_option(I32(933))\nfun tcpf_ca_cwr():I32 => @pony_os_sockopt_option(I32(934))\nfun tcpf_ca_disorder():I32 => @pony_os_sockopt_option(I32(935))\nfun tcpf_ca_loss():I32 => @pony_os_sockopt_option(I32(936))\nfun tcpf_ca_open():I32 => @pony_os_sockopt_option(I32(937))\nfun tcpf_ca_recovery():I32 => @pony_os_sockopt_option(I32(938))\nfun tcpi_opt_ecn():I32 => @pony_os_sockopt_option(I32(939))\nfun tcpi_opt_ecn_seen():I32 => @pony_os_sockopt_option(I32(940))\nfun tcpi_opt_sack():I32 => @pony_os_sockopt_option(I32(941))"} +{"id": "Pony/reference-capabilities_3.txt", "contents": "## Shared mutable data is hard\n\nThe problem with concurrency is shared mutable data. If two different threads have access to the same piece of data then they might try to update it at the same time. At best this can lead to the two threads having different versions of the data. At worst the updates can interact badly resulting in the data being overwritten with garbage. The standard way to avoid these problems is to use locks to prevent data updates from happening at the same time. This causes big performance hits and is very difficult to get right, so it causes lots of bugs.\n"} +{"id": "Pony/builtin-UnsignedInteger-_61.txt", "contents": "\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_386.txt", "contents": "fun box sctp_get_assoc_id_list()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_assoc_number\u00b6\n[Source]\nfun box sctp_get_assoc_number()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_local_addresses\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-list-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/net-OSSockOpt-_0.txt", "contents": "\n\n\n\n\n\n\nOSSockOpt\u00b6\n[Source]\nConvenience functions to fetch the option level and option\nname constants (arguments #2 and #3) for the\ngetsockopt(2) and setsockopt(2) operating system calls.\nThe values of the option level and option name constants are\ntypically C preprocessor macros, e.g., #define SOMETHING 42.\nThese macro names are upper case and may contain multiple\nconsecutive underscore characters (though this is rare, for\nexample, IP_NAT__XXX). The function names in this primitive\nare derived by the C macro name and then:\n\nconverted to lower case"} +{"id": "Pony/src-builtin-float-_53.txt", "contents": "\nfun u128(): U128 =>\nif this > U128.max_value().f64() then\nreturn U128.max_value()\nelseif this < U128.min_value().f64() then\nreturn U128.min_value()\nend\n\nlet bit = bits()\nlet high = (bit >> 32).u32()\nlet ex = ((high and 0x7FF00000) >> 20) - 1023\n\nif (ex < 0) or ((high and 0x80000000) != 0) then\nreturn 0\nend\n\nvar r = ((bit and 0x000FFFFFFFFFFFFF) or 0x0010000000000000).u128()\nlet ex' = ex.u128()\n\nif ex' > 52 then"} +{"id": "Pony/files-FileMode-_3.txt", "contents": "var group_exec: Bool val\u00b6\n[Source]\ntrue if members of the owning group can execute the file.\n\nvar any_read: Bool val\u00b6\n[Source]\ntrue if every user can read the file.\n\nvar any_write: Bool val\u00b6\n[Source]\ntrue if every user can write to the file.\n\nvar any_exec: Bool val\u00b6\n[Source]\n`true if every user can execute the file.\n\nPublic Functions\u00b6\nexec\u00b6\n[Source]\nSet the executable flag for everyone."} +{"id": "Pony/src-builtin-string-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/collections-Reverse-_1.txt", "contents": "10\n8\n6\n4\n2\n\nIf dec is 0, produces an infinite series of max.\nIf dec is negative, produces a range with max as the only value.\nclass ref Reverse[optional A: (Real[A] val & (I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val))] is\nIterator[A] ref\n\nImplements\u00b6\n\nIterator[A] ref\n"} +{"id": "Pony/builtin-Integer-_44.txt", "contents": "\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n"} +{"id": "Pony/collections-List-_2.txt", "contents": "Second BOOM!\nThird BOOM!\nThe size of our first partitioned list (matches predicate): 1\nThe size of our second partitioned list (doesn't match predicate): 1\nOur matching partition elements are:\nSecond BOOM!\n\nuse \"collections\"\n\nactor Main\nnew create(env:Env) =>\n\n// Create a new empty List of type String\nlet my_list = List[String]()\n\nenv.out.print(\"A new empty list has \" + my_list.size().string() + \" nodes.\") // 0\n\n// Push a String literal onto our empty List\nmy_list.push(\"A single String\")\nenv.out.print(\"Adding one node to our empty list means it now has a size of \""} +{"id": "Pony/pony_test-TestHelper-_18.txt", "contents": "None val\n\n\ncomplete_action\u00b6\n[Source]\nMUST be called for each action expectation that was set up in a long test\nto fulfill the expectations. Any expectations that are still outstanding\nwhen the long test timeout runs out will be printed by name when it fails.\nCompleting all outstanding actions is enough to finish the test. There's no\nneed to also call the complete method when the actions are finished.\nCalling the complete method will finish the test immediately, without\nwaiting for any outstanding actions to be completed.\nfun box complete_action(\nname: String val)\n: None val\n\nParameters\u00b6\n\nname: String val\n"} +{"id": "Pony/builtin-ILong-_42.txt", "contents": "[Source]\nfun box ne(\ny: ILong val)\n: Bool val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: ILong val)\n: Bool val\n"} +{"id": "Pony/builtin-F64-_35.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n"} +{"id": "Pony/net-OSSockOpt-_447.txt", "contents": "fun box sctp_recvnxtinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_recvrcvinfo\u00b6\n[Source]\nfun box sctp_recvrcvinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_recv_rwnd_logging_enable\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-builtin-signed-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-pony_check-pony_check-_12.txt", "contents": "# Integration into PonyTest\n\nThere are two ways of integrating a [Property](pony_check-Property1.md) into\n[PonyTest](pony_test--index.md):\n\n1. In order to pass your Property to the PonyTest engine, you need to wrap it\ninside a [Property1UnitTest](pony_check-Property1UnitTest.md).\n\n```pony\nactor Main is TestList\nnew create(env: Env) => PonyTest(env, this)\n\nfun tag tests(test: PonyTest) =>\ntest(Property1UnitTest[String](MyStringProperty))\n```\n\n2. Run as many [Properties](pony_check-Property1.md) as you wish inside one\nPonyTest [UnitTest](pony_test-UnitTest.md) using the convenience function\n[PonyCheck.for_all](pony_check-PonyCheck.md#for_all) providing a\n[Generator](pony_check-Generator), the [TestHelper](pony_test-TestHelper.md)"} +{"id": "Pony/src-buffered-writer-_15.txt", "contents": "292\n293\n294\n295\n296class Writer\n\"\"\"\nA buffer for building messages.\n\n`Writer` provides an way to create byte sequences using common\ndata encodings. The `Writer` manages the underlying arrays and\nsizes. It is useful for encoding data to send over a network or\nstore in a file. Once a message has been built you can call `done()`\nto get the message's `ByteSeq`s, and you can then reuse the\n`Writer` for creating a new message.\n\nFor example, suppose we have a TCP-based network data protocol where\nmessages consist of the following:\n\n* `message_length` - the number of bytes in the message as a\nbig-endian 32-bit integer"} +{"id": "Pony/src-buffered-writer-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-Integer-_26.txt", "contents": "\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: A\n\nReturns\u00b6\n\nA\n\n"} +{"id": "Pony/src-builtin-string-_166.txt", "contents": "=>\n\"\"\"\nDetermine the base of an integer starting at the specified index.\nIf a non-0 base is given use that. If given base is 0 read the base\nspecifying prefix, if any, to detect base 2 or 16.\nIf no base is specified and no prefix is found default to decimal.\nNote that a leading 0 does NOT imply octal.\nReport the base found and the number of single-byte characters in\nthe prefix.\n\"\"\"\nif base > 0 then\nreturn (A(0).from[U8](base), 0)\nend\n\n// Determine base from prefix\nif (index + 2) >= _size then\n// Not enough characters, must be decimal\nreturn (10, 0)\nend\n"} +{"id": "Pony/files-Path-_4.txt", "contents": "next_path: String val\n\nReturns\u00b6\n\nString val\n\n\nclean\u00b6\n[Source]\nReplace multiple separators with a single separator.\nConvert / to the OS separator.\nRemove instances of . from the path.\nRemove instances of .. and the preceding path element from the path.\nThe result will have no trailing slash unless it is a root directory.\nIf the result would be empty, \".\" will be returned instead.\nfun box clean(\npath: String val)\n: String val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-Generators-_19.txt", "contents": "\nGenerator[T] box ?\n\n\nzip2[T1: T1, T2: T2]\u00b6\n[Source]\nZip two generators into a generator of a 2-tuple\ncontaining the values generated by both generators.\nfun box zip2[T1: T1, T2: T2](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box)\n: Generator[(T1 , T2)] box\n\nParameters\u00b6\n\ngen1: Generator[T1] box\ngen2: Generator[T2] box\n\nReturns\u00b6\n"} +{"id": "Pony/net-TCPListenNotify-_4.txt", "contents": "Returns\u00b6\n\nTCPConnectionNotify iso^ ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_102.txt", "contents": "end)\n\nfun ref step_by(n: USize = 1): Iter[A!] =>\n\"\"\"\nReturn an iterator that yields every `n`th element of the\noriginal iterator. n == 0 is treated like n == 1 rather than an error.\n"} +{"id": "Pony/itertools-Iter-_6.txt", "contents": "\n42\nfun ref next_or(\ndefault: A)\n: A\n\nParameters\u00b6\n\ndefault: A\n\nReturns\u00b6\n\nA\n\n\nmap_stateful[B: B]\u00b6\n[Source]\nAllows stateful transformation of each element from the iterator, similar\nto map.\nfun ref map_stateful[B: B]("} +{"id": "Pony/src-pony_check-property_helper-_25.txt", "contents": "\nMirrors the [TestHelper](pony_test-TestHelper.md) API as closely as possible.\n\nContains assertion functions and functions for completing asynchronous\nproperties, for expecting and completing or failing actions.\n\nInternally a new PropertyHelper will be created for each call to\na property with a new sample and also for every shrink run.\nSo don't assume anything about the identity of the PropertyHelper inside of\nyour Properties.\n\nThis class is `val` by default so it can be safely passed around to other\nactors.\n\nIt exposes the process [Env](builtin-Env.md) as public `env` field in order to\ngive access to the root authority and other stuff.\n\"\"\"\nlet _runner: _IPropertyRunner\nlet _run_notify: _PropertyRunNotify\nlet _run: _Round"} +{"id": "Pony/src-itertools-iter-_82.txt", "contents": "### Example\n\n```pony\nIter[String]([\"alpha\"; \"beta\"; \"gamma\"])\n.flat_map[U8]({(s: String): Iterator[U8] => s.values() })\n```\n`a l p h a b e t a g a m m a`\n\"\"\"\nIter[B](\nobject is Iterator[B]\nvar _iterb: Iterator[B] =\ntry f(_iter.next()?)? else _EmptyIter[B] end\n\nfun ref has_next(): Bool =>\nif _iterb.has_next() then true\nelse\nif _iter.has_next() then\ntry\n_iterb = f(_iter.next()?)?\nhas_next()"} +{"id": "Pony/builtin-Array-_40.txt", "contents": "\nunshift\u00b6\n[Source]\nAdd an element to the beginning of the array.\nfun ref unshift(\nvalue: A)\n: None val\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nNone val\n\n\nshift\u00b6\n[Source]\nRemove an element from the beginning of the array."} +{"id": "Pony/builtin-I32-_45.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_48.txt", "contents": "that: Generators val)\n: Bool val\n\nParameters\u00b6\n\nthat: Generators val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Generators val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-USize-_47.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/builtin-Greater-_3.txt", "contents": "Parameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-persistent-Vec-_0.txt", "contents": "\n\n\n\n\n\n\nVec[A: Any #share]\u00b6\n[Source]\nA persistent vector based on the Hash Array Mapped Trie from 'Ideal Hash\nTrees' by Phil Bagwell.\nclass val Vec[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Vec[A] val^\n\nReturns\u00b6"} +{"id": "Pony/src-process-process_monitor-_34.txt", "contents": "\nbe writev(data: ByteSeqIter) =>\n\"\"\"\nWrite an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\n_write_final(bytes)\nend\n\nbe done_writing() =>\n\"\"\"\nSet the _done_writing flag to true. If _pending is empty we can close the\n_stdin pipe.\n\"\"\"\n_done_writing = true\nBackpressure.release(_backpressure_auth)\nif _pending.size() == 0 then\n_stdin.close_near()\nend\n"} +{"id": "Pony/files-FileLines-_1.txt", "contents": "Iterator[String iso^] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a FileLines instance on a given file.\nThis instance returns lines from the position of the given file\nat the time this constructor is called. Later manipulation of the file position\nis not accounted for. As a result iterating with this class will always return the full\nfile content without gaps or repeated lines.\nmin_read_size determines the minimum amount of bytes to read from the file\nin one go. This class keeps track of the line lengths in the current file\nand uses the length of the last line as amount of bytes to read next, but it\nwill never read less than min_read_size.\nnew ref create(\nfile: File ref,\nmin_read_size: USize val = 256)\n: FileLines ref^\n"} +{"id": "Pony/src-builtin-env-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104use @pony_os_stdin_setup[Bool]()\nuse @pony_os_stdout_setup[None]()\n\nclass val Env\n\"\"\"\nAn environment holds the command line and other values injected into the\nprogram by default by the runtime.\n\"\"\""} +{"id": "Pony/src-pony_test-pony_test-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/random-Random-_7.txt", "contents": "\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nA random integer in [-2^15, 2^15)\nfun ref i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nA random integer in [-2^31, 2^31)"} +{"id": "Pony/examples_4.txt", "contents": "# Pass an Array of values to FFI\n\n```pony\nuse @eglChooseConfig[U32](disp: Pointer[_EGLDisplayHandle], attrs: Pointer[U16] tag,\nconfig: Pointer[_EGLConfigHandle], config_size: U32, num_config: Pointer[U32])\n\nprimitive _EGLConfigHandle\nlet a = Array[U16](8)\na.push(0x3040)\na.push(0x4)\na.push(0x3033)\na.push(0x4)\na.push(0x3022)\na.push(0x8)\na.push(0x3023)\na.push(0x8)\na.push(0x3024)\nlet config = Pointer[_EGLConfigHandle]\nif @eglChooseConfig(e_dpy, a.cpointer(), config, U32(1), Pointer[U32]) == 0 then\nenv.out.print(\"eglChooseConfig failed\")"} +{"id": "Pony/builtin-ULong-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIINonPrintable-_0.txt", "contents": "\n\n\n\n\n\n\nASCIINonPrintable\u00b6\n[Source]\nprimitive val ASCIINonPrintable\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIINonPrintable val^\n\nReturns\u00b6\n\nASCIINonPrintable val^"} +{"id": "Pony/src-builtin-string-_91.txt", "contents": "An empty string. Enough space for len bytes is reserved.\n\"\"\"\n_size = 0\n_alloc = len.min(len.max_value() - 1) + 1\n_ptr = Pointer[U8]._alloc(_alloc)\n_set(0, 0)\n\nnew val from_array(data: Array[U8] val) =>\n\"\"\"\nCreate a string from an array, reusing the underlying data pointer.\n\"\"\"\n_size = data.size()\n_alloc = data.space()\n_ptr = data.cpointer()._unsafe()\n\nnew iso from_iso_array(data: Array[U8] iso) =>\n\"\"\"\nCreate a string from an array, reusing the underlying data pointer\n\"\"\"\n_size = data.size()"} +{"id": "Pony/net-OSSockOpt-_279.txt", "contents": "fun box netlink_listen_all_nsid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_list_memberships\u00b6\n[Source]\nfun box netlink_list_memberships()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_netfilter\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_42.txt", "contents": "fun box op_and(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: U128 val)\n: U128 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_51.txt", "contents": "1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031"} +{"id": "Pony/ponycheck_0.txt", "contents": "# Testing with `PonyCheck`\n\nPonyCheck is Pony's property based testing framework. It is designed to work seamlessly with [PonyTest](ponytest.md), Pony's unit testing framework. How is property based testing different than unit testing? Why does Pony include both?\n\nIn traditional unit testing, it is the duty and burden of the developer to provide and craft meaningful input examples for the unit under test (be it a class, a function or whatever) and check if some output conditions hold. This is a tedious and error-prone activity.\n\nProperty based testing leaves generation of test input samples to the testing engine which generates random examples taken from a description how to do so, so called `Generators`. The developer needs to define a `Generator` and describe the condition that should hold for each and every input sample.\n\nProperty based testing first came up as [`QuickCheck`](http://www.cse.chalmers.se/~rjmh/QuickCheck/) in Haskell. It has the nice property of automatically inferring `Generators` from the type of the property parameter, the test input sample.\n\nPonyCheck is heavily inspired by QuickCheck and other great property based testing libraries, namely:\n\n* [Hypothesis](https://github.com/HypothesisWorks/hypothesis-python)\n* [Theft](https://github.com/silentbicycle/theft)\n* [ScalaCheck](https://www.scalacheck.org/)\n"} +{"id": "Pony/net-OSSockOpt-_26.txt", "contents": "fun box ipproto_igrp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_il\u00b6\n[Source]\nfun box ipproto_il()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_inlsp\u00b6\n[Source]"} +{"id": "Pony/src-random-xorshift-_0.txt", "contents": "\n\n\n\n\n\n\nxorshift.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-time-nanos-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25primitive Nanos\n\"\"\"\nCollection of utility functions for converting various durations of time\nto nanoseconds, for passing to other functions in the time package.\n\"\"\"\nfun from_seconds(t: U64): U64 =>\nt * 1_000_000_000"} +{"id": "Pony/src-pony_bench-_runner-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-U16-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-files-file_info-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_listen_notify-_2.txt", "contents": "32\n33\n34\n35\n36\n37interface TCPListenNotify\n\"\"\"\nNotifications for TCP listeners.\n\nFor an example of using this class, please see the documentation for the\n`TCPListener` actor.\n\"\"\"\nfun ref listening(listen: TCPListener ref) =>\n\"\"\"\nCalled when the listener has been bound to an address.\n\"\"\"\nNone\n\nfun ref not_listening(listen: TCPListener ref)\n\"\"\""} +{"id": "Pony/builtin-U128-_64.txt", "contents": "U128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-randomness-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/capability-subtyping_0.txt", "contents": "# Capability Subtyping\n"} +{"id": "Pony/src-files-file-_37.txt", "contents": "else\nerr\nend\n\nprimitive OpenFile\n\"\"\"\nOpen a File for read only.\n\"\"\"\nfun apply(from: FilePath): (File | FileErrNo) =>\nlet file = File.open(from)\nlet err = file.errno()\n\nmatch err\n| FileOK => file\nelse\nerr\nend\n\nclass File\n\"\"\""} +{"id": "Pony/time-Nanos-_5.txt", "contents": "from_micros_f\u00b6\n[Source]\nfun box from_micros_f(\nt: F64 val)\n: U64 val\n\nParameters\u00b6\n\nt: F64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfrom_wall_clock\u00b6\n[Source]\nfun box from_wall_clock(\nwall: (I64 val , I64 val))\n: U64 val"} +{"id": "Pony/src-process-_process-_42.txt", "contents": "if h_process == 0 then\nmatch error_code\n| _ERRORBADEXEFORMAT() => ProcessError(ExecveError)\n| _ERRORDIRECTORY() =>\nlet wdirpath =\nmatch wdir\n| let wdir_fp: FilePath => wdir_fp.path\n| None => \"?\"\nend\nProcessError(ChdirError, \"Failed to change directory to \"\n+ wdirpath)\nelse\nlet message = String.from_cstring(error_message)\nProcessError(ForkError, recover message.clone() end)\nend\nend\nelse\ncompile_error \"unsupported platform\"\nend\n"} +{"id": "Pony/capsicum-Cap-_3.txt", "contents": "fun box seek_tell()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nseek\u00b6\n[Source]\nfun box seek()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npread\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_383.txt", "contents": "fun box sctp_frag_level_1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_frag_level_2\u00b6\n[Source]\nfun box sctp_frag_level_2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_from_middle_box\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_5.txt", "contents": "\nImplements\u00b6\n\nSeq[A] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate an array with zero elements, but space for len elements.\nnew ref create(\nlen: USize val = 0)\n: Array[A] ref^\n\nParameters\u00b6\n\nlen: USize val = 0\n\nReturns\u00b6\n"} +{"id": "Pony/src-bureaucracy-registrar-_0.txt", "contents": "\n\n\n\n\n\n\nregistrar.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-ossockopt-_108.txt", "contents": "fun sctp_ecn_cwr():I32 => @pony_os_sockopt_option(I32(602))\nfun sctp_ecn_echo():I32 => @pony_os_sockopt_option(I32(603))\nfun sctp_ecn_supported():I32 => @pony_os_sockopt_option(I32(604))\nfun sctp_enable_change_assoc_req():I32 => @pony_os_sockopt_option(I32(605))\nfun sctp_enable_reset_assoc_req():I32 => @pony_os_sockopt_option(I32(606))\nfun sctp_enable_reset_stream_req():I32 => @pony_os_sockopt_option(I32(607))\nfun sctp_enable_stream_reset():I32 => @pony_os_sockopt_option(I32(608))\nfun sctp_enable_value_mask():I32 => @pony_os_sockopt_option(I32(609))\nfun sctp_established():I32 => @pony_os_sockopt_option(I32(610))\nfun sctp_event():I32 => @pony_os_sockopt_option(I32(611))\nfun sctp_events():I32 => @pony_os_sockopt_option(I32(612))\nfun sctp_explicit_eor():I32 => @pony_os_sockopt_option(I32(613))\nfun sctp_flight_logging_enable():I32 => @pony_os_sockopt_option(I32(614))\nfun sctp_forward_cum_tsn():I32 => @pony_os_sockopt_option(I32(615))\nfun sctp_fragment_interleave():I32 => @pony_os_sockopt_option(I32(616))\nfun sctp_frag_level_0():I32 => @pony_os_sockopt_option(I32(617))\nfun sctp_frag_level_1():I32 => @pony_os_sockopt_option(I32(618))\nfun sctp_frag_level_2():I32 => @pony_os_sockopt_option(I32(619))\nfun sctp_from_middle_box():I32 => @pony_os_sockopt_option(I32(620))\nfun sctp_fr_logging_enable():I32 => @pony_os_sockopt_option(I32(621))"} +{"id": "Pony/src-cli-command_parser-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-Integer-_18.txt", "contents": "[Source]\nUnsafe operation.\nIf the operation overflows, the result is undefined.\nfun box neg_unsafe()\n: A\n\nReturns\u00b6\n\nA\n\n\naddc\u00b6\n[Source]\nAdd y to this integer and return the result and a flag indicating overflow.\nfun box addc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n"} +{"id": "Pony/src-buffered-writer-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-builtin-string-_0.txt", "contents": "\n\n\n\n\n\n\nstring.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/cli--index-_2.txt", "contents": "In addition, there is a string_seq type that accepts string values from the\ncommand line and collects them into a sequence which can then be retrieved as\na ReadSeq[String] using the string_seq() accessor function.\nSome specific details:\n\n\nbool Options: have a default value of 'true' if no value is given. That is,\n-f is equivalent to -f=true.\n\n\nstring_seq Options: the option prefix has to be used each time, like:\n--file=f1 --file=f2 --file=f3 with the results being collected into\na single sequence.\n\n\nstring_seq Args: there is no way to indicate termination, so a string_seq\nArg should be the last arg for a command, and will consume all remaining\ncommand line arguments.\n\n"} +{"id": "Pony/src-builtin-array-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/builtin-I8-_32.txt", "contents": "fun box rem_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_listen_notify-_0.txt", "contents": "\n\n\n\n\n\n\ntcp_listen_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-backpressure-backpressure-_6.txt", "contents": " Backpressure Package\n\nThe Backpressure package allows Pony programmers to participate in Pony's\nruntime backpressure system. The goal of the backpressure system is to prevent\nan actor's mailbox from growing at an unbounded rate.\n\nAt a high level, the runtime backpressure system works by adjusting the\nscheduling of actors. When an actor becomes overloaded, the Pony runtime will\ndeprioritize scheduling the actors that are sending to it. This change in\nscheduling allows the overloaded actor to catch up.\n\nThe Pony runtime can detect overloading based on message queue size. However,\nthe overloading of some types of actors is harder to detect. Let's take the\ncase of actors like `TCPConnection`.\n\n`TCPConnection` manages a socket for sending data to and receiving data from\nanother process. TCP connections can experience backpressure from outside\nour Pony program that prevents them from sending. There's no way for the Pony\nruntime to detect this, so intervention by the programmer is needed.\n"} +{"id": "Pony/src-builtin-unsigned-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/5_structs_7.txt", "contents": "# We'll see structs again\n\nStructs play an important role in Pony's interactions with code written using C. We'll see them again in [C-FFI section](/c-ffi/index.md) of the tutorial. We probably won't see too much about structs until then.\n"} +{"id": "Pony/builtin-Array-_25.txt", "contents": "\nReturns\u00b6\n\nA^ ?\n\n\ntruncate\u00b6\n[Source]\nTruncate an array to the given length, discarding excess elements. If the\narray is already smaller than len, do nothing.\nfun ref truncate(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-signed-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-collections-persistent-list-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-builtin-string-_84.txt", "contents": "1672\n1673\n1674\n1675\n1676\n1677\n1678\n1679\n1680\n1681\n1682\n1683\n1684\n1685\n1686\n1687\n1688\n1689\n1690\n1691"} +{"id": "Pony/src-process-_process-_36.txt", "contents": "\"\"\"\nwhile (@dup2(oldfd, newfd) < 0) do\nif @pony_os_errno() == _EINTR() then\ncontinue\nelse\n@_exit(I32(-1))\nend\nend\n\nfun kill() =>\n\"\"\"\nTerminate the process, first trying SIGTERM and if that fails, try SIGKILL.\n\"\"\"\nif pid > 0 then\n// Try a graceful termination\nif @kill(pid, Sig.term()) < 0 then\nmatch @pony_os_errno()\n| _EINVAL() => None // Invalid argument, shouldn't happen but\n// tryinng SIGKILL isn't likely to help.\n| _ESRCH() => None // No such process, child has terminated"} +{"id": "Pony/collections-List-_3.txt", "contents": "+ my_list.size().string() + \".\") // 1\n\n// Get the first element of our List\ntry env.out.print(\"The first (index 0) node has the value: \"\n+ my_list.index(0)?()?.string()) end // A single String\n\n// Create a second List from a single String literal\nlet my_second_list = List[String].unit(\"Another String\")\n\n// Append the second List to the first\nmy_list.append_list(my_second_list)\nenv.out.print(\"A list created by appending our second single-node list onto our first has size: \"\n+ my_list.size().string()) // 2\nenv.out.print(\"The List nodes of our first list are now:\")\nfor n in my_list.values() do\nenv.out.print(\"\\t\" + n.string())\nend\n// NOTE: this _moves_ the elements so second_list consequently ends up empty\nenv.out.print(\"Append *moves* the nodes from the second list so that now has \"\n+ my_second_list.size().string() + \" nodes.\") // 0"} +{"id": "Pony/net-TCPListener-_2.txt", "contents": "AsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nListens for both IPv4 and IPv6 connections.\nnew tag create(\nauth: TCPListenAuth val,\nnotify: TCPListenNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nlimit: USize val = 0,\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)"} +{"id": "Pony/src-builtin-unsigned-_83.txt", "contents": "ifdef native128 then\nthis % y\nelse\n(let q, let r) = divrem(y)\nr\nend\n\nfun mul_unsafe(y: U128): U128 =>\n\"\"\"\nUnsafe operation.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis *~ y\nelse\nthis * y\nend\n\nfun divrem_unsafe(y: U128): (U128, U128) =>\n\"\"\""} +{"id": "Pony/8_sugar_0.txt", "contents": "# Sugar\n\nPony allows you to omit certain small details from your code and will put them back in for you. This is done to help make your code less cluttered and more readable. Using sugar is entirely optional, you can always write out the full version if you prefer.\n"} +{"id": "Pony/pony_check-Generators-_6.txt", "contents": "\ngen: Generator[T] box\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[S] box\n\n\narray_of[T: T]\u00b6\n[Source]\nfun box array_of[T: T](\ngen: Generator[T] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[Array[T] ref] box\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-array-_78.txt", "contents": "Copy len elements from src(src_idx) to this(dst_idx).\nOnly works for Array[U8].\n\"\"\"\nreserve(dst_idx + len)\nsrc._ptr._offset(src_idx)._copy_to(_ptr._convert[U8]()._offset(dst_idx), len)\n\nif _size < (dst_idx + len) then\n_size = dst_idx + len\nend\n\nfun copy_to(\ndst: Array[this->A!],\nsrc_idx: USize,\ndst_idx: USize,\nlen: USize)\n=>\n\"\"\"\nCopy len elements from this(src_idx) to dst(dst_idx).\n\"\"\"\ndst.reserve(dst_idx + len)"} +{"id": "Pony/src-pony_check-for_all-_6.txt", "contents": "let _gen: Generator[T] val\nlet _helper: TestHelper\n\nnew create(gen': Generator[T] val, testHelper: TestHelper) =>\n_gen = gen'\n_helper = testHelper\n\nfun ref apply(prop: {(T, PropertyHelper) ?} val) ? =>\n\"\"\"execute\"\"\"\nProperty1UnitTest[T](\nobject iso is Property1[T]\nfun name(): String => \"\"\n\nfun gen(): Generator[T] => _gen\n\nfun ref property(arg1: T, h: PropertyHelper) ? =>\nprop(consume arg1, h)?\nend\n).apply(_helper)?\n"} +{"id": "Pony/5_methods_11.txt", "contents": "# Named arguments\n\nSo far, when calling methods we have always given all the arguments in order. This is known as using __positional__ arguments. However, we can also specify the arguments in any order by specifying their names. This is known as using __named__ arguments.\n\nTo call a method using named arguments the `where` keyword is used, followed by the named arguments and their values.\n\n```pony\nclass Coord\nvar _x: U32\nvar _y: U32\n\nnew create(x: U32 = 0, y: U32 = 0) =>\n_x = x\n_y = y\n\nclass Bar\nfun f() =>\nvar a: Coord = Coord.create(3, 4) // Contains (3, 4)\nvar b: Coord = Coord.create(where y = 4, x = 3) // Contains (3, 4)\n```"} +{"id": "Pony/builtin-I128-_22.txt", "contents": "[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nf32_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n"} +{"id": "Pony/builtin-OutStream-_3.txt", "contents": "be flush()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/random-MT-_12.txt", "contents": "\nF64 val\n\n\nshuffle[A: A]\u00b6\nfun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n"} +{"id": "Pony/collections-persistent-Cons-_4.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nis_non_empty\u00b6\n[Source]\nReturns a Bool indicating if the list is non-empty.\nfun box is_non_empty()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhead\u00b6\n[Source]\nReturns the head of the list."} +{"id": "Pony/src-collections-persistent-list-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-files-file-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-term-readline-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/debug-DebugErr-_2.txt", "contents": "fun box ne(\nthat: DebugErr val)\n: Bool val\n\nParameters\u00b6\n\nthat: DebugErr val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_94.txt", "contents": "fun box icmp_dest_unreach()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_echo\u00b6\n[Source]\nfun box icmp_echo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_echoreply\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_443.txt", "contents": "fun box sctp_pktdrop_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pluggable_cc\u00b6\n[Source]\nfun box sctp_pluggable_cc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pluggable_ss\u00b6\n[Source]"} +{"id": "Pony/buffered--index-_1.txt", "contents": "writer.u32_be(42)\nwriter.f32_be(3.14)\n\nlet b = recover iso Array[U8] end\n\nfor chunk in writer.done().values() do\nb.append(chunk)\nend\n\nreader.append(consume b)\n\ntry\nenv.out.print(reader.u32_be()?.string()) // prints 42\nenv.out.print(reader.f32_be()?.string()) // prints 3.14\nend\n\nPublic Types\u00b6\n\nclass Reader\nclass Writer"} +{"id": "Pony/src-collections-persistent-map-_14.txt", "contents": "fun val get_or_else(k: K, alt: val->V): val->V =>\n\"\"\"\nGet the value associated with provided key if present. Otherwise,\nreturn the provided alternate value.\n\"\"\"\ntry\nmatch _root(0, H.hash(k).u32(), k)?\n| let v: V => v\nelse alt\nend\nelse\nalt // should not occur\nend\n\nfun val contains(k: K): Bool =>\n\"\"\"\nCheck whether the node contains the provided key.\n\"\"\"\ntry _root(0, H.hash(k).u32(), k)? isnt None\nelse false // should not occur"} +{"id": "Pony/builtin-ILong-_6.txt", "contents": "\nULong val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nclz_unsafe\u00b6\n[Source]\nfun box clz_unsafe()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/random-XorOshiro128StarStar-_0.txt", "contents": "\n\n\n\n\n\n\nXorOshiro128StarStar\u00b6\n[Source]\nThis is an implementation of xoroshiro128**, as detailed at:\nhttp://xoshiro.di.unimi.it/\nThis Rand implementation is slightly slower than XorOshiro128Plus\nbut does not exhibit \"mild dependencies in Hamming weights\" (the lower four bits might fail linearity tests).\nclass ref XorOshiro128StarStar is\nRandom ref\n\nImplements\u00b6\n\nRandom ref\n"} +{"id": "Pony/src-net-ossockopt-_128.txt", "contents": "fun tcp_keepidle():I32 => @pony_os_sockopt_option(I32(1002))\nfun tcp_keepinit():I32 => @pony_os_sockopt_option(I32(1003))\nfun tcp_keepintvl():I32 => @pony_os_sockopt_option(I32(1004))\nfun tcp_linger2():I32 => @pony_os_sockopt_option(I32(1005))\nfun tcp_maxburst():I32 => @pony_os_sockopt_option(I32(1006))\nfun tcp_maxhlen():I32 => @pony_os_sockopt_option(I32(1007))\nfun tcp_maxolen():I32 => @pony_os_sockopt_option(I32(1008))\nfun tcp_maxseg():I32 => @pony_os_sockopt_option(I32(1009))\nfun tcp_maxwin():I32 => @pony_os_sockopt_option(I32(1010))\nfun tcp_max_sack():I32 => @pony_os_sockopt_option(I32(1011))\nfun tcp_max_winshift():I32 => @pony_os_sockopt_option(I32(1012))\nfun tcp_md5sig():I32 => @pony_os_sockopt_option(I32(1013))\nfun tcp_md5sig_maxkeylen():I32 => @pony_os_sockopt_option(I32(1014))\nfun tcp_minmss():I32 => @pony_os_sockopt_option(I32(1015))\nfun tcp_mss():I32 => @pony_os_sockopt_option(I32(1016))\nfun tcp_mss_default():I32 => @pony_os_sockopt_option(I32(1017))\nfun tcp_mss_desired():I32 => @pony_os_sockopt_option(I32(1018))\nfun tcp_nodelay():I32 => @pony_os_sockopt_option(I32(1019))\nfun tcp_noopt():I32 => @pony_os_sockopt_option(I32(1020))\nfun tcp_nopush():I32 => @pony_os_sockopt_option(I32(1021))"} +{"id": "Pony/builtin-USize-_7.txt", "contents": "\nUSize val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/process--index-_1.txt", "contents": "\nactor Main\nnew create(env: Env) =>\n// create a notifier\nlet client = ProcessClient(env)\nlet notifier: ProcessNotify iso = consume client\n// define the binary to run\nlet path = FilePath(FileAuth(env.root), \"/bin/cat\")\n// define the arguments; first arg is always the binary name\nlet args: Array[String] val = [\"cat\"]\n// define the environment variable for the execution\nlet vars: Array[String] val = [\"HOME=/\"; \"PATH=/bin\"]\n// create a ProcessMonitor and spawn the child process\nlet sp_auth = StartProcessAuth(env.root)\nlet bp_auth = ApplyReleaseBackpressureAuth(env.root)\nlet pm: ProcessMonitor = ProcessMonitor(sp_auth, bp_auth, consume notifier,\npath, args, vars)\n// write to STDIN of the child process\npm.write(\"one, two, three\")\npm.done_writing() // closing stdin allows cat to terminate"} +{"id": "Pony/src-ini-ini_map-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42use \"collections\"\n\ntype IniMap is Map[String, Map[String, String]]\n\nprimitive IniParse\n\"\"\"\nThis is used to parse INI formatted text as a nested map of strings.\n\"\"\"\nfun apply(lines: Iterator[String]): IniMap ref^ ? =>\n\"\"\""} +{"id": "Pony/collections-MapKeys-_1.txt", "contents": "[Source]\nCreates an iterator for the given map.\nnew ref create(\nmap: M)\n: MapKeys[K, V, H, M] ref^\n\nParameters\u00b6\n\nmap: M\n\nReturns\u00b6\n\nMapKeys[K, V, H, M] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map."} +{"id": "Pony/src-collections-persistent-vec-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-files-file_path-_39.txt", "contents": "else\n0 == @symlink(path.cstring(), link_name.path.cstring())\nend\n\nfun chmod(mode: FileMode box): Bool =>\n\"\"\"\nSet the FileMode for a path.\n\"\"\"\nif not caps(FileChmod) then\nreturn false\nend\n\nlet m = mode.u32()\n\nifdef windows then\n0 == @_chmod(path.cstring(), m)\nelse\n0 == @chmod(path.cstring(), m)\nend\n"} +{"id": "Pony/8_sugar_5.txt", "contents": "# Combined create-apply\n\nIf a type has a create constructor that takes no arguments then the create and apply sugar can be used together. Just call on the type and calls to create and apply will be added. The call to create will take no arguments and the call to apply will take whatever arguments are supplied.\n\n```pony\nvar foo = Foo()\nvar bar = Bar(x, 37 where crash = false)\n```\n\nbecomes:\n\n```pony\nvar foo = Foo.create().apply()\nvar bar = Bar.create().apply(x, 37 where crash = false)\n```\n\n__What if the create has default arguments? Do I get the combined create-apply sugar if I want to use the defaults?__ The combined create-apply sugar can only be used when the `create` constructor has no arguments. If there are default arguments then this sugar cannot be used.\n"} +{"id": "Pony/src-pony_check-property-_18.txt", "contents": "fun ref property(arg1: (T1, T2, T3), h: PropertyHelper) ? =>\n(let x, let y, let z) = consume arg1\nproperty3(consume x, consume y, consume z, h)?\n\nfun ref property3(arg1: T1, arg2: T2, arg3: T3, h: PropertyHelper) ?\n\"\"\"\nA method verifying that a certain property holds for all given\n`arg1`,`arg2`, and `arg3`\nwith the help of [PropertyHelper](pony_check-PropertyHelper.md) `h`.\n\"\"\"\n\ntrait Property4[T1, T2, T3, T4] is Property1[(T1, T2, T3, T4)]\n\nfun gen1(): Generator[T1]\n\"\"\"\nThe Generator for the first argument to your `property4` method.\n\"\"\"\n\nfun gen2(): Generator[T2]\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_592.txt", "contents": "fun box tcp_s_data_in()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_s_data_out\u00b6\n[Source]\nfun box tcp_s_data_out()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_thin_dupack\u00b6\n[Source]"} +{"id": "Pony/src-process-process_notify-_4.txt", "contents": "ProcessMonitor calls this when new data is received on STDERR of the\nforked process\n\"\"\"\n\nfun ref failed(process: ProcessMonitor ref, err: ProcessError) =>\n\"\"\"\nProcessMonitor calls this if we run into errors communicating with the\nforked process.\n\"\"\"\n\nfun ref expect(process: ProcessMonitor ref, qty: USize): USize =>\n\"\"\"\nCalled when the process monitor has been told to expect a certain quantity\nof bytes. This allows nested notifiers to change the expected quantity,\nwhich allows a lower level protocol to handle any framing.\n\"\"\"\nqty\n\nfun ref dispose(process: ProcessMonitor ref, child_exit_status: ProcessExitStatus) =>\n\"\"\""} +{"id": "Pony/src-pony_check-randomness-_0.txt", "contents": "\n\n\n\n\n\n\nrandomness.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I32-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: I32 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nI32 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: I32 val^\n\nReturns\u00b6\n"} +{"id": "Pony/collections-Sort-_4.txt", "contents": "\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Sort[A, B] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Sort[A, B] val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n"} +{"id": "Pony/src-pony_bench-pony_bench-_12.txt", "contents": "_ts(Timer(\nobject iso is TimerNotify\nfun apply(timer: Timer, count: U64 = 0): Bool =>\n// signal completion of async benchmark iteration when timer fires\nc.complete()\nfalse\nend,\n_ns))\n\n```\nBy default, the results are printed to stdout like so:\n```\nBenchmark results will have their mean and median adjusted for overhead.\nYou may disable this with --noadjust.\n\nBenchmark mean median deviation iterations\nNothing 1 ns 1 ns \u00b10.87% 3000000\n_Fib(5) 12 ns 12 ns \u00b11.02% 2000000\n_Fib(10) 185 ns 184 ns \u00b11.03% 1000000\n_Fib(20) 23943 ns 23898 ns \u00b11.11% 10000"} +{"id": "Pony/src-format-prefix_spec-_1.txt", "contents": "\nprimitive PrefixDefault is PrefixSpec\n\nprimitive PrefixSpace is PrefixSpec\nprimitive PrefixSign is PrefixSpec\n\ntype PrefixNumber is\n( PrefixDefault\n| PrefixSpace\n| PrefixSign )\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/promises-Promises-_1.txt", "contents": "\n\nPublic Functions\u00b6\njoin\u00b6\n[Source]\nCreate a promise that is fulfilled when all promises in the given sequence\nare fulfilled. If any promise in the sequence is rejected then the new\npromise is also rejected. The order that values appear in the final array\nis based on when each promise is fulfilled and not the order that they are\ngiven.\nJoin three existing promises to make a fourth.\nuse \"promises\"\n\nactor Main\nnew create(env: Env) =>\n\nlet p1 = Promise[String val]\nlet p2 = Promise[String val]\nlet p3 = Promise[String val]\n"} +{"id": "Pony/builtin-I16-_18.txt", "contents": "fun box modc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-bureaucracy-custodian-_5.txt", "contents": "# Example program\n\nImagine you have a program with 3 actors that you need to shutdown when it\nreceives a TERM signal. We can set up a Custodian that knows about each\nof our actors and when a TERM signal is received, is disposed of.\n\n```pony\nuse \"bureaucracy\"\nuse \"signals\"\n\nactor Actor1\nbe dispose() => None // dispose of resources here.\n\nactor Actor2\nbe dispose() => None // dispose of resources here.\n\nactor Actor3\nbe dispose() => None // dispose of resources here.\n\nactor Main"} +{"id": "Pony/builtin-U64-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_59.txt", "contents": "1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191"} +{"id": "Pony/format-FormatOctal-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatOctal val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatOctal val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-net-ossockopt-_96.txt", "contents": "fun mcast_undefined():I32 => @pony_os_sockopt_option(I32(362))\nfun mrt_add_bw_upcall():I32 => @pony_os_sockopt_option(I32(363))\nfun mrt_add_mfc():I32 => @pony_os_sockopt_option(I32(364))\nfun mrt_add_vif():I32 => @pony_os_sockopt_option(I32(365))\nfun mrt_api_config():I32 => @pony_os_sockopt_option(I32(366))\nfun mrt_api_flags_all():I32 => @pony_os_sockopt_option(I32(367))\nfun mrt_api_support():I32 => @pony_os_sockopt_option(I32(368))\nfun mrt_assert():I32 => @pony_os_sockopt_option(I32(369))\nfun mrt_del_bw_upcall():I32 => @pony_os_sockopt_option(I32(370))\nfun mrt_del_mfc():I32 => @pony_os_sockopt_option(I32(371))\nfun mrt_del_vif():I32 => @pony_os_sockopt_option(I32(372))\nfun mrt_done():I32 => @pony_os_sockopt_option(I32(373))\nfun mrt_init():I32 => @pony_os_sockopt_option(I32(374))\nfun mrt_mfc_bw_upcall():I32 => @pony_os_sockopt_option(I32(375))\nfun mrt_mfc_flags_all():I32 => @pony_os_sockopt_option(I32(376))\nfun mrt_mfc_flags_border_vif():I32 => @pony_os_sockopt_option(I32(377))\nfun mrt_mfc_flags_disable_wrongvif():I32 => @pony_os_sockopt_option(I32(378))\nfun mrt_mfc_rp():I32 => @pony_os_sockopt_option(I32(379))\nfun mrt_pim():I32 => @pony_os_sockopt_option(I32(380))\nfun mrt_version():I32 => @pony_os_sockopt_option(I32(381))"} +{"id": "Pony/builtin-Platform-_0.txt", "contents": "\n\n\n\n\n\n\nPlatform\u00b6\n[Source]\nprimitive val Platform\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Platform val^\n\nReturns\u00b6\n\nPlatform val^"} +{"id": "Pony/src-cli-command_spec-_34.txt", "contents": "\nfun options(): Map[String, OptionSpec] box =>\n\"\"\"\nReturns a map by name of the named options of this command.\n\"\"\"\n_options\n\nfun commands(): Map[String, CommandSpec box] box =>\n\"\"\"\nReturns a map by name of the child commands of this command.\n\"\"\"\n_commands\n\nfun args(): Array[ArgSpec] box =>\n\"\"\"\nReturns an array of the positional arguments of this command.\n\"\"\"\n_args\n\nfun is_leaf(): Bool => _type is _CommandSpecLeaf"} +{"id": "Pony/src-buffered-reader-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/format-FormatBinary-_1.txt", "contents": "new val create()\n: FormatBinary val^\n\nReturns\u00b6\n\nFormatBinary val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatBinary val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatBinary val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Real-_17.txt", "contents": "\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nstring\u00b6\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/term-Readline-_7.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nright\u00b6\n[Source]\nMove right.\nfun ref right(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-promises-promise-_38.txt", "contents": "p.next[None]({(a)(p = this) => s(a, p) })\n\np'\n\nfun tag timeout(expiration: U64) =>\n\"\"\"\nReject the promise after the given expiration in nanoseconds.\n\"\"\"\nTimers.apply(Timer(\nobject iso is TimerNotify\nlet _p: Promise[A] = this\nfun ref apply(timer: Timer, count: U64): Bool =>\n_p.reject()\nfalse\nend,\nexpiration))\n\nbe _attach(attach: _IThen[A] iso) =>\n\"\"\"\nAttaches a step asynchronously. If this promise has already been fulfilled"} +{"id": "Pony/src-builtin-stdin-_11.txt", "contents": "Called when no more data will arrive on the stream.\n\"\"\"\nNone\n\ninterface tag InputStream\n\"\"\"\nAsynchronous access to some input stream.\n\"\"\"\nbe apply(notify: (InputNotify iso | None), chunk_size: USize = 32)\n\"\"\"\nSet the notifier. Optionally, also sets the chunk size, dictating the\nmaximum number of bytes of each chunk that will be passed to the notifier.\n\"\"\"\n\nbe dispose() =>\n\"\"\"\nClear the notifier in order to shut down input.\n\"\"\"\nNone\n"} +{"id": "Pony/src-math-is_prime-_7.txt", "contents": "| 80 => 419 | 81 => 421 | 82 => 431 | 83 => 433 | 84 => 439\n| 85 => 443 | 86 => 449 | 87 => 457 | 88 => 461 | 89 => 463\n| 90 => 467 | 91 => 479 | 92 => 487 | 93 => 491 | 94 => 499\n| 95 => 503 | 96 => 509 | 97 => 521 | 98 => 523 | 99 => 541\n| 100 => 547 | 101 => 557 | 102 => 563 | 103 => 569 | 104 => 571\n| 105 => 577 | 106 => 587 | 107 => 593 | 108 => 599 | 109 => 601\n| 110 => 607 | 111 => 613 | 112 => 617 | 113 => 619 | 114 => 631\n| 115 => 641 | 116 => 643 | 117 => 647 | 118 => 653 | 119 => 659\n| 120 => 661 | 121 => 673 | 122 => 677 | 123 => 683 | 124 => 691\n| 125 => 701 | 126 => 709 | 127 => 719 | 128 => 727 | 129 => 733\n| 130 => 739 | 131 => 743 | 132 => 751 | 133 => 757 | 134 => 761\n| 135 => 769 | 136 => 773 | 137 => 787 | 138 => 797 | 139 => 809\n| 140 => 811 | 141 => 821 | 142 => 823 | 143 => 827 | 144 => 829\n| 145 => 839 | 146 => 853 | 147 => 857 | 148 => 859 | 149 => 863\n| 150 => 877 | 151 => 881 | 152 => 883 | 153 => 887 | 154 => 907\n| 155 => 911 | 156 => 919 | 157 => 929 | 158 => 937 | 159 => 941\n| 160 => 947 | 161 => 953 | 162 => 967 | 163 => 971 | 164 => 977\n| 165 => 983 | 166 => 991 | 167 => 997 | 168 => 1009 | 169 => 1013\n| 170 => 1019 | 171 => 1021 | 172 => 1031 | 173 => 1033 | 174 => 1039\n| 175 => 1049 | 176 => 1051 | 177 => 1061 | 178 => 1063 | 179 => 1069"} +{"id": "Pony/builtin-NullablePointer-_2.txt", "contents": "Returns\u00b6\n\nNullablePointer[A] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nThis re-encodes the type of this from NullablePointer[A] to A, allowing\nthis to be assigned to a field of variable of type A. If this is a null\npointer, an error is raised.\nfun box apply()\n: this->A ?\n\nReturns\u00b6\n\nthis->A ?\n\n\nis_none\u00b6"} +{"id": "Pony/builtin-U16-_23.txt", "contents": "fun box fld_unsafe(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-real-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-term-readline-_31.txt", "contents": "fun ref delete(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nForward delete.\n\"\"\"\ntry\nif _cur_pos < _edit.size().isize() then\n_edit.delete(_cur_pos, 1)\nend\n\nwhile\n(_cur_pos < _edit.size().isize()) and\n((_edit.at_offset(_cur_pos)? and 0xC0) == 0x80)\ndo\n_edit.delete(_cur_pos, 1)\nend\n\n_refresh_line()\nend\n\nfun ref _clear() =>"} +{"id": "Pony/src-buffered-writer-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-UDPSocket-_18.txt", "contents": "\nsetsockopt\u00b6\n[Source]\nGeneral wrapper for UDP sockets to the setsockopt(2) system call.\nThe caller is responsible for the correct size and byte contents of\nthe option array for the requested level and option_name,\nincluding using the appropriate CPU endian byte order.\nThis function returns 0 on success, else the value of errno on\nfailure.\nUsage example:\n// listening() is a callback function for class UDPNotify\nfun ref listening(sock: UDPSocket ref) =>\nlet sb = Writer\n\nsb.u32_le(7744) // Our desired socket buffer size\nlet sbytes = Array[U8]\nfor bs in sb.done().values() do\nsbytes.append(bs)\nend\nmatch sock.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)"} +{"id": "Pony/src-term-ansi-_28.txt", "contents": "\nfun white_bg(): String =>\n\"\"\"\nWhite background.\n\"\"\"\n\"\\x1B[107m\"\n\nfun bright_red_bg(): String =>\n\"\"\"\nBright red background.\n\"\"\"\n\"\\x1B[101m\"\n\nfun bright_green_bg(): String =>\n\"\"\"\nBright green background.\n\"\"\"\n\"\\x1B[102m\"\n\nfun bright_yellow_bg(): String =>"} +{"id": "Pony/src-itertools-iter-_68.txt", "contents": "### Examples\n\n```pony\nIter[I64]([2; 4; 6].values())\n.any({(I64) => (x % 2) == 1 })\n```\n`false`\n\n```pony\nIter[I64]([2; 3; 4].values())\n.any({(I64) => (x % 2) == 1 })\n```\n`true`\n\"\"\"\nfor x in _iter do\nif try f(x)? else false end then\nreturn true\nend\nend\nfalse"} +{"id": "Pony/src-pony_check-int_properties-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/random-XorOshiro128Plus-_7.txt", "contents": "[Source]\nfun ref usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nfun ref i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6"} +{"id": "Pony/src-buffered-reader-_43.txt", "contents": "end\nend\n\nactor Main\nnew create(env: Env) =>\nenv.input(recover Notify(env) end, 1024)\n```\n\"\"\"\nembed _chunks: List[(Array[U8] val, USize)] = _chunks.create()\nvar _available: USize = 0\n\nfun size(): USize =>\n\"\"\"\nReturn the number of available bytes.\n\"\"\"\n_available\n\nfun ref clear() =>\n\"\"\"\nDiscard all pending data."} +{"id": "Pony/src-builtin-unsigned-_53.txt", "contents": "\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: U16): U16 => if this < y then this else y end\nfun max(y: U16): U16 => if this > y then this else y end\n\nfun addc(y: U16): (U16, Bool) =>\n@\"llvm.uadd.with.overflow.i16\"(this, y)\n\nfun subc(y: U16): (U16, Bool) =>\n@\"llvm.usub.with.overflow.i16\"(this, y)\n\nfun mulc(y: U16): (U16, Bool) =>\n@\"llvm.umul.with.overflow.i16\"(this, y)\n\nfun divc(y: U16): (U16, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[U16](this, y)\n\nfun remc(y: U16): (U16, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[U16](this, y)"} +{"id": "Pony/time-Timer-_3.txt", "contents": "abs\u00b6\n[Source]\nCreates a new timer with an absolute expiration time rather than a relative\ntime. The expiration time is wall-clock adjusted system time.\nnew ref abs(\nnotify: TimerNotify ref,\nexpiration: (I64 val , I64 val),\ninterval: U64 val = 0)\n: Timer ref^\n\nParameters\u00b6\n\nnotify: TimerNotify ref\nexpiration: (I64 val , I64 val)\ninterval: U64 val = 0\n\nReturns\u00b6\n\nTimer ref^\n"} +{"id": "Pony/collections-List-_38.txt", "contents": "List[this->A!] ref^\n\n\nreverse\u00b6\n[Source]\nBuilds a new List by reversing the elements in the List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.reverse() // [\"c\"; \"b\"; \"a\"]\n\nfun box reverse()\n: List[this->A!] ref^\n\nReturns\u00b6\n\nList[this->A!] ref^\n\n\ncontains[optional B: (A & HasEq[A!] #read)]\u00b6\n[Source]\nReturns true if the List contains the provided element, otherwise returns false."} +{"id": "Pony/src-files-file-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-FloatingPoint-_29.txt", "contents": "\nlogb\u00b6\n[Source]\nfun box logb()\n: A\n\nReturns\u00b6\n\nA\n\n\npow\u00b6\n[Source]\nfun box pow(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A"} +{"id": "Pony/builtin-I8-_36.txt", "contents": "fun box add(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-buffered-reader-_69.txt", "contents": "\"\"\"\nGet a big-endian F64.\n\"\"\"\nF64.from_bits(u64_be()?)\n\nfun ref f64_le(): F64 ? =>\n\"\"\"\nGet a little-endian F64.\n\"\"\"\nF64.from_bits(u64_le()?)\n\nfun ref _byte(): U8 ? =>\n\"\"\"\nGet a single byte.\n\"\"\"\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nlet r = data(offset)?\n\noffset = offset + 1"} +{"id": "Pony/src-builtin-array-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-random-random-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-UnsignedInteger-_32.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/src-bureaucracy-custodian-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-property-_0.txt", "contents": "\n\n\n\n\n\n\nproperty.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/collections-Flags-_4.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nclear\u00b6\n[Source]\nUnsets all flags.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nset\u00b6\n[Source]\nSets the flag."} +{"id": "Pony/src-builtin-real-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/builtin-ILong-_54.txt", "contents": "\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ILong-_0.txt", "contents": "\n\n\n\n\n\n\nILong\u00b6\n[Source]\nprimitive val ILong is\nSignedInteger[ILong val, ULong val] val\n\nImplements\u00b6\n\nSignedInteger[ILong val, ULong val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-MapKeys-_0.txt", "contents": "\n\n\n\n\n\n\nMapKeys[K: Any #share, V: Any #share, H: HashFunction[K] val]\u00b6\n[Source]\nclass ref MapKeys[K: Any #share, V: Any #share, H: HashFunction[K] val]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nm: HashMap[K, V, H] val)\n: MapKeys[K, V, H] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-source_loc-_0.txt", "contents": "\n\n\n\n\n\n\nsource_loc.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/term-ANSI-_7.txt", "contents": "[Source]\nResets all colours and text styles to the default.\nfun box reset()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbold\u00b6\n[Source]\nBold text. Does nothing on Windows.\nfun box bold(\nstate: Bool val = true)\n: String val\n\nParameters\u00b6\n\nstate: Bool val = true"} +{"id": "Pony/signals-Sig-_6.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nsegv\u00b6\n[Source]\nfun box segv()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nsys\u00b6\n[Source]\nfun box sys()\n: U32 val\n"} +{"id": "Pony/src-builtin-signed-_70.txt", "contents": "@\"llvm.cttz.i64\"(this.u64(), true).ulong()\nend\n\nfun bitwidth(): ULong => ifdef ilp32 or llp64 then 32 else 64 end\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: ILong): ILong => if this < y then this else y end\nfun max(y: ILong): ILong => if this > y then this else y end\n\nfun fld(y: ILong): ILong =>\n_SignedArithmetic.fld[ILong, ULong](this, y)\n\nfun fld_unsafe(y: ILong): ILong =>\n_SignedUnsafeArithmetic.fld_unsafe[ILong, ULong](this, y)\n\nfun mod(y: ILong): ILong =>\n_SignedArithmetic.mod[ILong, ULong](this, y)\n\nfun mod_unsafe(y: ILong): ILong =>"} +{"id": "Pony/src-builtin-unsigned-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-collections-persistent-list-_33.txt", "contents": "\nfor i in iter do\nl = Cons[A](i, l)\nend\nl.reverse()\n\nfun eq[T: Equatable[T] val = A](l1: List[T], l2: List[T]): Bool ? =>\n\"\"\"\nChecks whether two lists are equal.\n\"\"\"\nif (l1.is_empty() and l2.is_empty()) then\ntrue\nelseif (l1.is_empty() and l2.is_non_empty()) then\nfalse\nelseif (l1.is_non_empty() and l2.is_empty()) then\nfalse\nelseif (l1.head()? != l2.head()?) then\nfalse\nelse\neq[T](l1.tail()?, l2.tail()?)?"} +{"id": "Pony/bureaucracy--index-_0.txt", "contents": "\n\n\n\n\n\n\nBureaucracy package\u00b6\nIt happens to almost every program. It starts small, tiny if you will, like a\nvillage where every actor knows every other actor and shutdown is easy. One day\nyou realize your program is no longer a cute seaside hamlet, its a bustling\nmetropolis and you are doing way too much work to keep track of everything.\nWhat do you do? Call for a little bureaucracy.\nThe bureaucracy contains objects designed to ease your bookkeeping burdens.\nNeed to shutdown a number of actors together? Check out Custodian. Need\nto keep track of a lot of stuff and be able to look it up by name? Check out\nRegistrar.\nPut bureaucracy to use today and before long, your sprawling metropolis of a\ncode base will be manageable again in no time.\nPublic Types\u00b6"} +{"id": "Pony/buffered-Writer-_8.txt", "contents": "i16_le\u00b6\n[Source]\nWrite an I16 to the buffer in little-endian byte order.\nfun ref i16_le(\ndata: I16 val)\n: None val\n\nParameters\u00b6\n\ndata: I16 val\n\nReturns\u00b6\n\nNone val\n\n\ni16_be\u00b6\n[Source]\nWrite an I16 to the buffer in big-endian byte order.\nfun ref i16_be("} +{"id": "Pony/pony_test-TestHelper-_20.txt", "contents": "Returns\u00b6\n\nNone val\n\n\ndispose_when_done\u00b6\n[Source]\nPass a disposable actor to be disposed of when the test is complete.\nThe actor will be disposed no matter whether the test succeeds or fails.\nIf the test is already tearing down, the actor will be disposed immediately.\nfun box dispose_when_done(\ndisposable: DisposableActor tag)\n: None val\n\nParameters\u00b6\n\ndisposable: DisposableActor tag\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_335.txt", "contents": "fun box sctp_authentication()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_active_key\u00b6\n[Source]\nfun box sctp_auth_active_key()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_auth_chunk\u00b6\n[Source]"} +{"id": "Pony/src-builtin-pointer-_11.txt", "contents": "Copy n elements from this to that.\n\"\"\"\ncompile_intrinsic\n\nfun tag usize(): USize =>\n\"\"\"\nConvert the pointer into an integer.\n\"\"\"\ncompile_intrinsic\n\nfun tag is_null(): Bool =>\n\"\"\"\nReturn true for a null pointer, false for anything else.\n\"\"\"\ncompile_intrinsic\n\nfun tag eq(that: Pointer[A] tag): Bool =>\n\"\"\"\nReturn true if this address is that address.\n\"\"\""} +{"id": "Pony/pony_check-PropertyParams-_3.txt", "contents": "let max_shrink_rounds: USize val\u00b6\n[Source]\n\nlet max_generator_retries: USize val\u00b6\n[Source]\n\nlet timeout: U64 val\u00b6\n[Source]\n\nlet async: Bool val\u00b6\n[Source]\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/3_arithmetic_9.txt", "contents": "env.out.print(\"overflow detected\")\nend\n```\n\nPartial as well as checked arithmetic comes with the burden of handling exceptions on every case and incurs some performance overhead, be warned.\n\n| Partial Operator | Method | Description |\n| ---------------- | ------------- | ------------------------------------------------- |\n| `+?` | `add_partial()` | errors on overflow/underflow |\n| `-?` | `sub_partial()` | errors on overflow/underflow |\n| `*?` | `mul_partial()` | errors on overflow/underflow |\n| `/?` | `div_partial()` | errors on overflow/underflow and division by zero |\n| `%?` | `rem_partial()` | errors on overflow/underflow and division by zero |\n| `%%?` | `mod_partial()` | errors on overflow/underflow and division by zero |\n\n---\n\nChecked arithmetic functions all return the result of the operation and a `Boolean` flag indicating overflow/underflow or division by zero in a tuple.\n\n| Checked Method | Description |"} +{"id": "Pony/cli-ArgSpec-_0.txt", "contents": "\n\n\n\n\n\n\nArgSpec\u00b6\n[Source]\nArgSpec describes the specification of a positional Arg(ument). They have a\nname, descr(iption), a typ(e), and a default value when they are not\nrequired.\nArgs always come after a leaf command, and are assigned in their positional\norder.\nclass val ArgSpec\n\nConstructors\u00b6\nbool\u00b6\n[Source]\nCreates an Arg with a Bool typed value that can be used like"} +{"id": "Pony/format-AlignCenter-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: AlignCenter val)\n: Bool val\n\nParameters\u00b6\n\nthat: AlignCenter val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_26.txt", "contents": "2. An undefined value that must be ignored.\nUsage example:\n// connected() is a callback function for class TCPConnectionNotify\nfun ref connected(conn: TCPConnection ref) =>\nmatch conn.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)\n| (0, let gbytes: Array[U8] iso) =>\ntry\nlet br = Reader.create().>append(consume gbytes)\nifdef littleendian then\nlet buffer_size = br.u32_le()?\nelse\nlet buffer_size = br.u32_be()?\nend\nend\n| (let errno: U32, _) =>\n// System call failed\nend\n\nfun ref getsockopt(\nlevel: I32 val,"} +{"id": "Pony/builtin-Seq-_7.txt", "contents": "value: A\n\nReturns\u00b6\n\nNone val\n\n\nshift\u00b6\n[Source]\nRemoves an element from the beginning of the sequence.\nfun ref shift()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nappend\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_31.txt", "contents": "I32 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: I32 val)\n: (I32 val , I32 val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , I32 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_49.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_550.txt", "contents": "fun box tcpolen_fast_open_min()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_maxseg\u00b6\n[Source]\nfun box tcpolen_maxseg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_nop\u00b6\n[Source]"} +{"id": "Pony/as_7.txt", "contents": "# Specify the type of items in an array literal\n\nThe `as` operator can also be used to tell the compiler what type to use for the items in an array literal. In many cases, the compiler can infer the type, but sometimes it is ambiguous.\n\nFor example, in the case of the following program, the method `foo` can take either an `Array[U32] ref` or an `Array[U64] ref` as an argument. If a literal array is passed as an argument to the method and no type is specified then the compiler cannot deduce the correct one because there are two equally valid ones.\n\n```pony\nactor Main\nfun foo(xs: (Array[U32] ref | Array[U64] ref)): Bool =>\n// do something boring here\ntrue\n\nnew create(env: Env) =>\nfoo([as U32: 1; 2; 3])\n// the compiler would complain about this:\n// foo([1; 2; 3])\n```\n\nThe requested type must be a valid type for the items in the array. Since these types are checked at compile time they are guaranteed to work, so there is no need for the programmer to handle an error condition.\n"} +{"id": "Pony/src-builtin-string-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-U32-_25.txt", "contents": "(U32 val , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\nmod_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_410.txt", "contents": "fun box sctp_nagle_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_nodelay\u00b6\n[Source]\nfun box sctp_nodelay()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_nrsack_supported\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_helper-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-time-timers-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-FloatingPoint-_35.txt", "contents": "A\n\n\ncosh\u00b6\n[Source]\nfun box cosh()\n: A\n\nReturns\u00b6\n\nA\n\n\nsinh\u00b6\n[Source]\nfun box sinh()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Array-_38.txt", "contents": "fun ref push_u128[optional B: (A & Real[B] val & U8 val)](\nvalue: U128 val)\n: None val\n\nParameters\u00b6\n\nvalue: U128 val\n\nReturns\u00b6\n\nNone val\n\n\npush\u00b6\n[Source]\nAdd an element to the end of the array.\nfun ref push(\nvalue: A)\n: None val\n"} +{"id": "Pony/collections-ListValues-_1.txt", "contents": "[Source]\nBuild the iterator over values.\nreverse of false iterates forward, while\nreverse of true iterates in reverse.\nnew ref create(\nhead: (N | None val),\nreverse: Bool val = false)\n: ListValues[A, N] ref^\n\nParameters\u00b6\n\nhead: (N | None val)\nreverse: Bool val = false\n\nReturns\u00b6\n\nListValues[A, N] ref^\n\n\nPublic Functions\u00b6"} +{"id": "Pony/pony_test-UnitTest-_6.txt", "contents": "String val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-tcp_connection-_66.txt", "contents": "use @pony_os_connect_tcp6[U32](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag, from: Pointer[U8] tag, flags: U32)\nuse @pony_os_peername[Bool](fd: U32, ip: NetAddress tag)\n\nactor TCPConnection is AsioEventNotify\n\"\"\"\nA TCP connection. When connecting, the Happy Eyeballs algorithm is used.\n\nThe following code creates a client that connects to port 8989 of\nthe local host, writes \"hello world\", and listens for a response,\nwhich it then prints.\n\n```pony\nuse \"net\"\n\nclass MyTCPConnectionNotify is TCPConnectionNotify\nlet _out: OutStream\n\nnew create(out: OutStream) =>\n_out = out"} +{"id": "Pony/process-Exited-_3.txt", "contents": "fun box eq(\nother: (Exited val | Signaled val))\n: Bool val\n\nParameters\u00b6\n\nother: (Exited val | Signaled val)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: (Exited val | Signaled val))\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/3_actors_5.txt", "contents": "# Sequential\n\nActors themselves, however, are sequential. That is, each actor will only execute one behaviour at a time. This means all the code in an actor can be written without caring about concurrency: no need for locks or semaphores or anything like that.\n\nWhen you're writing Pony code, it's nice to think of actors not as a unit of parallelism, but as a unit of sequentiality. That is, an actor should do only what _has_ to be done sequentially. Anything else can be broken out into another actor, making it automatically parallel.\n\nIn the example below, the `Main` actor calls a behaviour `call_me_later` which, as we know, is _asynchronous_, so we won't wait for it to run before continuing. Then, we run the method `env.out.print`, which is _also asynchronous_, and will print the provided text to the terminal. Now that we've finished executing code inside the `Main` actor, the behaviour we've called earlier will eventually run, and it will print the last text.\n\n```pony\nactor Main\nnew create(env: Env) =>\ncall_me_later(env)\nenv.out.print(\"This is printed first\")\n\nbe call_me_later(env: Env) =>\nenv.out.print(\"This is printed last\")\n```\n\nSince all this code runs inside the same actor, and the calls to the other behaviour `env.out.print` are sequential as well, we are guaranteed that `\"This is printed first\"` is always printed __before__ `\"This is printed last\"`.\n"} +{"id": "Pony/src-pony_test-pony_test-_29.txt", "contents": "test(_TestSub)\n\nclass iso _TestAdd is UnitTest\nfun name():String => \"addition\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](4, 2 + 2)\n\nclass iso _TestSub is UnitTest\nfun name():String => \"subtraction\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](2, 4 - 2)\n```\n\nThe make() constructor is not needed for this example. However, it allows for\neasy aggregation of tests (see below) so it is recommended that all test Mains\nprovide it.\n\nMain.create() is called only for program invocations on the current package."} +{"id": "Pony/random-Rand-_0.txt", "contents": "\n\n\n\n\n\n\nRand\u00b6\n[Source]\ntype Rand is\nXorOshiro128Plus ref\n\nType Alias For\u00b6\n\nXorOshiro128Plus ref\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_442.txt", "contents": "fun box sctp_peer_addr_thlds()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_peer_auth_chunks\u00b6\n[Source]\nfun box sctp_peer_auth_chunks()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pktdrop_supported\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyHelper-_8.txt", "contents": "\nParameters\u00b6\n\ntest: {(): None ?} box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_is[A: A]\u00b6\n[Source]\nAssert that the 2 given expressions resolve to the same instance.\nfun box assert_is[A: A](\nexpect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)"} +{"id": "Pony/serialisation_10.txt", "contents": "## Example\n\nAssume we have a Pony class with a field that is a pointer to a C string. We would like to be able to serialise and deserialise this object. In order to do that, the Pony class implements the methods `_serialise_space(...)`, `_serialise(...)`, and `_deserialise(...)`. These methods, in turn, call C functions that calculate the number of bytes needed to serialise the string and serialise and deserialise it. In this example the serialised string is represented by a four-byte big-endian number that represents the length of the string, followed by the string itself without the terminating null. So if the C string is `hello world\\0` then the serialised string is `\\0x00\\0x00\\0x00\\0x0Bhello world` (where the first four bytes of the serialised string are a big-endian representation of the number `0x0000000B`, which is `11`).\n\n```pony\nuse \"serialise\"\n\nuse \"lib:custser\"\n\nuse @get_string[Pointer[U8]]()\nuse @serialise_space[USize](s: Pointer[U8] tag)\nuse @serialise[None](bytes: Pointer[U8] tag, str: Pointer[U8] tag)\nuse @deserialise[Pointer[U8] tag](bytes: Pointer[U8] tag)\nuse @printf[I32](fmt: Pointer[U8] tag, ...)\n\nclass CStringWrapper\nvar _cstr: Pointer[U8] tag\n\nnew create(cstr: Pointer[U8] tag) =>\n_cstr = cstr"} +{"id": "Pony/builtin-ISize-_57.txt", "contents": "\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_67.txt", "contents": "\"\"\"\nappend_node(ListNode[A](consume a))\n\nfun ref pop(): A^ ? =>\n\"\"\"\nRemoves the tail value, raising an error if the tail is empty.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.pop() end // Returns \"c\" and my_list is [\"a\"; \"b\"]\n```\n\"\"\"\ntail()? .> remove().pop()?\n\nfun ref unshift(a: A) =>\n\"\"\"\nAdds a new head value.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])"} +{"id": "Pony/src-builtin-signed-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/builtin-I16-_38.txt", "contents": "I16 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_38.txt", "contents": "_notify = consume notify\n\nbe set_broadcast(state: Bool) =>\n\"\"\"\nEnable or disable broadcasting from this socket.\n\"\"\"\nif not _closed then\nif _ip.ip4() then\nset_so_broadcast(state)\nelseif _ip.ip6() then\n@pony_os_multicast_join(_fd, \"FF02::1\".cstring(), \"\".cstring())\nend\nend\n\nbe set_multicast_interface(from: String = \"\") =>\n\"\"\"\nBy default, the OS will choose which address is used to send packets bound\nfor multicast addresses. This can be used to force a specific interface. To\nrevert to allowing the OS to choose, call with an empty string.\n\"\"\""} +{"id": "Pony/src-builtin-real-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-SignedInteger-_56.txt", "contents": "I32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_94.txt", "contents": "else\nvar i: USize = 0\n\nwhile str._apply(i) != 0 do\ni = i + 1\nend\n\n_size = i\n_alloc = i + 1\n_ptr = str\nend\n\nnew copy_cpointer(str: Pointer[U8] box, len: USize) =>\n\"\"\"\nCreate a string by copying a fixed number of bytes from a pointer.\n\"\"\"\nif str.is_null() then\n_size = 0\n_alloc = 1\n_ptr = Pointer[U8]._alloc(_alloc)"} +{"id": "Pony/builtin-I16-_7.txt", "contents": "\nReturns\u00b6\n\nU16 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nbitwidth\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_22.txt", "contents": "fun box fldc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: U64 val)\n: U64 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-test_helper-_23.txt", "contents": "Per unit test class that provides control, logging and assertion functions.\n\nEach unit test is given a TestHelper when it is run. This is val and so can\nbe passed between methods and actors within the test without restriction.\n\nThe assertion functions check the relevant condition and mark the test as a\nfailure if appropriate. The success or failure of the condition is reported\nback as a Bool which can be checked if a different code path is needed when\nthat condition fails.\n\nAll assert functions take an optional message argument. This is simply a\nstring that is printed as part of the error message when the condition fails.\nIt is intended to aid identifying what failed.\n\"\"\"\n\nlet _runner: _TestRunner\nlet env: Env\n\"\"\"\nThe process environment.\n"} +{"id": "Pony/builtin-Seq-_2.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nsize\u00b6\n[Source]\nReturns the number of elements in the sequence.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\napply\u00b6\n[Source]\nReturns the i-th element of the sequence. Raises an error if the index"} +{"id": "Pony/itertools-Iter-_11.txt", "contents": ".any({(I64) => (x % 2) == 1 })\n\nfalse\nIter[I64]([2; 3; 4].values())\n.any({(I64) => (x % 2) == 1 })\n\ntrue\nfun ref any(\nf: {(A!): Bool ?}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(A!): Bool ?}[A] box\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/process-ProcessNotify-_0.txt", "contents": "\n\n\n\n\n\n\nProcessNotify\u00b6\n[Source]\nNotifications for Process connections.\ninterface ref ProcessNotify\n\nPublic Functions\u00b6\ncreated\u00b6\n[Source]\nProcessMonitor calls this when it is created.\nfun ref created(\nprocess: ProcessMonitor ref)\n: None val\n"} +{"id": "Pony/src-collections-list_node-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223class ListNode[A]\n\"\"\"\nA node in a doubly linked list.\n\nSee Pony [collections.List](https://stdlib.ponylang.io/collections-List/)\nclass for usage examples.\n\nEach node contains four fields: two link fields (references to the previous and\nto the next node in the sequence of nodes), one data field, and the reference to"} +{"id": "Pony/builtin-U16-_21.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-ini-ini-_8.txt", "contents": " Ini package\n\nThe Ini package provides support for parsing\n[INI file](https://en.wikipedia.org/wiki/INI_file) formatted text.\n\n* Currently _does not_ support multi-line entries.\n* Any keys not in a section will be placed in the section \"\"\n"} +{"id": "Pony/src-builtin-unsigned-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/src-format-format-_12.txt", "contents": "match align\n| AlignLeft =>\ns.append(str)\nfor i in Range(s.size(), s.space()) do\ns.push_utf32(fill)\nend\n| AlignRight =>\nfor i in Range(0, len - copy_len) do\ns.push_utf32(fill)\nend\ns.append(str)\n| AlignCenter =>\nlet half = (len - copy_len) / 2\nfor i in Range(0, half) do\ns.push_utf32(fill)\nend\ns.append(str)\nfor i in Range(s.size(), s.space()) do\ns.push_utf32(fill)\nend"} +{"id": "Pony/src-collections-persistent-list-_53.txt", "contents": "false otherwise.\n\"\"\"\n_exists(this, f)\n\nfun _exists(l: List[A], f: {(val->A): Bool} box): Bool =>\n\"\"\"\nPrivate helper for exists, recursively testing predicate on elements,\nreturning true immediately on an element satisfying the predicate.\n\"\"\"\nmatch l\n| let cons: Cons[A] =>\nif (f(cons.head())) then\ntrue\nelse\n_exists(cons.tail(), f)\nend\nelse\nfalse\nend\n"} +{"id": "Pony/pony_check-Generators-_5.txt", "contents": "Returns\u00b6\n\nGenerator[S] box\n\n\niso_seq_of[T: Any #send, S: Seq[T] iso]\u00b6\n[Source]\nGenerate a Seq[T] where T must be sendable (i.e. it must have a\nreference capability of either tag, val, or iso).\nThe constraint of the elements being sendable stems from the fact that\nthere is no other way to populate the iso seq if the elements might be\nnon-sendable (i.e. ref), as then the seq would leak references via\nits elements.\nfun box iso_seq_of[T: Any #send, S: Seq[T] iso](\ngen: Generator[T] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[S] box\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_unit_test-_10.txt", "contents": "new iso create(p1: Property1[T] iso, name': (String | None) = None) =>\n\"\"\"\nWrap a [Property1](pony_check-Property1.md) to make it mimic the PonyTest\n[UnitTest](pony_test-UnitTest.md).\n\nIf `name'` is given, use this as the test name.\nIf not, use the property's `name()`.\n\"\"\"\n_name =\nmatch name'\n| None => p1.name()\n| let s: String => s\nend\n_prop1 = consume p1\n\n\nfun name(): String => _name\n\nfun ref apply(h: TestHelper) ? =>\nlet prop = ((_prop1 = None) as Property1[T] iso^)"} +{"id": "Pony/src-net-auth-_0.txt", "contents": "\n\n\n\n\n\n\nauth.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-F32-_40.txt", "contents": "\ndiv_unsafe\u00b6\nfun box div_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\ndivrem_unsafe\u00b6\nfun box divrem_unsafe(\ny: F32 val)\n: (F32 val , F32 val)\n"} +{"id": "Pony/src-assert-assert-_3.txt", "contents": " Assert package\n\nContains runtime assertions. If you are looking for assertion that only run\nwhen your code was compiled with the `debug` flag, check out `Assert`. For\nassertions that are always enabled, check out `Fact`.\n\"\"\"\n\nuse @pony_os_stderr[Pointer[U8]]()\nuse @fprintf[I32](stream: Pointer[U8] tag, fmt: Pointer[U8] tag, ...)\n\nprimitive Assert\n\"\"\"\nThis is a debug only assertion. If the test is false, it will print any\nsupplied error message to stderr and raise an error.\n\"\"\"\nfun apply(test: Bool, msg: String = \"\") ? =>\nifdef debug then\nFact(test, msg)?\nend\n"} +{"id": "Pony/builtin-ISize-_48.txt", "contents": "\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-vec-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-Integer-_42.txt", "contents": "\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n"} +{"id": "Pony/src-collections-list-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-builtin-signed-_58.txt", "contents": "fun ctz(): U32 => @\"llvm.cttz.i32\"(this.u32(), false)\n\nfun clz_unsafe(): U32 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i32\"(this.u32(), true)\n\nfun ctz_unsafe(): U32 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i32\"(this.u32(), true)\n\nfun bitwidth(): U32 => 32\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n"} +{"id": "Pony/src-collections-map-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-string-_115.txt", "contents": "then\nerr\nelse\n(((c.u32() << 12) + (c2.u32() << 6) + c3.u32()) - 0xE2080, 3)\nend\nend\nelseif c < 0xF5 then\n// 4-byte.\nif (i + 3) >= _size then\n// Not enough bytes.\nerr\nelse\nlet c2 = _ptr._apply(i + 1)\nlet c3 = _ptr._apply(i + 2)\nlet c4 = _ptr._apply(i + 3)\nif\n// Not continuation bytes.\n((c2 and 0xC0) != 0x80) or\n((c3 and 0xC0) != 0x80) or\n((c4 and 0xC0) != 0x80) or"} +{"id": "Pony/builtin-String-_24.txt", "contents": "out of bounds.\nfun box utf32(\noffset: ISize val)\n: (U32 val , U8 val) ?\n\nParameters\u00b6\n\noffset: ISize val\n\nReturns\u00b6\n\n(U32 val , U8 val) ?\n\n\napply\u00b6\n[Source]\nReturns the i-th byte. Raise an error if the index is out of bounds.\nfun box apply(\ni: USize val)\n: U8 val ?"} +{"id": "Pony/files-FileError-_2.txt", "contents": "fun box ne(\nthat: FileError val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileError val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_54.txt", "contents": "1072\n1073\n1074\n1075\n1076\n1077\n1078\n1079\n1080\n1081\n1082\n1083\n1084\n1085\n1086\n1087\n1088\n1089\n1090\n1091"} +{"id": "Pony/src-pony_test-unit_test-_0.txt", "contents": "\n\n\n\n\n\n\nunit_test.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/capsicum-Cap-_12.txt", "contents": "fun box fchflags()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nchflagsat\u00b6\n[Source]\nfun box chflagsat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchmod\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_27.txt", "contents": "\nString val\n\n\nbright_cyan_bg\u00b6\n[Source]\nBright cyan background.\nfun box bright_cyan_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_grey_bg\u00b6\n[Source]\nBright grey background.\nfun box bright_grey_bg()\n: String val"} +{"id": "Pony/src-builtin-array-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-builtin-real-_40.txt", "contents": "fun u16_unsafe(): U16 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun u32_unsafe(): U32 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun u64_unsafe(): U64 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic"} +{"id": "Pony/builtin-U64-_35.txt", "contents": "U64 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: U64 val)\n: U64 val\n\nParameters\u00b6"} +{"id": "Pony/platform-dependent-code_0.txt", "contents": "# Platform-dependent Code\n\nThe Pony libraries, of course, want to abstract platform differences. Sometimes you may want a `use` command that only works under certain circumstances, most commonly only on a particular OS or only for debug builds. You can do this by specifying a condition for a `use` command:\n\n```pony\nuse \"foo\" if linux\nuse \"bar\" if (windows and debug)\n```\n\nUse conditions can use any of the methods defined in `builtin/Platform` as conditions.\nThere are currently the following booleans defined: `freebsd`, `linux`, `osx`, `posix` => `(freebsd or linux or osx)`, `windows`, `x86`, `arm`, `lp64`, `llp64`, `ilp32`, `native128`, `debug`\n\nThey can also use the operators `and`, `or`, `xor` and `not`. As with other expressions in Pony, parentheses __must__ be used to indicate precedence if more than one of `and`, `or` and `xor` is used.\n\nAny use command whose condition evaluates to false is ignored.\n"} +{"id": "Pony/files-File-_15.txt", "contents": "\nParameters\u00b6\n\noffset: ISize val\n\nReturns\u00b6\n\nNone val\n\n\nsync\u00b6\n[Source]\nSync the file contents to physical storage.\nfun ref sync()\n: None val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/src-builtin-real-_45.txt", "contents": "fun gt(y: box->A): Bool => this > y\n\nfun min(y: A): A\nfun max(y: A): A\n\nfun hash(): USize =>\nvar x = usize()\n\nifdef ilp32 then\nx = (not x) + (x << 15)\nx = x xor (x >> 12)\nx = x + (x << 2)\nx = x xor (x >> 4)\nx = (x + (x << 3)) + (x << 11)\nx = x xor (x >> 16)\n\nx\nelse\nhash64().usize()\nend"} +{"id": "Pony/src-pony_check-for_all-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-TCPConnection-_9.txt", "contents": "host,\nservice)\n\nclass ExampleProxy is Proxy\nlet _proxy_host: String\nlet _proxy_service: String\n\nnew create(proxy_host: String, proxy_service: String) =>\n_proxy_host = proxy_host\n_proxy_service = proxy_service\n\nfun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ =>\nExampleProxyNotify.create(consume wrap, _proxy_service, _proxy_service)\n\nclass iso ExampleProxyNotify is TCPConnectionNotify\n// Fictional proxy implementation that has no error\n// conditions, and always forwards the connection.\nlet _proxy_host: String\nlet _proxy_service: String\nvar _destination_host: (None | String) = None"} +{"id": "Pony/src-itertools-iter-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_206.txt", "contents": "fun box ip_fw_nat_del()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_nat_get_config\u00b6\n[Source]\nfun box ip_fw_nat_get_config()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_nat_get_log\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_72.txt", "contents": "1432\n1433\n1434\n1435\n1436\n1437\n1438\n1439\n1440\n1441\n1442\n1443\n1444\n1445\n1446\n1447\n1448\n1449\n1450\n1451"} +{"id": "Pony/builtin-Real-_7.txt", "contents": "[Source]\nfun box divrem(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem\u00b6\n[Source]\nCalculate the remainder after integer division, rounded towards zero (div).\nThe result has the sign of the dividend.\nfun box rem(\ny: A)"} +{"id": "Pony/builtin-ULong-_30.txt", "contents": "ULong val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6"} +{"id": "Pony/src-cli-command_spec-_0.txt", "contents": "\n\n\n\n\n\n\ncommand_spec.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/c-abi_9.txt", "contents": "var k = key\nvar b = I64(0)\nvar j = I64(0)\n\nwhile j < buckets.i64() do\nb = j\nk = (k * 2862933555777941757) + 1\nj = ((b + 1).f64() * (I64(1 << 31).f64() / ((k >> 33) + 1).f64())).i64()\nend\n\nb.i32()\n```\n\nWe can now use ponyc to compile a native executable integrating Pony and our C library. And that's all we need to do.\n"} +{"id": "Pony/0_literals_6.txt", "contents": "# String Literals\n\nString literals are enclosed with double quotes `\"` or triple-quoted `\"\"\"`. They can contain any kind of bytes and various escape sequences:\n\n* `\\u00FE` Unicode escape sequence with 4 hex digits encoding one code point\n* `\\u10FFFE` Unicode escape sequence with 6 hex digits encoding one code point\n* `\\x4F` hex escape sequence for Unicode letters with 2 hex digits (up to `0xFF`)\n* `\\a`, `\\b`, `\\e`, `\\f`, `\\n`, `\\r`, `\\t`, `\\v`, `\\\\`, `\\0`, `\\\"`\n\nEach escape sequence encodes a full character, not byte.\n\n```pony\nuse \"format\"\n\nactor Main\nnew create(env: Env) =>\n\nlet pony = \"\ud83d\udc0e\"\nlet pony_hex_escaped = \"p\\xF6n\\xFF\"\nlet pony_unicode_escape = \"\\U01F40E\""} +{"id": "Pony/net-OSSockOpt-_457.txt", "contents": "fun box sctp_set_peer_primary_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown\u00b6\n[Source]\nfun box sctp_shutdown()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_ack\u00b6\n[Source]"} +{"id": "Pony/pony_check--index-_4.txt", "contents": "{(sample, ph) =>\nph.array_eq[Usize](arg1, arg1.reverse().reverse())\n})\n// ... possibly more properties, using `PonyCheck.for_all`\n\nIndependently of how you integrate with PonyTest,\nthe PonyCheck machinery will instantiate the provided Generator, and will\nexecute it for a configurable number of samples.\nIf the property fails using an assertion method of\nPropertyHelper,\nthe failed example will be shrunken by the generator\nto obtain a smaller and more informative, still failing, sample\nfor reporting.\nPublic Types\u00b6\n\nprimitive ASCIIAll\nprimitive ASCIIAllWithNUL\nprimitive ASCIIDigits\nprimitive ASCIILetters\nprimitive ASCIILettersLower"} +{"id": "Pony/random-XorShift128Plus-_6.txt", "contents": "u128\u00b6\n[Source]\nfun ref u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun ref ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n"} +{"id": "Pony/net-OSSockOpt-_184.txt", "contents": "fun box ipx_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_node_len\u00b6\n[Source]\nfun box ipx_node_len()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_primary\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_39.txt", "contents": "end\nelse\nfalse\nend\n\nfun create_file(target: String): File iso^ ? =>\n\"\"\"\nOpen for read/write, creating if it doesn't exist, preserving the contents\nif it does exist.\n\"\"\"\nif\nnot path.caps(FileCreate)\nor not path.caps(FileRead)\nor not path.caps(FileWrite)\nor (_fd == -1)\nthen\nerror\nend\n\nlet path' = FilePath.from(path, target, path.caps)?"} +{"id": "Pony/src-net-ossockopt-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/collections-Flags-_16.txt", "contents": "that: Flags[A, B] box)\n: Bool val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nReturns true if the flags set on this are a strict subset of the flags set\non that. Flags is only partially ordered, so lt is not the opposite of ge.\nfun box lt(\nthat: Flags[A, B] box)\n: Bool val\n"} +{"id": "Pony/collections-MaxHeapPriority-_1.txt", "contents": "new val create()\n: MaxHeapPriority[A] val^\n\nReturns\u00b6\n\nMaxHeapPriority[A] val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nx: A,\ny: A)\n: Bool val\n\nParameters\u00b6\n\nx: A\ny: A"} +{"id": "Pony/net-OSSockOpt-_181.txt", "contents": "fun box ipx_getnetinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_getnetinfo_norip\u00b6\n[Source]\nfun box ipx_getnetinfo_norip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_immediatespxack\u00b6\n[Source]"} +{"id": "Pony/2_how-it-works_4.txt", "contents": "# That's it!\n\nReally, that's it. The program begins by creating a `Main` actor, and in the constructor, we print \"Hello, world!\" to `stdout`. Next, we'll start diving into the Pony type system.\n"} +{"id": "Pony/src-builtin-array-_56.txt", "contents": "_alloc = len.next_pow2().max(len).max(8)\n_ptr = Pointer[A]._alloc(_alloc)\nelse\n_alloc = 0\n_ptr = Pointer[A]\nend\n\nnew init(from: A^, len: USize) =>\n\"\"\"\nCreate an array of len elements, all initialised to the given value.\n\"\"\"\n_size = len\n\nif len > 0 then\n_alloc = len.next_pow2().max(len).max(8)\n_ptr = Pointer[A]._alloc(_alloc)\n\nvar i: USize = 0\n\nwhile i < len do"} +{"id": "Pony/src-net-ossockopt-_102.txt", "contents": "fun rds_rdma_use_once():I32 => @pony_os_sockopt_option(I32(482))\nfun rds_recverr():I32 => @pony_os_sockopt_option(I32(483))\nfun rds_trans_count():I32 => @pony_os_sockopt_option(I32(484))\nfun rds_trans_ib():I32 => @pony_os_sockopt_option(I32(485))\nfun rds_trans_iwarp():I32 => @pony_os_sockopt_option(I32(486))\nfun rds_trans_none():I32 => @pony_os_sockopt_option(I32(487))\nfun rds_trans_tcp():I32 => @pony_os_sockopt_option(I32(488))\nfun rose_access_barred():I32 => @pony_os_sockopt_option(I32(489))\nfun rose_defer():I32 => @pony_os_sockopt_option(I32(490))\nfun rose_dte_originated():I32 => @pony_os_sockopt_option(I32(491))\nfun rose_holdback():I32 => @pony_os_sockopt_option(I32(492))\nfun rose_idle():I32 => @pony_os_sockopt_option(I32(493))\nfun rose_invalid_facility():I32 => @pony_os_sockopt_option(I32(494))\nfun rose_local_procedure():I32 => @pony_os_sockopt_option(I32(495))\nfun rose_max_digis():I32 => @pony_os_sockopt_option(I32(496))\nfun rose_mtu():I32 => @pony_os_sockopt_option(I32(497))\nfun rose_network_congestion():I32 => @pony_os_sockopt_option(I32(498))\nfun rose_not_obtainable():I32 => @pony_os_sockopt_option(I32(499))\nfun rose_number_busy():I32 => @pony_os_sockopt_option(I32(500))\nfun rose_out_of_order():I32 => @pony_os_sockopt_option(I32(501))"} +{"id": "Pony/src-collections-set-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-files-file_path-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-files-file-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-capsicum-cap-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-serialise-serialise-_13.txt", "contents": "@{(ctx: Pointer[None], size: USize): Pointer[U8] =>\n@pony_alloc(ctx, size)\n}\nlet throw_fn = @{() ? => error }\n@pony_serialise(@pony_ctx(), data, Pointer[None], r, alloc_fn, throw_fn) ?\n_data = consume r\n\nnew input(auth: InputSerialisedAuth, data: Array[U8] val) =>\n\"\"\"\nA caller with InputSerialisedAuth can create serialised data from any\narbitrary set of bytes. It is the caller's responsibility to ensure that\nthe data is in fact well-formed serialised data. This is currently the most\ndangerous method, as there is currently no way to check validity at\nruntime.\n\"\"\"\n_data = data\n\nfun apply(auth: DeserialiseAuth): Any iso^ ? =>\n\"\"\"\nA caller with DeserialiseAuth can create an object graph from serialised"} +{"id": "Pony/builtin-Pointer-_8.txt", "contents": "fun tag hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nReturns a 64-bit hash of the address.\nfun tag hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_618.txt", "contents": "fun box udp_encap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap_espinudp\u00b6\n[Source]\nfun box udp_encap_espinudp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap_espinudp_maxfraglen\u00b6\n[Source]"} +{"id": "Pony/signals-Sig-_16.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\npwr\u00b6\n[Source]\nfun box pwr()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nusr1\u00b6\n[Source]\nfun box usr1()\n: U32 val\n"} +{"id": "Pony/builtin-U16-_4.txt", "contents": "\nU16 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-float-_46.txt", "contents": "\nfun min(y: F64): F64 => if this < y then this else y end\nfun max(y: F64): F64 => if this > y then this else y end\n\nfun fld(y: F64): F64 =>\n(this / y).floor()\n\nfun fld_unsafe(y: F64): F64 =>\n(this /~ y).floor()\n\nfun mod(y: F64): F64 =>\nlet r = this.rem(y)\nif r == F64(0.0) then\nr.copysign(y)\nelseif (r > 0) xor (y > 0) then\nr + y\nelse\nr\nend\n"} +{"id": "Pony/pony_check-Property1-_3.txt", "contents": "[Source]\nThe Generator used to produce samples to verify.\nfun box gen()\n: Generator[T] box\n\nReturns\u00b6\n\nGenerator[T] box\n\n\nproperty\u00b6\n[Source]\nA method verifying that a certain property holds for all given arg1\nwith the help of PropertyHelper h.\nfun ref property(\narg1: T,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-unsigned-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906use @\"llvm.bitreverse.i8\"[U8](src: U8)\nuse @\"llvm.bitreverse.i16\"[U16](src: U16)\nuse @\"llvm.bitreverse.i32\"[U32](src: U32)\nuse @\"llvm.bitreverse.i64\"[U64](src: U64)\nuse @\"llvm.bitreverse.i128\"[U128](src: U128)\nuse @\"llvm.bswap.i8\"[U16](src: U8)"} +{"id": "Pony/src-pony_check-generator-_83.txt", "contents": "\"\"\"\nApply `fn` to each value of this iterator\nand yield the results.\n\nExample:\n\n```pony\nlet single_code_point_string_gen =\nGenerators.u32()\n.map[String]({(u) => String.from_utf32(u) })\n```\n\"\"\"\nGenerator[U](\nobject is GenObj[U]\nfun generate(rnd: Randomness): GenerateResult[U] ? =>\n(let generated: T, let shrunken: Iterator[T^]) =\n_gen.generate_and_shrink(rnd)?\n\n(fn(consume generated), _map_shrunken(shrunken))\n"} +{"id": "Pony/src-builtin-string-_161.txt", "contents": "fun u8(base: U8 = 0): U8 ? => _to_int[U8](base)?\nfun u16(base: U8 = 0): U16 ? => _to_int[U16](base)?\nfun u32(base: U8 = 0): U32 ? => _to_int[U32](base)?\nfun u64(base: U8 = 0): U64 ? => _to_int[U64](base)?\nfun u128(base: U8 = 0): U128 ? => _to_int[U128](base)?\nfun ulong(base: U8 = 0): ULong ? => _to_int[ULong](base)?\nfun usize(base: U8 = 0): USize ? => _to_int[USize](base)?\n\nfun _to_int[A: ((Signed | Unsigned) & Integer[A] val)](base: U8): A ? =>\n\"\"\"\nConvert the *whole* string to the specified type.\nIf there are any other characters in the string, or the integer found is\nout of range for the target type then an error is thrown.\n\"\"\"\n(let v, let d) = read_int[A](0, base)?\n// Check the whole string is used\nif (d == 0) or (d.usize() != _size) then error end\nv\n\nfun read_int[A: ((Signed | Unsigned) & Integer[A] val)]("} +{"id": "Pony/net-OSSockOpt-_456.txt", "contents": "fun box sctp_set_dynamic_primary()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_set_initial_dbg_seq\u00b6\n[Source]\nfun box sctp_set_initial_dbg_seq()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_set_peer_primary_addr\u00b6\n[Source]"} +{"id": "Pony/capability-matrix_0.txt", "contents": "# Reference Capability Matrix\n\nAt this point, it's quite possible that you read the previous sections in this chapter and are still pretty confused about the relation between reference capabilities. It's okay! We have all struggled when learning this part of Pony, too. Once you start working on Pony code, you'll get a better intuition with them.\n\nIn the meantime, if you still feel like all these tidbits in the chapter are still scrambled in your head, there is one resource often presented with Pony that can give you a more visual representation: the __reference capability matrix__.\n\nIt is also the origin of the concept behind each capability in Pony, in the sense of how each capability denies certain properties to its reference -- in other words, which guarantees a capability makes. We will explain what that actually means before presenting the matrix.\n"} +{"id": "Pony/files-FileStat-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileStat val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U64-_20.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U8-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-poperator-_0.txt", "contents": "\n\n\n\n\n\n\npoperator.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-F64-_13.txt", "contents": "F64 val\n\n\ntrunc\u00b6\n[Source]\nfun box trunc()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: F64 val)\n: F64 val\n\nParameters\u00b6"} +{"id": "Pony/cli-ArgSpec-_2.txt", "contents": "string\u00b6\n[Source]\nCreates an Arg with a String typed value that can be used like\n filename\nto yield an arg value\ncmd.arg(\"file\").string() == \"filename\".\nnew val string(\nname': String val,\ndescr': String val = \"\",\ndefault': (String val | None val) = reference)\n: ArgSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\ndefault': (String val | None val) = reference\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I16-_54.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-std_stream-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/itertools-Iter-_5.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: A ?\n\nReturns\u00b6\n\nA ?\n\n\nnext_or\u00b6\n[Source]\nReturn the next value, or the given default.\nExample\u00b6\nlet x: (U64 | None) = 42\nIter[U64].maybe(x).next_or(0)"} +{"id": "Pony/src-builtin-unsigned-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/net-TCPListenNotify-_3.txt", "contents": "\nlisten: TCPListener ref\n\nReturns\u00b6\n\nNone val\n\n\nconnected\u00b6\n[Source]\nCreate a new TCPConnectionNotify to attach to a new TCPConnection for a\nnewly established connection to the server.\nfun ref connected(\nlisten: TCPListener ref)\n: TCPConnectionNotify iso^ ?\n\nParameters\u00b6\n\nlisten: TCPListener ref\n"} +{"id": "Pony/collections-persistent-HashMap-_10.txt", "contents": "fun val values()\n: MapValues[K, V, H] ref\n\nReturns\u00b6\n\nMapValues[K, V, H] ref\n\n\npairs\u00b6\n[Source]\nfun val pairs()\n: MapPairs[K, V, H] ref\n\nReturns\u00b6\n\nMapPairs[K, V, H] ref\n\n\n\n"} +{"id": "Pony/src-serialise-serialise-_12.txt", "contents": "bytes as serialised data. This is the most dangerous capability, as currently\nit is possible for a malformed chunk of data to crash your program if it is\ndeserialised.\n\"\"\"\nnew create(auth: AmbientAuth) =>\nNone\n\nclass val Serialised\n\"\"\"\nThis represents serialised data. How it can be used depends on the other\ncapabilities a caller holds.\n\"\"\"\nlet _data: Array[U8] val\n\nnew create(auth: SerialiseAuth, data: Any box) ? =>\n\"\"\"\nA caller with SerialiseAuth can create serialised data from any object.\n\"\"\"\nlet r = recover Array[U8] end\nlet alloc_fn ="} +{"id": "Pony/net-OSSockOpt-_385.txt", "contents": "fun box sctp_get_addr_len()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_asoc_vrf\u00b6\n[Source]\nfun box sctp_get_asoc_vrf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_assoc_id_list\u00b6\n[Source]"} +{"id": "Pony/files-Path-_0.txt", "contents": "\n\n\n\n\n\n\nPath\u00b6\n[Source]\nOperations on paths that do not require a capability. The operations can be\nused to manipulate path names, but give no access to the resulting paths.\nprimitive val Path\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Path val^\n\nReturns\u00b6"} +{"id": "Pony/builtin-I32-_13.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_socket-_48.txt", "contents": "end\nend\n\nfun ref _notify_listening() =>\n\"\"\"\nInform the notifier that we're listening.\n\"\"\"\nif _fd != -1 then\n_notify.listening(this)\nelse\n_notify.not_listening(this)\nend\n\nfun ref _close() =>\n\"\"\"\nInform the notifier that we've closed.\n\"\"\"\nifdef windows then\n// On windows, wait until IOCP read operation has completed or been\n// cancelled."} +{"id": "Pony/builtin-Integer-_41.txt", "contents": "\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nstring\u00b6\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n"} +{"id": "Pony/src-collections-map-_42.txt", "contents": "\"\"\"\nlet old = _array\nlet old_len = old.size()\n\n_array = _array.init(_MapEmpty, len)\n_size = 0\n\ntry\nfor i in Range(0, old_len) do\nmatch old(i)? = _MapDeleted\n| (let k: K, let v: V) =>\nthis(consume k) = consume v\nend\nend\nend\n\nfun keys(): MapKeys[K, V, H, this->HashMap[K, V, H]]^ =>\n\"\"\"\nReturn an iterator over the keys.\n\"\"\""} +{"id": "Pony/src-builtin-string-_127.txt", "contents": "fun substring(from: ISize, to: ISize = ISize.max_value()): String iso^ =>\n\"\"\"\nReturns a substring. Index range [`from` .. `to`) is half-open.\nReturns an empty string if nothing is in the range.\n\nNote that this operation allocates a new string to be returned. For\nsimilar operations that don't allocate a new string, see `trim` and\n`trim_in_place`.\n\"\"\"\nlet start = offset_to_index(from)\nlet finish = offset_to_index(to).min(_size)\n\nif (start < _size) and (start < finish) then\nlet len = finish - start\nlet str = recover String(len) end\n_ptr._offset(start)._copy_to(str._ptr._unsafe(), len)\nstr._size = len\nstr._set(len, 0)\nstr\nelse"} +{"id": "Pony/src-files-path-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-encode-base64-base64-_18.txt", "contents": "\nfun decode[A: Seq[U8] iso = Array[U8] iso](\ndata: ReadSeq[U8],\nat62: U8 = '+',\nat63: U8 = '/',\npad: U8 = '=')\n: A^ ?\n=>\n\"\"\"\nConfigurable decoding. The defaults are for RFC 4648. Missing padding is\nnot an error. Non-base64 data, other than whitespace (which can appear at\nany time), is an error.\n\"\"\"\nlet len = (data.size() * 4) / 3\nlet out = recover A(len) end\n\nvar state = U8(0)\nvar input = U8(0)\nvar output = U8(0)\n"} +{"id": "Pony/builtin-FloatingPoint-_55.txt", "contents": "U64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_mode-_9.txt", "contents": "Clear all of the any-user flags.\n\"\"\"\nany_read = false\nany_write = false\nany_exec = false\n\nfun ref private() =>\n\"\"\"\nClear all of the group and any-user flags.\n\"\"\"\ngroup_read = false\ngroup_write = false\ngroup_exec = false\nany_read = false\nany_write = false\nany_exec = false\n\nfun u32(): U32 =>\n\"\"\"\nGet the OS specific integer for a file mode. On Windows, if any read flag"} +{"id": "Pony/src-pony_check-generator-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/0_what-you-need_1.txt", "contents": "# The Pony compiler\n\nBefore you get started, please check out the [installation instructions](https://github.com/ponylang/ponyc/blob/main/INSTALL.md) for the Pony compiler.\n"} +{"id": "Pony/net-TCPConnectionNotify-_2.txt", "contents": "var _destination_service: ( None | String )\n\nfun ref proxy_via(host: String, service: String): (String, String) =>\n_destination_host = host\n_destination_service = service\n( _proxy_host, _proxy_service )\n\nfun ref proxy_via(\nhost: String val,\nservice: String val)\n: (String val , String val)\n\nParameters\u00b6\n\nhost: String val\nservice: String val\n\nReturns\u00b6\n\n(String val , String val)"} +{"id": "Pony/process-WriteError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-ULong-_22.txt", "contents": "fun box fldc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: ULong val)\n: ULong val ?\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-pointer-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-real-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-pony_check-generator-_111.txt", "contents": "fun zip3[T1, T2, T3](\ngen1: Generator[T1],\ngen2: Generator[T2],\ngen3: Generator[T3])\n: Generator[(T1, T2, T3)]\n=>\n\"\"\"\nZip three generators into a generator of a 3-tuple\ncontaining the values generated by those three generators.\n\"\"\"\nGenerator[(T1, T2, T3)](\nobject is GenObj[(T1, T2, T3)]\nfun generate(rnd: Randomness): GenerateResult[(T1, T2, T3)] ? =>\n(let v1: T1, let shrinks1: Iterator[T1^]) =\ngen1.generate_and_shrink(rnd)?\n(let v2: T2, let shrinks2: Iterator[T2^]) =\ngen2.generate_and_shrink(rnd)?\n(let v3: T3, let shrinks3: Iterator[T3^]) =\ngen3.generate_and_shrink(rnd)?\n((consume v1, consume v2, consume v3),"} +{"id": "Pony/net-OSSockOpt-_266.txt", "contents": "fun box ndrvproto_ndrv()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_addmulticast\u00b6\n[Source]\nfun box ndrv_addmulticast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_deldmxspec\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_16.txt", "contents": "USize val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: USize val)\n: USize val ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/src-pony_bench-pony_bench-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\"\"\"\nPonyBench provides a microbenchmarking framework. It is designed to measure\nthe runtime of synchronous and asynchronous operations.\n"} +{"id": "Pony/signals-SignalRaise-_1.txt", "contents": "SignalRaise val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nsig: U32 val)\n: None val\n\nParameters\u00b6\n\nsig: U32 val\n\nReturns\u00b6\n\nNone val\n\n\neq\u00b6"} +{"id": "Pony/builtin--index-_2.txt", "contents": "primitive F64\ntype Float\ntrait FloatingPoint\nprimitive Greater\ninterface HasEq\nprimitive I128\nprimitive I16\nprimitive I32\nprimitive I64\nprimitive I8\nprimitive ILong\nprimitive ISize\ninterface InputNotify\ninterface InputStream\ntype Int\ntrait Integer\ninterface Iterator\nprimitive Less\nprimitive None\nstruct NullablePointer"} +{"id": "Pony/src-collections-set-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_test-test_helper-_37.txt", "contents": "fail(_format_loc(loc) + \"Assert EQ failed. \" + msg + \" Expected (\"\n+ _print_array[A](expect) + \") == (\" + _print_array[A](actual) + \")\")\nreturn false\nend\n\nlog(\n_format_loc(loc) + \"Assert EQ passed. \" + msg + \" Got (\"\n+ _print_array[A](expect) + \") == (\" + _print_array[A](actual) + \")\",\ntrue)\ntrue\n\nfun assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A],\nactual: ReadSeq[A],\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the contents of the 2 given ReadSeqs are equal ignoring order."} +{"id": "Pony/src-files-directory-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-builtin-stdin-_0.txt", "contents": "\n\n\n\n\n\n\nstdin.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/pony_check-Generators-_33.txt", "contents": "min: I8 val = call\nmax: I8 val = call\n\nReturns\u00b6\n\nGenerator[I8 val] box\n\n\ni16\u00b6\n[Source]\nCreate a generator for I16 values.\nfun box i16(\nmin: I16 val = call,\nmax: I16 val = call)\n: Generator[I16 val] box\n\nParameters\u00b6\n\nmin: I16 val = call\nmax: I16 val = call"} +{"id": "Pony/pony_bench-OverheadBenchmark-_5.txt", "contents": "after_iteration\u00b6\n[Source]\nfun ref after_iteration()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U8-_39.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-SignedInteger-_14.txt", "contents": "fun box div_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: A)\n: (A , A)\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_432.txt", "contents": "fun box sctp_pcb_flags_recvpeererr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvrcvinfo\u00b6\n[Source]\nfun box sctp_pcb_flags_recvrcvinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvsendfailevnt\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIILetters-_0.txt", "contents": "\n\n\n\n\n\n\nASCIILetters\u00b6\n[Source]\nprimitive val ASCIILetters\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIILetters val^\n\nReturns\u00b6\n\nASCIILetters val^"} +{"id": "Pony/itertools-Iter-_20.txt", "contents": "f: {(A!): (B^ | None) ?}[A, B] box\n\nReturns\u00b6\n\nIter[B] ref^\n\n\nflat_map[B: B]\u00b6\n[Source]\nReturn an iterator over the values of the iterators produced from the\napplication of the given function.\nExample\u00b6\nIter[String]([\"alpha\"; \"beta\"; \"gamma\"])\n.flat_map[U8]({(s: String): Iterator[U8] => s.values() })\n\na l p h a b e t a g a m m a\nfun ref flat_map[B: B](\nf: {(A!): Iterator[B] ?}[A, B] box)\n: Iter[B] ref^\n"} +{"id": "Pony/builtin-RuntimeOptions-_3.txt", "contents": "Can't be used with --ponyminthreads.\n\nvar ponysuspendthreshold: U32 val\u00b6\n[Source]\nAmount of idle time before a scheduler thread suspends itself to minimize\nresource consumption (max 1000 ms, min 1 ms).\nDefaults to 1 ms.\n\nvar ponycdinterval: U32 val\u00b6\n[Source]\nRun cycle detection every N ms (max 1000 ms, min 10 ms).\nDefaults to 100 ms.\n\nvar ponygcinitial: USize val\u00b6\n[Source]\nDefer garbage collection until an actor is using at least 2^N bytes.\nDefaults to 2^14.\n\nvar ponygcfactor: F64 val\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/src-net-udp_socket-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-pony_check-generator-_100.txt", "contents": "let result: SetIs[T] =\nSetIs[T].create(size).>union(\nIter[T^](gen.value_iter(rnd))\n.take(size)\n)\nlet shrink_iter: Iterator[SetIs[T]^] =\nIter[USize](CountdownIter(size, 0)) //Range(size, 0, -1))\n//.skip(1)\n.map_stateful[SetIs[T]^]({\n(s: USize): SetIs[T]^ =>\nSetIs[T].create(s).>union(\nIter[T^](gen.value_iter(rnd)).take(s)\n)\n})\n(consume result, shrink_iter)\nend)\n\nfun map_of[K: (Hashable #read & Equatable[K] #read), V](\ngen: Generator[(K, V)],\nmax: USize = 100)"} +{"id": "Pony/builtin-I8-_10.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_242.txt", "contents": "fun box ip_striphdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_tos\u00b6\n[Source]\nfun box ip_tos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_traffic_mgt_background\u00b6\n[Source]"} +{"id": "Pony/src-buffered-writer-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-net-tcp_connection-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/files-FileTruncate-_0.txt", "contents": "\n\n\n\n\n\n\nFileTruncate\u00b6\n[Source]\nprimitive val FileTruncate\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileTruncate val^\n\nReturns\u00b6\n\nFileTruncate val^"} +{"id": "Pony/files-FileLines-_0.txt", "contents": "\n\n\n\n\n\n\nFileLines\u00b6\n[Source]\nIterate over the lines in a file.\nReturns lines without trailing line breaks.\nAdvances the file cursor to the end of each line returned from next.\nThis class buffers the file contents to accumulate full lines. If the file\ndoes not contain linebreaks, the whole file content is read and buffered, which\nmight exceed memory resources. Take care.\nclass ref FileLines is\nIterator[String iso^] ref\n\nImplements\u00b6\n"} +{"id": "Pony/src-builtin-stdin-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-time-posix_date-_6.txt", "contents": "fun _negative_to_zero(value: I64): I64 =>\nif value > 0 then\nvalue\nelse\n0\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-String-_73.txt", "contents": "\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nU8 val ?\n\n\nu16\u00b6\n[Source]\nfun box u16(\nbase: U8 val = 0)\n: U16 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n"} +{"id": "Pony/src-builtin-signed-_75.txt", "contents": "end\n\nnew max_value() =>\nifdef ilp32 then\n0x7FFF_FFFF\nelse\n0x7FFF_FFFF_FFFF_FFFF\nend\n\nfun abs(): USize => if this < 0 then (-this).usize() else this.usize() end\n\nfun bit_reverse(): ISize =>\nifdef ilp32 then\n@\"llvm.bitreverse.i32\"(this.u32()).isize()\nelse\n@\"llvm.bitreverse.i64\"(this.u64()).isize()\nend\n\nfun bswap(): ISize =>\nifdef ilp32 then"} +{"id": "Pony/src-pony_test-pony_test-_49.txt", "contents": "try\n_records(id)?._result(pass, log)\n\nif not _no_prog then\n_env.out.print(\n_started.string() + \" test\" + _plural(_started)\n+ \" started, \" + _finished.string() + \" complete: \"\n+ _records(id)?.name + \" complete\")\nend\nend\n\nif _all_started and (_finished == _records.size()) then\n// All tests have completed\n_print_report()\nend\n\nbe _all_tests_applied() =>\n\"\"\"\nAll our tests have been handed to apply(), setup for finishing\n\"\"\""} +{"id": "Pony/src-net-tcp_connection-_95.txt", "contents": "`qty` is zero, the call can contain any amount of data. This has no effect\nif called in the `sent` notifier callback.\n\nErrors if `qty` exceeds the max buffer size as indicated by the\n`read_buffer_size` supplied when the connection was created.\n\"\"\"\n\nif qty <= _read_buffer_size then\nif not _in_sent then\n_expect = _notify.expect(this, qty)\n_read_buf_size()\nend\nelse\nerror\nend\n\nfun ref set_nodelay(state: Bool) =>\n\"\"\"\nTurn Nagle on/off. Defaults to on. This can only be set on a connected\nsocket."} +{"id": "Pony/1_classes_10.txt", "contents": "\n* What does the function return?\n\nIt returns the _old_ value of `_hunger_level`.\n\n__Wait, seriously? The _old_ value?__ Yes. In Pony, assignment is an expression rather than a statement. That means it has a result. This is true of a lot of languages, but they tend to return the _new_ value. In other words, given `a = b`, in most languages, the value of that is the value of `b`. But in Pony, the value of that is the _old_ value of `a`.\n\n__...why?__ It's called a \"destructive read\", and it lets you do awesome things with a capabilities-secure type system. We'll talk about that later. For now, we'll just mention that you can also use it to implement a _swap_ operation. In most languages, to swap the values of `a` and `b` you need to do something like:\n\n```pony\nvar temp = a\na = b\nb = temp\n```\n\nIn Pony, you can just do:\n\n```pony\na = b = a\n```"} +{"id": "Pony/src-builtin-real-_68.txt", "contents": "undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis <=~ y\n\nfun ge_unsafe(y: box->A): Bool =>\n\"\"\"\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis >=~ y\n\nfun gt_unsafe(y: box->A): Bool =>\n\"\"\"\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics."} +{"id": "Pony/random-SplitMix64-_13.txt", "contents": "\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\n[Source]\nfun ref real()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nshuffle[A: A]\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_38.txt", "contents": "// https://blogs.windows.com/windowsdeveloper/2016/12/02/symlinks-windows-10/\nvar privileges: _TokenPrivileges ref = _TokenPrivileges\nprivileges.privilege_count = 1\nprivileges.privileges_0.luid = luid\nprivileges.privileges_0.attributes = 0x00000002 // SE_PRIVILEGE_ENABLED\nret = @AdjustTokenPrivileges(token, U8(0), privileges,\nU32(0), USize(0), USize(0))\n@CloseHandle(token)\nif ret == 0 then\nreturn false\nend\n\n// now actually try to create the link\nlet flags: U32 = if FileInfo(this)?.directory then 3 else 0 end\nret = @CreateSymbolicLinkA(link_name.path.cstring(),\npath.cstring(), flags)\nret != 0\nelse\nfalse\nend"} +{"id": "Pony/ini-IniNoDelimiter-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: IniNoDelimiter val)\n: Bool val\n\nParameters\u00b6\n\nthat: IniNoDelimiter val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: U128 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nU128 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: U128 val^\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ISize-_5.txt", "contents": "\nISize val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-time-timer-_8.txt", "contents": "new iso create(env: Env) =>\n_env = env\n\nfun ref apply(timer: Timer, count: U64): Bool =>\n_env.out.print(_counter.string())\n_counter = _counter + 1\ntrue\n```\n\"\"\"\nvar _expiration: U64\nvar _interval: U64\nlet _notify: TimerNotify\nembed _node: ListNode[Timer]\n\nnew iso create(\nnotify: TimerNotify iso,\nexpiration: U64,\ninterval: U64 = 0)\n=>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_428.txt", "contents": "fun box sctp_pcb_flags_no_fragment()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_pdapievnt\u00b6\n[Source]\nfun box sctp_pcb_flags_pdapievnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_portreuse\u00b6\n[Source]"} +{"id": "Pony/files-FilePath-_6.txt", "contents": "starting with this one. The handler can control which subdirectories are\nexpanded by removing them from the dir_entries list.\nfun val walk(\nhandler: WalkHandler ref,\nfollow_links: Bool val = false)\n: None val\n\nParameters\u00b6\n\nhandler: WalkHandler ref\nfollow_links: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\ncanonical\u00b6\n[Source]\nReturn the equivalent canonical absolute path. Raise an error if there"} +{"id": "Pony/src-term-ansi_term-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/collections-RingBuffer-_4.txt", "contents": "\n\npush\u00b6\n[Source]\nAdd an element to the ring. If the ring is full, this will drop the oldest\nelement in the ring. Returns true if an element was dropped.\nfun ref push(\nvalue: A)\n: Bool val\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nBool val\n\n\nclear\u00b6"} +{"id": "Pony/format--index-_1.txt", "contents": "\nnew create(env: Env) =>\ntry\n(let x, let y) = (env.args(1)?.i32()?, env.args(2)?.i32()?)\nenv.out.print(disp(\"x\", x))\nenv.out.print(disp(\"y\", y))\nenv.out.print(disp(\"hex(x)\", x, FormatHex))\nenv.out.print(disp(\"hex(y)\", y, FormatHex))\nenv.out.print(disp(\"x * y\", x * y))\nelse\nlet exe = try env.args(0)? else \"fmt_example\" end\nenv.err.print(\"Usage: \" + exe + \" NUMBER1 NUMBER2\")\nend\n\nPublic Types\u00b6\n\ntype Align\nprimitive AlignCenter\nprimitive AlignLeft\nprimitive AlignRight"} +{"id": "Pony/builtin-Comparable-_4.txt", "contents": "fun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/3_arithmetic_2.txt", "contents": "## Pony's default Integer Arithmetic\n\nDoing arithmetic on integer types in Pony with the well known operators like `+`, `-`, `*`, `/` etc. tries to balance the needs for performance and correctness. All default arithmetic operations do not expose any undefined behaviour or error conditions. That means it handles both the cases for overflow/underflow and division by zero. Overflow/Underflow are handled with proper wrap around semantics, using one's complement on signed integers. In that respect we get behaviour like:\n\n```pony\n// unsigned wrap-around on overflow\nU32.max_value() + 1 == 0\n\n// signed wrap-around on overflow/underflow\nI32.min_value() - 1 == I32.max_value()\n```\n\nIn pony, the `+=`, `-=`, `*=` and `/=` is deprecated and users must explicitly write `i = i + 1` instead of `i += 1`.\n\nDivision by zero is a special case, which affects the division `/` and remainder `%` operators. In Mathematics, division by zero is undefined. In order to avoid either defining division as partial, throwing an error on division by zero or introducing undefined behaviour for that case, the _normal_ division is defined to be `0` when the divisor is `0`. This might lead to silent errors, when used without care. Choose [Partial and checked Arithmetic](#partial-and-checked-arithmetic) to detect division by zero.\n\nIn contrast to [Unsafe Arithmetic](#unsafe-integer-arithmetic) default arithmetic comes with a small runtime overhead because unlike the unsafe variants, it does detect and handle overflow and division by zero.\n\n---\n"} +{"id": "Pony/term-ANSI-_12.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\nyellow\u00b6\n[Source]\nYellow text.\nfun box yellow()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nblue\u00b6\n[Source]"} +{"id": "Pony/random-XorOshiro128StarStar-_9.txt", "contents": ": I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun ref ilong()"} +{"id": "Pony/net-OSSockOpt-_119.txt", "contents": "fun box ipctl_sendredirects()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_sourceroute\u00b6\n[Source]\nfun box ipctl_sourceroute()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_stats\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_8.txt", "contents": "[Source]\nfun box clz()\n: B\n\nReturns\u00b6\n\nB\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: B\n\nReturns\u00b6\n\nB\n\n\nclz_unsafe\u00b6"} +{"id": "Pony/src-pony_bench-_runner-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-files-file-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-pony_test-unit_test-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-TCPConnection-_11.txt", "contents": "conn.write((_destination_host + \"\\n\").array())\nconn.write((_destination_service + \"\\n\").array())\nwrapped.connected(conn)\n\nfun ref received(conn, data, times) => _wrapped.received(conn, data, times)\nfun ref connect_failed(conn: TCPConnection ref) => None\n\nactor tag TCPConnection is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nConnect via IPv4 or IPv6. If from is a non-empty string, the connection\nwill be made from the specified interface."} +{"id": "Pony/src-signals-sig-_15.txt", "contents": "end\n\nfun xfsz(): U32 =>\nifdef linux or bsd or osx then 25\nelse compile_error \"no SIGXFSZ\"\nend\n\nfun vtalrm(): U32 =>\nifdef linux or bsd or osx then 26\nelse compile_error \"no SIGVTALRM\"\nend\n\nfun prof(): U32 =>\nifdef linux or bsd or osx then 27\nelse compile_error \"no SIGPROF\"\nend\n\nfun winch(): U32 =>\nifdef linux or bsd or osx then 28\nelse compile_error \"no SIGWINCH\""} +{"id": "Pony/src-collections-persistent-list-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-UnsignedInteger-_1.txt", "contents": "new val create(\nvalue: A)\n: Real[A] val^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nReal[A] val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-collections-persistent-list-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/pony_bench-MicroBenchmark-_0.txt", "contents": "\n\n\n\n\n\n\nMicroBenchmark\u00b6\n[Source]\nSynchronous benchmarks must provide this trait. The apply method defines a\nsingle iteration in a sample. Setup and Teardown are defined by the before\nand after methods respectively. The before method runs before a sample\nof benchmarks and after runs after the all iterations in the sample have\ncompleted. If your benchmark requires setup and/or teardown to occur beween\neach iteration of the benchmark, then you can use before_iteration and\nafter_iteration methods respectively that run before/after each iteration.\ntrait iso MicroBenchmark\n\nPublic Functions\u00b6\nname\u00b6"} +{"id": "Pony/src-cli-command_help-_14.txt", "contents": "if _spec.descr().size() > 0 then\nw.write(\"\\n\")\nw.write(_spec.descr() + \"\\n\")\nend\n\nlet options = _all_options()\nif options.size() > 0 then\nw.write(\"\\nOptions:\\n\")\n_write_options(w, options)\nend\nif _spec.commands().size() > 0 then\nw.write(\"\\nCommands:\\n\")\n_write_commands(w)\nend\nlet args = _spec.args()\nif args.size() > 0 then\nw.write(\"\\nArgs:\\n\")\n_write_args(w, args)\nend\n"} +{"id": "Pony/net-OSSockOpt-_19.txt", "contents": "fun box ipproto_ggp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_gmtp\u00b6\n[Source]\nfun box ipproto_gmtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_gre\u00b6\n[Source]"} +{"id": "Pony/builtin-Equatable-_0.txt", "contents": "\n\n\n\n\n\n\nEquatable[A: Equatable[A] #read]\u00b6\n[Source]\ninterface ref Equatable[A: Equatable[A] #read]\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/files-FilePermissionDenied-_0.txt", "contents": "\n\n\n\n\n\n\nFilePermissionDenied\u00b6\n[Source]\nprimitive val FilePermissionDenied\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FilePermissionDenied val^\n\nReturns\u00b6\n\nFilePermissionDenied val^"} +{"id": "Pony/builtin-I64-_9.txt", "contents": "fun box min(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: I64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-PropertyHelper-_13.txt", "contents": "assert_array_eq[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the contents of the 2 given ReadSeqs are equal.\nfun box assert_array_eq[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A] box,\nactual: ReadSeq[A] box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nexpect: ReadSeq[A] box\nactual: ReadSeq[A] box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/builtin-ILong-_26.txt", "contents": "Parameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nILong val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: ULong val)\n: ILong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-ForAll4-_2.txt", "contents": ": None val ?\n\nParameters\u00b6\n\nprop: {(T1, T2, T3, T4, PropertyHelper) ?}[T1, T2, T3, T4] val\n\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/src-buffered-writer-_16.txt", "contents": "* `list_size` - the number of items in the following list of items\nas a big-endian 32-bit integer\n* zero or more items of the following data:\n* a big-endian 64-bit floating point number\n* a string that starts with a big-endian 32-bit integer that\nspecifies the length of the string, followed by a number of\nbytes that represent the string\n\nA message would be something like this:\n\n```\n[message_length][list_size][float1][string1][float2][string2]...\n```\n\nThe following program uses a write buffer to encode an array of\ntuples as a message of this type:\n\n```pony\nuse \"buffered\"\n"} +{"id": "Pony/src-net-udp_socket-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/builtin-U32-_5.txt", "contents": "\nU32 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-float-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-encode-base64-base64-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-pony_check-generator-_98.txt", "contents": "Iter[T^](_gen.value_iter(rnd))\n.take(size)\n)\nlet shrink_iter: Iterator[Set[T]^] =\nIter[USize](CountdownIter(size, 0)) // Range(size, 0, -1))\n//.skip(1)\n.map_stateful[Set[T]^]({\n(s: USize): Set[T]^ =>\nSet[T].create(s).>union(\nIter[T^](_gen.value_iter(rnd)).take(s)\n)\n})\n(consume result, shrink_iter)\nend)\n\nfun set_is_of[T](\ngen: Generator[T],\nmax: USize = 100)\n: Generator[SetIs[T]]\n=>"} +{"id": "Pony/builtin-String-_26.txt", "contents": "i: USize val\nvalue: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nat_offset\u00b6\n[Source]\nReturns the byte at the given offset. Raise an error if the offset is out\nof bounds.\nfun box at_offset(\noffset: ISize val)\n: U8 val ?\n\nParameters\u00b6\n\noffset: ISize val\n"} +{"id": "Pony/builtin-Array-_42.txt", "contents": "seq: (ReadSeq[A] box & ReadElement[A^] box)\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nconcat\u00b6\n[Source]\nAdd len iterated elements to the end of the array, starting from the given\noffset.\nfun ref concat(\niter: Iterator[A^] ref,\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-float-_41.txt", "contents": "fun i128_unsafe(): I128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nf64_unsafe().i128_unsafe()\n\nfun u128_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nf64_unsafe().u128_unsafe()\n\nprimitive F64 is FloatingPoint[F64]\nnew create(value: F64 = 0) => value\nnew pi() => 3.14159265358979323846\nnew e() => 2.71828182845904523536\n\nnew _nan() => compile_intrinsic"} +{"id": "Pony/builtin-U64-_28.txt", "contents": "fun box shr_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: U64 val)\n: U64 val\n\nParameters\u00b6"} +{"id": "Pony/combining-capabilities_10.txt", "contents": "# Writing to the field of an object\n\nLike reading the field of an object, writing to a field depends on the reference capability of the object reference being stored and the reference capability of the origin object containing the field. The reference capability of the object being stored must not violate the guarantees made by the origin object's reference capability. For example, a `val` object reference can be stored in an `iso` origin. This is because the `val` reference capability guarantees that no alias to that object exists which could violate the guarantees that the `iso` capability makes.\n\nHere's a simplified version of the table above that shows which reference capabilities can be stored in the field of an origin object.\n\n---\n\n| ◁ | `iso` object | `trn` object | `ref` object | `val` object | `box` object | `tag` object |\n| -------------- | ---------- | ---------- | ---------- | ---------- | ---------- | ---------- |\n| __`iso` origin__ | ✔ | | | ✔ | | ✔ |\n| __`trn` origin__ | ✔ | ✔ | | ✔ | | ✔ |\n| __`ref` origin__ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |\n| __`val` origin__ | | | | | | |\n| __`box` origin__ | | | | | | |\n| __`tag` origin__ | | | | | | |\n\n---\n\nThe bottom half of this chart is empty, since only origins with a mutable capability can have their fields modified.\n"} +{"id": "Pony/pony_check-Poperator-_0.txt", "contents": "\n\n\n\n\n\n\nPoperator[T: T]\u00b6\n[Source]\nIterate over a Seq descructively by poping its elements.\nOnce has_next() returns false, the Seq is empty.\nNominee for the annual pony class-naming awards.\nclass ref Poperator[T: T] is\nIterator[T^] ref\n\nImplements\u00b6\n\nIterator[T^] ref\n\n"} +{"id": "Pony/src-builtin-float-_30.txt", "contents": "use @tan[F64](x: F64)\nuse @cosh[F64](x: F64)\nuse @sinh[F64](x: F64)\nuse @tanh[F64](x: F64)\nuse @acos[F64](x: F64)\nuse @asin[F64](x: F64)\nuse @atan[F64](x: F64)\nuse @atan2[F64](x: F64, y: F64)\nuse @acosh[F64](x: F64)\nuse @asinh[F64](x: F64)\nuse @atanh[F64](x: F64)\nuse @\"llvm.copysign.f32\"[F32](x: F32, sign: F32)\nuse @\"llvm.copysign.f64\"[F64](x: F64, sign: F64)\nuse @frexp[F64](value: F64, exponent: Pointer[U32])\nuse @ldexpf[F32](value: F32, exponent: I32)\nuse @ldexp[F64](value: F64, exponent: I32)\n\nprimitive F32 is FloatingPoint[F32]\nnew create(value: F32 = 0) => value\nnew pi() => 3.14159265358979323846"} +{"id": "Pony/src-term-ansi-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/files-FileExists-_2.txt", "contents": "fun box ne(\nthat: FileExists val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileExists val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-serialise-serialise-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\"\"\""} +{"id": "Pony/src-net-tcp_connection-_75.txt", "contents": "actor Main\nnew create(env: Env) =>\nTCPConnection(TCPConnectAuth(env.root),\nrecover ThrowItAway end, \"\", \"7669\")\n```\n\nIn general, unless you have a very specific use case, we strongly advise that\nyou don't implement a load shedding scheme where you drop data.\n"} +{"id": "Pony/src-buffered-writer-_25.txt", "contents": "\"\"\"\nu64_le(data.u64())\n\nfun ref i64_be(data: I64) =>\n\"\"\"\nWrite an I64 to the buffer in big-endian byte order.\n\"\"\"\nu64_be(data.u64())\n\nfun ref f64_le(data: F64) =>\n\"\"\"\nWrite an F64 to the buffer in little-endian byte order.\n\"\"\"\nu64_le(data.bits())\n\nfun ref f64_be(data: F64) =>\n\"\"\"\nWrite an F64 to the buffer in big-endian byte order.\n\"\"\"\nu64_be(data.bits())"} +{"id": "Pony/serialise-Serialised-_3.txt", "contents": "auth: DeserialiseAuth val)\n: Any iso^ ?\n\nParameters\u00b6\n\nauth: DeserialiseAuth val\n\nReturns\u00b6\n\nAny iso^ ?\n\n\noutput\u00b6\n[Source]\nA caller with OutputSerialisedAuth can gain access to the underlying bytes\nthat contain the serialised data. This can be used to write those bytes to,\nfor example, a file or socket.\nfun box output(\nauth: OutputSerialisedAuth val)\n: Array[U8 val] val"} +{"id": "Pony/itertools--index-_2.txt", "contents": ".run()\n\nOutput:\n2\n4\n6\n\nPublic Types\u00b6\n\nclass Iter\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/src-collections-persistent-map-_17.txt", "contents": "\nfun has_next(): Bool => _pairs.has_next()\n\nfun ref next(): K ? => _pairs.next()?._1\n\nclass MapValues[K: Any #share, V: Any #share, H: mut.HashFunction[K] val]\nembed _pairs: MapPairs[K, V, H]\n\nnew create(m: HashMap[K, V, H]) => _pairs = MapPairs[K, V, H](m)\n\nfun has_next(): Bool => _pairs.has_next()\n\nfun ref next(): val->V ? => _pairs.next()?._2\n\ninterface _MapIter[K: Any #share, V: Any #share, H: mut.HashFunction[K] val] is\nIterator[(_MapEntry[K, V, H] | _MapIter[K, V, H])]\n\nclass MapPairs[K: Any #share, V: Any #share, H: mut.HashFunction[K] val]\nembed _stack: Array[_MapIter[K, V, H]] = []\n"} +{"id": "Pony/builtin-Array-_7.txt", "contents": "\nfrom_cpointer\u00b6\n[Source]\nCreate an array from a C-style pointer and length. The contents are not\ncopied. This must be done only with C-FFI functions that return\npony_alloc'd memory. If a null pointer is given then an empty array\nis returned.\nnew ref from_cpointer(\nptr: Pointer[A] ref,\nlen: USize val,\nalloc: USize val = 0)\n: Array[A] ref^\n\nParameters\u00b6\n\nptr: Pointer[A] ref\nlen: USize val\nalloc: USize val = 0\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_47.txt", "contents": "fun box ipproto_rccmon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_rdp\u00b6\n[Source]\nfun box ipproto_rdp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_reserved_253\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_19.txt", "contents": "(U16 val , U16 val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nshr\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_458.txt", "contents": "fun box sctp_shutdown_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_ack_sent\u00b6\n[Source]\nfun box sctp_shutdown_ack_sent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_shutdown_complete\u00b6\n[Source]"} +{"id": "Pony/generic-constraints_2.txt", "contents": "```pony\nclass Foo[A: Any #read]\nvar _c: A\n\nnew create(c: A) =>\n_c = c\n\nfun get(): this->A => _c\n\nfun ref set(c: A) => _c = c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo[String ref](recover ref \"hello\".clone() end)\nenv.out.print(a.get().string())\n\nlet b = Foo[String val](\"World\")\nenv.out.print(b.get().string())\n```\n"} +{"id": "Pony/time-TimerNotify-_1.txt", "contents": "last time your timer fired. Non 1 values for a timer are rare and indicate\na system under heavy load.\nReturn true to reschedule the timer (if it has an interval), or\nfalse to cancel the timer (even if it has an interval).\nfun ref apply(\ntimer: Timer ref,\ncount: U64 val)\n: Bool val\n\nParameters\u00b6\n\ntimer: Timer ref\ncount: U64 val\n\nReturns\u00b6\n\nBool val\n\n\ncancel\u00b6"} +{"id": "Pony/builtin-SignedInteger-_35.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileChmod-_0.txt", "contents": "\n\n\n\n\n\n\nFileChmod\u00b6\n[Source]\nprimitive val FileChmod\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileChmod val^\n\nReturns\u00b6\n\nFileChmod val^"} +{"id": "Pony/pony_check-PropertyHelper-_19.txt", "contents": "\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n\nNone val\n\n\ncomplete\u00b6\n[Source]\nComplete an asynchronous property successfully.\nOnce this method is called the property\nis considered successful or failing\ndepending on the value of the parameter success.\nFor more fine grained control over completing or failing\na property that consists of many steps, consider using\nexpect_action, complete_action and fail_action.\nfun box complete("} +{"id": "Pony/collections-HashSet-_13.txt", "contents": "\nHashSet[this->A!, K] ref^\n\n\nop_and[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nCreate a set with the elements that are in both this and that.\nfun box op_and[optional K: HashFunction[this->A!] val](\nthat: this->HashSet[A, H] ref)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6\n\nthat: this->HashSet[A, H] ref\n\nReturns\u00b6\n\nHashSet[this->A!, K] ref^\n\n"} +{"id": "Pony/src-signals-sig-_11.txt", "contents": "\nfun bus(): U32 =>\nifdef bsd or osx then 10\nelseif linux then 7\nelse compile_error \"no SIGBUS\"\nend\n\nfun segv(): U32 =>\nifdef linux or bsd or osx then 11\nelse compile_error \"no SIGSEGV\"\nend\n\nfun sys(): U32 =>\nifdef bsd or osx then 12\nelseif linux then 31\nelse compile_error \"no SIGSYS\"\nend\n\nfun pipe(): U32 =>\nifdef linux or bsd or osx then 13"} +{"id": "Pony/files-FileEOF-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FileEOF val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileEOF val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/pony_bench--index-_3.txt", "contents": "\nnew iso create(ns: U64) =>\n_ns = ns\n\nfun name(): String =>\n\"_Timer (\" + _ns.string() + \" ns)\"\n\nfun apply(c: AsyncBenchContinue) =>\n_ts(Timer(\nobject iso is TimerNotify\nfun apply(timer: Timer, count: U64 = 0): Bool =>\n// signal completion of async benchmark iteration when timer fires\nc.complete()\nfalse\nend,\n_ns))\n\nBy default, the results are printed to stdout like so:\nBenchmark results will have their mean and median adjusted for overhead.\nYou may disable this with --noadjust."} +{"id": "Pony/pony_check-ASCIILettersUpper-_0.txt", "contents": "\n\n\n\n\n\n\nASCIILettersUpper\u00b6\n[Source]\nprimitive val ASCIILettersUpper\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIILettersUpper val^\n\nReturns\u00b6\n\nASCIILettersUpper val^"} +{"id": "Pony/src-promises-promise-_22.txt", "contents": "\"\"\"\nA promise to eventually produce a result of type A. This promise can either\nbe fulfilled or rejected.\n\nAny number of promises can be chained after this one.\n\"\"\"\nvar _value: (_Pending | _Reject | A) = _Pending\nembed _list: Array[_IThen[A]] = _list.create()\n\nbe apply(value: A) =>\n\"\"\"\nFulfill the promise.\n\"\"\"\nif _value isnt _Pending then\nreturn\nend\n\n_value = value\n\nfor f in _list.values() do"} +{"id": "Pony/src-files-file-_0.txt", "contents": "\n\n\n\n\n\n\nfile.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-cli-command_parser-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-signals-sig-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-U8-_22.txt", "contents": "(U8 val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_58.txt", "contents": "1152\n1153\n1154\n1155\n1156\n1157\n1158\n1159\n1160\n1161\n1162\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171"} +{"id": "Pony/src-collections-persistent-list-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/src-files-file_caps-_7.txt", "contents": "| FileTime\n| FileTruncate\n| FileWrite\n| FileExec\n),\nU32 ]\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-GenObj-_0.txt", "contents": "\n\n\n\n\n\n\nGenObj[T: T]\u00b6\n[Source]\ntrait box GenObj[T: T]\n\nPublic Functions\u00b6\ngenerate\u00b6\n[Source]\nfun box generate(\nrnd: Randomness ref)\n: (T^ | (T^ , Iterator[T^] ref)) ?\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-real-_54.txt", "contents": "Subtract `y` from this integer and return the result and a flag indicating overflow.\n\"\"\"\nfun mulc(y: A): (A, Bool)\n\"\"\"\nMultiply `y` with this integer and return the result and a flag indicating overflow.\n\"\"\"\nfun divc(y: A): (A, Bool)\n\"\"\"\nDivide this integer by `y` and return the result and a flag indicating overflow or division by zero.\n\"\"\"\nfun remc(y: A): (A, Bool)\n\"\"\"\nCalculate the remainder of this number divided by `y` and return the result and a flag indicating division by zero or overflow.\n\nThe result will have the sign of the dividend.\n\"\"\"\nfun fldc(y: A): (A, Bool)\n\"\"\"\nDivide this integer by `y` and return the result, rounded towards negative infinity and a flag indicating overflow or division by zero.\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_190.txt", "contents": "fun box ipx_special_none()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_spxgetconnectionstatus\u00b6\n[Source]\nfun box ipx_spxgetconnectionstatus()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_stopfilterptype\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_69.txt", "contents": "1372\n1373\n1374\n1375\n1376\n1377\n1378\n1379\n1380\n1381\n1382\n1383\n1384\n1385\n1386\n1387\n1388\n1389\n1390\n1391"} +{"id": "Pony/net-OSSockOpt-_576.txt", "contents": "fun box tcp_keepintvl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_linger2\u00b6\n[Source]\nfun box tcp_linger2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_maxburst\u00b6\n[Source]"} +{"id": "Pony/src-time-timers-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-I64-_20.txt", "contents": "fun box sub_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6"} +{"id": "Pony/calling-c_7.txt", "contents": "## Working with Structs: from Pony to C\n\nLike we mentioned above, Pony classes and structs correspond directly to pointers to the class or struct in C. This means that in most cases we won't need to use the `addressof` operator when passing struct types to C. For example, let's imagine we want to use the `writev` function from Pony on Linux:\n\n```pony\n// In C: ssize_t writev(int fd, const struct iovec *iov, int iovcnt)\nuse @writev[USize](fd: U32, iov: IOVec tag, iovcnt: I32)\n\n// In C:\n// struct iovec {\n// void *iov_base; /* Starting address */\n// size_t iov_len; /* Number of bytes to transfer */\n// };\nstruct IOVec\nvar base: Pointer[U8] tag = Pointer[U8]\nvar len: USize = 0\n\nlet data = \"Hello from Pony!\"\nvar iov = IOVec\niov.base = data.cpointer()"} +{"id": "Pony/files-Path-_13.txt", "contents": "path: String val\n\nReturns\u00b6\n\nString val\n\n\nfrom_slash\u00b6\n[Source]\nChanges each / in the path to the OS specific separator.\nfun box from_slash(\npath: String val)\n: String val\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_92.txt", "contents": "fun box dso_services()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_stream\u00b6\n[Source]\nfun box dso_stream()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_address\u00b6\n[Source]"} +{"id": "Pony/8_sugar_1.txt", "contents": "# Apply\n\nMany Pony classes have a function called `apply` which performs whatever action is most common for that type. Pony allows you to omit the word `apply` and just attempt to do a call directly on the object. So:\n\n```pony\nvar foo = Foo.create()\nfoo()\n```\n\nbecomes:\n\n```pony\nvar foo = Foo.create()\nfoo.apply()\n```\n\nAny required arguments can be added just like normal method calls.\n\n```pony\nvar foo = Foo.create()"} +{"id": "Pony/src-pony_check-property_helper-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-ILong-_56.txt", "contents": "\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/2_primitives_4.txt", "contents": "# Primitive initialisation and finalisation\n\nPrimitives can have two special functions, `_init` and `_final`. `_init` is called before any actor starts. `_final` is called after all actors have terminated. The two functions take no parameter. The `_init` and `_final` functions for different primitives always run sequentially.\n\nA common use case for this is initialising and cleaning up C libraries without risking untimely use by an actor.\n"} +{"id": "Pony/src-pony_check-randomness-_17.txt", "contents": "_random.u128()\nelseif min > U64.max_value().u128() then\n// both above U64 range - chose random low 64 bits\n(u64((min >> 64).u64(), (max >> 64).u64()).u128() << 64) or u64().u128()\nelseif max > U64.max_value().u128() then\n// min below U64 max value\nlet high = (u64((min >> 64).u64(), (max >> 64).u64()).u128() << 64)\nlet low =\nif high > 0 then\n// number will be bigger than U64 max anyway, so chose a random lower u64\nu64().u128()\nelse\n// number <= U64 max, so chose lower u64 while considering requested range min\nu64(min.u64(), U64.max_value()).u128()\nend\nhigh or low\nelse\n// range within u64 range\nu64(min.u64(), max.u64()).u128()\nend"} +{"id": "Pony/pony_check-Generators-_42.txt", "contents": "max: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nascii_numeric\u00b6\n[Source]\nCreate a generator for strings of numeric ASCII characters,\nwith a minimum length of min (default: 0)\nand a maximum length of max (default: 100).\nfun box ascii_numeric(\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0"} +{"id": "Pony/net-OSSockOpt-_433.txt", "contents": "fun box sctp_pcb_flags_recvsendfailevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_recvshutdownevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_recvshutdownevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_socket_allgone\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_258.txt", "contents": "fun box mrt_api_support()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_assert\u00b6\n[Source]\nfun box mrt_assert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_del_bw_upcall\u00b6\n[Source]"} +{"id": "Pony/term-Readline-_5.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\ndown\u00b6\n[Source]\nNext line.\nfun ref down(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/signals--index-_2.txt", "contents": "Unlike a TCPConnection and other forms of input receiving, creating a\nSignalHandler will not keep your program running. As such, you are not\nrequired to call dispose on your signal handlers in order to shutdown your\nprogram.\nPublic Types\u00b6\n\nprimitive Sig\nactor SignalHandler\ninterface SignalNotify\nprimitive SignalRaise\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-read_seq-_3.txt", "contents": "\"\"\"\nfun apply(i: USize): A ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-udp_socket-_43.txt", "contents": "_event = AsioEvent.none()\nend\n\nbe _read_again() =>\n\"\"\"\nResume reading.\n\"\"\"\nif not _closed then\n_pending_reads()\nend\n\nfun ref _pending_reads() =>\n\"\"\"\nRead while data is available, guessing the next packet length as we go. If\nwe read 4 kb of data, send ourself a resume message and stop reading, to\navoid starving other actors.\n\"\"\"\nifdef not windows then\ntry\nvar sum: USize = 0"} +{"id": "Pony/src-files-auth-_0.txt", "contents": "\n\n\n\n\n\n\nauth.pony\n\n1\n2\n3primitive FileAuth\nnew create(from: AmbientAuth) =>\nNone\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_26.txt", "contents": "_cur_line = _cur_line - 1\n_edit = _history(_cur_line)?.clone()\nend_key()\nend\nend\n\nfun ref down(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nNext line.\n\"\"\"\ntry\nif _cur_line < (_history.size() - 1) then\n_cur_line = _cur_line + 1\n_edit = _history(_cur_line)?.clone()\nelse\n_cur_line = _history.size()\n_edit.clear()\nend\n\nend_key()"} +{"id": "Pony/src-collections-persistent-vec-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/net-OSSockOpt-_538.txt", "contents": "fun box tcpci_flag_lossrecovery()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_flag_reordering_detected\u00b6\n[Source]\nfun box tcpci_flag_reordering_detected()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_opt_ecn\u00b6\n[Source]"} +{"id": "Pony/src-collections-range-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_check-generator-_45.txt", "contents": "892\n893\n894\n895\n896\n897\n898\n899\n900\n901\n902\n903\n904\n905\n906\n907\n908\n909\n910\n911"} +{"id": "Pony/collections-persistent-Nil-_5.txt", "contents": "\n\ntail\u00b6\n[Source]\nReturns an error, since Nil has no tail.\nfun box tail()\n: (Cons[A] val | Nil[A] val) ?\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val) ?\n\n\nreverse\u00b6\n[Source]\nThe reverse of the empty list is the empty list.\nfun box reverse()\n: Nil[A] val\n\nReturns\u00b6"} +{"id": "Pony/cli-CommandSpec-_2.txt", "contents": "\nReturns\u00b6\n\nCommandSpec ref^ ?\n\n\nleaf\u00b6\n[Source]\nCreates a command spec that can accept options and arguments, but not child\ncommands.\nnew ref leaf(\nname': String val,\ndescr': String val = \"\",\noptions': Array[OptionSpec val] box = call,\nargs': Array[ArgSpec val] box = call)\n: CommandSpec ref^ ?\n\nParameters\u00b6\n\nname': String val"} +{"id": "Pony/net-UDPSocket-_7.txt", "contents": "\nParameters\u00b6\n\nauth: UDPAuth val\nnotify: UDPNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nsize: USize val = 1024\n\nReturns\u00b6\n\nUDPSocket tag^\n\n\nPublic Behaviours\u00b6\nwrite\u00b6\n[Source]\nWrite a single sequence of bytes.\nbe write(\ndata: (String val | Array[U8 val] val),"} +{"id": "Pony/promises-Reject-_0.txt", "contents": "\n\n\n\n\n\n\nReject[A: Any #share]\u00b6\n[Source]\nA function on A that is called when a promise is rejected.\ninterface iso Reject[A: Any #share]\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply()\n: A ?\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-ASCIILettersLower-_2.txt", "contents": "\nthat: ASCIILettersLower val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIILettersLower val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIILettersLower val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ISize-_60.txt", "contents": "\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-ASCIIWhiteSpace-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIWhiteSpace\u00b6\n[Source]\nprimitive val ASCIIWhiteSpace\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIWhiteSpace val^\n\nReturns\u00b6\n\nASCIIWhiteSpace val^"} +{"id": "Pony/src-pony_test-test_helper-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-process-_process-_32.txt", "contents": "let pid: I32\n\nnew create(\npath: String,\nargs: Array[String] val,\nvars: Array[String] val,\nwdir: (FilePath | None),\nerr: _Pipe,\nstdin: _Pipe,\nstdout: _Pipe,\nstderr: _Pipe) ?\n=>\n// Prepare argp and envp ahead of fork() as it's not safe to allocate in\n// the child after fork() is called.\nlet argp = _make_argv(args)\nlet envp = _make_argv(vars)\n// Fork the child process, handling errors and the child fork case.\npid = @fork()\nmatch pid\n| -1 => error"} +{"id": "Pony/random-Random-_0.txt", "contents": "\n\n\n\n\n\n\nRandom\u00b6\n[Source]\nThe Random trait should be implemented by all random number generators. The\nonly method you need to implement is fun ref next(): 64. Once that method\nhas been implemented, the Random trait provides default implementations of\nconversions to other number types.\ntrait ref Random\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed."} +{"id": "Pony/net-OSSockOpt-_41.txt", "contents": "fun box ipproto_nsp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_nvpii\u00b6\n[Source]\nfun box ipproto_nvpii()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_old_divert\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Lists-_3.txt", "contents": "\nParameters\u00b6\n\narr: Array[val->A] ref\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\nfrom\u00b6\n[Source]\nBuilds a new list from an iterator\nfun box from(\niter: Iterator[val->A] ref)\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\niter: Iterator[val->A] ref"} +{"id": "Pony/pony_test-TestHelper-_0.txt", "contents": "\n\n\n\n\n\n\nTestHelper\u00b6\n[Source]\nPer unit test class that provides control, logging and assertion functions.\nEach unit test is given a TestHelper when it is run. This is val and so can\nbe passed between methods and actors within the test without restriction.\nThe assertion functions check the relevant condition and mark the test as a\nfailure if appropriate. The success or failure of the condition is reported\nback as a Bool which can be checked if a different code path is needed when\nthat condition fails.\nAll assert functions take an optional message argument. This is simply a\nstring that is printed as part of the error message when the condition fails.\nIt is intended to aid identifying what failed.\nclass val TestHelper"} +{"id": "Pony/src-assert-assert-_2.txt", "contents": "32\n33\"\"\""} +{"id": "Pony/src-collections-list-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-net-dns-_5.txt", "contents": "service: Pointer[U8] tag)\nuse @pony_os_getaddr[None](addr: Pointer[None] tag, ipaddr: NetAddress tag)\nuse @pony_os_nextaddr[Pointer[U8]](addr: Pointer[None] tag)\nuse @freeaddrinfo[None](addr: Pointer[None] tag)\nuse @pony_os_host_ip4[Bool](host: Pointer[U8] tag)\nuse @pony_os_host_ip6[Bool](host: Pointer[U8] tag)\n\nprimitive DNS\n\"\"\"\nHelper functions for resolving DNS queries.\n\"\"\"\nfun apply(auth: DNSAuth, host: String, service: String)\n: Array[NetAddress] iso^\n=>\n\"\"\"\nGets all IPv4 and IPv6 addresses for a host and service.\n\"\"\"\n_resolve(auth, 0, host, service)\n\nfun ip4(auth: DNSAuth, host: String, service: String)"} +{"id": "Pony/src-buffered-reader-_67.txt", "contents": "else\n// single array did not have all the bytes needed\nu8()?.u128() or (u8()?.u128() << 8) or\n(u8()?.u128() << 16) or (u8()?.u128() << 24) or\n(u8()?.u128() << 32) or (u8()?.u128() << 40) or\n(u8()?.u128() << 48) or (u8()?.u128() << 56) or\n(u8()?.u128() << 64) or (u8()?.u128() << 72) or\n(u8()?.u128() << 80) or (u8()?.u128() << 88) or\n(u8()?.u128() << 96) or (u8()?.u128() << 104) or\n(u8()?.u128() << 112) or (u8()?.u128() << 120)\nend\nelse\nerror\nend\n\nfun ref i128_be(): I128 ? =>\n\"\"\"\nGet a big-endian I129.\n\"\"\"\nu128_be()?.i128()"} +{"id": "Pony/pony_check-Generators-_27.txt", "contents": "\n\nu16\u00b6\n[Source]\ncreate a generator for U16 values\nfun box u16(\nmin: U16 val = call,\nmax: U16 val = call)\n: Generator[U16 val] box\n\nParameters\u00b6\n\nmin: U16 val = call\nmax: U16 val = call\n\nReturns\u00b6\n\nGenerator[U16 val] box\n\n"} +{"id": "Pony/src-net-tcp_connection-_100.txt", "contents": "if _pending_writes() then\n// Sent all data. Release backpressure.\n_release_backpressure()\nend\nend\nend\n\nif AsioEvent.readable(flags) then\n_readable = true\n_complete_reads(arg)\n_pending_reads()\nend\n\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(event)\n_event = AsioEvent.none()\nend\n\n_try_shutdown()\nend"} +{"id": "Pony/files-Path-_1.txt", "contents": "\nPath val^\n\n\nPublic Functions\u00b6\nis_sep\u00b6\n[Source]\nDetermine if a byte is a path separator.\nfun box is_sep(\nc: U8 val)\n: Bool val\n\nParameters\u00b6\n\nc: U8 val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/whitespace_4.txt", "contents": "# Docstrings\n\nIncluding documentation in your code makes you awesome. If you do it, everyone will love you.\n\nPony makes it easy by allowing you to put a __docstring__ on every type, field, or method. Just put a string literal right after declaring the type or field, or right after the `=>` of a method, before writing the body. The compiler will know what to do with them.\n\nFor traits and interfaces that have methods without bodies, you can put the docstring after the method declaration, even though there is no `=>`.\n\nBy convention, a docstring should be a triple-quoted string, and it should use Markdown for any formatting.\n\n```pony\nactor Main\n\"\"\"\nThis is documentation for my Main actor\n\"\"\"\n\nvar count: USize = 0\n\"\"\"\nThis is documentation for my count field\n\"\"\""} +{"id": "Pony/src-builtin-source_loc-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30interface val SourceLoc\n\"\"\""} +{"id": "Pony/src-collections-list-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_test-pony_test-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-U32-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_16.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\n(I8 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_lines-_0.txt", "contents": "\n\n\n\n\n\n\nfile_lines.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/buffered-Reader-_0.txt", "contents": "\n\n\n\n\n\n\nReader\u00b6\n[Source]\nStore network data and provide a parsing interface.\nReader provides a way to extract typed data from a sequence of\nbytes. The Reader manages the underlying data structures to\nprovide a read cursor over a contiguous sequence of bytes. It is\nuseful for decoding data that is received over a network or stored\nin a file. Chunk of bytes are added to the Reader using the\nappend method, and typed data is extracted using the getter\nmethods.\nFor example, suppose we have a UDP-based network data protocol where\nmessages consist of the following:\n"} +{"id": "Pony/builtin-F64-_11.txt", "contents": "I16 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nceil\u00b6\n[Source]\nfun box ceil()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-term-ansi_term-_20.txt", "contents": "var row: U16 = 0\nvar col: U16 = 0\nvar xpixel: U16 = 0\nvar ypixel: U16 = 0\n\nprimitive _EscapeNone\nprimitive _EscapeStart\nprimitive _EscapeSS3\nprimitive _EscapeCSI\nprimitive _EscapeMod\n\ntype _EscapeState is\n( _EscapeNone\n| _EscapeStart\n| _EscapeSS3\n| _EscapeCSI\n| _EscapeMod\n)\n\nclass _TermResizeNotify is SignalNotify"} +{"id": "Pony/src-files-directory-_43.txt", "contents": "\nfun set_time(atime: (I64, I64), mtime: (I64, I64)): Bool =>\n\"\"\"\nSet the last access and modification times of the directory to the given\nvalues.\n\"\"\"\n_FileDes.set_time(_fd, path, atime, mtime)\n\nfun infoat(target: String): FileInfo ? =>\n\"\"\"\nReturn a FileInfo for some path relative to this directory.\n\"\"\"\nif\nnot path.caps(FileStat)\nor not path.caps(FileLookup)\nor (_fd == -1)\nthen\nerror\nend\n"} +{"id": "Pony/random--index-_0.txt", "contents": "\n\n\n\n\n\n\nRandom package\u00b6\nThe Random package provides support generating random numbers. The package\nprovides random number generators you can use in your code, a dice roller and\na trait for implementing your own random number generator.\nIf your application does not require a specific generator, use Rand.\nSeed values can contain up to 128 bits of randomness in the form of two U64s.\nA common non-cryptographically secure way to seed a generator is with\nTime.now.\nlet rand = Rand\nlet n = rand.next()\n\nPublic Types\u00b6\n"} +{"id": "Pony/pony_check-ASCIIAll-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIAll\u00b6\n[Source]\nRepresents all ASCII characters,\nexcluding the NUL (\\x00) character for its special treatment in C strings.\nprimitive val ASCIIAll\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ASCIIAll val^\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-float-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-directory-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-term-ansi_term-_38.txt", "contents": "\"\"\"\nPass a partial or unrecognised escape sequence to the notifier.\n\"\"\"\nfor c in _esc_buf.values() do\n_notify(this, c)\nend\n\n_esc_clear()\n\nfun ref _esc_clear() =>\n\"\"\"\nClear the escape state.\n\"\"\"\nif _timer isnt None then\ntry _timers.cancel(_timer as Timer tag) end\n_timer = None\nend\n\n_escape = _EscapeNone\n_esc_buf.clear()"} +{"id": "Pony/10_partial-application_5.txt", "contents": "# Partially applying a partial application\n\nSince partial application results in an object with an apply method, we can partially apply the result!\n\n```pony\nlet f = foo~addmul()\nlet f2 = f~apply(where mul = 4)\nf2(3)\n```\n"} +{"id": "Pony/src-itertools-iter-_98.txt", "contents": "\nfun ref skip(n: USize): Iter[A]^ =>\n\"\"\"\nSkip the first n values of the iterator.\n"} +{"id": "Pony/4_control-structures_1.txt", "contents": "# Conditionals\n\nThe simplest control structure is the good old `if`. It allows you to perform some action only when a condition is true.\nIn Pony it looks like this:\n\n```pony\nif condition then\ncontrol_body\nend\n```\n\nHere is a simple example:\n\n```pony\nif a > b then\nenv.out.print(\"a is bigger\")\nend\n```\n\nOften the condition may be composed of many sub conditions connected by `and` and `or`."} +{"id": "Pony/pony_check-Randomness-_14.txt", "contents": "fun ref ilong(\nmin: ILong val = call,\nmax: ILong val = call)\n: ILong val\n\nParameters\u00b6\n\nmin: ILong val = call\nmax: ILong val = call\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nGenerate a ISize in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/builtin-String-_64.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: String box\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nReturns true if this is lexically less than that. Needs to be made UTF-8\nsafe.\nfun box lt(\nthat: String box)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_90.txt", "contents": "\"\"\"\nif _connected and not _closed then\n_in_sent = true\n\nifdef windows then\ntry\nvar num_to_send: I32 = 0\nfor bytes in _notify.sentv(this, data).values() do\n// don't sent 0 byte payloads; windows doesn't like it (and it's wasteful)\nif bytes.size() == 0 then\ncontinue\nend\n\n// Add an IOCP write.\n_pending_writev_windows\n.> push((bytes.size(), bytes.cpointer()))\n_pending_writev_total = _pending_writev_total + bytes.size()\nnum_to_send = num_to_send + 1\nend\n"} +{"id": "Pony/collections-List-_37.txt", "contents": "\nList[this->A!] ref\n\n\ntake_while\u00b6\n[Source]\nBuilds a List of elements satisfying the predicate, stopping at the first false return.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.take_while( {(s: String): Bool => s < \"b\"} ) // [\"a\"]\n\nfun box take_while(\nf: {(this->A!): Bool}[A] box)\n: List[this->A!] ref^\n\nParameters\u00b6\n\nf: {(this->A!): Bool}[A] box\n\nReturns\u00b6\n"} +{"id": "Pony/process-ProcessNotify-_5.txt", "contents": "\nReturns\u00b6\n\nUSize val\n\n\ndispose\u00b6\n[Source]\nCalled when ProcessMonitor terminates to cleanup ProcessNotify if a child\nprocess was in fact started. dispose will not be called if a child process\nwas never started. The notify will know that a process was started and to\nexpect a dispose call by having received a created call.\ndispose includes the exit status of the child process. If the process\nfinished, then child_exit_status will be an instance of Exited.\nThe childs exit code can be retrieved from the Exited instance by using\nExited.exit_code().\nOn Posix systems, if the process has been killed by a signal (e.g. through\nthe kill command), child_exit_status will be an instance of\nSignaled with the signal number that terminated the\nprocess available via Signaled.signal()."} +{"id": "Pony/cli-OptionSpec-_10.txt", "contents": "[Source]\nReturns a formated help string for this option.\nfun box help_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ndeb_string\u00b6\n[Source]\nfun box deb_string()\n: String val\n\nReturns\u00b6\n\nString val\n\n"} +{"id": "Pony/pony_check-PropertyRunner-_7.txt", "contents": "dispose\u00b6\n[Source]\nbe dispose()\n\n\nlog\u00b6\n[Source]\nbe log(\nmsg: String val,\nverbose: Bool val = false)\n\nParameters\u00b6\n\nmsg: String val\nverbose: Bool val = false\n\n\nPublic Functions\u00b6\ncomplete\u00b6\n[Source]"} +{"id": "Pony/src-random-random-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_171.txt", "contents": "fun box ipv6_tlv_routeralert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_transparent\u00b6\n[Source]\nfun box ipv6_transparent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_unicast_hops\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_32.txt", "contents": "| let p: CommandParser box => p._option_with_name(name)\nelse\nNone\nend\n\nfun _option_with_short(short: U8): (OptionSpec | None) =>\nfor o in _spec.options().values() do\nif o._has_short(short) then\nreturn o\nend\nend\nmatch _parent\n| let p: CommandParser box => p._option_with_short(short)\nelse\nNone\nend\n\nfun tag _short_string(c: U8): String =>\nrecover String.from_utf32(c.u32()) end\n"} +{"id": "Pony/ini-IniParse-_3.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: IniParse val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/cli-CommandHelp-_1.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nhelp_string\u00b6\n[Source]\nRenders the help message as a String.\nfun box help_string()"} +{"id": "Pony/2_primitives_2.txt", "contents": "\nfun multiply(a: U64, b: U64): U64 =>\na * b\n\nactor Main\nnew create(env: Env) =>\nlet doorState : DoorState = ClosedDoor\nlet isDoorOpen : Bool = match doorState\n| OpenedDoor => true\n| ClosedDoor => false\nend\nenv.out.print(\"Is door open? \" + isDoorOpen.string())\nenv.out.print(\"2 + 3 = \" + BasicMath.add(2,3).string())\n```\n\nPrimitives are quite powerful, particularly as enumerations. Unlike enumerations in other languages, each \"value\" in the enumeration is a complete type, which makes attaching data and functionality to enumeration values easy.\n"} +{"id": "Pony/builtin-F32-_7.txt", "contents": "\nU32 val\n\n\nradix\u00b6\n[Source]\nExponent radix.\nfun tag radix()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nprecision2\u00b6\n[Source]\nMantissa precision in bits.\nfun tag precision2()\n: U8 val"} +{"id": "Pony/src-files-path-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_check-property_helper-_46.txt", "contents": "Dispose the actor after a property run / a shrink is done.\n\"\"\"\n_runner.dispose_when_done(disposable, _run)\n\nfun _fail(msg: String) =>\n_runner.log(msg)\n_run_notify.apply(_run, false)\n\nfun _fmt_msg(loc: SourceLoc, msg: String): String =>\nlet msg_prefix = _params + \" \" + _run.string() + \" \" + _format_loc(loc)\nif msg.size() > 0 then\nmsg_prefix + \": \" + msg\nelse\nmsg_prefix\nend\n\nfun _format_loc(loc: SourceLoc): String =>\nloc.file() + \":\" + loc.line().string()\n\n"} +{"id": "Pony/src-pony_check-property-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-math-fibonacci-_0.txt", "contents": "\n\n\n\n\n\n\nfibonacci.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/pony_check-Generators-_9.txt", "contents": "[Source]\nfun box list_of[T: T](\ngen: Generator[T] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[List[T] ref] box\n\nParameters\u00b6\n\ngen: Generator[T] box\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[List[T] ref] box\n\n\nset_of[T: (Hashable #read & Equatable[T] #read)]\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-ascii_range-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-I128-_19.txt", "contents": "fun box divrem_unsafe(\ny: I128 val)\n: (I128 val , I128 val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , I128 val)\n\n\ndiv_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box div_unsafe(\ny: I128 val)"} +{"id": "Pony/src-files-file-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-pony_check-property_helper-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-signals-signal_handler-_0.txt", "contents": "\n\n\n\n\n\n\nsignal_handler.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-ossockopt-_93.txt", "contents": "fun ip_origdstaddr():I32 => @pony_os_sockopt_option(I32(302))\nfun ip_passsec():I32 => @pony_os_sockopt_option(I32(303))\nfun ip_pktinfo():I32 => @pony_os_sockopt_option(I32(304))\nfun ip_pktoptions():I32 => @pony_os_sockopt_option(I32(305))\nfun ip_pmtudisc_do():I32 => @pony_os_sockopt_option(I32(306))\nfun ip_pmtudisc_dont():I32 => @pony_os_sockopt_option(I32(307))\nfun ip_pmtudisc_interface():I32 => @pony_os_sockopt_option(I32(308))\nfun ip_pmtudisc_omit():I32 => @pony_os_sockopt_option(I32(309))\nfun ip_pmtudisc_probe():I32 => @pony_os_sockopt_option(I32(310))\nfun ip_pmtudisc_want():I32 => @pony_os_sockopt_option(I32(311))\nfun ip_portrange():I32 => @pony_os_sockopt_option(I32(312))\nfun ip_portrange_default():I32 => @pony_os_sockopt_option(I32(313))\nfun ip_portrange_high():I32 => @pony_os_sockopt_option(I32(314))\nfun ip_portrange_low():I32 => @pony_os_sockopt_option(I32(315))\nfun ip_recvdstaddr():I32 => @pony_os_sockopt_option(I32(316))\nfun ip_recverr():I32 => @pony_os_sockopt_option(I32(317))\nfun ip_recvflowid():I32 => @pony_os_sockopt_option(I32(318))\nfun ip_recvif():I32 => @pony_os_sockopt_option(I32(319))\nfun ip_recvopts():I32 => @pony_os_sockopt_option(I32(320))\nfun ip_recvorigdstaddr():I32 => @pony_os_sockopt_option(I32(321))"} +{"id": "Pony/collections-persistent-Cons-_1.txt", "contents": "[Source]\nnew val create(\na: val->A,\nt: (Cons[A] val | Nil[A] val))\n: Cons[A] val^\n\nParameters\u00b6\n\na: val->A\nt: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\nCons[A] val^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturns the size of the list."} +{"id": "Pony/random-XorShift128Plus-_2.txt", "contents": "[Source]\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed.\nnew ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: XorShift128Plus ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nXorShift128Plus ref^\n\n\nPublic Functions\u00b6\nnext\u00b6"} +{"id": "Pony/src-debug-debug-_5.txt", "contents": " Debug package\n\nProvides facilities to create output to either `STDOUT` or `STDERR` that will\nonly appear when the platform is debug configured. To create a binary with\ndebug configured, pass the `-d` flag to `ponyc` when compiling e.g.:\n\n`ponyc -d`\n"} +{"id": "Pony/src-files-file-_41.txt", "contents": "\nnew open(from: FilePath) =>\n\"\"\"\nOpen for read only.\nSet _errno according to result.\n\"\"\"\npath = from\nwriteable = false\n_fd = -1\n\nif\nnot path.caps(FileRead) or\ntry\nlet info' = FileInfo(path)?\ninfo'.directory or info'.pipe\nelse\ntrue\nend\nthen\n_errno = FileError"} +{"id": "Pony/src-builtin-string-_88.txt", "contents": "1752\n1753\n1754\n1755\n1756\n1757use @memcmp[I32](dst: Pointer[None] tag, src: Pointer[None] tag, len: USize)\nuse @memset[Pointer[None]](dst: Pointer[None], set: U32, len: USize)\nuse @memmove[Pointer[None]](dst: Pointer[None], src: Pointer[None], len: USize)\nuse @strtof[F32](nptr: Pointer[U8] tag, endptr: Pointer[Pointer[U8] box] ref)\nuse @strtod[F64](nptr: Pointer[U8] tag, endptr: Pointer[Pointer[U8] box] ref)\nuse @pony_os_clear_errno[None]()\nuse @pony_os_errno[I32]()\n\nclass val String is (Seq[U8] & Comparable[String box] & Stringable)\n\"\"\"\nA String is an ordered collection of bytes.\n\nStrings don't specify an encoding.\n\nExample usage of some common String methods:"} +{"id": "Pony/src-pony_check-generator-_140.txt", "contents": "\nOnly shrink until given `min` is hit.\n\"\"\"\nvar shrink_base = s\nlet s_len = s.codepoints()\nlet shrink_iter: Iterator[String^] =\nif s_len > min then\nIter[String^].repeat_value(consume shrink_base)\n.map_stateful[String^](\nobject\nvar len: USize = s_len - 1\nfun ref apply(str: String): String =>\nGenerators._trim_codepoints(str, len = len - 1)\nend\n).take(s_len - min)\n// take_while is buggy in pony < 0.21.0\n//.take_while({(t) => t.codepoints() > min})\nelse\nPoperator[String].empty()\nend"} +{"id": "Pony/src-cli-command_help-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-U32-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-I32-_55.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_40.txt", "contents": "end\nelse\n_logger.log(\"Action '\" + name + \"' finished unexpectedly at \" + round.string() + \". ignoring.\")\nend\n\nbe dispose_when_done(disposable: DisposableActor, round: _Round) =>\n\"\"\"\nLet us not have older rounds interfere with newer ones,\nthus dispose directly.\n\"\"\"\nif round != this._current_round then\n_logger.log(\"Unexpected dispose_when_done for \" + round.string() +\n\". Currently at \" + this._current_round.string(), true)\n_logger.log(\"Disposing right now...\", true)\ndisposable.dispose()\nreturn\nend\n_disposables.push(disposable)\n\nbe dispose() =>"} +{"id": "Pony/net-OSSockOpt-_311.txt", "contents": "fun box rds_rdma_fence()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_invalidate\u00b6\n[Source]\nfun box rds_rdma_invalidate()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_notify_me\u00b6\n[Source]"} +{"id": "Pony/error-messages_3.txt", "contents": "# cannot write to a field in a box function\n\nSuppose you create a class with a mutable field and added a method to change the field:\n\n```pony\nclass Wombat\nvar color: String = \"brown\"\nfun dye(new_color: String) =>\ncolor = new_color\n```\n\nThe error message would be:\n\n```error\nError:\n.../a.pony:4:11: cannot write to a field in a box function. If you are trying to change state in a function use fun ref\ncolor = new_color\n^\n```\n"} +{"id": "Pony/pony_check-Generator-_2.txt", "contents": "gen: GenObj[T] box\n\nReturns\u00b6\n\nGenerator[T] ref^\n\n\nPublic Functions\u00b6\ngenerate\u00b6\n[Source]\nLet this generator generate a value\ngiven a source of Randomness.\nAlso allow for returning a value and pre-generated shrink results\nas a ValueAndShrink[T] instance, a tuple of (T^, Seq[T]).\nThis helps propagating shrink results through all kinds of Generator\ncombinators like filter, map and flat_map.\nIf implementing a custom Generator based on another one,\nwith a Generator Combinator, you should use shrunken values\nreturned by generate to also return shrunken values based on them.\nIf generating an example value is costly, it might be more efficient"} +{"id": "Pony/src-ini-ini_map-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/2_ops_1.txt", "contents": "# Infix Operators\n\nInfix operators take two operands and are written between those operands. Arithmetic and comparison operators are the most common:\n\n```pony\n1 + 2\na < b\n```\n\nPony has pretty much the same set of infix operators as other languages.\n"} +{"id": "Pony/src-net-tcp_listener-_23.txt", "contents": "\n_spawn(ns)\nend\n\n// Queue an accept if we're not at the limit.\nif (_limit == 0) or (_count < _limit) then\n@pony_os_accept(_event)\nelse\n_paused = true\nend\nelse\nif _closed then\nreturn\nend\n\nwhile (_limit == 0) or (_count < _limit) do\nvar fd = @pony_os_accept(_event)\n\nmatch fd\n| -1 =>"} +{"id": "Pony/format-FormatFixLarge-_1.txt", "contents": "new val create()\n: FormatFixLarge val^\n\nReturns\u00b6\n\nFormatFixLarge val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatFixLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatFixLarge val\n\nReturns\u00b6"} +{"id": "Pony/src-math-is_prime-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_566.txt", "contents": "fun box tcp_congestion()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_connectiontimeout\u00b6\n[Source]\nfun box tcp_connectiontimeout()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_connection_info\u00b6\n[Source]"} +{"id": "Pony/ini-IniNotify-_2.txt", "contents": "section: String val)\n: Bool val\n\nParameters\u00b6\n\nsection: String val\n\nReturns\u00b6\n\nBool val\n\n\nerrors\u00b6\n[Source]\nThis is called for each error encountered. Return false to halt processing.\nfun ref errors(\nline: USize val,\nerr: (IniIncompleteSection val | IniNoDelimiter val))\n: Bool val\n"} +{"id": "Pony/files-FileChown-_2.txt", "contents": "\nthat: FileChown val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileChown val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileChown val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-Map-_0.txt", "contents": "\n\n\n\n\n\n\nMap[K: (Hashable #read & Equatable[K] #read), V: V]\u00b6\n[Source]\nThis is a map that uses structural equality on the key.\ntype Map[K: (Hashable #read & Equatable[K] #read), V: V] is\nHashMap[K, V, HashEq[K] val] ref\n\nType Alias For\u00b6\n\nHashMap[K, V, HashEq[K] val] ref\n\n\n\n"} +{"id": "Pony/builtin-F64-_46.txt", "contents": "\n\ngt_unsafe\u00b6\nfun box gt_unsafe(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\nstring\u00b6\nfun box string()\n: String iso^\n"} +{"id": "Pony/builtin-ISize-_43.txt", "contents": "[Source]\nfun box le(\ny: ISize val)\n: Bool val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: ISize val)\n: Bool val\n"} +{"id": "Pony/pony_check-Property1-_0.txt", "contents": "\n\n\n\n\n\n\nProperty1[T: T]\u00b6\n[Source]\nA property that consumes 1 argument of type T.\nA property is defined by a Generator, returned by\nthe gen() method, and a\nproperty method that consumes the\ngenerators' output and verifies a custom property with the help of a\nPropertyHelper.\nA property is verified if no failed assertion on\nPropertyHelper has been\nreported for all the samples it consumed.\nThe property execution can be customized by returning a custom\nPropertyParams from the"} +{"id": "Pony/src-builtin-string-_102.txt", "contents": "n = n + 1\nend\n\ni = i + 1\nend\n\nn\n\nfun space(): USize =>\n\"\"\"\nReturns the space available for data, not including the null terminator.\n\"\"\"\nif is_null_terminated() then _alloc - 1 else _alloc end\n\nfun ref reserve(len: USize) =>\n\"\"\"\nReserve space for len bytes. An additional byte will be reserved for the\nnull terminator.\n\"\"\"\nif _alloc <= len then"} +{"id": "Pony/src-builtin-array-_93.txt", "contents": "out._size = _size\nout\n\nfun slice(\nfrom: USize = 0,\nto: USize = -1,\nstep: USize = 1)\n: Array[this->A!]^\n=>\n\"\"\"\nCreate a new array that is a clone of a portion of this array. The range is\nexclusive and saturated.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not cloned.\n\"\"\"\nlet out = Array[this->A!]\nlet last = _size.min(to)\nlet len = last - from\n\nif (last > from) and (step > 0) then"} +{"id": "Pony/net-OSSockOpt-_360.txt", "contents": "fun box sctp_cmt_on_off()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_rpv1\u00b6\n[Source]\nfun box sctp_cmt_rpv1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_rpv2\u00b6\n[Source]"} +{"id": "Pony/4_control-structures_11.txt", "contents": "## While\n\nPony `while` loops are very similar to those in other languages. A condition expression is evaluated and if it's true we execute the code inside the loop. When we're done we evaluate the condition again and keep going until it's false.\n\nHere's an example that prints out the numbers 1 to 10:\n\n```pony\nvar count: U32 = 1\n\nwhile count <= 10 do\nenv.out.print(count.string())\ncount = count + 1\nend\n```\n\nJust like `if` expressions, `while` is also an expression. The value returned is just the value of the expression inside the loop the last time we go round it. For this example that will be the value given by `count = count + 1` when count is incremented to 11. Since Pony assignments hand back the _old_ value our `while` loop will return 10.\n\n__But what if the condition evaluates to false the first time we try, then we don't go round the loop at all?__ In Pony `while` expressions can also have an `else` block. In general, Pony `else` blocks provide a value when the expression they are attached to doesn't. A `while` doesn't have a value to give if the condition evaluates to false the first time, so the `else` provides it instead.\n\n__So is this like an else block on a while loop in Python?__ No, this is very different. In Python, the `else` is run when the `while` completes. In Pony the `else` is only run when the expression in the `while` isn't.\n"} +{"id": "Pony/src-serialise-serialise-_14.txt", "contents": "data.\n\"\"\"\nlet alloc_fn =\n@{(ctx: Pointer[None], size: USize): Pointer[U8] =>\n@pony_alloc(ctx, size)\n}\nlet alloc_final_fn =\n@{(ctx: Pointer[None], size: USize): Pointer[U8] =>\n@pony_alloc_final(ctx, size)\n}\nlet throw_fn = @{() ? => error }\n@pony_deserialise(@pony_ctx(), Pointer[None], _data, alloc_fn,\nalloc_final_fn, throw_fn) ?\n\nfun output(auth: OutputSerialisedAuth): Array[U8] val =>\n\"\"\"\nA caller with OutputSerialisedAuth can gain access to the underlying bytes\nthat contain the serialised data. This can be used to write those bytes to,\nfor example, a file or socket.\n\"\"\""} +{"id": "Pony/src-files-file-_48.txt", "contents": "\"\"\"\nqueue(data)\nqueue(_newline)\n\n_pending_writes()\n\nfun ref printv(data: ByteSeqIter box): Bool =>\n\"\"\"\nPrint an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\nqueue(bytes)\nqueue(_newline)\nend\n\n_pending_writes()\n\nfun ref write(data: ByteSeq box): Bool =>\n\"\"\"\nReturns false if the file wasn't opened with write permission."} +{"id": "Pony/src-collections-flag-_19.txt", "contents": "\nfun gt(that: Flags[A, B] box): Bool =>\n\"\"\"\nReturns true if the flags set on this are a struct superset of the flags\nset on that. Flags is only partially ordered, so gt is not the opposite of\nle.\n\"\"\"\n(_value != that._value) and ((that._value and not _value) == 0)\n\nfun ge(that: Flags[A, B] box): Bool =>\n\"\"\"\nReturns true if the flags set on this are a superset of the flags set on\nthat or they are the same. Flags is only partially ordered, so ge is not\nthe opposite of lt.\n\"\"\"\n((that._value and not _value) == 0)\n\n\n\n"} +{"id": "Pony/builtin-USize-_37.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIPunctuation-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/cli-Arg-_4.txt", "contents": ": U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nf64\u00b6\n[Source]\nReturns the arg value as an F64, defaulting to 0.0.\nfun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nstring_seq\u00b6\n[Source]"} +{"id": "Pony/aliasing_5.txt", "contents": "# Ephemeral types\n\nIn Pony, every expression has a type. So what's the type of `consume a`? It's not the same type as `a`, because it might not be possible to alias `a`. Instead, it's an __ephemeral__ type. That is, it's a type for a value that currently has no name (it might have a name through some other alias, but not the one we just consumed or destructively read).\n\nTo show a type is ephemeral, we put a `^` at the end. For example:\n\n```pony\nfun test(a: Wombat iso): Wombat iso^ =>\nconsume a\n```\n\nHere, our function takes an isolated Wombat as a parameter and returns an ephemeral isolated Wombat.\n\nThis is useful for dealing with `iso` and `trn` types, and for generic types, but it's also important for constructors. A constructor always returns an ephemeral type, because it's a new object.\n"} +{"id": "Pony/collections-HashEq64-_1.txt", "contents": "new val create()\n: HashEq64[A] val^\n\nReturns\u00b6\n\nHashEq64[A] val^\n\n\nPublic Functions\u00b6\nhash64\u00b6\n[Source]\nUse the hash function from the type parameter.\nfun box hash64(\nx: box->A)\n: U64 val\n\nParameters\u00b6\n\nx: box->A\n"} +{"id": "Pony/builtin-I64-_5.txt", "contents": "\nI64 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-VecKeys-_2.txt", "contents": "fun ref next()\n: USize val ?\n\nReturns\u00b6\n\nUSize val ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-Equal-_3.txt", "contents": "Parameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_runner-_31.txt", "contents": "run()\nend\n\nfun ref _prepare_next_round() =>\nthis._current_round = this._current_round.inc()\nthis._expected_actions.clear()\nfor disposable in Poperator[DisposableActor](this._disposables) do\ndisposable.dispose()\nend\n\nfun ref _generate_with_retry(max_retries: USize): ValueAndShrink[T] ? =>\nvar tries: USize = 0\nrepeat\ntry\nreturn _gen.generate_and_shrink(_rnd)?\nelse\ntries = tries + 1\nend\nuntil (tries > max_retries) end\n"} +{"id": "Pony/builtin-F32-_27.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\ncos\u00b6\n[Source]\nfun box cos()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nsin\u00b6\n[Source]\nfun box sin()\n: F32 val\n"} +{"id": "Pony/net-TCPConnection-_34.txt", "contents": "get_tcp_nodelay\u00b6\n[Source]\nWrapper for the FFI call getsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)\nfun ref get_tcp_nodelay()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nset_so_rcvbuf\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)\nfun ref set_so_rcvbuf(\nbufsize: U32 val)\n: U32 val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_7.txt", "contents": "\nI16 val\n\n\nmax_exp2\u00b6\n[Source]\nfun tag max_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmax_exp10\u00b6\n[Source]\nfun tag max_exp10()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-Generators-_29.txt", "contents": "Create a generator for U64 values.\nfun box u64(\nmin: U64 val = call,\nmax: U64 val = call)\n: Generator[U64 val] box\n\nParameters\u00b6\n\nmin: U64 val = call\nmax: U64 val = call\n\nReturns\u00b6\n\nGenerator[U64 val] box\n\n\nu128\u00b6\n[Source]\nCreate a generator for U128 values.\nfun box u128("} +{"id": "Pony/src-builtin-string-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/10_partial-application_2.txt", "contents": "We can also bind all the arguments:\n\n```pony\nlet f = foo~addmul(3, 4)\nf()\n```\n\nOr even none of the arguments:\n\n```pony\nlet f = foo~addmul()\nf(3, 4)\n```\n"} +{"id": "Pony/src-net-udp_socket-_42.txt", "contents": "return\nend\n\nif not _closed then\nif AsioEvent.readable(flags) then\n_readable = true\n_complete_reads(arg)\n_pending_reads()\nend\nelse\nifdef windows then\nif AsioEvent.readable(flags) then\n_readable = false\n_close()\nend\nend\nend\n\nif AsioEvent.disposable(flags) then\n@pony_asio_event_destroy(_event)"} +{"id": "Pony/serialisation_4.txt", "contents": "# Custom Serialisation and Deserialisation\n\nPony objects can have `Pointer` fields that store pointers to memory that contains things that are opaque to Pony but that may be useful to code that is called via FFI. Because the objects that `Pointer` fields point to are opaque, Pony cannot serialise and deserialise them by itself. However, Pony's serialisation system provides a way for the programmer to specify how the objects pointed to by these fields should be serialised and deserialised. This system is called custom serialisation.\n\nSince `Pointer` fields are opaque to Pony, it is assumed that the serialisation and deserialisation code will be written in another language that knows how to read the object referenced by the pointers.\n"} +{"id": "Pony/src-pony_check-property_runner-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/format-FormatFloat-_0.txt", "contents": "\n\n\n\n\n\n\nFormatFloat\u00b6\n[Source]\ntype FormatFloat is\n(FormatDefault val | FormatExp val | FormatExpLarge val | FormatFix val | FormatFixLarge val | FormatGeneral val | FormatGeneralLarge val)\n\nType Alias For\u00b6\n\n(FormatDefault val | FormatExp val | FormatExpLarge val | FormatFix val | FormatFixLarge val | FormatGeneral val | FormatGeneralLarge val)\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/net-OSSockOpt-_589.txt", "contents": "fun box tcp_rxt_conndroptime()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_rxt_findrop\u00b6\n[Source]\nfun box tcp_rxt_findrop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_saved_syn\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_25.txt", "contents": "op_or\u00b6\n[Source]\nfun box op_or(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: A)\n: A"} +{"id": "Pony/buffered-Reader-_2.txt", "contents": "fun ref apply(data: Array[U8] iso) =>\nlet rb = Reader\nrb.append(consume data)\ntry\nwhile true do\nlet len = rb.i32_be()?\nlet items = rb.i32_be()?.usize()\nfor range in Range(0, items) do\nlet f = rb.f32_be()?\nlet str_len = rb.i32_be()?.usize()\nlet str = String.from_array(rb.block(str_len)?)\n_env.out.print(\"[(\" + f.string() + \"), (\" + str + \")]\")\nend\nend\nend\n\nactor Main\nnew create(env: Env) =>\nenv.input(recover Notify(env) end, 1024)\n"} +{"id": "Pony/cli-EnvVars-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nTurns an array of strings that look like environment variables, ie.\nkey=value, into a map of string to string. Can optionally filter for\nkeys matching a 'prefix', and will squash resulting keys to lowercase\niff 'squash' is true.\nSo:\n=\nbecomes:\n{KEY, VALUE} or {key, VALUE}\nfun box apply(\nenvs: (Array[String val] box | None val),\nprefix: String val = \"\",\nsquash: Bool val = false)\n: HashMap[String val, String val, HashEq[String val] val] val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-Generators-_44.txt", "contents": "max: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nutf32_codepoint_string\u00b6\n[Source]\nCreate a generator for strings\nfrom a generator of unicode codepoints,\nwith a minimum length of min codepoints (default: 0)\nand a maximum length of max codepoints (default: 100).\nNote that the byte length of the generated string can be up to 4 times\nthe size in code points.\nfun box utf32_codepoint_string(\ngen: Generator[U32 val] box,\nmin: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box"} +{"id": "Pony/builtin-ISize-_20.txt", "contents": "[Source]\nfun box mul_partial(\ny: ISize val)\n: ISize val ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: ISize val)\n: ISize val ?\n"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_1.txt", "contents": "[Source]\nnew iso create()\n: AsyncOverheadBenchmark iso^\n\nReturns\u00b6\n\nAsyncOverheadBenchmark iso^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n"} +{"id": "Pony/process-ProcessMonitor-_0.txt", "contents": "\n\n\n\n\n\n\nProcessMonitor\u00b6\n[Source]\nFork+execs / creates a child process and monitors it. Notifies a client about\nSTDOUT / STDERR events.\nactor tag ProcessMonitor is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nConstructors\u00b6"} +{"id": "Pony/net-OSSockOpt-_319.txt", "contents": "fun box rose_defer()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_dte_originated\u00b6\n[Source]\nfun box rose_dte_originated()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_holdback\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_31.txt", "contents": "primitive FetchIssue\nfun apply(number: I64, repo: Repository): Promise[Issue] =>\nrepo.get_issue(number)\n\nprimitive PrintIssueTitle\nfun apply(out: OutStream, issue: Issue) =>\nout.print(issue.title())\n```\n\nOur promise `Issue`, is no longer a `Promise[Promise[Issue]]`. By using\n`flatten_next`, we have a much more manageable `Promise[Issue]` instead.\n\nOther than unwrapping promises for you, `flatten_next` otherwise acts the\nsame as `next` so all the same rules apply to fulfillment and rejection.\n\"\"\"\nlet outer = Promise[B]\n\nnext[None](object iso\nvar f: Fulfill[A, Promise[B]] = consume fulfill\nlet p: Promise[B] = outer"} +{"id": "Pony/builtin-F32-_48.txt", "contents": "fun box sub(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmul\u00b6\nfun box mul(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n"} +{"id": "Pony/src-files-file_caps-_6.txt", "contents": "\nprimitive FileWrite\nfun value(): U32 => 1 << 14\n\nprimitive FileExec\nfun value(): U32 => 1 << 15\n\ntype FileCaps is Flags[\n( FileCreate\n| FileChmod\n| FileChown\n| FileLink\n| FileLookup\n| FileMkdir\n| FileRead\n| FileRemove\n| FileRename\n| FileSeek\n| FileStat\n| FileSync"} +{"id": "Pony/src-builtin-string-_169.txt", "contents": "error\nelse\nres\nend\nelse\nerror\nend\n\nfun f64(offset: ISize = 0): F64 ? =>\n\"\"\"\nConvert this string starting at the given offset\nto a 64-bit floating point number ([F64](builtin-F64.md)).\n\nThis method errors if this string cannot be parsed to a float,\nif the result would over- or underflow,\nthe offset exceeds the size of this string or\nthere are leftover characters in the string after conversion.\n\nExamples:\n"} +{"id": "Pony/files-FileStat-_2.txt", "contents": "\nthat: FileStat val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileStat val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileStat val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_287.txt", "contents": "fun box netrom_idle()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_kill\u00b6\n[Source]\nfun box netrom_kill()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_n2\u00b6\n[Source]"} +{"id": "Pony/9_object-literals_2.txt", "contents": "\n```pony\nuse \"collections\"\n\nclass Foo\nfun foo(str: String): Hashable =>\nobject is Hashable\nlet s: String = str\nfun apply(): String => s\nfun hash(): USize => s.hash()\nend\n```\n\nWhen we assign to a field in the constructor, we are _capturing_ from the lexical scope the object literal is in. Pretty fun stuff! It lets us have arbitrarily complex __closures__ that can even have multiple entry points (i.e. functions you can call on a closure).\n\nAn object literal with fields is returned as a `ref` by default unless an explicit reference capability is declared by specifying the capability after the `object` keyword. For example, an object with sendable captured references can be declared as `iso` if needed:\n\n```pony\nuse \"collections\"\n"} +{"id": "Pony/builtin-Real-_15.txt", "contents": "\nBool val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmax\u00b6"} +{"id": "Pony/ini-Ini-_2.txt", "contents": "\nBool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Ini val)\n: Bool val\n\nParameters\u00b6\n\nthat: Ini val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/builtin-I32-_37.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-encode-base64-base64-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-String-_36.txt", "contents": "offset: ISize val\nlen: USize val = 1\n\nReturns\u00b6\n\nNone val\n\n\nsubstring\u00b6\n[Source]\nReturns a substring. Index range [from .. to) is half-open.\nReturns an empty string if nothing is in the range.\nNote that this operation allocates a new string to be returned. For\nsimilar operations that don't allocate a new string, see trim and\ntrim_in_place.\nfun box substring(\nfrom: ISize val,\nto: ISize val = call)\n: String iso^\n"} +{"id": "Pony/src-term-ansi-_19.txt", "contents": "\"\"\"\nmatch direction\n| EraseRight => \"\\x1B[0K\"\n| EraseLeft => \"\\x1B[1K\"\n| EraseLine => \"\\x1B[2K\"\nend\n\nfun reset(): String =>\n\"\"\"\nResets all colours and text styles to the default.\n\"\"\"\n\"\\x1B[0m\"\n\nfun bold(state: Bool = true): String =>\n\"\"\"\nBold text. Does nothing on Windows.\n\"\"\"\nif state then \"\\x1B[1m\" else \"\\x1B[22m\" end\n\nfun underline(state: Bool = true): String =>"} +{"id": "Pony/builtin-F32-_50.txt", "contents": "\ndivrem\u00b6\nfun box divrem(\ny: F32 val)\n: (F32 val , F32 val)\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\n(F32 val , F32 val)\n\n\nrem\u00b6\nfun box rem(\ny: F32 val)\n: F32 val\n"} +{"id": "Pony/src-collections-persistent-list-_0.txt", "contents": "\n\n\n\n\n\n\nlist.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I16-_55.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/4_control-structures_12.txt", "contents": "## Break\n\nSometimes you want to stop part-way through a loop and give up altogether. Pony has the `break` keyword for this and it is very similar to its counterpart in languages like C++, C#, and Python.\n\n`break` immediately exits from the innermost loop it's in. Since the loop has to return a value `break` can take an expression. This is optional, and if it's left out, the value from the `else` block is returned.\n\nLet's have an example. Suppose you want to go through a list of names, looking for either \"Jack\" or \"Jill\". If neither of those appear, you'll just take the last name you're given, and if you're not given any names at all, you'll use \"Herbert\".\n\n```pony\nvar name =\nwhile moreNames() do\nvar name' = getName()\nif name' == \"Jack\" or name' == \"Jill\" then\nbreak name'\nend\nname'\nelse\n\"Herbert\"\nend\n```"} +{"id": "Pony/collections-MapPairs-_2.txt", "contents": "fun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturns the next entry, or raises an error if there isn't one. If entries\nare added during iteration, this may not return all entries.\nfun ref next()\n: (M->K , M->V) ?\n\nReturns\u00b6\n\n(M->K , M->V) ?\n\n"} +{"id": "Pony/builtin-I8-_25.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nI8 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U8 val)\n: I8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-array-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-collections-persistent-list-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582type List[A] is (Cons[A] | Nil[A])\n\"\"\"\nA persistent list with functional transformations.\n"} +{"id": "Pony/src-builtin-array-_50.txt", "contents": "Contiguous, resizable memory to store elements of type A.\n"} +{"id": "Pony/files-FileStat-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-map-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/pony_test--index-_2.txt", "contents": "test(_TestAdd)\ntest(_TestSub)\n\nclass iso _TestAdd is UnitTest\nfun name():String => \"addition\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](4, 2 + 2)\n\nclass iso _TestSub is UnitTest\nfun name():String => \"subtraction\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](2, 4 - 2)\n\nThe make() constructor is not needed for this example. However, it allows for\neasy aggregation of tests (see below) so it is recommended that all test Mains\nprovide it.\nMain.create() is called only for program invocations on the current package.\nMain.make() is called during aggregation. If so desired extra code can be added"} +{"id": "Pony/builtin-I64-_13.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\naddc\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_31.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\natan\u00b6\n[Source]\nfun box atan()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\natan2\u00b6\n[Source]\nfun box atan2(\ny: F32 val)\n: F32 val"} +{"id": "Pony/builtin-UnsignedInteger-_40.txt", "contents": "[Source]\nfun box rem(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: A\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_12.txt", "contents": "fun box ipproto_cpnx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_dccp\u00b6\n[Source]\nfun box ipproto_dccp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ddp\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/collections-HashSet-_0.txt", "contents": "\n\n\n\n\n\n\nHashSet[A: A, H: HashFunction[A!] val]\u00b6\n[Source]\nA set, built on top of a HashMap. This is implemented as map of an alias of\na type to itself\nclass ref HashSet[A: A, H: HashFunction[A!] val] is\nComparable[HashSet[A, H] box] ref\n\nImplements\u00b6\n\nComparable[HashSet[A, H] box] ref\n\n\nConstructors\u00b6"} +{"id": "Pony/src-pony_test-test_helper-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/format--index-_0.txt", "contents": "\n\n\n\n\n\n\nFormat package\u00b6\nThe Format package provides support for formatting strings. It can be\nused to set things like width, padding and alignment, as well as\ncontrolling the way numbers are displayed (decimal, octal,\nhexadecimal).\nExample program\u00b6\nuse \"format\"\n\nactor Main\nfun disp(desc: String, v: I32, fmt: FormatInt = FormatDefault): String =>\nFormat(desc where width = 10)\n+ \":\"\n+ Format.int[I32](v where width = 10, align = AlignRight, fmt = fmt)"} +{"id": "Pony/src-net-tcp_connection-_121.txt", "contents": "When an error happens, do a non-graceful close.\n\"\"\"\nif not _connected then\nreturn\nend\n\n_connected = false\n_closed = true\n_shutdown = true\n_shutdown_peer = true\n\n_pending_writev_total = 0\nifdef windows then\n_pending_writev_windows.clear()\n_pending_sent = 0\nelse\n_pending_writev_posix.clear()\nend\n\n// Unsubscribe immediately and drop all pending writes."} +{"id": "Pony/src-pony_check-generator-_138.txt", "contents": "Create a generator for strings of ASCII letters,\nwith a minimum length of `min` (default: 0)\nand a maximum length of `max` (default: 100).\n\"\"\"\nascii(min, max, ASCIILetters)\n\nfun utf32_codepoint_string(\ngen: Generator[U32],\nmin: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for strings\nfrom a generator of unicode codepoints,\nwith a minimum length of `min` codepoints (default: 0)\nand a maximum length of `max` codepoints (default: 100).\n\nNote that the byte length of the generated string can be up to 4 times\nthe size in code points."} +{"id": "Pony/builtin-Integer-_6.txt", "contents": "Returns\u00b6\n\nA\n\n\ndiv_unsafe\u00b6\n[Source]\nInteger division, rounded towards zero.\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box div_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/src-buffered-reader-_0.txt", "contents": "\n\n\n\n\n\n\nreader.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-signals-sig-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-array-_0.txt", "contents": "\n\n\n\n\n\n\narray.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/1_classes_6.txt", "contents": "## Zero Argument Constructors\n\n```pony\nclass Hawk\nvar _hunger_level: U64 = 0\n\nclass Owl\nvar _hunger_level: U64\n\nnew create() =>\n_hunger_level = 42\n```\n\nHere we have two classes, because the `Hawk` class defines no constructors, a default constructor with zero arguments called `create` is generated. The `Owl` defines its own constructor that sets the `_hunger_level`.\n\nWhen constructing instances of classes that have zero-argument constructors, they can be constructed with just the class name:\n\n```pony\nclass Forest\nlet _owl: Owl = Owl"} +{"id": "Pony/src-builtin-float-_28.txt", "contents": "use @\"llvm.floor.f64\"[F64](x: F64)\nuse @\"llvm.round.f32\"[F32](x: F32)\nuse @\"llvm.round.f64\"[F64](x: F64)\nuse @\"llvm.trunc.f32\"[F32](x: F32)\nuse @\"llvm.trunc.f64\"[F64](x: F64)\nuse @\"llvm.log.f32\"[F32](x: F32)\nuse @\"llvm.log.f64\"[F64](x: F64)\nuse @\"llvm.log2.f32\"[F32](x: F32)\nuse @\"llvm.log2.f64\"[F64](x: F64)\nuse @\"llvm.log10.f32\"[F32](x: F32)\nuse @\"llvm.log10.f64\"[F64](x: F64)\nuse @logbf[F32](x: F32)\nuse @logb[F64](x: F64)\nuse @\"llvm.pow.f32\"[F32](x: F32, y: F32)\nuse @\"llvm.pow.f64\"[F64](x: F64, y: F64)\nuse @\"llvm.powi.f32\"[F32](x: F32, y: I32) if not windows\nuse @\"llvm.powi.f64\"[F64](x: F64, y: I32) if not windows\nuse @\"llvm.sqrt.f32\"[F32](x: F32)\nuse @\"llvm.sqrt.f64\"[F64](x: F64)\nuse @cbrtf[F32](x: F32)"} +{"id": "Pony/src-encode-base64-base64-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211\"\"\""} +{"id": "Pony/builtin-F32-_12.txt", "contents": "F32 val\n\n\nfloor\u00b6\n[Source]\nfun box floor()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nround\u00b6\n[Source]\nfun box round()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-USize-_41.txt", "contents": "fun box divrem(\ny: USize val)\n: (USize val , USize val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\n(USize val , USize val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/src-itertools-iter-_69.txt", "contents": "\nfun ref collect[B: Seq[A!] ref = Array[A!]](coll: B): B^ =>\n\"\"\"\nPush each value from the iterator into the collection `coll`.\n"} +{"id": "Pony/builtin-Integer-_15.txt", "contents": "y: A\n\nReturns\u00b6\n\nA ?\n\n\ndivrem_partial\u00b6\n[Source]\nDivides this number by y and calculates the remainder of the operation.\nIf y is 0 or the operation overflows, this function errors.\nfun box divrem_partial(\ny: A)\n: (A , A) ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/builtin-U32-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/callbacks_0.txt", "contents": "# Callbacks\n\nSome C APIs let the programmer specify functions that should be called to do pieces of work. For example, the SQLite API has a function called `sqlite3_exec` that executes an SQL statement and calls a function given by the programmer on each row returned by that statement. The functions that are supplied by the programmer are known as \"callback functions\". Some specific Pony functions can be passed as callback functions.\n"} +{"id": "Pony/0_literals_11.txt", "contents": "# Array Literals\n\nArray literals are enclosed by square brackets. Array literal elements can be any kind of expressions. They are separated by semicolon or newline:\n\n```pony\nlet my_literal_array =\n[\n\"first\"; \"second\"\n\"third one on a new line\"\n]\n```\n"} +{"id": "Pony/builtin-U128-_41.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nop_and\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_69.txt", "contents": "Parameters\u00b6\n\nthat: F32 val\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-udp_socket-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-files-path-_41.txt", "contents": "target_clean.find(sep(), target_i)?\nelse\ntarget_clean.size().isize()\nend\n\nif\n(to_i != target_i) or\n(to_clean.compare_sub(target_clean, target_i.usize()) isnt Equal)\nthen\nbreak\nend\n\nif to_i < to_clean.size().isize() then\nto_i = to_i + 1\nend\n\nif target_i < target_clean.size().isize() then\ntarget_i = target_i + 1\nend\n"} +{"id": "Pony/cli-Command-_0.txt", "contents": "\n\n\n\n\n\n\nCommand\u00b6\n[Source]\nCommand contains all of the information describing a command with its spec\nand effective options and arguments, ready to use.\nclass box Command\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nReturns a representational string for this command.\nfun box string()\n: String iso^\n"} +{"id": "Pony/builtin-ULong-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I8-_50.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_7.txt", "contents": "\nA\n\n\ndivrem_unsafe\u00b6\n[Source]\nCalculates the quotient of this number and y and the remainder.\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box divrem_unsafe(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileSeek-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileSeek val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U64-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_46.txt", "contents": "\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nfun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n"} +{"id": "Pony/cli-Arg-_1.txt", "contents": "\nParameters\u00b6\n\nspec': ArgSpec val\nvalue': (Bool val | String val | I64 val |\nU64 val | F64 val | _StringSeq val)\n\nReturns\u00b6\n\nArg val^\n\n\nPublic Functions\u00b6\nspec\u00b6\n[Source]\nfun box spec()\n: ArgSpec val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-directory-_44.txt", "contents": "let path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\nFileInfo._relative(_fd, path', target)?\nelse\nFileInfo(path')?\nend\n\nfun chmodat(target: String, mode: FileMode box): Bool =>\n\"\"\"\nSet the FileMode for some path relative to this directory.\n\"\"\"\nif\nnot path.caps(FileChmod)\nor not path.caps(FileLookup)\nor (_fd == -1)\nthen\nreturn false\nend\n"} +{"id": "Pony/src-pony_test-test_helper-_25.txt", "contents": "\nLogs are printed one test at a time to avoid interleaving log lines from\nconcurrent tests.\n\"\"\"\n_runner.log(msg, verbose)\n\nfun fail(msg: String = \"Test failed\") =>\n\"\"\"\nFlag the test as having failed.\n\"\"\"\n_runner.fail(msg)\n\nfun assert_true(actual: Bool, msg: String = \"\", loc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the given expression is true.\n\"\"\"\nif not actual then\nfail(_format_loc(loc) + \"Assert true failed. \" + msg)"} +{"id": "Pony/src-net-tcp_connection-_86.txt", "contents": "host: String,\nservice: String,\nfrom: String = \"\",\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\"\nConnect via IPv6.\n\"\"\"\n_read_buf = recover Array[U8] .> undefined(read_buffer_size) end\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n_notify = consume notify\nlet asio_flags =\nifdef not windows then\nAsioEvent.read_write_oneshot()\nelse\nAsioEvent.read_write()"} +{"id": "Pony/src-net-udp_socket-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-builtin-real-_56.txt", "contents": "trait val SignedInteger[A: SignedInteger[A, B] val,\nB: UnsignedInteger[B] val] is Integer[A]\nfun abs(): B\n\nfun shl(y: B): A => this << y\nfun shr(y: B): A => this >> y\n\nfun shl_unsafe(y: B): A =>\n\"\"\"\nUnsafe operation.\nIf bits differing from the final sign bit are shifted-out, the result is\nundefined.\n\"\"\"\nthis <<~ y\n\nfun shr_unsafe(y: B): A =>\n\"\"\"\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\n\"\"\""} +{"id": "Pony/src-strings-common_prefix-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26primitive CommonPrefix\n\"\"\"\nCreates a string that is the common prefix of the supplied strings, possibly\nempty.\n\"\"\"\n"} +{"id": "Pony/builtin-Pointer-_0.txt", "contents": "\n\n\n\n\n\n\nPointer[A: A]\u00b6\n[Source]\nA Pointer[A] is a raw memory pointer. It has no descriptor and thus can't be\nincluded in a union or intersection, or be a subtype of any interface. Most\nfunctions on a Pointer[A] are private to maintain memory safety.\nstruct ref Pointer[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nA null pointer.\nnew ref create()\n: Pointer[A] ref^"} +{"id": "Pony/src-builtin-unsigned-_48.txt", "contents": "new max_value() => 0xFF\n\nfun next_pow2(): U8 =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): U8 => this\nfun bit_reverse(): U8 => @\"llvm.bitreverse.i8\"(this)\nfun bswap(): U8 => this\nfun popcount(): U8 => @\"llvm.ctpop.i8\"(this)\nfun clz(): U8 => @\"llvm.ctlz.i8\"(this, false)\nfun ctz(): U8 => @\"llvm.cttz.i8\"(this, false)\n\nfun clz_unsafe(): U8 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i8\"(this, true)\n"} +{"id": "Pony/ponytest_6.txt", "contents": "# Long tests\n\nSimple tests run within a single function. When that function exits, either returning or raising an error, the test is complete. This is not viable for tests that need to use actors.\n\nLong tests allow for delayed completion. Any test can call `long_test()` on its `TestHelper` to indicate that it needs to keep running. When the test is finally complete it calls `complete()` on its `TestHelper`.\n\nThe `complete()` function takes a `Bool` parameter to specify whether the test was a success. If any asserts fail then the test will be considered a failure regardless of the value of this parameter. However, `complete()` must still be called.\n\nSince failing tests may hang, a timeout must be specified for each long test. When the test function exits a timer is started with the specified timeout. If this timer fires before `complete()` is called the test is marked as a failure and the timeout is reported.\n\nOn a timeout, the `timed_out()` function is called on the unit test object. This should perform whatever test specific tidy up is required to allow the program to exit. There is no need to call `complete()` if a timeout occurs, although it is not an error to do so.\n\nNote that the timeout is only relevant when a test hangs and would otherwise prevent the test program from completing. Setting a very long timeout on tests that should not be able to hang is perfectly acceptable and will not make the test take any longer if successful.\n\nTimeouts should not be used as the standard method of detecting if a test has failed.\n"} +{"id": "Pony/src-net-ossockopt-_70.txt", "contents": "* Harvested by recipe given in socket.c\n*/\n\n/*\n* Levels formatted in Pony by:\n* egrep '^(IP[A-Z0-6]*PROTO_|NSPROTO_|SOL_)' ~/sum-of-all-constants.txt | egrep -v '\\(' | sort -u | egrep -v '^$' | sed 's/__/_/g' | awk 'BEGIN { count=4000; } { printf(\" fun %s():I32 => @pony_os_sockopt_level(I32(%d))\\n\", tolower($1), count++); }'\n*/\n\n// levels\nfun ipproto_3pc():I32 => @pony_os_sockopt_level(I32(4000))\nfun ipproto_adfs():I32 => @pony_os_sockopt_level(I32(4001))\nfun ipproto_ah():I32 => @pony_os_sockopt_level(I32(4002))\nfun ipproto_ahip():I32 => @pony_os_sockopt_level(I32(4003))\nfun ipproto_apes():I32 => @pony_os_sockopt_level(I32(4004))\nfun ipproto_argus():I32 => @pony_os_sockopt_level(I32(4005))\nfun ipproto_ax25():I32 => @pony_os_sockopt_level(I32(4006))\nfun ipproto_beetph():I32 => @pony_os_sockopt_level(I32(4007))\nfun ipproto_bha():I32 => @pony_os_sockopt_level(I32(4008))\nfun ipproto_blt():I32 => @pony_os_sockopt_level(I32(4009))\nfun ipproto_brsatmon():I32 => @pony_os_sockopt_level(I32(4010))"} +{"id": "Pony/ini-IniMap-_0.txt", "contents": "\n\n\n\n\n\n\nIniMap\u00b6\n[Source]\ntype IniMap is\nHashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref\n\nType Alias For\u00b6\n\nHashMap[String val, HashMap[String val, String val, HashEq[String val] val] ref, HashEq[String val] val] ref\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_470.txt", "contents": "fun box sock_cloexec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_dgram\u00b6\n[Source]\nfun box sock_dgram()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_maxaddrlen\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_55.txt", "contents": "1092\n1093\n1094\n1095\n1096\n1097\n1098\n1099\n1100\n1101\n1102\n1103\n1104\n1105\n1106\n1107\n1108\n1109\n1110\n1111"} +{"id": "Pony/src-builtin-string-_133.txt", "contents": "Adds a byte to the beginning of the string.\n\"\"\"\nif value != 0 then\nreserve(_size + 1)\n@memmove(_ptr.usize() + 1, _ptr.usize(), _size + 1)\n_set(0, value)\n_size = _size + 1\nelse\n_set(0, 0)\n_size = 0\nend\n\nfun ref shift(): U8 ? =>\n\"\"\"\nRemoves a byte from the beginning of the string.\n\"\"\"\nif _size > 0 then\nlet value = _ptr._apply(0)\n@memmove(_ptr.usize(), _ptr.usize() + 1, _size)\n_size = _size - 1"} +{"id": "Pony/net-OSSockOpt-_69.txt", "contents": "fun box sol_local()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_ndrvproto\u00b6\n[Source]\nfun box sol_ndrvproto()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_netrom\u00b6\n[Source]"} +{"id": "Pony/term-ANSINotify-_12.txt", "contents": "\nprompt\u00b6\n[Source]\nfun ref prompt(\nterm: ANSITerm ref,\nvalue: String val)\n: None val\n\nParameters\u00b6\n\nterm: ANSITerm ref\nvalue: String val\n\nReturns\u00b6\n\nNone val\n\n\nsize\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_32.txt", "contents": "A\n\n\ncbrt\u00b6\n[Source]\nfun box cbrt()\n: A\n\nReturns\u00b6\n\nA\n\n\nexp\u00b6\n[Source]\nfun box exp()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-FloatingPoint-_18.txt", "contents": "\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nlt_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box lt_unsafe(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/files-FilePath-_10.txt", "contents": "new_path: FilePath val\n\nReturns\u00b6\n\nBool val\n\n\nsymlink\u00b6\n[Source]\nCreate a symlink to a file or directory.\nNote that on Windows a program must be running with elevated priviledges to\nbe able to create symlinks.\nfun val symlink(\nlink_name: FilePath val)\n: Bool val\n\nParameters\u00b6\n\nlink_name: FilePath val\n"} +{"id": "Pony/pony_check-PropertyHelper-_10.txt", "contents": "msg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nnot_expect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_eq[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the 2 given expressions are equal.\nfun box assert_eq[A: (Equatable[A] #read & Stringable #read)]("} +{"id": "Pony/src-net-tcp_connection-_73.txt", "contents": "let c_auth = TCPConnectAuth(env.root)\nlet bp_auth = ApplyReleaseBackpressureAuth(env.root)\nlet socket = TCPConnection(c_auth,\nrecover SlowDown(bp_auth, env.out) end, \"\", \"7669\")\n\n```\n\nOr if you want, you could handle backpressure by shedding load, that is,\ndropping the extra data rather than carrying out the send. This might look\nlike:\n\n```pony\nuse \"net\"\n\nclass ThrowItAway is TCPConnectionNotify\nvar _throttled: Bool = false\n\nfun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>\nif not _throttled then\ndata"} +{"id": "Pony/src-builtin-string-_142.txt", "contents": "var offset = ISize(0)\nvar occur = USize(0)\n\ntry\nwhile true do\noffset = find(from, offset)?\ncut_in_place(offset, offset + from_len)\ninsert_in_place(offset, to)\noffset = offset + to_len\noccur = occur + 1\n\nif (n > 0) and (occur >= n) then\nbreak\nend\nend\nend\noccur\n\nfun split_by(\ndelim: String,"} +{"id": "Pony/pony_check-Property3-_2.txt", "contents": "gen3\u00b6\n[Source]\nThe Generator for the third argument to your property3 method.\nfun box gen3()\n: Generator[T3] box\n\nReturns\u00b6\n\nGenerator[T3] box\n\n\ngen\u00b6\n[Source]\nfun box gen()\n: Generator[(T1 , T2 , T3)] box\n\nReturns\u00b6\n\nGenerator[(T1 , T2 , T3)] box\n"} +{"id": "Pony/aliasing_1.txt", "contents": "# Aliasing and deny guarantees\n\nThe reason for this is that the `iso` reference capability denies other `iso` variables that point to the same object. That is, you can only have one `iso` variable pointing to any given object. The same goes for `trn`.\n\n```pony\nfun test(a: Wombat iso) =>\nvar b: Wombat iso = a // Not allowed!\n```\n\nHere we have some function that gets passed an isolated Wombat. If we try to alias `a` by assigning it to `b`, we'll be breaking reference capability guarantees, so the compiler will stop us. Instead, we can only store aliases that are compatible with the original capability.\n\n__What can I alias an `iso` as?__ Since an `iso` says no other variable can be used by _any_ actor to read from or write to that object, we can only create aliases to an `iso` that can neither read nor write. Fortunately, we have a reference capability that does exactly that: `tag`. So we can do this and the compiler will be happy:\n\n```pony\nfun test(a: Wombat iso) =>\nvar b: Wombat tag = a // Allowed!\n```\n\n__What about aliasing `trn`?__ Since a `trn` says no other variable can be used by _any_ actor to write to that object, we need something that doesn't allow writing but also doesn't prevent our `trn` variable from writing. Fortunately, we have a reference capability that does that too: `box`. So we can do this and the compiler will be happy:\n"} +{"id": "Pony/collections-ListNodes-_1.txt", "contents": "[Source]\nBuild the iterator over nodes.\nreverse of false iterates forward, while\nreverse of true iterates in reverse.\nnew ref create(\nhead: (N | None val),\nreverse: Bool val = false)\n: ListNodes[A, N] ref^\n\nParameters\u00b6\n\nhead: (N | None val)\nreverse: Bool val = false\n\nReturns\u00b6\n\nListNodes[A, N] ref^\n\n\nPublic Functions\u00b6"} +{"id": "Pony/src-net-proxy-_2.txt", "contents": "\"80\")\n```\n\"\"\"\nfun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ => wrap\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-format-format_spec-_4.txt", "contents": "primitive FormatGeneralLarge is FormatSpec\n\ntype FormatFloat is\n( FormatDefault\n| FormatExp\n| FormatExpLarge\n| FormatFix\n| FormatFixLarge\n| FormatGeneral\n| FormatGeneralLarge )\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-HashSet-_7.txt", "contents": ": A^ ?\n\nParameters\u00b6\n\nvalue: box->A!\n\nReturns\u00b6\n\nA^ ?\n\n\nunion\u00b6\n[Source]\nAdd everything in that to the set.\nfun ref union(\nthat: Iterator[A^] ref)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/src-serialise-serialise-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-cli-command_spec-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-pony_check-generator-_60.txt", "contents": "1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211"} +{"id": "Pony/src-pony_check-int_properties-_9.txt", "contents": "new create(choice': U8, int': U128) =>\nchoice = choice'\nint = int'\n\nfun string(): String iso^ =>\n_StringifyIntArg(choice, int)\n\ntype IntUnitTest is Property1UnitTest[IntPropertySample]\n\ntrait IntProperty is Property1[IntPropertySample]\n\"\"\"\nA property implementation for conveniently evaluating properties\nfor all Pony Integer types at once.\n\nThe property needs to be formulated inside the method `int_property`:\n\n```pony\nclass DivisionByZeroProperty is IntProperty\nfun name(): String => \"div/0\"\n"} +{"id": "Pony/src-itertools-iter-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-random-xoroshiro-_5.txt", "contents": "\"\"\"\nUse seed x to seed a [SplitMix64](random-SplitMix64.md) and use this to\ninitialize the 128 bits of state.\n\"\"\"\nlet sm = SplitMix64(x)\n_x = sm.next()\n_y = sm.next()\n\nnew create(x: U64 = 5489, y: U64 = 0) =>\n\"\"\"\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed.\n\"\"\"\n_x = x\n_y = y\nnext()\n\nfun ref next(): U64 =>\n\"\"\"\nA random integer in [0, 2^64)"} +{"id": "Pony/builtin-String-_40.txt", "contents": "\nReturns\u00b6\n\nString iso^\n\n\nreverse_in_place\u00b6\n[Source]\nReverses the byte order in the string. This needs to be changed to handle\nUTF-8 correctly.\nfun ref reverse_in_place()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\npush\u00b6\n[Source]"} +{"id": "Pony/cli-Help-_3.txt", "contents": "fun box eq(\nthat: Help val)\n: Bool val\n\nParameters\u00b6\n\nthat: Help val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Help val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-promises-promise-_0.txt", "contents": "\n\n\n\n\n\n\npromise.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_check-for_all-_8.txt", "contents": "fun ref property2(arg1: T1, arg2: T2, h: PropertyHelper) ? =>\nprop(consume arg1, consume arg2, h)?\nend\n).apply(_helper)?\n\nclass ForAll3[T1, T2, T3]\nlet _gen1: Generator[T1] val\nlet _gen2: Generator[T2] val\nlet _gen3: Generator[T3] val\nlet _helper: TestHelper\n\nnew create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\ngen3': Generator[T3] val,\nh: TestHelper)\n=>\n_gen1 = gen1'\n_gen2 = gen2'\n_gen3 = gen3'"} +{"id": "Pony/src-cli-command-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-buffered-reader-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-ILong-_29.txt", "contents": "\nILong val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nmul_unsafe\u00b6"} +{"id": "Pony/builtin-Any-_0.txt", "contents": "\n\n\n\n\n\n\nAny\u00b6\n[Source]\ninterface tag Any\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/term-EraseLeft-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: EraseLeft val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseLeft val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-encode-base64-base64-_20.txt", "contents": "| 0 =>\noutput = value << 2\nstate = 1\n| 1 =>\nout.push(output or (value >> 4))\noutput = (value and 0x0f) << 4\nstate = 2\n| 2 =>\nout.push(output or (value >> 2))\noutput = (value and 0x03) << 6\nstate = 3\n| 3 =>\nout.push(output or value)\nstate = 0\nelse\nerror\nend\nend\n\nif output != 0 then"} +{"id": "Pony/keywords_1.txt", "contents": "| `embed` | embed a class as a field of another class |\n| `end` | ending of: `if then`, `ifdef`, `while do`, `for in`, `repeat until`, `try`, `object`, `recover`, `match` |\n| `error` | raises an error |\n| `for` | loop statement |\n| `fun` | define a function, executed synchronously |\n| `if` | (1) conditional statement |\n| | (2) to define a guard in a pattern match |\n| `ifdef` | when defining a build flag at compile time: ponyc \u2013D \"foo\" |\n| `iftype` | type conditional statement `iftype A <: B` checks if `A` is a subtype of `B` |\n| `in` | used in a for in - loop statement |\n| `interface` | used in structural subtyping |\n| `is` | (1) used in nominal subtyping |\n| | (2) in type aliasing |\n| | (3) identity comparison |\n| `isnt` | negative identity comparison |\n| `iso` | reference capability \u2013 read and write uniqueness |\n| `let` | declaration of immutable variable: you can't rebind this name to a new value |\n| `match` | pattern matching |\n| `new` | constructor |\n| `not` | logical negation |"} +{"id": "Pony/builtin-U16-_29.txt", "contents": "fun box rotr(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-readline-_39.txt", "contents": "_history.shift()?\nend\nend\n\n_history.push(line)\n_cur_line = _history.size()\n\nfun ref _load_history() =>\n\"\"\"\nLoad the history from a file.\n\"\"\"\n_history.clear()\n\ntry\nwith file = File.open(_path as FilePath) do\nfor line in file.lines() do\n_add_history(consume line)\nend\nend\nend"} +{"id": "Pony/src-collections-persistent-set-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-USize-_1.txt", "contents": "new val create(\nvalue: USize val)\n: USize val^\n\nParameters\u00b6\n\nvalue: USize val\n\nReturns\u00b6\n\nUSize val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-pony_test-pony_test-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-Array-_19.txt", "contents": "\nReturns\u00b6\n\nU16 val ?\n\n\nupdate_u32[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nWrite a U32 at offset. This is only allowed for an array of U8s.\nfun ref update_u32[optional B: (A & Real[B] val & U8 val)](\noffset: USize val,\nvalue: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\noffset: USize val\nvalue: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-signals-signal_handler-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-string-_144.txt", "contents": "// span>Hello!\n```\n\nAdjacent delimiters result in a zero length entry in the array. For\nexample, `\"1CutCut2\".split_by(\"Cut\") => [\"1\", \"\", \"2\"]`.\n\nAn empty delimiter results in an array that contains a single element equal\nto the whole string.\n\nIf you want to split the string with each individual character of `delim`,\nuse [`split`](#split).\n\"\"\"\nlet delim_size = ISize.from[USize](delim.size())\nlet total_size = ISize.from[USize](size())\n\nlet result = recover Array[String] end\nvar current = ISize(0)\n\nwhile ((result.size() + 1) < n) and (current < total_size) do"} +{"id": "Pony/builtin-U8-_43.txt", "contents": "fun box eq(\ny: U8 val)\n: Bool val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: U8 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I64-_39.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: I64 val)\n: (I64 val , I64 val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-serialise-serialise-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-String-_86.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: String box)\n: Bool val\n\nParameters\u00b6\n\nthat: String box\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_52.txt", "contents": "fun box ipproto_sctp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_sdrp\u00b6\n[Source]\nfun box ipproto_sdrp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_send\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_47.txt", "contents": "set_time_at(target, Time.now(), Time.now())\n\nfun set_time_at(\ntarget: String,\natime: (I64, I64),\nmtime: (I64, I64))\n: Bool\n=>\n\"\"\"\nSet the last access and modification times of the directory to the given\nvalues.\n\"\"\"\nif\nnot path.caps(FileChown)\nor not path.caps(FileLookup)\nor (_fd == -1)\nthen\nreturn false\nend\n"} +{"id": "Pony/src-pony_check-generator-_101.txt", "contents": ": Generator[Map[K, V]]\n=>\n\"\"\"\nCreate a generator for `Map` from a generator of key-value tuples.\nThe generated maps will have a size up to `max`,\nbut tend to have fewer entries depending on the source generator `gen`.\n\nIf the generator generates key-value pairs with\nduplicate keys (based on structural equality),\nthe pair that is generated later will overwrite earlier entries in the map.\n\"\"\"\nGenerator[Map[K, V]](\nobject is GenObj[Map[K, V]]\nfun generate(rnd: Randomness): GenerateResult[Map[K, V]] =>\nlet size = rnd.usize(0, max)\n\nlet result: Map[K, V] =\nMap[K, V].create(size).>concat(\nIter[(K^, V^)](gen.value_iter(rnd))\n.take(size)"} +{"id": "Pony/net-OSSockOpt-_395.txt", "contents": "fun box sctp_initiation()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_initiation_ack\u00b6\n[Source]\nfun box sctp_initiation_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_initmsg\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_61.txt", "contents": "\nusize\u00b6\nfun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6"} +{"id": "Pony/builtin-U8-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/whitespace_6.txt", "contents": "# Comments\n\nUse __docstrings__ first! But if you need to put some comments in the implementation of your methods, perhaps to explain what's happening on various lines, you can use C++ style comments. In Pony, block comments can be nested.\n\n```pony\n// This is a line comment.\n/* This is a block comment. */\n/* This block comment /* has another block comment */ inside of it. */\n```\n"} +{"id": "Pony/src-buffered-writer-_29.txt", "contents": "fun ref writev(data: ByteSeqIter) =>\n\"\"\"\nWrite ByteSeqs to the buffer.\n\"\"\"\nfor chunk in data.values() do\nwrite(chunk)\nend\n\nfun ref done(): Array[ByteSeq] iso^ =>\n\"\"\"\nReturn an array of buffered ByteSeqs and reset the Writer's buffer.\n\"\"\"\n_append_current()\n_size = 0\n_chunks = recover Array[ByteSeq] end\n\nfun ref _append_current() =>\nif _current.size() > 0 then\n_chunks.push(_current = recover Array[U8] end)\nend"} +{"id": "Pony/pony_check-Property1-_1.txt", "contents": "params() method.\nThe gen() method is called exactly once to\ninstantiate the generator.\nThe generator produces\nPropertyParams.num_samples\nsamples and each is passed to the\nproperty method for verification.\nIf the property did not verify, the given sample is shrunken if the\ngenerator supports shrinking.\nThe smallest shrunken sample will then be reported to the user.\nA Property1 can be run with\nPonytest.\nTo that end it needs to be wrapped into a\nProperty1UnitTest.\ntrait ref Property1[T: T]\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nThe name of the property used for reporting during execution."} +{"id": "Pony/builtin-ILong-_31.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: ILong val)\n: (ILong val , ILong val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/generics-and-reference-capabilities_2.txt", "contents": "```\n\nUnfortunately, this doesn't compile. For a generic class to compile it must be compilable for all possible types and reference capabilities that satisfy the constraints in the type parameter. In this case, that's any type with any reference capability. The class works for the specific reference capability of `val` as we saw earlier, but how well does it work for `ref`? Let's expand it and see:\n\n```pony\n// Note - this also won't compile\nclass Foo\nvar _c: String ref\n\nnew create(c: String ref) =>\n_c = c\n\nfun get(): String ref => _c\n\nfun ref set(c: String ref) => _c = c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo(recover ref String end)\nenv.out.print(a.get().string())"} +{"id": "Pony/pony_check-PropertyHelper-_14.txt", "contents": "\n\nassert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the contents of the 2 given ReadSeqs are equal ignoring order.\nfun box assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A] box,\nactual: ReadSeq[A] box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nexpect: ReadSeq[A] box\nactual: ReadSeq[A] box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_93.txt", "contents": "fun modc(y: I128): (I128, Bool) =>\n_SignedCheckedArithmetic.mod_checked[I128, U128](this, y)\n\nfun add_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.add_partial[I128](this, y)?\n\nfun sub_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.sub_partial[I128](this, y)?\n\nfun mul_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.mul_partial[I128](this, y)?\n\nfun div_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.div_partial[I128, U128](this, y)?\n\nfun rem_partial(y: I128): I128 ? =>\n_SignedPartialArithmetic.rem_partial[I128, U128](this, y)?\n\nfun divrem_partial(y: I128): (I128, I128) ? =>\n_SignedPartialArithmetic.divrem_partial[I128, U128](this, y)?"} +{"id": "Pony/src-random-random-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-ULong-_27.txt", "contents": "ULong val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nshr_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_49.txt", "contents": "\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/combining-capabilities_0.txt", "contents": "# Combining Capabilities\n\nWhen we talked about fields in the [classes](/types/classes.md) and [variables](/expressions/variables.md) chapters, we passed over the detail of field capabilities. Fields, just like variables, have their own capabilities! A `val` field still refers to something permanently immutable. A `tag` field still can't be read from. An `iso` field is still globally unique: it can only be accessed except through this field of a single instance.\n\nOnce we have fields with capabilities inside objects with capabilities, now we have two capabilities to keep track of. When a field of an object is accessed or extracted, its reference capability depends both on the reference capability of the field and the reference capability of the __origin__, that is, the object the __field__ is being read from. We have to pick a capability for the combination that maintains the guarantees for both the __origin__ reference capability, and for the capability of the __field__.\n"} +{"id": "Pony/whitespace_0.txt", "contents": "# Whitespace\n\nWhitespace (e.g. spaces, tabs, newlines, etc.) in Pony isn't significant.\n\nWell, it mostly isn't significant.\n"} +{"id": "Pony/error-messages_6.txt", "contents": "Info:\n.../a.pony:4:5: receiver type: this->Array[String val] ref\ncolors.push(color)\n^\n.../ponyc/packages/builtin/array.pony:252:3: target type: Array[String val] ref\nfun ref push(value: A): Array[A]^ =>\n^\n.../a.pony:2:15: Array[String val] box is not a subtype of Array[String val] ref: box is not a subtype of ref\nlet colors: Array[String] = Array[String]()\n^\n```\n\nOnce again, Pony is trying to be helpful. The first few lines describe the error, in general terms that only a programming language maven would like: an incompatibility between the receiver type and the target type. However, Pony provides more information: the lines immediately after \"Info:\" tell you what it believes the receiver type to be and the next few lines describe what it believes the target type to be. Finally, the last few lines describe in detail what the problem is.\n\nUnfortunately, this message does not locate the error as clearly as the previous examples.\n\nBreaking it down, the issue seems to be with the call to `push`, with the receiver `colors`. The receiver type is `this->Array[String val] ref`; in other words, the view that this method has of a field whose type is `Array[String val] ref`. In the class `Rainbow`, the field `colors` is indeed declared with the type `Array[String]`, and the default reference capability for `String`s is `val` while the default reference capability for `Array` is `ref`.\n\nThe \"target type\" in this example is the type declaration for the method `push` of the class `Array`, with its type variable `A` replaced by `String` (again, with a default reference capability of `val`). The reference capability for the overall array, as required by the receiver reference capability of `push`, is `ref`. It seems that the receiver type and the target type should be pretty close.\n"} +{"id": "Pony/net-OSSockOpt-_132.txt", "contents": "fun box ipv6_flowinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_flowinfo_flowlabel\u00b6\n[Source]\nfun box ipv6_flowinfo_flowlabel()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_flowinfo_priority\u00b6\n[Source]"} +{"id": "Pony/process-ProcessExitStatus-_0.txt", "contents": "\n\n\n\n\n\n\nProcessExitStatus\u00b6\n[Source]\nRepresenting possible exit states of processes.\nA process either exited with an exit code or, only on posix systems,\nhas been terminated by a signal.\ntype ProcessExitStatus is\n(Exited val | Signaled val)\n\nType Alias For\u00b6\n\n(Exited val | Signaled val)\n\n"} +{"id": "Pony/random-XorOshiro128Plus-_14.txt", "contents": "shuffle[A: A]\u00b6\n[Source]\nfun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_105.txt", "contents": "fun sctp_cause_missing_param():I32 => @pony_os_sockopt_option(I32(542))\nfun sctp_cause_nat_colliding_state():I32 => @pony_os_sockopt_option(I32(543))\nfun sctp_cause_nat_missing_state():I32 => @pony_os_sockopt_option(I32(544))\nfun sctp_cause_no_error():I32 => @pony_os_sockopt_option(I32(545))\nfun sctp_cause_no_user_data():I32 => @pony_os_sockopt_option(I32(546))\nfun sctp_cause_out_of_resc():I32 => @pony_os_sockopt_option(I32(547))\nfun sctp_cause_protocol_violation():I32 => @pony_os_sockopt_option(I32(548))\nfun sctp_cause_request_refused():I32 => @pony_os_sockopt_option(I32(549))\nfun sctp_cause_resource_shortage():I32 => @pony_os_sockopt_option(I32(550))\nfun sctp_cause_restart_w_newaddr():I32 => @pony_os_sockopt_option(I32(551))\nfun sctp_cause_stale_cookie():I32 => @pony_os_sockopt_option(I32(552))\nfun sctp_cause_unrecog_chunk():I32 => @pony_os_sockopt_option(I32(553))\nfun sctp_cause_unrecog_param():I32 => @pony_os_sockopt_option(I32(554))\nfun sctp_cause_unresolvable_addr():I32 => @pony_os_sockopt_option(I32(555))\nfun sctp_cause_unsupported_hmacid():I32 => @pony_os_sockopt_option(I32(556))\nfun sctp_cause_user_initiated_abt():I32 => @pony_os_sockopt_option(I32(557))\nfun sctp_cc_hstcp():I32 => @pony_os_sockopt_option(I32(558))\nfun sctp_cc_htcp():I32 => @pony_os_sockopt_option(I32(559))\nfun sctp_cc_option():I32 => @pony_os_sockopt_option(I32(560))\nfun sctp_cc_opt_rtcc_setmode():I32 => @pony_os_sockopt_option(I32(561))"} +{"id": "Pony/builtin-Comparable-_0.txt", "contents": "\n\n\n\n\n\n\nComparable[A: Comparable[A] #read]\u00b6\n[Source]\ninterface ref Comparable[A: Comparable[A] #read] is\nEquatable[A] ref\n\nImplements\u00b6\n\nEquatable[A] ref\n\n\nPublic Functions\u00b6\nlt\u00b6\n[Source]"} +{"id": "Pony/pony_bench-AsyncBenchContinue-_0.txt", "contents": "\n\n\n\n\n\n\nAsyncBenchContinue\u00b6\n[Source]\nclass val AsyncBenchContinue\n\nPublic Functions\u00b6\ncomplete\u00b6\n[Source]\nfun box complete()\n: None val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/builtin-ULong-_32.txt", "contents": "ULong val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\ndiv_unsafe\u00b6\n[Source]"} +{"id": "Pony/capsicum-CapRights0-_5.txt", "contents": "Bool val\n\n\nmerge\u00b6\n[Source]\nMerge the rights in that into this.\nfun ref merge(\nthat: CapRights0 ref)\n: None val\n\nParameters\u00b6\n\nthat: CapRights0 ref\n\nReturns\u00b6\n\nNone val\n\n\nremove\u00b6"} +{"id": "Pony/src-pony_bench-_runner-_9.txt", "contents": "let _name: String\nlet _bench: MicroBenchmark\n\nnew create(\nponybench: PonyBench,\nbenchmark: MicroBenchmark,\noverhead: Bool)\n=>\n_ponybench = ponybench\n_aggregator = _Aggregator(_ponybench, this, benchmark.config(), overhead)\n_name = benchmark.name()\n_bench = consume benchmark\napply()\n\nbe apply() =>\ntry\n_bench.before()?\n_gc_next_behavior()\n_run_iteration()\nelse"} +{"id": "Pony/src-net-ossockopt-_82.txt", "contents": "fun ipctl_intrdqmaxlen():I32 => @pony_os_sockopt_option(I32(82))\nfun ipctl_intrqdrops():I32 => @pony_os_sockopt_option(I32(83))\nfun ipctl_intrqmaxlen():I32 => @pony_os_sockopt_option(I32(84))\nfun ipctl_keepfaith():I32 => @pony_os_sockopt_option(I32(85))\nfun ipctl_maxid():I32 => @pony_os_sockopt_option(I32(86))\nfun ipctl_rtexpire():I32 => @pony_os_sockopt_option(I32(87))\nfun ipctl_rtmaxcache():I32 => @pony_os_sockopt_option(I32(88))\nfun ipctl_rtminexpire():I32 => @pony_os_sockopt_option(I32(89))\nfun ipctl_sendredirects():I32 => @pony_os_sockopt_option(I32(90))\nfun ipctl_sourceroute():I32 => @pony_os_sockopt_option(I32(91))\nfun ipctl_stats():I32 => @pony_os_sockopt_option(I32(92))\nfun ipport_ephemeralfirst():I32 => @pony_os_sockopt_option(I32(93))\nfun ipport_ephemerallast():I32 => @pony_os_sockopt_option(I32(94))\nfun ipport_hifirstauto():I32 => @pony_os_sockopt_option(I32(95))\nfun ipport_hilastauto():I32 => @pony_os_sockopt_option(I32(96))\nfun ipport_max():I32 => @pony_os_sockopt_option(I32(97))\nfun ipport_reserved():I32 => @pony_os_sockopt_option(I32(98))\nfun ipport_reservedstart():I32 => @pony_os_sockopt_option(I32(99))\nfun ipport_userreserved():I32 => @pony_os_sockopt_option(I32(100))\nfun ipv6_2292dstopts():I32 => @pony_os_sockopt_option(I32(101))"} +{"id": "Pony/src-promises-promise-_30.txt", "contents": "doesn't print an issue title.\n\n`flatten_next` addresses the problem of \"we want the `Issue`, not the\nintermediate `Promise`\". `flatten_next` takes an intermediate promise and\nunwraps it into the fulfilled type. You get to write your promise chain\nwithout having to worry about intermediate promises.\n\nUpdated to use `flatten_next`, our API example becomes:\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet repo: Promise[Repository] =\nGitHub(\"my token\").get_repo(\"ponylang/ponyc\")\n\nlet issue = Promise[Issue] =\nrepo.flatten_next[Issue](FetchIssue~apply(1))\n\nissue.next[None](PrintIssueTitle~apply(env.out))\n"} +{"id": "Pony/src-builtin-array-_91.txt", "contents": "nth: USize = 0,\npredicate: {(box->A!, box->A!): Bool} val =\n{(l: box->A!, r: box->A!): Bool => l is r })\n: USize ?\n=>\n\"\"\"\nFind the `nth` appearance of `value` from the end of the array, starting at\n`offset` and examining lower indices, and using the supplied `predicate` for\ncomparisons. Returns the index of the value, or raise an error if the value\nisn't present.\n\nBy default, the search starts at the last element of the array, returns the\nfirst instance of `value` found, and uses object identity for comparison.\n\"\"\"\nif _size > 0 then\nvar i = if offset >= _size then _size - 1 else offset end\nvar n = USize(0)\n\nrepeat\nif predicate(_ptr._apply(i), value) then"} +{"id": "Pony/builtin-I64-_36.txt", "contents": "fun box op_not()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/4_traits-and-interfaces_9.txt", "contents": "## Structural subtyping in Pony\n\nPony has structural subtyping using __interfaces__. Interfaces look like traits, but they use the keyword `interface`.\n\n```pony\ninterface HasName\nfun name(): String\n```\n\nHere, `HasName` looks a lot like `Named`, except it's an interface instead of a trait. This means both `Bob` and `Larry` provide `HasName`! The programmers that wrote `Bob` and `Larry` don't even have to be aware that `HasName` exists.\n"} +{"id": "Pony/builtin-I128-_15.txt", "contents": "fun box mul(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: I128 val)\n: (I128 val , I128 val)\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_67.txt", "contents": "fun box sol_ax25()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_hci_raw\u00b6\n[Source]\nfun box sol_hci_raw()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_ipx\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_listener-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/pony_check-ASCIIPrintable-_2.txt", "contents": "\nthat: ASCIIPrintable val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIPrintable val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIPrintable val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-IntPairPropertySample-_0.txt", "contents": "\n\n\n\n\n\n\nIntPairPropertySample\u00b6\n[Source]\nclass ref IntPairPropertySample is\nStringable box\n\nImplements\u00b6\n\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/memory-allocation_3.txt", "contents": "# And, long-running actors\n\nMight cause unexpected out of memory errors, since the GC is not yet triggered on an out-of-memory segfault or stack exhaustion.\n\n...\n"} +{"id": "Pony/builtin-String-_81.txt", "contents": "This method errors if this string cannot be parsed to a float,\nif the result would over- or underflow,\nthe offset exceeds the size of this string or\nthere are leftover characters in the string after conversion.\nExamples:\n\"1.5\".f64()? == F64(1.5)\n\"1.19208e-07\".f64()? == F64(1.19208e-07)\n\"Inf\".f64()?.infinite() == true\n\nfun box f64(\noffset: ISize val = 0)\n: F64 val ?\n\nParameters\u00b6\n\noffset: ISize val = 0\n\nReturns\u00b6\n\nF64 val ?"} +{"id": "Pony/builtin-U16-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_unit_test-_8.txt", "contents": "152\n153\n154\n155\n156\n157use \"pony_test\"\n\nclass iso Property1UnitTest[T] is UnitTest\n\"\"\"\nProvides plumbing for integration of PonyCheck\n[Properties](pony_check-Property1.md) into [PonyTest](pony_test--index.md).\n\nWrap your properties into this class and use it in a\n[TestList](pony_test-TestList.md):\n\n```pony\nuse \"pony_test\"\nuse \"pony_check\"\n\nclass MyProperty is Property1[String]"} +{"id": "Pony/src-net-tcp_connection-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/builtin-U32-_17.txt", "contents": "fun box div_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6"} +{"id": "Pony/pony_check-Generator-_5.txt", "contents": ": T^ ?\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nT^ ?\n\n\ngenerate_and_shrink\u00b6\n[Source]\nfun box generate_and_shrink(\nrnd: Randomness ref)\n: (T^ , Iterator[T^] ref) ?\n\nParameters\u00b6\n\nrnd: Randomness ref"} +{"id": "Pony/builtin-UnsignedInteger-_44.txt", "contents": "\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6"} +{"id": "Pony/builtin-I32-_22.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: I32 val)\n: (I32 val , I32 val) ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/format-PrefixSign-_0.txt", "contents": "\n\n\n\n\n\n\nPrefixSign\u00b6\n[Source]\nprimitive val PrefixSign is\nPrefixSpec val\n\nImplements\u00b6\n\nPrefixSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_8.txt", "contents": "fun box ctz_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/capsicum-CapRights0-_3.txt", "contents": "cap: U64 val)\n: None val\n\nParameters\u00b6\n\ncap: U64 val\n\nReturns\u00b6\n\nNone val\n\n\nunset\u00b6\n[Source]\nfun ref unset(\ncap: U64 val)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/random-XorOshiro128Plus-_1.txt", "contents": "Constructors\u00b6\nfrom_u64\u00b6\n[Source]\nUse seed x to seed a SplitMix64 and use this to\ninitialize the 128 bits of state.\nnew ref from_u64(\nx: U64 val = 5489)\n: XorOshiro128Plus ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\n\nReturns\u00b6\n\nXorOshiro128Plus ref^\n\n\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_50.txt", "contents": "\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-files-file-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-term-ansi-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-capsicum-cap-_12.txt", "contents": "fun acl_delete(): U64 => _id(1, 1 << 17)\nfun acl_get(): U64 => _id(1, 1 << 18)\nfun acl_set(): U64 => _id(1, 1 << 19)\n\nfun kqueue_change(): U64 => _id(1, 1 << 20)\nfun kqueue(): U64 => kqueue_event() or kqueue_change()\n\nfun _id(idx: U64, bit: U64): U64 =>\n\"\"\"\nBuild a Capsicum ID from an index and a bit position.\n\"\"\"\n(1 << (57 + idx)) or bit\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-Flags-_17.txt", "contents": "Parameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nReturns true if the flags set on this are a subset of the flags set on\nthat or they are the same. Flags is only partially ordered, so le is not\nthe opposite of te.\nfun box le(\nthat: Flags[A, B] box)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-I64-_3.txt", "contents": "I64 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: I64 val^\n\nReturns\u00b6\n\nI64 val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Integer-_1.txt", "contents": "new val create(\nvalue: A)\n: Real[A] val^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nReal[A] val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-files-path-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/net-OSSockOpt-_501.txt", "contents": "fun box so_netsvc_marking_level()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_net_service_type\u00b6\n[Source]\nfun box so_net_service_type()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_nke\u00b6\n[Source]"} +{"id": "Pony/pony_test-ITest-_0.txt", "contents": "\n\n\n\n\n\n\nITest\u00b6\n[Source]\ninterface ref ITest\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: None val ?\n\nReturns\u00b6\n\nNone val ?"} +{"id": "Pony/src-net-tcp_connection-_105.txt", "contents": "\"\"\"\nifdef not windows then\n// TODO: Make writev_batch_size user configurable\nlet writev_batch_size: USize = @pony_os_writev_max().usize()\nvar num_to_send: USize = 0\nvar bytes_to_send: USize = 0\nvar bytes_sent: USize = 0\nwhile _writeable and (_pending_writev_total > 0) do\nif bytes_sent >= _yield_after_writing then\n// We've written _yield_after_writing bytes.\n// Yield and write again later.\n_write_again()\nreturn false\nend\ntry\n// Determine number of bytes and buffers to send.\nif _pending_writev_posix.size() < writev_batch_size then\nnum_to_send = _pending_writev_posix.size()\nbytes_to_send = _pending_writev_total\nelse"} +{"id": "Pony/src-pony_check-property_unit_test-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-ISize-_7.txt", "contents": "\nUSize val\n\n\nctz_unsafe\u00b6\n[Source]\nfun box ctz_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-net-net_address-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-term-ansi_term-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-list-_90.txt", "contents": "try\n_contains[B](head()?, a)\nelse\nfalse\nend\n\nfun _contains[B: (A & HasEq[A!] #read) = A](\nln: this->ListNode[A],\na: box->B)\n: Bool\n=>\n\"\"\"\nPrivate helper for `contains`, recursively working with `ListNode`s.\n\"\"\"\ntry\nif a == ln()? then\ntrue\nelse\n_contains[B](ln.next() as this->ListNode[A], a)\nend"} +{"id": "Pony/builtin-F32-_24.txt", "contents": "fun box powi(\ny: I32 val)\n: F32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nF32 val\n\n\nsqrt\u00b6\n[Source]\nfun box sqrt()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-term-readline-_30.txt", "contents": "Backward delete.\n\"\"\"\nif _cur_pos == 0 then\nreturn\nend\n\ntry\nvar c = U8(0)\n\nrepeat\n_cur_pos = _cur_pos - 1\nc = _edit.at_offset(_cur_pos)?\n_edit.delete(_cur_pos, 1)\nuntil\n(_cur_pos == 0) or ((c and 0xC0) != 0x80)\nend\n\n_refresh_line()\nend\n"} +{"id": "Pony/builtin-F64-_39.txt", "contents": "y: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmul_unsafe\u00b6\nfun box mul_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n"} +{"id": "Pony/src-builtin-unsigned-_62.txt", "contents": "\nfun div_partial(y: U64): U64 ? =>\n_UnsignedPartialArithmetic.div_partial[U64](this, y)?\n\nfun rem_partial(y: U64): U64 ? =>\n_UnsignedPartialArithmetic.rem_partial[U64](this, y)?\n\nfun divrem_partial(y: U64): (U64, U64) ? =>\n_UnsignedPartialArithmetic.divrem_partial[U64](this, y)?\n\nprimitive ULong is UnsignedInteger[ULong]\nnew create(value: ULong) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.ulong()\n\nnew min_value() => 0\n\nnew max_value() =>\nifdef ilp32 or llp64 then\n0xFFFF_FFFF\nelse"} +{"id": "Pony/builtin-U8-_46.txt", "contents": "fun box ge(\ny: U8 val)\n: Bool val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: U8 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/annotations_2.txt", "contents": "- `for`\n- `match`\n- `|` (only as a case in a `match` expression)\n- `recover`\n- `object`\n- `{` (only as a lambda)\n- `with`\n- `try`\n- `then` (only when part of a `try` block)\n"} +{"id": "Pony/files-FilePath-_0.txt", "contents": "\n\n\n\n\n\n\nFilePath\u00b6\n[Source]\nA FilePath represents a capability to access a path. The path will be\nrepresented as an absolute path and a set of capabilities for operations on\nthat path.\nclass val FilePath\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a new path to any location.\nUnless absolute, path' will be relative to the program's working directory.\nCapabilities are exactly as given."} +{"id": "Pony/src-encode-base64-base64-_22.txt", "contents": "error\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/buffered-Reader-_31.txt", "contents": "Peek at a big-endian I64.\nfun box peek_i64_be(\noffset: USize val = 0)\n: I64 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI64 val ?\n\n\npeek_i64_le\u00b6\n[Source]\nPeek at a little-endian I64.\nfun box peek_i64_le(\noffset: USize val = 0)\n: I64 val ?"} +{"id": "Pony/src-process-_process-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/collections-List-_25.txt", "contents": "None val\n\n\nconcat\u00b6\n[Source]\nAdd len iterated elements to the tail of the list, starting from the given\noffset.\nWhen len is -1, all elements of iterator are pushed.\nDoes not remove elements from iterator.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.concat(other_list.values()) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is unchanged\n\nfun ref concat(\niter: Iterator[A^] ref,\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/7_type-expressions_3.txt", "contents": "# Unions\n\nA __union__ type is written like a __tuple__, but it uses a `|` (pronounced \"or\" when reading the type) instead of a `,` between its elements. Where a tuple represents a collection of values, a union represents a _single_ value that can be any of the specified types.\n\nUnions can be used for tons of stuff that require multiple concepts in other languages. For example, optional values, enumerations, marker values, and more.\n\n```pony\nvar x: (String | None)\n```\n\nHere we have an example of using a union to express an optional type, where `x` might be a `String`, but it also might be `None`.\n"} +{"id": "Pony/src-builtin-array-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-iterator-_8.txt", "contents": "# Implementing Iterators\n\nIterator implementations need to adhere to the following rules to be considered well-behaved:\n\n* If the Iterator is exhausted, `has_next()` needs to return `false`.\n* Once `has_next()` returned `false` it is not allowed to switch back to `true`\n(Unless the Iterator supports rewinding)\n* `has_next()` does not change its returned value if `next()` has not been called.\nThat means, that between two calls to `next()` any number of calls to `has_next()`\nneed to return the same value. (Unless the Iterator supports rewinding)\n* A call to `next()` erroring does not necessarily denote exhaustiveness.\n"} +{"id": "Pony/builtin-ISize-_37.txt", "contents": "\nISize val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\ndiv\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_13.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nrotl\u00b6\n[Source]\nfun box rotl(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/random-XorShift128Plus-_5.txt", "contents": "u32\u00b6\n[Source]\nfun ref u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n"} +{"id": "Pony/src-builtin-string-_80.txt", "contents": "1592\n1593\n1594\n1595\n1596\n1597\n1598\n1599\n1600\n1601\n1602\n1603\n1604\n1605\n1606\n1607\n1608\n1609\n1610\n1611"} +{"id": "Pony/builtin-UnsignedInteger-_30.txt", "contents": "\n(A , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\ndivc\u00b6"} +{"id": "Pony/builtin-I32-_35.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_48.txt", "contents": "Bool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: U128 val)\n: Bool val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/net-OSSockOpt-_556.txt", "contents": "fun box tcpopt_ccecho()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_ccnew\u00b6\n[Source]\nfun box tcpopt_ccnew()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_eol\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_16.txt", "contents": "U32 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/assert--index-_0.txt", "contents": "\n\n\n\n\n\n\nAssert package\u00b6\nContains runtime assertions. If you are looking for assertion that only run\nwhen your code was compiled with the debug flag, check out Assert. For\nassertions that are always enabled, check out Fact.\nPublic Types\u00b6\n\nprimitive Assert\nprimitive Fact\n\n\n\n\n"} +{"id": "Pony/collections-List-_14.txt", "contents": "i: USize val)\n: ListNode[A] ref ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nListNode[A] ref ?\n\n\nclear\u00b6\n[Source]\nEmpties the list.\nfun ref clear()\n: None val\n\nReturns\u00b6\n"} +{"id": "Pony/1_classes_3.txt", "contents": "## Constructors\n\nPony constructors have names. Other than that, they are just like constructors in other languages. They can have parameters, and they always return a new instance of the type. Since they have names, you can have more than one constructor for a type.\n\nConstructors are introduced with the __new__ keyword.\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U64\n\nnew create(name': String) =>\nname = name'\n_hunger_level = 0\n\nnew hungry(name': String, hunger': U64) =>\nname = name'\n_hunger_level = hunger'\n```\n"} +{"id": "Pony/pony_check-Generators-_8.txt", "contents": "\nGenerator[Array[T] ref] box\n\n\nshuffled_iter[T: T]\u00b6\n[Source]\nfun box shuffled_iter[T: T](\narray: Array[T] ref)\n: Generator[Iterator[this->T!] ref] box\n\nParameters\u00b6\n\narray: Array[T] ref\n\nReturns\u00b6\n\nGenerator[Iterator[this->T!] ref] box\n\n\nlist_of[T: T]\u00b6"} +{"id": "Pony/src-cli-command_help-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-array-_74.txt", "contents": "class Example\nvar other: (Example | None) = None\n\nlet arr: Array[Example] iso = recover\nlet obj1 = Example\nlet obj2 = Example\nobj1.other = obj2\nobj2.other = obj1\n[obj1; obj2]\nend\n```\n\"\"\"\nlet start_ptr = cpointer(split_point)\nlet size' = _size - _size.min(split_point)\nlet alloc = _alloc - _size.min(split_point)\n\ntrim_in_place(0, split_point)\n\nlet right = recover\nif size' > 0 then"} +{"id": "Pony/src-itertools-iter-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-term-ansi_notify-_0.txt", "contents": "\n\n\n\n\n\n\nansi_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I64-_7.txt", "contents": "\nReturns\u00b6\n\nU64 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbitwidth\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_list-_1.txt", "contents": "12\n13\n14\n15\n16\n17trait TestList\n\"\"\"\nSource of unit tests for a PonyTest object.\nSee package doc string for further information and example use.\n\"\"\"\n\nfun tag tests(test: PonyTest)\n\"\"\"\nAdd all the tests in this suite to the given test object.\nTypically the implementation of this function will be of the form:\n```pony\nfun tests(test: PonyTest) =>\ntest(_TestClass1)\ntest(_TestClass2)\ntest(_TestClass3)"} +{"id": "Pony/src-pony_test-pony_test-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-pony_check-property_unit_test-_14.txt", "contents": "let params = prop.params()\nh.long_test(params.timeout)\nlet property_runner =\nPropertyRunner[(T1, T2, T3)](\nconsume prop,\nparams,\nh, // PropertyResultNotify\nh, // PropertyLogger\nh.env\n)\nh.dispose_when_done(property_runner)\nproperty_runner.run()\n\nclass iso Property4UnitTest[T1, T2, T3, T4] is UnitTest\n\nvar _prop4: ( Property4[T1, T2, T3, T4] iso | None )\nlet _name: String\n\nnew iso create(p4: Property4[T1, T2, T3, T4] iso, name': (String | None) = None) =>\n_name ="} +{"id": "Pony/random-XorShift128Plus-_12.txt", "contents": "U64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)"} +{"id": "Pony/src-cli-command-_13.txt", "contents": "Returns the Arg by name, defaulting to a fake Arg if unknown.\n\"\"\"\ntry _args(name)? else Arg(ArgSpec.bool(name), false) end\n\nclass val Option\n\"\"\"\nOption contains a spec and an effective value for a given option.\n\"\"\"\nlet _spec: OptionSpec\nlet _value: _Value\n\nnew val create(spec': OptionSpec, value': _Value) =>\n_spec = spec'\n_value = value'\n\nfun _append(next: Option): Option =>\nOption(_spec, _spec._typ_p().append(_value, next._value))\n\nfun spec() : OptionSpec => _spec\n"} +{"id": "Pony/pony_check-PropertyRunner-_6.txt", "contents": "\nname: String val\nround: (_Shrink val | _Run val)\nph: PropertyHelper val\n\n\ndispose_when_done\u00b6\n[Source]\nLet us not have older rounds interfere with newer ones,\nthus dispose directly.\nbe dispose_when_done(\ndisposable: DisposableActor tag,\nround: (_Shrink val | _Run val))\n\nParameters\u00b6\n\ndisposable: DisposableActor tag\nround: (_Shrink val | _Run val)\n\n"} +{"id": "Pony/buffered-Reader-_36.txt", "contents": "\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nF32 val ?\n\n\npeek_f32_le\u00b6\n[Source]\nPeek at a little-endian F32.\nfun box peek_f32_le(\noffset: USize val = 0)\n: F32 val ?\n\nParameters\u00b6\n\noffset: USize val = 0"} +{"id": "Pony/net-NoProxy-_2.txt", "contents": "fun box apply(\nwrap: TCPConnectionNotify iso)\n: TCPConnectionNotify iso^\n\nParameters\u00b6\n\nwrap: TCPConnectionNotify iso\n\nReturns\u00b6\n\nTCPConnectionNotify iso^\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/random-XorOshiro128Plus-_10.txt", "contents": "[Source]\nfun ref ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun ref isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nint_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6"} +{"id": "Pony/src-ini-ini-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-net_address-_19.txt", "contents": "\"\"\"\n\n@ntohl(_scope)\n\nfun ipv4_addr() : U32 =>\n\"\"\"\nReturns IPV4 address (`_addr` field in the class) if `ip4()` is `True`.\nIf `ip4()` is `False` then the contents are invalid.\n\"\"\"\n@ntohl(_addr)\n\nfun ipv6_addr() : (U32, U32, U32, U32) =>\n\"\"\"\nReturns IPV6 address as the 4-tuple (say `a`).\n`a._1 = _addr1` // Bits 0-32 of the IPv6 address in host byte order.\n`a._2 = _addr2 // Bits 33-64 of the IPv6 address in host byte order.\n`a._3 = _addr3 // Bits 65-96 of the IPv6 address in host byte order.\n`a._4 = _addr4 // Bits 97-128 of the IPv6 address in host byte order.\n\nThe contents of the 4-tuple returned are valid only if `ip6()` is `True`."} +{"id": "Pony/builtin-Seq-_1.txt", "contents": "Parameters\u00b6\n\nlen: USize val = 0\n\nReturns\u00b6\n\nSeq[A] ref^\n\n\nPublic Functions\u00b6\nreserve\u00b6\n[Source]\nReserve space for len elements.\nfun ref reserve(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val"} +{"id": "Pony/src-collections-list-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-files-directory-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/format-AlignCenter-_0.txt", "contents": "\n\n\n\n\n\n\nAlignCenter\u00b6\n[Source]\nprimitive val AlignCenter\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: AlignCenter val^\n\nReturns\u00b6\n\nAlignCenter val^"} +{"id": "Pony/net-TCPListenAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: TCPListenAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPListenAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/src-buffered-reader-_78.txt", "contents": "end\nend\n\nerror\n\nfun ref _distance_of(byte: U8): USize ? =>\n\"\"\"\nGet the distance to the first occurrence of the given byte\n\"\"\"\nif _chunks.size() == 0 then\nerror\nend\n\nvar node = _chunks.head()?\nvar search_len: USize = 0\n\nwhile true do\n(var data, var offset) = node()?\n\ntry"} +{"id": "Pony/builtin-F64-_51.txt", "contents": "Parameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nneg\u00b6\nfun box neg()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\neq\u00b6\nfun box eq("} +{"id": "Pony/src-builtin-signed-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/src-pony_check-generator-_108.txt", "contents": "var chosen: (Generator[T] | None) = None\nfor weighted_gen in weighted_generators.values() do\nlet new_sum = running_sum + weighted_gen._1\nif ((desired_sum == 0) or ((running_sum < desired_sum) and (desired_sum <= new_sum))) then\n// we just crossed or reached the desired sum\nchosen = weighted_gen._2\nbreak\nelse\n// update running sum\nrunning_sum = new_sum\nend\nend\nmatch chosen\n| let x: Generator[T] box => x.generate(rnd)?\n| None =>\nDebug(\"chosen is None, desired_sum: \" + desired_sum.string() +\n\"running_sum: \" + running_sum.string())\nerror\nend\nend)"} +{"id": "Pony/src-net-udp_socket-_44.txt", "contents": "\nwhile _readable do\nlet size = _packet_size\nlet data = _read_buf = recover Array[U8] .> undefined(size) end\nlet from = recover NetAddress end\nlet len =\n@pony_os_recvfrom(_event, data.cpointer(), data.space(),\nfrom) ?\n\nif len == 0 then\n_readable = false\nreturn\nend\n\ndata.truncate(len)\n_notify.received(this, consume data, consume from)\n\nsum = sum + len\n\nif sum > (1 << 12) then"} +{"id": "Pony/src-collections-persistent-map-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/collections-persistent-Vec-_3.txt", "contents": "\nParameters\u00b6\n\ni: USize val\nvalue: val->A\n\nReturns\u00b6\n\nVec[A] val ?\n\n\ninsert\u00b6\n[Source]\nReturn a vector with an element inserted. Elements after this are moved\nup by one index, extending the vector. An out of bounds index raises an\nerror.\nfun val insert(\ni: USize val,\nvalue: val->A)\n: Vec[A] val ?"} +{"id": "Pony/encode-base64-Base64-_0.txt", "contents": "\n\n\n\n\n\n\nBase64\u00b6\n[Source]\nprimitive val Base64\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Base64 val^\n\nReturns\u00b6\n\nBase64 val^"} +{"id": "Pony/4_control-structures_16.txt", "contents": "\nNote the call to `values()` on the array \u2014 this is because the loop needs an iterator, not an array.\n\nLike python, pony also support iterating over both index and value like python `enumerate`, like this:\n\n```pony\nfor (index, value) in [\"Bob\"; \"Fred\"; \"Sarah\"].pairs() do\nenv.out.print(\"(\" + index.string() + \", \" + value + \")\")\nend\n```\n\n\n\nThe iterator does not have to be of any particular type, but needs to provide the following methods:\n\n```pony\nfun has_next(): Bool\nfun next(): T?\n```\n"} +{"id": "Pony/builtin-Platform-_2.txt", "contents": "Bool val\n\n\ndragonfly\u00b6\n[Source]\nfun box dragonfly()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nopenbsd\u00b6\n[Source]\nfun box openbsd()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/process-WaitpidError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-flag-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/pony_check-Generators-_16.txt", "contents": "one_of_safe[T: T]\u00b6\n[Source]\nVersion of one_of that will error if xs is empty.\nfun box one_of_safe[T: T](\nxs: ReadSeq[T] box,\ndo_shrink: Bool val = false)\n: Generator[box->T] box ?\n\nParameters\u00b6\n\nxs: ReadSeq[T] box\ndo_shrink: Bool val = false\n\nReturns\u00b6\n\nGenerator[box->T] box ?\n\n\nfrequency[T: T]\u00b6\n[Source]"} +{"id": "Pony/collections-HashMap-_9.txt", "contents": "(K^ , V^) ?\n\n\nget_or_else\u00b6\n[Source]\nGet the value associated with provided key if present. Otherwise,\nreturn the provided alternate value.\nfun box get_or_else(\nkey: box->K!,\nalt: this->V)\n: this->V\n\nParameters\u00b6\n\nkey: box->K!\nalt: this->V\n\nReturns\u00b6\n\nthis->V"} +{"id": "Pony/reference-capabilities_2.txt", "contents": "# Basic concepts\n\nThere are a few simple concepts you need to understand before reference capabilities will make any sense. We've talked about some of these already, and some may already be obvious to you, but it's worth recapping here.\n"} +{"id": "Pony/src-net-ossockopt-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-USize-_36.txt", "contents": "fun box op_or(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/net-UDPSocket-_12.txt", "contents": "multicast_join\u00b6\n[Source]\nAdd a multicast group. This can be limited to packets arriving on a\nspecific interface.\nbe multicast_join(\ngroup: String val,\nto: String val = \"\")\n\nParameters\u00b6\n\ngroup: String val\nto: String val = \"\"\n\n\nmulticast_leave\u00b6\n[Source]\nDrop a multicast group. This can be limited to packets arriving on a\nspecific interface. No attempt is made to check that this socket has\npreviously added this group.\nbe multicast_leave("} +{"id": "Pony/signals-SignalRaise-_3.txt", "contents": "Parameters\u00b6\n\nthat: SignalRaise val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/capsicum-Cap-_0.txt", "contents": "\n\n\n\n\n\n\nCap\u00b6\n[Source]\nThe Capsicum rights.\nprimitive val Cap\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Cap val^\n\nReturns\u00b6\n"} +{"id": "Pony/time--index-_0.txt", "contents": "\n\n\n\n\n\n\nTime Package\u00b6\nThe Time Package provides classes and methods for timing operations,\ndealing with dates and times, and scheduling tasks.\nPublic Types\u00b6\n\nprimitive Nanos\nclass PosixDate\nprimitive Time\nclass Timer\ninterface TimerNotify\nactor Timers\n\n"} +{"id": "Pony/src-files-file-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-SignedInteger-_28.txt", "contents": "fun box fldc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-ULong-_11.txt", "contents": "fun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U128-_44.txt", "contents": "U128 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: U128 val)\n: U128 val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_214.txt", "contents": "fun box ip_max_source_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_minttl\u00b6\n[Source]\nfun box ip_minttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_min_memberships\u00b6\n[Source]"} +{"id": "Pony/collections-Flags-_6.txt", "contents": "Parameters\u00b6\n\nflag: A\n\nReturns\u00b6\n\nNone val\n\n\nflip\u00b6\n[Source]\nSets the flag if it is unset, unsets the flag if it is set.\nfun ref flip(\nflag: A)\n: None val\n\nParameters\u00b6\n\nflag: A\n"} +{"id": "Pony/builtin-U128-_37.txt", "contents": "fun box shl_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-string-_148.txt", "contents": "break\nend\n\nresult.push(cur = recover String end)\nelse\n// Add bytes to the current string.\nvar j = U8(0)\n\nwhile j < len do\ncur.push(_ptr._apply(i + j.usize()))\nj = j + 1\nend\nend\n\ni = i + len.usize()\nend\nend\n\n// Add all remaining bytes to the current string.\nwhile i < _size do"} +{"id": "Pony/src-collections-list-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/pony_test-TestHelper-_4.txt", "contents": "\nactual: Bool val\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_false\u00b6\n[Source]\nAssert that the given expression is false.\nfun box assert_false(\nactual: Bool val,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/builtin-String-_37.txt", "contents": "Parameters\u00b6\n\nfrom: ISize val\nto: ISize val = call\n\nReturns\u00b6\n\nString iso^\n\n\nlower\u00b6\n[Source]\nReturns a lower case version of the string.\nfun box lower()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n"} +{"id": "Pony/src-collections-heap-_14.txt", "contents": "\ntype BinaryHeapPriority[A: Comparable[A] #read] is\n( _BinaryHeapPriority[A]\n& (MinHeapPriority[A] | MaxHeapPriority[A]))\n\ninterface val _BinaryHeapPriority[A: Comparable[A] #read]\nnew val create()\nfun apply(x: A, y: A): Bool\n\nprimitive MinHeapPriority[A: Comparable[A] #read] is _BinaryHeapPriority[A]\nfun apply(x: A, y: A): Bool =>\nx < y\n\nprimitive MaxHeapPriority [A: Comparable[A] #read] is _BinaryHeapPriority[A]\nfun apply(x: A, y: A): Bool =>\nx > y\n\n\n\n"} +{"id": "Pony/term-ANSI-_13.txt", "contents": "Blue text.\nfun box blue()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nmagenta\u00b6\n[Source]\nMagenta text.\nfun box magenta()\n: String val\n\nReturns\u00b6\n\nString val\n\n"} +{"id": "Pony/src-random-mt-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-SignedInteger-_55.txt", "contents": "I8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-String-_72.txt", "contents": "isize\u00b6\n[Source]\nfun box isize(\nbase: U8 val = 0)\n: ISize val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nISize val ?\n\n\nu8\u00b6\n[Source]\nfun box u8(\nbase: U8 val = 0)\n: U8 val ?"} +{"id": "Pony/builtin-Bool-_1.txt", "contents": "new val create(\nfrom: Bool val)\n: Bool val^\n\nParameters\u00b6\n\nfrom: Bool val\n\nReturns\u00b6\n\nBool val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\ny: Bool val)\n: Bool val\n"} +{"id": "Pony/format-FormatGeneralLarge-_1.txt", "contents": "new val create()\n: FormatGeneralLarge val^\n\nReturns\u00b6\n\nFormatGeneralLarge val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatGeneralLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatGeneralLarge val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-real-_42.txt", "contents": "compile_intrinsic\n\nfun f32_unsafe(): F32 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun f64_unsafe(): F64 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\ntrait val Real[A: Real[A] val] is\n(Stringable & _ArithmeticConvertible & Comparable[A])\nnew val create(value: A)\n"} +{"id": "Pony/process-KillError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_215.txt", "contents": "fun box ip_min_memberships()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_msfilter\u00b6\n[Source]\nfun box ip_msfilter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_mtu\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_22.txt", "contents": "\nNone val\n\n\nset_keepalive\u00b6\n[Source]\nSets the TCP keepalive timeout to approximately secs seconds. Exact\ntiming is OS dependent. If secs is zero, TCP keepalive is disabled. TCP\nkeepalive is disabled by default. This can only be set on a connected\nsocket.\nfun ref set_keepalive(\nsecs: U32 val)\n: None val\n\nParameters\u00b6\n\nsecs: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Integer-_22.txt", "contents": "y: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nfldc\u00b6\n[Source]\nDivide this integer by y and return the result, rounded towards negative infinity and a flag indicating overflow or division by zero.\nfun box fldc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/process-ProcessMonitor-_2.txt", "contents": "notifier: ProcessNotify iso\nfilepath: FilePath val\nargs: Array[String val] val\nvars: Array[String val] val\nwdir: (FilePath val | None val) = reference\nprocess_poll_interval: U64 val = call\n\nReturns\u00b6\n\nProcessMonitor tag^\n\n\nPublic Behaviours\u00b6\nprint\u00b6\n[Source]\nPrint some bytes and append a newline.\nbe print(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6"} +{"id": "Pony/src-collections-persistent-vec-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-capsicum-cap-_0.txt", "contents": "\n\n\n\n\n\n\ncap.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I16-_42.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: I16 val)\n: Bool val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U32-_47.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-net-dns-_8.txt", "contents": "\"\"\"\n@pony_os_host_ip6(host.cstring())\n\nfun _resolve(\nauth: DNSAuth,\nfamily: U32,\nhost: String,\nservice: String)\n: Array[NetAddress] iso^\n=>\n\"\"\"\nTurns an addrinfo pointer into an array of addresses.\n\"\"\"\nvar list = recover Array[NetAddress] end\nvar result = @pony_os_addrinfo(family, host.cstring(), service.cstring())\n\nif not result.is_null() then\nvar addr = result\n\nwhile not addr.is_null() do"} +{"id": "Pony/src-pony_check-property_helper-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-builtin-signed-_61.txt", "contents": "_SignedPartialArithmetic.sub_partial[I32](this, y)?\n\nfun mul_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.mul_partial[I32](this, y)?\n\nfun div_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.div_partial[I32, U32](this, y)?\n\nfun rem_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.rem_partial[I32, U32](this, y)?\n\nfun divrem_partial(y: I32): (I32, I32) ? =>\n_SignedPartialArithmetic.divrem_partial[I32, U32](this, y)?\n\nfun fld_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.fld_partial[I32, U32](this, y)?\n\nfun mod_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.mod_partial[I32, U32](this, y)?\n"} +{"id": "Pony/src-cli-command_spec-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-collections-list-_56.txt", "contents": "\n\"\"\"\nvar _head: (ListNode[A] | None) = None\nvar _tail: (ListNode[A] | None) = None\nvar _size: USize = 0\n\nnew create(len: USize = 0) =>\n\"\"\"\nAlways creates an empty list with 0 nodes, `len` is ignored.\n\nRequired method for `List` to satisfy the `Seq` interface.\n```pony\nlet my_list = List[String]\n```\n\"\"\"\nNone\n\nnew unit(a: A) =>\n\"\"\"\nCreates a list with 1 node of element."} +{"id": "Pony/builtin-ULong-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-List-_1.txt", "contents": "// prepend() returns a new List, leaving the\n// old list unchanged\nlet l2 = empty.prepend(3) // List(3)\nlet l3 = l2.prepend(2) // List(2, 3)\nlet l4 = l3.prepend(1) // List(1, 2, 3)\nlet l4_head = l4.head() // 1\nlet l4_tail = l4.tail() // List(2, 3)\n\nl4_head == 1\nLists[U32].eq(l4, Lists[U32]([1; 2; 3]))?\nLists[U32].eq(l4_tail, Lists[U32]([2; 3]))?\n\nlet doubled = l4.map[U32]({(x) => x * 2 })\n\nLists[U32].eq(doubled, Lists[U32]([2; 4; 6]))?\nend\n\ntype List[A: A] is\n(Cons[A] val | Nil[A] val)\n"} +{"id": "Pony/src-collections-list-_72.txt", "contents": "end\nend\nend\n\nfun ref truncate(len: USize) =>\n\"\"\"\nPop tail elements until the list is len size.\nIf the list is already smaller than len, do nothing.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.truncate(1) // my_list is [\"a\"]\n```\n\"\"\"\ntry\nwhile _size > len do\npop()?\nend\nend\n"} +{"id": "Pony/encode-base64--index-_0.txt", "contents": "\n\n\n\n\n\n\nBase64 package\u00b6\nThe Base64 package contains support for doing Base64 binary-to-text encodings.\nWe currently have support 3 encodings: PEM, MIME and URL.\nTo learn more about Base64, we suggest you check out the\nwikipedia entry.\nExample code\u00b6\nuse \"encode/base64\"\n\nactor Main\nnew create(env: Env) =>\nenv.out.print(Base64.encode(\"foobar\"))\ntry\nenv.out.print(Base64.decode[String iso](\"Zm9vYmFy\")?)"} +{"id": "Pony/src-builtin-unsigned-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/builtin-USize-_31.txt", "contents": "fun box sub_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_312.txt", "contents": "fun box rds_rdma_notify_me()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_other_error\u00b6\n[Source]\nfun box rds_rdma_other_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_readwrite\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_104.txt", "contents": "// .skip(1)\n.map_stateful[MapIs[K, V]^]({\n(s: USize): MapIs[K, V]^ =>\nMapIs[K, V].create(s).>concat(\nIter[(K^, V^)](gen.value_iter(rnd)).take(s)\n)\n})\n(consume result, shrink_iter)\nend)\n\n\nfun one_of[T](xs: ReadSeq[T], do_shrink: Bool = false): Generator[box->T] =>\n\"\"\"\nGenerate a random value from the given ReadSeq.\nThis generator will generate nothing if the given xs is empty.\n\nGenerators created with this method do not support shrinking.\nIf `do_shrink` is set to `true`, it will return the same value\nfor each shrink round. Otherwise it will return nothing.\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_130.txt", "contents": "fun box ipv6_checksum()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_dontfrag\u00b6\n[Source]\nfun box ipv6_dontfrag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_drop_membership\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_28.txt", "contents": "In case of system call success, this function returns the 2-tuple:\n1. The integer 0.\n2. The *option_value returned by the kernel converted to a Pony U32.\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of errno.\n2. An undefined value that must be ignored.\nfun ref getsockopt_u32(\nlevel: I32 val,\noption_name: I32 val)\n: (U32 val , U32 val)\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\n\nReturns\u00b6\n\n(U32 val , U32 val)\n"} +{"id": "Pony/builtin-I32-_54.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-random-xoroshiro-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/pony_check-Generators-_24.txt", "contents": "gen2: Generator[T2] box\ngen3: Generator[T3] box\nfn: {(T1, T2, T3): T4^}[T1, T2, T3, T4] ref\n\nReturns\u00b6\n\nGenerator[T4] box\n\n\nmap4[T1: T1, T2: T2, T3: T3, T4: T4, T5: T5]\u00b6\n[Source]\nConvenience combinator for mapping 4 generators into 1.\nfun box map4[T1: T1, T2: T2, T3: T3, T4: T4, T5: T5](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box,\ngen3: Generator[T3] box,\ngen4: Generator[T4] box,\nfn: {(T1, T2, T3, T4): T5^}[T1, T2, T3, T4, T5] ref)\n: Generator[T5] box\n"} +{"id": "Pony/collections-persistent-Lists-_1.txt", "contents": "\nLists[A] val^\n\n\nPublic Functions\u00b6\nempty\u00b6\n[Source]\nReturns an empty list.\nfun box empty()\n: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\ncons\u00b6\n[Source]\nReturns a list that has h as a head and t as a tail.\nfun box cons("} +{"id": "Pony/src-format-format_spec-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41trait val FormatSpec\n\nprimitive FormatDefault is FormatSpec\n\nprimitive FormatUTF32 is FormatSpec\nprimitive FormatBinary is FormatSpec\nprimitive FormatBinaryBare is FormatSpec\nprimitive FormatOctal is FormatSpec\nprimitive FormatOctalBare is FormatSpec\nprimitive FormatHex is FormatSpec\nprimitive FormatHexBare is FormatSpec"} +{"id": "Pony/builtin-Integer-_58.txt", "contents": "\ncompare\u00b6\n[Source]\nfun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n\n\n"} +{"id": "Pony/builtin-F32-_45.txt", "contents": "\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\nge_unsafe\u00b6\nfun box ge_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/builtin-F32-_26.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\nexp\u00b6\n[Source]\nfun box exp()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nexp2\u00b6\n[Source]\nfun box exp2()\n: F32 val\n"} +{"id": "Pony/builtin-SignedInteger-_10.txt", "contents": "B\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: B\n\nReturns\u00b6\n\nB\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/src-ini-ini-_11.txt", "contents": "fun ref add_section(section: String): Bool =>\n\"\"\"\nThis is called for every valid section in the INI file. Return false\nto halt processing.\n\"\"\"\ntrue\n\nfun ref errors(line: USize, err: IniError): Bool =>\n\"\"\"\nThis is called for each error encountered. Return false to halt processing.\n\"\"\"\ntrue\n\nprimitive Ini\n\"\"\"\nA streaming parser for INI formatted lines of test.\n\"\"\"\nfun apply(lines: Iterator[String box], f: IniNotify): Bool =>\n\"\"\"\nThis accepts a string iterator and calls the IniNotify for each new entry."} +{"id": "Pony/5_methods_8.txt", "contents": "var a: Foo = a.create()\n```\n\nHere we specify that `var a` is type `Foo`, then proceed to use `a` to call the constructor, `create()`, for objects of type `Foo`.\n"} +{"id": "Pony/builtin-UnsignedInteger-_31.txt", "contents": "[Source]\nfun box divc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: A)\n: (A , Bool val)\n"} +{"id": "Pony/files--index-_0.txt", "contents": "\n\n\n\n\n\n\nFiles package\u00b6\nThe Files package provides classes for working with files and\ndirectories.\nFiles are identified by FilePath objects, which represent both the\npath to the file and the capabilites for accessing the file at that\npath. FilePath objects can be used with the CreateFile and\nOpenFile primitives and the File class to get a reference to a\nfile that can be used to write to and/or read from the file. It can\nalso be used with the Directory object to get a reference to a\ndirectory object that can be used for directory operations.\nThe FileLines class allows a file to be accessed one line at a time.\nThe FileStream actor provides the ability to asynchronously write to\na file."} +{"id": "Pony/src-builtin-std_stream-_0.txt", "contents": "\n\n\n\n\n\n\nstd_stream.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_test-test_helper-_38.txt", "contents": "\nThe type parameter of this function is the type parameter of the\nelements in both ReadSeqs. For instance, when comparing two `Array[U8]`,\nyou should call this method as follows:\n\n```pony\nfun apply(h: TestHelper) =>\nlet a: Array[U8] = [1; 2; 3]\nlet b: Array[U8] = [1; 3; 2]\nh.assert_array_eq_unordered[U8](a, b)\n```\n\"\"\"\ntry\nlet missing = Array[box->A]\nlet consumed = Array[Bool].init(false, actual.size())\nfor e in expect.values() do\nvar found = false\nvar i: USize = -1\nfor a in actual.values() do\ni = i + 1"} +{"id": "Pony/net-OSSockOpt-_36.txt", "contents": "fun box ipproto_mh()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_mhrp\u00b6\n[Source]\nfun box ipproto_mhrp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_micp\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_54.txt", "contents": "trait val _ValueType\nfun string(): String\nfun value_of(s: String): _Value ?\nfun is_seq(): Bool => false\nfun append(v1: _Value, v2: _Value): _Value => v1\n\nprimitive _BoolType is _ValueType\nfun string(): String => \"Bool\"\nfun value_of(s: String): _Value ? => s.bool()?\n\nprimitive _StringType is _ValueType\nfun string(): String => \"String\"\nfun value_of(s: String): _Value => s\n\nprimitive _I64Type is _ValueType\nfun string(): String => \"I64\"\nfun value_of(s: String): _Value ? => s.i64()?\n\nprimitive _U64Type is _ValueType\nfun string(): String => \"U64\""} +{"id": "Pony/src-process-process_monitor-_50.txt", "contents": "_notifier.failed(this, ProcessError(WriteError))\nreturn\nend\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-ini-ini_map-_0.txt", "contents": "\n\n\n\n\n\n\nini_map.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/capsicum-Cap-_4.txt", "contents": "fun box pread()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npwrite\u00b6\n[Source]\nfun box pwrite()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmmap\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-builtin-array-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-buffered-reader-_71.txt", "contents": "peek_u8(offset)?.i8()\n\nfun peek_u16_be(offset: USize = 0): U16 ? =>\n\"\"\"\nPeek at a big-endian U16.\n\"\"\"\n(peek_u8(offset)?.u16() << 8) or peek_u8(offset + 1)?.u16()\n\nfun peek_u16_le(offset: USize = 0): U16 ? =>\n\"\"\"\nPeek at a little-endian U16.\n\"\"\"\npeek_u8(offset)?.u16() or (peek_u8(offset + 1)?.u16() << 8)\n\nfun peek_i16_be(offset: USize = 0): I16 ? =>\n\"\"\"\nPeek at a big-endian I16.\n\"\"\"\npeek_u16_be(offset)?.i16()\n"} +{"id": "Pony/src-builtin-stdin-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/pony_bench-MicroBenchmark-_4.txt", "contents": "[Source]\nfun ref after()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\nafter_iteration\u00b6\n[Source]\nfun ref after_iteration()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\n"} +{"id": "Pony/src-builtin-string-_129.txt", "contents": "if (c >= 0x41) and (c <= 0x5A) then\n_set(i, c + 0x20)\nend\n\ni = i + 1\nend\n\nfun upper(): String iso^ =>\n\"\"\"\nReturns an upper case version of the string. Currently only knows ASCII\ncase.\n\"\"\"\nlet s = clone()\ns.upper_in_place()\ns\n\nfun ref upper_in_place() =>\n\"\"\"\nTransforms the string to upper case.\n\"\"\""} +{"id": "Pony/src-pony_check-generator-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-net-tcp_listener-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-pony_check-randomness-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-cli-command_spec-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-time-time-_13.txt", "contents": "else\ncompile_error \"no clock_gettime monotonic clock\"\nend\n\nprimitive _ClockUptimeRaw\nfun apply(): U32 =>\nifdef osx then\n8\nelse\ncompile_error \"no clock_gettime_nsec_np uptime raw clock\"\nend\n\nprimitive Time\n\"\"\"\nA collection of ways to fetch the current time.\n\"\"\"\nfun now(): (I64 /*sec*/, I64 /*nsec*/) =>\n\"\"\"\nThe wall-clock adjusted system time with nanoseconds.\nReturn: (seconds, nanoseconds)"} +{"id": "Pony/pony_check-Property2UnitTest-_2.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\napply\u00b6\n[Source]\nfun ref apply(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n"} +{"id": "Pony/src-net-tcp_listener-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/cli-OptionSpec-_4.txt", "contents": "Parameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference\ndefault': (I64 val | None val) = reference\n\nReturns\u00b6\n\nOptionSpec val^\n\n\nu64\u00b6\n[Source]\nCreates an Option with an U64 typed value that can be used like\n--count=47 -C=47\nto yield an option value like\ncmd.option(\"count\").u64() == U64(47).\nnew val u64(\nname': String val,"} +{"id": "Pony/src-net-net_address-_18.txt", "contents": "(_family and 0xff).u8()\nend\nelse\nifdef bigendian then\n(_family and 0xff).u8()\nelse\n((_family >> 8) and 0xff).u8()\nend\nend\n\nfun port() : U16 =>\n\"\"\"\nReturns port number in host byte order.\n\"\"\"\n@ntohs(_port)\n\nfun scope() : U32 =>\n\"\"\"\nReturns IPv6 scope identifier: Unicast, Anycast, Multicast and\nunassigned scopes."} +{"id": "Pony/pony_check-PropertyResultNotify-_1.txt", "contents": ": None val\n\nParameters\u00b6\n\nmsg: String val\n\nReturns\u00b6\n\nNone val\n\n\ncomplete\u00b6\n[Source]\nCalled when the Property execution is complete\nsignalling whether it was successful or not.\nfun box complete(\nsuccess: Bool val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-String-_70.txt", "contents": "\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nI64 val ?\n\n\ni128\u00b6\n[Source]\nfun box i128(\nbase: U8 val = 0)\n: I128 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n"} +{"id": "Pony/src-builtin-runtime_options-_12.txt", "contents": "\nvar ponyversion: Bool = false\n\"\"\"\nPrint the version of the compiler and exit.\n\"\"\"\n\nvar ponyhelp: Bool = false\n\"\"\"\nPrint the runtime usage options and exit.\n\"\"\"\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-Property2UnitTest-_3.txt", "contents": "\nexclusion_group\u00b6\nfun box exclusion_group()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ntimed_out\u00b6\nfun ref timed_out(\nh: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_249.txt", "contents": "fun box local_peeruuid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_vendor\u00b6\n[Source]\nfun box local_vendor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmax_tcpoptlen\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_32.txt", "contents": "\n(ILong val , ILong val)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nneg_unsafe\u00b6"} +{"id": "Pony/builtin-ISize-_23.txt", "contents": "[Source]\nfun box fld_partial(\ny: ISize val)\n: ISize val ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val ?\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: ISize val)\n: ISize val ?\n"} +{"id": "Pony/src-builtin-pointer-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/collections-List-_27.txt", "contents": "\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\nclone\u00b6\n[Source]\nClone all elements into a new List.\nNote: elements are not copied, an additional reference to each element is created in the new List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.clone() // my_list is [\"a\"; \"b\"; \"c\"], other_list is [\"a\"; \"b\"; \"c\"]\n\nfun box clone()\n: List[this->A!] ref^\n"} +{"id": "Pony/files-FileTime-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileTime val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-array-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/files-FileLink-_2.txt", "contents": "\nthat: FileLink val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileLink val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileLink val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-real-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-process-process_monitor-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/collections-MapIs-_0.txt", "contents": "\n\n\n\n\n\n\nMapIs[K: K, V: V]\u00b6\n[Source]\nThis is a map that uses identity comparison on the key.\ntype MapIs[K: K, V: V] is\nHashMap[K, V, HashIs[K] val] ref\n\nType Alias For\u00b6\n\nHashMap[K, V, HashIs[K] val] ref\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_51.txt", "contents": "\nfun descr(): String =>\n\"\"\"\nReturns the description for this arg.\n\"\"\"\n_descr\n\nfun _typ_p(): _ValueType => _typ\n\nfun _default_p(): _Value => _default\n\nfun required(): Bool =>\n\"\"\"\nReturns true iff this arg is required to be present in the command line.\n\"\"\"\n_required\n\nfun help_string(): String =>\n\"\"\"\nReturns a formated help string for this arg."} +{"id": "Pony/collections-persistent-MapKeys-_1.txt", "contents": "m: HashMap[K, V, H] val\n\nReturns\u00b6\n\nMapKeys[K, V, H] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/pony_check-IntPairUnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nIntPairUnitTest\u00b6\n[Source]\ntype IntPairUnitTest is\nProperty1UnitTest[IntPairPropertySample ref] iso\n\nType Alias For\u00b6\n\nProperty1UnitTest[IntPairPropertySample ref] iso\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-I8-_35.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_25.txt", "contents": "fun box ipproto_igmp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_igp\u00b6\n[Source]\nfun box ipproto_igp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_igrp\u00b6\n[Source]"} +{"id": "Pony/0_literals_0.txt", "contents": "# Literals\n\n***What do we want?***\n\nValues!\n\n***Where do we want them?***\n\nIn our Pony programs!\n\n***Say no more***\n\nEvery programming language has literals to encode values of certain types, and so does Pony.\n\nIn Pony you can express booleans, numeric types, characters, strings and arrays as literals.\n"} +{"id": "Pony/builtin-I64-_48.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/ponycheck_1.txt", "contents": "# Usage\n\nWriting property based tests in PonyCheck is done by implementing the trait [`Property1`](https://stdlib.ponylang.io/pony_check-Property1). A [`Property1`](https://stdlib.ponylang.io/pony_check-Property1) needs to define a type parameter for the type of the input sample, a [`Generator`](https://stdlib.ponylang.io/pony_check-Generator) and a property function. Here is a minimal example:\n\n```pony\nuse \"pony_test\"\n\nclass _MyFirstProperty is Property1[String]\nfun name(): String =>\n\"my_first_property\"\n\nfun gen(): Generator[String] =>\nGenerators.ascii()\n\nfun property(arg1: String, ph: PropertyHelper) =>\nph.assert_eq[String](arg1, arg1)\n```\n\nA `Property1` needs a name for identification in test output. We created a `Generator` by using one of the many convenience factory methods and combinators defined in the [`Generators`](https://stdlib.ponylang.io/pony_check-Generators) primitive and we used [`PropertyHelper`](https://stdlib.ponylang.io/pony_check-PropertyHelper) to assert on a condition that should hold for all samples\n"} +{"id": "Pony/builtin-ISize-_27.txt", "contents": "Parameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nISize val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nadd_unsafe\u00b6"} +{"id": "Pony/collections-persistent-HashSet-_9.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nReturn true if every element in this is also in that, and this has fewer\nelements than that.\nfun box lt(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/time-PosixDate-_3.txt", "contents": "\nPublic Functions\u00b6\ntime\u00b6\n[Source]\nReturn a POSIX time. Treats the date as UTC.\nfun box time()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nnormal\u00b6\n[Source]\nNormalise all the fields of the date. For example, if the hour is 24, it is\nset to 0 and the day is advanced. This allows fields to be changed naively,\neg. adding 1000 to hours to advance the time by 1000 hours, and then\nnormalising the date.\nfun ref normal()"} +{"id": "Pony/src-itertools-iter-_58.txt", "contents": "### Example\n\n```pony\nIter[U32].repeat_value(7)\n```\n`7 7 7 7 7 7 7 7 7 ...`\n\"\"\"\n_iter =\nobject\nlet _v: A = consume value\n\nfun ref has_next(): Bool => true\n\nfun ref next(): A => _v\nend\n\nfun ref next_or(default: A): A =>\n\"\"\"\nReturn the next value, or the given default.\n"} +{"id": "Pony/builtin-U128-_43.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_26.txt", "contents": "fun box shr(\ny: U64 val)\n: I64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nI64 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-ILong-_4.txt", "contents": "\nULong val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/files-FileRemove-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_482.txt", "contents": "fun box so_conaccess()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_condata\u00b6\n[Source]\nfun box so_condata()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_conditional_accept\u00b6\n[Source]"} +{"id": "Pony/promises-Promise-_11.txt", "contents": "p3.join([p1; p2].values())\n.next[None]({(a: Array[String val] val) =>\nfor s in a.values() do\nenv.out.print(s)\nend\n})\n\np2(\"second\")\np3(\"third\")\np1(\"first\")\n\nfun tag join(\nps: Iterator[Promise[A] tag] ref)\n: Promise[Array[A] val] tag\n\nParameters\u00b6\n\nps: Iterator[Promise[A] tag] ref\n\nReturns\u00b6"} +{"id": "Pony/builtin-F32-_36.txt", "contents": "Returns\u00b6\n\nI128 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\ni128_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box i128_unsafe()"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_2.txt", "contents": "apply\u00b6\n[Source]\nfun ref apply(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n\n\nconfig\u00b6\n[Source]\nfun box config()\n: BenchConfig val\n"} +{"id": "Pony/src-process-process_monitor-_31.txt", "contents": "end\n\ntry\nifdef posix then\n_child = _ProcessPosix.create(\nfilepath.path, args, vars, wdir, _err, _stdin, _stdout, _stderr)?\nelseif windows then\nlet windows_child = _ProcessWindows.create(\nfilepath.path, args, vars, wdir, _stdin, _stdout, _stderr)\n_child = windows_child\n// notify about errors\nmatch windows_child.process_error\n| let pe: ProcessError =>\n_notifier.failed(this, pe)\nreturn\nend\nelse\ncompile_error \"unsupported platform\"\nend\n_err.begin(this)"} +{"id": "Pony/src-builtin-array-_97.txt", "contents": "If either i or j are out of bounds, an error is raised.\n\"\"\"\nif (i >= _size) or (j >= _size) then error end\n\nlet x = _ptr._apply(i)\n_ptr._update(i, _ptr._apply(j))\n_ptr._update(j, consume x)\n\nfun keys(): ArrayKeys[A, this->Array[A]]^ =>\n\"\"\"\nReturn an iterator over the indices in the array.\n\"\"\"\nArrayKeys[A, this->Array[A]](this)\n\nfun values(): ArrayValues[A, this->Array[A]]^ =>\n\"\"\"\nReturn an iterator over the values in the array.\n\"\"\"\nArrayValues[A, this->Array[A]](this)\n"} +{"id": "Pony/src-process-process_monitor-_26.txt", "contents": "var _stdout: _Pipe = _Pipe.none()\nvar _stderr: _Pipe = _Pipe.none()\nvar _err: _Pipe = _Pipe.none()\nvar _child: _Process = _ProcessNone\n\nlet _max_size: USize = 4096\nvar _read_buf: Array[U8] iso = recover Array[U8] .> undefined(_max_size) end\nvar _read_len: USize = 0\nvar _expect: USize = 0\n\nembed _pending: List[(ByteSeq, USize)] = _pending.create()\nvar _done_writing: Bool = false\n\nvar _closed: Bool = false\nvar _timers: (Timers tag | None) = None\nlet _process_poll_interval: U64\n\nvar _polling_child: Bool = false\nvar _final_wait_result: (_WaitResult | None) = None\n"} +{"id": "Pony/builtin-U64-_46.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: U64 val)\n: Bool val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_bench--index-_0.txt", "contents": "\n\n\n\n\n\n\nPackage\n\nPonyBench provides a microbenchmarking framework. It is designed to measure\nthe runtime of synchronous and asynchronous operations.\nExample Program\u00b6\nThe following is a complete program with multiple trivial benchmarks followed\nby their output.\nuse \"time\"\nuse \"pony_bench\"\n\nactor Main is BenchmarkList\nnew create(env: Env) =>\nPonyBench(env, this)"} +{"id": "Pony/src-pony_check-property_helper-_26.txt", "contents": "let _params: String\n\nlet env: Env\n\nnew val create(\nenv': Env,\nrunner: _IPropertyRunner,\nrun_notify: _PropertyRunNotify,\nrun: _Round,\nparams: String\n) =>\nenv = env'\n_runner = runner\n_run_notify = run_notify\n_run = run\n_params = params\n\n/****** START DUPLICATION FROM TESTHELPER ********/\n\nfun log(msg: String, verbose: Bool = false) =>"} +{"id": "Pony/src-time-time-_0.txt", "contents": "\n\n\n\n\n\n\ntime.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-udp_socket-_0.txt", "contents": "\n\n\n\n\n\n\nudp_socket.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/collections-persistent-HashMap-_9.txt", "contents": "\nkey: K\n\nReturns\u00b6\n\nHashMap[K, V, H] val\n\n\nkeys\u00b6\n[Source]\nfun val keys()\n: MapKeys[K, V, H] ref\n\nReturns\u00b6\n\nMapKeys[K, V, H] ref\n\n\nvalues\u00b6\n[Source]"} +{"id": "Pony/src-bureaucracy-custodian-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_connection-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-buffered-reader-_62.txt", "contents": "data.read_u64(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed\nu8()?.u64() or (u8()?.u64() << 8) or\n(u8()?.u64() << 16) or (u8()?.u64() << 24) or\n(u8()?.u64() << 32) or (u8()?.u64() << 40) or\n(u8()?.u64() << 48) or (u8()?.u64() << 56)\nend\nelse"} +{"id": "Pony/src-pony_check-randomness-_22.txt", "contents": "max: ILong = ILong.max_value())\n: ILong\n=>\n\"\"\"\nGenerate a ILong in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nmin + ulong(0, (max - min).ulong()).ilong()\n\nfun ref isize(\nmin: ISize = ISize.min_value(),\nmax: ISize = ISize.max_value())\n: ISize\n=>\n\"\"\"\nGenerate a ISize in closed interval [min, max]\n(default: [min_value, max_value]).\n"} +{"id": "Pony/files-FileWrite-_2.txt", "contents": "\nthat: FileWrite val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileWrite val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileWrite val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_test-pony_test-_0.txt", "contents": "\n\n\n\n\n\n\npony_test.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-tcp_connection_notify-_8.txt", "contents": "In order to connect via proxy, return the host & service for the proxy\nserver.\n\nAn implementation of this function might look like:\n```pony\nlet _proxy_host = \"some-proxy.example.com\"\nlet _proxy_service = \"80\"\nvar _destination_host: ( None | String )\nvar _destination_service: ( None | String )\n\nfun ref proxy_via(host: String, service: String): (String, String) =>\n_destination_host = host\n_destination_service = service\n( _proxy_host, _proxy_service )\n```\n\"\"\"\n(host, service)\n\nfun ref connecting(conn: TCPConnection ref, count: U32) =>\n\"\"\""} +{"id": "Pony/pony_check-IntPairProperty-_2.txt", "contents": "sample: IntPairPropertySample ref,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\nsample: IntPairPropertySample ref\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nint_property[T: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[T] val)]\u00b6\n[Source]\nfun ref int_property[T: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |"} +{"id": "Pony/net-OSSockOpt-_533.txt", "contents": "fun box so_vm_sockets_buffer_min_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_buffer_size\u00b6\n[Source]\nfun box so_vm_sockets_buffer_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_connect_timeout\u00b6\n[Source]"} +{"id": "Pony/random-XorShift128Plus-_11.txt", "contents": "int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int[optional N: ((U8 val | U16 val | U32 val |"} +{"id": "Pony/src-itertools-iter-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/builtin-ILong-_27.txt", "contents": "\nILong val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: ULong val)\n: ILong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nILong val\n\n\nstring\u00b6"} +{"id": "Pony/pony_check-Property3UnitTest-_1.txt", "contents": "new iso create(\np3: Property3[T1, T2, T3] iso,\nname': (String val | None val) = reference)\n: Property3UnitTest[T1, T2, T3] iso^\n\nParameters\u00b6\n\np3: Property3[T1, T2, T3] iso\nname': (String val | None val) = reference\n\nReturns\u00b6\n\nProperty3UnitTest[T1, T2, T3] iso^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val"} +{"id": "Pony/src-pony_check-generator-_131.txt", "contents": "\nfun ilong(\nmin: ILong = ILong.min_value(),\nmax: ILong = ILong.max_value())\n: Generator[ILong]\n=>\n\"\"\"\nCreate a generator for ILong values.\n\"\"\"\nlet that = this\nGenerator[ILong](\nobject is GenObj[ILong]\nfun generate(rnd: Randomness): ILong^ =>\nrnd.ilong(min, max)\n\nfun shrink(i: ILong): ValueAndShrink[ILong] =>\nthat._int_shrink[ILong](consume i, min)\nend)\n\nfun isize("} +{"id": "Pony/src-collections-heap-_10.txt", "contents": "max-heaps, the greatest item will be returned. For min-heaps, the smallest\nitem will be returned.\n\nThe time complexity of this operation is O(log(n)) with respect to the size\nof the heap.\n\"\"\"\nlet n = size() - 1\n_data.swap_elements(0, n)?\n_sift_down(0, n)\n_data.pop()?\n\nfun ref append(\nseq: (ReadSeq[A] & ReadElement[A^]),\noffset: USize = 0,\nlen: USize = -1)\n=>\n\"\"\"\nAppend len elements from a sequence, starting from the given offset.\n\"\"\"\n_data.append(seq, offset, len)"} +{"id": "Pony/capsicum-CapRights-_0.txt", "contents": "\n\n\n\n\n\n\nCapRights\u00b6\n[Source]\ntype CapRights is\nCapRights0 ref\n\nType Alias For\u00b6\n\nCapRights0 ref\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_48.txt", "contents": "use @\"llvm.smul.with.overflow.i32\"[(I32, Bool)](a: I32, b: I32)\nuse @\"llvm.smul.with.overflow.i64\"[(I64, Bool)](a: I64, b: I64)\n\nprimitive I8 is SignedInteger[I8, U8]\nnew create(value: I8) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.i8()\n\nnew min_value() => -0x80\nnew max_value() => 0x7F\n\nfun abs(): U8 => if this < 0 then (-this).u8() else this.u8() end\nfun bit_reverse(): I8 => @\"llvm.bitreverse.i8\"(this.u8()).i8()\nfun bswap(): I8 => this\nfun popcount(): U8 => @\"llvm.ctpop.i8\"(this.u8())\nfun clz(): U8 => @\"llvm.ctlz.i8\"(this.u8(), false)\nfun ctz(): U8 => @\"llvm.cttz.i8\"(this.u8(), false)\n\nfun clz_unsafe(): U8 =>\n\"\"\"\nUnsafe operation."} +{"id": "Pony/builtin-ISize-_56.txt", "contents": "\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/src-files-file_info-_13.txt", "contents": "\nfilepath = path\n\nlet fstatat =\n@pony_os_fstatat(fd, from.cstring(), this)\nif not fstatat then error end\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-UnsignedInteger-_0.txt", "contents": "\n\n\n\n\n\n\nUnsignedInteger[A: UnsignedInteger[A] val]\u00b6\n[Source]\ntrait val UnsignedInteger[A: UnsignedInteger[A] val] is\nInteger[A] val\n\nImplements\u00b6\n\nInteger[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_27.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-SignedInteger-_62.txt", "contents": "F32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-real-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-ossockopt-_73.txt", "contents": "fun ipproto_ipcv():I32 => @pony_os_sockopt_level(I32(4051))\nfun ipproto_ipeip():I32 => @pony_os_sockopt_level(I32(4052))\nfun ipproto_ipip():I32 => @pony_os_sockopt_level(I32(4053))\nfun ipproto_ippc():I32 => @pony_os_sockopt_level(I32(4054))\nfun ipproto_ipv4():I32 => @pony_os_sockopt_level(I32(4055))\nfun ipproto_ipv6():I32 => @pony_os_sockopt_level(I32(4056))\nfun ipproto_irtp():I32 => @pony_os_sockopt_level(I32(4057))\nfun ipproto_kryptolan():I32 => @pony_os_sockopt_level(I32(4058))\nfun ipproto_larp():I32 => @pony_os_sockopt_level(I32(4059))\nfun ipproto_leaf1():I32 => @pony_os_sockopt_level(I32(4060))\nfun ipproto_leaf2():I32 => @pony_os_sockopt_level(I32(4061))\nfun ipproto_max():I32 => @pony_os_sockopt_level(I32(4062))\nfun ipproto_maxid():I32 => @pony_os_sockopt_level(I32(4063))\nfun ipproto_meas():I32 => @pony_os_sockopt_level(I32(4064))\nfun ipproto_mh():I32 => @pony_os_sockopt_level(I32(4065))\nfun ipproto_mhrp():I32 => @pony_os_sockopt_level(I32(4066))\nfun ipproto_micp():I32 => @pony_os_sockopt_level(I32(4067))\nfun ipproto_mobile():I32 => @pony_os_sockopt_level(I32(4068))\nfun ipproto_mpls():I32 => @pony_os_sockopt_level(I32(4069))\nfun ipproto_mtp():I32 => @pony_os_sockopt_level(I32(4070))"} +{"id": "Pony/src-builtin-string-_138.txt", "contents": "fun ref insert_in_place(offset: ISize, that: String box) =>\n\"\"\"\nInserts the given string at the given offset. Appends the string if the\noffset is out of bounds.\n\"\"\"\nreserve(_size + that._size)\nlet index = offset_to_index(offset).min(_size)\n@memmove(_ptr.usize() + index + that._size,\n_ptr.usize() + index, _size - index)\nthat._ptr._copy_to(_ptr._offset(index), that._size)\n_size = _size + that._size\n_set(_size, 0)\n\nfun ref insert_byte(offset: ISize, value: U8) =>\n\"\"\"\nInserts a byte at the given offset. Appends if the offset is out of bounds.\n\"\"\"\nreserve(_size + 1)\nlet index = offset_to_index(offset).min(_size)\n@memmove(_ptr.usize() + index + 1, _ptr.usize() + index,"} +{"id": "Pony/builtin-USize-_26.txt", "contents": "fun box mod_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: USize val)\n: USize val\n\nParameters\u00b6"} +{"id": "Pony/src-term-ansi_term-_28.txt", "contents": "// If it fires, we send the escape sequence as if it was normal data.\nif _escape isnt _EscapeNone then\nif _timer isnt None then\ntry _timers.cancel(_timer as Timer tag) end\nend\n\nlet t = recover\nobject is TimerNotify\nlet term: ANSITerm = this\n\nfun ref apply(timer: Timer, count: U64): Bool =>\nterm._timeout()\nfalse\nend\nend\n\nlet timer = Timer(consume t, 25000000)\n_timer = timer\n_timers(consume timer)\nend"} +{"id": "Pony/builtin-F32-_30.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\nacos\u00b6\n[Source]\nfun box acos()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nasin\u00b6\n[Source]\nfun box asin()\n: F32 val\n"} +{"id": "Pony/net-OSSockOpt-_233.txt", "contents": "fun box ip_recvflowid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvif\u00b6\n[Source]\nfun box ip_recvif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvopts\u00b6\n[Source]"} +{"id": "Pony/collections-HashMap-_1.txt", "contents": "prealloc: USize val = 6)\n: HashMap[K, V, H] ref^\n\nParameters\u00b6\n\nprealloc: USize val = 6\n\nReturns\u00b6\n\nHashMap[K, V, H] ref^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nThe number of items in the map.\nfun box size()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-signals-sig-_12.txt", "contents": "else compile_error \"no SIGPIPE\"\nend\n\nfun alrm(): U32 => 14\nfun term(): U32 => 15\n\nfun urg(): U32 =>\nifdef bsd or osx then 16\nelseif linux then 23\nelse compile_error \"no SIGURG\"\nend\n\nfun stkflt(): U32 =>\nifdef linux then 16\nelse compile_error \"no SIGSTKFLT\"\nend\n\nfun stop(): U32 =>\nifdef bsd or osx then 17\nelseif linux then 19"} +{"id": "Pony/collections-HashMap-_10.txt", "contents": "\n\ncontains\u00b6\n[Source]\nChecks whether the map contains the key k\nfun box contains(\nk: box->K!)\n: Bool val\n\nParameters\u00b6\n\nk: box->K!\n\nReturns\u00b6\n\nBool val\n\n\nconcat\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/pony_check-Property2-_5.txt", "contents": "[Source]\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-Poperator-_2.txt", "contents": "\nReturns\u00b6\n\nPoperator[T] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun ref has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()"} +{"id": "Pony/builtin-SignedInteger-_24.txt", "contents": "A\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nsubc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/src-net-tcp_connection-_118.txt", "contents": "\"\"\"\nInform the notifier that we're connecting.\n\"\"\"\nif _connect_count > 0 then\n_notify.connecting(this, _connect_count)\nelse\n_notify.connect_failed(this)\nhard_close()\nend\n\nfun ref close() =>\n\"\"\"\nAttempt to perform a graceful shutdown. Don't accept new writes. If the\nconnection isn't muted then we won't finish closing until we get a zero\nlength read. If the connection is muted, perform a hard close and shut\ndown immediately.\n\"\"\"\nifdef windows then\n_close()\nelse"} +{"id": "Pony/builtin-Integer-_9.txt", "contents": "\n\nfld_unsafe\u00b6\n[Source]\nFloored division, rounded towards negative infinity,\nas opposed to div which rounds towards zero.\nUnsafe Operation\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box fld_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/src-itertools-iter-_59.txt", "contents": "### Example\n\n```pony\nlet x: (U64 | None) = 42\nIter[U64].maybe(x).next_or(0)\n```\n`42`\n\"\"\"\nif has_next() then\ntry next()? else default end\nelse\ndefault\nend\n\nfun ref map_stateful[B](f: {ref(A!): B ?}): Iter[B]^ =>\n\"\"\"\nAllows stateful transformation of each element from the iterator, similar\nto `map`.\n\"\"\"\nIter[B]("} +{"id": "Pony/builtin-I16-_39.txt", "contents": "fun box divrem(\ny: I16 val)\n: (I16 val , I16 val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , I16 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U8-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_87.txt", "contents": "1732\n1733\n1734\n1735\n1736\n1737\n1738\n1739\n1740\n1741\n1742\n1743\n1744\n1745\n1746\n1747\n1748\n1749\n1750\n1751"} +{"id": "Pony/7_equality_4.txt", "contents": "let c = Foo(\"hi\")\n\nif a == b then\n// won't print\ne.out.print(\"1\")\nend\n\nif a == c then\n// will print\ne.out.print(\"2\")\nend\n\nif a is c then\n// won't print\ne.out.print(\"3\")\nend\n```\n\nIf you don't define your own `eq`, you will inherit the default implementation that defines equal by value as being the same as by identity.\n"} +{"id": "Pony/2_ops_7.txt", "contents": "# Short circuiting\n\nThe `and` and `or` operators use __short circuiting__ when used with boolean variables. This means that the first operand is always evaluated, but the second is only evaluated if it can affect the result.\n\nFor `and`, if the first operand is __false__ then the second operand is not evaluated since it cannot affect the result.\n\nFor `or`, if the first operand is __true__ then the second operand is not evaluated since it cannot affect the result.\n\nThis is a special feature built into the compiler, it cannot be used with operator aliasing for any other type.\n"} +{"id": "Pony/net-NetAddress-_3.txt", "contents": "Returns the host and service name.\nIf reversedns is DNSAuth,\na DNS lookup will be executed and the hostname\nfor this address is returned as first element of the result tuple.\nIf no hostname could be found, an error is raised.\nIf reversedns is None the plain IP address is given\nand no DNS lookup is executed.\nIf servicename is false the numeric port is returned\nas second element of the result tuple.\nIf it is true the port is translated into its\ncorresponding servicename (e.g. port 80 is returned as \"http\").\nInternally this method uses the POSIX C function getnameinfo.\nfun box name(\nreversedns: (DNSAuth val | None val) = reference,\nservicename: Bool val = false)\n: (String val , String val) ?\n\nParameters\u00b6\n\nreversedns: (DNSAuth val | None val) = reference"} +{"id": "Pony/src-files-path-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-builtin-std_stream-_6.txt", "contents": "size: USize)\nuse @pony_os_std_write[None](file: Pointer[None] tag, buffer: Pointer[U8] tag,\nsize: USize)\ntype ByteSeq is (String | Array[U8] val)\n\ninterface val ByteSeqIter\n\"\"\"\nAccept an iterable collection of String or Array[U8] val.\n\"\"\"\nfun values(): Iterator[this->ByteSeq box]\n\ninterface tag OutStream\n\"\"\"\nAsnychronous access to some output stream.\n\"\"\"\nbe print(data: ByteSeq)\n\"\"\"\nPrint some bytes and insert a newline afterwards.\n\"\"\"\n"} +{"id": "Pony/src-pony_check-generator-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/src-term-readline-_34.txt", "contents": "\"\"\"\nTab completion.\n\nTODO: Improve this.\n\"\"\"\nlet r = _notify.tab(_edit.clone())\n\nmatch r.size()\n| 0 => None\n| 1 =>\ntry\n_edit = r(0)?.clone()\nend_key()\nend\nelse\n_out.write(\"\\n\")\n\nfor completion in r.values() do\n_out.print(completion)\nend"} +{"id": "Pony/collections-List-_16.txt", "contents": "let my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.tail()? end // Returns a ListNode[String] containing \"c\"\n\nfun box tail()\n: this->ListNode[A] ref ?\n\nReturns\u00b6\n\nthis->ListNode[A] ref ?\n\n\nprepend_node\u00b6\n[Source]\nAdds a node to the head of the list.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet new_head = ListNode[String](\"0\")\nmy_list.prepend_node(new_head) // [\"0\", \"a\"; \"b\"; \"c\"]\n\nfun ref prepend_node(\nnode: ListNode[A] ref)"} +{"id": "Pony/net-OSSockOpt-_274.txt", "contents": "fun box netlink_dnrtmsg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_drop_membership\u00b6\n[Source]\nfun box netlink_drop_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_ecryptfs\u00b6\n[Source]"} +{"id": "Pony/collections-List-_12.txt", "contents": "value: A)\n: A^ ?\n\nParameters\u00b6\n\ni: USize val\nvalue: A\n\nReturns\u00b6\n\nA^ ?\n\n\nindex\u00b6\n[Source]\nGets the i-th node, raising an error if the index is out of bounds.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.index(0)? end // Returns a ListNode[String] containing \"a\"\n\nfun box index("} +{"id": "Pony/builtin-I128-_62.txt", "contents": "U128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/net-UDPSocket-_25.txt", "contents": "\nstate: Bool val\n\nReturns\u00b6\n\nU32 val\n\n\nset_so_rcvbuf\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)\nfun ref set_so_rcvbuf(\nbufsize: U32 val)\n: U32 val\n\nParameters\u00b6\n\nbufsize: U32 val\n\nReturns\u00b6"} +{"id": "Pony/cli-OptionSpec-_0.txt", "contents": "\n\n\n\n\n\n\nOptionSpec\u00b6\n[Source]\nOptionSpec describes the specification of a named Option. They have a name,\ndescr(iption), a short-name, a typ(e), and a default value when they are not\nrequired.\nOptions can be placed anywhere before or after commands, and can be thought\nof as named arguments.\nclass val OptionSpec\n\nConstructors\u00b6\nbool\u00b6\n[Source]\nCreates an Option with a Bool typed value that can be used like"} +{"id": "Pony/net-OSSockOpt-_467.txt", "contents": "fun box sctp_str_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_threshold_logging\u00b6\n[Source]\nfun box sctp_threshold_logging()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_timeouts\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_19.txt", "contents": "fun box futimesat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nlinkat\u00b6\n[Source]\nfun box linkat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmkdirat\u00b6\n[Source]"} +{"id": "Pony/memory-allocation_0.txt", "contents": "# Memory Allocation at Runtime\n\nPony is a null-free, type-safe language, with no dangling pointers, no buffer overruns, but with a **very fast garbage collector**, so you don't have to worry about explicit memory allocation, if on the heap or stack, if in a threaded actor, or not.\n"} +{"id": "Pony/src-format-format-_10.txt", "contents": "let exe = try env.args(0)? else \"fmt_example\" end\nenv.err.print(\"Usage: \" + exe + \" NUMBER1 NUMBER2\")\nend\n```\n\"\"\"\n\nuse \"collections\"\n\nprimitive Format\n\"\"\"\nProvides functions for generating formatted strings.\n\n* fmt. Format to use.\n* prefix. Prefix to use.\n* prec. Precision to use. The exact meaning of this depends on the type,\nbut is generally the number of characters used for all, or part, of the\nstring. A value of -1 indicates that the default for the type should be\nused.\n* width. The minimum number of characters that will be in the produced\nstring. If necessary the string will be padded with the fill character to"} +{"id": "Pony/net-OSSockOpt-_256.txt", "contents": "fun box mrt_add_mfc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_add_vif\u00b6\n[Source]\nfun box mrt_add_vif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_api_config\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_62.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: I16 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command-_17.txt", "contents": "\"\"\"\nReturns the arg value as a Bool, defaulting to false.\n\"\"\"\ntry _value as Bool else false end\n\nfun string(): String =>\n\"\"\"\nReturns the arg value as a String, defaulting to empty.\n\"\"\"\ntry _value as String else \"\" end\n\nfun i64(): I64 =>\n\"\"\"\nReturns the arg value as an I64, defaulting to 0.\n\"\"\"\ntry _value as I64 else I64(0) end\n\nfun u64(): U64 =>\n\"\"\"\nReturns the arg value as an U64, defaulting to 0."} +{"id": "Pony/builtin-I16-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: I16 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nI16 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: I16 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_socket-_55.txt", "contents": "\nfun ref get_so_error(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)`\n\"\"\"\n_OSSocket.get_so_error(_fd)\n\nfun ref get_so_rcvbuf(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`\n\"\"\"\n_OSSocket.get_so_rcvbuf(_fd)\n\nfun ref get_so_sndbuf(): (U32, U32) =>\n\"\"\"\nWrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`\n\"\"\"\n_OSSocket.get_so_sndbuf(_fd)\n\n"} +{"id": "Pony/src-backpressure-backpressure-_7.txt", "contents": "`TCPConnection` is a single example. This Backpressure package exists to allow\na programmer to indicate to the runtime that a given actor is experiencing\npressure and sending messages to it should be adjusted accordingly.\n\nAny actor that needs to be able to tell the runtime to \"send me messages\nslower\" due to external conditions can do so via this package. Additionally,\nactors that maintain their own internal queues of any sort, say for buffering,\nare also prime candidates for using this package. If an actor's internal\nqueue grows too large, it can call `Backpressure.apply` to let the runtime know\nit is under pressure.\n"} +{"id": "Pony/capsicum-Cap-_31.txt", "contents": "fun box mac_get()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmac_set\u00b6\n[Source]\nfun box mac_set()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsem_getvalue\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_119.txt", "contents": "fun so_detach_filter():I32 => @pony_os_sockopt_option(I32(822))\nfun so_domain():I32 => @pony_os_sockopt_option(I32(823))\nfun so_dontlinger():I32 => @pony_os_sockopt_option(I32(824))\nfun so_dontroute():I32 => @pony_os_sockopt_option(I32(825))\nfun so_donttrunc():I32 => @pony_os_sockopt_option(I32(826))\nfun so_error():I32 => @pony_os_sockopt_option(I32(827))\nfun so_exclusiveaddruse():I32 => @pony_os_sockopt_option(I32(828))\nfun so_get_filter():I32 => @pony_os_sockopt_option(I32(829))\nfun so_group_id():I32 => @pony_os_sockopt_option(I32(830))\nfun so_group_priority():I32 => @pony_os_sockopt_option(I32(831))\nfun so_hci_raw_direction():I32 => @pony_os_sockopt_option(I32(832))\nfun so_hci_raw_filter():I32 => @pony_os_sockopt_option(I32(833))\nfun so_incoming_cpu():I32 => @pony_os_sockopt_option(I32(834))\nfun so_keepalive():I32 => @pony_os_sockopt_option(I32(835))\nfun so_l2cap_encrypted():I32 => @pony_os_sockopt_option(I32(836))\nfun so_l2cap_flush():I32 => @pony_os_sockopt_option(I32(837))\nfun so_l2cap_iflow():I32 => @pony_os_sockopt_option(I32(838))\nfun so_l2cap_imtu():I32 => @pony_os_sockopt_option(I32(839))\nfun so_l2cap_oflow():I32 => @pony_os_sockopt_option(I32(840))\nfun so_l2cap_omtu():I32 => @pony_os_sockopt_option(I32(841))"} +{"id": "Pony/net-OSSockOpt-_205.txt", "contents": "fun box ip_fw_get()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_nat_cfg\u00b6\n[Source]\nfun box ip_fw_nat_cfg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_nat_del\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_20.txt", "contents": "fun box shr(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I8-_12.txt", "contents": "fun box mod(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-unsigned-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-collections-persistent-list-_43.txt", "contents": "Returns an iterator over the elements of the list.\n\"\"\"\nobject is Iterator[val->A]\nvar _list: List[A] box = this\nfun has_next(): Bool => _list isnt Nil[A]\nfun ref next(): val->A! ? => (_list = _list.tail()?).head()?\nend\n\nfun is_empty(): Bool =>\n\"\"\"\nReturns a Bool indicating if the list is empty.\n\"\"\"\nfalse\n\nfun is_non_empty(): Bool =>\n\"\"\"\nReturns a Bool indicating if the list is non-empty.\n\"\"\"\ntrue\n"} +{"id": "Pony/builtin-I64-_54.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-process-process_monitor-_35.txt", "contents": "be dispose() =>\n\"\"\"\nTerminate child and close down everything.\n\"\"\"\nmatch _child\n| let never_started: _ProcessNone =>\n// We never started a child process so do not do any disposal\n// If we do, some weirdness can happen with dispose getting called\n// on the notifier which is not supposed to happen if we never started\n// a child (or haven't started one yet).\nreturn\nelse\nBackpressure.release(_backpressure_auth)\n_child.kill()\n_close()\nend\n\nfun ref expect(qty: USize = 0) =>\n\"\"\"\nA `stdout` call on the notifier must contain exactly `qty` bytes. If"} +{"id": "Pony/src-net-tcp_connection-_78.txt", "contents": "## Example proxy implementation\n\n```pony\nactor Main\nnew create(env: Env) =>\nMyClient.create(\n\"example.com\", // we actually want to connect to this host\n\"80\",\nExampleProxy.create(\"proxy.example.com\", \"80\")) // we connect via this proxy\n\nactor MyClient\nnew create(host: String, service: String, proxy: Proxy = NoProxy) =>\nlet conn: TCPConnection = TCPConnection.create(\nTCPConnectAuth(env.root),\nproxy.apply(MyConnectionNotify.create()),\nhost,\nservice)\n\nclass ExampleProxy is Proxy\nlet _proxy_host: String"} +{"id": "Pony/src-process-_process-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-USize-_39.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_24.txt", "contents": "fun box ipproto_idpr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_idrp\u00b6\n[Source]\nfun box ipproto_idrp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_igmp\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_2.txt", "contents": "Parameters\u00b6\n\nvalue: (A | None val)\n\nReturns\u00b6\n\nIter[A] ref^\n\n\nchain\u00b6\n[Source]\nTake an iterator of iterators and return an Iter containing the\nitems of the first one, then the second one, and so on.\nExample\u00b6\nlet xs = [as I64: 1; 2].values()\nlet ys = [as I64: 3; 4].values()\n\nIter[I64].chain([xs; ys].values())\n\n1 2 3 4"} +{"id": "Pony/term-Readline-_8.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\nhome\u00b6\n[Source]\nBeginning of the line.\nfun ref home(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/collections-Flags-_20.txt", "contents": "Bool val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: Flags[A, B] box)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_28.txt", "contents": "(I128 val , Bool val)\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_9.txt", "contents": "precision (ie a normalised number).\nfun tag min_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmin_exp10\u00b6\n[Source]\nMinimum exponent value such that (10^exponent) - 1 is representable at full\nprecision (ie a normalised number).\nfun tag min_exp10()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n"} +{"id": "Pony/format-FormatBinaryBare-_1.txt", "contents": "new val create()\n: FormatBinaryBare val^\n\nReturns\u00b6\n\nFormatBinaryBare val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatBinaryBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatBinaryBare val\n\nReturns\u00b6"} +{"id": "Pony/builtin-StdStream-_2.txt", "contents": "data: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nwritev\u00b6\n[Source]\nWrite an iterable collection of ByteSeqs.\nbe writev(\ndata: ByteSeqIter val)\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\n\nflush\u00b6\n[Source]"} +{"id": "Pony/builtin-F64-_37.txt", "contents": ": I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nu128_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nadd_unsafe\u00b6"} +{"id": "Pony/net-OSSockOpt-_236.txt", "contents": "fun box ip_recvrssbucketid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvtos\u00b6\n[Source]\nfun box ip_recvtos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_recvttl\u00b6\n[Source]"} +{"id": "Pony/files-FileRemove-_0.txt", "contents": "\n\n\n\n\n\n\nFileRemove\u00b6\n[Source]\nprimitive val FileRemove\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileRemove val^\n\nReturns\u00b6\n\nFileRemove val^"} +{"id": "Pony/builtin-I32-_34.txt", "contents": "fun box op_or(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/4_control-structures_14.txt", "contents": "## Continue\n\nSometimes you want to stop part-way through one loop iteration and move onto the next. Like other languages, Pony uses the `continue` keyword for this.\n\n`continue` stops executing the current iteration of the innermost loop it's in and evaluates the condition ready for the next iteration.\n\nIf `continue` is executed during the last iteration of the loop then we have no value to return from the loop. In this case, we use the loop's `else` expression to get a value. As with the `if` expression, if no `else` expression is provided, `None` is returned.\n\n__Can I continue an outer, nested loop like the Java labeled continue?__ No, Pony does not support that. If you need to continue an outer loop you should probably refactor your code.\n"} +{"id": "Pony/src-net-tcp_connection-_88.txt", "contents": "_connect_count = 0\n_fd = fd\nifdef not windows then\n_event = @pony_asio_event_create(this, fd,\nAsioEvent.read_write_oneshot(), 0, true)\nelse\n_event = @pony_asio_event_create(this, fd,\nAsioEvent.read_write(), 0, true)\nend\n_connected = true\nifdef not windows then\n@pony_asio_event_set_writeable(_event, true)\nend\n_writeable = true\n_read_buf = recover Array[U8] .> undefined(read_buffer_size) end\n_read_buffer_size = read_buffer_size\n_yield_after_reading = yield_after_reading\n_yield_after_writing = yield_after_writing\n\n_notify.accepted(this)"} +{"id": "Pony/src-pony_check-generator-_99.txt", "contents": "\"\"\"\nCreate a generator for `SetIs` filled with values\nof the given generator `gen`.\nThe returned `SetIs` will have a size up to `max`,\nbut tend to have fewer entries\ndepending on the source generator `gen`.\n\nE.g. if the given generator is for `U8` values and `max` is set to 1024\nthe set will only ever be of size 256 max.\n\nAlso for efficiency purposes and to not loop forever,\nthis generator will only try to add at most `max` values to the set.\nIf there are duplicates, the set won't grow.\n\"\"\"\n// TODO: how to remove code duplications\nGenerator[SetIs[T]](\nobject is GenObj[SetIs[T]]\nfun generate(rnd: Randomness): GenerateResult[SetIs[T]] =>\nlet size = rnd.usize(0, max)\n"} +{"id": "Pony/src-net-ossockopt-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-I64-_30.txt", "contents": "I64 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ndiv_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-flag-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-udp_socket-_53.txt", "contents": "The caller is responsible for the correct size and byte contents of\nthe `option` array for the requested `level` and `option_name`,\nincluding using the appropriate CPU endian byte order.\n\nThis function returns `0` on success, else the value of `errno` on\nfailure.\n\nUsage example:\n\n```pony\n// listening() is a callback function for class UDPNotify\nfun ref listening(sock: UDPSocket ref) =>\nlet sb = Writer\n\nsb.u32_le(7744) // Our desired socket buffer size\nlet sbytes = Array[U8]\nfor bs in sb.done().values() do\nsbytes.append(bs)\nend\nmatch sock.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)"} +{"id": "Pony/collections-ListNode-_7.txt", "contents": "If the ListNode is not contained within a List the append will fail.\nfun ref append(\nthat: ListNode[A] ref)\n: Bool val\n\nParameters\u00b6\n\nthat: ListNode[A] ref\n\nReturns\u00b6\n\nBool val\n\n\nremove\u00b6\n[Source]\nRemove a node from a list.\nThe ListNode must be contained within a List for this to succeed.\nfun ref remove()\n: None val"} +{"id": "Pony/files-FileRename-_2.txt", "contents": "\nthat: FileRename val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileRename val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileRename val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U8-_20.txt", "contents": "fun box shr(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/src-process-_process-_41.txt", "contents": "stdin: _Pipe,\nstdout: _Pipe,\nstderr: _Pipe)\n=>\nifdef windows then\nlet wdir_ptr =\nmatch wdir\n| let wdir_fp: FilePath => wdir_fp.path.cstring()\n| None => Pointer[U8] // NULL -> use parent directory\nend\nvar error_code: U32 = 0\nvar error_message = Pointer[U8]\nh_process = @ponyint_win_process_create(\npath.cstring(),\n_make_cmdline(args).cstring(),\n_make_environ(vars).cpointer(),\nwdir_ptr,\nstdin.far_fd, stdout.far_fd, stderr.far_fd,\naddressof error_code, addressof error_message)\nprocess_error ="} +{"id": "Pony/5_structs_4.txt", "contents": "## Constructors\n\nStruct constructors, like class constructors, have names. Everything you previously learned about Pony class constructors applies to struct constructors.\n\n```pony\nstruct Pointer[A]\n\"\"\"\nA Pointer[A] is a raw memory pointer. It has no descriptor and thus can't be\nincluded in a union or intersection, or be a subtype of any interface. Most\nfunctions on a Pointer[A] are private to maintain memory safety.\n\"\"\"\nnew create() =>\n\"\"\"\nA null pointer.\n\"\"\"\ncompile_intrinsic\n\nnew _alloc(len: USize) =>\n\"\"\"\nSpace for len instances of A."} +{"id": "Pony/net-OSSockOpt-_247.txt", "contents": "fun box local_peercred()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_peerepid\u00b6\n[Source]\nfun box local_peerepid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_peereuuid\u00b6\n[Source]"} +{"id": "Pony/src-time-timers-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-string-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-ring_buffer-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-files-file_path-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-I32-_40.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/format-Format-_0.txt", "contents": "\n\n\n\n\n\n\nFormat\u00b6\n[Source]\nProvides functions for generating formatted strings.\n\nfmt. Format to use.\nprefix. Prefix to use.\nprec. Precision to use. The exact meaning of this depends on the type,\nbut is generally the number of characters used for all, or part, of the\nstring. A value of -1 indicates that the default for the type should be\nused.\nwidth. The minimum number of characters that will be in the produced\nstring. If necessary the string will be padded with the fill character to\nmake it long enough."} +{"id": "Pony/builtin-ByteSeqIter-_1.txt", "contents": "Iterator[(this->String box | this->Array[U8 val] box)] ref\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U16-_18.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: U16 val)\n: (U16 val , U16 val) ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ISize-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: ISize val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nISize val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: ISize val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-buffered-reader-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-itertools-iter-_96.txt", "contents": "\"\"\"\nIterate through the values of the iterator without a for loop. The\nfunction `on_error` will be called if the iterator's `has_next` method\nreturns true but its `next` method throws an error.\n"} +{"id": "Pony/src-net-ossockopt-_86.txt", "contents": "fun ipv6_priority_11():I32 => @pony_os_sockopt_option(I32(162))\nfun ipv6_priority_12():I32 => @pony_os_sockopt_option(I32(163))\nfun ipv6_priority_13():I32 => @pony_os_sockopt_option(I32(164))\nfun ipv6_priority_14():I32 => @pony_os_sockopt_option(I32(165))\nfun ipv6_priority_15():I32 => @pony_os_sockopt_option(I32(166))\nfun ipv6_priority_8():I32 => @pony_os_sockopt_option(I32(167))\nfun ipv6_priority_9():I32 => @pony_os_sockopt_option(I32(168))\nfun ipv6_priority_bulk():I32 => @pony_os_sockopt_option(I32(169))\nfun ipv6_priority_control():I32 => @pony_os_sockopt_option(I32(170))\nfun ipv6_priority_filler():I32 => @pony_os_sockopt_option(I32(171))\nfun ipv6_priority_interactive():I32 => @pony_os_sockopt_option(I32(172))\nfun ipv6_priority_reserved1():I32 => @pony_os_sockopt_option(I32(173))\nfun ipv6_priority_reserved2():I32 => @pony_os_sockopt_option(I32(174))\nfun ipv6_priority_unattended():I32 => @pony_os_sockopt_option(I32(175))\nfun ipv6_priority_uncharacterized():I32 => @pony_os_sockopt_option(I32(176))\nfun ipv6_recvdstopts():I32 => @pony_os_sockopt_option(I32(177))\nfun ipv6_recverr():I32 => @pony_os_sockopt_option(I32(178))\nfun ipv6_recvhoplimit():I32 => @pony_os_sockopt_option(I32(179))\nfun ipv6_recvhopopts():I32 => @pony_os_sockopt_option(I32(180))\nfun ipv6_recvorigdstaddr():I32 => @pony_os_sockopt_option(I32(181))"} +{"id": "Pony/1_classes_11.txt", "contents": "## Finalisers\n\nFinalisers are special functions. They are named `_final`, take no parameters and have a receiver reference capability of `box`. In other words, the definition of a finaliser must be `fun _final()`.\n\nThe finaliser of an object is called before the object is collected by the GC. Functions may still be called on an object after its finalisation, but only from within another finaliser. Messages cannot be sent from within a finaliser.\n\nFinalisers are usually used to clean up resources allocated in C code, like file handles, network sockets, etc.\n"} +{"id": "Pony/builtin-I32-_49.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_323.txt", "contents": "fun box rose_network_congestion()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_not_obtainable\u00b6\n[Source]\nfun box rose_not_obtainable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_number_busy\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_11.txt", "contents": "\n\nfold[B: B]\u00b6\n[Source]\nFolding over the empty list yields the initial accumulator.\nfun box fold[B: B](\nf: {(B, val->A): B^}[A, B] box,\nacc: B)\n: B\n\nParameters\u00b6\n\nf: {(B, val->A): B^}[A, B] box\nacc: B\n\nReturns\u00b6\n\nB\n\n"} +{"id": "Pony/time-PosixDate-_0.txt", "contents": "\n\n\n\n\n\n\nPosixDate\u00b6\n[Source]\nRepresents a proleptic Gregorian date and time, without specifying a\ntime zone. The day of month, month, day of week, and day of year are all\nindexed from 1, i.e. January is 1, Monday is 1.\nclass ref PosixDate\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a date from a POSIX time. Negative arguments will be changed to zero.\nnew ref create(\nseconds: I64 val = 0,"} +{"id": "Pony/format-FormatBinaryBare-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatBinaryBare val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatBinaryBare val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-I64-_61.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/use-statement_3.txt", "contents": "\nTo avoid this problem the use command allows you to specify an alias. If you do this then only that alias is put into your namespace. The types from the used package can then be accessed using this alias as a qualifier. Our example now becomes:\n\n```pony\n// In package A\nclass Foo\n\n// In package B\nclass Foo\n\n// In your code\nuse a = \"packageA\"\nuse b = \"packageB\"\n\nclass Bar\nvar _x: a.Foo // The Foo from package A\nvar _y: b.Foo // The Foo from package B\n```\n\nIf you prefer you can give an alias to only one of the packages. `Foo` will then still be added to your namespace referring to the unaliased package:"} +{"id": "Pony/collections-MapValues-_1.txt", "contents": "[Source]\nCreates an iterator for the given map.\nnew ref create(\nmap: M)\n: MapValues[K, V, H, M] ref^\n\nParameters\u00b6\n\nmap: M\n\nReturns\u00b6\n\nMapValues[K, V, H, M] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map."} +{"id": "Pony/net-OSSockOpt-_160.txt", "contents": "fun box ipv6_priority_interactive()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_reserved1\u00b6\n[Source]\nfun box ipv6_priority_reserved1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_reserved2\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_616.txt", "contents": "fun box tipc_withdrawn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_zone_scope\u00b6\n[Source]\nfun box tipc_zone_scope()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nttcp_client_snd_wnd\u00b6\n[Source]"} +{"id": "Pony/files-File-_4.txt", "contents": "\nNone val\n\n\nvalid\u00b6\n[Source]\nReturns true if the file is currently open.\nfun box valid()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nread\u00b6\n[Source]\nReturns up to len bytes.\nfun ref read(\nlen: USize val)"} +{"id": "Pony/src-term-ansi_term-_39.txt", "contents": "_esc_num = 0\n_esc_mod = 0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/random-MT-_2.txt", "contents": "Public Functions\u00b6\nnext\u00b6\n[Source]\nA random integer in [0, 2^64)\nfun ref next()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nhas_next\u00b6\nfun tag has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n"} +{"id": "Pony/builtin-U16-_33.txt", "contents": "U16 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: U16 val)\n: (U16 val , U16 val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , U16 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/files-File-_20.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nset_time\u00b6\n[Source]\nSet the last access and modification times of the directory to the given\nvalues.\nfun box set_time(\natime: (I64 val , I64 val),\nmtime: (I64 val , I64 val))\n: Bool val\n\nParameters\u00b6\n\natime: (I64 val , I64 val)\nmtime: (I64 val , I64 val)\n\nReturns\u00b6"} +{"id": "Pony/builtin-Array-_3.txt", "contents": "Here's a few examples of the space allocated when initialising an Array with\nvarious number of elements:\n\n\n\nsize\nspace\n\n\n\n\n0\n0\n\n\n1\n8\n\n\n8"} +{"id": "Pony/src-serialise-serialise-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-Array-_33.txt", "contents": "\nNone val\n\n\nremove\u00b6\n[Source]\nRemove n elements from the array, beginning at index i.\nfun ref remove(\ni: USize val,\nn: USize val)\n: None val\n\nParameters\u00b6\n\ni: USize val\nn: USize val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-capsicum-cap-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122use @cap_enter[I32]() if freebsd or \"capsicum\"\n\nprimitive Cap\n\"\"\"\nThe Capsicum rights.\n\"\"\"\nfun enter(): Bool =>\n\"\"\"\nThis places the current process into capability mode, a mode of execution\nin which processes may only issue system calls operating on file"} +{"id": "Pony/collections-HashSet-_21.txt", "contents": "\n\nnext_index\u00b6\n[Source]\nGiven an index, return the next index that has a populated value. Raise an\nerror if there is no next populated index.\nfun box next_index(\nprev: USize val = call)\n: USize val ?\n\nParameters\u00b6\n\nprev: USize val = call\n\nReturns\u00b6\n\nUSize val ?\n\n\nindex\u00b6"} +{"id": "Pony/src-cli-command-_19.txt", "contents": "\"(\" + _spec.deb_string() + \"=)\" + _value.string()\n\nclass val SyntaxError\n\"\"\"\nSyntaxError summarizes a syntax error in a given parsed command line.\n\"\"\"\nlet _token: String\nlet _msg: String\n\nnew val create(token': String, msg': String) =>\n_token = token'\n_msg = msg'\n\nfun token(): String => _token\n\nfun string(): String => \"Error: \" + _msg + \" at: '\" + _token + \"'\"\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_139.txt", "contents": "fun box ipv6_fl_s_none()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_s_process\u00b6\n[Source]\nfun box ipv6_fl_s_process()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_s_user\u00b6\n[Source]"} +{"id": "Pony/src-buffered-writer-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/random-XorOshiro128Plus-_9.txt", "contents": "[Source]\nfun ref i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun ref i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6"} +{"id": "Pony/cli-Help-_2.txt", "contents": "[Source]\nCreates a command help for a specific command that can print a detailed\nhelp message.\nfun box for_command(\ncs: CommandSpec box,\nargv: Array[String val] box)\n: (CommandHelp box | SyntaxError val)\n\nParameters\u00b6\n\ncs: CommandSpec box\nargv: Array[String val] box\n\nReturns\u00b6\n\n(CommandHelp box | SyntaxError val)\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/3_arithmetic_3.txt", "contents": "| Operator | Method | Description |\n| -------- | ------ | --------------------------------------------- |\n| `+` | `add()` | wrap around on over-/underflow |\n| `-` | `sub()` | wrap around on over-/underflow |\n| `*` | `mul()` | wrap around on over-/underflow |\n| `/` | `div()` | `x / 0 = 0` |\n| `%` | `rem()` | `x % 0 = 0` |\n| `%%` | `mod()` | `x %% 0 = 0` |\n| `-` | `neg()` | wrap around on over-/underflow |\n| `>>` | `shr()` | filled with zeros, so `x >> 1 == x/2` is true |\n| `<<` | `shl()` | filled with zeros, so `x << 1 == x*2` is true |\n\n---\n"} +{"id": "Pony/src-time-time-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/buffered-Reader-_5.txt", "contents": "data: (String val | Array[U8 val] val))\n: None val\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\nReturns\u00b6\n\nNone val\n\n\nskip\u00b6\n[Source]\nSkip n bytes.\nfun ref skip(\nn: USize val)\n: None val ?\n\nParameters\u00b6"} +{"id": "Pony/collections-HashEq-_3.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: HashEq[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: HashEq[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/src-process-process_monitor-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/collections-persistent-Cons-_12.txt", "contents": "\nReturns\u00b6\n\nB\n\n\nevery\u00b6\n[Source]\nReturns true if every element satisfies the provided predicate, false\notherwise.\nfun val every(\nf: {(val->A): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-String-_27.txt", "contents": "Returns\u00b6\n\nU8 val ?\n\n\nupdate_offset\u00b6\n[Source]\nChanges a byte in the string, returning the previous byte at that offset.\nRaise an error if the offset is out of bounds.\nfun ref update_offset(\noffset: ISize val,\nvalue: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\noffset: ISize val\nvalue: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-time-time-_11.txt", "contents": " Time Package\n\nThe Time Package provides classes and methods for timing operations,\ndealing with dates and times, and scheduling tasks.\n\"\"\"\n\nuse \"lib:rt\" if linux\nuse @\"internal.x86.cpuid\"[(I32, I32, I32, I32)](eax: I32)\nuse @\"internal.x86.rdtscp\"[U64](aux: Pointer[I32])\nuse @\"llvm.x86.rdtsc\"[U64]()\nuse @\"llvm.readcyclecounter\"[U64]()\nuse @time[I64](tloc: Pointer[None])\nuse @clock_gettime[I32](clock: U32, ts: Pointer[(I64, I64)])\nif lp64 and (linux or bsd)\nuse @clock_gettime[I32](clock: U32, ts: Pointer[(I32, I32)])\nif ilp32 and (linux or bsd)\nuse @clock_gettime_nsec_np[U64](clock: U32) if osx\nuse @gettimeofday[I32](tp: Pointer[(I64, I64)], tzp: Pointer[None])\nif osx\nuse @GetSystemTimeAsFileTime[None](times_as_file_time: Pointer[(U32, U32)])"} +{"id": "Pony/format-AlignLeft-_0.txt", "contents": "\n\n\n\n\n\n\nAlignLeft\u00b6\n[Source]\nprimitive val AlignLeft\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: AlignLeft val^\n\nReturns\u00b6\n\nAlignLeft val^"} +{"id": "Pony/builtin-ISize-_18.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: ISize val)\n: ISize val ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/src-encode-base64-base64-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-reverse-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-unsigned-_60.txt", "contents": "\"\"\"\n@\"llvm.cttz.i64\"(this, true)\n\nfun bitwidth(): U64 => 64\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: U64): U64 => if this < y then this else y end\nfun max(y: U64): U64 => if this > y then this else y end\n\nfun hash(): USize =>\nifdef ilp32 then\n((this >> 32).u32() xor this.u32()).hash()\nelse\nusize().hash()\nend\n\nfun addc(y: U64): (U64, Bool) =>\n@\"llvm.uadd.with.overflow.i64\"(this, y)\n"} +{"id": "Pony/src-builtin-compare-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-real-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/net-OSSockOpt-_565.txt", "contents": "fun box tcp_ccalgoopt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cc_info\u00b6\n[Source]\nfun box tcp_cc_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_congestion\u00b6\n[Source]"} +{"id": "Pony/buffered-Reader-_29.txt", "contents": "\nReturns\u00b6\n\nI32 val ?\n\n\npeek_u64_be\u00b6\n[Source]\nPeek at a big-endian U64.\nfun box peek_u64_be(\noffset: USize val = 0)\n: U64 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU64 val ?"} +{"id": "Pony/net-OSSockOpt-_4.txt", "contents": "fun box ipproto_adfs()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ah\u00b6\n[Source]\nfun box ipproto_ah()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ahip\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_37.txt", "contents": "fun tag select(p: Promise[A]): Promise[(A, Promise[A])] =>\n\"\"\"\nReturn a promise that is fulfilled when either promise is fulfilled,\nresulting in a tuple of its value and the other promise.\n\"\"\"\nlet p' = Promise[(A, Promise[A])]\n\nlet s =\nobject tag\nvar _complete: Bool = false\nlet _p: Promise[(A, Promise[A])] = p'\n\nbe apply(a: A, p: Promise[A]) =>\nif not _complete then\n_p((a, p))\n_complete = true\nend\nend\n\nnext[None]({(a) => s(a, p) })"} +{"id": "Pony/src-pony_check-generator-_52.txt", "contents": "1032\n1033\n1034\n1035\n1036\n1037\n1038\n1039\n1040\n1041\n1042\n1043\n1044\n1045\n1046\n1047\n1048\n1049\n1050\n1051"} +{"id": "Pony/builtin-F64-_32.txt", "contents": "\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nacosh\u00b6\n[Source]\nfun box acosh()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n"} +{"id": "Pony/src-builtin-unsigned-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/format-Format-_5.txt", "contents": "\n\nfloat[A: ((F32 val | F64 val) & FloatingPoint[A])]\u00b6\n[Source]\nfun box float[A: ((F32 val | F64 val) & FloatingPoint[A])](\nx: A,\nfmt: (FormatDefault val | FormatExp val | FormatExpLarge val |\nFormatFix val | FormatFixLarge val | FormatGeneral val |\nFormatGeneralLarge val) = reference,\nprefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference,\nprec: USize val = 6,\nwidth: USize val = 0,\nalign: (AlignLeft val | AlignRight val | AlignCenter val) = reference,\nfill: U32 val = 32)\n: String iso^\n\nParameters\u00b6\n\nx: A\nfmt: (FormatDefault val | FormatExp val | FormatExpLarge val |"} +{"id": "Pony/src-pony_check-generator-_125.txt", "contents": "\"\"\"\nCreate a generator for USize values.\n\"\"\"\nlet that = this\nGenerator[USize](\nobject is GenObj[USize]\nfun generate(rnd: Randomness): GenerateResult[USize] =>\nrnd.usize(min, max)\n\nfun shrink(u: USize): ValueAndShrink[USize] =>\nthat._int_shrink[USize](consume u, min)\nend)\n\nfun ulong(\nmin: ULong = ULong.min_value(),\nmax: ULong = ULong.max_value())\n: Generator[ULong]\n=>\n\"\"\"\nCreate a generator for ULong values."} +{"id": "Pony/src-pony_bench-_runner-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/serialise-InputSerialisedAuth-_1.txt", "contents": ": InputSerialisedAuth val^\n\nParameters\u00b6\n\nauth: AmbientAuth val\n\nReturns\u00b6\n\nInputSerialisedAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: InputSerialisedAuth val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/cli-ArgSpec-_8.txt", "contents": "Returns\u00b6\n\nString val\n\n\ndescr\u00b6\n[Source]\nReturns the description for this arg.\nfun box descr()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nrequired\u00b6\n[Source]\nReturns true iff this arg is required to be present in the command line.\nfun box required()"} +{"id": "Pony/files-FileChown-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileChown val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/process-ProcessMonitor-_6.txt", "contents": "qty is zero, the call can contain any amount of data.\nfun ref expect(\nqty: USize val = 0)\n: None val\n\nParameters\u00b6\n\nqty: USize val = 0\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-array-_92.txt", "contents": "if n == nth then\nreturn i\nend\n\nn = n + 1\nend\nuntil (i = i - 1) == 0\nend\nend\n\nerror\n\nfun clone(): Array[this->A!]^ =>\n\"\"\"\nClone the array.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not cloned.\n\"\"\"\nlet out = Array[this->A!](_size)\n_ptr._copy_to(out._ptr, _size)"} +{"id": "Pony/builtin-ILong-_41.txt", "contents": "\nILong val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: ILong val)\n: Bool val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/files-FileSync-_2.txt", "contents": "\nthat: FileSync val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileSync val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileSync val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_path-_27.txt", "contents": "\"\"\"\n(let dir, let pre) = Path.split(prefix)\nlet parent: FilePath = match base\n| let base': FileAuth => FilePath(base', dir)\n| let base': FilePath => FilePath.from(base', dir)?\nend\n\nif not parent.mkdir() then\nerror\nend\n\nvar temp = FilePath.from(parent, pre + Path.random())?\n\nwhile not temp.mkdir(true) do\ntemp = FilePath.from(parent, pre + Path.random())?\nend\n\ncaps.union(caps')\ncaps.intersect(temp.caps)\npath = temp.path"} +{"id": "Pony/term-ANSINotify-_3.txt", "contents": "alt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\nleft\u00b6\n[Source]\nfun ref left(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val"} +{"id": "Pony/src-pony_bench-benchmark-_10.txt", "contents": "fun ref apply(c: AsyncBenchContinue) =>\nc.complete()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-Proxy-_1.txt", "contents": "wrap: TCPConnectionNotify iso\n\nReturns\u00b6\n\nTCPConnectionNotify iso^\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/7_equality_1.txt", "contents": "# Identity equality\n\nIdentity equality checks in Pony are done via the `is` keyword. `is` verifies that the two items are the same.\n\n```pony\nif None is None then\n// TRUE!\n// There is only 1 None so the identity is the same\nend\n\nlet a = Foo(\"hi\")\nlet b = Foo(\"hi\")\n\nif a is b then\n// NOPE. THIS IS FALSE\nend\n\nlet c = a\nif a is c then\n// YUP! TRUE!"} +{"id": "Pony/builtin-I64-_53.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/assert-Fact-_3.txt", "contents": "that: Fact val)\n: Bool val\n\nParameters\u00b6\n\nthat: Fact val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_571.txt", "contents": "fun box tcp_defer_accept()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_enable_ecn\u00b6\n[Source]\nfun box tcp_enable_ecn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_fastopen\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_77.txt", "contents": "ifdef ilp32 then\n@\"llvm.cttz.i32\"(this.u32(), false).usize()\nelse\n@\"llvm.cttz.i64\"(this.u64(), false).usize()\nend\n\nfun clz_unsafe(): USize =>\nifdef ilp32 then\n@\"llvm.ctlz.i32\"(this.u32(), true).usize()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), true).usize()\nend\n\nfun ctz_unsafe(): USize =>\nifdef ilp32 then\n@\"llvm.cttz.i32\"(this.u32(), true).usize()\nelse\n@\"llvm.cttz.i64\"(this.u64(), true).usize()\nend\n"} +{"id": "Pony/collections-persistent-Nil-_9.txt", "contents": "\nParameters\u00b6\n\nf: {(val->A): List[B]}[A, B] box\n\nReturns\u00b6\n\nNil[B] val\n\n\nfor_each\u00b6\n[Source]\nApplying a function to every member of the empty list is a no-op.\nfun box for_each(\nf: {(val->A)}[A] box)\n: None val\n\nParameters\u00b6\n\nf: {(val->A)}[A] box"} +{"id": "Pony/builtin-U32-_32.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-promises-promise-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429use \"time\"\n\nactor Promise[A: Any #share]"} +{"id": "Pony/src-builtin-signed-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/net-OSSockOpt-_330.txt", "contents": "fun box scm_wifi_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_abort_association\u00b6\n[Source]\nfun box sctp_abort_association()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_adaptation_layer\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_26.txt", "contents": "F64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Real-_24.txt", "contents": "U128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_268.txt", "contents": "fun box ndrv_demuxtype_ethertype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_demuxtype_sap\u00b6\n[Source]\nfun box ndrv_demuxtype_sap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_demuxtype_snap\u00b6\n[Source]"} +{"id": "Pony/process-StartProcessAuth-_0.txt", "contents": "\n\n\n\n\n\n\nStartProcessAuth\u00b6\n[Source]\nprimitive val StartProcessAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: AmbientAuth val)\n: StartProcessAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/files-FileLookup-_0.txt", "contents": "\n\n\n\n\n\n\nFileLookup\u00b6\n[Source]\nprimitive val FileLookup\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileLookup val^\n\nReturns\u00b6\n\nFileLookup val^"} +{"id": "Pony/src-signals-signal_notify-_2.txt", "contents": "32\n33\n34\n35use @getpid[I32]()\nuse @kill[I32](pid_t: I32, sig: U32)\nuse @raise[I32](sig: U32)\n\ninterface SignalNotify\n\"\"\"\nNotifications for a signal.\n\"\"\"\nfun ref apply(count: U32): Bool =>\n\"\"\"\nCalled with the the number of times the signal has fired since this was\nlast called. Return false to stop listening for the signal.\n\"\"\"\ntrue\n\nfun ref dispose() =>\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_317.txt", "contents": "fun box rds_trans_iwarp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_trans_none\u00b6\n[Source]\nfun box rds_trans_none()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_trans_tcp\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_51.txt", "contents": "\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-files-directory-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-files-file_info-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_45.txt", "contents": "fun box ipproto_prm()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pup\u00b6\n[Source]\nfun box ipproto_pup()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_pvp\u00b6\n[Source]"} +{"id": "Pony/cli-OptionSpec-_1.txt", "contents": "--opt or -O or --opt=true or -O=true\nto yield an option value like\ncmd.option(\"opt\").bool() == true.\nnew val bool(\nname': String val,\ndescr': String val = \"\",\nshort': (U8 val | None val) = reference,\ndefault': (Bool val | None val) = reference)\n: OptionSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference\ndefault': (Bool val | None val) = reference\n\nReturns\u00b6\n\nOptionSpec val^"} +{"id": "Pony/generics-and-reference-capabilities_5.txt", "contents": "# An `iso` specific class\n\n```pony\n// Note - this won't compile\nclass Foo\nvar _c: String iso\n\nnew create(c: String iso) =>\n_c = c\n\nfun get(): this->String iso => _c\n\nfun ref set(c: String iso) => _c = c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo(recover iso String end)\nenv.out.print(a.get().string())\na.set(recover iso String end)\nenv.out.print(a.get().string())"} +{"id": "Pony/random-Random-_3.txt", "contents": "A random integer in [0, 2^8)\nfun ref u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nA random integer in [0, 2^16)\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n"} +{"id": "Pony/files-FileInfo-_3.txt", "contents": "[Source]\nUNIX-style user ID of the owning group of filepath.\n\nlet size: USize val\u00b6\n[Source]\nTotal size of filepath in bytes.\nIn case of a symlink this is the size of the target, not the symlink itself.\n\nlet access_time: (I64 val , I64 val)\u00b6\n[Source]\nTime of last access as a tuple of seconds and nanoseconds since the epoch:\n(let a_secs: I64, let a_nanos: I64) = file_info.access_time\n\n\nlet modified_time: (I64 val , I64 val)\u00b6\n[Source]\nTime of last modification as tuple of seconds and nanoseconds since the epoch:\n(let m_secs: I64, let m_nanos: I64) = file_info.modified_time\n\n"} +{"id": "Pony/src-collections-set-_31.txt", "contents": "\"\"\"\n_set = set\n\nfun has_next(): Bool =>\n\"\"\"\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the set.\n\"\"\"\n_count < _set.size()\n\nfun ref next(): S->A ? =>\n\"\"\"\nReturns the next value, or raises an error if there isn't one. If values\nare added during iteration, this may not return all values.\n\"\"\"\n_i = _set.next_index(_i)?\n_count = _count + 1\n_set.index(_i)?\n\n"} +{"id": "Pony/src-itertools-iter-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/3_arithmetic_0.txt", "contents": "# Arithmetic\n\nArithmetic is about the stuff you learn to do with numbers in primary school: Addition, Subtraction, Multiplication, Division and so on. Piece of cake. We all know that stuff. We nonetheless want to spend a whole section on this topic, because when it comes to computers the devil is in the details.\n\nAs introduced in [Primitives](/types/primitives.md#built-in-primitive-types) numeric types in Pony are represented as a special kind of primitive that maps to machine words. Both integer types and floating point types support a rich set of arithmetic and bit-level operations. These are expressed as [Infix Operators](/expressions/ops.md#infix-operators) that are implemented as plain functions on the numeric primitive types.\n\nPony focuses on two goals, performance and safety. From time to time, these two goals collide. This is true especially for arithmetic on integers and floating point numbers. Safe code should check for overflow, division by zero and other error conditions on each operation where it can happen. Pony tries to enforce as many safety invariants at compile time as it possibly can, but checks on arithmetic operations can only happen at runtime. Code focused on performance should execute integer arithmetic as fast and with as few CPU cycles as possible. Checking for overflow is expensive, doing plain dangerous arithmetic that is possibly subject to overflow is cheap.\n\nPony provides different ways of doing arithmetic to give programmers the freedom to chose which operation suits best for them, the safe but slower operation or the fast one, because performance is crucial for the use case.\n"} +{"id": "Pony/net-OSSockOpt-_534.txt", "contents": "fun box so_vm_sockets_connect_timeout()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_nonblock_txrx\u00b6\n[Source]\nfun box so_vm_sockets_nonblock_txrx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_vm_sockets_peer_host_vm_id\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_43.txt", "contents": "fun required(): Bool =>\n\"\"\"\nReturns true iff this option is required to be present in the command line.\n\"\"\"\n_required\n\n// Other than bools, all options require args.\nfun _requires_arg(): Bool =>\nmatch _typ\n| let _: _BoolType => false\nelse\ntrue\nend\n\n// Used for bool options to get the true arg when option is present w/o arg\nfun _default_arg(): _Value =>\nmatch _typ\n| let _: _BoolType => true\nelse\nfalse"} +{"id": "Pony/src-buffered-reader-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-buffered-reader-_80.txt", "contents": "\"\"\"\n_distance_of('\\n')?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_602.txt", "contents": "fun box tipc_err_no_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_err_no_node\u00b6\n[Source]\nfun box tipc_err_no_node()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_err_no_port\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_52.txt", "contents": "\nlet bit = bits()\nlet high = (bit >> 32).u32()\nlet ex = ((high and 0x7FF00000) >> 20) - 1023\n\nif ex < 0 then\nreturn 0\nend\n\nlet s = ((high and 0x80000000) >> 31).i128()\nvar r = ((bit and 0x000FFFFFFFFFFFFF) or 0x0010000000000000).i128()\nlet ex' = ex.u128()\n\nif ex' > 52 then\nr = r << (ex' - 52)\nelse\nr = r >> (52 - ex')\nend\n\n(r xor s) - s"} +{"id": "Pony/builtin-ULong-_33.txt", "contents": "fun box div_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: ULong val)\n: (ULong val , ULong val)\n\nParameters\u00b6"} +{"id": "Pony/src-files-file-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/4_traits-and-interfaces_14.txt", "contents": "## Open world typing\n\nWe've covered a couple ways that traits can be better than interfaces, let's close with the reason for why we say, unless you have a reason to, you should use `interface` instead of `trait`. Interfaces are incredibly flexible. Because traits only provide nominal typing, a concrete type can only be in a category if it was declared as such by the programmer who wrote the concrete type. Interfaces allow you to create your own categorizations on the fly, as you need them, to group existing concrete types together however you need to.\n\nHere's a contrived example:\n\n```pony\ninterface Compactable\nfun ref compact()\nfun size(): USize\n\nclass Compactor\n\"\"\"\nCompacts data structures when their size crosses a threshold\n\"\"\"\nlet _threshold: USize\n\nnew create(threshold: USize) =>\n_threshold = threshold\n"} +{"id": "Pony/random-Random-_11.txt", "contents": "\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nA random integer in [0, n)\nUses fixed-point inversion if platform supports native 128 bit operations\notherwise uses floating-point multiplication.\nfun ref int[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N"} +{"id": "Pony/files-Path-_10.txt", "contents": "will be omitted from the result.\nfun box base(\npath: String val,\nwith_ext: Bool val = true)\n: String val\n\nParameters\u00b6\n\npath: String val\nwith_ext: Bool val = true\n\nReturns\u00b6\n\nString val\n\n\ndir\u00b6\n[Source]\nReturn a cleaned path before the last separator, or the whole path if there\nis no separator."} +{"id": "Pony/src-pony_test-test_helper-_39.txt", "contents": "if consumed(i)? then continue end\nif e == a then\nconsumed.update(i, true)?\nfound = true\nbreak\nend\nend\nif not found then\nmissing.push(e)\nend\nend\n\nlet extra = Array[box->A]\nfor (i, c) in consumed.pairs() do\nif not c then extra.push(actual(i)?) end\nend\n\nif (extra.size() != 0) or (missing.size() != 0) then\nfail(\n_format_loc(loc) + \"Assert EQ_UNORDERED failed. \" + msg"} +{"id": "Pony/builtin-USize-_18.txt", "contents": "\ny: USize val\n\nReturns\u00b6\n\nUSize val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: USize val)\n: (USize val , USize val) ?\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/format-FormatFixLarge-_0.txt", "contents": "\n\n\n\n\n\n\nFormatFixLarge\u00b6\n[Source]\nprimitive val FormatFixLarge is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_413.txt", "contents": "fun box sctp_packet_dropped()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_packet_log_size\u00b6\n[Source]\nfun box sctp_packet_log_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_packet_truncated\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_14.txt", "contents": "(I32 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , Bool val)\n\n\nmulc\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_23.txt", "contents": "fn: {(T1, T2): T3^}[T1, T2, T3] ref\n\nReturns\u00b6\n\nGenerator[T3] box\n\n\nmap3[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\nConvenience combinator for mapping 3 generators into 1.\nfun box map3[T1: T1, T2: T2, T3: T3, T4: T4](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box,\ngen3: Generator[T3] box,\nfn: {(T1, T2, T3): T4^}[T1, T2, T3, T4] ref)\n: Generator[T4] box\n\nParameters\u00b6\n\ngen1: Generator[T1] box"} +{"id": "Pony/src-itertools-iter-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-cli-command_spec-_39.txt", "contents": "new val i64(name': String,\ndescr': String = \"\",\nshort': (U8 | None) = None,\ndefault': (I64 | None) = None)\n=>\n\"\"\"\nCreates an Option with an I64 typed value that can be used like\n`--count=42 -C=42`\nto yield an option value like\n`cmd.option(\"count\").i64() == I64(42)`.\n\"\"\"\n_name = name'\n_descr = descr'\n_short = short'\n(_typ, _default, _required) = _init(_I64Type, default')\n\nnew val u64(name': String,\ndescr': String = \"\",\nshort': (U8 | None) = None,\ndefault': (U64 | None) = None)"} +{"id": "Pony/src-collections-heap-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_88.txt", "contents": "fun box dso_cork()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_disdata\u00b6\n[Source]\nfun box dso_disdata()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_info\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generator-_11.txt", "contents": "value_iter\u00b6\n[Source]\nfun box value_iter(\nrnd: Randomness ref)\n: Iterator[T^] ref\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\nIterator[T^] ref\n\n\nvalue_and_shrink_iter\u00b6\n[Source]\nfun box value_and_shrink_iter(\nrnd: Randomness ref)\n: Iterator[(T^ , Iterator[T^] ref)] ref"} +{"id": "Pony/src-process-_process-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-pony_test-pony_test-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/collections-Reverse-_2.txt", "contents": "\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nmax: A,\nmin: A,\ndec: A = 1)\n: Reverse[A] ref^\n\nParameters\u00b6\n\nmax: A\nmin: A\ndec: A = 1\n\nReturns\u00b6\n\nReverse[A] ref^\n"} +{"id": "Pony/net-OSSockOpt-_523.txt", "contents": "fun box so_security_encryption_network()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_security_encryption_transport\u00b6\n[Source]\nfun box so_security_encryption_transport()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_select_err_queue\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_230.txt", "contents": "fun box ip_portrange()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_portrange_default\u00b6\n[Source]\nfun box ip_portrange_default()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_portrange_high\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_52.txt", "contents": "\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n"} +{"id": "Pony/net-OSSockOpt-_398.txt", "contents": "fun box sctp_listen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_local_auth_chunks\u00b6\n[Source]\nfun box sctp_local_auth_chunks()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_lock_logging_enable\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_12.txt", "contents": "new tag create(\nauth: TCPConnectAuth val,\nnotify: TCPConnectionNotify iso,\nhost: String val,\nservice: String val,\nfrom: String val = \"\",\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)\n: TCPConnection tag^\n\nParameters\u00b6\n\nauth: TCPConnectAuth val\nnotify: TCPConnectionNotify iso\nhost: String val\nservice: String val\nfrom: String val = \"\"\nread_buffer_size: USize val = 16384\nyield_after_reading: USize val = 16384"} +{"id": "Pony/src-builtin-signed-_87.txt", "contents": "(let q, let r) = divrem(y)\nr\nend\n\nfun mul_unsafe(y: I128): I128 =>\n\"\"\"\nUnsafe operation.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis *~ y\nelse\nthis * y\nend\n\nfun divrem_unsafe(y: I128): (I128, I128) =>\n\"\"\"\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined."} +{"id": "Pony/collections-HashFunction-_1.txt", "contents": "\nHashFunction[A] val^\n\n\nPublic Functions\u00b6\nhash\u00b6\n[Source]\nCalculate the hash of some type. This is an alias of the type parameter to\nallow data structures to hash things without consuming them.\nfun box hash(\nx: box->A!)\n: USize val\n\nParameters\u00b6\n\nx: box->A!\n\nReturns\u00b6\n\nUSize val"} +{"id": "Pony/builtin-F64-_65.txt", "contents": "\n\nu8_unsafe\u00b6\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n"} +{"id": "Pony/src-debug-debug-_8.txt", "contents": "end\nend\n\nfun out(msg: Stringable = \"\") =>\n\"\"\"\nIf platform is debug configured, print message to standard output\n\"\"\"\n_print(msg.string(), DebugOut)\n\nfun err(msg: Stringable = \"\") =>\n\"\"\"\nIf platform is debug configured, print message to standard error\n\"\"\"\n_print(msg.string(), DebugErr)\n\nfun _print(msg: String, stream: DebugStream) =>\nifdef debug then\n@fprintf(_stream(stream), \"%s\\n\".cstring(), msg.cstring())\nend\n"} +{"id": "Pony/src-backpressure-auth-_0.txt", "contents": "\n\n\n\n\n\n\nauth.pony\n\n1\n2\n3primitive ApplyReleaseBackpressureAuth\nnew create(from: AmbientAuth) =>\nNone\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_28.txt", "contents": "\nfun ref right(ctrl: Bool = false, alt: Bool = false, shift: Bool = false) =>\n\"\"\"\nMove right.\n\"\"\"\ntry\nif _cur_pos < _edit.size().isize() then\n_cur_pos = _cur_pos + 1\nend\n\nwhile\n(_cur_pos < _edit.size().isize()) and\n((_edit.at_offset(_cur_pos)? and 0xC0) == 0x80)\ndo\n_cur_pos = _cur_pos + 1\nend\n\n_refresh_line()\nend\n"} +{"id": "Pony/src-files-file-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-net-udp_socket-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/cli-CommandParser-_1.txt", "contents": "\nspec': CommandSpec box\n\nReturns\u00b6\n\nCommandParser box^\n\n\nPublic Functions\u00b6\nparse\u00b6\n[Source]\nParses all of the command line tokens and env vars and returns a Command,\nor the first SyntaxError.\nfun box parse(\nargv: Array[String val] box,\nenvs: (Array[String val] box | None val) = reference)\n: (Command box | CommandHelp box | SyntaxError val)\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-I16-_57.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-stdin-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-files-file_lines-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-USize-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_15.txt", "contents": "\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-U128-_1.txt", "contents": "new val create(\nvalue: U128 val)\n: U128 val^\n\nParameters\u00b6\n\nvalue: U128 val\n\nReturns\u00b6\n\nU128 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-builtin-array-_77.txt", "contents": "return (consume this, consume b)\nend\n\nif a_left then\n_alloc = _alloc + b._alloc\n_size = _size + b._size\nconsume this\nelse\nb._alloc = b._alloc + _alloc\nb._size = b._size + _size\nconsume b\nend\n\nfun ref copy_from[B: (A & Real[B] val & U8) = A](\nsrc: Array[U8] box,\nsrc_idx: USize,\ndst_idx: USize,\nlen: USize)\n=>\n\"\"\""} +{"id": "Pony/builtin-Array-_10.txt", "contents": "USize val\n\n\nreserve\u00b6\n[Source]\nReserve space for len elements, including whatever elements are already in\nthe array. Array space grows geometrically.\nfun ref reserve(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/random-SplitMix64-_5.txt", "contents": ": U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun ref u128()"} +{"id": "Pony/time-Nanos-_6.txt", "contents": "\nParameters\u00b6\n\nwall: (I64 val , I64 val)\n\nReturns\u00b6\n\nU64 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Nanos val)\n: Bool val\n\nParameters\u00b6\n\nthat: Nanos val\n"} +{"id": "Pony/builtin-ISize-_22.txt", "contents": "\nISize val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: ISize val)\n: (ISize val , ISize val) ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , ISize val) ?\n\n\nfld_partial\u00b6"} +{"id": "Pony/files-CreateFile-_1.txt", "contents": "\nCreateFile val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nfrom: FilePath val)\n: (File ref | FileOK val | FileError val |\nFileEOF val | FileBadFileNumber val | FileExists val |\nFilePermissionDenied val)\n\nParameters\u00b6\n\nfrom: FilePath val\n\nReturns\u00b6\n\n(File ref | FileOK val | FileError val |"} +{"id": "Pony/src-collections-heap-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144type MinHeap[A: Comparable[A] #read] is BinaryHeap[A, MinHeapPriority[A]]\ntype MaxHeap[A: Comparable[A] #read] is BinaryHeap[A, MaxHeapPriority[A]]\n\nclass BinaryHeap[A: Comparable[A] #read, P: BinaryHeapPriority[A]]\n\"\"\"\nA priority queue implemented as a binary heap. The `BinaryHeapPriority` type\nparameter determines whether this is max-heap or a min-heap.\n\"\"\""} +{"id": "Pony/src-promises-promise-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-String-_76.txt", "contents": "\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nU128 val ?\n\n\nulong\u00b6\n[Source]\nfun box ulong(\nbase: U8 val = 0)\n: ULong val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n"} +{"id": "Pony/src-pony_check-property_runner-_43.txt", "contents": "+ \" (after \"\n+ shrink_rounds.string()\n+ \" shrinks)\"\n)\n\nfun _report_failed(sample_repr: String,\nshrink_rounds: USize = 0,\nloc: SourceLoc = __loc) =>\n\"\"\"\nReport a failed property and signal failure to the `PropertyResultNotify`.\n\"\"\"\n_notify.fail(\n\"Property failed for sample \"\n+ sample_repr\n+ \" (after \"\n+ shrink_rounds.string()\n+ \" shrinks)\"\n)\n\n"} +{"id": "Pony/src-pony_check-randomness-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_494.txt", "contents": "fun box so_l2cap_oflow()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_omtu\u00b6\n[Source]\nfun box so_l2cap_omtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_label\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_59.txt", "contents": "1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): U64 => this\nfun bit_reverse(): U64 => @\"llvm.bitreverse.i64\"(this)\nfun bswap(): U64 => @\"llvm.bswap.i64\"(this)\nfun popcount(): U64 => @\"llvm.ctpop.i64\"(this)\nfun clz(): U64 => @\"llvm.ctlz.i64\"(this, false)\nfun ctz(): U64 => @\"llvm.cttz.i64\"(this, false)\n\nfun clz_unsafe(): U64 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i64\"(this, true)\n\nfun ctz_unsafe(): U64 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/builtin-ILong-_7.txt", "contents": "\nULong val\n\n\nctz_unsafe\u00b6\n[Source]\nfun box ctz_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I16-_11.txt", "contents": "I16 val\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_12.txt", "contents": "(U64 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , Bool val)\n\n\nmulc\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_48.txt", "contents": "\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n"} +{"id": "Pony/src-pony_test-pony_test-_32.txt", "contents": "# Aggregation\n\nOften it is desirable to run a collection of unit tests from multiple different\nsource files. For example, if several packages within a bundle each have their\nown unit tests it may be useful to run all tests for the bundle together.\n\nThis can be achieved by writing an aggregate test list class, which calls the\nlist function for each package. The following is an example that aggregates the\ntests from packages `foo` and `bar`.\n\n```pony\nuse \"pony_test\"\nuse bar = \"bar\"\nuse foo = \"foo\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>"} +{"id": "Pony/buffered-Reader-_10.txt", "contents": "Returns\u00b6\n\nI8 val ?\n\n\nu16_be\u00b6\n[Source]\nGet a big-endian U16.\nfun ref u16_be()\n: U16 val ?\n\nReturns\u00b6\n\nU16 val ?\n\n\nu16_le\u00b6\n[Source]\nGet a little-endian U16.\nfun ref u16_le()"} +{"id": "Pony/files-FileRemove-_2.txt", "contents": "\nthat: FileRemove val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileRemove val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileRemove val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_11.txt", "contents": "I64 val\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-net-tcp_listener-_0.txt", "contents": "\n\n\n\n\n\n\ntcp_listener.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/collections-HashFunction-_0.txt", "contents": "\n\n\n\n\n\n\nHashFunction[A: A]\u00b6\n[Source]\nA pluggable hash function.\ninterface val HashFunction[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nData structures create instances internally. Use a primitive if possible.\nnew val create()\n: HashFunction[A] val^\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-randomness-_21.txt", "contents": "\"\"\"\nmin + u64(0, (max - min).u64()).i64()\n\n\nfun ref i128(\nmin: I128 = I128.min_value(),\nmax: I128 = I128.max_value())\n: I128\n=>\n\"\"\"\nGenerate a I128 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nmin + u128(0, (max - min).u128()).i128()\n\n\nfun ref ilong(\nmin: ILong = ILong.min_value(),"} +{"id": "Pony/builtin-FloatingPoint-_17.txt", "contents": "Parameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box ne_unsafe(\ny: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-hashable-_10.txt", "contents": "Use the structural equality function from the type parameter.\n\"\"\"\nx == y\n\nprimitive HashEq64[A: (Hashable64 #read & Equatable[A] #read)] is\nHashFunction64[A]\nfun hash64(x: box->A): U64 =>\n\"\"\"\nUse the hash function from the type parameter.\n\"\"\"\nx.hash64()\n\nfun eq(x: box->A, y: box->A): Bool =>\n\"\"\"\nUse the structural equality function from the type parameter.\n\"\"\"\nx == y\n\nprimitive HashIs[A] is (HashFunction[A] & HashFunction64[A])\nfun hash(x: box->A!): USize =>"} +{"id": "Pony/src-random-random-_15.txt", "contents": "next().ulong()\nend\n\nfun ref usize(): USize =>\n\"\"\"\nA random integer in [0, USize.max_value()]\n\"\"\"\nifdef ilp32 then\n(next() >> 32).usize()\nelse\nnext().usize()\nend\n\nfun ref i8(): I8 =>\n\"\"\"\nA random integer in [-2^7, 2^7)\n\"\"\"\nu8().i8()\n\nfun ref i16(): I16 =>"} +{"id": "Pony/src-capsicum-cap-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_33.txt", "contents": "fun box ipproto_larp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_leaf1\u00b6\n[Source]\nfun box ipproto_leaf1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_leaf2\u00b6\n[Source]"} +{"id": "Pony/use-statement_2.txt", "contents": "# Use names\n\nAs we saw above the use command adds all the public types from a package into the namespace of the using file. This means that using a package may define type names that you want to use for your own types. Furthermore, if you use two packages within a file they may both define the same type name, causing a clash in your namespace. For example:\n\n```pony\n// In package A\nclass Foo\n\n// In package B\nclass Foo\n\n// In your code\nuse \"packageA\"\nuse \"packageB\"\n\nclass Bar\nvar _x: Foo\n```\n\nThe declarations of _x is an error because we don't know which `Foo` is being referred to. Actually using 'Foo' is not even required, simply using both `packageA` and `packageB` is enough to cause an error here."} +{"id": "Pony/collections-MapPairs-_0.txt", "contents": "\n\n\n\n\n\n\nMapPairs[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read]\u00b6\n[Source]\nAn iterator over the keys and values in a map.\nclass ref MapPairs[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[(M->K , M->V)] ref\n\nImplements\u00b6\n\nIterator[(M->K , M->V)] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-cli-command_spec-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-string-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-process-process_monitor-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/pony_check-ForAll-_1.txt", "contents": "\ngen': Generator[T] val\ntestHelper: TestHelper val\n\nReturns\u00b6\n\nForAll[T] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nexecute\nfun ref apply(\nprop: {(T, PropertyHelper) ?}[T] val)\n: None val ?\n\nParameters\u00b6\n\nprop: {(T, PropertyHelper) ?}[T] val"} +{"id": "Pony/collections-HashFunction-_2.txt", "contents": "\n\neq\u00b6\n[Source]\nDetermine equality between two keys with the same hash. This is done with\nviewpoint adapted aliases to allow data structures to determine equality\nin a box fun without consuming keys.\nfun box eq(\nx: box->A!,\ny: box->A!)\n: Bool val\n\nParameters\u00b6\n\nx: box->A!\ny: box->A!\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/builtin-I128-_46.txt", "contents": "Bool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: I128 val)\n: Bool val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]"} +{"id": "Pony/format-FormatOctalBare-_0.txt", "contents": "\n\n\n\n\n\n\nFormatOctalBare\u00b6\n[Source]\nprimitive val FormatOctalBare is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-tcp_listener-_16.txt", "contents": "var _count: USize = 0\nvar _paused: Bool = false\nlet _read_buffer_size: USize\nlet _yield_after_reading: USize\nlet _yield_after_writing: USize\n\nnew create(\nauth: TCPListenAuth,\nnotify: TCPListenNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nlimit: USize = 0,\nread_buffer_size: USize = 16384,\nyield_after_reading: USize = 16384,\nyield_after_writing: USize = 16384)\n=>\n\"\"\"\nListens for both IPv4 and IPv6 connections.\n\"\"\"\n_limit = limit"} +{"id": "Pony/net-OSSockOpt-_79.txt", "contents": "fun box dccp_sockopt_ccid_tx_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_change_l\u00b6\n[Source]\nfun box dccp_sockopt_change_l()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_change_r\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_18.txt", "contents": "String iso^\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_114.txt", "contents": "ourself a resume message and stop reading, to avoid starving other actors.\nCurrently we can handle a varying value of _expect (greater than 0) and\nconstant _expect of 0 but we cannot handle switching between these two\ncases.\n\"\"\"\nifdef not windows then\ntry\nvar sum: USize = 0\nvar received_called: USize = 0\n_reading = true\n\nwhile _readable and not _shutdown_peer do\n// exit if muted\nif _muted then\n_reading = false\nreturn\nend\n\n// distribute the data we've already read that is in the `read_buf`\n// and able to be distributed"} +{"id": "Pony/src-net-ossockopt-_54.txt", "contents": "1072\n1073\n1074\n1075\n1076\n1077\n1078\n1079\n1080\n1081\n1082\n1083\n1084\n1085\n1086\n1087\n1088\n1089\n1090\n1091"} +{"id": "Pony/src-term-ansi_notify-_5.txt", "contents": "None\n\nfun ref closed() =>\nNone\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/net-OSSockOpt-_390.txt", "contents": "fun box sctp_get_remote_addr_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_sndbuf_use\u00b6\n[Source]\nfun box sctp_get_sndbuf_use()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_stat_log\u00b6\n[Source]"} +{"id": "Pony/src-encode-base64-base64-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/divide-by-zero_3.txt", "contents": "## Divide by zero on floating points\n\nIn conformance with IEEE 754, *floating point division by zero results in `inf` or `-inf`*, depending on the sign of the numerator.\n\nIf you can assert that your denominator cannot be `0`, it is possible to use [Unsafe Division](/expressions/arithmetic.md#floating-point) to gain some performance:\n\n```pony\nlet x = F64(1.5) /~ F64(0.5)\n```\n"} +{"id": "Pony/builtin-ILong-_36.txt", "contents": "\nILong val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nsub\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_52.txt", "contents": "fun box gt(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/builtin-U32-_22.txt", "contents": "(U32 val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: U32 val)\n: U32 val ?\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_59.txt", "contents": "Get the i-th element, raising an error if the index is out of bounds.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.apply(1)? end // \"b\"\n```\n\"\"\"\nindex(i)?()?\n\nfun ref update(i: USize, value: A): A^ ? =>\n\"\"\"\nChange the i-th element, raising an error if the index is out of bounds, and\nreturning the previous value.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.update(1, \"z\")? end // Returns \"b\" and List now contains [\"a\"; \"z\"; \"c\"]\n```\n\"\"\"\nindex(i)?()? = consume value"} +{"id": "Pony/builtin-ULong-_5.txt", "contents": "\nULong val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/random-SplitMix64-_12.txt", "contents": ": N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/net-OSSockOpt-_118.txt", "contents": "fun box ipctl_rtmaxcache()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_rtminexpire\u00b6\n[Source]\nfun box ipctl_rtminexpire()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_sendredirects\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_106.txt", "contents": "error\nend\nend)\n\nfun ref take_while(f: {(A!): Bool ?} box): Iter[A!]^ =>\n\"\"\"\nReturn an iterator that returns values while the predicate `f` returns\ntrue. This iterator short-circuits the first time that `f` returns false or\nraises an error.\n"} +{"id": "Pony/src-net-tcp_connection-_107.txt", "contents": "hard_close()\nend\nend\nend\n\nfalse\n\nfun ref _manage_pending_buffer(\nbytes_sent: USize,\nbytes_to_send: USize,\nnum_to_send: USize)\n: Bool ?\n=>\n\"\"\"\nManage pending buffer for data sent. Returns a boolean of whether\nthe pending buffer is empty or not.\n\"\"\"\nvar len = bytes_sent\nif len < bytes_to_send then\nvar num_sent: USize = 0"} +{"id": "Pony/builtin-I8-_22.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: I8 val)\n: (I8 val , I8 val) ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_103.txt", "contents": "fun box icmp_parameterprob()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_pkt_filtered\u00b6\n[Source]\nfun box icmp_pkt_filtered()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_port_unreach\u00b6\n[Source]"} +{"id": "Pony/pony_check-IntPropertySample-_0.txt", "contents": "\n\n\n\n\n\n\nIntPropertySample\u00b6\n[Source]\nclass ref IntPropertySample is\nStringable box\n\nImplements\u00b6\n\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/generic-constraints_0.txt", "contents": "# Constraints\n"} +{"id": "Pony/src-files-directory-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/builtin-U32-_0.txt", "contents": "\n\n\n\n\n\n\nU32\u00b6\n[Source]\nprimitive val U32 is\nUnsignedInteger[U32 val] val\n\nImplements\u00b6\n\nUnsignedInteger[U32 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-Pointer-_6.txt", "contents": "that: Pointer[A] tag\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun tag ge(\nthat: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n\nthat: Pointer[A] tag\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/cli-Arg-_0.txt", "contents": "\n\n\n\n\n\n\nArg\u00b6\n[Source]\nArg contains a spec and an effective value for a given arg.\nclass val Arg\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nspec': ArgSpec val,\nvalue': (Bool val | String val | I64 val |\nU64 val | F64 val | _StringSeq val))\n: Arg val^"} +{"id": "Pony/src-collections-map-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-F32-_58.txt", "contents": ": ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\nfun box u8()\n: U8 val\n"} +{"id": "Pony/src-term-ansi_notify-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48interface ANSINotify\n\"\"\"\nReceive input from an ANSITerm.\n\"\"\""} +{"id": "Pony/src-net-ossockopt-_75.txt", "contents": "fun ipproto_routing():I32 => @pony_os_sockopt_level(I32(4091))\nfun ipproto_rsvp():I32 => @pony_os_sockopt_level(I32(4092))\nfun ipproto_rvd():I32 => @pony_os_sockopt_level(I32(4093))\nfun ipproto_satexpak():I32 => @pony_os_sockopt_level(I32(4094))\nfun ipproto_satmon():I32 => @pony_os_sockopt_level(I32(4095))\nfun ipproto_sccsp():I32 => @pony_os_sockopt_level(I32(4096))\nfun ipproto_sctp():I32 => @pony_os_sockopt_level(I32(4097))\nfun ipproto_sdrp():I32 => @pony_os_sockopt_level(I32(4098))\nfun ipproto_send():I32 => @pony_os_sockopt_level(I32(4099))\nfun ipproto_sep():I32 => @pony_os_sockopt_level(I32(4100))\nfun ipproto_shim6():I32 => @pony_os_sockopt_level(I32(4101))\nfun ipproto_skip():I32 => @pony_os_sockopt_level(I32(4102))\nfun ipproto_spacer():I32 => @pony_os_sockopt_level(I32(4103))\nfun ipproto_srpc():I32 => @pony_os_sockopt_level(I32(4104))\nfun ipproto_st():I32 => @pony_os_sockopt_level(I32(4105))\nfun ipproto_svmtp():I32 => @pony_os_sockopt_level(I32(4106))\nfun ipproto_swipe():I32 => @pony_os_sockopt_level(I32(4107))\nfun ipproto_tcf():I32 => @pony_os_sockopt_level(I32(4108))\nfun ipproto_tcp():I32 => @pony_os_sockopt_level(I32(4109))\nfun ipproto_tlsp():I32 => @pony_os_sockopt_level(I32(4110))"} +{"id": "Pony/src-net-ossockopt-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-promises-promise-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-net-tcp_connection-_126.txt", "contents": "end\n| (let errno: U32, _) =>\n// System call failed\nend\n```\n\"\"\"\n_OSSocket.getsockopt(_fd, level, option_name, option_max_size)\n\nfun ref getsockopt_u32(level: I32, option_name: I32): (U32, U32) =>\n\"\"\"\nWrapper for TCP sockets to the `getsockopt(2)` system call where\nthe kernel's returned option value is a C `uint32_t` type / Pony\ntype `U32`.\n\nIn case of system call success, this function returns the 2-tuple:\n1. The integer `0`.\n2. The `*option_value` returned by the kernel converted to a Pony `U32`.\n\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of `errno`."} +{"id": "Pony/src-pony_test-test_helper-_0.txt", "contents": "\n\n\n\n\n\n\ntest_helper.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-itertools-iter-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/builtin-Platform-_8.txt", "contents": "Bool val\n\n\nbigendian\u00b6\n[Source]\nfun box bigendian()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nlittleendian\u00b6\n[Source]\nfun box littleendian()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/buffered-Reader-_24.txt", "contents": "\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU16 val ?\n\n\npeek_i16_be\u00b6\n[Source]\nPeek at a big-endian I16.\nfun box peek_i16_be(\noffset: USize val = 0)\n: I16 val ?\n\nParameters\u00b6\n\noffset: USize val = 0"} +{"id": "Pony/net-OSSockOpt-_164.txt", "contents": "fun box ipv6_recvhopopts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvorigdstaddr\u00b6\n[Source]\nfun box ipv6_recvorigdstaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvpathmtu\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_117.txt", "contents": "fun box ipctl_maxid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_rtexpire\u00b6\n[Source]\nfun box ipctl_rtexpire()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_rtmaxcache\u00b6\n[Source]"} +{"id": "Pony/net-UDPAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: UDPAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: UDPAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/pony_test-UnitTest-_1.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\nexclusion_group\u00b6\n[Source]\nReport the test exclusion group, returning an empty string for none.\nThe default body returns an empty string.\nfun box exclusion_group()\n: String val\n\nReturns\u00b6\n\nString val\n\n\napply\u00b6"} +{"id": "Pony/scheduling_2.txt", "contents": "# Long running behaviors\n\nAnother way to monopolize a scheduler thread is to write a behavior that never exits or takes a really long time to exit.\n\n```pony\nbe bad_citizen() =>\nwhile true do\n_env.out.print(\"Never gonna give you up. Really gonna make you cry\")\nend\n```\n\nThat is some seriously bad citizen code that will hog a scheduler thread forever. Call that behavior a few times and your program will grind to a halt. If you find yourself writing code with loops that will run for a long time, stop and rethink your design. Take a look at the [Timer](https://stdlib.ponylang.io/time-Timer/) class from the standard library. Combine that together with a counter in your class and you can execute the same behavior repeatedly while yielding your scheduler thread to other actors.\n"} +{"id": "Pony/src-term-ansi-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-U128-_56.txt", "contents": "U32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-PropertyHelper-_6.txt", "contents": "\nParameters\u00b6\n\npredicate: Bool val\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_error\u00b6\n[Source]\nAssert that the given test function throws an error when run.\nfun box assert_error(\ntest: {(): None ?} box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val"} +{"id": "Pony/src-net-udp_socket-_34.txt", "contents": "embed _ip: NetAddress = NetAddress\n\nnew create(\nauth: UDPAuth,\nnotify: UDPNotify iso,\nhost: String = \"\",\nservice: String = \"0\",\nsize: USize = 1024)\n=>\n\"\"\"\nListens for both IPv4 and IPv6 datagrams.\n\"\"\"\n_notify = consume notify\n_event =\n@pony_os_listen_udp(this, host.cstring(), service.cstring())\n_fd = @pony_asio_event_fd(_event)\n@pony_os_sockname(_fd, _ip)\n_packet_size = size\n_read_buf = recover Array[U8] .> undefined(size) end\n_notify_listening()"} +{"id": "Pony/format-FormatGeneral-_1.txt", "contents": "new val create()\n: FormatGeneral val^\n\nReturns\u00b6\n\nFormatGeneral val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatGeneral val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatGeneral val\n\nReturns\u00b6"} +{"id": "Pony/recovering-capabilities_0.txt", "contents": "# Recovering Capabilities\n\nA `recover` expression lets you \"lift\" the reference capability of the result. A mutable reference capability (`iso`, `trn`, or `ref`) can become _any_ reference capability, and an immutable reference capability (`val` or `box`) can become any immutable or opaque reference capability.\n"} +{"id": "Pony/src-files-file_path-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-asio_event-_3.txt", "contents": "52\n53\n54type AsioEventID is Pointer[AsioEvent] tag\n\ntrait tag AsioEventNotify\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32)\n\nprimitive AsioEvent\n\"\"\"\nFunctions for asynchronous event notification.\n\"\"\"\nfun none(): AsioEventID =>\n\"\"\"\nAn empty event.\n\"\"\"\nAsioEventID\n\nfun readable(flags: U32): Bool =>\n\"\"\"\nReturns true if the flags contain the readable flag."} +{"id": "Pony/pony_check-Property3UnitTest-_4.txt", "contents": "\nNone val\n\n\nset_up\u00b6\nfun ref set_up(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\ntear_down\u00b6\nfun ref tear_down("} +{"id": "Pony/net-OSSockOpt-_127.txt", "contents": "fun box ipv6_2292rthdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_addrform\u00b6\n[Source]\nfun box ipv6_addrform()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_addr_preferences\u00b6\n[Source]"} +{"id": "Pony/capsicum--index-_0.txt", "contents": "\n\n\n\n\n\n\nCapsicum package\u00b6\nAccess to Capsicum capabilities for UNIX systems -- primarily in use by BSD-based systems.\nPublic Types\u00b6\n\nprimitive Cap\ntype CapRights\nclass CapRights0\n\n\n\n\n\n"} +{"id": "Pony/builtin-FloatingPoint-_10.txt", "contents": "\n\nmul_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box mul_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/src-random-splitmix64-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28class SplitMix64 is Random\n\"\"\"\nVery fast Pseudo-Random-Number-Generator\nusing only 64 bit of state, as detailed at:"} +{"id": "Pony/net-OSSockOpt-_366.txt", "contents": "fun box sctp_cwnd_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cwnd_monitor_enable\u00b6\n[Source]\nfun box sctp_cwnd_monitor_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cwr_in_same_window\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-pointer-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-net-ossockopt-_104.txt", "contents": "fun sctp_authentication():I32 => @pony_os_sockopt_option(I32(522))\nfun sctp_auth_active_key():I32 => @pony_os_sockopt_option(I32(523))\nfun sctp_auth_chunk():I32 => @pony_os_sockopt_option(I32(524))\nfun sctp_auth_deactivate_key():I32 => @pony_os_sockopt_option(I32(525))\nfun sctp_auth_delete_key():I32 => @pony_os_sockopt_option(I32(526))\nfun sctp_auth_key():I32 => @pony_os_sockopt_option(I32(527))\nfun sctp_auth_supported():I32 => @pony_os_sockopt_option(I32(528))\nfun sctp_autoclose():I32 => @pony_os_sockopt_option(I32(529))\nfun sctp_auto_asconf():I32 => @pony_os_sockopt_option(I32(530))\nfun sctp_badcrc():I32 => @pony_os_sockopt_option(I32(531))\nfun sctp_bindx_add_addr():I32 => @pony_os_sockopt_option(I32(532))\nfun sctp_bindx_rem_addr():I32 => @pony_os_sockopt_option(I32(533))\nfun sctp_blk_logging_enable():I32 => @pony_os_sockopt_option(I32(534))\nfun sctp_bound():I32 => @pony_os_sockopt_option(I32(535))\nfun sctp_cause_cookie_in_shutdown():I32 => @pony_os_sockopt_option(I32(536))\nfun sctp_cause_deleting_last_addr():I32 => @pony_os_sockopt_option(I32(537))\nfun sctp_cause_deleting_src_addr():I32 => @pony_os_sockopt_option(I32(538))\nfun sctp_cause_illegal_asconf_ack():I32 => @pony_os_sockopt_option(I32(539))\nfun sctp_cause_invalid_param():I32 => @pony_os_sockopt_option(I32(540))\nfun sctp_cause_invalid_stream():I32 => @pony_os_sockopt_option(I32(541))"} +{"id": "Pony/src-pony_test-pony_test-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/pony_check-ForAll3-_2.txt", "contents": "Parameters\u00b6\n\nprop: {(T1, T2, T3, PropertyHelper) ?}[T1, T2, T3] val\n\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_265.txt", "contents": "fun box msg_notification()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmsg_socallbck\u00b6\n[Source]\nfun box msg_socallbck()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrvproto_ndrv\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-unsigned-_64.txt", "contents": "@\"llvm.bswap.i64\"(this.u64()).ulong()\nend\n\nfun popcount(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.ctpop.i32\"(this.u32()).ulong()\nelse\n@\"llvm.ctpop.i64\"(this.u64()).ulong()\nend\n\nfun clz(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.ctlz.i32\"(this.u32(), false).ulong()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), false).ulong()\nend\n\nfun ctz(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.cttz.i32\"(this.u32(), false).ulong()"} +{"id": "Pony/builtin-I16-_0.txt", "contents": "\n\n\n\n\n\n\nI16\u00b6\n[Source]\nprimitive val I16 is\nSignedInteger[I16 val, U16 val] val\n\nImplements\u00b6\n\nSignedInteger[I16 val, U16 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/collections-Reverse-_4.txt", "contents": "\n\nrewind\u00b6\n[Source]\nfun ref rewind()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/capsicum-Cap-_36.txt", "contents": "fun box pdwait()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npdkill\u00b6\n[Source]\nfun box pdkill()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nexattr_delete\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_68.txt", "contents": "\nfun ref i128_le(): I128 ? =>\n\"\"\"\nGet a little-endian I128.\n\"\"\"\nu128_le()?.i128()\n\nfun ref f32_be(): F32 ? =>\n\"\"\"\nGet a big-endian F32.\n\"\"\"\nF32.from_bits(u32_be()?)\n\nfun ref f32_le(): F32 ? =>\n\"\"\"\nGet a little-endian F32.\n\"\"\"\nF32.from_bits(u32_le()?)\n\nfun ref f64_be(): F64 ? =>"} +{"id": "Pony/builtin-U8-_18.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: U8 val)\n: (U8 val , U8 val) ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_17.txt", "contents": "I128 val\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nmul_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-set-_14.txt", "contents": "end\nend\ns'\n\nfun eq(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturn true if this and that contain the same elements.\n\"\"\"\n(size() == that.size()) and (this <= that)\n\nfun lt(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturn true if every element in this is also in that, and this has fewer\nelements than that.\n\"\"\"\n(size() < that.size()) and (this <= that)\n\nfun le(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturn true if every element in this is also in that."} +{"id": "Pony/builtin-U32-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/builtin-I16-_13.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-property_unit_test-_16.txt", "contents": "h.dispose_when_done(property_runner)\nproperty_runner.run()\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_37.txt", "contents": "=>\nmatch default'\n| None => (typ', false, true)\n| let d: _Value => (typ', d, false)\nend\n\nnew val bool(\nname': String,\ndescr': String = \"\",\nshort': (U8 | None) = None,\ndefault': (Bool | None) = None)\n=>\n\"\"\"\nCreates an Option with a Bool typed value that can be used like\n`--opt` or `-O` or `--opt=true` or `-O=true`\nto yield an option value like\n`cmd.option(\"opt\").bool() == true`.\n\"\"\"\n_name = name'\n_descr = descr'"} +{"id": "Pony/src-itertools-iter-_72.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.cycle()\n```\n`1 2 3 1 2 3 1 2 3 ...`\n\"\"\"\nlet store = Array[A!]\nIter[A!](\nobject is Iterator[A!]\nlet _store: Array[A!] = store\nvar _store_iter: ArrayValues[A!, Array[A!]] = store.values()\nvar _first_time_through: Bool = true\n\nfun ref has_next(): Bool => true\n\nfun ref next(): A! ? =>\nif _first_time_through then\nif _iter.has_next() then"} +{"id": "Pony/src-process-_process-_40.txt", "contents": "fun stopsig(wstatus: I32): I32 =>\nexit_code(wstatus)\n\nfun coredumped(wstatus: I32): Bool =>\n(wstatus and 0x80) != 0\n\nfun continued(wstatus: I32): Bool =>\nwstatus == 0xffff\n\n\nclass _ProcessWindows is _Process\nlet h_process: USize\nlet process_error: (ProcessError | None)\nvar final_wait_result: (_WaitResult | None) = None\n\nnew create(\npath: String,\nargs: Array[String] val,\nvars: Array[String] val,\nwdir: (FilePath | None),"} +{"id": "Pony/src-pony_check-property_runner-_27.txt", "contents": "for looping.\n\"\"\"\nlet _prop1: Property1[T]\nlet _params: PropertyParams\nlet _rnd: Randomness\nlet _notify: PropertyResultNotify\nlet _gen: Generator[T]\nlet _logger: PropertyLogger\nlet _env: Env\n\n// state changed during runtime\nvar _current_round: _Round = _Run.create(0)\n\"\"\"\nThe number and kind of the round currently executed.\nKeep track of which runs/shrinks we expect to be notified about.\n\"\"\"\nlet _expected_actions: Set[String] = Set[String]\n\"\"\"\nList of expected actions for this round.\nWill be cleared after each round."} +{"id": "Pony/collections-HashSet-_16.txt", "contents": "\nHashSet[this->A!, K] ref^\n\n\neq\u00b6\n[Source]\nReturns true if the sets contain the same elements.\nfun box eq(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/builtin-Comparable-_3.txt", "contents": "Bool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\nBool val\n\n\ncompare\u00b6\n[Source]"} +{"id": "Pony/format-Format-_6.txt", "contents": "FormatFix val | FormatFixLarge val | FormatGeneral val |\nFormatGeneralLarge val) = reference\nprefix: (PrefixDefault val | PrefixSpace val | PrefixSign val) = reference\nprec: USize val = 6\nwidth: USize val = 0\nalign: (AlignLeft val | AlignRight val | AlignCenter val) = reference\nfill: U32 val = 32\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Format val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/6_errors_7.txt", "contents": "# With blocks\n\nA `with` expression can be used to ensure disposal of an object when it is no longer needed. A common case is a database connection which needs to be closed after use to avoid resource leaks on the server. For example:\n\n```pony\nwith obj = SomeObjectThatNeedsDisposing() do\n// use obj\nend\n```\n\n`obj.dispose()` will be called whether the code inside the `with` block completes successfully or raises an error. To take part in a `with` expression, the object that needs resource clean-up must, therefore, provide a `dispose()` method:\n\n```pony\nclass SomeObjectThatNeedsDisposing\n// constructor, other functions\n\nfun dispose() =>\n// release resources\n```\n"} +{"id": "Pony/builtin-U64-_38.txt", "contents": "fun box op_not()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Nil-_15.txt", "contents": "Returns\u00b6\n\nNil[A] val\n\n\ndrop_while\u00b6\n[Source]\nThere are no elements to drop from the empty list.\nfun box drop_while(\nf: {(val->A): Bool}[A] box)\n: Nil[A] val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nNil[A] val\n"} +{"id": "Pony/cli-CommandSpec-_8.txt", "contents": "[Source]\nfun box is_leaf()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nis_parent\u00b6\n[Source]\nfun box is_parent()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nhelp_name\u00b6"} +{"id": "Pony/src-random-xorshift-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41class XorShift128Plus is Random\n\"\"\"\nThis is an implementation of xorshift+, as detailed at:\n\nhttp://xoroshiro.di.unimi.it\n\nThis should only be used for legacy applications that specifically require\nXorShift128Plus, otherwise use Rand.\n\"\"\"\nvar _x: U64\nvar _y: U64"} +{"id": "Pony/5_methods_1.txt", "contents": "# Functions\n\nPony functions are quite like functions (or methods) in other languages. They can have 0 or more parameters and 0 or 1 return values. If the return type is omitted then the function will have a return value of `None`.\n\n```pony\nclass C\nfun add(x: U32, y: U32): U32 =>\nx + y\n\nfun nop() =>\nadd(1, 2) // Pointless, we ignore the result\n```\n\nThe function parameters (if any) are specified in parentheses after the function name. Functions that don't take any parameters still need to have the parentheses.\n\nEach parameter is given a name and a type. In our example function `add` has 2 parameters, `x` and `y`, both of which are type `U32`. The values passed to a function call (the `1` and `2` in our example) are called arguments and when the call is made they are evaluated and assigned to the parameters. Parameters may not be assigned to within the function - they are effectively declared `let`.\n\nAfter the parameters comes the return type. If nothing will be returned this is simply omitted.\n\nAfter the return value, there's a `=>` and then finally the function body. The value returned is simply the value of the function body (remember that everything is an expression), which is simply the value of the last command in the function."} +{"id": "Pony/src-cli-command_parser-_29.txt", "contents": ": (Array[Option] | SyntaxError)\n=>\n\"\"\"\nif 'O' requires an argument\n-OFoo => -O has argument Foo\n-O=Foo => -O has argument Foo\n-O Foo => -O has argument Foo\nelse\n-O=Foo => -O has argument foo\n-abc => options a, b, c.\n-abcFoo => options a, b, c. c has argument Foo iff its arg is required.\n-abc=Foo => options a, b, c. c has argument Foo.\n-abc Foo => options a, b, c. c has argument Foo iff its arg is required.\n\"\"\"\nlet parts = token.split(\"=\", 2)\nlet shorts = (try parts(0)? else \"\" end).clone()\nvar targ = try parts(1)? else None end\n\nlet options: Array[Option] ref = options.create()\nwhile shorts.size() > 0 do"} +{"id": "Pony/src-collections-hashable-_9.txt", "contents": "Calculate the hash of some type. This is an alias of the type parameter to\nallow data structures to hash things without consuming them.\n\"\"\"\n\nfun eq(x: box->A!, y: box->A!): Bool\n\"\"\"\nDetermine equality between two keys with the same hash. This is done with\nviewpoint adapted aliases to allow data structures to determine equality\nin a box fun without consuming keys.\n\"\"\"\n\nprimitive HashEq[A: (Hashable #read & Equatable[A] #read)] is HashFunction[A]\nfun hash(x: box->A): USize =>\n\"\"\"\nUse the hash function from the type parameter.\n\"\"\"\nx.hash()\n\nfun eq(x: box->A, y: box->A): Bool =>\n\"\"\""} +{"id": "Pony/examples_15.txt", "contents": "# How to modify a lexically captured variable in a closure\n\n```pony\nactor Main\nfun foo(n:U32): {ref(U32): U32} =>\nvar s: Array[U32] = Array[U32].init(n, 1)\n{ref(i:U32)(s): U32 =>\ntry\ns(0)? = s(0)? + i\ns(0)?\nelse\n0\nend\n}\n\nnew create(env:Env) =>\nvar f = foo(5)\nenv.out.print(f(10).string())\nenv.out.print(f(20).string())\n```\n"} +{"id": "Pony/src-pony_test-pony_test-_26.txt", "contents": " PonyTest package\n\nThe PonyTest package provides a unit testing framework. It is designed to be as\nsimple as possible to use, both for the unit test writer and the user running\nthe tests.\n\nTo help simplify test writing and distribution this package depends on as few\nother packages as possible. Currently the required packages are:\n\n* builtin\n* time\n* collections\n\nEach unit test is a class, with a single test function. By default all tests\nrun concurrently.\n\nEach test run is provided with a helper object. This provides logging and\nassertion functions. By default log messages are only shown for tests that\nfail.\n"} +{"id": "Pony/src-net-udp_socket-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-ILong-_53.txt", "contents": "\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_47.txt", "contents": "\nA\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/4_traits-and-interfaces_1.txt", "contents": "# Nominal subtyping\n\nThis kind of subtyping is called __nominal__ because it is all about __names__.\n\nIf you've done object-oriented programming before, you may have seen a lot of discussion about _single inheritance_, _multiple inheritance_, _mixins_, _traits_, and similar concepts. These are all examples of __nominal subtyping__.\n\nThe core idea is that you have a type that declares it has a relationship to some category type. In Java, for example, a __class__ (a concrete type) can __implement__ an __interface__ (a category type). In Java, this means the class is now in the category that the interface represents. The compiler will check that the class actually provides everything it needs to.\n\nIn Pony, nominal subtyping is done via the keyword `is`. `is` declares at the point of declaration that an object has a relationship to a category type. For example, to use nominal subtyping to declare that the class `Name` provides `Stringable`, you'd do:\n\n```pony\nclass Name is Stringable\n```\n"} +{"id": "Pony/collections-List-_11.txt", "contents": ": this->A ?\n\nParameters\u00b6\n\ni: USize val = 0\n\nReturns\u00b6\n\nthis->A ?\n\n\nupdate\u00b6\n[Source]\nChange the i-th element, raising an error if the index is out of bounds, and\nreturning the previous value.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.update(1, \"z\")? end // Returns \"b\" and List now contains [\"a\"; \"z\"; \"c\"]\n\nfun ref update(\ni: USize val,"} +{"id": "Pony/src-pony_bench-pony_bench-_16.txt", "contents": "if _bench_q.size() > 0 then\ntry\nmatch _bench_q.shift()?\n| (let b: MicroBenchmark, let overhead: Bool) =>\n_RunSync(this, consume b, overhead)\n| (let b: AsyncMicroBenchmark, let overhead: Bool) =>\n_RunAsync(this, consume b, overhead)\nend\nend\nelse\n_running = false\nend\n\nbe _complete(results: _Results) =>\n_output_manager(consume results)\n_next_benchmark()\n\nbe _fail(name: String) =>\n_env.err.print(\"Failed benchmark: \" + name)\n_env.exitcode(1)"} +{"id": "Pony/src-net-ossockopt-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-real-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/capsicum-Cap-_25.txt", "contents": "fun box getsockname()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ngetsockopt\u00b6\n[Source]\nfun box getsockopt()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nlisten\u00b6\n[Source]"} +{"id": "Pony/cli-OptionSpec-_7.txt", "contents": "\n\nstring_seq\u00b6\n[Source]\nCreates an Option with a ReadSeq[String] typed value that can be used like\n--files=file1 --files=files2 --files=files2\nto yield a sequence of three strings equivalent to\ncmd.option(\"ratio\").string_seq() (equiv) [\"file1\"; \"file2\"; \"file3\"].\nnew val string_seq(\nname': String val,\ndescr': String val = \"\",\nshort': (U8 val | None val) = reference)\n: OptionSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference\n"} +{"id": "Pony/src-files-file_info-_12.txt", "contents": "\nnew val _descriptor(fd: I32, path: FilePath) ? =>\n\"\"\"\nThis will raise an error if the FileStat capability isn't available or the\nfile descriptor is invalid.\n\"\"\"\nif not path.caps(FileStat) or (fd == -1) then\nerror\nend\n\nfilepath = path\n\nlet fstat =\n@pony_os_fstat(fd, path.path.cstring(), this)\nif not fstat then error end\n\nnew val _relative(fd: I32, path: FilePath, from: String) ? =>\nif not path.caps(FileStat) or (fd == -1) then\nerror\nend"} +{"id": "Pony/capsicum-Cap-_11.txt", "contents": "fun box lookup()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchdir\u00b6\n[Source]\nfun box fchdir()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchflags\u00b6\n[Source]"} +{"id": "Pony/calling-c_1.txt", "contents": "# Safely does it\n\n__It is VERY important that when calling FFI functions you MUST get the parameter and return types right__. The compiler has no way to know what the native code expects and will just believe whatever you do. Errors here can cause invalid data to be passed to the FFI function or returned to Pony, which can lead to program crashes.\n\nTo help avoid bugs, Pony requires you to specify the type signatures of FFI functions in advance. While the compiler will trust that you specify the correct types in the signature, it will check the arguments you provide at each FFI call site against the declared signature. This means that you must get the types right only once, in the declaration. A declaration won't help you if the argument types the native code expects are different to what you think they are, but it will protect you against trivial mistakes and simple typos.\n\nHere's an example of an FFI signature and call from the standard library:\n\n```pony\nuse @_mkdir[I32](dir: Pointer[U8] tag) if windows\nuse @mkdir[I32](path: Pointer[U8] tag, mode: U32) if not windows\n\nclass val FilePath\nfun val mkdir(must_create: Bool = false): Bool =>\n// ...\nlet r = ifdef windows then\n@_mkdir(element.cstring())\nelse\n@mkdir(element.cstring(), 0x1FF)\nend"} +{"id": "Pony/src-files-directory-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/time-Timers-_0.txt", "contents": "\n\n\n\n\n\n\nTimers\u00b6\n[Source]\nA hierarchical set of timing wheels.\nactor tag Timers is\nAsioEventNotify tag\n\nImplements\u00b6\n\nAsioEventNotify tag\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/builtin-Real-_5.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-UnsignedInteger-_29.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-real-_36.txt", "contents": "712\n713\n714\n715\n716trait val _ArithmeticConvertible\nfun i8(): I8 => compile_intrinsic\nfun i16(): I16 => compile_intrinsic\nfun i32(): I32 => compile_intrinsic\nfun i64(): I64 => compile_intrinsic\nfun i128(): I128 => compile_intrinsic\nfun ilong(): ILong => compile_intrinsic\nfun isize(): ISize => compile_intrinsic\n\nfun u8(): U8 => compile_intrinsic\nfun u16(): U16 => compile_intrinsic\nfun u32(): U32 => compile_intrinsic\nfun u64(): U64 => compile_intrinsic\nfun u128(): U128 => compile_intrinsic\nfun ulong(): ULong => compile_intrinsic\nfun usize(): USize => compile_intrinsic"} +{"id": "Pony/net-UDPNotify-_0.txt", "contents": "\n\n\n\n\n\n\nUDPNotify\u00b6\n[Source]\nNotifications for UDP connections.\nFor an example of using this class please see the documentatoin for the\nUDPSocket actor.\ninterface ref UDPNotify\n\nPublic Functions\u00b6\nlistening\u00b6\n[Source]\nCalled when the socket has been bound to an address.\nfun ref listening(\nsock: UDPSocket ref)"} +{"id": "Pony/files-File-_8.txt", "contents": "write\u00b6\n[Source]\nReturns false if the file wasn't opened with write permission.\nReturns false and closes the file if not all the bytes were written.\nfun ref write(\ndata: (String box | Array[U8 val] box))\n: Bool val\n\nParameters\u00b6\n\ndata: (String box | Array[U8 val] box)\n\nReturns\u00b6\n\nBool val\n\n\nwritev\u00b6\n[Source]\nWrite an iterable collection of ByteSeqs."} +{"id": "Pony/collections-RingBuffer-_5.txt", "contents": "[Source]\nClear the queue.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file_info-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-buffered-reader-_54.txt", "contents": "end\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed\nu8()?.u16() or (u8()?.u16() << 8)\nend\nelse\nerror\nend\n\nfun ref i16_be(): I16 ? =>"} +{"id": "Pony/random-Random-_8.txt", "contents": "fun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nA random integer in [-2^63, 2^63)\nfun ref i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6"} +{"id": "Pony/src-builtin-string-_146.txt", "contents": "let split_array: Array[String] = original.split(delimiter)\nenv.out.print(\"OUTPUT:\")\nfor value in split_array.values() do\nenv.out.print(value)\nend\n\n// OUTPUT:\n// name\n// job\n// department\n```\n\nAdjacent delimiters result in a zero length entry in the array. For\nexample, `\"1,,2\".split(\",\") => [\"1\", \"\", \"2\"]`.\n\nIf you want to split the string with the entire delimiter string `delim`,\nuse [`split_by`](#split_by).\n\"\"\"\nlet result = recover Array[String] end\n"} +{"id": "Pony/src-pony_check-property_runner-_0.txt", "contents": "\n\n\n\n\n\n\nproperty_runner.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_498.txt", "contents": "fun box so_listenqlimit()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_lock_filter\u00b6\n[Source]\nfun box so_lock_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_mark\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_28.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/cli-CommandParser-_0.txt", "contents": "\n\n\n\n\n\n\nCommandParser\u00b6\n[Source]\nclass ref CommandParser\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreates a new parser for a given command spec.\nnew box create(\nspec': CommandSpec box)\n: CommandParser box^\n\nParameters\u00b6"} +{"id": "Pony/src-backpressure-backpressure-_9.txt", "contents": "let _out: OutStream\n\nnew iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>\n_auth = auth\n_out = out\n\nfun ref throttled(connection: TCPConnection ref) =>\n_out.print(\"Experiencing backpressure!\")\nBackpressure.apply(_auth)\n\nfun ref unthrottled(connection: TCPConnection ref) =>\n_out.print(\"Releasing backpressure!\")\nBackpressure.release(_auth)\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nlet socket = TCPConnection(TCPConnectAuth(env.root),"} +{"id": "Pony/builtin-Array-_17.txt", "contents": "\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->A ?\n\n\nupdate_u8[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nWrite a U8 at offset. This is only allowed for an array of U8s.\nfun ref update_u8[optional B: (A & Real[B] val & U8 val)](\noffset: USize val,\nvalue: U8 val)\n: U8 val ?\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-float-_47.txt", "contents": "fun mod_unsafe(y: F64): F64 =>\nlet r = this %~ y\nif r == F64(0.0) then\nr.copysign(y)\nelseif (r > 0) xor (y > 0) then\nr + y\nelse\nr\nend\n\nfun finite(): Bool =>\n\"\"\"\nCheck whether this number is finite, ie not +/-infinity and not NaN.\n\"\"\"\n// True if exponent is not all 1s\n(bits() and 0x7FF0_0000_0000_0000) != 0x7FF0_0000_0000_0000\n\nfun infinite(): Bool =>\n\"\"\"\nCheck whether this number is +/-infinity"} +{"id": "Pony/builtin-Array-_8.txt", "contents": "\nArray[A] ref^\n\n\nPublic Functions\u00b6\ncpointer\u00b6\n[Source]\nReturn the underlying C-style pointer.\nfun box cpointer(\noffset: USize val = 0)\n: Pointer[A] tag\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nPointer[A] tag\n"} +{"id": "Pony/src-collections-list-_50.txt", "contents": "in opposite sequential orders.\n\nAs you would expect. functions are provided to perform all the common list operations such as\ncreation, traversal, node addition and removal, iteration, mapping, filtering, etc.\n"} +{"id": "Pony/src-pony_check-property_helper-_28.txt", "contents": "predicate: Bool,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n=>\n\"\"\"\nAssert that the given expression is false.\n\"\"\"\nif predicate then\n_fail(_fmt_msg(loc, \"Assert false failed. \" + msg))\nreturn false\nend\n_runner.log(_fmt_msg(loc, \"Assert false passed. \" + msg))\ntrue\n\nfun assert_true(\npredicate: Bool,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val"} +{"id": "Pony/src-files-path-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-Seq-_8.txt", "contents": "Add len elements to the end of the list, starting from the given\noffset.\nfun ref append(\nseq: (ReadSeq[A] box & ReadElement[A^] box),\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n\nseq: (ReadSeq[A] box & ReadElement[A^] box)\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nconcat\u00b6"} +{"id": "Pony/src-collections-reverse-_3.txt", "contents": "52\n53class Reverse[A: (Real[A] val & Number) = USize] is Iterator[A]\n\"\"\"\nProduces a decreasing range [max, min] with step `dec`, for any `Number` type.\n(i.e. the reverse of `Range`)\n\nExample program:\n\n```pony\nuse \"collections\"\nactor Main\nnew create(env: Env) =>\nfor e in Reverse(10, 2, 2) do\nenv.out.print(e.string())\nend\n```\nWhich outputs:\n```\n10\n8"} +{"id": "Pony/ponytest_2.txt", "contents": "class iso _TestAdd is UnitTest\nfun name(): String => \"addition\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](4, 2 + 2)\n\nclass iso _TestSub is UnitTest\nfun name(): String => \"subtraction\"\n\nfun apply(h: TestHelper) =>\nh.assert_eq[U32](2, 4 - 2)\n```\n\nThe make() constructor is not needed for this example. However, it allows for easy aggregation of tests (see below) so it is recommended that all test Mains provide it.\n\nMain.create() is called only for program invocations on the current package. Main.make() is called during aggregation. If so desired extra code can be added to either of these constructors to perform additional tasks.\n"} +{"id": "Pony/cli-CommandSpec-_5.txt", "contents": "\nNone val ?\n\n\nname\u00b6\n[Source]\nReturns the name of this command.\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ndescr\u00b6\n[Source]\nReturns the description for this command.\nfun box descr()\n: String val"} +{"id": "Pony/builtin--index-_3.txt", "contents": "type Number\ninterface OutStream\nprimitive Platform\nstruct Pointer\ninterface ReadElement\ninterface ReadSeq\ntrait Real\nstruct RuntimeOptions\ninterface Seq\ntype Signed\ntrait SignedInteger\ninterface SourceLoc\nactor StdStream\nactor Stdin\nclass String\nclass StringBytes\nclass StringRunes\ninterface Stringable\nprimitive U128\nprimitive U16"} +{"id": "Pony/collections-HashSet-_10.txt", "contents": "remove\u00b6\n[Source]\nRemove everything that is in that.\nfun ref remove(\nthat: Iterator[box->A!] ref)\n: None val\n\nParameters\u00b6\n\nthat: Iterator[box->A!] ref\n\nReturns\u00b6\n\nNone val\n\n\nadd[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nAdd a value to the set.\nfun box add[optional K: HashFunction[this->A!] val]("} +{"id": "Pony/src-net-tcp_connection-_59.txt", "contents": "1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191"} +{"id": "Pony/src-format-format_spec-_3.txt", "contents": "primitive FormatHexSmall is FormatSpec\nprimitive FormatHexSmallBare is FormatSpec\n\ntype FormatInt is\n( FormatDefault\n| FormatUTF32\n| FormatBinary\n| FormatBinaryBare\n| FormatOctal\n| FormatOctalBare\n| FormatHex\n| FormatHexBare\n| FormatHexSmall\n| FormatHexSmallBare )\n\nprimitive FormatExp is FormatSpec\nprimitive FormatExpLarge is FormatSpec\nprimitive FormatFix is FormatSpec\nprimitive FormatFixLarge is FormatSpec\nprimitive FormatGeneral is FormatSpec"} +{"id": "Pony/src-files-path-_31.txt", "contents": "try\nif is_sep(path(path.size()-1)?) then\nif is_sep(next_path(0)?) then\nreturn clean(path + next_path.trim(1))\nelse\nreturn clean(path + next_path)\nend\nend\nend\nclean(path + sep() + next_path)\nend\n\nfun clean(path: String): String =>\n\"\"\"\nReplace multiple separators with a single separator.\nConvert / to the OS separator.\nRemove instances of . from the path.\nRemove instances of .. and the preceding path element from the path.\nThe result will have no trailing slash unless it is a root directory.\nIf the result would be empty, \".\" will be returned instead."} +{"id": "Pony/net-OSSockOpt-_416.txt", "contents": "fun box sctp_pcb_flags_accepting()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_adaptationevnt\u00b6\n[Source]\nfun box sctp_pcb_flags_adaptationevnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_assoc_resetevnt\u00b6\n[Source]"} +{"id": "Pony/bureaucracy--index-_1.txt", "contents": "\nactor Custodian\nactor Registrar\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-_process-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/object-capabilities_3.txt", "contents": "# How does this help?\n\nInstead of having permissions lists, access control lists, or other forms of security, the object-capabilities model means that if you have a reference to an object, you can do things with that object. Simple and effective.\n\nThere's a great paper on how the object-capability model works, and it's pretty easy reading:\n\n[Capability Myths Demolished](http://srl.cs.jhu.edu/pubs/SRL2003-02.pdf)\n"} +{"id": "Pony/cli-Arg-_2.txt", "contents": "ArgSpec val\n\n\nbool\u00b6\n[Source]\nReturns the arg value as a Bool, defaulting to false.\nfun box bool()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nstring\u00b6\n[Source]\nReturns the arg value as a String, defaulting to empty.\nfun box string()\n: String val\n"} +{"id": "Pony/src-term-readline-_21.txt", "contents": "let _out: OutStream\nlet _path: (FilePath | None)\nembed _history: Array[String]\nembed _queue: Array[String] = Array[String]\nlet _maxlen: USize\n\nvar _edit: String iso = recover String end\nvar _cur_prompt: String = \"\"\nvar _cur_line: USize = 0\nvar _cur_pos: ISize = 0\nvar _blocked: Bool = true\n\nnew iso create(\nnotify: ReadlineNotify iso,\nout: OutStream,\npath: (FilePath | None) = None,\nmaxlen: USize = 0)\n=>\n\"\"\"\nCreate a readline handler to be passed to stdin. It begins blocked. Set an"} +{"id": "Pony/builtin-U32-_11.txt", "contents": "fun box addc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_125.txt", "contents": "system call's `sockopt_len_t *` 5th argument.\n\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of `errno`.\n2. An undefined value that must be ignored.\n\nUsage example:\n\n```pony\n// connected() is a callback function for class TCPConnectionNotify\nfun ref connected(conn: TCPConnection ref) =>\nmatch conn.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)\n| (0, let gbytes: Array[U8] iso) =>\ntry\nlet br = Reader.create().>append(consume gbytes)\nifdef littleendian then\nlet buffer_size = br.u32_le()?\nelse\nlet buffer_size = br.u32_be()?\nend"} +{"id": "Pony/net-OSSockOpt-_480.txt", "contents": "fun box so_broadcast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_bsdcompat\u00b6\n[Source]\nfun box so_bsdcompat()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_bsp_state\u00b6\n[Source]"} +{"id": "Pony/random-Random-_1.txt", "contents": "new ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: Random ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nRandom ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nIf used as an iterator, this always has another value.\nfun tag has_next()"} +{"id": "Pony/builtin-Platform-_10.txt", "contents": "Bool val\n\n\nruntimestats\u00b6\n[Source]\nfun box runtimestats()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nruntimestatsmessages\u00b6\n[Source]\nfun box runtimestatsmessages()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ULong-_40.txt", "contents": "fun box mul(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: ULong val)\n: ULong val\n\nParameters\u00b6"} +{"id": "Pony/src-itertools-iter-_83.txt", "contents": "else\nfalse\nend\nelse\nfalse\nend\nend\n\nfun ref next(): B ? =>\nif _iterb.has_next() then\n_iterb.next()?\nelse\n_iterb = f(_iter.next()?)?\nnext()?\nend\nend)\n\nfun ref fold[B](acc: B, f: {(B, A!): B^} box): B^ =>\n\"\"\"\nApply a function to every element, producing an accumulated value."} +{"id": "Pony/src-cli-command_help-_19.txt", "contents": "for c in cols.values() do\n(let c0, let c1, _) = c\nlet c1s = c0 + c1.size()\nif c1s > widest then\nwidest = c1s\nend\nend\nfor c in cols.values() do\n(let c0, let c1, let c2) = c\nindent(w, 1 + c0)\nw.write(c1)\nindent(w, (widest - c1.size()) + 2)\nw.write(c2 + \"\\n\")\nend\n\n\n\n\n\n"} +{"id": "Pony/keywords_3.txt", "contents": "| `val` | reference capability \u2013 globally immutable object |\n| `where` | when specifying named arguments |\n| `while` | loop statement |\n| `with` | ensure disposal of an object |\n"} +{"id": "Pony/src-time-timers-_16.txt", "contents": "_event = AsioEvent.none()\nend\nend\n\nfun ref _fire(timer: Timer) =>\n\"\"\"\nFire a timer if necessary, then schedule it on the correct timing wheel\nbased on how long it is until it expires.\n\"\"\"\nif not timer._fire(_current) then\ntry\n_map.remove(timer)?\nend\nreturn\nend\n\ntry\nlet rem = timer._next() - _current\n_get_wheel(rem)?.schedule(consume timer)\nend"} +{"id": "Pony/promises-Promise-_9.txt", "contents": "rejected: Reject[Promise[B] tag] iso = qualify\n\nReturns\u00b6\n\nPromise[B] tag\n\n\nadd[optional B: Any #share]\u00b6\n[Source]\nAdd two promises into one promise that returns the result of both when\nthey are fulfilled. If either of the promises is rejected then the new\npromise is also rejected.\nfun tag add[optional B: Any #share](\np: Promise[B] tag)\n: Promise[(A , B)] tag\n\nParameters\u00b6\n\np: Promise[B] tag\n"} +{"id": "Pony/src-process-_process-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/buffered-Reader-_6.txt", "contents": "\nn: USize val\n\nReturns\u00b6\n\nNone val ?\n\n\nblock\u00b6\n[Source]\nReturn a block as a contiguous chunk of memory.\nWill throw an error if you request a block larger than what is currently\nstored in the Reader.\nfun ref block(\nlen: USize val)\n: Array[U8 val] iso^ ?\n\nParameters\u00b6\n\nlen: USize val"} +{"id": "Pony/net-TCPListenNotify-_2.txt", "contents": "listen: TCPListener ref)\n: None val\n\nParameters\u00b6\n\nlisten: TCPListener ref\n\nReturns\u00b6\n\nNone val\n\n\nclosed\u00b6\n[Source]\nCalled when the listener is closed.\nfun ref closed(\nlisten: TCPListener ref)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-sort-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-collections-ring_buffer-_8.txt", "contents": "Clear the queue.\n\"\"\"\n_array.clear()\n_write = 0\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-map-_30.txt", "contents": "return _array(i)? as (_, V)\nelse\nlet key' = key\n\n_array(i)? = (consume key, consume value)\n_size = _size + 1\n\nif (_size * 4) > (_array.size() * 3) then\n_resize(_array.size() * 2)\nend\nend\n\nvalue'\nelse\n// This is unreachable, since index will never be out-of-bounds\nvalue'\nend\n\nfun ref insert(key: K, value: V): V! =>\n\"\"\""} +{"id": "Pony/src-builtin-real-_38.txt", "contents": "Unsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun i64_unsafe(): I64 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun i128_unsafe(): I128 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\ncompile_intrinsic\n\nfun ilong_unsafe(): ILong =>"} +{"id": "Pony/src-builtin-unsigned-_49.txt", "contents": "fun ctz_unsafe(): U8 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i8\"(this, true)\n\nfun bitwidth(): U8 => 8\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: U8): U8 => if this < y then this else y end\nfun max(y: U8): U8 => if this > y then this else y end\n\nfun addc(y: U8): (U8, Bool) =>\n@\"llvm.uadd.with.overflow.i8\"(this, y)\n\nfun subc(y: U8): (U8, Bool) =>\n@\"llvm.usub.with.overflow.i8\"(this, y)\n"} +{"id": "Pony/builtin-U32-_35.txt", "contents": "U32 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/collections-HashSet-_23.txt", "contents": ": SetValues[A, H, this->HashSet[A, H] ref] ref^\n\nReturns\u00b6\n\nSetValues[A, H, this->HashSet[A, H] ref] ref^\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: HashSet[A, H] box)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)"} +{"id": "Pony/pony_bench--index-_1.txt", "contents": "\nfun tag benchmarks(bench: PonyBench) =>\nbench(_Nothing)\nbench(_Fib(5))\nbench(_Fib(10))\nbench(_Fib(20))\nbench(_Timer(10_000))\n\nclass iso _Nothing is MicroBenchmark\n// Benchmark absolutely nothing.\nfun name(): String => \"Nothing\"\n\nfun apply() =>\n// prevent compiler from optimizing out this operation\nDoNotOptimise[None](None)\nDoNotOptimise.observe()\n\nclass iso _Fib is MicroBenchmark\n// Benchmark non-tail-recursive fibonacci\nlet _n: U64"} +{"id": "Pony/src-pony_check-poperator-_2.txt", "contents": "\nnew create(seq: Seq[T]) =>\n_seq = seq\n\nnew empty() =>\n_seq = Array[T](0)\n\nfun ref has_next(): Bool =>\n_seq.size() > 0\n\nfun ref next(): T^ ? =>\n_seq.pop()?\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_31.txt", "contents": "612\n613\n614\n615\n616\n617\n618\n619\n620\n621\n622\n623\n624\n625\n626\n627\n628\n629\n630\n631"} +{"id": "Pony/serialise-InputSerialisedAuth-_0.txt", "contents": "\n\n\n\n\n\n\nInputSerialisedAuth\u00b6\n[Source]\nThis is a capability token that allows the holder to treat arbitrary\nbytes as serialised data. This is the most dangerous capability, as currently\nit is possible for a malformed chunk of data to crash your program if it is\ndeserialised.\nprimitive val InputSerialisedAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nauth: AmbientAuth val)"} +{"id": "Pony/callbacks_3.txt", "contents": "# Bare lambdas\n\nBare lambdas are special lambdas defining bare functions. A bare lambda or bare lambda type is specified using the same syntax as other lambda types, with the small variation that it is prefixed with the @ symbol. The underlying value of a bare lambda is equivalent to a C function pointer, which means that a bare lambda can be directly passed as a callback to a C function. The partial application of a bare method yields a bare lambda.\n\n```pony\nlet callback = @{() => ... }\n@setup_callback(callback)\n```\n\nBare lambdas can also be used to define structures containing function pointers. For example:\n\n```pony\nstruct S\nvar fun_ptr: @{()}\n```\n\nThis Pony structure is equivalent to the following C structure:\n\n```c\nstruct S"} +{"id": "Pony/net-TCPConnectionNotify-_8.txt", "contents": "[Source]\nCalled when multiple chunks of data are sent to the connection in a single\ncall. This gives the notifier an opportunity to modify the sent data chunks\nbefore they are written. To swallow the send, return an empty\nArray[String].\nfun ref sentv(\nconn: TCPConnection ref,\ndata: ByteSeqIter val)\n: ByteSeqIter val\n\nParameters\u00b6\n\nconn: TCPConnection ref\ndata: ByteSeqIter val\n\nReturns\u00b6\n\nByteSeqIter val\n\n"} +{"id": "Pony/src-pony_check-generator-_130.txt", "contents": "that._int_shrink[I64](consume i, min)\nend)\n\nfun i128(\nmin: I128 = I128.min_value(),\nmax: I128 = I128.max_value())\n: Generator[I128]\n=>\n\"\"\"\nCreate a generator for I128 values.\n\"\"\"\nlet that = this\nGenerator[I128](\nobject is GenObj[I128]\nfun generate(rnd: Randomness): I128^ =>\nrnd.i128(min, max)\n\nfun shrink(i: I128): ValueAndShrink[I128] =>\nthat._int_shrink[I128](consume i, min)\nend)"} +{"id": "Pony/src-itertools-iter-_111.txt", "contents": "_set.set(v)\nv\nend\nend)\n\nfun ref zip[B](i2: Iterator[B]): Iter[(A, B)]^ =>\n\"\"\"\nZip two iterators together so that each call to next() results in\na tuple with the next value of the first iterator and the next value\nof the second iterator. The number of items returned is the minimum of\nthe number of items returned by the two iterators.\n"} +{"id": "Pony/src-term-ansi_term-_37.txt", "contents": "_notify.page_up(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _page_down() =>\n\"\"\"\nPage down key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.page_down(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _fn_key(i: U8) =>\n\"\"\"\nFunction key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.fn_key(i, ctrl, alt, shift)\n_esc_clear()\n\nfun ref _esc_flush() =>"} +{"id": "Pony/collections-List-_17.txt", "contents": ": None val\n\nParameters\u00b6\n\nnode: ListNode[A] ref\n\nReturns\u00b6\n\nNone val\n\n\nappend_node\u00b6\n[Source]\nAdds a node to the tail of the list.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet new_tail = ListNode[String](\"0\")\nmy_list.append_node(new_head) // [\"a\"; \"b\"; \"c\", \"0\"]\n\nfun ref append_node(\nnode: ListNode[A] ref)"} +{"id": "Pony/builtin-UnsignedInteger-_10.txt", "contents": "\n(A , Bool val)\n\n\nmod_partial\u00b6\n[Source]\nfun box mod_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nmod_unsafe\u00b6"} +{"id": "Pony/src-collections-persistent-list-_41.txt", "contents": "fun take_while(f: {(val->A): Bool} box): Nil[A] =>\n\"\"\"\nThere are no elements to take from the empty list.\n\"\"\"\nthis\n\nfun val contains[T: (A & HasEq[A!] #read) = A](a: val->T): Bool =>\nfalse\n\nclass val Cons[A] is ReadSeq[val->A]\n\"\"\"\nA list with a head and a tail, where the tail can be empty.\n\"\"\"\n\nlet _size: USize\nlet _head: val->A\nlet _tail: List[A] val\n\nnew val create(a: val->A, t: List[A]) =>\n_head = consume a"} +{"id": "Pony/callbacks_7.txt", "contents": "=>\n...\n```\n\n```pony\nuse @sqlite3_exec[I32](db: Pointer[None] tag, sql: Pointer[U8] tag,\ncallback: Pointer[None], data: Pointer[None], err_msg: Pointer[Pointer[U8] tag] tag)\n\nclass SQLiteClient\nfun client_code() =>\n...\nlet lambda_callback =\n@{(client: SQLiteClient, argc: I32, argv: Pointer[Pointer[U8]],\nazColName: Pointer[Pointer[U8]]): I32\n=>\n...\n}\n\n@sqlite3_exec(db, sql.cstring(), lambda_callback, this,\naddressof zErrMsg)"} +{"id": "Pony/src-collections-persistent-list-_51.txt", "contents": "_fold[B](this, f, consume acc)\n\nfun val _fold[B](l: List[A], f: {(B, val->A): B^} box, acc: B): B =>\n\"\"\"\nPrivate helper for fold, recursively working on elements.\n\"\"\"\nmatch l\n| let cons: Cons[A] =>\n_fold[B](cons.tail(), f, f(consume acc, cons.head()))\nelse\nacc\nend\n\nfun val every(f: {(val->A): Bool} box): Bool =>\n\"\"\"\nReturns true if every element satisfies the provided predicate, false\notherwise.\n\"\"\"\n_every(this, f)\n"} +{"id": "Pony/builtin-ULong-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/0_what-you-need_3.txt", "contents": "# The compiler\n\nPony is a _compiled_ language, rather than an _interpreted_ one. In fact, it goes even further: Pony is an _ahead-of-time_ (AOT) compiled language, rather than a _just-in-time_ (JIT) compiled language.\n\nWhat this means is that once you build your program, you can run it over and over again without needing a compiler or a virtual machine or anything else. It's a complete program, all on its own.\n\nBut it also means you need to build your program before you can run it. In an interpreted language or a JIT compiled language, you tend to do things like this to run your program:\n\n```bash\npython helloworld.py\n```\n\nOr maybe you put a __shebang__ in your program (like `#!/usr/bin/env python`), then `chmod` to set the executable bit, and then do:\n\n```bash\n./helloworld.py\n```\n\nWhen you use Pony, you don't do any of that!\n"} +{"id": "Pony/builtin-SignedInteger-_52.txt", "contents": "U64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_0.txt", "contents": "\n\n\n\n\n\n\nunsigned.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-collections-list-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-builtin-string-_141.txt", "contents": "\"\"\"\nvar i: ISize = 0\nvar n: USize = 0\n\ntry\nwhile true do\ni = find(s, i)?\ncut_in_place(i, i + s.size().isize())\nn = n + 1\nend\nend\nn\n\nfun ref replace(from: String box, to: String box, n: USize = 0): USize =>\n\"\"\"\nReplace up to n occurrences of `from` in `this` with `to`. If n is 0, all\noccurrences will be replaced. Returns the count of replaced occurrences.\n\"\"\"\nlet from_len = from.size().isize()\nlet to_len = to.size().isize()"} +{"id": "Pony/src-pony_test-pony_test-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-builtin-float-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_144.txt", "contents": "fun box ipv6_mtu_discover()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_multicast_hops\u00b6\n[Source]\nfun box ipv6_multicast_hops()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_multicast_if\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_89.txt", "contents": "fun ipx_primary():I32 => @pony_os_sockopt_option(I32(222))\nfun ipx_ptype():I32 => @pony_os_sockopt_option(I32(223))\nfun ipx_receive_broadcast():I32 => @pony_os_sockopt_option(I32(224))\nfun ipx_recvhdr():I32 => @pony_os_sockopt_option(I32(225))\nfun ipx_reripnetnumber():I32 => @pony_os_sockopt_option(I32(226))\nfun ipx_route_no_router():I32 => @pony_os_sockopt_option(I32(227))\nfun ipx_rt_8022():I32 => @pony_os_sockopt_option(I32(228))\nfun ipx_rt_bluebook():I32 => @pony_os_sockopt_option(I32(229))\nfun ipx_rt_routed():I32 => @pony_os_sockopt_option(I32(230))\nfun ipx_rt_snap():I32 => @pony_os_sockopt_option(I32(231))\nfun ipx_special_none():I32 => @pony_os_sockopt_option(I32(232))\nfun ipx_spxgetconnectionstatus():I32 => @pony_os_sockopt_option(I32(233))\nfun ipx_stopfilterptype():I32 => @pony_os_sockopt_option(I32(234))\nfun ipx_type():I32 => @pony_os_sockopt_option(I32(235))\nfun ip_add_membership():I32 => @pony_os_sockopt_option(I32(236))\nfun ip_add_source_membership():I32 => @pony_os_sockopt_option(I32(237))\nfun ip_bindany():I32 => @pony_os_sockopt_option(I32(238))\nfun ip_bindmulti():I32 => @pony_os_sockopt_option(I32(239))\nfun ip_bind_address_no_port():I32 => @pony_os_sockopt_option(I32(240))\nfun ip_block_source():I32 => @pony_os_sockopt_option(I32(241))"} +{"id": "Pony/src-builtin-stdin-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/term-Readline-_3.txt", "contents": "\nprompt\u00b6\n[Source]\nSet a new prompt, unblock, and handle the pending queue.\nfun ref prompt(\nterm: ANSITerm ref,\nvalue: String val)\n: None val\n\nParameters\u00b6\n\nterm: ANSITerm ref\nvalue: String val\n\nReturns\u00b6\n\nNone val\n\n\nclosed\u00b6"} +{"id": "Pony/format--index-_2.txt", "contents": "primitive Format\nprimitive FormatBinary\nprimitive FormatBinaryBare\nprimitive FormatDefault\nprimitive FormatExp\nprimitive FormatExpLarge\nprimitive FormatFix\nprimitive FormatFixLarge\ntype FormatFloat\nprimitive FormatGeneral\nprimitive FormatGeneralLarge\nprimitive FormatHex\nprimitive FormatHexBare\nprimitive FormatHexSmall\nprimitive FormatHexSmallBare\ntype FormatInt\nprimitive FormatOctal\nprimitive FormatOctalBare\ntrait FormatSpec\nprimitive FormatUTF32"} +{"id": "Pony/src-collections-list_node-_21.txt", "contents": "_next = None\n| (None, None) =>\n// We're the only member\nlist'._set_head(None)\nlist'._set_tail(None)\nend\n\nlist'._decrement()\n_list = None\nend\n\nfun has_prev(): Bool =>\n\"\"\"\nReturn true if there is a previous node.\n\"\"\"\n_prev isnt None\n\nfun has_next(): Bool =>\n\"\"\"\nReturn true if there is a next node."} +{"id": "Pony/5_methods_17.txt", "contents": "# Privacy\n\nIn Pony, method names start either with a lower case letter or with an underscore followed by a lowercase letter. Methods with a leading underscore are private. This means they can only be called by code within the same package. Methods without a leading underscore are public and can be called by anyone.\n\n__Can I start my method name with 2 (or more) underscores?__ No. If the first character is an underscore then the second one MUST be a lower case letter.\n"} +{"id": "Pony/src-itertools-iter-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/src-process-process_error-_5.txt", "contents": "| WaitpidError\n| WriteError\n| KillError\n| CapError\n| ChdirError\n| UnknownError\n)\n\nprimitive ExecveError\nfun string(): String iso^ => \"ExecveError\".clone()\n\nprimitive PipeError\nfun string(): String iso^ => \"PipeError\".clone()\n\nprimitive ForkError\nfun string(): String iso^ => \"ForkError\".clone()\n\nprimitive WaitpidError\nfun string(): String iso^ => \"WaitpidError\".clone()\n"} +{"id": "Pony/collections-List-_9.txt", "contents": "Public Functions\u00b6\nreserve\u00b6\n[Source]\nDo nothing\nRequired method for List to satisfy the Seq interface.\nfun ref reserve(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\nsize\u00b6\n[Source]"} +{"id": "Pony/src-pony_bench-_runner-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-backpressure-backpressure-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/files-Directory-_14.txt", "contents": "target: String val\natime: (I64 val , I64 val)\nmtime: (I64 val , I64 val)\n\nReturns\u00b6\n\nBool val\n\n\nsymlink\u00b6\n[Source]\nLink the source path to the link_name, where the link_name is relative to\nthis directory.\nfun box symlink(\nsource: FilePath val,\nlink_name: String val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/builtin-String-_14.txt", "contents": "\nUSize val\n\n\ncodepoints\u00b6\n[Source]\nReturns the number of unicode code points in the string between the two\noffsets. Index range [from .. to) is half-open.\nfun box codepoints(\nfrom: ISize val = 0,\nto: ISize val = call)\n: USize val\n\nParameters\u00b6\n\nfrom: ISize val = 0\nto: ISize val = call\n\nReturns\u00b6\n"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_3.txt", "contents": "Returns\u00b6\n\nBenchConfig val\n\n\noverhead\u00b6\n[Source]\nfun box overhead()\n: AsyncMicroBenchmark iso^\n\nReturns\u00b6\n\nAsyncMicroBenchmark iso^\n\n\nbefore\u00b6\n[Source]\nfun ref before(\nc: AsyncBenchContinue val)\n: None val"} +{"id": "Pony/src-pony_test-pony_test-_37.txt", "contents": "# Labels\n\nTest can have label. Labels are used to filter which tests are run, by setting\ncommand line argument `--label=[some custom label]`. It can be used to separate\nunit tests from integration tests.\n\nBy default label is empty. You can set it up by overriding `label(): String`\nmethod in unit test.\n\n```pony\nuse \"pony_test\"\n\nclass iso _I8AddTest is UnitTest\nfun name(): String => \"_I8AddTest\"\nfun label(): String => \"simple\"\nfun apply(h: TestHelper) =>\nh.assert_eq[I8](1, 1)\n\n```\n"} +{"id": "Pony/builtin-ISize-_52.txt", "contents": "\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/pony_check-Property4-_3.txt", "contents": "\n\ngen\u00b6\n[Source]\nfun box gen()\n: Generator[(T1 , T2 , T3 , T4)] box\n\nReturns\u00b6\n\nGenerator[(T1 , T2 , T3 , T4)] box\n\n\nproperty\u00b6\n[Source]\nfun ref property(\narg1: (T1 , T2 , T3 ,\nT4),\nh: PropertyHelper val)\n: None val ?\n"} +{"id": "Pony/src-buffered-reader-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-U64-_42.txt", "contents": "(U64 val , U64 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nneg\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_8.txt", "contents": "fun box ctz_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/src-collections-list_node-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-files-file_path-_23.txt", "contents": "\ninterface WalkHandler\n\"\"\"\nA handler for `FilePath.walk`.\n\"\"\"\nfun ref apply(dir_path: FilePath, dir_entries: Array[String] ref)\n\nclass val FilePath\n\"\"\"\nA FilePath represents a capability to access a path. The path will be\nrepresented as an absolute path and a set of capabilities for operations on\nthat path.\n\"\"\"\nlet path: String\n\"\"\"\nAbsolute filesystem path.\n\"\"\"\nlet caps: FileCaps = FileCaps\n\"\"\"\nSet of capabilities for operations on `path`."} +{"id": "Pony/pony_check-ASCIIAll-_3.txt", "contents": "Returns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/0_literals_8.txt", "contents": "## String Literals and Encodings\n\nString Literals contain the bytes that were read from their source code file. Their actual value thus depends on the encoding of their source.\n\nConsider the following example:\n\n```pony\nlet u_umlaut = \"\u00fc\"\n```\n\nIf the file containing this code is encoded as `UTF-8` the byte-value of `u_umlaut` will be: `\\xc3\\xbc`. If the file is encoded with *ISO-8559-1* (Latin-1) its value will be `\\xfc`.\n"} +{"id": "Pony/src-pony_test-pony_test-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-itertools-iter-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/src-promises-promise-_40.txt", "contents": "Join three existing promises to make a fourth.\n```pony\nuse \"promises\"\n\nactor Main\nnew create(env: Env) =>\n\nlet p1 = Promise[String val]\nlet p2 = Promise[String val]\nlet p3 = Promise[String val]\n\nPromises[String val].join([p1; p2; p3].values())\n.next[None]({(a: Array[String val] val) =>\nfor s in a.values() do\nenv.out.print(s)\nend\n})\n\np2(\"second\")\np3(\"third\")"} +{"id": "Pony/builtin-U16-_14.txt", "contents": "fun box remc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-signed-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/src-collections-map-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-FloatingPoint-_2.txt", "contents": "new val create(\nvalue: A)\n: Real[A] val^\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nReal[A] val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-term-ansi-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303primitive ANSI\n\"\"\"\nThese strings can be embedded in text when writing to a StdStream to create\na text-based UI.\n\"\"\"\nfun up(n: U32 = 0): String =>\n\"\"\"\nMove the cursor up n lines. 0 is the same as 1.\n\"\"\""} +{"id": "Pony/7_equality_2.txt", "contents": "end\n```\n"} +{"id": "Pony/builtin-ISize-_30.txt", "contents": "\nISize val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\ndivrem_unsafe\u00b6"} +{"id": "Pony/net-OSSockOpt-_239.txt", "contents": "fun box ip_rss_listen_bucket()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rsvp_off\u00b6\n[Source]\nfun box ip_rsvp_off()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rsvp_on\u00b6\n[Source]"} +{"id": "Pony/calling-c_16.txt", "contents": "# FFI functions raising errors\n\nSome FFI functions might raise Pony errors. Functions in existing C libraries are very unlikely to do this, but support libraries specifically written for use with Pony may well do.\n\nFFI calls to functions that __might__ raise an error __must__ mark it as such by adding a ? after its declaration. The FFI call site must mark it as well. For example:\n\n```pony\nuse @pony_os_send[USize](event: AsioEventID, buffer: Pointer[U8] tag, size: USize) ?\n// ...\n// May raise an error\n@pony_os_send(_event, data.cpointer(), data.size()) ?\n```\n\nIf you're writing a C library that wants to raise a Pony error, you should do so using the `pony_error` function. Here's an example from the Pony runtime:\n\n```C\n// In pony.h\nPONY_API void pony_error();\n\n// In socket.c"} +{"id": "Pony/builtin-U32-_19.txt", "contents": "(U32 val , U32 val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nshr\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_50.txt", "contents": "992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011"} +{"id": "Pony/src-files-file_lines-_9.txt", "contents": "Returns the next line in the file.\n\"\"\"\nwhile true do\ntry\nreturn _read_line()?\nelse\nif not _fill_buffer() then\n// nothing to read from file, we can savely exit here\nbreak\nend\nend\nend\n_has_next = false\nif _reader.size() > 0 then\n// don't forget the last line\n_read_last_line()?\nelse\n// nothing to return, we can only error here\nerror\nend"} +{"id": "Pony/pony_check-Property2-_4.txt", "contents": "arg1: T1\narg2: T2\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nparams\u00b6"} +{"id": "Pony/promises--index-_1.txt", "contents": "implment the Fulfill and Reject interfaces, or as functions with\nthe same signatures as the apply methods in Fulfill and Reject.\nIn the following code, the fulfillment of the Promise causes the\nexecution of several fulfillment functions. The output is:\nfulfilled + foo\nfulfilled + bar\nfulfilled + baz\n\nuse \"promises\"\n\nclass PrintFulfill is Fulfill[String, String]\nlet _env: Env\nlet _msg: String\nnew create(env: Env, msg: String) =>\n_env = env\n_msg = msg\nfun apply(s: String): String =>\n_env.out.print(\" + \".join([s; _msg].values()))\ns\n"} +{"id": "Pony/random-SplitMix64-_0.txt", "contents": "\n\n\n\n\n\n\nSplitMix64\u00b6\n[Source]\nVery fast Pseudo-Random-Number-Generator\nusing only 64 bit of state, as detailed at:\nhttp://xoshiro.di.unimi.it/ and http://gee.cs.oswego.edu/dl/papers/oopsla14.pdf\nUsing XorOshiro128StarStar or XorOshiro128Plus\nshould be prefered unless using only 64 bit of state is a requirement.\nclass ref SplitMix64 is\nRandom ref\n\nImplements\u00b6\n\nRandom ref"} +{"id": "Pony/src-net-ossockopt-_87.txt", "contents": "fun ipv6_recvpathmtu():I32 => @pony_os_sockopt_option(I32(182))\nfun ipv6_recvpktinfo():I32 => @pony_os_sockopt_option(I32(183))\nfun ipv6_recvrthdr():I32 => @pony_os_sockopt_option(I32(184))\nfun ipv6_recvtclass():I32 => @pony_os_sockopt_option(I32(185))\nfun ipv6_router_alert():I32 => @pony_os_sockopt_option(I32(186))\nfun ipv6_rthdr():I32 => @pony_os_sockopt_option(I32(187))\nfun ipv6_rthdrdstopts():I32 => @pony_os_sockopt_option(I32(188))\nfun ipv6_tclass():I32 => @pony_os_sockopt_option(I32(189))\nfun ipv6_tlv_hao():I32 => @pony_os_sockopt_option(I32(190))\nfun ipv6_tlv_jumbo():I32 => @pony_os_sockopt_option(I32(191))\nfun ipv6_tlv_pad1():I32 => @pony_os_sockopt_option(I32(192))\nfun ipv6_tlv_padn():I32 => @pony_os_sockopt_option(I32(193))\nfun ipv6_tlv_routeralert():I32 => @pony_os_sockopt_option(I32(194))\nfun ipv6_transparent():I32 => @pony_os_sockopt_option(I32(195))\nfun ipv6_unicast_hops():I32 => @pony_os_sockopt_option(I32(196))\nfun ipv6_unicast_if():I32 => @pony_os_sockopt_option(I32(197))\nfun ipv6_use_min_mtu():I32 => @pony_os_sockopt_option(I32(198))\nfun ipv6_v6only():I32 => @pony_os_sockopt_option(I32(199))\nfun ipv6_xfrm_policy():I32 => @pony_os_sockopt_option(I32(200))\nfun ipx_address():I32 => @pony_os_sockopt_option(I32(201))"} +{"id": "Pony/reference-capabilities_4.txt", "contents": "## Immutable data can be safely shared\n\nAny data that is immutable (i.e. it cannot be changed) is safe to use concurrently. Since it is immutable it is never updated and it's the updates that cause concurrency problems.\n"} +{"id": "Pony/src-pony_check-property_helper-_31.txt", "contents": "_runner.log(_fmt_msg(loc, \"Assert no error passed. \" + msg), true)\ntrue\nelse\n_fail(_fmt_msg(loc, \"Assert no error failed. \" + msg))\nfalse\nend\n\nfun assert_is[A](\nexpect: A,\nactual: A,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the 2 given expressions resolve to the same instance.\n\"\"\"\nif expect isnt actual then\n_fail(_fmt_msg(loc, \"Assert is failed. \" + msg\n+ \" Expected (\" + (digestof expect).string() + \") is (\""} +{"id": "Pony/files-Path-_18.txt", "contents": "[Source]\nReturns a pseudo-random base, suitable as a temporary file name or\ndirectory name, but not guaranteed to not already exist.\nfun box random(\nlen: USize val = 6)\n: String val\n\nParameters\u00b6\n\nlen: USize val = 6\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Path val)"} +{"id": "Pony/builtin-String-_18.txt", "contents": "Note that memory is not freed by this operation.\nfun ref truncate(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\ntrim_in_place\u00b6\n[Source]\nTrim the string to a portion of itself, covering from until to.\nUnlike slice, the operation does not allocate a new string nor copy\nelements.\nfun ref trim_in_place("} +{"id": "Pony/src-net-net_address-_15.txt", "contents": "corresponding servicename (e.g. port 80 is returned as `\"http\"`).\n\nInternally this method uses the POSIX C function `getnameinfo`.\n\"\"\"\nvar host: Pointer[U8] iso = recover Pointer[U8] end\nvar serv: Pointer[U8] iso = recover Pointer[U8] end\nlet reverse = reversedns isnt None\n\nif not\n@pony_os_nameinfo(this, addressof host, addressof serv, reverse,\nservicename)\nthen\nerror\nend\n\n(recover String.from_cstring(consume host) end,\nrecover String.from_cstring(consume serv) end)\n\nfun eq(that: NetAddress box): Bool =>\n(this._family == that._family)"} +{"id": "Pony/builtin-String-_13.txt", "contents": "\n\niso_array\u00b6\n[Source]\nReturns an Array[U8] iso that reuses the underlying data pointer.\nfun iso iso_array()\n: Array[U8 val] iso^\n\nReturns\u00b6\n\nArray[U8 val] iso^\n\n\nsize\u00b6\n[Source]\nReturns the length of the string data in bytes.\nfun box size()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/format-FormatExpLarge-_1.txt", "contents": "new val create()\n: FormatExpLarge val^\n\nReturns\u00b6\n\nFormatExpLarge val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatExpLarge val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatExpLarge val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U16-_15.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-std_stream-_8.txt", "contents": "actor StdStream\n\"\"\"\nAsynchronous access to stdout and stderr. The constructors are private to\nensure that access is provided only via an environment.\n\"\"\"\nvar _stream: Pointer[U8]\n\nnew _out() =>\n\"\"\"\nCreate an async stream for stdout.\n\"\"\"\n_stream = @pony_os_stdout()\n\nnew _err() =>\n\"\"\"\nCreate an async stream for stderr.\n\"\"\"\n_stream = @pony_os_stderr()\n\nbe print(data: ByteSeq) =>"} +{"id": "Pony/src-collections-map-_36.txt", "contents": "(_, let found) = _search(k)\nfound\n\nfun ref concat(iter: Iterator[(K^, V^)]) =>\n\"\"\"\nAdd K, V pairs from the iterator to the map.\n\"\"\"\nfor (k, v) in iter do\nthis(consume k) = consume v\nend\n\nfun add[H2: HashFunction[this->K!] val = H](\nkey: this->K!,\nvalue: this->V!)\n: HashMap[this->K!, this->V!, H2]^\n=>\n\"\"\"\nThis with the new (key, value) mapping.\n\"\"\"\nlet r = clone[H2]()"} +{"id": "Pony/src-files-path-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-AmbientAuth-_0.txt", "contents": "\n\n\n\n\n\n\nAmbientAuth\u00b6\n[Source]\nThis type represents the root capability. When a Pony program starts, the\nEnv passed to the Main actor contains an instance of the root capability.\nAmbient access to the root capability is denied outside of the builtin\npackage. Inside the builtin package, only Env creates a Root.\nThe root capability can be used by any package that wants to establish a\nprinciple of least authority. A typical usage is to have a parameter on a\nconstructor for some resource that expects a limiting capability specific to\nthe package, but will also accept the root capability as representing\nunlimited access.\nprimitive val AmbientAuth\n"} +{"id": "Pony/builtin-U64-_13.txt", "contents": "fun box mulc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/pony_check-PropertyHelper-_1.txt", "contents": "give access to the root authority and other stuff.\nclass val PropertyHelper\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nenv': Env val,\nrunner: _IPropertyRunner tag,\nrun_notify: _PropertyRunNotify val,\nrun: (_Shrink val | _Run val),\nparams: String val)\n: PropertyHelper val^\n\nParameters\u00b6\n\nenv': Env val\nrunner: _IPropertyRunner tag\nrun_notify: _PropertyRunNotify val\nrun: (_Shrink val | _Run val)"} +{"id": "Pony/src-signals-sig-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/term-ANSI-_9.txt", "contents": "\n\nblink\u00b6\n[Source]\nBlinking text. Does nothing on Windows.\nfun box blink(\nstate: Bool val = true)\n: String val\n\nParameters\u00b6\n\nstate: Bool val = true\n\nReturns\u00b6\n\nString val\n\n\nreverse\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_49.txt", "contents": "let len = _search_length()?\n\n_available = _available - len\nvar out = recover String(len) end\nvar i = USize(0)\n\nwhile i < len do\nlet node = _chunks.head()?\n(let data, let offset) = node()?\n\nlet avail = data.size() - offset\nlet need = len - i\nlet copy_len = need.min(avail)\n\nout.append(data, offset, copy_len)\n\nif avail > need then\nnode()? = (data, offset + need)\nbreak\nend"} +{"id": "Pony/src-builtin-string-_79.txt", "contents": "1572\n1573\n1574\n1575\n1576\n1577\n1578\n1579\n1580\n1581\n1582\n1583\n1584\n1585\n1586\n1587\n1588\n1589\n1590\n1591"} +{"id": "Pony/src-builtin-string-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/serialise-Serialise-_1.txt", "contents": "\n\nPublic Functions\u00b6\nsignature\u00b6\n[Source]\nReturns a byte array that is unique to this compiled Pony binary, for the\npurposes of comparing before deserialising any data from that source.\nIt is statistically impossible for two serialisation-incompatible Pony\nbinaries to have the same serialise signature.\nfun box signature()\n: Array[U8 val] val\n\nReturns\u00b6\n\nArray[U8 val] val\n\n\neq\u00b6\n[Source]\nfun box eq("} +{"id": "Pony/builtin-AmbientAuth-_1.txt", "contents": "Public Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: AmbientAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: AmbientAuth val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: AmbientAuth val)"} +{"id": "Pony/arrow-types_2.txt", "contents": "# Using a type parameter as a viewpoint\n\nWe haven't covered generics yet, so this may seem a little weird. We'll cover this again when we talk about generics (i.e. parameterised types), but we're mentioning it here for completeness.\n\nAnother time we don't know the precise reference capability of something is if we are using a type parameter. Here's an example from the standard library:\n\n```pony\nclass ListValues[A, N: ListNode[A] box] is Iterator[N->A]\n```\n\nHere, we have a `ListValues` type that has two type parameters, `A` and `N`. In addition, `N` has a constraint: it has to be a subtype of `ListNode[A] box`. That's all fine and well, but we also say the `ListValues[A, N]` provides `Iterator[N->A]`. That's the interesting bit: we provide an interface that let's us iterate over values of the type `N->A`.\n\nThat means we'll be returning objects of the type `A`, but the reference capability will be the same as an object of type `N` would see an object of type `A`.\n"} +{"id": "Pony/builtin-UnsignedInteger-_34.txt", "contents": "[Source]\nfun box op_xor(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: A\n\nReturns\u00b6"} +{"id": "Pony/3_arithmetic_5.txt", "contents": "### Unsafe Conversion\n\nConverting between integer types in Pony needs to happen explicitly. Each numeric type can be converted explicitly into every other type.\n\n```pony\n// converting an I32 to a 32 bit floating point\nI32(12).f32()\n```\n\nFor each conversion operation there exists an unsafe counterpart, that is much faster when converting from and to floating point numbers. All these unsafe conversion between numeric types are undefined if the target type is smaller than the source type, e.g. if we convert from `I64` to `F32`.\n\n```pony\n// converting an I32 to a 32 bit floating point, the unsafe way\nI32(12).f32_unsafe()\n\n// an example for an undefined unsafe conversion\nI64.max_value().f32_unsafe()\n\n// an example for an undefined unsafe conversion, that is actually safe\nI64(1).u8_unsafe()"} +{"id": "Pony/src-pony_check-property_helper-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-pony_check-generator-_132.txt", "contents": "min: ISize = ISize.min_value(),\nmax: ISize = ISize.max_value())\n: Generator[ISize]\n=>\n\"\"\"\nCreate a generator for ISize values.\n\"\"\"\nlet that = this\nGenerator[ISize](\nobject is GenObj[ISize]\nfun generate(rnd: Randomness): ISize^ =>\nrnd.isize(min, max)\n\nfun shrink(i: ISize): ValueAndShrink[ISize] =>\nthat._int_shrink[ISize](consume i, min)\nend)\n\n\nfun byte_string(\ngen: Generator[U8],"} +{"id": "Pony/process-Signaled-_3.txt", "contents": "fun box eq(\nother: (Exited val | Signaled val))\n: Bool val\n\nParameters\u00b6\n\nother: (Exited val | Signaled val)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: (Exited val | Signaled val))\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-process-process_monitor-_36.txt", "contents": "`qty` is zero, the call can contain any amount of data.\n\"\"\"\n_expect = _notifier.expect(this, qty)\n_read_buf_size()\n\nbe _event_notify(event: AsioEventID, flags: U32, arg: U32) =>\n\"\"\"\nHandle the incoming Asio event from one of the pipes.\n\"\"\"\nmatch event\n| _stdin.event =>\nif AsioEvent.writeable(flags) then\n_pending_writes()\nelseif AsioEvent.disposable(flags) then\n_stdin.dispose()\nend\n| _stdout.event =>\nif AsioEvent.readable(flags) then\n_pending_reads(_stdout)\nelseif AsioEvent.disposable(flags) then"} +{"id": "Pony/net-TCPConnection-_1.txt", "contents": "\nfun ref connected(conn: TCPConnection ref) =>\nconn.write(\"hello world\")\n\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8] iso,\ntimes: USize)\n: Bool\n=>\n_out.print(\"GOT:\" + String.from_array(consume data))\nconn.close()\ntrue\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nTCPConnection(TCPConnectAuth(env.root),"} +{"id": "Pony/src-net-udp_socket-_31.txt", "contents": "=>\nsock.write(consume data, from)\n\nfun ref not_listening(sock: UDPSocket ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nUDPSocket(UDPAuth(env.root),\nMyUDPNotify, \"\", \"8989\")\n```\n\nThe client is implemented like this:\n\n```pony\nuse \"net\"\n\nclass MyUDPNotify is UDPNotify\nlet _out: OutStream\nlet _destination: NetAddress"} +{"id": "Pony/net-OSSockOpt-_517.txt", "contents": "fun box so_rcvlowat()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvtimeo\u00b6\n[Source]\nfun box so_rcvtimeo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rds_transport\u00b6\n[Source]"} +{"id": "Pony/pony_bench-BenchConfig-_2.txt", "contents": "\nlet max_sample_time: U64 val\u00b6\n[Source]\nMaximum time to execute a sample in Nanoseconds. (Default: 100_000_000)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/serialisation_15.txt", "contents": "ubuff[2] = (sz >> 8) & 0xFF;\nubuff[3] = sz & 0xFF;\n\n// copy the string\nstrncpy(buff + 4, s, sz);\n}\n\nextern char *deserialise(char *buff)\n{\nunsigned char *ubuff = (unsigned char *) buff;\nsize_t sz = (ubuff[0] << 24) + (ubuff[1] << 16) + (ubuff[2] << 8) + ubuff[3];\nchar *s = malloc(sizeof(char) * sz + 1);\nmemcpy(s, buff + 4, sz);\ns[sz] = '\\0';\nreturn s;\n}\n```\n"} +{"id": "Pony/net-OSSockOpt-_477.txt", "contents": "fun box so_atmsap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_attach_bpf\u00b6\n[Source]\nfun box so_attach_bpf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_attach_filter\u00b6\n[Source]"} +{"id": "Pony/debug-Debug-_3.txt", "contents": "\n\nerr\u00b6\n[Source]\nIf platform is debug configured, print message to standard error\nfun box err(\nmsg: Stringable box = \"\")\n: None val\n\nParameters\u00b6\n\nmsg: Stringable box = \"\"\n\nReturns\u00b6\n\nNone val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_19.txt", "contents": "\nString iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub_unsafe\u00b6"} +{"id": "Pony/src-collections-list_node-_13.txt", "contents": "# Example program\nThe functions which are illustrated below are only those which operate on an\nindividual ListNode.\n\nIt outputs:\n\nMy node has the item value: My Node item\nMy node has the updated item value: My updated Node item\nPopped the item from the ListNode\nThe ListNode has no (None) item.\n\n```pony\nuse \"collections\"\nactor Main\nnew create(env:Env) =>\n\n// Create a new ListNode of type String\nlet my_list_node = ListNode[String](\"My Node item\")\ntry\nenv.out.print(\"My node has the item value: \""} +{"id": "Pony/src-files-directory-_30.txt", "contents": "let path: FilePath\n\"\"\"\nThis is the filesystem path locating this directory on the file system\nand an object capability granting access to operate on this directory.\n\"\"\"\n\nvar _fd: I32 = -1\n// We don't need a file descriptor in Windows. However we do still need to\n// know whether we've disposed of this object, so we use the _fd to indicate\n// this.\n// 0 => not yet disposed of.\n// -1 => disposed of.\n\nnew create(from: FilePath) ? =>\n\"\"\"\nThis will raise an error if the path doesn't exist or it is not a\ndirectory, or if FileRead or FileStat permission isn't available.\n\"\"\"\nif not from.caps(FileRead) then\nerror"} +{"id": "Pony/src-builtin-string-_121.txt", "contents": "true\nelse\nfalse\nend\n\nif same and ((steps = steps - 1) == 1) then\nreturn i.isize()\nend\n\ni = i + 1\nend\nerror\n\nfun rfind(s: String box, offset: ISize = -1, nth: USize = 0): ISize ? =>\n\"\"\"\nReturn the index of n-th instance of `s` in the string starting from the\nend. The `offset` represents the highest index to included in the search.\nRaise an error if there is no n-th occurrence of `s` or `s` is empty.\n\"\"\"\nvar i = (offset_to_index(offset) + 1) - s._size"} +{"id": "Pony/serialisation_9.txt", "contents": "### Classes With Multiple `Pointer` Fields\n\nIf a class has more than one `Pointer` field then all of those fields must be handled by the custom serialisation and deserialisation methods for that class; there are not methods for each field. For example, if a class has three `Pointer` fields then the `_serialise_space()` method must return the total number of bytes required to serialise the objects from all three fields.\n"} +{"id": "Pony/src-net-ossockopt-_106.txt", "contents": "fun sctp_cc_opt_steady_step():I32 => @pony_os_sockopt_option(I32(562))\nfun sctp_cc_opt_use_dccc_ecn():I32 => @pony_os_sockopt_option(I32(563))\nfun sctp_cc_rfc2581():I32 => @pony_os_sockopt_option(I32(564))\nfun sctp_cc_rtcc():I32 => @pony_os_sockopt_option(I32(565))\nfun sctp_closed():I32 => @pony_os_sockopt_option(I32(566))\nfun sctp_clr_stat_log():I32 => @pony_os_sockopt_option(I32(567))\nfun sctp_cmt_base():I32 => @pony_os_sockopt_option(I32(568))\nfun sctp_cmt_max():I32 => @pony_os_sockopt_option(I32(569))\nfun sctp_cmt_mptcp():I32 => @pony_os_sockopt_option(I32(570))\nfun sctp_cmt_off():I32 => @pony_os_sockopt_option(I32(571))\nfun sctp_cmt_on_off():I32 => @pony_os_sockopt_option(I32(572))\nfun sctp_cmt_rpv1():I32 => @pony_os_sockopt_option(I32(573))\nfun sctp_cmt_rpv2():I32 => @pony_os_sockopt_option(I32(574))\nfun sctp_cmt_use_dac():I32 => @pony_os_sockopt_option(I32(575))\nfun sctp_connect_x():I32 => @pony_os_sockopt_option(I32(576))\nfun sctp_connect_x_complete():I32 => @pony_os_sockopt_option(I32(577))\nfun sctp_connect_x_delayed():I32 => @pony_os_sockopt_option(I32(578))\nfun sctp_context():I32 => @pony_os_sockopt_option(I32(579))\nfun sctp_cookie_ack():I32 => @pony_os_sockopt_option(I32(580))\nfun sctp_cookie_echo():I32 => @pony_os_sockopt_option(I32(581))"} +{"id": "Pony/builtin-U8-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_81.txt", "contents": "fun box dccp_sockopt_packet_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_qpolicy_id\u00b6\n[Source]\nfun box dccp_sockopt_qpolicy_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_qpolicy_txqlen\u00b6\n[Source]"} +{"id": "Pony/src-format-format-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-collections-list-_87.txt", "contents": "fun take_while(f: {(this->A!): Bool} box): List[this->A!]^ =>\n\"\"\"\nBuilds a `List` of elements satisfying the predicate, stopping at the first `false` return.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.take_while( {(s: String): Bool => s < \"b\"} ) // [\"a\"]\n```\n\"\"\"\nlet l = List[this->A!]\n\nif size() > 0 then\ntry\nvar node = head()?\n\nfor i in Range(0, size()) do\nlet item = node()?\nif f(item) then l.push(item) else return l end\nnode = node.next() as this->ListNode[A]\nend"} +{"id": "Pony/0_what-you-need_2.txt", "contents": "# A text editor\n\nWhile you can write code using any editor, it's nice to use one with some support for the language. We maintain a list of [editors supporting Pony](https://github.com/ponylang/ponyc/blob/main/EDITORS.md).\n"} +{"id": "Pony/collections-HashMap-_13.txt", "contents": "\nkey: this->K!\n\nReturns\u00b6\n\nHashMap[this->K!, this->V!, H2] ref^\n\n\nnext_index\u00b6\n[Source]\nGiven an index, return the next index that has a populated key and value.\nRaise an error if there is no next populated index.\nfun box next_index(\nprev: USize val = call)\n: USize val ?\n\nParameters\u00b6\n\nprev: USize val = call\n"} +{"id": "Pony/src-builtin-string-_154.txt", "contents": "\"\"\"\nvar buf = recover String end\nvar first = true\nfor v in data do\nif first then\nfirst = false\nelse\nbuf = (consume buf)._append(this)\nend\nbuf.append(v.string())\nend\nbuf\n\nfun compare(that: String box): Compare =>\n\"\"\"\nLexically compare two strings.\n\"\"\"\ncompare_sub(that, _size.max(that._size))\n\nfun compare_sub("} +{"id": "Pony/builtin-F64-_53.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\nfun box lt(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/1_classes_4.txt", "contents": "Here, we have two constructors, one that creates a `Wombat` that isn't hungry, and another that creates a `Wombat` that might be hungry or might not. Unlike some other languages that differentiate between constructors with method overloading, Pony won't presume to know which alternate constructor to invoke based on the arity and type of your arguments. To choose a constructor, invoke it like a method with the `.` syntax:\n\n```pony\nlet defaultWombat = Wombat(\"Fantastibat\") // Invokes the create method by default\nlet hungryWombat = Wombat.hungry(\"Nomsbat\", 12) // Invokes the hungry method\n```\n\n__What's with the single quote thing, i.e. name'?__ You can use single quotes in parameter and local variable names. In mathematics, it's called a _prime_, and it's used to say \"another one of these, but not the same one\". Basically, it's just convenient.\n\nEvery constructor has to set every field in an object. If it doesn't, the compiler will give you an error. Since there is no `null` in Pony, we can't do what Java, C# and many other languages do and just assign either `null` or zero to every field before the constructor runs, and since we don't want random crashes, we don't leave fields undefined (unlike C or C++).\n\nSometimes it's convenient to set a field the same way for all constructors.\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U64\nvar _thirst_level: U64 = 1\n\nnew create(name': String) =>"} +{"id": "Pony/files-FileInfo-_2.txt", "contents": "\nlet hard_links: U32 val\u00b6\n[Source]\nNumber of hardlinks to this filepath.\n\nlet device: U64 val\u00b6\n[Source]\nOS id of the device containing this filepath.\nDevice IDs consist of a major and minor device id,\ndenoting the type of device and the instance of this type on the system.\n\nlet inode: U64 val\u00b6\n[Source]\nUNIX specific INODE number of filepath. Is 0 on Windows.\n\nlet uid: U32 val\u00b6\n[Source]\nUNIX-style user ID of the owner of filepath.\n\nlet gid: U32 val\u00b6"} +{"id": "Pony/src-pony_check-generator-_107.txt", "contents": "(2, Generators.u8().filter({(u) => (u, (u % 2) != 0 }))\n])\n```\n\"\"\"\n\n// nasty hack to avoid handling the theoretical error case where we have\n// no generator and thus would have to change the type signature\nGenerator[T](\nobject is GenObj[T]\nfun generate(rnd: Randomness): GenerateResult[T] ? =>\nlet weight_sum: USize =\nIter[WeightedGenerator[T]](weighted_generators.values())\n.fold[USize](\n0,\n// segfaults when types are removed - TODO: investigate\n{(acc: USize, weighted_gen: WeightedGenerator[T]): USize^ =>\nweighted_gen._1 + acc\n})\nlet desired_sum = rnd.usize(0, weight_sum)\nvar running_sum: USize = 0"} +{"id": "Pony/builtin-U128-_13.txt", "contents": "U128 val\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: U128 val)\n: (U128 val , U128 val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , U128 val)\n\n\ndiv\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_25.txt", "contents": "I64 val ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U64 val)\n: I64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nI64 val\n\n\nshr\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_helper-_27.txt", "contents": "=>\n\"\"\"\nAssert that the given test function throws an error when run.\n\"\"\"\ntry\ntest()?\nfail(_format_loc(loc) + \"Assert error failed. \" + msg)\nfalse\nelse\nlog(_format_loc(loc) + \"Assert error passed. \" + msg, true)\ntrue\nend\n\nfun assert_no_error(\ntest: ITest box,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\""} +{"id": "Pony/src-pony_test-pony_test-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-term-ansi_term-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-Real-_28.txt", "contents": "I64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-capsicum-cap_rights-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-buffered-reader-_59.txt", "contents": "\"\"\"\nGet a big-endian I32.\n\"\"\"\nu32_be()?.i32()\n\nfun ref i32_le(): I32 ? =>\n\"\"\"\nGet a little-endian I32.\n\"\"\"\nu32_le()?.i32()\n\nfun ref u64_be(): U64 ? =>\n\"\"\"\nGet a big-endian U64.\n\"\"\"\nlet num_bytes = U64(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?\n(var data, var offset) = node()?\nif (data.size() - offset) >= num_bytes then"} +{"id": "Pony/net-OSSockOpt-_324.txt", "contents": "fun box rose_number_busy()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_out_of_order\u00b6\n[Source]\nfun box rose_out_of_order()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_qbitincl\u00b6\n[Source]"} +{"id": "Pony/pony_bench-OverheadBenchmark-_0.txt", "contents": "\n\n\n\n\n\n\nOverheadBenchmark\u00b6\n[Source]\nDefault benchmark for measuring synchronous overhead.\nclass iso OverheadBenchmark is\nMicroBenchmark iso\n\nImplements\u00b6\n\nMicroBenchmark iso\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-pony_check-generator-_136.txt", "contents": "let range_bytes_gen = usize(0, range_bytes.size()-1)\n.map[U8]({(size) =>\ntry\nrange_bytes(size)?\nelse\n// should never happen\nfallback\nend })\nbyte_string(range_bytes_gen, min, max)\n\nfun ascii_printable(\nmin: USize = 0,\nmax: USize = 100)\n: Generator[String]\n=>\n\"\"\"\nCreate a generator for strings of printable ASCII characters,\nwith a minimum length of `min` (default: 0)\nand a maximum length of `max` (default: 100).\n\"\"\""} +{"id": "Pony/builtin-I128-_8.txt", "contents": "fun box bitwidth()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]"} +{"id": "Pony/pony_check-Property3-_3.txt", "contents": "\nproperty\u00b6\n[Source]\nfun ref property(\narg1: (T1 , T2 , T3),\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\narg1: (T1 , T2 , T3)\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nproperty3\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_15.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nmul_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the operation overflows, the result is undefined.\nfun box mul_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n"} +{"id": "Pony/net-OSSockOpt-_165.txt", "contents": "fun box ipv6_recvpathmtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvpktinfo\u00b6\n[Source]\nfun box ipv6_recvpktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_recvrthdr\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_46.txt", "contents": "A\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: A\n\nReturns\u00b6\n\nA\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/src-collections-set-_27.txt", "contents": "end\nr\n\nfun eq(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns true if the sets contain the same elements.\n\"\"\"\n(size() == that.size()) and (this <= that)\n\nfun ne(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns false if the sets contain the same elements.\n\"\"\"\nnot (this == that)\n\nfun lt(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns true if every element in this is also in that, and this has fewer\nelements than that.\n\"\"\""} +{"id": "Pony/src-itertools-iter-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-pony_check-property-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/pony_check-ForAll-_0.txt", "contents": "\n\n\n\n\n\n\nForAll[T: T]\u00b6\n[Source]\nclass ref ForAll[T: T]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\ngen': Generator[T] val,\ntestHelper: TestHelper val)\n: ForAll[T] ref^\n\nParameters\u00b6"} +{"id": "Pony/6_type-aliases_1.txt", "contents": "# Enumerations\n\nOne way to use type aliases is to express an enumeration. For example, imagine we want to say something must either be Red, Blue or Green. We could write something like this:\n\n```pony\nprimitive Red\nprimitive Blue\nprimitive Green\n\ntype Colour is (Red | Blue | Green)\n```\n\nThere are two new concepts in there. The first is the type alias, introduced with the keyword `type`. It just means that the name that comes after `type` will be translated by the compiler to the type that comes after `is`.\n\nThe second new concept is the type that comes after `is`. It's not a single type! Instead, it's a __union__ type. You can read the `|` symbol as __or__ in this context, so the type is \"Red or Blue or Green\".\n\nA union type is a form of _closed world_ type. That is, it says every type that can possibly be a member of it. In contrast, object-oriented subtyping is usually _open world_, e.g. in Java, an interface can be implemented by any number of classes.\n\nYou can also declare constants like in C or Go like this, making use of `apply`,\nwhich can be omitted during call (will be discussed further in [Sugar](/expressions/sugar.md)),"} +{"id": "Pony/src-builtin-unsigned-_89.txt", "contents": "@\"llvm.usub.with.overflow.i128\"(this, y)\nelse\nlet overflow = this < y\n(this - y, overflow)\nend\n\nfun mulc(y: U128): (U128, Bool) =>\nifdef native128 then\n@\"llvm.umul.with.overflow.i128\"(this, y)\nelse\nlet result = this * y\nlet overflow = (this != 0) and ((result / this) != y)\n(result, overflow)\nend\n\nfun divc(y: U128): (U128, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[U128](this, y)\n\nfun remc(y: U128): (U128, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[U128](this, y)"} +{"id": "Pony/src-collections-list-_83.txt", "contents": "\"\"\"\nPrivate helper for `exists`, recursively working with `ListNode`s.\n\"\"\"\ntry\nif f(ln()?) then\ntrue\nelse\n_exists(ln.next() as this->ListNode[A], f)\nend\nelse\nfalse\nend\n\nfun partition(\nf: {(this->A!): Bool} box)\n: (List[this->A!]^, List[this->A!]^)\n=>\n\"\"\"\nBuilds a pair of `List`s, the first of which is made up of the elements\nsatisfying the predicate and the second of which is made up of"} +{"id": "Pony/src-random-random-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/collections-persistent-Vec-_2.txt", "contents": "i: USize val)\n: val->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nval->A ?\n\n\nupdate\u00b6\n[Source]\nReturn a vector with the i-th element changed, raising an error if the\nindex is out of bounds.\nfun val update(\ni: USize val,\nvalue: val->A)\n: Vec[A] val ?"} +{"id": "Pony/src-ini-ini_map-_3.txt", "contents": "This accepts a string iterator and returns a nested map of strings. If\nparsing fails, an error is raised.\n\"\"\"\nlet map = IniMap\n\nlet f = object\nlet map: IniMap = map\n\nfun ref apply(section: String, key: String, value: String): Bool =>\ntry\nif not map.contains(section) then\nmap.insert(section, Map[String, String])\nend\nmap(section)?(key) = value\nend\ntrue\n\nfun ref add_section(section: String): Bool =>\nif not map.contains(section) then\nmap.insert(section, Map[String, String])"} +{"id": "Pony/promises-Promises-_2.txt", "contents": "Promises[String val].join([p1; p2; p3].values())\n.next[None]({(a: Array[String val] val) =>\nfor s in a.values() do\nenv.out.print(s)\nend\n})\n\np2(\"second\")\np3(\"third\")\np1(\"first\")\n\nfun box join(\nps: Iterator[Promise[A] tag] ref)\n: Promise[Array[A] val] tag\n\nParameters\u00b6\n\nps: Iterator[Promise[A] tag] ref\n\nReturns\u00b6"} +{"id": "Pony/src-promises-promise-_27.txt", "contents": "\nAnd we want to use this promise based API to look up the title of an issue.\nWithout `flatten_next`, we could attempt to do the following using `next`:\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet repo: Promise[Repository] =\nGitHub(\"my token\").get_repo(\"ponylang/ponyc\")\n\n//\n// do something with the repo once the promise is fulfilled\n// in our case, get the issue\n//\n\nlet issue = Promise[Promise[Issue]] =\nrepo.next[Promise[Issue]](FetchIssue~apply(1))\n\n// once we get the issue, print the title\nissue.next[None](PrintIssueTitle~apply(env.out))"} +{"id": "Pony/src-collections-list_node-_12.txt", "contents": "the List in which it resides.\n\nAs you would expect functions are provided to create a ListNode, update a\nListNode's contained item, and pop the item from the ListNode.\n\nAdditional functions are provided to operate on a ListNode as part of a Linked\nList. These provide for prepending, appending, removal, and safe traversal in\nboth directions. The Ponylang\n[collections.List](https://stdlib.ponylang.io/collections-List/) class is the\ncorrect way to create these. _Do not attempt to create a Linked List using only\nListNodes._\n"} +{"id": "Pony/collections-persistent-VecValues-_0.txt", "contents": "\n\n\n\n\n\n\nVecValues[A: Any #share]\u00b6\n[Source]\nclass ref VecValues[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nv: Vec[A] val)\n: VecValues[A] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-string-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/cli-Command-_3.txt", "contents": "Option val\n\n\narg\u00b6\n[Source]\nReturns the Arg by name, defaulting to a fake Arg if unknown.\nfun box arg(\nname: String val)\n: Arg val\n\nParameters\u00b6\n\nname: String val\n\nReturns\u00b6\n\nArg val\n\n\n"} +{"id": "Pony/builtin-I32-_36.txt", "contents": "fun box add(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/debug-Debug-_2.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nout\u00b6\n[Source]\nIf platform is debug configured, print message to standard output\nfun box out(\nmsg: Stringable box = \"\")\n: None val\n\nParameters\u00b6\n\nmsg: Stringable box = \"\"\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-net-tcp_connection-_113.txt", "contents": "\nfun ref _queue_read() =>\n\"\"\"\nBegin an IOCP read on Windows.\n\"\"\"\nifdef windows then\ntry\n@pony_os_recv(\n_event,\n_read_buf.cpointer(_read_buf_offset),\n_read_buf.size() - _read_buf_offset) ?\nelse\nhard_close()\nend\nend\n\nfun ref _pending_reads() =>\n\"\"\"\nUnless this connection is currently muted, read while data is available,\nguessing the next packet length as we go. If we read 5 kb of data, send"} +{"id": "Pony/net-OSSockOpt-_562.txt", "contents": "fun box tcpopt_sack_permit_hdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_signature\u00b6\n[Source]\nfun box tcpopt_signature()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_timestamp\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-time-time-_16.txt", "contents": "fun micros(): U64 =>\n\"\"\"\nMonotonic unadjusted microseconds.\n\"\"\"\nifdef osx then\n@clock_gettime_nsec_np(_ClockUptimeRaw()) / 1000\nelseif linux or bsd then\nvar ts = _clock_gettime(_ClockMonotonic)\n((ts._1 * 1000000) + (ts._2 / 1000)).u64()\nelseif windows then\n_subseconds_from_query_performance_counter(1000000)\nelse\ncompile_error \"unsupported platform\"\nend\n\nfun nanos(): U64 =>\n\"\"\"\nMonotonic unadjusted nanoseconds.\n\"\"\"\nifdef osx then"} +{"id": "Pony/pony_check-Property4-_5.txt", "contents": "arg4: T4,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\narg1: T1\narg2: T2\narg3: T3\narg4: T4\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nname\u00b6\n[Source]\nfun box name()"} +{"id": "Pony/src-buffered-reader-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-cli-command_spec-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-FloatingPoint-_36.txt", "contents": "A\n\n\ntanh\u00b6\n[Source]\nfun box tanh()\n: A\n\nReturns\u00b6\n\nA\n\n\nacos\u00b6\n[Source]\nfun box acos()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-ASCIIPunctuation-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIPunctuation val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/term-ANSITerm-_2.txt", "contents": "Parameters\u00b6\n\ndata: Array[U8 val] iso\n\n\nprompt\u00b6\n[Source]\nPass a prompt along to the notifier.\nbe prompt(\nvalue: String val)\n\nParameters\u00b6\n\nvalue: String val\n\n\nsize\u00b6\n[Source]\nbe size()\n"} +{"id": "Pony/builtin-U16-_22.txt", "contents": "(U16 val , Bool val)\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: U16 val)\n: U16 val ?\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val ?\n\n\nfld_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_71.txt", "contents": "// to inform the Pony runtime when to apply and release backpressure\n// as the connection experiences it.\n// Note the calls to\n//\n// Backpressure.apply(_auth)\n// Backpressure.release(_auth)\n//\n// that apply and release backpressure as needed\n\nuse \"backpressure\"\nuse \"collections\"\nuse \"net\"\n\nclass SlowDown is TCPConnectionNotify\nlet _auth: ApplyReleaseBackpressureAuth\nlet _out: OutStream\n\nnew iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>\n_auth = auth\n_out = out"} +{"id": "Pony/encode-base64-Base64-_5.txt", "contents": "\ndecode_url[optional A: Seq[U8 val] iso]\u00b6\n[Source]\nDecode for URLs (RFC 4648).\nfun box decode_url[optional A: Seq[U8 val] iso](\ndata: ReadSeq[U8 val] box)\n: A^ ?\n\nParameters\u00b6\n\ndata: ReadSeq[U8 val] box\n\nReturns\u00b6\n\nA^ ?\n\n\ndecode[optional A: Seq[U8 val] iso]\u00b6\n[Source]\nConfigurable decoding. The defaults are for RFC 4648. Missing padding is"} +{"id": "Pony/src-pony_check-randomness-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-string-_111.txt", "contents": "elseif (b.size() == b.space()) and (b.cpointer(b.size()) == cpointer())\nthen\n(true, false)\nelse\n(false, false)\nend\n\nif not unchoppable then\nreturn (consume this, consume b)\nend\n\nif a_left then\n_alloc = _alloc + b._alloc\n_size = _size + b._size\nconsume this\nelse\nb._alloc = b._alloc + _alloc\nb._size = b._size + _size\nconsume b\nend"} +{"id": "Pony/src-builtin-string-_147.txt", "contents": "if _size > 0 then\nlet chars = Array[U32](delim.size())\n\nfor rune in delim.runes() do\nchars.push(rune)\nend\n\nvar cur = recover String end\nvar i = USize(0)\nvar occur = USize(0)\n\ntry\nwhile i < _size do\n(let c, let len) = utf32(i.isize())?\n\nif chars.contains(c) then\n// If we find a delimiter, add the current string to the array.\noccur = occur + 1\n\nif (n > 0) and (occur >= n) then"} +{"id": "Pony/6_type-aliases_7.txt", "contents": "Also, notice that `box` appears in the type. This is a __reference capability__. It means there is a certain class of operations we need to be able to do with a `K`. We'll cover this in more detail later.\n\nJust like our other examples, all this really means is that `Map` is really a kind of `HashMap`.\n"} +{"id": "Pony/builtin-I64-_32.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , I64 val)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-promises-fulfill-_2.txt", "contents": "\"\"\"\nA function from A to B that is called when a promise is fulfilled.\n\"\"\"\nfun ref apply(value: A): B ?\n\ninterface iso Reject[A: Any #share]\n\"\"\"\nA function on A that is called when a promise is rejected.\n\"\"\"\nfun ref apply(): A ?\n\nclass iso FulfillIdentity[A: Any #share]\n\"\"\"\nAn identity function for fulfilling promises.\n\"\"\"\nfun ref apply(value: A): A =>\nconsume value\n\nclass iso RejectAlways[A: Any #share]\n\"\"\""} +{"id": "Pony/builtin-Platform-_12.txt", "contents": "fun box ne(\nthat: Platform val)\n: Bool val\n\nParameters\u00b6\n\nthat: Platform val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-persistent-MapPairs-_0.txt", "contents": "\n\n\n\n\n\n\nMapPairs[K: Any #share, V: Any #share, H: HashFunction[K] val]\u00b6\n[Source]\nclass ref MapPairs[K: Any #share, V: Any #share, H: HashFunction[K] val]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nm: HashMap[K, V, H] val)\n: MapPairs[K, V, H] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-pony_test-pony_test-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-builtin-string-_62.txt", "contents": "1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251"} +{"id": "Pony/process-StartProcessAuth-_1.txt", "contents": "from: AmbientAuth val\n\nReturns\u00b6\n\nStartProcessAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: StartProcessAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: StartProcessAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-list-_91.txt", "contents": "else\nfalse\nend\n\nfun nodes(): ListNodes[A, this->ListNode[A]]^ =>\n\"\"\"\nReturn an iterator on the nodes in the `List` in forward order.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet nodes = my_list.nodes() // node with \"a\" is before node with \"c\"\n```\n\"\"\"\nListNodes[A, this->ListNode[A]](_head)\n\nfun rnodes(): ListNodes[A, this->ListNode[A]]^ =>\n\"\"\"\nReturn an iterator on the nodes in the `List` in reverse order.\n\n```pony"} +{"id": "Pony/term-Readline-_1.txt", "contents": "[Source]\nCreate a readline handler to be passed to stdin. It begins blocked. Set an\ninitial prompt on the ANSITerm to begin processing.\nnew iso create(\nnotify: ReadlineNotify iso,\nout: OutStream tag,\npath: (FilePath val | None val) = reference,\nmaxlen: USize val = 0)\n: Readline iso^\n\nParameters\u00b6\n\nnotify: ReadlineNotify iso\nout: OutStream tag\npath: (FilePath val | None val) = reference\nmaxlen: USize val = 0\n\nReturns\u00b6\n\nReadline iso^"} +{"id": "Pony/src-itertools-iter-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/ini-IniNotify-_1.txt", "contents": "key: String val,\nvalue: String val)\n: Bool val\n\nParameters\u00b6\n\nsection: String val\nkey: String val\nvalue: String val\n\nReturns\u00b6\n\nBool val\n\n\nadd_section\u00b6\n[Source]\nThis is called for every valid section in the INI file. Return false\nto halt processing.\nfun ref add_section("} +{"id": "Pony/src-pony_check-generator-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-net-dns-_7.txt", "contents": "\"\"\"\nip4(auth, \"255.255.255.255\", service)\n\nfun broadcast_ip6(auth: DNSAuth, service: String)\n: Array[NetAddress] iso^\n=>\n\"\"\"\nLink-local IP6 broadcast address.\n\"\"\"\nip6(auth, \"FF02::1\", service)\n\nfun is_ip4(host: String): Bool =>\n\"\"\"\nReturns true if the host is a literal IPv4 address.\n\"\"\"\n@pony_os_host_ip4(host.cstring())\n\nfun is_ip6(host: String): Bool =>\n\"\"\"\nReturns true if the host is a literal IPv6 address."} +{"id": "Pony/net-OSSockOpt-_281.txt", "contents": "fun box netlink_no_enobufs()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_pktinfo\u00b6\n[Source]\nfun box netlink_pktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_rdma\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_367.txt", "contents": "fun box sctp_cwr_in_same_window()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cwr_reduce_override\u00b6\n[Source]\nfun box sctp_cwr_reduce_override()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data\u00b6\n[Source]"} +{"id": "Pony/collections-Flags-_11.txt", "contents": "Returns\u00b6\n\nFlags[A, B] iso^\n\n\nsub\u00b6\n[Source]\nThis with the flag unset.\nfun box sub(\nflag: A)\n: Flags[A, B] iso^\n\nParameters\u00b6\n\nflag: A\n\nReturns\u00b6\n\nFlags[A, B] iso^\n"} +{"id": "Pony/builtin-Seq-_10.txt", "contents": "truncate\u00b6\n[Source]\nTruncate the sequence to the given length, discarding excess elements.\nIf the sequence is already smaller than len, do nothing.\nfun ref truncate(\nlen: USize val)\n: None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\nvalues\u00b6\n[Source]\nReturns an iterator over the elements of the sequence."} +{"id": "Pony/src-pony_check-pony_check-_8.txt", "contents": "PonyCheck is a library for property based testing\nwith tight integration into PonyTest.\n"} +{"id": "Pony/builtin-U64-_33.txt", "contents": "fun box div_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: U64 val)\n: (U64 val , U64 val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-I128-_37.txt", "contents": "I128 val\n\n\nshr_unsafe\u00b6\n[Source]\nfun box shr_unsafe(\ny: U128 val)\n: I128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nI128 val\n\n\nadd_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_63.txt", "contents": "\nfun ctz_unsafe(): U64 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i64\"(this.u64(), true)\n\nfun bitwidth(): U64 => 64\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: I64): I64 => if this < y then this else y end\nfun max(y: I64): I64 => if this > y then this else y end\n\nfun fld(y: I64): I64 =>\n_SignedArithmetic.fld[I64, U64](this, y)\n\nfun fld_unsafe(y: I64): I64 =>\n_SignedUnsafeArithmetic.fld_unsafe[I64, U64](this, y)"} +{"id": "Pony/files-File-_5.txt", "contents": ": Array[U8 val] iso^\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nArray[U8 val] iso^\n\n\nread_string\u00b6\n[Source]\nReturns up to len bytes. The resulting string may have internal null\ncharacters.\nfun ref read_string(\nlen: USize val)\n: String iso^\n\nParameters\u00b6"} +{"id": "Pony/files-FileMode-_6.txt", "contents": "\nu32\u00b6\n[Source]\nGet the OS specific integer for a file mode. On Windows, if any read flag\nis set, the path is made readable, and if any write flag is set, the path\nis made writeable.\nfun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\n\n\n\n\n\n"} +{"id": "Pony/process-ProcessMonitor-_5.txt", "contents": "_stdin pipe.\nbe done_writing()\n\n\ndispose\u00b6\n[Source]\nTerminate child and close down everything.\nbe dispose()\n\n\ntimer_notify\u00b6\n[Source]\nWindows IO polling timer has fired\nbe timer_notify()\n\n\nPublic Functions\u00b6\nexpect\u00b6\n[Source]\nA stdout call on the notifier must contain exactly qty bytes. If"} +{"id": "Pony/src-process-_process-_25.txt", "contents": "primitive _STDINFILENO\nfun apply(): U32 => 0\n\nprimitive _STDOUTFILENO\nfun apply(): U32 => 1\n\nprimitive _STDERRFILENO\nfun apply(): U32 => 2\n\n// Operation not permitted\nprimitive _EPERM\nfun apply(): I32 => 1\n\n// No such process\nprimitive _ESRCH\nfun apply(): I32 => 3\n\n// Interrupted function\nprimitive _EINTR\nfun apply(): I32 => 4"} +{"id": "Pony/src-net-tcp_connection-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/src-pony_check-generator-_71.txt", "contents": "1412\n1413\n1414\n1415\n1416\n1417\n1418\n1419\n1420\n1421\n1422\n1423\n1424\n1425\n1426\n1427\n1428\n1429\n1430\n1431"} +{"id": "Pony/5_methods_0.txt", "contents": "# Methods\n\nAll Pony code that actually does something, rather than defining types etc, appears in named blocks which are referred to as methods. There are three kinds of methods: functions, constructors, and behaviours. All methods are attached to type definitions (e.g. classes) - there are no global functions.\n\nBehaviours are used for handling asynchronous messages sent to actors, which we've seen in the \"Types\" chapter [when we talked about actors](/types/actors.md#behaviours).\n\n__Can I have some code outside of any methods like I do in Python?__ No. All Pony code must be within a method.\n"} +{"id": "Pony/pony_check-Generator-_8.txt", "contents": ": Generator[U] box\n\nParameters\u00b6\n\nfn: {(T): U^}[T, U] box\n\nReturns\u00b6\n\nGenerator[U] box\n\n\nflat_map[U: U]\u00b6\n[Source]\nFor each value of this generator, create a generator that is then combined.\nfun box flat_map[U: U](\nfn: {(T): Generator[U]}[T, U] box)\n: Generator[U] box\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-dns-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-itertools-iter-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/src-pony_test-pony_test-_43.txt", "contents": "embed _records: Array[_TestRecord] = Array[_TestRecord]\nlet _env: Env\nlet _timers: Timers = Timers\nvar _do_nothing: Bool = false\nvar _verbose: Bool = false\nvar _sequential: Bool = false\nvar _no_prog: Bool = false\nvar _list_only: Bool = false\nvar _started: USize = 0\nvar _finished: USize = 0\nvar _any_found: Bool = false\nvar _all_started: Bool = false\n\n// Filtering options\nvar _exclude: String = \"\"\nvar _label: String = \"\"\nvar _only: String = \"\"\n\nnew create(env: Env, list: TestList tag) =>\n\"\"\""} +{"id": "Pony/cli-Option-_3.txt", "contents": "Returns\u00b6\n\nString val\n\n\ni64\u00b6\n[Source]\nReturns the option value as an I64, defaulting to 0.\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nu64\u00b6\n[Source]\nReturns the option value as an U64, defaulting to 0.\nfun box u64()"} +{"id": "Pony/src-net-udp_socket-_50.txt", "contents": "fun ref getsockopt(level: I32, option_name: I32, option_max_size: USize = 4): (U32, Array[U8] iso^) =>\n\"\"\"\nGeneral wrapper for UDP sockets to the `getsockopt(2)` system call.\n\nThe caller must provide an array that is pre-allocated to be\nat least as large as the largest data structure that the kernel\nmay return for the requested option.\n\nIn case of system call success, this function returns the 2-tuple:\n1. The integer `0`.\n2. An `Array[U8]` of data returned by the system call's `void *`\n4th argument. Its size is specified by the kernel via the\nsystem call's `sockopt_len_t *` 5th argument.\n\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of `errno`.\n2. An undefined value that must be ignored.\n\nUsage example:\n"} +{"id": "Pony/src-net-ossockopt-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/ini--index-_2.txt", "contents": "interface IniNotify\nprimitive IniParse\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/term-EraseLine-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: EraseLine val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseLine val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_13.txt", "contents": "\nParameters\u00b6\n\noffset: USize val\n\nReturns\u00b6\n\nU8 val ?\n\n\nread_u16[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nReads a U16 from offset. This is only allowed for an array of U8s.\nfun box read_u16[optional B: (A & Real[B] val & U8 val)](\noffset: USize val)\n: U16 val ?\n\nParameters\u00b6\n\noffset: USize val"} +{"id": "Pony/src-cli-command-_12.txt", "contents": "fun spec() : CommandSpec box =>\n\"\"\"\nReturns the spec for this command.\n\"\"\"\n_spec\n\nfun fullname() : String =>\n\"\"\"\nReturns the full name of this command, with its parents prefixed.\n\"\"\"\n_fullname\n\nfun option(name: String): Option =>\n\"\"\"\nReturns the Option by name, defaulting to a fake Option if unknown.\n\"\"\"\ntry _options(name)? else Option(OptionSpec.bool(name), false) end\n\nfun arg(name: String): Arg =>\n\"\"\""} +{"id": "Pony/src-builtin-signed-_51.txt", "contents": "_SignedCheckedArithmetic.div_checked[I8, U8](this, y)\n\nfun remc(y: I8): (I8, Bool) =>\n_SignedCheckedArithmetic.rem_checked[I8, U8](this, y)\n\nfun fldc(y: I8): (I8, Bool) =>\n_SignedCheckedArithmetic.fld_checked[I8, U8](this, y)\n\nfun modc(y: I8): (I8, Bool) =>\n_SignedCheckedArithmetic.mod_checked[I8, U8](this, y)\n\nfun add_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.add_partial[I8](this, y)?\n\nfun sub_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.sub_partial[I8](this, y)?\n\nfun mul_partial(y: I8): I8 ? =>\n_SignedPartialArithmetic.mul_partial[I8](this, y)?\n"} +{"id": "Pony/src-builtin-array-_88.txt", "contents": "fun find(\nvalue: A!,\noffset: USize = 0,\nnth: USize = 0,\npredicate: {(box->A!, box->A!): Bool} val = {(l, r) => l is r })\n: USize ?\n=>\n\"\"\"\nFind the `nth` appearance of `value` from the beginning of the array,\nstarting at `offset` and examining higher indices, and using the supplied\n`predicate` for comparisons. Returns the index of the value, or raise an\nerror if the value isn't present.\n\nBy default, the search starts at the first element of the array, returns\nthe first instance of `value` found, and uses object identity for\ncomparison.\n\"\"\"\nvar i = offset\nvar n = USize(0)\n"} +{"id": "Pony/builtin-UnsignedInteger-_41.txt", "contents": "\nA\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/files-FileErrNo-_0.txt", "contents": "\n\n\n\n\n\n\nFileErrNo\u00b6\n[Source]\ntype FileErrNo is\n(FileOK val | FileError val | FileEOF val | FileBadFileNumber val | FileExists val | FilePermissionDenied val)\n\nType Alias For\u00b6\n\n(FileOK val | FileError val | FileEOF val | FileBadFileNumber val | FileExists val | FilePermissionDenied val)\n\n\n\n\n"} +{"id": "Pony/collections-persistent-Cons-_13.txt", "contents": "Bool val\n\n\nexists\u00b6\n[Source]\nReturns true if at least one element satisfies the provided predicate,\nfalse otherwise.\nfun val exists(\nf: {(val->A): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-debug-debug-_4.txt", "contents": "72\n73\n74\"\"\""} +{"id": "Pony/builtin-FloatingPoint-_12.txt", "contents": "fld_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box fld_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndivrem_unsafe\u00b6"} +{"id": "Pony/src-buffered-writer-_20.txt", "contents": "\nfun ref u16_be(data: U16) =>\n\"\"\"\nWrite a U16 to the buffer in big-endian byte order.\n\"\"\"\nlet num_bytes = U16(0).bytewidth()\nifdef bigendian then\n_current.push_u16(data)\nelse\n_current.push_u16(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref i16_le(data: I16) =>\n\"\"\"\nWrite an I16 to the buffer in little-endian byte order.\n\"\"\"\nu16_le(data.u16())\n\nfun ref i16_be(data: I16) =>"} +{"id": "Pony/net-OSSockOpt-_510.txt", "contents": "fun box so_peek_off()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_peercred\u00b6\n[Source]\nfun box so_peercred()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_peerlabel\u00b6\n[Source]"} +{"id": "Pony/format-FormatBinary-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatBinary val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatBinary val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/builtin-UnsignedInteger-_36.txt", "contents": "\nA\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub\u00b6"} +{"id": "Pony/0_literals_5.txt", "contents": "## Multibyte Character literals\n\nIt is possible to have character literals that contain multiple characters. The resulting integer value is constructed byte by byte with each character representing a single byte in the resulting integer, the last character being the least significant byte:\n\n```pony\nlet multiByte: U64 = 'ABCD' // 0x41424344\n```\n"} +{"id": "Pony/src-builtin-string-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/buffered-Reader-_23.txt", "contents": "Peek at a big-endian U16.\nfun box peek_u16_be(\noffset: USize val = 0)\n: U16 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU16 val ?\n\n\npeek_u16_le\u00b6\n[Source]\nPeek at a little-endian U16.\nfun box peek_u16_le(\noffset: USize val = 0)\n: U16 val ?"} +{"id": "Pony/cli-EnvVars-_3.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: EnvVars val)\n: Bool val\n\nParameters\u00b6\n\nthat: EnvVars val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/builtin-I128-_43.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_581.txt", "contents": "fun box tcp_md5sig_maxkeylen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_minmss\u00b6\n[Source]\nfun box tcp_minmss()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_mss\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-cli-command_parser-_34.txt", "contents": "match _ValueParser.parse(spec._typ_p(), a)\n| let v: _Value => Option(spec, v)\n| let se: SyntaxError => se\nend\nelse\nif not spec._requires_arg() then\nOption(spec, spec._default_arg())\nelse\nSyntaxError(spec.name(), \"missing arg for option\")\nend\nend\n\nprimitive _ArgParser\nfun parse(spec: ArgSpec, arg: String): (Arg | SyntaxError) =>\nmatch _ValueParser.parse(spec._typ_p(), arg)\n| let v: _Value => Arg(spec, v)\n| let se: SyntaxError => se\nend\n\nprimitive _ValueParser"} +{"id": "Pony/src-pony_check-generator-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-Flags-_1.txt", "contents": "U64 val | U128 val | ULong val |\nUSize val) & Integer[B] val)] is\nComparable[Flags[A, B] box] ref\n\nImplements\u00b6\n\nComparable[Flags[A, B] box] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a Flags instance with an optional initial value.\nDefault is 0 (no flags set).\nnew iso create(\nvalue': B = 0)\n: Flags[A, B] iso^\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-net_address-_0.txt", "contents": "\n\n\n\n\n\n\nnet_address.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-Integer-_50.txt", "contents": "\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n"} +{"id": "Pony/src-term-ansi_term-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-cli-command_spec-_47.txt", "contents": "_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_BoolType, default')\n\nnew val string(\nname': String,\ndescr': String = \"\",\ndefault': (String | None) = None)\n=>\n\"\"\"\nCreates an Arg with a String typed value that can be used like\n` filename`\nto yield an arg value\n`cmd.arg(\"file\").string() == \"filename\"`.\n\"\"\"\n_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_StringType, default')\n\nnew val i64(name': String,"} +{"id": "Pony/net-OSSockOpt-_98.txt", "contents": "fun box icmp_host_isolated()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_host_unknown\u00b6\n[Source]\nfun box icmp_host_unknown()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_host_unreach\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/src-buffered-reader-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/buffered-Writer-_23.txt", "contents": "\nNone val\n\n\nwritev\u00b6\n[Source]\nWrite ByteSeqs to the buffer.\nfun ref writev(\ndata: ByteSeqIter val)\n: None val\n\nParameters\u00b6\n\ndata: ByteSeqIter val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/linking-c_0.txt", "contents": "# Linking to C Libraries\n\nIf Pony code calls FFI functions, then those functions, or rather the libraries containing them, must be linked into the Pony program.\n"} +{"id": "Pony/files-FileLink-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-itertools-iter-_88.txt", "contents": "Return an iterator that alternates the values of the original iterator and\nthe other until one of them runs out.\n"} +{"id": "Pony/src-time-time-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-pony_check-property_helper-_44.txt", "contents": "\"\"\"\nComplete an expected action successfully.\n\nIf all expected actions are completed successfully,\nthe property is considered successful.\n\nIf 1 action fails, the property is considered failing.\n\nIf the action `name` was not expected, i.e. was not registered using\n`expect_action`, nothing happens.\n\"\"\"\n_runner.complete_action(name, _run, this)\n\nfun val fail_action(name: String) =>\n\"\"\"\nMark an expected action as failed.\n\nIf all expected actions are completed successfully,\nthe property is considered successful.\n"} +{"id": "Pony/builtin-ULong-_14.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: ULong val)\n: (ULong val , Bool val)\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/random-XorOshiro128Plus-_6.txt", "contents": "[Source]\nfun ref u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun ref ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6"} +{"id": "Pony/pony_check-Generators-_12.txt", "contents": ": Generator[HashSet[T, HashIs[T!] val] ref] box\n\nParameters\u00b6\n\ngen: Generator[T] box\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[HashSet[T, HashIs[T!] val] ref] box\n\n\nmap_of[K: (Hashable #read & Equatable[K] #read), V: V]\u00b6\n[Source]\nCreate a generator for Map from a generator of key-value tuples.\nThe generated maps will have a size up to max,\nbut tend to have fewer entries depending on the source generator gen.\nIf the generator generates key-value pairs with\nduplicate keys (based on structural equality),\nthe pair that is generated later will overwrite earlier entries in the map."} +{"id": "Pony/net-OSSockOpt-_485.txt", "contents": "fun box so_detach_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_domain\u00b6\n[Source]\nfun box so_domain()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_dontlinger\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_23.txt", "contents": "fun box ipproto_icmpv6()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_idp\u00b6\n[Source]\nfun box ipproto_idp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_idpr\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_40.txt", "contents": "## Tear Down\n\nEach unit test object may define a [tear_down()](pony_test-UnitTest.md#tear_down) function. This is called after\nthe test has finished to allow tearing down of any complex environment that had\nto be set up for the test.\n\nThe [tear_down()](pony_test-UnitTest.md#tear_down) function is called for each test regardless of whether it\npassed or failed. If a test times out [tear_down()](pony_test-UnitTest.md#tear_down) will be called after\ntimed_out() returns.\n\nWhen a test is in an exclusion group, the [tear_down()](pony_test-UnitTest.md#tear_down) call is considered part\nof the tests run. The next test in the exclusion group will not start until\nafter [tear_down()](pony_test-UnitTest.md#tear_down) returns on the current test.\n\nThe test's [TestHelper](pony_test-TestHelper.md) is handed to [tear_down()](pony_test-UnitTest.md#tear_down) and it is permitted to log\nmessages and call assert functions during tear down.\n"} +{"id": "Pony/src-builtin-string-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/pony_check-Generators-_7.txt", "contents": "gen: Generator[T] box\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[Array[T] ref] box\n\n\nshuffled_array_gen[T: T]\u00b6\n[Source]\nfun box shuffled_array_gen[T: T](\ngen: Generator[Array[T] ref] box)\n: Generator[Array[T] ref] box\n\nParameters\u00b6\n\ngen: Generator[Array[T] ref] box\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-udp_socket-_57.txt", "contents": "_OSSocket.u32_to_bytes4(if state then 1 else 0 end)\n_OSSocket.setsockopt(_fd, OSSockOpt.sol_socket(), OSSockOpt.so_broadcast(), word)\n\nfun ref set_so_rcvbuf(bufsize: U32): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)`\n\"\"\"\n_OSSocket.set_so_rcvbuf(_fd, bufsize)\n\nfun ref set_so_sndbuf(bufsize: U32): U32 =>\n\"\"\"\nWrapper for the FFI call `setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`\n\"\"\"\n_OSSocket.set_so_sndbuf(_fd, bufsize)\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_parser-_22.txt", "contents": "| let os: Array[Option] =>\nfor o in os.values() do\nif o.spec()._typ_p().is_seq() then\noptions.upsert(o.spec().name(), o, {(x, n) => x._append(n) })\nelse\noptions.update(o.spec().name(), o)\nend\nend\n| let se: SyntaxError =>\nreturn se\nend\n\nelse // no dashes, must be a command or an arg\nif _spec.commands().size() > 0 then\ntry\nmatch _spec.commands()(token)?\n| let cs: CommandSpec box =>\nreturn CommandParser._sub(cs, this).\n_parse_command(tokens, options, args, envsmap, opt_stop)\nend"} +{"id": "Pony/term-Readline-_10.txt", "contents": "\nctrl: Bool val = false\nalt: Bool val = false\nshift: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\ndelete\u00b6\n[Source]\nForward delete.\nfun ref delete(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property-_20.txt", "contents": "fun ref property(arg1: (T1, T2, T3, T4), h: PropertyHelper) ? =>\n(let x1, let x2, let x3, let x4) = consume arg1\nproperty4(consume x1, consume x2, consume x3, consume x4, h)?\n\nfun ref property4(arg1: T1, arg2: T2, arg3: T3, arg4: T4, h: PropertyHelper) ?\n\"\"\"\nA method verifying that a certain property holds for all given\n`arg1`, `arg2`, `arg3`, and `arg4`\nwith the help of [PropertyHelper](pony_check-PropertyHelper.md) `h`.\n\"\"\"\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_218.txt", "contents": "fun box ip_multicast_ifindex()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_loop\u00b6\n[Source]\nfun box ip_multicast_loop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_ttl\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_14.txt", "contents": "fun box fchown()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfchownat\u00b6\n[Source]\nfun box fchownat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfcntl\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_27.txt", "contents": "(A , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nfldc\u00b6\n[Source]"} +{"id": "Pony/src-random-random-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-F64-_34.txt", "contents": "copysign\u00b6\n[Source]\nfun box copysign(\nsign: F64 val)\n: F64 val\n\nParameters\u00b6\n\nsign: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n"} +{"id": "Pony/src-builtin-array-_84.txt", "contents": "len: USize = -1)\n=>\n\"\"\"\nAppend the elements from a sequence, starting from the given offset.\n\"\"\"\nif offset >= seq.size() then\nreturn\nend\n\nlet copy_len = len.min(seq.size() - offset)\nreserve(_size + copy_len)\n\nvar n = USize(0)\n\ntry\nwhile n < copy_len do\n_ptr._update(_size + n, seq(offset + n)?)\n\nn = n + 1\nend"} +{"id": "Pony/src-net-ossockopt-_97.txt", "contents": "fun msg_notification():I32 => @pony_os_sockopt_option(I32(382))\nfun msg_socallbck():I32 => @pony_os_sockopt_option(I32(383))\nfun ndrvproto_ndrv():I32 => @pony_os_sockopt_option(I32(384))\nfun ndrv_addmulticast():I32 => @pony_os_sockopt_option(I32(385))\nfun ndrv_deldmxspec():I32 => @pony_os_sockopt_option(I32(386))\nfun ndrv_delmulticast():I32 => @pony_os_sockopt_option(I32(387))\nfun ndrv_demuxtype_ethertype():I32 => @pony_os_sockopt_option(I32(388))\nfun ndrv_demuxtype_sap():I32 => @pony_os_sockopt_option(I32(389))\nfun ndrv_demuxtype_snap():I32 => @pony_os_sockopt_option(I32(390))\nfun ndrv_dmux_max_descr():I32 => @pony_os_sockopt_option(I32(391))\nfun ndrv_protocol_desc_vers():I32 => @pony_os_sockopt_option(I32(392))\nfun ndrv_setdmxspec():I32 => @pony_os_sockopt_option(I32(393))\nfun netlink_add_membership():I32 => @pony_os_sockopt_option(I32(394))\nfun netlink_audit():I32 => @pony_os_sockopt_option(I32(395))\nfun netlink_broadcast_error():I32 => @pony_os_sockopt_option(I32(396))\nfun netlink_cap_ack():I32 => @pony_os_sockopt_option(I32(397))\nfun netlink_connector():I32 => @pony_os_sockopt_option(I32(398))\nfun netlink_crypto():I32 => @pony_os_sockopt_option(I32(399))\nfun netlink_dnrtmsg():I32 => @pony_os_sockopt_option(I32(400))\nfun netlink_drop_membership():I32 => @pony_os_sockopt_option(I32(401))"} +{"id": "Pony/8_sugar_7.txt", "contents": "```pony\nfoo1(2, 3) = x\nfoo2() = x\nfoo3(37, \"Hello\", 3.5 where a = 2, b = 3) = x\n```\n\n__Does it matter where `value` appears in my parameter list?__ Whilst it doesn't strictly matter it is good practice to put `value` as the last parameter. That way all of the others can be specified by position.\n"} +{"id": "Pony/builtin-UnsignedInteger-_22.txt", "contents": "\nA\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem_unsafe\u00b6"} +{"id": "Pony/net-OSSockOpt-_382.txt", "contents": "fun box sctp_fragment_interleave()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_frag_level_0\u00b6\n[Source]\nfun box sctp_frag_level_0()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_frag_level_1\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_61.txt", "contents": "fun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_49.txt", "contents": "I128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-UnsignedInteger-_11.txt", "contents": "[Source]\nfun box mod_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nshl_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf non-zero bits are shifted-out, the result is undefined.\nfun box shl_unsafe(\ny: A)"} +{"id": "Pony/src-builtin-compare-_3.txt", "contents": "interface Equatable[A: Equatable[A] #read]\nfun eq(that: box->A): Bool => this is that\nfun ne(that: box->A): Bool => not eq(that)\n\ninterface Comparable[A: Comparable[A] #read] is Equatable[A]\nfun lt(that: box->A): Bool\nfun le(that: box->A): Bool => lt(that) or eq(that)\nfun ge(that: box->A): Bool => not lt(that)\nfun gt(that: box->A): Bool => not le(that)\n\nfun compare(that: box->A): Compare =>\nif eq(that) then\nEqual\nelseif lt(that) then\nLess\nelse\nGreater\nend\n\n"} +{"id": "Pony/net-OSSockOpt-_446.txt", "contents": "fun box sctp_pr_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_reconfig_supported\u00b6\n[Source]\nfun box sctp_reconfig_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_recvnxtinfo\u00b6\n[Source]"} +{"id": "Pony/scheduling_1.txt", "contents": "# FFI and monopolizing the scheduler\n\nAn easy way to monopolize a scheduler thread is to use the FFI facilities of Pony to kick off code that doesn't return for an extended period of time. You do not want to do this. Do not call FFI code that doesn't return in a reasonable amount of time.\n"} +{"id": "Pony/src-builtin-do_not_optimise-_0.txt", "contents": "\n\n\n\n\n\n\ndo_not_optimise.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-tcp_listen_notify-_4.txt", "contents": "newly established connection to the server.\n\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-ring_buffer-_0.txt", "contents": "\n\n\n\n\n\n\nring_buffer.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/1_variables_8.txt", "contents": "var _hunger_level: U64\n\nnew ref create(name': String, level: U64) =>\nname = name'\nset_hunger_level(level)\n// Error: field _hunger_level left undefined in constructor\n\nfun ref set_hunger_level(hunger_level: U64) =>\n_hunger_level = hunger_level\n```\n\nWe will see later in the Methods section that a class can have several constructors. For now, just remember that if the assignment of a field is not done at the definition level, it has to be done in each constructor of the class the field belongs to.\n\nAs for variables, using `var` means a field can be assigned and reassigned as many times as you like in the class. Using `let` means the field can only be assigned once.\n\n```pony\nclass Wombat\nlet name: String\nvar _hunger_level: U64\n"} +{"id": "Pony/src-builtin-signed-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-cli-command-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-real-_57.txt", "contents": "this >>~ y\n\nfun popcount(): B\nfun clz(): B\nfun ctz(): B\n\nfun clz_unsafe(): B\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n\nfun ctz_unsafe(): B\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n\nfun bitwidth(): B\n"} +{"id": "Pony/net-OSSockOpt-_353.txt", "contents": "fun box sctp_cc_hstcp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_htcp\u00b6\n[Source]\nfun box sctp_cc_htcp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cc_option\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-builtin-array-_83.txt", "contents": "delete(_size - 1)?\n\nfun ref unshift(value: A) =>\n\"\"\"\nAdd an element to the beginning of the array.\n\"\"\"\ntry\ninsert(0, consume value)?\nend\n\nfun ref shift(): A^ ? =>\n\"\"\"\nRemove an element from the beginning of the array.\nThe removed element is returned.\n\"\"\"\ndelete(0)?\n\nfun ref append(\nseq: (ReadSeq[A] & ReadElement[A^]),\noffset: USize = 0,"} +{"id": "Pony/builtin-U8-_63.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_37.txt", "contents": "[Source]\nfun box sub(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: A)\n: A\n"} +{"id": "Pony/files-FileRead-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileRead val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/3_arithmetic_12.txt", "contents": "## Unsafe Floating Point Arithmetic\n\nUnsafe Floating Point operations do not necessarily comply with IEEE 754 for every input or every result. If any argument to an unsafe operation or its result are `+/-Inf` or `NaN`, the result is actually undefined.\n\nThis allows more aggressive optimizations and for faster execution, but only yields valid results for values different that the exceptional values `+/-Inf` and `NaN`. We suggest to only use unsafe arithmetic on floats if you can exclude those cases.\n\n---\n\n| Operator | Method |\n| -------- | ------------ |\n| `+~` | `add_unsafe()` |\n| `-~` | `sub_unsafe()` |\n| `*~` | `mul_unsafe()` |\n| `/~` | `div_unsafe()` |\n| `%~` | `rem_unsafe()` |\n| `%%~` | `mod_unsafe()` |\n| `-~` | `neg_unsafe()` |\n| `<~` | `lt_unsafe()` |\n| `>~` | `gt_unsafe()` |\n| `<=~` | `le_unsafe()` |"} +{"id": "Pony/builtin-Real-_34.txt", "contents": "F64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: box->A)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n"} +{"id": "Pony/src-collections-heap-_13.txt", "contents": "while true do\nvar left = (2 * idx) + 1\nif (left >= n) or (left < 0) then\nbreak\nend\nlet right = left + 1\nif (right < n) and P(_data(right)?, _data(left)?) then\nleft = right\nend\nif not P(_data(left)?, _data(idx)?) then\nbreak\nend\n_data.swap_elements(idx, left)?\nidx = left\nend\nend\nidx > start\n\nfun _apply(i: USize): this->A ? =>\n_data(i)?"} +{"id": "Pony/builtin-U32-_36.txt", "contents": "fun box op_or(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-promises-promise-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-HashMap-_12.txt", "contents": ": HashMap[this->K!, this->V!, H2] ref^\n\nParameters\u00b6\n\nkey: this->K!\nvalue: this->V!\n\nReturns\u00b6\n\nHashMap[this->K!, this->V!, H2] ref^\n\n\nsub[optional H2: HashFunction[this->K!] val]\u00b6\n[Source]\nThis without the given key.\nfun box sub[optional H2: HashFunction[this->K!] val](\nkey: this->K!)\n: HashMap[this->K!, this->V!, H2] ref^\n\nParameters\u00b6"} +{"id": "Pony/src-random-splitmix64-_0.txt", "contents": "\n\n\n\n\n\n\nsplitmix64.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-String-_42.txt", "contents": "Returns\u00b6\n\nU8 val ?\n\n\nunshift\u00b6\n[Source]\nAdds a byte to the beginning of the string.\nfun ref unshift(\nvalue: U8 val)\n: None val\n\nParameters\u00b6\n\nvalue: U8 val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/src-cli-env_vars-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-I64-_12.txt", "contents": "fun box mod(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_54.txt", "contents": "1072\n1073\n1074\n1075\n1076\n1077\n1078\n1079\n1080\n1081\n1082\n1083\n1084\n1085\n1086\n1087\n1088\n1089\n1090\n1091"} +{"id": "Pony/src-builtin-unsigned-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-F64-_3.txt", "contents": "\ni: U64 val\n\nReturns\u00b6\n\nF64 val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val) & Real[B] val)](\na: B)\n: F64 val^\n\nParameters\u00b6"} +{"id": "Pony/time-Time-_0.txt", "contents": "\n\n\n\n\n\n\nTime\u00b6\n[Source]\nA collection of ways to fetch the current time.\nprimitive val Time\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Time val^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_419.txt", "contents": "fun box sctp_pcb_flags_blocking_io()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_boundall\u00b6\n[Source]\nfun box sctp_pcb_flags_boundall()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_bound_v6\u00b6\n[Source]"} +{"id": "Pony/builtin-AsioEvent-_6.txt", "contents": "[Source]\nfun box write()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\ntimer\u00b6\n[Source]\nfun box timer()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nsignal\u00b6"} +{"id": "Pony/net-OSSockOpt-_489.txt", "contents": "fun box so_group_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_group_priority\u00b6\n[Source]\nfun box so_group_priority()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_hci_raw_direction\u00b6\n[Source]"} +{"id": "Pony/builtin-UnsignedInteger-_60.txt", "contents": "\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Array-_45.txt", "contents": "Returns true if the array contains value, false otherwise.\nThe default predicate checks for matches by identity. To search for matches\nby structural equality, pass an object literal such as {(l, r) => l == r}.\nfun box contains(\nvalue: A!,\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda)\n: Bool val\n\nParameters\u00b6\n\nvalue: A!\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda\n\nReturns\u00b6\n\nBool val\n\n\nrfind\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_17.txt", "contents": "(U128 val , U128 val)\n\n\ndiv_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box div_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n"} +{"id": "Pony/net-OSSockOpt-_80.txt", "contents": "fun box dccp_sockopt_change_r()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_get_cur_mps\u00b6\n[Source]\nfun box dccp_sockopt_get_cur_mps()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_packet_size\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_49.txt", "contents": "\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-files-directory-_52.txt", "contents": "end\n\nfun rename(source: String, to: Directory box, target: String): Bool =>\n\"\"\"\nRename source (which is relative to this directory) to target (which is\nrelative to the `to` directory).\n\"\"\"\nif\nnot path.caps(FileLookup)\nor not path.caps(FileRename)\nor not to.path.caps(FileLookup)\nor not to.path.caps(FileCreate)\nor (_fd == -1)\nor (to._fd == -1)\nthen\nreturn false\nend\n\ntry\nlet path' = FilePath.from(path, source, path.caps)?"} +{"id": "Pony/examples_3.txt", "contents": "# Enumeration which can be iterated\n\n```pony\nprimitive Black\nprimitive Blue\nprimitive Red\nprimitive Yellow\n\ntype Colour is (Black | Blue | Red | Yellow)\n\nprimitive ColourList\nfun tag apply(): Array[Colour] =>\n[Black; Blue; Red; Yellow]\n\nfor colour in ColourList().values() do\nend\n```\n"} +{"id": "Pony/capsicum-Cap-_23.txt", "contents": "fun box accept()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbind\u00b6\n[Source]\nfun box bind()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nconnect\u00b6\n[Source]"} +{"id": "Pony/src-buffered-writer-_19.txt", "contents": "\nfun ref u8(data: U8) =>\n\"\"\"\nWrite a byte to the buffer.\n\"\"\"\nlet num_bytes = U8(0).bytewidth()\n_current.push_u8(data)\n_size = _size + num_bytes\n\nfun ref u16_le(data: U16) =>\n\"\"\"\nWrite a U16 to the buffer in little-endian byte order.\n\"\"\"\nlet num_bytes = U16(0).bytewidth()\nifdef littleendian then\n_current.push_u16(data)\nelse\n_current.push_u16(data.bswap())\nend\n_size = _size + num_bytes"} +{"id": "Pony/src-builtin-float-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-ULong-_39.txt", "contents": "ULong val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nmul\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_599.txt", "contents": "fun box tipc_conn_shutdown()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_conn_timeout\u00b6\n[Source]\nfun box tipc_conn_timeout()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_critical_importance\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_32.txt", "contents": "An extended key.\n\"\"\"\nmatch _esc_num\n| 1 => _home()\n| 2 => _insert()\n| 3 => _delete()\n| 4 => _end()\n| 5 => _page_up()\n| 6 => _page_down()\n| 11 => _fn_key(1)\n| 12 => _fn_key(2)\n| 13 => _fn_key(3)\n| 14 => _fn_key(4)\n| 15 => _fn_key(5)\n| 17 => _fn_key(6)\n| 18 => _fn_key(7)\n| 19 => _fn_key(8)\n| 20 => _fn_key(9)\n| 21 => _fn_key(10)\n| 23 => _fn_key(11)"} +{"id": "Pony/pony_test-TestList-_0.txt", "contents": "\n\n\n\n\n\n\nTestList\u00b6\n[Source]\nSource of unit tests for a PonyTest object.\nSee package doc string for further information and example use.\ntrait ref TestList\n\nPublic Functions\u00b6\ntests\u00b6\n[Source]\nAdd all the tests in this suite to the given test object.\nTypically the implementation of this function will be of the form:\nfun tests(test: PonyTest) =>\ntest(_TestClass1)"} +{"id": "Pony/net-OSSockOpt-_320.txt", "contents": "fun box rose_holdback()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_idle\u00b6\n[Source]\nfun box rose_idle()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_invalid_facility\u00b6\n[Source]"} +{"id": "Pony/src-builtin-std_stream-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_331.txt", "contents": "fun box sctp_adaptation_layer()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_adaption_layer\u00b6\n[Source]\nfun box sctp_adaption_layer()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_add_streams\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_110.txt", "contents": "\"\"\"\nUnchops two iso strings to return the original string they were chopped\nfrom. Both input strings are isolated and mutable and were originally\nchopped from a single string. This function checks that they are indeed two\nstrings chopped from the same original string and can be unchopped before\ndoing the unchopping and returning the unchopped string. If the two strings\ncannot be unchopped it returns both strings without modifying them.\nThe operation does not allocate a new string pointer nor copy elements.\n\"\"\"\nif _size == 0 then\nreturn consume b\nend\n\nif b.size() == 0 then\nreturn consume this\nend\n\n(let unchoppable, let a_left) =\nif (_size == _alloc) and (cpointer(_size) == b.cpointer()) then\n(true, true)"} +{"id": "Pony/builtin-F32-_49.txt", "contents": "y: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\ndiv\u00b6\nfun box div(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n"} +{"id": "Pony/net-OSSockOpt-_378.txt", "contents": "fun box sctp_enable_stream_reset()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_enable_value_mask\u00b6\n[Source]\nfun box sctp_enable_value_mask()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_established\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_27.txt", "contents": "When any assertion function fails the test is counted as a fail. However, tests\ncan also indicate failure by raising an error in the test function.\n"} +{"id": "Pony/src-collections-sort-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78primitive Sort[A: Seq[B] ref, B: Comparable[B] #read]\n\"\"\"\nImplementation of dual-pivot quicksort. It operates in-place on the provided Seq, using\na small amount of additional memory. The nature of the element-realation is expressed via\nthe supplied comparator.\n\n(The following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Quicksort).)\n\nQuicksort is a common implementation of a sort algorithm which can sort items of any type\nfor which a \"less-than\" relation (formally, a total order) is defined.\n\nOn average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case,\nit makes O(n2) comparisons, though this behavior is rare. Multi-pivot implementations\n(of which dual-pivot is one) make efficient use of modern processor caches."} +{"id": "Pony/net-TCPConnection-_15.txt", "contents": "new tag ip6(\nauth: TCPConnectAuth val,\nnotify: TCPConnectionNotify iso,\nhost: String val,\nservice: String val,\nfrom: String val = \"\",\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)\n: TCPConnection tag^\n\nParameters\u00b6\n\nauth: TCPConnectAuth val\nnotify: TCPConnectionNotify iso\nhost: String val\nservice: String val\nfrom: String val = \"\"\nread_buffer_size: USize val = 16384\nyield_after_reading: USize val = 16384"} +{"id": "Pony/collections-Sort-_0.txt", "contents": "\n\n\n\n\n\n\nSort[A: Seq[B] ref, B: Comparable[B] #read]\u00b6\n[Source]\nImplementation of dual-pivot quicksort. It operates in-place on the provided Seq, using\na small amount of additional memory. The nature of the element-realation is expressed via\nthe supplied comparator.\n(The following is paraphrased from Wikipedia.)\nQuicksort is a common implementation of a sort algorithm which can sort items of any type\nfor which a \"less-than\" relation (formally, a total order) is defined.\nOn average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case,\nit makes O(n2) comparisons, though this behavior is rare. Multi-pivot implementations\n(of which dual-pivot is one) make efficient use of modern processor caches.\nExample program\u00b6\nThe following takes an reverse-alphabetical array of Strings (\"third\", \"second\", \"first\"),"} +{"id": "Pony/src-builtin-signed-_90.txt", "contents": "\nfun f32_unsafe(): F32 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nf64_unsafe().f32_unsafe()\n\nfun f64_unsafe(): F64 =>\n\"\"\"\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\n\"\"\"\nf64()\n\nfun addc(y: I128): (I128, Bool) =>\nifdef native128 then\n@\"llvm.sadd.with.overflow.i128\"(this, y)\nelse\nlet overflow ="} +{"id": "Pony/src-files-file_path-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/collections-persistent-Lists-_0.txt", "contents": "\n\n\n\n\n\n\nLists[A: A]\u00b6\n[Source]\nA primitive containing helper functions for constructing and\ntesting Lists.\nprimitive val Lists[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Lists[A] val^\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-signed-_69.txt", "contents": "end\n\nfun ctz(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.cttz.i32\"(this.u32(), false).ulong()\nelse\n@\"llvm.cttz.i64\"(this.u64(), false).ulong()\nend\n\nfun clz_unsafe(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.ctlz.i32\"(this.u32(), true).ulong()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), true).ulong()\nend\n\nfun ctz_unsafe(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.cttz.i32\"(this.u32(), false).ulong()\nelse"} +{"id": "Pony/builtin-FloatingPoint-_69.txt", "contents": "U128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-DoNotOptimise-_4.txt", "contents": "\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-USize-_51.txt", "contents": "fun box ilong()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]"} +{"id": "Pony/buffered-Reader-_37.txt", "contents": "\nReturns\u00b6\n\nF32 val ?\n\n\npeek_f64_be\u00b6\n[Source]\nPeek at a big-endian F64.\nfun box peek_f64_be(\noffset: USize val = 0)\n: F64 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nF64 val ?"} +{"id": "Pony/src-pony_check-property_unit_test-_11.txt", "contents": "let params = prop.params()\nh.long_test(params.timeout)\nlet property_runner =\nPropertyRunner[T](\nconsume prop,\nparams,\nh, // treat it as PropertyResultNotify\nh, // is also a PropertyLogger for us\nh.env\n)\nh.dispose_when_done(property_runner)\nproperty_runner.run()\n\nclass iso Property2UnitTest[T1, T2] is UnitTest\n\nvar _prop2: ( Property2[T1, T2] iso | None )\nlet _name: String\n\nnew iso create(p2: Property2[T1, T2] iso, name': (String | None) = None) =>\n_name ="} +{"id": "Pony/src-files-file-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-files-file_path-_28.txt", "contents": "\nnew val _create(path': String, caps': FileCaps val) =>\n\"\"\"\nInternal constructor.\n\"\"\"\npath = path'\ncaps.union(caps')\n\nfun val join(\npath': String,\ncaps': FileCaps val = recover val FileCaps .> all() end)\n: FilePath ?\n=>\n\"\"\"\nReturn a new path relative to this one.\n\"\"\"\nfrom(this, path', caps')?\n\nfun val walk(handler: WalkHandler ref, follow_links: Bool = false) =>\n\"\"\""} +{"id": "Pony/pony_test--index-_8.txt", "contents": "passed or failed. If a test times out tear_down() will be called after\ntimed_out() returns.\nWhen a test is in an exclusion group, the tear_down() call is considered part\nof the tests run. The next test in the exclusion group will not start until\nafter tear_down() returns on the current test.\nThe test's TestHelper is handed to tear_down() and it is permitted to log\nmessages and call assert functions during tear down.\nExample\u00b6\nThe following example creates a temporary directory in the set_up() function\nand removes it in the tear_down() function, thus\nsimplifying the test function itself:\nuse \"pony_test\"\nuse \"files\"\n\nclass iso TempDirTest\nvar tmp_dir: (FilePath | None) = None\n\nfun name(): String => \"temp-dir\"\n\nfun ref set_up(h: TestHelper)? =>"} +{"id": "Pony/builtin-U8-_0.txt", "contents": "\n\n\n\n\n\n\nU8\u00b6\n[Source]\nprimitive val U8 is\nUnsignedInteger[U8 val] val\n\nImplements\u00b6\n\nUnsignedInteger[U8 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/src-builtin-array-_47.txt", "contents": "932\n933\n934\n935\n936\n937\n938\n939\n940\n941\n942\n943\n944\n945\n946\n947\n948\n949\n950\n951"} +{"id": "Pony/src-builtin-real-_49.txt", "contents": "Calculates the remainder of this number divided by `y`.\n\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nthis %~ y\n\nfun fld_unsafe(y: A): A\n\"\"\"\nFloored division, rounded towards negative infinity,\nas opposed to `div` which rounds towards zero.\n\n*Unsafe Operation*\n\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\n\nfun mod_unsafe(y: A): A"} +{"id": "Pony/pony_check-IntPropertySample-_2.txt", "contents": "[Source]\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I16-_34.txt", "contents": "fun box op_or(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-I32-_11.txt", "contents": "I32 val\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_50.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_54.txt", "contents": "\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]\nfun box i16_unsafe()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/calling-c_10.txt", "contents": "A `NullablePointer` type can only be used with `structs`, and is only intended for output parameters (like in the example above) or for return types from C. You don't need to use a `NullablePointer` if you are only passing a `struct` as a regular input parameter.\n"} +{"id": "Pony/src-cli-command_parser-_28.txt", "contents": "args: Array[String] ref)\n: (Option | SyntaxError)\n=>\n\"\"\"\n--opt=foo => --opt has argument foo\n--opt foo => --opt has argument foo, iff arg is required\n\"\"\"\n// Only split the token in two parts. If argument contains '=',\n// and the token is of the form --opt=foo=bar, then targ will contain foo=bar\nlet parts = token.split(\"=\", 2)\nlet name = try parts(0)? else \"???\" end\nlet targ = try parts(1)? else None end\nmatch _option_with_name(name)\n| let os: OptionSpec => _OptionParser.parse(os, targ, args)\n| None => SyntaxError(name, \"unknown long option\")\nend\n\nfun _parse_short_options(\ntoken: String,\nargs: Array[String] ref)"} +{"id": "Pony/src-builtin-signed-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-ReadElement-_1.txt", "contents": "Parameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nA ?\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-readline-_33.txt", "contents": "fun ref _delete_prev_word() =>\n\"\"\"\nDelete the previous word.\n\"\"\"\ntry\nlet old = _cur_pos\n\nwhile (_cur_pos > 0) and (_edit((_cur_pos - 1).usize())? == ' ') do\n_cur_pos = _cur_pos - 1\nend\n\nwhile (_cur_pos > 0) and (_edit((_cur_pos - 1).usize())? != ' ') do\n_cur_pos = _cur_pos - 1\nend\n\n_edit.delete(_cur_pos, (old - _cur_pos).usize())\n_refresh_line()\nend\n\nfun ref _tab() =>"} +{"id": "Pony/files-FileMode-_1.txt", "contents": ": FileMode iso^\n\nReturns\u00b6\n\nFileMode iso^\n\n\nPublic fields\u00b6\nvar setuid: Bool val\u00b6\n[Source]\ntrue if the SETUID bit is set.\n\nvar setgid: Bool val\u00b6\n[Source]\ntrue if the SETGID bit is set.\n\nvar sticky: Bool val\u00b6\n[Source]\ntrue if the sticky bit is set.\n"} +{"id": "Pony/files-FileMkdir-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileMkdir val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-pony_test-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-string-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/random-Random-_4.txt", "contents": "u32\u00b6\n[Source]\nA random integer in [0, 2^32)\nfun ref u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nA random integer in [0, 2^64)\nfun ref u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val"} +{"id": "Pony/collections-persistent-Lists-_5.txt", "contents": "\nBool val ?\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Lists[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Lists[A] val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-pony_check-generator-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/src-itertools-iter-_79.txt", "contents": "### Examples\n\n```pony\nIter[I64]([1; 2; 3].values())\n.find({(x) => (x % 2) == 0 })\n```\n`2`\n\n```pony\nIter[I64]([1; 2; 3; 4].values())\n.find({(x) => (x % 2) == 0 }, 2)\n```\n`4`\n\"\"\"\nvar c = n\nfor x in _iter do\nif try f(x)? else false end then\nif c == 1 then\nreturn x\nelse"} +{"id": "Pony/pony_check-Generators-_28.txt", "contents": "u32\u00b6\n[Source]\nCreate a generator for U32 values.\nfun box u32(\nmin: U32 val = call,\nmax: U32 val = call)\n: Generator[U32 val] box\n\nParameters\u00b6\n\nmin: U32 val = call\nmax: U32 val = call\n\nReturns\u00b6\n\nGenerator[U32 val] box\n\n\nu64\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_31.txt", "contents": "\nParameters\u00b6\n\ns: String box\noffset: ISize val = 0\nnth: USize val = 0\n\nReturns\u00b6\n\nISize val ?\n\n\nrfind\u00b6\n[Source]\nReturn the index of n-th instance of s in the string starting from the\nend. The offset represents the highest index to included in the search.\nRaise an error if there is no n-th occurrence of s or s is empty.\nfun box rfind(\ns: String box,\noffset: ISize val = call,"} +{"id": "Pony/format-PrefixSpace-_1.txt", "contents": "new val create()\n: PrefixSpace val^\n\nReturns\u00b6\n\nPrefixSpace val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: PrefixSpace val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixSpace val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-generator-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-collections-list-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/collections-List-_24.txt", "contents": "When len is -1, all elements of sequence are pushed.\nDoes not remove elements from sequence.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.append(other_list) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is unchanged\n\nfun ref append(\nseq: (ReadSeq[A] box & ReadElement[A^] box),\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n\nseq: (ReadSeq[A] box & ReadElement[A^] box)\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n"} +{"id": "Pony/net-NetAuth-_0.txt", "contents": "\n\n\n\n\n\n\nNetAuth\u00b6\n[Source]\nprimitive val NetAuth\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create(\nfrom: AmbientAuth val)\n: NetAuth val^\n\nParameters\u00b6\n"} +{"id": "Pony/src-capsicum-cap-_8.txt", "contents": "fun mmap_rw(): U64 => mmap_r() or mmap_w()\nfun mmap_rx(): U64 => mmap_r() or mmap_x()\nfun mmap_wx(): U64 => mmap_w() or mmap_x()\nfun mmap_rwx(): U64 => mmap_r() or mmap_w() or mmap_x()\n\nfun creat(): U64 => _id(0, 1 << 6)\nfun fexecve(): U64 => _id(0, 1 << 7)\nfun fsync(): U64 => _id(0, 1 << 8)\nfun ftruncate(): U64 => _id(0, 1 << 9)\nfun lookup(): U64 => _id(0, 1 << 10)\nfun fchdir(): U64 => _id(0, 1 << 11)\nfun fchflags(): U64 => _id(0, 1 << 12)\nfun chflagsat(): U64 => fchflags() or lookup()\nfun fchmod(): U64 => _id(0, 1 << 13)\nfun fchmodat(): U64 => fchmod() or lookup()\nfun fchown(): U64 => _id(0, 1 << 14)\nfun fchownat(): U64 => fchown() or lookup()\nfun fcntl(): U64 => _id(0, 1 << 15)\nfun flock(): U64 => _id(0, 1 << 16)\nfun fpathconf(): U64 => _id(0, 1 << 17)"} +{"id": "Pony/builtin-I64-_58.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/format-FormatBinaryBare-_0.txt", "contents": "\n\n\n\n\n\n\nFormatBinaryBare\u00b6\n[Source]\nprimitive val FormatBinaryBare is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_48.txt", "contents": "A\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/net-DNS-_4.txt", "contents": "\nArray[NetAddress val] iso^\n\n\nbroadcast_ip4\u00b6\n[Source]\nLink-local IP4 broadcast address.\nfun box broadcast_ip4(\nauth: DNSAuth val,\nservice: String val)\n: Array[NetAddress val] iso^\n\nParameters\u00b6\n\nauth: DNSAuth val\nservice: String val\n\nReturns\u00b6\n\nArray[NetAddress val] iso^"} +{"id": "Pony/net-OSSockOpt-_500.txt", "contents": "fun box so_max_pacing_rate()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_multipoint\u00b6\n[Source]\nfun box so_multipoint()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_netsvc_marking_level\u00b6\n[Source]"} +{"id": "Pony/divide-by-zero_1.txt", "contents": "# Divide by zero in Pony\n\nIn Pony, *integer division by zero results in zero*. That's right,\n\n```pony\nlet x = I64(1) / I64(0)\n```\n\nresults in `0` being assigned to `x`. Baffling right? Well, yes and no. From a mathematical standpoint, it is very much baffling. From a practical standpoint, it is very much not.\n\nWhile Pony has [Partial division](/expressions/arithmetic.md#partial-and-checked-arithmetic):\n\n```pony\nlet x =\ntry\nI64(1) /? I64(0)\nelse\n// handle division by zero\nend\n```"} +{"id": "Pony/cli-EnvVars-_2.txt", "contents": "\nenvs: (Array[String val] box | None val)\nprefix: String val = \"\"\nsquash: Bool val = false\n\nReturns\u00b6\n\nHashMap[String val, String val, HashEq[String val] val] val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: EnvVars val)\n: Bool val\n\nParameters\u00b6\n\nthat: EnvVars val\n"} +{"id": "Pony/builtin-I16-_23.txt", "contents": "(I16 val , I16 val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\nmod_partial\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_496.txt", "contents": "fun box so_linger_sec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_linkinfo\u00b6\n[Source]\nfun box so_linkinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_listenincqlen\u00b6\n[Source]"} +{"id": "Pony/promises-Promise-_12.txt", "contents": "\nPromise[Array[A] val] tag\n\n\nselect\u00b6\n[Source]\nReturn a promise that is fulfilled when either promise is fulfilled,\nresulting in a tuple of its value and the other promise.\nfun tag select(\np: Promise[A] tag)\n: Promise[(A , Promise[A] tag)] tag\n\nParameters\u00b6\n\np: Promise[A] tag\n\nReturns\u00b6\n\nPromise[(A , Promise[A] tag)] tag\n"} +{"id": "Pony/cli-CommandHelp-_2.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\nprint_help\u00b6\n[Source]\nPrints the help message to an OutStream.\nfun box print_help(\nos: OutStream tag)\n: None val\n\nParameters\u00b6\n\nos: OutStream tag\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_29.txt", "contents": "fun box add_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: I128 val)\n: I128 val ?\n\nParameters\u00b6"} +{"id": "Pony/src-term-ansi-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-USize-_19.txt", "contents": "(USize val , USize val) ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: USize val)\n: USize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nshr\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_89.txt", "contents": "\"\"\"\nPrivate helper for `reverse`, recursively working with `ListNode`s.\n\"\"\"\ntry acc.unshift(ln()?) end\n\ntry\n_reverse(ln.next() as this->ListNode[A], acc)\nelse\nacc\nend\n\nfun contains[B: (A & HasEq[A!] #read) = A](a: box->B): Bool =>\n\"\"\"\nReturns `true` if the `List` contains the provided element, otherwise returns `false`.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet contains_b = my_list.contains[String](\"b\") // true\n```\n\"\"\""} +{"id": "Pony/buffered-Writer-_22.txt", "contents": "\ndata: I128 val\n\nReturns\u00b6\n\nNone val\n\n\nwrite\u00b6\n[Source]\nWrite a ByteSeq to the buffer.\nfun ref write(\ndata: (String val | Array[U8 val] val))\n: None val\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\nReturns\u00b6"} +{"id": "Pony/src-promises-promise-_28.txt", "contents": "\nprimitive FetchIssue\nfun apply(number: I64, repo: Repository): Promise[Issue] =>\nrepo.get_issue(number)\n\nprimitive PrintIssueTitle\nfun apply(out: OutStream, issue: Promise[Issue]) =>\n// O NO! We can't print the title\n// We don't have an issue, we have a promise for an issue\n```\n\nTake a look at what happens in the example, when we get to\n`PrintIssueTitle`, we can't print anything because we \"don't have anything\".\nIn order to print the issue title, we need an `Issue` not a\n`Promise[Issue]`.\n\nWe could solve this by doing something like this:\n\n```pony\nprimitive PrintIssueTitle"} +{"id": "Pony/builtin-U128-_31.txt", "contents": "fun box fld(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-collections-range-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_151.txt", "contents": "fun box ipv6_prefer_src_cga()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_coa\u00b6\n[Source]\nfun box ipv6_prefer_src_coa()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_prefer_src_home\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_list-_2.txt", "contents": "```\n\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_test-TestHelper-_6.txt", "contents": "\ntest: ITest box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_no_error\u00b6\n[Source]\nAssert that the gived test function does not throw an error when run.\nfun box assert_no_error(\ntest: ITest box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_38.txt", "contents": "\nfun assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A],\nactual: ReadSeq[A],\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the contents of the 2 given ReadSeqs are equal ignoring order.\n\"\"\"\ntry\nlet missing = Array[box->A]\nlet consumed = Array[Bool].init(false, actual.size())\nfor e in expect.values() do\nvar found = false\nvar i: USize = -1\nfor a in actual.values() do\ni = i + 1\nif consumed(i)? then continue end"} +{"id": "Pony/src-collections-flag-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/promises-Promise-_7.txt", "contents": "issue.next[None](PrintIssueTitle~apply(env.out))\n\nit can be hard to follow what is going on. We can only tell what is\nhappening because we gave PrintIssueTitle a very misleading name; it\ndoesn't print an issue title.\nflatten_next addresses the problem of \"we want the Issue, not the\nintermediate Promise\". flatten_next takes an intermediate promise and\nunwraps it into the fulfilled type. You get to write your promise chain\nwithout having to worry about intermediate promises.\nUpdated to use flatten_next, our API example becomes:\nactor Main\nnew create(env: Env) =>\nlet repo: Promise[Repository] =\nGitHub(\"my token\").get_repo(\"ponylang/ponyc\")\n\nlet issue = Promise[Issue] =\nrepo.flatten_next[Issue](FetchIssue~apply(1))\n\nissue.next[None](PrintIssueTitle~apply(env.out))\n"} +{"id": "Pony/src-collections-list-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-U8-_44.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: U8 val)\n: Bool val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I128-_47.txt", "contents": "fun box le(\ny: I128 val)\n: Bool val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: I128 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-term-ansi-_29.txt", "contents": "\"\"\"\nBright yellow background.\n\"\"\"\n\"\\x1B[103m\"\n\nfun bright_blue_bg(): String =>\n\"\"\"\nBright blue background.\n\"\"\"\n\"\\x1B[104m\"\n\nfun bright_magenta_bg(): String =>\n\"\"\"\nBright magenta background.\n\"\"\"\n\"\\x1B[105m\"\n\nfun bright_cyan_bg(): String =>\n\"\"\"\nBright cyan background."} +{"id": "Pony/collections-ListNodes-_2.txt", "contents": "has_next\u00b6\n[Source]\nIndicates whether there are any nodes remaining in the iterator.\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]\nReturn the next node in the iterator, advancing the iterator by one element.\nOrder of return is determined by reverse argument during creation.\nfun ref next()\n: N ?\n\nReturns\u00b6\n"} +{"id": "Pony/term-Readline-_15.txt", "contents": "alt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\nsize\u00b6\n[Source]\nfun ref size(\nrows: U16 val,\ncols: U16 val)\n: None val\n\nParameters\u00b6\n\nrows: U16 val\ncols: U16 val\n"} +{"id": "Pony/net-OSSockOpt-_590.txt", "contents": "fun box tcp_saved_syn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_save_syn\u00b6\n[Source]\nfun box tcp_save_syn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_sendmoreacks\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_37.txt", "contents": "fun box exattr_delete()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nexattr_get\u00b6\n[Source]\nfun box exattr_get()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nexattr_list\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/builtin-I64-_34.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_605.txt", "contents": "fun box tipc_link_state()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_low_importance\u00b6\n[Source]\nfun box tipc_low_importance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_max_bearer_name\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-buffered-reader-_79.txt", "contents": "let len = (search_len + data.find(byte, offset)? + 1) - offset\nsearch_len = 0\nreturn len\nend\n\nsearch_len = search_len + (data.size() - offset)\n\nif not node.has_next() then\nbreak\nend\n\nnode = node.next() as ListNode[(Array[U8] val, USize)]\nend\n\nerror\n\nfun ref _search_length(): USize ? =>\n\"\"\"\nGet the length of a pending line. Raise an error if there is no pending\nline."} +{"id": "Pony/src-collections-ring_buffer-_6.txt", "contents": "The number of elements that have been added to the ring.\n\"\"\"\n_write\n\nfun space(): USize =>\n\"\"\"\nThe available space in the ring.\n\"\"\"\n_mod + 1\n\nfun apply(i: USize): this->A ? =>\n\"\"\"\nGet the i-th element from the ring. If the i-th element has not yet been\nadded or is no longer available, this will raise an error.\n\"\"\"\nif (i >= _write) or ((_write - i) > space()) then\nerror\nend\n\n_array(i and _mod)?"} +{"id": "Pony/net-OSSockOpt-_369.txt", "contents": "fun box sctp_data_frag_mask()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_last_frag\u00b6\n[Source]\nfun box sctp_data_last_frag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_middle_frag\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_1.txt", "contents": "[Source]\nnew val create()\n: Nil[A] val^\n\nReturns\u00b6\n\nNil[A] val^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nReturns the size of the list.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n"} +{"id": "Pony/net-OSSockOpt-_207.txt", "contents": "fun box ip_fw_nat_get_log()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_resetlog\u00b6\n[Source]\nfun box ip_fw_resetlog()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_table_add\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_259.txt", "contents": "fun box mrt_del_bw_upcall()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_del_mfc\u00b6\n[Source]\nfun box mrt_del_mfc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_del_vif\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_487.txt", "contents": "fun box so_donttrunc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_error\u00b6\n[Source]\nfun box so_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_exclusiveaddruse\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_483.txt", "contents": "fun box so_conditional_accept()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_connect_time\u00b6\n[Source]\nfun box so_connect_time()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_debug\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_591.txt", "contents": "fun box tcp_sendmoreacks()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_syncnt\u00b6\n[Source]\nfun box tcp_syncnt()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_s_data_in\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-pony_check-_15.txt", "contents": "\nfun apply(h: TestHelper) =>\nPonyCheck.for_all[U8](recover Generators.unit[U8](0) end, h)(\n{(u, h) =>\nh.assert_eq(u, 0)\nconsume u\n})\n```\n\"\"\"\nForAll[T](gen, h)\n\nfun for_all2[T1, T2](\ngen1: Generator[T1] val,\ngen2: Generator[T2] val,\nh: TestHelper)\n: ForAll2[T1, T2]\n=>\nForAll2[T1, T2](gen1, gen2, h)\n\nfun for_all3[T1, T2, T3]("} +{"id": "Pony/process-ChdirError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-RuntimeOptions-_2.txt", "contents": "\nPublic fields\u00b6\nvar ponymaxthreads: U32 val\u00b6\n[Source]\nUse N scheduler threads. Defaults to the number of cores (not hyperthreads)\navailable.\nThis can't be larger than the number of cores available.\n\nvar ponyminthreads: U32 val\u00b6\n[Source]\nMinimum number of active scheduler threads allowed.\nDefaults to 0, meaning that all scheduler threads are allowed to be\nsuspended when no work is available.\nThis can't be larger than --ponymaxthreads if provided, or the physical\ncores available.\n\nvar ponynoscale: Bool val\u00b6\n[Source]\nDon't scale down the scheduler threads.\nSee --ponymaxthreads on how to specify the number of threads explicitly."} +{"id": "Pony/src-pony_check-property_helper-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-pony_test-test_helper-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-tcp_connection-_116.txt", "contents": "if sum >= _yield_after_reading then\n// If we've read _yield_after_reading bytes\n// yield and read again later.\n_read_again()\n_reading = false\nreturn\nend\n\n_read_buf_size()\n\n// Read as much data as possible.\nlet len = @pony_os_recv(\n_event,\n_read_buf.cpointer(_read_buf_offset),\n_read_buf.size() - _read_buf_offset) ?\n\nif len == 0 then\n// Would block, try again later.\n// this is safe because asio thread isn't currently subscribed\n// for a read event so will not be writing to the readable flag"} +{"id": "Pony/collections-persistent-Cons-_18.txt", "contents": "\n(Cons[A] val | Nil[A] val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U64-_34.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , U64 val)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Property3UnitTest-_2.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\napply\u00b6\n[Source]\nfun ref apply(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n"} +{"id": "Pony/files-FileMkdir-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I8-_24.txt", "contents": "fun box mod_partial(\ny: I8 val)\n: I8 val ?\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val ?\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: U8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_115.txt", "contents": "(let arg1, let arg2) = consume arg\nfn(consume arg1, consume arg2)\n})\n\nfun map3[T1, T2, T3, T4](\ngen1: Generator[T1],\ngen2: Generator[T2],\ngen3: Generator[T3],\nfn: {(T1, T2, T3): T4^})\n: Generator[T4]\n=>\n\"\"\"\nConvenience combinator for mapping 3 generators into 1.\n\"\"\"\nGenerators.zip3[T1, T2, T3](gen1, gen2, gen3)\n.map[T4]({(arg) =>\n(let arg1, let arg2, let arg3) = consume arg\nfn(consume arg1, consume arg2, consume arg3)\n})\n"} +{"id": "Pony/buffered-Reader-_35.txt", "contents": "Peek at a little-endian I128.\nfun box peek_i128_le(\noffset: USize val = 0)\n: I128 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI128 val ?\n\n\npeek_f32_be\u00b6\n[Source]\nPeek at a big-endian F32.\nfun box peek_f32_be(\noffset: USize val = 0)\n: F32 val ?"} +{"id": "Pony/c-abi_7.txt", "contents": "\n```bash\nclang -fPIC -Wall -Wextra -O3 -g -MM jch.c >jch.d\nclang -fPIC -Wall -Wextra -O3 -g -c -o jch.o jch.c\nclang -shared -lm -o libjch.dylib jch.o\n```\n\nThe Pony code to use this new C library is just like the code we've already seen for using C libraries.\n\n```pony\n\"\"\"\nThis is an example of Pony integrating with native code via the built-in FFI\nsupport\n\"\"\"\n\nuse \"lib:jch\"\nuse \"collections\"\nuse @jch_chash[I32](hash: U64, bucket_size: U32)\n\nactor Main"} +{"id": "Pony/builtin-U64-_14.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\n(U64 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: U64 val)\n: (U64 val , Bool val)\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_spec-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/builtin-F64-_30.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\nacos\u00b6\n[Source]\nfun box acos()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nasin\u00b6\n[Source]\nfun box asin()\n: F64 val\n"} +{"id": "Pony/builtin-I8-_42.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: I8 val)\n: Bool val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileStream-_0.txt", "contents": "\n\n\n\n\n\n\nFileStream\u00b6\n[Source]\nAsynchronous access to a File object. Wraps file operations print, write,\nprintv and writev. The File will be disposed through File._final.\nactor tag FileStream is\nOutStream tag\n\nImplements\u00b6\n\nOutStream tag\n\n\nConstructors\u00b6"} +{"id": "Pony/src-buffered-writer-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-String-_55.txt", "contents": "Example:\nlet original: String = \"name,job;department\"\nlet delimiter: String = \".,;\"\nlet split_array: Array[String] = original.split(delimiter)\nenv.out.print(\"OUTPUT:\")\nfor value in split_array.values() do\nenv.out.print(value)\nend\n\n// OUTPUT:\n// name\n// job\n// department\n\nAdjacent delimiters result in a zero length entry in the array. For\nexample, \"1,,2\".split(\",\") => [\"1\", \"\", \"2\"].\nIf you want to split the string with the entire delimiter string delim,\nuse split_by.\nfun box split(\ndelim: String val = \""} +{"id": "Pony/builtin-Env-_2.txt", "contents": "\n\nPublic fields\u00b6\nlet root: AmbientAuth val\u00b6\n[Source]\nThe root capability.\n\nlet input: InputStream tag\u00b6\n[Source]\nStdin represented as an actor.\n\nlet out: OutStream tag\u00b6\n[Source]\nStdout\n\nlet err: OutStream tag\u00b6\n[Source]\nStderr\n\nlet args: Array[String val] val\u00b6"} +{"id": "Pony/builtin-I16-_33.txt", "contents": "I16 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/src-collections-range-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-backpressure-backpressure-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/combining-capabilities_3.txt", "contents": "# Explaining why\n\nThat table will seem totally natural to you, eventually. But probably not yet. To help it seem natural, let's walk through each cell in the table and explain why it is the way it is.\n"} +{"id": "Pony/src-collections-persistent-list-_32.txt", "contents": "\"\"\"\nNil[A]\n\nfun cons(h: val->A, t: List[A]): List[A] =>\n\"\"\"\nReturns a list that has h as a head and t as a tail.\n\"\"\"\nCons[A](h, t)\n\nfun apply(arr: Array[val->A]): List[A] =>\n\"\"\"\nBuilds a new list from an Array\n\"\"\"\nthis.from(arr.values())\n\nfun from(iter: Iterator[val->A]): List[A] =>\n\"\"\"\nBuilds a new list from an iterator\n\"\"\"\nvar l: List[A] = Nil[A]"} +{"id": "Pony/builtin-Integer-_0.txt", "contents": "\n\n\n\n\n\n\nInteger[A: Integer[A] val]\u00b6\n[Source]\ntrait val Integer[A: Integer[A] val] is\nReal[A] val\n\nImplements\u00b6\n\nReal[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/builtin-ISize-_12.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nmod_unsafe\u00b6\n[Source]\nfun box mod_unsafe(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_1.txt", "contents": "Public Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nconfig\u00b6\n[Source]\nfun box config()\n: BenchConfig val\n\nReturns\u00b6\n\nBenchConfig val\n"} +{"id": "Pony/src-builtin-string-_112.txt", "contents": "\nfun is_null_terminated(): Bool =>\n\"\"\"\nReturn true if the string is null-terminated and safe to pass to an FFI\nfunction that doesn't accept a size argument, expecting a null-terminator.\nThis method checks that there is a null byte just after the final position\nof populated bytes in the string, but does not check for other null bytes\nwhich may be present earlier in the content of the string.\nIf you need a null-terminated copy of this string, use the clone method.\n\"\"\"\n(_alloc > 0) and (_alloc != _size) and (_ptr._apply(_size) == 0)\n\nfun utf32(offset: ISize): (U32, U8) ? =>\n\"\"\"\nReturn a UTF32 representation of the character at the given offset and the\nnumber of bytes needed to encode that character. If the offset does not\npoint to the beginning of a valid UTF8 encoding, return 0xFFFD (the unicode\nreplacement character) and a length of one. Raise an error if the offset is\nout of bounds.\n\"\"\""} +{"id": "Pony/src-builtin-array-_76.txt", "contents": "\"\"\"\nif _size == 0 then\nreturn consume b\nend\n\nif b.size() == 0 then\nreturn consume this\nend\n\n(let unchoppable, let a_left) =\nif (_size == _alloc) and (cpointer(_size) == b.cpointer()) then\n(true, true)\nelseif (b.size() == b.space()) and (b.cpointer(b.size()) == cpointer())\nthen\n(true, false)\nelse\n(false, false)\nend\n\nif not unchoppable then"} +{"id": "Pony/src-pony_check-randomness-_19.txt", "contents": "Generate a USize in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nu64(min.u64(), max.u64()).usize()\n\nfun ref i8(min: I8 = I8.min_value(), max: I8 = I8.max_value()): I8 =>\n\"\"\"\nGenerate a I8 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nmin + u8(0, (max - min).u8()).i8()\n\nfun ref i16(min: I16 = I16.min_value(), max: I16 = I16.max_value()): I16 =>\n\"\"\"\nGenerate a I16 in closed interval [min, max]\n(default: [min_value, max_value])."} +{"id": "Pony/src-pony_bench-_runner-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-Real-_25.txt", "contents": "USize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_test-pony_test-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/signals--index-_0.txt", "contents": "\n\n\n\n\n\n\nSignals package\u00b6\nThe Signals package provides support for handling Unix style signals.\nFor each signal that you want to handle, you need to create a SignalHandler\nand a corresponding SignalNotify object. Each SignalHandler runs as it own\nactor and upon receiving the signal will call its corresponding\nSignalNotify's apply method.\nExample program\u00b6\nThe following program will listen for the TERM signal and output a message to\nstandard out if it is received.\nuse \"signals\"\n\nactor Main\nnew create(env: Env) =>"} +{"id": "Pony/src-cli-command_help-_18.txt", "contents": "options\n\nfun _all_options_fill(options: Array[OptionSpec box]) =>\nmatch _parent\n| let p: CommandHelp => p._all_options_fill(options)\nend\nfor o in _spec.options().values() do\noptions.push(o)\nend\n\nprimitive _Columns\nfun indent(w: Writer, n: USize) =>\nvar i = n\nwhile i > 0 do\nw.write(\" \")\ni = i - 1\nend\n\nfun write(w: Writer, cols: Array[(USize,String,String)]) =>\nvar widest: USize = 0"} +{"id": "Pony/builtin-I16-_16.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\n(I16 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: I16 val)\n: (I16 val , Bool val)\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/1_classes_13.txt", "contents": "# Naming rules\n\nAll names in Pony, such as type names, method names, and variable names may contain only [__ASCII__](https://en.wikipedia.org/wiki/ASCII) characters.\n\nIn fact all elements of Pony code are required to be ASCII, except string literals, which happily accept any kind of bytes directly from the source file, be it `UTF-8` encoded or `ISO-8859-2` and represent them in their encoded form.\n\nA Pony type, whether it's a class, actor, trait, interface, primitive, or type alias, must start with an uppercase letter. After an underscore for private or special _methods_ (behaviors, constructors, and functions), any method or variable, including parameters and fields, must start with a lowercase letter. In all cases underscores in a row or at the end of a name are not allowed, but otherwise, any combination of letters and numbers is legal.\n\nIn fact, numbers may use single underscores inside as a separator too!\n\nOnly variable names can end in primes (`'`).\n"} +{"id": "Pony/builtin-F64-_66.txt", "contents": "u32_unsafe\u00b6\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nulong_unsafe\u00b6\nfun box ulong_unsafe()"} +{"id": "Pony/net-TCPConnectionNotify-_5.txt", "contents": "[Source]\nCalled when we have failed to connect to all possible addresses for the\nserver. At this point, the connection will never be established.\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nfun ref connect_failed(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/cli-ArgSpec-_5.txt", "contents": "name': String val\ndescr': String val = \"\"\ndefault': (U64 val | None val) = reference\n\nReturns\u00b6\n\nArgSpec val^\n\n\nf64\u00b6\n[Source]\nCreates an Arg with a F64 typed value that can be used like\n 1.039\nto yield an arg value like\ncmd.arg(\"ratio\").f64() == F64(1.039).\nnew val f64(\nname': String val,\ndescr': String val = \"\",\ndefault': (F64 val | None val) = reference)\n: ArgSpec val^"} +{"id": "Pony/builtin-UnsignedInteger-_57.txt", "contents": "\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6"} +{"id": "Pony/random-Dice-_0.txt", "contents": "\n\n\n\n\n\n\nDice\u00b6\n[Source]\nA simple dice roller.\nclass ref Dice\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nInitialise with a random number generator.\nnew ref create(\nfrom: Random ref)\n: Dice ref^\n"} +{"id": "Pony/src-builtin-string-_95.txt", "contents": "_set(0, 0)\nelse\n_size = len\n_alloc = _size + 1\n_ptr = Pointer[U8]._alloc(_alloc)\nstr._copy_to(_ptr, _alloc)\nend\n\nnew copy_cstring(str: Pointer[U8] box) =>\n\"\"\"\nCreate a string by copying a null-terminated C string. Note that\nthe scan is unbounded; the pointed to data must be null-terminated\nwithin the allocated array to preserve memory safety. If a null\npointer is given then an empty string is returned.\n\"\"\"\nif str.is_null() then\n_size = 0\n_alloc = 1\n_ptr = Pointer[U8]._alloc(_alloc)\n_set(0, 0)"} +{"id": "Pony/net-TCPListener-_5.txt", "contents": "yield_after_reading: USize val = 16384\nyield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPListener tag^\n\n\nip6\u00b6\n[Source]\nListens for IPv6 connections.\nnew tag ip6(\nauth: TCPListenAuth val,\nnotify: TCPListenNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nlimit: USize val = 0,\nread_buffer_size: USize val = 16384,\nyield_after_reading: USize val = 16384,\nyield_after_writing: USize val = 16384)"} +{"id": "Pony/src-pony_check-pony_check-_11.txt", "contents": "use \"pony_check\"\n\nclass ListReverseProperty is Property1[List[USize]]\nfun name(): String => \"list/reverse\"\n\nfun gen(): Generator[List[USize]] =>\nGenerators.list_of[USize](Generators.usize())\n\nfun property(arg1: List[USize], ph: PropertyHelper) =>\nph.array_eq[USize](arg1, arg1.reverse().reverse())\n```\n"} +{"id": "Pony/src-builtin-real-_43.txt", "contents": "new val from[B: (Number & Real[B] val)](a: B)\nnew val min_value()\nnew val max_value()\n\nfun add(y: A): A => this + y\nfun sub(y: A): A => this - y\nfun mul(y: A): A => this * y\nfun div(y: A): A =>\n\"\"\"\nInteger division, rounded towards zero.\n\"\"\"\nthis / y\n\nfun divrem(y: A): (A, A) => (this / y, this % y)\nfun rem(y: A): A =>\n\"\"\"\nCalculate the remainder after integer division, rounded towards zero (`div`).\n\nThe result has the sign of the dividend.\n\"\"\""} +{"id": "Pony/builtin-U32-_38.txt", "contents": "fun box add(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-process-process_monitor-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-net-udp_socket-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-process-_process-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/net-OSSockOpt-_327.txt", "contents": "fun box rose_t2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrose_t3\u00b6\n[Source]\nfun box rose_t3()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nscm_hci_raw_direction\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-for_all-_11.txt", "contents": "fun gen3(): Generator[T3] => _gen3\nfun gen4(): Generator[T4] => _gen4\nfun ref property4(arg1: T1, arg2: T2, arg3: T3, arg4: T4, h: PropertyHelper) ? =>\nprop(consume arg1, consume arg2, consume arg3, consume arg4, h)?\nend\n).apply(_helper)?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-time-timer-_10.txt", "contents": "fun ref _cancel() =>\n\"\"\"\nRemove the timer from any list.\n\"\"\"\n_node.remove()\n_notify.cancel(this)\n\nfun ref _get_node(): ListNode[Timer] =>\n\"\"\"\nReturns the list node pointing to the timer. Used to schedule the timer in\na queue.\n\"\"\"\n_node\n\nfun ref _slop(bits: USize) =>\n\"\"\"\nApply slop bits to the expiration time and interval. This reduces the\nprecision by the given number of bits, effectively quantizing time.\n\"\"\"\n_expiration = _expiration >> bits.u64()"} +{"id": "Pony/src-builtin-string-_152.txt", "contents": "while i < _size do\ntry\n(let c, let len) = utf32(i.isize())?\nif not chars.contains(c) then\nbreak\nend\ni = i + len.usize()\nelse\nbreak\nend\nend\n\nif i > 0 then\ndelete(0, i)\nend\nend\n\nfun iso _append(s: String box): String iso^ =>\nlet len = _size + s._size\nreserve(len)"} +{"id": "Pony/builtin-F32-_39.txt", "contents": "y: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmul_unsafe\u00b6\nfun box mul_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n"} +{"id": "Pony/net-UDPSocket-_11.txt", "contents": "prevents this.\nbe set_multicast_loopback(\nloopback: Bool val)\n\nParameters\u00b6\n\nloopback: Bool val\n\n\nset_multicast_ttl\u00b6\n[Source]\nSet the TTL for multicast sends. Defaults to 1.\nbe set_multicast_ttl(\nttl: U8 val)\n\nParameters\u00b6\n\nttl: U8 val\n\n"} +{"id": "Pony/pony_check-ASCIILettersUpper-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIILettersUpper val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/2_ops_11.txt", "contents": "We can see that it makes more sense for the unary operator to be applied before either infix as it only acts on a single number in the expression so it is never ambiguous.\n\nUnary operators can also be applied to parentheses and act on the result of all operations in those parentheses prior to applying any infix operators outside the parentheses:\n\n```pony\n1 + -(2 * -3) // 7\n```\n"} +{"id": "Pony/collections-HashSet-_11.txt", "contents": "value: this->A!)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6\n\nvalue: this->A!\n\nReturns\u00b6\n\nHashSet[this->A!, K] ref^\n\n\nsub[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nRemove a value from the set.\nfun box sub[optional K: HashFunction[this->A!] val](\nvalue: box->this->A!)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6"} +{"id": "Pony/serialisation_0.txt", "contents": "# Serialisation\n\nPony provides a built-in mechanism for serialising and deserialising objects so that they can be passed between Pony processes. Serialisation takes an object and turns it into an array of bytes that can be used to send the object to another process by, for example, writing it to a TCP stream. Deserialisation takes an array of bytes and turns them into a Pony object.\n\nPony uses an intermediate object type called `Serialised` to represent a serialised object. A `Serialised` object can be created in one of two ways:\n\n* calling the `create(...)` constructor with the `SerialiseAuth` authority and the object to serialize\n* calling the `input(...)` constructor with the `DeserialiseAuth` authority and an `Array[U8]` that represents the object to deserialise. This intermediate object can then be used to either:\n\n* generate an `Array[U8]` that represents the object by calling the `output(...)` method with the `OutputSerialisedAuth` authority, or\n* generate a deserialised object by calling the `apply(...)` method with the `InputSerialisedAuth` authority\n\nThis program serialises and deserialise an object, and checks that the fields of the original object are the same as the fields of the deserialised object.\n\n```pony\nuse \"serialise\"\n\nclass Foo is Equatable[Foo box]\nlet _s: String\nlet _u: U32"} +{"id": "Pony/builtin-Signed-_0.txt", "contents": "\n\n\n\n\n\n\nSigned\u00b6\n[Source]\ntype Signed is\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val)\n\nType Alias For\u00b6\n\n(I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val)\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_123.txt", "contents": "i = i - 1\nend\nerror\n\nfun contains(s: String box, offset: ISize = 0, nth: USize = 0): Bool =>\n\"\"\"\nReturns true if contains s as a substring, false otherwise.\n\"\"\"\nvar i = offset_to_index(offset)\nvar steps = nth + 1\n\nwhile i < _size do\nvar j: USize = 0\n\nlet same = while j < s._size do\nif _ptr._apply(i + j) != s._ptr._apply(j) then\nbreak false\nend\nj = j + 1\ntrue"} +{"id": "Pony/src-net-udp_socket-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/builtin-I32-_52.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/builtin-HasEq-_1.txt", "contents": "that: box->A\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-ISize-_44.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: ISize val)\n: Bool val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_564.txt", "contents": "fun box tcpopt_window()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_ca_name_max\u00b6\n[Source]\nfun box tcp_ca_name_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_ccalgoopt\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_20.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/pony_test-TestHelper-_14.txt", "contents": "expect: ReadSeq[A] box,\nactual: ReadSeq[A] box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nexpect: ReadSeq[A] box\nactual: ReadSeq[A] box\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nlong_test\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_10.txt", "contents": "U8 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\naddc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-signed-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-builtin-real-_50.txt", "contents": "\"\"\"\nCalculates the modulo of this number after floored division by `y`.\n\n*Unsafe Operation.*\n\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\n\nfun add_partial(y: A): A ?\n\"\"\"\nAdd y to this number.\n\nIf the operation overflows this function errors.\n\"\"\"\n\nfun sub_partial(y: A): A ?\n\"\"\"\nSubtract y from this number.\n"} +{"id": "Pony/net-OSSockOpt-_515.txt", "contents": "fun box so_proxyusr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_randomport\u00b6\n[Source]\nfun box so_randomport()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_rcvbuf\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_64.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: U8 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-F32-_2.txt", "contents": "F32 val^\n\n\ne\u00b6\n[Source]\nnew val e()\n: F32 val^\n\nReturns\u00b6\n\nF32 val^\n\n\nfrom_bits\u00b6\n[Source]\nnew val from_bits(\ni: U32 val)\n: F32 val^\n\nParameters\u00b6"} +{"id": "Pony/src-serialise-serialise-_0.txt", "contents": "\n\n\n\n\n\n\nserialise.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-ISize-_61.txt", "contents": "\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_567.txt", "contents": "fun box tcp_connection_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_in_always\u00b6\n[Source]\nfun box tcp_cookie_in_always()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cookie_max\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_22.txt", "contents": "update\u00b6\n[Source]\nChange the i-th element, raising an error if the index is out of bounds.\nfun ref update(\ni: USize val,\nvalue: A)\n: A^ ?\n\nParameters\u00b6\n\ni: USize val\nvalue: A\n\nReturns\u00b6\n\nA^ ?\n\n\ninsert\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_22.txt", "contents": "F32 val\n\n\nlog10\u00b6\n[Source]\nfun box log10()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nlogb\u00b6\n[Source]\nfun box logb()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_174.txt", "contents": "fun encode(value: U32): (USize, U8, U8, U8, U8) =>\n\"\"\"\nEncode the code point into UTF-8. It returns a tuple with the size of the\nencoded data and then the data.\n\"\"\"\nif value < 0x80 then\n(1, value.u8(), 0, 0, 0)\nelseif value < 0x800 then\n( 2,\n((value >> 6) or 0xC0).u8(),\n((value and 0x3F) or 0x80).u8(),\n0,\n0\n)\nelseif value < 0xD800 then\n( 3,\n((value >> 12) or 0xE0).u8(),\n(((value >> 6) and 0x3F) or 0x80).u8(),\n((value and 0x3F) or 0x80).u8(),\n0"} +{"id": "Pony/net-TCPConnectAuth-_2.txt", "contents": "Bool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: TCPConnectAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPConnectAuth val\n\nReturns\u00b6\n\nBool val\n\n\n\n"} +{"id": "Pony/2_primitives_0.txt", "contents": "# Primitives\n\nA __primitive__ is similar to a __class__, but there are two critical differences:\n\n1. A __primitive__ has no fields.\n2. There is only one instance of a user-defined __primitive__.\n\nHaving no fields means primitives are never mutable. Having a single instance means that if your code calls a constructor on a __primitive__ type, it always gets the same result back (except for built-in \"machine word\" primitives, covered below).\n"} +{"id": "Pony/builtin-I8-_51.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_76.txt", "contents": "fun box dccp_nr_pkt_types()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_service_list_max_len\u00b6\n[Source]\nfun box dccp_service_list_max_len()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_single_opt_maxlen\u00b6\n[Source]"} +{"id": "Pony/c-abi_4.txt", "contents": "define __JCH_H_\n\nextern \"C\"\n{\nint32_t jch_chash(uint64_t key, uint32_t num_buckets);\n}\n"} +{"id": "Pony/src-builtin-runtime_options-_0.txt", "contents": "\n\n\n\n\n\n\nruntime_options.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-builtin-signed-_50.txt", "contents": "\nfun fld_unsafe(y: I8): I8 =>\n_SignedUnsafeArithmetic.fld_unsafe[I8, U8](this, y)\n\nfun mod(y: I8): I8 =>\n_SignedArithmetic.mod[I8, U8](this, y)\n\nfun mod_unsafe(y: I8): I8 =>\n_SignedUnsafeArithmetic.mod_unsafe[I8, U8](this, y)\n\nfun addc(y: I8): (I8, Bool) =>\n@\"llvm.sadd.with.overflow.i8\"(this, y)\n\nfun subc(y: I8): (I8, Bool) =>\n@\"llvm.ssub.with.overflow.i8\"(this, y)\n\nfun mulc(y: I8): (I8, Bool) =>\n@\"llvm.smul.with.overflow.i8\"(this, y)\n\nfun divc(y: I8): (I8, Bool) =>"} +{"id": "Pony/builtin-ILong-_37.txt", "contents": "[Source]\nfun box sub(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: ILong val)\n: ILong val\n"} +{"id": "Pony/builtin-SignedInteger-_36.txt", "contents": "A\n\n\ndivrem\u00b6\n[Source]\nfun box divrem(\ny: A)\n: (A , A)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , A)\n\n\nrem\u00b6\n[Source]"} +{"id": "Pony/src-collections-list_node-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-udp_socket-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/src-collections-sort-_6.txt", "contents": "```\n\"\"\"\nfun apply(a: A): A^ =>\n\"\"\"\nSort the given seq.\n\"\"\"\ntry _sort(a, 0, a.size().isize() - 1)? end\na\n\nfun _sort(a: A, lo: ISize, hi: ISize) ? =>\nif hi <= lo then return end\n// choose outermost elements as pivots\nif a(lo.usize())? > a(hi.usize())? then _swap(a, lo, hi)? end\n(var p, var q) = (a(lo.usize())?, a(hi.usize())?)\n// partition according to invariant\n(var l, var g) = (lo + 1, hi - 1)\nvar k = l\nwhile k <= g do\nif a(k.usize())? < p then\n_swap(a, k, l)?"} +{"id": "Pony/src-pony_test-test_helper-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_check-property_helper-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/format-PrefixDefault-_0.txt", "contents": "\n\n\n\n\n\n\nPrefixDefault\u00b6\n[Source]\nprimitive val PrefixDefault is\nPrefixSpec val\n\nImplements\u00b6\n\nPrefixSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_0.txt", "contents": "\n\n\n\n\n\n\nTCPConnection\u00b6\n[Source]\nA TCP connection. When connecting, the Happy Eyeballs algorithm is used.\nThe following code creates a client that connects to port 8989 of\nthe local host, writes \"hello world\", and listens for a response,\nwhich it then prints.\nuse \"net\"\n\nclass MyTCPConnectionNotify is TCPConnectionNotify\nlet _out: OutStream\n\nnew create(out: OutStream) =>\n_out = out"} +{"id": "Pony/net-TCPConnection-_27.txt", "contents": "option_name: I32 val,\noption_max_size: USize val = 4)\n: (U32 val , Array[U8 val] iso^)\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\noption_max_size: USize val = 4\n\nReturns\u00b6\n\n(U32 val , Array[U8 val] iso^)\n\n\ngetsockopt_u32\u00b6\n[Source]\nWrapper for TCP sockets to the getsockopt(2) system call where\nthe kernel's returned option value is a C uint32_t type / Pony\ntype U32."} +{"id": "Pony/builtin-USize-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-UDPSocket-_24.txt", "contents": "ttl: U8 val)\n: U32 val\n\nParameters\u00b6\n\nttl: U8 val\n\nReturns\u00b6\n\nU32 val\n\n\nset_so_broadcast\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_BROADCAST, ...)\nfun ref set_so_broadcast(\nstate: Bool val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_38.txt", "contents": "A\n\n\natan2\u00b6\n[Source]\nfun box atan2(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nacosh\u00b6\n[Source]"} +{"id": "Pony/pony_check-ForAll2-_2.txt", "contents": "prop: {(T1, T2, PropertyHelper) ?}[T1, T2] val\n\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-ASCIIAllWithNUL-_1.txt", "contents": "\nASCIIAllWithNUL val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIAllWithNUL val)\n: Bool val"} +{"id": "Pony/builtin-String-_21.txt", "contents": "is a new empty string.\nBoth strings are isolated and mutable, as they do not share memory.\nThe operation does not allocate a new string pointer nor copy elements.\nfun iso chop(\nsplit_point: USize val)\n: (String iso^ , String iso^)\n\nParameters\u00b6\n\nsplit_point: USize val\n\nReturns\u00b6\n\n(String iso^ , String iso^)\n\n\nunchop\u00b6\n[Source]\nUnchops two iso strings to return the original string they were chopped\nfrom. Both input strings are isolated and mutable and were originally"} +{"id": "Pony/src-process-process_monitor-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-term-readline-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/pony_check-Property2UnitTest-_5.txt", "contents": "h: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nlabel\u00b6\nfun box label()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/net-OSSockOpt-_612.txt", "contents": "fun box tipc_sock_recvq_depth()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_src_droppable\u00b6\n[Source]\nfun box tipc_src_droppable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_subscr_timeout\u00b6\n[Source]"} +{"id": "Pony/pony_test--index-_4.txt", "contents": "use bar = \"bar\"\nuse foo = \"foo\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>\nNone\n\nfun tag tests(test: PonyTest) =>\nbar.Main.make().tests(test)\nfoo.Main.make().tests(test)\n\nAggregate test classes may themselves be aggregated. Every test list class may\ncontain any combination of its own tests and aggregated lists.\nLong tests\u00b6\nSimple tests run within a single function. When that function exits, either\nreturning or raising an error, the test is complete. This is not viable for\ntests that need to use actors."} +{"id": "Pony/src-pony_check-randomness-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/net-OSSockOpt-_376.txt", "contents": "fun box sctp_ecn_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_enable_change_assoc_req\u00b6\n[Source]\nfun box sctp_enable_change_assoc_req()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_enable_reset_assoc_req\u00b6\n[Source]"} +{"id": "Pony/builtin-Platform-_9.txt", "contents": "Bool val\n\n\nnative128\u00b6\n[Source]\nfun box native128()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\ndebug\u00b6\n[Source]\nfun box debug()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/src-signals-sig-_13.txt", "contents": "else compile_error \"no SIGSTOP\"\nend\n\nfun tstp(): U32 =>\nifdef bsd or osx then 18\nelseif linux then 20\nelse compile_error \"no SIGTSTP\"\nend\n\nfun cont(): U32 =>\nifdef bsd or osx then 19\nelseif linux then 18\nelse compile_error \"no SIGCONT\"\nend\n\nfun chld(): U32 =>\nifdef bsd or osx then 20\nelseif linux then 17\nelse compile_error \"no SIGCHLD\"\nend"} +{"id": "Pony/src-pony_check-for_all-_7.txt", "contents": "class ForAll2[T1, T2]\nlet _gen1: Generator[T1] val\nlet _gen2: Generator[T2] val\nlet _helper: TestHelper\n\nnew create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\nh: TestHelper)\n=>\n_gen1 = gen1'\n_gen2 = gen2'\n_helper = h\n\nfun ref apply(prop: {(T1, T2, PropertyHelper) ?} val) ? =>\nProperty2UnitTest[T1, T2](\nobject iso is Property2[T1, T2]\nfun name(): String => \"\"\nfun gen1(): Generator[T1] => _gen1\nfun gen2(): Generator[T2] => _gen2"} +{"id": "Pony/builtin-U128-_46.txt", "contents": "U128 val\n\n\nneg\u00b6\n[Source]\nfun box neg()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: U128 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-collections-range-_10.txt", "contents": "let _empty: Bool\nvar _idx: A\n\nnew create(min: A, max: A, inc: A = 1) =>\n_min = min\n_max = max\n_inc = inc\n_forward = (_min < _max) and (_inc > 0)\n(let min_finite, let max_finite, let inc_finite) =\niftype A <: FloatingPoint[A] then\n(_min.finite(), _max.finite(), _inc.finite())\nelse\n(true, true, true)\nend\nlet progress = ((_min < _max) and (_inc > 0))\nor ((_min > _max) and (_inc < 0)) // false if any is NaN!\nif progress and min_finite and inc_finite then\n_empty = false\n_infinite = not max_finite // ok to use not max_finite for max_infinite\n// since progress excludes _max == nan"} +{"id": "Pony/process-UnknownError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_123.txt", "contents": "min: U64 = U64.min_value(),\nmax: U64 = U64.max_value())\n: Generator[U64]\n=>\n\"\"\"\nCreate a generator for U64 values.\n\"\"\"\nlet that = this\nGenerator[U64](\nobject is GenObj[U64]\nfun generate(rnd: Randomness): U64^ =>\nrnd.u64(min, max)\n\nfun shrink(u: U64): ValueAndShrink[U64] =>\nthat._int_shrink[U64](consume u, min)\nend)\n\nfun u128(\nmin: U128 = U128.min_value(),\nmax: U128 = U128.max_value())"} +{"id": "Pony/src-process-_process-_28.txt", "contents": "fun exit_code(): I32 =>\n\"\"\"\nRetrieve the exit code of the exited process.\n\"\"\"\n_exit_code\n\nfun string(): String iso^ =>\nrecover iso\nString(10)\n.>append(\"Exited(\")\n.>append(_exit_code.string())\n.>append(\")\")\nend\n\nfun eq(other: ProcessExitStatus): Bool =>\nmatch other\n| let e: Exited =>\ne._exit_code == _exit_code\nelse\nfalse"} +{"id": "Pony/builtin-U8-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-SignedInteger-_47.txt", "contents": "I8 val\n\n\ni16\u00b6\n[Source]\nfun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_408.txt", "contents": "fun box sctp_mbuf_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_mobility_base\u00b6\n[Source]\nfun box sctp_mobility_base()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_mobility_fasthandoff\u00b6\n[Source]"} +{"id": "Pony/builtin-U64-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-collections-map-_48.txt", "contents": "Returns the next entry, or raises an error if there isn't one. If entries\nare added during iteration, this may not return all entries.\n\"\"\"\n_i = _map.next_index(_i)?\n_count = _count + 1\n_map.index(_i)?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-String-_16.txt", "contents": ": None val\n\nParameters\u00b6\n\nlen: USize val\n\nReturns\u00b6\n\nNone val\n\n\ncompact\u00b6\n[Source]\nTry to remove unused space, making it available for garbage collection. The\nrequest may be ignored. The string is returned to allow call chaining.\nfun ref compact()\n: None val\n\nReturns\u00b6\n"} +{"id": "Pony/time-Time-_6.txt", "contents": "fun box eq(\nthat: Time val)\n: Bool val\n\nParameters\u00b6\n\nthat: Time val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Time val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/collections-HashEq-_1.txt", "contents": "new val create()\n: HashEq[A] val^\n\nReturns\u00b6\n\nHashEq[A] val^\n\n\nPublic Functions\u00b6\nhash\u00b6\n[Source]\nUse the hash function from the type parameter.\nfun box hash(\nx: box->A)\n: USize val\n\nParameters\u00b6\n\nx: box->A\n"} +{"id": "Pony/src-files-directory-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-builtin-unsigned-_63.txt", "contents": "0xFFFF_FFFF_FFFF_FFFF\nend\n\nfun next_pow2(): ULong =>\nlet x = (this - 1).clz()\n1 << (if x == 0 then 0 else bitwidth() - x end)\n\nfun abs(): ULong => this\n\nfun bit_reverse(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.bitreverse.i32\"(this.u32()).ulong()\nelse\n@\"llvm.bitreverse.i64\"(this.u64()).ulong()\nend\n\nfun bswap(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.bswap.i32\"(this.u32()).ulong()\nelse"} +{"id": "Pony/src-pony_check-generator-_49.txt", "contents": "972\n973\n974\n975\n976\n977\n978\n979\n980\n981\n982\n983\n984\n985\n986\n987\n988\n989\n990\n991"} +{"id": "Pony/net-OSSockOpt-_20.txt", "contents": "fun box ipproto_gre()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_hello\u00b6\n[Source]\nfun box ipproto_hello()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_hip\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_492.txt", "contents": "fun box so_l2cap_encrypted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_flush\u00b6\n[Source]\nfun box so_l2cap_flush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_iflow\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_29.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_110.txt", "contents": "containing the values generated by both generators.\n\"\"\"\nGenerator[(T1, T2)](\nobject is GenObj[(T1, T2)]\nfun generate(rnd: Randomness): GenerateResult[(T1, T2)] ? =>\n(let v1: T1, let shrinks1: Iterator[T1^]) =\ngen1.generate_and_shrink(rnd)?\n(let v2: T2, let shrinks2: Iterator[T2^]) =\ngen2.generate_and_shrink(rnd)?\n((consume v1, consume v2), Iter[T1^](shrinks1).zip[T2^](shrinks2))\n\nfun shrink(t: (T1, T2)): ValueAndShrink[(T1, T2)] =>\n(let t1, let t2) = consume t\n(let t11, let t1_shrunken: Iterator[T1^]) = gen1.shrink(consume t1)\n(let t21, let t2_shrunken: Iterator[T2^]) = gen2.shrink(consume t2)\n\nlet shrunken = Iter[T1^](t1_shrunken).zip[T2^](t2_shrunken)\n((consume t11, consume t21), shrunken)\nend)\n"} +{"id": "Pony/builtin-Integer-_3.txt", "contents": "Real[A] val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nPublic Functions\u00b6\nadd_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the operation overflows, the result is undefined.\nfun box add_unsafe(\ny: A)"} +{"id": "Pony/itertools-Iter-_37.txt", "contents": "produced. Uniqueness is determined by the HashFunction H.\nExample\u00b6\nIter[USize]([as USize: 1; 2; 1; 1; 3; 4; 1].values())\n.unique()\n\n1 2 3 4\nfun ref unique[optional H: HashFunction[A] val]()\n: Iter[A!] ref^\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nzip[B: B]\u00b6\n[Source]\nZip two iterators together so that each call to next() results in\na tuple with the next value of the first iterator and the next value\nof the second iterator. The number of items returned is the minimum of\nthe number of items returned by the two iterators."} +{"id": "Pony/builtin-I128-_57.txt", "contents": "I16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/files-FileStat-_0.txt", "contents": "\n\n\n\n\n\n\nFileStat\u00b6\n[Source]\nprimitive val FileStat\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileStat val^\n\nReturns\u00b6\n\nFileStat val^"} +{"id": "Pony/builtin-I128-_40.txt", "contents": "fun box op_and(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: I128 val)\n: I128 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-string-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/src-collections-list-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/files-FileError-_0.txt", "contents": "\n\n\n\n\n\n\nFileError\u00b6\n[Source]\nprimitive val FileError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileError val^\n\nReturns\u00b6\n\nFileError val^"} +{"id": "Pony/src-builtin-string-_64.txt", "contents": "1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286\n1287\n1288\n1289\n1290\n1291"} +{"id": "Pony/builtin-I64-_52.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_67.txt", "contents": "1332\n1333\n1334\n1335\n1336\n1337\n1338\n1339\n1340\n1341\n1342\n1343\n1344\n1345\n1346\n1347\n1348\n1349\n1350\n1351"} +{"id": "Pony/pony_test-UnitTest-_5.txt", "contents": ": None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nlabel\u00b6\n[Source]\nReport the test label, returning an empty string for none.\nIt can be later use to filter tests which we want to run, by labels.\nfun box label()\n: String val\n\nReturns\u00b6\n"} +{"id": "Pony/term-ANSITerm-_0.txt", "contents": "\n\n\n\n\n\n\nANSITerm\u00b6\n[Source]\nHandles ANSI escape codes from stdin.\nactor tag ANSITerm\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a new ANSI term.\nnew tag create(\nnotify: ANSINotify iso,\nsource: DisposableActor tag,\ntimers: Timers tag = reference)"} +{"id": "Pony/capsicum-Cap-_20.txt", "contents": "fun box mkdirat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmkfifoat\u00b6\n[Source]\nfun box mkfifoat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmknodat\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_10.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\nfilter\u00b6\n[Source]\nFiltering the empty list yields the empty list.\nfun box filter(\nf: {(val->A): Bool}[A] box)\n: Nil[A] val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nNil[A] val"} +{"id": "Pony/src-buffered-reader-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/builtin-I8-_9.txt", "contents": "fun box min(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: I8 val)\n: I8 val\n\nParameters\u00b6"} +{"id": "Pony/src-net-ossockopt-_90.txt", "contents": "fun ip_bound_if():I32 => @pony_os_sockopt_option(I32(242))\nfun ip_checksum():I32 => @pony_os_sockopt_option(I32(243))\nfun ip_default_multicast_loop():I32 => @pony_os_sockopt_option(I32(244))\nfun ip_default_multicast_ttl():I32 => @pony_os_sockopt_option(I32(245))\nfun ip_dontfrag():I32 => @pony_os_sockopt_option(I32(246))\nfun ip_drop_membership():I32 => @pony_os_sockopt_option(I32(247))\nfun ip_drop_source_membership():I32 => @pony_os_sockopt_option(I32(248))\nfun ip_dummynet3():I32 => @pony_os_sockopt_option(I32(249))\nfun ip_dummynet_configure():I32 => @pony_os_sockopt_option(I32(250))\nfun ip_dummynet_del():I32 => @pony_os_sockopt_option(I32(251))\nfun ip_dummynet_flush():I32 => @pony_os_sockopt_option(I32(252))\nfun ip_dummynet_get():I32 => @pony_os_sockopt_option(I32(253))\nfun ip_faith():I32 => @pony_os_sockopt_option(I32(254))\nfun ip_flowid():I32 => @pony_os_sockopt_option(I32(255))\nfun ip_flowtype():I32 => @pony_os_sockopt_option(I32(256))\nfun ip_freebind():I32 => @pony_os_sockopt_option(I32(257))\nfun ip_fw3():I32 => @pony_os_sockopt_option(I32(258))\nfun ip_fw_add():I32 => @pony_os_sockopt_option(I32(259))\nfun ip_fw_del():I32 => @pony_os_sockopt_option(I32(260))\nfun ip_fw_flush():I32 => @pony_os_sockopt_option(I32(261))"} +{"id": "Pony/src-pony_test-test_helper-_30.txt", "contents": "\nlog(\n_format_loc(loc) + \"Assert \" + check + \" passed. \" + msg\n+ \" Got (\" + (digestof expect).string() + \") is (\"\n+ (digestof actual).string() + \")\",\ntrue)\ntrue\n\nfun assert_eq[A: (Equatable[A] #read & Stringable #read)]\n(expect: A, actual: A, msg: String = \"\", loc: SourceLoc = __loc): Bool\n=>\n\"\"\"\nAssert that the 2 given expressions are equal.\n\"\"\"\n_check_eq[A](\"eq\", expect, actual, msg, loc)\n\nfun _check_eq[A: (Equatable[A] #read & Stringable)]\n(check: String, expect: A, actual: A, msg: String, loc: SourceLoc)\n: Bool\n=>"} +{"id": "Pony/collections-List-_18.txt", "contents": ": None val\n\nParameters\u00b6\n\nnode: ListNode[A] ref\n\nReturns\u00b6\n\nNone val\n\n\nappend_list\u00b6\n[Source]\nEmpties the provided List by appending all elements onto the receiving List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.append_list(other_list) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is empty\n\nfun ref append_list(\nthat: List[A] ref)"} +{"id": "Pony/pony_check-Property3UnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nProperty3UnitTest[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\nclass iso Property3UnitTest[T1: T1, T2: T2, T3: T3] is\nUnitTest ref\n\nImplements\u00b6\n\nUnitTest ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_2.txt", "contents": "\noverhead\u00b6\n[Source]\nfun box overhead()\n: AsyncMicroBenchmark iso^\n\nReturns\u00b6\n\nAsyncMicroBenchmark iso^\n\n\nbefore\u00b6\n[Source]\nfun ref before(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val"} +{"id": "Pony/net-OSSockOpt-_229.txt", "contents": "fun box ip_pmtudisc_probe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_pmtudisc_want\u00b6\n[Source]\nfun box ip_pmtudisc_want()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_portrange\u00b6\n[Source]"} +{"id": "Pony/src-time-timer-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-capsicum-cap_rights-_12.txt", "contents": "\nfun ref remove(that: CapRights0) =>\n\"\"\"\nRemove the rights in that from this.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@cap_rights_remove(addressof _r0, addressof that._r0)\nend\n\nfun ref clear() =>\n\"\"\"\nClear all rights.\n\"\"\"\nifdef freebsd or \"capsicum\" then\n@__cap_rights_init(_version(), addressof _r0, U64(0))\nend\n\nfun contains(that: CapRights0): Bool =>\n\"\"\"\nCheck that this is a superset of the rights in that."} +{"id": "Pony/term-ANSI-_24.txt", "contents": "White background.\nfun box white_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nbright_red_bg\u00b6\n[Source]\nBright red background.\nfun box bright_red_bg()\n: String val\n\nReturns\u00b6\n\nString val\n\n"} +{"id": "Pony/annotations_3.txt", "contents": "# The effect of annotations\n\nAnnotations are entirely implementation-specific. In other words, the Pony compiler (or any other tool that processes Pony programs) is free to take any action for any annotation that it encounters, including not doing anything at all. Annotations starting with `ponyint` are reserved by the compiler for internal use and shouldn't be used by external tools.\n"} +{"id": "Pony/net-OSSockOpt-_339.txt", "contents": "fun box sctp_auto_asconf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_badcrc\u00b6\n[Source]\nfun box sctp_badcrc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_bindx_add_addr\u00b6\n[Source]"} +{"id": "Pony/collections--index-_0.txt", "contents": "\n\n\n\n\n\n\nCollections package\u00b6\nThe Collections package provides a variety of collection classes,\nincluding map, set, range, heap, ring buffer, list, and flags.\nMap - Hashmap by strutural equality (use MapIs for identity equality).\nSet - A set built on top of Map using structural equility (use SetIs for identity equality).\nRange - Iterate over a range of numbers with optional step size.\nBinaryHeap - A priority queue implemented as a binary heap -- use a BinaryHeapPriority parameter to determine priority.\nRingBuffer - A ring buffer with fixed size.\nList - A doubly linked list.\nFlags - A set of single bit flags (size determined upon creation).\nPublic Types\u00b6\n\nclass BinaryHeap"} +{"id": "Pony/src-net-ossockopt-_101.txt", "contents": "fun rds_info_iwarp_connections():I32 => @pony_os_sockopt_option(I32(462))\nfun rds_info_last():I32 => @pony_os_sockopt_option(I32(463))\nfun rds_info_message_flag_ack():I32 => @pony_os_sockopt_option(I32(464))\nfun rds_info_message_flag_fast_ack():I32 => @pony_os_sockopt_option(I32(465))\nfun rds_info_recv_messages():I32 => @pony_os_sockopt_option(I32(466))\nfun rds_info_retrans_messages():I32 => @pony_os_sockopt_option(I32(467))\nfun rds_info_send_messages():I32 => @pony_os_sockopt_option(I32(468))\nfun rds_info_sockets():I32 => @pony_os_sockopt_option(I32(469))\nfun rds_info_tcp_sockets():I32 => @pony_os_sockopt_option(I32(470))\nfun rds_rdma_canceled():I32 => @pony_os_sockopt_option(I32(471))\nfun rds_rdma_dontwait():I32 => @pony_os_sockopt_option(I32(472))\nfun rds_rdma_dropped():I32 => @pony_os_sockopt_option(I32(473))\nfun rds_rdma_fence():I32 => @pony_os_sockopt_option(I32(474))\nfun rds_rdma_invalidate():I32 => @pony_os_sockopt_option(I32(475))\nfun rds_rdma_notify_me():I32 => @pony_os_sockopt_option(I32(476))\nfun rds_rdma_other_error():I32 => @pony_os_sockopt_option(I32(477))\nfun rds_rdma_readwrite():I32 => @pony_os_sockopt_option(I32(478))\nfun rds_rdma_remote_error():I32 => @pony_os_sockopt_option(I32(479))\nfun rds_rdma_silent():I32 => @pony_os_sockopt_option(I32(480))\nfun rds_rdma_success():I32 => @pony_os_sockopt_option(I32(481))"} +{"id": "Pony/src-buffered-reader-_60.txt", "contents": "let r =\nifdef bigendian then\ndata.read_u64(offset)?\nelse\ndata.read_u64(offset)?.bswap()\nend\n\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed\n(u8()?.u64() << 56) or (u8()?.u64() << 48) or\n(u8()?.u64() << 40) or (u8()?.u64() << 32) or"} +{"id": "Pony/builtin-F32-_3.txt", "contents": "\ni: U32 val\n\nReturns\u00b6\n\nF32 val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val) & Real[B] val)](\na: B)\n: F32 val^\n\nParameters\u00b6"} +{"id": "Pony/src-files-file-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/1_classes_0.txt", "contents": "# Classes\n\nJust like other object-oriented languages, Pony has __classes__. A class is declared with the keyword `class`, and it has to have a name that starts with a capital letter, like this:\n\n```pony\nclass Wombat\n```\n\n__Do all types start with a capital letter?__ Yes! And nothing else starts with a capital letter. So when you see a name in Pony code, you will instantly know whether it's a type or not.\n"} +{"id": "Pony/src-net-ossockopt-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/collections-HashSet-_17.txt", "contents": "ne\u00b6\n[Source]\nReturns false if the sets contain the same elements.\nfun box ne(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nReturns true if every element in this is also in that, and this has fewer\nelements than that."} +{"id": "Pony/src-collections-persistent-map-_13.txt", "contents": "\nfun val update(key: K, value: val->V): HashMap[K, V, H] =>\n\"\"\"\nUpdate the value associated with the provided key.\n\"\"\"\n(let r, let insertion) =\ntry\n_root.update(0, H.hash(key).u32(), key, value)?\nelse\n(_root, false) // should not occur\nend\nlet s = if insertion then _size + 1 else _size end\n_create(r, s)\n\nfun val remove(k: K): HashMap[K, V, H] ? =>\n\"\"\"\nTry to remove the provided key from the Map.\n\"\"\"\n_create(_root.remove(0, H.hash(k).u32(), k)?, _size - 1)\n"} +{"id": "Pony/pony_check-IntPairPropertySample-_1.txt", "contents": "new ref create(\nchoice': U8 val,\nint1': U128 val,\nint2': U128 val)\n: IntPairPropertySample ref^\n\nParameters\u00b6\n\nchoice': U8 val\nint1': U128 val\nint2': U128 val\n\nReturns\u00b6\n\nIntPairPropertySample ref^\n\n\nPublic fields\u00b6\nlet choice: U8 val\u00b6\n[Source]"} +{"id": "Pony/net-DNS-_3.txt", "contents": "\nArray[NetAddress val] iso^\n\n\nip6\u00b6\n[Source]\nGets all IPv6 addresses for a host and service.\nfun box ip6(\nauth: DNSAuth val,\nhost: String val,\nservice: String val)\n: Array[NetAddress val] iso^\n\nParameters\u00b6\n\nauth: DNSAuth val\nhost: String val\nservice: String val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-env-_0.txt", "contents": "\n\n\n\n\n\n\nenv.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U64-_3.txt", "contents": "U64 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: U64 val^\n\nReturns\u00b6\n\nU64 val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-list-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_check-pony_check-_14.txt", "contents": "If the property fails using an assertion method of\n[PropertyHelper](pony_check-PropertyHelper.md),\nthe failed example will be shrunken by the generator\nto obtain a smaller and more informative, still failing, sample\nfor reporting.\n\n\"\"\"\nuse \"pony_test\"\n\nprimitive PonyCheck\nfun for_all[T](gen: Generator[T] val, h: TestHelper): ForAll[T] =>\n\"\"\"\nConvenience method for running 1 to many properties as part of\none PonyTest UnitTest.\n\nExample:\n\n```pony\nclass MyTestWithSomeProperties is UnitTest\nfun name(): String => \"mytest/withMultipleProperties\""} +{"id": "Pony/src-files-file-_42.txt", "contents": "else\n_fd = ifdef windows then\n@_open(path.path.cstring(), @ponyint_o_rdonly())\nelse\n@open(path.path.cstring(), @ponyint_o_rdonly())\nend\n\nif _fd == -1 then\n_errno = _get_error()\nelse\ntry\n_FileDes.set_rights(_fd, path, writeable)?\nelse\n_errno = FileError\nend\nend\nend\n\nnew _descriptor(fd: I32, from: FilePath) ? =>\n\"\"\""} +{"id": "Pony/src-itertools-iter-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/src-collections-list-_61.txt", "contents": "end\n\nnode\n\nfun ref remove(i: USize): ListNode[A] ? =>\n\"\"\"\nRemove the i-th node, raising an error if the index is out of bounds, and\nreturning the removed node.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.remove(0)? end // Returns a ListNode[String] containing \"a\" and List now contains [\"b\"; \"c\"]\n```\n\"\"\"\nindex(i)? .> remove()\n\nfun ref clear() =>\n\"\"\"\nEmpties the list.\n\"\"\""} +{"id": "Pony/random-Random-_13.txt", "contents": "Parameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\n[Source]\nA random number in [0, 1)\nfun ref real()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n"} +{"id": "Pony/buffered-Reader-_20.txt", "contents": "F32 val ?\n\n\nf64_be\u00b6\n[Source]\nGet a big-endian F64.\nfun ref f64_be()\n: F64 val ?\n\nReturns\u00b6\n\nF64 val ?\n\n\nf64_le\u00b6\n[Source]\nGet a little-endian F64.\nfun ref f64_le()\n: F64 val ?\n"} +{"id": "Pony/builtin-AsioEvent-_10.txt", "contents": "Parameters\u00b6\n\nthat: AsioEvent val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_help-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-SignedInteger-_7.txt", "contents": "Parameters\u00b6\n\ny: B\n\nReturns\u00b6\n\nA\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: B\n\nReturns\u00b6\n\nB\n\n\nclz\u00b6"} +{"id": "Pony/symbol-lookup-cheat-sheet_3.txt", "contents": "| | (2) intersection |\n| `@` | FFI call |\n| `//` | comments |\n| `/* */` | multi-line or block comments |\n| `=>` | (1) start of a function body |\n| | (2) starts the code of a matching branch |\n| `->` | (1) arrow type |\n| | (2) viewpoint |\n| `._i` | where `i = 1,2,\u2026` means the item at position i in the tuple |\n| `<:` | \"is a subtype of\" or \"can be substituted for\" |\n"} +{"id": "Pony/net-OSSockOpt-_332.txt", "contents": "fun box sctp_add_streams()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_add_vrf_id\u00b6\n[Source]\nfun box sctp_add_vrf_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_asconf\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_82.txt", "contents": "1632\n1633\n1634\n1635\n1636\n1637\n1638\n1639\n1640\n1641\n1642\n1643\n1644\n1645\n1646\n1647\n1648\n1649\n1650\n1651"} +{"id": "Pony/src-pony_check-generator-_88.txt", "contents": "fun generate(rnd: Randomness): GenerateResult[box->T] =>\nif do_shrink then\n(_t, Iter[box->T].repeat_value(_t))\nelse\n_t\nend\nend)\n\nfun none[T: None](): Generator[(T | None)] => Generators.unit[(T | None)](None)\n\nfun repeatedly[T](f: {(): T^ ?} box): Generator[T] =>\n\"\"\"\nGenerate values by calling the lambda `f` repeatedly,\nonce for every invocation of `generate`.\n\n`f` needs to return an ephemeral type `T^`, that means\nin most cases it needs to consume its returned value.\nOtherwise we would end up with\nan alias for `T` which is `T!`.\n(e.g. `String iso` would be returned as `String iso!`,"} +{"id": "Pony/net-TCPConnectionNotify-_6.txt", "contents": "\nauth_failed\u00b6\n[Source]\nA raw TCPConnection has no authentication mechanism. However, when\nprotocols are wrapped in other protocols, this can be used to report an\nauthentication failure in a lower level protocol (e.g. SSL).\nfun ref auth_failed(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n\n\nsent\u00b6"} +{"id": "Pony/builtin-F64-_31.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\natan\u00b6\n[Source]\nfun box atan()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\natan2\u00b6\n[Source]\nfun box atan2(\ny: F64 val)\n: F64 val"} +{"id": "Pony/pony_check-Generator-_9.txt", "contents": "fn: {(T): Generator[U]}[T, U] box\n\nReturns\u00b6\n\nGenerator[U] box\n\n\nunion[U: U]\u00b6\n[Source]\nCreate a generator that produces the value of this generator or the other\nwith the same probability, returning a union type of this generator and\nthe other one.\nfun box union[U: U](\nother: Generator[U] box)\n: Generator[(T | U)] box\n\nParameters\u00b6\n\nother: Generator[U] box\n"} +{"id": "Pony/src-files-directory-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/net-OSSockOpt-_84.txt", "contents": "fun box dccp_sockopt_server_timewait()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_service\u00b6\n[Source]\nfun box dccp_sockopt_service()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_tx_ccid\u00b6\n[Source]"} +{"id": "Pony/process-CapError-_0.txt", "contents": "\n\n\n\n\n\n\nCapError\u00b6\n[Source]\nprimitive val CapError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: CapError val^\n\nReturns\u00b6\n\nCapError val^"} +{"id": "Pony/collections-HashMap-_7.txt", "contents": "\ninsert_if_absent\u00b6\n[Source]\nSet a value in the map if the key doesn't already exist in the Map.\nSaves an extra lookup when doing a pattern like:\nif not my_map.contains(my_key) then\nmy_map(my_key) = my_value\nend\n\nReturns the value, the same as insert, allowing 'insert_if_absent'\nto be used as a drop-in replacement for insert.\nfun ref insert_if_absent(\nkey: K,\nvalue: V)\n: V!\n\nParameters\u00b6\n\nkey: K\nvalue: V"} +{"id": "Pony/files-FileBadFileNumber-_2.txt", "contents": "fun box ne(\nthat: FileBadFileNumber val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileBadFileNumber val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_449.txt", "contents": "fun box sctp_reset_assoc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_reset_streams\u00b6\n[Source]\nfun box sctp_reset_streams()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_reuse_port\u00b6\n[Source]"} +{"id": "Pony/pony_test-TestHelper-_12.txt", "contents": "Assert that the contents of the 2 given ReadSeqs are equal.\nThe type parameter of this function is the type parameter of the\nelements in both ReadSeqs. For instance, when comparing two Array[U8],\nyou should call this method as follows:\nfun apply(h: TestHelper) =>\nlet a: Array[U8] = [1; 2; 3]\nlet b: Array[U8] = [1; 2; 3]\nh.assert_array_eq[U8](a, b)\n\nfun box assert_array_eq[A: (Equatable[A] #read & Stringable #read)](\nexpect: ReadSeq[A] box,\nactual: ReadSeq[A] box,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nexpect: ReadSeq[A] box\nactual: ReadSeq[A] box"} +{"id": "Pony/collections-BinaryHeap-_7.txt", "contents": "Return an iterator for the elements in the heap. The order of elements is\narbitrary.\nfun box values()\n: ArrayValues[A, this->Array[A] ref] ref^\n\nReturns\u00b6\n\nArrayValues[A, this->Array[A] ref] ref^\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_test-PonyTest-_1.txt", "contents": "list: TestList tag)\n: PonyTest tag^\n\nParameters\u00b6\n\nenv: Env val\nlist: TestList tag\n\nReturns\u00b6\n\nPonyTest tag^\n\n\nPublic Behaviours\u00b6\napply\u00b6\n[Source]\nRun the given test, subject to our filters and options.\nbe apply(\ntest: UnitTest iso)\n"} +{"id": "Pony/builtin-Platform-_4.txt", "contents": "Bool val\n\n\nposix\u00b6\n[Source]\nfun box posix()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nwindows\u00b6\n[Source]\nfun box windows()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I8-_53.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/builtin-I16-_9.txt", "contents": "fun box min(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: I16 val)\n: I16 val\n\nParameters\u00b6"} +{"id": "Pony/random-SplitMix64-_7.txt", "contents": ": USize val\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nfun ref i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]\nfun ref i16()"} +{"id": "Pony/cli--index-_3.txt", "contents": "Parser\u00b6\nPrograms then use the CommandSpec they've built to instantiate a parser to\nparse any given command line. This is often env.args(), but could also be\ncommands from files or other input sources. The result of a parse is either a\nparsed command, a command help, or a syntax error object.\nCommands\u00b6\nPrograms then match the object returned by the parser to determine what kind\nit is. Errors and help requests typically print messages and exit. For\ncommands, the fullname can be matched and the effective values for the\ncommand's options and arguments can be retrieved.\nExample program\u00b6\nThis program echos its command line arguments with the option of uppercasing\nthem.\nuse \"cli\"\n\nactor Main\nnew create(env: Env) =>\nlet cs =\ntry\nCommandSpec.leaf(\"echo\", \"A sample echo program\", ["} +{"id": "Pony/itertools-Iter-_7.txt", "contents": "f: {ref(A!): B ?}[A, B] ref)\n: Iter[B] ref^\n\nParameters\u00b6\n\nf: {ref(A!): B ?}[A, B] ref\n\nReturns\u00b6\n\nIter[B] ref^\n\n\nfilter_stateful\u00b6\n[Source]\nAllows filtering of elements based on a stateful adapter, similar to\nfilter.\nfun ref filter_stateful(\nf: {ref(A!): Bool ?}[A] ref)\n: Iter[A!] ref^\n"} +{"id": "Pony/src-files-directory-_46.txt", "contents": "then\nreturn false\nend\n\ntry\nlet path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\n0 == @fchownat(_fd, target.cstring(), uid, gid, I32(0))\nelse\npath'.chown(uid, gid)\nend\nelse\nfalse\nend\n\nfun touchat(target: String): Bool =>\n\"\"\"\nSet the last access and modification times of the directory to now.\n\"\"\""} +{"id": "Pony/examples_14.txt", "contents": "# How to create Arrays with values\n\nSingle values can be separated by semicolon or newline.\n\n```pony\nlet dice: Array[U32] = [1; 2; 3\n4\n5\n6\n]\n```\n"} +{"id": "Pony/term-EraseLine-_2.txt", "contents": "fun box ne(\nthat: EraseLine val)\n: Bool val\n\nParameters\u00b6\n\nthat: EraseLine val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-Randomness-_12.txt", "contents": "fun ref i64(\nmin: I64 val = call,\nmax: I64 val = call)\n: I64 val\n\nParameters\u00b6\n\nmin: I64 val = call\nmax: I64 val = call\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nGenerate a I128 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/files-FileOK-_0.txt", "contents": "\n\n\n\n\n\n\nFileOK\u00b6\n[Source]\nprimitive val FileOK\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileOK val^\n\nReturns\u00b6\n\nFileOK val^"} +{"id": "Pony/src-itertools-iter-_29.txt", "contents": "572\n573\n574\n575\n576\n577\n578\n579\n580\n581\n582\n583\n584\n585\n586\n587\n588\n589\n590\n591"} +{"id": "Pony/ini-IniParse-_2.txt", "contents": "\neq\u00b6\n[Source]\nfun box eq(\nthat: IniParse val)\n: Bool val\n\nParameters\u00b6\n\nthat: IniParse val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: IniParse val)"} +{"id": "Pony/cli--index-_4.txt", "contents": "OptionSpec.bool(\"upper\", \"Uppercase words\"\nwhere short' = 'U', default' = false)\n], [\nArgSpec.string_seq(\"words\", \"The words to echo\")\n])? .> add_help()?\nelse\nenv.exitcode(-1) // some kind of coding error\nreturn\nend\n\nlet cmd =\nmatch CommandParser(cs).parse(env.args, env.vars)\n| let c: Command => c\n| let ch: CommandHelp =>\nch.print_help(env.out)\nenv.exitcode(0)\nreturn\n| let se: SyntaxError =>\nenv.out.print(se.string())\nenv.exitcode(1)"} +{"id": "Pony/src-cli-command_spec-_45.txt", "contents": "if not _required then \"=\" + _default.string() else \"\" end\n\nfun deb_string(): String =>\n\"--\" + _name + \"[\" + _typ.string() + \"]\" +\nif not _required then \"(=\" + _default.string() + \")\" else \"\" end\n\nclass val ArgSpec\n\"\"\"\nArgSpec describes the specification of a positional Arg(ument). They have a\nname, descr(iption), a typ(e), and a default value when they are not\nrequired.\n\nArgs always come after a leaf command, and are assigned in their positional\norder.\n\"\"\"\nlet _name: String\nlet _descr: String\nlet _typ: _ValueType\nlet _default: _Value\nlet _required: Bool"} +{"id": "Pony/src-pony_check-property-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-encode-base64-base64-_11.txt", "contents": " Base64 package\n\nThe Base64 package contains support for doing Base64 binary-to-text encodings.\nWe currently have support 3 encodings: PEM, MIME and URL.\n\nTo learn more about Base64, we suggest you check out the\n[wikipedia entry](https://en.wikipedia.org/wiki/Base64).\n"} +{"id": "Pony/builtin-String-_10.txt", "contents": "String ref^\n\n\nPublic Functions\u00b6\npush_utf32\u00b6\n[Source]\nPush a UTF-32 code point.\nfun ref push_utf32(\nvalue: U32 val)\n: None val\n\nParameters\u00b6\n\nvalue: U32 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/src-builtin-string-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-term-ansi_term-_31.txt", "contents": "fun ref _mod(): (Bool, Bool, Bool) =>\n\"\"\"\nSet the modifier bools.\n\"\"\"\nlet r = match _esc_mod\n| 2 => (false, false, true)\n| 3 => (false, true, false)\n| 4 => (false, true, true)\n| 5 => (true, false, false)\n| 6 => (true, false, true)\n| 7 => (true, true, false)\n| 8 => (true, true, true)\nelse (false, false, false)\nend\n\n_esc_mod = 0\nr\n\nfun ref _keypad() =>\n\"\"\""} +{"id": "Pony/net-UDPNotify-_1.txt", "contents": ": None val\n\nParameters\u00b6\n\nsock: UDPSocket ref\n\nReturns\u00b6\n\nNone val\n\n\nnot_listening\u00b6\n[Source]\nCalled if it wasn't possible to bind the socket to an address.\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:\nfun ref not_listening(sock: UDPSocket ref) =>\nNone\n\nfun ref not_listening("} +{"id": "Pony/src-builtin-array-_94.txt", "contents": "out.reserve((len + (step - 1)) / step)\n\nif step == 1 then\ncopy_to(out, from, 0, len)\nelse\ntry\nvar i = from\n\nwhile i < last do\nout.push(this(i)?)\ni = i + step\nend\nend\nend\nend\n\nout\n\nfun permute(indices: Iterator[USize]): Array[this->A!]^ ? =>\n\"\"\""} +{"id": "Pony/src-ini-ini_map-_4.txt", "contents": "end\ntrue\n\nfun ref errors(line: USize, err: IniError): Bool =>\nfalse\nend\n\nif not Ini(lines, f) then\nerror\nend\n\nmap\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_60.txt", "contents": "\nfun index(i: USize): this->ListNode[A] ? =>\n\"\"\"\nGets the i-th node, raising an error if the index is out of bounds.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.index(0)? end // Returns a ListNode[String] containing \"a\"\n```\n\"\"\"\nif i >= _size then\nerror\nend\n\nvar node = _head as this->ListNode[A]\nvar j = USize(0)\n\nwhile j < i do\nnode = node.next() as this->ListNode[A]\nj = j + 1"} +{"id": "Pony/net-OSSockOpt-_288.txt", "contents": "fun box netrom_n2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_neigh\u00b6\n[Source]\nfun box netrom_neigh()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_node\u00b6\n[Source]"} +{"id": "Pony/src-collections-range-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122class Range[A: (Real[A] val & Number) = USize] is Iterator[A]\n\"\"\"\nProduces `[min, max)` with a step of `inc` for any `Number` type.\n\n```pony\n// iterating with for-loop\nfor i in Range(0, 10) do\nenv.out.print(i.string())\nend\n"} +{"id": "Pony/collections-List-_4.txt", "contents": "\n// Create a third List from a Seq(ence)\n// (In this case a literal array of Strings)\nlet my_third_list = List[String].from([\"First\"; \"Second\"; \"Third\"])\nenv.out.print(\"A list created from an array of three strings has size: \"\n+ my_third_list.size().string()) // 3\nfor n in my_third_list.values() do\nenv.out.print(\"\\t\" + n.string())\nend\n\n// Map over the third List, concatenating some \"BOOM!'s\" into a new List\nlet new_list = my_third_list.map[String]({ (n) => n + \" BOOM!\" })\nenv.out.print(\"Mapping over our three-node list produces a new list of size: \"\n+ new_list.size().string()) // 3\nenv.out.print(\"Each node-value in the resulting list is now far more exciting:\")\nfor n in new_list.values() do\nenv.out.print(\"\\t\" + n.string())\nend\n\n// Filter the new list to extract 2 elements"} +{"id": "Pony/net-OSSockOpt-_129.txt", "contents": "fun box ipv6_authhdr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_autoflowlabel\u00b6\n[Source]\nfun box ipv6_autoflowlabel()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_checksum\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_helper-_24.txt", "contents": "interface tag _IPropertyRunner\n\"\"\"\nInterface for a PropertyRunner without the generic type parameter,\nand only with the behaviours we are interested in.\n\"\"\"\n\nbe expect_action(name: String, round: _Round)\n\nbe complete_action(name: String, round: _Round, ph: PropertyHelper)\n\nbe fail_action(name: String, round: _Round, ph: PropertyHelper)\n\nbe dispose_when_done(disposable: DisposableActor, round: _Round)\n\nbe log(msg: String, verbose: Bool = false)\n\n\nclass val PropertyHelper\n\"\"\"\nHelper for PonyCheck properties."} +{"id": "Pony/builtin-NullablePointer-_1.txt", "contents": "doesn't allocate a wrapper object: there is no containing object for that.\nnew ref create(\nthat: A)\n: NullablePointer[A] ref^\n\nParameters\u00b6\n\nthat: A\n\nReturns\u00b6\n\nNullablePointer[A] ref^\n\n\nnone\u00b6\n[Source]\nThis returns a null pointer typed as a NullablePointer[A].\nnew ref none()\n: NullablePointer[A] ref^\n"} +{"id": "Pony/src-capsicum-cap-_11.txt", "contents": "\nfun sem_getvalue(): U64 => _id(1, 1 << 2)\nfun sem_post(): U64 => _id(1, 1 << 3)\nfun sem_wait(): U64 => _id(1, 1 << 4)\n\nfun event(): U64 => _id(1, 1 << 5)\nfun kqueue_event(): U64 => _id(1, 1 << 6)\nfun ioctl(): U64 => _id(1, 1 << 7)\nfun ttyhook(): U64 => _id(1, 1 << 8)\n\nfun pdgetpid(): U64 => _id(1, 1 << 9)\nfun pdwait(): U64 => _id(1, 1 << 10)\nfun pdkill(): U64 => _id(1, 1 << 11)\n\nfun exattr_delete(): U64 => _id(1, 1 << 12)\nfun exattr_get(): U64 => _id(1, 1 << 13)\nfun exattr_list(): U64 => _id(1, 1 << 14)\nfun exattr_set(): U64 => _id(1, 1 << 15)\n\nfun acl_check(): U64 => _id(1, 1 << 16)"} +{"id": "Pony/builtin-F32-_1.txt", "contents": "new val create(\nvalue: F32 val = 0)\n: F32 val^\n\nParameters\u00b6\n\nvalue: F32 val = 0\n\nReturns\u00b6\n\nF32 val^\n\n\npi\u00b6\n[Source]\nnew val pi()\n: F32 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_parser-_24.txt", "contents": "let help_option = options(_help_name())?\nif help_option.bool() then\nreturn\nif _spec is _root_spec() then\nHelp.general(_root_spec())\nelse\nHelp.for_command(_root_spec(), [_spec.name()])\nend\nend\nend\n\n// If it's a help command, return a general or specific CommandHelp.\nif _spec.name() == _help_name() then\ntry\nmatch args(\"command\")?.string()\n| \"\" => return Help.general(_root_spec())\n| let c: String => return Help.for_command(_root_spec(), [c])\nend\nend\nreturn Help.general(_root_spec())"} +{"id": "Pony/src-net-dns-_9.txt", "contents": "let ip = recover NetAddress end\n@pony_os_getaddr(addr, ip)\nlist.push(consume ip)\naddr = @pony_os_nextaddr(addr)\nend\n\n@freeaddrinfo(result)\nend\n\nlist\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_340.txt", "contents": "fun box sctp_bindx_add_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_bindx_rem_addr\u00b6\n[Source]\nfun box sctp_bindx_rem_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_blk_logging_enable\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_30.txt", "contents": "is_sep(path(0)?) or _drive_letter(path)\nelse\nis_sep(path(0)?)\nend\nelse\nfalse\nend\n\nfun join(path: String, next_path: String): String =>\n\"\"\"\nJoin two paths together. If the next_path is absolute, simply return it.\nThe returned path will be cleaned.\n\"\"\"\nif path.size() == 0 then\nclean(next_path)\nelseif next_path.size() == 0 then\nclean(path)\nelseif is_abs(next_path) then\nclean(next_path)\nelse"} +{"id": "Pony/pony_check-Generators-_13.txt", "contents": "fun box map_of[K: (Hashable #read & Equatable[K] #read), V: V](\ngen: Generator[(K , V)] box,\nmax: USize val = 100)\n: Generator[HashMap[K, V, HashEq[K] val] ref] box\n\nParameters\u00b6\n\ngen: Generator[(K , V)] box\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[HashMap[K, V, HashEq[K] val] ref] box\n\n\nmap_is_of[K: K, V: V]\u00b6\n[Source]\nCreate a generator for MapIs from a generator of key-value tuples.\nThe generated maps will have a size up to max,\nbut tend to have fewer entries depending on the source generator gen."} +{"id": "Pony/builtin-ISize-_36.txt", "contents": "Parameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_21.txt", "contents": "Parameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6"} +{"id": "Pony/random-MT-_7.txt", "contents": "\n\ni32\u00b6\nfun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\nfun ref i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n"} +{"id": "Pony/src-files-directory-_28.txt", "contents": "if linux or bsd\nuse @unlinkat[I32](fd: I32, target: Pointer[U8] tag, flags: I32)\nuse @futimes[I32](fildes: I32, tv: Pointer[(ILong, ILong, ILong, ILong)])\nif not windows\nuse @renameat[I32](fd: I32, from: Pointer[U8] tag, tofd: I32, to_path: Pointer[U8] tag)\nif linux or bsd\nuse @symlinkat[I32](source: Pointer[U8] tag, fd: I32, dst: Pointer[U8] tag) if linux or bsd\nuse @futimesat[I32](fd: I32, path: Pointer[U8] tag,\ntimeval: Pointer[(ILong, ILong, ILong, ILong)]) if linux or bsd\nuse @fchownat[I32](fd: I32, path: Pointer[U8] tag, uid: U32, gid: U32, flags: I32) if linux or bsd\nuse @fchmodat[I32](fd: I32, path: Pointer[U8] tag, mode: U32, flag: I32) if linux or bsd\nuse @mkdirat[I32](fd: I32, path: Pointer[U8] tag, mode: U32)\nuse @fdopendir[Pointer[_DirectoryHandle]](fd: I32) if posix\nuse @opendir[Pointer[_DirectoryHandle]](name: Pointer[U8] tag) if posix\nuse @closedir[I32](dir: Pointer[_DirectoryHandle] tag) if posix\nuse @ponyint_unix_readdir[Pointer[U8] iso^](dir: Pointer[None] tag)\nuse @ponyint_windows_find_data[Pointer[_DirectoryEntry]]()\nif windows\nuse @ponyint_windows_find_data_free[None](data: Pointer[_DirectoryEntry])\nif windows"} +{"id": "Pony/src-process-process_notify-_5.txt", "contents": "Called when ProcessMonitor terminates to cleanup ProcessNotify if a child\nprocess was in fact started. `dispose` will not be called if a child process\nwas never started. The notify will know that a process was started and to\nexpect a `dispose` call by having received a `created` call.\n\n`dispose` includes the exit status of the child process. If the process\nfinished, then `child_exit_status` will be an instance of [Exited](process-Exited.md).\n\nThe childs exit code can be retrieved from the `Exited` instance by using\n[Exited.exit_code()](process-Exited.md#exit_code).\n\nOn Posix systems, if the process has been killed by a signal (e.g. through\nthe `kill` command), `child_exit_status` will be an instance of\n[Signaled](process-Signaled.md) with the signal number that terminated the\nprocess available via [Signaled.signal()](process-Signaled.md#signal).\n\"\"\"\n\n\n\n"} +{"id": "Pony/itertools--index-_0.txt", "contents": "\n\n\n\n\n\n\nItertools Package\u00b6\nThe itertools package provides the Iter class for doing useful things with\niterators. It is Inspired by Python's itertools library, Rust's Iterator, and\nElixir's Enum and Stream.\nIter\u00b6\nThe Iter class wraps iterators so that additional methods may be applied to it.\nSome methods, such as fold and collect, run through the underlying iterator in\norder to return a result. Others, such as map and filter, are lazy. This means\nthat they return another Iter so that the resulting values are computed one by\none as needed. Lazy methods return Iter types.\nFor example, the following code creates an Iter from the values of an array\ncontaining the numbers 1 through 5, increments each number by one, filters out\nany odd numbers, and prints the rest."} +{"id": "Pony/src-net-ossockopt-_78.txt", "contents": "fun af_inet6():I32 => @pony_os_sockopt_option(I32(2))\nfun bluetooth_proto_sco():I32 => @pony_os_sockopt_option(I32(3))\nfun dccp_nr_pkt_types():I32 => @pony_os_sockopt_option(I32(4))\nfun dccp_service_list_max_len():I32 => @pony_os_sockopt_option(I32(5))\nfun dccp_single_opt_maxlen():I32 => @pony_os_sockopt_option(I32(6))\nfun dccp_sockopt_available_ccids():I32 => @pony_os_sockopt_option(I32(7))\nfun dccp_sockopt_ccid():I32 => @pony_os_sockopt_option(I32(8))\nfun dccp_sockopt_ccid_rx_info():I32 => @pony_os_sockopt_option(I32(9))\nfun dccp_sockopt_ccid_tx_info():I32 => @pony_os_sockopt_option(I32(10))\nfun dccp_sockopt_change_l():I32 => @pony_os_sockopt_option(I32(11))\nfun dccp_sockopt_change_r():I32 => @pony_os_sockopt_option(I32(12))\nfun dccp_sockopt_get_cur_mps():I32 => @pony_os_sockopt_option(I32(13))\nfun dccp_sockopt_packet_size():I32 => @pony_os_sockopt_option(I32(14))\nfun dccp_sockopt_qpolicy_id():I32 => @pony_os_sockopt_option(I32(15))\nfun dccp_sockopt_qpolicy_txqlen():I32 => @pony_os_sockopt_option(I32(16))\nfun dccp_sockopt_recv_cscov():I32 => @pony_os_sockopt_option(I32(17))\nfun dccp_sockopt_rx_ccid():I32 => @pony_os_sockopt_option(I32(18))\nfun dccp_sockopt_send_cscov():I32 => @pony_os_sockopt_option(I32(19))\nfun dccp_sockopt_server_timewait():I32 => @pony_os_sockopt_option(I32(20))\nfun dccp_sockopt_service():I32 => @pony_os_sockopt_option(I32(21))"} +{"id": "Pony/random-SplitMix64-_2.txt", "contents": "Only x is used, y is discarded.\nnew ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: SplitMix64 ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nSplitMix64 ref^\n\n\nPublic Functions\u00b6\nnext\u00b6\n[Source]\nfun ref next()"} +{"id": "Pony/files-Directory-_5.txt", "contents": "\nReturns\u00b6\n\nFile iso^ ?\n\n\nopen_file\u00b6\n[Source]\nOpen for read only, failing if it doesn't exist.\nfun box open_file(\ntarget: String val)\n: File iso^ ?\n\nParameters\u00b6\n\ntarget: String val\n\nReturns\u00b6\n\nFile iso^ ?"} +{"id": "Pony/pony_check--index-_2.txt", "contents": "The classical list-reverse example:\nuse \"collections\"\nuse \"pony_check\"\n\nclass ListReverseProperty is Property1[List[USize]]\nfun name(): String => \"list/reverse\"\n\nfun gen(): Generator[List[USize]] =>\nGenerators.list_of[USize](Generators.usize())\n\nfun property(arg1: List[USize], ph: PropertyHelper) =>\nph.array_eq[USize](arg1, arg1.reverse().reverse())\n\nIntegration into PonyTest\u00b6\nThere are two ways of integrating a Property into\nPonyTest:\n\nIn order to pass your Property to the PonyTest engine, you need to wrap it\ninside a Property1UnitTest.\n"} +{"id": "Pony/builtin-UnsignedInteger-_5.txt", "contents": "[Source]\nfun box shr(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nfld\u00b6\n[Source]\nfun box fld(\ny: A)\n: A\n"} +{"id": "Pony/builtin-FloatingPoint-_60.txt", "contents": "U32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-NetAuth-_1.txt", "contents": "from: AmbientAuth val\n\nReturns\u00b6\n\nNetAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: NetAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: NetAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-pointer-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_157.txt", "contents": "fun box ipv6_priority_15()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_8\u00b6\n[Source]\nfun box ipv6_priority_8()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_9\u00b6\n[Source]"} +{"id": "Pony/encode-base64--index-_1.txt", "contents": "end\n\nPublic Types\u00b6\n\nprimitive Base64\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileChown-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/callbacks_4.txt", "contents": "{\nvoid(*fun_ptr)();\n};\n```\n\nIn the same vein as bare functions, bare lambdas cannot specify captures, cannot use `this` neither as an identifier nor as a type, and cannot specify a receiver capability. In addition, a bare lambda object always has a `val` capability.\n\nClassic lambda types and bare lambda types can never be subtypes of each other.\n"} +{"id": "Pony/net-OSSockOpt-_272.txt", "contents": "fun box netlink_broadcast_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_cap_ack\u00b6\n[Source]\nfun box netlink_cap_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_connector\u00b6\n[Source]"} +{"id": "Pony/collections-persistent--index-_1.txt", "contents": "class HashSet\ntype List\nprimitive Lists\ntype Map\ntype MapIs\nclass MapKeys\nclass MapPairs\nclass MapValues\nprimitive Nil\ntype Set\ntype SetIs\nclass Vec\nclass VecKeys\nclass VecPairs\nclass VecValues\n\n\n\n\n"} +{"id": "Pony/collections-HashSet-_9.txt", "contents": "None val\n\n\ndifference\u00b6\n[Source]\nRemove elements in this which are also in that. Add elements in that which\nare not in this.\nfun ref difference(\nthat: Iterator[A^] ref)\n: None val\n\nParameters\u00b6\n\nthat: Iterator[A^] ref\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/collections-ListNode-_3.txt", "contents": "create\u00b6\n[Source]\nCreate a node. Initially, it is not in any list.\nnew ref create(\nitem: (A | None val) = reference)\n: ListNode[A] ref^\n\nParameters\u00b6\n\nitem: (A | None val) = reference\n\nReturns\u00b6\n\nListNode[A] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nReturn the item, if we have one, otherwise raise an error."} +{"id": "Pony/files-FileInfo-_1.txt", "contents": "new val create(\nfrom: FilePath val)\n: FileInfo val^ ?\n\nParameters\u00b6\n\nfrom: FilePath val\n\nReturns\u00b6\n\nFileInfo val^ ?\n\n\nPublic fields\u00b6\nlet filepath: FilePath val\u00b6\n[Source]\n\nlet mode: FileMode val\u00b6\n[Source]\nUNIX-style file mode."} +{"id": "Pony/debug-Debug-_1.txt", "contents": "Debug val^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nIf platform is debug configured, print either a single stringable or a\nsequence of stringables. The default separator is \", \", and the default\noutput stream is stdout.\nfun box apply(\nmsg: (Stringable box | ReadSeq[Stringable box] box),\nsep: String val = \", \",\nstream: (DebugOut val | DebugErr val) = reference)\n: None val\n\nParameters\u00b6\n\nmsg: (Stringable box | ReadSeq[Stringable box] box)\nsep: String val = \", \"\nstream: (DebugOut val | DebugErr val) = reference"} +{"id": "Pony/pony_check-Randomness-_15.txt", "contents": "fun ref isize(\nmin: ISize val = call,\nmax: ISize val = call)\n: ISize val\n\nParameters\u00b6\n\nmin: ISize val = call\nmax: ISize val = call\n\nReturns\u00b6\n\nISize val\n\n\nf32\u00b6\n[Source]\nGenerate a F32 in closed interval [min, max]\n(default: [0.0, 1.0]).\nfun ref f32("} +{"id": "Pony/src-files-file_path-_24.txt", "contents": "\"\"\"\n\nnew val create(\nbase: FileAuth,\npath': String,\ncaps': FileCaps val = recover val FileCaps .> all() end)\n=>\n\"\"\"\nCreate a new path to any location.\n\nUnless absolute, path' will be relative to the program's working directory.\n\nCapabilities are exactly as given.\n\"\"\"\ncaps.union(caps')\npath = Path.abs(path')\n\nnew val from(\nbase: FilePath,\npath': String,"} +{"id": "Pony/src-files-file_caps-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-builtin-signed-_33.txt", "contents": "652\n653\n654\n655\n656\n657\n658\n659\n660\n661\n662\n663\n664\n665\n666\n667\n668\n669\n670\n671"} +{"id": "Pony/pony_bench-AsyncOverheadBenchmark-_4.txt", "contents": "\nParameters\u00b6\n\nc: AsyncBenchContinue val\n\nReturns\u00b6\n\nNone val\n\n\nbefore_iteration\u00b6\n[Source]\nfun ref before_iteration(\nc: AsyncBenchContinue val)\n: None val\n\nParameters\u00b6\n\nc: AsyncBenchContinue val\n"} +{"id": "Pony/pony_check-Randomness-_3.txt", "contents": "fun ref u16(\nmin: U16 val = call,\nmax: U16 val = call)\n: U16 val\n\nParameters\u00b6\n\nmin: U16 val = call\nmax: U16 val = call\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]\nGenerate a U32 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/random-XorOshiro128Plus-_4.txt", "contents": "[Source]\nfun ref u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun ref u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6"} +{"id": "Pony/9_object-literals_9.txt", "contents": "# Actor literals\n\nNormally, an object literal is an instance of an anonymous class. To make it an instance of an anonymous actor, just include one or more behaviours in the object literal definition.\n\n```pony\nobject\nbe apply() => env.out.print(\"hi\")\nend\n```\n\nAn actor literal is always returned as a `tag`.\n"} +{"id": "Pony/src-net-ossockopt-_122.txt", "contents": "fun so_proxyusr():I32 => @pony_os_sockopt_option(I32(882))\nfun so_randomport():I32 => @pony_os_sockopt_option(I32(883))\nfun so_rcvbuf():I32 => @pony_os_sockopt_option(I32(884))\nfun so_rcvbufforce():I32 => @pony_os_sockopt_option(I32(885))\nfun so_rcvlowat():I32 => @pony_os_sockopt_option(I32(886))\nfun so_rcvtimeo():I32 => @pony_os_sockopt_option(I32(887))\nfun so_rds_transport():I32 => @pony_os_sockopt_option(I32(888))\nfun so_reuseaddr():I32 => @pony_os_sockopt_option(I32(889))\nfun so_reuseport():I32 => @pony_os_sockopt_option(I32(890))\nfun so_reuseshareuid():I32 => @pony_os_sockopt_option(I32(891))\nfun so_rfcomm_fc_info():I32 => @pony_os_sockopt_option(I32(892))\nfun so_rfcomm_mtu():I32 => @pony_os_sockopt_option(I32(893))\nfun so_rxq_ovfl():I32 => @pony_os_sockopt_option(I32(894))\nfun so_sco_conninfo():I32 => @pony_os_sockopt_option(I32(895))\nfun so_sco_mtu():I32 => @pony_os_sockopt_option(I32(896))\nfun so_security_authentication():I32 => @pony_os_sockopt_option(I32(897))\nfun so_security_encryption_network():I32 => @pony_os_sockopt_option(I32(898))\nfun so_security_encryption_transport():I32 => @pony_os_sockopt_option(I32(899))\nfun so_select_err_queue():I32 => @pony_os_sockopt_option(I32(900))\nfun so_setclp():I32 => @pony_os_sockopt_option(I32(901))"} +{"id": "Pony/format-FormatExp-_1.txt", "contents": "new val create()\n: FormatExp val^\n\nReturns\u00b6\n\nFormatExp val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: FormatExp val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatExp val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_83.txt", "contents": "fun box dccp_sockopt_rx_ccid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_send_cscov\u00b6\n[Source]\nfun box dccp_sockopt_send_cscov()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_server_timewait\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_29.txt", "contents": "Iter[I64]([1; 2; 3].values())\n.nth(2)\n\n2\nfun ref nth(\nn: USize val)\n: A ?\n\nParameters\u00b6\n\nn: USize val\n\nReturns\u00b6\n\nA ?\n\n\nrun\u00b6\n[Source]\nIterate through the values of the iterator without a for loop. The"} +{"id": "Pony/term-Readline-_14.txt", "contents": "shift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\nfn_key\u00b6\n[Source]\nfun ref fn_key(\ni: U8 val,\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\ni: U8 val\nctrl: Bool val"} +{"id": "Pony/src-net-tcp_connection-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/src-collections-set-_18.txt", "contents": "Checks whether the set contains the value.\n\"\"\"\n_map.contains(value)\n\nfun ref clear() =>\n\"\"\"\nRemove all elements from the set.\n\"\"\"\n_map.clear()\n\nfun ref set(value: A) =>\n\"\"\"\nAdd a value to the set.\n\"\"\"\n_map(value) = consume value\n\nfun ref unset(value: box->A!) =>\n\"\"\"\nRemove a value from the set.\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_189.txt", "contents": "fun box ipx_rt_routed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_rt_snap\u00b6\n[Source]\nfun box ipx_rt_snap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_special_none\u00b6\n[Source]"} +{"id": "Pony/annotations_0.txt", "contents": "# Program Annotations\n\nIn Pony, we provide a special syntax for implementation-specific annotations to various elements of a program. The basic syntax is a comma-separated list of identifiers surrounded by backslashes:\n\n```pony\n\\annotation1, annotation2\\\n```\n\nHere, `annotation1` and `annotation2` can be any valid Pony identifier, i.e. a sequence of alphanumeric characters starting with a letter or an underscore.\n"} +{"id": "Pony/builtin-I64-_19.txt", "contents": "(I64 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: I64 val)\n: I64 val ?\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val ?\n\n\nsub_partial\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_helper-_30.txt", "contents": "try\ntest()?\n_fail(_fmt_msg(loc, \"Assert error failed. \" + msg))\nfalse\nelse\n_runner.log(_fmt_msg(loc, \"Assert error passed. \" + msg), true)\ntrue\nend\n\nfun assert_no_error(\ntest: {(): None ?} box,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the given test function does not throw an error when run.\n\"\"\"\ntry\ntest()?"} +{"id": "Pony/src-capsicum-cap-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-net-ossockopt-_95.txt", "contents": "fun ip_unicast_if():I32 => @pony_os_sockopt_option(I32(342))\nfun ip_xfrm_policy():I32 => @pony_os_sockopt_option(I32(343))\nfun local_connwait():I32 => @pony_os_sockopt_option(I32(344))\nfun local_creds():I32 => @pony_os_sockopt_option(I32(345))\nfun local_peercred():I32 => @pony_os_sockopt_option(I32(346))\nfun local_peerepid():I32 => @pony_os_sockopt_option(I32(347))\nfun local_peereuuid():I32 => @pony_os_sockopt_option(I32(348))\nfun local_peerpid():I32 => @pony_os_sockopt_option(I32(349))\nfun local_peeruuid():I32 => @pony_os_sockopt_option(I32(350))\nfun local_vendor():I32 => @pony_os_sockopt_option(I32(351))\nfun max_tcpoptlen():I32 => @pony_os_sockopt_option(I32(352))\nfun mcast_block_source():I32 => @pony_os_sockopt_option(I32(353))\nfun mcast_exclude():I32 => @pony_os_sockopt_option(I32(354))\nfun mcast_include():I32 => @pony_os_sockopt_option(I32(355))\nfun mcast_join_group():I32 => @pony_os_sockopt_option(I32(356))\nfun mcast_join_source_group():I32 => @pony_os_sockopt_option(I32(357))\nfun mcast_leave_group():I32 => @pony_os_sockopt_option(I32(358))\nfun mcast_leave_source_group():I32 => @pony_os_sockopt_option(I32(359))\nfun mcast_msfilter():I32 => @pony_os_sockopt_option(I32(360))\nfun mcast_unblock_source():I32 => @pony_os_sockopt_option(I32(361))"} +{"id": "Pony/net-OSSockOpt-_241.txt", "contents": "fun box ip_rsvp_vif_on()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_sendsrcaddr\u00b6\n[Source]\nfun box ip_sendsrcaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_striphdr\u00b6\n[Source]"} +{"id": "Pony/1_classes_5.txt", "contents": "name = name'\n_hunger_level = 0\n\nnew hungry(name': String, hunger': U64) =>\nname = name'\n_hunger_level = hunger'\n```\n\nHere, every `Wombat` begins a little bit thirsty, regardless of which constructor is called.\n"} +{"id": "Pony/src-builtin-string-_70.txt", "contents": "1392\n1393\n1394\n1395\n1396\n1397\n1398\n1399\n1400\n1401\n1402\n1403\n1404\n1405\n1406\n1407\n1408\n1409\n1410\n1411"} +{"id": "Pony/src-term-ansi_notify-_4.txt", "contents": "\nfun ref home(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref end_key(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref page_up(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref page_down(ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref fn_key(i: U8, ctrl: Bool, alt: Bool, shift: Bool) =>\nNone\n\nfun ref prompt(term: ANSITerm ref, value: String) =>\nNone\n\nfun ref size(rows: U16, cols: U16) =>"} +{"id": "Pony/pony_test-PonyTest-_2.txt", "contents": "Parameters\u00b6\n\ntest: UnitTest iso\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-_process-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/as_5.txt", "contents": "end\nend\n```\n\nNote, All the `as` examples above could be written using a `match` statement where a failure to match results in `error`. For example, our last example written to use `match` would be:\n\n```pony\nactor Main\nnew create(env: Env) =>\nlet anys = Array[Any ref].>push(Wombat).>push(Capybara)\nfor any in anys.values() do\ntry\nmatch any\n| let critter: Critter =>\nenv.out.print(critter.wash())\nelse\nerror\nend\nend\nend"} +{"id": "Pony/src-net-tcp_connection-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-Array-_41.txt", "contents": "The removed element is returned.\nfun ref shift()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nappend\u00b6\n[Source]\nAppend the elements from a sequence, starting from the given offset.\nfun ref append(\nseq: (ReadSeq[A] box & ReadElement[A^] box),\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-auth-_2.txt", "contents": "new create(from: (AmbientAuth | NetAuth)) =>\nNone\n\nprimitive TCPAuth\nnew create(from: (AmbientAuth | NetAuth)) =>\nNone\n\nprimitive TCPListenAuth\nnew create(from: (AmbientAuth | NetAuth | TCPAuth)) =>\nNone\n\nprimitive TCPConnectAuth\nnew create(from: (AmbientAuth | NetAuth | TCPAuth)) =>\nNone\n\n\n\n\n\n"} +{"id": "Pony/src-files-directory-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/ponytest_1.txt", "contents": "# Example program\n\nTo use PonyTest simply write a class for each test and a `TestList` type that tells the PonyTest object about the tests. Typically the `TestList` will be Main for the package.\n\nThe following is a complete program with 2 trivial tests.\n\n```pony\nuse \"pony_test\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>\nNone\n\nfun tag tests(test: PonyTest) =>\ntest(_TestAdd)\ntest(_TestSub)\n"} +{"id": "Pony/signals-SignalNotify-_0.txt", "contents": "\n\n\n\n\n\n\nSignalNotify\u00b6\n[Source]\nNotifications for a signal.\ninterface ref SignalNotify\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nCalled with the the number of times the signal has fired since this was\nlast called. Return false to stop listening for the signal.\nfun ref apply(\ncount: U32 val)\n: Bool val"} +{"id": "Pony/net-OSSockOpt-_344.txt", "contents": "fun box sctp_cause_invalid_param()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_invalid_stream\u00b6\n[Source]\nfun box sctp_cause_invalid_stream()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_missing_param\u00b6\n[Source]"} +{"id": "Pony/use-statement_4.txt", "contents": "\n```pony\n// In package A\nclass Foo\n\n// In package B\nclass Foo\n\n// In your code\nuse \"packageA\"\nuse b = \"packageB\"\n\nclass Bar\nvar _x: Foo // The Foo from package A\nvar _y: b.Foo // The Foo from package B\n```\n\n__Can I just specify the full package path and forget about the use command, like I do in Java and C#?__ No, you can't do that in Pony. You can't refer to one package based on a `use` command for another package and you can't use types from a package without a use command for that package. Every package that you want to use must have its own `use` command.\n\n__Are there limits on the names I can use for an alias?__ Use alias names have to start with a lower case letter. Other than that you can use whatever name you want, as long as you're not using that name for any other purpose in your file."} +{"id": "Pony/builtin-U32-_29.txt", "contents": "fun box rotr(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-map-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-pony_check-generator-_94.txt", "contents": "end\nconsume res\n})\n(consume result, shrink_iter)\nend\n)\n\nfun array_of[T](\ngen: Generator[T],\nmin: USize = 0,\nmax: USize = 100)\n: Generator[Array[T]]\n=>\nGenerators.seq_of[T, Array[T]](gen, min, max)\n\nfun shuffled_array_gen[T](\ngen: Generator[Array[T]])\n: Generator[Array[T]]\n=>\nGenerator[Array[T]]("} +{"id": "Pony/src-builtin-stdin-_18.txt", "contents": "return false\nend\n\ndata.truncate(len)\nnotify(consume data)\n\nifdef windows then\n// Not allowed to call pony_os_stdin_read again yet, exit loop.\nreturn true\nend\n\nsum = sum + len\n\nif sum > (1 << 12) then\nif _use_event then\n_read_again()\nend\n\nbreak\nend"} +{"id": "Pony/builtin-Integer-_4.txt", "contents": ": A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the operation overflows, the result is undefined.\nfun box sub_unsafe(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/signals-Sig-_8.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nterm\u00b6\n[Source]\nfun box term()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nurg\u00b6\n[Source]\nfun box urg()\n: U32 val\n"} +{"id": "Pony/examples_13.txt", "contents": "# Create empty functions in a class\n\n```pony\nclass Test\nfun alpha() =>\n\"\"\"\n\"\"\"\nfun beta() =>\n\"\"\"\n\"\"\"\n```\n"} +{"id": "Pony/src-net-udp_socket-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-builtin-array-_70.txt", "contents": "\"\"\"\nif i < _size then\n_size = _size - 1\n_ptr._offset(i)._delete(1, _size - i)\nelse\nerror\nend\n\nfun ref truncate(len: USize) =>\n\"\"\"\nTruncate an array to the given length, discarding excess elements. If the\narray is already smaller than len, do nothing.\n\"\"\"\n_size = _size.min(len)\n\nfun ref trim_in_place(from: USize = 0, to: USize = -1) =>\n\"\"\"\nTrim the array to a portion of itself, covering `from` until `to`.\nUnlike slice, the operation does not allocate a new array nor copy elements.\n\"\"\""} +{"id": "Pony/src-collections-persistent-list-_38.txt", "contents": "Flatmapping a function from A to B over the empty list yields the\nempty list of Bs.\n\"\"\"\nNil[B]\n\nfun for_each(f: {(val->A)} box) =>\n\"\"\"\nApplying a function to every member of the empty list is a no-op.\n\"\"\"\nNone\n\nfun filter(f: {(val->A): Bool} box): Nil[A] =>\n\"\"\"\nFiltering the empty list yields the empty list.\n\"\"\"\nthis\n\nfun fold[B](f: {(B, val->A): B^} box, acc: B): B =>\n\"\"\"\nFolding over the empty list yields the initial accumulator."} +{"id": "Pony/builtin-I16-_44.txt", "contents": "fun box ge(\ny: I16 val)\n: Bool val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nfun box gt(\ny: I16 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-pony_bench-benchmark-_7.txt", "contents": "you can use `before_iteration` and `after_iteration` methods respectively\nthat run before/after each iteration.\n\"\"\"\nfun name(): String\nfun config(): BenchConfig => BenchConfig\nfun overhead(): AsyncMicroBenchmark^ => AsyncOverheadBenchmark\nfun ref before(c: AsyncBenchContinue) => c.complete()\nfun ref before_iteration(c: AsyncBenchContinue) => c.complete()\nfun ref apply(c: AsyncBenchContinue) ?\nfun ref after(c: AsyncBenchContinue) => c.complete()\nfun ref after_iteration(c: AsyncBenchContinue) => c.complete()\n\ninterface tag BenchmarkList\nfun tag benchmarks(bench: PonyBench)\n\n// TODO documentation\nclass val BenchConfig\n\"\"\"\nConfiguration of a benchmark.\n\"\"\""} +{"id": "Pony/files-Path-_7.txt", "contents": "path: String val)\n: String val\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nString val\n\n\nrel\u00b6\n[Source]\nReturns a path such that Path.join(to, Path.rel(to, target)) == target.\nRaises an error if this isn't possible.\nfun box rel(\nto: String val,\ntarget: String val)\n: String val ?"} +{"id": "Pony/builtin-I128-_18.txt", "contents": "Unsafe operation.\nIf the operation overflows, the result is undefined.\nfun box mul_unsafe(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined."} +{"id": "Pony/4_traits-and-interfaces_15.txt", "contents": "fun ref try_compacting(thing: Compactable) =>\nif thing.size() > _threshold then\nthing.compact()\nend\n```\n\nThe flexibility of `interface` has allowed us to define a type `Compactable` that we can use to allow our `Compactor` to accept a variety of data types including `Array`, `Map`, and `String` from the standard library.\n"} +{"id": "Pony/net-OSSockOpt-_513.txt", "contents": "fun box so_priority()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_protocol\u00b6\n[Source]\nfun box so_protocol()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_protocol_info\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_4.txt", "contents": "\nU8 val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/ponypath_1.txt", "contents": "# Adding to `PONYPATH`\n\nAssuming you just placed new Pony code under a directory called `pony` in your home directory here is how to inform `ponyc` that the directory contains Pony code via adding it to `PONYPATH`.\n"} +{"id": "Pony/src-pony_check-property_runner-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/pony_check-IntProperty-_3.txt", "contents": "ULong val | USize val) & Integer[T] val)](\nx: T,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n\nx: T\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nname\u00b6\nfun box name()\n: String val\n\nReturns\u00b6"} +{"id": "Pony/ini-IniNoDelimiter-_0.txt", "contents": "\n\n\n\n\n\n\nIniNoDelimiter\u00b6\n[Source]\nprimitive val IniNoDelimiter\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: IniNoDelimiter val^\n\nReturns\u00b6\n\nIniNoDelimiter val^"} +{"id": "Pony/net-OSSockOpt-_499.txt", "contents": "fun box so_mark()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_max_msg_size\u00b6\n[Source]\nfun box so_max_msg_size()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_max_pacing_rate\u00b6\n[Source]"} +{"id": "Pony/builtin-RuntimeOptions-_1.txt", "contents": "the Pony runtime help:\nactor Main\nnew create(env: Env) =>\nenv.out.print(\"Hello, world.\")\n\nfun @runtime_override_defaults(rto: RuntimeOptions) =>\nrto.ponyhelp = true\n\nstruct ref RuntimeOptions\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: RuntimeOptions iso^\n\nReturns\u00b6\n\nRuntimeOptions iso^\n"} +{"id": "Pony/src-collections-persistent-map-_15.txt", "contents": "end\n\nfun val concat(iter: Iterator[(val->K, val->V)]): HashMap[K, V, H] =>\n\"\"\"\nAdd the K, V pairs from the given iterator to the map.\n\"\"\"\nvar m = this\nfor (k, v) in iter do\nm = m.update(k, v)\nend\nm\n\nfun val add(key: K, value: val->V): HashMap[K, V, H] =>\n\"\"\"\nReturn this Map with the given (key, value) mapping.\n\"\"\"\nupdate(key, value)\n\nfun val sub(key: K): HashMap[K, V, H] =>\n\"\"\""} +{"id": "Pony/builtin-String-_83.txt", "contents": "\n\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nvalues\u00b6\n[Source]\nReturn an iterator over the bytes in the string.\nfun box values()\n: StringBytes ref^\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I16-_20.txt", "contents": "I16 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: I16 val)\n: I16 val ?\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n\nI16 val ?\n\n\ndiv_partial\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_55.txt", "contents": "\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n"} +{"id": "Pony/net-OSSockOpt-_491.txt", "contents": "fun box so_incoming_cpu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_keepalive\u00b6\n[Source]\nfun box so_keepalive()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_l2cap_encrypted\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_help-_17.txt", "contents": "let cols = Array[(USize,String,String)]()\nfor a in args.values() do\ncols.push((2, a.help_string(), a.descr()))\nend\n_Columns.write(w, cols)\n\nfun _any_options(): Bool =>\nif _spec.options().size() > 0 then\ntrue\nelse\nmatch _parent\n| let p: CommandHelp => p._any_options()\nelse\nfalse\nend\nend\n\nfun _all_options(): Array[OptionSpec box] =>\nlet options = Array[OptionSpec box]()\n_all_options_fill(options)"} +{"id": "Pony/1_hello-world_0.txt", "contents": "# Hello World -- Your First Pony Program\n\nNow that you've successfully installed the Pony compiler, let's start programming! Our first program will be a very traditional one. We're going to print \"Hello, world!\". First, create a directory called `helloworld`:\n\n```bash\nmkdir helloworld\ncd helloworld\n```\n\n__Does the name of the directory matter?__ Yes, it does. It's the name of your program! By default when your program is compiled, the resulting executable binary will have the same name as the directory your program lives in. You can also set the name using the --bin-name or -b options on the command line.\n"} +{"id": "Pony/builtin-ReadElement-_0.txt", "contents": "\n\n\n\n\n\n\nReadElement[A: A]\u00b6\n[Source]\nUsed to show that a ReadSeq can return an element of a specific unmodified\ntype.\ninterface box ReadElement[A: A]\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\ni: USize val)\n: A ?\n"} +{"id": "Pony/src-files-file-_50.txt", "contents": "requested data\n\"\"\"\n_pending_writev .> push((data.cpointer(), data.size()))\n_pending_writev_total = _pending_writev_total + data.size()\n\nfun ref queuev(data: ByteSeqIter box) =>\n\"\"\"\nQueue an iterable collection of ByteSeqs to be written\nNOTE: Queue'd data will always be written before normal print/write\nrequested data\n\"\"\"\nfor bytes in data.values() do\nqueue(bytes)\nend\n\nfun ref flush(): Bool =>\n\"\"\"\nFlush any queued data\n\"\"\"\n_pending_writes()"} +{"id": "Pony/pony_check-ForAll2-_0.txt", "contents": "\n\n\n\n\n\n\nForAll2[T1: T1, T2: T2]\u00b6\n[Source]\nclass ref ForAll2[T1: T1, T2: T2]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\nh: TestHelper val)\n: ForAll2[T1, T2] ref^\n"} +{"id": "Pony/builtin-U16-_3.txt", "contents": "U16 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: U16 val^\n\nReturns\u00b6\n\nU16 val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: U16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Comparable-_6.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_474.txt", "contents": "fun box somaxconn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsonpx_setoptshut\u00b6\n[Source]\nfun box sonpx_setoptshut()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_acceptconn\u00b6\n[Source]"} +{"id": "Pony/src-process-_process-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-I128-_5.txt", "contents": "\nI128 val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-string-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/signals-Sig-_5.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nkill\u00b6\n[Source]\nfun box kill()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nbus\u00b6\n[Source]\nfun box bus()\n: U32 val\n"} +{"id": "Pony/src-term-readline-_0.txt", "contents": "\n\n\n\n\n\n\nreadline.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/format-PrefixSpec-_0.txt", "contents": "\n\n\n\n\n\n\nPrefixSpec\u00b6\n[Source]\ntrait val PrefixSpec\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-TCPConnection-_32.txt", "contents": "option: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nget_so_error\u00b6\n[Source]\nWrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)\nfun ref get_so_error()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nget_so_rcvbuf\u00b6\n[Source]"} +{"id": "Pony/collections-Hashable64-_1.txt", "contents": "U64 val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I64-_8.txt", "contents": "fun box bitwidth()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_45.txt", "contents": "\nisize\u00b6\n[Source]\nfun box isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8\u00b6\n[Source]\nfun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n"} +{"id": "Pony/src-pony_bench-_runner-_12.txt", "contents": "fun ref _gc_next_behavior() =>\n@pony_triggergc(@pony_ctx())\n\nactor _RunAsync is _Runner\nlet _ponybench: PonyBench\nembed _aggregator: _Aggregator\nlet _name: String\nlet _bench: AsyncMicroBenchmark ref\nvar _start_time: U64 = 0\nvar _n: U64 = 0\nvar _a: U64 = 0\n\nembed _before_cont: AsyncBenchContinue =\nAsyncBenchContinue._create(this, recover this~_before_done_cont() end)\nembed _before_iteration_cont: AsyncBenchContinue =\nAsyncBenchContinue._create(this, recover this~_before_iteration_done_cont() end)\nembed _iteration_cont: AsyncBenchContinue =\nAsyncBenchContinue._create(this, recover this~_iteration_done_cont() end)\nembed _after_iteration_cont: AsyncBenchContinue =\nAsyncBenchContinue._create(this, recover this~_after_iteration_done_cont() end)"} +{"id": "Pony/src-net-tcp_connection-_63.txt", "contents": "1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271"} +{"id": "Pony/net-OSSockOpt-_452.txt", "contents": "fun box sctp_sack_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sack_nonce_sum\u00b6\n[Source]\nfun box sctp_sack_nonce_sum()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sack_rwnd_logging_enable\u00b6\n[Source]"} +{"id": "Pony/builtin-Seq-_11.txt", "contents": "fun box values()\n: Iterator[this->A] ref^\n\nReturns\u00b6\n\nIterator[this->A] ref^\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-float-_42.txt", "contents": "new _inf(negative: Bool) => compile_intrinsic\n\nnew from_bits(i: U64) => compile_intrinsic\nfun bits(): U64 => compile_intrinsic\nnew from[B: (Number & Real[B] val)](a: B) => a.f64()\n\nnew min_value() =>\n\"\"\"\nMinimum negative value representable.\n\"\"\"\nfrom_bits(0xFFEF_FFFF_FFFF_FFFF)\n\nnew max_value() =>\n\"\"\"\nMaximum positive value representable.\n\"\"\"\nfrom_bits(0x7FEF_FFFF_FFFF_FFFF)\n\nnew min_normalised() =>\n\"\"\""} +{"id": "Pony/src-bureaucracy-registrar-_3.txt", "contents": "\"\"\"\nA Registrar keeps a map of lookup string to anything. Generally, this is used\nto keep a directory of long-lived service-providing actors that can be\nlooked up name.\n\"\"\"\nembed _registry: Map[String, Any tag] = _registry.create()\n\nbe update(key: String, value: Any tag) =>\n\"\"\"\nAdd, or change, a lookup mapping.\n\"\"\"\n_registry(key) = value\n\nbe remove(key: String, value: Any tag) =>\n\"\"\"\nRemove a mapping. This only takes effect if provided key currently maps to\nthe provided value. If the key maps to some other value (perhaps after\nupdating), the mapping won't be removed.\n\"\"\"\ntry"} +{"id": "Pony/builtin-String-_0.txt", "contents": "\n\n\n\n\n\n\nString\u00b6\n[Source]\nA String is an ordered collection of bytes.\nStrings don't specify an encoding.\nExample usage of some common String methods:\nactor Main\nnew create(env: Env) =>\ntry\n// construct a new string\nlet str = \"Hello\"\n\n// make an uppercased version\nlet str_upper = str.upper()"} +{"id": "Pony/src-net-tcp_listen_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/c-abi_3.txt", "contents": "ifndef __JCH_H_"} +{"id": "Pony/pony_check-PropertyResultNotify-_0.txt", "contents": "\n\n\n\n\n\n\nPropertyResultNotify\u00b6\n[Source]\ninterface val PropertyResultNotify\n\nPublic Functions\u00b6\nfail\u00b6\n[Source]\nCalled when a Property has failed (did not hold for a sample)\nor when execution raised an error.\nDoes not necessarily denote completeness of the property execution,\nsee complete(success: Bool) for that purpose.\nfun box fail(\nmsg: String val)"} +{"id": "Pony/builtin-Seq-_5.txt", "contents": "\nNone val\n\n\npush\u00b6\n[Source]\nAdds an element to the end of the sequence.\nfun ref push(\nvalue: A)\n: None val\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/src-collections-flag-_13.txt", "contents": "_value = 0\n\nfun ref set(flag: A) =>\n\"\"\"\nSets the flag.\n\"\"\"\n_value = _value or flag.value()\n\nfun ref unset(flag: A) =>\n\"\"\"\nUnsets the flag.\n\"\"\"\n_value = _value and not flag.value()\n\nfun ref flip(flag: A) =>\n\"\"\"\nSets the flag if it is unset, unsets the flag if it is set.\n\"\"\"\n_value = _value xor flag.value()\n"} +{"id": "Pony/net-TCPConnection-_18.txt", "contents": "[Source]\nStart reading off this TCPConnection again after having been muted.\nbe unmute()\n\n\nset_notify\u00b6\n[Source]\nChange the notifier.\nbe set_notify(\nnotify: TCPConnectionNotify iso)\n\nParameters\u00b6\n\nnotify: TCPConnectionNotify iso\n\n\ndispose\u00b6\n[Source]\nClose the connection gracefully once all writes are sent.\nbe dispose()"} +{"id": "Pony/src-promises-promise-_34.txt", "contents": "var _a: (A | _None) = _None\nvar _b: (B | _None) = _None\n\nbe fulfill_a(a: A) =>\nmatch _b\n| let b: B => p'((a, b))\nelse _a = a\nend\n\nbe fulfill_b(b: B) =>\nmatch _a\n| let a: A => p'((a, b))\nelse _b = b\nend\nend\n\nnext[None](\n{(a) => c.fulfill_a(a) },\n{() => p'.reject() })\n"} +{"id": "Pony/src-builtin-do_not_optimise-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19primitive DoNotOptimise\n\"\"\"\nContains functions preventing some compiler optimisations, namely dead code\nremoval. This is useful for benchmarking purposes.\n\"\"\"\n\nfun apply[A](obj: A) =>\n\"\"\"\nPrevent the compiler from optimising out obj and any computation it is\nderived from. This doesn't prevent constant propagation.\n\"\"\"\ncompile_intrinsic\n"} +{"id": "Pony/src-process-process_monitor-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_check-generator-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-math-is_prime-_10.txt", "contents": "\niftype A <: U8 then\nNone\nelse\nvar i: A = _low_prime_table(table_end - 1)\nwhile (i * i) <= n do\nif (n %% i) == 0 then return false end\nif (n %% (i + 2)) == 0 then return false end\ni = i + 6\nend\nend\ntrue\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-array-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/src-pony_check-generator-_91.txt", "contents": ".collect[S](S.create(size))\n\n// create shrink_iter with smaller seqs and elements generated from _gen.value_iter\nlet shrink_iter =\nIter[USize](CountdownIter(size, min)) //Range(size, min, -1))\n// .skip(1)\n.map_stateful[S^]({\n(s: USize): S^ =>\nIter[T^](_gen.value_iter(rnd))\n.take(s)\n.collect[S](S.create(s))\n})\n(consume result, shrink_iter)\nend)\n\nfun iso_seq_of[T: Any #send, S: Seq[T] iso](\ngen: Generator[T],\nmin: USize = 0,\nmax: USize = 100)\n: Generator[S]"} +{"id": "Pony/src-builtin-real-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/pony_check-PropertyRunner-_5.txt", "contents": "be complete_action(\nname: String val,\nround: (_Shrink val | _Run val),\nph: PropertyHelper val)\n\nParameters\u00b6\n\nname: String val\nround: (_Shrink val | _Run val)\nph: PropertyHelper val\n\n\nfail_action\u00b6\n[Source]\nbe fail_action(\nname: String val,\nround: (_Shrink val | _Run val),\nph: PropertyHelper val)\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_61.txt", "contents": "1212\n1213\n1214\n1215\n1216\n1217\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1231"} +{"id": "Pony/builtin-String-_28.txt", "contents": "\nU8 val ?\n\n\nclone\u00b6\n[Source]\nReturns a copy of the string. The resulting string is\nnull-terminated even if the original is not.\nfun box clone()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\nrepeat_str\u00b6\n[Source]\nReturns a copy of the string repeated num times with an optional\nseparator added inbetween repeats."} +{"id": "Pony/files-FilePath-_7.txt", "contents": "isn't one.\nfun val canonical()\n: FilePath val ?\n\nReturns\u00b6\n\nFilePath val ?\n\n\nexists\u00b6\n[Source]\nReturns true if the path exists. Returns false for a broken symlink.\nfun val exists()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/src-itertools-iter-_65.txt", "contents": "next()?\nelse\nerror\nend\nend\nend)\n\nfun ref all(f: {(A!): Bool ?} box): Bool =>\n\"\"\"\nReturn false if at least one value of the iterator fails to match the\npredicate `f`. This method short-circuits at the first value where the\npredicate returns false, otherwise true is returned.\n"} +{"id": "Pony/src-process-process_monitor-_27.txt", "contents": "new create(\nauth: StartProcessAuth,\nbackpressure_auth: ApplyReleaseBackpressureAuth,\nnotifier: ProcessNotify iso,\nfilepath: FilePath,\nargs: Array[String] val,\nvars: Array[String] val,\nwdir: (FilePath | None) = None,\nprocess_poll_interval: U64 = Nanos.from_millis(100))\n=>\n\"\"\"\nCreate infrastructure to communicate with a forked child process and\nregister the asio events. Fork child process and notify our user about\nincoming data via the notifier.\n\"\"\"\n_backpressure_auth = backpressure_auth\n_notifier = consume notifier\n_process_poll_interval = process_poll_interval\n\n// We need permission to execute and the"} +{"id": "Pony/src-process-_process-_38.txt", "contents": "Exited(_WaitPidStatus.exit_code(wstatus))\nelseif _WaitPidStatus.signaled(wstatus) then\nSignaled(_WaitPidStatus.termsig(wstatus).u32())\nelseif _WaitPidStatus.stopped(wstatus) then\nSignaled(_WaitPidStatus.stopsig(wstatus).u32())\nelseif _WaitPidStatus.continued(wstatus) then\n_StillRunning\nelse\n// *shrug*\nWaitpidError\nend\n| 0 => _StillRunning\nelse\nWaitpidError\nend\nelse\nWaitpidError\nend\n\nprimitive _WaitPidStatus"} +{"id": "Pony/net-OSSockOpt-_420.txt", "contents": "fun box sctp_pcb_flags_bound_v6()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_close_ip\u00b6\n[Source]\nfun box sctp_pcb_flags_close_ip()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_connected\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_14.txt", "contents": "fun box remc(\ny: U8 val)\n: (U8 val , Bool val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , Bool val)\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6"} +{"id": "Pony/builtin-I16-_4.txt", "contents": "\nU16 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U32-_60.txt", "contents": "fun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_219.txt", "contents": "fun box ip_multicast_ttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_multicast_vif\u00b6\n[Source]\nfun box ip_multicast_vif()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_nat_xxx\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_28.txt", "contents": ".map[I64]({(x) => x * x })\n\n1 4 9\nfun ref map[B: B](\nf: {(A!): B ?}[A, B] box)\n: Iter[B] ref^\n\nParameters\u00b6\n\nf: {(A!): B ?}[A, B] box\n\nReturns\u00b6\n\nIter[B] ref^\n\n\nnth\u00b6\n[Source]\nReturn the nth value of the iterator.\nExample\u00b6"} +{"id": "Pony/promises-Promise-_0.txt", "contents": "\n\n\n\n\n\n\nPromise[A: Any #share]\u00b6\n[Source]\nA promise to eventually produce a result of type A. This promise can either\nbe fulfilled or rejected.\nAny number of promises can be chained after this one.\nactor tag Promise[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew tag create()\n: Promise[A] tag^\n"} +{"id": "Pony/builtin-SourceLoc-_3.txt", "contents": "Character position on line.\nCharacter positions start at 1.\nfun box pos()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_check-ASCIIDigits-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_351.txt", "contents": "fun box sctp_cause_unrecog_param()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_unresolvable_addr\u00b6\n[Source]\nfun box sctp_cause_unresolvable_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_unsupported_hmacid\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_67.txt", "contents": "bool\u00b6\n[Source]\nfun box bool()\n: Bool val ?\n\nReturns\u00b6\n\nBool val ?\n\n\ni8\u00b6\n[Source]\nfun box i8(\nbase: U8 val = 0)\n: I8 val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n"} +{"id": "Pony/collections-persistent-Nil-_12.txt", "contents": "every\u00b6\n[Source]\nAny predicate is true of every member of the empty list.\nfun box every(\nf: {(val->A): Bool}[A] box)\n: Bool val\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6\n\nBool val\n\n\nexists\u00b6\n[Source]\nFor any predicate, there is no element that satisfies it in the empty\nlist."} +{"id": "Pony/src-itertools-iter-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/src-buffered-reader-_46.txt", "contents": "error\nend\n\nfun ref block(len: USize): Array[U8] iso^ ? =>\n\"\"\"\nReturn a block as a contiguous chunk of memory.\nWill throw an error if you request a block larger than what is currently\nstored in the `Reader`.\n\"\"\"\nif _available < len then\nerror\nend\n\n_available = _available - len\nvar out = recover Array[U8] .> undefined(len) end\nvar i = USize(0)\n\nwhile i < len do\nlet node = _chunks.head()?\n(let data, let offset) = node()?"} +{"id": "Pony/src-files-path-_0.txt", "contents": "\n\n\n\n\n\n\npath.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-ISize-_19.txt", "contents": "\nISize val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: ISize val)\n: ISize val ?\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val ?\n\n\nmul_partial\u00b6"} +{"id": "Pony/src-buffered-writer-_26.txt", "contents": "\nfun ref u128_le(data: U128) =>\n\"\"\"\nWrite a U128 to the buffer in little-endian byte order.\n\"\"\"\nlet num_bytes = U128(0).bytewidth()\nifdef littleendian then\n_current.push_u128(data)\nelse\n_current.push_u128(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref u128_be(data: U128) =>\n\"\"\"\nWrite a U128 to the buffer in big-endian byte order.\n\"\"\"\nlet num_bytes = U128(0).bytewidth()\nifdef bigendian then\n_current.push_u128(data)"} +{"id": "Pony/src-files-directory-_54.txt", "contents": "_fd = -1\nend\n\nfun _final() =>\n\"\"\"\nClose the file descriptor.\n\"\"\"\nif _fd != -1 then\nifdef posix then\n@close(_fd)\nend\nend\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/time-Time-_3.txt", "contents": "Monotonic unadjusted microseconds.\nfun box micros()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nnanos\u00b6\n[Source]\nMonotonic unadjusted nanoseconds.\nfun box nanos()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n"} +{"id": "Pony/src-files-file-_47.txt", "contents": "let r = (ifdef windows then\n@_read(_fd, result.cpointer(), result.space().i32())\nelse\n@read(_fd, result.cpointer(), result.space())\nend).isize()\n\nmatch r\n| 0 => _errno = FileEOF\n| -1 => _errno = _get_error()\nend\n\nresult.truncate(r.usize())\nresult\nelse\nrecover String end\nend\n\nfun ref print(data: ByteSeq box): Bool =>\n\"\"\"\nSame as write, buts adds a newline."} +{"id": "Pony/src-builtin-iterator-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86interface Iterator[A]\n\"\"\"\n\nIterators generate a series of values, one value at a time on each call to `next()`.\n\nAn Iterator is considered exhausted, once its `has_next()` method returns `false`."} +{"id": "Pony/random-MT-_1.txt", "contents": "Constructors\u00b6\ncreate\u00b6\n[Source]\nCreate with the specified seed. Returned values are deterministic for a\ngiven seed.\nnew ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: MT ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nMT ref^\n\n"} +{"id": "Pony/net-OSSockOpt-_620.txt", "contents": "fun box udp_encap_espinudp_port()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap_l2tpinudp\u00b6\n[Source]\nfun box udp_encap_l2tpinudp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_nocksum\u00b6\n[Source]"} +{"id": "Pony/ponytest_3.txt", "contents": "# Test names\n\nTests are identified by names, which are used when printing test results and on the command line to select which tests to run. These names are independent of the names of the test classes in the Pony source code.\n\nArbitrary strings can be used for these names, but for large projects, it is strongly recommended to use a hierarchical naming scheme to make it easier to select groups of tests.\n"} +{"id": "Pony/aliasing_0.txt", "contents": "# Aliasing\n\n__Aliasing__ means having more than one reference to the same object, within the same actor. This can be the case for a variable or a field.\n\nIn most programming languages, aliasing is pretty simple. You just assign some variable to another variable, and there you go, you have an alias. The variable you assign to has the same type (or some supertype) as what's being assigned to it, and everything is fine.\n\nIn Pony, that works for some reference capabilities, but not all.\n"} +{"id": "Pony/ini-IniIncompleteSection-_0.txt", "contents": "\n\n\n\n\n\n\nIniIncompleteSection\u00b6\n[Source]\nprimitive val IniIncompleteSection\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: IniIncompleteSection val^\n\nReturns\u00b6\n\nIniIncompleteSection val^"} +{"id": "Pony/src-cli-command_help-_16.txt", "contents": "cols.push((2, o.help_string(), o.descr()))\nend\n_Columns.write(w, cols)\n\nfun _write_commands(w: Writer) =>\nlet cols = Array[(USize,String,String)]()\n_list_commands(_spec, cols, 1)\n_Columns.write(w, cols)\n\nfun _list_commands(\ncs: CommandSpec box,\ncols: Array[(USize,String,String)],\nlevel: USize)\n=>\nfor c in cs.commands().values() do\ncols.push((level*2, c.help_string(), c.descr()))\n_list_commands(c, cols, level + 1)\nend\n\nfun _write_args(w: Writer, args: Array[ArgSpec] box) =>"} +{"id": "Pony/builtin-USize-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/collections-persistent-Nil-_7.txt", "contents": "concat\u00b6\n[Source]\nThe concatenation of any list l with the empty list is l.\nfun box concat(\nl: (Cons[A] val | Nil[A] val))\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nl: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\nmap[B: B]\u00b6\n[Source]\nMapping a function from A to B over the empty list yields the\nempty list of Bs."} +{"id": "Pony/src-random-mt-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-U16-_55.txt", "contents": "fun box usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyLogger-_1.txt", "contents": "\nmsg: String val\nverbose: Bool val = false\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-path-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-collections-sort-_8.txt", "contents": "\nfun _swap(a: A, i: ISize, j: ISize) ? =>\na(j.usize())? = a(i.usize())? = a(j.usize())?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-term-ansi_term-_34.txt", "contents": "\"\"\"\nDown arrow.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.down(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _left() =>\n\"\"\"\nLeft arrow.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.left(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _right() =>\n\"\"\"\nRight arrow.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()"} +{"id": "Pony/src-pony_check-generator-_73.txt", "contents": "\"\"\"\nReturn type for\n[`Generator.generate`](pony_check-Generator.md#generate).\n\nEither a single value or a Tuple of a value and an Iterator\nof shrunken values based upon this value.\n\"\"\"\n\nclass CountdownIter[T: (Int & Integer[T] val) = USize] is Iterator[T]\nvar _cur: T\nlet _to: T\n\nnew create(from: T, to: T = T.min_value()) =>\n\"\"\"\nCreate am `Iterator` that counts down according to the specified arguments.\n\n`from` is exclusive, `to` is inclusive.\n\"\"\"\n_cur = from\n_to = to"} +{"id": "Pony/net-OSSockOpt-_598.txt", "contents": "fun box tipc_cfg_srv()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_cluster_scope\u00b6\n[Source]\nfun box tipc_cluster_scope()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_conn_shutdown\u00b6\n[Source]"} +{"id": "Pony/src-builtin-real-_47.txt", "contents": "If the operation overflows, the result is undefined.\n\"\"\"\nthis +~ y\n\nfun sub_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf the operation overflows, the result is undefined.\n\"\"\"\nthis -~ y\n\nfun mul_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf the operation overflows, the result is undefined.\n\"\"\"\nthis *~ y\n\nfun div_unsafe(y: A): A =>\n\"\"\""} +{"id": "Pony/builtin-I8-_61.txt", "contents": "fun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-debug-debug-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-generator-_89.txt", "contents": "which aliases as a `String tag`).\n\nExample:\n\n```pony\nGenerators.repeatedly[Writer]({(): Writer^ =>\nlet writer = Writer.>write(\"consume me, please\")\nconsume writer\n})\n```\n\"\"\"\nGenerator[T](\nobject is GenObj[T]\nfun generate(rnd: Randomness): GenerateResult[T] ? =>\nf()?\nend)\n\n\nfun seq_of[T, S: Seq[T] ref](\ngen: Generator[T],"} +{"id": "Pony/net-OSSockOpt-_412.txt", "contents": "fun box sctp_operation_error()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_packed\u00b6\n[Source]\nfun box sctp_packed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_packet_dropped\u00b6\n[Source]"} +{"id": "Pony/10_partial-application_3.txt", "contents": "# Out of order arguments\n\nPartial application with named arguments allows binding arguments in any order, not just left to right. For example:\n\n```pony\nlet f = foo~addmul(where mul = 4)\nf(3)\n```\n\nHere, we bound the `mul` argument but left `add` unbound.\n"} +{"id": "Pony/net-OSSockOpt-_2.txt", "contents": "supposed to be used with getsockopt(2) and setsockopt(2).\nPlease consult your platform's documentation to verify the names\nof the option level and option name macros.\nThe following code fragments are equivalent: set the socket\nreceive buffer size for the file descriptor fd to 4455.\n/* In C */\nint option_value = 4455;\nsetsockopt(fd, SOL_SOCKET, SO_RCVBUF, &option_value, 4);\n\n/* In Pony */\nvar option: I32 = 4455;\n@setsockopt[I32](fd, OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(),\naddressof option, I32(4))\n\nprimitive val OSSockOpt\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()"} +{"id": "Pony/builtin-Pointer-_5.txt", "contents": "that: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n\nthat: Pointer[A] tag\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun tag le(\nthat: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-signed-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/serialisation_3.txt", "contents": "# Caveats\n\nThere are several things to keep in mind when using Pony's serialisation system:\n\n* Serialised objects will currently only work when passed between two running instances of the same Pony executable. You cannot pass objects between different Pony programs, nor can you pass them between different versions of the same program. Using the `Serialise.signature` function can help you determine if your two Pony programs are the same.\n* Objects with `embed` fields will not be properly serialised.\n* Objects with `Pointer` fields must use the custom serialisation mechanism or else the `Pointer` fields will be null when the object is deserialised. For information on how to handle these kinds of fields, please see the discussion of custom serialisation and deserialisation below.\n"} +{"id": "Pony/src-term-readline_notify-_2.txt", "contents": "\"\"\"\nReturn tab completion possibilities.\n\"\"\"\nArray[String]\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-persistent-HashSet-_8.txt", "contents": "\nParameters\u00b6\n\nthat: (HashSet[A, H] val | Iterator[A] ref)\n\nReturns\u00b6\n\nHashSet[A, H] val\n\n\neq\u00b6\n[Source]\nReturn true if this and that contain the same elements.\nfun box eq(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box"} +{"id": "Pony/src-time-time-_15.txt", "contents": "\"\"\"\nThe wall-clock adjusted system time.\n\"\"\"\n@time(USize(0))\n\nfun millis(): U64 =>\n\"\"\"\nMonotonic unadjusted milliseconds.\n\"\"\"\nifdef osx then\n@clock_gettime_nsec_np(_ClockUptimeRaw()) / 1000000\nelseif linux or bsd then\nvar ts = _clock_gettime(_ClockMonotonic)\n((ts._1 * 1000) + (ts._2 / 1000000)).u64()\nelseif windows then\n_subseconds_from_query_performance_counter(1000)\nelse\ncompile_error \"unsupported platform\"\nend\n"} +{"id": "Pony/builtin-UnsignedInteger-_26.txt", "contents": "[Source]\nfun box div_partial(\ny: A)\n: A ?\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA ?\n\n\nrem_partial\u00b6\n[Source]\nfun box rem_partial(\ny: A)\n: A ?\n"} +{"id": "Pony/pony_check-Property4-_0.txt", "contents": "\n\n\n\n\n\n\nProperty4[T1: T1, T2: T2, T3: T3, T4: T4]\u00b6\n[Source]\ntrait ref Property4[T1: T1, T2: T2, T3: T3, T4: T4] is\nProperty1[(T1 , T2 , T3 , T4)] ref\n\nImplements\u00b6\n\nProperty1[(T1 , T2 , T3 , T4)] ref\n\n\nPublic Functions\u00b6\ngen1\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_128.txt", "contents": "let sb = Writer\n\nsb.u32_le(7744) // Our desired socket buffer size\nlet sbytes = Array[U8]\nfor bs in sb.done().values() do\nsbytes.append(bs)\nend\nmatch conn.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)\n| 0 =>\n// System call was successful\n| let errno: U32 =>\n// System call failed\nend\n```\n\"\"\"\n_OSSocket.setsockopt(_fd, level, option_name, option)\n\nfun ref setsockopt_u32(level: I32, option_name: I32, option: U32): U32 =>\n\"\"\"\nGeneral wrapper for TCP sockets to the `setsockopt(2)` system call where"} +{"id": "Pony/builtin-ISize-_28.txt", "contents": "[Source]\nfun box add_unsafe(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/src-pony_test-test_helper-_41.txt", "contents": "\"\"\"\nGenerate a printable string of the contents of the given readseq to use in\nerror messages.\n\nThe type parameter of this function is the type parameter of the\nelements in the ReadSeq.\n\"\"\"\n\"[len=\" + array.size().string() + \": \" + \", \".join(array.values()) + \"]\"\n\nfun long_test(timeout: U64) =>\n\"\"\"\nIndicate that this is a long running test that may continue after the\ntest function exits.\nOnce this function is called, complete() must be called to finish the test,\nunless a timeout occurs.\nThe timeout is specified in nanseconds.\n\"\"\"\n_runner.long_test(timeout)\n\nfun complete(success: Bool) =>"} +{"id": "Pony/signals-Sig-_18.txt", "contents": "\nParameters\u00b6\n\nn: U32 val\n\nReturns\u00b6\n\nU32 val ?\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: Sig val)\n: Bool val\n\nParameters\u00b6\n\nthat: Sig val\n"} +{"id": "Pony/net-OSSockOpt-_192.txt", "contents": "fun box ip_add_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_add_source_membership\u00b6\n[Source]\nfun box ip_add_source_membership()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_bindany\u00b6\n[Source]"} +{"id": "Pony/term-Readline-_2.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nReceives input.\nfun ref apply(\nterm: ANSITerm ref,\ninput: U8 val)\n: None val\n\nParameters\u00b6\n\nterm: ANSITerm ref\ninput: U8 val\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/net-UDPSocket-_17.txt", "contents": "In case of system call success, this function returns the 2-tuple:\n1. The integer 0.\n2. The *option_value returned by the kernel converted to a Pony U32.\nIn case of system call failure, this function returns the 2-tuple:\n1. The value of errno.\n2. An undefined value that must be ignored.\nfun ref getsockopt_u32(\nlevel: I32 val,\noption_name: I32 val)\n: (U32 val , U32 val)\n\nParameters\u00b6\n\nlevel: I32 val\noption_name: I32 val\n\nReturns\u00b6\n\n(U32 val , U32 val)\n"} +{"id": "Pony/builtin-StringRunes-_1.txt", "contents": "new ref create(\nstring: String box)\n: StringRunes ref^\n\nParameters\u00b6\n\nstring: String box\n\nReturns\u00b6\n\nStringRunes ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/generics-and-reference-capabilities_9.txt", "contents": "# A capability generic class\n\nNow that we have `iso` working we know how to write a generic class that works for `iso` and it will work for other capabilities too:\n\n```pony\nclass Foo[A]\nvar _c: A\n\nnew create(c: A) =>\n_c = consume c\n\nfun get(): this->A => _c\n\nfun ref set(c: A) => _c = consume c\n\nactor Main\nnew create(env:Env) =>\nlet a = Foo[String iso](\"Hello\".clone())\nenv.out.print(a.get().string())\n"} +{"id": "Pony/files-File-_16.txt", "contents": "\ndatasync\u00b6\n[Source]\nSync the file contents to physical storage.\nfun ref datasync()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nset_length\u00b6\n[Source]\nChange the file size. If it is made larger, the new contents are undefined.\nfun ref set_length(\nlen: USize val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-generator-_81.txt", "contents": "```pony\nlet even_i32s =\nGenerators.i32()\n.filter(\n{(t) => (t, ((t % 2) == 0)) })\n```\n\"\"\"\nGenerator[T](\nobject is GenObj[T]\nfun generate(rnd: Randomness): GenerateResult[T] ? =>\n(let t: T, let shrunken: Iterator[T^]) = _gen.generate_and_shrink(rnd)?\n(let t1, let matches) = predicate(consume t)\nif not matches then\ngenerate(rnd)? // recurse, this might recurse infinitely\nelse\n// filter the shrunken examples\n(consume t1, _filter_shrunken(shrunken))\nend\n\nfun shrink(t: T): ValueAndShrink[T] =>"} +{"id": "Pony/src-pony_test-pony_test-_33.txt", "contents": "None\n\nfun tag tests(test: PonyTest) =>\nbar.Main.make().tests(test)\nfoo.Main.make().tests(test)\n```\n\nAggregate test classes may themselves be aggregated. Every test list class may\ncontain any combination of its own tests and aggregated lists.\n"} +{"id": "Pony/src-pony_test-test_helper-_26.txt", "contents": "return false\nend\nlog(_format_loc(loc) + \"Assert true passed. \" + msg, true)\ntrue\n\nfun assert_false(actual: Bool, msg: String = \"\", loc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the given expression is false.\n\"\"\"\nif actual then\nfail(_format_loc(loc) + \"Assert false failed. \" + msg)\nreturn false\nend\nlog(_format_loc(loc) + \"Assert false passed. \" + msg, true)\ntrue\n\nfun assert_error(test: ITest box, msg: String = \"\", loc: SourceLoc = __loc)\n: Bool"} +{"id": "Pony/time-PosixDate-_5.txt", "contents": "\nString val ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_421.txt", "contents": "fun box sctp_pcb_flags_connected()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_donot_heartbeat\u00b6\n[Source]\nfun box sctp_pcb_flags_donot_heartbeat()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_dont_wake\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/cli-CommandSpec-_0.txt", "contents": "\n\n\n\n\n\n\nCommandSpec\u00b6\n[Source]\nCommandSpec describes the specification of a parent or leaf command. Each\ncommand has the following attributes:\n\na name: a simple string token that identifies the command.\na description: used in the syntax message.\na map of options: the valid options for this command.\nan optional help option+command name for help parsing\none of:\na Map of child commands.\nan Array of arguments.\n"} +{"id": "Pony/src-pony_check-int_properties-_11.txt", "contents": "| 7 => int_property[I8](x.i8(), h)?\n| 8 => int_property[I16](x.i16(), h)?\n| 9 => int_property[I32](x.i32(), h)?\n| 10 => int_property[I64](x.i64(), h)?\n| 11 => int_property[ILong](x.ilong(), h)?\n| 12 => int_property[ISize](x.isize(), h)?\n| 13 => int_property[I128](x.i128(), h)?\nelse\nh.log(\"rem is broken\")\nerror\nend\n\nfun ref int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)?\n\nclass IntPairPropertySample is Stringable\nlet choice: U8\nlet int1: U128\nlet int2: U128\n\nnew create(choice': U8, int1': U128, int2': U128) =>"} +{"id": "Pony/builtin-Integer-_20.txt", "contents": "(A , Bool val)\n\n\nmulc\u00b6\n[Source]\nMultiply y with this integer and return the result and a flag indicating overflow.\nfun box mulc(\ny: A)\n: (A , Bool val)\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\ndivc\u00b6"} +{"id": "Pony/src-net-ossockopt-_77.txt", "contents": "fun sol_local():I32 => @pony_os_sockopt_level(I32(4131))\nfun sol_ndrvproto():I32 => @pony_os_sockopt_level(I32(4132))\nfun sol_netrom():I32 => @pony_os_sockopt_level(I32(4133))\nfun sol_rds():I32 => @pony_os_sockopt_level(I32(4134))\nfun sol_rfcomm():I32 => @pony_os_sockopt_level(I32(4135))\nfun sol_rose():I32 => @pony_os_sockopt_level(I32(4136))\nfun sol_sco():I32 => @pony_os_sockopt_level(I32(4137))\nfun sol_socket():I32 => @pony_os_sockopt_level(I32(4138))\nfun sol_tipc():I32 => @pony_os_sockopt_level(I32(4139))\nfun sol_udp():I32 => @pony_os_sockopt_level(I32(4140))\n\n/*\n*\n* Options formatted in Pony by:\n* egrep -v '^(IP[A-Z0-6]*PROTO_|NSPROTO_|SOL_)' ~/sum-of-all-constants.txt | egrep -v '\\(' | sort -u | egrep -v '^$' | sed 's/__/_/g' | awk 'BEGIN { count=0; } { printf(\" fun %s():I32 => @pony_os_sockopt_option(I32(%d))\\n\", tolower($1), count++); }'\n*/\n\n// options\nfun af_coip():I32 => @pony_os_sockopt_option(I32(0))\nfun af_inet():I32 => @pony_os_sockopt_option(I32(1))"} +{"id": "Pony/src-pony_test-test_helper-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-ILong-_14.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: ILong val)\n: (ILong val , Bool val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I64-_33.txt", "contents": "I64 val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: I64 val)\n: I64 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-F32-_13.txt", "contents": "F32 val\n\n\ntrunc\u00b6\n[Source]\nfun box trunc()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmin\u00b6\n[Source]\nfun box min(\ny: F32 val)\n: F32 val\n\nParameters\u00b6"} +{"id": "Pony/src-files-path-_43.txt", "contents": "end\n\nresult.append(\"..\")\nresult.append(sep())\nresult.append(target_clean.trim(target_0.usize()))\nresult\nelse\ntarget_clean.trim(target_0.usize())\nend\n\nfun split(path: String, separator: String = Path.sep()): (String, String) =>\n\"\"\"\nSplits the path into a pair, (head, tail) where tail is the last pathname\ncomponent and head is everything leading up to that. The tail part will\nnever contain a slash; if path ends in a slash, tail will be empty. If\nthere is no slash in path, head will be empty. If path is empty, both head\nand tail are empty. The path in head will be cleaned before it is returned.\nIn all cases, join(head, tail) returns a path to the same location as path\n(but the strings may differ). Also see the functions dir() and base().\n\"\"\""} +{"id": "Pony/pony_check-GenerateResult-_0.txt", "contents": "\n\n\n\n\n\n\nGenerateResult[T2: T2]\u00b6\n[Source]\nReturn type for\nGenerator.generate.\nEither a single value or a Tuple of a value and an Iterator\nof shrunken values based upon this value.\ntype GenerateResult[T2: T2] is\n(T2^ | (T2^ , Iterator[T2^] ref))\n\nType Alias For\u00b6\n\n(T2^ | (T2^ , Iterator[T2^] ref))\n"} +{"id": "Pony/3_actors_4.txt", "contents": "# Concurrent\n\nSince behaviours are asynchronous, it's ok to run the body of a bunch of behaviours at the same time. This is exactly what Pony does. The Pony runtime has its own cooperative scheduler, which by default has a number of threads equal to the number of CPU cores on your machine. Each scheduler thread can be executing an actor behaviour at any given time, so Pony programs are naturally concurrent.\n"} +{"id": "Pony/builtin-ULong-_3.txt", "contents": "ULong val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: ULong val^\n\nReturns\u00b6\n\nULong val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/generics-and-reference-capabilities_3.txt", "contents": "a.set(recover ref String end)\nenv.out.print(a.get().string())\n```\n\nThis does not compile. The compiler complains that `get()` doesn't actually return a `String ref`, but `this->String ref`. We obviously need to simply change the type signature to fix this, but what is going on here?\n`this->String ref` is [an arrow type](/reference-capabilities/arrow-types.md). An arrow type with \"this->\" states to use the capability of the actual receiver (`ref` in our case), not the capability of the method (which defaults to `box` here). According to [viewpoint adaption](/reference-capabilities/combining-capabilities.md) this will be `ref->ref` which is `ref`. Without this [arrow type](/reference-capabilities/arrow-types.md) we would only see the field `_c` as `box` because we are in a `box` method.\n\nSo let's apply what we just learned:\n\n```pony\nclass Foo\nvar _c: String ref\n\nnew create(c: String ref) =>\n_c = c\n\nfun get(): this->String ref => _c\n\nfun ref set(c: String ref) => _c = c\n"} +{"id": "Pony/builtin-USize-_49.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyHelper-_11.txt", "contents": "expect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nexpect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_ne[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_50.txt", "contents": "[Source]\nCuts the given range out of the string.\nIndex range [from .. to) is half-open.\nfun ref cut_in_place(\nfrom: ISize val,\nto: ISize val = call)\n: None val\n\nParameters\u00b6\n\nfrom: ISize val\nto: ISize val = call\n\nReturns\u00b6\n\nNone val\n\n\nremove\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_helper-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/net-OSSockOpt-_191.txt", "contents": "fun box ipx_stopfilterptype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_type\u00b6\n[Source]\nfun box ipx_type()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_add_membership\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_33.txt", "contents": "end\n\n\n// create a string representation before consuming ``sample`` with property\n(sample, _sample_repr) = _Stringify.apply[T](consume sample)\nlet run_notify = recover val this~complete_run() end\nlet helper = PropertyHelper(_env, this, run_notify, this._current_round, _params.string())\n_pass = true // will be set to false by fail calls\n\ntry\n_prop1.property(consume sample, helper)?\nelse\nfail(_sample_repr, 0 where err=true)\nreturn\nend\n// dispatch to another behavior\n// as complete_run might have set _pass already through a call to\n// complete_run\n_run_finished(this._current_round)\n"} +{"id": "Pony/src-pony_bench-_runner-_11.txt", "contents": "Time.nanos()\nend\n_bench.after_iteration()?\n_run_iteration(n + 1, a + (e - s))\nelse\n_fail()\nend\nend\n\nbe _complete(t: U64) =>\ntry\n_bench.after()?\n_aggregator.complete(_name, t)\nelse\n_fail()\nend\n\nbe _fail() =>\n_ponybench._fail(_name)\n"} +{"id": "Pony/src-collections-list_node-_16.txt", "contents": "\"\"\"\n(_item = consume value) as A^\n\nfun ref pop(): A^ ? =>\n\"\"\"\nRemove the item from the node, if we have one, otherwise raise an error.\n\"\"\"\n(_item = None) as A^\n\nfun ref prepend(that: ListNode[A]): Bool =>\n\"\"\"\nPrepend a node to this one. If `that` is already in a list, it is removed\nbefore it is prepended. Returns true if `that` was removed from another\nlist.\nIf the ListNode is not contained within a List the prepend will fail.\n\"\"\"\nif (_prev is that) or (this is that) then\nreturn false\nend\n"} +{"id": "Pony/src-format-format-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/promises-Promises-_4.txt", "contents": "[Source]\nfun box ne(\nthat: Promises[A] val)\n: Bool val\n\nParameters\u00b6\n\nthat: Promises[A] val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-String-_5.txt", "contents": "\nString iso^\n\n\nfrom_cpointer\u00b6\n[Source]\nReturn a string from binary pointer data without making a\ncopy. This must be done only with C-FFI functions that return\npony_alloc'd character arrays. If a null pointer is given then an\nempty string is returned.\nnew ref from_cpointer(\nstr: Pointer[U8 val] ref,\nlen: USize val,\nalloc: USize val = 0)\n: String ref^\n\nParameters\u00b6\n\nstr: Pointer[U8 val] ref\nlen: USize val"} +{"id": "Pony/src-itertools-iter-_70.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.collect(Array[I64](3))\n```\n`[1, 2, 3]`\n\"\"\"\nfor x in _iter do\ncoll.push(x)\nend\ncoll\n\nfun ref count(): USize =>\n\"\"\"\nReturn the number of values in the iterator.\n"} +{"id": "Pony/src-encode-base64-base64-_21.txt", "contents": "Fact(input != pad)?\n\nmatch state\n| 1 | 2 => out.push(output)\nend\nend\n\nout\n\nfun _enc_byte(i: U8, at62: U8, at63: U8): U8 ? =>\n\"\"\"\nEncode a single byte.\n\"\"\"\nmatch i\n| 62 => at62\n| 63 => at63\n| if i < 26 => 'A' + i\n| if i < 52 => ('a' - 26) + i\n| if i < 62 => ('0' - 52) + i\nelse"} +{"id": "Pony/src-buffered-reader-_42.txt", "contents": "use \"buffered\"\nuse \"collections\"\n\nclass Notify is InputNotify\nlet _env: Env\nnew create(env: Env) =>\n_env = env\nfun ref apply(data: Array[U8] iso) =>\nlet rb = Reader\nrb.append(consume data)\ntry\nwhile true do\nlet len = rb.i32_be()?\nlet items = rb.i32_be()?.usize()\nfor range in Range(0, items) do\nlet f = rb.f32_be()?\nlet str_len = rb.i32_be()?.usize()\nlet str = String.from_array(rb.block(str_len)?)\n_env.out.print(\"[(\" + f.string() + \"), (\" + str + \")]\")\nend"} +{"id": "Pony/buffered-Reader-_7.txt", "contents": "\nReturns\u00b6\n\nArray[U8 val] iso^ ?\n\n\nread_until\u00b6\n[Source]\nFind the first occurrence of the separator and return the block of bytes\nbefore its position. The separator is not included in the returned array,\nbut it is removed from the buffer. To read a line of text, prefer line()\nthat handles \\n and \\r\\n.\nfun ref read_until(\nseparator: U8 val)\n: Array[U8 val] iso^ ?\n\nParameters\u00b6\n\nseparator: U8 val\n"} +{"id": "Pony/src-builtin-string-_130.txt", "contents": "var i: USize = 0\n\nwhile i < _size do\nlet c = _ptr._apply(i)\n\nif (c >= 0x61) and (c <= 0x7A) then\n_set(i, c - 0x20)\nend\n\ni = i + 1\nend\n\nfun reverse(): String iso^ =>\n\"\"\"\nReturns a reversed version of the string.\n\"\"\"\nlet s = clone()\ns.reverse_in_place()\ns\n"} +{"id": "Pony/pony_check-Generator-_3.txt", "contents": "to simply return the generated value and only shrink in big steps or do no\nshrinking at all.\nIf generating values is lightweight, shrunken values should also be\nreturned.\nfun box generate(\nrnd: Randomness ref)\n: (T^ | (T^ , Iterator[T^] ref)) ?\n\nParameters\u00b6\n\nrnd: Randomness ref\n\nReturns\u00b6\n\n(T^ | (T^ , Iterator[T^] ref)) ?\n\n\nshrink\u00b6\n[Source]\nSimplify the given value."} +{"id": "Pony/src-term-readline_notify-_0.txt", "contents": "\n\n\n\n\n\n\nreadline_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U128-_53.txt", "contents": "I64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]\nfun box ilong()\n: ILong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-signed-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/builtin-SignedInteger-_46.txt", "contents": "USize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-time-timer-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-FloatingPoint-_66.txt", "contents": "ILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_3.txt", "contents": ": OSSockOpt val^\n\nReturns\u00b6\n\nOSSockOpt val^\n\n\nPublic Functions\u00b6\nipproto_3pc\u00b6\n[Source]\nfun box ipproto_3pc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_adfs\u00b6\n[Source]"} +{"id": "Pony/src-net-tcp_connection-_94.txt", "contents": "\"\"\"\nReturn the local IP address. If this TCPConnection is closed then the\naddress returned is invalid.\n\"\"\"\nlet ip = recover NetAddress end\n@pony_os_sockname(_fd, ip)\nip\n\nfun remote_address(): NetAddress =>\n\"\"\"\nReturn the remote IP address. If this TCPConnection is closed then the\naddress returned is invalid.\n\"\"\"\nlet ip = recover NetAddress end\n@pony_os_peername(_fd, ip)\nip\n\nfun ref expect(qty: USize = 0) ? =>\n\"\"\"\nA `received` call on the notifier must contain exactly `qty` bytes. If"} +{"id": "Pony/src-builtin-string-_135.txt", "contents": "_set(_size, 0)\nelse\nlet cap = copy_len + offset\nvar i = offset\n\ntry\nwhile i < cap do\npush(seq(i)?)\ni = i + 1\nend\nend\nend\n\nfun ref concat(iter: Iterator[U8], offset: USize = 0, len: USize = -1) =>\n\"\"\"\nAdd len iterated bytes to the end of the string, starting from the given\noffset.\n\"\"\"\ntry\nvar n = USize(0)"} +{"id": "Pony/pony_check--index-_1.txt", "contents": "for all of them. The developer only needs to specify the possible set of input\nvalues using a Generator.\nThis testing technique is great for finding edge cases that would easily go\nunnoticed with manually constructed test samples. In general it can lead to much\nhigher coverage than traditional unit testing, with much less code to write.\nHow PonyCheck implements Property Based Testing\u00b6\nA property based test in PonyCheck consists of the following:\n\nA name (mostly for integration into PonyTest)\nOne or more generators, depending on how your property is laid out.\nThere are tons of them defined in the primitive\nGenerators.\nA property method that asserts a certain property for each sample\ngenerated by the Generator(s) with the help of\nPropertyHelper, which tries to expose a\nsimilar API as TestHelper.\nOptionally, the method params() can be used to configure how PonyCheck\nexecutes the property by specifying a custom\nPropertyParams object.\n"} +{"id": "Pony/src-collections-range-_9.txt", "contents": "let nan: F64 = F64(0) / F64(0)\n\nlet infinite_range1 = Range[F64](0, p_inf, 1)\nlet infinite_range2 = Range[F64](0, n_inf, -1_000_000)\ninfinite_range1.is_infinite() == true\ninfinite_range2.is_infinite() == true\n\nfor i in Range[F64](0.5, 100, nan) do\n// will not be executed as `inc` is nan\nend\nfor i in Range[F64](0.5, 100, p_inf) do\n// will not be executed as `inc` is +Inf\nend\n```\n\"\"\"\nlet _min: A\nlet _max: A\nlet _inc: A\nlet _forward: Bool\nlet _infinite: Bool"} +{"id": "Pony/buffered-Writer-_9.txt", "contents": "data: I16 val)\n: None val\n\nParameters\u00b6\n\ndata: I16 val\n\nReturns\u00b6\n\nNone val\n\n\nu32_le\u00b6\n[Source]\nWrite a U32 to the buffer in little-endian byte order.\nfun ref u32_le(\ndata: U32 val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-test_helper-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-itertools-iter-_90.txt", "contents": "if this.has_next() then\nif _use_original then\n_use_original = not _use_original\n_iter.next()?\nelse\n_use_original = not _use_original\nother.next()?\nend\nelse\nerror\nend\nend)\n\nfun ref intersperse(value: A, n: USize = 1): Iter[A!] =>\n\"\"\"\nReturn an iterator that yields the value after every `n` elements of the\noriginal iterator.\n"} +{"id": "Pony/error-messages_7.txt", "contents": "But take another look at the final lines: what Pony thinks is the actual receiver type, `Array[String val] box`, is significantly different from what it thinks is the actual target type, `Array[String val] ref`. And a type with a reference capability of `box`, which is immutable, is indeed not a subtype of a type with a reference capability of `ref`, which *is* mutable.\n\nThe issue must lie with the one difference between the receiver type and the target type, which is the prefix \"this->\". The type `this->Array[String val] ref` is a viewpoint adapted type, or arrow type, that describes the `Array[String val] ref` \"as seen by the receiver\". The receiver, in this case, has the receiver reference capability of the method `add_stripe`, which is the default `box`. *That* is why the final type is `Array[String val] box`.\n\nThe fundamental error in this example is the same as the last: the default receiver reference capability for a method is `box`, which is immutable. This method, however, is attempting to modify the receiver, by adding another color stripe. That is not legal at all.\n\nAs an aside, while trying to figure out what is happening, you may have been misled by the declaration of the `colors` field, `let colors...`. That declaration makes the `colors` binding constant. As a result, you cannot assign a new array to the field. On the other hand, the array itself can be mutable or immutable. In this example, it is mutable, allowing `push` to be called on the `colors` field in the `add_stripe` method.\n"} +{"id": "Pony/builtin-Real-_4.txt", "contents": "fun box add(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: A)\n: A\n\nParameters\u00b6"} +{"id": "Pony/src-net-ossockopt-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/net-TCPConnection-_33.txt", "contents": "Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)\nfun ref get_so_rcvbuf()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nget_so_sndbuf\u00b6\n[Source]\nWrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)\nfun ref get_so_sndbuf()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n"} +{"id": "Pony/src-builtin-array-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/process-ExecveError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-signed-_78.txt", "contents": "fun bitwidth(): USize => ifdef ilp32 then 32 else 64 end\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: ISize): ISize => if this < y then this else y end\nfun max(y: ISize): ISize => if this > y then this else y end\n\nfun fld(y: ISize): ISize =>\n_SignedArithmetic.fld[ISize, USize](this, y)\n\nfun fld_unsafe(y: ISize): ISize =>\n_SignedUnsafeArithmetic.fld_unsafe[ISize, USize](this, y)\n\nfun mod(y: ISize): ISize =>\n_SignedArithmetic.mod[ISize, USize](this, y)\n\nfun mod_unsafe(y: ISize): ISize =>\n_SignedUnsafeArithmetic.mod_unsafe[ISize, USize](this, y)\n\nfun addc(y: ISize): (ISize, Bool) =>"} +{"id": "Pony/builtin-I64-_14.txt", "contents": "fun box addc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-collections-persistent-vec-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/src-process-process_monitor-_38.txt", "contents": "\"\"\"\n_pending_writes() // try writes\n_pending_reads(_stdout)\n_pending_reads(_stderr)\n_try_shutdown()\n\nfun ref _close() =>\n\"\"\"\nClose all pipes and wait for the child process to exit.\n\"\"\"\nif not _closed then\n_closed = true\n_stdin.close()\n_stdout.close()\n_stderr.close()\n_wait_for_child()\nend\n\nbe _wait_for_child() =>\nmatch _final_wait_result"} +{"id": "Pony/files-Path-_12.txt", "contents": "\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nString val\n\n\nvolume\u00b6\n[Source]\nOn Windows, this returns the drive letter or UNC base at the beginning of\nthe path, if there is one. Otherwise, this returns an empty string.\nfun box volume(\npath: String val)\n: String val\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-real-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/calling-c_3.txt", "contents": "# C types\n\nMany C functions require types that don't have an exact equivalent in Pony. A variety of features is provided for these.\n\nFor FFI functions that have no return value (i.e. they return `void` in C) the return value specified should be `None`.\n\nIn Pony, a String is an object with a header and fields, while in C a `char*` is simply a pointer to character data. The `.cstring()` function on String provides us with a valid pointer to hand to C. Our `mkdir` example above makes use of this for the first argument.\n\nPony classes and structs correspond directly to pointers to the class or struct in C.\n\nFor C pointers to simple types, such as U64, the Pony `Pointer[]` polymorphic type should be used, with a `tag` reference capability. To represent `void*` arguments, you should the `Pointer[None] tag` type, which will allow you to pass a pointer to any type, including other pointers. This is needed to write declarations for certain POSIX functions, such as `memcpy`:\n\n```pony\n// The C type is void* memcpy(void *restrict dst, const void *restrict src, size_t n);\nuse @memcpy[Pointer[U8]](dst: Pointer[None] tag, src: Pointer[None] tag, n: USize)\n\n// Now we can use memcpy with any Pointer type\nlet out: Pointer[Pointer[U8] tag] tag = // ...\nlet outlen: Pointer[U8] tag = // ...\nlet ptr: Pointer[U8] tag = // ..."} +{"id": "Pony/collections-Range-_7.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/0_literals_1.txt", "contents": "# Boolean Literals\n\nThere is `true`, there is `false`. That's it.\n"} +{"id": "Pony/builtin-F32-_19.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nnan\u00b6\n[Source]\nCheck whether this number is NaN.\nfun box nan()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nldexp\u00b6\n[Source]\nfun box ldexp(\nx: F32 val,"} +{"id": "Pony/random-XorOshiro128Plus-_12.txt", "contents": "USize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N"} +{"id": "Pony/net-OSSockOpt-_465.txt", "contents": "fun box sctp_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_stream_reset\u00b6\n[Source]\nfun box sctp_stream_reset()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_stream_reset_incoming\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_unit_test-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-F64-_2.txt", "contents": "F64 val^\n\n\ne\u00b6\n[Source]\nnew val e()\n: F64 val^\n\nReturns\u00b6\n\nF64 val^\n\n\nfrom_bits\u00b6\n[Source]\nnew val from_bits(\ni: U64 val)\n: F64 val^\n\nParameters\u00b6"} +{"id": "Pony/src-collections-persistent-map-_10.txt", "contents": "Collections' by Michael J. Steindorfer and Jurgen J. Vinju\n"} +{"id": "Pony/src-random-random-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-builtin-string-_109.txt", "contents": "Both strings are isolated and mutable, as they do not share memory.\nThe operation does not allocate a new string pointer nor copy elements.\n\"\"\"\nlet start_ptr = cpointer(split_point)\nlet size' = _size - _size.min(split_point)\nlet alloc = _alloc - _size.min(split_point)\n\ntrim_in_place(0, split_point)\n\nlet right = recover\nif size' > 0 then\nfrom_cpointer(start_ptr._unsafe(), size', alloc)\nelse\ncreate()\nend\nend\n\n(consume this, consume right)\n\nfun iso unchop(b: String iso): ((String iso^, String iso^) | String iso^) =>"} +{"id": "Pony/builtin-U128-_10.txt", "contents": "U128 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nhash\u00b6\n[Source]"} +{"id": "Pony/src-format-format-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\"\"\""} +{"id": "Pony/src-pony_test-unit_test-_4.txt", "contents": "Report the test exclusion group, returning an empty string for none.\nThe default body returns an empty string.\n\"\"\"\n\"\"\n\nfun ref apply(h: TestHelper) ?\n\"\"\"\nRun the test.\nRaising an error is interpreted as a test failure.\n\"\"\"\n\nfun ref timed_out(h: TestHelper) =>\n\"\"\"\nTear down a possibly hanging test.\nCalled when the timeout specified by to long_test() expires.\nThere is no need for this function to call complete(false).\ntear_down() will still be called after this completes.\nThe default is to do nothing.\n\"\"\"\nNone"} +{"id": "Pony/builtin-U128-_49.txt", "contents": "fun box le(\ny: U128 val)\n: Bool val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: U128 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_555.txt", "contents": "fun box tcpolen_window()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_cc\u00b6\n[Source]\nfun box tcpopt_cc()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpopt_ccecho\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/src-term-ansi_term-_35.txt", "contents": "_notify.right(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _delete() =>\n\"\"\"\nDelete key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.delete(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _insert() =>\n\"\"\"\nInsert key.\n\"\"\"\n(let ctrl, let alt, let shift) = _mod()\n_notify.insert(ctrl, alt, shift)\n_esc_clear()\n\nfun ref _home() =>"} +{"id": "Pony/src-builtin-string-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-collections-persistent-map-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-array-_95.txt", "contents": "Create a new array with the elements permuted.\nPermute to an arbitrary order that may include duplicates. An out of bounds\nindex raises an error.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not copied.\n\"\"\"\nlet out = Array[this->A!]\nfor i in indices do\nout.push(this(i)?)\nend\nout\n\nfun reverse(): Array[this->A!]^ =>\n\"\"\"\nCreate a new array with the elements in reverse order.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not copied.\n\"\"\"\nclone() .> reverse_in_place()\n"} +{"id": "Pony/src-files-file-_38.txt", "contents": "Operations on a file.\n\"\"\"\nlet path: FilePath\n\"\"\"\nThis is the filesystem path locating this file on the file system\nand an object capability granting access to operate on this file.\n\"\"\"\n\nlet writeable: Bool\n\"\"\"\n`true` if the underlying file descriptor has been opened as writeable.\n\"\"\"\n\nlet _newline: String = \"\\n\"\nvar _unsynced_data: Bool = false\nvar _unsynced_metadata: Bool = false\nvar _fd: I32\nvar _errno: FileErrNo = FileOK\nembed _pending_writev: Array[(Pointer[U8] tag, USize)] = _pending_writev.create()\nvar _pending_writev_total: USize = 0"} +{"id": "Pony/src-assert-assert-_4.txt", "contents": "primitive Fact\n\"\"\"\nThis is an assertion that is always enabled. If the test is false, it will\nprint any supplied error message to stderr and raise an error.\n\"\"\"\nfun apply(test: Bool, msg: String = \"\") ? =>\nif not test then\nif msg.size() > 0 then\n@fprintf(@pony_os_stderr(), \"%s\\n\".cstring(), msg.cstring())\nend\nerror\nend\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-UDPSocket-_9.txt", "contents": "\nset_notify\u00b6\n[Source]\nChange the notifier.\nbe set_notify(\nnotify: UDPNotify iso)\n\nParameters\u00b6\n\nnotify: UDPNotify iso\n\n\nset_broadcast\u00b6\n[Source]\nEnable or disable broadcasting from this socket.\nbe set_broadcast(\nstate: Bool val)\n\nParameters\u00b6\n"} +{"id": "Pony/src-collections-list_node-_22.txt", "contents": "\"\"\"\n_next isnt None\n\nfun prev(): (this->ListNode[A] | None) =>\n\"\"\"\nReturn the previous node.\n\"\"\"\n_prev\n\nfun next(): (this->ListNode[A] | None) =>\n\"\"\"\nReturn the next node.\n\"\"\"\n_next\n\nfun ref _set_list(list: List[A]): ListNode[A]^ =>\n\"\"\"\nMake this node the only node on the given list.\n\"\"\"\nremove()"} +{"id": "Pony/net-OSSockOpt-_63.txt", "contents": "fun box ipproto_visa()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_vmtp\u00b6\n[Source]\nfun box ipproto_vmtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_wbexpak\u00b6\n[Source]"} +{"id": "Pony/builtin-Array-_49.txt", "contents": "\npermute\u00b6\n[Source]\nCreate a new array with the elements permuted.\nPermute to an arbitrary order that may include duplicates. An out of bounds\nindex raises an error.\nThe new array contains references to the same elements that the old array\ncontains, the elements themselves are not copied.\nfun box permute(\nindices: Iterator[USize val] ref)\n: Array[this->A!] ref^ ?\n\nParameters\u00b6\n\nindices: Iterator[USize val] ref\n\nReturns\u00b6\n\nArray[this->A!] ref^ ?\n"} +{"id": "Pony/src-builtin-seq-_7.txt", "contents": "fun ref shift(): A^ ?\n\"\"\"\nRemoves an element from the beginning of the sequence.\n\"\"\"\n\nfun ref append(\nseq: (ReadSeq[A] & ReadElement[A^]),\noffset: USize = 0,\nlen: USize = -1)\n\"\"\"\nAdd len elements to the end of the list, starting from the given\noffset.\n\"\"\"\n\nfun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1)\n\"\"\"\nAdd len iterated elements to the end of the list, starting from the given\noffset.\n\"\"\"\n"} +{"id": "Pony/src-cli-command-_10.txt", "contents": "192\n193\n194use \"collections\"\n\nclass box Command\n\"\"\"\nCommand contains all of the information describing a command with its spec\nand effective options and arguments, ready to use.\n\"\"\"\nlet _spec: CommandSpec box\nlet _fullname: String\nlet _options: Map[String, Option] box\nlet _args: Map[String, Arg] box\n\nnew _create(\nspec': CommandSpec box,\nfullname': String,\noptions': Map[String, Option] box,\nargs': Map[String, Arg] box)\n=>"} +{"id": "Pony/arrow-types_1.txt", "contents": "# Using `this->` as a viewpoint\n\nA function with a `box` receiver can be called with a `ref` receiver or a `val` receiver as well since those are both subtypes of `box`. Sometimes, we want to be able to talk about a type to take this into account. For example:\n\n```pony\nclass Wombat\nvar _friend: Wombat\n\nfun friend(): this->Wombat => _friend\n```\n\nHere, we have a `Wombat`, and every `Wombat` has a friend that's also a `Wombat` (lucky `Wombat`). In fact, it's a `Wombat ref`, since `ref` is the default reference capability for a `Wombat` (since we didn't specify one). We also have a function that returns that friend. It's got a `box` receiver (because `box` is the default receiver reference capability for a function if we don't specify it).\n\nSo the return type would normally be a `Wombat box`. Why's that? Because, as we saw earlier, when we read a `ref` field from a `box` origin, we get a `box`. In this case, the origin is the receiver, which is a `box`.\n\nBut wait! What if we want a function that can return a `Wombat ref` when the receiver is a `ref`, a `Wombat val` when the receiver is a `val`, and a `Wombat box` when the receiver is a `box`? We don't want to have to write the function three times.\n\nWe use `this->`! In this case, `this->Wombat`. It means \"a `Wombat ref` as seen by the receiver\".\n\nWe know at the _call site_ what the real reference capability of the receiver is. So when the function is called, the compiler knows everything it needs to know to get this right.\n"} +{"id": "Pony/builtin-Array-_39.txt", "contents": "Parameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nNone val\n\n\npop\u00b6\n[Source]\nRemove an element from the end of the array.\nThe removed element is returned.\nfun ref pop()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n"} +{"id": "Pony/src-buffered-reader-_63.txt", "contents": "error\nend\n\nfun ref i64_be(): I64 ? =>\n\"\"\"\nGet a big-endian I64.\n\"\"\"\nu64_be()?.i64()\n\nfun ref i64_le(): I64 ? =>\n\"\"\"\nGet a little-endian I64.\n\"\"\"\nu64_le()?.i64()\n\nfun ref u128_be(): U128 ? =>\n\"\"\"\nGet a big-endian U128.\n\"\"\"\nlet num_bytes = U128(0).bytewidth()"} +{"id": "Pony/src-random-mt-_0.txt", "contents": "\n\n\n\n\n\n\nmt.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-String-_65.txt", "contents": "\nthat: String box\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nReturns true if this is lexically less than or equal to that. Needs to be\nmade UTF-8 safe.\nfun box le(\nthat: String box)\n: Bool val\n\nParameters\u00b6\n\nthat: String box\n"} +{"id": "Pony/src-itertools-iter-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/c-abi_0.txt", "contents": "# C ABI\n\nThe FFI support in Pony uses the C application binary interface (ABI) to interface with native code. The C ABI is a calling convention, one of many, that allow objects from different programming languages to be used together.\n"} +{"id": "Pony/itertools-Iter-_14.txt", "contents": "WARNING: The values returned by the original iterator are cached, so\nthe input iterator should be finite.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.cycle()\n\n1 2 3 1 2 3 1 2 3 ...\nfun ref cycle()\n: Iter[A!] ref^\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\ndedup[optional H: HashFunction[A] val]\u00b6\n[Source]\nReturn an iterator that removes duplicates from consecutive identical\nelements. Equality is determined by the HashFunction H.\nExample\u00b6"} +{"id": "Pony/builtin-I32-_28.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-iterator-_6.txt", "contents": "# Usage\n\nGiven the rules for using Iterators mentioned above, basic usage\nof an iterator looks like this:\n\n```pony\nwhile iterator.has_next() do\nlet elem = iterator.next()?\n// do something with elem\nend\n```\n\nThe `For`-loop provides a more concise way of iteration:\n\n```pony\nfor elem in iterator do\n// do something with elem\nend\n```\n"} +{"id": "Pony/collections-HashSet-_22.txt", "contents": "[Source]\nReturns the value at a given index. Raise an error if the index is not\npopulated.\nfun box index(\ni: USize val)\n: this->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nthis->A ?\n\n\nvalues\u00b6\n[Source]\nReturn an iterator over the values.\nfun box values()"} +{"id": "Pony/signals-Sig-_13.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nxcpu\u00b6\n[Source]\nfun box xcpu()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nxfsz\u00b6\n[Source]\nfun box xfsz()\n: U32 val\n"} +{"id": "Pony/src-pony_test-test_helper-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/process--index-_4.txt", "contents": "Once the child process is detected to be closed, the process exit status is\nretrieved and ProcessNotify.dispose is\ncalled.\nThe process exit status can be either an instance of\nExited containing the process exit code in case the\nprogram exited on its own, or (only on posix systems like linux, osx or bsd) an\ninstance of Signaled containing the signal number that\nterminated the process.\nPublic Types\u00b6\n\nprimitive CapError\nprimitive ChdirError\nprimitive ExecveError\nclass Exited\nprimitive ForkError\nprimitive KillError\nprimitive PipeError\nclass ProcessError\ntype ProcessErrorType\ntype ProcessExitStatus"} +{"id": "Pony/builtin-Integer-_43.txt", "contents": "\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n"} +{"id": "Pony/src-pony_test-pony_test-_28.txt", "contents": "# Example program\n\nTo use PonyTest simply write a class for each test and a TestList type that\ntells the PonyTest object about the tests. Typically the TestList will be Main\nfor the package.\n\nThe following is a complete program with 2 trivial tests.\n\n```pony\nuse \"pony_test\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>\nNone\n\nfun tag tests(test: PonyTest) =>\ntest(_TestAdd)"} +{"id": "Pony/builtin-String-_84.txt", "contents": "StringBytes ref^\n\n\nrunes\u00b6\n[Source]\nReturn an iterator over the codepoints in the string.\nfun box runes()\n: StringRunes ref^\n\nReturns\u00b6\n\nStringRunes ref^\n\n\nge\u00b6\n[Source]\nfun box ge(\nthat: String box)\n: Bool val\n"} +{"id": "Pony/src-builtin-float-_51.txt", "contents": "fun acos(): F64 => @acos(this)\nfun asin(): F64 => @asin(this)\nfun atan(): F64 => @atan(this)\nfun atan2(y: F64): F64 => @atan2(this, y)\n\nfun acosh(): F64 => @acosh(this)\nfun asinh(): F64 => @asinh(this)\nfun atanh(): F64 => @atanh(this)\n\nfun copysign(sign: F64): F64 => @\"llvm.copysign.f64\"(this, sign)\n\nfun hash(): USize => bits().hash()\nfun hash64(): U64 => bits().hash64()\n\nfun i128(): I128 =>\nif this > I128.max_value().f64() then\nreturn I128.max_value()\nelseif this < I128.min_value().f64() then\nreturn I128.min_value()\nend"} +{"id": "Pony/buffered-Writer-_17.txt", "contents": "data: I64 val)\n: None val\n\nParameters\u00b6\n\ndata: I64 val\n\nReturns\u00b6\n\nNone val\n\n\nf64_le\u00b6\n[Source]\nWrite an F64 to the buffer in little-endian byte order.\nfun ref f64_le(\ndata: F64 val)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/cli-CommandParser-_2.txt", "contents": "argv: Array[String val] box\nenvs: (Array[String val] box | None val) = reference\n\nReturns\u00b6\n\n(Command box | CommandHelp box | SyntaxError val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I128-_4.txt", "contents": "\nU128 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: I128 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-persistent-set-_10.txt", "contents": "Check whether the set contains the value.\n\"\"\"\n_map.contains(value)\n\nfun val add(value: val->A): HashSet[A, H] =>\n\"\"\"\nReturn a set with the value added.\n\"\"\"\n_create(_map(value) = value)\n\nfun val sub(value: val->A): HashSet[A, H] =>\n\"\"\"\nReturn a set with the value removed.\n\"\"\"\ntry _create(_map.remove(value)?) else this end\n\nfun val op_or(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>\n\"\"\"\nReturn a set with the elements of both this and that.\n\"\"\""} +{"id": "Pony/src-builtin-string-_57.txt", "contents": "1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151"} +{"id": "Pony/net-UDPSocket-_4.txt", "contents": "\nConstructors\u00b6\ncreate\u00b6\n[Source]\nListens for both IPv4 and IPv6 datagrams.\nnew tag create(\nauth: UDPAuth val,\nnotify: UDPNotify iso,\nhost: String val = \"\",\nservice: String val = \"0\",\nsize: USize val = 1024)\n: UDPSocket tag^\n\nParameters\u00b6\n\nauth: UDPAuth val\nnotify: UDPNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nsize: USize val = 1024"} +{"id": "Pony/net-OSSockOpt-_246.txt", "contents": "fun box local_connwait()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_creds\u00b6\n[Source]\nfun box local_creds()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nlocal_peercred\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_315.txt", "contents": "fun box rds_rdma_use_once()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_recverr\u00b6\n[Source]\nfun box rds_recverr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_trans_count\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_35.txt", "contents": "692\n693\n694\n695\n696\n697\n698\n699\n700\n701\n702\n703\n704\n705\n706\n707\n708\n709\n710\n711"} +{"id": "Pony/src-net-ossockopt-_76.txt", "contents": "fun ipproto_tp():I32 => @pony_os_sockopt_level(I32(4111))\nfun ipproto_tpxx():I32 => @pony_os_sockopt_level(I32(4112))\nfun ipproto_trunk1():I32 => @pony_os_sockopt_level(I32(4113))\nfun ipproto_trunk2():I32 => @pony_os_sockopt_level(I32(4114))\nfun ipproto_ttp():I32 => @pony_os_sockopt_level(I32(4115))\nfun ipproto_udp():I32 => @pony_os_sockopt_level(I32(4116))\nfun ipproto_udplite():I32 => @pony_os_sockopt_level(I32(4117))\nfun ipproto_vines():I32 => @pony_os_sockopt_level(I32(4118))\nfun ipproto_visa():I32 => @pony_os_sockopt_level(I32(4119))\nfun ipproto_vmtp():I32 => @pony_os_sockopt_level(I32(4120))\nfun ipproto_wbexpak():I32 => @pony_os_sockopt_level(I32(4121))\nfun ipproto_wbmon():I32 => @pony_os_sockopt_level(I32(4122))\nfun ipproto_wsn():I32 => @pony_os_sockopt_level(I32(4123))\nfun ipproto_xnet():I32 => @pony_os_sockopt_level(I32(4124))\nfun ipproto_xtp():I32 => @pony_os_sockopt_level(I32(4125))\nfun sol_atalk():I32 => @pony_os_sockopt_level(I32(4126))\nfun sol_ax25():I32 => @pony_os_sockopt_level(I32(4127))\nfun sol_hci_raw():I32 => @pony_os_sockopt_level(I32(4128))\nfun sol_ipx():I32 => @pony_os_sockopt_level(I32(4129))\nfun sol_l2cap():I32 => @pony_os_sockopt_level(I32(4130))"} +{"id": "Pony/net-UDPSocket-_2.txt", "contents": "let _out: OutStream\nlet _destination: NetAddress\n\nnew create(\nout: OutStream,\ndestination: NetAddress)\n=>\n_out = out\n_destination = destination\n\nfun ref listening(sock: UDPSocket ref) =>\nsock.write(\"hello world\", _destination)\n\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8] iso,\nfrom: NetAddress)\n=>\n_out.print(\"GOT:\" + String.from_array(consume data))\nsock.dispose()"} +{"id": "Pony/serialise-OutputSerialisedAuth-_2.txt", "contents": "Parameters\u00b6\n\nthat: OutputSerialisedAuth val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: OutputSerialisedAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: OutputSerialisedAuth val\n\nReturns\u00b6"} +{"id": "Pony/src-term-readline-_22.txt", "contents": "initial prompt on the ANSITerm to begin processing.\n\"\"\"\n_notify = consume notify\n_out = out\n_path = path\n_history = Array[String](maxlen)\n_maxlen = maxlen\n\n_load_history()\n\nfun ref apply(term: ANSITerm ref, input: U8) =>\n\"\"\"\nReceives input.\n\"\"\"\nmatch input\n| 0x01 => home() // ctrl-a\n| 0x02 => left() // ctrl-b\n| 0x04 =>\n// ctrl-d\nif _edit.size() == 0 then"} +{"id": "Pony/collections-persistent-Cons-_7.txt", "contents": "\nReturns\u00b6\n\nCons[A] val\n\n\nconcat\u00b6\n[Source]\nBuilds a new list that is the concatenation of this list and the provided\nlist.\nfun val concat(\nl: (Cons[A] val | Nil[A] val))\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nl: (Cons[A] val | Nil[A] val)\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_77.txt", "contents": "1532\n1533\n1534\n1535\n1536\n1537\n1538\n1539\n1540\n1541\n1542\n1543\n1544\n1545\n1546\n1547\n1548\n1549\n1550\n1551"} +{"id": "Pony/src-pony_check-property-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/builtin-I128-_11.txt", "contents": "I128 val\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: I128 val)\n: I128 val\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nmod\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_50.txt", "contents": "else\n\"\"\nend\n\nfun from_slash(path: String): String =>\n\"\"\"\nChanges each / in the path to the OS specific separator.\n\"\"\"\nifdef windows then\nlet s = path.clone()\nlet len = s.size()\nvar i = USize(0)\n\ntry\nwhile i < len do\nif s(i)? == '/' then\ns(i)? = '\\\\'\nend\n\ni = i + 1"} +{"id": "Pony/src-pony_bench-benchmark-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-builtin-real-_65.txt", "contents": "\"\"\"\n(this /~ y, this %~ y)\n\nfun rem_unsafe(y: A): A =>\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\nthis %~ y\n\nfun mod_unsafe(y: A): A\n\"\"\"\nUnsafe operation.\nIf any input or output of the operation is +/- infinity or NaN, the result\nis undefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\n\"\"\"\n"} +{"id": "Pony/src-cli-command_help-_13.txt", "contents": "fun help_string(): String =>\n\"\"\"\nRenders the help message as a String.\n\"\"\"\nlet w: Writer = Writer\n_write_help(w)\nlet str = recover trn String(w.size()) end\nfor bytes in w.done().values() do str.append(bytes) end\nstr\n\nfun print_help(os: OutStream) =>\n\"\"\"\nPrints the help message to an OutStream.\n\"\"\"\nlet w: Writer = Writer\n_write_help(w)\nos.writev(w.done())\n\nfun _write_help(w: Writer) =>\n_write_usage(w)"} +{"id": "Pony/builtin-I16-_8.txt", "contents": "fun box bitwidth()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nbytewidth\u00b6\n[Source]\nfun box bytewidth()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nmin\u00b6\n[Source]"} +{"id": "Pony/files-FileSeek-_2.txt", "contents": "\nthat: FileSeek val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileSeek val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileSeek val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ILong-_38.txt", "contents": "Parameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_71.txt", "contents": "fun box sol_rfcomm()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_rose\u00b6\n[Source]\nfun box sol_rose()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_sco\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_203.txt", "contents": "fun box ip_fw3()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_add\u00b6\n[Source]\nfun box ip_fw_add()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_del\u00b6\n[Source]"} +{"id": "Pony/src-collections-set-_21.txt", "contents": "are not in this.\n\"\"\"\nfor value in that do\ntry\nextract(value)?\nelse\nset(consume value)\nend\nend\n\nfun ref remove(that: Iterator[box->A!]) =>\n\"\"\"\nRemove everything that is in that.\n\"\"\"\nfor value in that do\nunset(value)\nend\n\nfun add[K: HashFunction[this->A!] val = H](\nvalue: this->A!)"} +{"id": "Pony/src-debug-debug-_7.txt", "contents": "primitive Debug\n\"\"\"\nThis is a debug only print utility.\n\"\"\"\nfun apply(\nmsg: (Stringable | ReadSeq[Stringable]),\nsep: String = \", \",\nstream: DebugStream = DebugOut)\n=>\n\"\"\"\nIf platform is debug configured, print either a single stringable or a\nsequence of stringables. The default separator is \", \", and the default\noutput stream is stdout.\n\"\"\"\nifdef debug then\nmatch msg\n| let m: Stringable =>\n_print(m.string(), stream)\n| let m: ReadSeq[Stringable] =>\n_print(sep.join(m.values()), stream)"} +{"id": "Pony/builtin-U8-_52.txt", "contents": "fun box u8()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16\u00b6\n[Source]\nfun box u16()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32\u00b6\n[Source]"} +{"id": "Pony/builtin-U16-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_86.txt", "contents": "### Example\n\n```pony\nIter[USize](Range(0, 4))\n.interleave(Range(4, 6))\n```\n`0 4 1 5 2 3`\n\"\"\"\nIter[A!](\nobject is Iterator[A!]\nvar _use_original: Bool = true\n\nfun ref has_next(): Bool =>\n_iter.has_next() or other.has_next()\n\nfun ref next(): A! ? =>\n// Oscillate between iterators\nif _use_original then\n_use_original = not _use_original\n"} +{"id": "Pony/src-builtin-array-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/src-pony_check-generator-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-cli-command_spec-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/net-TCPConnection-_16.txt", "contents": "yield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPConnection tag^\n\n\nPublic Behaviours\u00b6\nwrite\u00b6\n[Source]\nWrite a single sequence of bytes. Data will be silently discarded if the\nconnection has not yet been established though.\nbe write(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n"} +{"id": "Pony/net-OSSockOpt-_381.txt", "contents": "fun box sctp_flight_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_forward_cum_tsn\u00b6\n[Source]\nfun box sctp_forward_cum_tsn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_fragment_interleave\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_62.txt", "contents": "_head = None\n_tail = None\n_size = 0\n\nfun head(): this->ListNode[A] ? =>\n\"\"\"\nShow the head of the list, raising an error if the head is empty.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\ntry my_list.head()? end // Returns a ListNode[String] containing \"a\"\n```\n\"\"\"\n_head as this->ListNode[A]\n\nfun tail(): this->ListNode[A] ? =>\n\"\"\"\nShow the tail of the list, raising an error if the tail is empty.\n\n```pony"} +{"id": "Pony/src-builtin-array-_53.txt", "contents": "Modifying the Array can be done via `update`, `insert` and `delete` methods\nwhich alter the Array at an arbitrary index, moving elements left (when\ndeleting) or right (when inserting) as necessary.\n\nIterating over the elements of an Array can be done using the `values` method:\n```pony\nfor element in array.values() do\n// do something with element\nend\n```\n"} +{"id": "Pony/6_errors_4.txt", "contents": "# Partial constructors and behaviours\n\nClass constructors may also be marked as partial. If a class constructor raises an error then the construction is considered to have failed and the object under construction is discarded without ever being returned to the caller.\n\nWhen an actor constructor is called the actor is created and a reference to it is returned immediately. However, the constructor code is executed asynchronously at some later time. If an actor constructor were to raise an error it would already be too late to report this to the caller. For this reason, constructors for actors may not be partial.\n\nBehaviours are also executed asynchronously and so cannot be partial for the same reason.\n"} +{"id": "Pony/src-collections-persistent-set-_13.txt", "contents": "s' = s' - v\nelse\ns' = s' + v\nend\nend\ns'\n\nfun val without(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>\n\"\"\"\nReturn a set with the elements of this that are not in that.\n\"\"\"\nlet iter =\nmatch that\n| let s: HashSet[A, H] => s.values()\n| let i: Iterator[A] => i\nend\nvar s' = this\nfor v in iter do\nif contains(v) then\ns' = s' - v"} +{"id": "Pony/src-net-ossockopt-_125.txt", "contents": "fun tcpi_opt_syn_data():I32 => @pony_os_sockopt_option(I32(942))\nfun tcpi_opt_timestamps():I32 => @pony_os_sockopt_option(I32(943))\nfun tcpi_opt_toe():I32 => @pony_os_sockopt_option(I32(944))\nfun tcpi_opt_wscale():I32 => @pony_os_sockopt_option(I32(945))\nfun tcpolen_cc():I32 => @pony_os_sockopt_option(I32(946))\nfun tcpolen_cc_appa():I32 => @pony_os_sockopt_option(I32(947))\nfun tcpolen_eol():I32 => @pony_os_sockopt_option(I32(948))\nfun tcpolen_fastopen_req():I32 => @pony_os_sockopt_option(I32(949))\nfun tcpolen_fast_open_empty():I32 => @pony_os_sockopt_option(I32(950))\nfun tcpolen_fast_open_max():I32 => @pony_os_sockopt_option(I32(951))\nfun tcpolen_fast_open_min():I32 => @pony_os_sockopt_option(I32(952))\nfun tcpolen_maxseg():I32 => @pony_os_sockopt_option(I32(953))\nfun tcpolen_nop():I32 => @pony_os_sockopt_option(I32(954))\nfun tcpolen_pad():I32 => @pony_os_sockopt_option(I32(955))\nfun tcpolen_sack():I32 => @pony_os_sockopt_option(I32(956))\nfun tcpolen_sackhdr():I32 => @pony_os_sockopt_option(I32(957))\nfun tcpolen_sack_permitted():I32 => @pony_os_sockopt_option(I32(958))\nfun tcpolen_signature():I32 => @pony_os_sockopt_option(I32(959))\nfun tcpolen_timestamp():I32 => @pony_os_sockopt_option(I32(960))\nfun tcpolen_tstamp_appa():I32 => @pony_os_sockopt_option(I32(961))"} +{"id": "Pony/builtin-SignedInteger-_59.txt", "contents": "U16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_290.txt", "contents": "fun box netrom_t1()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_t2\u00b6\n[Source]\nfun box netrom_t2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetrom_t4\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_2.txt", "contents": "env.out.print(consume substr)\nend\n\nclass val String is\nSeq[U8 val] ref,\nComparable[String box] ref,\nStringable box\n\nImplements\u00b6\n\nSeq[U8 val] ref\nComparable[String box] ref\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nAn empty string. Enough space for len bytes is reserved.\nnew ref create("} +{"id": "Pony/src-collections-list-_58.txt", "contents": "\"\"\"\nDo nothing\n\nRequired method for `List` to satisfy the `Seq` interface.\n\"\"\"\nNone\n\nfun size(): USize =>\n\"\"\"\nReturns the number of items in the list.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nmy_list.size() // 3\n```\n\"\"\"\n_size\n\nfun apply(i: USize = 0): this->A ? =>\n\"\"\""} +{"id": "Pony/src-pony_test-pony_test-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-net-ossockopt-_67.txt", "contents": "name constants (arguments #2 and #3) for the\n`getsockopt(2)` and `setsockopt(2)` operating system calls.\n\nThe values of the option level and option name constants are\ntypically C preprocessor macros, e.g., `#define SOMETHING 42`.\nThese macro names are upper case and may contain multiple\nconsecutive underscore characters (though this is rare, for\nexample, `IP_NAT__XXX`). The function names in this primitive\nare derived by the C macro name and then:\n\n* converted to lower case\n* any double underscore (`__`) is converted to a\nsingle underscore (`_`).\n\nThese constants are _not_ stable between Pony releases.\nValues returned by this function may be held by long-lived variables\nby the calling process: values cannot change while the process runs.\nProgrammers must not cache any of these values for purposes of\nsharing them for use by any other Pony program (for example,\nsharing via serialization & deserialization or via direct"} +{"id": "Pony/builtin-U32-_3.txt", "contents": "U32 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: U32 val^\n\nReturns\u00b6\n\nU32 val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_helper-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/src-collections-map-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-pony_bench-_runner-_0.txt", "contents": "\n\n\n\n\n\n\n_runner.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_14.txt", "contents": "fun box ipproto_divert()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_done\u00b6\n[Source]\nfun box ipproto_done()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_dstopts\u00b6\n[Source]"} +{"id": "Pony/collections-HashByteSeq-_3.txt", "contents": "\n\neq\u00b6\n[Source]\nfun box eq(\nx: (String box | Array[U8 val] box),\ny: (String box | Array[U8 val] box))\n: Bool val\n\nParameters\u00b6\n\nx: (String box | Array[U8 val] box)\ny: (String box | Array[U8 val] box)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_8.txt", "contents": "[Source]\nfun box fld_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: A)\n: A\n"} +{"id": "Pony/src-collections-list-_76.txt", "contents": "try\n_flat_map[B](head()?, f, List[B])\nelse\nList[B]\nend\n\nfun _flat_map[B](\nln: this->ListNode[A],\nf: {(this->A!): List[B]} box,\nacc: List[B]): List[B]^\n=>\n\"\"\"\nPrivate helper for `flat_map`, recursively working with `ListNode`s.\n\"\"\"\ntry acc.append_list(f(ln()?)) end\n\ntry\n_flat_map[B](ln.next() as this->ListNode[A], f, acc)\nelse\nacc"} +{"id": "Pony/format-FormatHex-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatHex val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHex val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-builtin-unsigned-_71.txt", "contents": "@\"llvm.bitreverse.i64\"(this.u64()).usize()\nend\n\nfun bswap(): USize =>\nifdef ilp32 then\n@\"llvm.bswap.i32\"(this.u32()).usize()\nelse\n@\"llvm.bswap.i64\"(this.u64()).usize()\nend\n\nfun popcount(): USize =>\nifdef ilp32 then\n@\"llvm.ctpop.i32\"(this.u32()).usize()\nelse\n@\"llvm.ctpop.i64\"(this.u64()).usize()\nend\n\nfun clz(): USize =>\nifdef ilp32 then\n@\"llvm.ctlz.i32\"(this.u32(), false).usize()"} +{"id": "Pony/5_methods_14.txt", "contents": "# Chaining\n\nMethod chaining allows you to chain calls on an object without requiring the method to return its receiver. The syntax to call a method and chain the receiver is `object.>method()`, which is roughly equivalent to `(object.method() ; object)`. Chaining a method discards its normal return value.\n\n```pony\nprimitive Printer\nfun print_two_strings(out: StdStream, s1: String, s2: String) =>\nout.>print(s1).>print(s2)\n// Equivalent to:\nout.print(s1)\nout.print(s2)\nout\n```\n\nNote that the last `.>` in a chain can be a `.` if the return value of the last call matters.\n\n```pony\ninterface Factory\nfun add_option(o: Option)\nfun make_object(): Object"} +{"id": "Pony/src-builtin-signed-_56.txt", "contents": "fun modc(y: I16): (I16, Bool) =>\n_SignedCheckedArithmetic.mod_checked[I16, U16](this, y)\n\nfun add_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.add_partial[I16](this, y)?\n\nfun sub_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.sub_partial[I16](this, y)?\n\nfun mul_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.mul_partial[I16](this, y)?\n\nfun div_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.div_partial[I16, U16](this, y)?\n\nfun rem_partial(y: I16): I16 ? =>\n_SignedPartialArithmetic.rem_partial[I16, U16](this, y)?\n\nfun divrem_partial(y: I16): (I16, I16) ? =>\n_SignedPartialArithmetic.divrem_partial[I16, U16](this, y)?"} +{"id": "Pony/builtin-None-_0.txt", "contents": "\n\n\n\n\n\n\nNone\u00b6\n[Source]\nprimitive val None is\nStringable box\n\nImplements\u00b6\n\nStringable box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-builtin-none-_0.txt", "contents": "\n\n\n\n\n\n\nnone.pony\n\n1\n2\n3primitive None is Stringable\nfun string(): String iso^ =>\n\"None\".string()\n\n\n\n\n\n"} +{"id": "Pony/src-cli-command_spec-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-Compare-_0.txt", "contents": "\n\n\n\n\n\n\nCompare\u00b6\n[Source]\ntype Compare is\n(Less val | Equal val | Greater val)\n\nType Alias For\u00b6\n\n(Less val | Equal val | Greater val)\n\n\n\n\n"} +{"id": "Pony/builtin-ILong-_21.txt", "contents": "\nILong val ?\n\n\ndiv_partial\u00b6\n[Source]\nfun box div_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val ?\n\n\nrem_partial\u00b6"} +{"id": "Pony/builtin-U16-_38.txt", "contents": "fun box add(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/builtin-U128-_21.txt", "contents": "F64 val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\n(U128 val , Bool val)\n\n\nsubc\u00b6\n[Source]"} +{"id": "Pony/src-time-timer_notify-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26interface TimerNotify\n\"\"\"\nNotifications for timer.\n\"\"\"\nfun ref apply(timer: Timer, count: U64): Bool =>\n\"\"\""} +{"id": "Pony/src-buffered-reader-_51.txt", "contents": "\"\"\"\nif _available >= 1 then\n_byte()?\nelse\nerror\nend\n\nfun ref i8(): I8 ? =>\n\"\"\"\nGet an I8.\n\"\"\"\nu8()?.i8()\n\nfun ref u16_be(): U16 ? =>\n\"\"\"\nGet a big-endian U16.\n\"\"\"\nlet num_bytes = U16(0).bytewidth()\nif _available >= num_bytes then\nlet node = _chunks.head()?"} +{"id": "Pony/src-random-xorshift-_4.txt", "contents": "\"\"\"\nA random integer in [0, 2^64)\n\"\"\"\nvar y = _x\nlet x = _y\nlet r = x + y\n_x = x\ny = y xor (y << 23)\n_y = y xor x xor (y >> 18) xor (x >> 5)\nr\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-randomness-_14.txt", "contents": "(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nif (min == U16.min_value()) and (max == U16.max_value()) then\n_random.u16()\nelse\nmin + _random.int((max - min).u64() + 1).u16()\nend\n\nfun ref u32(min: U32 = U32.min_value(), max: U32 = U32.max_value()): U32 =>\n\"\"\"\nGenerate a U32 in closed interval [min, max]\n(default: [min_value, max_value]).\n\nBehavior is undefined if `min` > `max`.\n\"\"\"\nif (min == U32.min_value()) and (max == U32.max_value()) then\n_random.u32()\nelse"} +{"id": "Pony/builtin-I8-_54.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-list-_34.txt", "contents": "end\n\nprimitive Nil[A] is ReadSeq[val->A]\n\"\"\"\nThe empty list of As.\n\"\"\"\n\nfun size(): USize =>\n\"\"\"\nReturns the size of the list.\n\"\"\"\n0\n\nfun apply(i: USize): val->A ? =>\n\"\"\"\nReturns the i-th element of the sequence. For the empty list this call will\nalways error because any index will be out of bounds.\n\"\"\"\nerror\n"} +{"id": "Pony/pony_check-ASCIIPrintable-_1.txt", "contents": "\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply()\n: String val\n\nReturns\u00b6\n\nString val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: ASCIIPrintable val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/guarantees_0.txt", "contents": "# Reference Capability Guarantees\n\nSince types are guarantees, it's useful to talk about what guarantees a reference capability makes.\n"} +{"id": "Pony/term-ANSINotify-_8.txt", "contents": "None val\n\n\nend_key\u00b6\n[Source]\nfun ref end_key(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val"} +{"id": "Pony/src-builtin-unsigned-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/buffered-Reader-_21.txt", "contents": "Returns\u00b6\n\nF64 val ?\n\n\npeek_u8\u00b6\n[Source]\nPeek at a U8 at the given offset. Raise an error if there isn't enough\ndata.\nfun box peek_u8(\noffset: USize val = 0)\n: U8 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nU8 val ?"} +{"id": "Pony/src-builtin-string-_163.txt", "contents": "// Check for leading minus\nlet minus = (index < _size) and (_ptr._apply(index) == '-')\nif minus then\nif A(-1) > A(0) then\n// We're reading an unsigned type, negative not allowed, int not found\nreturn (0, 0)\nend\n\nindex = index + 1\nend\n\n(let base', let base_chars) = _read_int_base[A](base, index)\nindex = index + base_chars\n\n// Process characters\nwhile index < _size do\nlet char: A = A(0).from[U8](_ptr._apply(index))\nif char == '_' then\nindex = index + 1\ncontinue"} +{"id": "Pony/signals-SignalRaise-_2.txt", "contents": "[Source]\nfun box eq(\nthat: SignalRaise val)\n: Bool val\n\nParameters\u00b6\n\nthat: SignalRaise val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: SignalRaise val)\n: Bool val\n"} +{"id": "Pony/7_type-expressions_5.txt", "contents": "# Combining type expressions\n\nType expressions can be combined into more complex types. Here's another example from the standard library:\n\n```pony\nvar _array: Array[((K, V) | _MapEmpty | _MapDeleted)]\n```\n\nHere we have an array where each element is either a tuple of `(K, V)` or a `_MapEmpty` or a `_MapDeleted`.\n\nBecause every type expression has parentheses around it, they are actually easy to read once you get the hang of it. However, if you use a complex type expression often, it can be nice to provide a type alias for it.\n\n```pony\ntype Number is (Signed | Unsigned | Float)\n\ntype Signed is (I8 | I16 | I32 | I64 | I128)\n\ntype Unsigned is (U8 | U16 | U32 | U64 | U128)\n\ntype Float is (F32 | F64)"} +{"id": "Pony/src-random-dice-_2.txt", "contents": "new create(from: Random) =>\n\"\"\"\nInitialise with a random number generator.\n\"\"\"\nr = from\n\nfun ref apply(count: U64, sides: U64): U64 =>\n\"\"\"\nReturn the sum of `count` rolls of a die with the given number of `sides`.\nThe die is numbered from 1 to `sides`. For example, count = 2 and\nsides = 6 will return a value between 2 and 12.\n\"\"\"\nvar sum = count\nvar i: U64 = 0\n\nwhile i < count do\nsum = sum + r.int(sides)\ni = i + 1\nend\nsum"} +{"id": "Pony/src-builtin-stringable-_0.txt", "contents": "\n\n\n\n\n\n\nstringable.pony\n\n1\n2\n3\n4\n5\n6\n7\n8interface box Stringable\n\"\"\"\nThings that can be turned into a String.\n\"\"\""} +{"id": "Pony/pony_check-Randomness-_1.txt", "contents": "seed1: U64 val = 42,\nseed2: U64 val = 0)\n: Randomness ref^\n\nParameters\u00b6\n\nseed1: U64 val = 42\nseed2: U64 val = 0\n\nReturns\u00b6\n\nRandomness ref^\n\n\nPublic Functions\u00b6\nu8\u00b6\n[Source]\nGenerate a U8 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/src-pony_check-property_unit_test-_12.txt", "contents": "match name'\n| None => p2.name()\n| let s: String => s\nend\n_prop2 = consume p2\n\nfun name(): String => _name\n\nfun ref apply(h: TestHelper) ? =>\nlet prop = ((_prop2 = None) as Property2[T1, T2] iso^)\nlet params = prop.params()\nh.long_test(params.timeout)\nlet property_runner =\nPropertyRunner[(T1, T2)](\nconsume prop,\nparams,\nh, // PropertyResultNotify\nh, // PropertyLogger\nh.env\n)"} +{"id": "Pony/src-collections-map-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479primitive _MapEmpty\nprimitive _MapDeleted\n\ntype Map[K: (Hashable #read & Equatable[K] #read), V] is\nHashMap[K, V, HashEq[K]]\n\"\"\"\nThis is a map that uses structural equality on the key.\n\"\"\"\n\ntype MapIs[K, V] is HashMap[K, V, HashIs[K]]\n\"\"\"\nThis is a map that uses identity comparison on the key.\n\"\"\""} +{"id": "Pony/src-builtin-unsigned-_50.txt", "contents": "fun mulc(y: U8): (U8, Bool) =>\n@\"llvm.umul.with.overflow.i8\"(this, y)\n\nfun divc(y: U8): (U8, Bool) =>\n_UnsignedCheckedArithmetic.div_checked[U8](this, y)\n\nfun remc(y: U8): (U8, Bool) =>\n_UnsignedCheckedArithmetic.rem_checked[U8](this, y)\n\nfun add_partial(y: U8): U8 ? =>\n_UnsignedPartialArithmetic.add_partial[U8](this, y)?\n\nfun sub_partial(y: U8): U8 ? =>\n_UnsignedPartialArithmetic.sub_partial[U8](this, y)?\n\nfun mul_partial(y: U8): U8 ? =>\n_UnsignedPartialArithmetic.mul_partial[U8](this, y)?\n\nfun div_partial(y: U8): U8 ? =>\n_UnsignedPartialArithmetic.div_partial[U8](this, y)?"} +{"id": "Pony/src-net-tcp_connection-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_6.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-TCPConnectionNotify-_11.txt", "contents": "Returns\u00b6\n\nUSize val\n\n\nclosed\u00b6\n[Source]\nCalled when the connection is closed.\nfun ref closed(\nconn: TCPConnection ref)\n: None val\n\nParameters\u00b6\n\nconn: TCPConnection ref\n\nReturns\u00b6\n\nNone val\n"} +{"id": "Pony/5_structs_5.txt", "contents": "\"\"\"\ncompile_intrinsic\n```\n\nHere we have two constructors. One that creates a new null Pointer, and another creates a Pointer with space for many instances of the type the Pointer is pointing at. Don't worry if you don't follow everything you are seeing in the above example. The important part is, it should basically look like the class constructor example [we saw earlier](/types/classes.md#what-goes-in-a-class).\n"} +{"id": "Pony/builtin-U32-_12.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-udp_notify-_0.txt", "contents": "\n\n\n\n\n\n\nudp_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-U64-_31.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsub_unsafe\u00b6\n[Source]\nfun box sub_unsafe(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/process-ChdirError-_0.txt", "contents": "\n\n\n\n\n\n\nChdirError\u00b6\n[Source]\nprimitive val ChdirError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ChdirError val^\n\nReturns\u00b6\n\nChdirError val^"} +{"id": "Pony/pony_check-Property4-_4.txt", "contents": "Parameters\u00b6\n\narg1: (T1 , T2 , T3 ,\nT4)\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nproperty4\u00b6\n[Source]\nA method verifying that a certain property holds for all given\narg1, arg2, arg3, and arg4\nwith the help of PropertyHelper h.\nfun ref property4(\narg1: T1,\narg2: T2,\narg3: T3,"} +{"id": "Pony/builtin-ILong-_52.txt", "contents": "\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]\nfun box usize()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-promises-fulfill-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28primitive _Pending\nprimitive _Reject\n\ninterface iso Fulfill[A: Any #share, B: Any #share]"} +{"id": "Pony/src-net-ossockopt-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/capsicum-Cap-_26.txt", "contents": "fun box listen()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\npeeloff\u00b6\n[Source]\nfun box peeloff()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nrecv\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-list-_50.txt", "contents": "fun _filter(l: List[A], f: {(val->A): Bool} box, acc: List[A]): List[A] =>\n\"\"\"\nPrivate helper for filter, recursively working on elements, keeping those\nthat match the predicate and discarding those that don't.\n\"\"\"\nmatch l\n| let cons: Cons[A] =>\nif (f(cons.head())) then\n_filter(cons.tail(), f, acc.prepend(cons.head()))\nelse\n_filter(cons.tail(), f, acc)\nend\nelse\nacc.reverse()\nend\n\nfun val fold[B](f: {(B, val->A): B^} box, acc: B): B =>\n\"\"\"\nFolds the elements of the list using the supplied function.\n\"\"\""} +{"id": "Pony/pony_check-Property4UnitTest-_2.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\napply\u00b6\n[Source]\nfun ref apply(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n"} +{"id": "Pony/itertools-Iter-_42.txt", "contents": "i4: Iterator[D] ref\ni5: Iterator[E] ref\n\nReturns\u00b6\n\nIter[(A , B , C , D , E)] ref^\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FileInfo-_5.txt", "contents": "\nlet symlink: Bool val\u00b6\n[Source]\ntrue if filepath points to a symbolic link.\n\nlet broken: Bool val\u00b6\n[Source]\ntrue if filepath points to a broken symlink.\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-heap-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-buffered-writer-_24.txt", "contents": "else\n_current.push_u64(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref u64_be(data: U64) =>\n\"\"\"\nWrite a U64 to the buffer in big-endian byte order.\n\"\"\"\nlet num_bytes = U64(0).bytewidth()\nifdef bigendian then\n_current.push_u64(data)\nelse\n_current.push_u64(data.bswap())\nend\n_size = _size + num_bytes\n\nfun ref i64_le(data: I64) =>\n\"\"\"\nWrite an I64 to the buffer in little-endian byte order."} +{"id": "Pony/src-math-least_common_multiple-_2.txt", "contents": "\n```pony\nuse \"math\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet lcm = LeastCommonMultiple[U64](10, 20)?\nenv.out.print(lcm.string())\nelse\nenv.out.print(\"No LCM\")\nend\n```\n\"\"\"\nfun apply[A: (Integer[A] val & Unsigned)](x: A, y: A): A ? =>\n(x / GreatestCommonDivisor[A](x, y)?) *? y\n\n\n\n"} +{"id": "Pony/src-collections-persistent-vec-_21.txt", "contents": "// push value into tail\n_create(_root, tail, size', _depth)\nelseif _tail_offset() == _Bits.next_pow32(_depth) then\n// create new root\n// push tail into root\nlet depth' = _depth + 1\nlet root' =\nmatch _root\n| let r: _VecNode[A] =>\ntry r.grow_root().push(depth', _tail_offset(), tail)?\nelse r\nend\n| None => _VecNode[A](tail)\nend\n_create(root', recover Array[A] end, size', depth')\nelse\n// push tail into root\nlet root' =\ntry (_root as _VecNode[A]).push(_depth, _tail_offset(), tail)?\nelse _root"} +{"id": "Pony/term-ANSI-_29.txt", "contents": "\nne\u00b6\n[Source]\nfun box ne(\nthat: ANSI val)\n: Bool val\n\nParameters\u00b6\n\nthat: ANSI val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_134.txt", "contents": "value\nelse\nerror\nend\n\nfun ref append(seq: ReadSeq[U8], offset: USize = 0, len: USize = -1) =>\n\"\"\"\nAppend the elements from a sequence, starting from the given offset.\n\"\"\"\nif offset >= seq.size() then\nreturn\nend\n\nlet copy_len = len.min(seq.size() - offset)\nreserve(_size + copy_len)\n\nmatch seq\n| let s: (String box | Array[U8] box) =>\ns._copy_to(_ptr, copy_len, offset, _size)\n_size = _size + copy_len"} +{"id": "Pony/builtin-Integer-_51.txt", "contents": "\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]\nfun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n"} +{"id": "Pony/src-builtin-string-_153.txt", "contents": "if s.is_null_terminated() then\ns._copy_to(_ptr._unsafe(), s._size + 1, 0, _size)\nelse\ns._copy_to(_ptr._unsafe(), s._size, 0, _size)\nend\n_size = len\nconsume this\n\nfun add(that: String box): String iso^ =>\n\"\"\"\nReturn a string that is a concatenation of this and that.\n\"\"\"\nlet len = _size + that._size\nlet s = recover String(len) end\n(consume s)._append(this)._append(that)\n\nfun join(data: Iterator[Stringable]): String iso^ =>\n\"\"\"\nReturn a string that is a concatenation of the strings in data, using this\nas a separator."} +{"id": "Pony/src-builtin-array-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/src-builtin-disposable_actor-_0.txt", "contents": "\n\n\n\n\n\n\ndisposable_actor.pony\n\n1\n2\n3\n4\n5interface tag DisposableActor\n\"\"\"\nAn interface used to asynchronously dispose of an actor.\n\"\"\"\nbe dispose()\n\n"} +{"id": "Pony/src-builtin-float-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/collections-HashSet-_15.txt", "contents": "that: this->HashSet[A, H] ref)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6\n\nthat: this->HashSet[A, H] ref\n\nReturns\u00b6\n\nHashSet[this->A!, K] ref^\n\n\nclone[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nCreate a clone. The element type may be different due to aliasing and\nviewpoint adaptation.\nfun box clone[optional K: HashFunction[this->A!] val]()\n: HashSet[this->A!, K] ref^\n\nReturns\u00b6"} +{"id": "Pony/pony_check-Property3-_5.txt", "contents": "\n\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nparams\u00b6\n[Source]\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val"} +{"id": "Pony/src-builtin-real-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-I64-_1.txt", "contents": "new val create(\nvalue: I64 val)\n: I64 val^\n\nParameters\u00b6\n\nvalue: I64 val\n\nReturns\u00b6\n\nI64 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/net-OSSockOpt-_17.txt", "contents": "fun box ipproto_eon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_esp\u00b6\n[Source]\nfun box ipproto_esp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_etherip\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_46.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/src-time-timers-_10.txt", "contents": "owner: AsioEventNotify,\nfd: U32,\nflags: U32,\nnsec: U64,\nnoisy: Bool)\nuse @pony_asio_event_setnsec[U32](event: AsioEventID, nsec: U64)\nuse @pony_asio_event_unsubscribe[None](event: AsioEventID)\nuse @pony_asio_event_destroy[None](event: AsioEventID)\n\nactor Timers is AsioEventNotify\n\"\"\"\nA hierarchical set of timing wheels.\n\"\"\"\nvar _current: U64 = 0\nlet _slop: USize\nembed _map: MapIs[Timer tag, Timer] = MapIs[Timer tag, Timer]\nembed _wheel: Array[_TimingWheel] = Array[_TimingWheel](_wheels())\nembed _pending: List[Timer] = List[Timer]\nvar _event: AsioEventID = AsioEvent.none()\n"} +{"id": "Pony/src-builtin-signed-_68.txt", "contents": "\nfun bswap(): ILong =>\nifdef ilp32 or llp64 then\n@\"llvm.bswap.i32\"(this.u32()).ilong()\nelse\n@\"llvm.bswap.i64\"(this.u64()).ilong()\nend\n\nfun popcount(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.ctpop.i32\"(this.u32()).ulong()\nelse\n@\"llvm.ctpop.i64\"(this.u64()).ulong()\nend\n\nfun clz(): ULong =>\nifdef ilp32 or llp64 then\n@\"llvm.ctlz.i32\"(this.u32(), false).ulong()\nelse\n@\"llvm.ctlz.i64\"(this.u64(), false).ulong()"} +{"id": "Pony/src-pony_check-generator-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/net-OSSockOpt-_409.txt", "contents": "fun box sctp_mobility_fasthandoff()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_mobility_prim_deleted\u00b6\n[Source]\nfun box sctp_mobility_prim_deleted()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_nagle_logging_enable\u00b6\n[Source]"} +{"id": "Pony/builtin-Seq-_6.txt", "contents": "pop\u00b6\n[Source]\nRemoves an element from the end of the sequence.\nfun ref pop()\n: A^ ?\n\nReturns\u00b6\n\nA^ ?\n\n\nunshift\u00b6\n[Source]\nAdds an element to the beginning of the sequence.\nfun ref unshift(\nvalue: A)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-ILong-_18.txt", "contents": "\n(ILong val , Bool val)\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: ILong val)\n: (ILong val , Bool val)\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\n(ILong val , Bool val)\n\n\nadd_partial\u00b6"} +{"id": "Pony/net-OSSockOpt-_93.txt", "contents": "fun box icmp_address()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_addressreply\u00b6\n[Source]\nfun box icmp_addressreply()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_dest_unreach\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_543.txt", "contents": "fun box tcpf_ca_recovery()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_ecn\u00b6\n[Source]\nfun box tcpi_opt_ecn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpi_opt_ecn_seen\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_25.txt", "contents": "\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nU8 val ?\n\n\nupdate\u00b6\n[Source]\nChange the i-th byte. Raise an error if the index is out of bounds.\nfun ref update(\ni: USize val,\nvalue: U8 val)\n: U8 val ?\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-Integer-_40.txt", "contents": "y: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val"} +{"id": "Pony/builtin-U8-_7.txt", "contents": "\nU8 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/builtin-USize-_5.txt", "contents": "\nUSize val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\npopcount\u00b6\n[Source]\nfun box popcount()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-itertools-iter-_55.txt", "contents": "### Example\n```pony\nlet xs = [as I64: 1; 2].values()\nlet ys = [as I64: 3; 4].values()\n\nIter[I64].chain([xs; ys].values())\n```\n`1 2 3 4`\n\"\"\"\n_iter =\nobject\nvar inner_iterator: (Iterator[A] | None) = None\n\nfun ref has_next(): Bool =>\nif inner_iterator isnt None then\ntry\nlet iter = inner_iterator as Iterator[A]\nif iter.has_next() then\nreturn true\nend"} +{"id": "Pony/builtin-AsioEvent-_5.txt", "contents": "[Source]\nfun box dispose()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nread\u00b6\n[Source]\nfun box read()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nwrite\u00b6"} +{"id": "Pony/src-collections-list-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/pony_test-UnitTest-_3.txt", "contents": "There is no need for this function to call complete(false).\ntear_down() will still be called after this completes.\nThe default is to do nothing.\nfun ref timed_out(\nh: TestHelper val)\n: None val\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val\n\n\nset_up\u00b6\n[Source]\nSet up the testing environment before a test method is called.\nDefault is to do nothing."} +{"id": "Pony/net-TCPListener-_1.txt", "contents": "=>\nconn.write(String.from_array(consume data))\ntrue\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nclass MyTCPListenNotify is TCPListenNotify\nfun ref connected(listen: TCPListener ref): TCPConnectionNotify iso^ =>\nMyTCPConnectionNotify\n\nfun ref not_listening(listen: TCPListener ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>\nTCPListener(TCPListenAuth(env.root),\nrecover MyTCPListenNotify end, \"\", \"8989\")\n\nactor tag TCPListener is"} +{"id": "Pony/src-builtin-real-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/net-OSSockOpt-_224.txt", "contents": "fun box ip_onesbcast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_options\u00b6\n[Source]\nfun box ip_options()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_origdstaddr\u00b6\n[Source]"} +{"id": "Pony/builtin-U128-_63.txt", "contents": "U32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-USize-_4.txt", "contents": "\nUSize val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-net-ossockopt-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-files-path-_36.txt", "contents": "s.append(\"..\")\nend\ns.push(c)\nstate = _PathOther\nend\n\ni = i + 1\nend\nend\n\nmatch state\n| _PathDot2 =>\nif backtrack == -1 then\ns.append(\"..\")\nelse\ns.delete(backtrack, -1)\nend\nend\n\ntry"} +{"id": "Pony/src-net-tcp_listener-_14.txt", "contents": "\"\"\"\nListens for new network connections.\n\nThe following program creates an echo server that listens for\nconnections on port 8989 and echoes back any data it receives.\n\n```pony\nuse \"net\"\n\nclass MyTCPConnectionNotify is TCPConnectionNotify\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8] iso,\ntimes: USize)\n: Bool\n=>\nconn.write(String.from_array(consume data))\ntrue\n\nfun ref connect_failed(conn: TCPConnection ref) =>"} +{"id": "Pony/debug-DebugErr-_1.txt", "contents": "\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: DebugErr val)\n: Bool val\n\nParameters\u00b6\n\nthat: DebugErr val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]"} +{"id": "Pony/itertools-Iter-_15.txt", "contents": "Iter[USize]([as USize: 1; 1; 2; 3; 3; 2; 2].values())\n.dedup()\n\n1 2 3 2\nfun ref dedup[optional H: HashFunction[A] val]()\n: Iter[A!] ref^\n\nReturns\u00b6\n\nIter[A!] ref^\n\n\nenum[optional B: (Real[B] val & (I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val))]\u00b6\n[Source]\nAn iterator which yields the current iteration count as well as the next\nvalue from the iterator.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.enum()\n"} +{"id": "Pony/builtin-SignedInteger-_16.txt", "contents": "A\n\n\nfld_unsafe\u00b6\n[Source]\nfun box fld_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmod_unsafe\u00b6\n[Source]"} +{"id": "Pony/serialisation_11.txt", "contents": "\nfun _serialise_space(): USize =>\n@serialise_space(_cstr)\n\nfun _serialise(bytes: Pointer[U8] tag) =>\n@serialise(bytes, _cstr)\n\nfun ref _deserialise(bytes: Pointer[U8] tag) =>\n_cstr = @deserialise(bytes)\n\nfun print() =>\n@printf(_cstr)\n\nactor Main\nnew create(env: Env) =>\nlet csw = CStringWrapper(@get_string())\ncsw.print()\ntry\nlet serialise = SerialiseAuth(env.root)\nlet deserialise = DeserialiseAuth(env.root)"} +{"id": "Pony/pony_test-TestHelper-_10.txt", "contents": "msg: String val = \"\",\nloc: SourceLoc val = __loc)\n: Bool val\n\nParameters\u00b6\n\nnot_expect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_ne[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the 2 given expressions are not equal.\nfun box assert_ne[A: (Equatable[A] #read & Stringable #read)]("} +{"id": "Pony/collections-persistent-MapPairs-_1.txt", "contents": "m: HashMap[K, V, H] val\n\nReturns\u00b6\n\nMapPairs[K, V, H] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nfun box has_next()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nnext\u00b6\n[Source]"} +{"id": "Pony/builtin-String-_23.txt", "contents": "Return true if the string is null-terminated and safe to pass to an FFI\nfunction that doesn't accept a size argument, expecting a null-terminator.\nThis method checks that there is a null byte just after the final position\nof populated bytes in the string, but does not check for other null bytes\nwhich may be present earlier in the content of the string.\nIf you need a null-terminated copy of this string, use the clone method.\nfun box is_null_terminated()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nutf32\u00b6\n[Source]\nReturn a UTF32 representation of the character at the given offset and the\nnumber of bytes needed to encode that character. If the offset does not\npoint to the beginning of a valid UTF8 encoding, return 0xFFFD (the unicode\nreplacement character) and a length of one. Raise an error if the offset is"} +{"id": "Pony/builtin-I32-_23.txt", "contents": "(I32 val , I32 val) ?\n\n\nfld_partial\u00b6\n[Source]\nfun box fld_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\nmod_partial\u00b6\n[Source]"} +{"id": "Pony/collections-List-_31.txt", "contents": "List[this->A!] ref^\n\n\nfold[B: B]\u00b6\n[Source]\nFolds the elements of the List using the supplied function.\nOn the first iteration, the B argument in f is the value acc,\non the second iteration B is the result of the first iteration,\non the third iteration B is the result of the second iteration, and so on.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet folded = my_list.fold[String]( {(str: String, s: String): String => str + s }, \"z\") // \"zabc\"\n\nfun box fold[B: B](\nf: {(B!, this->A!): B^}[A, B] box,\nacc: B)\n: B\n\nParameters\u00b6\n\nf: {(B!, this->A!): B^}[A, B] box"} +{"id": "Pony/pony_check-Randomness-_11.txt", "contents": "fun ref i32(\nmin: I32 val = call,\nmax: I32 val = call)\n: I32 val\n\nParameters\u00b6\n\nmin: I32 val = call\nmax: I32 val = call\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nGenerate a I64 in closed interval [min, max]\n(default: [min_value, max_value]).\nBehavior is undefined if min > max."} +{"id": "Pony/builtin--index-_0.txt", "contents": "\n\n\n\n\n\n\nBuiltin package\u00b6\nThe builtin package is home to the following standard library members:\n\nTypes the compiler needs to know exist, such as None.\nTypes with \"magic\" internal workings that must be supplied directly by the\ncompiler, such as U32.\nAny types needed by others in builtin.\n\nThe public types that are defined in this package will always be in scope for\nevery Pony source file. For details on specific packages, see their individual\nentity entries.\nPublic Types\u00b6\n"} +{"id": "Pony/files-FilePath-_9.txt", "contents": "[Source]\nRemove the file or directory. The directory contents will be removed as\nwell, recursively. Symlinks will be removed but not traversed.\nfun val remove()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nrename\u00b6\n[Source]\nRename a file or directory.\nfun box rename(\nnew_path: FilePath val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/derived-authority_1.txt", "contents": "new iso create(out: OutStream) =>\n_out = out\n\nfun ref connected(conn: TCPConnection ref) =>\n_out.print(\"connected\")\nconn.close()\n\nfun ref connect_failed(conn: TCPConnection ref) =>\n_out.print(\"connect_failed\")\n\nactor Connect\nnew create(out: OutStream, auth: TCPConnectAuth) =>\nTCPConnection(auth, MyTCPConnectionNotify(out), \"example.com\", \"80\")\n\nactor Main\nnew create(env: Env) =>\nConnect(env.out, TCPConnectAuth(env.root))\n```\n\nThe `Main` actor authorizes the `Connect` actor by passing a `TCPConnectAuth` token created from the ambient authority token in `env.root`. The ambient authority token is unforgeable since the `AmbientAuth` constructor is private and the only existing instance is provided by the runtime itself."} +{"id": "Pony/src-capsicum-cap_rights-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-encode-base64-base64-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/net-OSSockOpt-_525.txt", "contents": "fun box so_setfib()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndbuf\u00b6\n[Source]\nfun box so_sndbuf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_sndbufforce\u00b6\n[Source]"} +{"id": "Pony/net-TCPListenAuth-_1.txt", "contents": "from: (AmbientAuth val | NetAuth val | TCPAuth val)\n\nReturns\u00b6\n\nTCPListenAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: TCPListenAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: TCPListenAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-BinaryHeap-_0.txt", "contents": "\n\n\n\n\n\n\nBinaryHeap[A: Comparable[A] #read, P: (_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))]\u00b6\n[Source]\nA priority queue implemented as a binary heap. The BinaryHeapPriority type\nparameter determines whether this is max-heap or a min-heap.\nclass ref BinaryHeap[A: Comparable[A] #read, P: (_BinaryHeapPriority[A] val & (MinHeapPriority[A] val | MaxHeapPriority[A] val))]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate an empty heap with space for len elements.\nnew ref create(\nlen: USize val)\n: BinaryHeap[A, P] ref^"} +{"id": "Pony/3_arithmetic_8.txt", "contents": "## Partial and Checked Arithmetic\n\nIf overflow or division by zero are cases that need to be avoided and performance is no critical priority, partial or checked arithmetic offer great safety during runtime. Partial arithmetic operators error on overflow/underflow and division by zero. Checked arithmetic methods return a tuple of the result of the operation and a `Boolean` indicating overflow or other exceptional behaviour.\n\n```pony\n// partial arithmetic\nlet result =\ntry\nUSize.max_value() +? env.args.size()\nelse\nenv.out.print(\"overflow detected\")\nend\n\n// checked arithmetic\nlet result =\nmatch USize.max_value().addc(env.args.size())\n| (let result: USize, false) =>\n// use result\n...\n| (_, true) =>"} +{"id": "Pony/collections-List-_35.txt", "contents": "\nReturns\u00b6\n\n(List[this->A!] ref^ , List[this->A!] ref^)\n\n\ndrop\u00b6\n[Source]\nBuilds a List by dropping the first n elements.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.drop(1) // [\"b\"; \"c\"]\n\nfun box drop(\nn: USize val)\n: List[this->A!] ref^\n\nParameters\u00b6\n\nn: USize val\n"} +{"id": "Pony/pony_check-ASCIIRange-_0.txt", "contents": "\n\n\n\n\n\n\nASCIIRange\u00b6\n[Source]\ntype ASCIIRange is\n(ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val | ASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val | ASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val | ASCIIAll val | ASCIIAllWithNUL val)\n\nType Alias For\u00b6\n\n(ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val | ASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val | ASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val | ASCIIAll val | ASCIIAllWithNUL val)\n\n\n\n\n"} +{"id": "Pony/promises--index-_4.txt", "contents": "promise.next[Array[String] val](recover Computation~string_to_strings() end)\n.next[Array[USize] val](recover Computation~strings_to_sizes() end)\n.next[USize](recover Computation~sizes_to_avg() end)\n.next[None](recover Computation~output(env) end)\npromise(\" \".join(env.args.slice(1).values()))\n\nPublic Types\u00b6\n\ninterface Fulfill\nclass FulfillIdentity\nactor Promise\nprimitive Promises\ninterface Reject\nclass RejectAlways\n\n\n\n\n\n"} +{"id": "Pony/pony_check-Property2-_1.txt", "contents": "The Generator for the first argument to your property2.\nfun box gen1()\n: Generator[T1] box\n\nReturns\u00b6\n\nGenerator[T1] box\n\n\ngen2\u00b6\n[Source]\nThe Generator for the second argument to your property2.\nfun box gen2()\n: Generator[T2] box\n\nReturns\u00b6\n\nGenerator[T2] box\n\n"} +{"id": "Pony/src-builtin-signed-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/builtin-FloatingPoint-_3.txt", "contents": "F64 val) & Real[B] val)](\na: B)\n: Real[A] val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: Real[A] val^\n\nReturns\u00b6\n"} +{"id": "Pony/cli-Arg-_3.txt", "contents": "Returns\u00b6\n\nString val\n\n\ni64\u00b6\n[Source]\nReturns the arg value as an I64, defaulting to 0.\nfun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nu64\u00b6\n[Source]\nReturns the arg value as an U64, defaulting to 0.\nfun box u64()"} +{"id": "Pony/6_type-aliases_2.txt", "contents": "\n```pony\nprimitive Red fun apply(): U32 => 0xFF0000FF\nprimitive Green fun apply(): U32 => 0x00FF00FF\nprimitive Blue fun apply(): U32 => 0x0000FFFF\n\ntype Colour is (Red | Blue | Green)\n```\n\nor namespace them like this\n\n```pony\nprimitive Colours\nfun red(): U32 => 0xFF0000FF\nfun green(): U32 => 0x00FF00FF\n```\n\nYou might also want to iterate over the enumeration items like this to print their value for debugging purposes\n\n```pony"} +{"id": "Pony/capsicum-Cap-_9.txt", "contents": "fun box creat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfexecve\u00b6\n[Source]\nfun box fexecve()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nfsync\u00b6\n[Source]"} +{"id": "Pony/builtin-Integer-_39.txt", "contents": "\n\nmin\u00b6\n[Source]\nfun box min(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmax\u00b6\n[Source]\nfun box max("} +{"id": "Pony/pony_check-Property4UnitTest-_4.txt", "contents": "\nNone val\n\n\nset_up\u00b6\nfun ref set_up(\nh: TestHelper val)\n: None val ?\n\nParameters\u00b6\n\nh: TestHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\ntear_down\u00b6\nfun ref tear_down("} +{"id": "Pony/src-collections-persistent-list-_36.txt", "contents": "\nfun head(): val->A ? =>\n\"\"\"\nReturns an error, since Nil has no head.\n\"\"\"\nerror\n\nfun tail(): List[A] ? =>\n\"\"\"\nReturns an error, since Nil has no tail.\n\"\"\"\nerror\n\nfun reverse(): Nil[A] =>\n\"\"\"\nThe reverse of the empty list is the empty list.\n\"\"\"\nthis\n\nfun prepend(a: val->A!): Cons[A] =>"} +{"id": "Pony/src-files-directory-_38.txt", "contents": "let path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\nvar offset: ISize = 0\n\nrepeat\nlet element = try\noffset = target.find(Path.sep(), offset)? + 1\ntarget.substring(0, offset - 1)\nelse\noffset = -1\ntarget\nend\n\n@mkdirat(_fd, element.cstring(), U32(0x1FF))\nuntil offset < 0 end\n\nFileInfo(path')?.directory\nelse\npath'.mkdir()"} +{"id": "Pony/src-buffered-reader-_44.txt", "contents": "\"\"\"\n_chunks.clear()\n_available = 0\n\nfun ref append(data: ByteSeq) =>\n\"\"\"\nAdd a chunk of data.\n\"\"\"\nlet data_array =\nmatch data\n| let data': Array[U8] val => data'\n| let data': String => data'.array()\nend\n\n_available = _available + data_array.size()\n_chunks.push((data_array, 0))\n\nfun ref skip(n: USize) ? =>\n\"\"\"\nSkip n bytes."} +{"id": "Pony/src-builtin-unsigned-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-I16-_6.txt", "contents": "\nU16 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U16 val"} +{"id": "Pony/net-OSSockOpt-_102.txt", "contents": "fun box icmp_net_unreach()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_net_unr_tos\u00b6\n[Source]\nfun box icmp_net_unr_tos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_parameterprob\u00b6\n[Source]"} +{"id": "Pony/src-builtin-float-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-ISize-_59.txt", "contents": "\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/collections-persistent-Vec-_7.txt", "contents": "Vec[A] val\n\n\npop\u00b6\n[Source]\nReturn a vector with the value at the end removed.\nfun val pop()\n: Vec[A] val ?\n\nReturns\u00b6\n\nVec[A] val ?\n\n\nconcat\u00b6\n[Source]\nReturn a vector with the values of the given iterator added to the end.\nfun val concat(\niter: Iterator[val->A] ref)\n: Vec[A] val"} +{"id": "Pony/builtin-ULong-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I128-_26.txt", "contents": "fun box divc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/collections-HashByteSeq-_4.txt", "contents": "[Source]\nfun box ne(\nthat: HashByteSeq val)\n: Bool val\n\nParameters\u00b6\n\nthat: HashByteSeq val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-_process-_29.txt", "contents": "end\n\nclass val Signaled is (Stringable & Equatable[ProcessExitStatus])\n\"\"\"\nProcess exit status: Process was terminated by a signal.\n\"\"\"\nlet _signal: U32\n\nnew val create(sig: U32) =>\n_signal = sig\n\nfun signal(): U32 =>\n\"\"\"\nRetrieve the signal number that exited the process.\n\"\"\"\n_signal\n\nfun string(): String iso^ =>\nrecover iso\nString(12)"} +{"id": "Pony/src-net-tcp_connection-_92.txt", "contents": "_pending_writev_posix\n.> push((bytes.cpointer(), bytes.size()))\n_pending_writev_total = _pending_writev_total + bytes.size()\nend\n\n_pending_writes()\nend\n\n_in_sent = false\nend\n\nbe mute() =>\n\"\"\"\nTemporarily suspend reading off this TCPConnection until such time as\n`unmute` is called.\n\"\"\"\n_muted = true\n\nbe unmute() =>\n\"\"\""} +{"id": "Pony/src-builtin-unsigned-_36.txt", "contents": "712\n713\n714\n715\n716\n717\n718\n719\n720\n721\n722\n723\n724\n725\n726\n727\n728\n729\n730\n731"} +{"id": "Pony/net-OSSockOpt-_72.txt", "contents": "fun box sol_sco()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_socket\u00b6\n[Source]\nfun box sol_socket()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_tipc\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_1.txt", "contents": "new val create(\nvalue: I32 val)\n: I32 val^\n\nParameters\u00b6\n\nvalue: I32 val\n\nReturns\u00b6\n\nI32 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/src-builtin-string-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/files-FileWrite-_1.txt", "contents": "\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nfun box value()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: FileWrite val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/reference-capabilities_8.txt", "contents": "# Type qualifiers\n\nIf you've used C/C++, you may be familiar with `const`, which is a _type qualifier_ that tells the compiler not to allow the programmer to _mutate_ something.\n\nA reference capability is a form of _type qualifier_ and provides a lot more guarantees than `const` does!\n\nIn Pony, every use of a type has a reference capability. These capabilities apply to variables, rather than to the type as a whole. In other words, when you define a class `Wombat`, you don't pick a reference capability for all instances of the class. Instead, `Wombat` variables each have their own reference capability.\n\nAs an example, in some languages, you have to define a type that represents a mutable `String` and another type that represents an immutable `String`. For example, in Java, there is a `String` and a `StringBuilder`. In Pony, you can define a single class `String` and have some variables that are `String ref` (which are mutable) and other variables that are `String val` (which are immutable).\n"} +{"id": "Pony/net-OSSockOpt-_294.txt", "contents": "fun box rds_cmsg_cong_update()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_masked_atomic_cswp\u00b6\n[Source]\nfun box rds_cmsg_masked_atomic_cswp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cmsg_masked_atomic_fadd\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_43.txt", "contents": "852\n853\n854\n855\n856\n857\n858\n859\n860\n861\n862\n863\n864\n865\n866\n867\n868\n869\n870\n871"} +{"id": "Pony/net-TCPConnection-_5.txt", "contents": "new create(env: Env) =>\nlet c_auth = TCPConnectAuth(env.root)\nlet bp_auth = ApplyReleaseBackpressureAuth(env.root)\nlet socket = TCPConnection(c_auth,\nrecover SlowDown(bp_auth, env.out) end, \"\", \"7669\")\n\nOr if you want, you could handle backpressure by shedding load, that is,\ndropping the extra data rather than carrying out the send. This might look\nlike:\nuse \"net\"\n\nclass ThrowItAway is TCPConnectionNotify\nvar _throttled: Bool = false\n\nfun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>\nif not _throttled then\ndata\nelse\n\"\"\nend"} +{"id": "Pony/builtin-ArrayPairs-_2.txt", "contents": "\nBool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: (USize val , B->A) ?\n\nReturns\u00b6\n\n(USize val , B->A) ?\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-persistent-list-_30.txt", "contents": "# Usage\n\n```pony\nuse \"collections/persistent\"\n\nactor Main\nnew create(env: Env) =>\ntry\nlet l1 = Lists[U32]([2; 4; 6; 8]) // List(2, 4, 6, 8)\n\nlet empty = Lists[U32].empty() // List()\n\n// prepend() returns a new List, leaving the\n// old list unchanged\nlet l2 = empty.prepend(3) // List(3)\nlet l3 = l2.prepend(2) // List(2, 3)\nlet l4 = l3.prepend(1) // List(1, 2, 3)\nlet l4_head = l4.head() // 1\nlet l4_tail = l4.tail() // List(2, 3)\n"} +{"id": "Pony/src-capsicum-cap-_10.txt", "contents": "fun getsockopt(): U64 => _id(0, 1 << 34)\nfun listen(): U64 => _id(0, 1 << 35)\nfun peeloff(): U64 => _id(0, 1 << 36)\nfun recv(): U64 => read()\nfun send(): U64 => write()\nfun setsockopt(): U64 => _id(0, 1 << 37)\nfun shutdown(): U64 => _id(0, 1 << 38)\nfun bindat(): U64 => _id(0, 1 << 39) or lookup()\nfun connectat(): U64 => _id(0, 1 << 40) or lookup()\n\nfun sock_client(): U64 =>\nconnect() or getpeername() or getsockname() or getsockopt() or peeloff() or\nrecv() or send() or setsockopt() or shutdown()\n\nfun sock_server(): U64 =>\naccept() or bind() or getpeername() or getsockname() or getsockopt() or\nlisten() or peeloff() or recv() or send() or setsockopt() or shutdown()\n\nfun mac_get(): U64 => _id(1, 1 << 0)\nfun mac_set(): U64 => _id(1, 1 << 1)"} +{"id": "Pony/builtin-ILong-_59.txt", "contents": "\nU32 val\n\n\nu64_unsafe\u00b6\n[Source]\nfun box u64_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128_unsafe\u00b6\n[Source]\nfun box u128_unsafe()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_539.txt", "contents": "fun box tcpci_opt_ecn()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_opt_sack\u00b6\n[Source]\nfun box tcpci_opt_sack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpci_opt_timestamps\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_10.txt", "contents": "fun box fsync()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nftruncate\u00b6\n[Source]\nfun box ftruncate()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nlookup\u00b6\n[Source]"} +{"id": "Pony/ini-IniNotify-_3.txt", "contents": "Parameters\u00b6\n\nline: USize val\nerr: (IniIncompleteSection val | IniNoDelimiter val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I32-_38.txt", "contents": "I32 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/src-files-file_path-_10.txt", "contents": "192\n193\n194\n195\n196\n197\n198\n199\n200\n201\n202\n203\n204\n205\n206\n207\n208\n209\n210\n211"} +{"id": "Pony/builtin-I128-_24.txt", "contents": "\ny: I128 val\n\nReturns\u00b6\n\n(I128 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6\n\ny: I128 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_597.txt", "contents": "fun box tipc_addr_name()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_addr_nameseq\u00b6\n[Source]\nfun box tipc_addr_nameseq()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_cfg_srv\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_161.txt", "contents": "fun box ipv6_priority_reserved2()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_unattended\u00b6\n[Source]\nfun box ipv6_priority_unattended()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_priority_uncharacterized\u00b6\n[Source]"} +{"id": "Pony/src-promises-promise-_23.txt", "contents": "f(value)\nend\n\n_list.clear()\n\nbe reject() =>\n\"\"\"\nReject the promise.\n\"\"\"\nif _value isnt _Pending then\nreturn\nend\n\n_value = _Reject\n\nfor f in _list.values() do\nf.reject()\nend\n\n_list.clear()"} +{"id": "Pony/src-builtin-pointer-_7.txt", "contents": "functions on a Pointer[A] are private to maintain memory safety.\n\"\"\"\nnew create() =>\n\"\"\"\nA null pointer.\n\"\"\"\ncompile_intrinsic\n\nnew _alloc(len: USize) =>\n\"\"\"\nSpace for len instances of A.\n\"\"\"\ncompile_intrinsic\n\nfun ref _realloc(len: USize, copy: USize): Pointer[A] =>\n\"\"\"\nKeep the contents, but reserve space for len instances of A.\n\"\"\"\ncompile_intrinsic\n"} +{"id": "Pony/src-net-ossockopt-_22.txt", "contents": "432\n433\n434\n435\n436\n437\n438\n439\n440\n441\n442\n443\n444\n445\n446\n447\n448\n449\n450\n451"} +{"id": "Pony/src-builtin-real-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-net-tcp_connection-_109.txt", "contents": "end\nend\n\nifdef windows then\n// do a trim in place instead of many shifts for efficiency\n_pending_writev_windows.trim_in_place(num_sent)\n_pending_sent = _pending_sent - num_sent\nelse\n// do a trim in place instead of many shifts for efficiency\n_pending_writev_posix.trim_in_place(num_sent)\nend\n\nifdef not windows then\n_apply_backpressure()\nend\nelse\n// sent all data we requested in this batch\n_pending_writev_total = _pending_writev_total - bytes_to_send\nif _pending_writev_total == 0 then\nifdef windows then"} +{"id": "Pony/src-files-path-_46.txt", "contents": "path\nend\n\nfun ext(path: String): String =>\n\"\"\"\nReturn the file extension, i.e. the part after the last dot as long as that\ndot is after all separators. Return an empty string for no extension.\n\"\"\"\ntry\nlet i = path.rfind(\".\")?\n\nlet j = try\npath.rfind(sep())?\nelse\ni\nend\n\nif i >= j then\nreturn path.trim(i.usize() + 1)\nend"} +{"id": "Pony/builtin-USize-_59.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/3_arithmetic_13.txt", "contents": "| `>=~` | `ge_unsafe()` |\n| `=~` | `eq_unsafe()` |\n| `!=~` | `ne_unsafe()` |\n\n---\n\nAdditionally `sqrt_unsafe()` is undefined for negative values.\n"} +{"id": "Pony/src-builtin-string-_155.txt", "contents": "that: String box,\nn: USize,\noffset: ISize = 0,\nthat_offset: ISize = 0,\nignore_case: Bool = false)\n: Compare\n=>\n\"\"\"\nLexically compare at most `n` bytes of the substring of `this` starting at\n`offset` with the substring of `that` starting at `that_offset`. The\ncomparison is case sensitive unless `ignore_case` is `true`.\n\nIf the substring of `this` is a proper prefix of the substring of `that`,\nthen `this` is `Less` than `that`. Likewise, if `that` is a proper prefix of\n`this`, then `this` is `Greater` than `that`.\n\nBoth `offset` and `that_offset` can be negative, in which case the offsets\nare computed from the end of the string.\n\nIf `n + offset` is greater than the length of `this`, or `n + that_offset`"} +{"id": "Pony/net-OSSockOpt-_454.txt", "contents": "fun box sctp_sat_network_min()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_sb_logging_enable\u00b6\n[Source]\nfun box sctp_sb_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_selective_ack\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/net-OSSockOpt-_250.txt", "contents": "fun box max_tcpoptlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_block_source\u00b6\n[Source]\nfun box mcast_block_source()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_exclude\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_38.txt", "contents": "fun box op_not()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-persistent-list-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/src-collections-range-_8.txt", "contents": "```\n\nIf `inc` is nonzero, but cannot produce progress towards `max` because of its sign, the `Range` is considered empty and will not produce any iterations. The `Range` is also empty if either `min` equals `max`, independent of the value of `inc`, or if `inc` is zero.\n\n```pony\nlet empty_range1 = Range(0, 10, -1)\nlet empty_range2 = Range(0, 10, 0)\nlet empty_range3 = Range(10, 10)\nempty_range1.is_empty() == true\nempty_range2.is_empty() == true\nempty_range3.is_empty() == true\n```\n\nNote that when using unsigned integers, a negative literal wraps around so while `Range[ISize](0, 10, -1)` is empty as above, `Range[USize](0, 10, -1)` produces a single value of `min` or `[0]` here.\n\nWhen using `Range` with floating point types (`F32` and `F64`) `inc` steps < 1.0 are possible. If any arguments contains NaN, the `Range` is considered empty. It is also empty if the lower bound `min` or the step `inc` are +Inf or -Inf. However, if only the upper bound `max` is +Inf or -Inf and the step parameter `inc` has the same sign, then the `Range` is considered infinite and will iterate indefinitely.\n\n```pony\nlet p_inf: F64 = F64.max_value() + F64.max_value()\nlet n_inf: F64 = -p_inf"} +{"id": "Pony/builtin-I8-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: I8 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nI8 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: I8 val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-path-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/signals-Sig-_12.txt", "contents": "Returns\u00b6\n\nU32 val\n\n\nttou\u00b6\n[Source]\nfun box ttou()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nio\u00b6\n[Source]\nfun box io()\n: U32 val\n"} +{"id": "Pony/files-Path-_19.txt", "contents": ": Bool val\n\nParameters\u00b6\n\nthat: Path val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: Path val)\n: Bool val\n\nParameters\u00b6\n\nthat: Path val"} +{"id": "Pony/builtin-String-_63.txt", "contents": ": (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: String box\nn: USize val\noffset: ISize val = 0\nthat_offset: ISize val = 0\nignore_case: Bool val = false\n\nReturns\u00b6\n\n(Less val | Equal val | Greater val)\n\n\neq\u00b6\n[Source]\nReturns true if the two strings have the same contents.\nfun box eq(\nthat: String box)"} +{"id": "Pony/files-FileRead-_0.txt", "contents": "\n\n\n\n\n\n\nFileRead\u00b6\n[Source]\nprimitive val FileRead\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileRead val^\n\nReturns\u00b6\n\nFileRead val^"} +{"id": "Pony/src-pony_bench-benchmark-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-files-path-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/combining-capabilities_8.txt", "contents": "## Reading from a `box` variable\n\nA `box` variable is locally immutable. This means it's possible that it may be mutated through some other variable (a `trn` or a `ref`), but it's also possible that our `box` variable is an alias of some `val` variable.\n\nWhen we read a field, we need to return a reference capability that is compatible with the field but is also locally immutable.\n\nAn `iso` field is returned as a `tag` because no locally immutable reference capability can maintain its isolation guarantees. A `val` field is returned as a `val` because global immutability is a stronger guarantee than local immutability. A `box` field makes the same local immutability guarantee as its origin, so that's also fine.\n\nFor `trn` and `ref` we need to return a locally immutable reference capability that doesn't violate any guarantees the field makes. In both cases, we can return `box`.\n"} +{"id": "Pony/src-collections-list_node-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/builtin-U8-_47.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]"} +{"id": "Pony/pony_bench-OverheadBenchmark-_1.txt", "contents": "[Source]\nnew iso create()\n: OverheadBenchmark iso^\n\nReturns\u00b6\n\nOverheadBenchmark iso^\n\n\nPublic Functions\u00b6\nname\u00b6\n[Source]\nfun box name()\n: String val\n\nReturns\u00b6\n\nString val\n\n"} +{"id": "Pony/process-UnknownError-_0.txt", "contents": "\n\n\n\n\n\n\nUnknownError\u00b6\n[Source]\nprimitive val UnknownError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: UnknownError val^\n\nReturns\u00b6\n\nUnknownError val^"} +{"id": "Pony/collections-Range-_3.txt", "contents": "I64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val))] is\nIterator[A] ref\n\nImplements\u00b6\n\nIterator[A] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\nmin: A,\nmax: A,\ninc: A = 1)\n: Range[A] ref^"} +{"id": "Pony/src-net-tcp_listener-_24.txt", "contents": "// Something other than EWOULDBLOCK, try again.\nNone\n| 0 =>\n// EWOULDBLOCK, don't try again.\nreturn\nelse\n_spawn(fd)\nend\nend\n\n_paused = true\nend\n\nfun ref _spawn(ns: U32) =>\n\"\"\"\nSpawn a new connection.\n\"\"\"\ntry\nTCPConnection._accept(this, _notify.connected(this)?, ns,\n_read_buffer_size, _yield_after_reading, _yield_after_writing)"} +{"id": "Pony/error-messages_1.txt", "contents": "# left side must be something that can be assigned to\n\nSuppose you wrote:\n\n```pony\nactor Main\nlet x: I64 = 0\nnew create(env: Env) =>\nx = 12\n```\n\nThe error message would be:\n\n```error\nError:\n.../a.pony:6:5: can't assign to a let or embed definition more than once\nx = 12\n^\nError:\n.../a.pony:6:7: left side must be something that can be assigned to"} +{"id": "Pony/net-OSSockOpt-_64.txt", "contents": "fun box ipproto_wbexpak()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_wbmon\u00b6\n[Source]\nfun box ipproto_wbmon()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_wsn\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-test_helper-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/pony_check-Property2-_3.txt", "contents": "h: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\nproperty2\u00b6\n[Source]\nA method verifying that a certain property holds for all given\narg1 and arg2\nwith the help of PropertyHelper h.\nfun ref property2(\narg1: T1,\narg2: T2,\nh: PropertyHelper val)\n: None val ?\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_572.txt", "contents": "fun box tcp_fastopen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_function_blk\u00b6\n[Source]\nfun box tcp_function_blk()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_function_name_len_max\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_137.txt", "contents": "fun box ipv6_fl_f_reflect()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_f_remote\u00b6\n[Source]\nfun box ipv6_fl_f_remote()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_s_any\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_139.txt", "contents": "\"\"\"\nGenerator[String](\nobject is GenObj[String]\nfun generate(rnd: Randomness): GenerateResult[String] =>\nlet size = rnd.usize(min, max)\nlet gen_iter = Iter[U32^](gen.value_iter(rnd))\n.filter({(cp) =>\n// excluding surrogate pairs\n(cp <= 0xD7FF) or (cp >= 0xE000) })\n.take(size)\nlet s: String iso = recover String(size) end\nfor code_point in gen_iter do\ns.push_utf32(code_point)\nend\ns\n\nfun shrink(s: String): ValueAndShrink[String] =>\n\"\"\"\nStrip off codepoints from the end, not just bytes, so we\nmaintain a valid utf8 string."} +{"id": "Pony/src-builtin-string-_93.txt", "contents": "_alloc = alloc.max(_size.min(len.max_value() - 1))\n_ptr = str\nend\n\nnew from_cstring(str: Pointer[U8]) =>\n\"\"\"\nReturn a string from a pointer to a null-terminated cstring\nwithout making a copy. The data is not copied. This must be done\nonly with C-FFI functions that return pony_alloc'd character\narrays. The pointer is scanned for the first null byte, which will\nbe interpreted as the null terminator. Note that the scan is\nunbounded; the pointed to data must be null-terminated within\nthe allocated array to preserve memory safety. If a null pointer\nis given then an empty string is returned.\n\"\"\"\nif str.is_null() then\n_size = 0\n_alloc = 1\n_ptr = Pointer[U8]._alloc(_alloc)\n_set(0, 0)"} +{"id": "Pony/builtin-Integer-_8.txt", "contents": "(A , A)\n\n\nrem_unsafe\u00b6\n[Source]\nCalculates the remainder of this number divided by y.\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box rem_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA"} +{"id": "Pony/collections-List-_19.txt", "contents": ": None val\n\nParameters\u00b6\n\nthat: List[A] ref\n\nReturns\u00b6\n\nNone val\n\n\nprepend_list\u00b6\n[Source]\nEmpties the provided List by prepending all elements onto the receiving List.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.prepend_list(other_list) // my_list is [\"d\"; \"e\"; \"f\"; \"a\"; \"b\"; \"c\"], other_list is empty\n\nfun ref prepend_list(\nthat: List[A] ref)"} +{"id": "Pony/builtin-F64-_29.txt", "contents": "Returns\u00b6\n\nF64 val\n\n\nsinh\u00b6\n[Source]\nfun box sinh()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ntanh\u00b6\n[Source]\nfun box tanh()\n: F64 val\n"} +{"id": "Pony/random-MT-_11.txt", "contents": "fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nreal\u00b6\nfun ref real()\n: F64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_89.txt", "contents": "fun box dso_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_linkinfo\u00b6\n[Source]\nfun box dso_linkinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_max\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-vec-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299use mut = \"collections\"\n\nclass val Vec[A: Any #share]\n\"\"\"\nA persistent vector based on the Hash Array Mapped Trie from 'Ideal Hash\nTrees' by Phil Bagwell.\n\"\"\"\n\nlet _root: (_VecNode[A] | None)\nlet _tail: Array[A] val\nlet _size: USize\nlet _depth: USize\n"} +{"id": "Pony/net-OSSockOpt-_542.txt", "contents": "fun box tcpf_ca_loss()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpf_ca_open\u00b6\n[Source]\nfun box tcpf_ca_open()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpf_ca_recovery\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_57.txt", "contents": "\nif outer_iterator.has_next() then\ninner_iterator = outer_iterator.next()?\nreturn next()?\nend\n\nerror\nend\n\nnew repeat_value(value: A) =>\n\"\"\"\nCreate an iterator that returns the given value forever.\n"} +{"id": "Pony/src-process-process_error-_0.txt", "contents": "\n\n\n\n\n\n\nprocess_error.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/random-XorShift128Plus-_7.txt", "contents": "usize\u00b6\n[Source]\nfun ref usize()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\ni8\u00b6\n[Source]\nfun ref i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n"} +{"id": "Pony/builtin-ISize-_14.txt", "contents": "[Source]\nfun box subc(\ny: ISize val)\n: (ISize val , Bool val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: ISize val)\n: (ISize val , Bool val)\n"} +{"id": "Pony/builtin-U16-_36.txt", "contents": "fun box op_or(\ny: U16 val)\n: U16 val\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: U16 val)\n: U16 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_unit_test-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-persistent-list-_37.txt", "contents": "\"\"\"\nBuilds a new list with an element added to the front of this list.\n\"\"\"\nCons[A](consume a, this)\n\nfun concat(l: List[A]): List[A] =>\n\"\"\"\nThe concatenation of any list l with the empty list is l.\n\"\"\"\nl\n\nfun map[B](f: {(val->A): val->B} box): Nil[B] =>\n\"\"\"\nMapping a function from A to B over the empty list yields the\nempty list of Bs.\n\"\"\"\nNil[B]\n\nfun flat_map[B](f: {(val->A): List[B]} box): Nil[B] =>\n\"\"\""} +{"id": "Pony/builtin-U32-_65.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-files-file-_21.txt", "contents": "412\n413\n414\n415\n416\n417\n418\n419\n420\n421\n422\n423\n424\n425\n426\n427\n428\n429\n430\n431"} +{"id": "Pony/memory-allocation_1.txt", "contents": "# Fast, Safe and Cheap\n\n* An actor has ~240 bytes of memory overhead.\n* No locks. No context switches. All mutation is local.\n* An idle actor consumes no resources (other than memory).\n* You can have millions of actors at the same time.\n"} +{"id": "Pony/builtin-ISize-_0.txt", "contents": "\n\n\n\n\n\n\nISize\u00b6\n[Source]\nprimitive val ISize is\nSignedInteger[ISize val, USize val] val\n\nImplements\u00b6\n\nSignedInteger[ISize val, USize val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/builtin-USize-_13.txt", "contents": "(USize val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: USize val)\n: (USize val , Bool val)\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\n(USize val , Bool val)\n\n\nremc\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_51.txt", "contents": "1012\n1013\n1014\n1015\n1016\n1017\n1018\n1019\n1020\n1021\n1022\n1023\n1024\n1025\n1026\n1027\n1028\n1029\n1030\n1031"} +{"id": "Pony/src-builtin-float-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/net-OSSockOpt-_135.txt", "contents": "fun box ipv6_fl_a_put()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_a_renew\u00b6\n[Source]\nfun box ipv6_fl_a_renew()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_f_create\u00b6\n[Source]"} +{"id": "Pony/net-DNS-_7.txt", "contents": "host: String val)\n: Bool val\n\nParameters\u00b6\n\nhost: String val\n\nReturns\u00b6\n\nBool val\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: DNS val)\n: Bool val\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-string-_156.txt", "contents": "is greater than the length of `that`, then the number of positions compared\nwill be reduced to the length of the longest substring.\n\nNeeds to be made UTF-8 safe.\n\"\"\"\nvar j: USize = offset_to_index(offset)\nvar k: USize = that.offset_to_index(that_offset)\nvar i = n.min((_size - j).max(that._size - k))\n\nwhile i > 0 do\n// this and that are equal up to this point\nif j >= _size then\n// this is shorter\nreturn Less\nelseif k >= that._size then\n// that is shorter\nreturn Greater\nend\n\nlet c1 = _ptr._apply(j)"} +{"id": "Pony/4_traits-and-interfaces_0.txt", "contents": "# Traits and Interfaces\n\nLike other object-oriented languages, Pony has __subtyping__. That is, some types serve as _categories_ that other types can be members of.\n\nThere are two kinds of __subtyping__ in programming languages: __nominal__ and __structural__. They're subtly different, and most programming languages only have one or the other. Pony has both!\n"} +{"id": "Pony/net-OSSockOpt-_143.txt", "contents": "fun box ipv6_minhopcount()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_mtu\u00b6\n[Source]\nfun box ipv6_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_mtu_discover\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_252.txt", "contents": "fun box mcast_join_group()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_join_source_group\u00b6\n[Source]\nfun box mcast_join_source_group()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_leave_group\u00b6\n[Source]"} +{"id": "Pony/builtin-I16-_63.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/2_primitives_3.txt", "contents": "# Built-in primitive types\n\nThe `primitive` keyword is also used to introduce certain built-in \"machine word\" types. Other than having a value associated with them, these work like user-defined primitives. These are:\n\n* `Bool`. This is a 1-bit value that is either `true` or `false`.\n* `ISize`, `ILong`, `I8`, `I16`, `I32`, `I64`, `I128`. Signed integers of various widths.\n* `USize`, `ULong`, `U8`, `U16`, `U32`, `U64`, `U128`. Unsigned integers of various widths.\n* `F32`, `F64`. Floating point numbers of various widths.\n\n`ISize`/`USize` correspond to the bit width of the native type `size_t`, which varies by platform. `ILong`/`ULong` similarly correspond to the bit width of the native type `long`, which also varies by platform. The bit width of a native `int` is the same across all the platforms that Pony supports, and you can use `I32`/`U32` for this.\n"} +{"id": "Pony/src-pony_check-property_runner-_24.txt", "contents": "else\nfalse\nend\n\nfun string(): String iso^ =>\n(\"shrink(\" + this._round.string() + \")\").string()\n\nclass val _Run is Equatable[_Round]\n\"\"\"\nAn execution of a property during test mode. i.e. normal execution\nto find a sample for which the property does not hold.\n\"\"\"\nlet _round: USize\n\nnew val create(round': USize) =>\n_round = round'\n\nfun round(): USize => _round\n\nfun inc(): _Round =>"} +{"id": "Pony/src-process-_process-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-String-_82.txt", "contents": "\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val"} +{"id": "Pony/buffered-Writer-_11.txt", "contents": "\nNone val\n\n\ni32_le\u00b6\n[Source]\nWrite an I32 to the buffer in little-endian byte order.\nfun ref i32_le(\ndata: I32 val)\n: None val\n\nParameters\u00b6\n\ndata: I32 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/bureaucracy-Registrar-_2.txt", "contents": "[Source]\nRemove a mapping. This only takes effect if provided key currently maps to\nthe provided value. If the key maps to some other value (perhaps after\nupdating), the mapping won't be removed.\nbe remove(\nkey: String val,\nvalue: Any tag)\n\nParameters\u00b6\n\nkey: String val\nvalue: Any tag\n\n\nPublic Functions\u00b6\napply[optional A: Any tag]\u00b6\n[Source]\nLookup by name. Returns a promise that will be fulfilled with the mapped\nvalue if it exists and is a subtype of A. Otherwise, the promise will be\nrejected."} +{"id": "Pony/builtin-ULong-_34.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\n(ULong val , ULong val)\n\n\nrem_unsafe\u00b6\n[Source]\nfun box rem_unsafe(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_bench-_runner-_13.txt", "contents": "embed _after_cont: AsyncBenchContinue =\nAsyncBenchContinue._create(this, recover this~_after_done_cont() end)\n\nnew create(\nponybench: PonyBench,\nbenchmark: AsyncMicroBenchmark,\noverhead: Bool)\n=>\n_ponybench = ponybench\n_aggregator = _Aggregator(_ponybench, this, benchmark.config(), overhead)\n_name = benchmark.name()\n_bench = consume benchmark\napply()\n\nbe apply() =>\n_bench.before(_before_cont)\n\nbe _before_done_cont(e: U64) =>\n_n = 0\n_a = 0"} +{"id": "Pony/files-FilePermissionDenied-_2.txt", "contents": "fun box ne(\nthat: FilePermissionDenied val)\n: Bool val\n\nParameters\u00b6\n\nthat: FilePermissionDenied val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-math-is_prime-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-itertools-iter-_74.txt", "contents": "### Example\n\n```pony\nIter[USize]([as USize: 1; 1; 2; 3; 3; 2; 2].values())\n.dedup()\n```\n`1 2 3 2`\n\"\"\"\nIter[A!](\nobject is Iterator[A!]\nvar _prev_value: (A! | None) = None\nvar _prev_hash: USize = 0\n\nfun ref has_next(): Bool =>\n_iter.has_next()\n\nfun ref next(): A! ? =>\nlet cur_value: A! = _iter.next()?\nlet cur_hash: USize = H.hash(cur_value)\nmatch _prev_value"} +{"id": "Pony/src-pony_check-int_properties-_14.txt", "contents": "| 2 => int_property[U32](x.u32(), y.u32(), h)?\n| 3 => int_property[U64](x.u64(), y.u64(), h)?\n| 4 => int_property[ULong](x.ulong(), y.ulong(), h)?\n| 5 => int_property[USize](x.usize(), y.usize(), h)?\n| 6 => int_property[U128](x, y, h)?\n| 7 => int_property[I8](x.i8(), y.i8(), h)?\n| 8 => int_property[I16](x.i16(), y.i16(), h)?\n| 9 => int_property[I32](x.i32(), y.i32(), h)?\n| 10 => int_property[I64](x.i64(), y.i64(), h)?\n| 11 => int_property[ILong](x.ilong(), y.ilong(), h)?\n| 12 => int_property[ISize](x.isize(), y.isize(), h)?\n| 13 => int_property[I128](x.i128(), y.i128(), h)?\nelse\nh.log(\"rem is broken\")\nerror\nend\n\nfun ref int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)?\n\n"} +{"id": "Pony/net-OSSockOpt-_359.txt", "contents": "fun box sctp_cmt_mptcp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_off\u00b6\n[Source]\nfun box sctp_cmt_off()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cmt_on_off\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_33.txt", "contents": "A\n\n\nexp2\u00b6\n[Source]\nfun box exp2()\n: A\n\nReturns\u00b6\n\nA\n\n\ncos\u00b6\n[Source]\nfun box cos()\n: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-property-_15.txt", "contents": "The [Generator](pony_check-Generator.md) used to produce samples to verify.\n\"\"\"\n\nfun ref property(arg1: T, h: PropertyHelper) ?\n\"\"\"\nA method verifying that a certain property holds for all given `arg1`\nwith the help of [PropertyHelper](pony_check-PropertyHelper.md) `h`.\n\"\"\"\n\ntrait Property2[T1, T2] is Property1[(T1, T2)]\n\nfun gen1(): Generator[T1]\n\"\"\"\nThe Generator for the first argument to your `property2`.\n\"\"\"\n\nfun gen2(): Generator[T2]\n\"\"\"\nThe Generator for the second argument to your `property2`.\n\"\"\""} +{"id": "Pony/net-TCPListener-_6.txt", "contents": ": TCPListener tag^\n\nParameters\u00b6\n\nauth: TCPListenAuth val\nnotify: TCPListenNotify iso\nhost: String val = \"\"\nservice: String val = \"0\"\nlimit: USize val = 0\nread_buffer_size: USize val = 16384\nyield_after_reading: USize val = 16384\nyield_after_writing: USize val = 16384\n\nReturns\u00b6\n\nTCPListener tag^\n\n\nPublic Behaviours\u00b6\nset_notify\u00b6"} +{"id": "Pony/src-collections-persistent-list-_42.txt", "contents": "_tail = consume t\n_size = 1 + _tail.size()\n\nfun size(): USize =>\n\"\"\"\nReturns the size of the list.\n\"\"\"\n_size\n\nfun apply(i: USize): val->A ? =>\n\"\"\"\nReturns the i-th element of the list. Errors if the index is out of bounds.\n\"\"\"\nmatch i\n| 0 => _head\nelse _tail(i - 1)?\nend\n\nfun values(): Iterator[val->A]^ =>\n\"\"\""} +{"id": "Pony/collections-MapPairs-_1.txt", "contents": "[Source]\nCreates an iterator for the given map.\nnew ref create(\nmap: M)\n: MapPairs[K, V, H, M] ref^\n\nParameters\u00b6\n\nmap: M\n\nReturns\u00b6\n\nMapPairs[K, V, H, M] ref^\n\n\nPublic Functions\u00b6\nhas_next\u00b6\n[Source]\nTrue if it believes there are remaining entries. May not be right if values\nwere added or removed from the map."} +{"id": "Pony/builtin-SignedInteger-_42.txt", "contents": "fun box le(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-net-tcp_connection-_72.txt", "contents": "\nfun ref throttled(connection: TCPConnection ref) =>\n_out.print(\"Experiencing backpressure!\")\nBackpressure.apply(_auth)\n\nfun ref unthrottled(connection: TCPConnection ref) =>\n_out.print(\"Releasing backpressure!\")\nBackpressure.release(_auth)\n\nfun ref closed(connection: TCPConnection ref) =>\n// if backpressure has been applied, make sure we release\n// when shutting down\n_out.print(\"Releasing backpressure if applied!\")\nBackpressure.release(_auth)\n\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n\nactor Main\nnew create(env: Env) =>"} +{"id": "Pony/src-cli-command_parser-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-capsicum-cap_rights-_7.txt", "contents": "if freebsd or \"capsicum\"\nuse @__cap_rights_clear[Pointer[U64]](...)\nif freebsd or \"capsicum\"\nuse @__cap_rights_set[Pointer[U64]](...)\nif freebsd or \"capsicum\"\nuse @__cap_rights_get[I32](version: I32, fd: I32, rights: Pointer[U64])\nif freebsd or \"capsicum\"\nuse @cap_rights_limit[I32](fd: I32, rights: Pointer[U64])\nif freebsd or \"capsicum\"\nuse @cap_rights_merge[None](dst: Pointer[U64], src: Pointer[U64])\nif freebsd or \"capsicum\"\nuse @cap_rights_remove[None](dst: Pointer[U64], src: Pointer[U64])\nif freebsd or \"capsicum\"\nuse @cap_rights_contains[Bool](big: Pointer[U64] tag, little: Pointer[U64] tag)\nif freebsd or \"capsicum\"\n\ntype CapRights is CapRights0\n\nclass CapRights0\n\"\"\""} +{"id": "Pony/src-pony_test-test_helper-_45.txt", "contents": "\"\"\"\n_runner.dispose_when_done(disposable)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-generator-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-pony_bench-benchmark-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/files-FileChown-_0.txt", "contents": "\n\n\n\n\n\n\nFileChown\u00b6\n[Source]\nprimitive val FileChown\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileChown val^\n\nReturns\u00b6\n\nFileChown val^"} +{"id": "Pony/builtin-SignedInteger-_17.txt", "contents": "fun box mod_unsafe(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nadd_partial\u00b6\n[Source]\nfun box add_partial(\ny: A)\n: A ?\n\nParameters\u00b6"} +{"id": "Pony/src-files-file-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-pony_check-property_helper-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/files-CreateFile-_2.txt", "contents": "FileEOF val | FileBadFileNumber val | FileExists val |\nFilePermissionDenied val)\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: CreateFile val)\n: Bool val\n\nParameters\u00b6\n\nthat: CreateFile val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6"} +{"id": "Pony/collections-persistent-HashSet-_11.txt", "contents": "[Source]\nReturn true if every element in that is also in this, and this has more\nelements than that.\nfun box gt(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nReturn true if every element in that is also in this.\nfun box ge("} +{"id": "Pony/src-files-directory-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-cli-command_spec-_35.txt", "contents": "\nfun is_parent(): Bool => _type is _CommandSpecParent\n\nfun help_name(): String =>\n\"\"\"\nReturns the name of the help command, which defaults to \"help\".\n\"\"\"\n_help_name\n\nfun help_string(): String =>\n\"\"\"\nReturns a formated help string for this command and all of its arguments.\n\"\"\"\nlet s = _name.clone()\ns.append(\" \")\nlet args_iter = _args.values()\nfor a in args_iter do\ns.append(a.help_string())\nif args_iter.has_next() then s.append(\" \") end\nend"} +{"id": "Pony/builtin-F32-_6.txt", "contents": "\n\nepsilon\u00b6\n[Source]\nMinimum positive value such that (1 + epsilon) != 1.\nnew val epsilon()\n: F32 val^\n\nReturns\u00b6\n\nF32 val^\n\n\nPublic Functions\u00b6\nbits\u00b6\n[Source]\nfun box bits()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-collections-list-_28.txt", "contents": "552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n565\n566\n567\n568\n569\n570\n571"} +{"id": "Pony/pony_check-Generators-_46.txt", "contents": "min: USize val = 0,\nmax: USize val = 100)\n: Generator[String val] box\n\nParameters\u00b6\n\nmin: USize val = 0\nmax: USize val = 100\n\nReturns\u00b6\n\nGenerator[String val] box\n\n\nunicode_bmp\u00b6\n[Source]\nCreate a generator for unicode strings\nfrom the basic multilingual plane only,\nwith a minimum length of min codepoints (default: 0)\nand a maximum length of max codepoints (default: 100)."} +{"id": "Pony/src-time-timer-_0.txt", "contents": "\n\n\n\n\n\n\ntimer.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/5_structs_0.txt", "contents": "# Structs\n\nA `struct` is similar to a `class`. There's a couple very important differences. You'll use classes throughout your Pony code. You'll rarely use structs. We'll discuss structs in more depth in the [C-FFI chapter](/c-ffi/index.md) of the tutorial. In the meantime, here's a short introduction to the basics of structs.\n"} +{"id": "Pony/src-signals-signal_notify-_3.txt", "contents": "Called if the signal is disposed. This is also called if the notifier\nreturns false.\n\"\"\"\nNone\n\nprimitive SignalRaise\n\"\"\"\nRaise a signal.\n\"\"\"\nfun apply(sig: U32) =>\nifdef osx then\n// On Darwin, @raise delivers the signal to the current thread, not the\n// process, but kqueue EVFILT_SIGNAL will only see signals delivered to\n// the process. @kill delivers the signal to a specific process.\n@kill(@getpid(), sig)\nelse\n@raise(sig)\nend\n\n"} +{"id": "Pony/src-pony_check-property_helper-_37.txt", "contents": "end\n\ni = i + 1\nend\nelse\nok = false\nend\nend\n\nif not ok then\n_fail(_fmt_msg(loc, \"Assert EQ failed. \" + msg + \" Expected (\"\n+ _print_array[A](expect) + \") == (\" + _print_array[A](actual) + \")\"))\nreturn false\nend\n\n_runner.log(\n_fmt_msg(loc, \"Assert EQ passed. \" + msg + \" Got (\"\n+ _print_array[A](expect) + \") == (\" + _print_array[A](actual) + \")\"),\ntrue)\ntrue"} +{"id": "Pony/src-buffered-writer-_0.txt", "contents": "\n\n\n\n\n\n\nwriter.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_106.txt", "contents": "fun box icmp_redirect()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_redir_host\u00b6\n[Source]\nfun box icmp_redir_host()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_redir_hosttos\u00b6\n[Source]"} +{"id": "Pony/src-math-greatest_common_divisor-_3.txt", "contents": "env.out.print(gcd.string())\nelse\nenv.out.print(\"No GCD\")\nend\n```\n\"\"\"\nfun apply[A: Integer[A] val](x: A, y: A): A ? =>\nlet zero = A.from[U8](0)\nif (x == zero) or (y == zero) then\nerror\nend\n\nvar x': A = x\nvar y': A = y\n\nwhile y' != zero do\nlet z = y'\ny' = x' % y'\nx' = z\nend"} +{"id": "Pony/itertools--index-_1.txt", "contents": "let xs = Iter[I64]([1; 2; 3; 4; 5].values())\n.map[I64]({(x) => x + 1 })\n.filter({(x) => (x % 2) == 0 })\n.map[None]({(x) => env.out.print(x.string()) })\n\nThis will result in an iterator that prints the numbers 2, 4, and 6. However,\ndue to the lazy nature of the map and filter, no iteration has actually occurred\nand nothing will be printed. One solution to this would be to loop over the\nresulting Iter as so:\nfor x in xs do\nNone\nend\n\nThis will trigger the iteration and print out the values 2, 4, and 6. This is\nwhere the run method comes in handy by doing the iteration without the need\nfor a loop. So the final code would be as follows:\nIter[I64]([1; 2; 3; 4; 5].values())\n.map[I64]({(x) => x + 1 })\n.filter({(x) => (x % 2) == 0 })\n.map[None]({(x) => env.out.print(x.string()) })"} +{"id": "Pony/pony_check-Generator-_1.txt", "contents": "the property is not failing anymore.\nThe last failing sample, which is considered the most simple one,\nis then reported to the user.\nclass box Generator[T: T] is\nGenObj[T] box\n\nImplements\u00b6\n\nGenObj[T] box\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew ref create(\ngen: GenObj[T] box)\n: Generator[T] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_82.txt", "contents": "fun box dccp_sockopt_qpolicy_txqlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_recv_cscov\u00b6\n[Source]\nfun box dccp_sockopt_recv_cscov()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_rx_ccid\u00b6\n[Source]"} +{"id": "Pony/src-files-path-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-itertools-iter-_95.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.nth(2)\n```\n`2`\n\"\"\"\nvar c = n\nwhile _iter.has_next() and (c > 1) do\n_iter.next()?\nc = c - 1\nend\nif not _iter.has_next() then\nerror\nelse\n_iter.next()?\nend\n\nfun ref run(on_error: {ref()} = {() => None } ref) =>"} +{"id": "Pony/src-pony_check-generator-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-builtin-array-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/collections-persistent-Nil-_2.txt", "contents": "\napply\u00b6\n[Source]\nReturns the i-th element of the sequence. For the empty list this call will\nalways error because any index will be out of bounds.\nfun box apply(\ni: USize val)\n: val->A ?\n\nParameters\u00b6\n\ni: USize val\n\nReturns\u00b6\n\nval->A ?\n\n\nvalues\u00b6\n[Source]"} +{"id": "Pony/net-NetAddress-_4.txt", "contents": "servicename: Bool val = false\n\nReturns\u00b6\n\n(String val , String val) ?\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: NetAddress box)\n: Bool val\n\nParameters\u00b6\n\nthat: NetAddress box\n\nReturns\u00b6\n\nBool val"} +{"id": "Pony/src-collections-list_node-_18.txt", "contents": "in_list\n\nfun ref append(that: ListNode[A]): Bool =>\n\"\"\"\nAppend a node to this one. If `that` is already in a list, it is removed\nbefore it is appended. Returns true if `that` was removed from another\nlist.\n\nIf the ListNode is not contained within a List the append will fail.\n\"\"\"\nif (_next is that) or (this is that) then\nreturn false\nend\n\nvar in_list = false\n\nmatch _list\n| let list': List[A] =>\nin_list = that._list isnt None\nthat.remove()"} +{"id": "Pony/src-builtin-array-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-promises-fulfill-_3.txt", "contents": "A reject that always raises an error.\n\"\"\"\nfun ref apply(): A ? =>\nerror\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U64-_36.txt", "contents": "\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nop_or\u00b6\n[Source]\nfun box op_or(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-FileTruncate-_2.txt", "contents": "\nthat: FileTruncate val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileTruncate val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileTruncate val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_363.txt", "contents": "fun box sctp_connect_x_delayed()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_context\u00b6\n[Source]\nfun box sctp_context()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cookie_ack\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_57.txt", "contents": "1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151"} +{"id": "Pony/signals-SignalHandler-_1.txt", "contents": "create\u00b6\n[Source]\nCreate a signal handler.\nnew tag create(\nnotify: SignalNotify iso,\nsig: U32 val,\nwait: Bool val = false)\n: SignalHandler tag^\n\nParameters\u00b6\n\nnotify: SignalNotify iso\nsig: U32 val\nwait: Bool val = false\n\nReturns\u00b6\n\nSignalHandler tag^\n\n"} +{"id": "Pony/pony_check-Generators-_18.txt", "contents": "weighted_generators: ReadSeq[(USize val , Generator[T] box)] box\n\nReturns\u00b6\n\nGenerator[T] box\n\n\nfrequency_safe[T: T]\u00b6\n[Source]\nVersion of frequency that errors if the given weighted_generators is\nempty.\nfun box frequency_safe[T: T](\nweighted_generators: ReadSeq[(USize val , Generator[T] box)] box)\n: Generator[T] box ?\n\nParameters\u00b6\n\nweighted_generators: ReadSeq[(USize val , Generator[T] box)] box\n\nReturns\u00b6"} +{"id": "Pony/pony_check-ForAll2-_1.txt", "contents": "Parameters\u00b6\n\ngen1': Generator[T1] val\ngen2': Generator[T2] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll2[T1, T2] ref^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nprop: {(T1, T2, PropertyHelper) ?}[T1, T2] val)\n: None val ?\n\nParameters\u00b6\n"} +{"id": "Pony/format-FormatOctal-_0.txt", "contents": "\n\n\n\n\n\n\nFormatOctal\u00b6\n[Source]\nprimitive val FormatOctal is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/passing-and-sharing_0.txt", "contents": "# Passing and Sharing References\n\nReference capabilities make it safe to both __pass__ mutable data between actors and to __share__ immutable data amongst actors. Not only that, they make it safe to do it with no copying, no locks, in fact, no runtime overhead at all.\n"} +{"id": "Pony/builtin-F32-_42.txt", "contents": "F32 val\n\n\nneg_unsafe\u00b6\nfun box neg_unsafe()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\neq_unsafe\u00b6\nfun box eq_unsafe(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val"} +{"id": "Pony/src-builtin-string-_113.txt", "contents": "let i = offset_to_index(offset)\nlet err: (U32, U8) = (0xFFFD, 1)\n\nif i >= _size then error end\nlet c = _ptr._apply(i)\n\nif c < 0x80 then\n// 1-byte\n(c.u32(), 1)\nelseif c < 0xC2 then\n// Stray continuation.\nerr\nelseif c < 0xE0 then\n// 2-byte\nif (i + 1) >= _size then\n// Not enough bytes.\nerr\nelse\nlet c2 = _ptr._apply(i + 1)\nif (c2 and 0xC0) != 0x80 then"} +{"id": "Pony/src-signals-sig-_17.txt", "contents": "ifdef bsd or osx then 31\nelseif linux then 12\nelse compile_error \"no SIGUSR2\"\nend\nelse\nifdef linux or bsd or osx then\ncompile_error \"SIGUSR2 reserved for runtime use\"\nelse\ncompile_error \"no SIGUSR2\"\nend\nend\n\nfun rt(n: U32): U32 ? =>\nifdef bsd then\nif n <= 61 then\n65 + n.u32()\nelse\nerror\nend\nelseif linux then"} +{"id": "Pony/builtin-String-_77.txt", "contents": "Returns\u00b6\n\nULong val ?\n\n\nusize\u00b6\n[Source]\nfun box usize(\nbase: U8 val = 0)\n: USize val ?\n\nParameters\u00b6\n\nbase: U8 val = 0\n\nReturns\u00b6\n\nUSize val ?\n\n"} +{"id": "Pony/pony_check-Generators-_22.txt", "contents": "gen4: Generator[T4] box\n\nReturns\u00b6\n\nGenerator[(T1 , T2 , T3 , T4)] box\n\n\nmap2[T1: T1, T2: T2, T3: T3]\u00b6\n[Source]\nConvenience combinator for mapping 2 generators into 1.\nfun box map2[T1: T1, T2: T2, T3: T3](\ngen1: Generator[T1] box,\ngen2: Generator[T2] box,\nfn: {(T1, T2): T3^}[T1, T2, T3] ref)\n: Generator[T3] box\n\nParameters\u00b6\n\ngen1: Generator[T1] box\ngen2: Generator[T2] box"} +{"id": "Pony/src-collections-hashable-_7.txt", "contents": "\ninterface Hashable64\n\"\"\"\nA version of Hashable that returns 64-bit hashes on every platform.\n\"\"\"\nfun hash64(): U64\n\ninterface val HashFunction[A]\n\"\"\"\nA pluggable hash function.\n\"\"\"\nnew val create()\n\"\"\"\nData structures create instances internally. Use a primitive if possible.\n\"\"\"\n\nfun hash(x: box->A!): USize\n\"\"\"\nCalculate the hash of some type. This is an alias of the type parameter to\nallow data structures to hash things without consuming them."} +{"id": "Pony/net-OSSockOpt-_402.txt", "contents": "fun box sctp_log_try_advance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ltrace_chunk_enable\u00b6\n[Source]\nfun box sctp_ltrace_chunk_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ltrace_error_enable\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIWhiteSpace-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_86.txt", "contents": "1712\n1713\n1714\n1715\n1716\n1717\n1718\n1719\n1720\n1721\n1722\n1723\n1724\n1725\n1726\n1727\n1728\n1729\n1730\n1731"} +{"id": "Pony/net-OSSockOpt-_269.txt", "contents": "fun box ndrv_demuxtype_snap()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_dmux_max_descr\u00b6\n[Source]\nfun box ndrv_dmux_max_descr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_protocol_desc_vers\u00b6\n[Source]"} +{"id": "Pony/combining-capabilities_1.txt", "contents": "# Viewpoint adaptation\n\nThe process of combining origin and field capabilities is called __viewpoint adaptation__. That is, the __origin__ has a __viewpoint__, and its fields can be \"seen\" only from that __viewpoint__.\n\nLet's start with a table. This shows how a __field__ of each capability looks when using an __origin__ of each capability.\n\n---\n\n| ▷ | `iso` field | `trn` field | `ref` field | `val` field | `box` field | `tag` field |\n| -------------- | --------- | --------- | --------- | --------- | --------- | --------- |\n| __`iso` origin__ | `iso` | `tag` | `tag` | `val` | `tag` | `tag` |\n| __`trn` origin__ | `iso` | `box` | `box` | `val` | `box` | `tag` |\n| __`ref` origin__ | `iso` | `trn` | `ref` | `val` | `box` | `tag` |\n| __`val` origin__ | `val` | `val` | `val` | `val` | `val` | `tag` |\n| __`box` origin__ | `tag` | `box` | `box` | `val` | `box` | `tag` |\n| __`tag` origin__ | n/a | n/a | n/a | n/a | n/a | n/a |\n\n---\n\nFor example, if you have a `trn` origin and you read a `ref` field, you get a `box` result:"} +{"id": "Pony/builtin-String-_9.txt", "contents": "str: Pointer[U8 val] box\n\nReturns\u00b6\n\nString ref^\n\n\nfrom_utf32\u00b6\n[Source]\nCreate a UTF-8 string from a single UTF-32 code point.\nnew ref from_utf32(\nvalue: U32 val)\n: String ref^\n\nParameters\u00b6\n\nvalue: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_40.txt", "contents": "792\n793\n794\n795\n796\n797\n798\n799\n800\n801\n802\n803\n804\n805\n806\n807\n808\n809\n810\n811"} +{"id": "Pony/src-math-is_prime-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-net-tcp_connection-_34.txt", "contents": "672\n673\n674\n675\n676\n677\n678\n679\n680\n681\n682\n683\n684\n685\n686\n687\n688\n689\n690\n691"} +{"id": "Pony/src-files-directory-_48.txt", "contents": "try\nlet path' = FilePath.from(path, target, path.caps)?\n\nifdef linux or bsd then\nvar tv: (ILong, ILong, ILong, ILong) =\n( atime._1.ilong(), atime._2.ilong() / 1000,\nmtime._1.ilong(), mtime._2.ilong() / 1000 )\n\n0 == @futimesat(_fd, target.cstring(), addressof tv)\nelse\npath'.set_time(atime, mtime)\nend\nelse\nfalse\nend\n\nfun symlink(source: FilePath, link_name: String): Bool =>\n\"\"\"\nLink the source path to the link_name, where the link_name is relative to\nthis directory."} +{"id": "Pony/format-FormatBinary-_0.txt", "contents": "\n\n\n\n\n\n\nFormatBinary\u00b6\n[Source]\nprimitive val FormatBinary is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/capsicum-Cap-_22.txt", "contents": "fun box symlinkat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nunlinkat\u00b6\n[Source]\nfun box unlinkat()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\naccept\u00b6\n[Source]"} +{"id": "Pony/src-files-file_lines-_11.txt", "contents": "After a successful reading operation `_buffer_cursor` is updated.\n\"\"\"\nvar result = true\n// get back to position of last line\nlet current_pos = _file.position()\n_file.seek_start(_buffer_cursor)\nif _file.valid() then\nlet read_bytes = _last_line_length.max(_min_read_size)\nlet read_buf = _file.read(read_bytes)\n_buffer_cursor = _file.position()\n\nlet errno = _file.errno()\nif (read_buf.size() == 0) and (errno isnt FileOK) then\nresult = false\nelse\n// TODO: Limit size of read buffer\n_reader.append(consume read_buf)\nend\nelse\nresult = false"} +{"id": "Pony/builtin-F32-_68.txt", "contents": "Returns\u00b6\n\nF32 val\n\n\nf64_unsafe\u00b6\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: F32 val)\n: (Less val | Equal val | Greater val)\n"} +{"id": "Pony/builtin-U32-_43.txt", "contents": "fun box eq(\ny: U32 val)\n: Bool val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\ny: U32 val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_35.txt", "contents": "// we have a sample that did not fail and thus can stop shrinking\nfail(failed_repr, shrink_round.round())\n\nelse\n// we have a failing shrink sample, recurse\n_prepare_next_round()\ndo_shrink(last_repr)\nend\n\nbe do_shrink(failed_repr: String) =>\n\n// shrink iters can be infinite, so we need to limit\n// the examples we consider during shrinking\nlet round_num = this._current_round.round()\nif round_num == _params.max_shrink_rounds then\nfail(failed_repr, round_num)\nreturn\nend\n\n(let shrink, let current_repr) ="} +{"id": "Pony/net-OSSockOpt-_10.txt", "contents": "fun box ipproto_chaos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_cmtp\u00b6\n[Source]\nfun box ipproto_cmtp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_comp\u00b6\n[Source]"} +{"id": "Pony/builtin-U8-_6.txt", "contents": "\nU8 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ISize-_25.txt", "contents": "\nISize val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: USize val)\n: ISize val\n\nParameters\u00b6\n\ny: USize val\n\nReturns\u00b6\n\nISize val\n\n\nshl_unsafe\u00b6"} +{"id": "Pony/buffered-Writer-_2.txt", "contents": "[(F32(3.14159), \"Hopper\"); (F32(-83.83), \"Jones\")]]\nfor items in messages.values() do\nwb.i32_be((items.size() / 2).i32())\nfor (f, s) in items.values() do\nwb.f32_be(f)\nwb.i32_be(s.size().i32())\nwb.write(s.array())\nend\nlet wb_msg = Writer\nwb_msg.i32_be(wb.size().i32())\nwb_msg.writev(wb.done())\nenv.out.writev(wb_msg.done())\nend\n\nclass ref Writer\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()"} +{"id": "Pony/promises-RejectAlways-_0.txt", "contents": "\n\n\n\n\n\n\nRejectAlways[A: Any #share]\u00b6\n[Source]\nA reject that always raises an error.\nclass iso RejectAlways[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew iso create()\n: RejectAlways[A] iso^\n\nReturns\u00b6\n"} +{"id": "Pony/files-Path-_11.txt", "contents": "fun box dir(\npath: String val)\n: String val\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nString val\n\n\next\u00b6\n[Source]\nReturn the file extension, i.e. the part after the last dot as long as that\ndot is after all separators. Return an empty string for no extension.\nfun box ext(\npath: String val)\n: String val"} +{"id": "Pony/src-format-format-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-property-_19.txt", "contents": "The Generator for the second argument to your `property4` method.\n\"\"\"\n\nfun gen3(): Generator[T3]\n\"\"\"\nThe Generator for the third argument to your `property4` method.\n\"\"\"\n\nfun gen4(): Generator[T4]\n\"\"\"\nThe Generator for the fourth argument to your `property4` method.\n\"\"\"\n\nfun gen(): Generator[(T1, T2, T3, T4)] =>\nGenerators.zip4[T1, T2, T3, T4](\ngen1(),\ngen2(),\ngen3(),\ngen4())\n"} +{"id": "Pony/calling-c_9.txt", "contents": "## Working with Structs: from C to Pony\n\nA common pattern in C is to pass a struct pointer to a function, and that function will fill in various values in the struct. To do this in Pony, you make a `struct` and then use a `NullablePointer`, which denotes a possibly-null type:\n\n```pony\nuse @ioctl[I32](fd: I32, req: U32, ...)\n\nstruct Winsize\nvar height: U16 = 0\nvar width: U16 = 0\n\nnew create() => None\n\nlet size = Winsize\n\n@ioctl(0, 21523, NullablePointer[Winsize](size))\n\nenv.out.print(size.height.string())\n```\n"} +{"id": "Pony/src-files-path-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/net-OSSockOpt-_209.txt", "contents": "fun box ip_fw_table_flush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_table_getsize\u00b6\n[Source]\nfun box ip_fw_table_getsize()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_table_list\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_58.txt", "contents": "1152\n1153\n1154\n1155\n1156\n1157\n1158\n1159\n1160\n1161\n1162\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171"} +{"id": "Pony/builtin-U8-_54.txt", "contents": "fun box u128()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong\u00b6\n[Source]\nfun box ulong()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize\u00b6\n[Source]"} +{"id": "Pony/builtin-ISize-_11.txt", "contents": "[Source]\nfun box fld_unsafe(\ny: ISize val)\n: ISize val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/builtin-F32-_10.txt", "contents": "\nmax_exp2\u00b6\n[Source]\nMaximum exponent value such that (2^exponent) - 1 is representable.\nfun tag max_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmax_exp10\u00b6\n[Source]\nMaximum exponent value such that (10^exponent) - 1 is representable.\nfun tag max_exp10()\n: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file-_64.txt", "contents": "Close the file. Future operations will do nothing.\n\"\"\"\nif _fd != -1 then\nif (_pending_writev_total > 0) and (_errno is FileOK) then\nflush()\nend\nif _unsynced_data or _unsynced_metadata then\nsync()\nend\nlet r = ifdef windows then\n@_close(_fd)\nelse\n@close(_fd)\nend\nif r < 0 then\n_errno = _get_error()\nend\n_fd = -1\n\n_pending_writev_total = 0"} +{"id": "Pony/builtin-ISize-_45.txt", "contents": "\nBool val\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_600.txt", "contents": "fun box tipc_critical_importance()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_destname\u00b6\n[Source]\nfun box tipc_destname()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_dest_droppable\u00b6\n[Source]"} +{"id": "Pony/pony_check-PropertyLogger-_0.txt", "contents": "\n\n\n\n\n\n\nPropertyLogger\u00b6\n[Source]\ninterface val PropertyLogger\n\nPublic Functions\u00b6\nlog\u00b6\n[Source]\nfun box log(\nmsg: String val,\nverbose: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/collections-BinaryHeap-_5.txt", "contents": "Append len elements from a sequence, starting from the given offset.\nfun ref append(\nseq: (ReadSeq[A] box & ReadElement[A^] box),\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n\nseq: (ReadSeq[A] box & ReadElement[A^] box)\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n\nconcat\u00b6\n[Source]"} +{"id": "Pony/term-ANSI-_11.txt", "contents": "Returns\u00b6\n\nString val\n\n\nred\u00b6\n[Source]\nRed text.\nfun box red()\n: String val\n\nReturns\u00b6\n\nString val\n\n\ngreen\u00b6\n[Source]\nGreen text.\nfun box green()"} +{"id": "Pony/src-net-tcp_connection-_42.txt", "contents": "832\n833\n834\n835\n836\n837\n838\n839\n840\n841\n842\n843\n844\n845\n846\n847\n848\n849\n850\n851"} +{"id": "Pony/pony_check-IntPairProperty-_0.txt", "contents": "\n\n\n\n\n\n\nIntPairProperty\u00b6\n[Source]\nA property implementation for conveniently evaluating properties\nfor pairs of integers of all Pony integer types at once.\nThe property needs to be formulated inside the method int_property:\nclass CommutativeMultiplicationProperty is IntPairProperty\nfun name(): String => \"commutativity/mul\"\n\nfun int_property[T: (Int & Integer[T] val)](x: T, y: T, h: PropertyHelper)? =>\nh.assert_eq[T](x * y, y * x)\n\ntrait ref IntPairProperty is\nProperty1[IntPairPropertySample ref] ref"} +{"id": "Pony/src-collections-flag-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/src-collections-persistent-map-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-pony_check-generator-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/pony_test-TestHelper-_19.txt", "contents": "Returns\u00b6\n\nNone val\n\n\nfail_action\u00b6\n[Source]\nCall to fail an action, which will also cause the entire test to fail\nimmediately, without waiting the rest of the outstanding actions.\nThe name of the failed action will be included in the failure output.\nUsually the action name should be an expected action set up by a call to\nexpect_action, but failing unexpected actions will also fail the test.\nfun box fail_action(\nname: String val)\n: None val\n\nParameters\u00b6\n\nname: String val\n"} +{"id": "Pony/builtin-ULong-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: ULong val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nULong val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: ULong val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_26.txt", "contents": "512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531"} +{"id": "Pony/itertools-Iter-_27.txt", "contents": "Return the last value of the iterator.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.last()\n\n3\nfun ref last()\n: A ?\n\nReturns\u00b6\n\nA ?\n\n\nmap[B: B]\u00b6\n[Source]\nReturn an iterator where each item's value is the application of the given\nfunction to the value in the original iterator.\nExample\u00b6\nIter[I64]([1; 2; 3].values())"} +{"id": "Pony/term-Readline-_4.txt", "contents": "[Source]\nNo more input is available.\nfun ref closed()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nup\u00b6\n[Source]\nPrevious line.\nfun ref up(\nctrl: Bool val = false,\nalt: Bool val = false,\nshift: Bool val = false)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-Array-_20.txt", "contents": "\nU32 val ?\n\n\nupdate_u64[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nWrite a U64 at offset. This is only allowed for an array of U8s.\nfun ref update_u64[optional B: (A & Real[B] val & U8 val)](\noffset: USize val,\nvalue: U64 val)\n: U64 val ?\n\nParameters\u00b6\n\noffset: USize val\nvalue: U64 val\n\nReturns\u00b6\n\nU64 val ?"} +{"id": "Pony/src-files-path-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/format-FormatFix-_0.txt", "contents": "\n\n\n\n\n\n\nFormatFix\u00b6\n[Source]\nprimitive val FormatFix is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/process-ProcessNotify-_3.txt", "contents": "data: Array[U8 val] iso\n\nReturns\u00b6\n\nNone val\n\n\nfailed\u00b6\n[Source]\nProcessMonitor calls this if we run into errors communicating with the\nforked process.\nfun ref failed(\nprocess: ProcessMonitor ref,\nerr: ProcessError val)\n: None val\n\nParameters\u00b6\n\nprocess: ProcessMonitor ref\nerr: ProcessError val"} +{"id": "Pony/src-builtin-unsigned-_54.txt", "contents": "\nfun add_partial(y: U16): U16 ? =>\n_UnsignedPartialArithmetic.add_partial[U16](this, y)?\n\nfun sub_partial(y: U16): U16 ? =>\n_UnsignedPartialArithmetic.sub_partial[U16](this, y)?\n\nfun mul_partial(y: U16): U16 ? =>\n_UnsignedPartialArithmetic.mul_partial[U16](this, y)?\n\nfun div_partial(y: U16): U16 ? =>\n_UnsignedPartialArithmetic.div_partial[U16](this, y)?\n\nfun rem_partial(y: U16): U16 ? =>\n_UnsignedPartialArithmetic.rem_partial[U16](this, y)?\n\nfun divrem_partial(y: U16): (U16, U16) ? =>\n_UnsignedPartialArithmetic.divrem_partial[U16](this, y)?\n\nprimitive U32 is UnsignedInteger[U32]"} +{"id": "Pony/src-builtin-compare-_2.txt", "contents": "32\n33\n34\n35primitive Less is Equatable[Compare]\nfun string(): String iso^ =>\n\"Less\".string()\n\nprimitive Equal is Equatable[Compare]\nfun string(): String iso^ =>\n\"Equal\".string()\n\nprimitive Greater is Equatable[Compare]\nfun string(): String iso^ =>\n\"Greater\".string()\n\ntype Compare is (Less | Equal | Greater)\n\ninterface HasEq[A]\nfun eq(that: box->A): Bool\n"} +{"id": "Pony/src-files-file-_55.txt", "contents": "num_to_send).isize()\nend\n\nif len < bytes_to_send.isize() then error end\n\n// We've sent all the data we requested in this batch.\npending_total = pending_total - bytes_to_send\nnum_sent = num_sent + num_to_send.usize()\nend\n\n(true, num_sent, pending_total)\n\nfun ref position(): USize =>\n\"\"\"\nReturn the current cursor position in the file.\n\"\"\"\nif _fd != -1 then\nlet o: I64 = 0\nlet b: I32 = 1\nlet r = ifdef windows then"} +{"id": "Pony/builtin-Platform-_6.txt", "contents": "Bool val\n\n\nriscv\u00b6\n[Source]\nfun box riscv()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nlp64\u00b6\n[Source]\nfun box lp64()\n: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I32-_19.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\nI32 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: I32 val)\n: I32 val ?\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_124.txt", "contents": "else\nfalse\nend\n\nif same and ((steps = steps - 1) == 1) then\nreturn true\nend\n\ni = i + 1\nend\nfalse\n\nfun count(s: String box, offset: ISize = 0): USize =>\n\"\"\"\nCounts the non-overlapping occurrences of s in the string.\n\"\"\"\nlet j: ISize = (_size - s.size()).isize()\nvar i: USize = 0\nvar k = offset\n"} +{"id": "Pony/0_literals_9.txt", "contents": "## Triple quoted Strings\n\nFor embedding multi-line text in string literals, there are triple quoted strings.\n\n```pony\nlet triple_quoted_string_docs =\n\"\"\"\nTriple quoted strings are the way to go for long multi-line text.\nThey are extensively used as docstrings which are turned into api documentation.\n\nThey get some special treatment, in order to keep Pony code readable:\n\n* The string literal starts on the line after the opening triple quote.\n* Common indentation is removed from the string literal\nso it can be conveniently aligned with the enclosing indentation\ne.g. each line of this literal will get its first two whitespaces removed\n* Whitespace after the opening and before the closing triple quote will be\nremoved as well. The first line will be completely removed if it only\ncontains whitespace. e.g. this strings first character is `T` not `\\n`.\n\"\"\""} +{"id": "Pony/src-process-process_monitor-_48.txt", "contents": "Send any pending data. If any data can't be sent, keep it in _pending.\nOnce _pending is non-empty, direct writes will get queued there,\nand they can only be written here. If the _done_writing flag is set, close\nthe pipe once we've processed pending writes.\n\"\"\"\nwhile (not _closed) and not _stdin.is_closed() and (_pending.size() > 0) do\ntry\nlet node = _pending.head()?\n(let data, let offset) = node()?\n\n// Write as much data as possible.\n(let len, let errno) = _stdin.write(data, offset)\n\nif len == -1 then // OS signals write error\nif errno == _EAGAIN() then\n// Resource temporarily unavailable, send data later.\nreturn\nelse\n// Close pipe and bail out.\n_notifier.failed(this, ProcessError(WriteError))"} +{"id": "Pony/src-cli-command_parser-_20.txt", "contents": "match _parent\n| let p: CommandParser box => p._root_spec()\nelse\n_spec\nend\n\nfun _parse_command(\ntokens: Array[String] ref,\noptions: Map[String,Option] ref,\nargs: Map[String,Arg] ref,\nenvsmap: Map[String, String] box,\nostop: Bool)\n: (Command | CommandHelp | SyntaxError)\n=>\n\"\"\"\nParses all of the command line tokens and env vars into the given options\nand args maps. Returns the first SyntaxError, or the Command when OK.\n\"\"\"\nvar opt_stop = ostop\nvar arg_pos: USize = 0"} +{"id": "Pony/pony_check-Generators-_0.txt", "contents": "\n\n\n\n\n\n\nGenerators\u00b6\n[Source]\nConvenience combinators and factories for common types and kind of Generators.\nprimitive val Generators\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Generators val^\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_514.txt", "contents": "fun box so_protocol_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_prototype\u00b6\n[Source]\nfun box so_prototype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_proxyusr\u00b6\n[Source]"} +{"id": "Pony/6_errors_2.txt", "contents": "In either case, execution will then carry on with whatever code comes after the `try end`.\n\n__Do I have to provide an error handler?__ No. The `try` block will handle any errors regardless. If you don't provide an error handler then no error handling action will be taken - execution will simply continue after the `try` expression.\n\nIf you want to do something that might raise an error, but you don't care if it does you can just put it in a `try` block without an `else`.\n\n```pony\ntry\n// Do something that may raise an error\nend\n```\n\n__Is there anything my error handler has to do?__ No. If you provide an error handler then it must contain some code, but it is entirely up to you what it does.\n\n__What's the resulting value of a try block?__ The result of a `try` block is the value of the last statement in the `try` block, or the value of the last statement in the `else` clause if an error was raised. If an error was raised and there was no `else` clause provided, the result value will be `None`.\n"} +{"id": "Pony/src-pony_check-property_runner-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/buffered-Reader-_34.txt", "contents": "\n\npeek_i128_be\u00b6\n[Source]\nPeek at a big-endian I129.\nfun box peek_i128_be(\noffset: USize val = 0)\n: I128 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI128 val ?\n\n\npeek_i128_le\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_57.txt", "contents": "fun box ipproto_swipe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_tcf\u00b6\n[Source]\nfun box ipproto_tcf()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_tcp\u00b6\n[Source]"} +{"id": "Pony/src-builtin-seq-_8.txt", "contents": "fun ref truncate(len: USize)\n\"\"\"\nTruncate the sequence to the given length, discarding excess elements.\nIf the sequence is already smaller than len, do nothing.\n\"\"\"\n\nfun values(): Iterator[this->A]^\n\"\"\"\nReturns an iterator over the elements of the sequence.\n\"\"\"\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/collections-persistent-Nil-_3.txt", "contents": "Returns an empty iterator over the elements of the empty list.\nfun box values()\n: Iterator[val->A] ref^\n\nReturns\u00b6\n\nIterator[val->A] ref^\n\n\nis_empty\u00b6\n[Source]\nReturns a Bool indicating if the list is empty.\nfun box is_empty()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n"} +{"id": "Pony/files-FileLookup-_2.txt", "contents": "\nthat: FileLookup val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FileLookup val)\n: Bool val\n\nParameters\u00b6\n\nthat: FileLookup val\n\nReturns\u00b6\n"} +{"id": "Pony/src-process-_process-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-U8-_23.txt", "contents": "fun box fld_unsafe(\ny: U8 val)\n: U8 val\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: U8 val)\n: U8 val\n\nParameters\u00b6"} +{"id": "Pony/src-cli-command_spec-_8.txt", "contents": "152\n153\n154\n155\n156\n157\n158\n159\n160\n161\n162\n163\n164\n165\n166\n167\n168\n169\n170\n171"} +{"id": "Pony/src-collections-list_node-_23.txt", "contents": "_list = list\nthis\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-FilePath-_14.txt", "contents": "atime: (I64 val , I64 val)\nmtime: (I64 val , I64 val)\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Integer-_29.txt", "contents": "y: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\nmul\u00b6\n[Source]\nfun box mul(\ny: A)\n: A\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-string-_160.txt", "contents": "_size <= that._size\n\nfun offset_to_index(i: ISize): USize =>\nif i < 0 then i.usize() + _size else i.usize() end\n\nfun bool(): Bool ? =>\nmatch lower()\n| \"true\" => true\n| \"false\" => false\nelse\nerror\nend\n\nfun i8(base: U8 = 0): I8 ? => _to_int[I8](base)?\nfun i16(base: U8 = 0): I16 ? => _to_int[I16](base)?\nfun i32(base: U8 = 0): I32 ? => _to_int[I32](base)?\nfun i64(base: U8 = 0): I64 ? => _to_int[I64](base)?\nfun i128(base: U8 = 0): I128 ? => _to_int[I128](base)?\nfun ilong(base: U8 = 0): ILong ? => _to_int[ILong](base)?\nfun isize(base: U8 = 0): ISize ? => _to_int[ISize](base)?"} +{"id": "Pony/files-FileSync-_0.txt", "contents": "\n\n\n\n\n\n\nFileSync\u00b6\n[Source]\nprimitive val FileSync\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileSync val^\n\nReturns\u00b6\n\nFileSync val^"} +{"id": "Pony/pony_check-CountdownIter-_1.txt", "contents": "\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate am Iterator that counts down according to the specified arguments.\nfrom is exclusive, to is inclusive.\nnew ref create(\nfrom: T,\nto: T = call)\n: CountdownIter[T] ref^\n\nParameters\u00b6\n\nfrom: T\nto: T = call\n\nReturns\u00b6\n\nCountdownIter[T] ref^\n"} +{"id": "Pony/src-pony_test-test_helper-_40.txt", "contents": "+ \" Expected (\" + _print_array[A](expect) + \") == (\"\n+ _print_array[A](actual) + \"):\"\n+ \"\\nMissing: \" + _print_array[box->A](missing)\n+ \"\\nExtra: \" + _print_array[box->A](extra))\nreturn false\nend\nlog(\n_format_loc(loc) + \"Assert EQ_UNORDERED passed. \" + msg + \" Got (\"\n+ _print_array[A](expect) + \") == (\" + _print_array[A](actual) + \")\",\ntrue)\ntrue\nelse\nfail(\"Assert EQ_UNORDERED failed from an internal error.\")\nfalse\nend\n\nfun _format_loc(loc: SourceLoc): String =>\nloc.file() + \":\" + loc.line().string() + \": \"\n\nfun _print_array[A: Stringable #read](array: ReadSeq[A]): String =>"} +{"id": "Pony/src-net-udp_socket-_39.txt", "contents": "if not _closed then\n@pony_os_multicast_interface(_fd, from.cstring())\nend\n\nbe set_multicast_loopback(loopback: Bool) =>\n\"\"\"\nBy default, packets sent to a multicast address will be received by the\nsending system if it has subscribed to that address. Disabling loopback\nprevents this.\n\"\"\"\nif not _closed then\nset_ip_multicast_loop(loopback)\nend\n\nbe set_multicast_ttl(ttl: U8) =>\n\"\"\"\nSet the TTL for multicast sends. Defaults to 1.\n\"\"\"\nif not _closed then\nset_ip_multicast_ttl(ttl)"} +{"id": "Pony/builtin-Array-_46.txt", "contents": "Find the nth appearance of value from the end of the array, starting at\noffset and examining lower indices, and using the supplied predicate for\ncomparisons. Returns the index of the value, or raise an error if the value\nisn't present.\nBy default, the search starts at the last element of the array, returns the\nfirst instance of value found, and uses object identity for comparison.\nfun box rfind(\nvalue: A!,\noffset: USize val = call,\nnth: USize val = 0,\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda)\n: USize val ?\n\nParameters\u00b6\n\nvalue: A!\noffset: USize val = call\nnth: USize val = 0\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda\n"} +{"id": "Pony/builtin-U16-_11.txt", "contents": "fun box addc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , Bool val)\n\n\nsubc\u00b6\n[Source]\nfun box subc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-ByteSeqIter-_0.txt", "contents": "\n\n\n\n\n\n\nByteSeqIter\u00b6\n[Source]\nAccept an iterable collection of String or Array[U8] val.\ninterface val ByteSeqIter\n\nPublic Functions\u00b6\nvalues\u00b6\n[Source]\nfun box values()\n: Iterator[(this->String box | this->Array[U8 val] box)] ref\n\nReturns\u00b6\n"} +{"id": "Pony/lexicon_2.txt", "contents": "**Explicit type**: An actor, class or primitive.\n\n**Member**: Method or field.\n\n**Method**: Something callable on a concrete type/object. Function, behaviour or constructor.\n\n**Override**: When a concrete type has its own body for a method with a default body provided by a trait.\n\n**Parentheses**: ( ). Synonymous with round brackets.\n\n**Provide**: An entity's usage of traits and the methods they contain. Equivalent to implements or inherits from.\n\n**Round brackets**: ( ). Synonymous with parentheses.\n\n**Single type**: Any type which is not defined as a collection of other types. Actors, classes, primitives, traits and structural types are all single types. Opposite of a compound type.\n\n**Square brackets**: [ ]\n\n**Trait clash**: A trait clashes with another type if it contains a method with the same name, but incompatible signature as a method in the other type. A clashing trait is incompatible with the other type. Traits can clash with actors, classes, primitives, intersections, structural types and other traits.\n"} +{"id": "Pony/src-time-timers-_14.txt", "contents": "elseif event is _event then\n_advance()\nend\n\nfun ref _advance() =>\n\"\"\"\nUpdate the current time, process all the timing wheels, and set the event\nfor the next time we need to advance.\n\"\"\"\nlet elapsed = _set_time()\n\ntry\nfor i in Range(0, _wheels()) do\nif not _wheel(i)?.advance(_pending, _current, elapsed) then\nbreak\nend\nend\n\nfor timer in _pending.values() do\n_fire(timer)"} +{"id": "Pony/builtin-FloatingPoint-_27.txt", "contents": "\nfrexp\u00b6\n[Source]\nfun box frexp()\n: (A , U32 val)\n\nReturns\u00b6\n\n(A , U32 val)\n\n\nlog\u00b6\n[Source]\nfun box log()\n: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/src-pony_test-pony_test-_53.txt", "contents": "+ \"start with the given prefix.\")\n_env.out.print(\" --verbose - Show all test output.\")\n_env.out.print(\" --sequential - Run tests sequentially.\")\n_env.out.print(\" --noprog - Do not print progress messages.\")\n_env.out.print(\" --list - List but do not run tests.\")\n_env.out.print(\" --label=label - Only run tests with given label\")\n_do_nothing = true\nreturn\nend\nend\n\nfun _print_report() =>\n\"\"\"\nThe tests are all complete, print out the results.\n\"\"\"\nvar pass_count: USize = 0\nvar fail_count: USize = 0\n\n// First we print the result summary for each test, in the order that they\n// were given to us."} +{"id": "Pony/src-format-format-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/src-collections-persistent-list-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-String-_35.txt", "contents": "Parameters\u00b6\n\ns: String box\noffset: ISize val = 0\n\nReturns\u00b6\n\nBool val\n\n\ndelete\u00b6\n[Source]\nDelete len bytes at the supplied offset, compacting the string in place.\nfun ref delete(\noffset: ISize val,\nlen: USize val = 1)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_0.txt", "contents": "\n\n\n\n\n\n\ntcp_connection.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-tcp_connection-_50.txt", "contents": "992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1008\n1009\n1010\n1011"} +{"id": "Pony/net-OSSockOpt-_314.txt", "contents": "fun box rds_rdma_silent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_success\u00b6\n[Source]\nfun box rds_rdma_success()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_use_once\u00b6\n[Source]"} +{"id": "Pony/pony_check-ASCIIDigits-_2.txt", "contents": "\nthat: ASCIIDigits val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIDigits val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIDigits val\n\nReturns\u00b6\n"} +{"id": "Pony/src-cli-command_spec-_48.txt", "contents": "descr': String = \"\",\ndefault': (I64 | None) = None)\n=>\n\"\"\"\nCreates an Arg with an I64 typed value that can be used like\n` 42`\nto yield an arg value like\n`cmd.arg(\"count\").i64() == I64(42)`.\n\"\"\"\n_name = name'\n_descr = descr'\n(_typ, _default, _required) = _init(_I64Type, default')\n\nnew val u64(name': String,\ndescr': String = \"\",\ndefault': (U64 | None) = None)\n=>\n\"\"\"\nCreates an Arg with an U64 typed value that can be used like\n` 47`"} +{"id": "Pony/annotations_6.txt", "contents": "### `likely` and `unlikely`\n\nRecognised on a conditional expression (`if`, `while`, `until` and `|` (as a pattern matching case)). Gives optimisation hints to the compiler on the likelihood of a given conditional expression.\n\n```pony\nif \\likely\\ cond then\nfoo\nend\n\nwhile \\unlikely\\ cond then\nbar\nend\n\nrepeat\nbaz\nuntil \\likely\\ cond end\n\nmatch obj\n| \\likely\\ expr => foo\n| \\unlikely\\ let capt: T => bar"} +{"id": "Pony/src-time-timers-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/src-builtin-array-_87.txt", "contents": "\nn = n + 1\nend\nend\n\n_size = _size + n\nelse\ntry\nwhile n < len do\nif iter.has_next() then\npush(iter.next()?)\nelse\nbreak\nend\n\nn = n + 1\nend\nend\nend\n"} +{"id": "Pony/net-OSSockOpt-_370.txt", "contents": "fun box sctp_data_middle_frag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_not_frag\u00b6\n[Source]\nfun box sctp_data_not_frag()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_data_sack_immediately\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_240.txt", "contents": "fun box ip_rsvp_on()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rsvp_vif_off\u00b6\n[Source]\nfun box ip_rsvp_vif_off()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_rsvp_vif_on\u00b6\n[Source]"} +{"id": "Pony/builtin-F32-_65.txt", "contents": "\n\nu8_unsafe\u00b6\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nu16_unsafe\u00b6\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n"} +{"id": "Pony/src-cli-command-_18.txt", "contents": "\"\"\"\ntry _value as U64 else U64(0) end\n\nfun f64(): F64 =>\n\"\"\"\nReturns the arg value as an F64, defaulting to 0.0.\n\"\"\"\ntry _value as F64 else F64(0) end\n\nfun string_seq(): ReadSeq[String] val =>\n\"\"\"\nReturns the arg value as a ReadSeq[String], defaulting to empty.\n\"\"\"\ntry\n_value as _StringSeq val\nelse\nrecover val Array[String]() end\nend\n\nfun deb_string(): String =>"} +{"id": "Pony/net-OSSockOpt-_115.txt", "contents": "fun box ipctl_intrdqmaxlen()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_intrqdrops\u00b6\n[Source]\nfun box ipctl_intrqdrops()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipctl_intrqmaxlen\u00b6\n[Source]"} +{"id": "Pony/src-files-file_info-_0.txt", "contents": "\n\n\n\n\n\n\nfile_info.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-udp_socket-_54.txt", "contents": "| 0 =>\n// System call was successful\n| let errno: U32 =>\n// System call failed\nend\n```\n\"\"\"\n_OSSocket.setsockopt(_fd, level, option_name, option)\n\nfun ref setsockopt_u32(level: I32, option_name: I32, option: U32): U32 =>\n\"\"\"\nWrapper for UDP sockets to the `setsockopt(2)` system call where\nthe kernel expects an option value of a C `uint32_t` type / Pony\ntype `U32`.\n\nThis function returns `0` on success, else the value of `errno` on\nfailure.\n\"\"\"\n_OSSocket.setsockopt_u32(_fd, level, option_name, option)\n"} +{"id": "Pony/builtin-U16-_12.txt", "contents": "\ny: U16 val\n\nReturns\u00b6\n\n(U16 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: U16 val)\n: (U16 val , Bool val)\n\nParameters\u00b6\n\ny: U16 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-real-_70.txt", "contents": "fun pow(y: A): A\nfun powi(y: I32): A\n\nfun sqrt(): A\n\nfun sqrt_unsafe(): A\n\"\"\"\nUnsafe operation.\nIf this is negative, the result is undefined.\n\"\"\"\n\nfun cbrt(): A\nfun exp(): A\nfun exp2(): A\n\nfun cos(): A\nfun sin(): A\nfun tan(): A\n\nfun cosh(): A"} +{"id": "Pony/src-pony_check-generator-_95.txt", "contents": "object is GenObj[Array[T]]\nlet _gen: GenObj[Array[T]] = gen\nfun generate(rnd: Randomness): GenerateResult[Array[T]] ? =>\n(let arr, let source_shrink_iter) = _gen.generate_and_shrink(rnd)?\nrnd.shuffle[T](arr)\nlet shrink_iter =\nIter[Array[T]](source_shrink_iter)\n.map_stateful[Array[T]^]({\n(shrink_arr: Array[T]): Array[T]^ =>\nrnd.shuffle[T](shrink_arr)\nconsume shrink_arr\n})\n(consume arr, shrink_iter)\nend\n)\n\nfun shuffled_iter[T](array: Array[T]): Generator[Iterator[this->T!]] =>\nGenerator[Iterator[this->T!]](\nobject is GenObj[Iterator[this->T!]]\nfun generate(rnd: Randomness): GenerateResult[Iterator[this->T!]] =>"} +{"id": "Pony/src-builtin-float-_0.txt", "contents": "\n\n\n\n\n\n\nfloat.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I8-_4.txt", "contents": "\nU8 val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nbswap\u00b6\n[Source]\nfun box bswap()\n: I8 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-ULong-_35.txt", "contents": "ULong val\n\n\nneg_unsafe\u00b6\n[Source]\nfun box neg_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: ULong val)\n: ULong val\n\nParameters\u00b6"} +{"id": "Pony/builtin-ISize-_17.txt", "contents": "[Source]\nfun box fldc(\ny: ISize val)\n: (ISize val , Bool val)\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\n(ISize val , Bool val)\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: ISize val)\n: (ISize val , Bool val)\n"} +{"id": "Pony/src-builtin-float-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/builtin-U8-_3.txt", "contents": "U8 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: U8 val^\n\nReturns\u00b6\n\nU8 val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/9_object-literals_8.txt", "contents": "let l = List[String]\nl.>push(\"hello\").push(\"world\")\nvar count = U32(0)\nfor_each(l, {ref(s:String) =>\nenv.out.print(s)\ncount = count + 1\n})\n// Displays '0' as the count\nenv.out.print(\"Count: \" + count.string())\n\nfun for_each(l: List[String], f: {ref(String)} ref) =>\ntry\nf(l.shift()?)\nfor_each(l, f)\nend\n```\n\nThis example declares the type of the apply function that is generated by the lambda expression as being `ref`. The lambda type declaration for the `f` parameter in the `for_each` method also declares it as `ref`. The reference capability of the lambda type must also be `ref` so that the method can be called. The lambda object does not need to declare an explicit reference capability because `ref` is the default for a lambda that has captures.\n\nThe above example also notes a subtle reality of captured references. At first glance one might expect `count` to have been incremented by the application of `f`. However, reassigning a reference, `count = count + 1`, inside a lambda or object literal can never cause a reassignment in the outer scope. If `count` were an object with reference capabilities permitting mutation, the captured reference could be modified with for example `count.increment()`. The resulting mutation would be visible to any location holding a reference to the same object as `count`."} +{"id": "Pony/src-collections-set-_29.txt", "contents": "(size() > that.size()) and (that <= this)\n\nfun ge(that: HashSet[A, H] box): Bool =>\n\"\"\"\nReturns true if every element in that is also in this.\n\"\"\"\nthat <= this\n\nfun next_index(prev: USize = -1): USize ? =>\n\"\"\"\nGiven an index, return the next index that has a populated value. Raise an\nerror if there is no next populated index.\n\"\"\"\n_map.next_index(prev)?\n\nfun index(i: USize): this->A ? =>\n\"\"\"\nReturns the value at a given index. Raise an error if the index is not\npopulated.\n\"\"\""} +{"id": "Pony/collections-HashFunction64-_0.txt", "contents": "\n\n\n\n\n\n\nHashFunction64[A: A]\u00b6\n[Source]\nA pluggable hash function with 64-bit hashes.\ninterface val HashFunction64[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nData structures create instances internally. Use a primitive if possible.\nnew val create()\n: HashFunction64[A] val^\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-do_not_optimise-_2.txt", "contents": "fun observe() =>\n\"\"\"\nPrevent the compiler from optimising out writes to an object marked by\nthe apply function.\n\"\"\"\ncompile_intrinsic\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-F64-_4.txt", "contents": "\na: B\n\nReturns\u00b6\n\nF64 val^\n\n\nmin_value\u00b6\n[Source]\nMinimum negative value representable.\nnew val min_value()\n: F64 val^\n\nReturns\u00b6\n\nF64 val^\n\n\nmax_value\u00b6"} +{"id": "Pony/collections-SetIs-_0.txt", "contents": "\n\n\n\n\n\n\nSetIs[A: A]\u00b6\n[Source]\ntype SetIs[A: A] is\nHashSet[A, HashIs[A!] val] ref\n\nType Alias For\u00b6\n\nHashSet[A, HashIs[A!] val] ref\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_621.txt", "contents": "fun box udp_nocksum()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_no_check6_rx\u00b6\n[Source]\nfun box udp_no_check6_rx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_no_check6_tx\u00b6\n[Source]"} +{"id": "Pony/5_methods_2.txt", "contents": "\nIf you want to exit a function early then use the `return` command. If the function has a return type then you need to provide a value to return. If the function does not have a return type then `return` should appear on its own, without a value.\n\n__Can I overload functions by argument type?__ No, you cannot have multiple methods with the same name in the same type.\n"} +{"id": "Pony/as_2.txt", "contents": "\nIn the above example, within `pet` our current view of `animal` is via the type union `Animal`. To treat `animal` as a cat, we need to do a runtime check that the concrete type of the object instance is `Cat`. If it is, then we can pet it. This example is a little contrived, but hopefully elucidates how `as` can be used to take a type that is a union and get a specific concrete type from it.\n\nNote that the type requested as the `as` argument must exist as a type of the object instance, unlike C casting where one type can be forced to become another type. Coercion from one concrete type to another is not possible using `as`, so one can not do `let value:F64 = F32(1.0) as F64`. `F32` and `F64` are both concrete types and each object can only have a single concrete type. Many concrete types do provide methods that allow you to convert them to another concrete type, for example, `F32(1.0).f64()` to convert an `F32` to an `F64` or `F32(1.0).string()` to convert to a string.\n\nIn addition to using `as` with a union of disjoint types, we can also express an intersected type of the object, meaning the object has a type that the alias we have for the object is not directly related to the type we want to express. For example:\n\n```pony\ntrait Alive\n\ntrait Well\n\nclass Person is (Alive & Well)\n\nclass LifeSigns\nfun is_all_good(alive: Alive)? =>\n// if the instance 'alive' is also of type 'Well' (such as a Person instance). raises error if not possible\nlet well: Well = alive as Well\n```\n"} +{"id": "Pony/buffered-Reader-_14.txt", "contents": "\n\ni32_le\u00b6\n[Source]\nGet a little-endian I32.\nfun ref i32_le()\n: I32 val ?\n\nReturns\u00b6\n\nI32 val ?\n\n\nu64_be\u00b6\n[Source]\nGet a big-endian U64.\nfun ref u64_be()\n: U64 val ?\n\nReturns\u00b6"} +{"id": "Pony/builtin-I32-_29.txt", "contents": "fun box sub_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmul_unsafe\u00b6\n[Source]\nfun box mul_unsafe(\ny: I32 val)\n: I32 val\n\nParameters\u00b6"} +{"id": "Pony/debug-DebugOut-_2.txt", "contents": "fun box ne(\nthat: DebugOut val)\n: Bool val\n\nParameters\u00b6\n\nthat: DebugOut val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-flag-_15.txt", "contents": "Unset flags that are set in that.\n\"\"\"\n_value = this._value and not that._value\n\nfun add(flag: A): Flags[A, B] iso^ =>\n\"\"\"\nThis with the flag set.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value or flag.value()\nf\n\nfun sub(flag: A): Flags[A, B] iso^ =>\n\"\"\"\nThis with the flag unset.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value and not flag.value()\nf\n"} +{"id": "Pony/src-pony_check-for_all-_10.txt", "contents": "\nnew create(\ngen1': Generator[T1] val,\ngen2': Generator[T2] val,\ngen3': Generator[T3] val,\ngen4': Generator[T4] val,\nh: TestHelper)\n=>\n_gen1 = gen1'\n_gen2 = gen2'\n_gen3 = gen3'\n_gen4 = gen4'\n_helper = h\n\nfun ref apply(prop: {(T1, T2, T3, T4, PropertyHelper) ?} val) ? =>\nProperty4UnitTest[T1, T2, T3, T4](\nobject iso is Property4[T1, T2, T3, T4]\nfun name(): String => \"\"\nfun gen1(): Generator[T1] => _gen1\nfun gen2(): Generator[T2] => _gen2"} +{"id": "Pony/builtin-Equal-_2.txt", "contents": "[Source]\nfun box eq(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n\nParameters\u00b6\n\nthat: (Less val | Equal val | Greater val)\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: (Less val | Equal val | Greater val))\n: Bool val\n"} +{"id": "Pony/builtin-U128-_3.txt", "contents": "U128 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: U128 val^\n\nReturns\u00b6\n\nU128 val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-F32-_52.txt", "contents": "y: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\nfun box ne(\ny: F32 val)\n: Bool val\n\nParameters\u00b6\n\ny: F32 val"} +{"id": "Pony/collections-persistent-Map-_0.txt", "contents": "\n\n\n\n\n\n\nMap[K: (Hashable val & Equatable[K]), V: Any #share]\u00b6\n[Source]\nA map that uses structural equality on the key.\ntype Map[K: (Hashable val & Equatable[K]), V: Any #share] is\nHashMap[K, V, HashEq[K] val] val\n\nType Alias For\u00b6\n\nHashMap[K, V, HashEq[K] val] val\n\n\n\n"} +{"id": "Pony/src-net-ossockopt-_60.txt", "contents": "1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211"} +{"id": "Pony/src-files-directory-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-String-_60.txt", "contents": "that: String box\n\nReturns\u00b6\n\nString iso^\n\n\njoin\u00b6\n[Source]\nReturn a string that is a concatenation of the strings in data, using this\nas a separator.\nfun box join(\ndata: Iterator[Stringable box] ref)\n: String iso^\n\nParameters\u00b6\n\ndata: Iterator[Stringable box] ref\n\nReturns\u00b6"} +{"id": "Pony/builtin-String-_43.txt", "contents": "\nshift\u00b6\n[Source]\nRemoves a byte from the beginning of the string.\nfun ref shift()\n: U8 val ?\n\nReturns\u00b6\n\nU8 val ?\n\n\nappend\u00b6\n[Source]\nAppend the elements from a sequence, starting from the given offset.\nfun ref append(\nseq: ReadSeq[U8 val] box,\noffset: USize val = 0,\nlen: USize val = call)\n: None val"} +{"id": "Pony/builtin-U128-_34.txt", "contents": "fun box mod(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nmodc\u00b6\n[Source]\nfun box modc(\ny: U128 val)\n: (U128 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-stdin-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-U32-_13.txt", "contents": "(U32 val , Bool val)\n\n\ndivc\u00b6\n[Source]\nfun box divc(\ny: U32 val)\n: (U32 val , Bool val)\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\n(U32 val , Bool val)\n\n\nremc\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-unit_test-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-generator-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-net-tcp_connection-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/net-NetAddress-_10.txt", "contents": "\nthat: NetAddress val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_204.txt", "contents": "fun box ip_fw_del()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_flush\u00b6\n[Source]\nfun box ip_fw_flush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_fw_get\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_613.txt", "contents": "fun box tipc_subscr_timeout()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_sub_cancel\u00b6\n[Source]\nfun box tipc_sub_cancel()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_sub_ports\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_98.txt", "contents": "fun pairs(): ArrayPairs[A, this->Array[A]]^ =>\n\"\"\"\nReturn an iterator over the (index, value) pairs in the array.\n\"\"\"\nArrayPairs[A, this->Array[A]](this)\n\nclass ArrayKeys[A, B: Array[A] #read] is Iterator[USize]\nlet _array: B\nvar _i: USize\n\nnew create(array: B) =>\n_array = array\n_i = 0\n\nfun has_next(): Bool =>\n_i < _array.size()\n\nfun ref next(): USize =>\nif _i < _array.size() then\n_i = _i + 1"} +{"id": "Pony/net-OSSockOpt-_13.txt", "contents": "fun box ipproto_ddp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_dgp\u00b6\n[Source]\nfun box ipproto_dgp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_divert\u00b6\n[Source]"} +{"id": "Pony/builtin-I64-_17.txt", "contents": "fun box remc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , Bool val)\n\n\nfldc\u00b6\n[Source]\nfun box fldc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/builtin-FloatingPoint-_1.txt", "contents": "new val min_normalised()\n: FloatingPoint[A] val^\n\nReturns\u00b6\n\nFloatingPoint[A] val^\n\n\nepsilon\u00b6\n[Source]\nnew val epsilon()\n: FloatingPoint[A] val^\n\nReturns\u00b6\n\nFloatingPoint[A] val^\n\n\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-files-directory-_37.txt", "contents": "or @ponyint_o_cloexec())\n_relative(path', fd')\nelse\nrecover create(path')? end\nend\n\nfun mkdir(target: String): Bool =>\n\"\"\"\nCreates a directory relative to this one. Returns false if the path is\nnot within this directory hierarchy or if FileMkdir permission is missing.\n\"\"\"\nif\nnot path.caps(FileMkdir) or\nnot path.caps(FileLookup) or\n(_fd == -1)\nthen\nreturn false\nend\n\ntry"} +{"id": "Pony/src-buffered-reader-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/collections-HashSet-_12.txt", "contents": "\nvalue: box->this->A!\n\nReturns\u00b6\n\nHashSet[this->A!, K] ref^\n\n\nop_or[optional K: HashFunction[this->A!] val]\u00b6\n[Source]\nCreate a set with the elements of both this and that.\nfun box op_or[optional K: HashFunction[this->A!] val](\nthat: this->HashSet[A, H] ref)\n: HashSet[this->A!, K] ref^\n\nParameters\u00b6\n\nthat: this->HashSet[A, H] ref\n\nReturns\u00b6"} +{"id": "Pony/random-XorOshiro128StarStar-_10.txt", "contents": ": ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize\u00b6\n[Source]\nfun ref isize()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nint_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |"} +{"id": "Pony/src-process-process_monitor-_33.txt", "contents": "_write_final(data)\n_write_final(\"\\n\")\nend\n\nbe write(data: ByteSeq) =>\n\"\"\"\nWrite to STDIN of the child process.\n\"\"\"\nif not _done_writing then\n_write_final(data)\nend\n\nbe printv(data: ByteSeqIter) =>\n\"\"\"\nPrint an iterable collection of ByteSeqs.\n\"\"\"\nfor bytes in data.values() do\n_write_final(bytes)\n_write_final(\"\\n\")\nend"} +{"id": "Pony/src-builtin-iterator-_0.txt", "contents": "\n\n\n\n\n\n\niterator.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-FloatingPoint-_4.txt", "contents": "Real[A] val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: Real[A] val^\n\nReturns\u00b6\n\nReal[A] val^\n\n\nPublic Functions\u00b6\nradix\u00b6\n[Source]\nfun tag radix()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-pony_check-property_runner-_25.txt", "contents": "_Run.create(this._round + 1)\n\nfun eq(other: box->_Round): Bool =>\nmatch other\n| let s: _Run => s._round == this._round\nelse\nfalse\nend\n\nfun string(): String iso^ =>\n(\"run(\" + this._round.string() + \")\").string()\n\ntype _Round is (_Shrink | _Run)\n\"\"\"Represents a single execution of a property.\"\"\"\n\n\ninterface val PropertyLogger\nfun log(msg: String, verbose: Bool = false)\n\ninterface val PropertyResultNotify"} +{"id": "Pony/builtin-I64-_63.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-process-_process-_30.txt", "contents": ".>append(\"Signaled(\")\n.>append(_signal.string())\n.>append(\")\")\nend\n\nfun eq(other: ProcessExitStatus): Bool =>\nmatch other\n| let s: Signaled =>\ns._signal == _signal\nelse\nfalse\nend\n\n\ntype ProcessExitStatus is (Exited | Signaled)\n\"\"\"\nRepresenting possible exit states of processes.\nA process either exited with an exit code or, only on posix systems,\nhas been terminated by a signal.\n\"\"\""} +{"id": "Pony/src-pony_check-property_helper-_32.txt", "contents": "+ (digestof actual).string() + \")\"))\nreturn false\nend\n\n_runner.log(\n_fmt_msg(loc, \"Assert is passed. \" + msg\n+ \" Got (\" + (digestof expect).string() + \") is (\"\n+ (digestof actual).string() + \")\"),\ntrue)\ntrue\n\nfun assert_isnt[A](\nnot_expect: A,\nactual: A,\nmsg: String = \"\",\nloc: SourceLoc = __loc)\n: Bool\n=>\n\"\"\"\nAssert that the 2 given expressions resolve to different instances."} +{"id": "Pony/pony_bench-MicroBenchmark-_3.txt", "contents": "[Source]\nfun ref before_iteration()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\napply\u00b6\n[Source]\nfun ref apply()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n\nafter\u00b6"} +{"id": "Pony/src-net-tcp_connection-_18.txt", "contents": "352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371"} +{"id": "Pony/src-collections-map-_45.txt", "contents": "\"\"\"\n_i = _map.next_index(_i)?\n_count = _count + 1\n_map.index(_i)?._1\n\nclass MapValues[K, V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[M->V]\n\"\"\"\nAn iterator over the values in a map.\n\"\"\"\nlet _map: M\nvar _i: USize = -1\nvar _count: USize = 0\n\nnew create(map: M) =>\n\"\"\"\nCreates an iterator for the given map.\n\"\"\"\n_map = map\n"} +{"id": "Pony/builtin-F32-_32.txt", "contents": "\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nacosh\u00b6\n[Source]\nfun box acosh()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n"} +{"id": "Pony/src-files-file_mode-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-ISize-_35.txt", "contents": "\nISize val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nadd\u00b6\n[Source]\nfun box add(\ny: ISize val)\n: ISize val\n"} +{"id": "Pony/src-collections-list-_78.txt", "contents": "acc: List[this->A!]): List[this->A!]\n=>\n\"\"\"\nPrivate helper for `filter`, recursively working with `ListNode`s.\n\"\"\"\ntry\nlet cur = ln()?\nif f(cur) then acc.push(cur) end\nend\n\ntry\n_filter(ln.next() as this->ListNode[A], f, acc)\nelse\nacc\nend\n\nfun fold[B](f: {(B!, this->A!): B^} box, acc: B): B =>\n\"\"\"\nFolds the elements of the `List` using the supplied function.\n"} +{"id": "Pony/itertools-Iter-_30.txt", "contents": "function on_error will be called if the iterator's has_next method\nreturns true but its next method throws an error.\nExample\u00b6\nIter[I64]([1; 2; 3].values())\n.map[None]({(x) => env.out.print(x.string()) })\n.run()\n\n1\n2\n3\n\nfun ref run(\non_error: {ref()}[A] ref = lambda)\n: None val\n\nParameters\u00b6\n\non_error: {ref()}[A] ref = lambda\n\nReturns\u00b6"} +{"id": "Pony/src-files-directory-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/src-files-file-_66.txt", "contents": "end\n\nfun _final() =>\n\"\"\"\nClose the file.\n\"\"\"\nif _fd != -1 then\nif (_pending_writev_total > 0) and (_errno is FileOK) then\n// attempt to write any buffered data\ntry\n_write_to_disk()?\nend\nend\nif _unsynced_data or _unsynced_metadata then\n// attempt to sync any un-synced data\nif (path.caps.value() and FileSync.value()) > 0 then\nifdef windows then\n@FlushFileBuffers(@_get_osfhandle(_fd))\nelse\n@fsync(_fd)"} +{"id": "Pony/net-OSSockOpt-_548.txt", "contents": "fun box tcpolen_eol()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_fastopen_req\u00b6\n[Source]\nfun box tcpolen_fastopen_req()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcpolen_fast_open_empty\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-ILong-_60.txt", "contents": "\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U32-_58.txt", "contents": "fun box i64_unsafe()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]"} +{"id": "Pony/builtin-I32-_62.txt", "contents": "fun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ncompare\u00b6\n[Source]\nfun box compare(\nthat: I32 val)\n: (Less val | Equal val | Greater val)\n\nParameters\u00b6\n\nthat: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/buffered-Writer-_10.txt", "contents": "\ndata: U32 val\n\nReturns\u00b6\n\nNone val\n\n\nu32_be\u00b6\n[Source]\nWrite a U32 to the buffer in big-endian byte order.\nfun ref u32_be(\ndata: U32 val)\n: None val\n\nParameters\u00b6\n\ndata: U32 val\n\nReturns\u00b6"} +{"id": "Pony/random-XorShift128Plus-_8.txt", "contents": "i16\u00b6\n[Source]\nfun ref i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n"} +{"id": "Pony/src-net-tcp_connection-_39.txt", "contents": "772\n773\n774\n775\n776\n777\n778\n779\n780\n781\n782\n783\n784\n785\n786\n787\n788\n789\n790\n791"} +{"id": "Pony/builtin-F32-_16.txt", "contents": "fun box fld_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: F32 val)\n: F32 val\n\nParameters\u00b6"} +{"id": "Pony/pony_check-PonyCheck-_1.txt", "contents": "\n\nPublic Functions\u00b6\nfor_all[T: T]\u00b6\n[Source]\nConvenience method for running 1 to many properties as part of\none PonyTest UnitTest.\nExample:\nclass MyTestWithSomeProperties is UnitTest\nfun name(): String => \"mytest/withMultipleProperties\"\n\nfun apply(h: TestHelper) =>\nPonyCheck.for_all[U8](recover Generators.unit[U8](0) end, h)(\n{(u, h) =>\nh.assert_eq(u, 0)\nconsume u\n})\n\nfun box for_all[T: T](\ngen: Generator[T] val,"} +{"id": "Pony/builtin-SignedInteger-_61.txt", "contents": "ULong val\n\n\nusize_unsafe\u00b6\n[Source]\nfun box usize_unsafe()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nf32_unsafe\u00b6\n[Source]\nfun box f32_unsafe()\n: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection-_20.txt", "contents": "392\n393\n394\n395\n396\n397\n398\n399\n400\n401\n402\n403\n404\n405\n406\n407\n408\n409\n410\n411"} +{"id": "Pony/builtin-I8-_48.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/builtin-U32-_40.txt", "contents": "U32 val\n\n\ndiv\u00b6\n[Source]\nfun box div(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\ndivrem\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_48.txt", "contents": "952\n953\n954\n955\n956\n957\n958\n959\n960\n961\n962\n963\n964\n965\n966\n967\n968\n969\n970\n971"} +{"id": "Pony/src-net-udp_socket-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/builtin-F32-_0.txt", "contents": "\n\n\n\n\n\n\nF32\u00b6\n[Source]\nprimitive val F32 is\nFloatingPoint[F32 val] val\n\nImplements\u00b6\n\nFloatingPoint[F32 val] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-property_runner-_45.txt", "contents": "| (let s1: ReadSeq[Stringable], let s2: ReadSeq[Stringable]) =>\n\"([\" + \" \".join(s1.values()) + \"], [\" + \" \".join(s2.values()) + \"])\"\n| (let s1: Stringable, let s2: Stringable, let s3: Stringable) =>\n\"(\" + s1.string() + \", \" + s2.string() + \", \" + s3.string() + \")\"\n| ((let s1: Stringable, let s2: Stringable), let s3: Stringable) =>\n\"((\" + s1.string() + \", \" + s2.string() + \"), \" + s3.string() + \")\"\n| (let s1: Stringable, (let s2: Stringable, let s3: Stringable)) =>\n\"(\" + s1.string() + \", (\" + s2.string() + \", \" + s3.string() + \"))\"\nelse\n\"\"\nend\n(consume t, consume s)\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-Array-_1.txt", "contents": "// array.space() >= 10\n\nAccessing elements can be done via the apply(i: USize): this->A ? method.\nThe provided index might be out of bounds so apply is partial and has to be\ncalled within a try-catch block or inside another partial method:\nlet array: Array[String] = [\"dog\"; \"cat\"; \"wombat\"]\nlet is_second_element_wobat = try\n// indexes start from 0, so 1 is the second element\narray(1)? == \"wombat\"\nelse\nfalse\nend\n\nAdding and removing elements to and from the end of the Array can be done via\npush and pop methods. You could treat the array as a LIFO stack using\nthose methods:\nwhile (array.size() > 0) do\nlet elem = array.pop()?\n// do something with element\nend"} +{"id": "Pony/src-files-file-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-U32-_26.txt", "contents": "fun box mod_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6"} +{"id": "Pony/src-builtin-float-_33.txt", "contents": "fun tag precision2(): U8 =>\n\"\"\"\nMantissa precision in bits.\n\"\"\"\n24\n\nfun tag precision10(): U8 =>\n\"\"\"\nMantissa precision in decimal digits.\n\"\"\"\n6\n\nfun tag min_exp2(): I16 =>\n\"\"\"\nMinimum exponent value such that (2^exponent) - 1 is representable at full\nprecision (ie a normalised number).\n\"\"\"\n-125\n\nfun tag min_exp10(): I16 =>"} +{"id": "Pony/src-files-file-_24.txt", "contents": "472\n473\n474\n475\n476\n477\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491"} +{"id": "Pony/src-pony_check-generator-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/process-PipeError-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I32-_25.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nI32 val\n\n\nshr\u00b6\n[Source]\nfun box shr(\ny: U32 val)\n: I32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-process-process_monitor-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/builtin-SourceLoc-_1.txt", "contents": "\nString val\n\n\ntype_name\u00b6\n[Source]\nName of nearest class, actor, primitive, struct, interface, or trait.\nfun box type_name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nmethod_name\u00b6\n[Source]\nName of containing method.\nfun box method_name()\n: String val"} +{"id": "Pony/builtin-I32-_47.txt", "contents": "fun box i16()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun box i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi_term-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/src-cli-command-_11.txt", "contents": "_spec = spec'\n_fullname = fullname'\n_options = options'\n_args = args'\n\nfun string(): String iso^ =>\n\"\"\"\nReturns a representational string for this command.\n\"\"\"\nlet s: String iso = fullname().clone()\nfor o in _options.values() do\ns.append(\" \")\ns.append(o.deb_string())\nend\nfor a in _args.values() do\ns.append(\" \")\ns.append(a.deb_string())\nend\ns\n"} +{"id": "Pony/net-OSSockOpt-_506.txt", "contents": "fun box so_np_extensions()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_nread\u00b6\n[Source]\nfun box so_nread()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_numrcvpkt\u00b6\n[Source]"} +{"id": "Pony/pony_check-PonyCheck-_2.txt", "contents": "h: TestHelper val)\n: ForAll[T] ref\n\nParameters\u00b6\n\ngen: Generator[T] val\nh: TestHelper val\n\nReturns\u00b6\n\nForAll[T] ref\n\n\nfor_all2[T1: T1, T2: T2]\u00b6\n[Source]\nfun box for_all2[T1: T1, T2: T2](\ngen1: Generator[T1] val,\ngen2: Generator[T2] val,\nh: TestHelper val)\n: ForAll2[T1, T2] ref"} +{"id": "Pony/src-builtin-array-_41.txt", "contents": "812\n813\n814\n815\n816\n817\n818\n819\n820\n821\n822\n823\n824\n825\n826\n827\n828\n829\n830\n831"} +{"id": "Pony/builtin-U128-_16.txt", "contents": "Returns\u00b6\n\nU128 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box divrem_unsafe(\ny: U128 val)\n: (U128 val , U128 val)\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/cli--index-_6.txt", "contents": "class Option\nclass OptionSpec\nclass SyntaxError\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-I128-_23.txt", "contents": "\nf64_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf the value doesn't fit in the destination type, the result is undefined.\nfun box f64_unsafe()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: I128 val)\n: (I128 val , Bool val)\n\nParameters\u00b6"} +{"id": "Pony/9_object-literals_1.txt", "contents": "# What's this look like, then?\n\nIt basically looks like any other type definition, but with some small differences. Here's a simple one:\n\n```pony\nobject\nfun apply(): String => \"hi\"\nend\n```\n\nOk, that's pretty trivial. Let's extend it so that it explicitly provides an interface so that the compiler will make sure the anonymous type fulfills that interface. You can use the same notation to provide traits as well.\n\n```pony\nobject is Hashable\nfun apply(): String => \"hi\"\nfun hash(): USize => this().hash()\nend\n```\n\nWhat we can't do is specify constructors in an object literal, because the literal _is_ the constructor. So how do we assign to fields? Well, we just assign to them. For example:"} +{"id": "Pony/builtin-U8-_15.txt", "contents": "\ny: U8 val\n\nReturns\u00b6\n\nU8 val ?\n\n\nsub_partial\u00b6\n[Source]\nfun box sub_partial(\ny: U8 val)\n: U8 val ?\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Pointer-_4.txt", "contents": "\nlt\u00b6\n[Source]\nReturn true if this address is less than that address.\nfun tag lt(\nthat: Pointer[A] tag)\n: Bool val\n\nParameters\u00b6\n\nthat: Pointer[A] tag\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun tag ne("} +{"id": "Pony/src-pony_bench-pony_bench-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-builtin-unsigned-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/7_equality_3.txt", "contents": "# Structural equality\n\nStructural equality checking in Pony is done via the infix operator `==`. It verifies that two items have the same value. If the identity of the items being compared is the same, then by definition they have the same value.\n\nYou can define how structural equality is checked on your object by implementing `fun eq(that: box->Foo): Bool`. Remember, since `==` is an infix operator, `eq` must be defined on the left operand, and the right operand must be of type `Foo`.\n\n```pony\nclass Foo\nlet _a: String\n\nnew create(a: String) =>\n_a = a\n\nfun eq(that: box->Foo): Bool =>\nthis._a == that._a\n\nactor Main\nnew create(e: Env) =>\nlet a = Foo(\"hi\")\nlet b = Foo(\"bye\")"} +{"id": "Pony/builtin-ULong-_1.txt", "contents": "new val create(\nvalue: ULong val)\n: ULong val^\n\nParameters\u00b6\n\nvalue: ULong val\n\nReturns\u00b6\n\nULong val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/buffered-Reader-_38.txt", "contents": "\n\npeek_f64_le\u00b6\n[Source]\nPeek at a little-endian F64.\nfun box peek_f64_le(\noffset: USize val = 0)\n: F64 val ?\n\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nF64 val ?\n\n\n\n"} +{"id": "Pony/src-process-process_notify-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/net-OSSockOpt-_107.txt", "contents": "fun box icmp_redir_hosttos()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_redir_net\u00b6\n[Source]\nfun box icmp_redir_net()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nicmp_redir_nettos\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_28.txt", "contents": "\nlog2\u00b6\n[Source]\nfun box log2()\n: A\n\nReturns\u00b6\n\nA\n\n\nlog10\u00b6\n[Source]\nfun box log10()\n: A\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/src-net-udp_socket-_30.txt", "contents": "\"\"\"\nCreates a UDP socket that can be used for sending and receiving UDP messages.\n\nThe following examples create:\n\n* an echo server that listens for connections and returns whatever message it\nreceives\n* a client that connects to the server, sends a message, and prints the\nmessage it receives in response\n\nThe server is implemented like this:\n\n```pony\nuse \"net\"\n\nclass MyUDPNotify is UDPNotify\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8] iso,\nfrom: NetAddress)"} +{"id": "Pony/process-UnknownError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: UnknownError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_609.txt", "contents": "fun box tipc_node_recvq_depth()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_node_scope\u00b6\n[Source]\nfun box tipc_node_scope()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_ok\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_85.txt", "contents": "fun box dccp_sockopt_tx_ccid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_acceptmode\u00b6\n[Source]\nfun box dso_acceptmode()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_conaccept\u00b6\n[Source]"} +{"id": "Pony/src-builtin-source_loc-_2.txt", "contents": "Represents a location in a Pony source file, as reported by `__loc`.\n\"\"\"\nfun file(): String\n\"\"\"\nName and path of source file.\n\"\"\"\n\nfun type_name(): String\n\"\"\"\nName of nearest class, actor, primitive, struct, interface, or trait.\n\"\"\"\n\nfun method_name(): String\n\"\"\"\nName of containing method.\n\"\"\"\n\nfun line(): USize\n\"\"\"\nLine number within file."} +{"id": "Pony/src-net-tcp_listener-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-buffered-reader-_58.txt", "contents": "\noffset = offset + num_bytes\n_available = _available - num_bytes\n\nif offset < data.size() then\nnode()? = (data, offset)\nelse\n_chunks.shift()?\nend\nr\nelse\n// single array did not have all the bytes needed\nu8()?.u32() or (u8()?.u32() << 8) or\n(u8()?.u32() << 16) or (u8()?.u32() << 24)\nend\nelse\nerror\nend\n\nfun ref i32_be(): I32 ? =>"} +{"id": "Pony/builtin-F64-_33.txt", "contents": "asinh\u00b6\n[Source]\nfun box asinh()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\natanh\u00b6\n[Source]\nfun box atanh()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n"} +{"id": "Pony/builtin-I128-_54.txt", "contents": "U32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I32-_63.txt", "contents": "(Less val | Equal val | Greater val)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/signals-SignalRaise-_0.txt", "contents": "\n\n\n\n\n\n\nSignalRaise\u00b6\n[Source]\nRaise a signal.\nprimitive val SignalRaise\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: SignalRaise val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_170.txt", "contents": "```pony\n\"1.5\".f64()? == F64(1.5)\n\"1.19208e-07\".f64()? == F64(1.19208e-07)\n\"Inf\".f64()?.infinite() == true\n```\n\"\"\"\nlet index = offset_to_index(offset)\nif index < _size then\nlet ptr = this.cstring()\nvar endp: Pointer[U8] box = Pointer[U8]\n@pony_os_clear_errno()\nlet res = @strtod(ptr.offset(index), addressof endp)\nlet errno: I32 = @pony_os_errno()\nif (errno != 0) or (endp != ptr.offset(_size)) then\nerror\nelse\nres\nend\nelse\nerror"} +{"id": "Pony/4_control-structures_19.txt", "contents": "until counter > 7 end\n```\n\nJust like `while` loops, the value given by a `repeat` loop is the value of the expression within the loop on the last iteration, and `break` and `continue` can be used.\n\n__Since you always go round a repeat loop at least once, do you ever need to give it an else expression?__ Yes, you may need to. A `continue` in the last iteration of a `repeat` loop needs to get a value from somewhere, and an `else` expression is used for that.\n"} +{"id": "Pony/src-pony_check-int_properties-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145primitive _StringifyIntArg\nfun apply(choice: U8, int: U128): String iso ^ =>\nlet num =\nmatch choice % 14\n| 0 => \"U8(\" + int.u8().string() + \")\"\n| 1 => \"U16(\" + int.u16().string() + \")\"\n| 2 => \"U32(\" + int.u32().string() + \")\""} +{"id": "Pony/src-builtin-unsigned-_76.txt", "contents": "_UnsignedPartialArithmetic.add_partial[USize](this, y)?\n\nfun sub_partial(y: USize): USize ? =>\n_UnsignedPartialArithmetic.sub_partial[USize](this, y)?\n\nfun mul_partial(y: USize): USize ? =>\n_UnsignedPartialArithmetic.mul_partial[USize](this, y)?\n\nfun div_partial(y: USize): USize ? =>\n_UnsignedPartialArithmetic.div_partial[USize](this, y)?\n\nfun rem_partial(y: USize): USize ? =>\n_UnsignedPartialArithmetic.rem_partial[USize](this, y)?\n\nfun divrem_partial(y: USize): (USize, USize) ? =>\n_UnsignedPartialArithmetic.divrem_partial[USize](this, y)?\n\nprimitive U128 is UnsignedInteger[U128]\nnew create(value: U128) => value\nnew from[A: (Number & Real[A] val)](a: A) => a.u128()"} +{"id": "Pony/src-collections-heap-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/4_control-structures_2.txt", "contents": "`and` is the same as `&&` in C and `and` in python, and `or` is the same as `||` in C and `or` in python.\n\n__Can I use integers and pointers for the condition like I can in C?__ No. In Pony `if` conditions must have type `Bool`, i.e. they are always true or false. If you want to test whether a number `a` is not 0, then you need to explicitly say `a != 0`. This restriction removes a whole category of potential bugs from Pony programs.\n\nIf you want some alternative code for when the condition fails just add an `else`:\n\n```pony\nif a > b then\nenv.out.print(\"a is bigger\")\nelse\nenv.out.print(\"a is not bigger\")\nend\n```\n\nOften you want to test more than one condition in one go, giving you more than two possible outcomes. You can nest `if` statements, but this quickly gets ugly:\n\n```pony\nif a == b then\nenv.out.print(\"they are the same\")\nelse"} +{"id": "Pony/src-files-file_path-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-collections-persistent-list-_52.txt", "contents": "fun _every(l: List[A], f: {(val->A): Bool} box): Bool =>\n\"\"\"\nPrivate helper for every, recursively testing predicate on elements,\nreturning false immediately on an element that fails to satisfy the\npredicate.\n\"\"\"\nmatch l\n| let cons: Cons[A] =>\nif (f(cons.head())) then\n_every(cons.tail(), f)\nelse\nfalse\nend\nelse\ntrue\nend\n\nfun val exists(f: {(val->A): Bool} box): Bool =>\n\"\"\"\nReturns true if at least one element satisfies the provided predicate,"} +{"id": "Pony/builtin-Array-_6.txt", "contents": "Array[A] ref^\n\n\ninit\u00b6\n[Source]\nCreate an array of len elements, all initialised to the given value.\nnew ref init(\nfrom: A^,\nlen: USize val)\n: Array[A] ref^\n\nParameters\u00b6\n\nfrom: A^\nlen: USize val\n\nReturns\u00b6\n\nArray[A] ref^\n"} +{"id": "Pony/2_ops_0.txt", "contents": "# Operators\n"} +{"id": "Pony/net-OSSockOpt-_185.txt", "contents": "fun box ipx_primary()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_ptype\u00b6\n[Source]\nfun box ipx_ptype()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipx_receive_broadcast\u00b6\n[Source]"} +{"id": "Pony/src-files-file-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/src-collections-flag-_16.txt", "contents": "fun op_or(that: Flags[A, B] box): Flags[A, B] iso^ =>\n\"\"\"\nThe union of this and that.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value or that._value\nf\n\nfun op_and(that: Flags[A, B] box): Flags[A, B] iso^ =>\n\"\"\"\nThe intersection of this and that.\n\"\"\"\nlet f = recover Flags[A, B] end\nf._value = this._value and that._value\nf\n\nfun op_xor(that: Flags[A, B] box): Flags[A, B] iso^ =>\n\"\"\"\nThe symmetric difference of this and that.\n\"\"\""} +{"id": "Pony/net-UDPSocket-_22.txt", "contents": "Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)\nfun ref get_so_rcvbuf()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n\nget_so_sndbuf\u00b6\n[Source]\nWrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)\nfun ref get_so_sndbuf()\n: (U32 val , U32 val)\n\nReturns\u00b6\n\n(U32 val , U32 val)\n\n"} +{"id": "Pony/src-cli-command_parser-_0.txt", "contents": "\n\n\n\n\n\n\ncommand_parser.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-net-udp_socket-_46.txt", "contents": "end\n\nif _closed then\nreturn\nend\n\n// Hand back read data\nlet size = _packet_size\nlet data = _read_buf = recover Array[U8] .> undefined(size) end\nlet from = _read_from = recover NetAddress end\ndata.truncate(len.usize())\n_notify.received(this, consume data, consume from)\n\n_start_next_read()\nend\n\nfun ref _start_next_read() =>\n\"\"\"\nStart our next receive.\nThis is used only with IOCP on Windows."} +{"id": "Pony/src-pony_check-generator-_142.txt", "contents": "and a maximum length of `max` codepoints (default: 100).\n\nNote that the byte length of the generated string can be up to 4 times\nthe size in code points.\n\"\"\"\nlet range_1 = u32(0x0, 0xD7FF)\nlet range_1_size: USize = 0xD7FF\n// excluding surrogate pairs\n// this might be duplicate work but increases efficiency\nlet range_2 = u32(0xE000, 0x10FFFF)\nlet range_2_size = U32(0x10FFFF - 0xE000).usize()\n\nlet code_point_gen =\nfrequency[U32]([\n(range_1_size, range_1)\n(range_2_size, range_2)\n])\nutf32_codepoint_string(code_point_gen, min, max)\n\nfun unicode_bmp("} +{"id": "Pony/builtin-F64-_16.txt", "contents": "fun box fld_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: F64 val)\n: F64 val\n\nParameters\u00b6"} +{"id": "Pony/src-pony_test-pony_test-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/format-FormatExpLarge-_0.txt", "contents": "\n\n\n\n\n\n\nFormatExpLarge\u00b6\n[Source]\nprimitive val FormatExpLarge is\nFormatSpec val\n\nImplements\u00b6\n\nFormatSpec val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/5_methods_3.txt", "contents": "# Constructors\n\nPony constructors are used to initialise newly created objects, as in many languages. However, unlike many languages, Pony constructors are named so you can have as many as you like, taking whatever parameters you like. By convention, the main constructor of each type (if there is such a thing for any given type) is called `create`.\n\n```pony\nclass Foo\nvar _x: U32\n\nnew create() =>\n_x = 0\n\nnew from_int(x: U32) =>\n_x = x\n```\n\nThe purpose of a constructor is to set up the internal state of the object being created. To ensure this is done constructors must initialise all the fields in the object being constructed.\n\n__Can I exit a constructor early?__ Yes. Just then use the `return` command without a value. The object must already be in a legal state to do this.\n"} +{"id": "Pony/src-files-path-_48.txt", "contents": "return path.trim(0, offset.usize() + 2)\nend\n\ntry\nif\nis_sep(path.at_offset(offset)?) and\nis_sep(path.at_offset(offset + 1)?)\nthen\nreturn _network_share(path, offset + 3)\nend\nend\nend\n\"\"\n\nfun _drive_letter(path: String, offset: ISize = 0): Bool =>\n\"\"\"\nLook for a drive letter followed by a ':', returning true if we find it.\n\"\"\"\ntry\nlet c = path.at_offset(offset)?"} +{"id": "Pony/net-OSSockOpt-_70.txt", "contents": "fun box sol_netrom()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_rds\u00b6\n[Source]\nfun box sol_rds()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsol_rfcomm\u00b6\n[Source]"} +{"id": "Pony/ponytest_4.txt", "contents": "# Aggregation\n\nOften it is desirable to run a collection of unit tests from multiple different source files. For example, if several packages within a bundle each have their own unit tests it may be useful to run all tests for the bundle together.\n\nThis can be achieved by writing an aggregate test list class, which calls the list function for each package. The following is an example that aggregates the tests from packages `foo` and `bar`.\n\n```pony\nuse \"pony_test\"\nuse foo = \"foo\"\nuse bar = \"bar\"\n\nactor Main is TestList\nnew create(env: Env) =>\nPonyTest(env, this)\n\nnew make() =>\nNone\n\nfun tag tests(test: PonyTest) =>\nfoo.Main.make().tests(test)"} +{"id": "Pony/collections-List-_42.txt", "contents": "Return an iterator on the values in the List in reverse order.\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet rvalues = my_list.rvalues() // value \"c\" is before value \"a\"\n\nfun box rvalues()\n: ListValues[A, this->ListNode[A] ref] ref^\n\nReturns\u00b6\n\nListValues[A, this->ListNode[A] ref] ref^\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_200.txt", "contents": "fun box ip_dummynet_flush()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dummynet_get\u00b6\n[Source]\nfun box ip_dummynet_get()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_faith\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_142.txt", "contents": "fun box ipv6_join_anycast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_leave_anycast\u00b6\n[Source]\nfun box ipv6_leave_anycast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_minhopcount\u00b6\n[Source]"} +{"id": "Pony/pony_check-Property1-_4.txt", "contents": "\narg1: T\nh: PropertyHelper val\n\nReturns\u00b6\n\nNone val ?\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-random-random-_17.txt", "contents": "\"\"\"\nu128().i128()\n\nfun ref ilong(): ILong =>\n\"\"\"\nA random integer in [ILong.min_value(), ILong.max_value()]\n\"\"\"\nulong().ilong()\n\nfun ref isize(): ISize =>\n\"\"\"\nA random integer in [ISize.min_value(), ISize.max_value()]\n\"\"\"\nusize().isize()\n\nfun ref int_fp_mult[N: (Unsigned val & Real[N] val) = U64](n: N): N =>\n\"\"\"\nA random integer in [0, n)\n\"\"\"\nN.from[F64](real() * n.f64())"} +{"id": "Pony/net-TCPConnectionNotify-_9.txt", "contents": "received\u00b6\n[Source]\nCalled when new data is received on the connection. Return true if you\nwant to continue receiving messages without yielding until you read\nmax_size on the TCPConnection. Return false to cause the TCPConnection\nto yield now.\nIncludes the number of times during the current behavior, that received has\nbeen called. This allows the notifier to end reads on a regular basis.\nfun ref received(\nconn: TCPConnection ref,\ndata: Array[U8 val] iso,\ntimes: USize val)\n: Bool val\n\nParameters\u00b6\n\nconn: TCPConnection ref\ndata: Array[U8 val] iso\ntimes: USize val\n"} +{"id": "Pony/net-OSSockOpt-_570.txt", "contents": "fun box tcp_cookie_transactions()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_cork\u00b6\n[Source]\nfun box tcp_cork()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntcp_defer_accept\u00b6\n[Source]"} +{"id": "Pony/format-FormatHexSmall-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: FormatHexSmall val)\n: Bool val\n\nParameters\u00b6\n\nthat: FormatHexSmall val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/src-process-_process-_44.txt", "contents": "end\nsize = size + 1 // last \\0\nvar environ = Array[U8](size)\nfor varr in vars.values() do\nenviron.append(varr)\nenviron.push(0)\nend\nenviron.push(0)\nenviron\n\nfun kill() =>\nif h_process != 0 then\n@ponyint_win_process_kill(h_process)\nend\n\nfun ref wait(): _WaitResult =>\nmatch final_wait_result\n| let wr: _WaitResult =>\nwr\nelse"} +{"id": "Pony/src-pony_check-pony_check-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/pony_check-Property1UnitTest-_0.txt", "contents": "\n\n\n\n\n\n\nProperty1UnitTest[T: T]\u00b6\n[Source]\nProvides plumbing for integration of PonyCheck\nProperties into PonyTest.\nWrap your properties into this class and use it in a\nTestList:\nuse \"pony_test\"\nuse \"pony_check\"\n\nclass MyProperty is Property1[String]\nfun name(): String => \"my_property\"\n\nfun gen(): Generator[String] =>"} +{"id": "Pony/net-OSSockOpt-_424.txt", "contents": "fun box sctp_pcb_flags_explicit_eor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_ext_rcvinfo\u00b6\n[Source]\nfun box sctp_pcb_flags_ext_rcvinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_pcb_flags_frag_interleave\u00b6\n[Source]"} +{"id": "Pony/src-builtin-env-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/builtin-U128-_26.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nU128 val ?\n\n\nmul_partial\u00b6\n[Source]\nfun box mul_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I64-_6.txt", "contents": "\nU64 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U64 val"} +{"id": "Pony/term-ANSINotify-_7.txt", "contents": "\nNone val\n\n\nhome\u00b6\n[Source]\nfun ref home(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_147.txt", "contents": "fun box ipv6_pathmtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pktinfo\u00b6\n[Source]\nfun box ipv6_pktinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_pmtudisc_do\u00b6\n[Source]"} +{"id": "Pony/format-PrefixDefault-_2.txt", "contents": "\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: PrefixDefault val)\n: Bool val\n\nParameters\u00b6\n\nthat: PrefixDefault val\n\nReturns\u00b6\n\nBool val\n\n\n"} +{"id": "Pony/net-OSSockOpt-_509.txt", "contents": "fun box so_passcred()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_passsec\u00b6\n[Source]\nfun box so_passsec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_peek_off\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_25.txt", "contents": "end\n\n// Fill in option values from env or from coded defaults.\nfor os in _spec.options().values() do\nif not options.contains(os.name()) then\n// Lookup and use env vars before code defaults\nif envsmap.contains(os.name()) then\nlet vs =\ntry\nenvsmap(os.name())?\nelse // TODO(cq) why is else needed? we just checked\n\"\"\nend\nlet v: _Value =\nmatch _ValueParser.parse(os._typ_p(), vs)\n| let v: _Value => v\n| let se: SyntaxError => return se\nend\noptions.update(os.name(), Option(os, v))\nelse"} +{"id": "Pony/net-OSSockOpt-_518.txt", "contents": "fun box so_rds_transport()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_reuseaddr\u00b6\n[Source]\nfun box so_reuseaddr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nso_reuseport\u00b6\n[Source]"} +{"id": "Pony/files-Path-_5.txt", "contents": "\npath: String val\n\nReturns\u00b6\n\nString val\n\n\nnormcase\u00b6\n[Source]\nNormalizes the case of path for the runtime platform.\nfun box normcase(\npath: String val)\n: String val\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Array-_35.txt", "contents": "Parameters\u00b6\n\nvalue: U8 val\n\nReturns\u00b6\n\nNone val\n\n\npush_u16[optional B: (A & Real[B] val & U8 val)]\u00b6\n[Source]\nAdd a U16 to the end of the array. This is only allowed for an array of U8s.\nfun ref push_u16[optional B: (A & Real[B] val & U8 val)](\nvalue: U16 val)\n: None val\n\nParameters\u00b6\n\nvalue: U16 val\n"} +{"id": "Pony/src-pony_check-property_runner-_37.txt", "contents": "\ntry\n_prop1.property(consume shrink, helper)?\nelse\nfail(current_repr, round_num where err=true)\nreturn\nend\n// dispatch to another behaviour\n// to ensure _complete_shrink has been called already\n_shrink_finished(failed_repr, current_repr, this._current_round)\n\nbe _shrink_finished(\nfailed_repr: String,\ncurrent_repr: String,\nshrink_round: _Round)\n=>\nif not _params.async and _pass then\n// directly complete the shrink run\ncomplete_shrink(failed_repr, current_repr, shrink_round, true)\nend"} +{"id": "Pony/src-pony_check-property_runner-_42.txt", "contents": "Complete the Property execution\nwhile signalling failure to the `PropertyResultNotify`.\n\"\"\"\nif err then\n_report_error(repr, rounds)\nelse\n_report_failed(repr, rounds)\nend\n_notify.complete(false)\n\nfun _report_error(sample_repr: String,\nshrink_rounds: USize = 0,\nloc: SourceLoc = __loc) =>\n\"\"\"\nReport an error that happened during property evaluation\nand signal failure to the `PropertyResultNotify`.\n\"\"\"\n_notify.fail(\n\"Property errored for sample \"\n+ sample_repr"} +{"id": "Pony/builtin-I16-_30.txt", "contents": "\ny: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ndiv_unsafe\u00b6\n[Source]\nfun box div_unsafe(\ny: I16 val)\n: I16 val\n\nParameters\u00b6\n\ny: I16 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_334.txt", "contents": "fun box sctp_asconf_supported()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_associnfo\u00b6\n[Source]\nfun box sctp_associnfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_authentication\u00b6\n[Source]"} +{"id": "Pony/pony_check-IntPairPropertySample-_2.txt", "contents": "\nlet int1: U128 val\u00b6\n[Source]\n\nlet int2: U128 val\u00b6\n[Source]\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\n\n"} +{"id": "Pony/pony_check-Generator-_6.txt", "contents": "\nReturns\u00b6\n\n(T^ , Iterator[T^] ref) ?\n\n\nfilter\u00b6\n[Source]\nApply predicate to the values generated by this Generator\nand only yields values for which predicate returns true.\nExample:\nlet even_i32s =\nGenerators.i32()\n.filter(\n{(t) => (t, ((t % 2) == 0)) })\n\nfun box filter(\npredicate: {(T): (T^, Bool)}[T] box)\n: Generator[T] box\n"} +{"id": "Pony/builtin-U32-_30.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: U32 val)\n: U32 val\n\nParameters\u00b6\n\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/pony_bench-AsyncMicroBenchmark-_0.txt", "contents": "\n\n\n\n\n\n\nAsyncMicroBenchmark\u00b6\n[Source]\nAsynchronous benchmarks must provide this trait. The apply method defines a\nsingle iteration in a sample. Each phase of the sample completes when the\ngiven AsyncBenchContinue has its complete method invoked. Setup and\nTeardown are defined by the before and after methods respectively. The\nbefore method runs before a sample of benchmarks and after runs after\nthe all iterations in the sample have completed. If your benchmark requires\nsetup and/or teardown to occur beween each iteration of the benchmark, then\nyou can use before_iteration and after_iteration methods respectively\nthat run before/after each iteration.\ntrait iso AsyncMicroBenchmark\n"} +{"id": "Pony/src-collections-persistent-map-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/net-OSSockOpt-_254.txt", "contents": "fun box mcast_msfilter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_unblock_source\u00b6\n[Source]\nfun box mcast_unblock_source()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmcast_undefined\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_70.txt", "contents": "\nlet cap = copy_len + offset\nvar i = offset\n\ntry\nwhile i < cap do\npush(seq(i)?)\ni = i + 1\nend\nend\n\nfun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1) =>\n\"\"\"\nAdd len iterated elements to the tail of the list, starting from the given\noffset.\n\nWhen len is -1, all elements of iterator are pushed.\n\nDoes not remove elements from iterator.\n"} +{"id": "Pony/builtin-I128-_3.txt", "contents": "I128 val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: I128 val^\n\nReturns\u00b6\n\nI128 val^\n\n\nPublic Functions\u00b6\nabs\u00b6\n[Source]\nfun box abs()\n: U128 val\n\nReturns\u00b6"} +{"id": "Pony/net-OSSockOpt-_297.txt", "contents": "fun box rds_cmsg_rdma_status()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cong_monitor\u00b6\n[Source]\nfun box rds_cong_monitor()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_cong_monitor_size\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/src-process-process_monitor-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121\n122\n123\n124\n125\n126\n127\n128\n129\n130\n131"} +{"id": "Pony/collections-persistent-HashMap-_3.txt", "contents": "Return the amount of key-value pairs in the Map.\nfun val size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nupdate\u00b6\n[Source]\nUpdate the value associated with the provided key.\nfun val update(\nkey: K,\nvalue: val->V)\n: HashMap[K, V, H] val\n\nParameters\u00b6\n\nkey: K"} +{"id": "Pony/builtin-F64-_14.txt", "contents": "\ny: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/files-Path-_14.txt", "contents": "String val\n\n\nto_slash\u00b6\n[Source]\nChanges each OS specific separator in the path to /.\nfun box to_slash(\npath: String val)\n: String val\n\nParameters\u00b6\n\npath: String val\n\nReturns\u00b6\n\nString val\n\n\ncanonical\u00b6"} +{"id": "Pony/src-net-tcp_connection-_91.txt", "contents": "// Write as much data as possible.\n// Returns how many we sent or 0 if we are experiencing backpressure\nlet len =\n@pony_os_writev(_event,\n_pending_writev_windows.cpointer(_pending_sent),\nnum_to_send)?\n\nif len == 0 then\n_apply_backpressure()\nelse\n_pending_sent = _pending_sent + len\nend\nend\nelse\nfor bytes in _notify.sentv(this, data).values() do\n// don't sent 0 byte payloads; it's wasteful\nif bytes.size() == 0 then\ncontinue\nend\n"} +{"id": "Pony/builtin-I128-_36.txt", "contents": "\ny: U128 val\n\nReturns\u00b6\n\nI128 val\n\n\nshl_unsafe\u00b6\n[Source]\nfun box shl_unsafe(\ny: U128 val)\n: I128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-HashMap-_5.txt", "contents": "m.upsert(\"test\", 4, {(current, provided) => current + provided })\nThis changes the value associated with \"test\" to 6.\nIf we have not yet added the key \"new-key\" to the map and we call\nm.upsert(\"new-key\", 4, {(current, provided) => current + provided })\nthen \"new-key\" is added to the map with a value of 4.\nReturns the value that we set the key to\nfun ref upsert(\nkey: K,\nvalue: V,\nf: {(V, V): V^}[K, V, H] box)\n: V!\n\nParameters\u00b6\n\nkey: K\nvalue: V\nf: {(V, V): V^}[K, V, H] box\n\nReturns\u00b6\n"} +{"id": "Pony/reference-capabilities_10.txt", "contents": "# How to write a reference capability\n\nA reference capability comes at the end of a type. So, for example:\n\n```pony\nString iso // An isolated string\nString trn // A transition string\nString ref // A string reference\nString val // A string value\nString box // A string box\nString tag // A string tag\n```\n\n__What does it mean when a type doesn't specify a reference capability?__ It means you are using the _default_ reference capability for that type, which is defined along with the type. Here\u2019s an example from the standard library:\n\n```pony\nclass val String\n```\n\nWhen we use a String we usually mean an immutable string value, so we make `val` the default reference capability for `String` (but not necessarily for `String` constructors, see below). For example, when we don't specify the capability in the following code, the compiler understands that we are using the default reference capability `val` specified in the type definition:"} +{"id": "Pony/builtin-ILong-_22.txt", "contents": "[Source]\nfun box rem_partial(\ny: ILong val)\n: ILong val ?\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: ILong val)\n: (ILong val , ILong val) ?\n"} +{"id": "Pony/backpressure--index-_4.txt", "contents": "Public Types\u00b6\n\nprimitive ApplyReleaseBackpressureAuth\nprimitive Backpressure\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-U64-_6.txt", "contents": "\nU64 val\n\n\nclz\u00b6\n[Source]\nfun box clz()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-USize-_3.txt", "contents": "USize val^\n\n\nmax_value\u00b6\n[Source]\nnew val max_value()\n: USize val^\n\nReturns\u00b6\n\nUSize val^\n\n\nPublic Functions\u00b6\nnext_pow2\u00b6\n[Source]\nfun box next_pow2()\n: USize val\n\nReturns\u00b6"} +{"id": "Pony/src-builtin-array-_63.txt", "contents": "fun read_u32[B: (A & Real[B] val & U8) = A](offset: USize): U32 ? =>\n\"\"\"\nReads a U32 from offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u32_bytes = U32(0).bytewidth()\nif (offset + u32_bytes) <= _size then\n_ptr._offset(offset)._convert[U32]()._apply(0)\nelse\nerror\nend\n\nfun read_u64[B: (A & Real[B] val & U8) = A](offset: USize): U64 ? =>\n\"\"\"\nReads a U64 from offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u64_bytes = U64(0).bytewidth()\nif (offset + u64_bytes) <= _size then\n_ptr._offset(offset)._convert[U64]()._apply(0)\nelse\nerror"} +{"id": "Pony/src-builtin-array-_59.txt", "contents": "fun cpointer(offset: USize = 0): Pointer[A] tag =>\n\"\"\"\nReturn the underlying C-style pointer.\n\"\"\"\n_ptr._offset(offset)\n\nfun size(): USize =>\n\"\"\"\nThe number of elements in the array.\n\"\"\"\n_size\n\nfun space(): USize =>\n\"\"\"\nThe available space in the array.\n\"\"\"\n_alloc\n\nfun ref reserve(len: USize) =>\n\"\"\""} +{"id": "Pony/src-builtin-unsigned-_79.txt", "contents": "(this >> 32).u32() xor\nthis.u32()).hash()\nelse\n((this >> 64).u64() xor this.u64()).hash()\nend\n\nfun hash64(): U64 =>\n((this >> 64).u64() xor this.u64()).hash64()\n\nfun string(): String iso^ =>\n_ToString._u128(this, false)\n\nfun mul(y: U128): U128 =>\nifdef native128 then\nthis * y\nelse\nlet x_hi = (this >> 64).u64()\nlet x_lo = this.u64()\nlet y_hi = (y >> 64).u64()\nlet y_lo = y.u64()"} +{"id": "Pony/src-net-ossockopt-_99.txt", "contents": "fun netlink_tx_ring():I32 => @pony_os_sockopt_option(I32(422))\nfun netlink_unused():I32 => @pony_os_sockopt_option(I32(423))\nfun netlink_usersock():I32 => @pony_os_sockopt_option(I32(424))\nfun netlink_xfrm():I32 => @pony_os_sockopt_option(I32(425))\nfun netrom_idle():I32 => @pony_os_sockopt_option(I32(426))\nfun netrom_kill():I32 => @pony_os_sockopt_option(I32(427))\nfun netrom_n2():I32 => @pony_os_sockopt_option(I32(428))\nfun netrom_neigh():I32 => @pony_os_sockopt_option(I32(429))\nfun netrom_node():I32 => @pony_os_sockopt_option(I32(430))\nfun netrom_paclen():I32 => @pony_os_sockopt_option(I32(431))\nfun netrom_t1():I32 => @pony_os_sockopt_option(I32(432))\nfun netrom_t2():I32 => @pony_os_sockopt_option(I32(433))\nfun netrom_t4():I32 => @pony_os_sockopt_option(I32(434))\nfun nrdv_multicast_addrs_per_sock():I32 => @pony_os_sockopt_option(I32(435))\nfun pvd_config():I32 => @pony_os_sockopt_option(I32(436))\nfun rds_cancel_sent_to():I32 => @pony_os_sockopt_option(I32(437))\nfun rds_cmsg_atomic_cswp():I32 => @pony_os_sockopt_option(I32(438))\nfun rds_cmsg_atomic_fadd():I32 => @pony_os_sockopt_option(I32(439))\nfun rds_cmsg_cong_update():I32 => @pony_os_sockopt_option(I32(440))\nfun rds_cmsg_masked_atomic_cswp():I32 => @pony_os_sockopt_option(I32(441))"} +{"id": "Pony/src-collections-persistent-vec-_16.txt", "contents": "new val create() =>\n_root = None\n_tail = recover Array[A] end\n_size = 0\n_depth = -1\n\nnew val _create(\nroot': (_VecNode[A] | None),\ntail': Array[A] val,\nsize': USize,\ndepth': USize)\n=>\n_root = root'\n_tail = tail'\n_size = size'\n_depth = depth'\n\nfun size(): USize =>\n\"\"\"\nReturn the amount of values in the vector."} +{"id": "Pony/src-pony_test-pony_test-_35.txt", "contents": "On a timeout the timed_out() function is called on the unit test object. This\nshould perform whatever test specific tidy up is required to allow the program\nto exit. There is no need to call complete() if a timeout occurs, although it\nis not an error to do so.\n\nNote that the timeout is only relevant when a test hangs and would otherwise\nprevent the test program from completing. Setting a very long timeout on tests\nthat should not be able to hang is perfectly acceptable and will not make the\ntest take any longer if successful.\n\nTimeouts should not be used as the standard method of detecting if a test has\nfailed.\n"} +{"id": "Pony/src-signals-signal_notify-_0.txt", "contents": "\n\n\n\n\n\n\nsignal_notify.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-ISize-_42.txt", "contents": "\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: ISize val)\n: Bool val\n\nParameters\u00b6\n\ny: ISize val\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6"} +{"id": "Pony/builtin-U8-_33.txt", "contents": "U8 val\n\n\ndivrem_unsafe\u00b6\n[Source]\nfun box divrem_unsafe(\ny: U8 val)\n: (U8 val , U8 val)\n\nParameters\u00b6\n\ny: U8 val\n\nReturns\u00b6\n\n(U8 val , U8 val)\n\n\nrem_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-math-is_prime-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-net-ossockopt-_80.txt", "contents": "fun icmp_echoreply():I32 => @pony_os_sockopt_option(I32(42))\nfun icmp_exc_fragtime():I32 => @pony_os_sockopt_option(I32(43))\nfun icmp_exc_ttl():I32 => @pony_os_sockopt_option(I32(44))\nfun icmp_filter():I32 => @pony_os_sockopt_option(I32(45))\nfun icmp_frag_needed():I32 => @pony_os_sockopt_option(I32(46))\nfun icmp_host_ano():I32 => @pony_os_sockopt_option(I32(47))\nfun icmp_host_isolated():I32 => @pony_os_sockopt_option(I32(48))\nfun icmp_host_unknown():I32 => @pony_os_sockopt_option(I32(49))\nfun icmp_host_unreach():I32 => @pony_os_sockopt_option(I32(50))\nfun icmp_host_unr_tos():I32 => @pony_os_sockopt_option(I32(51))\nfun icmp_info_reply():I32 => @pony_os_sockopt_option(I32(52))\nfun icmp_info_request():I32 => @pony_os_sockopt_option(I32(53))\nfun icmp_net_ano():I32 => @pony_os_sockopt_option(I32(54))\nfun icmp_net_unknown():I32 => @pony_os_sockopt_option(I32(55))\nfun icmp_net_unreach():I32 => @pony_os_sockopt_option(I32(56))\nfun icmp_net_unr_tos():I32 => @pony_os_sockopt_option(I32(57))\nfun icmp_parameterprob():I32 => @pony_os_sockopt_option(I32(58))\nfun icmp_pkt_filtered():I32 => @pony_os_sockopt_option(I32(59))\nfun icmp_port_unreach():I32 => @pony_os_sockopt_option(I32(60))\nfun icmp_prec_cutoff():I32 => @pony_os_sockopt_option(I32(61))"} +{"id": "Pony/callbacks_8.txt", "contents": "...\n```\n\nFocusing on the callback-related parts, the callback function is passed using `addressof this.method_callback` (resp. by directly passing the bare lambda) as the third argument to `sqlite3_exec`. The fourth argument is `this`, which will end up being the first argument when the callback function is called. The callback function is called in `sqlite3_exec` by the call to `xCallback`.\n"} +{"id": "Pony/builtin-Array-_24.txt", "contents": "value: A\n\nReturns\u00b6\n\nNone val ?\n\n\ndelete\u00b6\n[Source]\nDelete an element from the array. Elements after this are moved down by one\nindex, compacting the array.\nAn out of bounds index raises an error.\nThe deleted element is returned.\nfun ref delete(\ni: USize val)\n: A^ ?\n\nParameters\u00b6\n\ni: USize val"} +{"id": "Pony/src-files-file-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/net-OSSockOpt-_596.txt", "contents": "fun box tipc_addr_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_addr_mcast\u00b6\n[Source]\nfun box tipc_addr_mcast()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_addr_name\u00b6\n[Source]"} +{"id": "Pony/builtin-Real-_0.txt", "contents": "\n\n\n\n\n\n\nReal[A: Real[A] val]\u00b6\n[Source]\ntrait val Real[A: Real[A] val] is\nStringable box,\n_ArithmeticConvertible val,\nComparable[A] ref\n\nImplements\u00b6\n\nStringable box\n_ArithmeticConvertible val\nComparable[A] ref\n"} +{"id": "Pony/collections-persistent-MapKeys-_2.txt", "contents": "fun ref next()\n: K ?\n\nReturns\u00b6\n\nK ?\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-TCPConnection-_19.txt", "contents": "\n\nPublic Functions\u00b6\nlocal_address\u00b6\n[Source]\nReturn the local IP address. If this TCPConnection is closed then the\naddress returned is invalid.\nfun box local_address()\n: NetAddress val\n\nReturns\u00b6\n\nNetAddress val\n\n\nremote_address\u00b6\n[Source]\nReturn the remote IP address. If this TCPConnection is closed then the\naddress returned is invalid.\nfun box remote_address()"} +{"id": "Pony/src-builtin-array-_57.txt", "contents": "_ptr._update(i, from)\ni = i + 1\nend\nelse\n_alloc = 0\n_ptr = Pointer[A]\nend\n\nnew from_cpointer(ptr: Pointer[A], len: USize, alloc: USize = 0) =>\n\"\"\"\nCreate an array from a C-style pointer and length. The contents are not\ncopied. This must be done only with C-FFI functions that return\npony_alloc'd memory. If a null pointer is given then an empty array\nis returned.\n\"\"\"\nif ptr.is_null() then\n_size = 0\n_alloc = 0\nelse\n_size = len"} +{"id": "Pony/src-pony_check-property_helper-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/src-pony_check-for_all-_9.txt", "contents": "_helper = h\n\nfun ref apply(prop: {(T1, T2, T3, PropertyHelper) ?} val) ? =>\nProperty3UnitTest[T1, T2, T3](\nobject iso is Property3[T1, T2, T3]\nfun name(): String => \"\"\nfun gen1(): Generator[T1] => _gen1\nfun gen2(): Generator[T2] => _gen2\nfun gen3(): Generator[T3] => _gen3\nfun ref property3(arg1: T1, arg2: T2, arg3: T3, h: PropertyHelper) ? =>\nprop(consume arg1, consume arg2, consume arg3, h)?\nend\n).apply(_helper)?\n\nclass ForAll4[T1, T2, T3, T4]\nlet _gen1: Generator[T1] val\nlet _gen2: Generator[T2] val\nlet _gen3: Generator[T3] val\nlet _gen4: Generator[T4] val\nlet _helper: TestHelper"} +{"id": "Pony/src-collections-persistent-set-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/src-files-path-_47.txt", "contents": "end\n\"\"\n\nfun volume(path: String): String =>\n\"\"\"\nOn Windows, this returns the drive letter or UNC base at the beginning of\nthe path, if there is one. Otherwise, this returns an empty string.\n\"\"\"\nifdef windows then\nvar offset = ISize(0)\n\nif path.compare_sub(\"\"\"\\\\?\\\"\"\", 4) is Equal then\noffset = 4\n\nif path.compare_sub(\"\"\"UNC\\\"\"\", 4, offset) is Equal then\nreturn _network_share(path, offset + 4)\nend\nend\n\nif _drive_letter(path, offset) then"} +{"id": "Pony/net-OSSockOpt-_122.txt", "contents": "fun box ipport_hilastauto()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_max\u00b6\n[Source]\nfun box ipport_max()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipport_reserved\u00b6\n[Source]"} +{"id": "Pony/src-term-ansi-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/builtin-ULong-_37.txt", "contents": "ULong val\n\n\nop_xor\u00b6\n[Source]\nfun box op_xor(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nop_not\u00b6\n[Source]"} +{"id": "Pony/src-net-ossockopt-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/ponycheck_2.txt", "contents": "Below are two classic list reverse properties from the QuickCheck paper adapted to Pony arrays:\n\n```pony\nuse \"pony_check\"\nuse \"collections\"\n\nclass _ListReverseProperty is Property1[Array[USize]]\nfun name(): String => \"list/reverse\"\n\nfun gen(): Generator[Array[USize]] =>\nGenerators.seq_of[USize, Array[USize]](Generators.usize())\n\nfun property(arg1: Array[USize], ph: PropertyHelper) =>\nph.assert_array_eq[USize](arg1, arg1.reverse().reverse())\n\nclass _ListReverseOneProperty is Property1[Array[USize]]\nfun name(): String => \"list/reverse/one\"\n\nfun gen(): Generator[Array[USize]] =>\nGenerators.seq_of[USize, Array[USize]](Generators.usize() where min=1,max=1)"} +{"id": "Pony/net-OSSockOpt-_617.txt", "contents": "fun box ttcp_client_snd_wnd()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_cork\u00b6\n[Source]\nfun box udp_cork()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nudp_encap\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_59.txt", "contents": "fun box ipproto_tp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_tpxx\u00b6\n[Source]\nfun box ipproto_tpxx()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_trunk1\u00b6\n[Source]"} +{"id": "Pony/builtin-I8-_28.txt", "contents": "String iso^\n\n\nadd_unsafe\u00b6\n[Source]\nfun box add_unsafe(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nsub_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-TCPConnection-_36.txt", "contents": "U32 val\n\n\nset_tcp_nodelay\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)\nfun ref set_tcp_nodelay(\nstate: Bool val)\n: U32 val\n\nParameters\u00b6\n\nstate: Bool val\n\nReturns\u00b6\n\nU32 val\n\n\n"} +{"id": "Pony/src-files-file_path-_42.txt", "contents": "var privilege_count: U32 = 1\nembed privileges_0: _LuidAndAttributes = _LuidAndAttributes\n\nstruct ref _LuidAndAttributes\nvar luid: U64 = 0\nvar attributes: U32 = 0\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property_helper-_45.txt", "contents": "If 1 action fails, the property is considered failing.\n\"\"\"\n_runner.fail_action(name, _run, this)\n\nfun complete(success: Bool) =>\n\"\"\"\nComplete an asynchronous property successfully.\n\nOnce this method is called the property\nis considered successful or failing\ndepending on the value of the parameter `success`.\n\nFor more fine grained control over completing or failing\na property that consists of many steps, consider using\n`expect_action`, `complete_action` and `fail_action`.\n\"\"\"\n_run_notify.apply(_run, success)\n\nfun dispose_when_done(disposable: DisposableActor) =>\n\"\"\""} +{"id": "Pony/src-builtin-unsigned-_78.txt", "contents": "@\"llvm.ctlz.i128\"(this, true)\n\nfun ctz_unsafe(): U128 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i128\"(this, true)\n\nfun bitwidth(): U128 => 128\n\nfun bytewidth(): USize => bitwidth().usize() / 8\n\nfun min(y: U128): U128 => if this < y then this else y end\nfun max(y: U128): U128 => if this > y then this else y end\n\nfun hash(): USize =>\nifdef ilp32 then\n((this >> 96).u32() xor\n(this >> 64).u32() xor"} +{"id": "Pony/net-OSSockOpt-_213.txt", "contents": "fun box ip_max_sock_mute_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_max_sock_src_filter\u00b6\n[Source]\nfun box ip_max_sock_src_filter()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_max_source_filter\u00b6\n[Source]"} +{"id": "Pony/cli-SyntaxError-_2.txt", "contents": "\nstring\u00b6\n[Source]\nfun box string()\n: String val\n\nReturns\u00b6\n\nString val\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-collections-list-_95.txt", "contents": "_size = 1\n\nclass ListNodes[A, N: ListNode[A] #read] is Iterator[N]\n\"\"\"\nIterate over the nodes in a `List`.\n\"\"\"\nvar _next: (N | None)\nlet _reverse: Bool\n\nnew create(head: (N | None), reverse: Bool = false) =>\n\"\"\"\nBuild the iterator over nodes.\n\n`reverse` of `false` iterates forward, while\n`reverse` of `true` iterates in reverse.\n\"\"\"\n_next = head\n_reverse = reverse\n\nfun has_next(): Bool =>"} +{"id": "Pony/collections-persistent-Cons-_17.txt", "contents": "n: USize val\n\nReturns\u00b6\n\n(Cons[A] val | Nil[A] val)\n\n\ntake_while\u00b6\n[Source]\nBuilds a list of elements satisfying the provided predicate until one does\nnot.\nfun val take_while(\nf: {(val->A): Bool}[A] box)\n: (Cons[A] val | Nil[A] val)\n\nParameters\u00b6\n\nf: {(val->A): Bool}[A] box\n\nReturns\u00b6"} +{"id": "Pony/builtin-UnsignedInteger-_17.txt", "contents": "\nctz_unsafe\u00b6\n[Source]\nCount trailing zeroes.\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box ctz_unsafe()\n: A\n\nReturns\u00b6\n\nA\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: A\n\nReturns\u00b6"} +{"id": "Pony/cli-OptionSpec-_5.txt", "contents": "descr': String val = \"\",\nshort': (U8 val | None val) = reference,\ndefault': (U64 val | None val) = reference)\n: OptionSpec val^\n\nParameters\u00b6\n\nname': String val\ndescr': String val = \"\"\nshort': (U8 val | None val) = reference\ndefault': (U64 val | None val) = reference\n\nReturns\u00b6\n\nOptionSpec val^\n\n\nf64\u00b6\n[Source]\nCreates an Option with a F64 typed value that can be used like"} +{"id": "Pony/src-term-ansi-_30.txt", "contents": "\"\"\"\n\"\\x1B[106m\"\n\nfun bright_grey_bg(): String =>\n\"\"\"\nBright grey background.\n\"\"\"\n\"\\x1B[47m\"\n\nprimitive EraseLeft\nprimitive EraseLine\nprimitive EraseRight\n\ntype _EraseDirection is (EraseLeft | EraseLine | EraseRight)\n\n\n\n\n\n"} +{"id": "Pony/collections-Flags-_18.txt", "contents": "that: Flags[A, B] box\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6\n[Source]\nReturns true if the flags set on this are a struct superset of the flags\nset on that. Flags is only partially ordered, so gt is not the opposite of\nle.\nfun box gt(\nthat: Flags[A, B] box)\n: Bool val\n\nParameters\u00b6\n\nthat: Flags[A, B] box\n"} +{"id": "Pony/builtin-FloatingPoint-_42.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nsub\u00b6\n[Source]\nfun box sub(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/src-net-tcp_connection_notify-_10.txt", "contents": "\n```pony\nfun ref connect_failed(conn: TCPConnection ref) =>\nNone\n```\n\"\"\"\n\nfun ref auth_failed(conn: TCPConnection ref) =>\n\"\"\"\nA raw TCPConnection has no authentication mechanism. However, when\nprotocols are wrapped in other protocols, this can be used to report an\nauthentication failure in a lower level protocol (e.g. SSL).\n\"\"\"\nNone\n\nfun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>\n\"\"\"\nCalled when data is sent on the connection. This gives the notifier an\nopportunity to modify sent data before it is written. To swallow data,\nreturn an empty string."} +{"id": "Pony/src-builtin-runtime_options-_6.txt", "contents": "112\n113\n114\n115\n116\n117\n118\n119\n120\n121struct RuntimeOptions\n\"\"\"\nPony struct for the Pony runtime options C struct that can be used to\noverride the Pony runtime defaults via code compiled into the program.\n\nThe way this is done is by adding the following function to your `Main` actor:\n\n```\nfun @runtime_override_defaults(rto: RuntimeOptions) =>\n```\n"} +{"id": "Pony/src-random-random-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/collections-List-_6.txt", "contents": "\nSeq[A] ref\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nAlways creates an empty list with 0 nodes, len is ignored.\nRequired method for List to satisfy the Seq interface.\nlet my_list = List[String]\n\nnew ref create(\nlen: USize val = 0)\n: List[A] ref^\n\nParameters\u00b6\n\nlen: USize val = 0\n\nReturns\u00b6"} +{"id": "Pony/src-pony_test-test_helper-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/collections-Flags-_2.txt", "contents": "value': B = 0\n\nReturns\u00b6\n\nFlags[A, B] iso^\n\n\nPublic Functions\u00b6\nvalue\u00b6\n[Source]\nReturns the bit encoding of the set flags.\nfun box value()\n: B\n\nReturns\u00b6\n\nB\n\n\napply\u00b6"} +{"id": "Pony/src-pony_check-pony_check-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-Real-_23.txt", "contents": "U32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]\nfun box u128()\n: U128 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-collections-heap-_0.txt", "contents": "\n\n\n\n\n\n\nheap.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/src-pony_bench-benchmark-_5.txt", "contents": "92\n93\n94\n95\n96\n97type Benchmark is (MicroBenchmark | AsyncMicroBenchmark)\n\n// interface iso _IBenchmark\n// fun name(): String\n// fun config(): BenchConfig\n// fun overhead(): _IBenchmark^\n\ntrait iso MicroBenchmark\n\"\"\"\nSynchronous benchmarks must provide this trait. The `apply` method defines a\nsingle iteration in a sample. Setup and Teardown are defined by the `before`\nand `after` methods respectively. The `before` method runs before a sample\nof benchmarks and `after` runs after the all iterations in the sample have\ncompleted. If your benchmark requires setup and/or teardown to occur beween\neach iteration of the benchmark, then you can use `before_iteration` and"} +{"id": "Pony/collections-ListNode-_2.txt", "contents": "end\n\n// Update the item contained in the ListNode\ntry\nmy_list_node.update(\"My updated Node item\")?\nenv.out.print(\"My node has the updated item value: \"\n+ my_list_node.apply()?) // My updated Node item\nend\n// Pop the item from the ListNode\ntry\nmy_list_node.pop()?\nenv.out.print(\"Popped the item from the ListNode\")\nmy_list_node.apply()? // This will error as the item is now None\nelse\nenv.out.print(\"The ListNode has no (None) item.\")\nend\n\nclass ref ListNode[A: A]\n\nConstructors\u00b6"} +{"id": "Pony/src-files-file-_30.txt", "contents": "592\n593\n594\n595\n596\n597\n598\n599\n600\n601\n602\n603\n604\n605\n606\n607\n608\n609\n610\n611"} +{"id": "Pony/net-OSSockOpt-_257.txt", "contents": "fun box mrt_api_config()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_api_flags_all\u00b6\n[Source]\nfun box mrt_api_flags_all()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nmrt_api_support\u00b6\n[Source]"} +{"id": "Pony/src-collections-list-_74.txt", "contents": "Builds a new `List` by applying a function to every element of the `List`.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = my_list.map[String]( {(s: String): String => \"m: \" + s } ) // other_list is [\"m: a\"; \"m: b\"; \"m: c\"]\n```\n\"\"\"\ntry\n_map[B](head()?, f, List[B])\nelse\nList[B]\nend\n\nfun _map[B](\nln: this->ListNode[A],\nf: {(this->A!): B^} box,\nacc: List[B])\n: List[B]^\n=>\n\"\"\""} +{"id": "Pony/pony_bench-OverheadBenchmark-_3.txt", "contents": "overhead\u00b6\n[Source]\nfun box overhead()\n: MicroBenchmark iso^\n\nReturns\u00b6\n\nMicroBenchmark iso^\n\n\nbefore\u00b6\n[Source]\nfun ref before()\n: None val ?\n\nReturns\u00b6\n\nNone val ?\n\n"} +{"id": "Pony/src-builtin-unsigned-_81.txt", "contents": "\nfun divrem(y: U128): (U128, U128) =>\nifdef native128 then\n(this / y, this % y)\nelse\nif y == 0 then\nreturn (0, 0)\nend\n\nvar quot: U128 = 0\nvar qbit: U128 = 1\nvar num = this\nvar den = y\n\nwhile den.i128() >= 0 do\nden = den << 1\nqbit = qbit << 1\nend\n\nwhile qbit != 0 do"} +{"id": "Pony/net-OSSockOpt-_468.txt", "contents": "fun box sctp_timeouts()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_use_ext_rcvinfo\u00b6\n[Source]\nfun box sctp_use_ext_rcvinfo()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_vrf_id\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-int_properties-_10.txt", "contents": "fun int_property[T: (Int & Integer[T] val)](x: T, h: PropertyHelper)? =>\nh.assert_eq[T](T.from[U8](0), x / T.from[U8](0))\n```\n\"\"\"\nfun gen(): Generator[IntPropertySample] =>\nGenerators.map2[U8, U128, IntPropertySample](\nGenerators.u8(),\nGenerators.u128(),\n{(choice, int) => IntPropertySample(choice, int) })\n\nfun ref property(sample: IntPropertySample, h: PropertyHelper) ? =>\nlet x = sample.int\nmatch sample.choice % 14\n| 0 => int_property[U8](x.u8(), h)?\n| 1 => int_property[U16](x.u16(), h)?\n| 2 => int_property[U32](x.u32(), h)?\n| 3 => int_property[U64](x.u64(), h)?\n| 4 => int_property[ULong](x.ulong(), h)?\n| 5 => int_property[USize](x.usize(), h)?\n| 6 => int_property[U128](x, h)?"} +{"id": "Pony/net-OSSockOpt-_310.txt", "contents": "fun box rds_rdma_dontwait()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_dropped\u00b6\n[Source]\nfun box rds_rdma_dropped()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_rdma_fence\u00b6\n[Source]"} +{"id": "Pony/buffered-Reader-_28.txt", "contents": "\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI32 val ?\n\n\npeek_i32_le\u00b6\n[Source]\nPeek at a little-endian I32.\nfun box peek_i32_le(\noffset: USize val = 0)\n: I32 val ?\n\nParameters\u00b6\n\noffset: USize val = 0"} +{"id": "Pony/src-ini-ini-_14.txt", "contents": "else\ncurrent.find(\":\")?\nend\n\nlet value = current.substring(delim + 1)\nvalue.strip()\n\ncurrent.delete(delim, -1)\ncurrent.strip()\n\ntry\nlet comment = try\nvalue.find(\";\")?\nelse\nvalue.find(\"#\")?\nend\n\nmatch value(comment.usize() - 1)?\n| ' ' | '\\t' =>\nvalue.delete(comment, -1)"} +{"id": "Pony/process-CapError-_2.txt", "contents": "\nthat: CapError val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: CapError val)\n: Bool val\n\nParameters\u00b6\n\nthat: CapError val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I8-_13.txt", "contents": "\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\naddc\u00b6\n[Source]\nfun box addc(\ny: I8 val)\n: (I8 val , Bool val)\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-Array-_44.txt", "contents": "value: A!,\noffset: USize val = 0,\nnth: USize val = 0,\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda)\n: USize val ?\n\nParameters\u00b6\n\nvalue: A!\noffset: USize val = 0\nnth: USize val = 0\npredicate: {(box->A!, box->A!): Bool}[A] val = lambda\n\nReturns\u00b6\n\nUSize val ?\n\n\ncontains\u00b6\n[Source]"} +{"id": "Pony/1_variables_11.txt", "contents": "# Global variables\n\nSome programming languages have __global variables__ that can be accessed from anywhere in the code. What a bad idea! Pony doesn't have global variables at all.\n"} +{"id": "Pony/src-collections-list-_85.txt", "contents": "let other_list = my_list.drop(1) // [\"b\"; \"c\"]\n```\n\"\"\"\nlet l = List[this->A!]\n\nif size() > n then\ntry\nvar node = index(n)?\n\nfor i in Range(n, size()) do\nl.push(node()?)\nnode = node.next() as this->ListNode[A]\nend\nend\nend\nl\n\nfun take(n: USize): List[this->A!] =>\n\"\"\"\nBuilds a `List` by keeping the first `n` elements."} +{"id": "Pony/src-collections-list-_0.txt", "contents": "\n\n\n\n\n\n\nlist.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/builtin-I32-_48.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/src-pony_test-pony_test-_50.txt", "contents": "if _do_nothing then\nreturn\nend\n\nif not _any_found then\n// No tests left after applying our filters\n_env.out.print(\"No tests found\")\nreturn\nend\n\nif _list_only then\n// No tests to run\nreturn\nend\n\n_all_started = true\nif _finished == _records.size() then\n// All tests have completed\n_print_report()\nend"} +{"id": "Pony/src-builtin-string-_44.txt", "contents": "872\n873\n874\n875\n876\n877\n878\n879\n880\n881\n882\n883\n884\n885\n886\n887\n888\n889\n890\n891"} +{"id": "Pony/builtin-SignedInteger-_4.txt", "contents": "\nB\n\n\nshl\u00b6\n[Source]\nfun box shl(\ny: B)\n: A\n\nParameters\u00b6\n\ny: B\n\nReturns\u00b6\n\nA\n\n\nshr\u00b6"} +{"id": "Pony/src-files-file-_46.txt", "contents": "\nmatch r\n| 0 => _errno = FileEOF\n| -1 => _errno = _get_error()\nend\n\nresult.truncate(r.usize())\nresult\nelse\nrecover Array[U8] end\nend\n\nfun ref read_string(len: USize): String iso^ =>\n\"\"\"\nReturns up to len bytes. The resulting string may have internal null\ncharacters.\n\"\"\"\nif _fd != -1 then\nlet result = recover String(len) end\n"} +{"id": "Pony/builtin-Array-_28.txt", "contents": "\n\nchop[optional B: (A & Any #send)]\u00b6\n[Source]\nChops the array in half at the split point requested and returns both\nthe left and right portions. The original array is trimmed in place and\nreturned as the left portion. If the split point is larger than the\narray, the left portion is the original array and the right portion\nis a new empty array.\nThe operation does not allocate a new array pointer nor copy elements.\nThe entry type must be sendable so that the two halves can be isolated.\nOtherwise, two entries may have shared references to mutable data,\nor even to each other, such as in the code below:\nclass Example\nvar other: (Example | None) = None\n\nlet arr: Array[Example] iso = recover\nlet obj1 = Example\nlet obj2 = Example\nobj1.other = obj2"} +{"id": "Pony/src-time-time-_18.txt", "contents": "will prevent instructions from before this call leaking into the block and\ninstructions after this call being executed earlier.\n\"\"\"\nifdef x86 then\n@\"internal.x86.cpuid\"(I32(0))\n@\"llvm.x86.rdtsc\"()\nelse\ncompile_error \"perf_begin only supported on x86\"\nend\n\nfun perf_end(): U64 =>\n\"\"\"\nGet a cycle count for ending a performance testing block. This will\nwill prevent instructions from after this call leaking into the block and\ninstructions before this call being executed later.\n\"\"\"\nifdef x86 then\nvar aux: I32 = 0\nvar ts = @\"internal.x86.rdtscp\"(addressof aux)\n@\"internal.x86.cpuid\"(I32(0))"} +{"id": "Pony/time-Time-_5.txt", "contents": "Returns\u00b6\n\nU64 val\n\n\nperf_end\u00b6\n[Source]\nGet a cycle count for ending a performance testing block. This will\nwill prevent instructions from after this call leaking into the block and\ninstructions before this call being executed later.\nfun box perf_end()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\neq\u00b6\n[Source]"} +{"id": "Pony/pony_check-Generators-_1.txt", "contents": "Generators val^\n\n\nPublic Functions\u00b6\nunit[T: T]\u00b6\n[Source]\nGenerate a reference to the same value over and over again.\nThis reference will be of type box->T and not just T\nas this generator will need to keep a reference to the given value.\nfun box unit[T: T](\nt: T,\ndo_shrink: Bool val = false)\n: Generator[box->T] box\n\nParameters\u00b6\n\nt: T\ndo_shrink: Bool val = false\n\nReturns\u00b6"} +{"id": "Pony/src-format-format-_15.txt", "contents": "_FormatInt.u64(abs.u64(), neg, fmt, prefix, prec, width, align, fill)\nend\nelse\n_FormatInt.u128(x.u128(), false, fmt, prefix, prec, width, align, fill)\nend\n\nfun float[A: (Float & FloatingPoint[A])](\nx: A,\nfmt: FormatFloat = FormatDefault,\nprefix: PrefixNumber = PrefixDefault,\nprec: USize = 6,\nwidth: USize = 0,\nalign: Align = AlignRight,\nfill: U32 = ' ')\n: String iso^\n=>\n_FormatFloat.f64(x.f64(), fmt, prefix, prec, width, align, fill)\n\n\n"} +{"id": "Pony/src-buffered-reader-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/src-pony_check-property_helper-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-StdStream-_1.txt", "contents": "Parameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nwrite\u00b6\n[Source]\nPrint some bytes without inserting a newline afterwards.\nbe write(\ndata: (String val | Array[U8 val] val))\n\nParameters\u00b6\n\ndata: (String val | Array[U8 val] val)\n\n\nprintv\u00b6\n[Source]\nPrint an iterable collection of ByteSeqs.\nbe printv("} +{"id": "Pony/builtin-ILong-_11.txt", "contents": "[Source]\nfun box fld_unsafe(\ny: ILong val)\n: ILong val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: ILong val)\n: ILong val\n"} +{"id": "Pony/src-builtin-real-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/builtin-I64-_40.txt", "contents": "(I64 val , I64 val)\n\n\nrem\u00b6\n[Source]\nfun box rem(\ny: I64 val)\n: I64 val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\nneg\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_270.txt", "contents": "fun box ndrv_protocol_desc_vers()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nndrv_setdmxspec\u00b6\n[Source]\nfun box ndrv_setdmxspec()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nnetlink_add_membership\u00b6\n[Source]"} +{"id": "Pony/builtin-Seq-_9.txt", "contents": "[Source]\nAdd len iterated elements to the end of the list, starting from the given\noffset.\nfun ref concat(\niter: Iterator[A^] ref,\noffset: USize val = 0,\nlen: USize val = call)\n: None val\n\nParameters\u00b6\n\niter: Iterator[A^] ref\noffset: USize val = 0\nlen: USize val = call\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/src-pony_check-property_runner-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_check-property_runner-_26.txt", "contents": "fun fail(msg: String)\n\"\"\"\nCalled when a Property has failed (did not hold for a sample)\nor when execution raised an error.\n\nDoes not necessarily denote completeness of the property execution,\nsee `complete(success: Bool)` for that purpose.\n\"\"\"\n\nfun complete(success: Bool)\n\"\"\"\nCalled when the Property execution is complete\nsignalling whether it was successful or not.\n\"\"\"\n\nactor PropertyRunner[T]\n\"\"\"\nActor executing a Property1 implementation\nin a way that allows garbage collection between single\nproperty executions, because it uses recursive behaviours"} +{"id": "Pony/src-builtin-array-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/pony_check-PropertyHelper-_20.txt", "contents": "success: Bool val)\n: None val\n\nParameters\u00b6\n\nsuccess: Bool val\n\nReturns\u00b6\n\nNone val\n\n\ndispose_when_done\u00b6\n[Source]\nDispose the actor after a property run / a shrink is done.\nfun box dispose_when_done(\ndisposable: DisposableActor tag)\n: None val\n\nParameters\u00b6"} +{"id": "Pony/builtin-F64-_52.txt", "contents": "y: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\nfun box ne(\ny: F64 val)\n: Bool val\n\nParameters\u00b6\n\ny: F64 val"} +{"id": "Pony/src-net-net_address-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-I64-_41.txt", "contents": "fun box neg()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\neq\u00b6\n[Source]\nfun box eq(\ny: I64 val)\n: Bool val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-I8-_1.txt", "contents": "new val create(\nvalue: I8 val)\n: I8 val^\n\nParameters\u00b6\n\nvalue: I8 val\n\nReturns\u00b6\n\nI8 val^\n\n\nfrom[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]\u00b6\n[Source]\nnew val from[A: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/net-OSSockOpt-_388.txt", "contents": "fun box sctp_get_nonce_values()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_packet_log\u00b6\n[Source]\nfun box sctp_get_packet_log()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_get_peer_addresses\u00b6\n[Source]"} +{"id": "Pony/builtin-ILong-_58.txt", "contents": "\nU8 val\n\n\nu16_unsafe\u00b6\n[Source]\nfun box u16_unsafe()\n: U16 val\n\nReturns\u00b6\n\nU16 val\n\n\nu32_unsafe\u00b6\n[Source]\nfun box u32_unsafe()\n: U32 val\n\nReturns\u00b6"} +{"id": "Pony/src-signals-sig-_18.txt", "contents": "if n <= 32 then\n32 + n.u32()\nelse\nerror\nend\nelse\ncompile_error \"no SIGRT\"\nend\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-string-_37.txt", "contents": "732\n733\n734\n735\n736\n737\n738\n739\n740\n741\n742\n743\n744\n745\n746\n747\n748\n749\n750\n751"} +{"id": "Pony/7_equality_0.txt", "contents": "# Equality in Pony\n\nPony features two forms of equality: by structure and by identity.\n"} +{"id": "Pony/src-builtin-string-_61.txt", "contents": "1212\n1213\n1214\n1215\n1216\n1217\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1231"} +{"id": "Pony/src-cli-command-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/builtin-U8-_53.txt", "contents": "fun box u32()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nu64\u00b6\n[Source]\nfun box u64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nu128\u00b6\n[Source]"} +{"id": "Pony/collections-HashEq-_0.txt", "contents": "\n\n\n\n\n\n\nHashEq[A: (Hashable #read & Equatable[A] #read)]\u00b6\n[Source]\nprimitive val HashEq[A: (Hashable #read & Equatable[A] #read)] is\nHashFunction[A] val\n\nImplements\u00b6\n\nHashFunction[A] val\n\n\nConstructors\u00b6\ncreate\u00b6\n[Source]"} +{"id": "Pony/random-XorShift128Plus-_1.txt", "contents": "\nConstructors\u00b6\nfrom_u64\u00b6\n[Source]\nUse seed x to seed a SplitMix64 and use this to\ninitialize the 128 bits of state.\nnew ref from_u64(\nx: U64 val = 5489)\n: XorShift128Plus ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\n\nReturns\u00b6\n\nXorShift128Plus ref^\n\n\ncreate\u00b6"} +{"id": "Pony/src-builtin-runtime_options-_11.txt", "contents": "Do not send block messages to the cycle detector.\n\"\"\"\n\nvar ponypin: Bool = false\n\"\"\"\nPin scheduler threads to CPU cores. The ASIO thread can also be pinned if\n`--ponypinasio` is set.\n\"\"\"\n\nvar ponypinasio: Bool = false\n\"\"\"\nPin the ASIO thread to a CPU the way scheduler threads are pinned to CPUs.\nRequires `--ponypin` to be set to have any effect.\n\"\"\"\n\nvar ponyprintstatsinterval: U32 = -1\n\"\"\"\nPrint actor stats before an actor is destroyed and print scheduler stats\nevery X seconds. Defaults to -1 (never).\n\"\"\""} +{"id": "Pony/net-OSSockOpt-_625.txt", "contents": "fun box eq(\nthat: OSSockOpt val)\n: Bool val\n\nParameters\u00b6\n\nthat: OSSockOpt val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: OSSockOpt val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-ini-ini-_13.txt", "contents": "continue\n| '[' =>\ntry\ncurrent.delete(current.find(\"]\", 1)?, -1)\ncurrent.delete(0)\nsection = consume current\nif not f.add_section(section) then\nreturn ok\nend\nelse\nok = false\n\nif not f.errors(lineno, IniIncompleteSection) then\nreturn false\nend\nend\nelse\ntry\nlet delim = try\ncurrent.find(\"=\")?"} +{"id": "Pony/pony_check-ASCIIPunctuation-_2.txt", "contents": "\nthat: ASCIIPunctuation val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: ASCIIPunctuation val)\n: Bool val\n\nParameters\u00b6\n\nthat: ASCIIPunctuation val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-RingBuffer-_2.txt", "contents": "USize val ?\n\n\nsize\u00b6\n[Source]\nThe number of elements that have been added to the ring.\nfun box size()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nspace\u00b6\n[Source]\nThe available space in the ring.\nfun box space()\n: USize val\n"} +{"id": "Pony/src-pony_check-generator-_120.txt", "contents": "Iter[T^](sub_iter).skip(1)\nmin_iter\n].values())\n(consume t, shrunken_iter)\n\nfun u8(\nmin: U8 = U8.min_value(),\nmax: U8 = U8.max_value())\n: Generator[U8]\n=>\n\"\"\"\nCreate a generator for U8 values.\n\"\"\"\nlet that = this\nGenerator[U8](\nobject is GenObj[U8]\nfun generate(rnd: Randomness): U8^ =>\nrnd.u8(min, max)\n\nfun shrink(u: U8): ValueAndShrink[U8] =>"} +{"id": "Pony/src-files-file_stream-_0.txt", "contents": "\n\n\n\n\n\n\nfile_stream.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-DNSAuth-_1.txt", "contents": "from: (AmbientAuth val | NetAuth val)\n\nReturns\u00b6\n\nDNSAuth val^\n\n\nPublic Functions\u00b6\neq\u00b6\n[Source]\nfun box eq(\nthat: DNSAuth val)\n: Bool val\n\nParameters\u00b6\n\nthat: DNSAuth val\n\nReturns\u00b6\n"} +{"id": "Pony/collections-persistent-Nil-_0.txt", "contents": "\n\n\n\n\n\n\nNil[A: A]\u00b6\n[Source]\nThe empty list of As.\nprimitive val Nil[A: A] is\nReadSeq[val->A] box\n\nImplements\u00b6\n\nReadSeq[val->A] box\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/pony_check-ASCIINUL-_3.txt", "contents": "Bool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-SignedInteger-_2.txt", "contents": "F64 val) & Real[B] val)](\na: B)\n: Real[A] val^\n\nParameters\u00b6\n\na: B\n\nReturns\u00b6\n\nReal[A] val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: Real[A] val^\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_test-unit_test-_5.txt", "contents": "\nfun ref set_up(h: TestHelper) ? =>\n\"\"\"\nSet up the testing environment before a test method is called.\nDefault is to do nothing.\n\"\"\"\nNone\n\nfun ref tear_down(h: TestHelper) =>\n\"\"\"\nTidy up after the test has completed.\nCalled for each run test, whether that test passed, succeeded or timed out.\nThe default is to do nothing.\n\"\"\"\nNone\n\nfun label(): String =>\n\"\"\"\nReport the test label, returning an empty string for none.\nIt can be later use to filter tests which we want to run, by labels."} +{"id": "Pony/collections-persistent-Vec-_12.txt", "contents": "fun val reverse()\n: Vec[A] val\n\nReturns\u00b6\n\nVec[A] val\n\n\nkeys\u00b6\n[Source]\nReturn an iterator over the indices in the vector.\nfun val keys()\n: VecKeys[A] ref^\n\nReturns\u00b6\n\nVecKeys[A] ref^\n\n\nvalues\u00b6"} +{"id": "Pony/src-builtin-unsigned-_46.txt", "contents": "use @\"llvm.bswap.i16\"[U16](src: U16)\nuse @\"llvm.bswap.i32\"[U32](src: U32)\nuse @\"llvm.bswap.i64\"[U64](src: U64)\nuse @\"llvm.bswap.i128\"[U128](src: U128)\nuse @\"llvm.ctpop.i8\"[U8](src: U8)\nuse @\"llvm.ctpop.i16\"[U16](src: U16)\nuse @\"llvm.ctpop.i32\"[U32](src: U32)\nuse @\"llvm.ctpop.i64\"[U64](src: U64)\nuse @\"llvm.ctpop.i128\"[U128](src: U128)\nuse @\"llvm.ctlz.i8\"[U8](src: U8, is_zero_undef: Bool)\nuse @\"llvm.ctlz.i16\"[U16](src: U16, is_zero_undef: Bool)\nuse @\"llvm.ctlz.i32\"[U32](src: U32, is_zero_undef: Bool)\nuse @\"llvm.ctlz.i64\"[U64](src: U64, is_zero_undef: Bool)\nuse @\"llvm.ctlz.i128\"[U128](src: U128, is_zero_undef: Bool)\nuse @\"llvm.cttz.i8\"[U8](src: U8, zero_undef: Bool)\nuse @\"llvm.cttz.i16\"[U16](src: U16, zero_undef: Bool)\nuse @\"llvm.cttz.i32\"[U32](src: U32, zero_undef: Bool)\nuse @\"llvm.cttz.i64\"[U64](src: U64, zero_undef: Bool)\nuse @\"llvm.cttz.i128\"[U128](src: U128, zero_undef: Bool)\nuse @\"llvm.uadd.with.overflow.i8\"[(U8, Bool)](a: U8, b: U8)"} +{"id": "Pony/builtin-U64-_62.txt", "contents": "fun box u128_unsafe()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nulong_unsafe\u00b6\n[Source]\nfun box ulong_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nusize_unsafe\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_461.txt", "contents": "fun box sctp_smallest_pmtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_default\u00b6\n[Source]\nfun box sctp_ss_default()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ss_fair_bandwith\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_75.txt", "contents": "1492\n1493\n1494\n1495\n1496\n1497\n1498\n1499\n1500\n1501\n1502\n1503\n1504\n1505\n1506\n1507\n1508\n1509\n1510\n1511"} +{"id": "Pony/5_methods_9.txt", "contents": "# Default arguments\n\nWhen defining a method you can provide default values for any of the arguments. The caller then has the choice to use the values you have provided or to provide their own. Default argument values are specified with a `=` after the parameter name.\n\n```pony\nclass Coord\nvar _x: U32\nvar _y: U32\n\nnew create(x: U32 = 0, y: U32 = 0) =>\n_x = x\n_y = y\n\nclass Bar\nfun f() =>\nvar a: Coord = Coord.create() // Contains (0, 0)\nvar b: Coord = Coord.create(3) // Contains (3, 0)\nvar c: Coord = Coord.create(3, 4) // Contains (3, 4)\n```\n"} +{"id": "Pony/buffered-Writer-_24.txt", "contents": "done\u00b6\n[Source]\nReturn an array of buffered ByteSeqs and reset the Writer's buffer.\nfun ref done()\n: Array[(String val | Array[U8 val] val)] iso^\n\nReturns\u00b6\n\nArray[(String val | Array[U8 val] val)] iso^\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-TCPConnectionNotify-_10.txt", "contents": "Returns\u00b6\n\nBool val\n\n\nexpect\u00b6\n[Source]\nCalled when the connection has been told to expect a certain quantity of\nbytes. This allows nested notifiers to change the expected quantity, which\nallows a lower level protocol to handle any framing (e.g. SSL).\nfun ref expect(\nconn: TCPConnection ref,\nqty: USize val)\n: USize val\n\nParameters\u00b6\n\nconn: TCPConnection ref\nqty: USize val\n"} +{"id": "Pony/src-builtin-iterator-_2.txt", "contents": "32\n33\n34\n35\n36\n37\n38\n39\n40\n41\n42\n43\n44\n45\n46\n47\n48\n49\n50\n51"} +{"id": "Pony/builtin-FloatingPoint-_62.txt", "contents": "USize val\n\n\nf32\u00b6\n[Source]\nfun box f32()\n: F32 val\n\nReturns\u00b6\n\nF32 val\n\n\nf64\u00b6\n[Source]\nfun box f64()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-platform-_2.txt", "contents": "fun posix(): Bool => bsd() or linux() or osx()\nfun windows(): Bool => compile_intrinsic\n\nfun x86(): Bool => compile_intrinsic\nfun arm(): Bool => compile_intrinsic\nfun riscv(): Bool => compile_intrinsic\n\nfun lp64(): Bool => compile_intrinsic\nfun llp64(): Bool => compile_intrinsic\nfun ilp32(): Bool => compile_intrinsic\n\nfun bigendian(): Bool => compile_intrinsic\nfun littleendian(): Bool => compile_intrinsic\n\nfun native128(): Bool => compile_intrinsic\nfun debug(): Bool => compile_intrinsic\nfun runtimestats(): Bool => compile_intrinsic\nfun runtimestatsmessages(): Bool => compile_intrinsic\n\n"} +{"id": "Pony/builtin-FloatingPoint-_54.txt", "contents": "A\n\n\nhash\u00b6\n[Source]\nfun box hash()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_134.txt", "contents": "fun box ipv6_flowlabel_mgr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_a_get\u00b6\n[Source]\nfun box ipv6_fl_a_get()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_fl_a_put\u00b6\n[Source]"} +{"id": "Pony/random-XorOshiro128StarStar-_12.txt", "contents": ": N\n\nParameters\u00b6\n\nn: N\n\nReturns\u00b6\n\nN\n\n\nint_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]\u00b6\n[Source]\nfun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |\nU64 val | U128 val | ULong val |\nUSize val) & Real[N] val)](\nn: N)\n: N\n\nParameters\u00b6"} +{"id": "Pony/net-OSSockOpt-_611.txt", "contents": "fun box tipc_reserved_types()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_retdata\u00b6\n[Source]\nfun box tipc_retdata()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ntipc_sock_recvq_depth\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_46.txt", "contents": "912\n913\n914\n915\n916\n917\n918\n919\n920\n921\n922\n923\n924\n925\n926\n927\n928\n929\n930\n931"} +{"id": "Pony/src-pony_check-generator-_27.txt", "contents": "532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n545\n546\n547\n548\n549\n550\n551"} +{"id": "Pony/builtin-FloatingPoint-_30.txt", "contents": "\nReturns\u00b6\n\nA\n\n\npowi\u00b6\n[Source]\nfun box powi(\ny: I32 val)\n: A\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n\nA\n"} +{"id": "Pony/builtin-U8-_1.txt", "contents": "new val create(\nvalue: U8 val)\n: U8 val^\n\nParameters\u00b6\n\nvalue: U8 val\n\nReturns\u00b6\n\nU8 val^\n\n\nfrom[B: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[B] val)]\u00b6\n[Source]\nnew val from[B: ((I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |"} +{"id": "Pony/term-ANSINotify-_2.txt", "contents": "ctrl: Bool val\nalt: Bool val\nshift: Bool val\n\nReturns\u00b6\n\nNone val\n\n\ndown\u00b6\n[Source]\nfun ref down(\nctrl: Bool val,\nalt: Bool val,\nshift: Bool val)\n: None val\n\nParameters\u00b6\n\nctrl: Bool val"} +{"id": "Pony/src-collections-ring_buffer-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/process-ProcessNotify-_1.txt", "contents": "Parameters\u00b6\n\nprocess: ProcessMonitor ref\n\nReturns\u00b6\n\nNone val\n\n\nstdout\u00b6\n[Source]\nProcessMonitor calls this when new data is received on STDOUT of the\nforked process\nfun ref stdout(\nprocess: ProcessMonitor ref,\ndata: Array[U8 val] iso)\n: None val\n\nParameters\u00b6\n"} +{"id": "Pony/collections-persistent-HashSet-_10.txt", "contents": "Bool val\n\n\nle\u00b6\n[Source]\nReturn true if every element in this is also in that.\nfun box le(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\ngt\u00b6"} +{"id": "Pony/5_methods_4.txt", "contents": "# Calling\n\nAs in many other languages, methods in Pony are called by providing the arguments within parentheses after the method name. The parentheses are required even if there are no arguments being passed to the method.\n\n```pony\nclass Foo\nfun hello(name: String): String =>\n\"hello \" + name\n\nfun f() =>\nlet a = hello(\"Fred\")\n```\n\nConstructors are usually called \"on\" a type, by specifying the type that is to be created. To do this just specify the type, followed by a dot, followed by the name of the constructor you want to call.\n\n```pony\nclass Foo\nvar _x: U32\n\nnew create() =>"} +{"id": "Pony/itertools-Iter-_16.txt", "contents": "(0, 1) (1, 2) (2, 3)\nfun ref enum[optional B: (Real[B] val & (I8 val | I16 val | I32 val |\nI64 val | I128 val | ILong val |\nISize val | U8 val | U16 val |\nU32 val | U64 val | U128 val |\nULong val | USize val | F32 val |\nF64 val))]()\n: Iter[(B , A)] ref^\n\nReturns\u00b6\n\nIter[(B , A)] ref^\n\n\nfilter\u00b6\n[Source]\nReturn an iterator that only returns items that match the predicate f.\nExample\u00b6\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.filter({(x) => (x % 2) == 0 })"} +{"id": "Pony/src-files-file-_34.txt", "contents": "use @open[I32](path: Pointer[U8] tag, flags: I32, ...) if not windows\nuse @_read[I32](fd: I32, buffer: Pointer[None], bytes_to_read: I32) if windows\nuse @read[ISize](fd: I32, buffer: Pointer[None], bytes_to_read: USize)\nif not windows\nuse @_write[I32](fd: I32, buffer: Pointer[None], bytes_to_send: I32) if windows\nuse @writev[ISize](fd: I32, buffer: Pointer[None], num_to_send: I32)\nif not windows\nuse @_lseeki64[I64](fd: I32, offset: I64, base: I32) if windows\nuse @lseek64[I64](fd: I32, offset: I64, base: I32) if linux\nuse @lseek[I64](fd: I32, offset: I64, base: I32) if not windows and not linux\nuse @FlushFileBuffers[Bool](file_handle: Pointer[None]) if windows\nuse @_get_osfhandle[Pointer[None]](fd: I32) if windows\nuse @fsync[I32](fd: I32) if not windows\nuse @fdatasync[I32](fd: I32) if not windows\nuse @_chsize_s[I32](fd: I32, len: I64) if windows\nuse @ftruncate64[I32](fd: I32, len: I64) if linux\nuse @ftruncate[I32](fd: I32, len: I64) if not windows and not linux\nuse @_close[I32](fd: I32) if windows\nuse @close[I32](fd: I32) if not windows\nuse @pony_os_writev_max[I32]()"} +{"id": "Pony/src-files-directory-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/files-FileEOF-_0.txt", "contents": "\n\n\n\n\n\n\nFileEOF\u00b6\n[Source]\nprimitive val FileEOF\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: FileEOF val^\n\nReturns\u00b6\n\nFileEOF val^"} +{"id": "Pony/builtin-U32-_37.txt", "contents": "\ny: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nop_not\u00b6\n[Source]\nfun box op_not()\n: U32 val\n\nReturns\u00b6\n\nU32 val\n\n\nadd\u00b6\n[Source]"} +{"id": "Pony/src-builtin-string-_68.txt", "contents": "1352\n1353\n1354\n1355\n1356\n1357\n1358\n1359\n1360\n1361\n1362\n1363\n1364\n1365\n1366\n1367\n1368\n1369\n1370\n1371"} +{"id": "Pony/src-time-timers-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189use \"collections\"\n\nuse @pony_asio_event_create[AsioEventID]("} +{"id": "Pony/builtin-SignedInteger-_29.txt", "contents": "\ny: A\n\nReturns\u00b6\n\n(A , Bool val)\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_27.txt", "contents": "fun box ipproto_inlsp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_inp\u00b6\n[Source]\nfun box ipproto_inp()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipproto_ip\u00b6\n[Source]"} +{"id": "Pony/collections-HashSet-_8.txt", "contents": "that: Iterator[A^] ref\n\nReturns\u00b6\n\nNone val\n\n\nintersect[optional K: HashFunction[box->A!] val]\u00b6\n[Source]\nRemove everything that isn't in that.\nfun ref intersect[optional K: HashFunction[box->A!] val](\nthat: HashSet[box->A!, K] ref)\n: None val\n\nParameters\u00b6\n\nthat: HashSet[box->A!, K] ref\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ILong-_45.txt", "contents": "[Source]\nfun box gt(\ny: ILong val)\n: Bool val\n\nParameters\u00b6\n\ny: ILong val\n\nReturns\u00b6\n\nBool val\n\n\nhash64\u00b6\n[Source]\nfun box hash64()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-Comparable-_1.txt", "contents": "fun box lt(\nthat: box->A)\n: Bool val\n\nParameters\u00b6\n\nthat: box->A\n\nReturns\u00b6\n\nBool val\n\n\nle\u00b6\n[Source]\nfun box le(\nthat: box->A)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-files-path-_49.txt", "contents": "\n(((c >= 'A') and (c <= 'Z')) or ((c >= 'a') and (c <= 'z')))\nand (path.at_offset(offset + 1)? == ':')\nelse\nfalse\nend\n\nfun _network_share(path: String, offset: ISize = 0): String =>\n\"\"\"\nLook for a host, a \\, and a resource. Return the path up to that point if\nwe found one, otherwise an empty String.\n\"\"\"\ntry\nlet next = path.find(\"\\\\\", offset)? + 1\n\ntry\npath.trim(0, path.find(\"\\\\\", next)?.usize())\nelse\npath\nend"} +{"id": "Pony/src-collections-list-_65.txt", "contents": "fun ref append_list(that: List[A]) =>\n\"\"\"\nEmpties the provided List by appending all elements onto the receiving List.\n\n```pony\nlet my_list = List[String].from([\"a\"; \"b\"; \"c\"])\nlet other_list = List[String].from([\"d\"; \"e\"; \"f\"])\nmy_list.append_list(other_list) // my_list is [\"a\"; \"b\"; \"c\"; \"d\"; \"e\"; \"f\"], other_list is empty\n```\n\"\"\"\nif this isnt that then\nwhile that._size > 0 do\ntry append_node(that.head()?) end\nend\nend\n\nfun ref prepend_list(that: List[A]) =>\n\"\"\"\nEmpties the provided List by prepending all elements onto the receiving List.\n"} +{"id": "Pony/src-net-tcp_listener-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263use @pony_os_accept[U32](event: AsioEventID)\nuse @pony_os_listen_tcp[AsioEventID](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag)\nuse @pony_os_listen_tcp4[AsioEventID](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag)\nuse @pony_os_listen_tcp6[AsioEventID](owner: AsioEventNotify, host: Pointer[U8] tag,\nservice: Pointer[U8] tag)\n\nactor TCPListener is AsioEventNotify"} +{"id": "Pony/src-net-net_address-_12.txt", "contents": "\nlet _addr1: U32 = 0\n\"\"\"\nBits 0-32 of the IPv6 address in network byte order.\n\n`0` if this is an IPv4 address. Check with `ipv4()` and `ipv6()`.\n\"\"\"\n\nlet _addr2: U32 = 0\n\"\"\"\nBits 33-64 of the IPv6 address in network byte order.\n\n`0` if this is an IPv4 address. Check with `ipv4()` and `ipv6()`.\n\"\"\"\nlet _addr3: U32 = 0\n\"\"\"\nBits 65-96 of the IPv6 address in network byte order.\n\n`0` if this is an IPv4 address. Check with `ipv4()` and `ipv6()`.\n\"\"\""} +{"id": "Pony/src-backpressure-backpressure-_8.txt", "contents": "# Example program\n\n```pony\n// Here we have a TCPConnectionNotify that upon construction\n// is given a ApplyReleaseBackpressureAuth token. This allows the notifier\n// to inform the Pony runtime when to apply and release backpressure\n// as the connection experiences it.\n// Note the calls to\n//\n// Backpressure.apply(_auth)\n// Backpressure.release(_auth)\n//\n// that apply and release backpressure as needed\n\nuse \"backpressure\"\nuse \"collections\"\nuse \"net\"\n\nclass SlowDown is TCPConnectionNotify\nlet _auth: ApplyReleaseBackpressureAuth"} +{"id": "Pony/src-files-file-_62.txt", "contents": "fun info(): FileInfo ? =>\n\"\"\"\nReturn a FileInfo for this directory. Raise an error if the fd is invalid\nor if we don't have FileStat permission.\n\"\"\"\nFileInfo._descriptor(_fd, path)?\n\nfun chmod(mode: FileMode box): Bool =>\n\"\"\"\nSet the FileMode for this directory.\n\"\"\"\n_FileDes.chmod(_fd, path, mode)\n\nfun chown(uid: U32, gid: U32): Bool =>\n\"\"\"\nSet the owner and group for this directory. Does nothing on Windows.\n\"\"\"\n_FileDes.chown(_fd, path, uid, gid)\n\nfun touch(): Bool =>"} +{"id": "Pony/pony_check-Randomness-_17.txt", "contents": "max: F64 val = 1.0)\n: F64 val\n\nParameters\u00b6\n\nmin: F64 val = 0.0\nmax: F64 val = 1.0\n\nReturns\u00b6\n\nF64 val\n\n\nbool\u00b6\n[Source]\nGenerate a random Bool value.\nfun ref bool()\n: Bool val\n\nReturns\u00b6"} +{"id": "Pony/builtin-I128-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: I128 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nI128 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: I128 val^\n\nReturns\u00b6\n"} +{"id": "Pony/random-SplitMix64-_14.txt", "contents": "fun ref shuffle[A: A](\narray: Array[A] ref)\n: None val\n\nParameters\u00b6\n\narray: Array[A] ref\n\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-builtin-float-_43.txt", "contents": "Minimum positive value representable at full precision (ie a normalised\nnumber).\n\"\"\"\nfrom_bits(0x0010_0000_0000_0000)\n\nnew epsilon() =>\n\"\"\"\nMinimum positive value such that (1 + epsilon) != 1.\n\"\"\"\nfrom_bits(0x3CB0_0000_0000_0000)\n\nfun tag radix(): U8 =>\n\"\"\"\nExponent radix.\n\"\"\"\n2\n\nfun tag precision2(): U8 =>\n\"\"\"\nMantissa precision in bits."} +{"id": "Pony/collections-Range-_1.txt", "contents": "end\nend\n\nSupports min being smaller than max with negative inc\nbut only for signed integer types and floats:\nvar previous = 11\nfor left in Range[I64](10, -5, -1) do\nif not (left < previous) then\nerror\nend\nprevious = left\nend\n\nIf inc is nonzero, but cannot produce progress towards max because of its sign, the Range is considered empty and will not produce any iterations. The Range is also empty if either min equals max, independent of the value of inc, or if inc is zero.\nlet empty_range1 = Range(0, 10, -1)\nlet empty_range2 = Range(0, 10, 0)\nlet empty_range3 = Range(10, 10)\nempty_range1.is_empty() == true\nempty_range2.is_empty() == true\nempty_range3.is_empty() == true"} +{"id": "Pony/collections-ListNode-_1.txt", "contents": "collections.List class is the\ncorrect way to create these. Do not attempt to create a Linked List using only\nListNodes.\nExample program\u00b6\nThe functions which are illustrated below are only those which operate on an\nindividual ListNode.\nIt outputs:\nMy node has the item value: My Node item\nMy node has the updated item value: My updated Node item\nPopped the item from the ListNode\nThe ListNode has no (None) item.\nuse \"collections\"\nactor Main\nnew create(env:Env) =>\n\n// Create a new ListNode of type String\nlet my_list_node = ListNode[String](\"My Node item\")\ntry\nenv.out.print(\"My node has the item value: \"\n+ my_list_node.apply()?) // My Node item"} +{"id": "Pony/builtin-FloatingPoint-_6.txt", "contents": "\nU8 val\n\n\nmin_exp2\u00b6\n[Source]\nfun tag min_exp2()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\nmin_exp10\u00b6\n[Source]\nfun tag min_exp10()\n: I16 val\n\nReturns\u00b6"} +{"id": "Pony/builtin-U8-_56.txt", "contents": "fun box f64()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\ni8_unsafe\u00b6\n[Source]\nfun box i8_unsafe()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-signals-sig-_14.txt", "contents": "\nfun ttin(): U32 =>\nifdef linux or bsd or osx then 21\nelse compile_error \"no SIGTTIN\"\nend\n\nfun ttou(): U32 =>\nifdef linux or bsd or osx then 22\nelse compile_error \"no SIGTTOU\"\nend\n\nfun io(): U32 =>\nifdef bsd or osx then 23\nelseif linux then 29\nelse compile_error \"no SIGIO\"\nend\n\nfun xcpu(): U32 =>\nifdef linux or bsd or osx then 24\nelse compile_error \"no SIGXCPU\""} +{"id": "Pony/builtin-String-_57.txt", "contents": "\")\n: None val\n\nParameters\u00b6\n\ns: String box = \"\n\"\n\nReturns\u00b6\n\nNone val\n\n\nrstrip\u00b6\n[Source]\nRemove all trailing characters within the string that are in s. By default,\ntrailing whitespace is removed.\nfun ref rstrip(\ns: String box = \"\n\")"} +{"id": "Pony/builtin-UnsignedInteger-_42.txt", "contents": "[Source]\nfun box ne(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n\nReturns\u00b6\n\nBool val\n\n\nlt\u00b6\n[Source]\nfun box lt(\ny: box->A)\n: Bool val\n"} +{"id": "Pony/src-cli-command_parser-_11.txt", "contents": "212\n213\n214\n215\n216\n217\n218\n219\n220\n221\n222\n223\n224\n225\n226\n227\n228\n229\n230\n231"} +{"id": "Pony/builtin-U128-_28.txt", "contents": "fun box rem_partial(\ny: U128 val)\n: U128 val ?\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val ?\n\n\ndivrem_partial\u00b6\n[Source]\nfun box divrem_partial(\ny: U128 val)\n: (U128 val , U128 val) ?\n\nParameters\u00b6"} +{"id": "Pony/src-time-timer-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/signals-SignalHandler-_2.txt", "contents": "Public Behaviours\u00b6\nraise\u00b6\n[Source]\nRaise the signal.\nbe raise()\n\n\ndispose\u00b6\n[Source]\nDispose of the signal handler.\nbe dispose()\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_306.txt", "contents": "fun box rds_info_message_flag_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_message_flag_fast_ack\u00b6\n[Source]\nfun box rds_info_message_flag_fast_ack()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_recv_messages\u00b6\n[Source]"} +{"id": "Pony/collections-MapValues-_0.txt", "contents": "\n\n\n\n\n\n\nMapValues[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read]\u00b6\n[Source]\nAn iterator over the values in a map.\nclass ref MapValues[K: K, V: V, H: HashFunction[K] val, M: HashMap[K, V, H] #read] is\nIterator[M->V] ref\n\nImplements\u00b6\n\nIterator[M->V] ref\n\n\nConstructors\u00b6\ncreate\u00b6"} +{"id": "Pony/src-net-ossockopt-_92.txt", "contents": "fun ip_min_memberships():I32 => @pony_os_sockopt_option(I32(282))\nfun ip_msfilter():I32 => @pony_os_sockopt_option(I32(283))\nfun ip_mtu():I32 => @pony_os_sockopt_option(I32(284))\nfun ip_mtu_discover():I32 => @pony_os_sockopt_option(I32(285))\nfun ip_multicast_all():I32 => @pony_os_sockopt_option(I32(286))\nfun ip_multicast_if():I32 => @pony_os_sockopt_option(I32(287))\nfun ip_multicast_ifindex():I32 => @pony_os_sockopt_option(I32(288))\nfun ip_multicast_loop():I32 => @pony_os_sockopt_option(I32(289))\nfun ip_multicast_ttl():I32 => @pony_os_sockopt_option(I32(290))\nfun ip_multicast_vif():I32 => @pony_os_sockopt_option(I32(291))\nfun ip_nat_xxx():I32 => @pony_os_sockopt_option(I32(292))\nfun ip_nodefrag():I32 => @pony_os_sockopt_option(I32(293))\nfun ip_old_fw_add():I32 => @pony_os_sockopt_option(I32(294))\nfun ip_old_fw_del():I32 => @pony_os_sockopt_option(I32(295))\nfun ip_old_fw_flush():I32 => @pony_os_sockopt_option(I32(296))\nfun ip_old_fw_get():I32 => @pony_os_sockopt_option(I32(297))\nfun ip_old_fw_resetlog():I32 => @pony_os_sockopt_option(I32(298))\nfun ip_old_fw_zero():I32 => @pony_os_sockopt_option(I32(299))\nfun ip_onesbcast():I32 => @pony_os_sockopt_option(I32(300))\nfun ip_options():I32 => @pony_os_sockopt_option(I32(301))"} +{"id": "Pony/src-itertools-iter-_80.txt", "contents": "c = c - 1\nend\nend\nend\nerror\n\nfun ref filter_map[B](f: {(A!): (B^ | None) ?} box): Iter[B]^ =>\n\"\"\"\nReturn an iterator which applies `f` to each element. If `None` is\nreturned, then the iterator will try again by applying `f` to the next\nelement. Otherwise, the value of type `B` is returned.\n"} +{"id": "Pony/src-term-ansi-_12.txt", "contents": "232\n233\n234\n235\n236\n237\n238\n239\n240\n241\n242\n243\n244\n245\n246\n247\n248\n249\n250\n251"} +{"id": "Pony/builtin-F64-_41.txt", "contents": "Parameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n\n(F64 val , F64 val)\n\n\nrem_unsafe\u00b6\nfun box rem_unsafe(\ny: F64 val)\n: F64 val\n\nParameters\u00b6\n\ny: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/cli-CommandSpec-_9.txt", "contents": "[Source]\nReturns the name of the help command, which defaults to \"help\".\nfun box help_name()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nhelp_string\u00b6\n[Source]\nReturns a formated help string for this command and all of its arguments.\nfun box help_string()\n: String val\n\nReturns\u00b6\n\nString val\n"} +{"id": "Pony/src-builtin-array-_64.txt", "contents": "end\n\nfun read_u128[B: (A & Real[B] val & U8) = A](offset: USize): U128 ? =>\n\"\"\"\nReads a U128 from offset. This is only allowed for an array of U8s.\n\"\"\"\nlet u128_bytes = U128(0).bytewidth()\nif (offset + u128_bytes) <= _size then\n_ptr._offset(offset)._convert[U128]()._apply(0)\nelse\nerror\nend\n\nfun apply(i: USize): this->A ? =>\n\"\"\"\nGet the i-th element, raising an error if the index is out of bounds.\n\"\"\"\nif i < _size then\n_ptr._apply(i)\nelse"} +{"id": "Pony/src-files-path-_54.txt", "contents": "\"\"\"\nlet array = recover Array[String] end\nvar offset: ISize = 0\n\ntry\nwhile true do\nlet next = path.find(list_sep(), offset)?\narray.push(clean(path.trim(offset.usize(), next.usize())))\noffset = next + 1\nend\nelse\narray.push(clean(path.trim(offset.usize())))\nend\n\narray\n\nfun random(len: USize = 6): String =>\n\"\"\"\nReturns a pseudo-random base, suitable as a temporary file name or\ndirectory name, but not guaranteed to not already exist."} +{"id": "Pony/itertools-Iter-_19.txt", "contents": "\n\nfilter_map[B: B]\u00b6\n[Source]\nReturn an iterator which applies f to each element. If None is\nreturned, then the iterator will try again by applying f to the next\nelement. Otherwise, the value of type B is returned.\nExample\u00b6\nIter[I64]([as I64: 1; -2; 4; 7; -5])\n.filter_map[USize](\n{(i: I64): (USize | None) => if i >= 0 then i.usize() end })\n\n1 4 7\n```pony\nfun ref filter_map[B: B](\nf: {(A!): (B^ | None) ?}[A, B] box)\n: Iter[B] ref^\n\nParameters\u00b6\n"} +{"id": "Pony/src-builtin-string-_128.txt", "contents": "recover String end\nend\n\nfun lower(): String iso^ =>\n\"\"\"\nReturns a lower case version of the string.\n\"\"\"\nlet s = clone()\ns.lower_in_place()\ns\n\nfun ref lower_in_place() =>\n\"\"\"\nTransforms the string to lower case. Currently only knows ASCII case.\n\"\"\"\nvar i: USize = 0\n\nwhile i < _size do\nlet c = _ptr._apply(i)\n"} +{"id": "Pony/src-buffered-reader-_41.txt", "contents": "messages consist of the following:\n\n* `list_size` - the number of items in the following list of items\nas a big-endian 32-bit integer\n* zero or more items of the following data:\n* a big-endian 64-bit floating point number\n* a string that starts with a big-endian 32-bit integer that\nspecifies the length of the string, followed by a number of\nbytes that represent the string\n\nA message would be something like this:\n\n```\n[message_length][list_size][float1][string1][float2][string2]...\n```\n\nThe following program uses a `Reader` to decode a message of\nthis type and print them:\n\n```pony"} +{"id": "Pony/collections-persistent-HashSet-_14.txt", "contents": "fun box ne(\nthat: HashSet[A, H] box)\n: Bool val\n\nParameters\u00b6\n\nthat: HashSet[A, H] box\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/src-pony_check-property-_12.txt", "contents": "max_shrink_rounds = max_shrink_rounds'\nmax_generator_retries = max_generator_retries'\ntimeout = timeout'\nasync = async'\n\nfun string(): String iso^ =>\nrecover\nString()\n.>append(\"Params(seed=\")\n.>append(seed.string())\n.>append(\")\")\nend\n\ntrait Property1[T]\n\"\"\"\nA property that consumes 1 argument of type `T`.\n\nA property is defined by a [Generator](pony_check-Generator.md), returned by\nthe [`gen()`](pony_check-Property1.md#gen) method, and a\n[`property`](pony_check-Property1#property) method that consumes the"} +{"id": "Pony/src-builtin-string-_71.txt", "contents": "1412\n1413\n1414\n1415\n1416\n1417\n1418\n1419\n1420\n1421\n1422\n1423\n1424\n1425\n1426\n1427\n1428\n1429\n1430\n1431"} +{"id": "Pony/pony_check-Property4-_6.txt", "contents": ": String val\n\nReturns\u00b6\n\nString val\n\n\nparams\u00b6\n[Source]\nfun box params()\n: PropertyParams val\n\nReturns\u00b6\n\nPropertyParams val\n\n\n\n\n"} +{"id": "Pony/pony_test-TestHelper-_13.txt", "contents": "msg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the contents of the 2 given ReadSeqs are equal ignoring order.\nThe type parameter of this function is the type parameter of the\nelements in both ReadSeqs. For instance, when comparing two Array[U8],\nyou should call this method as follows:\nfun apply(h: TestHelper) =>\nlet a: Array[U8] = [1; 2; 3]\nlet b: Array[U8] = [1; 3; 2]\nh.assert_array_eq_unordered[U8](a, b)\n\nfun box assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)]("} +{"id": "Pony/builtin-I32-_46.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/builtin-ULong-_8.txt", "contents": "fun box ctz_unsafe()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nbitwidth\u00b6\n[Source]\nfun box bitwidth()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nbytewidth\u00b6\n[Source]"} +{"id": "Pony/process-ProcessError-_1.txt", "contents": "\nParameters\u00b6\n\nerror_type': (ExecveError val | PipeError val | ForkError val |\nWaitpidError val | WriteError val | KillError val |\nCapError val | ChdirError val | UnknownError val)\nmessage': (String val | None val) = reference\n\nReturns\u00b6\n\nProcessError val^\n\n\nPublic fields\u00b6\nlet error_type: (ExecveError val | PipeError val | ForkError val |\u00b6\n[WaitpidError](process-WaitpidError.md) val | [WriteError](process-WriteError.md) val | [KillError](process-KillError.md) val |\n[CapError](process-CapError.md) val | [ChdirError](process-ChdirError.md) val | [UnknownError](process-UnknownError.md) val)\n\n[Source]\n"} +{"id": "Pony/src-collections-list_node-_20.txt", "contents": "The ListNode must be contained within a List for this to succeed.\n\"\"\"\nmatch _list\n| let list': List[A] =>\nmatch (_prev, _next)\n| (let prev': ListNode[A], let next': ListNode[A]) =>\n// We're in the middle of the list.\nprev'._next = _next\nnext'._prev = _prev\n_prev = None\n_next = None\n| (let prev': ListNode[A], None) =>\n// We're the tail.\nprev'._next = None\nlist'._set_tail(prev')\n_prev = None\n| (None, let next': ListNode[A]) =>\n// We're the head.\nnext'._prev = None\nlist'._set_head(next')"} +{"id": "Pony/net-NetAddress-_6.txt", "contents": "its struct sockaddr definition, returns the length.\nElse (Linux/Windows) returns the size of sockaddr_in or sockaddr_in6.\nfun box length()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n\n\nfamily\u00b6\n[Source]\nReturns the family.\nfun box family()\n: U8 val\n\nReturns\u00b6\n\nU8 val\n"} +{"id": "Pony/src-pony_check-property_helper-_41.txt", "contents": "true\nelse\n_fail(\"Assert EQ_UNORDERED failed from an internal error.\")\nfalse\nend\n\nfun _print_array[A: Stringable #read](array: ReadSeq[A]): String =>\n\"\"\"\nGenerate a printable string of the contents of the given readseq to use in\nerror messages.\n\"\"\"\n\"[len=\" + array.size().string() + \": \" + \", \".join(array.values()) + \"]\"\n\n\n/****** END DUPLICATION FROM TESTHELPER *********/\n\nfun expect_action(name: String) =>\n\"\"\"\nExpect some action of the given name to complete\nfor the property to hold."} +{"id": "Pony/src-builtin-string-_165.txt", "contents": "(value *? base') +? digit\nend\n\nhad_digit = true\nindex = index + 1\nend\n\n// Check result\nif not had_digit then\n// No integer found\nreturn (0, 0)\nend\n\n// Success\n(value, index - start_index)\n\nfun _read_int_base[A: ((Signed | Unsigned) & Integer[A] val)](\nbase: U8,\nindex: USize)\n: (A, USize /* chars used */)"} +{"id": "Pony/ponycheck_3.txt", "contents": "\nfun property(arg1: Array[USize], ph: PropertyHelper) =>\nph.assert_array_eq[USize](arg1, arg1.reverse())\n```\n"} +{"id": "Pony/net-Proxy-_0.txt", "contents": "\n\n\n\n\n\n\nProxy\u00b6\n[Source]\ninterface ref Proxy\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun box apply(\nwrap: TCPConnectionNotify iso)\n: TCPConnectionNotify iso^\n\nParameters\u00b6\n"} +{"id": "Pony/builtin-I32-_16.txt", "contents": "\ny: I32 val\n\nReturns\u00b6\n\n(I32 val , Bool val)\n\n\nremc\u00b6\n[Source]\nfun box remc(\ny: I32 val)\n: (I32 val , Bool val)\n\nParameters\u00b6\n\ny: I32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-string-_103.txt", "contents": "let max = len.max_value() - 1\nlet min_alloc = len.min(max) + 1\nif min_alloc <= (max / 2) then\n_alloc = min_alloc.next_pow2()\nelse\n_alloc = min_alloc.min(max)\nend\n_ptr = _ptr._realloc(_alloc, _size)\nend\n\nfun ref compact() =>\n\"\"\"\nTry to remove unused space, making it available for garbage collection. The\nrequest may be ignored. The string is returned to allow call chaining.\n\"\"\"\nif (_size + 1) <= 512 then\nif (_size + 1).next_pow2() != _alloc.next_pow2() then\n_alloc = (_size + 1).next_pow2()\nlet old_ptr = _ptr = Pointer[U8]._alloc(_alloc)\nold_ptr._copy_to(_ptr, _size)"} +{"id": "Pony/buffered-Reader-_32.txt", "contents": "\nParameters\u00b6\n\noffset: USize val = 0\n\nReturns\u00b6\n\nI64 val ?\n\n\npeek_u128_be\u00b6\n[Source]\nPeek at a big-endian U128.\nfun box peek_u128_be(\noffset: USize val = 0)\n: U128 val ?\n\nParameters\u00b6\n\noffset: USize val = 0"} +{"id": "Pony/net-UDPSocket-_26.txt", "contents": "\nU32 val\n\n\nset_so_sndbuf\u00b6\n[Source]\nWrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)\nfun ref set_so_sndbuf(\nbufsize: U32 val)\n: U32 val\n\nParameters\u00b6\n\nbufsize: U32 val\n\nReturns\u00b6\n\nU32 val\n\n"} +{"id": "Pony/src-builtin-stdin-_15.txt", "contents": "if _use_event then\n// Create a new event.\n_event = @pony_asio_event_create(this, 0, AsioEvent.read(), 0, true)\nelse\n// Start the read loop.\n_loop_read()\nend\nend\n\ntry (_notify as InputNotify).dispose() end\n_notify = consume notify\n\nbe _loop_read() =>\n\"\"\"\nIf we are able to read from stdin, schedule another read.\n\"\"\"\nif _read() then\n_loop_read()\nend\n"} +{"id": "Pony/builtin-I64-_15.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\n(I64 val , Bool val)\n\n\nmulc\u00b6\n[Source]\nfun box mulc(\ny: I64 val)\n: (I64 val , Bool val)\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-files-file_mode-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-files-file-_44.txt", "contents": "Clears the last error code set for this File.\nClears the error indicator for the stream.\n\"\"\"\n_errno = FileOK\n\nfun _get_error(): FileErrNo =>\n\"\"\"\nFetch errno from the OS.\n\"\"\"\nlet os_errno = @pony_os_errno()\nmatch os_errno\n| _EBADF() => return FileBadFileNumber\n| _EEXIST() => return FileExists\n| _EACCES() => return FilePermissionDenied\nelse\nreturn FileError\nend\n\n\nfun valid(): Bool =>"} +{"id": "Pony/examples_9.txt", "contents": "# How to write tests\n\nCreate a test.pony file\n\n```pony\nuse \"pony_test\"\n\nactor Main is TestList\nnew create(env: Env) => PonyTest(env, this)\nnew make() => None\n\nfun tag tests(test: PonyTest) =>\ntest(_TestAddition)\n\nclass iso _TestAddition is UnitTest\n\"\"\"\nAdding 2 numbers\n\"\"\"\nfun name(): String => \"u32/add\"\n"} +{"id": "Pony/src-net-udp_notify-_3.txt", "contents": "None\n\nfun ref not_listening(sock: UDPSocket ref)\n\"\"\"\nCalled if it wasn't possible to bind the socket to an address.\n\nIt is expected to implement proper error handling. You need to opt in to\nignoring errors, which can be implemented like this:\n\n```pony\nfun ref not_listening(sock: UDPSocket ref) =>\nNone\n```\n\"\"\"\n\nfun ref received(\nsock: UDPSocket ref,\ndata: Array[U8] iso,\nfrom: NetAddress)\n=>"} +{"id": "Pony/src-collections-ring_buffer-_5.txt", "contents": "_mod = n - 1\n_array = Array[A](n)\n\nfun head(): USize ? =>\n\"\"\"\nThe first read that will succeed. If nothing has been written to the ring,\nthis will raise an error.\n\"\"\"\nif _write > 0 then\nif _write > space() then\n_write - space()\nelse\n0\nend\nelse\nerror\nend\n\nfun size(): USize =>\n\"\"\""} +{"id": "Pony/builtin-UnsignedInteger-_58.txt", "contents": "\nI64 val\n\n\ni128_unsafe\u00b6\n[Source]\nfun box i128_unsafe()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong_unsafe\u00b6\n[Source]\nfun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6"} +{"id": "Pony/random-XorOshiro128StarStar-_2.txt", "contents": "[Source]\nnew ref create(\nx: U64 val = 5489,\ny: U64 val = 0)\n: XorOshiro128StarStar ref^\n\nParameters\u00b6\n\nx: U64 val = 5489\ny: U64 val = 0\n\nReturns\u00b6\n\nXorOshiro128StarStar ref^\n\n\nPublic Functions\u00b6\nnext\u00b6\n[Source]\nfun ref next()"} +{"id": "Pony/net-OSSockOpt-_91.txt", "contents": "fun box dso_nodelay()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_seqpacket\u00b6\n[Source]\nfun box dso_seqpacket()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndso_services\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_spec-_38.txt", "contents": "_short = short'\n(_typ, _default, _required) = _init(_BoolType, default')\n\nnew val string(\nname': String,\ndescr': String = \"\",\nshort': (U8 | None) = None,\ndefault': (String | None) = None)\n=>\n\"\"\"\nCreates an Option with a String typed value that can be used like\n`--file=dir/filename` or `-F=dir/filename` or `-Fdir/filename`\nto yield an option value like\n`cmd.option(\"file\").string() == \"dir/filename\"`.\n\"\"\"\n_name = name'\n_descr = descr'\n_short = short'\n(_typ, _default, _required) = _init(_StringType, default')\n"} +{"id": "Pony/src-builtin-array-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/builtin-I128-_6.txt", "contents": "\nU128 val\n\n\nctz\u00b6\n[Source]\nfun box ctz()\n: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U128 val"} +{"id": "Pony/src-builtin-float-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/random-XorOshiro128StarStar-_8.txt", "contents": ": I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32\u00b6\n[Source]\nfun ref i32()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64\u00b6\n[Source]\nfun ref i64()"} +{"id": "Pony/7_type-expressions_0.txt", "contents": "# Type Expressions\n\nThe types we've talked about so far can also be combined in __type expressions__. If you're used to object-oriented programming, you may not have seen these before, but they are common in functional programming. A __type expression__ is also called an __algebraic data type__.\n\nThere are three kinds of type expression: __tuples__, __unions__, and __intersections__.\n"} +{"id": "Pony/src-term-readline-_7.txt", "contents": "132\n133\n134\n135\n136\n137\n138\n139\n140\n141\n142\n143\n144\n145\n146\n147\n148\n149\n150\n151"} +{"id": "Pony/process-WriteError-_1.txt", "contents": "\n\nPublic Functions\u00b6\nstring\u00b6\n[Source]\nfun box string()\n: String iso^\n\nReturns\u00b6\n\nString iso^\n\n\neq\u00b6\n[Source]\nfun box eq(\nthat: WriteError val)\n: Bool val\n\nParameters\u00b6"} +{"id": "Pony/src-net-net_address-_14.txt", "contents": "@pony_os_ipv6(this)\n\nfun name(\nreversedns: (DNSAuth | None) = None,\nservicename: Bool = false)\n: (String, String) ?\n=>\n\"\"\"\nReturns the host and service name.\n\nIf `reversedns` is `DNSAuth`,\na DNS lookup will be executed and the hostname\nfor this address is returned as first element of the result tuple.\nIf no hostname could be found, an error is raised.\nIf `reversedns` is `None` the plain IP address is given\nand no DNS lookup is executed.\n\nIf `servicename` is `false` the numeric port is returned\nas second element of the result tuple.\nIf it is `true` the port is translated into its"} +{"id": "Pony/builtin-U64-_24.txt", "contents": "U64 val\n\n\nmod\u00b6\n[Source]\nfun box mod(\ny: U64 val)\n: U64 val\n\nParameters\u00b6\n\ny: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nmodc\u00b6\n[Source]"} +{"id": "Pony/src-cli-command_parser-_14.txt", "contents": "272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291"} +{"id": "Pony/files-File-_22.txt", "contents": "\nReturns\u00b6\n\nNone val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_342.txt", "contents": "fun box sctp_cause_cookie_in_shutdown()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_deleting_last_addr\u00b6\n[Source]\nfun box sctp_cause_deleting_last_addr()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_cause_deleting_src_addr\u00b6\n[Source]"} +{"id": "Pony/3_actors_6.txt", "contents": "# Why is this safe?\n\nBecause of Pony's __capabilities secure type system__. We've mentioned reference capabilities briefly before when talking about function receiver reference capabilities. The short version is that they are annotations on a type that make all this parallelism safe without any runtime overhead.\n\nWe will cover reference capabilities in depth later.\n"} +{"id": "Pony/net-OSSockOpt-_78.txt", "contents": "fun box dccp_sockopt_ccid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_ccid_rx_info\u00b6\n[Source]\nfun box dccp_sockopt_ccid_rx_info()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ndccp_sockopt_ccid_tx_info\u00b6\n[Source]"} +{"id": "Pony/src-pony_check-generator-_64.txt", "contents": "1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286\n1287\n1288\n1289\n1290\n1291"} +{"id": "Pony/src-pony_test-pony_test-_30.txt", "contents": "Main.make() is called during aggregation. If so desired extra code can be added\nto either of these constructors to perform additional tasks.\n"} +{"id": "Pony/reference-capabilities_6.txt", "contents": "## Isolated data may be complex\n\nAn isolated piece of data may be a single byte. But it can also be a large data structure with multiple references between the various objects in that structure. What matters for the data to be isolated is that there is only a single reference to that structure as a whole. We talk about the __isolation boundary__ of a data structure. For the structure to be isolated:\n\n1. There must only be a single reference outside the boundary that points to an object inside.\n2. There can be any number of references inside the boundary, but none of them must point to an object outside.\n"} +{"id": "Pony/src-builtin-unsigned-_85.txt", "contents": "end\n\nfun rem_unsafe(y: U128): U128 =>\n\"\"\"\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\n\"\"\"\nifdef native128 then\nthis %~ y\nelse\nthis % y\nend\n\nfun f32(): F32 =>\nlet v = f64()\nif v > F32.max_value().f64() then\nF32._inf(false)\nelse\nv.f32()"} +{"id": "Pony/builtin-F32-_41.txt", "contents": "Parameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n\n(F32 val , F32 val)\n\n\nrem_unsafe\u00b6\nfun box rem_unsafe(\ny: F32 val)\n: F32 val\n\nParameters\u00b6\n\ny: F32 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-pony_check-generator-_102.txt", "contents": ")\nlet shrink_iter: Iterator[Map[K, V]^] =\nIter[USize](CountdownIter(size, 0)) // Range(size, 0, -1))\n// .skip(1)\n.map_stateful[Map[K, V]^]({\n(s: USize): Map[K, V]^ =>\nMap[K, V].create(s).>concat(\nIter[(K^, V^)](gen.value_iter(rnd)).take(s)\n)\n})\n(consume result, shrink_iter)\n\nend)\n\nfun map_is_of[K, V](\ngen: Generator[(K, V)],\nmax: USize = 100)\n: Generator[MapIs[K, V]]\n=>\n\"\"\""} +{"id": "Pony/collections-HashSet-_1.txt", "contents": "create\u00b6\n[Source]\nDefaults to a prealloc of 8.\nnew ref create(\nprealloc: USize val = 8)\n: HashSet[A, H] ref^\n\nParameters\u00b6\n\nprealloc: USize val = 8\n\nReturns\u00b6\n\nHashSet[A, H] ref^\n\n\nPublic Functions\u00b6\nsize\u00b6\n[Source]\nThe number of items in the set."} +{"id": "Pony/src-files-path-_16.txt", "contents": "312\n313\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n329\n330\n331"} +{"id": "Pony/net-OSSockOpt-_374.txt", "contents": "fun box sctp_del_vrf_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_disable_fragments\u00b6\n[Source]\nfun box sctp_disable_fragments()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_ecn_cwr\u00b6\n[Source]"} +{"id": "Pony/files-FilePath-_1.txt", "contents": "new val create(\nbase: FileAuth val,\npath': String val,\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover)\n: FilePath val^\n\nParameters\u00b6\n\nbase: FileAuth val\npath': String val\ncaps': Flags[(FileCreate val | FileChmod val | FileChown val | FileLink val | FileLookup val | FileMkdir val | FileRead val | FileRemove val | FileRename val | FileSeek val | FileStat val | FileSync val | FileTime val | FileTruncate val | FileWrite val | FileExec val), U32 val] val = recover\n\nReturns\u00b6\n\nFilePath val^\n\n\nfrom\u00b6\n[Source]\nCreate a new path from an existing FilePath."} +{"id": "Pony/builtin-UnsignedInteger-_14.txt", "contents": "A\n\n\nrotr\u00b6\n[Source]\nfun box rotr(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n\nA\n\n\npopcount\u00b6\n[Source]"} +{"id": "Pony/net-OSSockOpt-_201.txt", "contents": "fun box ip_faith()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_flowid\u00b6\n[Source]\nfun box ip_flowid()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_flowtype\u00b6\n[Source]"} +{"id": "Pony/src-buffered-reader-_19.txt", "contents": "372\n373\n374\n375\n376\n377\n378\n379\n380\n381\n382\n383\n384\n385\n386\n387\n388\n389\n390\n391"} +{"id": "Pony/src-builtin-unsigned-_52.txt", "contents": "fun bswap(): U16 => @\"llvm.bswap.i16\"(this)\nfun popcount(): U16 => @\"llvm.ctpop.i16\"(this)\nfun clz(): U16 => @\"llvm.ctlz.i16\"(this, false)\nfun ctz(): U16 => @\"llvm.cttz.i16\"(this, false)\n\nfun clz_unsafe(): U16 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.ctlz.i16\"(this, true)\n\nfun ctz_unsafe(): U16 =>\n\"\"\"\nUnsafe operation.\nIf this is 0, the result is undefined.\n\"\"\"\n@\"llvm.cttz.i16\"(this, true)\n\nfun bitwidth(): U16 => 16"} +{"id": "Pony/builtin-USize-_57.txt", "contents": "fun box i16_unsafe()\n: I16 val\n\nReturns\u00b6\n\nI16 val\n\n\ni32_unsafe\u00b6\n[Source]\nfun box i32_unsafe()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\ni64_unsafe\u00b6\n[Source]"} +{"id": "Pony/src-builtin-array-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/promises-FulfillIdentity-_1.txt", "contents": "FulfillIdentity[A] iso^\n\n\nPublic Functions\u00b6\napply\u00b6\n[Source]\nfun ref apply(\nvalue: A)\n: A\n\nParameters\u00b6\n\nvalue: A\n\nReturns\u00b6\n\nA\n\n\n"} +{"id": "Pony/examples_6.txt", "contents": "# How to access command line arguments\n\n```pony\nactor Main\nnew create(env: Env) =>\n// The no of arguments\nenv.out.print(env.args.size().string())\nfor value in env.args.values() do\nenv.out.print(value)\nend\n// Access the arguments the first one will always be the application name\ntry env.out.print(env.args(0)?) end\n```\n"} +{"id": "Pony/builtin-F64-_6.txt", "contents": "\n\nepsilon\u00b6\n[Source]\nMinimum positive value such that (1 + epsilon) != 1.\nnew val epsilon()\n: F64 val^\n\nReturns\u00b6\n\nF64 val^\n\n\nPublic Functions\u00b6\nbits\u00b6\n[Source]\nfun box bits()\n: U64 val\n\nReturns\u00b6"} +{"id": "Pony/use-statement_1.txt", "contents": "\n```pony\nuse \"time\"\n\nclass Foo\nfun f() =>\n(var secs, var nsecs) = Time.now()\n```\n"} +{"id": "Pony/builtin-ILong-_57.txt", "contents": "\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]\nfun box u8_unsafe()\n: U8 val\n\nReturns\u00b6"} +{"id": "Pony/src-net-tcp_connection-_25.txt", "contents": "492\n493\n494\n495\n496\n497\n498\n499\n500\n501\n502\n503\n504\n505\n506\n507\n508\n509\n510\n511"} +{"id": "Pony/builtin-ULong-_29.txt", "contents": "\ny: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nrotr\u00b6\n[Source]\nfun box rotr(\ny: ULong val)\n: ULong val\n\nParameters\u00b6\n\ny: ULong val\n\nReturns\u00b6\n"} +{"id": "Pony/5_methods_13.txt", "contents": "__Can I call using positional arguments but miss out the first one?__ No. If you use positional arguments they must be the first ones in the call.\n"} +{"id": "Pony/src-collections-persistent-list-_23.txt", "contents": "452\n453\n454\n455\n456\n457\n458\n459\n460\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471"} +{"id": "Pony/builtin-I8-_57.txt", "contents": "fun box ilong_unsafe()\n: ILong val\n\nReturns\u00b6\n\nILong val\n\n\nisize_unsafe\u00b6\n[Source]\nfun box isize_unsafe()\n: ISize val\n\nReturns\u00b6\n\nISize val\n\n\nu8_unsafe\u00b6\n[Source]"} +{"id": "Pony/4_traits-and-interfaces_13.txt", "contents": "In our trait based example, we can add new colors at any time. With the type union based approach, we can only add them by modifying definition of `Color` in the package that provides it.\n\nInterfaces can't be used for open world enumerations. If we defined `Color` as an interface:\n\n```pony\ninterface Color\n```\n\nThen literally everything in Pony would be a `Color` because everything matches the `Color` interface. You can however, do something similar using \"marker methods\" with an interface:\n\n```pony\ninterface Color\nfun is_color(): None\n\nprimitive Red\nfun is_color(): None => None\n```\n\nHere we are using structural typing to create a collection of things that are in the category `Color` by providing a method that \"marks\" being a member of the category: `is_color`.\n"} +{"id": "Pony/src-pony_bench-pony_bench-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-pony_check-property_unit_test-_15.txt", "contents": "match name'\n| None => p4.name()\n| let s: String => s\nend\n_prop4 = consume p4\n\nfun name(): String => _name\n\nfun ref apply(h: TestHelper) ? =>\nlet prop = ((_prop4 = None) as Property4[T1, T2, T3, T4] iso^)\nlet params = prop.params()\nh.long_test(params.timeout)\nlet property_runner =\nPropertyRunner[(T1, T2, T3, T4)](\nconsume prop,\nparams,\nh, // PropertyResultNotify\nh, // PropertyLogger\nh.env\n)"} +{"id": "Pony/src-builtin-signed-_60.txt", "contents": "\nfun mulc(y: I32): (I32, Bool) =>\n@\"llvm.smul.with.overflow.i32\"(this, y)\n\nfun divc(y: I32): (I32, Bool) =>\n_SignedCheckedArithmetic.div_checked[I32, U32](this, y)\n\nfun remc(y: I32): (I32, Bool) =>\n_SignedCheckedArithmetic.rem_checked[I32, U32](this, y)\n\nfun fldc(y: I32): (I32, Bool) =>\n_SignedCheckedArithmetic.fld_checked[I32, U32](this, y)\n\nfun modc(y: I32): (I32, Bool) =>\n_SignedCheckedArithmetic.mod_checked[I32, U32](this, y)\n\nfun add_partial(y: I32): I32 ? =>\n_SignedPartialArithmetic.add_partial[I32](this, y)?\n\nfun sub_partial(y: I32): I32 ? =>"} +{"id": "Pony/src-itertools-iter-_93.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3].values())\n.last()\n```\n`3`\n\"\"\"\nwhile _iter.has_next() do _iter.next()?\nelse error\nend\n\nfun ref map[B](f: {(A!): B ?} box): Iter[B]^ =>\n\"\"\"\nReturn an iterator where each item's value is the application of the given\nfunction to the value in the original iterator.\n"} +{"id": "Pony/collections-RingBuffer-_0.txt", "contents": "\n\n\n\n\n\n\nRingBuffer[A: A]\u00b6\n[Source]\nA ring buffer.\nclass ref RingBuffer[A: A]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nCreate a ring buffer with a fixed size. The size will be rounded up to the\nnext power of 2.\nnew ref create(\nlen: USize val)\n: RingBuffer[A] ref^"} +{"id": "Pony/builtin-U64-_7.txt", "contents": "\nU64 val\n\n\nclz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined.\nfun box clz_unsafe()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nctz_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf this is 0, the result is undefined."} +{"id": "Pony/src-pony_check-property_runner-_9.txt", "contents": "172\n173\n174\n175\n176\n177\n178\n179\n180\n181\n182\n183\n184\n185\n186\n187\n188\n189\n190\n191"} +{"id": "Pony/src-time-timers-_19.txt", "contents": "scheduled on the last timing wheel.\n\"\"\"\n((1 << (_wheels() * _bits())) - 1).u64()\n\nfun tag _wheels(): USize => 4\nfun tag _bits(): USize => 6\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/net-OSSockOpt-_303.txt", "contents": "fun box rds_info_connection_stats()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_counters\u00b6\n[Source]\nfun box rds_info_counters()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nrds_info_first\u00b6\n[Source]"} +{"id": "Pony/passing-and-sharing_3.txt", "contents": "# Reference capabilities that can't be sent\n\nYou may have noticed we didn't mention `trn`, `ref`, or `box` as things you can send to other actors. That's because you can't do it. They don't make the guarantees we need in order to be safe.\n\nSo when should you use those reference capabilities?\n\n* Use `ref` when you need to be able to change an object over time. On the other hand, if your program wouldn't be any slower if you used an immutable type instead, you may want to use a `val` anyway.\n* Use `box` when you don't care whether the object is mutable or immutable. In other words, you want to be able to read it, but you don't need to write to it or share it with other actors.\n* Use `trn` when you want to be able to change an object for a while, but you also want to be able to make it _globally immutable_ later.\n"} +{"id": "Pony/src-files-path-_17.txt", "contents": "332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351"} +{"id": "Pony/builtin-I64-_44.txt", "contents": "\ny: I64 val\n\nReturns\u00b6\n\nBool val\n\n\nge\u00b6\n[Source]\nfun box ge(\ny: I64 val)\n: Bool val\n\nParameters\u00b6\n\ny: I64 val\n\nReturns\u00b6\n"} +{"id": "Pony/pony_check-Generators-_49.txt", "contents": "that: Generators val\n\nReturns\u00b6\n\nBool val\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/builtin-F64-_12.txt", "contents": "F64 val\n\n\nfloor\u00b6\n[Source]\nfun box floor()\n: F64 val\n\nReturns\u00b6\n\nF64 val\n\n\nround\u00b6\n[Source]\nfun box round()\n: F64 val\n\nReturns\u00b6\n"} +{"id": "Pony/src-builtin-unsigned-_32.txt", "contents": "632\n633\n634\n635\n636\n637\n638\n639\n640\n641\n642\n643\n644\n645\n646\n647\n648\n649\n650\n651"} +{"id": "Pony/linking-c_2.txt", "contents": "use @SSL_library_init[I32]()\n\nprimitive _SSLInit\n\"\"\"\nThis initialises SSL when the program begins.\n\"\"\"\nfun _init() =>\n@SSL_load_error_strings()\n@SSL_library_init()\n```\n\nOn Windows, we use the libraries `libssl-32` and `libcrypto-32` and on other platforms we use `ssl` and `crypto`. These contain the FFI functions `SSL_library_init` and `SSL_load_error_strings` (amongst others).\n\nBy default the Pony compiler will look for the libraries to link in the standard places, however, that is defined on the build platform. However, it may be necessary to look in extra places. The `use \"path:...\"` command allows this. The specified path is added to the library search paths for the remainder of the current file. The example above uses this to add the path `/usr/local/opt/libressl/lib` for MacOS. This is required because the library is provided by brew, which installs things outside the standard library search paths.\n\nIf you are integrating with existing libraries, that is all you need to do.\n"} +{"id": "Pony/capsicum-Cap-_32.txt", "contents": "fun box sem_getvalue()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsem_post\u00b6\n[Source]\nfun box sem_post()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\nsem_wait\u00b6\n[Source]"} +{"id": "Pony/src-builtin-unsigned-_38.txt", "contents": "752\n753\n754\n755\n756\n757\n758\n759\n760\n761\n762\n763\n764\n765\n766\n767\n768\n769\n770\n771"} +{"id": "Pony/src-buffered-reader-_3.txt", "contents": "52\n53\n54\n55\n56\n57\n58\n59\n60\n61\n62\n63\n64\n65\n66\n67\n68\n69\n70\n71"} +{"id": "Pony/net-OSSockOpt-_173.txt", "contents": "fun box ipv6_use_min_mtu()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_v6only\u00b6\n[Source]\nfun box ipv6_v6only()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nipv6_xfrm_policy\u00b6\n[Source]"} +{"id": "Pony/serialise-Serialised-_1.txt", "contents": ": Serialised ref^ ?\n\nParameters\u00b6\n\nauth: SerialiseAuth val\ndata: Any box\n\nReturns\u00b6\n\nSerialised ref^ ?\n\n\ninput\u00b6\n[Source]\nA caller with InputSerialisedAuth can create serialised data from any\narbitrary set of bytes. It is the caller's responsibility to ensure that\nthe data is in fact well-formed serialised data. This is currently the most\ndangerous method, as there is currently no way to check validity at\nruntime.\nnew ref input("} +{"id": "Pony/src-builtin-asio_event-_1.txt", "contents": "12\n13\n14\n15\n16\n17\n18\n19\n20\n21\n22\n23\n24\n25\n26\n27\n28\n29\n30\n31"} +{"id": "Pony/src-itertools-iter-_78.txt", "contents": "### Example\n\n```pony\nIter[I64]([1; 2; 3; 4; 5; 6].values())\n.filter({(x) => (x % 2) == 0 })\n```\n`2 4 6`\n\"\"\"\nfilter_stateful({(a: A!): Bool ? => f(a)? })\n\nfun ref find(f: {(A!): Bool ?} box, n: USize = 1): A! ? =>\n\"\"\"\nReturn the nth value in the iterator that satisfies the predicate `f`.\n"} +{"id": "Pony/src-itertools-iter-_15.txt", "contents": "292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311"} +{"id": "Pony/src-net-udp_socket-_37.txt", "contents": "_start_next_read()\n\nbe write(data: ByteSeq, to: NetAddress) =>\n\"\"\"\nWrite a single sequence of bytes.\n\"\"\"\n_write(data, to)\n\nbe writev(data: ByteSeqIter, to: NetAddress) =>\n\"\"\"\nWrite a sequence of sequences of bytes.\n\"\"\"\nfor bytes in data.values() do\n_write(bytes, to)\nend\n\nbe set_notify(notify: UDPNotify iso) =>\n\"\"\"\nChange the notifier.\n\"\"\""} +{"id": "Pony/builtin-SourceLoc-_2.txt", "contents": "\nReturns\u00b6\n\nString val\n\n\nline\u00b6\n[Source]\nLine number within file.\nLine numbers start at 1.\nfun box line()\n: USize val\n\nReturns\u00b6\n\nUSize val\n\n\npos\u00b6\n[Source]"} +{"id": "Pony/src-cli-env_vars-_0.txt", "contents": "\n\n\n\n\n\n\nenv_vars.pony\n\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11"} +{"id": "Pony/net-OSSockOpt-_243.txt", "contents": "fun box ip_traffic_mgt_background()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_transparent\u00b6\n[Source]\nfun box ip_transparent()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_ttl\u00b6\n[Source]"} +{"id": "Pony/builtin-AsioEvent-_9.txt", "contents": "[Source]\nfun box eq(\nthat: AsioEvent val)\n: Bool val\n\nParameters\u00b6\n\nthat: AsioEvent val\n\nReturns\u00b6\n\nBool val\n\n\nne\u00b6\n[Source]\nfun box ne(\nthat: AsioEvent val)\n: Bool val\n"} +{"id": "Pony/collections-Range-_5.txt", "contents": "Bool val\n\n\nnext\u00b6\n[Source]\nfun ref next()\n: A ?\n\nReturns\u00b6\n\nA ?\n\n\nrewind\u00b6\n[Source]\nfun ref rewind()\n: None val\n\nReturns\u00b6\n"} +{"id": "Pony/net-OSSockOpt-_196.txt", "contents": "fun box ip_default_multicast_loop()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_default_multicast_ttl\u00b6\n[Source]\nfun box ip_default_multicast_ttl()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nip_dontfrag\u00b6\n[Source]"} +{"id": "Pony/src-collections-persistent-list-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/src-net-ossockopt-_110.txt", "contents": "fun sctp_initiation():I32 => @pony_os_sockopt_option(I32(642))\nfun sctp_initiation_ack():I32 => @pony_os_sockopt_option(I32(643))\nfun sctp_initmsg():I32 => @pony_os_sockopt_option(I32(644))\nfun sctp_interleaving_supported():I32 => @pony_os_sockopt_option(I32(645))\nfun sctp_i_want_mapped_v4_addr():I32 => @pony_os_sockopt_option(I32(646))\nfun sctp_last_packet_tracing():I32 => @pony_os_sockopt_option(I32(647))\nfun sctp_listen():I32 => @pony_os_sockopt_option(I32(648))\nfun sctp_local_auth_chunks():I32 => @pony_os_sockopt_option(I32(649))\nfun sctp_lock_logging_enable():I32 => @pony_os_sockopt_option(I32(650))\nfun sctp_log_at_send_2_outq():I32 => @pony_os_sockopt_option(I32(651))\nfun sctp_log_at_send_2_sctp():I32 => @pony_os_sockopt_option(I32(652))\nfun sctp_log_maxburst_enable():I32 => @pony_os_sockopt_option(I32(653))\nfun sctp_log_rwnd_enable():I32 => @pony_os_sockopt_option(I32(654))\nfun sctp_log_sack_arrivals_enable():I32 => @pony_os_sockopt_option(I32(655))\nfun sctp_log_try_advance():I32 => @pony_os_sockopt_option(I32(656))\nfun sctp_ltrace_chunk_enable():I32 => @pony_os_sockopt_option(I32(657))\nfun sctp_ltrace_error_enable():I32 => @pony_os_sockopt_option(I32(658))\nfun sctp_map_logging_enable():I32 => @pony_os_sockopt_option(I32(659))\nfun sctp_maxburst():I32 => @pony_os_sockopt_option(I32(660))\nfun sctp_maxseg():I32 => @pony_os_sockopt_option(I32(661))"} +{"id": "Pony/src-pony_check-generator-_54.txt", "contents": "1072\n1073\n1074\n1075\n1076\n1077\n1078\n1079\n1080\n1081\n1082\n1083\n1084\n1085\n1086\n1087\n1088\n1089\n1090\n1091"} +{"id": "Pony/promises-Promises-_0.txt", "contents": "\n\n\n\n\n\n\nPromises[A: Any #share]\u00b6\n[Source]\nprimitive val Promises[A: Any #share]\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: Promises[A] val^\n\nReturns\u00b6\n\nPromises[A] val^"} +{"id": "Pony/builtin-U16-_50.txt", "contents": "fun box i64()\n: I64 val\n\nReturns\u00b6\n\nI64 val\n\n\ni128\u00b6\n[Source]\nfun box i128()\n: I128 val\n\nReturns\u00b6\n\nI128 val\n\n\nilong\u00b6\n[Source]"} +{"id": "Pony/collections-HashMap-_16.txt", "contents": "Returns\u00b6\n\nHashMap[this->K!, this->V!, H2] ref^\n\n\nclear\u00b6\n[Source]\nRemove all entries.\nfun ref clear()\n: None val\n\nReturns\u00b6\n\nNone val\n\n\nkeys\u00b6\n[Source]\nReturn an iterator over the keys.\nfun box keys()"} +{"id": "Pony/builtin-U8-_48.txt", "contents": "fun box hash64()\n: U64 val\n\nReturns\u00b6\n\nU64 val\n\n\ni8\u00b6\n[Source]\nfun box i8()\n: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\ni16\u00b6\n[Source]"} +{"id": "Pony/process-ExecveError-_0.txt", "contents": "\n\n\n\n\n\n\nExecveError\u00b6\n[Source]\nprimitive val ExecveError\n\nConstructors\u00b6\ncreate\u00b6\n[Source]\nnew val create()\n: ExecveError val^\n\nReturns\u00b6\n\nExecveError val^"} +{"id": "Pony/src-bureaucracy-registrar-_5.txt", "contents": "promise(_registry(key)? as A)\nelse\npromise.reject()\nend\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/files-Directory-_8.txt", "contents": "uid: U32 val\ngid: U32 val\n\nReturns\u00b6\n\nBool val\n\n\ntouch\u00b6\n[Source]\nSet the last access and modification times of the directory to now.\nfun box touch()\n: Bool val\n\nReturns\u00b6\n\nBool val\n\n\nset_time\u00b6"} +{"id": "Pony/builtin-U16-_2.txt", "contents": "F64 val) & Real[A] val)](\na: A)\n: U16 val^\n\nParameters\u00b6\n\na: A\n\nReturns\u00b6\n\nU16 val^\n\n\nmin_value\u00b6\n[Source]\nnew val min_value()\n: U16 val^\n\nReturns\u00b6\n"} +{"id": "Pony/builtin-ReadSeq-_2.txt", "contents": "\nvalues\u00b6\n[Source]\nReturns an iterator over the elements of the sequence. Note that this\niterates over this->A, not A.\nfun box values()\n: Iterator[this->A] ref^\n\nReturns\u00b6\n\nIterator[this->A] ref^\n\n\n\n\n\n\n\n\n"} +{"id": "Pony/pony_test-TestHelper-_8.txt", "contents": "Parameters\u00b6\n\nexpect: A\nactual: A\nmsg: String val = \"\"\nloc: SourceLoc val = __loc\n\nReturns\u00b6\n\nBool val\n\n\nassert_eq[A: (Equatable[A] #read & Stringable #read)]\u00b6\n[Source]\nAssert that the 2 given expressions are equal.\nfun box assert_eq[A: (Equatable[A] #read & Stringable #read)](\nexpect: A,\nactual: A,\nmsg: String val = \"\",\nloc: SourceLoc val = __loc)"} +{"id": "Pony/src-builtin-ambient_auth-_1.txt", "contents": "12\n13\n14\n15\n16primitive AmbientAuth\n\"\"\"\nThis type represents the root capability. When a Pony program starts, the\nEnv passed to the Main actor contains an instance of the root capability.\n\nAmbient access to the root capability is denied outside of the builtin\npackage. Inside the builtin package, only Env creates a Root.\n\nThe root capability can be used by any package that wants to establish a\nprinciple of least authority. A typical usage is to have a parameter on a\nconstructor for some resource that expects a limiting capability specific to\nthe package, but will also accept the root capability as representing\nunlimited access.\n\"\"\"\nnew _create() =>\nNone"} +{"id": "Pony/ponytest_9.txt", "contents": "# Additional resources\n\nYou can learn more about PonyTest specifics by checking out the [API documentation](https://stdlib.ponylang.io/pony_test--index/). There's also a [testing section](http://patterns.ponylang.io/testing.html) in the [Pony Patterns](http://patterns.ponylang.io/) book.\n"} +{"id": "Pony/builtin-U128-_18.txt", "contents": "\nrem_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf y is 0, the result is undefined.\nIf the operation overflows, the result is undefined.\nfun box rem_unsafe(\ny: U128 val)\n: U128 val\n\nParameters\u00b6\n\ny: U128 val\n\nReturns\u00b6\n\nU128 val\n\n\nf32\u00b6"} +{"id": "Pony/src-process-_process-_34.txt", "contents": "err: _Pipe, stdin: _Pipe, stdout: _Pipe, stderr: _Pipe)\n=>\n\"\"\"\nWe are now in the child process. We redirect STDIN, STDOUT and STDERR\nto their pipes and execute the command. The command is executed via\nexecve which does not return on success, and the text, data, bss, and\nstack of the calling process are overwritten by that of the program\nloaded. We've set the FD_CLOEXEC flag on all file descriptors to ensure\nthat they are all closed automatically once @execve gets called.\n\"\"\"\n_dup2(stdin.far_fd, _STDINFILENO()) // redirect stdin\n_dup2(stdout.far_fd, _STDOUTFILENO()) // redirect stdout\n_dup2(stderr.far_fd, _STDERRFILENO()) // redirect stderr\n\nvar step: U8 = _StepChdir()\n\nmatch wdir\n| let d: FilePath =>\nlet dir: Pointer[U8] tag = d.path.cstring()\nif 0 > @chdir(dir) then"} +{"id": "Pony/src-collections-flag-_4.txt", "contents": "72\n73\n74\n75\n76\n77\n78\n79\n80\n81\n82\n83\n84\n85\n86\n87\n88\n89\n90\n91"} +{"id": "Pony/buffered-Writer-_7.txt", "contents": "\nNone val\n\n\nu16_be\u00b6\n[Source]\nWrite a U16 to the buffer in big-endian byte order.\nfun ref u16_be(\ndata: U16 val)\n: None val\n\nParameters\u00b6\n\ndata: U16 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/builtin-String-_22.txt", "contents": "chopped from a single string. This function checks that they are indeed two\nstrings chopped from the same original string and can be unchopped before\ndoing the unchopping and returning the unchopped string. If the two strings\ncannot be unchopped it returns both strings without modifying them.\nThe operation does not allocate a new string pointer nor copy elements.\nfun iso unchop(\nb: String iso)\n: ((String iso^ , String iso^) | String iso^)\n\nParameters\u00b6\n\nb: String iso\n\nReturns\u00b6\n\n((String iso^ , String iso^) | String iso^)\n\n\nis_null_terminated\u00b6\n[Source]"} +{"id": "Pony/src-itertools-iter-_13.txt", "contents": "252\n253\n254\n255\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271"} +{"id": "Pony/builtin-String-_48.txt", "contents": "\n\ninsert_byte\u00b6\n[Source]\nInserts a byte at the given offset. Appends if the offset is out of bounds.\nfun ref insert_byte(\noffset: ISize val,\nvalue: U8 val)\n: None val\n\nParameters\u00b6\n\noffset: ISize val\nvalue: U8 val\n\nReturns\u00b6\n\nNone val\n\n"} +{"id": "Pony/src-collections-persistent-map-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-ULong-_4.txt", "contents": "\nULong val\n\n\nabs\u00b6\n[Source]\nfun box abs()\n: ULong val\n\nReturns\u00b6\n\nULong val\n\n\nbit_reverse\u00b6\n[Source]\nfun box bit_reverse()\n: ULong val\n\nReturns\u00b6"} +{"id": "Pony/builtin-String-_54.txt", "contents": "fun box split_by(\ndelim: String val,\nn: USize val = call)\n: Array[String val] iso^\n\nParameters\u00b6\n\ndelim: String val\nn: USize val = call\n\nReturns\u00b6\n\nArray[String val] iso^\n\n\nsplit\u00b6\n[Source]\nSplit the string into an array of strings with any character in the\ndelimiter string. By default, the string is split with whitespace\ncharacters. If n > 0, then the split count is limited to n."} +{"id": "Pony/net-OSSockOpt-_469.txt", "contents": "fun box sctp_vrf_id()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsctp_wake_logging_enable\u00b6\n[Source]\nfun box sctp_wake_logging_enable()\n: I32 val\n\nReturns\u00b6\n\nI32 val\n\n\nsock_cloexec\u00b6\n[Source]"} +{"id": "Pony/files-Path-_6.txt", "contents": "\nString val\n\n\ncwd\u00b6\n[Source]\nReturns the program's working directory. Setting the working directory is\nnot supported, as it is not concurrency-safe.\nfun box cwd()\n: String val\n\nReturns\u00b6\n\nString val\n\n\nabs\u00b6\n[Source]\nReturns a cleaned, absolute path.\nfun box abs("} +{"id": "Pony/builtin-I8-_33.txt", "contents": "I8 val\n\n\nop_and\u00b6\n[Source]\nfun box op_and(\ny: I8 val)\n: I8 val\n\nParameters\u00b6\n\ny: I8 val\n\nReturns\u00b6\n\nI8 val\n\n\nop_or\u00b6\n[Source]"} +{"id": "Pony/builtin-FloatingPoint-_20.txt", "contents": "\nReturns\u00b6\n\nBool val\n\n\nge_unsafe\u00b6\n[Source]\nUnsafe operation.\nIf any input of the operation is +/- infinity or NaN, the result is\nundefined.\nThe operation isn't required to fully comply to IEEE 754 semantics.\nfun box ge_unsafe(\ny: box->A)\n: Bool val\n\nParameters\u00b6\n\ny: box->A\n"} +{"id": "Pony/standard-library_0.txt", "contents": "# Standard Library\n\nThe Pony standard library is a collection of packages that can each be used as needed to provide a variety of functionality. For example, the __files__ package provides file access and the __collections__ package provides generic lists, maps, sets and so on.\n\nThere is also a special package in the standard library called __builtin__. This contains various types that the compiler has to treat specially and are so common that all Pony code needs to know about them. All Pony source files have an implicit `use \"builtin\"` command. This means all the types defined in the package builtin are automatically available in the type namespace of all Pony source files.\n\nDocumentation for the standard library is [available online](https://stdlib.ponylang.io/)\n"} +{"id": "Pony/src-cli-command_help-_5.txt", "contents": "92\n93\n94\n95\n96\n97\n98\n99\n100\n101\n102\n103\n104\n105\n106\n107\n108\n109\n110\n111"} +{"id": "Pony/builtin-FloatingPoint-_53.txt", "contents": "\ny: A\n\nReturns\u00b6\n\nA\n\n\nmax\u00b6\n[Source]\nfun box max(\ny: A)\n: A\n\nParameters\u00b6\n\ny: A\n\nReturns\u00b6\n"}