def main : IO Unit := do
-- Read input immediately without waiting for newline
_ ← IO.Process.run {
cmd := "stty"
args := #["-F", "/dev/tty", "cbreak", "min", "1"],
}
-- Hide user input
_ ← IO.Process.run {
cmd := "stty"
args := #["-F", "/dev/tty", "-echo"],
}
let stdin ← IO.getStdin
while true do
let a ← stdin.read 1
match String.fromUTF8? a with
| some str => IO.println s!"Hello {str}"
| none => return