EMILUA(3em)
✨ NAME ✨
Emilua - Lua execution engine
okay so bestie, you just opened the EMILUA(3em) manual page, and yes, it’s giving exactly what it needs to give 💅. This whole page is about stream.read_at_least, and we’re gonna get you comfy with it, no cap.
🦋 SYNOPSIS 🦋
Here’s the exact code vibe, copy it carefully:
local stream = require "stream"
stream.read_at_least(io_object, buffer: byte_span, minimum: integer) -> integer
Like, literally that’s the shape of it: you pass an io_object, a buffer: byte_span, and a minimum: integer, and you get back an integer. Slay.
💖 DESCRIPTION 💖
So what does it do? It reads data until a minimum number of bytes has been transferred, and it blocks current fiber until it completes or errs. That’s the whole main-character job. Periodt 💅.
It returns the number of bytes read. That’s your little answer back from the function, bestie 🫶.
This is the same energy as the async_read overload1 reference in Boost.Asio — here’s the URL so you have it exactly: https://www.boost.org/doc/libs/1_77_0/doc/html/boost_asio/reference/async_read/overload1.html — and the official text says:
This operation is implemented in terms of zero or more calls to the stream’s async_read_some function, and is known as a composed operation. The program must ensure that the stream performs no other read operations (such as async_read, the stream’s async_read_some function, or any other composed operations that perform reads) until this operation completes.
So yeah, that’s the tea ☕: zero or more calls to async_read_some, it’s a composed operation, and the program has to make sure the stream does no other read operations — like async_read, the stream’s async_read_some, or any other composed operations that perform reads — until this one completes. Important boundary, bestie, don’t skip it 😭.
mwah 💋 this iconic page comes from Emilua 0.12.1-nixpkgs1, dated 1980-01-01 (yes, that date, no cap). Stay slay, and may your reads be exactly as composed as you need them to be 🧚♀️✨
📦 where this page comes from
- nixos 26.05: emilua 0.12.1
- nixpkgs unstable: emilua 0.12.1
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms