Re: Use of the --output flag
100% thanks a lot. :) On Tue, 9 Oct 2018 at 16:31, Timo Paulssen wrote: > --output is for the compiler's compilation stages > > for example: > > timo@schmand ~> perl6 --output=/tmp/outputtest --target=mbc -e 'say "hi"' > timo@schmand ~> moar --dump /tmp/outputtest | head > > MoarVM dump of binary compilation unit: > > SC_0 : B1DFAD9164F11E967B354508CC458ABAB8DEDC27 > SC_1 : D71FD1C8B1B40FC9B294068F2EC29C505914FDC6-0 > SC_2 : 0808522FF10EC773B02A4C55883CC154BB964DE2 > Callsite_0 : > num_pos: 0 > arg_count: 0 > Callsite_1 : > > > Most of the compilation stages don't work with --output, which could be a > bug. However, --output isn't supposed to change what $*OUT is set to in the > script. > > Hope that helps > - Timo > > > On 09/10/2018 15:18, Simon Proctor wrote: > > So... I'm working through some notes for a talk on Thursday and I am > trying to work out how the --output flag is supposed to work. > > I would expect this to create a file called test and print "Hi\n" in it : > > perl6 --output=test -e 'say "Hi"' > > But instead I got Hi printed to the command line and an error : > > Use of Nil in string context > in any print at gen/moar/stage2/NQPCORE.setting line 850 > > Trying use it on a sime file (say "Hi") and it also doesn't do that. > > (Note that the test file is created but it's empty). > > Any ideas? > > -- > Simon Proctor > Cognoscite aliquid novum cotidie > > http://www.khanate.co.uk/ > > -- Simon Proctor Cognoscite aliquid novum cotidie http://www.khanate.co.uk/
Re: Use of the --output flag
--output is for the compiler's compilation stages for example: > timo@schmand ~> perl6 --output=/tmp/outputtest --target=mbc -e 'say "hi"' > timo@schmand ~> moar --dump /tmp/outputtest | head > > MoarVM dump of binary compilation unit: > > SC_0 : B1DFAD9164F11E967B354508CC458ABAB8DEDC27 > SC_1 : D71FD1C8B1B40FC9B294068F2EC29C505914FDC6-0 > SC_2 : 0808522FF10EC773B02A4C55883CC154BB964DE2 > Callsite_0 : > num_pos: 0 > arg_count: 0 > Callsite_1 : Most of the compilation stages don't work with --output, which could be a bug. However, --output isn't supposed to change what $*OUT is set to in the script. Hope that helps - Timo On 09/10/2018 15:18, Simon Proctor wrote: > So... I'm working through some notes for a talk on Thursday and I am > trying to work out how the --output flag is supposed to work. > > I would expect this to create a file called test and print "Hi\n" in it : > > perl6 --output=test -e 'say "Hi"' > > But instead I got Hi printed to the command line and an error : > > Use of Nil in string context > in any print at gen/moar/stage2/NQPCORE.setting line 850 > > Trying use it on a sime file (say "Hi") and it also doesn't do that. > > (Note that the test file is created but it's empty). > > Any ideas? > > -- > Simon Proctor > Cognoscite aliquid novum cotidie > > http://www.khanate.co.uk/
Re: Use of the --output flag
It feels like a bug. I more wanted to know if anyone knew anything about it for the talk. Thanks On Tue, 9 Oct 2018, 14:49 Brad Gilbert, wrote: > My guess is that this is a bug. > > You can work around it by adding > > my $*OUT = q[test].IO.open(:w); > > in front of the code. > On Tue, Oct 9, 2018 at 8:18 AM Simon Proctor > wrote: > > > > So... I'm working through some notes for a talk on Thursday and I am > trying to work out how the --output flag is supposed to work. > > > > I would expect this to create a file called test and print "Hi\n" in it : > > > > perl6 --output=test -e 'say "Hi"' > > > > But instead I got Hi printed to the command line and an error : > > > > Use of Nil in string context > > in any print at gen/moar/stage2/NQPCORE.setting line 850 > > > > Trying use it on a sime file (say "Hi") and it also doesn't do that. > > > > (Note that the test file is created but it's empty). > > > > Any ideas? > > > > -- > > Simon Proctor > > Cognoscite aliquid novum cotidie > > > > http://www.khanate.co.uk/ >
Re: Use of the --output flag
My guess is that this is a bug. You can work around it by adding my $*OUT = q[test].IO.open(:w); in front of the code. On Tue, Oct 9, 2018 at 8:18 AM Simon Proctor wrote: > > So... I'm working through some notes for a talk on Thursday and I am trying > to work out how the --output flag is supposed to work. > > I would expect this to create a file called test and print "Hi\n" in it : > > perl6 --output=test -e 'say "Hi"' > > But instead I got Hi printed to the command line and an error : > > Use of Nil in string context > in any print at gen/moar/stage2/NQPCORE.setting line 850 > > Trying use it on a sime file (say "Hi") and it also doesn't do that. > > (Note that the test file is created but it's empty). > > Any ideas? > > -- > Simon Proctor > Cognoscite aliquid novum cotidie > > http://www.khanate.co.uk/
Use of the --output flag
So... I'm working through some notes for a talk on Thursday and I am trying to work out how the --output flag is supposed to work. I would expect this to create a file called test and print "Hi\n" in it : perl6 --output=test -e 'say "Hi"' But instead I got Hi printed to the command line and an error : Use of Nil in string context in any print at gen/moar/stage2/NQPCORE.setting line 850 Trying use it on a sime file (say "Hi") and it also doesn't do that. (Note that the test file is created but it's empty). Any ideas? -- Simon Proctor Cognoscite aliquid novum cotidie http://www.khanate.co.uk/