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,952 of 57,431    |
|    Richard Heathfield to Stefan Ram    |
|    Re: Scanning    |
|    19 Jan 23 15:06:05    |
      From: rjh@cpax.org.uk              On 19/01/2023 2:48 pm, 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              Okay, BIG job with lots of complicated, so strive to keep each       part relatively simple if you ever hope to get it working. Do it       in whatever way comes most natural to your programming style,       because that's how /you/ can define 'simple'. You're using       Python, so I guess you're not overly concerned by performance, so       do it the way you personally find easiest. I'm guessing you'll go       for line by line and lean on Python's memory management.              But write this down somewhere: if, further down the line, your       parser turns out to be too slow and the profiler blames this bit,       rewriting it to go byte by byte might well be one of the ways you       could speed it up.              --       Richard Heathfield       Email: rjh at cpax dot org dot uk       "Usenet is a strange place" - dmr 29 July 1999       Sig line 4 vacant - apply within              --- 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