Datasets:
id stringlengths 13 60 | title stringclasses 1
value | text stringlengths 8 2.58k |
|---|---|---|
Pony/src-builtin-runtime_options-_1.txt | 12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | |
Pony/src-collections-persistent-list-_18.txt | 352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371 | |
Pony/builtin-I16-_40.txt |
y: I16 val
Returns¶
I16 val
neg¶
[Source]
fun box neg()
: I16 val
Returns¶
I16 val
eq¶
[Source] | |
Pony/builtin-ISize-_24.txt | Parameters¶
y: ISize val
Returns¶
ISize val ?
shl¶
[Source]
fun box shl(
y: USize val)
: ISize val
Parameters¶
y: USize val
Returns¶ | |
Pony/net-TCPListener-_3.txt | : TCPListener tag^
Parameters¶
auth: TCPListenAuth val
notify: TCPListenNotify iso
host: String val = ""
service: String val = "0"
limit: USize val = 0
read_buffer_size: USize val = 16384
yield_after_reading: USize val = 16384
yield_after_writing: USize val = 16384
Returns¶
TCPListener tag^
ip4¶
[Source] | |
Pony/src-process-process_monitor-_20.txt | 392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411 | |
Pony/src-serialise-serialise-_1.txt | 12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | |
Pony/src-buffered-reader-_6.txt | 112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131 | |
Pony/format-FormatFixLarge-_2.txt |
Bool val
ne¶
[Source]
fun box ne(
that: FormatFixLarge val)
: Bool val
Parameters¶
that: FormatFixLarge val
Returns¶
Bool val
| |
Pony/builtin-Array-_2.txt |
Modifying the Array can be done via update, insert and delete methods
which alter the Array at an arbitrary index, moving elements left (when
deleting) or right (when inserting) as necessary.
Iterating over the elements of an Array can be done using the values method:
for element in array.values() do
// do something w... | |
Pony/src-builtin-iterator-_1.txt | 12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | |
Pony/builtin-Bool-_6.txt | [Source]
fun box string()
: String iso^
Returns¶
String iso^
| |
Pony/4_traits-and-interfaces_5.txt | ## Nominal subtyping in Pony
The 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.
```pony
trait Named
fun name(): String => "Bob"
class Bob is Named
```
Here, we have a trait `Named` that has... | |
Pony/builtin-ILong-_46.txt |
U64 val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶ | |
Pony/src-collections-list-_98.txt |
fun has_next(): Bool =>
"""
Indicates whether there are any values remaining in the iterator.
"""
_next isnt None
fun ref next(): N->A ? =>
"""
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by `reverse` argument during creation.
"""
match _next
| let next'... | |
Pony/src-files-file_lines-_7.txt | This class buffers the file contents to accumulate full lines. If the file
does not contain linebreaks, the whole file content is read and buffered, which
might exceed memory resources. Take care.
"""
let _reader: Reader = Reader
let _file: File
let _min_read_size: USize
var _last_line_length: USize
var _buffer_cursor:... | |
Pony/src-random-random-_20.txt | t = t - range
if t >= range then
t = t % range
end
end
while (l < t) do
x = u64()
m = x.u128() * range.u128()
l = m.u64()
end
end
(m >> 64).u64()
fun ref real(): F64 =>
"""
A random number in [0, 1)
"""
(next() >> 11).f64() * (F64(1) / 9007199254740992)
fun ref shuffle[A](array: Array[A]) => | |
Pony/builtin-I16-_26.txt | I16 val
shl_unsafe¶
[Source]
fun box shl_unsafe(
y: U16 val)
: I16 val
Parameters¶
y: U16 val
Returns¶
I16 val
shr_unsafe¶
[Source] | |
Pony/src-builtin-string-_89.txt |
```pony
actor Main
new create(env: Env) =>
try
// construct a new string
let str = "Hello"
// make an uppercased version
let str_upper = str.upper()
// make a reversed version
let str_reversed = str.reverse()
// add " world" to the end of our original string
let str_new = str.add(" world")
// count occurrences of l... | |
Pony/derived-authority_5.txt | # Authority hierarchies
Let's have a look at the authorizations available in the standard library's `net` package.
```pony
primitive NetAuth
new create(from: AmbientAuth) =>
None
primitive DNSAuth
new create(from: (AmbientAuth | NetAuth)) =>
None
primitive UDPAuth
new create(from: (AmbientAuth | NetAuth)) =>
None
... | |
Pony/src-builtin-signed-_94.txt |
fun fld_partial(y: I128): I128 ? =>
_SignedPartialArithmetic.fld_partial[I128, U128](this, y)?
fun mod_partial(y: I128): I128 ? =>
_SignedPartialArithmetic.mod_partial[I128, U128](this, y)?
type Signed is (I8 | I16 | I32 | I64 | I128 | ILong | ISize)
| |
Pony/src-builtin-stdin-_14.txt | _set_notify(consume notify)
_chunk_size = chunk_size
be dispose() =>
"""
Clear the notifier in order to shut down input.
"""
_set_notify(None)
fun ref _set_notify(notify: (InputNotify iso | None)) =>
"""
Set the notifier.
"""
if notify is None then
if _use_event and not _event.is_null() then
// Unsubscribe the event.... | |
Pony/net-OSSockOpt-_425.txt | fun box sctp_pcb_flags_frag_interleave()
: I32 val
Returns¶
I32 val
sctp_pcb_flags_interleave_strms¶
[Source]
fun box sctp_pcb_flags_interleave_strms()
: I32 val
Returns¶
I32 val
sctp_pcb_flags_in_tcppool¶
[Source] | |
Pony/src-net-dns-_1.txt | 12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | |
Pony/builtin-UnsignedInteger-_38.txt | Parameters¶
y: A
Returns¶
A
div¶
[Source]
fun box div(
y: A)
: A
Parameters¶
y: A
Returns¶ | |
Pony/builtin-U8-_50.txt | fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source] | |
Pony/as_4.txt | actor Main
new create(env: Env) =>
let critters = Array[Critter].>push(Wombat).>push(Capybara)
for critter in critters.values() do
env.out.print(critter.wash())
try
env.out.print((critter as Capybara).swim())
end
end
```
You can do the same with interfaces as well. In the example below, we have an Array of `Any` which... | |
Pony/src-promises-promise-_33.txt |
try
(consume rejected').apply()?
else
p.reject()
end
end)
outer
fun tag add[B: Any #share = A](p: Promise[B]): Promise[(A, B)] =>
"""
Add two promises into one promise that returns the result of both when
they are fulfilled. If either of the promises is rejected then the new
promise is also rejected.
"""
let p' = Pr... | |
Pony/memory-allocation_2.txt | # But Caveat Emptor
But Pony can use external C libraries via the **FFI** which does not have this luxury.
So you **can** use any external C library out there, but the question is if you **need to** and if you **should**.
The biggest problem is external heap memory, created by an external FFI call, or created to sup... | |
Pony/src-pony_check-randomness-_18.txt |
fun ref ulong(
min: ULong = ULong.min_value(),
max: ULong = ULong.max_value())
: ULong
=>
"""
Generate a ULong in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
u64(min.u64(), max.u64()).ulong()
fun ref usize(
min: USize = USize.min_value(),
max: USize = USi... | |
Pony/builtin-F32-_37.txt | : I128 val
Returns¶
I128 val
u128_unsafe¶
[Source]
Unsafe operation.
If the value doesn't fit in the destination type, the result is undefined.
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
add_unsafe¶ | |
Pony/1_classes_12.txt | # What about inheritance?
In 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 e... | |
Pony/src-collections-list_node-_8.txt | 152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171 | |
Pony/builtin-SignedInteger-_6.txt | y: B)
: A
Parameters¶
y: B
Returns¶
A
shr_unsafe¶
[Source]
Unsafe operation.
If non-zero bits are shifted-out, the result is undefined.
fun box shr_unsafe(
y: B)
: A
| |
Pony/builtin-I128-_30.txt |
y: I128 val
Returns¶
I128 val ?
mul_partial¶
[Source]
fun box mul_partial(
y: I128 val)
: I128 val ?
Parameters¶
y: I128 val
Returns¶
| |
Pony/builtin-ISize-_34.txt | Parameters¶
y: ISize val
Returns¶
ISize val
op_xor¶
[Source]
fun box op_xor(
y: ISize val)
: ISize val
Parameters¶
y: ISize val
Returns¶ | |
Pony/serialisation_12.txt |
let sx = Serialised(serialise, csw)?
let y = sx(deserialise)? as CStringWrapper
y.print()
else
env.err.print("there was an error")
end
```
```c
// custser.c
| |
Pony/src-net-tcp_connection-_130.txt |
fun ref get_so_sndbuf(): (U32, U32) =>
"""
Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)`
"""
_OSSocket.get_so_sndbuf(_fd)
fun ref get_tcp_nodelay(): (U32, U32) =>
"""
Wrapper for the FFI call `getsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)`
"""
_OSSocket.getsockopt_u32(_fd, OSSockOpt.sol_socket(... | |
Pony/src-buffered-reader-_73.txt | Peek at a big-endian I32.
"""
peek_u32_be(offset)?.i32()
fun peek_i32_le(offset: USize = 0): I32 ? =>
"""
Peek at a little-endian I32.
"""
peek_u32_le(offset)?.i32()
fun peek_u64_be(offset: USize = 0): U64 ? =>
"""
Peek at a big-endian U64.
"""
(peek_u32_be(offset)?.u64() << 32) or peek_u32_be(offset + 4)?.u64()
fun... | |
Pony/random-XorShift128Plus-_9.txt | i64¶
[Source]
fun ref i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun ref i128()
: I128 val
Returns¶
I128 val
| |
Pony/src-collections-map-_43.txt | MapKeys[K, V, H, this->HashMap[K, V, H]](this)
fun values(): MapValues[K, V, H, this->HashMap[K, V, H]]^ =>
"""
Return an iterator over the values.
"""
MapValues[K, V, H, this->HashMap[K, V, H]](this)
fun pairs(): MapPairs[K, V, H, this->HashMap[K, V, H]]^ =>
"""
Return an iterator over the keys and values.
"""
MapPa... | |
Pony/src-builtin-signed-_59.txt | fun min(y: I32): I32 => if this < y then this else y end
fun max(y: I32): I32 => if this > y then this else y end
fun fld(y: I32): I32 =>
_SignedArithmetic.fld[I32, U32](this, y)
fun fld_unsafe(y: I32): I32 =>
_SignedUnsafeArithmetic.fld_unsafe[I32, U32](this, y)
fun mod(y: I32): I32 =>
_SignedArithmetic.mod[I32, U3... | |
Pony/src-itertools-iter-_14.txt | 272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291 | |
Pony/files-Path-_2.txt |
sep¶
[Source]
Return the path separator as a string.
fun tag sep()
: String val
Returns¶
String val
is_abs¶
[Source]
Return true if the path is an absolute path.
fun box is_abs(
path: String val)
: Bool val
Parameters¶ | |
Pony/net-OSSockOpt-_248.txt | fun box local_peereuuid()
: I32 val
Returns¶
I32 val
local_peerpid¶
[Source]
fun box local_peerpid()
: I32 val
Returns¶
I32 val
local_peeruuid¶
[Source] | |
Pony/builtin-F64-_5.txt | [Source]
Maximum positive value representable.
new val max_value()
: F64 val^
Returns¶
F64 val^
min_normalised¶
[Source]
Minimum positive value representable at full precision (ie a normalised
number).
new val min_normalised()
: F64 val^
Returns¶
F64 val^ | |
Pony/collections-List-_40.txt | let nodes = my_list.nodes() // node with "a" is before node with "c"
fun box nodes()
: ListNodes[A, this->ListNode[A] ref] ref^
Returns¶
ListNodes[A, this->ListNode[A] ref] ref^
rnodes¶
[Source]
Return an iterator on the nodes in the List in reverse order.
let my_list = List[String].from(["a"; "b"; "c"])
let rnod... | |
Pony/src-collections-persistent-list-_16.txt | 312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331 | |
Pony/src-process-process_monitor-_44.txt |
match pipe.near_fd
| _stdout.near_fd =>
if _read_len >= _expect then
_notifier.stdout(this, consume data)
end
| _stderr.near_fd =>
_notifier.stderr(this, consume data)
| _err.near_fd =>
let step: U8 = try data.read_u8(0)? else -1 end
match step
| _StepChdir() =>
_notifier.failed(this, ProcessError(ChdirError))
| _Step... | |
Pony/src-serialise-serialise-_9.txt |
The [Serialise.signature](serialise-Serialise.md#signature) method is provided
for the purposes of comparing communicating Pony binaries to determine if they
are the same. Confirming this before deserialising data can help mitigate the
risk of accidental serialisation across different Pony binaries, but does not on
it... | |
Pony/src-cli-env_vars-_2.txt | 32
33
34
35
36
37
38use "collections"
primitive EnvVars
fun apply(
envs: (Array[String] box | None),
prefix: String = "",
squash: Bool = false):
Map[String, String] val
=>
"""
Turns an array of strings that look like environment variables, ie.
key=value, into a map of string to string. Can optionally filter for
keys m... | |
Pony/builtin-U16-_65.txt | (Less val | Equal val | Greater val)
| |
Pony/src-collections-list-_54.txt | end
// NOTE: this _moves_ the elements so second_list consequently ends up empty
env.out.print("Append *moves* the nodes from the second list so that now has "
+ my_second_list.size().string() + " nodes.") // 0
// Create a third List from a Seq(ence)
// (In this case a literal array of Strings)
let my_third_list = Lis... | |
Pony/src-buffered-writer-_9.txt | 172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191 | |
Pony/trust-boundary_2.txt | # Safe packages
The 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.
But we can do better than that.
In Pony, you can optionally... | |
Pony/builtin-I128-_60.txt | U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
| |
Pony/builtin-Integer-_49.txt |
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
| |
Pony/src-builtin-real-_71.txt | fun sinh(): A
fun tanh(): A
fun acos(): A
fun asin(): A
fun atan(): A
fun atan2(y: A): A
fun acosh(): A
fun asinh(): A
fun atanh(): A
fun copysign(sign: A): A
fun string(): String iso^ =>
_ToString._f64(f64())
type Number is (Int | Float)
type Int is (Signed | Unsigned) | |
Pony/net-OSSockOpt-_148.txt | fun box ipv6_pmtudisc_do()
: I32 val
Returns¶
I32 val
ipv6_pmtudisc_dont¶
[Source]
fun box ipv6_pmtudisc_dont()
: I32 val
Returns¶
I32 val
ipv6_pmtudisc_interface¶
[Source] | |
Pony/builtin-ArrayValues-_2.txt |
Bool val
next¶
[Source]
fun ref next()
: B->A ?
Returns¶
B->A ?
rewind¶
[Source]
fun ref rewind()
: ArrayValues[A, B] ref
Returns¶ | |
Pony/src-pony_check-generator-_21.txt | 412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 | |
Pony/process-PipeError-_1.txt |
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
eq¶
[Source]
fun box eq(
that: PipeError val)
: Bool val
Parameters¶ | |
Pony/builtin-I32-_12.txt | fun box mod(
y: I32 val)
: I32 val
Parameters¶
y: I32 val
Returns¶
I32 val
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: I32 val)
: I32 val
Parameters¶ | |
Pony/net-OSSockOpt-_31.txt | fun box ipproto_ipv4()
: I32 val
Returns¶
I32 val
ipproto_ipv6¶
[Source]
fun box ipproto_ipv6()
: I32 val
Returns¶
I32 val
ipproto_irtp¶
[Source] | |
Pony/term-ANSITerm-_1.txt | : ANSITerm tag^
Parameters¶
notify: ANSINotify iso
source: DisposableActor tag
timers: Timers tag = reference
Returns¶
ANSITerm tag^
Public Behaviours¶
apply¶
[Source]
Receives input from stdin.
be apply(
data: Array[U8 val] iso)
| |
Pony/src-builtin-string-_65.txt | 1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311 | |
Pony/builtin-Integer-_5.txt |
y: A
Returns¶
A
mul_unsafe¶
[Source]
Unsafe operation.
If the operation overflows, the result is undefined.
fun box mul_unsafe(
y: A)
: A
Parameters¶
y: A
| |
Pony/2_primitives_1.txt | # What can you use a __primitive__ for?
There are three main uses of primitives (four, if you count built-in "machine word" primitives).
1. 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 wha... | |
Pony/net-OSSockOpt-_68.txt | fun box sol_ipx()
: I32 val
Returns¶
I32 val
sol_l2cap¶
[Source]
fun box sol_l2cap()
: I32 val
Returns¶
I32 val
sol_local¶
[Source] | |
Pony/builtin-ILong-_3.txt | ILong val^
max_value¶
[Source]
new val max_value()
: ILong val^
Returns¶
ILong val^
Public Functions¶
abs¶
[Source]
fun box abs()
: ULong val
Returns¶ | |
Pony/src-cli-command_spec-_5.txt | 92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111 | |
Pony/src-files-path-_10.txt | 192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211 | |
Pony/builtin-I32-_50.txt | fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source] | |
Pony/src-pony_check-int_properties-_5.txt | 92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111 | |
Pony/src-time-nanos-_2.txt |
fun from_millis(t: U64): U64 =>
t * 1_000_000
fun from_micros(t: U64): U64 =>
t * 1_000
fun from_seconds_f(t: F64): U64 =>
(t * 1_000_000_000).trunc().u64()
fun from_millis_f(t: F64): U64 =>
(t * 1_000_000).trunc().u64()
fun from_micros_f(t: F64): U64 =>
(t * 1_000).trunc().u64()
fun from_wall_clock(wall: (I64, I... | |
Pony/src-files-directory-_34.txt | or @ponyint_o_directory()
or @ponyint_o_cloexec())
@fdopendir(fd)
else
@opendir(path'.cstring())
end
if h.is_null() then
error
end
while true do
let p = @ponyint_unix_readdir(h)
if p.is_null() then break end
list.push(recover String.from_cstring(consume p) end)
end
@closedir(h)
elseif windows then
var find = @ponyin... | |
Pony/src-pony_check-property-_2.txt | 32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 | |
Pony/reference-capabilities_0.txt | # Reference Capabilities
So 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?
In Pony, we do it with _reference capabilities_.
| |
Pony/src-pony_check-randomness-_12.txt | 232
233
234
235
236
237
238
239
240use "random"
class ref Randomness
"""
Source of randomness, providing methods for generatic uniformly distributed
values from a given closed interval: [min, max]
in order for the user to be able to generate every possible value for a given
primitive numeric type.
All primitive numbe... | |
Pony/itertools-Iter-_13.txt |
count¶
[Source]
Return the number of values in the iterator.
Example¶
Iter[I64]([1; 2; 3].values())
.count()
3
fun ref count()
: USize val
Returns¶
USize val
cycle¶
[Source]
Repeatedly cycle through the values from the iterator. | |
Pony/net-OSSockOpt-_587.txt | fun box tcp_quickack()
: I32 val
Returns¶
I32 val
tcp_repair¶
[Source]
fun box tcp_repair()
: I32 val
Returns¶
I32 val
tcp_repair_options¶
[Source] | |
Pony/src-builtin-unsigned-_25.txt | 492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511 | |
Pony/format-PrefixSign-_2.txt |
Bool val
ne¶
[Source]
fun box ne(
that: PrefixSign val)
: Bool val
Parameters¶
that: PrefixSign val
Returns¶
Bool val
| |
Pony/src-capsicum-cap_rights-_2.txt | 32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51 | |
Pony/src-promises-promise-_25.txt | If there is no reject function, of if the reject function raises an error,
then the next promise in the chain will be rejected.
"""
let attach = _Then[A, B](consume fulfill, consume rejected)
let promise = attach.promise()
_attach(consume attach)
promise
fun tag flatten_next[B: Any #share](
fulfill: Fulfill[A, Promise... | |
Pony/collections-ListValues-_0.txt |
ListValues[A: A, N: ListNode[A] #read]¶
[Source]
Iterate over the values in a List.
class ref ListValues[A: A, N: ListNode[A] #read] is
Iterator[N->A] ref
Implements¶
Iterator[N->A] ref
Constructors¶
create¶ | |
Pony/src-builtin-env-_1.txt | 12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31 | |
Pony/buffered-Reader-_8.txt | Returns¶
Array[U8 val] iso^ ?
line¶
[Source]
Return a \n or \r\n terminated line as a string. By default the newline is not
included in the returned string, but it is removed from the buffer.
Set keep_line_breaks to true to keep the line breaks in the returned line.
fun ref line(
keep_line_breaks: Bool val = false)
... | |
Pony/collections-persistent-Cons-_6.txt | [Source]
Builds a new list by reversing the elements in the list.
fun val reverse()
: (Cons[A] val | Nil[A] val)
Returns¶
(Cons[A] val | Nil[A] val)
prepend¶
[Source]
Builds a new list with an element added to the front of this list.
fun val prepend(
a: val->A!)
: Cons[A] val
Parameters¶
a: val->A! | |
Pony/src-pony_check-generator-_11.txt | 212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231 | |
Pony/src-builtin-float-_21.txt | 412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431 | |
Pony/process--index-_2.txt |
// define a client that implements the ProcessNotify interface
class ProcessClient is ProcessNotify
let _env: Env
new iso create(env: Env) =>
_env = env
fun ref stdout(process: ProcessMonitor ref, data: Array[U8] iso) =>
let out = String.from_array(consume data)
_env.out.print("STDOUT: " + out)
fun ref stderr(proce... | |
Pony/promises-Promises-_3.txt |
Promise[Array[A] val] tag
eq¶
[Source]
fun box eq(
that: Promises[A] val)
: Bool val
Parameters¶
that: Promises[A] val
Returns¶
Bool val
ne¶ | |
Pony/src-builtin-signed-_85.txt |
fun divrem(y: I128): (I128, I128) =>
ifdef native128 then
(this / y, this % y)
else
if y == 0 then
return (0, 0)
end
var num: I128 = if this >= 0 then this else -this end
var den: I128 = if y >= 0 then y else -y end
(let q, let r) = num.u128().divrem(den.u128())
(var q', var r') = (q.i128(), r.i128())
if this < 0 t... | |
Pony/builtin-USize-_62.txt | fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source] | |
Pony/builtin-F32-_29.txt | Returns¶
F32 val
sinh¶
[Source]
fun box sinh()
: F32 val
Returns¶
F32 val
tanh¶
[Source]
fun box tanh()
: F32 val
| |
Pony/collections-HashMap-_6.txt | V!
insert¶
[Source]
Set a value in the map. Returns the new value, allowing reuse.
fun ref insert(
key: K,
value: V)
: V!
Parameters¶
key: K
value: V
Returns¶
V!
| |
Pony/promises-FulfillIdentity-_0.txt |
FulfillIdentity[A: Any #share]¶
[Source]
An identity function for fulfilling promises.
class iso FulfillIdentity[A: Any #share]
Constructors¶
create¶
[Source]
new iso create()
: FulfillIdentity[A] iso^
Returns¶
| |
Pony/promises-Promise-_8.txt | primitive FetchIssue
fun apply(number: I64, repo: Repository): Promise[Issue] =>
repo.get_issue(number)
primitive PrintIssueTitle
fun apply(out: OutStream, issue: Issue) =>
out.print(issue.title())
Our promise Issue, is no longer a Promise[Promise[Issue]]. By using
flatten_next, we have a much more manageable Promise... | |
Pony/buffered-Reader-_25.txt |
Returns¶
I16 val ?
peek_i16_le¶
[Source]
Peek at a little-endian I16.
fun box peek_i16_le(
offset: USize val = 0)
: I16 val ?
Parameters¶
offset: USize val = 0
Returns¶
I16 val ? |
BRIGHT: pony
A format conversion of the standard passage-retrieval setting of
BRIGHT: A Realistic and Challenging Benchmark for Reasoning-Intensive Retrieval,
by the original BRIGHT authors. Source: xlangai/BRIGHT,
pinned to 3066d29c9651a576c8aba4832d249807b181ecae. This is a converted mirror, not an independently annotated dataset.
The original dataset is distributed under CC BY 4.0.
See SOURCE_README.md for the original dataset card and attribution.
| Table | Rows | Columns |
|---|---|---|
| corpus | 7,894 | id, title, text |
| queries | 112 | id, text |
| qrels | 2,219 | query-id, corpus-id, score |
| exclusions (optional) | 0 | query-id, corpus-id |
All published configs use the test split. corpus.text is exactly the original
documents.content; title is empty. Query IDs, document IDs and original examples.query
strings are preserved without normalization. qrels is the unique set of gold_ids pairs,
with binary score 1. Duplicate labels are collapsed; no relevance judgments are added.
Gold reasoning, gold answers, gold_ids_long, generated query rewrites and long_documents
are not part of the converted evaluation inputs.
This subset has no real excluded documents; the optional exclusions table is omitted.
The N/A exclusion sentinel is removed. Excluded IDs and positive IDs are validated against
the corpus and must be disjoint for each query. Keep ignore_identical_ids=false: matching
query/document ID strings alone do not imply a BRIGHT exclusion.
Evaluate each BRIGHT subset against its own complete corpus. Report nDCG@10 per subset and the unweighted mean across the 12 subsets. Record encoder context limits and truncation. The original evaluation code defines the protocol.
Converted with scripts/preprocess/dataset/convert_bright.py in the SPARSE project.
conversion.json records source and output SHA-256 hashes, row counts and validation checks.
- Downloads last month
- 41