Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-01-16

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:00 brokenchicken ok
00:00 BenGoldberg . o O (●0)
00:00 AlexDaniel I was in the process of labeling stuff and got distracted…
00:00 BenGoldberg AlexDaniel, That's a green circle, right?
00:00 AlexDaniel BenGoldberg: looks green, yes!
00:00 AlexDaniel u: ●
00:00 unicodable6 AlexDaniel, U+25CF BLACK CIRCLE [So] (●)
00:00 AlexDaniel wait, but that's black
00:00 brokenchicken Hah, that one looks white on my screen
00:00 BenGoldberg I cheated ;)
00:01 BenGoldberg Irc color codes.
00:01 brokenchicken doh
00:01 AlexDaniel doh…
00:01 AlexDaniel tricked me
00:01 brokenchicken :)
00:01 brokenchicken AlexDaniel: what's this stuff? The # >; Looks like fix for broken highlighting? https://github.com/perl6/whatevera​ble/blob/master/Unicodable.p6#L135
00:02 AlexDaniel brokenchicken: yep, damn perl6-mode
00:02 brokenchicken Hm. Without it, it's actually not borken in Atom, but *with* it is is :}
00:02 AlexDaniel ha
00:02 brokenchicken It seem to think the comment is part of the quote words.
00:03 brokenchicken Now I know how it feels when I tell you patches welcome :P
00:03 brokenchicken .oO( except my code is perfectly readable, of course! )
00:04 espadrine_ joined #perl6
00:04 AlexDaniel brokenchicken: you want to add the number of results? This is the line: https://github.com/perl6/whatevera​ble/blob/master/Unicodable.p6#L151
00:05 AlexDaniel it should return nothing
00:05 AlexDaniel and instead do this: https://github.com/perl6/whateverabl​e/blob/master/Whateverable.pm6#L297
00:06 brokenchicken Too hard!
00:06 * brokenchicken goes back to playing video games :)
00:06 brokenchicken Oh, now I get what you mean....
00:07 AlexDaniel because if it returns a huge string it gets gisted automatically, and so you cannot really change the format
00:07 AlexDaniel instead return nothing, and upload manually
00:08 brokenchicken I'd go with returning the thing, but with some meta data indicating what the response should be
00:08 AlexDaniel oh, that would be awesome!
00:08 brokenchicken k, will do it either tonight or tomorrow
00:09 AlexDaniel then, there's this thing: https://github.com/perl6/whateverab​le/blob/master/Whateverable.pm6#L52
00:09 AlexDaniel and I dunno… perhaps it is a better idea to mix in some roles instead
00:12 brokenchicken IIRC you can return any object from an event and it'd reach the filter just fine (even if it's not "is Str")
00:12 labster joined #perl6
00:14 AlexDaniel yup, I think I wanted it to act like a Str when needed. But any kind of refactoring will be appreciated :)
00:14 brokenchicken ok
00:22 lmmx joined #perl6
00:23 rascipi joined #perl6
00:51 aborazmeh joined #perl6
00:51 aborazmeh joined #perl6
00:51 mr_ron joined #perl6
00:55 shayan_ joined #perl6
00:57 SmokeMachine how do I write yada (...) on nap?
00:57 timotimo depends on what effect you want
00:58 timotimo ... turns into warn "stub code executed" i believe
00:58 timotimo or maybe die "stub code executed"
00:58 SmokeMachine timotimo: die...
00:58 SmokeMachine I just die?
00:58 SmokeMachine is that message anywere? some kind of constant?
00:59 timotimo could be a typed exception
00:59 timotimo m: sub ow { ... }; try ow(); say $!.WHAT
00:59 camelia rakudo-moar 7f9703: OUTPUT«(StubCode)␤»
00:59 timotimo ah
00:59 timotimo m: die X::StubCode.new()
00:59 camelia rakudo-moar 7f9703: OUTPUT«Stub code executed␤  in block <unit> at <tmp> line 1␤␤»
00:59 timotimo like that
00:59 SmokeMachine StubCode!
00:59 SmokeMachine thanks!
01:00 brokenchicken SmokeMachine: what's "nap"?
01:00 SmokeMachine brokenchicken: nap? where?
01:00 brokenchicken SmokeMachi+│ how do I write yada (...) on nap?
01:00 timotimo supposed to be nqp
01:00 SmokeMachine ah! nqp!
01:00 brokenchicken Ah
01:01 SmokeMachine auto correction, sorry...
01:01 dugword m: my $foo; say "hello" if $foo == 0
01:01 camelia rakudo-moar 7f9703: OUTPUT«Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤hello␤»
01:01 * BenGoldberg doesn't understand why any programmer would have autocorrect turned on.
01:02 brokenchicken dugword: undef Numerics are zeros
01:02 brokenchicken more or less... I recall ranting about this while spotting a ton of bugs with the feature....
01:02 dugword brokenchicken: I don't know what you mean by that...
01:03 brokenchicken umm
01:03 brokenchicken Never mind. I'll wait for the question, I guess.
01:03 dugword Wait, I get what you mean.
01:04 dugword $foo would be 0, so it is true. The question is, should that warn?
01:04 SmokeMachine "git grep StubCode src/Perl6/" only returns code on Action... when writing qast... :(
01:04 brokenchicken m: quietly .say for Int, Num, Rat, Complex
01:04 camelia rakudo-moar 7f9703: OUTPUT«(Int)␤(Num)␤(Rat)␤(Complex)␤»
01:04 dugword I feel like I am going to run into that situation a lot
01:04 itcharlie1 joined #perl6
01:04 brokenchicken m: quietly _say +$_ for Int, Num, Rat, Complex
01:04 camelia rakudo-moar 7f9703: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    _say used at line 1␤␤»
01:04 brokenchicken m: quietly say +$_ for Int, Num, Rat, Complex
01:04 camelia rakudo-moar 7f9703: OUTPUT«0␤0␤0␤0␤»
01:04 brokenchicken dugword: um, it *does* warn
01:04 brokenchicken "Use of uninitialized value of type Any in numeric context"
01:04 dugword right, should it?
01:05 brokenchicken dugword: you mean should it silently assume it's a zero?
01:05 SmokeMachine and it wasnt compiling because I
01:05 brokenchicken Definitely not. I'd go the other way: throw
01:05 SmokeMachine forgot the () on die...
01:05 * brokenchicken looks for the aforementioned rant
01:06 brokenchicken hm... if only I knew what nick said it...
01:06 dugword Yeah, perl 5 quietly assumes it is a zero. Which doesn't mean it should, I just noticed that difference
01:07 brokenchicken dugword: if you write idiomatic perl 5, it warns the same.
01:07 brokenchicken dugword: here's my rant on the topic: https://irclog.perlgeek.de/pe​rl6-dev/2016-12-19#i_13767071
01:07 dugword Oh, so it does. If you have 'use warnings' turned on :) .
01:07 brokenchicken Or an exhibit of the bugs with this system, depending on how you wanna look at it :)
01:07 tardisx joined #perl6
01:08 dugword my apologies, I am up to my eyeballs in legacy code that relies on that behavior. Trying to port over some old perl 5 code
01:08 brokenchicken heh :)
01:09 dugword Seemed odd at the time, but thinking it through. Yes, warning makes much more sense.
01:23 kyan joined #perl6
01:33 aborazmeh joined #perl6
01:33 aborazmeh joined #perl6
02:00 SmokeMachine there's no examples os die with an object on nqp code...
02:01 SmokeMachine and nqp::die(X::StubCode.new()) gives me:
02:01 SmokeMachine https://www.irccloud.com/pastebin/AE1b2ZF9/
02:06 brokenchicken SmokeMachine: just die with "Stub code executed" or whatever
02:06 brokenchicken s: StubCode.new, 'CALL-ME'
02:06 SourceBaby brokenchicken, Something's wrong: â�¤ERR: [31m===[0mSORRY![31m===[0m Error while compiling -eâ�¤Undeclared name:â�¤    StubCode used at line 6â�¤â�¤
02:06 brokenchicken s: X::StubCode.new, 'CALL-ME'
02:06 SourceBaby brokenchicken, Something's wrong: ␤ERR: Type check failed in binding to &code; expected Callable but got Nil (Nil)␤  in sub do-sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 42␤  in sub sourcery at /home/zoffix/services/lib/CoreHackers-​Sourcery/lib/CoreHackers/Sourcery.pm6 (CoreHackers::Sourcery) line 33␤  in block <unit> at -e line 6␤␤
02:06 brokenchicken oh right
02:06 brokenchicken SmokeMachine: never mind.
02:09 brokenchicken s: &die
02:09 SourceBaby brokenchicken, Sauce is at https://github.com/rakudo/rakudo/bl​ob/7f97035/src/core/control.pm#L167
02:09 Herby_ joined #perl6
02:09 brokenchicken s: X::AdHoc.new, 'throw'
02:09 SourceBaby brokenchicken, Sauce is at https://github.com/rakudo/rakudo/blo​b/7f97035/src/core/Exception.pm#L53
02:09 Herby_ o/
02:10 brokenchicken SmokeMachine: that's prolly a clue: https://github.com/rakudo/rakudo/blob/​7f97035/src/core/Exception.pm#L53-L64
02:10 Herby_ Evening, everyone
02:10 brokenchicken \o
02:11 Herby_ anyone know of a tutorial/guide on slicing strings in p6?
02:11 Herby_ ex: grabbing the first 5 characters, dropping the last character etc...
02:12 brokenchicken m: "12345654321".substr(5).say
02:12 camelia rakudo-moar 7f9703: OUTPUT«654321␤»
02:12 brokenchicken m: "12345654321".substr(5).substr(*-5).say
02:12 camelia rakudo-moar 7f9703: OUTPUT«54321␤»
02:12 brokenchicken m: "12345654321".substr(5).substr(0, *-5).say
02:12 camelia rakudo-moar 7f9703: OUTPUT«6␤»
02:12 Herby_ ah, that looks like what I'm looking for :)
02:13 Herby_ m: "Drop the last character".substr(*-1)
02:13 camelia rakudo-moar 7f9703: ( no output )
02:14 Herby_ m: "Drop the last character".substr(*-2).say
02:14 camelia rakudo-moar 7f9703: OUTPUT«er␤»
02:14 Herby_ m: "Drop the last character".substr(*-1).say
02:14 camelia rakudo-moar 7f9703: OUTPUT«r␤»
02:14 Herby_ :(
02:14 brokenchicken m: "1234567890".comb.kv.grep(*.key %% 2).map(*.value).join.say
02:14 camelia rakudo-moar 7f9703: OUTPUT«No such method 'key' for invocant of type 'Int'␤  in whatevercode  at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
02:15 brokenchicken m: "1234567890".comb.pairs.grep(*.key %% 2).map(*.value).join.say
02:15 camelia rakudo-moar 7f9703: OUTPUT«13579␤»
02:15 Herby_ m: "Drop the last character".substr(0,*-1).say
02:15 camelia rakudo-moar 7f9703: OUTPUT«Drop the last characte␤»
02:15 Herby_ there we go
02:15 brokenchicken m: "Drop the last character".chop.say
02:15 camelia rakudo-moar 7f9703: OUTPUT«Drop the last characte␤»
02:15 Herby_ learn something new every day :)
02:15 brokenchicken m: "Drop the last character".chop(10).say
02:15 camelia rakudo-moar 7f9703: OUTPUT«Drop the last␤»
02:15 tardisx joined #perl6
02:15 Herby_ thanks, brokenchicken!
02:16 brokenchicken m: "Drop the last character".chop(14).substr(*-1, 'beat').say
02:16 camelia rakudo-moar 7f9703: OUTPUT«Earlier failure:␤ Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5beat' (indicated by ⏏)␤  in block <unit> at <tmp> line 1␤␤Final error:␤ Type check failed in assignment to $chars; expected Int bu…»
02:16 brokenchicken m: "Drop the last character".chop(14).substr(*, *-1 'beat').say
02:16 camelia rakudo-moar 7f9703: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in argument list; couldn't find final ')' ␤at <tmp>:1␤------> 3e last character".chop(14).substr(*, *-17⏏5 'beat').say␤    expecting any of:␤        infix␤        i…»
02:16 SmokeMachine brokenchicken: thanks!
02:18 Herby_ m: "remove spaces and drop last character".subst(/\s/,"").chop.say
02:18 camelia rakudo-moar 7f9703: OUTPUT«removespaces and drop last characte␤»
02:18 Herby_ m: "remove spaces and drop last character".subst(/\s/,"", :g).chop.say
02:18 camelia rakudo-moar 7f9703: OUTPUT«removespacesanddroplastcharacte␤»
02:18 Herby_ perfect
02:19 brokenchicken m: "remove spaces and drop last character".words.chop.say
02:19 camelia rakudo-moar 7f9703: OUTPUT«remove spaces and drop last characte␤»
02:19 brokenchicken :/
02:20 brokenchicken ah, right
02:20 brokenchicken m: "remove spaces and drop last character".words.join.chop.say
02:20 camelia rakudo-moar 7f9703: OUTPUT«removespacesanddroplastcharacte␤»
02:20 Herby_ i figured there was a cleaner way to do it
02:22 brokenchicken m: .chop(14).substr-rw(*-1) = 'beat' andthen .say given $ = "Drop the last character"
02:22 brokenchicken It *does* have writable str?
02:22 camelia rakudo-moar 7f9703: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
02:23 brokenchicken m: .substr-rw(*-1) = 'beat' andthen .say given $ = "Drop the last character"
02:23 camelia rakudo-moar 7f9703: OUTPUT«b␤»
02:23 brokenchicken I see.
02:23 brokenchicken m: .= chop(14) andthen .substr-rw(*-1) = 'beat' andthen .say given $ = "Drop the last character"
02:23 camelia rakudo-moar 7f9703: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix .= instead␤at <tmp>:1␤------> 3.=7⏏5 chop(14) andthen .substr-rw(*-1) = 'bea␤»
02:23 brokenchicken m: $_ .= chop(14) andthen .substr-rw(*-1) = 'beat' andthen .say given $ = "Drop the last character"
02:23 camelia rakudo-moar 7f9703: OUTPUT«b␤»
02:23 brokenchicken m: $_ .= chop(14) andthen .substr-rw(0, *-1) = 'beat' andthen .say given $ = "Drop the last character"
02:23 camelia rakudo-moar 7f9703: OUTPUT«beat ␤»
02:23 brokenchicken -_-
02:24 Herby_ brokenchicken: if you're feeling adventurous, I have another question
02:24 brokenchicken m: $_ .= chop(14) andthen .substr-rw(*-1) = $_ ~ 'beat' andthen .say given $ = "Drop the last character"
02:24 camelia rakudo-moar 7f9703: OUTPUT«D␤»
02:25 brokenchicken m: $_ .= chop(14) andthen .substr-rw(0, *-1) = $_ ~ 'beat' andthen .say given $ = "Drop the last character"
02:25 camelia rakudo-moar 7f9703: OUTPUT«Drop the␤»
02:25 brokenchicken gah!
02:25 Herby_ I have a CSV. the only column I'm really concerned with is the final column. an example here: http://pastebin.com/SvqMp3Zf
02:25 Herby_ i need to create a regex similar to Python's re.findall
02:25 brokenchicken buggable: eco Text::CSV
02:25 buggable brokenchicken, Text::CSV 'Handle CSV data. API based on Text::CSV_XS': https://github.com/Tux/CSV
02:26 Herby_ yep, I'm using a CSV parser. I'm getting stuck on the regex, to capture tuple I guess
02:26 mls joined #perl6
02:26 Herby_ I'd like to return: (250, W12345, FFP, E7777) from that cell
02:27 Herby_ I can't figure out how to use a global match
02:27 labster joined #perl6
02:27 brokenchicken Herby_: what's "noise"?
02:28 Herby_ random characters: the format will always be  VOLUME\nNOISE\nUNIT\nPRODUCT\nNOISE\nECODE
02:29 Herby_ I want to return (volume, unit, product, ecode)
02:29 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤F​FP␤noise␤E7777".lines[2,4,5,7].say
02:29 camelia rakudo-moar 7f9703: OUTPUT«(250 W12345 FFP E7777)␤»
02:30 Herby_ the final kicker is you could have that pattern several times in that cell. so I could return multiple matches of (volume,unit,product,ecode)
02:30 Herby_ for that cell
02:31 Herby_ i have the script working in python, using re.findall to grab the group of matches, but i'd like to convert it to p6
02:31 Herby_ this is the barrier for me
02:31 brokenchicken m: "Product components␤noise␤250␤noise␤W12345​␤FFP␤noise␤E7777".lines.elems.say
02:31 camelia rakudo-moar 7f9703: OUTPUT«8␤»
02:33 brokenchicken Herby_: so it'd be "Product components␤noise␤250␤noise␤W12345␤FFP␤noise␤​E7777␤2502␤noise␤W123452␤FFP2␤noise␤E77772" ?
02:33 Herby_ yep
02:37 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FFP␤noise␤E777​7␤2502␤noise␤W123452␤FFP2␤noise␤E77772".match(/^ [\N+\n]**2 [ $<thing1>=\N+ \n \N+\n $<thing2>=\N+ \n $<thing3>=\N+ \n \N+\n $<thing4>=\N \n? ]+/).caps.say
02:37 camelia rakudo-moar 7f9703: OUTPUT«(thing1 => 「250」 thing2 => 「W12345」 thing3 => 「FFP」 thing4 => 「E」 thing1 => 「7777」 thing2 => 「noise」 thing3 => 「W123452」 thing4 => 「n」)␤»
02:39 brokenchicken something or other
02:41 brokenchicken hmmm
02:41 Herby_ i think that might get me on the right track
02:46 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FFP␤noise␤​E7777␤2502␤noise␤W123452␤FFP2␤noise␤E77772".​lines[2..*].lines[[2+$++,4+$++,5+$++,7+$++] xx *].say
02:46 camelia rakudo-moar 7f9703: OUTPUT«()␤»
02:46 lmmx joined #perl6
02:46 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FFP␤no​ise␤E7777␤2502␤noise␤W123452␤FFP2␤noise␤​E77772".lines[2..*].lines[[2,4,5,7]].say
02:46 camelia rakudo-moar 7f9703: OUTPUT«(Nil Nil Nil Nil)␤»
02:46 brokenchicken All Nil?
02:46 dugword m: my @foo = [[1,2,3]]; dd @foo
02:46 camelia rakudo-moar 7f9703: OUTPUT«Array @foo = [1, 2, 3]␤»
02:46 dugword m: my @foo = [[1,2,3]]; say @foo[0][0]
02:46 camelia rakudo-moar 7f9703: OUTPUT«1␤»
02:46 SmokeMachine what does nqp::decont()?
02:46 dugword m: my @foo = [[1,2,3]]; say @foo[0][1]
02:46 camelia rakudo-moar 7f9703: OUTPUT«Index out of range. Is: 1, should be in 0..0␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
02:46 dugword Should that create a nested array?
02:47 ilbot3 joined #perl6
02:47 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:48 brokenchicken something's weird going on...
02:48 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FFP␤n​oise␤E7777␤2502␤noise␤W123452␤FFP2␤nois​e␤E77772".lines[2..*].lines[[0,2,3,5] xx *].say
02:48 camelia rakudo-moar 7f9703: OUTPUT«()␤»
02:49 brokenchicken m: <a b c d e f g h i j k l m n o p q>.[[0,2,3,5] xx *].say
02:49 brokenchicken Oh, doh.
02:49 brokenchicken Tis what rotor's for
02:49 camelia rakudo-moar 7f9703: OUTPUT«(timeout)»
02:50 brokenchicken Herby_: but wait! There's a better way!
02:51 curt_ joined #perl6
02:51 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FF​P␤noise␤E7777␤2502␤noise␤W123452␤FFP​2␤noise␤E77772".lines[2..*].rotor(1, 1 => 1, 1, 1 => 1).say
02:51 camelia rakudo-moar 7f9703: OUTPUT«((250) (noise) (FFP) (noise) (2502) (noise) (FFP2) (noise))␤»
02:51 brokenchicken Well, I thought this would work :/
02:52 brokenchicken oh right >_<
02:52 Herby_ hmm
02:52 brokenchicken m: "Product components␤noise␤250␤noise␤W12345␤FFP␤noi​se␤E7777␤2502␤noise␤W123452␤FFP2␤noise␤E7​7772".lines[2..*].rotor(6)»[0,2,3,5].say
02:52 camelia rakudo-moar 7f9703: OUTPUT«((250 W12345 FFP E7777) (2502 W123452 FFP2 E77772))␤»
02:52 brokenchicken there we go
02:54 Herby_ hmmmmmm
02:55 Herby_ gonna hop on the work laptop and give it a shot, thanks!
02:56 brokenchicken feels like there's a bugglet harding..
02:56 brokenchicken m: my @a = 'a'..'z'; say @a[[0,2,3,5], [0,2,3,5], [0,2,3,5]][^3]
02:56 camelia rakudo-moar 7f9703: OUTPUT«((a c d f) (a c d f) (a c d f))␤»
02:56 brokenchicken m: my @a = 'a'..'z'; say @a[lazy [0,2,3,5], [0,2,3,5], [0,2,3,5]][^3]
02:56 camelia rakudo-moar 7f9703: OUTPUT«(e e e)␤»
02:56 brokenchicken Why does it numify them...
02:56 brokenchicken m: my @a = 'a'..'z'; say @a[[0,2,3,5] xx 3][^3]
02:56 camelia rakudo-moar 7f9703: OUTPUT«((a c d f) (a c d f) (a c d f))␤»
02:57 brokenchicken curiouser and curiouser
02:57 brokenchicken m: [[0,2,3,5] xx *][^3]
02:57 camelia rakudo-moar 7f9703: ( no output )
02:57 brokenchicken m: [[0,2,3,5] xx *][^3].say
02:57 camelia rakudo-moar 7f9703: OUTPUT«([0 2 3 5] [0 2 3 5] [0 2 3 5])␤»
02:57 SmokeMachine Why when I do X::StubCode.new() it returns a NPQMu?
02:58 brokenchicken m: my @a = 'a'..'z'; say @a[ [0+$++,2+$++,3+$++,5+$++] xx * ][^3]
02:58 camelia rakudo-moar 7f9703: OUTPUT«(timeout)»
02:58 brokenchicken m: say [ [0+$++,2+$++,3+$++,5+$++] xx * ][^3]
02:58 camelia rakudo-moar 7f9703: OUTPUT«([0 2 3 5] [1 3 4 6] [2 4 5 7])␤»
02:59 brokenchicken Ah, k; it hangs cause it numifies them and never gets to the end of the array.
02:59 brokenchicken m: say WHAT X::StubCode.new
02:59 camelia rakudo-moar 7f9703: OUTPUT«(StubCode)␤»
02:59 brokenchicken SmokeMachine: seems it's not?
02:59 BenGoldberg m: my @a = 'a'..'z'; say @a[ [[0+$++,2+$++,3+$++,5+$++] xx * ][^3] ]
02:59 camelia rakudo-moar 7f9703: OUTPUT«(e e e)␤»
03:01 brokenchicken bisectable6: m: my @a = 'a'..'z'; say @a[lazy [0,2,3,5], [0,2,3,5], [0,2,3,5]][^3]
03:01 bisectable6 brokenchicken, On both starting points (old=2015.12 new=7f97035) the exit code is 0 and the output is identical as well
03:01 bisectable6 brokenchicken, Output on both points: (e e e)
03:01 BenGoldberg m: my @a = 'a'..'z'; say @a[ [eager [0+$++,2+$++,3+$++,5+$++] xx * ][^3] ]
03:01 brokenchicken :/
03:01 BenGoldberg D'oh, that's gonna timeout
03:01 camelia rakudo-moar 7f9703: OUTPUT«(timeout)»
03:01 brokenchicken bisectable6: m: my @a = 'a'..'g'; say @a[lazy ^10][^3]
03:01 bisectable6 brokenchicken, On both starting points (old=2015.12 new=7f97035) the exit code is 0 and the output is identical as well
03:01 bisectable6 brokenchicken, Output on both points: (a b c)
03:01 brokenchicken oops
03:01 brokenchicken m: my @a = 'a'..'g'; say @a[lazy ^10][^3]
03:01 camelia rakudo-moar 7f9703: OUTPUT«(a b c)␤»
03:02 SmokeMachine brokenchicken: it's here:
03:02 SmokeMachine https://github.com/FCO/rakudo/blob/punning_interf​ace_roles/src/Perl6/Metamodel/RolePunning.nqp#L39
03:02 brokenchicken Looks like the lazy version makes an incorrect assumption about all the stuff given to it being a numeric
03:03 brokenchicken nqp: say(X::StubCode.new())
03:03 camelia nqp-moarvm: OUTPUT«cannot stringify this␤   at gen/moar/stage2/NQPCORE.setting:713  (/home/camelia/rakudo-m-inst-1/share/​nqp/lib/NQPCORE.setting.moarvm:join)␤ from gen/moar/stage2/NQPCORE.setting:702  (/home/camelia/rakudo-m-inst-1/share/​nqp/lib/NQPCORE.setting.moarvm:say)␤ fr…»
03:03 brokenchicken nqp: say(X::StubCode.new().HOW.name(X::StubCode.new()))
03:03 camelia nqp-moarvm: OUTPUT«NQPMu␤»
03:03 brokenchicken nqp: say(X::StubYourMamma.new().HO​W.name(X::WhatevsBruh.new()))
03:03 camelia nqp-moarvm: OUTPUT«NQPMu␤»
03:04 SmokeMachine brokenchicken: any advice?
03:06 brokenchicken SmokeMachine: it ain't got that class up in there.
03:06 SmokeMachine brokenchicken: so, how could I get the stub exception message?
03:07 brokenchicken SmokeMachine: you could try  $*W.find_symbol(['X', 'SubCode']).new()
03:07 SmokeMachine do I have the $*W there?
03:07 brokenchicken TIAS
03:08 brokenchicken anothing thing to try is to stub it
03:10 SmokeMachine brokenchicken: Cannot find method 'find_symbol' on object of type NQPMu
03:23 labster joined #perl6
03:23 tardisx joined #perl6
03:23 tardisx left #perl6
03:34 nowan joined #perl6
03:56 curt_ joined #perl6
04:09 tardisx joined #perl6
04:20 tardisx joined #perl6
04:57 flexibeast joined #perl6
04:59 dugword joined #perl6
05:01 tardisx joined #perl6
05:11 itcharlie1 left #perl6
05:17 azawawi joined #perl6
05:17 azawawi good morning #perl6
05:18 azawawi .tell RabidGravy Shorter code without get- and set- prefixes https://github.com/azawawi/perl6-gtk​-scintilla/blob/master/t/02-basic.t :)
05:18 yoleaux azawawi: I'll pass your message to RabidGravy.
05:22 CIAvash joined #perl6
05:22 vendethiel joined #perl6
05:25 f3ew joined #perl6
05:25 llfourn joined #perl6
05:25 simcop2387 joined #perl6
05:40 Cabanossi joined #perl6
05:51 Geth doc: flexibeast++ created pull request #1139: Add link to method `connect` in class `IO::Socket::Async`.
05:51 Geth doc: review: https://github.com/perl6/doc/pull/1139
06:01 xtreak joined #perl6
06:24 Actualeyes joined #perl6
06:32 xtreak joined #perl6
06:37 grumble joined #perl6
06:39 geekosaur joined #perl6
06:49 RabidGravy joined #perl6
06:54 xtreak joined #perl6
07:02 bjz joined #perl6
07:05 darutoko joined #perl6
07:19 domidumont joined #perl6
07:29 cibs joined #perl6
07:33 BenGoldberg joined #perl6
07:35 raiph left #perl6
07:41 wamba joined #perl6
07:54 dugword joined #perl6
08:07 ufobat joined #perl6
08:17 zakharyas joined #perl6
08:20 Woodi joined #perl6
08:33 jonas1 joined #perl6
08:44 thayne joined #perl6
09:02 noganex joined #perl6
09:13 ufobat joined #perl6
09:15 masak stray macro thought: it seems that a lot of macros I want to write in practice are of the form "macro moo only makes sense inside of a loop"
09:16 masak or inside some other context like that. a method or a grammar or whatever.
09:17 masak I've had this thought before, but it's now coming to the forefront
09:18 masak it reminds me a bit of AngularJS's `require: "^parentDirective"`
09:19 xtreak joined #perl6
09:19 dakkar joined #perl6
09:20 masak I think it's a healthy thought to consider context-y/container-y QNodes as exposing a kind of API to their descendant nodes, if they want
09:21 masak it's actually a suggestive way to explain both `next` and `this`
09:21 masak er, `self`. wrong language.
09:22 masak ETOOMUCHJAVASCRIPT
09:22 masak I need to blog about this.
09:31 cschwenz joined #perl6
09:34 andrzeju_ hello Perl6
09:36 cschwenz hello andrzeju :-)
09:38 DrForr Mornin'.
09:41 domidumont joined #perl6
09:42 timotimo Islamic Cyber Resistance Hacked blogs.perl.org22 Jan 2014, 01:00   ... 2363 emails leaked
09:45 domidumont1 joined #perl6
09:48 lizmat timotimo: que ?
09:48 lizmat isn't that old news?
09:48 timotimo yeah
09:48 timotimo i was just surprised to find my email is in there
09:49 lizmat ah
09:49 DrForr Good, I was worried there for a sec.
09:51 bjz joined #perl6
09:53 bjz_ joined #perl6
09:56 rindolf joined #perl6
09:58 llfourn joined #perl6
10:03 azawawi joined #perl6
10:03 azawawi hi
10:04 azawawi https://github.com/azawawi/perl6-gtk-scinti​lla/blob/master/doc/GTK-Scintilla-Editor.md # Documentation in progress :)
10:04 azawawi and tests https://github.com/azawawi/perl6-gtk​-scintilla/blob/master/t/02-basic.t :)
10:05 azawawi how can I  specify Perl 6 highlighted code in POD6 (using Pod::To::Markdown)?
10:26 g4 joined #perl6
10:26 g4 joined #perl6
10:28 timotimo neat
10:35 domidumont joined #perl6
10:39 gregf_ joined #perl6
10:43 llfourn joined #perl6
10:50 domidumont joined #perl6
10:50 thayne joined #perl6
10:52 SmokeMachine I have a role (DateTime::Extended) that when applied to a object of type DateTime or Date gives new functionality to the object.
10:53 SmokeMachine You can use it like: DateTime.now but DateTime::Extended
10:54 azawawi timotimo: thx
10:55 azawawi timotimo: hopefully it will be more useful to you than it was :)
10:55 SmokeMachine So I wrote a new way to use it. I added 2 methods on the role: DateTime and Date. That returns the type but DateTime::Extended
10:57 SmokeMachine The idea is: DateTime::Extended.Date return a Date type with the new functionalities
10:59 SmokeMachine But the DateTime role has some required methods... I mean: method required-method {...}
11:00 SmokeMachine But a role with required methods cannot be punned
11:01 SmokeMachine Because the generated class do not implement that methods...
11:02 SmokeMachine What makes pun a role with required methods useless...
11:02 SmokeMachine I'd like to change that...
11:04 SmokeMachine I'd like to when punning a role with required methods, the generated class will implement those methods with stub code...
11:06 SmokeMachine I wrote a PoC that almost do that (that's just not a stub yet)
11:08 SmokeMachine https://github.com/FCO/rakudo/blob/punning_interf​ace_roles/src/Perl6/Metamodel/RolePunning.nqp#L36
11:09 SmokeMachine Do you think that could be changed?
11:18 jnthn I'm not particularly keen on making role punning have different semantics to "compose the role into an empty class"
11:19 jnthn That you can't pun a role with stubbed methods - because there's no way it's going to work usefully with the missing bits of functionality - seems reasonable to me.
11:19 jnthn And if it can work usefully, why are the methods stubbed rather than returning a default value?
11:20 jnthn (And then classes that wish override them)
11:25 SmokeMachine It can work, for example in my case... the instance methods wouldn't work, but a class method works...
11:26 SmokeMachine jnthn: ^^
11:26 jnthn That still pretty much violates the usefulness of doing a role.
11:27 jnthn If is $obj ~~ TheRole or multi-dispatch to a candidate with the role, I expect to get something that meaningfully implements the role.
11:27 SmokeMachine I'm not trying to change the role... only the class that's going to be pinned...
11:28 SmokeMachine It will!
11:29 kalkin- joined #perl6
11:29 SmokeMachine The class will implement the role! With stub code...
11:29 kalkin- hi #perl6
11:29 jnthn But "with stub code" is hardly implementing it, is it?
11:30 SmokeMachine It's just for the punned class everything else maintains the same...
11:30 jnthn Yes, I'm arguing I don't think it's reasonable to make the punned class special.
11:30 jnthn Perhaps split the instance and class methods out into separate roles?
11:30 timotimo you could have .^make_unfunny_pun
11:30 SmokeMachine jnthn: the stubcode I mean is the yada ...
11:31 jnthn Yes, I understood it that way.
11:32 SmokeMachine timotimo: the unfunny is with or without the stubs?
11:33 SmokeMachine jnthn: the punned class isn't special...
11:34 SmokeMachine m: role R {method r{...}}; class C does R {method r{..}}
11:34 camelia rakudo-moar babfc3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix .. instead␤at <tmp>:1␤------> 3hod r{...}}; class C does R {method r{..7⏏5}}␤»
11:34 SmokeMachine m: role R {method r{...}}; class C does R {method r{...}}
11:34 camelia rakudo-moar babfc3: ( no output )
11:35 SmokeMachine C is exactly the same as if R was punned with that change...
11:36 SmokeMachine jnthn: ^^
11:37 jnthn Sure, but there you've very explicitly stubbed the method, and it's clear enough in the code that you've done so. Having that happen automatically just seems liable to make stuff fail later, when in the common case knowing earlier would seem more valuable.
11:38 SmokeMachine The code of the class punned will be equal to the role!
11:38 SmokeMachine IMHO, it's even more readable...
11:39 SmokeMachine The punned class will behave as if you changed the role keyword tô class
11:47 SmokeMachine jnthn: makes sense?
11:47 jnthn I understand your argument, I just disagree with it.
11:48 jnthn Roles are units of re-use. Classes are units of instance management.
11:50 SmokeMachine It will still be...
11:52 wamba joined #perl6
12:09 SmokeMachine IMHO pun a role with stub methods should generate a class with the stub methods or at least give an error: role with stub methods cannot be punned
12:11 masak SmokeMachine: a better error message sounds resasonable -- but besides the wording, isn't that what happens already?
12:11 masak m: role R { method foo { ... } }; class C does R {}; say "alive"
12:11 camelia rakudo-moar babfc3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'foo' must be implemented by C because it is required by roles: R.␤at <tmp>:1␤»
12:11 masak SmokeMachine: seems it is.
12:12 masak SmokeMachine: so, are you *only* arguing for a different error message?
12:13 lizmat m: role R { method foo { ... } }; R.new
12:13 camelia rakudo-moar babfc3: OUTPUT«Method 'foo' must be implemented by R because it is required by roles: R.␤  in any compose_method_table at gen/moar/Metamodel.nqp line 2832␤  in any apply at gen/moar/Metamodel.nqp line 2843␤  in any compose at gen/moar/Metamodel.nqp line 3015␤  in…»
12:13 SmokeMachine Yes, but I'd prefer the punned class with stub method...
12:13 lizmat masak: specifically that one, I guess
12:14 SmokeMachine lizmat: yes! That one!
12:14 SmokeMachine m: role R { method foo { ... } }; R.^pun
12:14 camelia rakudo-moar babfc3: OUTPUT«Method 'foo' must be implemented by R because it is required by roles: R.␤  in any compose_method_table at gen/moar/Metamodel.nqp line 2832␤  in any apply at gen/moar/Metamodel.nqp line 2843␤  in any compose at gen/moar/Metamodel.nqp line 3015␤  in…»
12:15 wamba joined #perl6
12:16 masak yes, I agree those error messages are LTA
12:16 * masak .oO( "Method 'foo' must be implemented by a type because it is required by... the same type!" )
12:16 mr_ron joined #perl6
12:16 masak SmokeMachine: please open an RT for the LTA error message ;)
12:17 masak RT ticket*
12:18 SmokeMachine Why not implement the methods on the generated class?
12:18 cibs joined #perl6
12:19 masak what, you mean automatically?
12:20 masak isn't the problem that you're doing `R.new` *on the role itself*, the role doesn't have those methods implemented, and now you're asking it to behave like a concrete class and instantiate, but *it doesn't have the methods implemented* so it can't because it fails to compose?
12:20 masak I think I'm fully with jnthn on this one
12:21 masak and it seems to me you don't fully appreciate jnthn's argument, SmokeMachine
12:24 SmokeMachine masak: yes, I desagree... I think that pun would be much more useful if it implement the stub methods with stub code...
12:24 SmokeMachine But np...
12:25 masak yes, the explanation you're offering right there tells me you don't fully understand the properties we're wanting to preserve with role composition
12:25 raschipi joined #perl6
12:26 SmokeMachine masak: so, could you explain to me again? Please?
12:26 masak happy to
12:27 masak roles are in many ways a "fix" on class inheritance
12:27 masak class inheritance has a number of known failure modes, and roles try to be better than that
12:28 masak for example, when two methods conflict in the class inheritance chain, usually there's some kind of "first one wins" semantics; kind of a silent failure which can be very surprising and cause hard-to-detect bugs
12:29 masak compare that with roles, where you can't compose two or more roles with conflicting methods without getting a *compile-time* error (which you then have to resolve by explicitly giving your own method in the composing class)
12:29 masak the operative word here is "compile-time"
12:29 araraloren joined #perl6
12:30 masak roles can also be used as interfaces -- here, the contract is that if the role stubs a method, then the composing class has to provide an implementation
12:30 masak that error is also given at compile-time, with similarly good underlying reasons
12:30 * azawawi starts working on Odoo::Client - Perl 6 is going ERP soon :)
12:31 masak SmokeMachine, your proposal would essentially remove some of those early compile-time composition errors, and make the same code fail at runtime instead. with no discernible benefit.
12:36 SmokeMachine masak: IMHO my proposal changes the behavior to DWIM... because if I'm punning a role I want to create a class like that role...
12:38 masak that's exactly what happens now
12:38 masak and when the role is *unsuitable on its own* to being composed into a class, the composition fails
12:38 masak in fact, we could catch this at compile time
12:39 masak `R.new` with R being a role with stubbed methods
12:41 araraloren joined #perl6
12:42 araraloren Hi guys, anyone know can NativeCall support c out parameters ?
12:44 SmokeMachine But roles with stub methods aren't unsuitable... you only needs to implement this methods...
12:44 raschipi araraloren: Isn't that a C++ thing? C does it with pointers.
12:44 SmokeMachine masak: I'd probably agree with you if that worked:
12:44 masak SmokeMachine: yes, but *you didn't implement them* before punning the role to a class
12:45 araraloren raschipi, for example, a function with siganture int (char **ptr), it maybe modify *ptr .
12:47 raschipi araraloren: Perl6 knows how to pass pointers to native types: https://docs.perl6.org/language/​nativecall#Basic_use_of_Pointers
12:47 SmokeMachine m: role R {method r{...}}; class R does R {method r{...}}
12:47 camelia rakudo-moar babfc3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol 'R'␤at <tmp>:1␤------> 3role R {method r{...}}; class R does R7⏏5 {method r{...}}␤»
12:47 masak need `class C does R`
12:47 SmokeMachine I know...
12:47 raschipi araraloren: There's also a "Pointer" type, which can hold a pointer C gives us.
12:48 SmokeMachine But with the same name would be a way to workaround the (in my opinion) pun problem
12:49 araraloren raschipi, i know that, wait a moment , i write some sample code.
12:50 SmokeMachine masak: that's what I think should be the behavior of punned roles...
12:50 masak SmokeMachine: yes -- you think that against the received wisdom of how roles ought to best work ;)
12:51 SmokeMachine masak: I *cant* implement then before punning the role to class...
12:51 masak SmokeMachine: I'm trying really hard not to make my replies be "please stop and listen to why things are the way they are -- the reasons for that are pretty sane"
12:51 masak SmokeMachine: that's right, you can't
12:51 masak SmokeMachine: (so stop trying)
12:53 raschipi SmokeMachine: If you don't want the guarantees Roles give, why don't you use a Classe and be done with it?
12:53 SmokeMachine OK
12:57 SmokeMachine raschipi: I want those guarantees!
12:57 araraloren raschipi, https://gist.github.com/araraloren​/1ba08adbd6d8e8158b80fe86a639e993, please have a look at this code
12:59 SmokeMachine raschipi: I just wanted to pun a role with stub methods...
12:59 SmokeMachine Like this: https://github.com/FCO/rakudo/blob/punning_interf​ace_roles/src/Perl6/Metamodel/RolePunning.nqp#L36
13:00 SmokeMachine raschipi: now I'm looking how to do that as a module...
13:00 Geth ecosystem: f5274a15ce | (Ahmad M. Zawawi)++ | META.list
13:00 Geth ecosystem: Add Odoo::Client
13:00 Geth ecosystem:
13:00 Geth ecosystem: A simple Odoo ERP client that uses JSON RPC
13:00 Geth ecosystem: review: https://github.com/perl6/e​cosystem/commit/f5274a15ce
13:01 raschipi SmokeMachine: do you want the restrictions or not?
13:02 SmokeMachine raschipi: I do! I just want to when punning (not "does"ing) the stub methods be auto created on the punned class
13:03 raschipi araraloren: sub xmode(CArray[Str] is rw) returns int32 is native('xmode') { * }  ==> You need to tell it to pass a pointer.
13:04 SmokeMachine I'm not trying to fit a class on a role... I'm creating a class based on a role...  it *should* fit the role!
13:04 SmokeMachine I'm not saying this should fit:
13:05 raschipi SmokeMachine: That applies to classes, roles have aditional restrictions.
13:05 SmokeMachine m: role R {method r{...}}; class C {}
13:05 camelia rakudo-moar babfc3: ( no output )
13:05 SmokeMachine But this should:
13:06 SmokeMachine m: role R {method r{...}}; R.^pun # I'm creating a new class, not trying to fit a existing one
13:06 camelia rakudo-moar babfc3: OUTPUT«Method 'r' must be implemented by R because it is required by roles: R.␤  in any compose_method_table at gen/moar/Metamodel.nqp line 2832␤  in any apply at gen/moar/Metamodel.nqp line 2843␤  in any compose at gen/moar/Metamodel.nqp line 3015␤  in a…»
13:07 araraloren raschipi, sorry, I can get your idea,  sub xmode(CArray[Str] is rw #`( add rw ?? )) returns int32 is native('xmode') { * }
13:07 raschipi araraloren: Yes, adding "is rw" means you want to give C a pointer to the type, not the type itself.
13:08 SmokeMachine raschipi: what I'm saying is: a class created based on a role should fit that role!
13:08 raschipi SmokeMachine: No it doesn't, because you didn't fulfil the contract.
13:15 arnsholt m: role R { method r() { ... } }; class C does R {}; # Should also be broken
13:15 camelia rakudo-moar babfc3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Method 'r' must be implemented by C because it is required by roles: R.␤at <tmp>:1␤»
13:15 arnsholt There ya go
13:16 arnsholt That's what punning a role to a class does
13:19 araraloren joined #perl6
13:20 raschipi SmokeMachine: You're creating a distinction that doesn't exist. "puning" is compositing a role into a class of the same name of the role. It's still compositing.
13:21 raschipi araraloren: Does my solution works as you expect?
13:21 araraloren raschipi, not working.
13:22 araraloren It's result same as my version.
13:22 ChoHag joined #perl6
13:23 domidumont joined #perl6
13:24 arnsholt araraloren: Perl 6 Str objects are immutable
13:24 domidumont joined #perl6
13:24 arnsholt To let the C code diddle strings, you'll have to encode the string before passing it in and decode the modified array coming back out
13:26 mszet joined #perl6
13:26 araraloren arnsholt, thanks, i will try it.
13:28 xtreak joined #perl6
13:39 azawawi joined #perl6
13:40 araraloren arnsholt, raschipi Not working too, c modified string and perl6 side can not get original string .
13:40 raschipi araraloren: give us a pastie again, please
13:41 araraloren Maybe rakudo is not support that .
13:41 araraloren ok
13:44 wamba joined #perl6
13:45 pmurias joined #perl6
13:45 araraloren raschipi, https://gist.github.com/araraloren​/1ba08adbd6d8e8158b80fe86a639e993
13:46 raschipi araraloren: You still need the "is rw".
13:46 araraloren add `is rw` is not working too.
13:54 arnsholt araraloren: Oh, you might need to call refresh or whatever the function is called (I forget) on the embedded array
13:55 arnsholt Detecting changes done in the C code is non-trivial, so it doesn't always get picked up
13:55 araraloren arnsholt, any document about that?
13:58 araraloren arnsholt, I found a refresh sub https://github.com/perl6/specs/blob/​master/S21-calling-foreign-code.pod[here], but seems not working too..
14:10 araraloren arnsholt, raschipi I updated sample code https://gist.github.com/araraloren​/1ba08adbd6d8e8158b80fe86a639e993
14:54 cschwenz left #perl6
15:00 lizmat m: say "\c[woman facepalming]"  # now that we can do this, maybe a docs.perl6.org page about emoji support would be applicable ?
15:00 camelia rakudo-moar 2a7c27: OUTPUT«🤦‍♀️␤»
15:00 wictory[m] joined #perl6
15:07 M-Illandan joined #perl6
15:07 tadzik joined #perl6
15:07 Matthew[m] joined #perl6
15:07 ilmari[m] joined #perl6
15:07 dp[m] joined #perl6
15:07 xui_nya[m] joined #perl6
15:07 mulk[m] joined #perl6
15:07 Matias[m] joined #perl6
15:07 CIAvash[m] joined #perl6
15:09 DrForr Huh, [m] suffix - haven't seen that.
15:10 ilmari DrForr: the it's the matrix.org irc bridge
15:10 * ilmari[m] waves from riot.im via matrix.org
15:11 abraxxa joined #perl6
15:18 ab6tract joined #perl6
15:18 ab6tract o/ #perl6
15:18 yoleaux 24 Dec 2016 14:13Z <M-Illandan> ab6tract: there's something wrong with your post. The link to OO::Monitors appears to point nowhere
15:18 ab6tract hmm, think i fixed that :S
15:18 ab6tract m: my @f = slow => "pair", know => "pair", no => "pair"; my %h := :{ |@f }
15:18 camelia rakudo-moar 2a7c27: OUTPUT«Type check failed in binding; expected Associative but got Block (-> ;; $_? is raw { #`...)␤  in block <unit> at <tmp> line 1␤␤»
15:19 ab6tract am i crazy or should i be able to do that?
15:19 ab6tract use case: avoiding sorting by first creating an array that you can use to refer to later
15:20 ilmari DrForr: the M- prefix is also indicative of matrix.org bridging (they changed it to [m] a while back)
15:24 dugword joined #perl6
15:30 cdg joined #perl6
15:31 curt_ joined #perl6
15:32 ab6tract m: my @f = slow => "pair", know => "pair", no => "pair"; my %h := %( |@f )
15:32 camelia rakudo-moar 2a7c27: ( no output )
15:33 ab6tract m: my @f = slow => "pair", know => "pair", (now) => "pair"; my %h := %( |@f ); dd %h
15:33 camelia rakudo-moar 2a7c27: OUTPUT«Hash % = {"Instant:1484580825.309945" => "pair", :know("pair"), :slow("pair")}␤»
15:33 ab6tract yeah, so what's the deal?
15:33 cdg joined #perl6
15:34 abraxxa joined #perl6
15:35 mr-foobar joined #perl6
15:37 bpmedley joined #perl6
15:37 bpmedley joined #perl6
15:39 SmokeMachine how can I augment Metamodel::RolePunning?
15:39 SmokeMachine m: use MONKEY-TYPING; augment class Metamodel::RolePunning {method make_pun {say "OK"}}; role {}.new
15:39 camelia rakudo-moar 2a7c27: OUTPUT«===SORRY!===␤Cannot find method 'augmentable' on object of type Archetypes␤»
15:47 Geth doc: fa81febf50 | Alexis++ | doc/Language/5to6-perlfunc.pod6
15:47 Geth doc: Add link to method `connect` in class `IO::Socket::Async`.
15:47 Geth doc: review: https://github.com/perl6/doc/commit/fa81febf50
15:47 Geth doc: 6ad377c86e | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
15:47 Geth doc: Merge pull request #1139 from flexibeast/master
15:47 Geth doc:
15:47 Geth doc: Add link to method `connect` in class `IO::Socket::Async`.
15:47 Geth doc: review: https://github.com/perl6/doc/commit/6ad377c86e
15:51 Geth doc: zoffixznet++ created pull request #1140: List IO::Socket::INET as an option as well
15:51 Geth doc: review: https://github.com/perl6/doc/pull/1140
15:51 Geth doc: 03b48f85c0 | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
15:51 Geth doc: List IO::Socket::INET as an option as well
15:51 Geth doc: review: https://github.com/perl6/doc/commit/03b48f85c0
15:51 Geth doc: a9a29fa9e9 | (Zoffix Znet)++ | doc/Language/5to6-perlfunc.pod6
15:51 Geth doc: Merge pull request #1140 from zoffixznet/patch-2
15:51 Geth doc:
15:51 Geth doc: List IO::Socket::INET as an option as well
15:51 Geth doc: review: https://github.com/perl6/doc/commit/a9a29fa9e9
16:02 Ven joined #perl6
16:03 perigrin w73
16:08 rindolf joined #perl6
16:09 SmokeMachine m: role {method ^pun {say "OK"}}.^pun # why this doesn't work and thinks its multi?
16:09 camelia rakudo-moar 2a7c27: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method pun'?)␤    at <tmp>:1␤    ------> 3role {method7⏏5 ^pun {say "OK"}}.^pun # why this doesn'␤»
16:13 SmokeMachine m: role {method ^pun {}} # why this doesn't work and thinks its multi?
16:13 camelia rakudo-moar 2a7c27: OUTPUT«Potential difficulties:␤    Useless declaration of a has-scoped method in multi (did you mean 'my method pun'?)␤    at <tmp>:1␤    ------> 3role {method7⏏5 ^pun {}} # why this doesn't work and th␤»
16:15 SmokeMachine is it here? https://github.com/rakudo/rakudo/blo​b/d1c2e7649884a48a4733666c1425d8dcb4​918120/src/Perl6/Actions.nqp#L4051
16:16 holli_ joined #perl6
16:18 Ven joined #perl6
16:19 SmokeMachine shouldn't that enter here? https://github.com/rakudo/rakudo/blo​b/d1c2e7649884a48a4733666c1425d8dcb4​918120/src/Perl6/Actions.nqp#L4051
16:20 SmokeMachine m: use nap; say nqp::can(role {}.HOW, "pun")
16:20 camelia rakudo-moar 2a7c27: OUTPUT«===SORRY!===␤Could not find nap at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-2/share/perl6/site␤    /home/camelia/rakudo-m-inst-2/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-2/share/perl6␤    CompUnit::Repositor…»
16:20 SmokeMachine m: use nqp; say nqp::can(role {}.HOW, "pun")
16:20 camelia rakudo-moar 2a7c27: OUTPUT«1␤»
16:22 synopsebot6 joined #perl6
16:28 captain-adequate joined #perl6
16:32 brokenchicken m: (^20)».say
16:32 camelia rakudo-moar 2a7c27: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10​␤11␤12␤13␤14␤15␤16␤17␤18␤19␤»
16:32 * brokenchicken really wishes that were out of order.
16:33 brokenchicken People are teaching others the ». as a way to call a method on a bunch of things, without any mention of the autothreading business.
16:33 Ven joined #perl6
16:34 brokenchicken And it'd be easier to convince them to give full information if we had an actual example of the issues that'll appear once the autothreaded impl is done
16:34 SmokeMachine m: use nqp; say nqp::can(role {}.HOW, "add_meta_method") # thats why!
16:34 camelia rakudo-moar 2a7c27: OUTPUT«0␤»
16:36 Geth doc: 54faec717b | (Wenzel P. P. Peppmeyer)++ | doc/Language/operators.pod6
16:36 Geth doc: index >>.
16:36 Geth doc: review: https://github.com/perl6/doc/commit/54faec717b
16:38 Gasher joined #perl6
16:40 khw joined #perl6
16:40 ab6tract joined #perl6
16:40 ab6tract brokenchicken: not true. '>>' will preserve order of the outputs
16:40 ab6tract even when it gets autothreaded
16:41 ab6tract what is not guaranteed is order of execution
16:41 SmokeMachine should ParametricRoleHOW does MultiMethodContainer?
16:42 SmokeMachine sorry!
16:42 brokenchicken ab6tract: and which part is not true?
16:42 SmokeMachine should ParametricRoleHOW does MetaMethodContainer?
16:42 ab6tract m: (^20)>>.say
16:42 camelia rakudo-moar 2a7c27: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10​␤11␤12␤13␤14␤15␤16␤17␤18␤19␤»
16:42 ab6tract that will always look like that
16:42 brokenchicken No it won't.
16:42 ab6tract yes, it will
16:42 brokenchicken hah
16:42 ab6tract where did you get this impression/
16:42 ab6tract race and hyper are two different things
16:42 brokenchicken ab6tract: "ab6tract │ what is not guaranteed is order of execution"
16:42 ab6tract yes
16:42 brokenchicken You've just said it yourself.
16:43 ab6tract your case is too simple
16:43 ab6tract the list order will be preserved
16:43 ab6tract but if you were modifying the state of an object
16:44 ab6tract your 11th execution might happen prior to your 9th execution
16:44 ab6tract but it will always appear in the output as the 11th element
16:44 brokenchicken ab6tract: which would make 11th 'say' print its output prior to the 9th 'say'
16:45 brokenchicken The output is generated through the side-effect of the hypered method, not through the final order of the result.
16:46 rindolf joined #perl6
16:47 ab6tract i don't know where you are getting this from
16:47 ab6tract because it is not true
16:47 ab6tract maybe in this very specific instance of .say
16:48 ab6tract but even then it runs counter to the distinction between hyper and race
16:48 brokenchicken You're just confused about the code being executed.
16:48 * jnthn reads and suspects "order of outputs" being ambiguous is the source of confusion
16:48 ab6tract ('a'..'r')>>.uc>>.say
16:48 brokenchicken And contradicting yourself.
16:49 ab6tract m: dd ('a'..'r')>>.uc>
16:49 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing required term after infix␤at <tmp>:1␤------> 3dd ('a'..'r')>>.uc>7⏏5<EOL>␤    expecting any of:␤        prefix␤        term␤»
16:49 jnthn hyper preserves the order of values in the result returned relative to the input
16:49 ab6tract m: dd ('a'..'r')>>.uc
16:49 camelia rakudo-moar 2a7c27: OUTPUT«("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R")␤»
16:49 ab6tract this will always be  in that order
16:49 ab6tract jnthn++
16:49 brokenchicken ab6tract: yes, because you're outputting the FINAL result
16:49 brokenchicken ab6tract: whereas ('a'..'r')».say does NOT
16:49 ab6tract brokenchicken: my apologies for not explaining myself properly
16:50 ab6tract yes
16:50 ab6tract correct
16:50 jnthn But it doesn't preserve the order of output in the sense of I/O
16:50 jnthn Probably best to avoid using the word "output" in the docs of this.
16:50 brokenchicken And therefore, it's output is not guaranteed to always be as .say for ('a'..'r') would
16:51 ab6tract brokenchicken: correct. again, sorry for the confusion
16:51 Ven joined #perl6
16:52 ab6tract and you are right, i was clearly contradicting mysel;f
16:55 brokenchicken huggable: hug someone
16:55 * huggable hugs someone
16:56 ab6tract well, it was a nice gesture i guess..
16:57 brokenchicken :(
16:58 ab6tract joined #perl6
16:58 dugword joined #perl6
16:59 ab6tract that is an unfortunate bit of confusion there
16:59 ab6tract and you are right that it will likely break a lot of ecosystem code
17:00 timotimo who needs side-effects anyway
17:03 Geth joined #perl6
17:04 mst timotimo: the FDA's HR department
17:07 perlpilot joined #perl6
17:07 * jnthn wrote a Perl 6 port-ish of the algo git uses for doing text file vs. binary file detection today, and figured it may as well go in a mdoule
17:07 jnthn But can't think of a non-awful name for it.
17:08 jnthn File::TextOrBinary mebbe
17:09 brokenchicken .oO( Algo::Binnable... )
17:09 jnthn Text::Or::Binary # no! :P
17:09 jnthn Though I actually implemented it on Blob rather than a file... :)
17:09 jnthn But can add a file interface for the module too I guess :)
17:11 Ven joined #perl6
17:12 mst jnthn: Data::IsBinary::Heuristic ?
17:12 ggoebel joined #perl6
17:12 mst (that's not quite right but ...)
17:13 jnthn Data::Text::Heuristic maybe
17:13 jnthn Though it's still a bit off
17:13 mst BinaryOrText::PlaceBetsNow
17:13 jnthn :P
17:14 jnthn Data::TextOrBinary I guess explains it OK
17:14 mst yeah
17:20 FROGGS joined #perl6
17:24 timotimo aha, Data:: is for modules that handle data
17:24 timotimo as opposed to modules that don't do anything with data
17:26 b2gills and Data::Data::Data:: is for modules that really really handle data
17:27 geekosaur Haskell has Data.Data.Data :p
17:27 geekosaur (granted, only the first two are part of the module name)
17:30 lmmx joined #perl6
17:30 mithaldu_ joined #perl6
17:31 Ven joined #perl6
17:32 dugword joined #perl6
17:50 Actualeyes joined #perl6
17:51 domidumont joined #perl6
17:52 raschipi joined #perl6
18:00 Geth ecosystem: 2cb66fa477 | (Jonathan Worthington)++ | META.list
18:00 Geth ecosystem: Add Data::TextOrBinary
18:00 Geth ecosystem:
18:00 Geth ecosystem: https://github.com/jnthn/p6-data-textorbinary
18:00 Geth ecosystem: review: https://github.com/perl6/e​cosystem/commit/2cb66fa477
18:01 TEttinger joined #perl6
18:01 setty1 joined #perl6
18:03 Ven joined #perl6
18:11 ab6tract joined #perl6
18:13 ab6tract huggable: hug brokenchicken
18:13 * huggable hugs brokenchicken
18:16 mr_ron I don't see a directory or file in roast that tests regex basics like * + ** quantifiers and | | , | alternations.   Anyone happen to know?
18:16 ab6tract it occurred to me that maybe i was not contradicting myself as much as i thought. the way i was initially looking at it is that >>.say coming out ordered -- while not actually guaranteed by >> -- is actually indicative of the underlying behavior of >> when used in _non-IO_ circumstances.
18:16 ab6tract if that makes any sense :)
18:21 ab6tract don't get me wrong, though! i was definitely contradicting myself by saying that the "output" would "always be like that" :)
18:21 mr_ron searched roast for "quantifier" and think I found what I was looking for
18:22 jnthn mr_ron: S05-mass/rx.t or something like that
18:23 ab6tract m: (4 xx 5) ==> .say # i guess that's where the feed operator could come in?
18:23 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Sorry, do not know how to handle this case of a feed operator yet.␤at <tmp>:1␤------> 3s where the feed operator could come in?7⏏5<EOL>␤»
18:24 Ven joined #perl6
18:27 dalek perl6-examples: 57d30e5 | (Shlomi Fish)++ | categories/euler/prob125-shlomif.p6:
18:27 dalek perl6-examples: Add Euler #125. Works well.
18:27 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/57d30e5dfb
18:28 rindolf Hi all! Can you please review https://github.com/perl6/perl6-examples/blob​/master/categories/euler/prob125-shlomif.p6 ?
18:28 mr_ron jnthn: 743 tests and only one with ||  in https://github.com/perl6/roa​st/blob/master/S05-mass/rx.t
18:30 cdg joined #perl6
18:32 raschipi m: (4 xx 5) ==> say
18:32 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 3(4 xx 5) ==> say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant …»
18:33 Ven joined #perl6
18:33 raschipi ab6tract: In this case you need map.
18:35 mr_ron || has more tests in https://github.com/perl6/roast/blob/maste​r/S05-metasyntax/sequential-alternation.t
18:40 brokenchicken ab6tract, any side-effects—IO or otherwise—aren't guaranteed to be in order. The reason it comes ordered right now is because the actual autothreading isn't yet implemented.
18:40 andrzejku joined #perl6
18:42 raschipi rindolf: It can be made more idiomatic than that.
18:44 raschipi rindolf: you could at least try to cram some interesting features of the language in there to show off.
18:46 brokenchicken rindolf: superfluous quotes are superfluous: "$sum".flip eq "$sum"
18:47 andrzejku hey
18:47 andrzejku offtopic questions here?
18:47 raschipi go ahead
18:47 brokenchicken And yeah, the example is as boring as apple pie. The palindrome could be checked via a subset, for example, to spice it up.
18:48 raschipi One can writre FORTRAN in any language, I guess. Which is allowed in Perl, of course. But he did ask for a critique.
18:49 pmurias lizmat: so @a.skip($n) would be @a[$n..*] but lazy?
18:49 andrzejku why if most women do cleaning, the mop was invented by men?
18:50 brokenchicken :S
18:50 raschipi andrzejku: wut?
18:50 brokenchicken andrzejku: I question valididty of your data.
18:50 andrzejku ?
18:51 andrzejku I wonder why this happens
18:51 andrzejku sorry guys just smoke a weed today x)
18:51 huf because people keep asking questions that lie
18:52 andrzejku it is not lie
18:52 andrzejku it was invited by spain guy
18:52 raschipi It's not the data that's corrupted, it's the pipeline.
18:52 pmurias andrzejku: you mean the meta object protocol?
18:52 huf pmurias++ good attempt at derailing
18:52 andrzejku pmurias, no wet mop
18:53 cgfbee joined #perl6
18:53 andrzejku nevermind
18:54 brokenchicken andrzejku: the "most women do cleaning" is a nonsensical statement.
18:55 brokenchicken andrzejku: and I doubt there are any reliable sources for who first decided to wipe something with a wet rug...
18:55 raschipi brokenchicken: You're feeding the trolls. Let the guy clear his mind.
18:56 andrzejku raschipi, I am not troll just thinking
18:56 brokenchicken It's not the first time he's making sexist statements here. I don't want to just pretend it didn't happen.
18:57 raschipi Don't do drugs, people. It looks ridiculous.
18:57 moritz andrzejku: then please stop thinking on #perl6 while high
18:57 andrzejku moritz, ok sorry
18:57 andrzejku sorry
18:58 brokenchicken andrzejku: here's an interesting thing to ponder: https://en.wikipedia.org/wiki/Time_dilation
18:58 dugword joined #perl6
19:00 andrzejku brokenchicken, well thanks but I am going to do Perl today x)
19:00 cgfbee joined #perl6
19:00 andrzejku to see things deeper than they are
19:02 lukaramu joined #perl6
19:02 rindolf m: 615.flip
19:02 camelia rakudo-moar 2a7c27: ( no output )
19:02 rindolf m: 615.flip ==> say
19:02 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5===␤Argument to "say" seems to be malformed␤at <tmp>:1␤------> 615.flip ==> say7⏏5<EOL>␤Other potential difficulties:␤    Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant…»
19:03 brokenchicken m: 615.flip.say
19:03 camelia rakudo-moar 2a7c27: OUTPUT«516␤»
19:03 perlpilot rindolf: I sometimes want that to work too
19:03 rindolf perlpilot: ah
19:03 lizmat m: 615.flip ==> &say
19:03 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Sorry, do not know how to handle this case of a feed operator yet.␤at <tmp>:1␤------> 615.flip ==> &say7⏏5<EOL>␤»
19:03 lizmat hmmm
19:04 lizmat m: 615.flip ==> &say()
19:04 camelia rakudo-moar 2a7c27: OUTPUT«516␤»
19:04 Ven joined #perl6
19:04 lizmat there you go  :-)
19:04 brokenchicken \o/
19:04 perlpilot yeah, but all that extra syntax
19:04 lizmat m: &say()
19:04 camelia rakudo-moar 2a7c27: OUTPUT«␤»
19:04 cgfbee joined #perl6
19:04 lizmat m: note
19:04 camelia rakudo-moar 2a7c27: OUTPUT«Noted␤»
19:05 perlpilot huh.  That's an odd thing for note to do.
19:05 brokenchicken m: 615.flip ==> say()
19:05 camelia rakudo-moar 2a7c27: OUTPUT«516␤»
19:06 lizmat brokenchicken++
19:06 lizmat perlpilot: similar to:
19:06 lizmat m: die
19:06 camelia rakudo-moar 2a7c27: OUTPUT«Died␤  in block <unit> at <tmp> line 1␤␤»
19:06 lizmat m: warn
19:06 camelia rakudo-moar 2a7c27: OUTPUT«Warning: something's wrong␤  in block <unit> at <tmp> line 1␤»
19:06 perlpilot yes, I guess so.   This is the first I've seen note's behavior in that regard, so it's a little surprising
19:06 lizmat one could argue that say() should say "Said"  :-)
19:07 brokenchicken :D
19:07 perlpilot and put?  ;)
19:07 lizmat m: put
19:07 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5===␤Argument to "put" seems to be malformed␤at <tmp>:1␤------> 3put7⏏5<EOL>␤Other potential difficulties:␤    Function "put" may not be called without arguments (please use () or whitespace to denote arguments, or &put to ref…»
19:07 lizmat m: put()
19:07 camelia rakudo-moar 2a7c27: OUTPUT«␤»
19:07 lizmat same as say()
19:07 dugword Should I be able to access a sub in a module using the full name. E.g. #./Foo.pm module Foo { sub bar {} }; #./somescript use Foo; Foo::bar(); This works when I declare the sub with "our", e.g. our sub bar{}, but this post makes it seem like I don't need to https://perl6advent.wordpress.com/200​9/12/12/day-12-modules-and-exporting/
19:07 shayan_ joined #perl6
19:08 perlpilot dugword: subs are lexical (my) by default
19:08 lizmat dugword: something from 7 years ago is probably obsolete
19:08 * perlpilot boggles a little bit that we've been doing the advent calendar for 7 years
19:08 lizmat perhaps we should add some DEPRECATED notices on these old posts ?
19:09 dugword so a sub within a sub is lexical to that sub? That's good to know, (and how I would want it, I've been using my sub everywhere)
19:09 perlpilot dugword: it doesn't hurt to be explicit
19:10 lizmat m: sub a() { sub b() { say "inner b" }; b }; sub b() { say "outer b" }; b
19:10 camelia rakudo-moar 2a7c27: OUTPUT«outer b␤»
19:10 lizmat m: sub a() { sub b() { say "inner b" }; b }; sub b() { say "outer b" }; a; b
19:10 camelia rakudo-moar 2a7c27: OUTPUT«inner b␤outer b␤»
19:10 lizmat dugword: ^^
19:10 geekosaur yes, subs changed from "our" to "my" default scope
19:13 dugword Well thanks guys, couldn't figure out what I was doing wrong.
19:14 perlpilot dugword: btw, you don't want to use "is export"?
19:14 dugword They are helper functions and not part of the module API, but I wanted to setup tests to make sure they work as expected
19:14 dugword is export with (:debug) or something would work
19:15 rindolf Hi all! How do I insert/add an element to a SetHash? It's not here - https://docs.perl6.org/type/SetHash.html
19:15 dugword but I thought that calling it by the full name would be easier. But that wasn't working and I had to figure out why :)
19:16 rindolf ah , I see,
19:16 rindolf %H{$item} = True;
19:17 perlpilot rindolf: or any true value.
19:17 rindolf perlpilot: yes
19:19 brokenchicken m: my $s = SetHash.new; $s<42>++; say $s
19:19 camelia rakudo-moar 2a7c27: OUTPUT«SetHash.new(42)␤»
19:19 raschipi m: my SetHash %h; %h = :item
19:19 camelia rakudo-moar 2a7c27: OUTPUT«Type check failed in assignment to %h; expected SetHash but got Bool (Bool::True)␤  in block <unit> at <tmp> line 1␤␤»
19:20 brokenchicken m: my $s = SetHash.new; $s<42 45>++; say $s
19:20 camelia rakudo-moar 2a7c27: OUTPUT«Cannot resolve caller postfix:<++>(List); the following candidates␤match the type but require mutable arguments:␤    (Mu:D $a is rw)␤␤The following do not match for other reasons:␤    (Bool:D $a is rw)␤    (Bool:U $a is rw)␤    (Int:D $a is r…»
19:20 brokenchicken m: my $s = SetHash.new; $s<42 45> = 1, 2; say $s
19:20 camelia rakudo-moar 2a7c27: OUTPUT«SetHash.new(45, 42)␤»
19:20 raschipi m: my SetHash %h; %h = item => True
19:20 camelia rakudo-moar 2a7c27: OUTPUT«Type check failed in assignment to %h; expected SetHash but got Bool (Bool::True)␤  in block <unit> at <tmp> line 1␤␤»
19:20 brokenchicken hm, that seems wrong
19:20 lizmat m: my %H := SetHash.new; dd %H; %H<a>++; dd %H; %H<a>--; dd %H  # ++ and -- also work
19:20 camelia rakudo-moar 2a7c27: OUTPUT«SetHash.new()␤SetHas​h.new("a")␤SetHash.new()␤»
19:20 perlpilot raschipi: my SetHash %h; doesn't do what you think it does
19:21 perlpilot m: my SetHash %h; dd %h;
19:21 camelia rakudo-moar 2a7c27: OUTPUT«Hash[SetHash] %h = (my SetHash %)␤»
19:21 raschipi m: my SetHash $h; $h = :item
19:21 camelia rakudo-moar 2a7c27: OUTPUT«Type check failed in assignment to $h; expected SetHash but got Pair (:item)␤  in block <unit> at <tmp> line 1␤␤»
19:21 brokenchicken m: my %h{Int}; %h<42> = 42; dd %h
19:21 camelia rakudo-moar 2a7c27: OUTPUT«Hash[Any,Int] %h = (my Any %{Int} = IntStr.new(42, "42") => 42)␤»
19:21 raschipi I see.
19:21 geekosaur that really needs to be documented better
19:21 raschipi m: my $h = new SetHash; $h = :item
19:21 camelia rakudo-moar 2a7c27: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of C++ constructor syntax; in Perl 6 please use method call syntax␤at <tmp>:1␤------> 3my $h = new SetHash7⏏5; $h = :item␤»
19:21 raschipi m: my $h =SetHash.new; $h = :item
19:21 camelia rakudo-moar 2a7c27: ( no output )
19:21 brokenchicken The %h<42> syntax has an allomorph for the key, but using it with a SetHash, just uses the Int portion
19:21 perlpilot raschipi: What is this "new SetHash"?!?  ;-)
19:22 brokenchicken for the hash key I mean
19:22 raschipi m: my $h =SetHash.new; $h = :item; say $h
19:22 camelia rakudo-moar 2a7c27: OUTPUT«item => True␤»
19:22 raschipi Works if one does know P6 xP
19:22 brokenchicken You're swapping SetHash with a Pair
19:23 raschipi Hum, swaps the type, not asigns.
19:23 perlpilot raschipi: I guess assignment doesn't work like you think either.  :)
19:24 brokenchicken ohhhh
19:24 brokenchicken m: my $s = SetHash.new; $s<42>++; say $s.keys[0].^name
19:24 camelia rakudo-moar 2a7c27: OUTPUT«IntStr␤»
19:24 brokenchicken m: my $s = SetHash.new; $s<42>++; say $s
19:24 camelia rakudo-moar 2a7c27: OUTPUT«SetHash.new(42)␤»
19:24 brokenchicken m: my $s = SetHash.new; $s<42>++; say $s.perl
19:24 camelia rakudo-moar 2a7c27: OUTPUT«SetHash.new(IntStr.new(42, "42"))␤»
19:24 brokenchicken I see.
19:25 raschipi Assigning a list of elements to a hash variable **first empties** the variable, and then iterates the elements of the right-hand side. If an element is a Pair, its key is taken as a new hash key
19:30 girafe joined #perl6
19:37 andrzejku joined #perl6
19:46 domidumont joined #perl6
19:54 rindolf joined #perl6
19:57 * lizmat is working on the Perl 6 Weekly
19:57 dugword joined #perl6
19:57 lizmat please let me know anything of interest that you think I might have missed  :-)
20:00 AlexDaniel joined #perl6
20:01 benchable6 joined #perl6
20:01 bisectable6 joined #perl6
20:01 statisfiable6 joined #perl6
20:01 AlexDaniel brokenchicken: “really wishes that were out of order.” – see RT #130485
20:01 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130485
20:02 AlexDaniel note that it was previously shuffled on purpose, but we lost it
20:02 bjz joined #perl6
20:03 evalable6 joined #perl6
20:03 alimon joined #perl6
20:05 Ven joined #perl6
20:06 brokenchicken mc: (^20)».say
20:06 committable6 brokenchicken, ¦«2015.12»: 0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16␤17␤18␤19
20:06 brokenchicken mc: (^30)».say
20:06 committable6 brokenchicken, ¦«2015.12»: 0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16​␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29
20:06 Tonik joined #perl6
20:07 AlexDaniel not there
20:07 brokenchicken c: 2015.07 (^30)».say
20:07 committable6 brokenchicken, ¦«2015.07»: 29␤27␤25␤23␤21␤19␤17␤15␤13␤11␤9␤7␤5␤3␤1␤​28␤26␤24␤22␤20␤18␤16␤14␤12␤10␤8␤6␤4␤2␤0
20:07 brokenchicken hah
20:07 AlexDaniel yea
20:08 AlexDaniel c: 2015.09 (^30)».say
20:08 committable6 AlexDaniel, ¦«2015.09»: 0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤15␤16​␤17␤18␤19␤20␤21␤22␤23␤24␤25␤26␤27␤28␤29
20:08 AlexDaniel c: 2015.08 (^30)».say
20:08 committable6 AlexDaniel, ¦«2015.08»: Cannot find this revision (did you mean “2016.08”?)
20:09 AlexDaniel right…
20:09 geekosaur so, glr?
20:09 AlexDaniel https://github.com/rakudo/rakudo/commit/​a5193055bf4656cd8da67fde6e76a745458185fe
20:11 Geth doc: 3d1db3af56 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Sub.pod6
20:11 Geth doc: shink Rakudos ego slightly
20:11 Geth doc: review: https://github.com/perl6/doc/commit/3d1db3af56
20:11 Geth doc: 2640d9e10f | (Wenzel P. P. Peppmeyer)++ | doc/Type/Sub.pod6
20:11 Geth doc: state scoping rules for Sub
20:11 Geth doc: review: https://github.com/perl6/doc/commit/2640d9e10f
20:12 gfldex I believe I just wrote a paragraph that can only be understand by those who understood it. o.O
20:12 * gfldex is not proud
20:13 raschipi Who is it aimed at? I'm a begginer and understood it.
20:13 mr-foobar joined #perl6
20:13 gfldex do you got a good grasp of scopes?
20:14 raschipi yeah, it's like a stack, isn't it?
20:15 raschipi I think I understand about scopes by learning a bit of assembler.
20:15 raschipi About naming and renaming registers and pushing and popping from the stack.
20:15 gfldex how would you write a closure in assambler?
20:16 raschipi Well, it has to be possible.
20:17 raschipi It would probably work like OOP works in C, passing pointers to structs around.
20:18 raschipi All the happines to you guys, I'm leaving. XOXO
20:21 alimon joined #perl6
20:24 vendethiel- joined #perl6
20:24 Ven joined #perl6
20:25 labster joined #perl6
20:25 perlpilot gfldex: I'm not sure why you specifically mention that an our scoped sub won't redefine a same-named outer sub.   Is that someone's expectation?
20:27 gfldex perlpilot: imagine you write a our scoped sub today in a fairly large file and in halve a years time you add a sub of the same name in the outer scope. That can lead to very subtile bugs if the signatures a non-trivial and not to dissimilar.
20:31 gfldex and i hope my little hind may help finding such a bug
20:32 perlpilot I agree, I'm just not sure how this sentence really helps the programmer when that happens.
20:32 gfldex hint even, I don't really do deers
20:33 gfldex the programmer may look up the docs for C<our> (not yet in the index, will do that next)
20:33 gfldex i'm not happy how we doc scopes in general
20:39 Ven joined #perl6
20:40 avuserow joined #perl6
20:43 mst gfldex: seems like the sort of problem where a list of rules, followed by a boatload of examples, might be good
20:46 gfldex mst: i don't think so. If you don't understand the underlying principle the examples may not make it *click*. Learning by change sounds LTA to me.
20:46 gfldex maybe The Books will have to solve this problem
20:47 gfldex s/change/chance/
20:47 mst 'learning by chance' ? how is it chance if the rules are clearly spelled out above the examples, with the examples existing to illustrate the consequences of the rules?
20:47 gfldex but i'm drifting into the murky waters of politics it seams
20:49 Ven joined #perl6
20:50 wamba joined #perl6
20:50 perlpilot I don't know about "politics", but I'd like us to asymptotically approach the intersection of clarity and utility.
20:53 perlpilot There's a bit of catch-22 with examples though ... sometimes the principle is understood through many examples.  You never know though, how other people learn, so it's best to err on the side of verbosity IMHO
20:53 gfldex How the heck does one learn how to program computers anyway? It happend so slowly to me that I never realised that I happend to me.
20:54 perlpilot gfldex: I imagine this is why we have academic degrees in education.   It's those people's job to "capture" the process and reveal it.
20:55 gfldex i found folk with academic degrees in education seldomly able to do so
20:55 gfldex great teachers are rare
20:56 perlpilot That's because humans are a difficult bunch.  (across many many axes)
20:57 perlpilot gfldex: I've been told that I'm an excellent teacher, but I think they're wrong.   I was an excellent teacher of algebra to my sister-in-law, but I doubt I'd be able to reproduce my success with her across more people.   I just happened to find the right words to make things click for her.
20:59 perlpilot My wife on the other hand is an excellent teacher.  Period.   If you throw her in a situation where she has to teach something she doesn't know anything about, she will learn as much as she can about the subject and then present it in many different ways depending on who she's teaching to
20:59 Gasher joined #perl6
21:06 Ven joined #perl6
21:06 pmurias gfldex: isn't the learning how to program computers really different across people?
21:08 gfldex that may very well be
21:11 pmurias training large quanties of programmers doesn't seem to be a solved problem despite the EU try to throw money at it
21:12 lmmx joined #perl6
21:17 pmurias gfldex: as a kid on the second attempt to learn programming I worked my way throught "Learning Perl" book (the first failed attempt was my dad showing me some stuff in LOGO)
21:24 lizmat and another Perl6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/01/16/2017-03-🙆%E2%80%8D♀%EF%B8%8F-woman-gesturing-ok/
21:25 samcv lizmat++
21:26 Ven joined #perl6
21:29 samcv huggable, release
21:29 huggable samcv, nothing found
21:29 samcv NeuralAnomaly, release
21:29 samcv NeuralAnomaly, help
21:29 NeuralAnomaly samcv, stats | blockers
21:29 samcv buggable, help
21:29 buggable samcv, tags | tag SOMETAG | eco | eco Some search term | speed
21:30 samcv i forget which bot told me when the next release was
21:30 moritz NeuralAnomaly: release
21:30 moritz NeuralAnomaly: help
21:30 NeuralAnomaly moritz, stats | blockers
21:32 AlexDaniel NeuralAnomaly: stats
21:32 NeuralAnomaly AlexDaniel, [✘] Next release will be in 4 days and 7 hours. Since last release, there are 87 new still-open tickets (87 unreviewed and 0 blockers) and 324 unreviewed commits. See http://perl6.fail/release/stats for details
21:33 bjz joined #perl6
21:33 AlexDaniel m: say "\c[woman gesturing OK]".chars
21:33 camelia rakudo-moar f67df8: OUTPUT«1␤»
21:33 AlexDaniel :O
21:34 AlexDaniel so RT #127048 is now fixed?
21:34 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=127048
21:35 labster joined #perl6
21:39 perlpilot Is the bot going to automatically cut a release too?  :-)
21:40 lizmat AlexDaniel: afaik it's on samcv's radar ?
21:41 AlexDaniel well, all unicode issues are on samcv's radar
21:41 samcv uhm mostly AlexDaniel . not all the things in the emoji test file pass though
21:41 samcv this is a new test
21:41 AlexDaniel ok!
21:41 samcv heh ;) AlexDaniel
21:41 samcv run it yourself and see. though we pass almost all of them :)
21:41 samcv well. idk there's a lot of tests
21:42 samcv # Looks like you failed 275 tests of 1943
21:42 samcv used to be like failed 1500 I believe
21:43 samcv will reply to that RT with some info
21:43 AlexDaniel mc: my @x = lazy 1..3; my @y = lazy 6..9; say (@x X @y)[^10]
21:43 committable6 AlexDaniel, ¦«2015.12»: ((1 6) (1 7) (1 8) (1 9) Nil Nil Nil Nil Nil Nil)
21:43 AlexDaniel m: my @x = lazy 1..3; my @y = lazy 6..9; say (@x X @y)[^10]
21:44 camelia rakudo-moar f67df8: OUTPUT«No such method 'EmptyIterator' for invocant of type 'Rakudo::Iterator'␤  in block <unit> at <tmp> line 1␤␤»
21:44 AlexDaniel vOv
21:44 samcv m: Uni.new(0x1F3F3, 0xFE0F, 0x200D, 0x1F308).Str.uninames.perl.say
21:44 camelia rakudo-moar f67df8: OUTPUT«("WAVING WHITE FLAG", "VARIATION SELECTOR-16", "ZERO WIDTH JOINER", "RAINBOW").Seq␤»
21:44 samcv m: Uni.new(0x1F3F3, 0xFE0F, 0x200D, 0x1F308).Str.comb.».uninames.perl.say
21:44 camelia rakudo-moar f67df8: OUTPUT«(("WAVING WHITE FLAG", "VARIATION SELECTOR-16", "ZERO WIDTH JOINER").Seq, ("RAINBOW",).Seq)␤»
21:45 samcv weird how it breaks there. rainbow must have some odd properties it's not checking
21:46 AlexDaniel mc: my @x = lazy 1..3; say (@x X 4..7)[^10]
21:46 committable6 AlexDaniel, ¦«2015.12»: ((1 4) (1 5) (1 6) (1 7) (2 4) (2 5) (2 6) (2 7) (3 4) (3 5))
21:46 AlexDaniel m: my @x = lazy 1..3; say (@x X 4..7)[^10]
21:46 camelia rakudo-moar f67df8: OUTPUT«No such method 'EmptyIterator' for invocant of type 'Rakudo::Iterator'␤  in block <unit> at <tmp> line 1␤␤»
21:46 AlexDaniel bisect: my @x = lazy 1..3; say (@x X 4..7)[^10]
21:46 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=f67df8a). Old exit code: 0
21:46 lizmat AlexDaniel: https://github.com/rakudo/rakudo/commit/4386e77b39   # EmptyIterator
21:46 bisectable6 AlexDaniel, bisect log: https://gist.github.com/777b​717d9ee92fe64d5d11c990f12d96
21:46 bisectable6 AlexDaniel, (2017-01-16) https://github.com/rakudo/rakudo/commit/​8a3ff7b64b51a66e0e90437bbeb4793534a07026
21:46 Ven joined #perl6
21:47 AlexDaniel lizmat: this won't fix the last issue, right?
21:47 * lizmat checks
21:48 AlexDaniel lizmat: reading the weekly, I don't understand the change related to X and is-lazy
21:48 AlexDaniel lizmat: just because something is lazy doesn't mean it is infinite, right?
21:48 lizmat no, just that the Iterator is marked "is-lazy"
21:49 lizmat generally that means that you cannot reify it completely
21:49 AlexDaniel m: say (1..3 X 5..9).WHAT
21:49 camelia rakudo-moar f67df8: OUTPUT«(Seq)␤»
21:49 AlexDaniel lizmat: so why was X changed?
21:50 AlexDaniel “This is actually pretty nonsensical, as the left hand side of the X will only ever produce the first value, because the right hand side will never exhaust”
21:50 lizmat well, it's not changed, it's just that incorrect uses will now die
21:50 AlexDaniel what is an incorrect use?
21:50 lizmat m: 1..* X 1..*
21:50 camelia rakudo-moar f67df8: OUTPUT«WARNINGS for <tmp>:␤Useless use of "X" in expression "..* X 1.." in sink context (line 1)␤Can only have one lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
21:51 AlexDaniel m: 1..* X (lazy 1..5)
21:51 camelia rakudo-moar 4386e7: OUTPUT«WARNINGS for <tmp>:␤Useless use of "X" in expression "..* X (lazy 1..5)" in sink context (line 1)␤Can only have one lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
21:51 AlexDaniel so no, this change is wrong
21:51 azawawi joined #perl6
21:52 lizmat but why would you do a lazy 1..5 there ???
21:52 lizmat why add the lazy there?  That's a DIHWIDT
21:52 azawawi Perl 6 rocks... enterprise resource planning here we come... https://github.com/azawawi/perl6-odoo-cli​ent/blob/master/examples/01-login.pl6#L55 :)
21:53 AlexDaniel what if I have something lazy that comes from somewhere else? Is it going to work in this case?
21:53 lizmat m: dd (1..* X~ 1..5)[^20]
21:53 camelia rakudo-moar 4386e7: OUTPUT«("11", "12", "13", "14", "15", "21", "22", "23", "24", "25", "31", "32", "33", "34", "35", "41", "42", "43", "44", "45")␤»
21:53 lizmat if there are 2 lazies, then left one will become unused
21:54 AlexDaniel /o\
21:54 AlexDaniel let's try something like
21:54 AlexDaniel m: say 1..* X~ lines()
21:54 camelia rakudo-moar 4386e7: OUTPUT«(...)␤»
21:54 inra joined #perl6
21:54 AlexDaniel m: say (1..* X~ lines())[^20]
21:54 camelia rakudo-moar 4386e7: OUTPUT«(1»Wann treffen wir drei wieder zusamm?« 1   »Um die siebente Stund‘, am Brückendamm.« 1     »Am Mittelpfeiler.« 1         »Ich lösche die Flamm.« 1 »Ich mit« 1 1         »Ich komme vom Norden her.« 1        »Und ich vom Süden.« 1       …»
21:55 AlexDaniel hmmm
21:55 lizmat is that what you expected?
21:55 lizmat m: say (1..* Z~ lines())[^20]   # did you mean this?
21:55 camelia rakudo-moar 4386e7: OUTPUT«(1»Wann treffen wir drei wieder zusamm?« 2   »Um die siebente Stund‘, am Brückendamm.« 3     »Am Mittelpfeiler.« 4         »Ich lösche die Flamm.« 5 »Ich mit« 6 7         »Ich komme vom Norden her.« 8        »Und ich vom Süden.« 9       …»
21:56 AlexDaniel hmmmmm so the point is that because both of them are lazy, potentially we will not be able to reify the right side?
21:56 AlexDaniel and therefore the user has to eager one of them explicitly?
21:57 lizmat doesn't matter whether it's eager or not
21:57 lizmat if you have 2 unending iterables, the first one will only ever produce 1 value
21:57 AlexDaniel but my point was that nobody said they're unending, just lazy
21:58 lizmat fwiw, I think the "is-lazy" name on iterators is actually wrong
21:58 lizmat "is-not-ending" or "is-unending"
21:58 lizmat would be more correct
21:58 gfldex will-not-EndIteration
21:58 lizmat "is-without-known-ending"
21:59 lizmat something like that, yeah
21:59 nicq20_ joined #perl6
21:59 nicq20_ Hello o/
21:59 gfldex does-not-solve-halting-probem :->
22:00 AlexDaniel e: my @x = lazy 1..3; say (@x X 4..7)[^10]
22:00 evalable6 AlexDaniel, rakudo-moar 4386e77: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)»
22:00 AlexDaniel mc: my @x = lazy 1..3; say (@x X 4..7)[^10]
22:00 committable6 AlexDaniel, ¦«2015.12»: ((1 4) (1 5) (1 6) (1 7) (2 4) (2 5) (2 6) (2 7) (3 4) (3 5))
22:00 lmmx joined #perl6
22:01 AlexDaniel lizmat: I guess you're right. But I'm still confused a little bit
22:01 AlexDaniel alotabit…
22:01 lizmat m: my @x = lazy 1..3; say (@x X 4..7)[^10]   # this feels wrong, though
22:01 camelia rakudo-moar 4386e7: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)␤»
22:01 gfldex since lizmat++ knighted the reddit question to a blog post this may need commenting on: https://www.reddit.com/r/perl6/com​ments/5nulec/on_using_smileys_and_​type_objects_and_are_type/dcij7nf/
22:01 jnthn All that `is-lazy` means is that it was marked lazy.
22:01 AlexDaniel lizmat: anyway, this ↑ looks like a regression, right?
22:01 lizmat AlexDaniel: yeah it does, please rakudobug it
22:01 jnthn Which means it wants evaluating lazily
22:02 jnthn It may or may not be infinite
22:02 AlexDaniel jnthn: and this was my original point, which made me assume that X should work with lazies just fine
22:02 lizmat m: my @x = lazy 1..3; say @x.elems  # jnthn: so this is correct, right ?
22:02 camelia rakudo-moar 4386e7: OUTPUT«Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤Actually thrown at:␤  in block <unit> at <tmp> line 1␤␤»
22:02 brokenchicken perlpilot: you jest, but a bot has been cutting releases for the last 4 months...
22:03 brokenchicken I don't get why (1..*) X (1..*) is nonsensical. Is X eager?
22:03 lizmat no
22:03 brokenchicken huh
22:03 lizmat but all of your X's will have "1" as the left side
22:03 brokenchicken 0.o
22:04 AlexDaniel but…
22:04 brokenchicken m: say ((1..5) X (6..10))[^5]
22:04 camelia rakudo-moar 4386e7: OUTPUT«((1 6) (1 7) (1 8) (1 9) (1 10))␤»
22:04 brokenchicken Ah, OK. I get it now
22:04 brokenchicken lizmat++
22:04 AlexDaniel brokenchicken: ELI5 :(
22:04 * brokenchicken has no idea what that is
22:05 AlexDaniel brokenchicken: explain like I'm five
22:05 lizmat well, as I said in the commit message: if jnthn TimToady would like to have it removed or s/die/warn/, that's all ok with me
22:05 jnthn lizmat: Yes
22:05 lizmat I was working on that area of the system, and it felt like a thing a could do
22:05 lizmat *I
22:05 perlpilot brokenchicken: I only ½ jest.  The bot has been cutting releases based on a human pushing a button, right?   If the bot can tell us when it *can't* cut a release for some reason,  then why not let it cut releases on its own?
22:05 lizmat jnthn: s/die/warn/ ?
22:06 Ven joined #perl6
22:06 jnthn lizmat: I was answering about .elems
22:06 lizmat ah, ok
22:06 jnthn You were asking about X?
22:06 lizmat m: dd 1..* X 1..*   # jnthn: and this ?
22:06 camelia rakudo-moar 4386e7: OUTPUT«Can only have one lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
22:06 lizmat m: dd 1,2 X 1..*   # jnthn: and this ?
22:07 camelia rakudo-moar 4386e7: OUTPUT«Can only have single element lists before a lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
22:07 jnthn Hmm...wonder if an error is a bit harsh
22:07 AlexDaniel m: say 4..7 X (lazy 1..3)
22:07 camelia rakudo-moar 4386e7: OUTPUT«Can only have one lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
22:07 jnthn I'm thinking about degenerate cases
22:07 AlexDaniel well there you have it, one lazy sequence… dammit…
22:08 AlexDaniel m: say (lazy 1..3) X 4..7
22:08 camelia rakudo-moar 4386e7: OUTPUT«(...)␤»
22:08 lizmat well, it only broke one spectest, which was specifically doing "1..* X 1..*"
22:08 brokenchicken m: say (4...7) X (1...3)
22:08 camelia rakudo-moar 4386e7: OUTPUT«((4 1) (4 2) (4 3) (5 1) (5 2) (5 3) (6 1) (6 2) (6 3) (7 1) (7 2) (7 3))␤»
22:08 jnthn m: say (1..* X 1..*)[0]
22:08 camelia rakudo-moar 4386e7: OUTPUT«Can only have one lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
22:08 jnthn star: say (1..* X 1..*)[0]
22:08 camelia star-m 2016.10: OUTPUT«(1 1)␤»
22:09 jnthn star: say (1..* X 1..*)[1]
22:09 camelia star-m 2016.10: OUTPUT«(1 2)␤»
22:09 jnthn star: say (1..* X 1..*)[^10]
22:09 camelia star-m 2016.10: OUTPUT«((1 1) (1 2) (1 3) (1 4) (1 5) (1 6) (1 7) (1 8) (1 9) (1 10))␤»
22:09 jnthn Those original outputs look correct?
22:09 brokenchicken Yup
22:09 perlpilot indeed
22:09 jnthn I mean, you'll never progress beyond (1,<something>)
22:09 lizmat that's the point...
22:09 gfldex http://stackoverflow.com/questions/4​1554702/how-do-i-find-the-index-of-t​he-maximum-value-in-a-list-in-perl-6
22:09 lizmat of the die
22:09 gfldex is missing
22:10 gfldex m: my @l = 1,4,9,7,3; say [max] @l.antipairs
22:10 camelia rakudo-moar 4386e7: OUTPUT«9 => 2␤»
22:10 jnthn So in effect the data in the first sublist beyond the first item is dead
22:10 lizmat yup
22:10 brokenchicken yup
22:10 jnthn m: say (1,5,9,3,6).max(:k)
22:10 camelia rakudo-moar 4386e7: OUTPUT«9␤»
22:10 jnthn Aww :)
22:11 jnthn gfldex's antiparis way is neat :)
22:11 brokenchicken perlpilot: because it's easier to push the button than code and debug all the logic to make it figure out when it's allowed to make a release AND the abort sequence, if we find a blocker or some other reason.
22:11 AlexDaniel anyway, RT #130566
22:11 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130566
22:11 gfldex i'm not going to post on stackoverflow
22:11 jnthn lizmat: I dunno, will have to ponder it some more, TimToady may have some thoughts on it
22:12 jnthn lizmat: Did this arise out of somebody's actual confusion?
22:12 jnthn Or speculated future confusion?
22:12 lizmat well, I was triggered by:
22:12 perlpilot lizmat: what if the programmer doesn't necessarily know if both lists are lazy or not?  Could the star behavior be a feature?
22:12 AlexDaniel lizmat: now what about this?
22:12 AlexDaniel e: say 4..7 X (lazy 1..3)
22:12 evalable6 AlexDaniel, rakudo-moar 3e373ff: OUTPUT«(exit code 1) Can only have one lazy sequence in a cross␤  in block <unit> at /tmp/m_dBb9c2z4 line 1␤»
22:12 lizmat m: dd (1,2 X 1..* X 3,4)[^10]
22:12 camelia rakudo-moar 3e373f: OUTPUT«Can only have single element lists before a lazy sequence in a cross␤  in block <unit> at <tmp> line 1␤␤»
22:12 lizmat hehe
22:14 TEttinger joined #perl6
22:14 lizmat I've reverted the check
22:15 * AlexDaniel closes RT tab
22:15 lizmat I guess if you want to shoot yourself in the feet, we should give you enough rope  :-)
22:16 jnthn lizmat: My gut feeling is the check is a tad heavy-handed, but at the same time I can't think up a practical case where one may run in to it...
22:16 AlexDaniel the thing is, even with *one* infinite list it will produce an infinite Seq, so the programmer should be aware of that himself
22:16 azawawi http://pasteboard.co/mUWFTtQii.png  # Odoo::Client in action :)
22:17 jnthn Anyways, if we're happy with it reverted, I'm content with it too
22:17 lizmat m: $ 6 'dd (1,2 X 1..* X 3,4)[^10]'
22:17 lizmat ((1, 1, 3), (1, 1, 4), (1, 2, 3), (1, 2, 4), (1, 3, 3), (1, 3, 4), (1, 4, 3), (1, 4, 4), (1, 5, 3), (1, 5, 4))
22:17 camelia rakudo-moar 3e373f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3$7⏏5 6 'dd (1,2 X 1..* X 3,4)[^10]'␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤        statement modifier␤   …»
22:17 lizmat $ 6 'dd (1,2 X 1..* X 3,4)[^10]'
22:17 lizmat ((1, 1, 3), (1, 1, 4), (1, 2, 3), (1, 2, 4), (1, 3, 3), (1, 3, 4), (1, 4, 3), (1, 4, 4), (1, 5, 3), (1, 5, 4))
22:17 * jnthn goes to rest off his headache, hopefully...
22:17 jnthn Back tomorrow o/
22:17 lizmat good night, jnthn, sleep tight!
22:18 jnthn Thanks! :) 'night
22:19 lizmat m: my @x = lazy 1..3; say @x   # AlexDaniel  underlying issue
22:19 camelia rakudo-moar 3e373f: OUTPUT«[...]␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.min
22:23 camelia rakudo-moar 3e373f: OUTPUT«-5␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.max
22:23 camelia rakudo-moar 3e373f: OUTPUT«42␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.maxpairs
22:23 camelia rakudo-moar 3e373f: OUTPUT«[4 => 42]␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.minpairs
22:23 camelia rakudo-moar 3e373f: OUTPUT«[6 => -5]␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.minmax
22:23 camelia rakudo-moar 3e373f: OUTPUT«-5..42␤»
22:23 AlexDaniel m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.minmaxpairs
22:23 camelia rakudo-moar 3e373f: OUTPUT«No such method 'minmaxpairs' for invocant of type 'Array'␤  in block <unit> at <tmp> line 1␤␤»
22:23 AlexDaniel boooo…
22:23 AlexDaniel :)
22:24 AlexDaniel m: my @x = 6,8,NaN,5,3; say @x.minmax
22:24 camelia rakudo-moar 3e373f: OUTPUT«3..NaN␤»
22:24 AlexDaniel :|
22:25 nicq20_ Is there anything I can use to try and find where an error occured, if it does not tell me when it fails?
22:25 AlexDaniel --ll-exception ?
22:25 Ven joined #perl6
22:26 nicq20_ Hmm... That did not seem to do anything.
22:26 perlpilot Why does minpairs and maxpairs exist?
22:27 AlexDaniel c: 2015.07 my @x = 6,8,9,3,42,5,-5,0,2; say @x.minpairs
22:27 committable6 AlexDaniel, ¦«2015.07»: Method 'minpairs' not found for invocant of class 'Array'␤  in block <unit> at /tmp/PmI6ZnnEbk:1␤ «exit code = 1»
22:27 AlexDaniel bisect: my @x = 6,8,9,3,42,5,-5,0,2; say @x.minpairs
22:27 bisectable6 AlexDaniel, Bisecting by exit code (old=2015.12 new=9537ccd). Old exit code: 1
22:27 bisectable6 AlexDaniel, bisect log: https://gist.github.com/605d​e7ad6fbb48f6211a28778dc8a4d0
22:27 AlexDaniel maybe the commit will tell us why
22:27 bisectable6 AlexDaniel, (2016-04-08) https://github.com/rakudo/rakudo/commit/​7024e87d469ec9641368e10fc2dda143ce23530d
22:27 AlexDaniel ah no, that's a wrong one
22:28 AlexDaniel ah, actually, it is the right one
22:28 lizmat it came from QuantHash
22:28 lizmat and was deemed more generally usable ?
22:29 Geth doc: 5a0a902fc3 | (Wenzel P. P. Peppmeyer)++ | doc/Language/terms.pod6
22:29 Geth doc: complex example for `constant`
22:29 Geth doc: review: https://github.com/perl6/doc/commit/5a0a902fc3
22:29 perlpilot m: my @x = 6,8,9,3,42,5,-5,0,2; say @x.pairs.max(*.value);
22:29 camelia rakudo-moar 3e373f: OUTPUT«4 => 42␤»
22:30 AlexDaniel I was actually hoping max(:p) would work
22:31 gfldex perlpilot: maxpairs are setty and baggy methods
22:32 perlpilot and don't show up in doc.perl6.org.
22:33 perlpilot But, I was thinking that we already have primitives we can combine to get the equivalent to minpairs/maxpairs, so what does the specialization buy us?
22:34 Geth doc: 0c56823051 | (Wenzel P. P. Peppmeyer)++ | doc/Type/Sub.pod6
22:34 AlexDaniel again, I think these should be adverbs
22:34 Geth doc: index my and our in Sub
22:34 Geth doc: review: https://github.com/perl6/doc/commit/0c56823051
22:34 gfldex min/maypairs are ENODOC
22:34 gfldex roast likes them tho
22:36 AlexDaniel m: my @x = 2,5,3; say @x.grep: {True}, :p
22:36 camelia rakudo-moar 9537cc: OUTPUT«(0 => 2 1 => 5 2 => 3)␤»
22:36 bjz joined #perl6
22:36 AlexDaniel m: my @x = 2,5,3; say @x.max: :p
22:36 camelia rakudo-moar 9537cc: OUTPUT«5␤»
22:36 AlexDaniel :P
22:36 AlexDaniel perlpilot: can you create an RFC ticket?
22:38 lizmat AlexDaniel: https://github.com/rakudo/rakudo/commit/0cd921e351  # RT #130566
22:38 synopsebot6 Link:  https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=130566
22:38 lizmat AlexDaniel++  # good catch!
22:38 AlexDaniel and a quick one too :)
22:38 AlexDaniel e: my @x = lazy 1..3; say (@x X 4..7)[^10]
22:38 evalable6 AlexDaniel, rakudo-moar 9537ccd: OUTPUT«(Nil Nil Nil Nil Nil Nil Nil Nil Nil Nil)»
22:38 AlexDaniel not yet…
22:39 lizmat patience  :-)
22:39 lizmat good night, #perl6!
22:39 AlexDaniel o/
22:39 brokenchicken nicq20_: that's an argument to the perl6 executable; ensure you're not passing it as an arg to your program
22:40 nicq20_ brokenchicken: Yeah, still no help. I'm trying to use tony-o's Hiker. Errors out with "Unhandled exception: cannot close a closed socket", but I don't know where.
22:41 nicq20_ Seems to be in the module itself because if I just use the regular boilerplate, it still fails.
22:43 nicq20_ brokenchicken: Do I need to compile perl6 differently to use it?
22:44 AlexDaniel e: my @x = lazy 1..3; say (@x X 4..7)[^10]
22:44 evalable6 AlexDaniel, rakudo-moar 0cd921e: OUTPUT«((1 4) (1 5) (1 6) (1 7) (2 4) (2 5) (2 6) (2 7) (3 4) (3 5))»
22:44 AlexDaniel nicq20_: no
22:44 brokenchicken AlexDaniel: well, I see this condiation with 'close' in it and when the `if` is true, the $.close will runb twice: 1
22:44 brokenchicken gah
22:45 brokenchicken This Imean https://github.com/tony-o/perl6-hiker/​blob/d0c73dac29caace941f6b861973664295​447d5a5/lib/Hiker/Render.pm6#L13-L15
22:45 Ven joined #perl6
22:47 brokenchicken I mean nicq20_
22:47 nicq20_ I was thinking the problem was either that, or something going out of scope.
22:48 nicq20_ Because it happens a few seconds after loading a page.
22:56 bstamour joined #perl6
23:01 nicq20_ brokenchicken: Does not seem to be the 2 "$.close" calls in Render.pm6
23:05 Ven joined #perl6
23:11 jdv79 shouldn't one of these work?: https://gist.github.com/anonymous​/4153e6dce5094b6932c5aad391565a37
23:11 yoleaux 15 Jan 2017 20:13Z <brokenchicken> jdv79: how is the MetaCPAN thing going? How can willing hands contribute?
23:11 jdv79 brokenchicken: good question.  nobody has asked so far.  probably should have a roadmap or todo list i guess.
23:12 jdv79 likely update the forks to track the new metacpan stuff first since they just changed a bunch of sstuff
23:12 jdv79 and then improve on the existing bugs - there's a list somewhere
23:12 jdv79 and then get them to stand it up
23:12 jdv79 maybe:)
23:13 jdv79 nine_: ^^^ the gist
23:13 jdv79 any ideas?
23:26 Ven joined #perl6
23:30 espadrine_ joined #perl6
23:36 Ven joined #perl6
23:37 brokenchicken jdv79: "probably should have a roadmap." Yes, that would be very helpful. People see problems with current ecosystem and propose implementing stuff. They're then told not to, because CPAN is for that. But at the time time no one seems to know who's doing what and how to contribute. And based on updates I personally seen, there hasn't been any significant progress on that project for over a year now.
23:40 brokenchicken In not overly polite terms: whoever's doing whatever as far as permanet ecosystem goes should either start leading the project properly or stop doing it.
23:41 espadrine_ joined #perl6
23:44 Actualeyes joined #perl6
23:50 Ven joined #perl6
23:53 kst joined #perl6
23:53 jdv79 brokenchicken:  maybe its time for changes, yeah.  there were necessary delays with regard to back compat
23:53 jdv79 mst was handling that
23:53 AlexDaniel just a little bit of transparency can help, yes
23:53 jdv79 mst: are there any changes?
23:53 jdv79 for a while there we couldn't upload stuff to cpan
23:55 jdv79 that was the major hangup iirc
23:56 brokenchicken Here's mst's respponse on that from yearstersday: "msterrr, I think psixdists is running, ranguard's been popping up in here to ask stuff"
23:56 jdv79 hmm
23:58 lmmx joined #perl6

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

Perl 6 | Reference Documentation | Rakudo