Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2018-05-25

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 w_richard_w joined #perl6
00:08 enheh_ joined #perl6
00:15 hythm_ joined #perl6
00:20 kurahaupo_ joined #perl6
00:28 skids joined #perl6
00:34 stmuk_ joined #perl6
00:41 raschipi joined #perl6
00:53 lookatme :)
01:29 molaf joined #perl6
01:39 Kaiepi joined #perl6
01:40 MasterDuke joined #perl6
01:56 ilbot3 joined #perl6
01:56 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:57 Zoffix left #perl6
02:01 aborazmeh joined #perl6
02:01 aborazmeh joined #perl6
02:53 hythm_ joined #perl6
02:54 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 rakudo-moar 91ae5efca: OUTPUT: «{c => {d => True}, e => {f => True}, h => {i => (Any)}}␤»
02:57 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 }
03:02 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 rakudo-moar 91ae5efca: OUTPUT: «{a => {b => True}, c => {d => False}, e => {f => False}, h => {i => True}}␤»
03:03 MasterDuke hm. that loses 'g'
03:04 lookatme It has a inner hash
03:05 hythm_ wondering if hyper operator can help in this case, I tried a few ways but I could not make it work
03:07 _28_ria joined #perl6
03:19 mcmillhj joined #perl6
03:22 psychoslave joined #perl6
03:41 Qwerasd joined #perl6
03:42 Qwerasd Hey, is there some kind of wizardry that would allow me to see what parameters a callable accepts?
03:42 Qwerasd Like programmatically.
03:57 Qwerasd Nvm got it, Block.signature
04:18 AlexDaniel`` joined #perl6
04:37 psychoslave joined #perl6
04:50 curan joined #perl6
05:10 jmerelo joined #perl6
05:12 curan joined #perl6
05:15 Geth ¦ doc: 224a0bcf01 | (JJ Merelo)++ | doc/Language/testing.pod6
05:15 Geth ¦ doc: Completes preamble to fix compilation errors
05:15 Geth ¦ doc:
05:15 Geth ¦ doc: Fixes #2055
05:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/224a0bcf01
05:15 synopsebot Link: https://doc.perl6.org/language/testing
05:21 wamba joined #perl6
05:24 sauvin joined #perl6
05:24 wamba joined #perl6
05:54 domidumont joined #perl6
05:56 Geth ¦ doc: bc8b41d69d | (JJ Merelo)++ | doc/Language/variables.pod6
05:56 Geth ¦ doc: Adds info on possible distro names closes #2054
05:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/bc8b41d69d
05:56 Geth ¦ doc: b0ac6c8771 | (JJ Merelo)++ | doc/Language/variables.pod6
05:56 Geth ¦ doc: Changed anchors and added a few missing ones
05:56 synopsebot Link: https://doc.perl6.org/language/variables
05:56 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b0ac6c8771
05:57 jmerelo squashable6: status
05:57 squashable6 jmerelo, Next SQUASHathon in 7 days and ≈4 hours (2018-06-02 UTC-12⌁UTC+14). See https://github.com/rakudo/rakudo/wiki/Monthly-Bug-Squash-Day
05:59 domidumont joined #perl6
06:14 HaraldJoerg joined #perl6
06:35 stmuk joined #perl6
06:39 darutoko joined #perl6
06:49 robertle joined #perl6
06:51 psychoslave joined #perl6
06:56 xtreak joined #perl6
06:57 wamba joined #perl6
07:01 rindolf joined #perl6
07:03 jmerelo joined #perl6
07:03 jmerelo o/
07:08 wamba joined #perl6
07:13 epony joined #perl6
07:28 SHODAN joined #perl6
07:28 DarthGandalf joined #perl6
08:06 jmerelo Another SO question with a problem I bumped into today https://stackoverflow.com/questions/50524378/element-membership-and-identity
08:06 jmerelo m: say (1,1) === (1,1)
08:06 camelia rakudo-moar afbbf8f82: OUTPUT: «False␤»
08:06 jmerelo Related to that above, but also to how set membership works.
08:09 donpdonp my $a = (1,1); $a === $a => true
08:09 donpdonp === is more about pointer equality
08:09 donpdonp (1,1) eqv (1,1) => true
08:09 donpdonp 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 #perl6
08:10 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 jmerelo So the strange behavior I point to in the SO question occurs...
08:13 stmuk joined #perl6
08:15 Geth ¦ doc: 169d2127db | (JJ Merelo)++ | doc/Language/math.pod6
08:15 Geth ¦ doc: Adds exact Rational arithmetic
08:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/169d2127db
08:15 Geth ¦ doc: 34ec3dcb0c | (JJ Merelo)++ | doc/Language/math.pod6
08:15 Geth ¦ doc: Adds approximate equality, refs #114
08:15 synopsebot Link: https://doc.perl6.org/language/math
08:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/34ec3dcb0c
08:15 Geth ¦ doc: d670de3250 | (JJ Merelo)++ | 2 files
08:15 Geth ¦ doc: Adds content to the sequences section
08:15 Geth ¦ doc:
08:15 Geth ¦ doc: Also learns new words. Refs #114
08:15 Geth ¦ doc: review: https://github.com/perl6/doc/commit/d670de3250
08:39 Qwerasd How do I print an error in a catch block?
08:40 Qwerasd nvm
08:44 jmerelo Qwerasd: inside a catch block?
08:44 Qwerasd Figured it out that it was placed in $_ rather than $!
08:45 jmerelo Qwerasd: right. It's contextualized, so you can access it via $_ or using .say, for instance.
08:46 andrzejku joined #perl6
08:54 andrzejku_ joined #perl6
08:56 Qwerasd How can I remove an element from an array when looping through it with a for loop?
08:57 ChoHag joined #perl6
09:02 wamba joined #perl6
09:04 lookatme Qwerasd, using slice
09:04 Qwerasd How do I do that with like for @array -> $elem {}
09:05 lookatme sorry, splice
09:05 lookatme Qwerasd, no, it would not work in that form
09:05 Qwerasd How would I do that though? I don't have the index.
09:05 lookatme Using while I think
09:05 Qwerasd I don't really want to use the long c-style for loop if I don't have to.
09:07 lookatme It's UB in Perl 6 that remove element from Array you are iterating
09:07 Qwerasd UB?
09:07 lookatme yeah, I think
09:08 lookatme undefined behavior, you must heard it from C
09:12 AlexDaniel Qwerasd: how big is the array? Can't you just use grep?
09:12 AlexDaniel or map
09:13 Qwerasd I just bit the bullet and used loop(;;)
09:13 AlexDaniel right, that will work
09:13 lizmat Qwerasd: what's wrong with just 'loop { }' ?
09:14 Qwerasd loop(;;) and in loop(my $i = 0; $i < @arr.elems; $i++)
09:14 Qwerasd as in*
09:40 eliasr joined #perl6
09:43 buggable New CPAN upload: Test-Declare-0.0.2.tar.gz by DARRENF http://modules.perl6.org/dist/Test::Declare:cpan:DARRENF
10:12 ZzZombo joined #perl6
10:14 ryn1x joined #perl6
10:33 Geth ¦ doc: e29fe251a2 | (JJ Merelo)++ | 2 files
10:33 Geth ¦ doc: Eliminates link to code
10:33 Geth ¦ doc:
10:33 Geth ¦ doc: Rewrites paragraph to show clearly the nature of these values. Closes #2054.
10:33 Geth ¦ doc:
10:33 Geth ¦ doc: Also reflows that paragraph (ref #2056) (and some others) and makes some typographic
10:33 Geth ¦ doc: changes, changing to periods and capitalizing where needed.
10:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/e29fe251a2

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo