»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:01 stmuk_ left 00:07 w_richard_w joined 00:08 enheh_ left, enheh_ joined 00:15 hythm_ joined 00:20 kurahaupo_ joined, hythm_ left 00:22 kurahaupo left 00:28 comborico1611 left, skids joined 00:34 stmuk_ joined 00:36 stmuk left 00:41 raschipi joined 00:43 wamba left
lookatme :) 00:53
00:59 markong left 01:17 molaf left 01:18 raschipi left 01:26 llfourn left 01:29 molaf joined 01:34 epony left 01:39 Kaiepi left, Kaiepi joined 01:40 MasterDuke joined 01:45 ilbot3 left 01:56 ilbot3 joined, ChanServ sets mode: +v ilbot3, pilne left 01:57 Zoffix left 02:01 aborazmeh joined, aborazmeh left, aborazmeh joined 02:17 _28_ria left 02:53 hythm_ joined
hythm_ p6: my %h1 = a => { b => True }, c => { d => True }, e => { f => True, g => True }; my %h2 = c => { d => False }, h => { i => True }, e => { f => False }; my %h3 = %h2 »=» %h1; say %h3; 02:54
camelia {c => {d => True}, e => {f => True}, h => {i => (Any)}}
hythm_ is it possible to merge two hashes, %h1 and %h2, combining the keys recursively, with %h2 values overwriting %h1 if keys are same?,,, for the above output, %h3 should be: %h3 a => { b => True }, c => { d => False }, e => f => False, g => True }, h => { i => True } 02:57
03:01 aborazmeh left
MasterDuke m: my %h1 = a => { b => True }, c => { d => True }, e => { f => True, g => True }; my %h2 = c => { d => False }, h => { i => True }, e => { f => False }; my %h3 = %h1, %h2; say %h3 03:02
camelia {a => {b => True}, c => {d => False}, e => {f => False}, h => {i => True}}
MasterDuke hm. that loses 'g' 03:03
lookatme It has a inner hash 03:04
hythm_ wondering if hyper operator can help in this case, I tried a few ways but I could not make it work 03:05
03:07 _28_ria joined 03:12 _28_ria left 03:19 mcmillhj joined 03:22 psychoslave joined 03:24 mcmillhj left 03:40 MasterDuke left 03:41 Qwerasd joined, hythm_ left
Qwerasd Hey, is there some kind of wizardry that would allow me to see what parameters a callable accepts? 03:42
Like programmatically.
03:44 eliasr left
Qwerasd Nvm got it, Block.signature 03:57
04:09 skids left 04:11 AlexDaniel is now known as AlexDaniel``, AlexDaniel`` is now known as AlexDaniel 04:18 AlexDaniel`` joined 04:22 ryn1x left 04:30 psychoslave left 04:37 psychoslave joined 04:50 curan joined 05:10 jmerelo joined 05:11 curan left 05:12 curan joined
Geth doc: 224a0bcf01 | (JJ Merelo)++ | doc/Language/testing.pod6
Completes preamble to fix compilation errors

Fixes #2055
05:15
synopsebot Link: doc.perl6.org/language/testing
05:21 wamba joined 05:23 wamba left 05:24 sauvin joined, wamba joined 05:54 domidumont joined 05:55 troys left
Geth doc: bc8b41d69d | (JJ Merelo)++ | doc/Language/variables.pod6
Adds info on possible distro names closes #2054
05:56
doc: b0ac6c8771 | (JJ Merelo)++ | doc/Language/variables.pod6
Changed anchors and added a few missing ones
synopsebot Link: doc.perl6.org/language/variables
jmerelo squashable6: status 05:57
squashable6 jmerelo, Next SQUASHathon in 7 days and ≈4 hours (2018-06-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
05:58 domidumont left 05:59 domidumont joined 06:02 shareable6 left 06:14 HaraldJoerg joined 06:22 jmerelo left 06:23 wamba left 06:35 stmuk joined 06:38 stmuk_ left 06:39 darutoko joined 06:49 robertle joined 06:50 psychoslave left 06:51 psychoslave joined 06:56 xtreak joined 06:57 wamba joined 07:01 rindolf joined 07:03 jmerelo joined
jmerelo o/ 07:03
07:05 wamba left 07:08 wamba joined 07:13 epony joined 07:28 Guest14918 left, SHODAN joined, DarthGandalf joined
jmerelo Another SO question with a problem I bumped into today stackoverflow.com/questions/505243...d-identity 08:06
m: say (1,1) === (1,1)
camelia False
jmerelo Related to that above, but also to how set membership works.
08:09 pmmmm left
donpdonp my $a = (1,1); $a === $a => true 08:09
=== is more about pointer equality
(1,1) eqv (1,1) => true
note I know little of what I speak, but I had the same sort of structural comparison question (two Bufs) and solved it with eqv
08:09 stmuk_ joined
jmerelo donpdonp: that seems to be the case; the problem is that set membership seems to be using that instead of eqv or == 08:10
So the strange behavior I point to in the SO question occurs...
08:12 stmuk left, wamba left 08:13 stmuk joined 08:15 stmuk_ left
Geth doc: 169d2127db | (JJ Merelo)++ | doc/Language/math.pod6
Adds exact Rational arithmetic
08:15
doc: 34ec3dcb0c | (JJ Merelo)++ | doc/Language/math.pod6
Adds approximate equality, refs #114
synopsebot Link: doc.perl6.org/language/math
doc: d670de3250 | (JJ Merelo)++ | 2 files
Adds content to the sequences section

Also learns new words. Refs #114
08:21 xtreak left 08:30 eiro left
Qwerasd How do I print an error in a catch block? 08:39
nvm 08:40
08:42 kurahaupo_ is now known as kurahaupo
jmerelo Qwerasd: inside a catch block? 08:44
Qwerasd Figured it out that it was placed in $_ rather than $!
jmerelo Qwerasd: right. It's contextualized, so you can access it via $_ or using .say, for instance. 08:45
08:46 andrzejku joined 08:48 andrzejku_ left 08:54 andrzejku_ joined 08:56 ChoHag left
Qwerasd How can I remove an element from an array when looping through it with a for loop? 08:56
08:57 ChoHag joined, andrzejku left 09:02 wamba joined
lookatme Qwerasd, using slice 09:04
Qwerasd How do I do that with like for @array -> $elem {}
lookatme sorry, splice 09:05
Qwerasd, no, it would not work in that form
Qwerasd How would I do that though? I don't have the index.
lookatme Using while I think
Qwerasd I don't really want to use the long c-style for loop if I don't have to.
lookatme It's UB in Perl 6 that remove element from Array you are iterating 09:07
Qwerasd UB?
lookatme yeah, I think
undefined behavior, you must heard it from C 09:08
AlexDaniel Qwerasd: how big is the array? Can't you just use grep? 09:12
or map
Qwerasd I just bit the bullet and used loop(;;) 09:13
AlexDaniel right, that will work
lizmat Qwerasd: what's wrong with just 'loop { }' ?
Qwerasd loop(;;) and in loop(my $i = 0; $i < @arr.elems; $i++) 09:14
as in*
09:20 Guest9472 is now known as Altreus, Altreus is now known as Guest72158 09:32 Qwerasd left, Guest72158 is now known as Altreus 09:33 domidumont left 09:40 eliasr joined
buggable New CPAN upload: Test-Declare-0.0.2.tar.gz by DARRENF modules.perl6.org/dist/Test::Declar...an:DARRENF 09:43
09:48 w_richard_w left 10:10 wamba left 10:12 ZzZombo joined 10:14 ryn1x joined 10:18 ZzZombo left
Geth doc: e29fe251a2 | (JJ Merelo)++ | 2 files
Eliminates link to code

Rewrites paragraph to show clearly the nature of these values. Closes #2054.
Also reflows that paragraph (ref #2056) (and some others) and makes some typographic changes, changing to periods and capitalizing where needed.
10:33
10:37 ZzZombo joined 10:44 wamba joined
tbrowder_ m: Uni.new(x2000).NFC.list.base(16) 10:46
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
x2000 used at line 1
tbrowder_ m: Uni.new(0x2000).NFC.list.base(16) 10:47
camelia No such method 'base' for invocant of type 'Seq'. Did you mean any of these?
Hash
asec
hash
race

in block <unit> at <tmp> line 1
tbrowder_ m: say Uni.new(0x2000).NFC.list.base(16) 10:49
camelia No such method 'base' for invocant of type 'Seq'. Did you mean any of these?
Hash
asec
hash
race

in block <unit> at <tmp> line 1
tbrowder_ m: say Uni.new(0x2000).NFC.list 10:50
camelia (8194)
geekosaur m: say Uni.new(0x2000).NFC.list>>.base(16)
camelia (2002)
tbrowder_ m: say Uni.new(0x2000).NFC.list.map(*.base(16)); 10:53
camelia (2002)
tbrowder_ m: say Uni.new(0x2000 .. 0x200A).NFC.list.map(*.base(16)); 10:55
camelia (2002 2003 2002 2003 2004 2005 2006 2007 2008 2009 200A)
tbrowder_ say Uni.new(0x2000) 10:57
evalable6 Uni:0x<2000>
11:07 markong joined 11:11 skids joined
Geth doc/master: 4 commits pushed by (JJ Merelo)++ 11:15
11:18 domidumont joined 11:19 squashable6 left 11:20 squashable6 joined, ChanServ sets mode: +v squashable6 11:21 wamba left 11:36 skids left 11:42 [Sno] joined, natrys joined 11:44 itaylor57 joined, sno left
Geth doc: e3182d93cf | (JJ Merelo)++ | 2 files
Fleshes out system file
11:49
11:49 benjikun left 11:51 benjikun joined 11:54 jmerelo left 11:58 mcmillhj joined 12:01 psychoslave left 12:14 mcmillhj left 12:26 jmerelo joined 12:30 SteffanW joined 12:35 margeas joined 12:36 markong left
jmerelo m: say $*ARGFILES.filename; 12:50
camelia No such method 'filename' for invocant of type 'IO::ArgFiles'
in block <unit> at <tmp> line 1
12:51 psychoslave_ joined, markong joined
moritz m: $*AGFILES.^methods(:local) 12:51
camelia ( no output )
moritz m: say $*AGFILES.^methods(:local) 12:52
camelia (DESTROY AT-POS AT-KEY defined handled Capture Int Num Numeric Set SetHash Bag BagHash Mix MixHash mess sink self CALL-ME FALLBACK STORE new Bool Str gist perl exception backtrace BUILDALL)
moritz m: say $*AGFILES.^name
camelia Failure
moritz ARG
m: say $*A$GFILES.^name
camelia 5===SORRY!5=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> 3say $*A7⏏5$GFILES.^name
expecting any of:
infix
infix stopper
postfix
statement end
statement mod…
jmerelo moritz: yes :-)
jkramer :D
moritz m: say $*ARGFILES.^name
camelia IO::ArgFiles
moritz m: say $*ARGFILES.^methods(:local)
camelia ()
moritz m: say $*ARGFILES.^methods
camelia (write on-switch lines encoding IO t slurp-rest seek path out-buffer opened handles getc flush words split slurp readchars put printf print-nl open gist print nl-in perl native-descriptor eof comb DESTROY tell say read next-handle new get chomp lock M…
12:52 margeas left
moritz at least I noticed that I was confused :) 12:53
jmerelo Related to this: github.com/perl6/doc/issues/2058
It's probably path...
Instead of filename, I guess...
m: say $*ARGFILES.path; 12:54
camelia IO::Special.new("<STDIN>")
Geth doc: 4ae64b89f2 | (JJ Merelo)++ | doc/Language/5to6-perlvar.pod6
:zap: filename → path closes #2058
12:56
synopsebot Link: doc.perl6.org/language/5to6-perlvar
13:01 jmerelo left 13:04 curan left 13:05 MilkmanDan left, margeas joined 13:06 MilkmanDan joined, markong left 13:18 skids joined
buggable New CPAN upload: Net-servent-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz 13:23
13:25 ChoHag left
jkramer Inside a class that is an Array, can I use shortcuts for self like $.foo etc, but for accessing elements of the array? $.[0] doesn't seem to work 13:52
timotimo you could give the invocant a shorter name by putting it into the signature 13:53
13:57 itaipu joined 14:00 lucasb joined
lucasb I wonder if this lines were removed: github.com/rakudo/rakudo/blob/mast...2147-L2150 14:15
then $.[5] would be possible
lizmat and what would that mean ? 14:17
lucasb same as self.[5] 14:18
inside Positional classes
lizmat hmmm... 14:19
jkramer Hmm I'll just use self for now :) 14:20
timotimo m: class Test is Array { method test(\S: $a) { S[$a] } }; Test.new(1, 2, 3).test(1) 14:21
camelia ( no output )
timotimo m: class Test is Array { method test(\S: $a) { S[$a] } }; say Test.new(1, 2, 3).test(1)
camelia 2
timotimo jkramer: does that make things better?
jkramer timotimo: I don't really need to save those bytes :) I just assumed $.[0] would work since .[0] with $_ does and I was curious 14:23
timotimo m: class Test is Array { method test($_: $a) { .[$a] } }; say Test.new(1, 2, 3).test(1)
camelia 2
timotimo you can have it your way :D
jkramer Unrelated question: are there words for the directions of diagonals? Like / (top-right to bottom-left) and \ (top-left to bottom-right)
lucasb yes! I compiled a list of those aliases! haha 14:24
just a sec
diagonal names: 14:26
[\] main, major, principal, primary, leading
[/] anti, minor, counter, secondary, trailing
jkramer Ha, wonderful :D Thanks!
lucasb naming things is hard
14:29 wamba joined 14:37 AlexDaniel` left 14:41 ZzZombo left 14:44 mahafyi joined 14:55 Luneburg joined
Luneburg Does perl6 have a Fibonacci function in the standard library? 14:55
b2gills .tell Qwerasd `for @arr.kv -> $i, $_ { @arr.splice($i,1) when 5 }`
yoleaux b2gills: I'll pass your message to Qwerasd.
b2gills m: .say for 1, 1, * + * ... *; # no need, it is easy to create a Fibonacci sequence 14:56
camelia (timeout)1
1
2
3
5
8
13
21
34
55
89
144
233
377
610
987
1597
2584
4181
6765
10946
17711
28657
46368
75025
121393
196418
317811
514229
832040
1346269
2178309
3524578
5702887
9227465
14:57
jkramer Is there a variant of zip/Z that works on partials? So when one lists is shorter than the other it still continues
b2gills jkramer: roundrobin
Luneburg b2gills: Thanks
jkramer b2gills: Sweet, thanks! 14:58
15:06 margeas is now known as markong, wamba left 15:07 Azry joined 15:14 SteffanW left 15:21 robertle left 15:24 rindolf left
Luneburg m: my $sequence = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGCC";loop (my $i = 0; $i <= $sequence.chars; $i++) { say $sequence[$i];} 15:25
camelia AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGCC
Index out of range. Is: 1, should be in 0..0
in block <unit> at <tmp> line 1
Luneburg Is there any way to loop through a string? 15:26
geekosaur you want substr, not indexing
a Str is a single entity, not a fake list
timotimo what you really want is .comb, it looks like
geekosaur or that, yes
Luneburg geekosaur: Thanks, what does .comb actually do though? I can see it adds spacing between the characters? 15:28
jkramer Without arguments it returns a list of the single characters 15:29
geekosaur that's just how a list is rendered by default. it explodes the Str into a list of characters
Luneburg Thanks ;) 15:30
geekosaur you can use .perl to see what the value actually looks like, or use "dd" instead of "say" to get even more internal detail (usually too much unless you're debugging) 15:31
m: say "abc".comb.perl
camelia ("a", "b", "c").Seq
15:31 mahafyi left, jmerelo joined
geekosaur (Seq is a read-only, one-shot list; saves memory and garbage collection time for most ephemeral lists) 15:32
b2gills Luneburg: rather than `loop (my $i = 0; $i <= $sequence.chars; $i++) {…}` use `for 0..$sequence.chars -> $i {…}` or better yet in this case `for $sequence.comb { say $_ }` 15:34
15:34 domidumont left
timotimo m: say "abcdefghijklmnop".comb(3).perl 15:35
camelia ("abc", "def", "ghi", "jkl", "mno", "p").Seq
timotimo also a very useful feature of comb
b2gills Basically you should almost never use `loop (;;)`, as you are probably doing something that is easier done another way.
15:42 zacts joined 15:43 margeas joined 15:45 sjn joined 15:46 markong left, raschipi joined 15:58 kst joined 15:59 psychoslave_ left 16:15 cosimo left 16:21 ChoHag joined 16:25 Kaiepi left, Kaiepi joined 16:27 Kaiepi left 16:28 Kaiepi joined, Kaiepi left 16:29 Kaiepi joined, Luneburg left 16:51 raynold joined 16:59 pilne joined 17:08 markong joined 17:09 rindolf joined 17:10 margeas left
Geth doc/master: 5 commits pushed by (JJ Merelo)++ 17:14
doc: 4a162095c8 | (JJ Merelo)++ | 3 files
Finishes first full version of the system interaction page.

Refs #114. It's rather brief and not (never) perfect, but it's a good guide on how to interact with the system. I'll check this page now and move on to the next one.
17:15
17:18 markong left 17:19 margeas joined 17:20 domidumont joined
jmerelo releasable6: status 17:21
releasable6 jmerelo, Next release in ≈22 days and ≈1 hour. 1 blocker. 0 out of 19 commits logged (⚠ 9 warnings)
jmerelo, Details: gist.github.com/7729c6305faa4a4dea...fc1f7ff713
jmerelo So we have a new version... 17:22
17:23 sjoshi joined 17:25 athenot left 17:26 athenot joined 17:28 ChoHag left
El_Che mm 17:30
didn't know that
17:32 natrys left
El_Che let's spin some packages on travis and see how it goes :) 17:33
17:34 enheh_ left 17:35 enheh_ joined 17:38 sjoshi left 17:39 sjoshi joined, ChoHag joined 17:46 markong joined
lucasb whenever you want to call methods on a new anonymous state var, you have to wrap it in parentheses, right? like ($).foo, (@).bar and (%).baz 17:47
because otherwise it would be interpreted as calls to the object/class the code is inside: $.foo, @.bar, %.baz 17:48
17:48 margeas left
jmerelo lucasb: say what? 17:49
raschipi I didn't see any other idiom to do that, you get to create one.
lucasb *except* when the call is a subscripts, like @.[...] or %.{...}, %.<...>, in this case you are calling on the anonymous state var
jmerelo lucasb: is that documented?
lucasb jmerelo: which part? :) 17:50
El_Che why would you use anonymous vars if you reference the later? Is there an added value there?
jmerelo lucasb: well, pretty much everything...
lucasb ok, let me conclude, then I go back to the raised issues :D 17:51
What I'm suggesting is that syntax like @.[42] %.{'key'}, %.<key> be changed to mean access to the current object/class the code is within 17:52
m: $.foo
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable $.foo used where no 'self' is available
at <tmp>:1
------> 3$.foo7⏏5<EOL>
expecting any of:
term
jmerelo lucasb: $.foo is syntactic sugar for self.foo 17:53
lucasb obviously, *if* the objects are of the type Associative and Positional, etc.
jmerelo that's probably the reason why you have to put the () around, to disambiguate
lucasb jmerelo: you are correct. the same way @.foo and %.foo also are
jmerelo: correct. and I want that to stay the same 17:54
in things like @.[42] %.{'key'}, %.<key>, it should be required to put () around too!
(@).[42] (%).{'key'}, (%).<key> if you want to access the anonymous state var, otherwise let this syntax mean access to the current self object 17:55
jmerelo lucasb: so what you are saying is try to extend that same criterium to other "bracketing" things, so that $. == self whenever possible. 17:56
lucasb yes, exactly :)
jmerelo so @.[42] would be self[42] if that makes any sense.
lucasb except that there's a problem with "$." being the old P5 special var, so I took it out of the examples 17:57
jmerelo lucasb: OK, it's not a documentation problem then :-), although it might be good if you open an issue with some example where disambiguation needs to be done.
lucasb: old p5 special vars are not really a problem.
lucasb: maybe you should open a discussion in the rakudo repo, after checking what the specification says about that. If it's not specced, it might be reasonably argued. 17:58
18:01 Zoffix joined
Zoffix AlexDaniel++ samcv++ # release 18:01
jmerelo AlexDaniel++ samcv++ and the rest of the team
Zoffix lucasb: why add a gazillion variants of some cryptic syntax? Especially one that's close to anon vars. 18:02
Reminds me of a joke I heard on Twitter: "Perl 6 is what happens when the answer to every bikeshedding session is: 'Let's do both!'"
jmerelo Zoffix: now that you mention twitter... twitter.com/jjmerelo/status/1000069722224852992 18:03
Zoffix jmerelo: what am I looking at?
jmerelo Zoffix: the official extraofficial announcement of perl 6 2018.05 18:04
lucasb Zoffix: my suggestion would make things more orthogonal than they currently are 18:05
Zoffix lucasb: and especially one that's close to attribute syntax that isn't entirely trivial for newcomers to understand. It's quite a lot of mental processing required to discern $.<foo> between anon state var, attribute access or just a method call on self.
jmerelo Zoffix: I mean, if you're looking at that Twitter URL.
Zoffix I don't know why folks use $.foo syntax for non-attribute method calls. Seems like a good way to confuse the reader
lucasb well, maybe folks have a usecase, since self.foo is different from $.foo :) 18:07
They are contextualizers, right? $.foo is $(self.foo), @.foo is @(self.foo), %.foo is %(self.foo) 18:08
m: class { method foo { 1,2,3 }; method bar { self.foo } }.bar.perl.say
camelia (1, 2, 3)
lucasb m: class { method foo { 1,2,3 }; method bar { $.foo } }.bar.perl.say
camelia $(1, 2, 3)
Zoffix lucasb: because it's not just %.<foo>. It's also %».<foo>, %».+<foo>, %».*, %».+, %.&bar and dozens more variants. Which of those would mean `self` and which would mean a static anon? Or will you now force all static var use to use parens? 18:09
18:10 sjoshi left, markong left
Zoffix In fact, when $.+foo syntax was being argued for, I said, no don't add it, because then we'll start going insane. And here we are, proposing more things. And how many people used $.+foo syntax? One? 18:10
lucasb I'm suggesting only method-ish calls
Zoffix lucasb: why the omission then?
This is all special casing: %.<foo> works, but only (as you earlier said) `self` is an Associate and now only with "method-ish" calls, which I don't even know the definition of. 18:11
lucasb currently, %.<foo> always means (%).<foo> 18:12
currently, $.foo always means $(self.foo)
I'm not suggesting *if and only if* classes are Positional, Associative, etc. 18:13
El_Che "it's not just %.<foo>. It'sit's not just %.<foo>. It's also %».<foo>, %».+<foo>, %».*, %».+, %.&bar and dozens more variants" <-- that's what I meant with a big language some days ago :)
lucasb The syntax should be invariant
Zoffix mst: would you be able to add a link to our second logger to the /topic of #perl6-dev #moarvm #perl6-toolchain : colabti.org/irclogger/irclogger_logs/perl6 or give one of the non-op regulars ops so they could do it themselves? 18:14
uhh 18:15
18:15 markong joined
mst it ... seems to be in /topic ? 18:15
Zoffix mst: I think it's three different links actually: colabti.org/irclogger/irclogger_logs/perl6-dev colabti.org/irclogger/irclogger_logs/moarvm and colabti.org/irclogger/irclogger_log...-toolchain but the logger people want us to add to the topic before they start logging
AlexDaniel: right?
mst: only in this channel, but not in #perl6-dev, #moarvm, and #perl6-toolchain 18:16
mst ah
18:16 ChanServ sets mode: -v ilogger2
AlexDaniel correct, this channel is fine 18:17
mst Zoffix: right, you now have access to all four to do '/msg chanserv op' 18:18
Zoffix mst++ thanks
AlexDaniel mst++
mst and I stole #moarvm from diakopter and gave jnthn perms there too
if anybody wants anybody else adding, just shout
actually 18:19
mst adds AlexDaniel to all four
AlexDaniel thanks
mst AlexDaniel: well volunteered, my main objective here is that if your bots go nuts you can kick/ban/unban them etc.
samcv thanks for the well wishing of the release :) 18:20
Zoffix u: butterfly 18:22
unicodable6 Zoffix, U+1F98B BUTTERFLY [So] (🦋)
AlexDaniel u: abnteh
unicodable6 AlexDaniel, Found nothing!
AlexDaniel hm, was it always that fast? 18:23
18:23 ChanServ sets mode: +o Zoffix
Zoffix »ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! 🦋
Zoffix sets mode: -o Zoffix
Zoffix (just added 🦋 after "unicode is our friend") 18:23
Did it work? Doesn't show up right in the irc logs (and I don't see those chairs in my terminal) 18:24
I mean chars
But I don't see any chairs either
AlexDaniel shows up correctly: colabti.org/irclogger/irclogger_log...05-25#l494
moritz looks fine here
Zoffix cool 18:25
18:25 sauvin left
AlexDaniel but yeah, not here: irclog.perlgeek.de/perl6/2018-05-25#i_16206699 18:25
18:27 espadrine_ joined 18:30 Kaiepi left, Kaiepi joined
skids ⑁⑁⑁⑁ 18:30
raschipi u: ⑁ 18:31
unicodable6 raschipi, U+2441 OCR CHAIR [So] (⑁)
18:32 Azry left, Azry joined, kurahaupo left 18:34 Zoffix left, kurahaupo joined
Geth doc: 6c41a4b120 | (JJ Merelo)++ | 2 files
Start rewriting of the hashmap language page

Follows #1682 advice of moving the top-heavy part of the Hash type to this page. That part has been rewritten in similarity to Array, by making references to its general behavior using parallelisms between them. This also goes towards fulfillment of the roadmap #114
18:35
18:44 Azry left, Azry joined 18:47 ilogger2 joined, ChanServ sets mode: +v ilogger2
Geth doc: a484eb9149 | (JJ Merelo)++ | doc/Language/hashmap.pod6
Reflows and adds maps info where necessary

Since this document now talks about hashes *and* maps, some sentences must include them. Refs #1682.
18:51
synopsebot Link: doc.perl6.org/language/hashmap
18:54 ilogger2 joined, ChanServ sets mode: +v ilogger2
moritz IRC logging is a huge privacy nightmare; I might have to stop doing that if the GDPR really hits 18:57
masak :( 18:59
moritz: it strikes me that I've had immense use of the IRC logs over the years. mille grazie 19:00
moritz masak: my pleasure. So far I don't have concrete plans to shut them down, but... 19:01
there are so many unsolved problems 19:02
* GDPR requires explicit consent before processing data. Getting consent from every IRC user is simply impossible
* It's not clear if nick names automatically consistitute personally identifiable information
* It's not clear to me how to process requests for data removal without destroying the whole context of a conversation 19:03
masak right
moritz on the plus side, I'm not logging any IP addresses 19:04
masak are you allowed to mark in some way if a conversation has had messages removed?
moritz I'm pretty sure I do
so I could replace all removed messages with nickname (removed) and line (removed) 19:05
AlexDaniel I wonder what Matrix folks figured out regarding GDPR and their freenode bridge
moritz it gets really murky if somebody has messages (partially) bounced off of bots
AlexDaniel but through that bridge you can't get messages from before you joined the channel
raschipi I'm not logging any IP addresses --> You're required to do that by Brazillian law, btw 19:06
jmerelo The GDPR could potentially affect even bots
If you somehow log whoever is asking and what they asked... 19:07
AlexDaniel rrrrrrrrrrrrrrrrrrriight
moritz raschipi: how charming :-)
AlexDaniel quotable6 actually caches irc logs…
moritz fwiw on the webserver side I delete the last octet of IPs in the logs 19:08
raschipi But Freenode is the one required, not people that archive the messages. 19:09
moritz (and the last 4 bytes for IPv6 addresses)
masak .oO( we're letting you know that your processing^Wprivacy is important to us )
19:10 comborico1611 joined
raschipi Anonymity is forbidden by the constitution in Brazil. 19:10
moritz is that why they fought with WhatsApp? 19:11
comborico1611 I find it sadly amusing that nations call themselves republics when they don't even pretend to be. At least in America, we pretend to be a republic.
raschipi Well, not specifically using the Constitution directly, but the laws implement the constitutional mandate saying they need to point which IP adress said what and when. 19:12
With the IP number and the timestamp, after a WHOIS, you can go to the ASN and they need to point which customer it came from. 19:13
s/ASN/AS/ 19:14
moritz ... unless there's a NAT inbetween
raschipi Well, if the ISP keeps the NAT, they need to keep records. If the client has it, that will narrow the investigation to a very small area. And it doesn't deal with a VPN and much less Tor. 19:21
But most people aren't that sofisticated and they regularly inprison people for what they said on the internet. 19:23
translate.google.com/translate?sl=...policia%2F 19:25
At least they don't jail people for their political opinions like the UK does.
lucasb raschipi: hehe, daora topar com outros brasileiros aqui. que legal que vc tbm curte P6 :) 19:30
raschipi Outro zuca é o SmokeMachine 19:31
SmokeMachine \o/ 19:32
19:37 |Sno| joined 19:40 wamba joined 19:59 MasterDuke joined
ktown m: sub got ( $x where ^10) { say $x.perl } ; got "1" ; 20:14
camelia "1"
ktown m: sub got ( $x where ^10) { say $x.perl } ; got "2" ;
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
ktown m: sub got ( $x where ^10) { dd $x } ; got "1" ; 20:15
camelia Str $x = "1"
ktown m: sub got ( $x where ^10) { dd $x } ; got "2" ;
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
sjn m: sub got ( $x where ^10) { dd $x } ; got(2) ; 20:21
camelia Int $x = 2
ktown m: sub got ( $x where ^10) { dd $x } ; got "0" ;
camelia Str $x = "0"
ktown m: sub got ( $x where ^10) { dd $x } ; got 11 ;
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Int (11)
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
20:27 Herby_ joined
Herby_ \o 20:27
o/ 20:31
ktown m: sub got ( $x where ^10) { dd $x } ; got split(/\,/,"1,1")[0] ; 20:33
camelia Str $x = "1"
ktown m: sub got ( $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0] ;
camelia Constraint type check failed in binding to parameter '$x'; expected anonymous constraint to be met but got Str ("2")
in sub got at <tmp> line 1
in block <unit> at <tmp> line 1
ktown is this odd? 20:34
timotimo m: say "9" ~~ ^10 20:37
camelia False
timotimo m: say 9 ~~ ^10
camelia True
timotimo i don't find it terribly odd
you can have a coercive type constraint in the signature, though
m: sub got ( Int() $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0] ;
camelia 2
ktown m: say "9" == ^10 20:38
camelia False
timotimo oh, i don't think i saw correctly
ktown m: say 9 == ^10
camelia False
timotimo say "1" ~~ ^10
evalable6 True
timotimo yeah, that is kind of weird
say "2" ~~ ^10
evalable6 False
timotimo s: ^10, "ACCEPTS", ("2")
SourceBaby timotimo, Something's wrong: ␤ERR: Cannot resolve caller sourcery(Range, Str, Str); none of these signatures match:␤ ($thing, Str:D $method, Capture $c)␤ ($thing, Str:D $method)␤ (&code)␤ (&code, Capture $c)␤ in block <unit> at -e line 6␤␤
timotimo s: ^10, "ACCEPTS", \("2")
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/847d...e.pm6#L429
lucasb not "1" before 0 20:39
oops, sorry
ktown in the signature, the right side is an int
oooh, where is eq not ==
timotimo no, where is ~~
lucasb m: say not "1" after 10 20:40
camelia True
lucasb m: say not "2" after 10
camelia False
timotimo m: say "01234567890".comb.grep(^6)
camelia (0 1 2 3 4 5 0)
timotimo is it lexicographical sorting that messes this up? 20:41
m: say "01234567890".comb.grep(45..69)
camelia (5 6)
timotimo looks like
that looks a lot like a trap
ktown i have seen a few example that use $x where ^10 to check an int 0..10, but in a case where I split a string and pass to method it's not happy 20:43
timotimo yeah, it's doing lexicon comparison 20:44
the numbers have to come after 0 but before 10 in the lexicon, but 10 comes before 2
so the only numbers that would fit in ^10 would be 0 and 1 20:45
lucasb github.com/rakudo/rakudo/blob/mast...#L498-L504
ktown in p5 it was always clear the operater coerces the arguments 20:46
lucasb before and after always do str comparison
should they have different multis for doing different comparisons?
timotimo aren't before and after DWIM comparisons? 20:47
leg and friends always do str comparison
lucasb well, 'cmp' is Stringy
timotimo s: &infix:<cmp>, \(1, 2)
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/847d...er.pm6#L46
lucasb oops, sorry, mixed with Perl 5 20:48
timotimo i was about to say
lucasb :)
I think this multi get selected for this case: github.com/rakudo/rakudo/blob/mast...m6#L10-L13 20:50
and so, ends up being Stringy comparison 20:51
timotimo s: &infix:<cmp>, \(1, "2")
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/847d...er.pm6#L15
timotimo s: &infix:<cmp>, \("2", 1)
SourceBaby timotimo, Sauce is at github.com/rakudo/rakudo/blob/847d...er.pm6#L22
20:51 Kaiepi joined
ktown is there a numberic version of where in the signature? 20:51
timotimo actually, the two below it, but it comes out the same way
you can use the coercion type i showed above 20:52
m: sub got ( Int() $x where ^10) { dd $x } ; got split(/\,/,"2,1")[0];
camelia 2
timotimo this one
ktown timotimo: yes but that is not obvious from the docs on signatures or the examples 20:53
timotimo "where" uses smartmatch semantics, so you have to search for that 20:54
if there isn't a link from "where" to "smartmatch" that's worth an issue in the issue tracker
ktown reads docs.perl6.org/type/Signature again 20:57
timotimo The where clause doesn't need to be a code block, anything on the right of the where-clause will be used to smart-match the argument against it. So you can also write:
that's where the link is
docs.perl6.org/language/operators#infix_~~ 20:58
though i'd even say it should link to ACCEPTS instead?
huh
that only handles ranges overlapping
that seems like a major oversight
When smart-matching a Range of integers with a Cool (string) the ACCEPTS methods exploits the before and after operators in order to check that the Cool value is overlapping the range: 20:59
ktown down around the "sub can-turn-into" stuff
timotimo not sure what part of that is relevant here 21:06
ktown in javacript you need parseInt because there is no hint for the coercion. p5 never had that issue. But here I passed a string to an Int comparison and got an error sometimes (0 and 1 are special) 21:09
timotimo smartmatch is not int comparison, it's dwim comparison 21:10
ktown yes...
Kaiepi i love how you can pretty well do whatever you want with roles hastebin.com/cezazuyeja.pl
timotimo if you want it a different way, you can also have "where 0 <= * < 10
" in the signature 21:11
that will be a numeric comparison and that will work as you expect it to
ktown yah, that would be the note to add to the docs to force a numeric range comparison the "where ^10" or "where 0..10" did not do what I expected 21:13
I always thing "10" is a string but 10 is an int but in this case it's not 21:15
*think 21:16
timotimo it is surprising to have string comparison there, yeah
21:17 raschipi joined, Herby_ left
ktown m: 10 ~~ "10" 21:20
camelia ( no output )
ktown m: say 10 ~~ "10"
camelia True
ktown i'm not completely (just mostly) crazy 21:21
raschipi I don't see why Numeric.ACCEPTS or Range.ACCEPTS can't convert strings to numbers before testing them. 21:23
21:25 ChoHag joined
raschipi They know their own type... 21:31
lucasb Maybe infix:<cmp>(Real, Any) should do numeric comparison and infix:<cmp>(Any, Real) should do string comparison. IOW, do different things depending on the type of the first operand. 21:37
they way they are now, both do string comparison, regardless of the order of the operands
*the way 21:38
raschipi But ~~ doesn't use cmp, does it?
lucasb iiuc, in this case it does 21:39
raschipi The documentation says they first coerce the arguments to numeric, then do numeric comparisson. If they just call cmp between the operands, that should be pointed out, I think. 21:41
Then what cmp does is another question, currently it prefers string comparisson as was pointed above. Is it supposed to be a transitive operator? 21:42
lucasb do you mean transitive or symmetric? :) 21:46
raschipi transitive too
Geth doc: d0fbecd26c | (Ben Davies)++ | doc/Language/js-nutshell.pod6
Fix some redundancy in JS nutshell bitwise operators section
21:47
synopsebot Link: doc.perl6.org/language/js-nutshell
lucasb hmm, dunno
is there a negation/toggle operator for Order values? More->Less, Less->More, Same->Same ? 21:48
masak m: say -More 21:49
camelia -1
raschipi Yes, negate it
Oh, already answered 21:50
lucasb ok, works, but lost the enum value 21:51
*type
masak m: say Order(-More) 21:56
camelia Less
lucasb right :) 21:58
so, I guess I can say that 'cmp' is symmetric in the sense that "A cmp B" is equivalent to "OrderNegation(B cmp A)" 21:59
if it did different types of comparison depending on the type of the first operand, the above property wouldn't hold true anymore 22:00
22:45 Sgeo joined 22:48 Sgeo_ joined 22:51 Sgeo left 23:02 margeas joined 23:04 markong joined 23:07 margeas left 23:09 margeas joined 23:10 markong left 23:11 markong joined 23:13 margeas left 23:16 bwisti joined 23:19 stmuk_ joined 23:29 margeas joined 23:30 markong left 23:34 ChoHag left 23:35 ryn1x joined 23:37 go|dfish joined 23:42 n0tjack joined 23:50 n0tjack left 23:56 wamba left