Comments (4)
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.
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.
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.
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)
- Non-tail calls to errorf sometimes treated as tail calls with debug-level 2 HOT 5
- weird cond expansion HOT 8
- a few questions regarding packaging chez-scheme HOT 6
- [PATCH] Update user's guide link in README HOT 1
- Bug in V format prefix parameter HOT 1
- error: use of unknown builtin '__builtin_add_overflow' HOT 1
- How to cross compile on macOS for a different macOS architecture HOT 3
- Build fails if I set CC_FOR_BUILD HOT 1
- set! creates new bindings HOT 3
- Build/Embed Chez Scheme with larger C/C++ program HOT 3
- Unexpected result using conditional procedure and set! HOT 2
- Mysterious invalid syntax when building transformer output with `quote-syntax` HOT 2
- Primitive macro matching procedure application? HOT 6
- Numbers with small mantissa widths HOT 12
- FFI: Add a stdbool type for C99 _Bool/C23 bool
- Possible bug with foreign-procedure and struct arguments HOT 3
- [BUG] Some bindings in the IEEE and r5rs environments only come with an r6rs prefix
- cp0 improvement: kill `call/cc` when the captured procedure is never invoked
- Use of ffi in emscripten build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezscheme.