»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
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?
and of course, everyone is asleep to greet our new bot :( 00:02
shadowpaste "loveperl" at 217.168.150.38 pasted "error" (5 lines) at fpaste.scsys.co.uk/540236 00:03
00:03 labster joined
AlexDaniel loveperl: well, that's not enough I think 00:04
00:05 labster left
shadowpaste "loveperl" at 217.168.150.38 pasted "error" (8 lines) at fpaste.scsys.co.uk/540237 00:06
AlexDaniel moritz: more robots! Now for real
loveperl fpaste.scsys.co.uk/540237?tx=on&...rmat+it%21 00:07
it is code
AlexDaniel loveperl: first of all, it should be “has %!fields”
00:07 lichtkind left
loveperl ok 00:08
But I'm still having an error
00:09 pyrimidine left
AlexDaniel loveperl: I think you should be using BUILD instead of new 00:10
can somebody help? 00:11
no, he is right, he is using new… now what? should he use bless?
00:15 cdg left 00:16 statisfiable6 left, statisfiable6 joined
loveperl I'm desperate :( 00:16
00:18 grondilu left
AlexDaniel loveperl: try “self.bless(:$fields);” instead of “%!fields = %fields;” 00:19
oops
self.bless(:%fields);
00:21 grondilu joined, pyrimidine joined
loveperl What is the build method used for? 00:23
samcv what looks better, top or bottom imgur.com/a/QbZRt should [ ] in a character class highlight different from the < > part
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
there is also TWEAK which lets you use a default BUILD and make small adjustments to it
(it's more recent though and may still be evolving a bit)
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:25
00:26 pyrimidine left
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:
geekosaur if you write your own method new then you have to deal with constructing superclasses yourself
AlexDaniel m: say ‘ABCD’ ~~ /<[A B] + [C D]>+/
camelia rakudo-moar acece7: OUTPUT«「ABCD」␤»
samcv yeah that's what i was thinking AlexDaniel
geekosaur this is not recommended
AlexDaniel samcv: how does it highlight it?
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
samcv highlights like this atm cloud.githubusercontent.com/assets...1885c6.png
Xliff is late to the party.
geekosaur loveperl, have you read docs.perl6.org/language/classtut yet? 00:28
Xliff Attributes don't exist until BUILD is executed.
AlexDaniel samcv: actually, it's hard to tell what would be better
samcv well they're getting highlighted differently for now 00:29
00:29 rburkholder joined, BenGoldberg joined
Xliff so: method new(:$fields, :$options) { self.bless(:$fields) }; submethod BUILD(:$fields) { for $fields.kv -> $k,$v { %!fields{$k} = $v; }; 00:30
Er...
so: method new(:$fields, :$options) { self.bless(:$fields) }; submethod BUILD(:$fields) { for $fields.kv -> $k,$v { %!fields{$k} = $v; }; };
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
Best to use hashrefs to prevent confusion between hashes and named parameters.
00:32 _28_ria left
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 00:36 loveperl left 00:37 statisfiable6 left 00:38 pyrimidine joined 00:39 _28_ria left, _28_ria joined 00:43 pyrimidine left 00:55 Actualeyes joined 00:56 pyrimidine joined, aborazmeh joined, aborazmeh left, aborazmeh joined 00:58 dataf3l left 01:00 statisfiable6 joined, pyrimidine left 01:01 pyrimidine joined 01:17 pyrimidine left 01:18 canopus left 01:20 _28_ria left 01:21 _28_ria joined 01:23 pyrimidine joined 01:24 canopus joined 01:25 cpage_ joined 01:28 pyrimidine left
TimToady star: 42 »+« 43 01:29
camelia ( no output )
TimToady m: 42 »+« 43 01:30
camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤ Useless use of »+« in sink context␤ at <tmp>:1␤ ------> 0342 7⏏5»+« 43␤»
TimToady I guess I fixed that one by accident :)
m: 42 Z+ 43
camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤ Useless use of Z+ in sink context␤ at <tmp>:1␤ ------> 0342 7⏏5Z+ 43␤»
TimToady m: $_ Z= 43
camelia ( no output )
TimToady m: $_ Z== 43
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␤»
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;␤»
TimToady m: my $odds = 3, 5 …^ 15;
camelia rakudo-moar acece7: OUTPUT«Potential difficulties:␤ Useless use of …^ in sink context␤ at <tmp>:1␤ ------> 3my $odds = 3, 5 …^7⏏5 15;␤»
TimToady that's what I was originally aiming to fix...
01:41 _28_ria left 01:42 _28_ria joined 01:46 pyrimidine joined 01:50 labster joined 01:51 pyrimidine left
BenGoldberg m: my $odds = (3, 5 …^ 15); 01:53
camelia ( no output )
BenGoldberg m: my $odds = (3, 5 …^ 15); dd $odds
camelia rakudo-moar acece7: OUTPUT«Seq $odds = (3, 5, 7, 9, 11, 13).Seq␤»
BenGoldberg m: my $odds = 3, 5 ...^ 15; dd $odds
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␤»
BenGoldberg m: my @odds = 3, 5 ...^ 15; dd @odds 01:54
camelia rakudo-moar acece7: OUTPUT«Array @odds = [3, 5, 7, 9, 11, 13]␤»
TimToady yes, I added the uu because people get confused by item assignment vs list assignment precedence 02:00
02:01 sufrosti1o joined 02:04 pyrimidine joined 02:06 Lucas_One left 02:09 pyrimidine left 02:17 pyrimidine joined 02:19 _28_ria left 02:20 cognominal left, cognominal joined 02:21 _28_ria joined, pyrimidi_ joined 02:22 pyrimidine left
[Coke] luuke. 02:27
TEttinger thrawn. 02:32
MasterDuke i loved that series 02:34
TEttinger it's a good un 02:37
02:37 cowens joined
TEttinger kinda ridiculous but that's as star wars should be 02:37
cowens p6: (1/3).fmt(“%.16f”); 02:38
camelia ( no output )
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
cowens p6: (1/3).fmt(“%.16f”).say
camelia rakudo-moar 31e466: OUTPUT«0.3333333333333330␤»
cowens p6: (1/3).base(10, 16).say 02:39
camelia rakudo-moar 31e466: OUTPUT«0.3333333333333333␤»
cowens Why does the base funciton return arbitraily precise numbers, but fmt stops at .15
?
TEttinger m: (1/3).fmt(“%.16f”).say 02:40
camelia rakudo-moar 31e466: OUTPUT«0.3333333333333330␤»
TEttinger hm
m: (1/3).fmt(“%.20f”).say
camelia rakudo-moar 31e466: OUTPUT«0.33333333333333300000␤»
TEttinger m: (1/3).base(10, 20).say 02:41
camelia rakudo-moar 31e466: OUTPUT«0.33333333333333333333␤»
cowens p6: (0.370370367037037034/3).fmt("%.16f”).say 02:42
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␤------> 030.370370367037037034/3).fmt("%.16f”).say7⏏5<EOL>␤ expecting any of:␤ argument list␤ …»
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?
cowens (0.370370367037037034/3).fmt(“%.16f”).say
02:42 kcodrgkimd_ joined
TEttinger m: (0.370370367037037034/3).fmt(“%.16f”).say 02:43
camelia rakudo-moar 31e466: OUTPUT«0.1234567890123460␤»
cowens p6: (0.370370367037037034/3).fmt(“%.16f”).say
camelia rakudo-moar 31e466: OUTPUT«0.1234567890123460␤»
cowens p6: 0.370370367037037034/3
camelia rakudo-moar 31e466: OUTPUT«WARNINGS for <tmp>:␤Useless use of "/" in expression "0.370370367037037034/3" in sink context (line 1)␤»
cowens p6: (0.370370367037037034/3).say
camelia rakudo-moar 31e466: OUTPUT«0.123456789012345678␤»
cowens even normal division is has more accuracy than fmt 02:44
TEttinger defnitely not the same
MasterDuke bisectable6: (1/3).fmt(“%.16f”).say
bisectable6 MasterDuke, On both starting points (old=2015.12 new=334d134) the exit code is 0 and the output is identical as well
MasterDuke, Output on both points: 0.3333333333333330
cowens How are they not the same? Both have digits past .16, but it truncates and puts in a 0 02:45
It didn’t even round the last 6 to a 7
TEttinger oh uh I mean you are correct in that the accuracy is not the same
02:46 ilbot3 left
cowens Ah, yes 02:46
02:46 kcodrgkimd left 02:47 ilbot3 joined
cowens perl5 says this for .32 : 0.33333333333333331482961625624739 02:48
that is one more 3 before it goes wonky
But base seems arbitraily precise 02:50
p6: (1/3).base(10, 100).say
camelia rakudo-moar 31e466: OUTPUT«0.3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333␤»
02:50 dayangkun joined
TEttinger p6: (1/90).base(10, 100).say 02:51
camelia rakudo-moar 31e466: OUTPUT«0.0111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111␤»
TEttinger p6: (1/81).base(10, 100).say
camelia rakudo-moar 334d13: OUTPUT«0.0123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790123456790␤»
TEttinger I'm just curious here
that's an interesting number though
02:55 dayangkun left 02:57 kalkin- left, kalkin-_ joined
dalek ateverable: d2a03fc | (Aleks-Daniel Jakimenko-Aleksejev)++ | / (6 files):
IRC colors and factor out of run-smth

Now all bots should have colorful output in IRC while still having normal gists (everything is going to have eject symbol now).
Tests with control characters are disabled for now.
Refactoring of run-snippet is needed because we might want to do other stuff with the build (this will be used in satisfiable).
03:00
ateverable: 7f91954 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Unicodable.p6:
Unicodable: do not attempt to print control characters
ateverable: d4bb76f | (Aleks-Daniel Jakimenko-Aleksejev)++ | Statisfiable.p6:
Add statisfiable
03:01 unicodable6 left, statisfiable6 left, committable6 left, benchable6 left, bisectable6 left, evalable6 left, evalable6 joined, benchable6 joined, committable6 joined, ChanServ sets mode: +v committable6, statisfiable6 joined, bisectable6 joined, ChanServ sets mode: +v bisectable6, unicodable6 joined
AlexDaniel hmmm, how can I get the size of the whole directory? Is there a module for that? 03:06
ah, nevermind 03:07
03:07 noganex_ joined
AlexDaniel no, the question is still there :D 03:08
ugexe m: say Rakudo::Internals.DIR-RECURSE(".").map({ .IO.s }).sum # >:) 03:09
camelia rakudo-moar 334d13: OUTPUT«1382849147␤»
03:10 noganex left 03:12 bstamour joined
AlexDaniel ugexe: so you are not suggesting PathTools, right? :S 03:13
ugexe I promote torturing the implementors 03:23
03:24 bstamour left 03:28 statisfiable6 left 03:30 wamba joined 03:31 itcharlie_linux left 03:34 rburkholder left 03:35 cognominal left 03:36 cognominal joined, labster left, dataf3l joined
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:40 khw left 03:50 cognominal left 03:51 cdg joined 03:56 cognominal joined 04:05 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
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"?!
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?
yoleaux AlexDaniel: I'll pass your message to timotimo.
04:11 statisfiable6 joined
AlexDaniel statisfiable6: install 04:11
statisfiable6 AlexDaniel, OK! Working on it…
AlexDaniel, gist.github.com/4a23a6afe1d4615d66...aa120262bc 04:12
AlexDaniel statisfiable6: core
statisfiable6 AlexDaniel, OK! Working on it…
AlexDaniel, gist.github.com/722ea6307286eac412...7be0c8dac8 04:13
04:20 cognominal left, AlexDaniel left 04:26 cognominal joined 04:31 pyrimidi_ left 04:34 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg
samcv statisfiable6, help 04:39
statisfiable6 samcv, Available stats: core (CORE.setting size), install (size of the whole installation), …
04:39 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 04:47 dayangkun joined 05:00 pyrimidine joined 05:01 dayangkun left 05:04 mattp_ joined, grondilu_ joined 05:05 pyrimidine left 05:07 grondilu left 05:13 pyrimidine joined 05:14 aborazmeh left 05:17 aborazmeh joined, aborazmeh left, aborazmeh joined, xtreak joined 05:18 pyrimidine left
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␤»
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:26 skids left
kcodrgkimd_ Good morning everyone 05:38
05:43 Cabanossi left
BenGoldberg What if it's night? 05:44
05:44 aborazmeh left, BenGoldberg left 05:46 Cabanossi joined
kcodrgkimd_ Hmm, good evening in that case? 05:46
05:56 pyrimidine joined 06:00 rurban joined, rurban left 06:01 rurban joined 06:08 imcsk8 left, imcsk8 joined 06:14 Tonik joined 06:15 _28_ria left 06:16 _28_ria joined 06:17 dayangkun joined, dayangkun left 06:22 domidumont joined 06:24 _28_ria left
moritz it's always morning in UGT! 06:24
06:25 bjz joined 06:29 araujo left, pierre_ joined 06:36 domidumont left
samcv just looked up UGT. heh :) 06:42
06:44 kcodrgkimd_ left 06:45 darutoko joined 06:50 RabidGravy joined 06:51 domidumont joined 07:10 grondilu_ left
RabidGravy boom 07:20
07:23 labster joined
RabidGravy right off to the code mines 07:23
moritz finally made a command line to adjust laptop display brightness more fine-grained than the function keys do 07:32
07:39 Tonik left 07:41 wamba left 08:08 dataf3l left 08:10 geraud left, cpage_ left, cpage_ joined 08:27 cibs left 08:29 cibs joined 08:35 bjz left 08:41 cdg left 08:47 cibs left 08:48 g4 joined 08:49 cibs joined, wamba joined 08:50 effbiai left 09:01 bjz joined, xtreak left 09:05 cognominal left 09:07 thayne joined 09:10 abraxxa joined 09:11 cognominal joined 09:16 bjz left 09:18 Actualeyes left 09:22 Actualeyes joined 09:27 xtreak joined
samcv nice moritz 09:32
09:35 bjz joined 09:41 AlexDaniel joined 09:43 wamba left 09:46 sunnavy left 09:51 AlexDaniel left
masak finally created a script that opens conflicting files in vim, and then stages them after checking that the conflicts are gone 09:52
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
jnthn
.oO( You're welcome, I'm always happy to help with class struggles... )
09:54
09:54 rindolf joined
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:54
is this fine with people? 09:55
jnthn There's not a single mention of unibool in roast 09:56
samcv yeah
jnthn Did we even implement it? :)
samcv no
jnthn Ah
I'm not sure what value it brings
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
jnthn Well, boolean values presumably, but... :)
samcv but i don't think it needs to be in reast
but uniprop already returns bools
jnthn Right 09:57
Yeah, I don't see why unibool is needed
uniprop-[int|str|bool] don't occur in roast either
samcv yep
jnthn So we're not obligated to continue providing it 09:58
So question is more what it's useful for. :)
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:00
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:01
jnthn Got an example handy of what that's doing that? 10:03
samcv uhm. let me check
jnthn *of one
grr
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
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
samcv m: 0x202A.uniprop-int('Bidi_Class').say
camelia rakudo-moar 334d13: OUTPUT«16␤»
samcv ah here we go
jnthn m: 0x202A.uniprop-str('Bidi_Class').say 10:05
camelia rakudo-moar 334d13: OUTPUT«LRE␤»
jnthn m: 0x202A.uniprop-bool('Bidi_Class').say
camelia rakudo-moar 334d13: OUTPUT«True␤»
samcv most of the ones listed by unicode under the 'enum properties' section do not do that
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
(at least for unicode 9.0…) which makes it so it could change in the future, depending on which one you're talking about
'a'.uniprop-bool('Bidi_Class').say 10:07
m: 'a'.uniprop-bool('Bidi_Class').say
camelia rakudo-moar 334d13: OUTPUT«False␤»
jnthn Yeah, I'm wondering where the numbers come from :)
As in, the Unicode spec things I've found don't assign any such numerical values, just the string ones 10:08
So I wonder if we're leaking some internal representation there
samcv m: '('.uniprop-str('Bidi_Class').say
camelia rakudo-moar 334d13: OUTPUT«ON␤»
jnthn If bidi_class is behaving a bit oddly, however, here may be the reason for the discrepancy 10:10
github.com/MoarVM/MoarVM/blob/mast...d2c.pl#L56
Note how it's pulled in by derived_property whereas a bunch of others by enumerated_property
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 pyrimidine left
samcv m: 'a'.uniprop-int('General_Category').say 10:11
camelia rakudo-moar 334d13: OUTPUT«2␤»
samcv ah
jnthn m: say 'a'.uniprop-str('Hangul_Syllable_Type').say
camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤True␤»
jnthn m: 'a'.uniprop-str('Hangul_Syllable_Type').say 10:12
camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤»
jnthn m: 'a'.uniprop-int('Hangul_Syllable_Type').say
camelia rakudo-moar 334d13: OUTPUT«0␤»
jnthn m: 'ㄷ'.uniprop-str('Hangul_Syllable_Type').say
camelia rakudo-moar 334d13: OUTPUT«Not_Applicable␤»
jnthn aww
10:12 pyrimidine joined
jnthn m: '읔'.uniprop-str('Hangul_Syllable_Type').say 10:13
camelia rakudo-moar 334d13: OUTPUT«LVT␤»
jnthn m: '읔'.uniprop-int('Hangul_Syllable_Type').say
camelia rakudo-moar 334d13: OUTPUT«5␤»
jnthn No, seems more widepsread
samcv ㄷ does not actually have the hangul syllable type fyi 10:14
not sure if that was intentional
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
10:15 maxp_ joined
jnthn has nothing set up to let him conveniently type Hangul :P 10:16
I could once read it enough to know when something said "beer" but that was about ten years ago :)
maxp_ is there a way to do inplace editing like perl $^I?
10:18 Vasyl joined 10:20 rburkholder joined, araujo joined 10:21 effbiai joined, effbiai left, effbiai joined 10:22 pyrimidine left
moritz maxp_: not yet, I think 10:24
maxp_ ok thanks
10:25 maxp_ left, wamba joined, rindolf left 10:26 rburkholder left 10:30 effbiai left 10:34 rindolf joined 10:41 dj_goku joined 10:44 dj_goku_ left 10:52 pyrimidine joined 10:54 cpage_ left 10:56 cyphase left 10:58 TEttinger left, pyrimidine left 10:59 bjz left, bjz_ joined 11:00 cyphase_eviltwin joined 11:02 cognominal left 11:04 pierre_ left 11:05 cognominal joined, pierre_ joined 11:06 rurban left, cyphase_eviltwin left 11:08 pyrimidine joined 11:09 pierre_ left 11:11 sb2 joined
sb2 p6 say 10 11:11
p6: say 111;
camelia rakudo-moar 334d13: OUTPUT«111␤»
11:12 pyrimidine left, cyphase_eviltwin joined
sb2 any project which is well known is using perl6? 11:14
11:17 pyrimidine joined 11:21 pyrimidine left 11:23 sena_kun joined 11:24 lucasb joined
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:24
sb2 :-) 11:25
11:25 pierre_ joined 11:33 wamba left 11:39 labster left 11:49 sb2 left 11:53 wamba joined 11:57 xtreak left 12:03 pierre_ left 12:09 sunnavy joined
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?
timotimo: I'll pass your message to AlexDaniel.
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.
lucasb statisfiable6: help 12:13
statisfiable6 lucasb, Available stats: core (CORE.setting size), install (size of the whole installation), …
12:15 cpage_ joined 12:17 rurban joined 12:21 AlexDaniel joined
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:11Z <timotimo> AlexDaniel: could statisfiable generate a second plot that starts the y axis at 0?
timotimo yo
AlexDaniel that was quick, right? :)
timotimo thanks for your work \o/
AlexDaniel timotimo: why is it better to generate it starting on y=0?
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… :)
timotimo cool 12:24
it's just because the relative differences seem so big, but it's all in the 10% range (for core size)
AlexDaniel timotimo: 「/usr/bin/time -f %M perl6 -e ''」 ?
timotimo oh, i didn't even know about -f! 12:25
yes, that'll be the right thing
AlexDaniel how else did you measure it?
timotimo i copy-pasted all the output into a perl6 -e :)
moritz parsing the output of /usr/bin/time ?
AlexDaniel well, the thing is, 「time」 is ussually a bash builtin… 12:26
usually*
and I guess yours is a bit different? Mine does not seem to print maxresidentk
timotimo yeah, i use fish
i think it runs /usr/bin/time for me 12:27
AlexDaniel ahhh, ok, I see
how many runs should I do to get a decent average? :-/
12:28 pierre_ joined, wamba left, pierre_ left
timotimo a hundred! :P 12:28
12:28 bjz_ left, bjz joined
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)␤»
AlexDaniel m: say 100*5000*0.25 / 60 / 60
camelia rakudo-moar 124a0d: OUTPUT«34.722222␤»
AlexDaniel 34 hours 12:29
timotimo hehehe
if we go down to three, it'll still be 10 hours??
12:29 xtreak joined
AlexDaniel m: say 3*5000*0.25 / 60 / 60 12:29
camelia rakudo-moar 124a0d: OUTPUT«1.041667␤»
timotimo oh, 100 to 3, not 10 to 3
how many cores can the machine sacrifice for such a run?
also, we cache the results from earlier runs, right?
AlexDaniel yes 12:30
timotimo OK
AlexDaniel well, 4 is a nice number, although I tend to use 7 or 8 for stuff that is blocked by IO
actually, I'm not sure how accurate you want these results to be 12:31
given several thousands of commits, the graph will look nice even if we do it once per commit 12:32
12:34 xtreak left
timotimo the results tend to jump between n and n + 0.5MB on my machine 12:35
AlexDaniel I wonder if there's any way to measure it that is more consistent 12:36
timotimo well, the measurement is accurate
AlexDaniel it's just different each time…
timotimo it's just that at least one of the allocators tends to behave non-deterministically
12:37 statisfiable6 left
AlexDaniel let's see if I broke it 12:38
12:38 statisfiable6 joined
AlexDaniel statisfiable6: core0 12:38
statisfiable6 AlexDaniel, OK! Working on it…
AlexDaniel a huge chunk of this time is actually gisting it… :-/
I should consider hosting this stuff myself, I guess
statisfiable6 AlexDaniel, gist.github.com/d5b0f927533176b9d3...7a0207a647 12:39
AlexDaniel statisfiable6: install 0
statisfiable6 AlexDaniel, OK! Working on it…
AlexDaniel, gist.github.com/a441709f7c573f3bc8...be2293e2ce 12:40
12:40 pecastro left
AlexDaniel but withouth 0 in the query it should be able to make a normal graph 12:41
statisfiable6: core
statisfiable6 AlexDaniel, OK! Working on it…
12:41 pyrimidine joined
statisfiable6 AlexDaniel, gist.github.com/80ee723a5339b5c6cd...03d660dd91 12:42
AlexDaniel timotimo: ok?
timotimo um, okay 12:43
AlexDaniel … does not sound like your are satisfied
:)
timotimo well, i asked for a second graph :P 12:46
instead i got the ability to switch between what graph gets generated
it's fine
AlexDaniel the graph itself is >600KB… I think SVG::Plot should do a better job in this case… 12:48
dammit, something is leaking memory 12:50
this is no longer an issue with bisectable/committable/evalable, but it is a problem for unicodable/statisfiable
12:51 rindolf left
timotimo damn 13:02
13:02 rindolf joined
timotimo well, we'll totally eat up more memory as the internal cache-like things are filling up 13:03
it'll eventually slow down and come to a halt
well, only if it's one of the benign leaks
lucasb AlexDaniel: those commit hashes are cronologically sorted, right? 13:10
13:11 cyphase_eviltwin left 13:13 MasterDuke_ joined
timotimo that's the only way that makes sense :) 13:15
13:17 cyphase joined
lucasb yeah :) 13:17
13:19 Ven joined 13:20 canopus left, wamba joined 13:23 AlexDaniel left, Vasyl left 13:26 canopus joined, xtreak joined 13:31 xtreak left, maxp_ joined 13:32 cowens left, FROGGS joined
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
I've this error in this token: Repeated character (<) unexpectedly found in character class
FROGGS this is wrong: <[<Space> <Word>]>* 13:33
should most likely read: [<Space> <Word>]*
13:33 Vasyl joined, xtreak joined
maxp_ Ok. So I can't define a character class like this? 13:34
arnsholt Space and Word aren't character classes though 13:35
If they were \s and \w, I think it should be possible to do <+Space+Word> 13:36
Or at least <+alnum+sp>
maxp_ ok
yes it works!! 13:38
thank you.
13:38 canopus left
[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
13:41 Khisanth left
[Coke] s/compares to/is just a/ 13:41
13:41 cyphase left
[Coke] (from blog post) 13:42
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
13:43 cowens joined
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:43
[Coke]: but if I just use $dt.Date, I don't know if I lost some hours/minutes/seconds or not 13:44
13:44 maxp_ left
[Coke] whoops. yup, misread, thought you were ending up with a Date either way 13:44
[Coke] *sighs*
[Coke] tries some coffee before doing any coding for $dayjob
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:45
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
13:46 cyphase joined
cowens base gets them like this: my Int $int_part = self.Int; my $frac = abs(self - $int_part); 13:47
13:47 sufrosti1o left
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:48
13:50 Ven left, Ven joined 13:51 cowens left
lucasb isn't it because floats have a limited precision? 13:52
m: say 0.33333333333333333333e0
camelia rakudo-moar 124a0d: OUTPUT«0.333333333333333␤»
FROGGS yeah, it calls .Num on the Rat to pass it to nqp::unbox_n/nqp::split 13:54
13:54 Khisanth joined
FROGGS m: say (1/3).Num; 13:55
camelia rakudo-moar 124a0d: OUTPUT«0.333333333333333␤»
13:56 xtreak left 13:57 abraxxa left 13:58 wamba left 14:02 canopus joined, Matthew[m] left, wictory[m] left, tadzik left, ilmari[m] left, Matias[m] left, dp[m] left, mulk[m] left, M-Illandan left, CIAvash[m] left
timotimo goodbye, matrix 14:02
14:04 skids joined
lucasb what? 14:04
what are the limits of the Rational? since it uses Ints for both numerator and denominator, shouldn't it handle big numbers? 14:07
m: say (3/10000000000000000000).nude
camelia rakudo-moar 124a0d: OUTPUT«(3 10000000000000000000)␤»
lucasb m: say (3/100000000000000000000).nude
camelia rakudo-moar 124a0d: OUTPUT«No such method 'nude' for invocant of type 'Num'␤ in block <unit> at <tmp> line 1␤␤»
lucasb *limits of the Rat type
why, after some threshold, the division stops being Rat and starts being Num? 14:08
14:08 pierre_ joined, sena_kun left
moritz lucasb: to avoid pathologically slow cases 14:09
lucasb: consider newton's algorithms for calculating the square root of $x, which uses $y = ($y + $x / $y) / 2 as the iteration step
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 rurban left
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:10
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
by looking at src/core/Rat.pm, Rat and FatRat doesn't seen much different 14:12
but hey, this limitation is only about the '/' division op, I think. I can create Rats by hand...
m: say Rat.new(3,100000000000000000000000000000) 14:13
camelia rakudo-moar 124a0d: OUTPUT«0.00000000000000000000000000003␤»
timotimo right, all our ops check "is one of our operands a FatRat?"
that's where most of the magic happens
moritz lucasb: the overflow happens only for the numerator 14:17
m: say Rat.new(2**65, 3).^name
camelia rakudo-moar 124a0d: OUTPUT«Rat␤»
moritz m: say (2**65 / 3).^name
camelia rakudo-moar 124a0d: OUTPUT«Rat␤»
moritz m: say (3 / 2**65 ).^name
camelia rakudo-moar 124a0d: OUTPUT«Num␤» 14:18
timotimo but that's the denominator
moritz uhm, yes 14:19
moritz confused
and it's machine-sized integers, not always 32bit
masak the overflow happens only for the denominator, no? 14:21
moritz right 14:22
that's what timotimo++ pointed out
after I mixed up the two
14:23 wictory[m] joined
masak mnemonic: nu/de :P 14:23
(about the only thing good about that too-cute method name)
jnthn
.oO( The fact that it's not "numerator-and-denominator" is another good thing :P )
14:25
masak heh
14:25 Ven left
masak TimToady once thought out-loud about classes which are essentially tuples, and how one might imagine language support for those 14:26
Rat is not the only case where we want to say "give me the constituent parts" like that
timotimo you know how GLSL has "swizzles"?
masak in Complex, we similarly have .reals -- a shockingly bad choice of name 14:27
seems these "give me the parts" methods are hard to name
timotimo: no, I don't -- what are those?
timotimo method-like things you can put after vector-like things to do things to multiple parts at once 14:28
including spreading out one part into multiple, or re-ordering
think color.xyz = position.zxy
masak ooh
like jQuery's implicit iteration on steroids, sounds like 14:29
timotimo not sure
masak yeah, I could totally see that happening in Perl 6 module/slang space
timotimo in any case, there's a library called "glm" that implements "glsl-style math" for C++ (iirc)
timotimo AFK a bit
14:30 brrt left 14:34 tadzik joined, M-Illandan joined, Matthew[m] joined, ilmari[m] joined, dp[m] joined, mulk[m] joined, Matias[m] joined, CIAvash[m] joined 14:40 skids left 14:47 cyphase left 14:51 pyrimidine left, pyrimidine joined 14:52 thundergnat joined 14:54 rurban joined 14:56 cyphase joined 14:59 cyphase left, cyphase joined, cyphase left 15:00 cyphase joined, cyphase left, cyphase joined
SmokeMachine is this expected? 15:02
m: UInt.isa(Int)
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␤␤»
SmokeMachine m: IntStr.isa(Int) 15:03
camelia ( no output )
SmokeMachine m: say IntStr.isa(Int)
camelia rakudo-moar 124a0d: OUTPUT«True␤»
SmokeMachine I know that UInt is a subset...
but shouldn't that work? 15:04
15:05 andrzeju_ left, cowens joined
moritz m: say UInt ~~ Int 15:05
camelia rakudo-moar 124a0d: OUTPUT«True␤»
moritz that works. Isn't that enough?
15:05 andrzeju_ joined
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
cowens p6: (2/3).fmt("%.32f”).say
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␤…»
cowens p6: (2/3).fmt(“%.32f”).say
camelia rakudo-moar 124a0d: OUTPUT«0.66666666666666700000000000000000␤»
SmokeMachine m: UInt ~~ Int && Int ~~ UInt 15:07
camelia ( no output )
SmokeMachine m: say UInt ~~ Int && Int ~~ UInt
camelia rakudo-moar 124a0d: OUTPUT«True␤»
cowens compare that with perl 5: perl -e 'printf "%.32f\n", 2/3' => 0.66666666666666662965923251249478
SmokeMachine moritz: no... ^^
15:07 holli joined 15:08 dp[m] left, nowan_ left, rurban left
SmokeMachine moritz: I want True when X is a subset/subtype of Y but false if Y is a subset/subtype of X 15:08
15:08 tadzik left 15:09 mst left, dp[m] joined, jsimonet joined
moritz SmokeMachine: IMHO Int ~~ Uint being True is the real bug 15:09
15:09 nowan joined
holli v5 or Inline::Perl5? 15:09
moritz holli: Inline::Perl5 15:10
SmokeMachine moritz: probably...
15:10 mst__ joined
holli i see the overly excited scotsman is still alive ;-D 15:10
tx, moritz 15:11
15:11 tadzik joined 15:13 AlexDaniel joined
AlexDaniel lucasb: “those commit hashes are cronologically sorted, right?” – kinda 15:14
lucasb: that's the reverse of what git log will give you
thundergnat Is there a large performance penalty for making CORE only methods multi? In my somewhat feeble testing I'm not seeing much difference.
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
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…»
cowens m: .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”); 15:17
camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤»
cowens .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”).say;
m: .12345678901234567.Num.base(10, 32).say; 12345678901234567.Num.fmt(“%.32f”).say; 15:18
camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤12345678901234600.00000000000000000000000000000000␤»
cowens sigh
thundergnat m: use MONKEY; augment class Str { multi method parse-base (Int $radix where -37 < * < -1) {} } # :(
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␤»
cowens m: .12345678901234567.Num.base(10, 32).say; .12345678901234567.Num.fmt(“%.32f”).say 15:19
camelia rakudo-moar 124a0d: OUTPUT«0.12345678901234566904321354741114␤0.12345678901234600000000000000000␤»
thundergnat See rosettacode.org/wiki/Negative_base_...ers#Perl_6 for a use case.
cowens It isn’t that the value is a float, it is something else throwing away precision
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
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
The whole point of fmt, as far Ias I understand it, is to control how the value stringifies
timotimo the thing with nqp:: ops is that many of them are implemented down in the VM 15:22
you have to look at the mapping in QASTOperationsMAST (and the JVM equivalent) to see what's what
fmt, however, has some stuff like the backend registering formatting functions
15:23 cdg joined 15:27 cdg left, cdg joined 15:29 Ven joined, perlpilot joined 15:30 araujo left 15:31 araujo joined
dalek osystem: 8d4805e | RabidGravy++ | META.list:
Add Tinky::JSON

  github.com/jonathanstowe/Tinky-JSON
With special thanks to the YNAP Evil Santa Festive Jumper Hackday
15:38
15:46 wamba joined 15:54 Ven left 15:55 pmurias joined
pmurias timotimo, cowens: we have docs for some of the nqp docs, and tests for most 15:56
15:57 AlexDaniel left
timotimo right, thanks to you there's lots of tests 15:57
15:57 g4 left, domidumont left
dalek osystem: faddde9 | (Alexey Melezhik)++ | META.list:
Add Sparrowdo::Chef::Client to ecosystem

Run chef client on remote host using Sparrowdo.
16:07
osystem: 96be8ec | (Zoffix Znet)++ | META.list:
Merge pull request #274 from melezhik/master

Add Sparrowdo::Chef::Client to ecosystem
kaare_ Hi Hello 16:09
16:12 user9 left
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
I imagine they are sth like LinearArray from NativeHelpers::Blob?
perlpilot kaare_: you want the definition of a "native shaped array"? 16:15
kaare_ perlpilot: Is that a stupid question? 16:18
lucasb my int @a[3; 3] # <-- NSA 16:19
kaare_ OK, does it also wotk with CStructs? 16:20
timotimo unfortunately not 16:27
perlpilot kaare_: no, it's not a stupid question, I was just trying to make sure I understood what you wanted. 16:28
16:30 pierre_ left 16:32 pierre_ joined
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␤»
SmokeMachine m: my @a = <1 2 3>, <a b c>; say [X] @a
camelia rakudo-moar 124a0d: OUTPUT«((1 a) (1 b) (1 c) (2 a) (2 b) (2 c) (3 a) (3 b) (3 c))␤»
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))␤»
SmokeMachine why?
does that make sense? 16:36
m: my @a = $(<1 2 3>); say [X] @a # I would expect ((1) (2) (3))
camelia rakudo-moar 124a0d: OUTPUT«((1 2 3))␤»
16:36 pierre_ left
lucasb m: my @a = <1 2 3>; say [X] |@a 16:37
camelia rakudo-moar 124a0d: OUTPUT«((1 2 3))␤»
perlpilot m: my @a = <1 2 3>; say [X] @a, (); # curious 16:38
camelia rakudo-moar 124a0d: OUTPUT«()␤»
perlpilot huh. Not at all what I expected
SmokeMachine m: my @a = $(<1 2 3>); say [\X] @a 16:39
camelia rakudo-moar 124a0d: OUTPUT«((((1 2 3))))␤»
16:40 Guest71260 left
perlpilot m: my @a = <1 2 3>; say [\X] @a 16:41
camelia rakudo-moar 124a0d: OUTPUT«(((1)) ((1 2)) ((1 2 3)))␤»
holli Inline::Perl5 doesnt compile for me :-( i'll be off for a a while. if someone could take a look at this ( hastebin.com/raw/okijonalep ) i'd be grateful
[Coke] /usr/bin/ld: cannot find -lperl 16:45
Did you compile your perl 5 with the required options?
16:49 khw joined, giraffe joined 16:50 giraffe is now known as Guest17281 16:51 cdg left 16:52 cdg joined
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:53
moritz it's here! 16:54
16:54 domidumont joined
kaare_ timotimo: Is the intention that it will be, at some time 16:54
dalek c/coke/bughunt: d17f5cf | coke++ | README.md:
what's this branch for?
c/coke/bughunt: cb2249e | coke++ | htmlify.p6:
wip
kaare_ moritz: Yeah, but it's evolving all the time :-)
16:55 lucasb left 16:56 domidumont left
SmokeMachine so, is that a bug? 16:56
16:57 domidumont joined 16:58 dataf3l joined
timotimo holli: you're missing a perl5 development package of some description 17:00
17:00 domidumont left
timotimo i.e. in order to build that p6helper thing there needs to be a perl.a or perl.la or something 17:00
17:01 domidumont joined
kaare_ I have a DBIish question. Is that OK here? 17:02
pmurias kaare_: yes
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
i gotta go now, though
kaare_ github.com/perl6/DBIish/blob/maste...ve.pm6#L40 returns nice objects depending on the native PostgreSQL type. 17:04
How will I go about changing or adding these types? 17:05
17:05 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'wip' 17:05
travis-ci.org/perl6/doc/builds/184588183 github.com/perl6/doc/compare/d17f5...2249e1cad0
17:05 travis-ci left
kaare_ Subclassing DBIish seems like the big hammer. Any better way? 17:05
moritz kaare_: if they are core Perl 6 types and core Postgres types, a pull request to DBIish 17:06
if not, we must ask ourselves if these kinds of type translations are in scope for DBIish 17:07
as the old maintainer, my answer would have been a firm "no, that belong into an ORM or similar"
dalek c/coke/bughunt: 88c106a | coke++ | htmlify.p6:
wip
17:08
c/coke/bughunt: 35d092a | coke++ | htmlify.p6:
remove nqp op call
kaare_ moritz: Would the ORM subclass DBIish or package the coulmns in another level of type system, or sth else? 17:09
I'm just speculating, but it goes in two directions; Adding some functionality to the types of the basic classes, and 17:11
PostgreSQL supports adding types of your own.
For example, all PostgreSQL enums are classes by themselves 17:12
17:12 cdg left, cdg joined
dalek c/coke/bughunt: 771fff9 | coke++ | htmlify.p6:
always precompile

brings back the weird unlock errors.
17:12
[Coke] gist.github.com/coke/fed45e511ae2a...2a36dcfb12 shows a bunch of different failure modes for that code. 17:17
17:25 cdg_ joined 17:27 cdg left 17:28 Actualeyes1 joined 17:29 Actualeyes left 17:31 setty1 left 17:33 pierre_ joined, setty1 joined 17:36 dataf3l left 17:38 lucasb joined
lucasb [Coke]: I can reproduce the segfault and random errors 17:39
[Coke]: not random, just one up until now, the "unlock when we're not locked"
but it takes too long to die/segfault 17:40
17:40 pierre_ left 17:42 sufrostico left 17:43 canopus left 17:50 dataf3l joined 17:53 sufrostico joined
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␤␤»
SmokeMachine what's wrong? 18:09
18:09 lukaramu joined
geekosaur mostly that the docs are wrong /o\ 18:11
(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:12
18:15 canopus joined 18:19 zakharyas joined 18:21 sufrostico left 18:23 toolforger joined
lucasb when I do 'for $x { .say }', does 'for' calls any special method on $x that 'say $x' doesn't call? 18:23
m:
m: sub f { 10 }; &f.wrap({ 20 }); say f
camelia rakudo-moar 124a0d: OUTPUT«10␤»
lucasb m: sub f { 10 }; &f.wrap({ 20 }); .say for f
camelia rakudo-moar 124a0d: OUTPUT«20␤»
18:25 sufrostico joined
toolforger is working on a better (hah!) understanding of NQPHLL.nqp 18:25
gfldex m: sub s {}; say so &s ~~ Callable;
camelia rakudo-moar 124a0d: OUTPUT«True␤»
toolforger Question of the day: What's %*COMPILING<%?OPTIONS><target> ?
I have a vague idea, but I'm not sure and I do not understand all of the sigils 18:26
lucasb oh, here:
m: sub f { 10 }; &f.wrap({ 20 }); say f, &f()
camelia rakudo-moar 124a0d: OUTPUT«1020␤»
ugexe target is which vm it precompiles for
toolforger I think target is the data that was parsed for the grammar rule "target" 18:27
Is that the correct interpretation?
ugexe no, its the target for COMPILING 18:28
one of the COMPILING OPTIONS
i.e. target is which vm it precompiles for
toolforger Umm... sort of, it compares against 'jar', for example 18:29
which is actually the only value it is comparing against... weird
ugexe ...no 18:30
perl6 --target=mbc --output=Foo.pm6.moarvm lib/Foo.pm6
toolforger Strange 18:31
jo@jodel:~/Projekte/nqp$ grep -r OPTIONS *|grep target 18:33
gen/jvm/stage2/QAST.nqp: if %*COMPILING<%?OPTIONS><target> eq 'jar' {
gen/jvm/stage1/QAST.nqp: if %*COMPILING<%?OPTIONS><target> eq 'jar' {
src/vm/jvm/QAST/Compiler.nqp: if %*COMPILING<%?OPTIONS><target> eq 'jar' {
ugexe github.com/rakudo/rakudo/blob/ae1f...unning.pod read the docs, it shows the supported values
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
geekosaur lukasb, it's say that calls an extra method (.gist) 18:35
SmokeMachine geekosaur: thanks!
gfldex geekosaur: not really: see github.com/perl6/doc/blob/master/d...e.pod6#L60 18:36
toolforger ugexe: That's exactly what I'd like to find out
First thing I didn't understand is what %* and %? mean :-( 18:37
geekosaur docs.perl6.org/language/variables#Twigils
in general * twigil is for a dynamic (as opposed to lexical) variable, and ? is for a compile-time variable 18:38
toolforger So %* is a hash that's supposed to have come into scope through a closure environment, right? 18:39
lucasb geekosaur: did you see my example 'say f, &f()' ? 18:40
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
camelia rakudo-moar 124a0d: OUTPUT«(Int)␤(Sub+{Wrapped})␤»
geekosaur toolforger, I think what is happening there is that the sub f is optimized at compile time into a constant 18:43
but by doing &f() you are bypassing that
toolforger That's lucasb's issue ;-) 18:44
lucasb I don't have any issues with that :) 18:45
just looks strange that f() != &f() 18:46
geekosaur whoops, sorry
toolforger NP
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...
camelia rakudo-moar 124a0d: OUTPUT«(Sub+{Wrapped})␤(Int)␤»
dalek c: 761ed85 | gfldex++ | doc/Language/functions.pod6:
index use soft
synopsebot6 Link: doc.perl6.org/language/functions
18:47 cdg joined
toolforger Aww... I can't google for OPTIONS on docs.perl6.org 18:48
holli Coke: I'm using the system perl
toolforger How/where do I find the docs for $?OPTIONS ?
ugexe github.com/rakudo/rakudo/blob/419f...er.nqp#L26 # options is set here
geekosaur I think it's not documented as such, because it's internal to Rakudo 18:49
as opposed to being part of the perl6 specification
ugexe nqp --help shows a list of options
thats all it is
toolforger Oh 18:50
I interpreted "defined by the compiler" as "predefined by the language"
for the $? twigil, I mean 18:51
18:51 cdg_ left
ugexe m: say $?FILE; # this is predefined by the language 18:51
camelia rakudo-moar 124a0d: OUTPUT«<tmp>␤»
holli Coke: I rtfm'ed and installed libperl-dev. works now. tx 18:52
toolforger Yeah, that's why I was thinking that %?OPTIONS might be predefined 18:53
[Coke] holli++
ugexe its not %?OPTIONS, its q|%?OPTIONS| as a hash key
holli it fails 1 / 420 tests though 18:54
lucasb 420!
toolforger ugexe: Oh. Noted.
toolforger is wondering why anybody would use such a hash key though 18:55
18:58 perlpilot left
lucasb m: 'oh' andthen .&{ say $^oh ~ 'hai' } 18:58
camelia rakudo-moar 124a0d: OUTPUT«ohhai␤»
ugexe because its unlikely to clash with any future additions and follows the spirit of the naming convention
18:58 cognominal left 18:59 cdg left
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
(in a good way)
dalek ecs: 37f0ed6 | samcv++ | S15-unicode.pod:
Update S15 so as not to include references to a uniprops hash.

It had been changed in some places but not others.
19:00
ecs: 556410a | samcv++ | S15-unicode.pod:
Make it a little clearer we return Bool for boolean values.
19:02 lucasb left
dalek c: 5c5da14 | gfldex++ | doc/Language/pragmas.pod6:
link to inlining
19:11
c: dfcc997 | gfldex++ | doc/Language/pragmas.pod6:
remove domain and schema
synopsebot6 Link: doc.perl6.org/language/pragmas
synopsebot6 Link: doc.perl6.org/language/pragmas
RabidGravy toolforger, I always do things without a good reason, but then again I might not be a Perl guy 19:12
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:15
19:26 wamba left 19:28 jjido joined 19:29 wamba joined
RabidGravy TIMTOWTDI is just an expression of how reality is, if you try to suppress that then you are being anti-realistic ;-) 19:29
19:29 skids joined 19:30 darutoko left 19:32 loveperl joined 19:34 pyrimidine left, pyrimidine joined 19:36 labster joined 19:39 pyrimidine left, dataf3l left
samcv b-but we should force everybody to have identical indenting and syntax error otherwise! 19:40
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
one was that i needed to install something
because i had an extra space in the indentation
"ncaught Error: jasmine.Suite() required 19:42
"
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
toolforger I just think that one should err on the frugal than the liberal side
but that's just my personal preference, so meh :-) 19:43
samcv hah
frugal vs liberal? not sure what that means in this context? which is which?
toolforger and it's language design preference, so double meh :-)
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"
samcv ah ok
toolforger agrees that awesome messages are more important than syntactic frugality
[Coke] big shout out to samcv++ for improving our editor tooling.
samcv thank you! 19:45
:)
toolforger E.g. C++ became usable after clang started giving useful error messages
I think...
I may be wrong :-D
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
(if you're working on the same grammar section)
loveperl How to send parameters to a class?
samcv loveperl, methods 19:47
myclass.method('whatever')
method whatever ( $something ) { }
inside the class
loveperl But to the builder?
samcv oh you mean on creation loveperl ?
ok
myclass.new(first => 'value', second => 'value' 19:48
)
loveperl And how do I put them in private variables?
SmokeMachine could someone help me? I think its a bug... but Im not sure, and I don't know where... 19:50
when I use this module that Im writing: github.com/FCO/Test-Fuzz/tree/role 19:51
19:51 andrzejku joined
SmokeMachine on the branch: role 19:51
and run this code:
$ perl6 -Ilib -MTest::Fuzz -e '
sub bla(Int $a) is fuzzed {42}
run-tests;
'
some times it works like a charm... 19:52
samcv loveperl, ok. has $!vaiable;
SmokeMachine but most of time I get a "Segmentation fault: 11"
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.
samcv private variables are $!whatever, and public are $.variable
loveperl, actually $.variables are private variables but have a self generated accesor generated
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
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
SmokeMachine gist.github.com/FCO/ae15254717a84c...2d3127bd68
samcv loveperl, to retain state you mean? 19:55
SmokeMachine RabidGravy: How do I get it? perl-m-debug?
RabidGravy: sorry: perl6-debug-m?
samcv loveperl, you should save state in private variables. though there are 'state' declarations but that is not the best idea for objects
not sure if perl 5 has that or not… i know perl 6 better than perl 5 by now 19:56
RabidGravy SmokeMachine, possibly, I was thinking perl6-gdb-m as that will give you the stack trace 19:57
SmokeMachine gist.github.com/FCO/35919b49e338c5...7e8f572e06
RabidGravy but it shouldn't ever segfault
SmokeMachine installing gdb... 19:58
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
cowens or is the right answer to not trust fmt and sprintf and use base instead?
loveperl No I do not understand
:(
20:00 pyrimidine joined
SmokeMachine is this useful? gist.github.com/FCO/2b269ad4ba1e2b...137f32a88a 20:00
RabidGravy cowens, the right answer is if you feel that there should be a new directive your patch would be appreciated ;-)
SmokeMachine MasterDuke_: I installed with rakudobrew...
samcv when is rakudo being released how do i check
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
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 perl6.fail/release/stats for details
SmokeMachine Im getting my daughters at school... brb
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:02 canopus left
samcv ok cool. made a PR to add a few missing changelogs 20:04
20:04 pyrimidine left
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:05
20:05 zakharyas left
loveperl How do I send information to private attributes of a class? 20:06
20:07 pierre_ joined
samcv do you want to send private information or SET them directly 20:07
myclass.attribute = 'whatever'; # you can do this if you want
has $.attribute is rw;
in the class
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
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
so
samcv well RabidGravy
you don't
loveperl As?
holli i am trying to do the WxWidgets Perl5 example in Perl6 so i translated that hastebin.com/evizafuwih.pl to thathastebin.com/omeguzixot.py, however the perl6 version complains about OnInit being called
samcv has $.attribute is rw;
and you can set them directly from outside
RabidGravy tnat's not a "private" attribute 20:10
holli it looks like it should work ^^
samcv i know
but public attributes ARE private attributes
but have autogenerated accessor methods ;)
heh
RabidGravy right
here. just pop round to someones grandmothers with these boiled eggs 20:11
holli so if someone would have a look at what might be wrong 20:12
i have cookies :-D
toolforger The cookie jar in my browser is full ;-) 20:13
holli s/cookie/pizza/
toolforger tbh I'd help if I knew anything about WxWidgets, or Perl5
loveperl Default constructor for 'Programmer' only takes named arguments in block <unit> at callprueba.pl line 2
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
loveperl error
20:13 loveperl left 20:14 TEttinger joined 20:15 pierrot joined, loveperl joined
holli I used to have a perlmonks account 20:16
loveperl Default constructor for 'Programmer' only takes named arguments
ugexe are you passing the constructor to Programmer any unnamed arguments? 20:17
MasterDuke_ m: class A { has $a }; my $b = A.new(2)
camelia rakudo-moar 124a0d: OUTPUT«Default constructor for 'A' only takes named arguments␤ in block <unit> at <tmp> line 1␤␤»
MasterDuke_ m: class A { has $a }; my $b = A.new(:2a) 20:18
camelia ( no output )
MasterDuke_ loveperl: ^^^
ugexe :2a probably isn't the best way to show a new person a named argument
20:18 girafe joined
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␤␤»
MasterDuke_ m: class A { has $.a }; my $b = A.new(a => 2); say $b.a
camelia rakudo-moar 124a0d: OUTPUT«2␤»
loveperl the variable is $!a 20:20
SmokeMachine MasterDuke_: thanks
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␤␤»
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 jjido left
ugexe loveperl: you should read this docs.perl6.org/language/objects 20:25
loveperl Thanks, what happens is that I do not understand English very well 20:29
MasterDuke_ loveperl: if you haven't seen it already, perl6intro.com/ is available in a bunch of languages 20:31
pmurias do a lot of unicode codepoints turn into 2 when titlecased?
toolforger In the end, one needs to learn English, but you will find it easier over time 20:32
pmurias: What do you mean with "turn into 2"?
pmurias ß => Ss 20:34
toolforger Ah, into two glyphs
pmurias I'm implementing nqp::tc on the JVM
samcv nice pmurias :) 20:35
toolforger My understanding of titlecase has beent hat it's usually just a variant of uppercasing
pmurias there is a Character.toTitleCase, but it doesn't work for ß
toolforger ß => Ss is a big exception
There should be a Unicode table that handles this though
samcv m: 'ß'.tc.say
camelia rakudo-moar 2a09e9: OUTPUT«Ss␤»
samcv m: 'ß'.fc.say
camelia rakudo-moar 2a09e9: OUTPUT«ss␤»
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
Unicode should specify that
samcv or do you mean like, would be an exception for humans ;P
toolforger I can try and look up the exact rules, but it would take a bit of time
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
has uppercase titlecase and casefolding mapping
u: ß
unicodable6 samcv, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
20:37 pyrimidine joined
samcv 00DF; F; 0073 0073; # LATIN SMALL LETTER SHARP S 20:38
err that's the case folding file. there's a bunch lemme look it it
toolforger Yeah, that's the right table
I also see "0130; F; 0069 0307; # LATIN CAPITAL LETTER I WITH DOT ABOVE" 20:39
This might be decomposition though 20:40
20:40 pierrot left
samcv toolforger, ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt this is actually the file 20:40
20:40 MasterDuke_ left
samcv the one linked before is only for case folding 20:40
speaking of which. i need to add tests for roast for Simple case folding as well, and look into that
20:40 cowens left
toolforger Ah, right. I was wondering but concluded it's the right one because ß seemed to get mapped correctly 20:41
that's what one gets for looking at files instead of checking the actual rules 20:42
pmurias is that ftp link correct?
toolforger It gives a rules file
well, table actually
samcv yes that link is correct pmurias 20:43
pmurias chrome and wget refuse to fetch it for me :(
20:43 vendethiel joined
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
20:43 AlexDaniel joined
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␤»
vendethiel m: sub infix:<,>($a, $b) { say "$a $b"; }; 1,2
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␤»
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
vendethiel catching operators by name does that in a lexically scoped lang I guess
samcv m: 0x3A3.lc.say; 0x3A3.uc.say; 20:46
camelia rakudo-moar 2a09e9: OUTPUT«931␤931␤»
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)
samcv m: 0x3A3.chr.lc.say; 0x3A3.chr.uc.say;
camelia rakudo-moar 2a09e9: OUTPUT«σ␤Σ␤»
AlexDaniel u: { chr.tc ne chr.uc } 20:48
unicodable6 AlexDaniel, gist.github.com/6e02c1a5d6d03b5e9b...74a52c604b
AlexDaniel u: { .chr.tc ne .chr.uc }
unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
AlexDaniel, U+01C4 LATIN CAPITAL LETTER DZ WITH CARON [Lu] (DŽ)
AlexDaniel, U+01C5 LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON [Lt] (Dž)
AlexDaniel, gist.github.com/ca6533625db5372250...87820619f8
AlexDaniel m: say ‘st’.uc; say ‘st’.tc 20:49
camelia rakudo-moar 2a09e9: OUTPUT«ST␤St␤»
AlexDaniel m: say ‘st’.uc; say ‘st’.tc; say ‘st’.lc
camelia rakudo-moar 2a09e9: OUTPUT«ST␤St␤st␤»
samcv m: "Test\x[3A3]".tc.say
camelia rakudo-moar 2a09e9: OUTPUT«TestΣ␤»
samcv ok that is wrong 20:50
oh wait
AlexDaniel looks fine
samcv no i think that's rigth
AlexDaniel u: { .chr.uc.chars > 1 }
unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
AlexDaniel, U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE [Ll] (ʼn)
AlexDaniel, U+0587 ARMENIAN SMALL LIGATURE ECH YIWN [Ll] (և)
AlexDaniel, gist.github.com/a543cd3ffbc9348cdc...0e4b5642b1
AlexDaniel u: { .chr.uc.chars > 2 }
unicodable6 AlexDaniel, U+FB03 LATIN SMALL LIGATURE FFI [Ll] (ffi) 20:51
AlexDaniel, U+FB04 LATIN SMALL LIGATURE FFL [Ll] (ffl)
samcv m: "Test\x[3A3]".lc.say
camelia rakudo-moar 2a09e9: OUTPUT«testς␤»
AlexDaniel m: ‘ffi’.uc.say
camelia rakudo-moar 2a09e9: OUTPUT«FFI␤»
AlexDaniel come on…
a character that turns into three characters when uppercased
u: { .chr.lc.chars > 2 }
unicodable6 AlexDaniel, Found nothing!
AlexDaniel u: { .chr.lc.chars > 1 }
unicodable6 AlexDaniel, Found nothing!
AlexDaniel and nothing like that for lowecase /o\ 20:52
samcv try fc
AlexDaniel u: { .chr.fc.chars > 1 }
unicodable6 AlexDaniel, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß)
AlexDaniel, U+0587 ARMENIAN SMALL LIGATURE ECH YIWN [Ll] (և)
AlexDaniel, U+0149 LATIN SMALL LETTER N PRECEDED BY APOSTROPHE [Ll] (ʼn)
AlexDaniel, gist.github.com/5c788d1a05ca0071fe...28dee87609
geekosaur doesn't think ligatures belong in unicode tbh
samcv why not?
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
AlexDaniel m: 0x1E9A.chr.uc.say
camelia rakudo-moar 2a09e9: OUTPUT«Aʾ␤»
AlexDaniel u: Aʾ
unicodable6 AlexDaniel, U+0041 LATIN CAPITAL LETTER A [Lu] (A)
AlexDaniel, U+02BE MODIFIER LETTER RIGHT HALF RING [Lm] (ʾ)
AlexDaniel great, a letter with a modifier letter
geekosaur and/or from legacy character sets, which also gets us the normalization insanity 20:54
20:54 kaare_ left
RabidGravy geekosaur, yeah there are a number of things like that, strike through too 20:54
AlexDaniel u: strike
unicodable6 AlexDaniel, U+1D7A LATIN SMALL LETTER TH WITH STRIKETHROUGH [Ll] (ᵺ)
AlexDaniel, U+1D90B SIGNWRITING STRIKE SINGLE [So] (𝤋)
AlexDaniel, U+1D90C SIGNWRITING STRIKE MULTIPLE [So] (𝤌)
AlexDaniel, U+1D90D SIGNWRITING STRIKE BETWEEN [So] (𝤍)
20:54 kaare_ joined, kaare_ left
toolforger Most multiple-character transformations are using modifiers I think 20:55
20:55 kaare_ joined
toolforger Where the lowercase character is a precomposed character and no precomposed uc equivalent exists 20:55
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
samcv yeah
toolforger Normalization isn't a big think, you need to do that anyway
samcv well jvm may to that too pmurias
unless you ask for simple case mappings
toolforger JVM is somewhat incomplete in its UC support
Expect differences between MOAR and JVM if you use the JDK unicode support
pmurias samcv: it seems to only have simple case mappings support as you can only ask for a codepoint->codepoint transformation 20:57
samcv oh 20:58
pmurias (for titlecase)
[Coke] sift4++
AlexDaniel [Coke]: ? 20:59
toolforger You could use ICU4J, but then ICU might be ahead of what Moar does
AlexDaniel [Coke]: is it significantly faster or what? 21:01
samcv i doubt it
moarvm ones are handled as data structures in moar
[Coke] AlexDaniel: I don't have a direct comparison to what I was doing before, but it seems so, yes. 21:04
Have a new update to the docs branch that should be much faster, I hope.
samcv nice coke :)
AlexDaniel \o/
[Coke] (and actually ADD fuzzy searching to current searching, instead of replacing what we had entirely)
AlexDaniel \o/
what about limiting the number of results?
[Coke] one thing at a time. :) 21:05
samcv [Coke], make sure it doesn't fuzzy search for words 3 or less
(characters long)
[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.
samcv: it's currently set at 3 minimum, I think. 21:06
samcv but tbh i think we should have a separate search page. because i *liked* having not a huge number of results 21:07
i liked being able to search for topics and find them really really quickly
imo we should leave the autocomplete search as it is, and have an actual search page you can search fuzzily
dalek c/coke/levenshtein: 658a785 | coke++ | / (3 files):
Switch to sift4

Try to avoid some degenerate cases, don't use fuzzy search on small search terms, don't search too deep on fuzzy checks.
21:13
21:13 andrzejku left
dalek c/coke/levenshtein: b75e4a6 | coke++ | template/search_template.js:
re-enable fuzzy search
21:14
c/coke/levenshtein: 5819694 | coke++ | / (3 files):
Switch to sift4

Try to avoid some degenerate cases, don't use fuzzy search on small search terms, don't search too deep on fuzzy checks.
samcv ok we do this correctly
holli rakudo: my %a = "foo" => "bar"; my %b = "foo" => "bar"; say %a ~~ %b ?? "of course" !! "WTF"; 21:15
camelia rakudo-moar 2a09e9: OUTPUT«WTF␤»
samcv m: 'Σ'.lc.say; 'tΣ'.lc.say
camelia rakudo-moar 2a09e9: OUTPUT«σ␤tς␤»
dalek c/coke/levenshtein: b8bd868 | coke++ | / (3 files):
Switch to sift4 for fuzzy searching

Try to avoid some degenerate cases, don't use fuzzy search on small search terms, don't search too deep on fuzzy checks.
samcv one sigma only it at the start of words the other in the middle or end of words
samcv m: 'Σ'.lc.say; 'tΣe'.lc.say
camelia rakudo-moar 2a09e9: OUTPUT«σ␤tσe␤»
samcv ok that one is wrong tho
err wait
[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
toolforger m: 'xΣ'.lc.say
camelia rakudo-moar 2a09e9: OUTPUT«xς␤»
samcv wonder if we test that in roast… me checks
toolforger m: 'Σx'.lc.say
camelia rakudo-moar 2a09e9: OUTPUT«σx␤»
toolforger m: 'xΣx'.lc.say 21:17
camelia rakudo-moar 2a09e9: OUTPUT«xσx␤»
toolforger So, final lowercase sigma is different
21:17 jjido joined 21:18 cdg joined
[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
kk [Coke]
toolforger I suspect that's the correct behaviour for sigma
samcv yeah that's right toolforger, and roast tests it. i checked 21:19
[Coke], i'm having problems with the local build though-
oh wait. no. not anymore
maybe my rakudo broke between installing or something
21:20 pierrot joined 21:21 pyrimidine left
samcv [Coke], do i have to run make again for this? 21:21
i just co's your branch
21:22 pyrimidine joined
[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...
[Coke] (--no-highlight will probably save a ton of time, though)
SmokeMachine gist.github.com/FCO/3980b0eec79217...cc9b363bfa 21:24
samcv uhm search isn't working at all [Coke] after i cleared my cache 21:25
toolforger cu all 21:26
21:26 toolforger left
SmokeMachine MasterDuke, RabidGravy: any idea? gist.github.com/FCO/3980b0eec79217...cc9b363bfa 21:26
RabidGravy bt 21:27
SmokeMachine www.irccloud.com/pastebin/OzEP59Ww/ 21:28
RabidGravy what os is this that's totally not working
SmokeMachine Im running on a docker...
RabidGravy oh 21:29
SmokeMachine on a image based on rakudo-star image
I couldn't run it on my mac...
21:31 Ven joined 21:32 loveperl left
SmokeMachine any idea? 21:32
21:34 user15 joined
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:36
I tried to install it with: "dnf install libgtextutils" 21:37
that installs but i keep getting the error message above
21:37 andrzejku joined
user15 what is it exactly that I'm supposed to install? 21:37
21:38 pierre_ left, kcodrgkimd joined
lizmat what happens if you say: 21:38
RabidGravy it's perl-ExtUtils-Command not that other thing
user15 oh
21:38 pyrimidine left
lizmat perl -MExtUtils::Command -e0 21:38
21:38 lucasb joined
user15 ok, i think i saw it 21:38
lizmat ah, ok
SmokeMachine RabidGravy: I got it!!!
RabidGravy woo 21:39
user15 i'm going to try it, thx
SmokeMachine www.irccloud.com/pastebin/MWGKVKdc/
21:39 pyrimidine joined
RabidGravy SmokeMachine, that's more like it 21:42
SmokeMachine www.irccloud.com/pastebin/OKTQ17ZE/
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:43 pyrimidine left
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
================================================================================================
This is Rakudo Perl 6 running in the GNU debugger, which often allows the user to generate useful back-
traces to debug or report issues in Rakudo, the MoarVM backend or the currently running code.
This Rakudo version is 2016.11 built on MoarVM version 2016.11,
running on debian (8.jessie) / linux (4.8.12.moby)
21:44 SmokeMachine left
RabidGravy If you can get it down to ten lines or so it's file a rakudobug 21:44
21:44 SmokeMachine joined
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:45
21:49 raiph joined
ugexe m: say (1..Inf).grep(* > 10).head 21:50
camelia rakudo-moar 2a09e9: OUTPUT«11␤»
21:50 thayne left
AlexDaniel ugexe: well, not really 21:50
this only works because it knows it is a range
ah, wait, I'm wrong 21:51
21:52 khw left
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)␤»
AlexDaniel yeah, it works
… kind of
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
ugexe m: my $l = (1..10).map: { LAST { say "DONE" }; $_ }; say $l[10] 21:55
camelia rakudo-moar 2a09e9: OUTPUT«DONE␤DONE␤Nil␤»
ugexe done done?
AlexDaniel donedonedonedonedone 21:56
:)
RabidGravy user15, your Perl 5 installation seems horribly broken
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
camelia rakudo-moar 2a09e9: OUTPUT«10␤»
user15 i just installed fedora 25 from scratch
i havent looked for updates yet, maybe that would solve the problem? 21:57
ok, let me update... 21:58
RabidGravy no, just do something like "sudo dnf installl perl-Catalyst-Devel"
lucasb m: <a b c>.map({ LAST say 'ho' }).eager 21:59
camelia rakudo-moar 2a09e9: OUTPUT«ho␤ho␤»
RabidGravy should bring everything in
:)
AlexDaniel m: my $xs = map({ $_² }, (1…Inf)); my $it = $xs.iterator; loop { my $val = $it.pull-one; last if $val > 100; say $val }
camelia rakudo-moar 2a09e9: OUTPUT«1␤4␤9␤16␤25␤36␤49␤64␤81␤100␤»
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...
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␤»
AlexDaniel is there any way to do it without iterator?
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]`
AlexDaniel kcodrgkimd: why do you need this, by the way? 22:03
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␤»
kcodrgkimd No specific reason, just playing around, and since I have worked with haskell somewhat recently, I was curious.
AlexDaniel hahaha
I did it with throw, hah
22:07 khw joined
AlexDaniel ok, there's a better way 22:07
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]␤»
AlexDaniel kcodrgkimd: what about this?
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.
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
22:11 jantore_ is now known as jantore
AlexDaniel kcodrgkimd: all this kinda makes sense with ranges and stuff that is normally increasing or decreasing constistently… 22:11
but once you have some unknow Seq… oh well 22:12
that being said
m: my $xs = map({ $_² }, (1…Inf)); my @values = gather $xs.first({take $_; $_ > 100}); say @values
camelia rakudo-moar 2a09e9: OUTPUT«[1 4 9 16 25 36 49 64 81 100 121]␤»
AlexDaniel ↑ this does not look so bad, right?
kcodrgkimd (I had a typo in the perl6 example)
Yeah that comes close to the takeWhile function and looks good 22:13
AlexDaniel I wonder if there is any way to terminate grep without throwing 22:14
kcodrgkimd: you probably expected this to be possible with ..., but it is normally used for generating stuff, not filtering 22:15
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␤»
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␤»
AlexDaniel :S
“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:19
so, according to outdated design docs, 「last」 should work inside grep 22:20
m: my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
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…»
AlexDaniel commit: all my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
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
committable6 AlexDaniel, gist.github.com/75c2986173dc8779cc...8bf2292d8b 22:21
AlexDaniel AND IT DID WORK!
we broke it
kcodrgkimd: ok, first of all, thank you for asking this question
kcodrgkimd: I think we found a regression
bisect: my $xs = map({ $_² }, (1…Inf)); say $xs.grep({last if $_ > 100; True})[^100]
bisectable6 AlexDaniel, Bisecting by output (old=2015.12 new=2a09e92) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/d97c7d092ac2c5ff90...6b65dd8bb3
AlexDaniel, (2016-03-18) github.com/rakudo/rakudo/commit/6d...41e7eb99b0
AlexDaniel yup 22:22
kcodrgkimd: { $_ + 3 } is already a function, kind of
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:24
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)␤»
kcodrgkimd Aaah I see
AlexDaniel m: my $lazylist = (1, 2, -> $arg { $arg² } ...^ * > 500); .say for $lazylist 22:26
camelia rakudo-moar 2a09e9: OUTPUT«(1 2 4 16 256)␤»
kcodrgkimd Hmm why didnt that work while trying it out, give me a second
AlexDaniel is anybody else as sad as me because 「last」 in grep stopped working so long time ago and we haven't noticed? 22:27
user15 RabidGravy: its incredible, now everything installs fine and all tests pass successfully !! 22:30
22:31 dataange` left
RabidGravy yeah, it's fedora only installs half a Perl by default 22:31
22:33 lucasb left
user15 how can I get the man page? "No manual entry for perl6" ?? 22:33
22:36 rindolf left
user15 maybe theres no man page... 22:36
id like to get more details on the command line options 22:37
kcodrgkimd Ok I am going to play around with this for a bit, thank you very much. 22:41
MasterDuke SmokeMachine: rakudobrew build moar --configure-opts="--moar-option='--debug=3''" 22:47
geekosaur likes how people worry about superstitious semicolons, but throw superstitious quotes all around >.> 22:49
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"
and not like "-foo=stuff" :)
--* 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 domidumont left
geekosaur because there are no spaces or shell metacharacters involved 22:51
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
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:53 andrzejku left
dalek osystem: b180c11 | jnthn++ | META.list:
Add Test::Scheduler.
22:54
geekosaur so, moar is building with debugging with: rakudobrew build moar --configure-opts=--moar-option=--debug=3 22:56
as expected :p
samcv where do things proposed for 6.d go? 22:58
jnthn Phew, advent post scheduled. :) 22:59
geekosaur and I have a successful build.
AlexDaniel huggable: 6d
huggable AlexDaniel, nothing found
AlexDaniel huggable: 6.d
22:59 user15 left
huggable AlexDaniel, Proposals for 6.d language: github.com/perl6/specs/blob/master/v6d.pod 22:59
AlexDaniel samcv: ↑
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
haven't check every other one
most likely they are
23:01 Tonik joined
samcv would like very nice rules for which are allowed :P 23:02
more elegant
to just say, all the bidi-mirroring brackets, plus these quotation marks and their matching bidi mirroring glyphs. 23:03
would be pretty nice 23:04
23:13 donaldh joined 23:20 pyrimidine joined 23:22 Upasaka left
dalek c: c653991 | donaldh++ | doc/Language/unicode_texas.pod6:
Use the correct hex codes for superscript 1,2,3

Yes, they're not in the U+207x sequence.
23:23
synopsebot6 Link: doc.perl6.org/language/unicode_texas
23:24 Tonik left 23:25 donaldh left, pyrimidine left
MasterDuke geekosaur++, TIL 23:26
RabidGravy jnthn, you don't fancy writing mine too? It's all quite obvious ;-)
SmokeMachine MasterDuke: building... 23:36
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 23:40 pmaddams left 23:45 loveperl joined
loveperl What would a global variable look like? 23:45
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
basically use "our" instead of "my", outside of a class/role
SmokeMachine but, is that segfault a bug? 23:48
RabidGravy a segfault is always a bug 23:49
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?
is gc_mark from moar? 23:51
RabidGravy make the smallest standalone example possible that causes it and post it on rt 23:52
23:52 wamba left
RabidGravy with the stack trace 23:52
SmokeMachine trying...
RabidGravy yeah it can be tricky 23:53
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:54
23:56 Ven left
loveperl So there are no global variables? 23:59