š¦ Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:09
Altai-man joined
00:11
sena_kun left
00:16
BenGoldberg joined
00:25
Altai-man left
00:27
BenGoldberg left,
Ben_Goldberg joined,
Ben_Goldberg is now known as BenGoldberg
00:29
BenGoldberg left,
Ben_Goldberg joined,
Ben_Goldberg is now known as BenGoldberg
00:32
pecastro left
00:41
skids left
00:54
marcusr left
00:55
marcusr joined
01:11
dmc00 left
01:15
lucasb left
01:17
BenGoldberg left,
Ben_Goldberg joined,
Ben_Goldberg is now known as BenGoldberg
01:18
cpan-raku left
01:19
cpan-raku joined,
cpan-raku left,
cpan-raku joined
01:28
Doc_Holliwould left
01:55
approaching236 left
02:00
BenGoldberg left
02:10
molaf left
|
|||
perryprog | melethere probably isn't quite what you want since it seems to flattent the output (it's not ([5, 6], [8, 9]) | 02:16 | |
m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat[1,2;[1,2]]; | |||
camelia | (5 6 8 9) | ||
perryprog | phooey, I'm too slow. Well now I'm curious, does anyone know how to do the above and get the result ([5, 6], [8, 9])? | 02:17 | |
02:22
molaf joined
03:04
Manifest0 left
03:06
Manifest0 joined
03:43
mowcat left
03:47
MasterDuke left
04:31
ape666 joined
04:45
ape666 left
04:47
approaching236 joined
05:01
ape666 joined
05:23
molaf left
05:28
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:43
chise joined
05:58
parabolize left
06:01
molaf joined
06:03
ape666 left
06:15
Xliff_ joined
06:16
Xliff left
06:28
molaf left
06:32
jmerelo joined
06:56
chise left
07:04
aborazmeh left
07:08
sjm_uk joined
|
|||
Xliff_ | Good morning. | 07:18 | |
What's the best way to check for a dynamic variable at runtime? | |||
m: ?%*a.say | |||
camelia | WARNINGS for <tmp>: Useless use of "?" in expression "?%*a.say" in sink context (line 1) Dynamic variable %*a not found in block <unit> at <tmp> line 1 |
||
Xliff_ | m: %*a?.say | 07:19 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3%*a7ā5?.say expecting any of: infix infix stopper statement end statement modifier statement modifier ā¦ |
||
Xliff_ | m: %*a.say | ||
camelia | Dynamic variable %*a not found in block <unit> at <tmp> line 1 |
||
Xliff_ | m: my %*a; say ::MY("%*a'") | ||
camelia | Cannot invoke this object (REPR: Uninstantiable; MY) in block <unit> at <tmp> line 1 |
||
Xliff_ | m: my %*a; say ::("%*a'") | ||
camelia | No such symbol '%*a'' in block <unit> at <tmp> line 1 |
||
Xliff_ | m: my %*a; say MY::.keys | ||
camelia | ($=pod $Ā¢ !UNIT_MARKER $=finish ::?PACKAGE EXPORT %*a GLOBALish $_ $! $/ $?PACKAGE) | ||
Xliff_ | m: my %*a; say MY::<%*a>.VAR.^name | 07:20 | |
camelia | Hash | ||
Xliff_ | m: my %*a; say MY::<%*a>.VAR.name | ||
camelia | %*a | ||
Xliff_ | m: my %*a; say MY::<%*a>.defined | ||
camelia | True | ||
Xliff_ | \o/ | ||
07:21
ufobat joined
07:31
approaching236 left
07:32
PavelB joined
07:38
Doc_Holliwould joined
08:09
Altai-man joined
08:11
abraxxa left
08:12
abraxxa joined
|
|||
Xliff_ | m: $?s.say | 08:14 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$?s' is not declared at <tmp>:1 ------> 3<BOL>7ā5$?s.say |
||
Xliff_ | m: ?$s.say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$s' is not declared at <tmp>:1 ------> 3?7ā5$s.say |
||
Xliff_ | m: my $s; ?$s.say | ||
camelia | WARNINGS for <tmp>: (Any) Useless use of "?" in expression "?$s.say" in sink context (line 1) |
||
08:17
grep0r left
08:18
Sgeo left
08:42
dakkar joined
08:43
grep0r joined
|
|||
jmerelo | Travis has honored our request for more CI credits twitter.com/jjmerelo/status/1324272244349173760 With the new plan, we would have exhausted them by day 10 every month or so. | 08:49 | |
This is only for the Raku organization. I've been looking up Travis usage in the rest of the organizations, seems to be relatively small. Should it increase, however, someone might want to do the same kind of request through Travis Support. | 08:50 | ||
08:52
MasterDuke joined
09:14
domidumont joined
09:19
Xliff joined
09:21
Xliff_ left
09:29
aluaces left
09:31
pecastro joined
09:36
aluaces joined
09:39
MasterDuke left
10:11
rindolf joined
10:16
thundergnat joined
|
|||
thundergnat | m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat[1,2]Ā»[1,2]Ā».Array; | 10:16 | |
camelia | ([5 6] [8 9]) | ||
thundergnat | perryprog: ^^^^ | 10:17 | |
m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat[1,2]Ā»[1,2]; # or, if you don't actually need arrays returned | 10:18 | ||
camelia | ((5 6) (8 9)) | ||
10:19
thundergnat left
10:30
wamba joined
|
|||
SmokeMachine | m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat[1,2].map: *[1,2] | 10:32 | |
camelia | ((5 6) (8 9)) | ||
SmokeMachine | m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat.tail(2).map: *.tail: 2 | ||
camelia | ((5 6) (8 9)) | ||
SmokeMachine | m: my @mat = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]; say @mat.skip.map: *.skip | 10:33 | |
camelia | ((5 6) (8 9)) | ||
SmokeMachine | m: multi a([$a, *@r]) { do for @r { .&a } }; multi a($a) { $a }; say a [[1, 2, 3], [4, 5, 6], [7, 8, 9]] | 10:37 | |
camelia | ((5 6) (8 9)) | ||
10:44
MasterDuke joined
10:52
Doc_Holliwould left
11:04
domidumont left
11:24
Black_Ribbon left
11:46
MasterDuke left
11:54
MasterDuke joined
12:10
sena_kun joined
12:11
Altai-man left
12:14
MasterDuke left
12:15
takside joined
12:19
abraxxa left
12:23
dmc00 joined
|
|||
cpan-raku | New module released to CPAN! Text::Flags (0.0.1) by 03ELIZABETH | 12:27 | |
12:32
jmerelo left
12:36
abraxxa joined
12:39
veesh_ joined
12:41
veesh left,
veesh_ is now known as veesh
12:53
cpage left
12:55
cpage joined
|
|||
perryprog | SmokeMachine :) thanks! | 13:01 | |
.tell thundergnat Thank you! | 13:02 | ||
tellable6 | perryprog, I'll pass your message to thundergnat | ||
13:08
MasterDuke joined
13:47
wamba left,
lucasb joined
13:50
jmerelo joined
13:53
wamba joined
14:06
Guest86785 is now known as masak
14:08
jmerelo left
14:15
abraxxa left
14:18
abraxxa joined,
aindilis joined
14:21
aborazmeh joined,
aborazmeh left,
aborazmeh joined
14:22
abraxxa left
14:23
abraxxa joined
14:47
finsternis left
15:02
melezhik joined
|
|||
melezhik | .tell perryprog, thanks , I'll take a look at your suggestions with slices later | 15:02 | |
tellable6 | melezhik, I'll pass your message to perryprog | ||
15:03
wamba left
15:05
MasterDuke left,
aborazmeh left
15:08
melezhik left
15:12
MasterDuke joined
15:14
wamba joined,
vrurg_ is now known as vrurg
15:15
parabolize joined
15:28
melezhik joined
|
|||
perryprog | melezhik, make sure you take a look at the messages below mine as well, as those show non-flat examples. | 15:29 | |
tellable6 | 2020-11-05T15:02:55Z #raku <melezhik> perryprog, thanks , I'll take a look at your suggestions with slices later | ||
perryprog | heh | ||
melezhik | lizmat Text::Flags Rakudist fails - rakudist.raku.org/sparky/report/debian/897 with some interesting error - rakudist.raku.org/sparky/report/debian/897 | 15:30 | |
Serialization Error: missing static code ref for closure 'run' (gen/moar/stage2/NQPHLL.nqp:2248) | |||
perryprog - sure | |||
.tell lizmat rakudist.raku.org/sparky/report/debian/897 | 15:33 | ||
tellable6 | melezhik, I'll pass your message to lizmat | ||
15:37
skids joined,
melezhik left
15:42
Sgeo joined
15:45
aluaces left
15:55
pecastro left
|
|||
lizmat | melezhik: am aware of the issue, I can *not* reproduce this locally :-( | 16:00 | |
tellable6 | lizmat, I'll pass your message to melezhik | ||
16:05
aluaces joined
16:08
Altai-man joined
|
|||
Geth_ | advent: a551ebda3b | Altai-man++ (committed using GitHub Web editor) | raku-advent-2020/authors.md Update authors.md |
16:10 | |
16:10
aborazmeh joined,
aborazmeh left,
aborazmeh joined
16:11
sena_kun left
16:22
pecastro joined
|
|||
tbrowder | hi, all | 16:24 | |
16:24
aborazmeh left
|
|||
tbrowder | just reading jmerelo's new book "Raku Recipes" and enjoying it | 16:25 | |
one question about a regex construct i'm not sure of. on p. 346 is the following line: | 16:26 | ||
rir | Given a Str: 'my-classname' how would get a my-classname:U? | 16:27 | |
tbrowder | token quantity { <:N>+ } | ||
16:27
wamba left
|
|||
tbrowder | what does that ^^^ mean? | 16:27 | |
timotimo | the : is for unicode properties, if there's no key-value kind of thing, it's for general-category | 16:29 | |
and N is short for Numeric i think? | |||
tbrowder | ah, that sounds right, thank! forgot about unicode space, silly ascii language person me am :-D | 16:30 | |
thanks | |||
timotimo | it's quite possible that you're getting far more numerics than you were bargaining for, though :) | 16:31 | |
tbrowder | yep, for my project i'll use something else | ||
just tryinh | 16:32 | ||
trying to grok the example grammar | |||
SmokeMachine | m: my Str $class-name = "Int"; say ::($class-name).new # <-- rir | 16:35 | |
camelia | 0 | ||
16:40
melezhik joined
|
|||
melezhik | .tell lizmat you can use Rakudist to test your github repos if it helps | 16:41 | |
tellable6 | melezhik, I'll pass your message to lizmat | ||
16:41
mowcat joined
|
|||
rir | Thanks SmokeMachine, I thought I'd seen something like that but couldn't find it. | 16:42 | |
16:47
aborazmeh joined,
aborazmeh left,
aborazmeh joined
16:57
jmerelo joined
16:58
tejr left
16:59
tejr joined
17:03
Doc_Holliwould joined
17:05
wamba joined
17:08
squashable6 left
17:11
squashable6 joined
17:14
aborazmeh left
17:20
Xliff left
|
|||
cpan-raku | New module released to CPAN! Text::Flags (0.0.2) by 03ELIZABETH | 17:38 | |
17:38
Tirifto joined
17:39
dakkar left
17:49
molaf joined,
approaching236 joined
17:50
molaf left
17:51
molaf joined
18:12
MasterDuke left
18:27
orinthe left,
orinthe8 joined
18:36
Doc_Holliwould left
18:37
sjm_uk left
18:44
melezhik left
|
|||
Zero_Dogg | For an Exception subclass, the docs say to at least override the message method. Is a 'has $.message is required;' sufficient, or should I specify the method explicitly? | 18:48 | |
Altreus | That's what I've been doing | 18:53 | |
timotimo | it's fine to use has $.message, since that gives you a message method auto-generated | 18:54 | |
Zero_Dogg | yep, that's what I thought, just had to make sure I wasn't missing anything | 18:55 | |
thanks! | |||
19:02
MasterDuke joined
19:03
abraxxa left
19:18
approaching236 left
19:20
perlbot left
19:21
simcop2387 left,
bocaneri left
19:25
mowcat left
19:36
Doc_Holliwould joined
19:46
jmerelo left
19:48
simcop2387 joined,
perlbot joined
19:55
MasterDuke left
|
|||
Tirifto | Hello! What would be an elegant way to go through the elements of a list, dealing with a variable amount of elements at a time, based on what they are? (Simple example: going through a list of words, but reading in another word from the list to do something with, if the first one ends in a colon. E.g. for (a b c d: e f g: h), dealing in order with | 20:05 | |
(a) (b) (c) (d: e) (f) (g: h).) | |||
20:06
MilkmanDan left
20:07
natrys joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
MilkmanDan joined
|
|||
tobs | Tirifto: that seems a little too much for signature tricks. I would probably write an imperative sub that turns an input Seq into an output Seq as per your specification. Once you have that sub well hidden away, you can start thinking about using it elegantly :) | 20:08 | |
20:09
sena_kun joined
20:10
MasterDuke joined
|
|||
Tirifto | I could only think of taking a single element at a time and storing the context in a variable to decide what to do. (E.g. āDid the last element end in a colon? If yes, do this, else do that.ā) Iāve also read about iterators in the documentation, but Iām not sure if this would be a good use of them. | 20:10 | |
[Coke] | input/output iterator makes sense to me depending on what you're doing. | 20:11 | |
20:11
Altai-man left
|
|||
[Coke] | if you want to run some code if you see a colon, but diferent code if not, a map is probably sufficient. | 20:11 | |
... not elegant, but sufficient (you'd ahve to save the : info with a state var, probably). on the other end, you could turn it into a supply and have the code tapping it tap another value if it sees a : | 20:12 | ||
do you have the whole list up front? | |||
Tirifto | tobs: Seq looks interesting to know about, I will definitely look into it! | 20:14 | |
20:14
ambs joined
|
|||
Tirifto | [Coke]: In this case yes; by the time I want to pass the list to whatever will take care of it, the list is complete. | 20:14 | |
tobs | m: sub aggregate (\seq) { my @agg; gather for seq -> $elt { @agg.push($elt); unless $elt ~~ /':'$/ { take @agg.splice } } }; say "Ā«$_.raku()Ā»" for aggregate <a b c d: e f g: h> | 20:16 | |
camelia | Ā«["a"]Ā» Ā«["b"]Ā» Ā«["c"]Ā» Ā«["d:", "e"]Ā» Ā«["f"]Ā» Ā«["g:", "h"]Ā» |
||
tobs | Tirifto: ^ it takes something iterable (called "seq" but may be array as well -- my bad naming) and uses gather/take to turn it into the desired sequence of arrays. | 20:17 | |
20:17
ufobat left
|
|||
Tirifto | tobs: ā¦now Iāve got it! Very nice! :D | 20:36 | |
I will look into a supply; it looks like thatās similar to manually iterating over the values? (As in, you say āgive me the next oneā whenever you need?) | 20:37 | ||
timotimo | supplies work the other way around, they run whenever (that's where the name of whenever comes from) a value becomes available | 20:40 | |
20:47
aborazmeh left
|
|||
Tirifto | Ah, I see. Would there be an analagous construct which gets you the next value on demand then? Is that basically just the iterator? | 20:48 | |
timotimo | yeah, for-loop over it or map it or whatever? | 20:51 | |
or grab the iterator and .pull-one on it until it gives you IterationEnd | |||
Geth_ | advent: 8bd23e22fb | L'AlabameƱu++ (committed using GitHub Web editor) | raku-advent-2020/authors.md Add guifa Draft visible in alabamenhu/DateTimeTimezones repository. |
21:20 | |
21:24
sena_kun left,
sena_kun joined
21:30
aborazmeh joined,
aborazmeh left,
aborazmeh joined
21:43
rypervenche left
21:45
skyl4rk left
21:46
skyl4rk joined,
aborazmeh left
21:50
Black_Ribbon joined
21:59
rypervenche joined
22:03
vrurg left,
vrurg_ joined
22:19
rindolf left
|
|||
Tirifto | Thank you, I am going with the iterator! | 22:27 | |
22:34
natrys left
22:48
cpan-raku left
22:50
cpan-raku joined,
cpan-raku left,
cpan-raku joined
22:51
Noisytoot left
22:56
Black_Ribbon left
22:58
pochi joined
23:00
Noisytoot joined,
k-man left
23:04
pochi left
23:07
k-man joined
23:32
wamba left
23:37
sena_kun left
23:40
gabiruh left,
gabiruh joined
23:47
sena_kun joined
|