Interesting W10 and RakudoStar installer error message

2020-06-16 Thread ToddAndMargo via perl6-users
Hi All, W10-2004 Pro x 64 RakudoStar-2020.05.1.01-win-x86_64-(JIT).msi I am rolling out Raku on several of my customer's workstations in preperatins to some code I will be installing.   Windows 10 takes umbrage to RakudoStar You press

Re: Help converting CArray[uint8] to Blob

2020-06-16 Thread Ralph Mellor
> my Data $ed = await $yenc_promise; The promise must initialize each element of the CArray[uint]. It looks pretty quick; I'm guessing it's low-level code doing that. > my uint8 @data = $ed.data[0..$ed.data_size-1].Array; > my Blob $bindata = Blob[uint8].new(@data); Afaict that's a total of

Re: Help converting CArray[uint8] to Blob

2020-06-16 Thread Bruce Gray
On my MacBook, with Raku 2020.01 built on MoarVM version 2020.01.1 changing: $ed.data[^$ed.data_size] to: $ed.data.head($ed.data_size) cut the time in half. I cannot speak to what might be happening with the Promises. Test code: class Foo { has @.data = 0 xx (1024 **

Re: Help converting CArray[uint8] to Blob

2020-06-16 Thread David Santiago
Thanks for the answer. There's a slight performance improvement, but It still takes more than 1 second: Code: my Instant $init3 = DateTime.now().Instant; #my Blob $bindata = Blob[uint8].new(@data); my Blob $bindata = Blob[uint8].new($ed.data[^$ed.data_size]); say "Bindata in

Re: Help converting CArray[uint8] to Blob

2020-06-16 Thread Curt Tilmes
On Tue, Jun 16, 2020 at 5:18 PM David Santiago wrote: > my uint8 @data = $ed.data[0..$ed.data_size-1].Array; > my Blob $bindata = Blob[uint8].new(@data); Not absolutely sure, but it seems like you are copying the data twice. Try just my $bindata = Blob.new($ed.data[^$ed.data_size]);

Help converting CArray[uint8] to Blob

2020-06-16 Thread David Santiago
Hi! Can i get some help in trying to improve the performance of the following snippet? The following code runs inside a react block that it's waiting for channel values. The promise $yenc_promise returns a CStruct with a CArray[uint] $data and a uint8 $data_size. my Instant $init =