»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:01
sena_kun left
00:02
moony is now known as pushpoppeekbop
00:12
Manifest0 left
00:17
Manifest0 joined
00:30
Manifest0 left
00:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:39
Manifest0 joined
00:44
Manifest0 left
00:49
Manifest0 joined
01:06
Manifest0 left
01:11
Manifest0 joined
01:18
Manifest0 left
01:21
Manifest0 joined
01:28
Manifest0 left
01:33
Manifest0 joined
01:40
Manifest0 left
01:45
Manifest0 joined
01:48
noisegul left
01:50
Manifest0 left
01:51
molaf left
01:52
mniip left
01:55
noisegul joined,
Manifest0 joined
02:02
Manifest0 left
02:03
mniip joined,
molaf joined
02:08
Manifest0 joined
02:18
Manifest0 left
02:21
Manifest0 joined
02:31
Manifest0 left
02:38
Manifest0 joined
02:42
Manifest0 left
02:45
hythm joined
02:47
Manifest0 joined
02:56
Manifest0 left
03:01
Manifest0 joined
03:24
Manifest0 left
03:29
aborazmeh left
03:30
Manifest0 joined
03:38
Manifest0 left
03:44
Manifest0 joined
03:48
Manifest0 left
03:54
Manifest0 joined
03:58
veesh left
03:59
Manifest0 left
04:07
Manifest0 joined
04:13
Manifest0 left
04:19
Manifest0 joined
04:39
Manifest0 left,
veesh joined
04:41
hythm left,
hythm joined
04:43
Manifest0 joined
04:44
hythm left
04:56
Manifest0 left
05:02
Manifest0 joined
05:04
vrurg left
05:07
zacts joined
05:09
Manifest0 left
05:14
Manifest0 joined
05:19
Manifest0 left
05:22
Manifest0 joined
05:26
Manifest0 left
05:32
Manifest0 joined
05:39
Manifest0 left
05:44
Manifest0 joined
05:49
Manifest0 left
05:54
espadrine_ joined
05:55
Manifest0 joined
06:03
Manifest0 left
06:08
Manifest0 joined
06:09
cpan-p6 left
06:11
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
|
|||
cpan-p6 | New module released to CPAN! FindBin (0.3.4) by 03LEMBARK | 06:11 | |
Xliff | m: my enum TriLet <AAA BBB CCC>; my %h = ( AAA => 'aaaaa' ); say TriLet.enums.Hash{'AAA'} | 06:16 | |
camelia | 0 | ||
06:18
espadrine_ left
06:24
Manifest0 left
06:30
Manifest0 joined
06:53
Manifest0 left
06:57
atweiden-air joined
06:58
ravenousmoose joined
06:59
Manifest0 joined
07:16
zacts left,
Manifest0 left
07:21
Manifest0 joined
07:24
jmerelo joined
07:30
Manifest0 left
07:35
Manifest0 joined
07:46
ravenousmoose left,
squashable6 left
07:49
rindolf joined
07:51
squashable6 joined,
ChanServ sets mode: +v squashable6
07:57
Manifest0 left,
yqt joined
|
|||
Geth | doc: 9374e16717 | (JJ Merelo)++ | doc/Type/Hash.pod6 Improves examples for Hash, closes #1380, helps #2113 |
08:04 | |
synopsebot | Link: doc.perl6.org/type/Hash | ||
08:08
Manifest0 joined
08:09
kurahaupo joined
|
|||
jmerelo | squashable6: status | 08:12 | |
squashable6 | jmerelo, ⚠🍕 Next SQUASHathon in 4 days and ≈19 hours (2019-06-01 UTC-14⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
atweiden-air | is there a more idiomatic way to do shell('head -c 64 /dev/random > /mnt/boot/volume.key'); | 08:18 | |
08:18
ravenousmoose joined
|
|||
timotimo | atweiden-air: you can build a Proc::Async and .bind-stdout("/mnt/boot/volume.key".IO.open(:w)) | 08:23 | |
i mean, you don't have to use proc stuff at all | |||
m: say "/dev/random".IO.open(:bin).read(64) | 08:24 | ||
camelia | Buf[uint8]:0x<46 D9 47 7D 1C 17 BA EA 27 C3 46 5E A0 12 C7 6F 96 78 0F 0D D8 52 11 BE 93 F8 54 3C D7 F3 F2 8F 43 71 E3 44 2C 7F AD 7C 91 E0 2B 95 FC 5F 6D 84 58 36 59 4B 23 9A 58 5A 07 9F EB 49 46 DF 6C ED> | ||
08:25
Manifest0 left
08:29
kurahaupo_ joined
08:30
Manifest0 joined,
kurahaupo left
08:33
nadim_ left
|
|||
atweiden-air | timotimo: thanks. | 08:39 | |
jmerelo | timotimo: cool | 08:40 | |
08:41
Manifest0 left
08:42
rindolf left
|
|||
atweiden-air | timotimo: does the fh for /dev/random need to be closed somehow? | 08:45 | |
timotimo | in a one-liner, no :) | 08:46 | |
atweiden-air | with my Buf:D $buf = $src.IO.open(:bin).read($bytes); ? | 08:47 | |
timotimo | m: say (my $fh will LEAVE { .close } = "/dev/random".IO.open(:bin)).read(64) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Can't use unknown trait 'will' -> 'LEAVE' in a variable declaration. at <tmp>:1 ------> 3say (my $fh will LEAVE { .close }7⏏5 = "/dev/random".IO.open(:bin)).read(64) expecting any of: … |
||
timotimo | m: say (my $fh will leave { .close } = "/dev/random".IO.open(:bin)).read(64) | ||
camelia | Buf[uint8]:0x<1F 58 DC 2A B1 2D 29 6D F1 A8 52 DD 46 F9 09 45 F6 DC 01 F9 36 31 02 8D BC CE 92 5D 16 CC F7 F8 0E 87 EE 68 3D 30 6D A1 F3 EE 11 EF 81 BE DC 54 8D 7A 65 0E C8 CD 66 58 E8 1D CC E7 C3 0C 9F AC> | ||
08:48
Manifest0 joined
|
|||
jmerelo | timotimo: tch, tch, using undocumented features... | 08:48 | |
timotimo: that will force us poor doccers to document them... | |||
timotimo | damn, undocumented? | ||
jmerelo | timotimo: underdocumented docs.perl6.org/language/phasers#in...will_trait | 08:49 | |
timotimo: it's kinda documented under phasers, with an example and a paragraph. Probably deserves more... | |||
timotimo | :) | 08:50 | |
jmerelo | Also, most anchors are not working. I suspect it's because the new setup does not use .htaccess... | ||
08:50
rindolf joined
08:57
yqt left
09:00
adu left
09:10
yqt joined
09:21
Manifest0 left
|
|||
xinming_ | Anyone here knows which MQ implementation is best to be used in perl6? | 09:23 | |
I plan to use rabbit mQ | |||
releasable6: status | |||
releasable6 | xinming_, Next release in ≈25 days and ≈9 hours. 2 blockers. 140 out of 464 commits logged (⚠ 2 warnings) | 09:24 | |
xinming_, Details: gist.github.com/16542ba049b3275dcc...9e03421000 | |||
09:28
Manifest0 joined
09:38
yqt left
|
|||
jmerelo | xinming_: seem to remember that there was some AMQP driver. But you'll not have a whole lot of choices, I guess. | 09:43 | |
09:44
Manifest0 left
09:45
jmerelo left
09:49
kurahaupo_ left,
Manifest0 joined
09:53
nadim_ joined
09:57
kurahaupo joined
09:58
Manifest0 left
10:00
yqt joined
10:03
Manifest0 joined
10:07
sena_kun joined
10:14
Manifest0 left
10:19
Manifest0 joined
10:21
HarmtH left,
HarmtH joined
10:22
leont joined
|
|||
leont isn't fully understanding the $foo does RoleName($argument) syntax | 10:22 | ||
Is it documented anywhere? | 10:23 | ||
timotimo | do you have an example? | 10:25 | |
i know RoleName[$argument] | |||
MasterDuke | i think there was some discussion a little while ago about how RoleName($argument) only works for a role with a single argument, you can't use it if there are multiple | 10:26 | |
timotimo | oh, ok | 10:27 | |
leont | Yeah, and right now I need to add a second argument :-/ | ||
10:28
HarmtH left
10:29
netrino joined
|
|||
leont | I think I can fix in in my case by using two roles, but it's not particularly pretty :-/ | 10:30 | |
timotimo | then just use [$arg1, $arg2]? | 10:31 | |
MasterDuke | m: role AB[::T1, ::T2] { has T1 $.a; has T2 $.b; method ab() { dd $.a, $.b }; }; my $a = AB[Int, Str].new(a => 2, b => "cd"); $a.ab | 10:38 | |
camelia | 2 "cd" |
||
10:40
Manifest0 left
10:42
epony left
|
|||
leont | m: role AB[::T1, ::T2] { has T1 $.a; has T2 $.b; method ab() { dd $.a, $.b }; }; my $a = "foo" but AB[Int, Str].new(a => 2, b => "cd"); $a.ab | 10:42 | |
camelia | No such method 'ab' for invocant of type 'Str+{<anon|1>}'. Did you mean 'abs'? in block <unit> at <tmp> line 1 |
||
10:45
Manifest0 joined
10:49
Manifest0 left
|
|||
timotimo | m: role AB[::T1, ::T2] { has T1 $.a; has T2 $.b; method ab() { dd $.a, $.b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; say $a.ab | 10:49 | |
camelia | Cannot modify an immutable 'T1' type object in block <unit> at <tmp> line 1 |
||
timotimo | m: role AB[::T1, ::T2] { has T1 $.a is rw; has T2 $.b is rw; method ab() { dd $.a, $.b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; say $a.ab | 10:50 | |
camelia | Int $!a = 2 Nil Str $!b = "cd" |
||
timotimo | m: role AB[::T1, ::T2] { has T1 $.a is rw; has T2 $.b is rw; method ab() { dd $.a, $.b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; $a.ab | ||
camelia | Int $!a = 2 Str $!b = "cd" |
||
timotimo | the nil went in the middle because stderr/stdout ordering is funny | ||
10:51
folex[m] joined
|
|||
timotimo | leont: if this isn't acceptable, you can use the arguments to AB to hold your values rather than the types | 10:51 | |
of course that will mean that AB with different values but the same types won't type-match | 10:52 | ||
10:56
Manifest0 joined
10:58
atweiden-air left
|
|||
leont | Is there any way to get the short message out of an exception. .message appears to give me the long one including backtrace | 11:02 | |
timotimo | .message should only give the text of the exception | 11:03 | |
maybe you're accidentally not-catching it? | |||
or not marking it as handled when you do catch it? | |||
leont | That's what I would think. I'm calling a «say .message» in a catch handler. | 11:05 | |
timotimo | do you have a default { ... } or some "when" clause? | 11:06 | |
leont | fg | ||
It's in a when clause, but I also have a default clause after it | 11:07 | ||
timotimo | OK, that should cause the exception to not be rethrown at least | ||
m: die "oh no!"; CATCH { default { .message.say } } | |||
leont | Putting a say before and after the message confirms it's blowing up right there | ||
camelia | oh no! | ||
timotimo | perhaps the exception in question wrongfully puts a backtrace in its message method | 11:09 | |
that would be odd, but stranger things have happened | |||
also possible: the message method itself throws an extra exception | 11:10 | ||
leont | It's X::TypeCheck::Assignment | ||
timotimo | try writing out the type of the exception before saying the .message | ||
that shouldn't output a stack trace i don't think | 11:12 | ||
leont | Ah, if its $.got argument is a Failure, it does the thing | ||
timotimo | oh, haha | ||
that's quite unfortunate :D | |||
my $is-itself := try $.expected =:= $.got; | 11:13 | ||
that doesn't disarm the failure? | |||
leont | It puts the backtrace of the Failure object ahead of the message | ||
I just added a «use fatal» to my code, and then everything works as I would want it to | |||
timotimo | oh | ||
that's just part of the stringification, then | |||
a ticket is in order | 11:14 | ||
including a little investigation of what other exception "message" methods do in the case of Failure being put in unexpected places | |||
leont | This is explicitly doing this | ||
github.com/rakudo/rakudo/blob/mast....pm6#L2277 | 11:15 | ||
timotimo | oh | 11:16 | |
you didn't mention it has the "Earlier Failure:" header | |||
leont | Yeah, I should have pasted it. I should have realised what it was. | 11:17 | |
timotimo | no worries | ||
11:22
Manifest0 left
|
|||
Xliff | m: role AB[::T1, ::T2] { has T1 $.a is rw; has T2 $.b is rw; method ab() { dd $!a, $!b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; $a.ab; sleep 2; $a.say | 11:26 | |
camelia | Int $!a = 2 foo Str $!b = "cd" |
||
Xliff | WTF?? | ||
Why is "foo" in the middle? | |||
11:28
Manifest0 joined
|
|||
timotimo | because stdout and stderr | 11:28 | |
Xliff | O | ||
m: role AB[::T1, ::T2] { has T1 $.a is rw; has T2 $.b is rw; method ab() { dd $!a, $!b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; $a.ab; sleep 2; $*ERR.say: $a | 11:29 | ||
camelia | Int $!a = 2 Str $!b = "cd" foo |
||
Xliff | m: role AB[::T1, ::T2] { has T1 $.a is rw; has T2 $.b is rw; method ab() { dd $!a, $!b }; }; my $a = "foo" but AB[Int, Str]; $a.a = 2; $a.b = "cd"; $a.ab; $*ERR.say: $a | ||
camelia | Int $!a = 2 Str $!b = "cd" foo |
||
Xliff | Morning, timotimo | 11:30 | |
timotimo | m: my $letter = "a"; for ^20 { if Bool.pick { ($letter.=succ).lc.&say } else { ($letter.=succ).uc.¬e } } | ||
camelia | b D c e g j k l n o q t u F H I M P R S |
||
timotimo | m: my $letter = "a"; for ^20 { if Bool.pick { ($letter.=succ).pred.lc.&say } else { ($letter.=succ).pred.uc.¬e } } | ||
camelia | A b g i k l m n s C D E F H J O P Q R T |
||
timotimo | that's a funny ordering i guess? | 11:31 | |
Xliff | Yah | ||
11:31
andrzejku joined,
andrzejku left
11:32
andrzejku joined
|
|||
andrzejku | hello | 11:32 | |
:) | |||
timotimo | ohai | ||
andrzejku | I am just thinking today as Perl was created also as substitution of sed and awk | 11:33 | |
so is it better to learn awk in modern times? | |||
or just programming language which allow to do all those staff | |||
timotimo | sed and awk are probably also present in, for example, a busybox installation | 11:37 | |
perl on the other hand, probably not | |||
11:43
Manifest0 left,
Manifest0 joined
|
|||
timotimo | if you run "execsnoop" while some shell script is running, you'll see an incredible amount of forks/execs for all the little commands, btw. it's kind of amusing | 11:44 | |
if you have a munin running, it's quite a firehose | |||
11:55
ravenousmoose left
12:08
Manifest0 left
12:13
Manifest0 joined
12:21
Manifest0 left
12:26
yqt left
12:27
Manifest0 joined
12:32
Manifest0 left
12:37
andrzejku left,
Manifest0 joined
12:44
Manifest0 left
12:49
andrzejku joined
|
|||
nadim_ | timotimo: nice example you gave above, I need to remember that! I had to test of course ddt :flat(0), "/dev/random".IO.open(:bin).read(8) ; | 12:49 | |
12:50
Manifest0 joined
|
|||
nadim_ | I posted this yesterday, maybe someone can have a look at it. I am not understanding how to use .VAR properly and get an exception, on the other hand dd shows perfectly formated output nopaste.linux-dev.org/?1204113 | 12:53 | |
m: my @a = [1] ; dd @a ; my $b = 1 ; dd $b ; my $c = [1] ; dd $c ; | 12:54 | ||
camelia | Array @a = [1] Int $b = 1 Array $c = $[1] |
||
12:59
Maylay left
13:02
Maylay joined
|
|||
tobs | m: my $a = 1; say $a.VAR.name; say $a.VAR.?name | 13:05 | |
camelia | $a Nil |
||
tobs | that doesn't seem right | 13:06 | |
13:08
Manifest0 left
13:14
Manifest0 joined
13:16
andrzejku left
13:18
Manifest0 left
|
|||
cpan-p6 | New module released to CPAN! Getopt::Long (0.1.1) by 03LEONT | 13:22 | |
13:24
Manifest0 joined
|
|||
tobs | nadim_: I went ahead and filed R#2928 | 13:27 | |
synopsebot | R#2928 [open]: github.com/rakudo/rakudo/issues/2928 .VAR.?name and .VAR.name differ | ||
13:28
andrzejku joined
|
|||
leont | Running into weird issues now on a module that both imports and exports an is trait | 13:31 | |
It doesn't appear to be exporting the new one :-/ | 13:33 | ||
13:38
andrzejku left
|
|||
nadim_ | tobs: thanks :) | 13:40 | |
13:48
leont left
13:50
Manifest0 left
13:55
Manifest0 joined
14:07
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:09
aindilis left
14:10
aindilis joined
14:14
Sgeo__ left,
Sgeo__ joined
14:19
Manifest0 left
14:22
vrurg joined
14:23
aindilis left,
ravenousmoose joined
14:24
Manifest0 joined
14:25
vrurg left
14:26
aindilis joined
14:29
atweiden-air joined
14:33
ravenousmoose left
14:34
adu joined,
ravenousmoose joined
14:41
Sgeo_ joined
14:42
Manifest0 left
14:44
Sgeo__ left
14:49
Manifest0 joined,
aborazmeh left
|
|||
Altreus | I'm playing with Red but I can't figure out how to organise my schema properly. All of the examples use a flat system with no lib directory and no namespaces | 14:49 | |
So now I've come along with An::App::Schema::* and I have no idea what Red is trying to do to find things | 14:50 | ||
e.g. if I have MyApp::Schema::Person with «model Person» I can't elsewhere use «:model<Person>» because it tries to find lib/Person.pm6 | 14:51 | ||
14:51
atweiden-air left
|
|||
Altreus | I was expecting «model Person» to register itself with Red and «:model<Person>» to use that | 14:51 | |
Otherwise it's going to be grossly verbose | |||
14:57
yqt joined,
Manifest0 left
|
|||
Altreus | uh no wait, it doesn't work even if I put it all in one file | 14:59 | |
gist.github.com/Altreus/7007e0eefa...d0c6d72213 # This says Could not find Reward at line 0 in: <list of INC directories> | |||
15:01
aindilis left,
SCHAPiE left
15:02
Manifest0 joined
15:06
kurahaupo left,
aindilis joined
15:07
Manifest0 left
15:08
kurahaupo joined
15:10
molaf left
15:11
SCHAPiE joined,
aindilis left
15:12
Manifest0 joined
15:16
Manifest0 left
15:21
Manifest0 joined
15:24
SCHAPiE left
15:27
SCHAPiE joined
15:31
kurahaupo left
15:40
Manifest0 left
15:43
lucs left
15:45
adu left,
Manifest0 joined
15:46
aindilis joined
15:50
Manifest0 left
15:53
kurahaupo joined
15:55
kurahaupo left,
ravenousmoose left,
Manifest0 joined
15:57
kurahaupo joined,
SCHAPiE left,
cpan-p6 left
16:01
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
16:02
Manifest0 left
16:03
kurahaupo left
16:04
yqt left,
SCHAPiE joined
16:05
MilkmanDan left,
MilkmanDan joined
16:08
Manifest0 joined
16:13
kurahaupo joined
16:15
Manifest0 left
16:17
SCHAAP137 joined,
kurahaupo left,
SCHAPiE left,
SCHAAP137 is now known as SCHAPiE
16:20
Manifest0 joined
16:23
kurahaupo joined
16:25
ravenousmoose joined
16:28
HarmtH joined
16:33
reach_satori left,
reach_satori_ joined
16:39
HarmtH left
16:46
HarmtH joined
16:47
kurahaupo_ joined,
kurahaupo left,
kurahaupo_ left
16:48
kurahaupo joined
16:51
kurahaupo left,
kurahaupo joined,
kurahaupo left
16:52
kurahaupo joined
16:54
kurahaupo left,
kurahaupo joined
16:55
kurahaupo left,
kurahaupo joined
|
|||
lizmat | weekly: rage.powered.ninja/2019/05/26/uniq...-rank.html | 16:56 | |
notable6 | lizmat, Noted! | ||
timotimo | weekly: gist.github.com/timo/7cfe71a667bbd...0431da45a4 | 16:57 | |
notable6 | timotimo, Noted! | ||
timotimo | lizmat: did you already see this? :) | ||
i should upload screenshots to that gist, too | |||
lizmat | no, didn't yet | 16:58 | |
so what do you need to do to make that work on github ? | |||
timotimo | have something like TamperMonkey installed on your browser | 17:03 | |
in tampermonkey's "dashboard" there's an "utilities" tab at the top right | |||
it'll let you "import url" where you use the "Raw" url of the script file | 17:04 | ||
the screenshots are there now | |||
17:04
Manifest0 left
|
|||
xinming_ | How do we create a method with method name contains . ? | 17:05 | |
I saw github.com/bbkr/jsonrpc there is a rpc.batch method, which need to be invoked with $obj.'rpc.batch'() | 17:06 | ||
That makes me curious how to declare the method name with dot. | |||
timotimo | probably only with .^add_method | ||
xinming_ | I know we can may use .^add_method | ||
Ok, thanks. :-) | |||
timotimo | m: class test { method "foo.bar"($a) { say $a } } | 17:07 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing block at <tmp>:1 ------> 3class test { method7⏏5 "foo.bar"($a) { say $a } } |
||
sena_kun | github.com/bbkr/jsonrpc/blob/ebccb...t.pm6#L151 <- | ||
no? | |||
xinming_ | m: class A { ::?CLASS.^add_method("a.b", { "test".say; }); }; A.new."a.b"(); | ||
camelia | test | ||
xinming_ | This does work. | ||
It's ok if no syntax support this. | |||
sena_kun | m: class A { method ::('foo.bar') {42.say} }; A.'foo.bar'() | 17:08 | |
camelia | 42 | ||
xinming_ | Ok, thanks. | ||
17:08
kurahaupo left,
kurahaupo joined,
kurahaupo left
17:09
kurahaupo joined,
Manifest0 joined
|
|||
jnthn | m: class C { method ::('foo.bar') { say 42 } }; C.'foo.bar' | 17:13 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Quoted method name requires parenthesized arguments. If you meant to concatenate two strings, use '~'. at <tmp>:1 ------> 3 ::('foo.bar') { say 42 } }; C.'foo.bar'7⏏5<EOL> |
||
jnthn | m: class C { method ::('foo.bar') { say 42 } }; C.'foo.bar'() | ||
camelia | 42 | ||
jnthn | Don't need .^add_method for that :) | ||
HarmtH | m: my @a; my $neg=-1; say @a[$neg;0]:exists | 17:14 | |
camelia | True | ||
HarmtH | Bug or as-intended? | 17:15 | |
lizmat | HarmtH: feels like a bug | ||
hmmm.. more like a WAT maybe: | 17:16 | ||
m: my @a; my $neg=-1; say @a[$neg;0] | |||
camelia | Index out of range. Is: -1, should be in 0..^Inf in block <unit> at <tmp> line 1 |
||
lizmat | m: my @a; my $neg=-1; say @a[$neg;0].Bool | 17:17 | |
camelia | False | ||
17:17
kurahaupo left
|
|||
lizmat | HarmtH: yeah, bug, please make an issue :-) | 17:17 | |
HarmtH | Okay, will do | ||
17:17
kurahaupo joined
|
|||
AlexDaniel | timotimo: I'd prefer a bot that edits tickets | 17:19 | |
timotimo | to put the links in? | 17:20 | |
AlexDaniel | yeah | ||
timotimo | i don't think that's possible on github | ||
17:20
farcas82 joined
|
|||
AlexDaniel | timotimo: huh? | 17:20 | |
aaaah they're in the code block, dammit | |||
timotimo | does GFMD allow that? | ||
yeah | |||
AlexDaniel | well, it's possible… | ||
timotimo | would it allow putting <pre> in there as html? | ||
AlexDaniel | you'll need to use <code></code> I think | ||
timotimo | can you experiment a little and get back to me? | 17:21 | |
AlexDaniel | timotimo: github.com/perl6/whateverable/issu...-496017166 | 17:23 | |
you'll need to escape things, and nobody knows the exact rules for escaping… | 17:24 | ||
and it'll work differently in wikis and gists | |||
17:24
kurahaupo left,
kurahaupo_ joined
17:25
kurahaupo_ left
|
|||
timotimo | don't think i need to support wikis, but figuring out the escaping rules when nobody knows them ... sounds absolutely terrible | 17:25 | |
17:25
kurahaupo joined
|
|||
AlexDaniel | timotimo: don't worry it'll work most of the time | 17:26 | |
timotimo | ugh | ||
AlexDaniel | :) | ||
hmm what does whateverable use to add links to gists | 17:27 | ||
like if the bot gets an exception in its own code | |||
timotimo: github.com/perl6/whateverable/blob...es.pm6#L70 | 17:28 | ||
# let's hope for the best ↓ | 17:29 | ||
“<a href="$href">{$<path>}</a>” ~ | |||
timotimo | ahahaha | ||
AlexDaniel | heh, role Enough | 17:31 | |
that codebase is fun to read sometimes | 17:32 | ||
17:39
ravenousmoose left,
Manifest0 left
|
|||
lizmat | weekly: blogs.perl.org/users/laurent_r/2019...-perl.html | 17:40 | |
notable6 | lizmat, Noted! | ||
17:42
kurahaupo_ joined,
kurahaupo left
17:43
kurahaupo_ left,
kurahaupo joined
17:45
Manifest0 joined
17:52
telex left
17:53
telex joined
17:54
Manifest0 left
17:59
Manifest0 joined
|
|||
nadim_ | is there a short notation to check id an array only contains a specific value or type? something like @a ~~ only_one(True) | 18:04 | |
ie I want to check if @a only contains True | 18:06 | ||
xinming_ | all? | ||
18:06
Manifest0 left
|
|||
nadim_ | hmm, maybe I check | 18:07 | |
timotimo | @a.all eqv True | 18:08 | |
xinming_ | m: my @a = (True xx 5); (@a.unique.elems == 1 and @a[0] == True).perl.say; | ||
camelia | Bool::True | ||
xinming_ | This is shortest I can get | ||
Can we use == to compare Bool value? | |||
timotimo | you can | ||
nadim_ | yes | ||
timotimo | but then 1 will also match True and 0 will also match False | ||
xinming_ | m: my @a = (True xx 5); (@a.all eqv True).perl.say;; | 18:09 | |
camelia | all(Bool::True, Bool::True, Bool::True, Bool::True, Bool::True) | ||
xinming_ | m: my @a = (True xx 5); (@a.all eqv True).perl.say; | ||
camelia | all(Bool::True, Bool::True, Bool::True, Bool::True, Bool::True) | ||
nadim_ | m: my @a = (True, True) ; @a.all eqv True | ||
camelia | WARNINGS for <tmp>: Useless use of "eqv" in expression ".all eqv True" in sink context (line 1) |
||
xinming_ | m: my @a = (True xx 5); ?(@a.all eqv True).perl.say; | ||
camelia | WARNINGS for <tmp>: all(Bool::True, Bool::True, Bool::True, Bool::True, Bool::True) Useless use of "?" in expression "?(@a.all eqv True).perl.say" in sink context (line 1) |
||
xinming_ | m: my @a = (True xx 5); (?(@a.all eqv True)).perl.say; | ||
camelia | Bool::True | ||
xinming_ | m: my @a = (True xx 5, False); (?(@a.all eqv True)).perl.say; | 18:10 | |
camelia | Bool::False | ||
xinming_ | So, ?(@a.all eqv True) is what we want. | ||
18:10
MitarashiDango[m joined
|
|||
nadim_ | m: my @a = (True, True) ; ?(@a.all eqv True) | 18:10 | |
camelia | WARNINGS for <tmp>: Useless use of "?" in expression "?(@a.all eqv True)" in sink context (line 1) |
||
nadim_ | m: my @a = (True, True) ; (?(@a.all eqv True)).say | ||
camelia | True | ||
18:10
Manifest0 joined
|
|||
nadim_ | no since more than one True is still true | 18:11 | |
m: my @a = (True, True) ; (?(@al eqv [True])).say | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '@al' is not declared at <tmp>:1 ------> 3my @a = (True, True) ; (?(7⏏5@al eqv [True])).say |
||
nadim_ | m: my @a = (True, True) ; (?(@a eqv [True])).say | ||
camelia | False | ||
nadim_ | m: my @a = (True) ; (?(@a eqv [True])).say | ||
camelia | True | ||
xinming_ | m: my @a = (True xx 5, False); (?(@a.all eqv True)).perl.say; | 18:12 | |
camelia | Bool::False | ||
nadim_ | a simple eqv works best | ||
xinming_ | m: my @a = (True xx 5); (?(@a eqv True)).perl.say; | ||
camelia | Bool::False | ||
nadim_ | m: my @a = (True) ; (?(@a ~~ [True])).say | ||
camelia | True | ||
nadim_ | m: my @a = (True, True) ; (?(@a ~~ [True])).say | ||
camelia | False | ||
18:14
ravenousmoose joined
|
|||
nadim_ | while on this short notition trip, is there a way to write $a ~~ 'x' ?? $a !! 'y' ? | 18:16 | |
timotimo | if $a is a long variable name you can use postfix given to shorten it to $_ | 18:17 | |
nadim_ | that's one good idea but what I really meant was another way to write ?? !! but now I write it down I see that it's a bit silly :) | 18:19 | |
the real code is this: $clone.flat ~~ [True] ?? [0] !! $clone.flat | 18:20 | ||
I want to replace a single True with 0 | |||
because @.flat, if I set it with :flat gets True inside the array and I want :flat to mean "initialize" the array with a single zero | 18:21 | ||
timotimo | there's "and" and "or", but that might still not be what you want | ||
nadim_ | I want :flat to put a singlezeroin flat, not True | 18:22 | |
18:22
zakharyas joined
|
|||
nadim_ | at other times :flat can be initialized with more arguments but without arguments I want a single 0 | 18:22 | |
18:28
Manifest0 left
18:32
Manifest0 joined
|
|||
xinming_ | m: sub x ($x) { temp $x = "5"; $x.perl.say; }; x(3); | 18:37 | |
camelia | Cannot assign to a readonly variable or a value in sub x at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
xinming_ | Is this a bug? | ||
or, we can't temp a ro variable is desired behavior. | |||
nadim_ | m: sub x ($y) { temp $x = "5"; $x.perl.say; }; x(3); | 18:40 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$x' is not declared at <tmp>:1 ------> 3sub x ($y) { temp 7⏏5$x = "5"; $x.perl.say; }; x(3); |
||
xinming_ | temp no exist var is definitely error, but to the ro variable, I think we should allow it to be temp'ed | 18:41 | |
timotimo | that was just a typo i think? | 18:42 | |
i thought you can only use temp with a variable name that exists further outside? | |||
nadim_ | xinming_: I think it is intended as you can't re assign the variable upon inner scope exit | ||
timotimo: yes it was a typo, I wnated to make a change, removed it but not all of it | 18:43 | ||
docs says "Upon exiting the scope, the variable will be restored to its original value" | |||
maybe a warning when temporizing a ro would be nice, even though it will generate a fault at scope exit | 18:44 | ||
xinming_ | timotimo: So, it's designed like this, right? | 18:45 | |
timotimo | i think so? | 18:49 | |
19:17
Manifest0 left
19:24
Manifest0 joined
|
|||
xinming_ | timotimo: I mean, we can't temp a ro variable, it's not a bug, right? | 19:28 | |
19:33
Manifest0 left
|
|||
timotimo | i don't know :( | 19:35 | |
19:38
kaare__ left
19:39
kaare__ joined
19:40
Manifest0 joined
19:48
Manifest0 left
19:52
Manifest0 joined
19:56
Manifest0 left
20:03
Manifest0 joined
20:07
Manifest0 left
20:10
ufobat_ joined
20:13
ufobat__ left
20:14
Manifest0 joined
20:16
molaf joined
20:19
pecastro joined
20:22
adu joined
20:27
|oLa| joined
20:28
[Sno] left
20:29
Manifest0 left
20:31
[Sno] joined
20:33
Manifest0 joined
20:39
ravenousmoose left
|
|||
xinming_ | Is there a way to enter a readline interpreter after the script reaches end? | 20:46 | |
I mean set the breakpoint | 20:47 | ||
21:03
Sgeo_ left,
Sgeo_ joined
|
|||
zostay | m: IO::Socket::Async.udp(:broadcast); | 21:13 | |
camelia | An operation first awaited: in block <unit> at <tmp> line 1 Died with the exception: bad file descriptor in block <unit> at <tmp> line 1 |
||
zostay | That's documented on docs.perl6.org, but I don't see the :broadcast flag listed in roast. I can't figure out how to get it to work. | 21:14 | |
Geth | perl6.org: 079961d179 | lukasvalle++ | 2 files fix broken links |
21:16 | |
21:17
Sgeo_ left,
Sgeo_ joined
|
|||
Voldenet | Why not just: use MONKEY-SEE-NO-EVAL; for lines() { CATCH { .say; next }; EVAL($_) } | 21:22 | |
Yeah, it's not readline interpreter, but it probably covers a lot of use cases | 21:23 | ||
+ rlwrap | 21:24 | ||
21:24
sena_kun left
21:25
farcas82 left
21:31
Manifest0 left
21:32
zakharyas left
21:36
Manifest0 joined
21:40
Manifest0 left
21:45
Manifest0 joined
21:51
MilkmanDan left
21:52
Manifest0 left
21:53
MilkmanDan joined,
reportable6 left,
undersightable6 left,
committable6 left,
shareable6 left,
notable6 left
21:54
committable6 joined,
shareable6 joined,
ChanServ sets mode: +v shareable6
21:55
reportable6 joined,
notable6 joined
21:58
undersightable6 joined,
ChanServ sets mode: +v undersightable6
21:59
Manifest0 joined
22:05
Manifest0 left
22:10
Manifest0 joined
|
|||
TreyHarris | I'm getting warned by the perl6-users ezmlm daemon that some of my messages are bouncing. But the report says Gmail's rejecting them with, "Our system has detected that this message does not meet IPv6 sending guidelines regarding PTR records and authentication. Please review support.google.com/mail/?p=IPv6AuthError for more information." Could someone point me in the direction of the person I should | 22:14 | |
direct this to? | |||
timotimo | maybe it's a noc.perl.org thing? | ||
22:14
Sgeo__ joined
22:18
Sgeo_ left
|
|||
TreyHarris | timotimo: Thanks | 22:18 | |
22:35
netrino left
22:52
rindolf left
22:58
Manifest0 left
23:02
Manifest0 joined
23:05
netrino joined,
undersightable6 left,
shareable6 left,
squashable6 left,
committable6 left,
unicodable6 left,
greppable6 left,
notable6 left,
evalable6 left,
nativecallable6 left,
benchable6 left,
bloatable6 left,
statisfiable6 left,
bisectable6 left,
releasable6 left,
coverable6 left,
quotable6 left,
reportable6 left
23:07
leont joined,
Manifest0 left
23:08
notable6 joined,
coverable6 joined
23:09
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6,
greppable6 joined,
ChanServ sets mode: +v greppable6,
unicodable6 joined
23:10
benchable6 joined,
evalable6 joined,
ChanServ sets mode: +v evalable6,
undersightable6 joined,
ChanServ sets mode: +v undersightable6
23:11
reportable6 joined,
ChanServ sets mode: +v reportable6,
quotable6 joined,
ChanServ sets mode: +v quotable6,
bisectable6 joined,
bloatable6 joined,
farcas82 joined
23:12
Manifest0 joined,
shareable6 joined,
ChanServ sets mode: +v shareable6,
committable6 joined,
nativecallable6 joined,
ChanServ sets mode: +v nativecallable6
23:13
releasable6 joined,
ChanServ sets mode: +v releasable6,
squashable6 joined,
ChanServ sets mode: +v squashable6
23:19
Manifest0 left
23:24
Manifest0 joined
23:30
pecastro left
23:48
vrurg joined
23:50
Manifest0 left
23:56
Manifest0 joined
|