00:07 yewscion joined 00:16 yewscion left 00:35 guifa left
jdv why is raku at tye top of hn? 00:47
*the
00:56 yewscion joined 00:57 guifa joined 01:01 yewscion left
antononcube 🙂 thanks for pointing it out! 01:06
guifa I kinda wish there were an equivalent for <!> that failed the outer regex instead of just the current alternation 01:09
maybe <!!> ?
sort of like a "I'm intentionally taking you down a bad path so die plz" 01:10
antononcube @guifa Shouldn't this happen with fail and || ? 01:12
I.e. emulated... 01:13
guifa actually maybe it doesn't and I'm forgetting about backtracking
01:19 sayan39 left
guifa m: my regex foo (&x) { <.&x> }; say 'abcxyz' ~~ /<foo x>/ ; 01:27
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared routine:
x used at line 1
guifa X is clearly defined though
01:27 Voldenet left 02:01 Voldenet joined 02:46 hulk joined 02:47 kylese left 03:15 hulk left, kylese joined 04:04 zetaaaa left 04:38 xinming left, xinming joined 05:35 guifa left 06:15 Xliff joined
Xliff Good morning (or late night) 06:15
Anyone around?
m: my $a = Promise.in(10).then: { say "BOO!" }; sleep 5; $a.break; sleep 5
camelia Access denied to keep/break this Promise; already vowed
in block <unit> at <tmp> line 1
06:16
Xliff Can some one tell me what I am doing wrong, here?
m: my $a = Promise.in(10).then: { say "BOO!" }; sleep 5; $a.status.say;
camelia Planned
Xliff m: my $a = Promise.in(10).then: { say "BOO!" }; $a.vow.say; sleep 5; 06:17
camelia Access denied to keep/break this Promise; already vowed
in block <unit> at <tmp> line 1
Xliff m: my $a = Promise.in(10); $a.vow.say; 06:21
camelia Access denied to keep/break this Promise; already vowed
in block <unit> at <tmp> line 1
06:32 Aedil joined 06:54 bdju left 06:56 bdju joined 07:22 Sgeo left 07:36 Xliff left 07:55 Aedil left
xinming Is there a shortcut to do 2 array compare? 08:05
m: @a = (1,2,3); @b = (1,2,3); (@a == @b).raku.say;
camelia ===SORRY!=== Error while compiling <tmp>
Variable '@a' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> <BOL>⏏@a = (1,2,3); @b = (1,2,3); (@a == @b)
xinming m: my @a = (1,2,3); @b = (1,2,3); (@a == @b).raku.say;
camelia ===SORRY!=== Error while compiling <tmp>
Variable '@b' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> my @a = (1,2,3); ⏏@b = (1,2,3); (@a == @b).raku.say;
xinming my @a = (1,2,3); my @b = (1,2,4); (@a == @b).raku.say; # <--- This will only compare the elems of the 2 array. 08:06
evalable6 Bool::True
xinming hmm, I think I need to write the function myself, as they're not Set compare 08:08
nahita3882 are you looking for eqv 08:31
set equality comparator is (==) (or ≡) 08:32
SmokeMachine m: @a = (1,2,3);  @b = (1,2,3); (@a eqv @b).raku.say; 08:55
camelia ===SORRY!=== Error while compiling <tmp>
Variable '@a' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> <BOL>⏏@a = (1,2,3);  @b = (1,2,3); (@a eqv @b
SmokeMachine m: my @a = (1,2,3); my @b = (1,2,3); (@a eqv @b).raku.say; 08:56
camelia Bool::True
SmokeMachine m: my @a = (1,2,3); my @b = (1,4,3); (@a eqv @b).raku.say; 08:57
camelia Bool::False
09:26 hellwolf joined 09:30 sena_kun joined 09:38 tejr left 09:45 Aedil joined, tejr joined 10:01 sena_kun left
xinming SmokeMachine: thanks. 10:04
10:05 finanalyst89 joined
xinming I used sub array-eq (@a, @b) { for @a Z @b -> ($a, $b) { $a == $b }; True } 10:05
nahita3882 that always returns True 10:06
SmokeMachine Why not using eqv? 10:11
m: sub array-eq(@a, @b) { [&&] @a Z[==] @b }; say array-eq [1,2,3], [1,2,3]; say array-eq [1,2,2], [1,4,3] 10:13
camelia True
False
10:32 finanalyst89 left 10:36 finanalyst joined
xinming SmokeMachine: I'll use eqv, I just know eqv when I read doc, But don't know how to use that yet. 10:38
the [&&] @a Z[==] @b version is better 10:39
10:43 christof joined 11:08 finanalyst left 11:40 christof left 11:58 Aedil left 12:18 Aedil joined 12:36 Manifest0 joined 12:44 Manifest0 left 12:55 Manifest0 joined
lizmat Raku on HN: news.ycombinator.com/item?id=42120090 13:00
at #6 now
13:06 Manifest0 left 13:12 Aedil left 13:18 Todd2 joined
Todd2 How do I do a binary write to the STDOUT? 13:19
13:20 Todd270 joined
lizmat $*OUT.encoding(:bin); $*OUT.write: Buf.new(1,2,3,4) 13:23
evalable6 ␁␂␄
Todd2 testing 13:35
Windows 11-24H2 >echo ^[ HI ^[ 13:40
 HI
>raku -v
Welcome to RakudoΓäó v2024.07.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2024.07.
>$*OUT.encoding(:bin); $*OUT.write: chr(27) ~ ' Hi ' ~ chr(27) ~ ''
'$*OUT.encoding' is not recognized as an internal or external command,
operable program or batch file.
13:40 Manifest0 joined 13:51 zetaaaa joined
ab5tract Todd2: I think you aren’t in a repl 13:55
Todd2 I actually am 13:56
ab5tract Ah, ok. That’s not clear from the sequence you shared as raku -v doesn’t start one
Todd2 I was giving my revision number 13:57
ab5tract And the error message is a Windows (or maybe even DOS) one
nahita3882 that's exactly the error to get when executing $*OUT.encoding(:bin); $*OUT.write: chr(27) ~ ' Hi ' ~ chr(27) ~ '' on cmd.exe directly 13:58
14:03 rba left
Todd2 I am getting the hang of it: [0] >  $*OUT.write: Buf.new(27, 91, 51, 50, 109, 32, 72, 73, 32, 27, 91, 48, 109, 13) 14:03
[0] >  $*OUT.write: Buf.new(27, 91, 51, 50, 109, 32, 72, 73, 32, 27, 91, 48, 109, 13, 10) 14:04
← HI ←
evalable6 WARNINGS for /tmp/tdjXYlF0hg:
3 HI ␍
Useless use of ">" in expression "[0] >  $*OUT.write: Buf.new(27, 91, 51, 50, 109, 32, 72, 73, 32, 27, 91, 48, 109, 13, 10)" in sink context (line 1)
14:05 rba joined
Todd2 Now this is annoying, in Fedora Bash I get a green `HI`.   In Windows 11-24H2, I get `← HI ←`.   I can send the same command with "echo" and I get teh green HI. 14:08
raku -e "$*OUT.write: Buf.new(27, 91, 51, 50, 109, 32, 72, 73, 32, 27, 91, 48, 109, 13, 10)" 14:09
← HI ←
14:22 Geth joined 14:26 lizmat_ left, lizmat joined 14:28 yewscion joined
antononcube news.ycombinator.com/item?id=42125980 14:37
14:39 zetaaaa left
[Coke] Todd2: I was the one responding via email; all the ANSI codes just work for me on the same version of raku - tried to sync up the module version and then went into a rabbit hole of not being able to compile on windows 11. 14:40
If you're having trouble with just emitting the direct codes, then it's not an issue with the module; guessing you have some OS issue that is not setup to enable the ANSI codes. 14:41
[Coke] finds superuser.com/questions/413073/win...s-handling 14:42
14:49 [Coke] left
Todd2 Hi Coke, That did the trick! 14:50
REGEDIT4 14:51
; Allow progams to wite ANSI color to terminals
[HKEY_CURRENT_USER\Console]
"VirtualTerminalLevel"=dword:00000001
Thank you!!!! 14:52
antononcube 🎉 14:53
14:55 Manifest1 joined, Manifest1 left 14:57 helloworlds joined, helloworlds left 15:04 hellwolf left, hellwolf joined 15:23 Todd2 left, Manifest0 left 15:31 Aedil joined 16:11 Xliff joined
Xliff \o. Is there a way to tell if a Routine is marked "is rw"? 16:11
lizmat m: dd (sub a() { }).rw 16:23
camelia Bool::False
lizmat m: dd (sub a() is rw { }).rw
camelia Bool::True
lizmat Xliff: ^^
Xliff lizmat: Ah, thanks! I actually went trough the whole source tree and found it 5 minutes ago. LOL!
lizmat I guess that made 2 of us :-)
Xliff Buried in nqp of all things. Is this available in the docs? All of the $!flags should be documented there. 16:24
lizmat not sure 16:26
whether documented I mean
the reason it's buried in nqp, is because it's needed to build the proper QAST I guess
Xliff I would look myself, but I'm on the clock and have a meeting in 2 hours. 16:27
lizmat there's no hurry :-)
for looking that up, I mean :-)
Xliff kk 16:31
17:27 cokebot30 joined
cokebot30 [Coke] here - my main IRC client is borked, if you need me short term, email is best. 17:28
17:36 tea3po left, teatime joined 17:51 cokebot30 left 18:12 Manifest0 joined 18:18 Manifest0 left 18:31 zetaaaa joined 19:04 yewscion left
antononcube weekly:youtu.be/E7qhutQcWCY 19:09
notable6 antononcube, Noted! (weekly)
19:10 sena_kun joined 19:21 hellwolf left, yewscion joined 19:35 Aedil left 19:52 hellwolf joined 20:25 yewscion left 20:31 yewscion joined 21:28 guifa joined 22:02 yewscion left 22:26 yewscion joined 22:30 yewscion left 23:17 sena_kun left 23:53 Sgeo joined