GithubHelp home page GithubHelp logo

native eol style about chezscheme HOT 4 OPEN

olopierpa avatar olopierpa commented on September 28, 2024
native eol style

from chezscheme.

Comments (4)

jltaylor-us avatar jltaylor-us commented on September 28, 2024

If one wants to write portable code as much as reasonably possible then one would always explicitly provide a transcoder, since the r6rs spec says that the default transcoder is implementation defined.

from chezscheme.

olopierpa avatar olopierpa commented on September 28, 2024

One supposes that the implementation defines it in a reasonable way. native-eol-style=none is not reasonable in any platform. It only half-works on unix by chance.

How do I provide my transcoder to call-with-input-file?

Having to rewrite my own version of call-with-input-file because the system supplied one is broken is not reasonable.

from chezscheme.

jltaylor-us avatar jltaylor-us commented on September 28, 2024

You already know how to provide a transcoder that will be used with call-with-input-file; you said so in the initial post. If you are asking how do that in some way that's portable to other scheme implementations then the answer is you can't, which means you can't use call-with-input-file in 100% portable code if your code is sensitive to anything influenced by the transcoder that the implementation uses.

I don't know what you could possibly mean by portable code except writing to a specification (presumably r6rs, the last complete specification). The behavior clearly conforms to the specification.

Just because you don't like the way it works doesn't mean it's broken. It's not like there aren't other reasonable interpretations of what the default behavior should be. I find it reasonable that the default behavior does not silently change a character stream of valid utf-8 encoded characters when they are read from a file on any platform, and that a program that writes characters out to a file produces byte-identical output on all platforms. That's not to say it can't change (although it is a significant backwards incompatibility), but calling it broken and appealing to portability concerns isn't going to get you anywhere.

from chezscheme.

olopierpa avatar olopierpa commented on September 28, 2024

I don't need to go anywhere.

Only, I wish I had not wasted the time I wasted chasing bugs caused by this perfectly fine and R6RS compliant behavior of Chez, and was trying to spare the pain to others.

from chezscheme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.