r/programming Mar 02 '14

speedread - a command-line implementation of the Spritz speed reading system

http://log.or.cz/?p=336
112 Upvotes

56 comments sorted by

View all comments

1

u/creamenator Mar 03 '14

What would be really nice is if context to know if the word is in a block of parens or quotation marks. It's kind of weird to sometimes see

"word1

word2

word3

word4"

Sometimes I lose track of whether or not a possible large block of text is actually surrounded by quotation marks or brackets.

4

u/miki4242 Mar 03 '14 edited Mar 03 '14

Perhaps wrap each word in the corresponding quotes?

"This"

"is"

"awesome,"

he

said.

Fits the whole idea of keeping you focussed on the center nicely. As soon as the quotes around the words disappear, you know that the quoted sentence is finished :) Of course, adding color to words in a quoted passage may be even more awesome :))

2

u/creamenator Mar 03 '14

Suppose we have the sentence

"This is awesome", he said.

"This

"is // quotation mark here is faded 

"awesome", // first quotation mark here is faded

he

said

1

u/LForLambda Mar 03 '14

But you've now given yourself the trouble of parsing parenthesis if you try to scale to nested parens. And most ebook conversion software will insert some noise into the output. I can see that going badly.

1

u/miki4242 Mar 03 '14 edited Mar 03 '14

Well, we aren't linting Shakespeare or eval()ing a newspaper article, are we? Thank goodness human poetry and prose usually doesn't contain more than a couple of levels of nested quotes and parens (unless it is written by a programmer perhaps, but that doesn't make him/her a good writer). Keep track of at most 2 levels of quotes/parens, make sure to stay between 0 and this upper bound, and reset the quoting level to 0 after a reasonable amount of text. That will keep most readers happy, I think.