GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — FilePosition restricts random access to 2GB · Issue #37 · purescript-node/purescript-node-fs

FilePosition restricts random access to 2GB #37

New issue
Copy link
New issue
Copy link
Open
Open
FilePosition restricts random access to 2GB#37
Copy link
Labels
type: breaking changeA change that requires a major version bump.A change that requires a major version bump.

Description

@grmble
grmble
opened on Jan 14, 2018
Issue body actions

FilePosition is a newtyped Int, so there is no random access > 2G with the purscript API.

Node.js can do this just fine - node.js numbers are safe to use as integers up to 53 bits.

Making FilePosition a Number would work but I don't like seeing offsets with a decimal point. I used Data.Int53 in my workaround module.

It could be argued that buffer lengths, offsets and bytecounts should be Int53s too. But these are all breaking changes and I can live with doing IO in chunks < 2GB.

Activity

  1. grmble
    added 5 commits that reference this issue on Jan 15, 2018

    additional Int53 api using Number purescript-node#37

    02fd9c1

    additional api using Number purescript-node#37

    d2dd38d

    additional api using Number purescript-node#37

    ecba8b3

    additional api using Number purescript-node#37

    e634cfc

    additional api using Number purescript-node#37

    fd223e3
  2. grmble commented on Jan 23, 2018

    @grmble
    grmble
    on Jan 23, 2018
    Author
    More actions

    Pull request #38 feels like a clutch.

    What I really want is

    • Node.Buffer.Large where all offsets and lengths are Numbers - for mmap
    • Node.Fs.Large where all offsets and lenghts are Numbers and the buffers are large
    • Node.Fs.Large.Aff where all offsets and lengths are Numbers and the bffers are large

    All of that either in the existing modules or in new ones.

  3. hdgarrood commented on Jan 28, 2018

    @hdgarrood
    hdgarrood
    on Jan 28, 2018
    Member
    More actions

    Sounds good, but what does 'the buffers are large' mean?

  4. grmble commented on Jan 29, 2018

    @grmble
    grmble
    on Jan 29, 2018
    Author
    More actions

    "buffers are large" = a Buffer from Node.Buffer.Large - i.e. all offsets, lengths and so on are numbers.

    The mixed API just makes you convert hither and from all the time, not my idea of fun.

  5. hdgarrood commented on Jan 29, 2018

    @hdgarrood
    hdgarrood
    on Jan 29, 2018
    Member
    More actions

    Ah of course, yes.

  6. grmble commented on Feb 1, 2018

    @grmble
    grmble
    on Feb 1, 2018
    Author
    More actions

    My immediate need for this is gone, but medium term I plan to fork those 3 projects and publish "-large" variants. If somebody else beats me to it, that would be even better; and I'll be happy to hand over the projects to purescript-node or whatever. But I don't think I'll try to land 3 large patches in 3 different projects 😱

  7. JordanMartinez
    added
    type: breaking changeA change that requires a major version bump.A change that requires a major version bump.
    on Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: breaking changeA change that requires a major version bump.A change that requires a major version bump.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.