Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
I've converted all of my filters to use in/out and have made the above virtually identical to that Rosetta Code example and the result is now.virtually instantaneousjust for the cost of a couple of temporary files. The difference is remarkable and again thank you both for steering me in

Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
PS ..yes that Rosetta Code example is close to what I'm after. On 21 February 2017 at 15:19, dean wrote: > Hi Andreas > >Do you really need to load all the stuff into RAM? > No...I was originally using in/out > and will go back to trying that for each filter. > > re

Re: help with global replace in text file/list of bytes

2017-02-21 Thread dean
Hi Andreas >Do you really need to load all the stuff into RAM? No...I was originally using in/out and will go back to trying that for each filter. re the improvements...yes I understand all all of those...thank you. >exactly the same structure as in ram. Amazing and I'll bear that in mind. >I

Re: help with global replace in text file/list of bytes

2017-02-21 Thread Joe Bogner
After trying to figure it out myself for a few minutes, I remembered to check rosettacode (wonderful resource). This is probably close to what you need: http://rosettacode.org/wiki/Globally_replace_text_in_several_files#PicoLisp On Tue, Feb 21, 2017 at 8:08 AM, Joe Bogner

Re: help with global replace in text file/list of bytes

2017-02-21 Thread Joe Bogner
Hi dean, I experimented with this problem for a few minutes and didn't come up with anything worth posting. A few comments though: 1. Your picolisp code is becoming easier to read. Nice work! 2. My initial thought was to split the input into words and replace sublists, however it looks like you

RE: help with global replace in text file/list of bytes

2017-02-21 Thread andreas
Hi dean Do you really need to load all the stuff into RAM? Working in stream, e.g. with (in) (out) and (char) (called without arguments) or (rd) (binary read) needs slightly different software design, but would most likely be faster. Also, (chop) is a rather expensive function (because it has