Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming > #16336

Re: Scanning

From Spiros Bousbouras <spibou@gmail.com>
Newsgroups comp.programming
Subject Re: Scanning
Date 2023-01-22 16:44 +0000
Organization A noiseless patient Spider
Message-ID <2YwRboOtvOaNvrTA9@bongo-ra.co> (permalink)
References <Scanning-20230119123241@ram.dialup.fu-berlin.de> <scanner-20230119154238@ram.dialup.fu-berlin.de>

Show all headers | View raw


On 19 Jan 2023 14:48:29 GMT
ram@zedat.fu-berlin.de (Stefan Ram) wrote:
> ram@zedat.fu-berlin.de (Stefan Ram) writes:
> >Let's take a very simple task: This scanner for text files
> >has nothing more to do than to return every character,
> >except to strip the spaces at the end of a line.
> 
>   Richard said that it matters what I need this for.
> 
>   I'd like to implement a tiny markup language similar
>   to languages like "Markdown" or "reStructuredText".
>   It should ignore spaces at the end of lines.
>   I'm going to implement it in Python.

Does it need to have functionality where it produces output before it has
seen all the input ? If not , then I would not just read a whole line but a
whole file (or input) ! It seems extravagant but unless you have a realistic
scenario where you worry that the whole input won't fit into memory , it is
simplest to read the whole input into memory.

Back to comp.programming | Previous | Next | Find similar


Thread

Re: Scanning Spiros Bousbouras <spibou@gmail.com> - 2023-01-22 16:44 +0000

csiph-web