1. Possible EU interpreter error

Has somebody had a problem like this?
I am using version 2.1 complete under DOS.
I think there is a problem with garbage collection routines.
The only difference is that the routine that works, does all the testing
and changes
on the same input line, which after that is written to the output.
The one that fails (first one), uses a u sequence that is intializad
every line
read from the input, and a c character value that is used to copy
and compare every character of the input line (substitute 2 special
occurrences by 'N'),
and then append it to the u output variable before it is sent to the
output file.

Although the example is trivial, it could indicate an important error in
the interpreter.

The code listed next gives me an end of memory or memory exhausted
error:

x=1
while 1 do
    t=gets(f1)   --read input line
    if atom(t) then
 if t<0 then
     exit
 end if
    end if
    x=x+1
    if remainder(x,200)=1 then
 puts(1,'.')          --show the program is running......
    end if
    u={}                  --initialize output u sequence before every
line is processed
    for i=1 to length(t) by 1 do
 c=t[i]               --temporary variable for every character in input
line t
 if c=209 or c=241 then
     c='N'
 end if
 u&=c                 --append character to output sequence
    end for
    puts(f2,u)   --write output line
end while

I modified it as follows (all the work is done on the same input
sequence t),
and it worked OK:

x=1
while 1 do
    t=gets(f1)
    if atom(t) then
 if t<0 then
     exit
 end if
    end if
    x=x+1
    if remainder(x,200)=1 then
 puts(1,'.')
    end if
    u={}
    for i=1 to length(t) by 1 do
 if t[i]=209 or t[i]=241 then
     t[i]='N'
 end if
    end for
    puts(f2,t)
end while

--NOTE: all of the input lines are less than 200 characters each

new topic     » topic index » view message » categorize

2. Re: Possible EU interpreter error

Carlos Valdes writes:
> I think there is a problem with garbage collection routines.

I tried your program (both versions) using ex.exe
under Win95. I used a 100000-line input file, where
each line was 300 random characters. I read the file in
using "rb" mode, and wrote the output using "wb" mode.

It worked fine. I couldn't duplicate the problem.

Obviously you are reading a lot of lines, or you
wouldn't be printing a '.' every 200 lines. I wonder
if you are encountering a huge line somewhere in
the file, i.e. a run of millions of characters before '\n' appears.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: Possible EU interpreter error

----- Original Message -----
From: Robert Craig <rds at ATTCANADA.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Monday, August 23, 1999 8:18 PM
Subject: Re: Possible EU interpreter error

<snip>

> Obviously you are reading a lot of lines, or you
> wouldn't be printing a '.' every 200 lines. I wonder
> if you are encountering a huge line somewhere in
> the file, i.e. a run of millions of characters before '\n' appears.

But why would that matter? I thought sequence length was limited only by how
much memory there was available to Eu, and since Eu can virtualize memory on
the hd, with a 16gig hd one can store a 4gig sequence ( storing 4 bytes per
atom ).

Kat,
wondering if she missed something again.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Possible EU interpreter error

Kat writes:
> I thought sequence length was limited only by how
> much memory there was available to Eu, and since Eu
> can virtualize memory on the hd, with a 16gig hd one can
> store a 4gig sequence ( storing 4 bytes per atom ).

With WIN32 and Linux you are limited by the amount
of system *swap space* on the disk. Your program can't
use *all* of the available disk space. Under
plain DOS, outside of Windows, Causeway will
create a very large swap file, but it won't
necessarily let you use all, or even a large percentage
of the remaining disk space. I'm not sure exactly how it decides.

Regards,
     Rob Craig
     Rapid Deployment Software
     http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu