Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-12-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:01 loveperl Because I get this error? Can not look up attributes in a form type object
00:01 AlexDaniel loveperl: can you show some code?
00:02 AlexDaniel and of course, everyone is asleep to greet our new bot :(
00:03 shadowpaste "loveperl" at 217.168.150.38 pasted "error" (5 lines) at http://fpaste.scsys.co.uk/540236
00:03 labster joined #perl6
00:04 AlexDaniel loveperl: well, that's not enough I think
00:06 shadowpaste "loveperl" at 217.168.150.38 pasted "error" (8 lines) at http://fpaste.scsys.co.uk/540237
00:06 AlexDaniel moritz: more robots! Now for real
00:07 loveperl http://fpaste.scsys.co.uk/540237?tx=on&submit=Format+it%21
00:07 loveperl it is code
00:07 AlexDaniel loveperl: first of all, it should be “has %!fields”
00:08 loveperl ok
00:08 loveperl But I'm still having an error
00:10 AlexDaniel loveperl: I think you should be using BUILD instead of new
00:11 AlexDaniel can somebody help?
00:11 AlexDaniel no, he is right, he is using new… now what? should he use bless?
00:16 statisfiable6 joined #perl6
00:16 loveperl I'm desperate :(
00:19 AlexDaniel loveperl: try “self.bless(:$fields);” instead of “%!fields = %fields;”
00:19 AlexDaniel oops
00:19 AlexDaniel self.bless(:%fields);
00:21 grondilu joined #perl6
00:21 pyrimidine joined #perl6
00:23 loveperl What is the build method used for?
00:23 samcv what looks better, top or bottom https://imgur.com/a/QbZRt should [ ] in a character class highlight different from the <  > part
00:24 geekosaur new gives you more control but makes you do more work. the default new uses BUILD to construct an object including necessary superclass stuff
00:24 geekosaur there is also TWEAK which lets you use a default BUILD and make small adjustments to it
00:24 geekosaur (it's more recent though and may still be evolving a bit)
00:25 geekosaur basically default new runs BUILD working inward from outermost superclass, each one deferring to the next BUILD and then regaining control to initialize the built object
00:26 geekosaur (iirc, may be reversed but I recall it needing to work in phases like that to ensure everything is initialized correctly)
00:26 AlexDaniel samcv: differently. Hey, what about this:
00:26 geekosaur if you write your own method new then you have to deal with constructing superclasses yourself
00:26 AlexDaniel m: say ‘ABCD’ ~~ /<[A B] + [C D]>+/
00:26 camelia rakudo-moar acece7: OUTPUT«「ABCD」␤»
00:26 samcv yeah that's what i was thinking AlexDaniel
00:26 geekosaur this is not recommended
00:26 AlexDaniel samcv: how does it highlight it?
00:27 samcv now it hihglights the same. and doesn't highlight hex at all. so next release will highlight hex in char classes
00:27 Xliff loveperl: You need submethod BUILD
00:27 samcv highlights like this atm https://cloud.githubusercontent.com/assets/5747918/18880863/581e4e90-84a7-11e6-8ab3-d87d701885c6.png
00:27 * Xliff is late to the party.
00:28 geekosaur loveperl, have you read https://docs.perl6.org/language/classtut yet?
00:28 Xliff Attributes don't exist until BUILD is executed.
00:28 AlexDaniel samcv: actually, it's hard to tell what would be better
00:29 samcv well they're getting highlighted differently for now
00:29 rburkholder joined #perl6
00:29 BenGoldberg joined #perl6
00:30 Xliff so: method new(:$fields, :$options) { self.bless(:$fields) }; submethod BUILD(:$fields) { for $fields.kv -> $k,$v { %!fields{$k} = $v; };
00:30 Xliff Er...
00:30 Xliff so: method new(:$fields, :$options) { self.bless(:$fields) }; submethod BUILD(:$fields) { for $fields.kv -> $k,$v { %!fields{$k} = $v; }; };
00:32 Xliff Assuming $options is what you want to pass to the object to set... well... options. If those options involve attributes, they need to be passed to submethod BUILD in the same way as $fields.
00:32 Xliff Best to use hashrefs to prevent confusion between hashes and named parameters.
00:32 samcv i may change what they're labeled as but for now going to make it not just give it the same label as the < >
00:32 Xliff There are useful things you can do with that, though.
00:33 _28_ria joined #perl6
00:38 pyrimidine joined #perl6
00:39 _28_ria joined #perl6
00:55 Actualeyes joined #perl6
00:56 pyrimidine joined #perl6
00:56 aborazmeh joined #perl6
00:56 aborazmeh joined #perl6
01:00 statisfiable6 joined #perl6
01:01 pyrimidine joined #perl6
01:21 _28_ria joined #perl6
01:23 pyrimidine joined #perl6
01:24 canopus joined #perl6
01:25 cpage_ joined #perl6
01:29 TimToady star: 42 »+« 43
01:29 camelia star-m 2016.10: ( no output )
01:30 TimToady m: 42 »+« 43
01:30 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of »+« in sink context␤    at <tmp>:1␤    ------> 42 7⏏5»+« 43␤»
01:30 TimToady I guess I fixed that one by accident :)
01:30 TimToady m: 42 Z+ 43
01:30 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of Z+ in sink context␤    at <tmp>:1␤    ------> 42 7⏏5Z+ 43␤»
01:30 TimToady m: $_ Z= 43
01:30 camelia rakudo-moar acece7: ( no output )
01:30 TimToady m: $_ Z== 43
01:30 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of Z== in sink context␤    at <tmp>:1␤    ------> 3$_ 7⏏5Z== 43␤Use of uninitialized value of type Any in numeric context␤  in block <unit> at <tmp> line 1␤»
01:31 TimToady m: my $odds = 3, 5 ... 15;
01:31 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of ... in sink context␤    at <tmp>:1␤    ------> 3my $odds = 3, 5 ...7⏏5 15;␤»
01:31 TimToady m: my $odds = 3, 5 …^ 15;
01:31 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of …^ in sink context␤    at <tmp>:1␤    ------> 3my $odds = 3, 5 …^7⏏5 15;␤»
01:31 TimToady that's what I was originally aiming to fix...
01:42 _28_ria joined #perl6
01:46 pyrimidine joined #perl6
01:50 labster joined #perl6
01:53 BenGoldberg m: my $odds = (3, 5 …^ 15);
01:53 camelia rakudo-moar acece7: ( no output )
01:53 BenGoldberg m: my $odds = (3, 5 …^ 15); dd $odds
01:53 camelia rakudo-moar acece7: OUTPUT«Seq $odds = (3, 5, 7, 9, 11, 13).Seq␤»
01:53 BenGoldberg m: my $odds = 3, 5 ...^ 15; dd $odds
01:53 camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤    Useless use of ...^ in sink context␤    at <tmp>:1␤    ------> 3my $odds = 3, 5 ...^7⏏5 15; dd $odds␤Int $odds = 3␤»
01:54 BenGoldberg m: my @odds = 3, 5 ...^ 15; dd @odds
01:54 camelia rakudo-moar acece7: OUTPUT«Array @odds = [3, 5, 7, 9, 11, 13]␤»
02:00 TimToady yes, I added the uu because people get confused by item assignment vs list assignment precedence
02:01 sufrosti1o joined #perl6
02:04 pyrimidine joined #perl6
02:06 Lucas_One left #perl6
02:17 pyrimidine joined #perl6
02:20 cognominal joined #perl6
02:21 _28_ria joined #perl6
02:21 pyrimidi_ joined #perl6
02:27 [Coke] luuke.
02:32 TEttinger thrawn.
02:34 MasterDuke i loved that series
02:37 TEttinger it's a good un
02:37 cowens joined #perl6
02:37 TEttinger kinda ridiculous but that's as star wars should be
02:38 cowens p6: (1/3).fmt(“%.16f”);
02:38 camelia rakudo-moar 31e466: ( no output )
02:38 TEttinger I like the idea that "throw rocks at the capital" turns out to be significantly more dangerous than anything a single captain had done to that point
02:38 cowens p6: (1/3).fmt(“%.16f”).say
02:38 camelia rakudo-moar 31e466: OUTPUT«0.3333333333333330␤»
02:39 cowens p6: (1/3).base(10, 16).say
02:39 camelia rakudo-moar 31e466: OUTPUT«0.3333333333333333␤»
02:39 cowens Why does the base funciton return arbitraily precise numbers, but fmt stops at .15
02:39 cowens ?
02:40 TEttinger m: (1/3).fmt(“%.16f”).say
02:40 camelia rakudo-moar 31e466: OUTPUT«0.3333333333333330␤»
02:40 TEttinger hm
02:40 TEttinger m: (1/3).fmt(“%.20f”).say
02:40 camelia rakudo-moar 31e466: OUTPUT«0.33333333333333300000␤»
02:41 TEttinger m: (1/3).base(10, 20).say
02:41 camelia rakudo-moar 31e466: OUTPUT«0.33333333333333333333␤»
02:46 cowens p6: (0.370370367037037034/3).fmt("%.16f”).say
02:46 camelia rakudo-moar 31e466: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 0.370370367037037034/3).fmt("%.16f”).say7⏏5<EOL>␤    expecting any of:␤        argument list␤     …»
02:46 TEttinger that is interesting, cowens. I wonder if it has to do with external code being used for format strings? or just compatibility with other specifications of format strings?
02:46 cowens (0.370370367037037034/3).fmt(“%.16f”).say
02:46 kcodrgkimd_ joined #perl6
02:46 TEttinger m: (0.370370367037037034/3).fmt(“%.16f”).say
02:46 camelia rakudo-moar 31e466: OUTPUT«0.1234567890123460␤»
02:46 cowens p6: (0.370370367037037034/3).fmt(“%.16f”).say
02:46 camelia rakudo-moar 31e466: OUTPUT«0.1234567890123460␤»
02:46 cowens p6: 0.370370367037037034/3
02:46 camelia rakudo-moar 31e466: OUTPUT«WARNINGS for <tmp>:␤Useless use of "/" in expression "0.370370367037037034/3" in sink context (line 1)␤»
02:46 cowens p6: (0.370370367037037034/3).say
02:46 camelia rakudo-moar 31e466: OUTPUT«0.123456789012345678␤»
02:46 cowens even normal division is has more accuracy than fmt
02:46 TEttinger defnitely not the same
02:46 MasterDuke bisectable6: (1/3).fmt(“%.16f”).say
02:46 bisectable6 MasterDuke, On both starting points (old=2015.12 new=334d134) the exit code is 0 and the output is identical as well
02:46 bisectable6 MasterDuke, Output on both points: 0.3333333333333330
02:46 cowens How are they not the same?  Both have digits past .16, but it truncates and puts in a 0
02:46 cowens It didn’t even round the last 6 to a 7
02:46 TEttinger oh uh I mean you are correct in that the accuracy is not the same
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 cowens perl5 says this for .32 : 0.33333333333333331482961625624739
02:48 cowens that is one more 3 before it goes wonky
02:50 cowens But base seems arbitraily precise
02:50 cowens p6: (1/3).base(10, 100).say
02:50 camelia rakudo-moar 31e466: OUTPUT«0.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333␤»
02:50 dayangkun joined #perl6
02:51 TEttinger p6: (1/90).base(10, 100).say
02:51 camelia rakudo-moar 31e466: OUTPUT«0.0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111␤»
02:51 TEttinger p6: (1/81).base(10, 100).say
02:51 camelia rakudo-moar 334d13: OUTPUT«0.0123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790␤»
02:51 TEttinger I'm just curious here
02:51 TEttinger that's an interesting number though
02:57 kalkin-_ joined #perl6
03:00 dalek whateverable: d2a03fc | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (6 files):
03:00 dalek whateverable: IRC colors and factor out of run-smth
03:00 dalek whateverable:
03:00 dalek whateverable: Now all bots should have colorful output in IRC while still having
03:00 dalek whateverable: normal gists (everything is going to have eject symbol now).
03:00 dalek whateverable:
03:00 dalek whateverable: Tests with control characters are disabled for now.
03:00 dalek whateverable:
03:00 dalek whateverable: Refactoring of run-snippet is needed because we might want to do other
03:00 dalek whateverable: stuff with the build (this will be used in satisfiable).
03:00 dalek whateverable: review: https://github.com/perl6/whateverable/commit/d2a03fcfe6
03:00 dalek whateverable: 7f91954 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Unicodable.p6:
03:00 dalek whateverable: Unicodable: do not attempt to print control characters
03:00 dalek whateverable: review: https://github.com/perl6/whateverable/commit/7f9195491c
03:00 dalek whateverable: d4bb76f | (Aleks-Daniel Jakimenko-Aleksejev)++ | Statisfiable.p6:
03:00 dalek whateverable: Add statisfiable
03:00 dalek whateverable: review: https://github.com/perl6/whateverable/commit/d4bb76fa45
03:01 evalable6 joined #perl6
03:01 benchable6 joined #perl6
03:01 committable6 joined #perl6
03:01 statisfiable6 joined #perl6
03:01 bisectable6 joined #perl6
03:01 unicodable6 joined #perl6
03:06 AlexDaniel hmmm, how can I get the size of the whole directory? Is there a module for that?
03:07 AlexDaniel ah, nevermind
03:07 noganex_ joined #perl6
03:08 AlexDaniel no, the question is still there :D
03:09 ugexe m: say Rakudo::Internals.DIR-RECURSE(".").map({ .IO.s }).sum # >:)
03:09 camelia rakudo-moar 334d13: OUTPUT«1382849147␤»
03:12 bstamour joined #perl6
03:13 AlexDaniel ugexe: so you are not suggesting PathTools, right? :S
03:23 ugexe I promote torturing the implementors
03:30 wamba joined #perl6
03:31 itcharlie_linux left #perl6
03:36 cognominal joined #perl6
03:36 dataf3l joined #perl6
03:38 tbrowder .tell jnthn thanks for the class help. i sent thanks shortly after you gave it but i think my irc client (or network connection) failed me
03:38 yoleaux tbrowder: I'll pass your message to jnthn.
03:51 cdg joined #perl6
03:56 cognominal joined #perl6
04:05 Ben_Goldberg joined #perl6
04:05 AlexDaniel .tell .tell timotimo soo, you wanted to measure maxresidentk or something? Can you tell me what were you planning to do exactly so that I can add it to statisfiable?
04:05 yoleaux AlexDaniel: What kind of a name is ".tell"?!
04:05 AlexDaniel .tell timotimo soo, you wanted to measure maxresidentk or something? Can you tell me what were you planning to do exactly so that I can add it to statisfiable?
04:05 yoleaux AlexDaniel: I'll pass your message to timotimo.
04:11 statisfiable6 joined #perl6
04:11 AlexDaniel statisfiable6: install
04:11 statisfiable6 AlexDaniel, OK! Working on it…
04:12 statisfiable6 AlexDaniel, https://gist.github.com/4a23a6afe1d4615d664b5caa120262bc
04:12 AlexDaniel statisfiable6: core
04:12 statisfiable6 AlexDaniel, OK! Working on it…
04:13 statisfiable6 AlexDaniel, https://gist.github.com/722ea6307286eac41279607be0c8dac8
04:26 cognominal joined #perl6
04:34 Ben_Goldberg joined #perl6
04:39 samcv statisfiable6, help
04:39 statisfiable6 samcv, Available stats: core (CORE.setting size), install (size of the whole installation), …
04:39 Ben_Goldberg joined #perl6
04:47 dayangkun joined #perl6
05:00 pyrimidine joined #perl6
05:04 mattp_ joined #perl6
05:04 grondilu_ joined #perl6
05:13 pyrimidine joined #perl6
05:17 aborazmeh joined #perl6
05:17 aborazmeh joined #perl6
05:17 xtreak joined #perl6
05:22 b2gills m: sub foo {@_.sum}; sub bar ($_){-$_}; [\[&(&bar∘&foo)]] 1,2,3,4,5
05:22 camelia rakudo-moar 334d13: OUTPUT«Potential difficulties:␤    Useless use of [\[&(&bar∘&foo)]] in sink context␤    at <tmp>:1␤    ------> 3sub foo {@_.sum}; sub bar ($_){-$_}; 7⏏5[\[&(&bar∘&foo)]] 1,2,3,4,5␤»
05:23 b2gills m: sub foo {@_.sum}; sub bar ($_){-$_}; say [\[&(&bar∘&foo)]] 1,2,3,4,5
05:23 camelia rakudo-moar 334d13: OUTPUT«(1 -3 0 -4 -1)␤»
05:38 kcodrgkimd_ Good morning everyone
05:44 BenGoldberg What if it's night?
05:46 Cabanossi joined #perl6
05:46 kcodrgkimd_ Hmm, good evening in that case?
05:56 pyrimidine joined #perl6
06:00 rurban joined #perl6
06:01 rurban joined #perl6
06:08 imcsk8 joined #perl6
06:14 Tonik joined #perl6
06:16 _28_ria joined #perl6
06:17 dayangkun joined #perl6
06:22 domidumont joined #perl6
06:24 moritz it's always morning in UGT!
06:25 bjz joined #perl6
06:29 pierre_ joined #perl6
06:42 samcv just looked up UGT. heh :)
06:45 darutoko joined #perl6
06:50 RabidGravy joined #perl6
06:51 domidumont joined #perl6
07:20 RabidGravy boom
07:23 labster joined #perl6
07:23 RabidGravy right off to the code mines
07:32 * moritz finally made a command line to adjust laptop display brightness more fine-grained than the function keys do
08:10 cpage_ joined #perl6
08:29 cibs joined #perl6
08:48 g4 joined #perl6
08:49 cibs joined #perl6
08:49 wamba joined #perl6
08:50 effbiai left #perl6
09:01 bjz joined #perl6
09:07 thayne joined #perl6
09:10 abraxxa joined #perl6
09:11 cognominal joined #perl6
09:18 Actualeyes left #perl6
09:22 Actualeyes joined #perl6
09:27 xtreak joined #perl6
09:32 samcv nice moritz
09:34 bjz joined #perl6
09:41 AlexDaniel joined #perl6
09:52 * masak finally created a script that opens conflicting files in vim, and then stages them after checking that the conflicts are gone
09:53 jnthn ooh :)
09:53 yoleaux 03:38Z <tbrowder> jnthn: thanks for the class help. i sent thanks shortly after you gave it but i think my irc client (or network connection) failed me
09:54 jnthn .oO( You're welcome, I'm always happy to help with class struggles... )
09:54 rindolf joined #perl6
09:54 samcv ok so i'm looking at S15 and thinking about updating it and removing 'unibool'. since it's not really needed. it already says `uniprop` should return the narrowest possible number for number values, or strings for non numerical values. then says to use unibool for boolean
09:55 samcv is this fine with people?
09:56 jnthn There's not a single mention of unibool in roast
09:56 samcv yeah
09:56 jnthn Did we even implement it? :)
09:56 samcv no
09:56 jnthn Ah
09:56 jnthn I'm not sure what value it brings
09:56 samcv we have uniprop-bool but i mean idk if that should be in the spec. it may be useful for troubleshooting. at least it's useful to me atm
09:56 jnthn Well, boolean values presumably, but... :)
09:56 samcv but i don't think it needs to be in reast
09:56 samcv but uniprop already returns bools
09:57 jnthn Right
09:57 jnthn Yeah, I don't see why unibool is needed
09:57 jnthn uniprop-[int|str|bool] don't occur in roast either
09:57 samcv yep
09:58 jnthn So we're not obligated to continue providing it
09:58 jnthn So question is more what it's useful for. :)
10:00 samcv atm i think it's useful for checking sanity on uniprop, since it may not work correctly for 100% of things, but i think the end goal should just be in any of those cases to try and just have uniprop work properly
10:01 samcv also jnthn i wanted to know what you thought about the struct unicode properties. some of them return an int for uniprop-int and a string for uniprop-str is that intentional?
10:03 jnthn Got an example handy of what that's doing that?
10:03 samcv uhm. let me check
10:03 jnthn *of one
10:03 jnthn grr
10:03 samcv oh and you probably saw the bug i filed on the moarvm github about the bidi matching bracket returns a string of a hex number, but it's just a string, and returns nothing for the others
10:04 samcv but that is a totally different thing. let me try and first an example though
10:04 jnthn Yeah. You also re-uncovered some ambiguity issues
10:04 samcv m: 0x202A.uniprop-int('Bidi_Class').say
10:04 camelia rakudo-moar 334d13: OUTPUT«16␤»
10:04 samcv ah here we go
10:05 jnthn m: 0x202A.uniprop-str('Bidi_Class').say
10:05 camelia rakudo-moar 334d13: OUTPUT«LRE␤»
10:05 jnthn m: 0x202A.uniprop-bool('Bidi_Class').say
10:05 camelia rakudo-moar 334d13: OUTPUT«True␤»
10:05 samcv most of the ones listed by unicode under the 'enum properties' section do not do that
10:06 samcv but i didn't see any relation between numbers and the values. although they are basically enums because can only have a fixed number of values
10:06 samcv (at least for unicode 9.0…) which makes it so it could change in the future, depending on which one you're talking about
10:07 samcv 'a'.uniprop-bool('Bidi_Class').say
10:07 samcv m: 'a'.uniprop-bool('Bidi_Class').say
10:07 camelia rakudo-moar 334d13: OUTPUT«False␤»
10:07 jnthn Yeah, I'm wondering where the numbers come from :)
10:08 jnthn As in, the Unicode spec things I've found don't assign any such numerical values, just the string ones
10:08 jnthn So I wonder if we're leaking some internal representation there
10:08 samcv m: '('.uniprop-str('Bidi_Class').say
10:08 camelia rakudo-moar 334d13: OUTPUT«ON␤»
10:10 jnthn If bidi_class is behaving a bit oddly, however, here may be the reason for the discrepancy
10:10 jnthn https://github.com/MoarVM/MoarVM/blob/master/tools/ucd2c.pl#L56
10:10 jnthn Note how it's pulled in by derived_property whereas a bunch of others by enumerated_property
10:11 samcv m: 'a'.uniprop-int.say
10:11 camelia rakudo-moar 334d13: OUTPUT«Cannot resolve caller uniprop-int(Str); none of these signatures match:␤    (Str:D $str, Stringy:D $propname)␤    (Int:D $code, Stringy:D $propname)␤  in block <unit> at <tmp> line 1␤␤»
10:11 samcv m: 'a'.uniprop-int('General_Category').say
10:11 camelia rakudo-moar 334d13: OUTPUT«2␤»
10:11 samcv ah
10:11 jnthn m: say 'a'.uniprop-str('Hangul_Syllable_Type').say
10:11 camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤True␤»
10:11 jnthn m: 'a'.uniprop-str('Hangul_Syllable_Type').say
10:11 camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤»
10:12 jnthn m: 'a'.uniprop-int('Hangul_Syllable_Type').say
10:12 camelia rakudo-moar 334d13: OUTPUT«0␤»
10:12 jnthn m: 'ㄷ'.uniprop-str('Hangul_Syllable_Type').say
10:12 camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤»
10:12 jnthn aww
10:12 pyrimidine joined #perl6
10:13 jnthn m: '읔'.uniprop-str('Hangul_Syllable_Type').say
10:13 camelia rakudo-moar 334d13: OUTPUT«LVT␤»
10:13 jnthn m: '읔'.uniprop-int('Hangul_Syllable_Type').say
10:13 camelia rakudo-moar 334d13: OUTPUT«5␤»
10:13 jnthn No, seems more widepsread
10:14 samcv ㄷ does not actually have the hangul syllable type fyi
10:14 samcv not sure if that was intentional
10:15 jnthn Yeah, I went to wikipedia to grab a hangul thingy to paste in and managed to copy some historical char from the history section :P
10:15 maxp_ joined #perl6
10:16 * jnthn has nothing set up to let him conveniently type Hangul :P
10:16 jnthn I could once read it enough to know when something said "beer" but that was about ten years ago :)
10:16 maxp_ is there a way to do inplace editing like perl $^I?
10:18 Vasyl joined #perl6
10:20 rburkholder joined #perl6
10:20 araujo joined #perl6
10:21 effbiai joined #perl6
10:21 effbiai joined #perl6
10:24 moritz maxp_: not yet, I think
10:24 maxp_ ok thanks
10:25 wamba joined #perl6
10:30 effbiai left #perl6
10:34 rindolf joined #perl6
10:41 dj_goku joined #perl6
10:52 pyrimidine joined #perl6
10:59 bjz_ joined #perl6
11:00 cyphase_eviltwin joined #perl6
11:05 cognominal joined #perl6
11:05 pierre_ joined #perl6
11:08 pyrimidine joined #perl6
11:11 sb2 joined #perl6
11:11 sb2 p6 say 10
11:11 sb2 p6: say 111;
11:11 camelia rakudo-moar 334d13: OUTPUT«111␤»
11:12 cyphase_eviltwin joined #perl6
11:14 sb2 any project which is well known is using perl6?
11:17 pyrimidine joined #perl6
11:23 sena_kun joined #perl6
11:24 lucasb joined #perl6
11:24 jnthn sb2: Relatively unlikely, given the first production release was less than a year ago and that isn't all that long for something to be written in a language and then become well known. (Of course, the cute answer is that the main Perl 6 implementation is written in Perl 6, and you know about that. ;-))
11:25 sb2 :-)
11:25 pierre_ joined #perl6
11:53 wamba joined #perl6
12:09 sunnavy joined #perl6
12:10 timotimo .tell AlexDaniel i'd like for statisfiable to run "time perl6 -e ''" multiple times and report the average maxresidentk (or maybe the lowest would make sense here actually) that it got from "time"
12:10 yoleaux 04:05Z <AlexDaniel> timotimo: soo, you wanted to measure maxresidentk or something? Can you tell me what were you planning to do exactly so that I can add it to statisfiable?
12:10 yoleaux timotimo: I'll pass your message to AlexDaniel.
12:11 timotimo .tell AlexDaniel could statisfiable generate a second plot that starts the y axis at 0?
12:11 yoleaux timotimo: I'll pass your message to AlexDaniel.
12:13 lucasb statisfiable6: help
12:13 statisfiable6 lucasb, Available stats: core (CORE.setting size), install (size of the whole installation), …
12:15 cpage_ joined #perl6
12:17 rurban joined #perl6
12:21 AlexDaniel joined #perl6
12:22 AlexDaniel .
12:22 yoleaux 12:10Z <timotimo> AlexDaniel: i'd like for statisfiable to run "time perl6 -e ''" multiple times and report the average maxresidentk (or maybe the lowest would make sense here actually) that it got from "time"
12:22 yoleaux 12:11Z <timotimo> AlexDaniel: could statisfiable generate a second plot that starts the y axis at 0?
12:22 timotimo yo
12:22 AlexDaniel that was quick, right? :)
12:22 timotimo thanks for your work \o/
12:22 AlexDaniel timotimo: why is it better to generate it starting on y=0?
12:23 timotimo it's not better, just different. that's why i want a second plot :)
12:23 AlexDaniel alright, let me hack it in quickly… :)
12:24 timotimo cool
12:24 timotimo it's just because the relative differences seem so big, but it's all in the 10% range (for core size)
12:24 AlexDaniel timotimo: 「/usr/bin/time -f %M perl6 -e ''」 ?
12:25 timotimo oh, i didn't even know about -f!
12:25 timotimo yes, that'll be the right thing
12:25 AlexDaniel how else did you measure it?
12:25 timotimo i copy-pasted all the output into a perl6 -e :)
12:25 moritz parsing the output of /usr/bin/time ?
12:26 AlexDaniel well, the thing is, 「time」 is ussually a bash builtin…
12:26 AlexDaniel usually*
12:26 AlexDaniel and I guess yours is a bit different? Mine does not seem to print maxresidentk
12:26 timotimo yeah, i use fish
12:26 timotimo i think it runs /usr/bin/time for me
12:27 AlexDaniel ahhh, ok, I see
12:27 AlexDaniel how many runs should I do to get a decent average? :-/
12:28 pierre_ joined #perl6
12:28 timotimo a hundred! :P
12:28 bjz joined #perl6
12:28 AlexDaniel m: 100*5000*0.25 / 60 / 60
12:28 camelia rakudo-moar 124a0d: OUTPUT«WARNINGS for <tmp>:␤Useless use of "/" in expression "/ 60 / 60" in sink context (line 1)␤»
12:28 AlexDaniel m: say 100*5000*0.25 / 60 / 60
12:28 camelia rakudo-moar 124a0d: OUTPUT«34.722222␤»
12:29 AlexDaniel 34 hours
12:29 timotimo hehehe
12:29 timotimo if we go down to three, it'll still be 10 hours??
12:29 xtreak joined #perl6
12:29 AlexDaniel m: say 3*5000*0.25 / 60 / 60
12:29 camelia rakudo-moar 124a0d: OUTPUT«1.041667␤»
12:29 timotimo oh, 100 to 3, not 10 to 3
12:29 timotimo how many cores can the machine sacrifice for such a run?
12:29 timotimo also, we cache the results from earlier runs, right?
12:30 AlexDaniel yes
12:30 timotimo OK
12:30 AlexDaniel well, 4 is a nice number, although I tend to use 7 or 8 for stuff that is blocked by IO
12:31 AlexDaniel actually, I'm not sure how accurate you want these results to be
12:32 AlexDaniel given several thousands of commits, the graph will look nice even if we do it once per commit
12:35 timotimo the results tend to jump between n and n + 0.5MB on my machine
12:36 AlexDaniel I wonder if there's any way to measure it that is more consistent
12:36 timotimo well, the measurement is accurate
12:36 AlexDaniel it's just different each time…
12:36 timotimo it's just that at least one of the allocators tends to behave non-deterministically
12:38 AlexDaniel let's see if I broke it
12:38 statisfiable6 joined #perl6
12:38 AlexDaniel statisfiable6: core0
12:38 statisfiable6 AlexDaniel, OK! Working on it…
12:38 AlexDaniel a huge chunk of this time is actually gisting it… :-/
12:38 AlexDaniel I should consider hosting this stuff myself, I guess
12:39 statisfiable6 AlexDaniel, https://gist.github.com/d5b0f927533176b9d38fb97a0207a647
12:39 AlexDaniel statisfiable6: install 0
12:39 statisfiable6 AlexDaniel, OK! Working on it…
12:40 statisfiable6 AlexDaniel, https://gist.github.com/a441709f7c573f3bc84126be2293e2ce
12:41 AlexDaniel but withouth 0 in the query it should be able to make a normal graph
12:41 AlexDaniel statisfiable6: core
12:41 statisfiable6 AlexDaniel, OK! Working on it…
12:41 pyrimidine joined #perl6
12:42 statisfiable6 AlexDaniel, https://gist.github.com/80ee723a5339b5c6cd00f903d660dd91
12:42 AlexDaniel timotimo: ok?
12:43 timotimo um, okay
12:43 AlexDaniel … does not sound like your are satisfied
12:43 AlexDaniel :)
12:46 timotimo well, i asked for a second graph :P
12:46 timotimo instead i got the ability to switch between what graph gets generated
12:46 timotimo it's fine
12:48 AlexDaniel the graph itself is >600KB… I think SVG::Plot should do a better job in this case…
12:49 AlexDaniel dammit, something is leaking memory
12:50 AlexDaniel this is no longer an issue with bisectable/committable/evalable, but it is a problem for unicodable/statisfiable
13:02 timotimo damn
13:02 rindolf joined #perl6
13:03 timotimo well, we'll totally eat up more memory as the internal cache-like things are filling up
13:03 timotimo it'll eventually slow down and come to a halt
13:03 timotimo well, only if it's one of the benign leaks
13:10 lucasb AlexDaniel: those commit hashes are cronologically sorted, right?
13:13 MasterDuke_ joined #perl6
13:15 timotimo that's the only way that makes sense :)
13:16 cyphase joined #perl6
13:17 lucasb yeah :)
13:19 Ven joined #perl6
13:20 wamba joined #perl6
13:26 canopus joined #perl6
13:26 xtreak joined #perl6
13:31 maxp_ joined #perl6
13:32 FROGGS joined #perl6
13:32 maxp_ In a grammar I've this token: token Division { <Space> <Word> <Space> 'DIVISION' <[<Space> <Word>]>* \.* } where Space is \s+ and Word is \w+.
13:32 maxp_ I've this error in this token: Repeated character (<) unexpectedly found in character class
13:33 FROGGS this is wrong: <[<Space> <Word>]>*
13:33 FROGGS should most likely read: [<Space> <Word>]*
13:33 Vasyl joined #perl6
13:33 xtreak joined #perl6
13:34 maxp_ Ok. So I can't define a character class like this?
13:35 arnsholt Space and Word aren't character classes though
13:36 arnsholt If they were \s and \w, I think it should be possible to do <+Space+Word>
13:36 arnsholt Or at least <+alnum+sp>
13:36 maxp_ ok
13:38 maxp_ yes it works!!
13:38 maxp_ thank you.
13:41 [Coke] moritz: if you have to run $dt.Date.DateTime to see if something compares to a Date... just call .Date and then don't do anything else.
13:41 [Coke] s/compares to/is just a/
13:42 [Coke] (from blog post)
13:43 moritz [Coke]: the point is that I want to treat 2016-12-24 00:00:00 different from 2016-12-24 00:00:01
13:43 cowens joined #perl6
13:43 moritz [Coke]: I could do that by checking testing 0 = all(.hour, .minute, .second), or I could do it by compariting dt.Date.DateTime to $dt
13:44 moritz [Coke]: but if I just use $dt.Date, I don't know if I lost some hours/minutes/seconds or not
13:44 [Coke] whoops. yup, misread, thought you were ending up with a Date either way
13:44 * [Coke] *sighs*
13:44 * [Coke] tries some coffee before doing any coding for $dayjob
13:45 cowens took a quick peek at the source to determine why (1/3).fmt(“%.20f”) != (1/3).base(10, 20), turns out fmt is sprintf is stringify-to-precision implemented in NQP and base is implemented in Perl 6
13:46 cowens stringify-to-precision gets the left and right hand side like this: my @number := nqp::split('.', $float); my $lhs_s := @number[0]; my $rhs_s := @number[1];
13:46 cyphase joined #perl6
13:47 cowens base gets them like this: my Int $int_part = self.Int; my $frac = abs(self - $int_part);
13:48 cowens I suspect, but can’t easily prove that the split is the problem.  It is probably limiting the precision becuase split hasn’t been told the precision.
13:50 Ven joined #perl6
13:52 lucasb isn't it because floats have a limited precision?
13:52 lucasb m: say 0.33333333333333333333e0
13:52 camelia rakudo-moar 124a0d: OUTPUT«0.333333333333333␤»
13:54 FROGGS yeah, it calls .Num on the Rat to pass it to nqp::unbox_n/nqp::split
13:54 Khisanth joined #perl6
13:55 FROGGS m: say (1/3).Num;
13:55 camelia rakudo-moar 124a0d: OUTPUT«0.333333333333333␤»
14:02 canopus joined #perl6
14:02 timotimo goodbye, matrix
14:04 skids joined #perl6
14:04 lucasb what?
14:07 lucasb what are the limits of the Rational? since it uses Ints for both numerator and denominator, shouldn't it handle big numbers?
14:07 lucasb m: say (3/10000000000000000000).nude
14:07 camelia rakudo-moar 124a0d: OUTPUT«(3 10000000000000000000)␤»
14:07 lucasb m: say (3/100000000000000000000).nude
14:07 camelia rakudo-moar 124a0d: OUTPUT«No such method 'nude' for invocant of type 'Num'␤  in block <unit> at <tmp> line 1␤␤»
14:07 lucasb *limits of the Rat type
14:08 lucasb why, after some threshold, the division stops being Rat and starts being Num?
14:08 pierre_ joined #perl6
14:09 moritz lucasb: to avoid pathologically slow cases
14:09 moritz lucasb: consider newton's algorithms for calculating the square root of $x, which uses $y = ($y + $x / $y) / 2 as the iteration step
14:10 moritz lucasb: it'll overflow a 32bit int in the numerator and denumerator in a few iterations
14:10 timotimo you can use FatRat, of course
14:10 moritz lucasb: and if you do it with arbitrary sized integers, they nearly double in size at each iteration, making each operation quadratic in time, so you have an O(n^3) algorithm for something that looks to be O(n)
14:11 moritz which is why the default is to overflow to Num, with the option to use FatRat as an opt-in, should you chose to want precision at the cost of being really slooow
14:11 lucasb ok, I think I get, thanks
14:12 lucasb by looking at src/core/Rat.pm, Rat and FatRat doesn't seen much different
14:12 lucasb but hey, this limitation is only about the '/' division op, I think. I can create Rats by hand...
14:13 lucasb m: say Rat.new(3,100000000000000000000000000000)
14:13 camelia rakudo-moar 124a0d: OUTPUT«0.00000000000000000000000000003␤»
14:13 timotimo right, all our ops check "is one of our operands a FatRat?"
14:13 timotimo that's where most of the magic happens
14:17 moritz lucasb: the overflow happens only for the numerator
14:17 moritz m: say Rat.new(2**65, 3).^name
14:17 camelia rakudo-moar 124a0d: OUTPUT«Rat␤»
14:17 moritz m: say (2**65 / 3).^name
14:17 camelia rakudo-moar 124a0d: OUTPUT«Rat␤»
14:17 moritz m: say (3 / 2**65 ).^name
14:17 camelia rakudo-moar 124a0d: OUTPUT«Num␤»
14:18 timotimo but that's the denominator
14:19 moritz uhm, yes
14:19 * moritz confused
14:19 moritz and it's machine-sized integers, not always 32bit
14:21 masak the overflow happens only for the denominator, no?
14:22 moritz right
14:22 moritz that's what timotimo++ pointed out
14:22 moritz after I mixed up the two
14:23 wictory[m] joined #perl6
14:23 masak mnemonic: nu/de :P
14:23 masak (about the only thing good about that too-cute method name)
14:25 jnthn .oO( The fact that it's not "numerator-and-denominator" is another good thing :P )
14:25 masak heh
14:26 masak TimToady once thought out-loud about classes which are essentially tuples, and how one might imagine language support for those
14:26 masak Rat is not the only case where we want to say "give me the constituent parts" like that
14:26 timotimo you know how GLSL has "swizzles"?
14:27 masak in Complex, we similarly have .reals -- a shockingly bad choice of name
14:27 masak seems these "give me the parts" methods are hard to name
14:27 masak timotimo: no, I don't -- what are those?
14:28 timotimo method-like things you can put after vector-like things to do things to multiple parts at once
14:28 timotimo including spreading out one part into multiple, or re-ordering
14:28 timotimo think color.xyz = position.zxy
14:28 masak ooh
14:29 masak like jQuery's implicit iteration on steroids, sounds like
14:29 timotimo not sure
14:29 masak yeah, I could totally see that happening in Perl 6 module/slang space
14:29 timotimo in any case, there's a library called "glm" that implements "glsl-style math" for C++ (iirc)
14:29 * timotimo AFK a bit
14:34 tadzik joined #perl6
14:34 M-Illandan joined #perl6
14:34 Matthew[m] joined #perl6
14:34 ilmari[m] joined #perl6
14:34 dp[m] joined #perl6
14:34 mulk[m] joined #perl6
14:34 Matias[m] joined #perl6
14:34 CIAvash[m] joined #perl6
14:51 pyrimidine joined #perl6
14:52 thundergnat joined #perl6
14:54 rurban joined #perl6
14:56 cyphase joined #perl6
14:59 cyphase joined #perl6
15:00 cyphase joined #perl6
15:00 cyphase joined #perl6
15:02 SmokeMachine is this expected?
15:02 SmokeMachine m: UInt.isa(Int)
15:02 camelia rakudo-moar 124a0d: OUTPUT«Cannot resolve caller isa(Perl6::Metamodel::SubsetHOW: UInt, Int); none of these signatures match:␤    (Mu \SELF: Mu $type, *%_)␤    (Mu \SELF: Str:D $name, *%_)␤  in block <unit> at <tmp> line 1␤␤»
15:03 SmokeMachine m: IntStr.isa(Int)
15:03 camelia rakudo-moar 124a0d: ( no output )
15:03 SmokeMachine m: say IntStr.isa(Int)
15:03 camelia rakudo-moar 124a0d: OUTPUT«True␤»
15:03 SmokeMachine I know that UInt is a subset...
15:04 SmokeMachine but shouldn't that work?
15:05 cowens joined #perl6
15:05 moritz m: say UInt ~~ Int
15:05 camelia rakudo-moar 124a0d: OUTPUT«True␤»
15:05 moritz that works. Isn't that enough?
15:05 andrzeju_ joined #perl6
15:06 cowens I would buy the its a float argument if it behaved like a float
15:06 moritz if not, we can document Mu.isa to only work with objects of metaclasses that support isa
15:06 cowens p6: (2/3).fmt("%.32f”).say
15:06 camelia rakudo-moar 124a0d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3(2/3).fmt("%.32f”).say7⏏5<EOL>␤    expecting any of:␤        argument list␤        double quotes␤…»
15:06 cowens p6: (2/3).fmt(“%.32f”).say
15:06 camelia rakudo-moar 124a0d: OUTPUT«0.66666666666666700000000000000000␤»
15:07 SmokeMachine m: UInt ~~ Int && Int ~~ UInt
15:07 camelia rakudo-moar 124a0d: ( no output )
15:07 SmokeMachine m: say UInt ~~ Int && Int ~~ UInt
15:07 camelia rakudo-moar 124a0d: OUTPUT«True␤»
15:07 cowens compare that with perl 5: perl -e 'printf "%.32f\n", 2/3' => 0.66666666666666662965923251249478
15:07 SmokeMachine moritz: no... ^^
15:07 holli joined #perl6
15:08 SmokeMachine moritz: I want True when X is a subset/subtype of Y but false if Y is a subset/subtype of X
15:09 dp[m] joined #perl6
15:09 jsimonet joined #perl6
15:09 moritz SmokeMachine: IMHO Int ~~ Uint being True is the real bug
15:09 nowan joined #perl6
15:09 holli v5 or Inline::Perl5?
15:10 moritz holli: Inline::Perl5
15:10 SmokeMachine moritz: probably...
15:10 mst__ joined #perl6
15:10 holli i see the overly excited scotsman is still alive ;-D
15:11 holli tx, moritz
15:11 tadzik joined #perl6
15:13 AlexDaniel joined #perl6
15:14 AlexDaniel lucasb: “those commit hashes are cronologically sorted, right?” – kinda
15:14 AlexDaniel lucasb: that's the reverse of what git log will give you
15:14 thundergnat Is there a large performance penalty for making CORE only methods multi? In my somewhat feeble testing I'm not seeing much difference.
15:15 thundergnat If the core methods aren't marked multi, I can't monkey patch in an augmented method. :(
15:15 AlexDaniel lucasb: that is, they are not sorted by date
15:16 cowens m: .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f).say;
15:16 camelia rakudo-moar 124a0d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in curly double quotes; couldn't find final '”' ␤at <tmp>:1␤------> 3; 12345678901234567.Num.fmt(“%.32f).say;7⏏5<EOL>␤    expecting any of:␤        argument list…»
15:17 cowens m: .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”);
15:17 camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤»
15:17 cowens .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”).say;
15:18 cowens m: .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”).say;
15:18 camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤12345678901234600.00000000000000000000000000000000␤»
15:18 cowens sigh
15:18 thundergnat m: use MONKEY; augment class Str { multi method parse-base (Int $radix where -37 < * < -1) {} } # :(
15:18 camelia rakudo-moar 124a0d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot have a multi candidate for 'parse-base' when an only method is also in the package 'Str'␤at <tmp>:1␤»
15:19 cowens m: .12345678901234567.Num.base(10, 32).say; .12345678901234567.Num.fmt(“%.32f”).say
15:19 camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤0.12345678901234600000000000000000␤»
15:19 thundergnat See http://rosettacode.org/wiki/Negative_base_numbers#Perl_6 for a use case.
15:19 cowens It isn’t that the value is a float, it is something else throwing away precision
15:20 thundergnat I know, I know, monkey patching bad. Action at a distance and all that. Hey, don't make your language so fun if you don't want people to play with it.
15:20 AlexDaniel xD
15:21 cowens I think, but don’t know enough about NQP to say for certain, it is the split on the decimal point.  It is stringifying the float too soon.
15:21 cowens The whole point of fmt, as far Ias I understand it, is to control how the value stringifies
15:22 timotimo the thing with nqp:: ops is that many of them are implemented down in the VM
15:22 timotimo you have to look at the mapping in QASTOperationsMAST (and the JVM equivalent) to see what's what
15:22 timotimo fmt, however, has some stuff like the backend registering formatting functions
15:23 cdg joined #perl6
15:27 cdg joined #perl6
15:29 Ven joined #perl6
15:29 perlpilot joined #perl6
15:31 araujo joined #perl6
15:38 dalek ecosystem: 8d4805e | RabidGravy++ | META.list:
15:38 dalek ecosystem: Add Tinky::JSON
15:38 dalek ecosystem:
15:38 dalek ecosystem: https://github.com/jonathanstowe/Tinky-JSON
15:38 dalek ecosystem:
15:38 dalek ecosystem: With special thanks to the YNAP Evil Santa Festive Jumper Hackday
15:38 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/8d4805e8a9
15:46 wamba joined #perl6
15:55 pmurias joined #perl6
15:56 pmurias timotimo, cowens: we have docs for some of the nqp docs, and tests for most
15:57 timotimo right, thanks to you there's lots of tests
16:07 dalek ecosystem: faddde9 | (Alexey Melezhik)++ | META.list:
16:07 dalek ecosystem: Add Sparrowdo::Chef::Client to ecosystem
16:07 dalek ecosystem:
16:07 dalek ecosystem: Run chef client on remote host using Sparrowdo.
16:07 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/faddde93a9
16:07 dalek ecosystem: 96be8ec | (Zoffix Znet)++ | META.list:
16:07 dalek ecosystem: Merge pull request #274 from melezhik/master
16:07 dalek ecosystem:
16:07 dalek ecosystem: Add Sparrowdo::Chef::Client to ecosystem
16:07 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/96be8eccfa
16:09 kaare_ Hi Hello
16:12 kaare_ Some weeks ago there was some talk about native shaped arrays being enhanced. But I have a hard time finding the definition of those.
16:12 kaare_ I imagine they are sth like LinearArray from NativeHelpers::Blob?
16:15 perlpilot kaare_: you want the definition of a "native shaped array"?
16:18 kaare_ perlpilot: Is that a stupid question?
16:19 lucasb my int @a[3; 3]  # <-- NSA
16:20 kaare_ OK, does it also wotk with CStructs?
16:27 timotimo unfortunately not
16:28 perlpilot kaare_: no, it's not a stupid question, I was just trying to make sure I understood what you wanted.
16:32 pierre_ joined #perl6
16:34 SmokeMachine m: my @a = <1 2 3>, <a b c>; [X] @a
16:34 camelia rakudo-moar 124a0d: OUTPUT«Potential difficulties:␤    Useless use of [X] in sink context␤    at <tmp>:1␤    ------> 3my @a = <1 2 3>, <a b c>; 7⏏5[X] @a␤»
16:34 SmokeMachine m: my @a = <1 2 3>, <a b c>; say [X] @a
16:34 camelia rakudo-moar 124a0d: OUTPUT«((1 a) (1 b) (1 c) (2 a) (2 b) (2 c) (3 a) (3 b) (3 c))␤»
16:35 SmokeMachine m: my @a = <1 2 3>; say [X] @a # I would expect ((1) (2) (3))
16:35 camelia rakudo-moar 124a0d: OUTPUT«((1 2 3))␤»
16:35 SmokeMachine why?
16:36 SmokeMachine does that make sense?
16:36 SmokeMachine m: my @a = $(<1 2 3>); say [X] @a # I would expect ((1) (2) (3))
16:36 camelia rakudo-moar 124a0d: OUTPUT«((1 2 3))␤»
16:37 lucasb m: my @a = <1 2 3>; say [X] |@a
16:37 camelia rakudo-moar 124a0d: OUTPUT«((1 2 3))␤»
16:38 perlpilot m: my @a = <1 2 3>; say [X] @a, ();  # curious
16:38 camelia rakudo-moar 124a0d: OUTPUT«()␤»
16:38 perlpilot huh.  Not at all what I expected
16:39 SmokeMachine m: my @a = $(<1 2 3>); say [\X] @a
16:39 camelia rakudo-moar 124a0d: OUTPUT«((((1 2 3))))␤»
16:41 perlpilot m:  my @a = <1 2 3>;  say [\X] @a
16:41 camelia rakudo-moar 124a0d: OUTPUT«(((1)) ((1 2)) ((1 2 3)))␤»
16:41 holli Inline::Perl5 doesnt compile for me :-( i'll be off for a a while. if someone could take a look at this ( http://hastebin.com/raw/okijonalep ) i'd be grateful
16:45 [Coke] /usr/bin/ld: cannot find -lperl
16:45 [Coke] Did you compile your perl 5 with the required options?
16:49 khw joined #perl6
16:49 giraffe joined #perl6
16:52 cdg joined #perl6
16:53 kaare_ perlpilot: It's just that I've been 100% busy w/ Perl 5 work for the last year, so I've got no clue where p6 is now.
16:54 moritz it's here!
16:54 domidumont joined #perl6
16:54 kaare_ timotimo: Is the intention that it will be, at some time
16:54 dalek doc/coke/bughunt: d17f5cf | coke++ | README.md:
16:54 dalek doc/coke/bughunt: what's this branch for?
16:54 dalek doc/coke/bughunt: review: https://github.com/perl6/doc/commit/d17f5cff1d
16:54 dalek doc/coke/bughunt: cb2249e | coke++ | htmlify.p6:
16:54 dalek doc/coke/bughunt: wip
16:54 dalek doc/coke/bughunt: review: https://github.com/perl6/doc/commit/cb2249e1ca
16:54 kaare_ moritz: Yeah, but it's evolving all the time :-)
16:56 SmokeMachine so, is that a bug?
16:57 domidumont joined #perl6
16:58 dataf3l joined #perl6
17:00 timotimo holli: you're missing a perl5 development package of some description
17:00 timotimo i.e. in order to build that p6helper thing there needs to be a perl.a or perl.la or something
17:01 domidumont joined #perl6
17:02 kaare_ I have a DBIish question. Is that OK here?
17:02 pmurias kaare_: yes
17:03 pmurias kaare_: everything perl6 is related is OK here, I'm not a DBIish expert myself tho
17:03 timotimo holli: also, i think inline::perl5's readme says that the perl5 has to be built with -fPIE
17:03 timotimo i gotta go now, though
17:04 kaare_ https://github.com/perl6/DBIish/blob/master/lib/DBDish/Pg/Native.pm6#L40 returns nice objects depending on the native PostgreSQL type.
17:05 kaare_ How will I go about changing or adding these types?
17:05 travis-ci joined #perl6
17:05 travis-ci Doc build passed. Will "Coke" Coleda 'wip'
17:05 travis-ci https://travis-ci.org/perl6/doc/builds/184588183 https://github.com/perl6/doc/compare/d17f5cff1d08^...cb2249e1cad0
17:05 travis-ci left #perl6
17:05 kaare_ Subclassing DBIish seems like the big hammer. Any better way?
17:06 moritz kaare_: if they are core Perl 6 types and core Postgres types, a pull request to DBIish
17:07 moritz if not, we must ask ourselves if these kinds of type translations are in scope for DBIish
17:07 moritz as the old maintainer, my answer would have been a firm "no, that belong into an ORM or similar"
17:08 dalek doc/coke/bughunt: 88c106a | coke++ | htmlify.p6:
17:08 dalek doc/coke/bughunt: wip
17:08 dalek doc/coke/bughunt: review: https://github.com/perl6/doc/commit/88c106a949
17:08 dalek doc/coke/bughunt: 35d092a | coke++ | htmlify.p6:
17:08 dalek doc/coke/bughunt: remove nqp op call
17:08 dalek doc/coke/bughunt: review: https://github.com/perl6/doc/commit/35d092a907
17:09 kaare_ moritz: Would the ORM subclass DBIish or package the coulmns in another level of type system, or sth else?
17:11 kaare_ I'm just speculating, but it goes in two directions; Adding some functionality to the types of the basic classes, and
17:11 kaare_ PostgreSQL supports adding types of your own.
17:12 kaare_ For example, all PostgreSQL enums are classes by themselves
17:12 cdg joined #perl6
17:12 dalek doc/coke/bughunt: 771fff9 | coke++ | htmlify.p6:
17:12 dalek doc/coke/bughunt: always precompile
17:12 dalek doc/coke/bughunt:
17:12 dalek doc/coke/bughunt: brings back the weird unlock errors.
17:12 dalek doc/coke/bughunt: review: https://github.com/perl6/doc/commit/771fff93a5
17:17 [Coke] https://gist.github.com/coke/fed45e511ae2a058626c862a36dcfb12 shows a bunch of different failure modes for that code.
17:25 cdg_ joined #perl6
17:28 Actualeyes1 joined #perl6
17:33 pierre_ joined #perl6
17:33 setty1 joined #perl6
17:38 lucasb joined #perl6
17:39 lucasb [Coke]: I can reproduce the segfault and random errors
17:39 lucasb [Coke]: not random, just one up until now, the "unlock when we're not locked"
17:40 lucasb but it takes too long to die/segfault
17:50 dataf3l joined #perl6
17:53 sufrostico joined #perl6
18:08 SmokeMachine m: sub a {}; &a.CALL-ME()
18:08 camelia rakudo-moar 124a0d: OUTPUT«No such method 'CALL-ME' for invocant of type 'Sub'␤  in block <unit> at <tmp> line 1␤␤»
18:09 SmokeMachine what's wrong?
18:09 lukaramu joined #perl6
18:11 geekosaur mostly that the docs are wrong /o\
18:12 geekosaur (the person writing them took some speculation as gospel, and the speculation didn't actually cover this. CALL-ME is for things that are not directly callable like subs are)
18:15 canopus joined #perl6
18:19 zakharyas joined #perl6
18:23 toolforger joined #perl6
18:23 lucasb when I do 'for $x { .say }', does 'for' calls any special method on $x that 'say $x' doesn't call?
18:23 lucasb m:
18:23 lucasb m: sub f { 10 }; &f.wrap({ 20 }); say f
18:23 camelia rakudo-moar 124a0d: OUTPUT«10␤»
18:23 lucasb m: sub f { 10 }; &f.wrap({ 20 }); .say for f
18:23 camelia rakudo-moar 124a0d: OUTPUT«20␤»
18:25 sufrostico joined #perl6
18:25 * toolforger is working on a better (hah!) understanding of NQPHLL.nqp
18:25 gfldex m: sub s {}; say so &s ~~ Callable;
18:25 camelia rakudo-moar 124a0d: OUTPUT«True␤»
18:25 toolforger Question of the day: What's  %*COMPILING<%?OPTIONS><target> ?
18:26 toolforger I have a vague idea, but I'm not sure and I do not understand all of the sigils
18:26 lucasb oh, here:
18:26 lucasb m: sub f { 10 }; &f.wrap({ 20 }); say f, &f()
18:26 camelia rakudo-moar 124a0d: OUTPUT«1020␤»
18:26 ugexe target is which vm it precompiles for
18:27 toolforger I think target is the data that was parsed for the grammar rule "target"
18:27 toolforger Is that the correct interpretation?
18:28 ugexe no, its the target for COMPILING
18:28 ugexe one of the COMPILING OPTIONS
18:28 ugexe i.e. target is which vm it precompiles for
18:29 toolforger Umm... sort of, it compares against 'jar', for example
18:29 toolforger which is actually the only value it is comparing against... weird
18:30 ugexe ...no
18:30 ugexe perl6 --target=mbc --output=Foo.pm6.moarvm lib/Foo.pm6
18:31 toolforger Strange
18:33 toolforger jo@jodel:~/Projekte/nqp$ grep -r OPTIONS *|grep target
18:33 toolforger gen/jvm/stage2/QAST.nqp:        if %*COMPILING<%?OPTIONS><target> eq 'jar' {
18:33 toolforger gen/jvm/stage1/QAST.nqp:        if %*COMPILING<%?OPTIONS><target> eq 'jar' {
18:33 toolforger src/vm/jvm/QAST/Compiler.nqp:        if %*COMPILING<%?OPTIONS><target> eq 'jar' {
18:33 ugexe https://github.com/rakudo/rakudo/blob/ae1f2f87385e86fc842fadab368a6db1250173be/docs/running.pod read the docs, it shows the supported values
18:34 toolforger Then probably it's being used in a context that does not say OPTIONS
18:34 ugexe i think you need to look at what %*COMPILING<%?OPTIONS> is and where it comes from
18:35 geekosaur lukasb, it's say that calls an extra method (.gist)
18:35 SmokeMachine geekosaur: thanks!
18:36 gfldex geekosaur: not really: see https://github.com/perl6/doc/blob/master/doc/Type/Callable.pod6#L60
18:36 toolforger ugexe: That's exactly what I'd like to find out
18:36 toolforger First thing I didn't understand is what %* and %? mean :-(
18:37 geekosaur https://docs.perl6.org/language/variables#Twigils
18:38 geekosaur in general * twigil is for a dynamic (as opposed to lexical) variable, and ? is for a compile-time variable
18:39 toolforger So %* is a hash that's supposed to have come into scope through a closure environment, right?
18:40 lucasb geekosaur: did you see my example 'say f, &f()' ?
18:42 toolforger geekosaur: Thanks for the info, I can drill a bit deeper now
18:42 ugexe m: sub f { 10 }; &f.wrap({ 20 }); say f.WHAT; say &f.WHAT
18:42 camelia rakudo-moar 124a0d: OUTPUT«(Int)␤(Sub+{Wrapped})␤»
18:43 geekosaur toolforger, I think what is happening there is that the sub f is optimized at compile time into a constant
18:43 geekosaur but by doing &f() you are bypassing that
18:44 toolforger That's lucasb's issue ;-)
18:45 lucasb I don't have any issues with that :)
18:46 lucasb just looks strange that f() != &f()
18:46 geekosaur whoops, sorry
18:46 toolforger NP
18:47 geekosaur lucasb, perl 5 actually does similar optimizations, and likewise you can use the & sigil to defeat them
18:47 ugexe m: sub f { 10 }; &f.wrap({ 20 }); say &f.WHAT; say .&f.WHAT; # wth...
18:47 camelia rakudo-moar 124a0d: OUTPUT«(Sub+{Wrapped})␤(Int)␤»
18:47 dalek doc: 761ed85 | gfldex++ | doc/Language/functions.pod6:
18:47 dalek doc: index use soft
18:47 dalek doc: review: https://github.com/perl6/doc/commit/761ed85dd8
18:47 synopsebot6 Link: http://doc.perl6.org/language/functions
18:47 cdg joined #perl6
18:48 toolforger Aww... I can't google for OPTIONS on docs.perl6.org
18:48 holli Coke: I'm using the system perl
18:48 toolforger How/where do I find the docs for $?OPTIONS ?
18:48 ugexe https://github.com/rakudo/rakudo/blob/419f7bd60566a3aaccc0860872e4fbe87f91fe07/src/Perl6/Compiler.nqp#L26 # options is set here
18:49 geekosaur I think it's not documented as such, because it's internal to Rakudo
18:49 geekosaur as opposed to being part of the perl6 specification
18:49 ugexe nqp --help shows a list of options
18:49 ugexe thats all it is
18:50 toolforger Oh
18:50 toolforger I interpreted "defined by the compiler" as "predefined by the language"
18:51 toolforger for the $? twigil, I mean
18:51 ugexe m: say $?FILE; # this is predefined by the language
18:51 camelia rakudo-moar 124a0d: OUTPUT«<tmp>␤»
18:52 holli Coke: I rtfm'ed and installed libperl-dev. works now. tx
18:53 toolforger Yeah, that's why I was thinking that %?OPTIONS might be predefined
18:53 [Coke] holli++
18:53 ugexe its not %?OPTIONS, its q|%?OPTIONS| as a hash key
18:54 holli it fails 1 / 420 tests though
18:54 lucasb 420!
18:54 toolforger ugexe: Oh. Noted.
18:55 * toolforger is wondering why anybody would use such a hash key though
18:58 lucasb m: 'oh' andthen .&{ say $^oh ~ 'hai' }
18:58 camelia rakudo-moar 124a0d: OUTPUT«ohhai␤»
18:58 ugexe because its unlikely to clash with any future additions and follows the spirit of the naming convention
18:59 toolforger Yeah, I've been assuming that there must be a reason somewhere; Perl guys rarely do things without a good reason (one of the things that have been amazing me)
18:59 toolforger (in a good way)
19:00 dalek specs: 37f0ed6 | samcv++ | S15-unicode.pod:
19:00 dalek specs: Update S15 so as not to include references to a uniprops hash.
19:00 dalek specs:
19:00 dalek specs: It had been changed in some places but not others.
19:00 dalek specs: review: https://github.com/perl6/specs/commit/37f0ed6062
19:00 dalek specs: 556410a | samcv++ | S15-unicode.pod:
19:00 dalek specs: Make it a little clearer we return Bool for boolean values.
19:00 dalek specs: review: https://github.com/perl6/specs/commit/556410aa33
19:11 dalek doc: 5c5da14 | gfldex++ | doc/Language/pragmas.pod6:
19:11 dalek doc: link to inlining
19:11 dalek doc: review: https://github.com/perl6/doc/commit/5c5da14ae3
19:11 dalek doc: dfcc997 | gfldex++ | doc/Language/pragmas.pod6:
19:11 dalek doc: remove domain and schema
19:11 synopsebot6 Link: http://doc.perl6.org/language/pragmas
19:11 dalek doc: review: https://github.com/perl6/doc/commit/dfcc99722f
19:11 synopsebot6 Link: http://doc.perl6.org/language/pragmas
19:12 RabidGravy toolforger, I always do things without a good reason, but then again I might not be a Perl guy
19:12 toolforger :-)
19:15 toolforger I'm definitely not a Perl guy, and I still don't buy the TIMTOWTDI cool-aid, but I have a lot of respect for the thoroughness that the Perl guys invest into getting it all right
19:28 jjido joined #perl6
19:29 wamba joined #perl6
19:29 RabidGravy TIMTOWTDI is just an expression of how reality is, if you try to suppress that then you are being anti-realistic ;-)
19:29 skids joined #perl6
19:32 loveperl joined #perl6
19:34 pyrimidine joined #perl6
19:36 labster joined #perl6
19:40 samcv b-but we should force everybody to have identical indenting and syntax error otherwise!
19:41 toolforger lol
19:41 samcv that has been so frustrating, writing tests for the syntax highlighter, because indentation matters, and sometimes it can make it just silently pass a test or display some really really weird error
19:41 samcv one was that i needed to install something
19:41 samcv because i had an extra space in the indentation
19:42 samcv "ncaught Error: jasmine.Suite() required
19:42 samcv "
19:42 samcv which i guess is the thing it uses to run the tests. but somehow a single space gave that totally weird error, which was hard to figure out... just generally terrible error messages
19:42 toolforger I just think that one should err on the frugal than the liberal side
19:43 toolforger but that's just my personal preference, so meh :-)
19:43 samcv hah
19:43 samcv frugal vs liberal? not sure what that means in this context? which is which?
19:43 toolforger and it's language design preference, so double meh :-)
19:44 samcv well if it had awesome error messages i probably wouldn't care _that_ much
19:44 toolforger "frugal" = "be more restrictive" = "be more friendly towards code readers"
19:44 samcv ah ok
19:44 * toolforger agrees that awesome messages are more important than syntactic frugality
19:44 [Coke] big shout out to samcv++ for improving our editor tooling.
19:45 samcv thank you!
19:45 samcv :)
19:45 toolforger E.g. C++ became usable after clang started giving useful error messages
19:45 toolforger I think...
19:45 toolforger I may be wrong :-D
19:46 samcv i am so glad i am doing testing now for the syntax highlighter though, because there were a few things that regressed when i fixed something else. it's really really easy to happen
19:46 samcv (if you're working on the same grammar section)
19:46 loveperl How to send parameters to a class?
19:47 samcv loveperl, methods
19:47 samcv myclass.method('whatever')
19:47 samcv method whatever ( $something ) { }
19:47 samcv inside the class
19:47 loveperl But to the builder?
19:47 samcv oh you mean on creation loveperl ?
19:47 samcv ok
19:48 samcv myclass.new(first => 'value', second => 'value'
19:48 samcv )
19:48 loveperl And how do I put them in private variables?
19:50 SmokeMachine could someone help me? I think its a bug... but Im not sure, and I don't know where...
19:51 SmokeMachine when I use this module that Im writing: https://github.com/FCO/Test-Fuzz/tree/role
19:51 andrzejku joined #perl6
19:51 SmokeMachine on the branch: role
19:51 SmokeMachine and run this code:
19:51 SmokeMachine $ perl6 -Ilib -MTest::Fuzz -e '
19:51 SmokeMachine sub bla(Int $a) is fuzzed {42}
19:51 SmokeMachine run-tests;
19:51 SmokeMachine '
19:52 SmokeMachine some times it works like a charm...
19:52 samcv loveperl, ok.  has $!vaiable;
19:52 SmokeMachine but most of time I get a "Segmentation fault: 11"
19:52 cowens The ngp::split is definitely the problem in fmt that is limiting its precision.  I replaced it with a while loop multipling the fractional part by 10 and it now produces results similar to Perl 5’s sprintf. I am not sure what the right code is (mine is pretty horrible), but using ngp::split ot get the integer and fractional parts is definitely wrong.
19:52 samcv private variables are $!whatever, and public are $.variable
19:52 samcv loveperl, actually $.variables are private variables but have a self generated accesor generated
19:53 RabidGravy SmokeMachine, at the very least to report a "bug" with a segfault you will need to post a stack trace from the debugger
19:53 samcv if you declare a public one, has $.variable, to have rw access to it inside the class you need to use $!variable, otherwise it's read only by default
19:54 samcv since $.variable is the accessor method auto gened and the $!variable is the private attribute directly
19:54 loveperl Do I need to save what I receive in private variables
19:54 SmokeMachine https://gist.github.com/FCO/ae15254717a84c4bec83a22d3127bd68
19:55 samcv loveperl, to retain state you mean?
19:55 SmokeMachine RabidGravy: How do I get it? perl-m-debug?
19:55 SmokeMachine RabidGravy: sorry: perl6-debug-m?
19:55 samcv loveperl, you should save state in private variables. though there are 'state' declarations but that is not the best idea for objects
19:56 samcv not sure if perl 5 has that or not… i know perl 6 better than perl 5 by now
19:57 RabidGravy SmokeMachine, possibly, I was thinking perl6-gdb-m as that will give you the stack trace
19:57 SmokeMachine https://gist.github.com/FCO/35919b49e338c5079714b27e8f572e06
19:57 RabidGravy but it shouldn't ever segfault
19:58 SmokeMachine installing gdb...
19:59 cowens Is there a chance we will get an sprintf directive with more precision than %f?  Something that produces results similar to (1/3).base(10, 32)?
19:59 MasterDuke_ SmokeMachine: fyi, if you're using a moar you built yourself, you'll get better/useful stacktraces when moar is built with --debug=3
19:59 cowens or is the right answer to not trust fmt and sprintf and use base instead?
19:59 loveperl No I do not understand
19:59 loveperl :(
20:00 pyrimidine joined #perl6
20:00 SmokeMachine is this useful? https://gist.github.com/FCO/2b269ad4ba1e2b2b63202a137f32a88a
20:00 RabidGravy cowens, the right answer is if you feel that there should be a new directive your patch would be appreciated ;-)
20:00 SmokeMachine MasterDuke_: I installed with rakudobrew...
20:00 samcv when is rakudo being released how do i check
20:01 RabidGravy SmokeMachine, no that is not useful, that is just telling us that your gdb doesn't work for some reason ;-)
20:01 geekosaur NeuralAnomaly, status
20:01 NeuralAnomaly geekosaur, [✘] Next release is today. Since last release, there are 52 new still-open tickets (0 unreviewed and 0 blockers) and 71 unreviewed commits. See http://perl6.fail/release/stats for details
20:01 SmokeMachine Im getting my daughters at school... brb
20:02 geekosaur I think zoffix-of-many-names is working on whittling those down
20:02 MasterDuke_ SmokeMachine: you might need to type 'bt' after the segfault happens
20:04 samcv ok cool. made a PR to add a few missing changelogs
20:05 MasterDuke_ SmokeMachine: there's a way to pass options to the building moar stage when using rakudobrew, but it's a little complicated. i'm not at the computer with that in command history, but i'll send it to you later if you haven't figured it out by then
20:06 loveperl How do I send information to private attributes of a class?
20:07 pierre_ joined #perl6
20:07 samcv do you want to send private information or SET them directly
20:07 samcv myclass.attribute = 'whatever'; # you can do this if you want
20:07 samcv has $.attribute is rw;
20:07 samcv in the class
20:08 RabidGravy loveperl, you can set them by assignment in a method of an object
20:08 samcv that's not really abstracting at all, but
20:09 samcv most of the time it's better to hide state behind objects instead of directly setting them yourself but you may timtowtdi
20:09 RabidGravy if you want to set them outside the object then you will need to provide a method that does that
20:09 RabidGravy so
20:09 samcv well RabidGravy
20:09 samcv you don't
20:09 loveperl As?
20:09 holli i am trying to do the WxWidgets Perl5 example in Perl6 so i translated that http://hastebin.com/evizafuwih.pl to thathttp://hastebin.com/omeguzixot.py, however the perl6 version complains about OnInit being called
20:09 samcv has $.attribute is rw;
20:09 samcv and you can set them directly from outside
20:10 RabidGravy tnat's not a "private" attribute
20:10 holli it looks like it should work ^^
20:10 samcv i know
20:10 samcv but public attributes ARE private attributes
20:10 samcv but have autogenerated accessor methods ;)
20:10 samcv heh
20:10 RabidGravy right
20:11 RabidGravy here. just pop round to someones grandmothers with these boiled eggs
20:12 holli so if someone would have a look at what might be wrong
20:12 holli i have cookies :-D
20:13 toolforger The cookie jar in my browser is full ;-)
20:13 holli s/cookie/pizza/
20:13 toolforger tbh I'd help if I knew anything about WxWidgets, or Perl5
20:13 loveperl Default constructor for 'Programmer' only takes named arguments   in block <unit> at callprueba.pl line 2
20:13 MasterDuke_ holli: fyi, pretty sure you don't need to 'use Inline::Perl5;' anymore, :from<Perl5> should just work. also, pretty sure 'use strict;' is a no-op
20:13 loveperl error
20:14 TEttinger joined #perl6
20:15 pierrot joined #perl6
20:15 loveperl joined #perl6
20:16 holli I used to have a perlmonks account
20:16 loveperl Default constructor for 'Programmer' only takes named arguments
20:17 ugexe are you passing the constructor to Programmer any unnamed arguments?
20:17 MasterDuke_ m: class A { has $a }; my $b = A.new(2)
20:17 camelia rakudo-moar 124a0d: OUTPUT«Default constructor for 'A' only takes named arguments␤  in block <unit> at <tmp> line 1␤␤»
20:18 MasterDuke_ m: class A { has $a }; my $b = A.new(:2a)
20:18 camelia rakudo-moar 124a0d: ( no output )
20:18 MasterDuke_ loveperl: ^^^
20:18 ugexe :2a probably isn't the best way to show a new person a named argument
20:18 girafe joined #perl6
20:18 MasterDuke_ m: class A { has $a }; my $b = A.new(a => 2); say $b.a
20:18 camelia rakudo-moar 124a0d: OUTPUT«No such method 'a' for invocant of type 'A'␤  in block <unit> at <tmp> line 1␤␤»
20:18 MasterDuke_ m: class A { has $.a }; my $b = A.new(a => 2); say $b.a
20:18 camelia rakudo-moar 124a0d: OUTPUT«2␤»
20:20 loveperl the variable is $!a
20:20 SmokeMachine MasterDuke_: thanks
20:22 ugexe m: class Foo { has $!a; submethod BUILD(:$!a) {} }; say Foo.new(a => 42).a
20:22 camelia rakudo-moar 124a0d: OUTPUT«No such method 'a' for invocant of type 'Foo'␤  in block <unit> at <tmp> line 1␤␤»
20:23 ugexe m: class Foo { has $!a; submethod BUILD(:$!a) {}; method get { $!a }; }; say Foo.new(a => 42).get
20:23 camelia rakudo-moar 124a0d: OUTPUT«42␤»
20:25 ugexe loveperl: you should read this https://docs.perl6.org/language/objects
20:29 loveperl Thanks, what happens is that I do not understand English very well
20:31 MasterDuke_ loveperl: if you haven't seen it already, http://perl6intro.com/ is available in a bunch of languages
20:31 pmurias do a lot of unicode codepoints turn into 2 when titlecased?
20:32 toolforger In the end, one needs to learn English, but you will find it easier over time
20:32 toolforger pmurias: What do you mean with "turn into 2"?
20:34 pmurias ß => Ss
20:34 toolforger Ah, into two glyphs
20:34 pmurias I'm implementing nqp::tc on the JVM
20:34 samcv nice pmurias :)
20:35 toolforger My understanding of titlecase has beent hat it's usually just a variant of uppercasing
20:35 pmurias there is a Character.toTitleCase, but it doesn't work for ß
20:35 toolforger ß => Ss is a big exception
20:35 toolforger There should be a Unicode table that handles this though
20:35 samcv m: 'ß'.tc.say
20:35 camelia rakudo-moar 2a09e9: OUTPUT«Ss␤»
20:35 samcv m: 'ß'.fc.say
20:35 camelia rakudo-moar 2a09e9: OUTPUT«ss␤»
20:36 samcv an exception though? i wouldn't say that. unicode specifies it?
20:36 toolforger BTW ß => Ss for titlecase follows from the same rule that does ß => SS for uppercase
20:36 toolforger Unicode should specify that
20:36 samcv or do you mean like, would be an exception for humans ;P
20:36 toolforger I can try and look up the exact rules, but it would take a bit of time
20:37 toolforger Exception as in "ordinarily, titlecasing does not generate two codepoints from one, but for some codepoints, this does happen"
20:37 samcv toolforger, ftp://ftp.unicode.org/Public/UCD/latest/ucd/CaseFolding.txt
20:37 samcv has uppercase titlecase and casefolding mapping
20:37 samcv u: ß
20:37 unicodable6 samcv, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
20:37 pyrimidine joined #perl6
20:38 samcv 00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S
20:38 samcv err that's the case folding file. there's a bunch lemme look it it
20:38 toolforger Yeah, that's the right table
20:39 toolforger I also see "0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE"
20:40 toolforger This might be decomposition though
20:40 samcv toolforger, ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt this is actually the file
20:40 samcv the one linked before is only for case folding
20:40 samcv speaking of which. i need to add tests for roast for Simple case folding as well, and look into that
20:40 cowens left #perl6
20:41 toolforger Ah, right. I was wondering but concluded it's the right one because ß seemed to get mapped correctly
20:42 toolforger that's what one gets for looking at files instead of checking the actual rules
20:42 pmurias is that ftp link correct?
20:42 toolforger It gives a rules file
20:42 toolforger well, table actually
20:43 samcv yes that link is correct pmurias
20:43 pmurias chrome and wget refuse to fetch it for me :(
20:43 vendethiel joined #perl6
20:43 samcv i need to see if we need to be aware of a difference between lowercase/uppercase and simple lowercase/uppercase if there's extra things that are non-language specific mappings
20:43 AlexDaniel joined #perl6
20:43 vendethiel m: sub infix<,>($a, $b) { say "$a $b"; }; 1,2
20:43 camelia rakudo-moar 2a09e9: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3sub infix7⏏5<,>($a, $b) { say "$a $b"; }; 1,2␤    expecting any of:␤        new name to be defined␤»
20:43 vendethiel m: sub infix:<,>($a, $b) { say "$a $b"; }; 1,2
20:43 camelia rakudo-moar 2a09e9: OUTPUT«WARNINGS for <tmp>:␤Useless use of constant integer 1 in sink context (line 1)␤Useless use of constant integer 2 in sink context (line 1)␤1 2␤»
20:44 vendethiel i gathered as much. hmm
20:44 toolforger I've always been thinking that language-specific mappings are a HUGE can of worms, but you really need to deal with that in some way
20:44 vendethiel catching operators by name does that in a lexically scoped lang I guess
20:46 samcv m: 0x3A3.lc.say; 0x3A3.uc.say;
20:46 camelia rakudo-moar 2a09e9: OUTPUT«931␤931␤»
20:46 toolforger BTW SpecialCasing.txt gives you just the exceptions, standard lettercase transformations are defined elsewhere (Unicode.txt or CaseFolding.txt, I didn't check which)
20:46 samcv m: 0x3A3.chr.lc.say; 0x3A3.chr.uc.say;
20:46 camelia rakudo-moar 2a09e9: OUTPUT«σ␤Σ␤»
20:48 AlexDaniel u: { chr.tc ne chr.uc }
20:48 unicodable6 AlexDaniel, https://gist.github.com/6e02c1a5d6d03b5e9bd83074a52c604b
20:48 AlexDaniel u: { .chr.tc ne .chr.uc }
20:48 unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
20:48 unicodable6 AlexDaniel, U+01C4 LATIN CAPITAL LETTER DZ WITH CARON [Lu] (DŽ)
20:48 unicodable6 AlexDaniel, U+01C5 LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON [Lt] (Dž)
20:48 unicodable6 AlexDaniel, https://gist.github.com/ca6533625db5372250dc4287820619f8
20:49 AlexDaniel m: say ‘st’.uc; say ‘st’.tc
20:49 camelia rakudo-moar 2a09e9: OUTPUT«ST␤St␤»
20:49 AlexDaniel m: say ‘st’.uc; say ‘st’.tc; say ‘st’.lc
20:49 camelia rakudo-moar 2a09e9: OUTPUT«ST␤St␤st␤»
20:49 samcv m: "Test\x[3A3]".tc.say
20:49 camelia rakudo-moar 2a09e9: OUTPUT«TestΣ␤»
20:50 samcv ok that is wrong
20:50 samcv oh wait
20:50 AlexDaniel looks fine
20:50 samcv no i think that's rigth
20:50 AlexDaniel u: { .chr.uc.chars > 1 }
20:50 unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
20:50 unicodable6 AlexDaniel, U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE [Ll] (ʼn)
20:50 unicodable6 AlexDaniel, U+0587 ARMENIAN SMALL LIGATURE ECH YIWN [Ll] (և)
20:50 unicodable6 AlexDaniel, https://gist.github.com/a543cd3ffbc9348cdcfdb20e4b5642b1
20:50 AlexDaniel u: { .chr.uc.chars > 2 }
20:50 unicodable6 AlexDaniel, U+FB03 LATIN SMALL LIGATURE FFI [Ll] (ffi)
20:50 unicodable6 AlexDaniel, U+FB04 LATIN SMALL LIGATURE FFL [Ll] (ffl)
20:51 samcv m: "Test\x[3A3]".lc.say
20:51 camelia rakudo-moar 2a09e9: OUTPUT«testς␤»
20:51 AlexDaniel m: ‘ffi’.uc.say
20:51 camelia rakudo-moar 2a09e9: OUTPUT«FFI␤»
20:51 AlexDaniel come on…
20:51 AlexDaniel a character that turns into three characters when uppercased
20:51 AlexDaniel u: { .chr.lc.chars > 2 }
20:51 unicodable6 AlexDaniel, Found nothing!
20:51 AlexDaniel u: { .chr.lc.chars > 1 }
20:51 unicodable6 AlexDaniel, Found nothing!
20:51 AlexDaniel and nothing like that for lowecase /o\
20:52 samcv try fc
20:52 AlexDaniel u: { .chr.fc.chars > 1 }
20:52 unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
20:52 unicodable6 AlexDaniel, U+0587 ARMENIAN SMALL LIGATURE ECH YIWN [Ll] (և)
20:52 unicodable6 AlexDaniel, U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE [Ll] (ʼn)
20:52 unicodable6 AlexDaniel, https://gist.github.com/5c788d1a05ca0071fe7ea128dee87609
20:52 * geekosaur doesn't think ligatures belong in unicode tbh
20:52 samcv why not?
20:53 geekosaur I think the font description should handle it. ligatures are basically a holdover from lead type
20:53 samcv as long as it has uppercase lowercase mappings etc
20:53 AlexDaniel m: 0x1E9A.chr.uc.say
20:53 camelia rakudo-moar 2a09e9: OUTPUT«Aʾ␤»
20:53 AlexDaniel u: Aʾ
20:53 unicodable6 AlexDaniel, U+0041 LATIN CAPITAL LETTER A [Lu] (A)
20:53 unicodable6 AlexDaniel, U+02BE MODIFIER LETTER RIGHT HALF RING [Lm] (ʾ)
20:53 AlexDaniel great, a letter with a modifier letter
20:54 geekosaur and/or from legacy character sets, which also gets us the normalization insanity
20:54 RabidGravy geekosaur, yeah there are a number of things like that, strike through too
20:54 AlexDaniel u: strike
20:54 unicodable6 AlexDaniel, U+1D7A LATIN SMALL LETTER TH WITH STRIKETHROUGH [Ll] (ᵺ)
20:54 unicodable6 AlexDaniel, U+1D90B SIGNWRITING STRIKE SINGLE [So] (𝤋)
20:54 unicodable6 AlexDaniel, U+1D90C SIGNWRITING STRIKE MULTIPLE [So] (𝤌)
20:54 unicodable6 AlexDaniel, U+1D90D SIGNWRITING STRIKE BETWEEN [So] (𝤍)
20:54 kaare_ joined #perl6
20:55 toolforger Most multiple-character transformations are using modifiers I think
20:55 kaare_ joined #perl6
20:55 toolforger Where the lowercase character is a precomposed character and no precomposed uc equivalent exists
20:56 pmurias samcv: for normal characters the JVM provides a method so I thin it should be possible for me just make nqp::tc aware of the SpecialCasing.txt ones
20:56 * toolforger shrugs
20:56 samcv yeah
20:56 toolforger Normalization isn't a big think, you need to do that anyway
20:56 samcv well jvm may to that too pmurias
20:56 samcv unless you ask for simple case mappings
20:56 toolforger JVM is somewhat incomplete in its UC support
20:56 toolforger Expect differences between MOAR and JVM if you use the JDK unicode support
20:57 pmurias samcv: it seems to only have simple case mappings support as you can only ask for a codepoint->codepoint transformation
20:58 samcv oh
20:58 pmurias (for titlecase)
20:58 [Coke] sift4++
20:59 AlexDaniel [Coke]: ?
20:59 toolforger You could use ICU4J, but then ICU might be ahead of what Moar does
21:01 AlexDaniel [Coke]: is it significantly faster or what?
21:01 samcv i doubt it
21:01 samcv moarvm ones are handled as data structures in moar
21:04 [Coke] AlexDaniel: I don't have a direct comparison to what I was doing before, but it seems so, yes.
21:04 [Coke] Have a new update to the docs branch that should be much faster, I hope.
21:04 samcv nice coke :)
21:04 AlexDaniel \o/
21:04 [Coke] (and actually ADD fuzzy searching to current searching, instead of replacing what we had entirely)
21:04 AlexDaniel \o/
21:04 AlexDaniel what about limiting the number of results?
21:05 [Coke] one thing at a time. :)
21:05 samcv [Coke], make sure it doesn't fuzzy search for words 3 or less
21:05 samcv (characters long)
21:05 [Coke] The trick about limiting results is deciding what to throw out. I have an algorithm for this I have at work, but we have far fewer categories.
21:06 [Coke] samcv: it's currently set at 3 minimum, I think.
21:07 samcv but tbh i think we should have a separate search page. because i *liked* having not a huge number of results
21:07 samcv i liked being able to search for topics and find them really really quickly
21:07 samcv imo we should leave the autocomplete search as it is, and have an actual search page you can search fuzzily
21:13 dalek doc/coke/levenshtein: 658a785 | coke++ | / (3 files):
21:13 dalek doc/coke/levenshtein: Switch to sift4
21:13 dalek doc/coke/levenshtein:
21:13 dalek doc/coke/levenshtein: Try to avoid some degenerate cases, don't use fuzzy search on
21:13 dalek doc/coke/levenshtein: small search terms, don't search too deep on fuzzy checks.
21:13 dalek doc/coke/levenshtein: review: https://github.com/perl6/doc/commit/658a785139
21:14 dalek doc/coke/levenshtein: b75e4a6 | coke++ | template/search_template.js:
21:14 dalek doc/coke/levenshtein: re-enable fuzzy search
21:14 dalek doc/coke/levenshtein: review: https://github.com/perl6/doc/commit/b75e4a6c73
21:14 dalek doc/coke/levenshtein: 5819694 | coke++ | / (3 files):
21:14 dalek doc/coke/levenshtein: Switch to sift4
21:14 dalek doc/coke/levenshtein:
21:14 dalek doc/coke/levenshtein: Try to avoid some degenerate cases, don't use fuzzy search on
21:14 dalek doc/coke/levenshtein: small search terms, don't search too deep on fuzzy checks.
21:14 dalek doc/coke/levenshtein: review: https://github.com/perl6/doc/commit/5819694581
21:14 samcv ok we do this correctly
21:15 holli rakudo: my %a = "foo" => "bar"; my %b = "foo" => "bar"; say %a ~~ %b ?? "of course" !! "WTF";
21:15 camelia rakudo-moar 2a09e9: OUTPUT«WTF␤»
21:15 samcv m: 'Σ'.lc.say; 'tΣ'.lc.say
21:15 camelia rakudo-moar 2a09e9: OUTPUT«σ␤tς␤»
21:15 dalek doc/coke/levenshtein: b8bd868 | coke++ | / (3 files):
21:15 dalek doc/coke/levenshtein: Switch to sift4 for fuzzy searching
21:15 samcv one sigma only it at the start of words the other in the middle or end of words
21:15 dalek doc/coke/levenshtein:
21:15 dalek doc/coke/levenshtein: Try to avoid some degenerate cases, don't use fuzzy search on
21:15 dalek doc/coke/levenshtein: small search terms, don't search too deep on fuzzy checks.
21:15 dalek doc/coke/levenshtein: review: https://github.com/perl6/doc/commit/b8bd8685fb
21:15 samcv m: 'Σ'.lc.say; 'tΣe'.lc.say
21:15 camelia rakudo-moar 2a09e9: OUTPUT«σ␤tσe␤»
21:15 samcv ok that one is wrong tho
21:15 samcv err wait
21:15 [Coke] did some force pushing on that branch, apologies.
21:16 samcv no that's right as well. it's the end or middle of words is one, and only the beginning of words is the other
21:16 toolforger m: 'xΣ'.lc.say
21:16 camelia rakudo-moar 2a09e9: OUTPUT«xς␤»
21:16 samcv wonder if we test that in roast… me checks
21:16 toolforger m: 'Σx'.lc.say
21:16 camelia rakudo-moar 2a09e9: OUTPUT«σx␤»
21:17 toolforger m: 'xΣx'.lc.say
21:17 camelia rakudo-moar 2a09e9: OUTPUT«xσx␤»
21:17 toolforger So, final lowercase sigma is different
21:17 jjido joined #perl6
21:18 cdg joined #perl6
21:18 [Coke] samcv, alexdaniel; if you could try out search in a regular build locally vs. that branch, I'd appreciate it.
21:18 samcv ok looks like we do test that
21:18 samcv kk [Coke]
21:18 toolforger I suspect that's the correct behaviour for sigma
21:19 samcv yeah that's right toolforger, and roast tests it. i checked
21:19 samcv [Coke], i'm having problems with the local build though-
21:19 samcv oh wait. no. not anymore
21:19 samcv maybe my rakudo broke between installing or something
21:20 pierrot joined #perl6
21:21 samcv [Coke], do i have to run make again for this?
21:21 samcv i just co's your branch
21:22 pyrimidine joined #perl6
21:23 [Coke] yes, 'perl6 htmlify' should work. you can probably do a --sparse, but I suspect that restricts your search choices.
21:23 SmokeMachine perl6-gdb-m isn't giving me any information...
21:23 [Coke] (--no-highlight will probably save a ton of time, though)
21:24 SmokeMachine https://gist.github.com/FCO/3980b0eec792173560c78acc9b363bfa
21:25 samcv uhm search isn't working at all [Coke] after i cleared my cache
21:26 toolforger cu all
21:26 toolforger left #perl6
21:26 SmokeMachine MasterDuke, RabidGravy: any idea? https://gist.github.com/FCO/3980b0eec792173560c78acc9b363bfa
21:27 RabidGravy bt
21:28 SmokeMachine https://www.irccloud.com/pastebin/OzEP59Ww/
21:28 RabidGravy what os is this that's totally not working
21:28 SmokeMachine Im running on a docker...
21:29 RabidGravy oh
21:29 SmokeMachine on a image based on rakudo-star image
21:29 SmokeMachine I couldn't run it on my mac...
21:31 Ven joined #perl6
21:32 SmokeMachine any idea?
21:34 user15 joined #perl6
21:36 user15 I'm trying to install rakudo 2016.11 on fedora and I'm given this error message: "you may need to install the ExtUtils::Command module"
21:37 user15 I tried to install it with: "dnf install libgtextutils"
21:37 user15 that installs but i keep getting the error message above
21:37 andrzejku joined #perl6
21:37 user15 what is it exactly that I'm supposed to install?
21:38 kcodrgkimd joined #perl6
21:38 lizmat what happens if you say:
21:38 RabidGravy it's perl-ExtUtils-Command not that other thing
21:38 user15 oh
21:38 lizmat perl -MExtUtils::Command -e0
21:38 lucasb joined #perl6
21:38 user15 ok, i think i saw it
21:38 lizmat ah, ok
21:38 SmokeMachine RabidGravy: I got it!!!
21:39 RabidGravy woo
21:39 user15 i'm going to try it, thx
21:39 SmokeMachine https://www.irccloud.com/pastebin/MWGKVKdc/
21:39 pyrimidine joined #perl6
21:42 RabidGravy SmokeMachine, that's more like it
21:42 SmokeMachine https://www.irccloud.com/pastebin/OKTQ17ZE/
21:43 RabidGravy not that it helps you, but it looks like it ran out of memory then walked right off the end of the GC list
21:43 SmokeMachine some times it works...
21:44 SmokeMachine MacBook-Pro-de-Fernando:Test-Fuzz fernando$ docker run -ti -v$PWD:/code --security-opt seccomp=unconfined perl6-gdb perl6-gdb-m -I/code/lib /code/test3.p6
21:44 SmokeMachine ================================================================================================
21:44 SmokeMachine This is Rakudo Perl 6 running in the GNU debugger, which often allows the user to generate useful back-
21:44 SmokeMachine traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code.
21:44 SmokeMachine This Rakudo version is 2016.11 built on MoarVM version 2016.11,
21:44 SmokeMachine running on debian (8.jessie) / linux (4.8.12.moby)
21:44 RabidGravy If you can get it down to ten lines or so it's file a rakudobug
21:44 SmokeMachine joined #perl6
21:45 kcodrgkimd Hello everyone, Im completely new to Perl6 and currently trying out lazy lists and list building. I have some trouble with the syntax here, lets say I build an infinite list by `my $xs = map(&foo, (1...Inf))`, how can I take from this list until a predicate is satisfied?
21:49 raiph joined #perl6
21:50 ugexe m: say (1..Inf).grep(* > 10).head
21:50 camelia rakudo-moar 2a09e9: OUTPUT«11␤»
21:50 AlexDaniel ugexe: well, not really
21:50 AlexDaniel this only works because it knows it is a range
21:51 AlexDaniel ah, wait, I'm wrong
21:52 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); say $xs.grep(* < 100)[^9]
21:52 camelia rakudo-moar 2a09e9: OUTPUT«(1 4 9 16 25 36 49 64 81)␤»
21:52 AlexDaniel yeah, it works
21:52 AlexDaniel … kind of
21:53 AlexDaniel still no way to know if that's all we could have got from it
21:53 user15 make rakudo-test "Can't locate Test/Harness.pm in @INC (you may need to install the Test::Harness module)" ???
21:54 user15 :(
21:55 ugexe m: my $l = (1..10).map: { LAST { say "DONE" }; $_ }; say $l[10]
21:55 camelia rakudo-moar 2a09e9: OUTPUT«DONE␤DONE␤Nil␤»
21:55 ugexe done done?
21:56 AlexDaniel donedonedonedonedone
21:56 AlexDaniel :)
21:56 RabidGravy user15, your Perl 5 installation seems horribly broken
21:56 ugexe m: my $l = (1..10).map: { LAST { say "DONE" }; $_ }; say $l[9]; # but at least you can kinda tell if thats all you could have got
21:56 camelia rakudo-moar 2a09e9: OUTPUT«10␤»
21:56 user15 i just installed fedora 25 from scratch
21:57 user15 i havent looked for updates yet, maybe that would solve the problem?
21:58 user15 ok, let me update...
21:58 RabidGravy no,  just do something like "sudo dnf installl perl-Catalyst-Devel"
21:59 lucasb m: <a b c>.map({ LAST say 'ho' }).eager
21:59 camelia rakudo-moar 2a09e9: OUTPUT«ho␤ho␤»
21:59 RabidGravy should bring everything in
21:59 RabidGravy :)
21:59 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); my $it = $xs.iterator; loop { my $val = $it.pull-one; last if $val > 100; say $val }
21:59 camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤»
22:00 RabidGravy basically fedora has a tiny cut-down version of Perl to run some stuff, but not a full install
22:00 user15 ok, trying it...
22:02 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); my $z = $xs.iterator; .say for { $z.pull-one } … * > 100
22:02 camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤121␤»
22:02 AlexDaniel is there any way to do it without iterator?
22:02 kcodrgkimd Hm that does work, but only if I know how many elements I want, or the first element for which the predicate is true? I thought there maybe was a way to use it like `(0, { &foo } ... ^ * < 1000)` as alternate way to build it or `$xs[^ * < 1000]`
22:03 AlexDaniel kcodrgkimd: why do you need this, by the way?
22:07 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); try { .say for $xs.grep({$_ < 100 ?? True !! X::AdHoc.new.throw}) }
22:07 camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤»
22:07 kcodrgkimd No specific reason, just playing around, and since I have worked with haskell somewhat recently, I was curious.
22:07 AlexDaniel hahaha
22:07 AlexDaniel I did it with throw, hah
22:07 khw joined #perl6
22:07 AlexDaniel ok, there's a better way
22:09 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); my @values = gather $xs.first({take $_; $_ > 100}); say @values
22:09 camelia rakudo-moar 2a09e9: OUTPUT«[1 4 9 16 25 36 49 64 81 100 121]␤»
22:09 AlexDaniel kcodrgkimd: what about this?
22:09 kcodrgkimd The examples at perl6intro, e.g. `my $lazylist = (0, { $_ + 3 } ... ^ * 10);` made me pretty happy about Perls functionality, so I wondered how (and if) this was possible.
22:11 AlexDaniel kcodrgkimd: I think generally it is a bit weird to stop once you stumble upon a value that does not satisfy you. What if there are some good values past this point? :)
22:11 AlexDaniel kcodrgkimd: all this kinda makes sense with ranges and stuff that is normally increasing or decreasing constistently…
22:12 AlexDaniel but once you have some unknow Seq… oh well
22:12 AlexDaniel that being said
22:12 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); my @values = gather $xs.first({take $_; $_ > 100}); say @values
22:12 camelia rakudo-moar 2a09e9: OUTPUT«[1 4 9 16 25 36 49 64 81 100 121]␤»
22:12 AlexDaniel ↑ this does not look so bad, right?
22:12 kcodrgkimd (I had a typo in the perl6 example)
22:13 kcodrgkimd Yeah that comes close to the takeWhile function and looks good
22:14 AlexDaniel I wonder if there is any way to terminate grep without throwing
22:15 AlexDaniel kcodrgkimd: you probably expected this to be possible with ..., but it is normally used for generating stuff, not filtering
22:17 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); sub foo { .say for $xs.grep({return if $_ > 100; True}) }; foo
22:17 camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤»
22:18 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); FOO: for 1 { .say for $xs.grep({last FOO if $_ > 100; True}) }
22:18 camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤»
22:18 AlexDaniel :S
22:19 AlexDaniel “Note that grep is an implicit loop, so next and last without an argument will iterate or terminate the grep itself, not some loop surrounding the statement containing the grep.”
22:20 AlexDaniel so, according to outdated design docs, 「last」 should work inside grep
22:20 AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
22:20 camelia rakudo-moar 2a09e9: OUTPUT«(1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841 900 961 1024 1089 1156 1225 1296 1369 1444 1521 1600 1681 1764 1849 1936 2025 2116 2209 2304 2401 2500 2601 2704 2809 2916 3025 3136 3249 3364 3481 360…»
22:20 AlexDaniel commit: all my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
22:20 kcodrgkimd AlexDaniel: I agree, in my question I was not thinking of much else. My question could be generalized with 2 questions, I phrased it bad, Im sorry: In the example it shows `my $lazylist = (0, { $_ + 3 } ...^ * > 10);` , is possible to replace `{ $_ + 3 }` with a function? To build a list of numbers with a declared function applied to each number
22:21 committable6 AlexDaniel, https://gist.github.com/75c2986173dc8779cc65f98bf2292d8b
22:21 AlexDaniel AND IT DID WORK!
22:21 AlexDaniel we broke it
22:21 AlexDaniel kcodrgkimd: ok, first of all, thank you for asking this question
22:21 AlexDaniel kcodrgkimd: I think we found a regression
22:21 AlexDaniel bisect: my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
22:21 bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=2a09e92) because on both starting points the exit code is 0
22:21 bisectable6 AlexDaniel, bisect log: https://gist.github.com/d97c7d092ac2c5ff90a42f6b65dd8bb3
22:21 bisectable6 AlexDaniel, (2016-03-18) https://github.com/rakudo/rakudo/commit/6d120cab6d0bf55a3c96fd3bd9c2e841e7eb99b0
22:22 AlexDaniel yup
22:22 AlexDaniel kcodrgkimd: { $_ + 3 } is already a function, kind of
22:24 kcodrgkimd I know, but say I build a function foo that takes x and applies 3 to it, can I use it instead of declaring it in the list building itself? So that I can write something like `{ foo(currentnumber) }` instead of `{ $_ + 3 }`
22:25 AlexDaniel m: sub foo($x) { $x² }; my $lazylist = (1, 2, &foo ...^ * > 500); .say for $lazylist
22:25 camelia rakudo-moar 2a09e9: OUTPUT«(1 2 4 16 256)␤»
22:25 kcodrgkimd Aaah I see
22:26 AlexDaniel m: my $lazylist = (1, 2, -> $arg { $arg² } ...^ * > 500); .say for $lazylist
22:26 camelia rakudo-moar 2a09e9: OUTPUT«(1 2 4 16 256)␤»
22:26 kcodrgkimd Hmm why didnt that work while trying it out, give me a second
22:27 AlexDaniel is anybody else as sad as me because 「last」 in grep stopped working so long time ago and we haven't noticed?
22:30 user15 RabidGravy: its incredible, now everything installs fine and all tests pass successfully !!
22:31 dataange` left #perl6
22:31 RabidGravy yeah, it's fedora only installs half a Perl by default
22:33 user15 how can I get the man page? "No manual entry for perl6" ??
22:36 user15 maybe theres no man page...
22:37 user15 id like to get more details on the command line options
22:41 kcodrgkimd Ok I am going to play around with this for a bit, thank you very much.
22:47 MasterDuke SmokeMachine: rakudobrew build moar --configure-opts="--moar-option='--debug=3''"
22:49 * geekosaur likes how people worry about superstitious semicolons, but throw superstitious quotes all around >.>
22:50 MasterDuke geekosaur: my rakudobrew command? pretty sure at least some of those are required
22:50 AlexDaniel it's also interesting how people quote stuff like this: --foo="stuff"
22:50 AlexDaniel and not like "-foo=stuff" :)
22:51 AlexDaniel --*
22:51 geekosaur rakudobrew may be too clever for its own good, but at first glance none of those quotes should be required
22:51 geekosaur because there are no spaces or shell metacharacters involved
22:52 MasterDuke well, i can assure you that the third(!) ' is required, but maybe it wouldn't if i didn't have the "s
22:52 * geekosaur saves current rakudobrew and pokes
22:53 MasterDuke but i don't use rakudobrew on my system, so there definitely could be a better way to do that
22:53 geekosaur although it may be a while as it's updating git repos now and my local notwork is severely /o\
22:54 dalek ecosystem: b180c11 | jnthn++ | META.list:
22:54 dalek ecosystem: Add Test::Scheduler.
22:54 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b180c11200
22:56 geekosaur so, moar is building with debugging with:  rakudobrew build moar --configure-opts=--moar-option=--debug=3
22:56 geekosaur as expected :p
22:58 samcv where do things proposed for 6.d go?
22:59 jnthn Phew, advent post scheduled. :)
22:59 geekosaur and I have a successful build.
22:59 AlexDaniel huggable: 6d
22:59 huggable AlexDaniel, nothing found
22:59 AlexDaniel huggable: 6.d
22:59 user15 left #perl6
22:59 huggable AlexDaniel, Proposals for 6.d language: https://github.com/perl6/specs/blob/master/v6d.pod
22:59 AlexDaniel samcv: ↑
23:00 samcv ok cool. i looked and all the brackets i recently added are in bidi brackets for unicode. as in they're matched in that file
23:00 samcv haven't check every other one
23:00 samcv most likely they are
23:01 Tonik joined #perl6
23:02 * samcv would like very nice rules for which are allowed :P
23:02 samcv more elegant
23:03 samcv to just say, all the bidi-mirroring brackets, plus these quotation marks and their matching bidi mirroring glyphs.
23:04 samcv would be pretty nice
23:13 donaldh joined #perl6
23:20 pyrimidine joined #perl6
23:23 dalek doc: c653991 | donaldh++ | doc/Language/unicode_texas.pod6:
23:23 dalek doc: Use the correct hex codes for superscript 1,2,3
23:23 dalek doc:
23:23 dalek doc: Yes, they're not in the U+207x sequence.
23:23 dalek doc: review: https://github.com/perl6/doc/commit/c6539918ff
23:23 synopsebot6 Link: http://doc.perl6.org/language/unicode_texas
23:26 MasterDuke geekosaur++, TIL
23:26 RabidGravy jnthn, you don't fancy writing mine too? It's all quite obvious ;-)
23:36 SmokeMachine MasterDuke: building...
23:37 SmokeMachine MasterDuke: thanks!
23:37 MasterDuke np. btw, geekosaur showed you don't need all the quotes, just: rakudobrew build moar --configure-opts=--moar-option=--debug=3
23:39 pmaddams joined #perl6
23:40 pmaddams left #perl6
23:45 loveperl joined #perl6
23:45 loveperl What would a global variable look like?
23:47 geekosaur arguably perl 6 doesn't have such things. package variables come closest. (the GLOBAL namespace actually refers to a series of outer scopes, iirc)
23:47 geekosaur basically use "our" instead of "my", outside of a class/role
23:48 SmokeMachine but, is that segfault a bug?
23:49 RabidGravy a segfault is always a bug
23:49 geekosaur ^
23:50 geekosaur (well, there are exceptions, like certain misuses of NativeCall --- for example, it can't stop you from passing a null pointer to a function not expecting one, or a pointer to r/o memory to one expecting r/w)
23:50 SmokeMachine is there anything that I can do to try to help to solve that bug?
23:51 SmokeMachine is gc_mark from moar?
23:52 RabidGravy make the smallest standalone example possible that causes it and post it on rt
23:52 RabidGravy with the stack trace
23:52 SmokeMachine trying...
23:53 RabidGravy yeah it can be tricky
23:54 RabidGravy I made one yesterday and I can't reproduce without about five levels of threads and I'm still not sure if it isn't a libc bug
23:59 loveperl So there are no global variables?

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

Perl 6 | Reference Documentation | Rakudo