We have established that ^2.1 is a range, meaning all the real numbers
from 0 to 2.1, not including the 2.1.
What do you expect ^2.1 .. 2.5 to mean, That's a range (the "..") from
"^2.1", another range to the number 2.5. You can't have a range starting
with a range, A range is between two numbers
On Fri, 1 Jan 2021 at 18:59, ToddAndMargo via perl6-users
mailto:perl6-us...@perl.org>> wrote:
>> ^ note: ^3 means the integer "just before" 3 (zero is
presume to be the
>> start point)
>>
>>3^ means the integer "just after" 3 (an ending
poin
..^ is an operator. You can't put spaces in the middle of an operator.
On Fri, 1 Jan 2021 at 22:13, ToddAndMargo via perl6-users <
perl6-us...@perl.org> wrote:
> >> On Fri, 1 Jan 2021 at 18:59, ToddAndMargo via perl6-users
> >> mailto:perl6-us...@perl.org>> wrote:
> >>
> >> >> ^ note: ^3
On 1/1/21 3:23 AM, Kevin Pye wrote:
..^ is an operator. You can't put spaces in the middle of an operator.
> for ^2.1..4.5 {print "$_\n";}
Range objects are not valid endpoints for Ranges
in block at line 1
> for 2.1^..4.5 {print "$_\n";}
3.1
4.1
> for .1^...5 {print "$_\n";}
1.1
2.1
3.1
> for .1^...5 {print "$_\n";}
1.1
2.1
3.1
4.1
both still increments by 1
What am I doing wrong?
do this if you want to increment by 0.1:
say $_ for {0.1+$_}...^5
Best regards,
David Santiago
I am working on a small virtual organ program, where I have
multiple MIDI controller keyboards which can be connected to one
or more synthesizer channels to emit various sounds
simultaneously.
At this point, I am able to read events from a single MIDI
controller and send the events to the correct
As it seems that Audio::PortMIDI lacks non-blocking interface, I think a
solution would be to read events in a dedicated thread and re-submit them into
a Supplier. Something like:
my Supplier $midi-events;
start {
loop {
my $ev = $midi.read;
$midi-events.emit: $ev;
}
}
I think the simplest way to turn that into a Supply is to use the `supply`
keyword
my $pm = Audio::PortMIDI.new;
my $input = supply {
my $stream = $pm.open-input($input-device-number, 32);
DONE {
$stream.close;
}
loop {
emit $
On 1/1/21 6:32 AM, David Santiago wrote:
say $_ for {0.1+$_}...^5
Hi David,
Thank you!
Is there a way to do this without the finger wagging?
say $_ for {0.1+$_}...^2
Use of uninitialized value of type Any in numeric context
in block at line 1
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
1.1
1.
On Fri, Jan 01, 2021 at 05:41:04PM -0800, ToddAndMargo via perl6-users wrote:
> On 1/1/21 6:32 AM, David Santiago wrote:
> > say $_ for {0.1+$_}...^5
>
> Is there a way to do this without the finger wagging?
>
> say $_ for {0.1+$_}...^2
If you're going to a sequence operator ("...") instead of a
10 matches
Mail list logo