🦋 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.
Geth doc: germanrodriguezherrera++ created pull request #3088:
Fixed HTTPRequest example.
00:12
Xliff_ m: my @a = 'a'...'z'; @a[* -3 .. * - 1].say 01:37
camelia (x y z)
ZzZombo m: say Nil | Str | '' ~~ .defined 02:10
camelia True
ZzZombo m: say Nil | Str ~~ .defined 02:11
camelia False
ZzZombo m: <1, 'a'>.succ.say 02:17
camelia No such method 'succ' for invocant of type 'List'. Did you mean any of these?
sec
sech
sum
uc

in block <unit> at <tmp> line 1
ZzZombo m: <1/'a'>.succ.say
camelia 1/'a'
ZzZombo m: IntStr.new(1, 'a').succ.say
camelia 2
ZzZombo m: say ~IntStr.new(1, 'a').succ 02:19
camelia 2
ZzZombo m: IntStr.new(1, 'a').succ.WHAT.say
camelia (Int)
ZzZombo m: say (~IntStr.new(1, 'a').succ).WHAT 02:20
camelia (Str)
ZzZombo m: say (~IntStr.new(1, 'a').succ)
camelia 2
ZzZombo m: say (~(IntStr.new(1, 'a').succ)) 04:10
camelia 2
ZzZombo m: say (IntStr.new(1, 'a').Str.succ) 04:11
camelia b
ZzZombo WTF
ZzZombo Is not the string context supposed to make the former return 'b' as well? 04:11
Xliff_ m: say ((~(IntStr.new(1, 'a')).succ)) 04:42
camelia 2 04:43
ZzZombo m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 05:03
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
Xliff_ m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd' but StrIdx;say $s[0];$s[0] = 'b';say $s 05:04
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
Xliff_ m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd'; $s does StrIdx; say $s[0]; $s[0] = 'b';say $s 05:05
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
Xliff_ m: role StrIdx { also does Positional; method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd'; $s does StrIdx; say $s[0]; $s[0] = 'b'; $a = "asd"; $a.substr-rw(1, 1) = "b"; $a.say 05:09
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3$s does StrIdx; say $s[0]; $s[0] = 'b'; 7⏏5$a = "asd"; $a.substr-rw(1, 1) = "b"; $a
Xliff_ m: my $a = "asd"; $a.substr-rw(1, 1) = "b"; $a.say 05:10
camelia abd
Xliff_ m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd'; $s but StrIdx; say $s[0]; $s[0] = 'b';say $s 05:11
camelia asd
Cannot modify an immutable Str (asd)
in block <unit> at <tmp> line 1
Xliff_ m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd'; my $t = $s but StrIdx; say $s[0]; $s[0] = 'b';say $s
camelia asd
Cannot modify an immutable Str (asd)
in block <unit> at <tmp> line 1
Xliff_ m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd'; my $t = $s but StrIdx; say $s[0]; $t[0] = 'b';say $s
camelia asd
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
Geth doc: sztanyi++ created pull request #3089:
code example error, add file name
07:17
doc: 7d33a5f11c | (German Rodriguez Herrera)++ | doc/Language/grammars.pod6
HTTPRequest example in "grammars" section corrected and slightly improved.
07:41
doc: afc638c75f | (German Rodriguez Herrera)++ | doc/Language/grammars.pod6
Whitespace fix.
doc: f80bd9f1f1 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/grammars.pod6
Merge pull request #3088 from germanrodriguezherrera/master

Fixed HTTPRequest example.
Geth doc: 08721e5657 | (JJ Merelo)++ | doc/Language/control.pod6
Changes example to reflect intent, not syntax ref #1748
08:20
doc: 42ab7a87b1 | (JJ Merelo)++ | 2 files
Changes wrong description

This closes 3075
hythm Xliff_, if you are around, I have a question about how to get the color of widget using P6-GtkPlus 08:26
I'm trying "$color = $w.get-style-context.get-color: GTK_STATE_FLAG_NORMAL", but .get-color expects additional $color parameter. I'm trying to get the color not set it, so not sure how to add the $color parameter 08:31
Geth doc: f37ab1b1d3 | (JJ Merelo)++ | template/footer.html
Evolves to use Raku
09:17
doc: bfc9553189 | (JJ Merelo)++ | doc/Language/control.pod6
Eliminates tabs
09:19
Geth doc: 62dc130b35 | (JJ Merelo)++ | template/footer.html
Eliminates EDITURL from footer

Where it's no longer substituted. Also full stops.
09:43
rindolf hi all, sup? 10:00
SmokeMachine m: say (Nil | Str | '') ~~ *.defined 11:20
camelia True
SmokeMachine m: say (Nil | Str | Int) ~~ *.defined 11:21
camelia False
ZzZombo m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 12:21
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
ZzZombo Please, does anybody know why does this not work?
tobs I was also puzzled when I tried it yesterday. No idea. 12:23
tobs m: role StrIdx { method f { self.substr-rw(0,1) } }; my $s = "asd" but StrIdx; say $s.f; $s.f = "b"; say $s 12:27
camelia a
Cannot modify an immutable Str (a)
in block <unit> at <tmp> line 1
tobs it does not seem related to the use of Positional anyway
lizmat m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) }; };my $s = 'asd' does StrIdx;say $s[0];$s.AT-POS(0) = 'b';say $s 13:04
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
lizmat m: role StrIdx { also does Positional;method AT-POS(\SELF: $i) is rw { SELF.substr-rw($i, 1) }; };my $s = 'asd' does StrIdx;say $s[0];$s.AT-POS(0) = 'b';say $s
camelia a
bsd
lizmat ZzZombo tobs I think there was one issue with the vode 13:05
*code
self is always de-containerized, so there's no container to put the changed string into anymore
secondly, I think there is an issue with the postcircumfix:<[ ]> also decontainerizing 13:06
afk&
tobs lizmat++, oh so substr-rw needs the invocant to be in a container? Or did I misunderstand? 13:14
m: "abc".substr-rw(0,1) = "b"
camelia Cannot modify an immutable Str (abc)
in block <unit> at <tmp> line 1
tobs aha
tobs so calling $s.substr-rw modifies the contents of the Scalar at $s? I imagined it would actually really change the string's data underneath, but apparently not. Probably safer this way...? 13:19
m: my $s = "asd"; my $t = $s; say $s.WHERE; say $t.WHERE; $s.substr-rw(0,1) = "b"; say $s; say $t; say $s.WHERE; say $t.WHERE 13:20
camelia 139644839248768
139644839248768
bsd
asd
139644840090240
139644839248768
ZzZombo m: role StrIdx { also does Positional;method AT-POS($i) is rw { self.substr-rw($i, 1) } };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 14:42
camelia a
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
ZzZombo m: role StrIdx { also does Positional;method AT-POS(\SELF: $i) is rw { dd SELF.VAR, self.VAR; self.substr-rw($i, 1) } };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 14:43
camelia "asd"
a
"asd"
"asd"
"asd"
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
ZzZombo m: role StrIdx { also does Positional;method AT-POS(\SELF: $i) is rw { dd SELF.VAR, self.VAR; SELF.substr-rw($i, 1) } };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 14:44
camelia "asd"
a
"asd"
"asd"
"asd"
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1
Xliff_ hythm: I'm awake.
tellable6 Xliff_, I'll pass your message to hythm
ZzZombo m: role StrIdx { also does Positional;method AT-POS(\SELF: $i) is rw { say SELF.VAR.^name, self.VAR.^name; SELF.substr-rw($i, 1) } };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 14:45
camelia ScalarStr+{StrIdx}
Cannot modify an immutable Str+{StrIdx} (asd)
in block <unit> at <tmp> line 1

a
Str+{StrIdx}Str+{StrIdx}
ZzZombo m: role StrIdx { also does Positional;method AT-POS($SELF: $i) is rw { $SELF.substr-rw($i, 1) } };my $s = 'asd' does StrIdx;say $s[0];$s[0] = 'b';say $s 14:47
camelia a
Cannot assign to a readonly variable or a value
in block <unit> at <tmp> line 1
ZzZombo lizmat: so anyway to make this work? Looks like a bug to me, to be honest. 14:54
Xliff_ hythm: Pull the latest code, I've made those types of parameters optional. They are only there as out params, anyways. So now: $sc.get-color($state) will return a GdkRGBA value, which is a CStruct. 15:08
tellable6 Xliff_, I'll pass your message to hythm
Geth doc: b906d93374 | (Stoned Elipot)++ | doc/Language/traps.pod6
fix example output style
15:18
lizmat tobs: yes, substr-rw must have a container as the invocant, since strings are immutable in Raku 16:49
Kaiepi releasable6, status 17:44
releasable6 Kaiepi, Next release will happen when it's ready. There are no known blockers. 248 out of 478 commits logged (⚠ 9 warnings)
Kaiepi, Details: gist.github.com/71699a68e787a72cc8...c967e71a6c
cpan-raku New module released to CPAN! Gnome::Gdk3 (0.14.13) by 03MARTIMM 18:51
lizmat ZzZombo: it is indeed a bug, checking a fix now 21:45
ZzZombo: you can work around it by also defining an ASSIGN-POS method 21:46
lizmat .tell ZzZombo github.com/rakudo/rakudo/commit/ed8f5141fe 21:57
tellable6 lizmat, I'll pass your message to ZzZombo
lizmat .tell tobs github.com/rakudo/rakudo/commit/ed8f5141fe
tellable6 lizmat, I'll pass your message to tobs
tobs lizmat++, will try it out tomorrow
Xliff_ lizmat++: What's the difference between self and SELF? 23:04
Xliff_ m: my $a = "Hi!"; $a ~~ s«Hi!»«Bye!»; $a.say 23:58
camelia 5===SORRY!5===
Unrecognized regex metacharacter ! (must be quoted to match literally)
at <tmp>:1
------> 3my $a = "Hi!"; $a ~~ s«Hi7⏏5!»«Bye!»; $a.say
Missing infix inside hyper
at <tmp>:1
------> 3my $a = "Hi!"; $a ~~ s«Hi…
Xliff_ m: my $a = "Hi!"; $a ~~ s«Hi\!»«Bye\!»; $a.say 23:59
camelia 5===SORRY!5=== Error while compiling <tmp>
Missing infix inside hyper
at <tmp>:1
------> 3my $a = "Hi!"; $a ~~ s«Hi\!»«7⏏5Bye\!»; $a.say
expecting any of:
infix
infix stopper
Xliff_ m: my $a = "Hi!"; $a ~~ s[Hi\!][Bye\!]; $a.say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of brackets around replacement; in Perl 6 please use assignment syntax
at <tmp>:1
------> 3my $a = "Hi!"; $a ~~ s[Hi\!]7⏏5[Bye\!]; $a.say
Xliff_ m: my $a = "Hi!"; $a ~~ s[Hi\!] = "Bye!"; $a.say
camelia Bye!