I'd like to know how to read from stdin one character at a time, read with whitespace as a delimiter, and read line by line.
A nifty way of reading by byte is the undocumented (only the writer is documented):
import std.stdio; void main() { foreach(c; LockingTextReader(stdin)) .... } by line is foreach(c; stdin.byLine) and you should also be able to abuse the function to split by whitespace: http://d-programming-language.org/phobos/std_stdio.html#ByLine See the terminator parameter.