How to process command line options

2020-01-05 Thread David Santiago
on several times? Changing the parameter from $layout to @layout doesn't work. Best regards, David Santiago

Re: How to process command line options

2020-01-06 Thread David Santiago
raku --layout='unusual' --layout='1+kk' apt Usage: bin/script.raku --layout= ... apartment --layout= ...Apartment layout. Values accepted: 1+kk,2+kk,...,5+kk, 6+, studio, unusual Unfortunately I'm unable to find any example in google on how to do this. I guess i will

Re: GIT PR Help

2020-01-17 Thread David Santiago
A 17 de janeiro de 2020 21:44:00 CET, ToddAndMargo via perl6-users escreveu: >On 2020-01-17 12:20, Trey Harris wrote: >> If the issue is that you aren’t comfortable enough with Git¹, I assume >> as part of the basic toolkit of a sysadmin you know how to generate a >> unified diff patchfile (wit

Substr behaviour with CRLF

2020-02-10 Thread David Santiago
Hi! Is there a way to change the the following behaviour, so it considers \r\n as two characters when using substr, instead of one? On raku version 2019.11 > "1234\r\n". substr(*-4) 4 78 > "1234\r\n". substr(*-4).ords() (52 13 10 55 56) Best regards, David

Re: Substr behaviour with CRLF

2020-02-10 Thread David Santiago
A 10 de fevereiro de 2020 16:57:55 CET, David Santiago escreveu: > > >Hi! > >Is there a way to change the the following behaviour, so it considers \r\n as >two characters when using substr, instead of one? > >On raku version 2019.11 > >> "1234\r\n". s

Re: Substr behaviour with CRLF

2020-02-10 Thread David Santiago
Thanks for the help. I do agree with Paul that something should be mentioned in the substr documentation. David Santiago -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Question about Blob and Buf

2020-02-11 Thread David Santiago
A 11 de fevereiro de 2020 10:47:34 CET, David Santiago escreveu: >A 11 de fevereiro de 2020 09:46:06 CET, David Santiago >escreveu: >> >>Hi! >> >>Can someone explain me why this doesn't work: >> >>my Blob $read; >>$read ~= $socket.read(10

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
ot strings: you need to >>>> decode them to concatenate it to a string. If what you want is to >>>> concatenate the buffer, probably ,= will work (not sure about this, would >>>> have to check), or any other operator that works on Positionals. >>>> &g

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
Awesome explanation! Thank you! BTW, > my Blob $read = Buf.new; Is it creating either a Blob or a Buf? Regards, David Santiago -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: Question about Blob and Buf

2020-02-11 Thread David Santiago
Hi Timo, Thanks for the answer: > the liskov substitution principle I didn't knew about this principle. I'm now going down the rabbit hole. Is this always the case for all the derived classes in Raku? Best regards, David Santiago Timo Paulssen escreveu no dia terça, 11/02/20

NativeCall questions

2020-05-08 Thread David Santiago
ku bin/uints.p6' terminated by signal SIGSEGV (Address boundary error)" Why? How do i fix it? Also the read method from the IO::Handle returns a Buf. I would like to pass it directly to my C function. Is there any change in the C/raku code i should do? The data field from class EncodedData is type "str". Should it be CArray[uint8] instead? Best regards, David Santiago

Re: NativeCall questions

2020-05-08 Thread David Santiago
od list at /usr/share/perl6/core/sources/8660F65A7B3492675BB3B2058DB30E411A4C4E54 (NativeCall::Types) line 226 in sub MAIN at bin/uints.p6 line 15 in block at bin/uints.p6 line 3 I can access without problems $ed.crc32 [1] - if i change the data type to str i get the error: "String corruption detected: bad storage type" Best regards, David Santiago

Re: NativeCall questions

2020-05-08 Thread David Santiago
I also noticed that although my data string is defined as CArray[uint8], when i loop through the array, the values are signed ints: say $_ for $ed.data[0..10]; output: -98 -110 -109 -99 74 -109 -99 74 -105 -93 74 Is it possible to not "sign" them? Regards, David Santiago C

Re: NativeCall questions

2020-05-08 Thread David Santiago
Thanks for the information! Have a great weekend! Best regards, David Santiago Tobias Boege escreveu no dia sexta, 8/05/2020 à(s) 15:52: > > On Fri, 08 May 2020, David Santiago wrote: > > I also noticed that although my data string is defined as > > CArray[uint8], when i loop

Help with grammar

2020-05-21 Thread David Santiago
* MATCH "keep-alive\n" | | crlf | | * FAIL | * FAIL * FAIL Nil It matches the request line's newline but not the headers. Best regards, David Santiago test.raku Description: Binary data

Re: Help with grammar

2020-05-23 Thread David Santiago
Thank you all for your replies. I was able to fix it and better understanding grammars :-) Regards, David Santiago Patrick R. Michaud escreveu no dia quinta, 21/05/2020 à(s) 21:05: > > On Thu, May 21, 2020 at 08:40:08PM +, David Santiago wrote: > > Can someone explain me wh

Re: I need help with Config:INI

2020-05-30 Thread David Santiago
Hope this helps :-) Basically the %hash variable contains another hash, and with spaces in keys you cannot use them with "<>" use Config; use Config::INI; my Str $IniFile = slurp "config.ini"; my %hash = Config::INI::parse($IniFile); dd %hash; print "\n"; for %hash.kv -> $section_name, %secti

Help converting CArray[uint8] to Blob

2020-06-16 Thread David Santiago
ata in 0.4428602 Total = 3.6717681 Bindata in 0.2877211 Total = 3.7541319 extracting in 3.88532646 extracting in 3.72995056 extracting in 3.90478574 Bindata in 0.16822032 Total = 4.0554652 Bindata in 0.15585004 Total = 3.90223033 Best regards, David Santiago

Re: Help converting CArray[uint8] to Blob

2020-06-16 Thread David Santiago
Bindata in {DateTime.now.Instant - $init3}"; Bindata in 1.1250962 :-( Curt Tilmes escreveu no dia terça, 16/06/2020 à(s) 21:40: > > 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)

Re: Help converting CArray[uint8] to Blob

2020-06-17 Thread David Santiago
new: $ed.data[^$ed.data_size]; which takes slightly more than 1 sec: Bindata in 1.1679568 Btw, the size of the $ed.data_size is 750K. Regards. David Santiago Ralph Mellor escreveu no dia terça, 16/06/2020 à(s) 23:08: > > > my Data $ed = await $yenc_promise; > > The promise must

Re: Help converting CArray[uint8] to Blob

2020-06-17 Thread David Santiago
secs. That's quite an improvement! Thank you so much. Best regards, David Santiago Ralph Mellor escreveu no dia quarta, 17/06/2020 à(s) 11:57: > > > Unfortunately, i get the error "Error > > X::AdHoc+{X::Await::Died}+{X::React::Died}: Don't know how many > ele

How to unbuffer $*IN

2020-09-26 Thread David Santiago
Hi! I'm trying to capture key presses in the terminal and according to raku's documentation i need to have $*IN unbuffered. Can someone point me in the right direction on how to do that? Best regards, David Santiago

Re: How to unbuffer $*IN

2020-09-27 Thread David Santiago
Às 21:35 de 26/09/20, Gianni Ceccarelli escreveu: On 2020-09-26 David Santiago wrote: I'm trying to capture key presses in the terminal and according to raku's documentation i need to have $*IN unbuffered. You have to tell the terminal to stop buffering (AFAIK Raku doesn't bu

Help with bug

2020-12-29 Thread David Santiago
nt script (raku client.raku) raku --version: Welcome to Rakudo(tm) v2020.12-5-g3beb71cc9. Implementing the Raku(tm) programming language v6.d. Built on MoarVM version 2020.12-7-g6bf54d784. Thank you, David Santiago #!/usr/bin/env perl6 use IO::Socket::Async::SSL; sub MAIN() { my $counter

Re: Help with bug

2020-12-29 Thread David Santiago
200 OK code Host Like you said it looks like it's getting stuck in a react, but why? :-| Regards, David Santiago

Re: Help with bug

2020-12-29 Thread David Santiago
Às 19:12 de 29/12/20, Gianni Ceccarelli escreveu: I fear we've uncovered a hard-to-diagnose bug in ``IO::Socket::Async::SSL`` … :-( Thanks for the confirmation. Hopefully this can be used as a test case to help solve it. Best regards, David Santiago

Re: Help with bug

2020-12-30 Thread David Santiago
}else { done; } } } } } } }, done=>{say "[$consumer] DONE!";}); And it still hangs from time to time. Best regards, David Santiago

Re: Help with bug

2020-12-30 Thread David Santiago
working of the program!) Thanks! It's indeed much clearer. However i have a question, why the react on line 24? The react there isn't required right? Best regards, David Santiago

Re: Help with bug

2020-12-30 Thread David Santiago
Thanks for the explanation! A December 30, 2020 3:28:24 PM UTC, Gianni Ceccarelli escreveu: >On 2020-12-30 David Santiago wrote: >> Thanks! It's indeed much clearer. However i have a question, why the >> react on line 24? >> >> The react there isn't r

Re: for and ^ question

2021-01-01 Thread David Santiago
> 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

Help with %?RESOURCES variable

2023-04-17 Thread David Santiago
└── text.txt 4 directories, 3 files demanuel@archlinux test> raku -I ./lib bin/run-me Nil demanuel@archlinux test> zef install . ===> Testing: Test:ver<0.0.1>:auth:api<1> ===> Testing [OK] for Test:ver<0.0.1>:auth:api<1> ===> Installing: Test:ver<0.0.1>:auth:api<1> 1 bin/ script [run-me] installed to: /home/demanuel/.raku/bin demanuel@archlinux test> run-me Nil demanuel@archlinux test> Can someone point me what i'm doing wrong? Best regards, David Santiago

Re: Help with %?RESOURCES variable

2023-04-17 Thread David Santiago
d > the script just uses the module. > yes, that was the case. It works inside a module. I guess i have to think differently on how to organize the code. Thanks and best regards, David Santiago

Re: Is irc.libera.chat down?

2024-04-19 Thread David Santiago
It works for me. Regards, David A sex, 19-04-2024 às 02:36 -0700, Todd Chester via perl6-users escreveu: > Hi All, > > Is >     https://kiwiirc.com/nextclient/irc.libera.chat/#raku > down? > > -T

Re: Is irc.libera.chat down?

2024-04-19 Thread David Santiago
Do you have any adblocker or any extension that blocks js? If so try to disable it. You can also use a dedicated client instead of the browser: www.mirc.com (for windows) or https://hexchat.github.io/ (for windows and linux). Regards, David Santiago A sex, 19-04-2024 às 03:09 -0700, Todd