Skip to content

Documentation staticRead #13485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2020
Merged

Documentation staticRead #13485

merged 1 commit into from
Feb 26, 2020

Conversation

juancarlospaco
Copy link
Collaborator

  • Documentation of staticRead and slurp maximum file size limits.
  • Small change, easy merge, only doc.

Someone was trying to staticRead a 9 gigabytes file on a 8 gigabytes notebook,
just adds a line on the documentation explaining this for new people learning the lang.

Tested on multiple PC with different RAM and devel/stable with:

static:  # nim c -d:gigas=8 file.nim
  const gigas {.intdefine.} = 8
  doAssert gorgeEx("fallocate -l " & $gigas & "G " & $gigas).exitCode == 0
  defer: doAssert gorgeEx("rm " & $gigas).exitCode == 0
  doAssert staticRead($gigas).len > 0

@Araq Araq merged commit 94b0d6b into nim-lang:devel Feb 26, 2020
@juancarlospaco juancarlospaco deleted the docs-staticread branch March 2, 2020 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants