package alba
Alba compiler
Install
Dune Dependency
Authors
Maintainers
Sources
0.4.4.tar.gz
sha256=4817038301d3e45bac9edf7e6f2fc8bf0a6d78e76e02ad7ea33ef69bcc17df3b
md5=25234357587126685d64f16236167937
doc/alba.fmlib_node/Fmlib_node/Io_buffer/index.html
Module Fmlib_node.Io_buffer
Source
An IO buffer is an array of bytes
b0 b1 b2 ... br ... bw ... bn-1 ^ ^ ^ rp wp n rp: read pointer wp: write pointer n: size of the buffer Invariant: 0 <= rp <= wp <= n rp = wp: no more to read wp = n: buffer is full
The type of the buffer.
alloc size
allocates an io buffer of size
and set its read pointer and write pointer to 0.
getc b
reads the character at the read pointer of the buffer b
, advances the read pointer and returns the character. If the read pointer is at the position of the write pointer, then None
is retured.
putc b ch
appends the character c
at the position of the write pointer and advances the write pointer. If the write pointer is already at the end None
is returned.
The javascript buffer object.
copy src s0 s1 dst d0
copies the data from the buffer src
between position s0
and s1
(excluding s1
to the buffer dst
starting at position d0
. Overlapping is handled properly.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>