Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2017-07-10

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:08 mcmillhj joined #perl6
00:39 b2gills joined #perl6
00:42 lookatme joined #perl6
00:42 lookatme morning
00:47 daa joined #perl6
00:52 zengargoyle lookatme: evening :)
00:53 lookatme +_+
00:54 zengargoyle .u +
00:54 yoleaux U+002B PLUS SIGN [Sm] (+)
00:56 zengargoyle .u ÷
00:56 yoleaux U+00F7 DIVISION SIGN [Sm] (÷)
00:56 * zengargoyle thinks i need bigger/better fonts :P
01:01 lookatme .u @
01:01 yoleaux U+0040 COMMERCIAL AT [Po] (@)
01:01 vendethiel joined #perl6
01:04 zengargoyle .u TAG COMMERCIAL AT
01:04 yoleaux U+E0040 TAG COMMERCIAL AT [Cf] (<control>)
01:06 zengargoyle .u TAG DIGIT NINE
01:06 yoleaux U+E0039 TAG DIGIT NINE [Cf] (<control>)
01:07 Cabanossi joined #perl6
01:08 * zengargoyle has no clue what TAG XXX are. :)
01:08 zengargoyle .u COMMERCIAL MINUS SIGN
01:08 yoleaux U+2052 COMMERCIAL MINUS SIGN [Sm] (⁒)
01:08 zengargoyle m: say 9 ⁒ 4;
01:08 camelia rakudo-moar 4f5a1e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Confused␤at <tmp>:1␤------> 3say 97⏏5 ⁒ 4;␤    expecting any of:␤        infix␤        infix stopper␤        postfix␤        statement end␤        statement modifier␤        state…»
01:10 zengargoyle .u ﹫@
01:10 yoleaux U+FE6B SMALL COMMERCIAL AT [Po] (﹫)
01:10 yoleaux U+FF20 FULLWIDTH COMMERCIAL AT [Po] (@)
01:11 zengargoyle unicode is weird....
01:12 zengargoyle m: my ﹫tiny = 1,2,3;
01:12 camelia rakudo-moar 4f5a1e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 ﹫tiny = 1,2,3;␤»
01:12 zengargoyle m: my @tiny = 1,2,3;
01:12 camelia rakudo-moar 4f5a1e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 @tiny = 1,2,3;␤»
01:15 * zengargoyle guesses there isn't a Unicode table that says @ == ﹫ == @ ;/
01:17 geekosaur the parser still has to know about it
01:18 zengargoyle yeah, i'm just goofing off.
01:18 zengargoyle had no clue it was COMMERCIAL AT... wtf is COMMERCIAL anyways?
01:20 zengargoyle i guess it's not just an AT SIGN.
01:22 geekosaur that's the formal name of it
01:22 geekosaur originated on bills of lading
01:23 zengargoyle yeah, but there's a COMMERCIAL {AT,MINUS SIGN} and {SMALL,FULLWIDTH} COMERCIAL AT and TAG COMMERCIAL AT.  that's the limit of COMMERCIAL in /usr/share/i18ncharpaps/UTF-8.gz
01:23 geekosaur and only some commercial usages match the common usage; it gets used in a number of contexts, and sometimes means 'as' or 'for' instead of 'at', etc.
01:25 zengargoyle it seems rather specific out of all of the symbols to have so few named with COMMERCIAL is all i'm going on about. :)
01:27 lookatme m: my @array = [];
01:27 camelia rakudo-moar 4f5a1e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 @array = [];␤»
01:27 zengargoyle guess i'd have to go dig through the Unicode Consortium pages for any sort of insight or resolution...
01:28 zengargoyle or ask samcv :)
01:28 samcv ask me what?
01:28 zengargoyle what TAG and COMMERCIAL mean in Unicode :)
01:28 lookatme some unicode staff
01:28 samcv commercial doesn't mean anything
01:29 samcv it's just what the @ character is called because its usage was usually commercial before technology came around
01:29 lookatme .u ℗
01:29 yoleaux U+2117 SOUND RECORDING COPYRIGHT [So] (℗)
01:29 lookatme .u ©
01:29 yoleaux U+00A9 COPYRIGHT SIGN [So] (©)
01:29 lookatme .u ®
01:29 yoleaux U+00AE REGISTERED SIGN [So] (®)
01:29 samcv like 4kg wheat @ $4.50
01:29 samcv that's how it used to be used before computers. and that's why it's called commercial at sign
01:30 geekosaur wikipedia has a discussion of this, yes
01:30 samcv u: tag commercial at
01:30 geekosaur commercial/mercantile
01:30 unicodable6 samcv, U+E0040 TAG COMMERCIAL AT [Cf] (????)
01:30 zengargoyle yeah, just seems a bit whimsical being only the AT and a MINUS get the COMMERCIAL treatment.
01:30 samcv unidump U+E0040
01:30 samcv unidump: U+E0040
01:30 unicodable6 samcv, https://gist.github.com/a887bae7c15ade221f63a1079744fedc
01:30 reino4477 joined #perl6
01:31 reino4477 is there a decent http library in perl 6?
01:32 samcv well the tag one you can use for flags
01:32 samcv http://www.unicode.org/reports/tr51/tr51-10.html#Emoji_With_Tags_Notes
01:32 samcv didn't know there was an @ tag
01:32 lookatme greppable6 http
01:33 lookatme :(
01:33 zengargoyle i sorta took tags like Field separator / Record separator, those normally not visibly but meaningfull things.
01:33 zengargoyle huggable: eco http
01:33 huggable zengargoyle, nothing found
01:33 zengargoyle huggable: eco curl
01:33 huggable zengargoyle, nothing found
01:33 zengargoyle names
01:34 zengargoyle i know there's a libcurl http among the other http modules....
01:34 lookatme huggable: Curl
01:34 huggable lookatme, nothing found
01:34 samcv well check unicode 3.1 i guess. that's when the tag charecters were added. i'd look it up but i have to go to dinner :)
01:35 lookatme http://modules.perl6.org/#q=HTTP
01:35 zengargoyle np, thanks samcv++ :)
01:35 zengargoyle huggable: eco dict
01:35 huggable zengargoyle, nothing found
01:35 reino4477 is there a decent http library in perl 6?
01:36 lookatme There two module binding to curl
01:36 * zengargoyle thinks huggable may be out of commision ATM...
01:36 lookatme reino4477, How about libcurl binding
01:38 reino4477 lookatme: well, I'm asking about a decent and just what works somehow
01:38 zengargoyle [#perl6]
01:38 reino4477 **not just
01:38 zengargoyle http://modules.perl6.org/?q=http#q=http
01:39 reino4477 I'm able to do a search
01:39 zengargoyle for some reason a search for curl shows nothing.... :(
01:40 pompomcrab joined #perl6
01:40 zengargoyle Net::Curl:ver('0.1.0'):auth('github:azawawi')
01:40 zengargoyle LibCurl:ver('0.5.1')
01:41 colomon joined #perl6
01:41 zengargoyle `zef list | fgrep -i curl`...  i don't know what's up with huggable/eco or search on the web page.
01:42 mcmillhj joined #perl6
01:47 ugexe case sensitivity?
01:47 zengargoyle https://www.youtube.com/watch?v=YNls6sM8qJA
01:47 zengargoyle reino4477: ^^ YAPC::NA talk on LibCurl for Perl6
01:47 zengargoyle huggable: eco LibCurl
01:47 huggable zengargoyle, nothing found
01:47 zengargoyle huggable: eco Net::Curl
01:47 huggable zengargoyle, nothing found
01:47 ugexe there is also `zef search curl`
01:47 * zengargoyle just thinks that was how to talk to huggable...
01:47 lookatme m: use HTTP::Client;
01:47 camelia rakudo-moar 4f5a1e: OUTPUT: «===SORRY!===␤Could not find HTTP::Client at line 1 in:␤    /home/camelia/.perl6␤    /home/camelia/rakudo-m-inst-1/share/perl6/site␤    /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤    /home/camelia/rakudo-m-inst-1/share/perl6␤    CompUnit…»
01:47 zengargoyle hehe i did `zef search '*curl*' first. :)
01:47 zengargoyle guess it's a little more liberal than i expected.
01:47 ugexe ah i see... has to be `zef search Curl`
01:48 ilbot3 joined #perl6
01:48 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:48 zengargoyle *yay*
01:48 ugexe or --wrap=666 to set the col width to use
01:49 zengargoyle complaint retracted. :)
01:49 ugexe it doesn't format good with the table though
01:52 zengargoyle yeah, just like psql and many other things.  it's probably not a make-everybody-happy-at-once sort of thing.
01:53 zengargoyle i'm probably a dinosaur for mostly keeping to 80x24 terminals. :)
01:54 geekosaur speed 38400 baud; rows 54; columns 105; line = 0;
01:54 geekosaur even we've upgraded :p
01:57 mcmillhj joined #perl6
01:58 * zengargoyle really wants 64x16 for 1k blocks and each 1 code block has a shadow block with 1k worth of documentation.
02:00 zengargoyle but seriously, i have often wished for a shadow block like documentation.  a split that's synced to the code on one side and doc on the other... not this inline comment stuff..
02:06 lookatme show document in split windows
02:07 zengargoyle yeah, but auto synced so additions in the code included space in the doc.  maybe sync'd on function name and a tag in the doc.
02:08 zengargoyle so page up/down or scrolling or edits in the code window still keep the doc window in the appropriate place automagically.
02:08 lookatme write in single document, split them when show in terminal
02:08 lookatme this like emacs buffer
02:08 jast joined #perl6
02:09 zengargoyle i think you're missing the auto-sync bit.
02:09 lookatme yeah, that's, Hmm
02:09 zengargoyle you can totally split and show code on one side and doc on the other, the trick is keeping them tied together seamlessly.
02:10 colomon_ joined #perl6
02:10 zengargoyle old FORTH systems had 1k blocks of code, cool systems had 1k block of doc for each 1k block of code (whether you use it or not).
02:11 noganex_ joined #perl6
02:11 lookatme oh
02:13 zengargoyle just a little more transparent than an editor split.  basically every line in code window had a line in doc window and they could be sync'd because every page was exactly 1k characters.
02:14 lookatme Hmm
02:15 zengargoyle 10 1k blocks for code + 10 1k blocks for doc,  just load block 1 code and block 1 doc.  it's not as obvious or simple to keep code and doc sync'd when it's just a stream of text.  hence inline comments and docs intermixed with code.
02:15 skids joined #perl6
02:15 zengargoyle it was also nice to sorta force documentation without cluttering code with comments...
02:17 zengargoyle just another of my pipe dreams that the implementation is beyond my skills or patience. :)
02:21 zengargoyle i might be possible in the future to write a p6 editor in p6 and introspect and keep pod/comments sync'd side by side instead of inline.
02:22 zengargoyle or i might be the only person who likes such an ides. :P
02:25 gdonald joined #perl6
02:26 lookatme Hmm, at least I like your idea
02:28 AlexDaniel dogbert17: hello?
02:29 AlexDaniel greppable6: HTTP
02:30 greppable6 AlexDaniel, https://gist.github.com/f557d10e3bbfd1b0ee61c2de8e675b85
02:30 AlexDaniel greppable6: use.*HTTP
02:30 greppable6 AlexDaniel, https://gist.github.com/1be48cfc061ef3c92e55afc287ef86cf
02:33 lookatme greppable6: Curl
02:33 greppable6 lookatme, https://gist.github.com/1bf947bae880e8d7897b08741dc7d78c
02:37 AlexDaniel wow, a lot of irrelevant stuff :)
02:37 stmuk joined #perl6
02:45 sufrostico joined #perl6
02:49 AlexDaniel .tell dogbert17 I fully support your work on the ticket queue, sorry I had to reopen two tickets. It's just that besides “rejected” and “resolved” there's also “open - testneeded” status :)
02:49 yoleaux AlexDaniel: I'll pass your message to dogbert17.
02:49 mcmillhj joined #perl6
02:54 cyphase joined #perl6
02:57 mcmillhj joined #perl6
03:08 Cabanossi joined #perl6
03:14 bwisti joined #perl6
03:40 astj joined #perl6
03:46 wamba joined #perl6
03:52 Actualeyes left #perl6
03:54 Cabanossi joined #perl6
04:31 astj joined #perl6
04:52 xtreak joined #perl6
05:01 astj_ joined #perl6
05:04 |oLa| joined #perl6
05:08 wigner joined #perl6
05:10 |oLa| joined #perl6
05:18 ufobat joined #perl6
05:23 Actualeyes joined #perl6
05:24 sivoais joined #perl6
05:26 nadim joined #perl6
05:39 dct joined #perl6
05:56 jast joined #perl6
06:08 andrzejku joined #perl6
06:21 domidumont joined #perl6
06:26 domidumont joined #perl6
06:29 andrzejku joined #perl6
06:32 xtreak joined #perl6
06:34 andrzejku hi
06:35 lookatme andrzejku, hi
06:35 andrzejku lookatme, could you look on my code please?
06:36 lookatme what code ?
06:36 andrzejku lookatme, https://github.com/damaxi/InterestRate/blob/master/lib/DecreasingInstallmentRole.pm6
06:36 lookatme What's the problem ?
06:36 andrzejku the @month_remainings_interests array in while scope
06:37 andrzejku differs from out which is out
06:37 andrzejku however as I check yesterday perl6 array works more like pass by value
06:38 vendethiel joined #perl6
06:38 lookatme andrzejku, How do you used `calculateDecreasingInstallment`?
06:38 andrzejku lookatme, I extend InterestRate class with roles
06:39 andrzejku than call this method there
06:39 xtreak joined #perl6
06:39 andrzejku https://github.com/damaxi/InterestRate/blob/master/lib/InterestCalculator.pm6
06:39 Cabanossi joined #perl6
06:39 andrzejku it looks like it took only last value
06:39 andrzejku like it was passed by reference
06:40 lookatme please try binding `($capital_part, @month_remainings_interests) := self.calculateDecreasingInstallment`
06:41 andrzejku lookatme, wait I will check
06:41 lookatme andrzejku, it probably what you need
06:43 andrzejku lookatme, perl6 is awesome however it is not gonna be easy when you code tired and you don't know syntax and pitfalls very well
06:44 lookatme andrzejku, the document somewhere may be explain this. As I know binding is like parameter capture, and assign not
06:45 zengargoyle AnnualInterestNumber?
06:48 andrzejku lookatme, the problem is not there, I putted say for @month_remainings in while scope and outside and let me show how it looks
06:49 lookatme ok
06:49 andrzejku lookatme, https://pastebin.com/xY3iVty0
06:50 andrzejku inside @month_remaining has correct values
06:50 andrzejku and outside all values change to default
06:50 lookatme oh
06:50 lookatme wait
06:50 andrzejku $month is incremented
06:51 lookatme it's @month_remainings_interests ?
06:51 andrzejku yeah
06:51 lookatme oh ok
06:52 andrzejku what about bindings as I know that creates a value read only and make performance impact
06:55 lookatme andrzejku,  I don't know what happened. Is that code can run on my pc ?
06:55 andrzejku it should
06:55 andrzejku try to clone it and for ex. perl6 main.p6  391000 1.77 30
06:55 lookatme ok
06:55 andrzejku I will try to fast debug it ;d however it would be my first time
07:01 lookatme andrzejku, I think the variable reference one instance
07:01 lookatme I don't know what cause this
07:02 wamba joined #perl6
07:02 lookatme I make a clone `@month_remainings_interests.push: ($month.clone, $remaining_capital.clone, $interest_part.clone);` and it work
07:02 lookatme andrzejku, try this
07:02 zengargoyle try: @month_remainings_interests.push: [$month, $remaining_capital, $interest_p
07:03 lookatme zengargoyle, what's different [ and (
07:03 zengargoyle try [] instead of () in the push.
07:04 * lookatme was not noticed that he always use `[]`
07:04 zengargoyle or just remove the () totally. @month_remainings_interests.push: $month, $remaining_capital, $interest_part;
07:05 lookatme :)
07:05 zengargoyle oh, nevermind removing them....
07:05 zengargoyle not sure exactly why () is different than () in this case.
07:06 zengargoyle not sure exactly why [] is different than () in this case. -- DOH!
07:07 lookatme remove the `()`, that's become a comma expression.
07:07 lookatme or ?
07:07 * zengargoyle doesn't know the interest maths. :)
07:07 notostraca joined #perl6
07:07 lookatme yeah, comma expression
07:08 lookatme and [] works fine
07:08 lookatme also, clone is work
07:09 parv joined #perl6
07:09 andrzejku mm sorry I am dumb :P
07:09 zengargoyle @month_remainings_interests.push( |($month, $remaining_capital, $interest_
07:09 zengargoyle part) );
07:10 andrzejku I tried to create array of tuples
07:10 andrzejku [(a, b), (b, c)]
07:10 zengargoyle the () are pushing on the container instead of the value inside for some reason....  so each ends up with final value.
07:11 zengargoyle i do not know why. :)
07:12 zengargoyle try also:  @month_remainings_interests.append( ($month, $remaining_capital, $interest
07:12 zengargoyle _part) );
07:12 zengargoyle append seems to be different than push.
07:12 lookatme m: class A { method clone(*%_) { nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d];
07:12 camelia rakudo-moar 4f5a1e: ( no output )
07:12 andrzejku zengargoyle, I will back to you in 5-10minutes
07:13 lookatme m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d];
07:13 camelia rakudo-moar 4f5a1e: ( no output )
07:14 lookatme m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; say @a[0].[0].WHERE; say @a[1].[0].WHERE;
07:14 camelia rakudo-moar 4f5a1e: OUTPUT: «140036006626368␤140036006626368␤»
07:14 lookatme m: class A { method clone(*%_) { say "CALL ME"; nextwith(|%_); }; }; my @a; my $c = A.new; my $d = A.new; @a.push: ($c, $d); @a.push: [$c, $d]; say @a[0].[0].WHERE; say @a[1].[0].WHERE; $c = A.new; say @a[0].[0].WHERE; say @a[1].[0].WHERE;
07:14 camelia rakudo-moar 4f5a1e: OUTPUT: «140308650411904␤140308650411904␤140308650458112␤140308650411904␤»
07:15 * zengargoyle is just looking for $month to increase instead of stay the same.
07:16 zengargoyle maybe @thing.push: ($var1, $var2) is a bug....  or maybe a feature :)
07:16 lookatme yeah
07:17 domidumont joined #perl6
07:18 zengargoyle i have seen a similar thing in other code where a variable keeps last value.  i do not know if it is related or different.
07:22 lookatme have you solved that ?
07:24 zakharyas joined #perl6
07:26 zengargoyle lookatme: it is known and there is a bug report.  it is a weird case with * magic and ~~ and regex.  (where using 'eq' instead of '~~' works.
07:27 zengargoyle .push: ($month, ... ).Slip also seems to work.
07:27 lookatme oh
07:28 zengargoyle i would expect .push: ($month, ...) to work...
07:28 abraxxa joined #perl6
07:28 leont joined #perl6
07:28 lookatme zengargoyle, yeah, .List also work
07:29 lookatme maybe a bug
07:29 zengargoyle maybe a differnece between .push and .append
07:30 * zengargoyle doesn't really understand the difference between .push and .append... :)
07:30 moritz m: my @a = 1, 2; @a.push: [3, 4]; @a.append: [5, 6]; say @a.perl
07:30 camelia rakudo-moar 4f5a1e: OUTPUT: «[1, 2, [3, 4], 5, 6]␤»
07:31 moritz that is the difference
07:31 lookatme append works fine except it flat the list
07:31 zengargoyle i think .append does the .Slip thing.
07:31 moritz "append automatically slips you" :-)
07:31 lookatme :)
07:32 lookatme I agree with you, .push: ($month, ... ) would be work
07:33 zengargoyle why does .push: ($foo, $bar) not push a list of 2 values, but pushes a ref/container/whatnot that ends up holding the last value of $foo, $bar?
07:34 zengargoyle my @f; for 1..3 { @f.push: ($_) }; say @f;
07:34 zengargoyle m: my @f; for 1..3 { @f.push: ($_) }; say @f;
07:34 camelia rakudo-moar 4f5a1e: OUTPUT: «[1 2 3]␤»
07:34 zengargoyle hehe, watch it work here and not there... :P
07:34 lookatme m: my @f; for 1..3 { @f.push: ($_, ) }; say @f;
07:34 camelia rakudo-moar 4f5a1e: OUTPUT: «[(1) (2) (3)]␤»
07:35 lookatme m: my @f; my $a; for 1..3 { $a = $_; @f.push: ($a, ) }; say @f;
07:35 camelia rakudo-moar 4f5a1e: OUTPUT: «[(3) (3) (3)]␤»
07:35 zengargoyle m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: ($m) }; say @f;
07:35 camelia rakudo-moar 4f5a1e: OUTPUT: «[1 2 3]␤»
07:35 lookatme That's the problem
07:35 lookatme moritz, do you know what the .push happened ?
07:35 lookatme with a list
07:36 zengargoyle m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: ($m,'foo') }; say @f;
07:36 camelia rakudo-moar 4f5a1e: OUTPUT: «[(3 foo) (3 foo) (3 foo)]␤»
07:36 zengargoyle bingo!
07:36 zengargoyle ^^
07:37 zengargoyle m: my @f; my $m=0; for 1..3 { $m+=1; @f.push: |($m,'foo') }; say @f;
07:37 camelia rakudo-moar 4f5a1e: OUTPUT: «[1 foo 2 foo 3 foo]␤»
07:37 andrzejku sorry for question? what a difference between [] and ()
07:37 lookatme m: say [].WHAT; say ().WHAT;
07:37 camelia rakudo-moar 4f5a1e: OUTPUT: «(Array)␤(List)␤»
07:37 lookatme It's different type
07:38 andrzejku oh okay
07:38 lookatme And we don't know what that .push happened
07:38 domidumont joined #perl6
07:38 andrzejku lookatme, so @arr can be list and array
07:39 zengargoyle andrzejku: [] will almost surely create a new thing (an Array) where the values can be changed, so it makes a new thing.  () makes a list that is not changeable so maybe it just copies the reference-like thing...??
07:39 andrzejku class Array is List {}
07:39 lookatme andrzejku, maybe a Seq or other things
07:40 zengargoyle dd (1,2,3)
07:40 zengargoyle m: dd (1,2,3)
07:40 camelia rakudo-moar 4f5a1e: OUTPUT: «(1, 2, 3)␤»
07:40 zengargoyle m: dd [1,2,3]
07:40 camelia rakudo-moar 4f5a1e: OUTPUT: «[1, 2, 3]␤»
07:40 domidumont joined #perl6
07:40 zengargoyle m: dd (1,2,3)[0].WHAT
07:40 camelia rakudo-moar 4f5a1e: OUTPUT: «Int␤»
07:40 zengargoyle m: dd (1,2,3)[0] = 4
07:40 camelia rakudo-moar 4f5a1e: OUTPUT: «Cannot modify an immutable Int (1)␤  in block <unit> at <tmp> line 1␤␤»
07:40 zengargoyle m: dd [1,2,3][0] = 4
07:40 camelia rakudo-moar 4f5a1e: OUTPUT: «4␤»
07:41 zengargoyle m: dd (1,2,3)[0].HOW
07:41 camelia rakudo-moar 4f5a1e: OUTPUT: «Perl6::Metamodel::ClassHOW.new␤»
07:41 andrzejku ou list are immutable
07:41 lookatme it's not a container
07:41 lookatme in list
07:41 lookatme But that's not the hint, I think
07:42 andrzejku lookatme, I think it is gonna be to complecated
07:42 zengargoyle yes, () are things that are immutable... doing [] instead will force a new writeable container to be made and initialized.
07:42 andrzejku lookatme, how can I create an array of immutable sublists x)
07:42 lookatme zengargoyle, yeah, it's copied data and store them in another container
07:43 andrzejku lookatme, did someone think about performance when did that?
07:43 zengargoyle it may just be that you need to |() or ().Slip things to do what you think it will do. :)
07:44 lookatme m: my @a = (1, 2, 3).Slip; @a[0] = 54;
07:44 camelia rakudo-moar 4f5a1e: ( no output )
07:44 lookatme m: my @a := (1, 2, 3).Slip; @a[0] = 54; say @a;
07:44 camelia rakudo-moar 4f5a1e: OUTPUT: «Cannot modify an immutable Int (1)␤  in block <unit> at <tmp> line 1␤␤»
07:46 zengargoyle m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1;
07:46 camelia rakudo-moar 4f5a1e: ( no output )
07:46 zengargoyle m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1; say @a[0].
07:46 camelia rakudo-moar 4f5a1e: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Malformed postfix call␤at <tmp>:1␤------> 3a := ($x, $y, $z); @a[0] = 1; say @a[0].7⏏5<EOL>␤»
07:46 astj joined #perl6
07:46 zengargoyle m: my ($x,$y,$z); my @a := ($x, $y, $z); @a[0] = 1; say @a[0];
07:46 camelia rakudo-moar 4f5a1e: OUTPUT: «1␤»
07:47 zengargoyle the 1, 2, 3 are specially actual Int things....
07:47 lookatme andrzejku, I don't know, maybe a little effect performance, it's all integer, not object
07:47 zengargoyle yeah...
07:47 Juerd lookatme: Everything is an object, including Ints
07:48 zengargoyle m: my ($x,$y,$z); $x=1; my @a := ($x, $y, $z); @a[0]; $x=10; say @a[0];
07:48 camelia rakudo-moar 4f5a1e: OUTPUT: «10␤»
07:48 zengargoyle m: my ($x,$y,$z); $x=1; my @a := ($x, $y, $z); say @a[0]; $x=10; say @a[0];
07:48 camelia rakudo-moar 4f5a1e: OUTPUT: «1␤10␤»
07:49 zengargoyle m: my ($x,$y,$z); $x=1; my @a = ($x, $y, $z); say @a[0]; $x=10; say @a[0];
07:49 camelia rakudo-moar 4f5a1e: OUTPUT: «1␤1␤»
07:49 andrzejku lookatme, I don't get how the array can extend list
07:49 lookatme If they do a optimizing on integer, it would be fine
07:49 andrzejku that weird
07:49 lookatme andrzejku, extend list ?
07:49 andrzejku lookatme, is a list
07:50 zengargoyle m: my ($x,$y,$z); $x=1; my @a.push: ($x, $y, $z); say @a[0]; $x=10; say @a[0];
07:50 camelia rakudo-moar 4f5a1e: OUTPUT: «(1 (Any) (Any))␤(10 (Any) (Any))␤»
07:50 andrzejku lookatme, array is continous container and list not so they cann't be equal but you can transform values via push
07:51 lookatme andrzejku, yeah that's right
07:52 lookatme andrzejku, oh I got what you mean, sorry
07:53 lookatme andrzejku, here is what the document said what is an Array
07:53 lookatme An Array is a List which forces all its elements to be scalar containers, which means you can assign to array elements.
07:55 andrzejku lookatme, :)
07:55 lookatme andrzejku, is that clear ?
07:56 lookatme i.e. Array is a subset of List
07:56 andrzejku lookatme, yeah I need to look for documentation but probably that issue before should clasified as bug or clarified in intro
07:57 cosimo joined #perl6
07:57 lookatme andrzejku, I don't know :)
07:57 andrzejku lookatme, the question is how to create an reference array
07:58 zengargoyle i'm starting to guess you just need to .Slip it.
07:59 lookatme maybe when they wake up, I mean master from Europe
08:00 lookatme m: my @a; @a[0] := (1, 2, 3); dd @a;
08:00 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @a = [(1, 2, 3),]␤»
08:00 lookatme m: my @a; @a[0] := (1, 2, 3); dd @a; @a[0][0] = 4;
08:00 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @a = [(1, 2, 3),]␤Cannot modify an immutable Int (1)␤  in block <unit> at <tmp> line 1␤␤»
08:00 lookatme andrzejku, ↑
08:00 zengargoyle since there is no \$var like in p5 to pass by reference, and everything is an object, the default is basically pass by reference.
08:01 zengargoyle you are pushing a list with ($month) (the container) onto an array over and over... it's the same container you push each time unless you do something to make a new one.
08:01 Zoffix andrzejku: https://docs.perl6.org/language/containers
08:02 Zoffix andrzejku: everything's "default" is because you're pushing containers and reusing the same containers
08:02 jonas1 joined #perl6
08:02 lookatme m: my @a = []; my $x = 10; @a.push($x); @a.push($x); @a[0] = 11; dd @a;
08:02 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @a = [11, 10]␤»
08:02 zengargoyle otherwise you need a way to tell that you want to push the container instead of the value inside.
08:03 Zoffix I showed you three ways to decont yesterday :/
08:05 Zoffix "perl6 is awesome however it is not gonna be easy when you code tired"  It'd be much easier if you made proper objects instead of using generic datastructures to heap a bunch of variables together
08:05 zengargoyle it is one of the weirder things in p6
08:06 * zengargoyle still has trauma from GLR
08:09 zengargoyle i think the weird is that () sorta makes a closure keeping the container while [] deconts and gives you a 'copy' of sorts.
08:12 Zoffix Not really. Arrays give containers to their elements.
08:12 Zoffix It's on the Everybody Knows level to my mind...
08:14 zengargoyle but a list can contain containers.
08:14 Zoffix Sure.
08:14 Zoffix And you can bind your own container to an Array element.
08:16 Zoffix With scalar it's my $x = 42; vs my $y := 42; It's not weird that you can $x++ but not $y++, is it?
08:16 Zoffix But you can bind a container to $y and ++ it
08:17 lookatme m: my $x = 42; my $y := 42; say ++$x; $y := $y + 1; say $y;
08:17 camelia rakudo-moar 4f5a1e: OUTPUT: «43␤43␤»
08:17 lookatme m: my $x = 42; my $y := 42; ++$y;
08:17 camelia rakudo-moar 4f5a1e: OUTPUT: «Cannot resolve caller prefix:<++>(Int); the following candidates␤match the type but require mutable arguments:␤    (Mu:D $a is rw)␤    (Int:D $a is rw)␤␤The following do not match for other reasons:␤    (Bool $a is rw)␤    (Mu:U $a is rw)…»
08:18 zengargoyle how would one actually push a list onto an array withoud falling into the trap?
08:19 xtreak joined #perl6
08:26 Zoffix Which trap?
08:27 zengargoyle my $things; while not finished() { my $x = something(); my $y = somethingelse(); push @things, ($x,$y);}
08:28 zengargoyle all of @things will be the same ($x, $y) of the last interation.  how to build AoL vs AoA?
08:28 cschwenz joined #perl6
08:28 zengargoyle when you really want immutable tuples as the result.
08:28 Zoffix m: my @things; for ^10 { my $x = rand; my $y = rand; push @things, ($x,$y) }; dd @things
08:28 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @things = [(0.931975587174624e0, 0.583947015097645e0), (0.483737273714957e0, 0.83258998935469e0), (0.65110229441697e0, 0.324162172008149e0), (0.549915124136017e0, 0.361200362298923e0), (0.110868149633726e0, 0.890485250549652e0), (0.333903291591087e…»
08:28 Zoffix ??
08:29 Zoffix Is that the code you're talking about?
08:29 Zoffix You're making a new container on each iteration.
08:30 zengargoyle my $things; my ($x,$y); while not finished() { $x = something(); $y = somethingelse(); push @things, ($x,$y);}
08:30 Zoffix m: my @things; my $x; my $y; for ^10 { $x = rand; $y = rand; push @things, ($x,$y)»<> }; dd @things
08:30 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @things = [(0.801360592079413e0, 0.583388471035365e0), (0.0619285680005101e0, 0.62801428213172e0), (0.365400123176733e0, 0.145330942225848e0), (0.45931868256555e0, 0.444358687169692e0), (0.769759559638631e0, 0.372590153464904e0), (0.667568134711939…»
08:30 Zoffix Here you decont from the containers you're reusing
08:30 zengargoyle that's what doesn't work in the original question....
08:30 Zoffix I don't see any deconts in the original code
08:31 zengargoyle oh, missed the >><>
08:31 zengargoyle my bad.
08:31 Zoffix .oO( Jesus operator )
08:31 parv what is that calles, fish operator?
08:31 parv s/calles/called/
08:32 * zengargoyle adds to my list of things
08:32 Zoffix Decont is the <> thing. The hyper just hypers it
08:32 Zoffix m: my @things; my $x; my $y; for ^10 { $x = rand; $y = rand; push @things, ($x<>, $y<>) }; dd @things # works too
08:32 camelia rakudo-moar 4f5a1e: OUTPUT: «Array @things = [(0.96865598711853e0, 0.326676109900493e0), (0.172875834492312e0, 0.866172719751773e0), (0.379645722125719e0, 0.720606150984329e0), (0.299306893974122e0, 0.922439594680222e0), (0.588092109489506e0, 0.794310481296526e0), (0.061336769649142…»
08:33 Zoffix Or just push an Array instead of a List
08:33 zengargoyle yeah, i got he array bit.  just curious about the case where you *really* want lists.  (not sure why)
08:34 parv Zoffix, would you please call Perl 6 something else, if you must, other than the name of software that implements the Perl 6 spec?
08:34 * zengargoyle backs away slowly...
08:34 wamba joined #perl6
08:35 Zoffix parv: convince TimToady to pick a better extended name to prepend.
08:36 lookatme m: my @a; my $x; for 1..3 { $x = $_; @a.push: ($x, )>><>; }; say @a;
08:36 camelia rakudo-moar 4f5a1e: OUTPUT: «[(1) (2) (3)]␤»
08:36 Zoffix So far I seem to be the only core dev who thinks the name is problematic. Despite people acknowledging there's a marketing problem (but not because of the name) or that people who preach the Rakudo mantra get abused (we should just talk to people who like Perl)
08:36 lookatme m: my @a; my $x; for 1..3 { $x = $_; @a.push: ($x, )>><>; }; @a[0][0] = 32;
08:36 camelia rakudo-moar 4f5a1e: OUTPUT: «Cannot modify an immutable Int (1)␤  in block <unit> at <tmp> line 1␤␤»
08:39 Cabanossi joined #perl6
08:40 parv Zoffix, do you know what is marketing problem other than due the name?
08:42 Zoffix parv: to quote: "Sounds to me like what we're missing is some shiny, positive lighthouse use cases that create excitement. PHP had a couple of really nice, open web applications which pulled people in. Code was horrible, but they were  user friendly."
08:43 zengargoyle AKA Ruby
08:44 Zoffix It's the whole "killer app" mantra. People think if they just make a great product, people will use it. PHP didn't have really nice, open web applications. They lead in category (CMS).
08:44 parv Zoffix: (*argh* come on.) I think that is a weak argument. Perl 6 does not need to produce that.
08:45 zengargoyle nope, the lead in terrible ease of provisioning VPS servers that couldn't step on each other like mod_perl
08:46 zengargoyle PHP won because it was per-apache process unlike mod_perl which was whole apache process.
08:47 zengargoyle try to put dozens (or mor) of (unrelated) users under a single apache with mod_perl vs the same under PHP.
08:48 zengargoyle PHP - Perl for Home Pages.
08:48 zengargoyle stripped down to allow an interpreter per process.
08:49 parv Zoffix, in case [Rr]akudo would be the only implementation for forseeable  future, then I don't have any reason to request not to name the language based on the name of implementation.
08:51 zengargoyle i say just call it 'p6', less typing.
08:51 zengargoyle besides, Camel is 'rakuda'
09:06 abraxxa joined #perl6
09:16 robertle joined #perl6
09:17 ribasushi joined #perl6
09:24 Cabanossi joined #perl6
09:39 robertle_ joined #perl6
09:54 Cabanossi joined #perl6
10:07 zakharyas joined #perl6
10:07 rindolf joined #perl6
10:11 zakharyas joined #perl6
10:26 zakharyas joined #perl6
10:56 domidumont joined #perl6
10:57 perlawhirl m: say bag(<A B>) ⊂ bag(<A B C>) # This should be a blocker for 2017.10 since it will end up in Star
10:57 camelia rakudo-moar 5b0a7f: OUTPUT: «False␤»
11:01 lizmat huh>?
11:01 lizmat hmmm
11:11 zakharyas joined #perl6
11:18 ab6tract joined #perl6
11:18 ab6tract lizmat: I defined symmetric difference as ($a (-) $b) (+) ($b (-) $a)
11:18 ab6tract This feels sound to me.
11:19 ab6tract However, I've gotten quite tired of having to constantly justify this behavior 3 times over the last two years as you have felt free to change the behavior that is provided in the tests
11:21 ab6tract .tell lizmat the order does not matter for symmetric difference of a pair of bags/mixes because it is symmetric for a pair of inputs
11:21 yoleaux ab6tract: I'll pass your message to lizmat.
11:21 lizmat .
11:21 yoleaux 11:21Z <ab6tract> lizmat: the order does not matter for symmetric difference of a pair of bags/mixes because it is symmetric for a pair of inputs
11:22 ab6tract that does not make it transitive and i do not see how you can have setty like semantics for mixes/bags
11:22 ab6tract brb
11:22 lizmat m: my $a = <a b c>.Set; my $b = <c d e>.Set; dd $a (^) $b; dd ($a (-) $b) (+) ($b (-) $a))
11:22 camelia rakudo-moar 5b0a7f: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Unexpected closing bracket␤at <tmp>:1␤------> 3a (^) $b; dd ($a (-) $b) (+) ($b (-) $a)7⏏5)␤»
11:22 lizmat m: my $a = <a b c>.Set; my $b = <c d e>.Set; dd $a (^) $b; dd ($a (-) $b) (+) ($b (-) $a)
11:22 camelia rakudo-moar 5b0a7f: OUTPUT: «set("d","e","b","a")␤("e"=>1,"d"=>1,"b"=>1,"a"=>1).Bag␤»
11:28 nadim joined #perl6
11:38 araraloren joined #perl6
11:39 araraloren evening
11:39 xtreak joined #perl6
11:39 Cabanossi joined #perl6
11:40 lizmat araraloren /o
11:40 araraloren ^_^
11:44 Actualeyes joined #perl6
11:44 xtreak joined #perl6
11:46 nadim someone seen azawawi lately?
11:49 xtreak joined #perl6
11:53 [Coke] .seen azawawi
11:53 yoleaux 09:11Z <Zoffix> [Coke]: Looks like something busted with RT. I saw an email reply to RT#131722 yesterday and it had the 'bug follow up' address in it, but there's nothing on the ticket when vewing on Web
11:53 synopsebot6 Link:  https://rt.perl.org/rt3/Public/Bug/Display.html?id=131722
11:53 yoleaux I saw azawawi 27 May 2017 12:50Z in #perl6: <azawawi> jnthn: in Graphics::PLplot im aiming on providing Raw (native) and cooked with sugar API :)
11:53 yoleaux 10:13Z <Zoffix> [Coke]: what's the usual timeframe to receive a check from TPF? Wondering if mine is lost or if it usually takes a long time.
11:53 [Coke] zoffix: email to RT can be slow, as it's possible to require a human to approve a message.
11:54 [Coke] zoffix: no idea, but will ping the treasurer.
11:55 Geth joined #perl6
11:55 Geth joined #perl6
11:58 ab6tract lizmat: I meant in terms of the reduce form of the operator
11:59 Zoffix joined #perl6
11:59 raschipi joined #perl6
11:59 lizmat ab6tract: bit distracted atm, will get back to it  :-)
12:00 lizmat fwiw, it was always my intent to 1. make things faster, and 2. fix things I found broken on the way
12:00 lizmat perhaps the finding of brokenness was incorrect
12:00 Geth_ joined #perl6
12:00 leont It seems my .travis.yml is outdated (still using panda installdeps). Anyone have a good example of how to do that now?
12:00 lizmat and I know I introduced new brokenness along the way
12:00 buggable joined #perl6
12:00 huggable joined #perl6
12:00 moritz leont: I think you can zef install --verbose .
12:01 ZofBot joined #perl6
12:01 NeuralAnomaly joined #perl6
12:01 moritz which installs dependencies, and run tests, and even installs your modules
12:01 ab6tract lizmat: to me the question is, can this palindrome code be made to work as expected for a list of inputs vs just two: sub palindrome($a, $b) { return so $a.comb.Bag (^) $b.comb.Bag == bag() }
12:01 moritz s/s$//
12:02 ab6tract vs sub palindrome(@p) { return so [(^)] @p == bag() }
12:02 leont Would I need a rakudobrew build-zef? Or can I assume it's already there?
12:02 Geth_ ¦ ecosystem: 06ea7cdb4c | (Zoffix Znet)++ | META.list
12:02 Geth_ ¦ ecosystem: Revert "Remove all my modules"
12:02 Geth_ ¦ ecosystem:
12:02 Geth_ ¦ ecosystem: This reverts commit 262da75685d591d4d5604fc54b4aec3e88167073.
12:02 Geth_ ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/06ea7cdb4c
12:03 moritz leont: yes, needs that
12:03 moritz leont: https://github.com/moritz/Math-Model/blob/master/.travis.yml
12:03 moritz that's what I use right now
12:03 ab6tract erm, sub palindrome(@p) { return so [(^)] @p>>.comb.Bag == bag() }
12:04 lizmat ab6tract: whether all words are palindromes of each other ?
12:05 ab6tract lizmat: sorry, brainfart -- not palindrome specifically, but whether the words are all composed of the same number of the same characters
12:06 lizmat isn't that the definition of a palindrome ?
12:06 ab6tract anagram
12:06 lizmat ah,. duh
12:06 lizmat yup
12:06 moritz [eqv] @p.map(*.comb.Bag) # ?
12:06 ab6tract :)
12:06 * lizmat is still distracted
12:08 ab6tract moritz: i'm not looking for a specific answer, i'm saying that the symmetric difference operator should be able to extend from infix to reduce and maintain expectations
12:09 ab6tract and note also that symmetric difference for lists of sets is not something i found documented somewhere, though maybe someone with serious math creds knows ones
12:10 ab6tract but especially for bags and mixes, there is not formal definition of symmetric difference that i have seen.
12:10 ab6tract *no
12:14 lizmat well, In extrapolate from what you did for sets: basically include only the ones that occur once
12:14 ab6tract but alas, i guess i've shot my own implementation down...
12:15 ab6tract lizmat: yeah, but that's easy for keys. when you have weights it gets a lot trickier
12:15 perlawhirl while not "official literature" multiset sym diff is mentioned here https://mathematica.stackexchange.com/questions/49068/complement-of-multisets
12:15 lizmat well, I interpreted that as: all the elements that occur in only one Set
12:16 lizmat extrapolating that to Bags, it would mean the difference between the highest and second highest number of occurrences seen for an element
12:16 perlawhirl as a reference point, there is a multiset lib for python (not Collections, there is another called multiset) that implements a sym diff for bags
12:16 ab6tract right, but a different approach could be "all the elements that occur in only n-1 Sets"
12:17 lizmat perlawhirl: link and explanation of the algorithm used ?  :-)
12:17 ab6tract lizmat: seems reasonable and actually makes the infix/reduce behavior work
12:17 ab6tract that i outlined for anagrams
12:17 lizmat ab6tract: and extrapolating that to Mixes, works the same way
12:19 lizmat except you can get positive weights from only negatives
12:19 Geth joined #perl6
12:19 lizmat m: dd (a => -1).Mix (^) (a => -2).Mix
12:19 camelia rakudo-moar c9ee86: OUTPUT: «("a"=>1).Mix␤»
12:19 perlawhirl i did link the on on mathematica. the python module source is here: https://github.com/wheerd/multiset
12:19 perlawhirl or more specifically: https://github.com/wheerd/multiset/blob/master/multiset.py#L329
12:20 ab6tract right but that's because it is recording the distance between the values of the keys
12:20 perlawhirl I had a bunch of pages bookmarked. the reason I found this bug is because i am writing a multiset lib for p5, using p6 and python as references.
12:20 ab6tract i think your approach makes a lot of sense and certainly making the output indepentent of the order of inputs has a great deal of appeal
12:21 perlawhirl someone could ask the question on #math :D
12:22 raschipi #math, not even once
12:22 FoxBot_ joined #perl6
12:22 perlawhirl hah
12:23 ab6tract lizmat: so consider me on board .. let me know once the details shake out and i will write the docs
12:23 perlawhirl lizmat: https://oeis.org/wiki/Multisets
12:24 perlawhirl lizmat: has a section called "Generalized set operations". last point mentions sym diff
12:24 ab6tract unless of course all of perlawhirl++'s links turn out something better
12:24 Cabanossi joined #perl6
12:25 perlawhirl ab6tract: i failed math... so a lot of info i found just goes in one ear and out the other :D
12:25 perlawhirl http://www.cplusplus.com/reference/algorithm/set_symmetric_difference/
12:27 perlawhirl There's a java lib as well, but i think that's enough links for now... i mainly used the term 'multiset' when i was searching cause it found more math-y type results
12:27 perlawhirl the java one defines it as "The quantities of equal elements get subtracted from each other (maximum minus minimum)"
12:29 lizmat perlawhirl: is that for 2 or 2+ multisets ?
12:31 perlawhirl hmm. i'm not entirely sure... i was mainly concerning myself with binary operations... but i understand the point of contention here is with reduction. I'll let you know if i find something specific to 2+
12:36 zakharyas joined #perl6
12:41 zazx898 joined #perl6
12:43 astj joined #perl6
12:46 Technaton joined #perl6
12:47 nicq20 joined #perl6
12:48 perlawhirl hrm... ok, so i dunno how authorative this video is, but it implies order or operations does matter: https://www.youtube.com/watch?v=PxffSUQRkG4
12:48 perlawhirl ie. A Δ B Δ C =:= ( A Δ B ) Δ C
12:48 mcmillhj joined #perl6
12:48 perlawhirl it's talking about sets.. but p6 sets don't act like this
12:48 perlawhirl do they/
12:48 perlawhirl ?
12:49 ab6tract perlawhirl: the implementation i initially provided did this for sets and bags/mixes
12:49 ab6tract but it conflicted with a test case in 6.c-errata
12:49 ab6tract so i fixed my patch to only use that behavior on bags/mixes
12:50 ab6tract nice to read some validation though :)
12:50 perlawhirl hmmm i'm not sure what i belive... wikipedia says The symmetric difference is commutative and associative
12:51 perlawhirl wikipedia says: A Δ ( B Δ C ) =:= ( A Δ B ) Δ C
12:52 lizmat but that all applies to Sets, not ti multisets/Bags ?
12:54 perlawhirl true... i'm just digging up what i can. i'm not sure it's helping
12:54 Cabanossi joined #perl6
12:58 nicq20 joined #perl6
13:01 lizmat bbiab
13:06 lizmat joined #perl6
13:10 lucasb joined #perl6
13:11 AlexDaniel joined #perl6
13:13 ab6tract perlawhirl: well, imo it does highlight that we are into "new frontier" territory with some of this behavior
13:15 nicq20 joined #perl6
13:27 Zoffix left #perl6
13:29 skids joined #perl6
13:31 Geth joined #perl6
13:34 ambs any perl6-language@perl.org manager around?
13:36 araraloren :)
13:36 araraloren What's that
13:42 Juerd A mailing list
13:44 mst oh, wow, that still exsts?
13:49 eliasr joined #perl6
13:50 ambs I still get mails there, would like to change subscription, but can't send e-mail from the e-mail I am registered with.
13:51 timotimo just fake your from address :D
13:53 araraloren junk mail
13:54 ChoHag joined #perl6
13:57 perlpilot joined #perl6
14:04 bdmatatu joined #perl6
14:06 kurahaupo joined #perl6
14:09 ChoHag joined #perl6
14:13 konsolebox joined #perl6
14:14 linuksz joined #perl6
14:15 linuksz why don't this work?
14:15 linuksz my @numbers = ( 'one', 'two', 'three', 'four', 'five', 'six', 'seven' );
14:15 linuksz my @selected = ( 'two', 'three', 'five' );
14:15 linuksz @numbers.grep({  $_ ~~ @selected}).say;
14:15 linuksz i want it to print two three five
14:16 araraloren $_ (elem) @selected
14:16 araraloren this would be work
14:17 mcmillhj joined #perl6
14:18 linuksz and why the smartmatch not? it isn't for it?
14:19 araraloren Seems like not
14:20 araraloren https://docs.perl6.org/language/operators#infix_~~
14:23 raschipi @numbers.grep({  $_ ~~ any(@selected)}).say;
14:25 linuksz both works. thanks.
14:33 ptolemarch joined #perl6
14:39 Cabanossi joined #perl6
14:45 khw joined #perl6
14:45 moritz @numbers.grep(any(@selected)).say
14:45 moritz grep does smart-matching on its argument already
14:47 lucasb joined #perl6
14:47 domidumont joined #perl6
14:55 nadim joined #perl6
14:57 ctilmes joined #perl6
15:00 alimon joined #perl6
15:11 araraloren What's the mean of `inhandled Failure detected in DESTROY`
15:11 araraloren s/in/un/
15:12 timotimo it means something failed and you threw the failure object away without inspecting or sinking it
15:12 moritz DESTROY methods are called by the GC
15:12 timotimo m: sub fails { fail "oh no" }; for ^100 { my $ = fails; 1 }
15:12 camelia rakudo-moar cb4308: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤»
15:12 kerframil joined #perl6
15:12 timotimo m: sub fails { fail "oh no" }; for ^100_000 { my $ = fails; 1 }
15:13 moritz so there is no ordinary Perl 6 code that can catch it
15:13 camelia rakudo-moar cb4308: OUTPUT: «(timeout)WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤WARNING: unhandled Failure detected in DESTROY. If you meant to ignore it, you can mark it as handled by calling .Bool, .so, .not, or .defined methods. The Failur…»
15:13 timotimo m: use nqp; sub fails { fail "oh no" }; for ^100 { my $ = fails; nqp::force_gc; 1 }
15:13 camelia rakudo-moar cb4308: OUTPUT: «WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤»
15:13 moritz so the compiler produces that warning
15:13 timotimo hmm.
15:13 moritz timotimo: you missed the "in DESTROY" part
15:14 moritz m: class A { method DESTROY() { fail "foo" } }; $ = A.new for ^100; use nqp; nqp::force_gc(); say 42
15:14 camelia rakudo-moar cb4308: OUTPUT: «42␤»
15:14 moritz hm
15:14 araraloren https://github.com/araraloren/perl6-app-snippet/blob/master/bin/snippet
15:14 moritz m: class A { method DESTROY() { die "foo" } }; $ = A.new for ^100; use nqp; nqp::force_gc(); say 42
15:14 camelia rakudo-moar cb4308: OUTPUT: «42␤foo␤  in method DESTROY at <tmp> line 1␤  in block <unit> at <tmp> line 1␤␤»
15:14 araraloren sometimes it warning me that
15:14 araraloren message
15:14 araraloren not always
15:14 araraloren line 10
15:15 ufobat joined #perl6
15:16 araraloren So is there a pretty way, get a name inside a  module or class
15:16 araraloren https://github.com/araraloren/perl6-app-snippet/blob/master/lib/App/snippet/C.pm6
15:17 araraloren This what I want use as a plugin
15:20 araraloren @_@
15:21 cdg joined #perl6
15:22 cdg_ joined #perl6
15:22 buggable joined #perl6
15:30 pierre_ joined #perl6
15:32 SourceBaby joined #perl6
15:34 flatwhite joined #perl6
15:39 Cabanossi joined #perl6
15:43 robertle_ is there a way to clear the precompiled modules cache? I have a (probably wrong) suspicion that it is not being updated when I re-install via zef...
15:46 wamba joined #perl6
15:57 bartolin joined #perl6
15:59 Skarsnik joined #perl6
15:59 zakharyas joined #perl6
16:05 zakharyas joined #perl6
16:06 araraloren rakudo report `No such symbol 'MyModule'`
16:06 araraloren What's that warning mean ?
16:08 zazx898 joined #perl6
16:09 gdonald joined #perl6
16:10 [Coke] You're referring to a class that wasn't defined.
16:10 [Coke] class/type/module etc.
16:12 [Coke] m: MyModule.new; say "alive"
16:12 camelia rakudo-moar cb4308: OUTPUT: «5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤    MyModule used at line 1␤␤»
16:12 Skarsnik Hello
16:14 nicq20 joined #perl6
16:15 mcmillhj joined #perl6
16:18 troys joined #perl6
16:20 raschipi Oi Skarsnik
16:22 araraloren [Coke], but I have required it
16:23 araraloren And it's a warning, not a error
16:26 ggoebel joined #perl6
16:27 nicq20 Are slangs still in flux? I have not checked in a while...
16:27 araraloren It's no document, don't know
16:30 nicq20 Ok. I'll just have to fiddle around with it then. :)
16:32 timotimo moritz: no, "in destroy" means that the destroy method of the failure is called
16:36 araraloren Anyway, If any one interested, please check out this https://gist.github.com/araraloren/ea1bf8d54e2251042c7f4c45f778fc43
16:36 araraloren night 88
16:39 Cabanossi joined #perl6
16:43 setty1 joined #perl6
16:51 bdmatatu p6: my $a = gather { take 1; take 5; take 42; } ; say join ', ', $a;
16:51 yoleaux 7 Jul 2017 22:15Z <Zoffix> bdmatatu: yeah it's a bug in Range.int-bounds. It's supposed hang. 1e100 is a Num and there you have only 15 digits of precision, so the other 86 digits are all floating point noise. The buggy Range.int-bounds erroneously converts that 15 digits + 86 digits of noise into a Int, which is why you get the wrong sum. And the reason the fixed version hangs is because when failing to find .int-bounds, it'll
16:51 camelia rakudo-moar cb4308: OUTPUT: «1 5 42␤»
16:51 yoleaux 7 Jul 2017 22:15Z <Zoffix> bdmatatu: fully reify the range to get the elements, but while doing that you're again hit with limited precision in the 1e100 and once the reification reaches 1e15, the next +1 to it would still end up a 1e15 (not enough precision for +1), so it'd loop at that point forever. We can probably improve that to give an error tho
16:52 bdmatatu I think this doc page is not quite right: https://docs.perl6.org/syntax/gather%20take#(Control_Flow)_control_flow_gather_take
16:52 raschipi m: my $a = gather { take 1; take 5; take 42; } ; say join ', ', @$a;
16:52 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
16:53 bdmatatu Much better
16:53 raschipi my $a = gather { take 1; take 5; take 42; } ; say join ', ', |$a; #works too
16:54 raschipi m: my $a = gather { take 1; take 5; take 42; } ; say join ', ', |$a; #works too
16:54 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
16:54 bdmatatu I noticed $a.List works, but not sure how the docs should look
16:54 raschipi It's because attribution is mostly eager.
16:55 raschipi m: say join ', ', gather { take 1; take 5; take 42; }
16:55 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
16:55 raschipi Since the need to list or slip comes from the attribution, and not from the gather/take, i think the last one would be better.
16:56 timotimo i might have written $a.join(', ')
16:56 domidumont joined #perl6
16:57 raschipi m: say (gather { take 1; take 5; take 42; }).join(', ')
16:57 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
16:59 raschipi m: my @a = gather { take 1; take 5; take 42; }; say join ', ', @a;
16:59 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
17:01 raschipi m: my @a = gather { take 1; take 5; take 42; }; @a.join(', ').say; #with timotimo's improvement
17:01 camelia rakudo-moar cb4308: OUTPUT: «1, 5, 42␤»
17:01 timotimo that's not an improvement, it's a question of taste
17:02 raschipi Well, it sure is, but I like you's more, which is what I meant.
17:07 zakharyas joined #perl6
17:36 Geth_ ¦ doc: 145ae16db2 | (Brian Duggan)++ | doc/Language/control.pod6
17:36 Geth_ ¦ doc: Fix gather/take example
17:36 Geth_ ¦ doc: review: https://github.com/perl6/doc/commit/145ae16db2
17:36 dalek doc: 145ae16 | (Brian Duggan)++ | doc/Language/control.pod6:
17:36 dalek doc: Fix gather/take example
17:36 dalek doc: review: https://github.com/perl6/doc/commit/145ae16db2
17:51 pilne joined #perl6
17:51 cosimo joined #perl6
18:01 kybr can we use regexes on Buf/Blobs? i want to make a grammar to decode a binary. found this: https://gist.github.com/smls/bc5d0fb42f199574e339
18:01 yoleaux 09:33Z <Zoffix> kybr: you should add yourself to CREDITS file, unless you want to be credited as all-lowercase "karl yerkes": https://github.com/perl6/doc/blob/master/CREDITS
18:01 kybr yoleaux: thanks.
18:03 avalenn joined #perl6
18:04 Geth ¦ doc: ca4e4f5169 | (karl yerkes)++ (committed using GitHub Web editor) | CREDITS
18:04 Geth ¦ doc: Update CREDITS
18:04 Geth ¦ doc: review: https://github.com/perl6/doc/commit/ca4e4f5169
18:09 timotimo huh dalek
18:13 andrzejku joined #perl6
18:17 zengargoyle kybr: there's also this 'unpack' idea: https://gist.github.com/Juerd/ae574b87d40a66649692
18:19 nicq20 joined #perl6
18:22 zengargoyle i'm just using pack/unpack but i expect that may go away in the future since it's so p5-ish.  if you come up with something nicer, let me know. :)
18:24 travis-ci joined #perl6
18:24 travis-ci Doc build passed. Brian Duggan 'Fix gather/take example'
18:24 travis-ci https://travis-ci.org/perl6/doc/builds/252095764 https://github.com/perl6/doc/compare/aebdce002015...145ae16db2f7
18:24 travis-ci left #perl6
18:27 lizmat zengargoyle: there's PackUnpack in the ecosystem
18:27 lizmat so it will stay, I would think
18:27 lizmat fwiw, the module could use some love by people other than me  :-)
18:29 andrzejku lizmat hey
18:29 lizmat andrzejku hi!
18:31 finley joined #perl6
18:31 TimToady nicq20: we haven't quite finished hooking up in-line slangs yet
18:31 TimToady m: BEGIN $?LANG.refine_slang('MAIN', role { token apostrophe { <[ - ' \\ ]> } }); my $foo\bar = 42; say $foo\bar;
18:31 camelia rakudo-moar 4b8bc6: OUTPUT: «42␤»
18:31 TimToady that's about as close as we can get so far
18:33 TimToady the interesting bit will be getting quasi-quotes to work as actions without directly using QAST
18:34 nicq20 TimToady: That's much nicer than what I had last seen! Is `use nqp` still needed?
18:34 TimToady not for that
18:34 TimToady as you can see by the fact that it worked
18:34 TimToady or are you referring to QAST?  that's nqp-land still
18:35 nicq20 Err, sorry. Yeah, I ment QAST.
18:35 lichtkind joined #perl6
18:36 TimToady as masak has been discovering over the last couple years, the syntax is not all that hard to deal with, but the semantics you attach can be "interesting"
18:54 travis-ci joined #perl6
18:54 travis-ci Doc build errored. karl yerkes 'Update CREDITS'
18:54 travis-ci https://travis-ci.org/perl6/doc/builds/252105811 https://github.com/perl6/doc/compare/145ae16db2f7...ca4e4f5169af
18:54 travis-ci left #perl6
18:54 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0).
18:55 espadrine joined #perl6
19:02 dct joined #perl6
19:16 ksa_ joined #perl6
19:16 zazx898 joined #perl6
19:21 TEttinger joined #perl6
19:43 dwarring joined #perl6
19:48 zazx898 left #perl6
19:54 Cabanossi joined #perl6
20:13 timotimo TimToady: can you put the code that parses escape codes and such up somewhere so i don't have to reinvent the wheel?
20:22 nicq20 joined #perl6
20:34 cpage__ joined #perl6
20:49 gfldex m: my \a := lazy gather for 1..3 { .take }; say a.perl
20:49 camelia rakudo-moar 83e157: OUTPUT: «Cannot .elems a lazy list␤  in block <unit> at <tmp> line 1␤␤»
20:57 gfldex could a slang add a sigil today? (I'm found myself fancy a sigil that means Iterable.)
21:04 konsolebox joined #perl6
21:11 raschipi m: say "New sigil will be:{(0..0xFFFF).pick.chr}"
21:11 camelia rakudo-moar 83e157: OUTPUT: «Error encoding UTF-8 string: could not encode Unicode Surrogate codepoint 55894 (0xDA56)␤  in block <unit> at <tmp> line 1␤␤»
21:11 shlomif joined #perl6
21:11 raschipi m: say "New sigil will be:{(0..0xFFFF).pick.chr}"
21:11 camelia rakudo-moar 83e157: OUTPUT: «New sigil will be:즇␤»
21:15 lizmat gfldex: isn't that what '@' is all about?
21:18 geekosaur @ is about Positional, not Iterable
21:21 ChoHag joined #perl6
21:21 john51 joined #perl6
21:26 john51 joined #perl6
21:27 cosimo joined #perl6
21:28 lizmat and another Perl 6 Weekly hits the Net: https://p6weekly.wordpress.com/2017/07/10/2017-28-rakudo-is-hot/
21:29 lizmat joined #perl6
21:38 Geth ¦ doc: 29e7f545bb | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/5to6-perlvar.pod6
21:38 Geth ¦ doc: Reword to clarify our autoflush behaviour
21:38 Geth ¦ doc: review: https://github.com/perl6/doc/commit/29e7f545bb
21:39 Cabanossi joined #perl6
21:42 gfldex m: sub s(*@i){ say @i.is-lazy }; s lazy (1,);
21:42 camelia rakudo-moar 83e157: OUTPUT: «True␤»
21:43 gfldex m: sub s(**@i){ say @i.is-lazy }; s lazy (1,);
21:43 camelia rakudo-moar 83e157: OUTPUT: «False␤»
21:43 gfldex is that doced?
21:44 atweiden joined #perl6
21:45 lizmat gfldex: feels like a bug to me, that the **@a iterator is not passing through the state of its source iterator
21:45 lizmat but then again, I'm very tired so I should probably refrain from commenting now
21:46 gfldex it doesn't feel like one to me bacause one could call it with two lazy lists or a mix of lazy and non-lazy stuff
21:47 lizmat as soon as one of the lists is lazy, shouldn't it be marked as lazy in total?
21:47 lizmat bed&
21:59 hythm joined #perl6
22:02 kerframil joined #perl6
22:09 ChoHag joined #perl6
22:14 deep-book-gk_ joined #perl6
22:16 TimToady m: sub s(**@i){ say @i[0].is-lazy }; s lazy (1,);
22:16 camelia rakudo-moar 83e157: OUTPUT: «True␤»
22:17 deep-book-gk_ left #perl6
22:17 TimToady you can have a non-lazy list of lazy lists
22:19 TimToady m: for (1...*),(1...*) -> $l { say $l.is-lazy }
22:19 camelia rakudo-moar 83e157: OUTPUT: «True␤True␤»
22:26 kurahaupo_ joined #perl6
22:29 travis-ci joined #perl6
22:29 travis-ci Doc build errored. Zoffix Znet 'Reword to clarify our autoflush behaviour'
22:29 travis-ci https://travis-ci.org/perl6/doc/builds/252181531 https://github.com/perl6/doc/compare/ca4e4f5169af...29e7f545bb74
22:29 travis-ci left #perl6
22:29 buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0).
22:39 Cabanossi joined #perl6
22:54 samb1 joined #perl6
22:59 jferrero joined #perl6
23:14 japhb .ask skaji Are you the mi6 author? (#perl6-toolchain is guessing so.)  If you are, I'd like to say THANK YOU.  mi6 has greatly reduced my pain in pulling apart and re-namespace-ing a Perl 6 project that had become a big ball of mud.
23:14 yoleaux japhb: I'll pass your message to skaji.
23:19 kerframil joined #perl6
23:19 kybr how do you call a method or your parent class?
23:20 kybr aaah. i think i need multi
23:20 BenGoldberg joined #perl6
23:24 timotimo not necessarily
23:24 timotimo you can self.NameOfParentClass::name-of-method
23:25 cdg joined #perl6
23:39 skaji japhb: thanks!!
23:39 yoleaux 23:14Z <japhb> skaji: Are you the mi6 author? (#perl6-toolchain is guessing so.)  If you are, I'd like to say THANK YOU.  mi6 has greatly reduced my pain in pulling apart and re-namespace-ing a Perl 6 project that had become a big ball of mud.
23:41 Geth_ ¦ ecosystem: 314cc8b727 | (Brian Duggan)++ | META.list
23:41 Geth_ ¦ ecosystem: Add WebService::AWS::S3 to ecosystem
23:41 Geth_ ¦ ecosystem: review: https://github.com/perl6/ecosystem/commit/314cc8b727
23:51 kybr yay! somebody made vim understand symbols-with-dashes in my perl6 code.

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

Perl 6 | Reference Documentation | Rakudo