Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-08-31

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:08 cdg joined #perl6
00:09 pecastro joined #perl6
00:17 geekosaur joined #perl6
00:29 itaipu joined #perl6
00:30 sacomo joined #perl6
00:46 andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; 10.even.say
00:46 camelia rakudo-moar 8a2158: OUTPUT: «No such method 'even' for invocant of type 'Int'. Did you mean 'even'??  in block <unit> at <tmp> line 1??»
00:47 andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; augment class Int {} ; 10.even.say
00:47 camelia rakudo-moar 8a2158: OUTPUT: «True?»
00:50 Zoffix m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; Int.^compose; 10.even.say
00:50 camelia rakudo-moar 8a2158: OUTPUT: «True?»
00:50 Zoffix You need to recompose the classes before they'd see your augment of their base class
00:55 andreoss m: use MONKEY-TYPING; augment class Cool {method even { self %% 2 }}; Numeric.^compose ; 10.even.say
00:55 camelia rakudo-moar 8a2158: OUTPUT: «No such method 'compose' for invocant of type 'Perl6::Metamodel::ParametricRoleGroupHOW'?  in block <unit> at <tmp> line 1??»
00:55 andreoss i see
01:03 _28_ria joined #perl6
01:04 andreoss is there a better way to alias method to several names?
01:04 andreoss other than FALLBACK
01:04 Zoffix The only one I know of is .^add_method
01:04 Zoffix in a loop
01:06 Zoffix m: class Foo { method x { say "meow" }; for <a b c> { ::?CLASS.^add_method: $_, ::?CLASS.^find_method("x") } }; with Foo.new { .x; .a; .b; .c; }
01:06 camelia rakudo-moar 8a2158: OUTPUT: «meow?meow?meow?meow?»
01:06 Zoffix (I forget if that `for` needs to be in a BEGIN block
01:06 Zoffix )
01:09 Zoffix It's probably possible to make a trait that adds aliases and I think Rakudo used to have that, implemented by lizmat++. Perhaps she would know more how to do it.
01:35 piojo joined #perl6
01:39 cdg joined #perl6
01:39 geekosaur joined #perl6
01:51 ilbot3 joined #perl6
01:51 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!
02:05 snarkyboojum joined #perl6
02:27 noganex_ joined #perl6
02:29 perigrin joined #perl6
02:56 MasterDuke joined #perl6
02:59 MasterDuke andreoss, Zoffix: it was the 'aka' trait, but i think asked her about it a while ago and she didn't have any interest anymore
02:59 Zoffix Ah.
03:00 MasterDuke some more info here: https://irclog.perlgeek.de/perl6/2017-03-06#i_14215119
03:00 Zoffix huggable: alias
03:00 huggable Zoffix, nothing found
03:00 Zoffix huggable: alias :is: Alias methods (with `aka` trait): https://irclog.perlgeek.de/perl6/2017-08-31#i_15093699
03:00 huggable Zoffix, Added alias as Alias methods (with `aka` trait): https://irclog.perlgeek.de/perl6/2017-08-31#i_15093699
03:03 SmokeMachine m: my $a = {bla => 42}; $a .= <bla>; say $a # should it print 42?
03:03 camelia rakudo-moar 8a2158: OUTPUT: «No such method '&postcircumfix:<{ }>' for invocant of type 'Hash'?  in block <unit> at <tmp> line 1??»
03:11 dustin joined #perl6
03:22 Sgeo joined #perl6
03:35 Sgeo_ joined #perl6
03:50 unnecessarymulti joined #perl6
03:53 Cabanossi joined #perl6
04:09 cdg joined #perl6
04:14 xtreak joined #perl6
04:22 xtreak joined #perl6
04:28 Ven`` joined #perl6
04:33 xtreak_ joined #perl6
04:44 aborazmeh joined #perl6
04:44 aborazmeh joined #perl6
05:03 llfourn joined #perl6
05:09 Sgeo joined #perl6
05:16 nadim joined #perl6
05:17 samcv yay. everyone reading for unicode database updating to unicode 10
05:20 samcv hangul characters will have names as well (they have to be algorithmically created in our unicode database script)
05:27 xtreak joined #perl6
05:28 u-ou- joined #perl6
05:38 Cabanossi joined #perl6
06:05 teatime does one of the perl6 concurrency primitives resemble unix streams
06:06 teatime bufferred, pipeable/chainable, blocking on write when buffer full, blocking on read when empty
06:07 teatime ultimately, I want to be able to define transform-streams that are readable and writable
06:07 teatime that act as filters, like unix commands
06:07 espadrine joined #perl6
06:13 teatime so like, two duplex streams (as abstract objects) can be composed into one
06:13 teatime there's some underlying CS or practical knowledge I'm missing
06:13 rightfold > pipeable .oO(pineapple)
06:14 xtreak joined #perl6
06:17 teatime also there are probably some examples in the ecosystem already if I could find them
06:24 telex joined #perl6
06:28 ufobat joined #perl6
06:31 u-ou- joined #perl6
06:34 lowbro joined #perl6
06:34 lowbro joined #perl6
06:43 samcv yay unicode 10 bump done. property values are now unique for each property as well
06:43 Cabanossi joined #perl6
06:43 teatime samcv++
06:44 u-ou- :)
06:47 samcv almost done with my grant
06:47 * samcv wipes sweat from brow
07:00 TEttinger woah, there's a unicode 10 already?
07:00 TEttinger and samcv already implemented most of it???
07:01 samcv uhm the database has been updated at least
07:01 samcv so you can like
07:01 samcv m: say "\c[ELF]"
07:01 camelia rakudo-moar 64dd94: OUTPUT: «?????»
07:01 teatime gotta have them newest emoji charnames
07:01 TEttinger haha clearly the most important feature in a language
07:01 samcv and they added some other things probably
07:01 TEttinger elf and wizard
07:01 samcv the only thing i need to test is new flags
07:02 jonas2 joined #perl6
07:02 TEttinger is there a flag composition engine yet?
07:02 samcv if how flags worked wasn't insane enough, there are now tags you can add
07:02 samcv to the flag
07:02 samcv http://www.unicode.org/reports/tr51/tr51-10.html#flag-emoji-tag-sequences
07:02 TEttinger green female doctor united states flag
07:02 teatime in seriousness though, esp. since perl6 provides so many cool unicode things, it's super awesome that it's also quick to pick up new versions/characters
07:03 teatime new unicodedata, I guess
07:03 samcv m: say "\c[England]"
07:03 camelia rakudo-moar 64dd94: OUTPUT: «?????????????????????????????»
07:03 wamba joined #perl6
07:03 samcv sweet. yeah cause we have emoji sequences
07:04 TEttinger can we have an elf that is a flag
07:04 samcv m: say "\c[ENGLAND]".uninames.say
07:04 camelia rakudo-moar 64dd94: OUTPUT: «(WAVING BLACK FLAG TAG LATIN SMALL LETTER G TAG LATIN SMALL LETTER B TAG LATIN SMALL LETTER E TAG LATIN SMALL LETTER N TAG LATIN SMALL LETTER G CANCEL TAG)?True?»
07:04 samcv m: say "\c[ENGLAND]".uninames.perl.say
07:04 camelia rakudo-moar 64dd94: OUTPUT: «("WAVING BLACK FLAG", "TAG LATIN SMALL LETTER G", "TAG LATIN SMALL LETTER B", "TAG LATIN SMALL LETTER E", "TAG LATIN SMALL LETTER N", "TAG LATIN SMALL LETTER G", "CANCEL TAG").Seq?True?»
07:04 samcv yeah damn insane
07:04 samcv m: say "\c[ENGLAND]".chars
07:04 camelia rakudo-moar 64dd94: OUTPUT: «1?»
07:04 samcv m: say "a\c[ENGLAND]a".chars
07:04 camelia rakudo-moar 64dd94: OUTPUT: «3?»
07:04 samcv ok seems to work.
07:04 * TEttinger spontaneously combusts
07:05 samcv m: say "\c[California]"
07:05 camelia rakudo-moar 64dd94: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Unrecognized character name [California]?at <tmp>:1?------> 3say "\c[California7?5]"?»
07:05 samcv they list that as an example but it must not be on the emoji sequences list. i think they just listed it as an example
07:06 samcv england scotland and wales are the only ones on the emoji-sequences list. though unicode says you can make others and it's fine
07:06 samcv with specs of how to properly format it
07:07 samcv you can color elfs by skin tone wow
07:08 u-ou- joined #perl6
07:08 TEttinger no drow, sadly.
07:09 TEttinger wonder when we get cthulhu emoji
07:09 samcv m: 0x1F6F8.uniname
07:09 camelia rakudo-moar 64dd94: ( no output )
07:09 samcv m: 0x1F6F8.uniname.say
07:09 camelia rakudo-moar 64dd94: OUTPUT: «FLYING SAUCER?»
07:09 TEttinger I guess lovecraft's works aren't in public domain in all jurisdictions
07:10 TEttinger or are just getting there
07:10 samcv hah
07:10 TEttinger I mean, wizard of oz is public domain
07:10 TEttinger early-ish 1800s
07:10 TEttinger maybe mid
07:10 samcv m:  0xD4DB.uniname.say
07:10 camelia rakudo-moar 64dd94: OUTPUT: «Hangul Syllable PWILH?»
07:10 TEttinger pwilh?
07:11 samcv i added all the hangul(korean) characters names
07:11 TEttinger wow
07:11 TEttinger I hope not by hand
07:11 samcv we didn't have that before, i had to generate them
07:11 eliasr joined #perl6
07:11 samcv no, not by hand
07:11 samcv m: 0xD4DB.chr.NFD».uniname.say
07:11 camelia rakudo-moar 64dd94: OUTPUT: «(HANGUL CHOSEONG PHIEUPH HANGUL JUNGSEONG WI HANGUL JONGSEONG RIEUL-HIEUH)?»
07:11 samcv ah not that uh
07:12 samcv but you can see how they have parts of it
07:12 TEttinger m: say "\c[YI SYLLABLE FAP]"
07:12 camelia rakudo-moar 64dd94: OUTPUT: «??»
07:12 samcv there's a file with the Jamo names, and you decompose the codepoint and then you look up the name
07:12 samcv http://josefwigren.com/wp-content/uploads/2013/01/full-hangul.jpg this is a 2x2 grid
07:13 darutoko joined #perl6
07:13 samcv it doesn't have the optional ending consonant. but hangul is consonat + vowel + (trailing consonant)?
07:13 TEttinger sounds about right. with the sound of the consonant dependent on what came before
07:14 TEttinger rather complex language
07:14 TEttinger nice script
07:16 rindolf joined #perl6
07:18 samcv complex?
07:18 samcv ah the language itself. i wouldn't know
07:21 TEttinger there's something on wikipedia about how it's one of the languages with the highest class of difficulty for native english speakers to learn
07:21 TEttinger US state dept. classification for translators I think
07:21 samcv the foreign language service you mean
07:22 samcv err let me check
07:22 TEttinger I don't know what it was. it might have been a military body that needed to know so soldiers can obey road signs
07:22 samcv foreign service institute
07:22 samcv yeah it's under the state department
07:22 TEttinger (would be pretty bad if an armed soldier couldn't get back to the base)
07:23 samcv yeah it's category V
07:23 samcv with japanese arabic cantonese and mandarin
07:24 samcv which says about 4x as many hours to reach a certain level of proficiency compared to dutch french italian norwegian portuguese romanian spanish or swedish or afrikaans
07:24 TEttinger "the tough ones"
07:24 lizmat joined #perl6
07:24 TEttinger french is definitely harder than spanish
07:24 TEttinger they're both regular, but french has a lot more rules
07:25 TEttinger and dutch is almost english
07:25 samcv well it's closer to english than german at least
07:26 TEttinger yeah. I wonder where german is on the list
07:26 samcv but i'd say there are easier romance languages just because they share more in common
07:26 samcv category II
07:26 samcv TEttinger, http://www.effectivelanguagelearning.com/language-guide/language-difficulty
07:26 TEttinger russian is a notoriously hard language to translate literature from
07:26 dakkar joined #perl6
07:27 samcv why so?
07:28 TEttinger I think it's mainly due to connotations that words have in Russian and the words being used artistically to have more than one meaning
07:28 TEttinger (and no English words share the same connotations, so you need more words)
07:28 jast same is true for all translations to some extent
07:28 Cabanossi joined #perl6
07:28 TEttinger there's some classic russian literature, for sure, but it's definitely difficult to read
07:29 jast and I've read my share of terrible translations (not Russian, though, I don't know the language at all)
07:29 samcv that's common in lots of cases though
07:29 samcv unless russian just on average has words which don't have similar connotations available in english
07:30 TEttinger the extreme case is mat, the russian language of vulgarity, which primarily uses "the big four" obscenities in a dizzying conglomeration of arrangements to mean almost anything imaginable that is vulgar
07:31 samcv i have heard of mat
07:31 TEttinger USSR tried to outlaw it, failed, people continue to try that
07:31 samcv it's seen as not classy?
07:31 samcv well swearing usually is. but i mean compared to other swear words
07:32 TEttinger I don't have the cultural background, but as I understand it, it is the bulk of the swear words
07:32 TEttinger and compared to English, where new obscenities disseminate all the time, I think those 4 are old standards
07:32 * teatime has flashbacks to The Brothers Karamazov
07:34 u-ou- joined #perl6
07:36 u-ou- where should I put my code I want to run when a class gets instantiated and when the instance gets deleted?
07:40 nattefrost joined #perl6
07:47 nadim_web joined #perl6
07:47 nadim_web mornin' all.
07:51 samcv u-ou-, well BUILD or TWEAK
07:51 samcv methods
07:51 samcv not sure abotu destruction
07:51 mr-foobar joined #perl6
07:54 abraxxa joined #perl6
07:54 leont joined #perl6
07:56 u-ou- joined #perl6
07:57 u-ou- samcv, thanks
07:57 samcv u-ou-, DESTROY
07:57 u-ou- ahh
07:57 u-ou- cool
07:58 samcv not sure how i destroy an object
07:58 samcv i guess maybe call DESTROY on it
07:58 samcv m: my $thing = 'hi'; $thing.DESTROY; say $thing
07:58 camelia rakudo-moar 64dd94: OUTPUT: «No such method 'DESTROY' for invocant of type 'Str'?  in block <unit> at <tmp> line 1??»
07:59 samcv but that's it
08:01 samcv not sure when that gets called
08:01 u-ou- m: class A { method DESTROY() { say 'hi' } }; {my $a = A.new; } say 'there'
08:01 camelia rakudo-moar 64dd94: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3TROY() { say 'hi' } }; {my $a = A.new; }7?5 say 'there'?    expecting any of:?        infix?        infix stopper…»
08:01 u-ou- m: class A { method DESTROY() { say 'hi' } }; {my $a = A.new; }; say 'there'
08:01 camelia rakudo-moar 64dd94: OUTPUT: «there?»
08:01 u-ou- I actually don't need this anymore but now I'm interested
08:03 zakharyas joined #perl6
08:03 u-ou- (I changed my design)
08:04 lizmat .tell andreoss check Tux's Text::CSV's CHECK block for aliasing methods
08:04 yoleaux lizmat: I'll pass your message to andreoss.
08:09 cdg joined #perl6
08:18 teatime 'As opposed to a reference counted implementation (like CPython or perl5), fully garbage-collected implementations (like PyPy and Rakudo) cannot guarantee that your DESTROY methods are called soon after the object becomes unreachable. The DESTROY method may not even be called at all if the interpreter shuts down before that particular object gets collected. If you want your destruction timely and
08:18 teatime guaranteed, you’ll have to “do it yourself”.'
08:18 teatime also, https://github.com/perl6/roast/blob/master/S12-construction/destruction.t
08:19 dogbert2 joined #perl6
08:25 rindolf joined #perl6
08:28 Cabanossi joined #perl6
08:32 Ulti moritz did you see your plot demo painted in Jupyter?
08:34 Ulti also moritz++ for the plotting tricks
08:36 lizmat .tell andreoss condensed to an "also" trait: sub trait_mod:<is>(Method:D $m, :$also!) { my $c := $m.package; $c.^add_method($_,$m) for @$also }
08:36 pmurias joined #perl6
08:36 yoleaux lizmat: I'll pass your message to andreoss.
08:37 lizmat m: sub trait_mod:<is>(Method:D $m, :$also!) { my $c := $m.package; $c.^add_method($_,$m) for @$also }; class A { method a() is also(<b c>) { "foo" } }; dd A.a, A.b, A.c; dd A.d
08:37 camelia rakudo-moar 64dd94: OUTPUT: «"foo"?"foo"?"foo"?No such method 'd' for invocant of type 'A'. Did you mean 'a'??  in block <unit> at <tmp> line 1??»
08:37 lizmat note that the levenshtein logic for missing methods only knows about "a", not sure we want to fix that
08:59 leont joined #perl6
09:02 maettu_ joined #perl6
09:16 Ven`` joined #perl6
09:17 mr-fooba_ joined #perl6
09:25 Sgeo joined #perl6
09:31 margeas joined #perl6
09:38 Sgeo_ joined #perl6
09:47 Cabanoss- joined #perl6
09:55 Cabanossi joined #perl6
10:02 moritz Ulti: no; got a link?
10:08 aindilis joined #perl6
10:14 xtreak joined #perl6
10:21 Ulti http://mattoates.co.uk/files/perl6/jupyter_perl6_plot_test_html.png had to hack it locally to render
10:21 Ulti using https://github.com/bduggan/p6-jupyter-kernel
10:26 ShalokShalom_ joined #perl6
10:28 BooK I'm having some trouble running the roast test suite as documented in the README
10:31 aindilis joined #perl6
10:33 BooK http://paste.scsys.co.uk/565003 # here are all the details
10:33 pmurias joined #perl6
10:36 samcv bisectable6, "\c[man in suit levitating: medium skin tone]".say
10:36 bisectable6 samcv, Bisecting by output (old=2015.12 new=64dd94c) because on both starting points the exit code is 1
10:36 bisectable6 samcv, bisect log: https://gist.github.com/9904509a0de1c77edec8e82ad245084f
10:36 bisectable6 samcv, (2017-01-22) https://github.com/rakudo/rakudo/commit/58226059b53853134de0f265b6f46a923d2004e7
10:41 sena_kun joined #perl6
10:42 Zoffix BooK: unfortunately, the effort to make running roast while only having a roast checkout kinda stalled without being completed to the end. Many of the tests expect you to be running roast from a directory that's ../.. from the roast checkout, with the roast checkout located in t/spec/
10:43 Zoffix BooK: for example, that's the setup if you clone rakudo and run `make test` the make clones roast repo automatically into t/spec
10:44 Zoffix BooK: That partilar test file can probably be made to work by using PERL6LIB=packages/ ./fudgeandrun … … to tell it where the Test::Util is at, but I know other files have more assumptions about the roast running from t/spec
10:46 BooK Zoffix: yes, the PERL6LIB=...  with a single test file is what I tried
10:47 BooK so there's still a lot of "scratch your own itch" to do :-)
10:47 BooK on an unrelated subject, where can I find some nqp documentation?
10:47 BooK seems like digging in src/core requires knowing about nqp :-)
10:48 Zoffix BooK: the ops are in https://github.com/perl6/nqp/blob/master/docs/ops.markdown the QAST are in https://github.com/perl6/nqp/blob/master/docs/qast.markdown and nqp::p6 ops are in https://github.com/rakudo/rakudo/blob/nom/docs/ops.markdown
10:48 Zoffix (some ops are unfortunatelly undocumented)
10:51 Zoffix This will checkout and build rakudo and clone the roast repo into a dir where it works. Run t/fudheandrun Some-Test (from rakudo dir) and it'll work for all test files:    git clone https://github.com/rakudo/rakudo/ ; cd rakudo; perl Configure.pl --gen-moar --gen-nqp --backends=moar; make; make test; make install; git clone https://github.com/perl6/roast t/spec;
10:51 Zoffix huggable: internals course
10:51 huggable Zoffix, Rakudo/NQP Internals Course: https://github.com/edumentab/rakudo-and-nqp-internals-course#rakudo-and-nqp-internals-workshop
10:51 pmurias BooK: for nqp:: ops you might want to also look at the t/nqp test suite in the nqp repo
10:51 Zoffix BooK: ^ a slightly outdated internals course that has more info on how the guts fit together
10:53 BooK thanks
11:09 cdg joined #perl6
11:11 xinming_ joined #perl6
11:12 itaipu joined #perl6
11:15 bob777 joined #perl6
11:37 Skarsnik joined #perl6
11:44 wenjie joined #perl6
11:45 wenjie left #perl6
11:47 koto joined #perl6
11:47 xtreak joined #perl6
11:52 konsolebox joined #perl6
11:59 rumble joined #perl6
12:11 zura joined #perl6
12:14 AlexDani` joined #perl6
12:18 piojo joined #perl6
12:21 raschipi joined #perl6
12:26 Cabanossi joined #perl6
12:41 sena_kun joined #perl6
12:52 census joined #perl6
12:53 jonas1 joined #perl6
12:53 census i'm running this program: https://pastebin.com/7mFtZfpT
12:53 huggable joined #perl6
12:54 census I input the data from a .txt file. It seems if the .txt file is too large I get an error 'Malformed UTF-8'  i tried looking this up in the logs but i couldn't understand how to fix it. all I realized is if I remove entries from the input .txt file and run the program it was okay
12:55 timotimo we're just now tracking down one cause of this very bug
12:55 sena_kun eater, o/
12:55 mcmillhj joined #perl6
12:56 eater sena_kun o/
12:56 Zoffix ??? New blog post: "On Troll Hugging, Hole Digging, and Improving Open Source Communities": https://rakudo.party/post/On-Troll-Hugging-Hole-Digging-and-Improving-Open-Source-Communities
12:56 Cabanossi joined #perl6
12:57 census timotimo are you refering to the bug i mentioned?
12:57 timotimo the "malformed utf-8" one, yeah
12:57 sena_kun eater, if cro's ipv6-related issue is yours, can you test the fix(latest commit)? Still silly ipv4 on this side.
12:57 eater sena_kun: It's running the test now :)
12:57 census do you have a guess at how large of a .txt input file i can have so that the program will run okay?
12:57 sena_kun \o/
12:57 eater sena_kun: fails D:
12:58 sena_kun ugh.
12:58 sena_kun eater, can you paste the full log and pm me with a link?
12:59 eater sena_kun: yep! you're gonna love the name of the machine I'm on c: https://hastebin.com/raw/wavizequho
12:59 sena_kun :D
13:00 MasterDuke census: i don't think it's the size of the file that's the problem, but that certains characters are falling on the boundaries of the bytesize that's read at a time
13:00 eater sena_kun: I think you should put the host on `127.0.0.1`
13:00 eater that would fix it
13:01 MasterDuke so adding/removing individual lines might hide the problem for you
13:01 census MasterDuke I see. it's basically trial and error at that point
13:01 MasterDuke census: yep (but hopefully not for long)
13:03 census also i have 1 question about the code if that's okay please
13:03 census my code is at:
13:03 census https://pastebin.com/7mFtZfpT
13:04 mcmillhj joined #perl6
13:04 census if the input for a particular row into @terms has a space like in https://www.ncbi.nlm.nih.gov/pubmed/?term=Aarskog+Syndrome[Title/Abstract]%20AND%20united%20states[pl]   for Aarskog Syndrome how may I account for that
13:04 census when i do this part of the code: sub make-term (:$term, :$year) {     '(' ~ $term ~ '[Title/Abstract] AND united states[pl] AND (("' ~ $year ~ '/01/01"[PDat] : "' ~ $year ~ '/12/31"[PDat])))' }
13:05 Zoffix census: it should already be accounted by &uri_encode in  my @terms = "list.txt".IO.lines.map: &uri_encode;
13:05 census Zoffix yes i thought it would be but it doesn't seem to be
13:06 MasterDuke census: you are already "using" URI::Encode, i don't know the name of the routine, but you'd probaby do something like `uri-encode($term)` instead of just `$term`
13:07 Zoffix census: what if you change it to : my @terms = "list.txt".IO.lines.map: *.subst(:g, " ", "+").&uri_encode
13:08 MasterDuke i think it's actually `uri-escape`
13:09 Zoffix buggable: eco URI::Encode
13:09 buggable Zoffix, URI::Encode 'Encode and decode URIs according to RFC 3986': https://github.com/perl6-community-modules/URI-Encode
13:09 Zoffix Docs use uri_encode
13:10 moritz Zoffix++ # troll hugging community rambly sort of blog post :-)
13:10 Zoffix \o/
13:10 census Zoffix yes i think the way you set it up wil work
13:10 census or maybe not
13:10 census i'll let you know in a few
13:11 census yes Zoffix it works perfectly now that aspect
13:11 Zoffix Sweet
13:11 census i really thought that was the purpose of the other uri coding so i had let it go
13:12 Skarsnik Should URI handling be in core?
13:12 census Zoffix did you catch my other note? that i'm trying to input many inputs in the input file but that doesn'tjive i get a malformed ut-8 error
13:12 MasterDuke oops, i was looking at the docs for URI::Escape (from the URI module)
13:12 census do you know if there's any way to guess in advance which ones might be causing that
13:12 Zoffix Skarsnik: no, considering it's not an exact science.
13:12 census without trial and error
13:13 Cabanossi joined #perl6
13:13 Skarsnik Zoffix, dunno was there a RFC for URI
13:13 MasterDuke census: i don't think we've figured out the bug to that level of detail yet
13:13 Zoffix Skarsnik: but there's also real world use. URI module for example crashes on many real-world URLs
13:14 Zoffix (that you can get when, say, parsing some web page)
13:14 Skarsnik URL != URI
13:14 Zoffix URL is the only thing.
13:15 Zoffix Didn't W3C say URI is ded and just use URL for all the things?
13:17 Zoffix star: use URI; URI.new("https://foo.com/foo bar")
13:17 camelia star-m 2017.07: OUTPUT: «Could not parse URI: https://foo.com/foo bar?  in method parse at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877C73A01F6D9BE0FAB586D948EA58B54 (URI) line 46?  in method new at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877…»
13:17 Zoffix star: use URI; URI.new("https://foo.com/?Rakudo=?")
13:17 camelia star-m 2017.07: OUTPUT: «Could not parse URI: https://foo.com/?Rakudo=??  in method parse at /home/camelia/star-2017.07/share/perl6/site/sources/791F2CA877C73A01F6D9BE0FAB586D948EA58B54 (URI) line 46?  in method new at /home/camelia/star-2017.07/share/perl6/site/sources/791F2C…»
13:17 Zoffix It's already included in Star. I don't see benefit to including anything in core.
13:17 skids joined #perl6
13:18 Skarsnik stae: use URI; URI.new("file://home/skarsnik");
13:18 Skarsnik star: use URI; URI.new("file://home/skarsnik");
13:18 camelia star-m 2017.07: ( no output )
13:19 * Zoffix leaves for 2 days of relaxation...
13:19 Zoffix Get some strength for theeeee... SQUASHathoooon \o/ \o/ \o/ http://blogs.perl.org/users/zoffix_znet/2017/08/youre-invited-community-bug-squashathon.html
13:19 dzove855 72
13:19 Zoffix \o
13:19 Skarsnik ^^
13:20 cdg joined #perl6
13:20 Skarsnik URL should be handled by a module. URI syntax is more generic and cover lot of usage
13:21 census Zoffix you've earned it !
13:21 andrzejku hey people
13:21 andrzejku :P
13:23 census i found a problematic entry. it has an apostrpohe in it: Addison’s Disease
13:24 census perhaps i'm not doing the appropriate apostrophe ?
13:26 census yes that helped significantly with the problem
13:26 MasterDuke fyi, the URI::Escape module turned that into: Addison%E2%80%99s%20Disease
13:27 census which may be a separate issue
13:27 census but i just redid it to Addison's Disease and at least the program runs
13:27 census but i don't think it's running correctly. it's giving me outputs of all 0's which i'm doubting is the case
13:28 pmurias joined #perl6
13:30 lizmat joined #perl6
13:32 cdg joined #perl6
13:34 census Yes it's a legit issue for the '
13:34 census it's reading Alzheimer's Disease as Alzheimer%27s+Disease
13:34 census and producing that there's no results
13:42 andrzejku I am looking for Perl6 junior programmers :P for collaboration
13:42 census andrzejku i'm so perl6 junior hahah
13:42 andrzejku census, good
13:43 cdg joined #perl6
13:43 andrzejku census, want to help?
13:43 census if i can i might be too junior
13:43 andrzejku census, if you know another programming language then it is not bad
13:44 census yes i agree
13:46 lizmat Zoffix++  # http://blogs.perl.org/users/zoffix_znet/2017/08/on-troll-hugging-hole-digging-and-improving-open-source-communities.html
13:53 census sorry did anybody catch my comment before? i got the ' to compile but it doesn't work
13:58 zakharyas joined #perl6
14:21 sena_kun https://github.com/Altai-man/BugTest/blob/master/t/01-basic.t - this one is a rakudobug, right?
14:26 Kyo91_ joined #perl6
14:28 zakame joined #perl6
14:36 Geth ¦ doc/molecules-patch-3: 3331c5210a | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
14:36 Geth ¦ doc/molecules-patch-3: More explanation, postcircumfix exception
14:36 Geth ¦ doc/molecules-patch-3: review: https://github.com/perl6/doc/commit/3331c5210a
14:36 ilmari[m] Zoffix++ # troll hugging
14:36 ilmari[m] (just finished reading the article)
14:36 ilmari[m] .hug Zoffix
14:36 * huggable hugs Zoffix
14:37 ilmari[m] .hug
14:37 * huggable hugs everyone
14:40 ilmari[m] Zoffix: I just noticed the <title> still says "Perl 6 Party", even though the domain is rakudo.party
14:40 Geth ¦ doc/molecules-patch-3: 99b1997c24 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
14:40 Geth ¦ doc/molecules-patch-3: More concise trailing statement explanation
14:40 Geth ¦ doc/molecules-patch-3: review: https://github.com/perl6/doc/commit/99b1997c24
14:41 ChoHag joined #perl6
14:42 AlexDaniel ? Community Bug SQUASHathon http://blogs.perl.org/users/zoffix_znet/2017/08/youre-invited-community-bug-squashathon.html
14:47 zakame hello
14:47 raschipi hey
14:55 rindolf joined #perl6
15:12 travis-ci joined #perl6
15:12 travis-ci Doc build passed. Christopher Bottoms 'More explanation, postcircumfix exception'
15:12 travis-ci https://travis-ci.org/perl6/doc/builds/270443962 https://github.com/perl6/doc/compare/4d069f99ef96...3331c5210a3c
15:12 travis-ci left #perl6
15:15 travis-ci joined #perl6
15:15 travis-ci Doc build passed. Christopher Bottoms 'More concise trailing statement explanation'
15:15 travis-ci https://travis-ci.org/perl6/doc/builds/270446018 https://github.com/perl6/doc/compare/3331c5210a3c...99b1997c248e
15:15 travis-ci left #perl6
15:15 andrzejku joined #perl6
15:17 andrzejku back
15:17 andrzejku :)
15:20 ilmari joined #perl6
15:21 khw joined #perl6
15:22 sivoais joined #perl6
15:38 cdg joined #perl6
15:44 Skarsnik somone has an idea to have mardown on blog.perl.org to go to the line in ```code?
15:50 piojo joined #perl6
16:02 piojo joined #perl6
16:03 Skarsnik http://blogs.perl.org/users/sylvain_colinet/2017/08/perl6---nativecall-using-the-native-trait-correctly.html
16:05 b2gills Dang-it, I was going to rewrite a shell script using Spit, but it is currently broken on the latest Rakudo.
16:05 Ven`` joined #perl6
16:10 alexk joined #perl6
16:11 alexk m: for ^100 -> $i {   say $i if ([+] (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done";
16:11 camelia rakudo-moar 067f54: OUTPUT: «62?93?done?»
16:12 alexk m: for ^100 -> $i {   say $i if ([+] (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done";
16:12 camelia rakudo-moar 067f54: OUTPUT: «7?11?17?done?»
16:12 alexk m: for ^100 -> $i {   say $i if ([+] (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; } say "done";
16:12 camelia rakudo-moar 067f54: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Strange text after block (missing semicolon or comma?)?at <tmp>:1?------> 3egree(4)).map({$_ + 1}).list) != 5050; }7?5 say "done";?»
16:13 alexk m: for ^100 -> $i {   say $i if ([+] (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).list) != 5050; }; say "done";
16:13 camelia rakudo-moar 067f54: OUTPUT: «done?»
16:13 Zoffix alexk: hyper and race are currently experimental and are still awaiting being implemented.
16:13 Zoffix alexk: a blog post about the new semantics in the works: https://6guts.wordpress.com/2017/03/16/considering-hyperrace-semantics/
16:14 alexk ah, ok
16:14 mcmillhj joined #perl6
16:14 MasterDuke alexk: also, i think your two .list's aren't needed
16:14 andrzejku joined #perl6
16:14 Zoffix ilmari[m]: thanks. And yeah, the title and most of the articles still need to be renamed. I haven't gotten around to it yet
16:15 alexk MasterDuke: the point is that hyper occassionaly fails wherby race seem to work ...
16:16 Zoffix Yeah, it was just never implemented beyond a proof of concept and accidentally made it into the language without requiring `use experimental` pragma :)
16:17 eroux joined #perl6
16:18 devmikey joined #perl6
16:19 MasterDuke alexk: yep, just trying to golf it down to a shorter representation of the problem (i.e., making sure the .list's weren't somehow contributing to the bug)
16:20 MasterDuke m: for ^100 -> $i {   say $i if (^100).hyper(:batch(2), :degree(4)).map(* + 1).sum != 5050; }; say "done"; # this is a little shorter, but shows the same behaviour
16:20 camelia rakudo-moar 067f54: OUTPUT: «done?»
16:20 MasterDuke m: for ^100 -> $i {   say $i if (^100).hyper(:batch(2), :degree(4)).map(* + 1).sum != 5050; }; say "done"; # this is a little shorter, but shows the same behaviour
16:20 camelia rakudo-moar 067f54: OUTPUT: «39?60?63?done?»
16:20 ChoHag joined #perl6
16:22 raschipi Zoffix: your post about troll hugging was downvoted to death on /r/perl. Why was I expecting that?
16:23 mspo m: say ??+??
16:23 camelia rakudo-moar 067f54: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Confused?at <tmp>:1?------> 3say ?7?5?+???»
16:23 mspo should that work?
16:24 raschipi u: ?
16:24 unicodable6 raschipi, U+5343 <CJK Ideograph> [Lo] (?)
16:24 AlexDaniel u: { .chr eq ‘?’ }
16:24 unicodable6 AlexDaniel, U+5343 <CJK Ideograph> [Lo] (?)
16:24 mspo m: say ?+?
16:24 camelia rakudo-moar 067f54: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    ? used at line 1??»
16:25 sena_kun it shouldn't.
16:25 mspo m: say ?+?
16:25 camelia rakudo-moar 067f54: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Undeclared routine:?    ? used at line 1??»
16:25 Zoffix mspo: no. Only Nd characters can be chained with other digits and No characters can also be used by itself. Despite ? meaning "thousand" it's not a numerica character in Unicode
16:25 sena_kun see https://github.com/Altai-man/Slang-Kazu (although it's broken iirc).
16:25 mspo Zoffix: okay
16:25 mspo u: ?
16:25 unicodable6 mspo, U+FF75 HALFWIDTH KATAKANA LETTER O [Lo] (?)
16:26 Zoffix "Lo" => "Letter, other"
16:27 mspo Zoffix: yeah seeing it
16:27 mspo u: ?
16:27 unicodable6 mspo, U+FF7E HALFWIDTH KATAKANA LETTER SE [Lo] (?)
16:28 mspo u: ?
16:28 unicodable6 mspo, U+FF15 FULLWIDTH DIGIT FIVE [Nd] (?)
16:28 raschipi "Nd" => "Number, digit"
16:29 Zoffix raschipi: it usually picks up after a few hours. Maybe some of the users just aren't cat people :) https://rakudo.party/about
16:30 raschipi u: ½
16:30 unicodable6 raschipi, U+00BD VULGAR FRACTION ONE HALF [No] (½)
16:30 raschipi 'No' can be used as a number by itself, but not as digits.
16:30 ilmari u: ²
16:30 unicodable6 ilmari, U+00B2 SUPERSCRIPT TWO [No] (²)
16:30 ilmari m: say ²³
16:30 camelia rakudo-moar e717d1: OUTPUT: «8?»
16:31 mspo u: ?
16:31 unicodable6 mspo, U+58F1 <CJK Ideograph> [Lo] (?)
16:31 mcmillhj joined #perl6
16:33 Zoffix ilmari: in that instance, Rakudo's strong patterm of expecting term -> op -> term takes place. The ² is a term, since it can't be chained with other No or Nd chars, ³ is not a part of it. Next, the language expects an op to appear after the term, it sees ³, which in this context is an operator (and multiple Nos can form the power ops). Hence, the result is 2**3, without any ambiguity of meaning :)
16:33 * Zoffix & :)
16:34 ilmari Zoffix: I know, but it can be surprising (we've had this conversation before, I agree it's consistent and the right thing)
16:35 vendethiel- joined #perl6
16:35 raschipi the most useful thing about the superscript syntax is explaining the self-clocking properties of Perl6.
16:40 alexk Zoffix: so i suppose it doesn't make sense to open a ticket for the "hyper" failure now.
16:40 Skarsnik dunno, if you have a reiable test case that fail it's good
16:41 Zoffix alexk: don't think so. Also, a few of them already have been filed (e.g. https://rt.perl.org/Ticket/Display.html?id=130576#ticket-history )
16:42 Zoffix huggable: rakudobugs
16:42 huggable Zoffix, Report bugs by emailing to <rakudobug@perl.org>
16:42 Zoffix alexk: but if you like, you could always email your buggy test case to ^
16:42 Zoffix (which could become part of the test suit when the .hyper and .race get nailed down)
16:42 ChoHag joined #perl6
16:44 raschipi alexk: have you tried doing those things using atomic operations?
16:45 pompomcrab joined #perl6
16:50 mcmillhj joined #perl6
16:51 pompomcrab how do i debug this error while using HTTP::UserAgent? "MoarVM panic: Internal error: invalid thread ID 119468032 in GC work pass"
16:51 census Zoffix if you were wondering I fixed my problem I told you about earlier
16:51 census I forget the error message what it was called
16:52 Skarsnik pompomcrab, hm that sucksn try a --lvm-execptiob ?
16:52 census I realized if it had any non-English accent marks in a word that was a problem. Like to word fiancee with the accent mark. Also the apostrophe I had to reformat .
16:53 AlexDaniel pompomcrab: any chance of getting the code smaller so that we have something short to reproduce the issue?
16:54 AlexDaniel pompomcrab: and how consistent is it? Could be a regression too
16:54 AlexDaniel Skarsnik: did you mean --ll-exception? :)
16:54 alexk raschipi: no, I don't think it has anything to do with that in this case.
16:55 Skarsnik yes lol
16:56 AlexDaniel pompomcrab: in fact, if the code to reproduce the issue is in one file, we can already shove it into a bot and we'll get more info
16:56 setty1 joined #perl6
16:56 AlexDaniel doesn't have to be small
17:02 mcmillhj joined #perl6
17:03 alexk m: say [+] do for ^100 {   (^100).list.hyper(:batch(2), :degree(4)).map({$_ + 1}).sum != 5050 }
17:03 camelia rakudo-moar e717d1: OUTPUT: «3?»
17:04 alexk m: say [+] do for ^100 {   (^100).list.race(:batch(2), :degree(4)).map({$_ + 1}).sum != 5050 }
17:04 camelia rakudo-moar e717d1: OUTPUT: «0?»
17:05 mcmillhj joined #perl6
17:08 MasterDuke pompomcrab: if you can't easily share your code, you can try running it with perl6-valgrind-m or perl6-gdb-m and report what they output
17:09 AlexDaniel pompomcrab: note that most likely this is a bug on our side, so any info is welcome
17:13 epony joined #perl6
17:14 Skarsnik_ joined #perl6
17:15 Skarsnik__ joined #perl6
17:17 Cabanossi joined #perl6
17:19 perigrin joined #perl6
17:25 eliasr joined #perl6
17:26 lostinfog joined #perl6
17:37 imcsk8 joined #perl6
17:40 dogbert2 joined #perl6
17:50 Kyo91_ joined #perl6
17:54 smls joined #perl6
17:55 smls bisectable6:  my token foo { {} foo { say $/.to } }; "foo" ~~ /<foo>/
17:55 bisectable6 smls, Bisecting by output (old=2015.12 new=e717d14) because on both starting points the exit code is 0
17:55 bisectable6 smls, bisect log: https://gist.github.com/23122ebe34ebeccfdfc3cd04845c54f4
17:55 bisectable6 smls, There are 20 candidates for the first “new” revision. See the log for more details
17:56 smls Those 20 commits again... :P
17:59 lizmat_ joined #perl6
18:05 Kyo91 joined #perl6
18:05 nadim joined #perl6
18:07 smls They fixed a bunch of bugs, but somehow got on bisectable's bad side... :)
18:10 samb1 joined #perl6
18:11 mcmillhj joined #perl6
18:18 smls joined #perl6
18:20 Geth ¦ perl6.org: 91eab69e6b | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
18:20 Geth ¦ perl6.org: List SQUASHathon in the news box
18:20 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/91eab69e6b
18:22 wamba joined #perl6
18:34 AlexDaniel Zoffix: SQUASHAthon or SQUASHathon ? :)
18:37 Zoffix the latter
18:37 robertle joined #perl6
18:38 Geth ¦ perl6.org: 2e40416c8d | (Zoffix Znet)++ (committed using GitHub Web editor) | source/index.html
18:38 Geth ¦ perl6.org: Fix typo; AlexDaniel++
18:38 Geth ¦ perl6.org: review: https://github.com/perl6/perl6.org/commit/2e40416c8d
18:40 Aaronepower Hello, how do you check a variable's type?
18:40 geekosaur m: my $a; say $a.WHAT
18:40 camelia rakudo-moar e717d1: OUTPUT: «(Any)?»
18:40 geekosaur m: my Int $a; say $a.WHAT
18:40 camelia rakudo-moar e717d1: OUTPUT: «(Int)?»
18:40 AlexDaniel m: say 42 ~~ Int
18:40 camelia rakudo-moar e717d1: OUTPUT: «True?»
18:41 moritz Aaronepower: a variable's or a value's type?
18:42 Skarsnik__ .^name
18:42 moritz m: my Any $x = 42; say $x.^name; say $x.VAR.of.^name
18:42 camelia rakudo-moar e717d1: OUTPUT: «Int?Any?»
18:43 Skarsnik hm interesting
18:44 Aaronepower moritz: What's the difference?
18:45 moritz Aaronepower: in my example above, the variable $x is constrained to type Any, but holds a value of type Int. This works, because Int is a sub type of (more specific than) Any
18:47 ruoso__ Is there a way to dynamically ask for the value of an attribute of self ?
18:48 ruoso__ self.^attributes gives me the attribute meta-object, but I can't quite figure out how to use it to inquire the value from an object
18:49 Zoffix ruoso__: isn't it just $!some-attribute?
18:49 ruoso__ right, but I don't know the attribute name
18:49 Zoffix Ah
18:50 Aaronepower moritz: Well I want what it really is, so in that case Int.
18:50 smls m:  class A { has $.x};  my $a = A.new(x => 42);  say $a.^attributes[0].get_value($a)
18:50 camelia rakudo-moar e717d1: OUTPUT: «42?»
18:50 smls ruoso__: ^^
18:50 sjn moritz: I just tried to look for documentation for $x.VAR.of.^name, and have trouble finding it on docs.perl6.org
18:51 ruoso__ oh, I was looking at the .^methods of the attribute meta-object but missed the get_value from it
18:51 sjn VAR docs say "Returns the underlying Scalar object", but .of seems to be something related to Variable
18:51 ruoso__ oh, I was looking at the .^methods of the attribute meta-object but missed the get_value from it...
18:51 ruoso__ oops, sorry
18:52 sjn is there a documentation bug there?
18:52 ruoso__ ah, I was using a native type to inspect the attribute meta object
18:52 ruoso__ which has a different type of meta-object
18:52 Zoffix sjn: possible. I don't see .of documented on https://docs.perl6.org/type/Scalar.html
18:52 ruoso__ m: say (1).^attributes[0].get_value(23)
18:52 camelia rakudo-moar e717d1: OUTPUT: «No such method 'get_value' for invocant of type 'BOOTSTRAPATTR'?  in block <unit> at <tmp> line 1??»
18:53 Zoffix sjn: would you please report it? https://github.com/perl6/doc/issues/new
18:53 sjn sure
18:53 smls ruoso__: the argument to .get_value needs to be the object that has the attribute.
18:53 Zoffix sjn: hopefully it gets taken care of this Saturday during the SQUASHathon :) You should come. http://blogs.perl.org/users/zoffix_znet/2017/08/youre-invited-community-bug-squashathon.html
18:53 sjn yay! \o/
18:56 Skarsnik m: class A {has $.a is rw; method foo{self."a"()}}; my A $b .= new(:a<foo>); $b.foo;
18:56 camelia rakudo-moar e717d1: ( no output )
18:56 smls sjn: `.VAR` is still magic to me, as well... "Returns the underlying Scalar object"? Well, simply `$x` by itself also evaluates to the Scalar. Somehow VAR returns the Scalar in such a way that it no longer passes through (all) methods? Or something? :)
18:56 Skarsnik m: class A {has $.a is rw; method foo{self."a"()}}; my A $b .= new(:a<foo>); say $b.foo;
18:56 camelia rakudo-moar e717d1: OUTPUT: «foo?»
18:56 Kyo91 joined #perl6
18:56 Skarsnik how to acces attribue dynamicly x)
18:56 ruoso__ smls: not just that, but it has to be the attribute of a proper class... the attribute of the native int type is of a different meta type...
18:57 ruoso__ m: class Foo { has $.a }; say 1.^attributes[0].WHAT; Foo.^attributes[0].WHAT
18:57 camelia rakudo-moar e717d1: OUTPUT: «Cannot look up attributes in a BOOTSTRAPATTR type object?  in block <unit> at <tmp> line 1??»
18:58 ruoso__ m: class Foo { has $.a }; say Foo.^attributes[0].WHAT
18:58 camelia rakudo-moar e717d1: OUTPUT: «(Attribute)?»
18:58 ruoso__ m: say 1.^attributes[0].WHAT
18:58 camelia rakudo-moar e717d1: OUTPUT: «Cannot look up attributes in a BOOTSTRAPATTR type object?  in block <unit> at <tmp> line 1??»
19:01 sjn Zoffix, smls: Filed a bug: https://github.com/perl6/doc/issues/1482
19:03 Zoffix sjn++ Thanks!
19:04 Zoffix ruoso__: if you dig into the deep ends, you get to more and more basic objects that don't necessarily know how to behave in the higher level end of the language (such as how to get output via .gist method)
19:05 ChoHag joined #perl6
19:05 Zoffix m: say 1.^attributes[0].^name
19:05 camelia rakudo-moar e717d1: OUTPUT: «BOOTSTRAPATTR?»
19:08 Ven joined #perl6
19:10 Celelibi joined #perl6
19:14 Geth ¦ doc: b7ef4cb953 | (Moritz Lenz)++ | doc/Type/Scalar.pod6
19:14 Geth ¦ doc: Document Scalar.of
19:14 Geth ¦ doc:
19:14 Geth ¦ doc: sjn++ for pointing out it was not documented
19:14 Geth ¦ doc: review: https://github.com/perl6/doc/commit/b7ef4cb953
19:18 Geth ¦ doc: 374066511c | (Moritz Lenz)++ | doc/Type/Variable.pod6
19:18 Geth ¦ doc: Mention Scalar in Variable docs
19:18 Geth ¦ doc: review: https://github.com/perl6/doc/commit/374066511c
19:21 espadrine joined #perl6
19:22 Zoffix moritz++
19:23 sjn that was fast :)
19:23 sjn moritz++ # speed daemon :D
19:24 moritz you can tell I'm proprastinating :-)
19:24 sjn hehe
19:25 pecastro joined #perl6
19:30 Exodist joined #perl6
19:33 Geth ¦ doc: 3f2098b4c9 | (Moritz Lenz)++ | doc/Language/objects.pod6
19:33 Geth ¦ doc: Remove paragraph with wrong claims about BUILD
19:33 Geth ¦ doc:
19:33 Geth ¦ doc: replace it by something that clearly states that
19:33 Geth ¦ doc: BUILD, TWEAK and BUILDALL are called on instances,
19:33 Geth ¦ doc: and mention that virtual method calls in there are
19:33 Geth ¦ doc: not a terribly bright idea.
19:33 Geth ¦ doc:
19:33 Geth ¦ doc: Closes #1459
19:33 Geth ¦ doc: review: https://github.com/perl6/doc/commit/3f2098b4c9
19:43 Aaronepower Hey, I'm having an issue with where one of the types in my array of Hash objects is an Array, however `$_.WHAT ~~ Array` returns True for Hash's too.
19:44 moritz m: say Hash.new ~~ Array
19:44 camelia rakudo-moar e717d1: OUTPUT: «False?»
19:44 moritz Aaronepower: please add "dd $_;" to the line before the test you've shown us, and copy&paste its result
19:44 pecastro joined #perl6
19:44 moritz Aaronepower: I suspect $_ does not contain what you think it does
19:47 Aaronepower moritz: What is the multi line syntax in perl6?
19:47 moritz Aaronepower: do you mean multi-line strings? or comments? or something else?
19:47 Aaronepower moritz: Sorry comments
19:48 Skarsnik there is none
19:48 Geth ¦ doc: 1bbe316cb2 | (Moritz Lenz)++ | doc/Language/syntax.pod6
19:48 Geth ¦ doc: Add another use case and more examples for term:<>
19:48 Geth ¦ doc:
19:48 Geth ¦ doc: Closes  #1445
19:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/1bbe316cb2
19:48 Skarsnik well you cab use pod for tha
19:48 moritz there's also #`[....]
19:49 moritz which can be used both inline and multi-line
19:49 moritz but I tend to just stick a # on the start of every line.
19:49 Aaronepower Hmm, perl6 seems to take a long time to start up is there anyway to reduce that?
19:50 mcmillhj joined #perl6
19:51 zakharyas joined #perl6
19:51 sjn Aaronepower: first time, perl6 is creating precompile cache files for your code. is that's what's happening, perhaps?
19:51 sjn second and later runs should be faster
19:51 moritz Aaronepower: in the long run, donating to http://www.perlfoundation.org/perl_6_core_development_fund helps
19:51 sjn hehe
19:53 moritz not using really old versions of rakudo can also help, if you're doing that
19:59 Aaronepower Hmm, maybe JSON::Tiny is the problem.
20:00 pecastro joined #perl6
20:00 AlexDaniel define “long time” :)
20:00 AlexDaniel m: say now.Instant
20:00 camelia rakudo-moar e717d1: OUTPUT: «No such method 'Instant' for invocant of type 'Instant'?  in block <unit> at <tmp> line 1??»
20:01 Aaronepower AlexDaniel: Like multiple seconds.
20:01 lizmat hmmm... that feels like an omission  :-)
20:02 tadzik Aaronepower: just loading it, or actual parse time?
20:02 tadzik is perl6 -MJSON::Tiny -e '' long by itself?
20:02 tadzik takes 0.24 seconds here
20:02 Aaronepower tadzik: Parse is instant, it's actually running the code that takes so long.
20:02 tadzik oh, I meant JSON::Tiny parsing things
20:02 moritz Aaronepower: try JSON::Fast
20:03 Wander joined #perl6
20:03 tadzik also, try --profile to see what's slow :)
20:04 AlexDaniel JSON::Tiny is really slow, that's “normal”
20:06 mcmillhj joined #perl6
20:06 b2gills Aaronepower: `$_.WHAT ~~ Array` doesn't tell you anything that `$_ ~~ Array` doesn't already tell you
20:11 Aaronepower This is my code. It classify doesn't seem to do what I expect. The JSON is an array of objects and in classify $_ is just the same array as in @json https://paste.rs/fNw
20:11 leont joined #perl6
20:21 moritz Aaronepower: == Nil looks suspicious; == does numeric comparison
20:22 Aaronepower moritz: Well what is a better way to check if a key exists?
20:22 moritz m: my @json = ({a => 1}, { b => 1 }); say @json.classify({ $_<a>:exists }).perl
20:22 camelia rakudo-moar d13572: OUTPUT: «(my Any %{Any} = Bool::False => $[{:b(1)},], Bool::True => $[{:a(1)},])?»
20:22 moritz m: my @json = ({a => 1}, { b => 1 }); say @json.classify({ $_<a>:exists }){True, False }
20:22 camelia rakudo-moar d13572: OUTPUT: «([{a => 1}] [{b => 1}])?»
20:24 mcmillhj joined #perl6
20:24 Geth ¦ doc: 2f734dba74 | (Moritz Lenz)++ | doc/Language/regexes.pod6
20:24 Geth ¦ doc: Document & and && in regexes. Closes #1145
20:24 Geth ¦ doc: review: https://github.com/perl6/doc/commit/2f734dba74
20:24 moritz I might or might not make it to the squashaton on Saturday, but in any case, I've closed four doc issues now :-)
20:25 Aaronepower moritz: Could you try loading that from the file? and see if it works the problem i think is the type json is giving me?
20:25 Geth ¦ doc: f44b7124cd | (Moritz Lenz)++ | doc/Language/regexes.pod6
20:25 Geth ¦ doc: Actually document & in regexes
20:25 Geth ¦ doc: review: https://github.com/perl6/doc/commit/f44b7124cd
20:26 moritz Aaronepower: you could try my @json = from-json(...).list;
20:26 moritz if it happens to return an array in a scalar, or something other weird
20:26 Skarsnik what does classify do?
20:27 cZBW joined #perl6
20:27 moritz Skarsnik: put values of a list into buckets according to a code block
20:28 Aaronepower Skarsnik: As I understand it's like filter but it also gives you what failed the filter.
20:28 Aaronepower moritz: How do you use `&&` with :exists it gives me `You can't adverb &infix:<&&>` error
20:28 moritz Skarsnik: for example @strings.classify: { .substr(0, 1) } gives you strings grouped by the first character
20:29 moritz Aaronepower: parenthesis :(
20:29 moritz ($_<a>:exists) && ($_<b>:exists)
20:29 MasterDuke moritz: that's a good description. how would you describe categorize (/me can never remember the difference)?
20:32 moritz MasterDuke: the difference seems to be that the block can return multiple categories for .categorize
20:33 moritz m: say <abc ab>.categorize: *.comb
20:33 camelia rakudo-moar d13572: OUTPUT: «{a => [abc ab], b => [abc ab], c => [abc]}?»
20:36 ugexe example cro json resource store service https://gist.github.com/ugexe/644d53553818c245e080679c925f9817
20:40 Geth ¦ doc/molecules-patch-3: b733887eb1 | (Christopher Bottoms)++ (committed using GitHub Web editor) | doc/Language/syntax.pod6
20:40 Geth ¦ doc/molecules-patch-3: removed mention of postcircumfix blocks
20:40 Geth ¦ doc/molecules-patch-3:
20:40 Geth ¦ doc/molecules-patch-3: Deleting to avoid confusion
20:40 Geth ¦ doc/molecules-patch-3: review: https://github.com/perl6/doc/commit/b733887eb1
20:43 mcmillhj joined #perl6
20:44 Zoffix MasterDuke: returning a list of values for classify means multiple classifications while for categorize it means nested categories
20:45 MasterDuke ah, thanks
20:45 Zoffix Also, both can also take a hash or a list as mapper; it doesn't have to be a block
20:47 firefish5000 joined #perl6
20:47 Aaronepower moritz: So the classify is fine, but the results are like arrays of arrays for no apparent reason.
20:47 Cabanossi joined #perl6
20:48 Geth ¦ doc: 27721a05d2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Type/Hash.pod6
20:48 Geth ¦ doc: Fix C<> used instead of L<>
20:48 Geth ¦ doc: review: https://github.com/perl6/doc/commit/27721a05d2
20:52 firefish5000 If I want a new class Int_2, which is Int and accepts Int but has Str overridden. What would I need to do. Or what keywords should I google to find the answer myself?
20:52 moritz are we actually interested in the "(committed using GitHub Web editor)" that Geth reports?
20:53 moritz firefish5000: class Int_2 is Int { method Str() { go crazy here } }
20:53 Skarsnik class Int_2 is Int {method Str() {}}
20:53 Skarsnik damn moritz too fast
20:53 firefish5000 But that doesn't seem to accept Int in assignment=.
20:54 MasterDuke firefish5000: if you're interested in only that case, IntStrs are a built in class
20:55 MasterDuke m: say <1>.WHAT
20:55 camelia rakudo-moar d13572: OUTPUT: «(IntStr)?»
20:55 Skarsnik class Int_2 is Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42;
20:55 Skarsnik m: class Int_2 is Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42; say $a;
20:55 camelia rakudo-moar d13572: OUTPUT: «Type check failed in assignment to $a; expected Int_2 but got Int (42)?  in block <unit> at <tmp> line 1??»
20:55 Skarsnik m: class Int_2 does Int {method Str() {"foo"}}; my Int_2 $a .=new; $a = 42; say $a;
20:55 camelia rakudo-moar d13572: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Int is not composable, so Int_2 cannot compose it?at <tmp>:1?»
20:55 moritz m: class Int_2 is Int {method Str() {"foo"}}; my Int_2(Cool) $a = 42; say $a.Str
20:55 camelia rakudo-moar d13572: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>?Coercion Int_2(Cool) is insufficiently type-like to qualify a variable?at <tmp>:1?------> 3method Str() {"foo"}}; my Int_2(Cool) $a7?5 = 42; say $a.Str?    expecting any of:?        constrain…»
20:56 moritz meh, we don't support coercion types in variables yet
20:56 firefish5000 Ok is it possible to access $!value  (im assuming holds the value) inside Int_2 ?
20:57 mcmillhj joined #perl6
20:57 firefish5000 m: Int.^attributes
20:57 camelia rakudo-moar d13572: ( no output )
20:58 firefish5000 m: Int.^attributes.say
20:58 camelia rakudo-moar d13572: OUTPUT: «(bigint $!value)?»
21:00 samcv j: 0xD4DB.uniname.say
21:00 camelia rakudo-jvm 8a2158: OUTPUT: «java.nio.file.NoSuchFileException: /nqp/lib/Perl6/BOOTSTRAP.jar?  in <anon> (gen/jvm/ModuleLoader.nqp:90)?  in load_module (gen/jvm/ModuleLoader.nqp:77)?  in <anon> (gen/jvm/CORE.setting)?  in <anon> (gen/jvm/ModuleLoader.nqp:255)?  in load_sett…»
21:00 samcv uh oh
21:02 Skarsnik m: 0xD4DB.uniname.say
21:02 camelia rakudo-moar d13572: OUTPUT: «Hangul Syllable PWILH?»
21:02 moritz firefish5000: what are you trying to achieve?
21:05 firefish5000 Simply make an Int like class that Str returns fmt to two digits by default. As a exercise
21:05 Aaronepower moritz: Now with the new ($_<foo>:exists) && ($_<foo>:exists) I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` on the assignment.
21:08 firefish5000 I could do it another way, but thought it would be a good idea to try inheriting or augmenting Int, since I have little experience doing those. I could augment Int to do what I want, but cant seem to easily duplicate the class with a different name and do the same.
21:08 moritz Aaronepower: sorry, I'm going to bed now. If you want help from others, it's always easiest if you include your current code in a nopaste (preferably in a way that doesn't require external input; just inline the data structures you are working with)
21:09 moritz firefish5000: well, you can, you just can't assign an Int to your Int_2 variables; you have to go through the Int_2 constructor
21:09 firefish5000 thanks, moritz. Night!
21:09 moritz sleep&
21:09 Aaronepower moritz: Thanks and night
21:10 Aaronepower Hey why do I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` with https://paste.rs/efg
21:10 firefish5000 And yes, which is why I was also added in a Int and Int_2 method to Int_2 and Int.... but that hasn't worked well so far
21:10 mcmillhj joined #perl6
21:16 firefish5000 m: class Int2 is Int {}; my Int2 $a = Int2.new(34); $a.WHAT.say # I guess my first problem is the non-overriden new returns an Int
21:16 camelia rakudo-moar d13572: OUTPUT: «Type check failed in assignment to $a; expected Int2 but got Int (34)?  in block <unit> at <tmp> line 1??»
21:17 Cabanossi joined #perl6
21:22 cZBW m: class Int2 is Int { method Str {"foo"}}; my Int2 $a .= new( value => 23); $a.WHAT.say
21:22 camelia rakudo-moar d13572: OUTPUT: «(Int2)?»
21:23 Zoffix firefish5000: I wasn't following the discussion, but FWIW, the user-land-subclasses-from-core-types still needs some polish. There's a general ticket on the subject: https://rt.perl.org/Ticket/Display.html?id=130020#ticket-history
21:23 cZBW firefish5000: clumsy, but is that what you want?
21:24 Zoffix moritz: I'm interested in it :) It makes it easy to spot when people likely adding a change they didn't spectest :P
21:25 Zoffix moritz: also that space generally says "commited by SoandSo" which in that case would read "commited by Github" or something
21:25 firefish5000 cZBW, The problem here is the value doesnt actualy change at all. its basicly a class that says foo.
21:26 firefish5000 m: class Int2 is Int { }; my Int2 $a .= new( value => 23); $a.say #no overrides here
21:26 camelia rakudo-moar d13572: OUTPUT: «0?»
21:26 cZBW I see
21:26 firefish5000 the value is always 0 for Int2... and the $!value attribute cant seem to be accessed
21:27 Zoffix m: put 1 but role { method Str { self.fmt: "%.2f" } }
21:27 camelia rakudo-moar : OUTPUT: «Cannot allocate memory»
21:27 Zoffix m: put 1 but role { method Str { self.fmt: "%.2f" } }
21:27 camelia rakudo-moar : OUTPUT: «Cannot allocate memory»
21:27 Zoffix try harder!
21:27 Zoffix m: put 1 but role { method Str { self.fmt: "%.2f" } }
21:27 camelia rakudo-moar d13572: OUTPUT: «1.00?»
21:27 El_Che Zoffix: nice post
21:28 Zoffix firefish5000: just mix in a role to a normal Int, I guess. $!value is both a private attribute and of a special lower-level type. You coul do Int2.new: 42; but then it'll complain that it wants Int2 but you gave an Int, which ultimately goes back to the ticket I mentioned :)
21:28 Zoffix El_Che: thanks
21:29 firefish5000 Zoffix, That could work! thanks
21:29 * Zoffix & for the day
21:29 Zoffix \o
21:32 El_Che o/
21:33 El_Che (after Charlottesville it looks like a neo nazi, sadly)
21:43 cognominal joined #perl6
21:44 firefish5000 A little more wordy than a special class, but definitly easy to implement and doesn't require augmenting. 'say $int but fmt_role; my Int $fmt_int = 4 but fmt_role ; say $fmt_int'  basicly does exactly what I was aiming for, while the former would basicly be type conversion to Int2, and the latter creates an Int2 variable. I have no complaints :D
21:44 firefish5000 thanks again. I now see the light in roles!
21:46 stmuk_ joined #perl6
21:53 BooK so I've been looking more into S06 and the code for dealing with options/long options
21:53 BooK and it seems the complexity is there: The short -foo form never assumes a separate argument, and you must use =. For the --foo form, if there is a named parameter corresponding to the switch name, and it is of type Bool, then no argument is expected. Otherwise an argument is expected. If the parameter is of a non-slurpy array type, all subsequent words up to the next command-line switch (or the end of the list) are bound to that parameter.
21:56 BooK because from what I understand the processing of command-line arguments happens before the call to main, so we can't look at the signature(s) to figure out the bit about the long option described above
21:58 nadim hi, https://nopaste.linux-dev.org/?1161185  I have a bit of a problem with this code; the ticks keep coming, if I pres q first it quits properly. if I press a it also does what it should, once, then pressing a or q does not work. I am doing something wrong? it seems to me that there is a problem with the raw-input-supply.
22:02 BooK nadim: is the 'done' in the 'a' branch meant to be there?
22:03 TEttinger joined #perl6
22:03 BooK if I understand correctly, it exits the react, but $quit is not set, so you're stuck in the loop
22:05 nadim I want to stay in the loop and the react block to be run again
22:05 nadim BooK: salut
22:05 jdv79 .seen konobi
22:05 yoleaux I saw konobi 4 Dec 2016 00:17Z in #perl6: <konobi> your IP transit provider should be able to delegate the in.arpa zones to a nameserver of your choice if you want them to be reverse resolvable
22:06 nadim I use the react block to act on keyboard input and the loop to keep doing that till I press q
22:06 BooK ok
22:07 niceperl joined #perl6
22:09 BooK the "when Tick" is not really needed, is it? since it does nothing
22:10 Rawriful joined #perl6
22:10 nadim it's just to see that something happens in the react, that works perfectly
22:11 BooK in fact, can't you put all the code you want to be run at the beginning of the whenever block?
22:11 BooK so you spent all the time in the react, and only exit when q is pressed
22:11 BooK (I speak from the point of view of someone whose only knowledge of these things comes from seeing a jnthn talk a few days ago)
22:11 BooK so I know barely more than a teddy bear :-)
22:12 BooK and am willing to act as such
22:12 cZBW BooK: they are on par with rubber ducks when it comes to debugging.
22:13 u-ou- joined #perl6
22:13 cZBW ( https://en.wikipedia.org/wiki/Rubber_duck_debugging )
22:14 u-ou- what's a good way to insert a value into an arbitrary position in an array? e.g. [1 3] becomes [1 2 3]
22:14 BooK cZBW: I first learnt of this technique under the name "teddy bear", so I never use the "rubber duck" one :-)
22:15 MasterDuke u-ou-: splice()
22:15 cZBW glad I could expand your expertise on that :D
22:16 BooK actually, I also knew the rubber duck term, just never use it
22:16 BooK http://archive.oreilly.com/pub/a/perl/excerpts/9780596527242/brians-guide.html # this is where I learnt about the bear
22:16 u-ou- MasterDuke: can you show me an example usage?
22:17 cZBW BooK: thx :)
22:17 BooK u-ou-: https://docs.perl6.org/routine/splice
22:17 geekosaur actually I have one small problem with "rubber duck debugging"
22:17 BooK cZBW: different schools of debugging :-) there should probably be a religious war, and a schism
22:17 MasterDuke m: my @a = ^3; @a.splice(2, "b"); say @a
22:17 camelia rakudo-moar d13572: OUTPUT: «Cannot resolve caller splice(Array: Int, Str); none of these signatures match:?    (Array:D \SELF: *%_)?    (Array:D $: Whatever, *%_)?    (Array:D $: Callable:D $offset, *%_)?    (Array:D $: Int:D $offset, *%_)?    (Array:D $: Whatever, Whatev…»
22:17 cZBW BooK: naah :D
22:18 cZBW BooK, I really believe they are idempotent :)
22:18 leont joined #perl6
22:18 MasterDuke m: my @a = ^3; @a.splice(2, 1, "b"); say @a
22:18 camelia rakudo-moar d13572: OUTPUT: «[0 1 b]?»
22:18 MasterDuke m: my @a = ^3; @a.splice(2, 0, "b"); say @a
22:18 camelia rakudo-moar d13572: OUTPUT: «[0 1 b 2]?»
22:18 geekosaur I first learned those were things from my little sister watching sesame street. so it's permanently linked with ernie singing in the bathtub >.>
22:19 u-ou- ahhh, thanks
22:19 u-ou- I didn't think about 0 for the elms arg
22:19 cZBW geekosaur: well, and does that help?? XD
22:22 BooK cZBW: feathers and fur? inconceivable!
22:22 cZBW BooK: rubber feathers and polyester fur... same class
22:22 BooK heh
22:23 preaction one seems more comforting when things are _really_ broken though...
22:23 Aaronepower Hey why do I get `Type check failed in binding to parameter '@correct'; expected Positional but got Any (Any)` on the classify line? https://paste.rs/efg
22:24 geekosaur 'Gods be feathered!' >.>
22:25 BooK my bear is usually an irc channel, anyway
22:25 Ven`` joined #perl6
22:28 cZBW I can recommend using coworkers. the longer they have to walk from their desk after I ask them to look at my code / problem - the more probable it becomes that by the time they arrive I spotted my own very embarassing mistake. Must be some kind of reciprocal law.
22:32 Sgeo joined #perl6
22:32 tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists}, (True, False)).perl.say;
22:32 camelia rakudo-moar d13572: OUTPUT: «Cannot resolve caller classify(Array: Block, List); none of these signatures match:?    ($: *%_)?    ($: Whatever, *%_)?    ($: $test, :$into!, :&as, *%_)?    ($: $test, :&as, *%_)?  in block <unit> at <tmp> line 1??»
22:32 tony-o gah
22:34 tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists} ?? True !! False).say;
22:34 camelia rakudo-moar d13572: OUTPUT: «Cannot resolve caller classify-list(Hash[Any,Any]: Bool, Array, :as(Callable)); none of these signatures match:?    (Hash $: &test, \list, :&as, *%_)?    (Hash $: %test, |c is raw)?    (Hash $: @test, |c is raw)?    (Hash $: &test, **@list, |c is…»
22:34 tony-o m: my @j = [{ duration => 1 }, { x => 0 }]; @j.classify({ $_<duration>:exists ?? True !! False }).say;
22:34 camelia rakudo-moar d13572: OUTPUT: «{False => [{x => 0}], True => [{duration => 1}]}?»
22:35 Sgeo_ joined #perl6
22:37 Aaronepower tony-o: So why do I get that type error?
22:39 ShalokShalom joined #perl6
22:41 cognominal joined #perl6
22:50 jferrero joined #perl6
23:02 Cabanossi joined #perl6
23:05 pecastro joined #perl6
23:10 BooK m: enum Foo < a b c >; Foo.^add_enum_value( d => 3 );  Foo.^enum_values.say
23:10 camelia rakudo-moar d13572: OUTPUT: «Too few positionals passed; expected 3 arguments but got 2?  in block <unit> at <tmp> line 1??»
23:10 BooK I was reading Metamodel::EnumHOW and was trying out some of the methods I found there
23:12 BooK all because https://docs.perl6.org/type/Metamodel::EnumHOW gave me a 404
23:19 Aaronepower I though perl6 didn't have enums?
23:24 Geth ¦ doc/book/class-how: 0b58f3716d | (Philippe Bruhat (BooK))++ | doc/Type/Metamodel/ClassHOW.pod6
23:24 Geth ¦ doc/book/class-how: Add a missing invocant to the method definition
23:24 Geth ¦ doc/book/class-how: review: https://github.com/perl6/doc/commit/0b58f3716d
23:24 Geth ¦ doc: book++ created pull request #1483: Add a missing invocant to the method definition
23:24 Geth ¦ doc: review: https://github.com/perl6/doc/pull/1483
23:26 BooK m: say Order.HOW; say Order.^enum_values;
23:26 camelia rakudo-moar d13572: OUTPUT: «Perl6::Metamodel::EnumHOW.new?{Less => -1, More => 1, Same => 0}?»
23:37 u-ou- joined #perl6
23:37 u-ou- my $x = 1; given $x { $x = 2 when 1; say 'hi' when 2; }
23:37 u-ou- m: my $x = 1; given $x { $x = 2 when 1; say 'hi' when 2; }
23:37 camelia rakudo-moar d13572: OUTPUT: «hi?»
23:37 u-ou- is this a bug?
23:38 BooK m: say Bool.enums; say Order.enums;
23:38 camelia rakudo-moar d13572: OUTPUT: «{False => 0, True => 1}?Map.new((:Less(-1),:More(1),:Same(0)))?»
23:39 BooK why the difference ?
23:40 BooK m: say Order.HOW ~~ Bool.HOW
23:40 camelia rakudo-moar d13572: OUTPUT: «False?»
23:40 BooK mmm
23:41 BooK m: say Order.HOW.WHAT ~~ Bool.HOW.WHAT
23:41 camelia rakudo-moar d13572: OUTPUT: «True?»
23:41 skids joined #perl6
23:42 ugexe u-ou-: i would assume so since there is no continue
23:42 u-ou- ugexe: it acts differently if the whens are blocks
23:42 ugexe ah nm
23:42 u-ou- I think the behavior is supposed to do that with a proceed
23:43 u-ou- m: my $x = 1; given $x { when 1 { $x = 2 }; when 2 { say 'hi' } }
23:43 camelia rakudo-moar d13572: ( no output )
23:43 u-ou- m: my $x = 1; given $x { when 1 { $x = 2; proceed }; when 2 { say 'hi' } }
23:43 camelia rakudo-moar d13572: OUTPUT: «hi?»
23:44 Sgeo joined #perl6
23:44 u-ou- no proceed in my first example and still it executes
23:44 u-ou- maybe it's supposed to. just checking
23:45 ugexe m: my $x = 1; given $x -> $_ is copy { $x = 2 when 1; say "hi" when 2; }
23:45 camelia rakudo-moar d13572: ( no output )
23:47 ugexe yeah im not sure if its a bug or not
23:47 u-ou- alright
23:50 BooK m: my $x = 1; given $x -> $_ is copy { $x = 2 andthen proceed when 1; say "hi" when 2; }
23:50 camelia rakudo-moar d13572: OUTPUT: «proceed without when clause?  in block  at <tmp> line 1?  in block <unit> at <tmp> line 1??»
23:50 BooK I still don't much it seems :-)
23:51 u-ou- lunch time :)
23:52 BooK m: say Order.HOW; say Order.^enum_values;
23:52 camelia rakudo-moar d13572: OUTPUT: «Perl6::Metamodel::EnumHOW.new?{Less => -1, More => 1, Same => 0}?»
23:52 BooK I think the above is because of:
23:52 BooK Bool.^add_method('enums', my method enums() { self.^enum_values });
23:53 BooK method enums() { self.^enum_values.Map } # in Enumeration.pm (which is a Role)
23:54 travis-ci joined #perl6
23:54 travis-ci Doc build passed. Philippe Bruhat (BooK) 'Add a missing invocant to the method definition'
23:54 travis-ci https://travis-ci.org/perl6/doc/builds/270627884 https://github.com/perl6/doc/commit/0b58f3716dce
23:54 travis-ci left #perl6
23:54 Sgeo_ joined #perl6
23:56 skids .tell u-ou- According to S04: "There is a C<when> statement modifier, but it does not have any breakout semantics; it is merely a smartmatch against the current topic."
23:56 yoleaux skids: I'll pass your message to u-ou-.
23:56 mcmillhj joined #perl6

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

Perl 6 | Reference Documentation | Rakudo