home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.programming      Programming issues that transcend langua      57,431 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 56,963 of 57,431   
   Spiros Bousbouras to Stefan Ram   
   Re: Scanning   
   22 Jan 23 16:44:44   
   
   From: spibou@gmail.com   
      
   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.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca