On 02/03/2016 02:59 PM, Tom Browder wrote: > I tried the suggestion from Bart Wiegmans to compile the program: > > $ perl6 --target=mbc --output=read-file-test.moarvm read-file-test.p6 > $ time perl6 read-file-test.moarvm large-1-gb-file.txt > Error while reading from file: Malformed UTF-8 > > So I guess precompilation is not yet ready for public testing. That > will be a nice feature, IMHO! > > Cheers! > > -Tom
Hey, the first time I read this, I didn't actually pay attention to this. The reason you're getting that error is that you're not supposed to invoke a .moarvm file with the perl6 command. Instead, you're supposed to make your code into a module, put the generated .moarvm file alongside it and then pull in that module with -M or "use" in your perl6 code. You will probably need to pass a -I in order to make perl6 look for the module in the right places. By now, rakudo will automatically pre-compile anything you "use" or -M (if that isn't prevented by "no precompilation" or things that aren't supported), so that'll be easier. Hope that helps! - Timo