I test, works VERY good. :)
Thanks. For now, I will use only the charterm-screen-size function, because
until I use more the charterm-insert-line
is simpler to cut the output to serve only some number of lines. I will use
charterm-insert-line in the future.
Em qui, 3 de jan de 2019 às 15:58, Joao
Thanks, Neil. I will test today later. :)
Em qui, 3 de jan de 2019 04:35, Neil Van Dyke If you're on a Unix, like GNU/Linux or a BSD, you could use the
> `charterm` package:
>
> #lang racket/base
> (require charterm)
> (with-charterm
> (let-values (((w h) (charterm-screen-size)))
> (charter
If you're on a Unix, like GNU/Linux or a BSD, you could use the
`charterm` package:
#lang racket/base
(require charterm)
(with-charterm
(let-values (((w h) (charterm-screen-size)))
(charterm-clear-screen)
(charterm-display "Width: " w " Height: " h " ")
(charterm-cursor 1 2)))
`charte
Well, another possibility is : instead of call main.rkt, call start.sh
where start.sh can get the number of lines just using LINES environment
variable and use that as argument.
Something like :
#!/bin/sh
#start.sh
racket main.rkt $LINES
#end of start.sh
What do you think? Is ugly? There's a
Well, I know that the game will run only on Gnu/Linux systems. A
alternative that I see is using ffi to provide 1 function that returns this
number but if exists some racket-only solution I think is better, right?
Em qui, 3 de jan de 2019 às 03:53, Joao Pedro Abreu De Souza <
jp_ab...@id.uff.br> e
Thanks Ben.
The problem is that this functions can give me the number of line that live
my next read, but cannot tell me "Well, this port is a terminal and have 80
lines of height".
With the height information I can control the display but without that, and
using just port-count-lines! and port-n
Maybe use `port-count-lines!` and `port-next-location` ?
http://docs.racket-lang.org/reference/linecol.html
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to rack
Hi everyone. I am coding a console-based game in racket to teach shell to
freshman on university. In some point, I need to print a message that can
have a lot of lines. I want to do a less(the command in the shell)-like
output, so the output will freeaze on the end of line, if the user type 'q'
the
8 matches
Mail list logo