I want to load a large file line by line in Nim. I tried the following code snippet:
for line in lines "largefile.txt":
echo line
However, this loads the entire file largefile.txt
into memory which is not feasible when the file is very large > 30GB.
How can I iterate over a large file while holding only a single line in memory ?