Comments (2)
It's not the order of execution. It's because output of '1' is buffered. You have to flush it explicitly.
(begin (display 1) (flush-output-port) (display (read)))
I know the source of confusion, though. In stdio library, stdin and stdout is linked in a way that "when input is read, buffered output is implicitly flushed beforehand". Scheme implementations that uses the standard mechanism automatically get that behavior. Gauche implements i/o from lower level, bypassing stdio, so there's no such implicit flushing.
I've seen this question arises several times, so I might consider mimicking stdio behavior.
from gauche.
Thank you!
from gauche.
Related Issues (20)
- Allow switching default (assumed) CES HOT 1
- `~w` format control with shared printing switch
- Consolidate exit code translation
- Handle leak by open-output-string on Windows HOT 3
- Implement fastlock on Windows
- Revive `gauche.test.generative` HOT 4
- Lightweight immutable treemap
- `scheme.list` may shadow generic versions of `map`, `for-each` etc. HOT 2
- Accelerate method dispatch in special cases
- Behavior of format using slib HOT 4
- A few tls goodies HOT 1
- Better name for `global-variable-bound?` HOT 2
- pmap: Behavior of timeout in fully-concurrent-mapper HOT 7
- More type info of cproc
- UTF8 BOM handling HOT 4
- current-output-port is changed in substitution procedure of regexp-replace HOT 3
- process-output->string, :on-abnormal-exit does not work HOT 2
- Package repository collection
- Caching formatter compuation (and partial evaluation results, in general) HOT 2
- Memory leak, when using mbedtls HOT 2
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 gauche.