[sc-users] size limit of .interpret?

Alberto de Campo decampo at iem.at
Thu Sep 27 00:40:38 PDT 2007


>Hi Josh and all
>
>After some process of elimination I think the problem is that 
>Object.readArchive
>has a limit when returning a string. (so it's not .interpret really)
>
>I made this class to test where the problem lies and it happens when 
>I read the
>archive of the stored array.

the error message  says that the error is always at
  line 1 char 8189: which is suspiciously close to 8192 ( 2 ** 13).

However, if you just write the compilestring to a file and read it back in,
it works up to 100000 at least (I gave up testing after that):

(
var f;
a = [1,2,3,4,5, "aa", "BB", "ccc"];
b = Array.fill(100000, {a.choose}).asCompileString;
f = File("testixi","w");
f.write(b);
f.close;
)

(
var g;
g = File("testixi","r");
h = g.readAllString.interpret;
g.close;
)
h.size.postln; // looks right

h.count(_ == "aa"); // ca 12500 for 100000

hope that helps,
best, a
-- 
--
Alberto de Campo
Bergstrasse 59/33
A-8020 Graz, Austria
e-mail : decampo at iem.at
--


More information about the sc-users mailing list