Where Can I find documentation regarding TTY raw mode?

I have been working on a project that utilises a bit of low level terminal manipulation code to manage its flow and interface.

I have encountered again and again and again and again mentions to this superhero raw mode that, after blindly using, it has actually fixed some of my problems.

Sadly, when I decided to go look this mode up i found next to nothing. Have not managed to find any delucidations online on what this mode is and what it entails, and I can’t even go look up what the function raw! does since it is just a ccall to :jl_tty_set_mode.

Where can I find some delucidations on what this is and why it works?

Not a direct answer to your question, but it might help to know that “raw” terminal mode (as opposed to “cooked” or “line” mode) is not something that is specific to Julia. AFAIU these terms were popularized by the POSIX terminal interface specification. See for example this wikipedia article:

2 Likes

Also see Terminal mode - Wikipedia

In cooked mode data is preprocessed before being given to a program, while raw mode passes the data as-is to the program without interpreting any of the special characters.

1 Like

That clarifies a lot. Thank you so mcuh.
Just another minor clarification, when raw mode is disabled, is the REPL itself responsible for handling the preprocessing or does it just receive cooked inputs from a terminal emulator and interpret them?
In short: at what level does the cooking happen? where’s the kitchen?