You are not logged in.
Pages: 1
Hi.
I decided to have old-scool terminal, like in sci-fi films: with a delay per every symbol. I think about some ways to do this, but for the first step I wanna ask for advices. Maybe someone did or know this stuff...
Upd: answer
Last edited by homk (2015-03-05 21:29:38)
Offline
What exactly are you talking about? That video has scenes with terminals from 20 different movies...
Last edited by nullified (2015-03-05 20:16:44)
"We may say most aptly, that the Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves." - Ada Lovelace
Offline
Not a Programming issue, moving to NC...
Offline
What exactly are you talking about? That video has scenes with terminals from 20 different movies...
I'm talking about exactly this moment in video: 00:27
Offline
Delay per every symbol? Your demands are so unimaginative! I would like to draw that fast with a keyboard, as they do at 0:55; or ability to destroy TV sets by turning a communication satellite into a flameball at 3:31; not mentioning making flameballs in a vacuum!
For your requirements, the solution is easy: Dmitry Grinberg has provided one 3 years ago. You may also try to decrease your PC's clock frequency, given DRAMs will stay stable.
Assuming you prefer not to use the next year of your life on sleeping with an AVR chip, you may just do that:
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <unistd.h>
int main(void) {
while (true) {
putchar(getchar());
fflush(stdout);
sleep(1);
}
return EXIT_SUCCESS;
}
... and pass output of any program through it. If you need bidirectional I/O and/or stderr, or making delay less, you need more code - but the basic idea is the same.
Last edited by mpan (2015-03-05 20:52:17)
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
Offline
Yea, exactly, waht I want.
Thanks.
Offline
Pages: 1