»ö« 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.
00:00 zacts joined 00:02 rindolf left, edehont left
AlexDaniel tbrowder: hi 00:13
dalek c/signature-test-option: fbe8525 | Altai-man++ | / (18 files):
This commit adds new pod config option: 'signature', and adapts current type documentation to it's usage instead of brackets addition.
AlexDaniel tbrowder: I see there's “Perl_6” on the experimental page (with underscore) 00:14
tbrowder: I'm not sure why, but my guess is that you probably mistaken in to   which is displayed as a colored underscore in emacs 00:15
it*
tbrowder:   being non-breaking space
sena_kun tbrowder, if you're using emacs, you can easily add non-breaking spaces with "C-x 8 space". Just number "8" and then normal space will do the trick. 00:16
AlexDaniel sena_kun: 「C-x 8」, right! I should probably use it more 00:18
tbrowder You both are correct. Can one of you correct that, please?
AlexDaniel sure
00:18 cognominal joined 00:19 wamba left
sena_kun AlexDaniel, I wonder how people work without emacs. Vim, probably. 00:19
00:19 pierre_ joined
dalek c: 6dd293b | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/experimental.pod6:
Change Perl_6 to Perl 6

Sometimes it's not too hard to confuse non-breaking space with an underscore in emacs, as both are displayed as an underscore (one being different color).
00:20
AlexDaniel sena_kun: I'm not sure if I'm with you on this. The thing is, I have solved so many problems that vim/emacs are trying to solve, but I did it on completely different levels (keyboard, layout, OS), so in my view if you do all that, then you don't really need emacs or vim. 00:23
00:23 canopus left
AlexDaniel for example, I don't need 「C-x 8 space」 because I can type it 00:23
sena_kun AlexDaniel, it can be. Anyway, not again this emacs/vim/anything flame. 00:24
AlexDaniel it is not a flame, it is just a different point of view :)
my point is that you can like your editor as much as you want, but you should always be open to other solutions to common problems. 00:26
Xliff I'm getting this error "Cannot unbox a type object" when attempting to pass a type object to a nativecall sub. 00:27
Isn't that allowed?
sena_kun AlexDaniel, more importangly, can you help me, please, with github.com/perl6/doc/pull/814? I'm worring about the CONTRIBUTING.md changes.
Xliff Rebuilding rakudo... just in case. 00:30
AlexDaniel sena_kun: I don't think that I am more native, but perhaps it would be better if it specified what kind of “body” it is talking about. Or maybe “don't do this” example can help? 00:31
sena_kun: but it is not that important really, people are more likely to look at other parts of the documentation to see what they should be doing
00:32 BrassLantern joined, canopus joined
dalek c: 3f64990 | (Tom Browder)++ | doc/Language/experimental.pod6:
use title case for title words for consistency
00:33
AlexDaniel sena_kun: oh!
sena_kun AlexDaniel, thanks. What's the matter?
00:33 golee joined 00:34 travis-ci joined
travis-ci Doc build passed. Altai-man 'This commit adds new pod config option: 'signature', and adapts current type documentation to it's usage instead of brackets addition. 00:35
travis-ci.org/perl6/doc/builds/150192383 github.com/perl6/doc/commit/fbe852570cef
00:35 travis-ci left, avenj left
AlexDaniel sena_kun: sorry, nothing :) 00:35
sena_kun: I was thinking about supporting multiline signatures, but I cannot really find any of these, so OK 00:36
sena_kun AlexDaniel, okay. I'm done for today anyway. If we have multiline signature, then I'll sooner or later rewrite it, since sucn signature won't compile. And we want to compile everything. (: 00:37
AlexDaniel sena_kun: actually, here: github.com/perl6/doc/blob/master/d....pod6#L177
00:38 avenj joined
AlexDaniel sena_kun: nvm I will leave a comment 00:38
sena_kun: good night!
sena_kun AlexDaniel, I haven't touched Str.pod6 yet.
AlexDaniel, my current goal is to make all Type/* compilable, so sooner or later I'll solve this anyway. 00:39
AlexDaniel sena_kun++
00:41 lambd0x left 00:51 zacts left
dalek c: 8d9793b | (Tom Browder)++ | doc/Language/experimental.pod6:
correct spelling
00:53
00:55 sena_kun left 00:58 RabidGravy left
tbrowder AlexDaniel: ref emacs: I am still modding my init.el to handle unicode, and I need to add handling the non-breaking space to show it to me as something other than the underscore. That can and will be done. 01:00
b2gills .tell bronco_creek Windows has always accepted both kinds of slashes, it's only some programs that have a problem with forward slashes. 01:01
yoleaux b2gills: I'll pass your message to bronco_creek. 01:02
dalek c: 63b121d | (Tom Browder)++ | CONTRIBUTING.md:
remove spurious ellipsis
01:06
01:14 BrassLantern left 01:26 BenGoldberg joined 01:30 araujo__ joined 01:32 araujo__ left 01:33 araujo__ joined 01:34 araujo_ left 01:38 margeas left, sufrostico left 01:40 sufrostico joined 01:42 kalkin-_ joined, kalkin- left, freezerburnv_ left 01:45 ilbot3 left 01:47 ilbot3 joined 01:49 njmurphy left, araujo_ joined
AlexDaniel tbrowder: just change the face to make it more prominent 01:51
01:51 araujo_ left 01:52 araujo_ joined
awwaiid m: say <1/2> ; say < 1/2 > # hm! 01:53
camelia rakudo-moar 589061: OUTPUT«0.5␤1/2␤»
01:53 araujo__ left
awwaiid I didn't know that <1/2> was Rat notation 01:53
01:54 araujo_ left
awwaiid I like having Rat notation 01:54
01:54 araujo_ joined
AlexDaniel tbrowder: “escape-glyph” is the face in question 01:54
01:55 FROGGS left 01:56 araujo_ left
AlexDaniel tbrowder: also see “nobreak-space” face and “nobreak-char-display” variable 01:56
01:57 araujo_ joined
BenGoldberg m: < 1/2 >.perl.say 01:59
camelia rakudo-moar 589061: OUTPUT«RatStr.new(0.5, "1/2")␤»
BenGoldberg m: <1/2>.perl.say
camelia rakudo-moar 589061: OUTPUT«0.5␤»
awwaiid hmm.
BenGoldberg m: <1/2>.WHAT.say
camelia rakudo-moar 589061: OUTPUT«(Rat)␤»
AlexDaniel hmmm 02:00
BenGoldberg m: say <245850922/78256779> - pi 02:01
camelia rakudo-moar 589061: OUTPUT«0␤»
AlexDaniel awwaiid: may I ask why do you need Rat notation?
I mean, 1/2 is already a Rat
BenGoldberg m: pi.WHAT.say;
camelia rakudo-moar 589061: OUTPUT«(Num)␤»
awwaiid reads about docs.perl6.org/language/glossary#Allomorph_
BenGoldberg m: say <245850922/78256779>.Num - pi 02:02
camelia rakudo-moar 589061: OUTPUT«0␤»
BenGoldberg m: say atan2( -1, 0 );
camelia rakudo-moar 589061: OUTPUT«-1.5707963267949␤»
BenGoldberg m: say atan2( 1, 0 );
camelia rakudo-moar 589061: OUTPUT«1.5707963267949␤»
BenGoldberg m: say atan2( 1, 0 )*2;
camelia rakudo-moar 589061: OUTPUT«3.14159265358979␤»
BenGoldberg m: say atan2( 1, 0 )*2 - <245850922/78256779>; 02:03
camelia rakudo-moar 589061: OUTPUT«0␤»
BenGoldberg m: say (atan2( 1, 0 )*2 - <245850922/78256779>) * 1e100;
camelia rakudo-moar 589061: OUTPUT«0␤»
AlexDaniel m: say <42>.WHAT;
camelia rakudo-moar 589061: OUTPUT«(IntStr)␤» 02:04
awwaiid AlexDaniel: I accidentally ran into it. But you have a good point that 1/2 is just as good. hmm.
I ran into when building a grammar that could parse fractions and was testing things iirc 02:05
AlexDaniel it looks like other languages need Rat notation, perl 6 doesn't :)
awwaiid AlexDaniel: I don't think I like <1/2> being different than < 1/2 > though. Actually -- I as I think about it I _don't_ like it because it makes < ... > feel overloaded
I was expecting <...> to reliably be quote-word context 02:06
02:06 freezerburnv_ joined
AlexDaniel by the way, python 3.6 will support underscores in numeric literals. How cool is that! ;) 02:06
or at least, that's what I heard
awwaiid it doesn't already? Ruby does 02:07
AlexDaniel almost every language does.
02:07 FROGGS joined
awwaiid I need to get Inline::Python going a bit better. I hooked up travis last weekend at least. All The Libraries!!! 02:08
(are belong to us)
AlexDaniel awwaiid: actually, I'm not sure if it is a bug or not
it probably is
awwaiid that they are different, or that <1/2> _ever_ is automatically a Rat / RatStr? 02:09
AlexDaniel that < 25/2 > is RatStr
I don't know, maybe it was done on purpose, but why? 02:10
awwaiid no idea
AlexDaniel m: say <0.5>.perl
camelia rakudo-moar 589061: OUTPUT«RatStr.new(0.5, "0.5")␤»
AlexDaniel m: say < 1/2 >.perl 02:11
camelia rakudo-moar 589061: OUTPUT«RatStr.new(0.5, "1/2")␤»
AlexDaniel m: say <1/2>.perl
camelia rakudo-moar 589061: OUTPUT«0.5␤»
awwaiid sick and wrong
ooo! we should deparse it
02:12 pierre_ left
AlexDaniel m: say <42>.perl 02:13
camelia rakudo-moar 589061: OUTPUT«IntStr.new(42, "42")␤»
AlexDaniel m: say < 42 >.perl
camelia rakudo-moar 589061: OUTPUT«IntStr.new(42, "42")␤»
AlexDaniel submits rakudobug 02:14
BenGoldberg m: 3587785776203/44485467702853 02:15
camelia rakudo-moar 589061: OUTPUT«WARNINGS for <tmp>:␤Useless use of "/" in expression "3587785776203/44485467702853" in sink context (line 1)␤»
BenGoldberg m: say 3587785776203/44485467702853
camelia rakudo-moar 589061: OUTPUT«0.080650737453591␤»
BenGoldberg m: say 3587785776203/1783366216531 02:16
camelia rakudo-moar 589061: OUTPUT«2.01180539529450␤»
tbrowder AlexDaniel: thanks! 02:20
02:20 kid511 left 02:22 sufrostico left
TimToady is not a bug 02:25
awwaiid What's the concept? 02:26
(or link to doc works too of course)
TimToady we need a literal notation for rats and complex, and <> is it
awwaiid how about the space vs no-space differene? 02:27
AlexDaniel m: say <42e2i>.perl
TimToady we don't need an extra literal notation for ints or nums, so we don't bother to treat <> special
camelia rakudo-moar 589061: OUTPUT«ComplexStr.new(<0+4200i>, "42e2i")␤»
AlexDaniel m: say < 42e2i >.perl
camelia rakudo-moar 589061: OUTPUT«ComplexStr.new(<0+4200i>, "42e2i")␤»
TimToady m: say <42e2+3i>.perl
camelia rakudo-moar 589061: OUTPUT«<4200+3i>␤»
awwaiid Right -- so 1/2 is an operation that results in a Rat, whereas <1/2> is a Rat literal.
(compiler optimization excepted) 02:28
TimToady yes, and while you can get away with (1/2), it only works by constant folding
awwaiid cool
TimToady and bare 1/2 is a problem if you have a surrounding operator that is tighter than /
02:28 noganex joined
TimToady so we just stole <> for those literals, but only when there's no space 02:29
sure, it's a little inconsistent, but there are reasons
AlexDaniel m: say <42e2+3i>.perl
camelia rakudo-moar 589061: OUTPUT«<4200+3i>␤»
AlexDaniel m: say < 42e2+3i >.perl
camelia rakudo-moar 589061: OUTPUT«ComplexStr.new(<4200+3i>, "42e2+3i")␤»
AlexDaniel I see
TimToady generally, you wouldn't write that 02:30
it's just a degenerate case of qw
AlexDaniel throws away a fully written bug report
TimToady or more generally, of val()
awwaiid m: say <1/2>.WHAT ; say < 1/2 >.WHAT ; say "1/2".WHAT ; say qw< 1/2 >.WHAT
camelia rakudo-moar 589061: OUTPUT«(Rat)␤(RatStr)␤(Str)␤(Str)␤»
TimToady anyway, it's working as designed, even if you think the designer is an idiot :) 02:31
awwaiid not at all -- just want to understand. In this case :)
02:31 noganex_ left
awwaiid (kidding. TimToady++ # awesomesauce) 02:32
AlexDaniel TimToady: it kinda makes sense. “kinda” because it is very confusing at first and now I will be thinking “wait, what am I going to get here?” whenever I use <>, as there's no simple rule.
TimToady you think <> is inconsistent here, try inside regex :) 02:33
awwaiid so the rule is <> bumping right up against a slashy fraction is a Rat. What's with the RatStr?
best of both worlds I guess
TimToady allomorphism is for when someone is forced to use a textual representation, and needs a bit of dwimmery
awwaiid interesting 02:34
TimToady when someone is asked for a number at a prompt, you'd like to be able to treat it like a number
likewise, your program is forced to be a textual representation
BenGoldberg m: num $x = 0; ++$x; say $x;
camelia rakudo-moar 589061: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3num7⏏5 $x = 0; ++$x; say $x;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ st…»
BenGoldberg m: my num $x = 0; ++$x; say $x;
camelia rakudo-moar 589061: OUTPUT«This type cannot unbox to a native number: P6opaque, Int␤ in block <unit> at <tmp> line 1␤␤»
TimToady so literals are a bit allomorphic, especially inside <> with multiple vlaues
BenGoldberg m: my num $x = 0e0; ++$x; say $x;
camelia rakudo-moar 589061: OUTPUT«1␤»
BenGoldberg m: my num $x = 0.5e0; ++$x; say $x; 02:35
camelia rakudo-moar 589061: OUTPUT«1.5␤»
AlexDaniel .tell gfldex see irclog.perlgeek.de/perl6/2016-08-06#i_12976146 and the discussion that follows. Perhaps you'll have an idea on how we can improve the docs to make it less WATy 02:36
yoleaux AlexDaniel: I'll pass your message to gfldex.
BenGoldberg wonders what would break if ++ on a num increased by the smallest amount which results a value greater that the initial num. 02:37
geekosaur everyone expecting $x = 0.5; $x++; to do what it does *everywhere* 02:40
also, I defy you to provide a simple, comprehensible explanation of the resulting behavior on floating point numbers (remember that said increase will scale depending on the magnitude of the original value) 02:42
AlexDaniel m: my $x = 9e16; my $y = $x; $x++; say $x == $y # ;) 02:43
camelia rakudo-moar 589061: OUTPUT«True␤»
geekosaur yes, but that's at least consistent with floating point everywhere else
BenGoldberg How about at least provide .smallest-greater and .largest-smaller methods? 02:44
TimToady and what would you do with it? 02:45
BenGoldberg TBH, I'm not sure ;)
TimToady adding 1 tends to have more real-world application, I suspect
BenGoldberg Probably 02:46
m: say first { !(0+"1e-$_") }, ^Inf; 02:47
camelia rakudo-moar 589061: OUTPUT«324␤»
02:47 araujo__ joined
BenGoldberg m: my $x = 0; my $y = $x + 1e-323; say $x <=> $y; 02:47
camelia rakudo-moar 589061: OUTPUT«Less␤»
BenGoldberg m: my $x = 0; my $y = $x + 1e-323; say $x <=> $y but NotByMuch; 02:48
camelia rakudo-moar 589061: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Operators '<=>' and 'but' are non-associative and require parentheses␤at <tmp>:1␤------> 3 = 0; my $y = $x + 1e-323; say $x <=> $y7⏏5 but NotByMuch;␤ expecting any of:␤ infix␤ …»
BenGoldberg m: my $x = 0; my $y = $x + 1e-323; say (($x <=> $y) but (role NotByMuch {}));
camelia rakudo-moar 589061: OUTPUT«Less␤»
02:49 araujo__ left, araujo__ joined
TimToady m: my $x = 10; my $y = $x + 1e-323; say $x <=> $y; 02:50
camelia rakudo-moar 589061: OUTPUT«Same␤»
02:50 araujo_ left
BenGoldberg m: <2646693125139304345/842468587426513207> - <139755218526789/44485467702853> 02:51
camelia rakudo-moar 589061: OUTPUT«WARNINGS for <tmp>:␤Useless use of "-" in expression "<2646693125139304345/842468587426513207> - <139755218526789/44485467702853>" in sink context (line 1)␤»
BenGoldberg m: say <2646693125139304345/842468587426513207> - <139755218526789/44485467702853>
camelia rakudo-moar 589061: OUTPUT«-1.61109530172737e-28␤»
02:51 araujo__ left
BenGoldberg m: say <2646693125139304345/842468587426513207> - pi.Rat 02:51
camelia rakudo-moar 589061: OUTPUT«-2.66764189062422e-07␤»
02:52 araujo__ joined 02:54 araujo__ left
mspo m: my m: my Numeric $x = 0.5; say ++$x; 02:54
camelia rakudo-moar 589061: OUTPUT«5===SORRY!5===␤Type 'm' is not declared␤at <tmp>:1␤------> 3my m7⏏5: my Numeric $x = 0.5; say ++$x;␤Malformed my␤at <tmp>:1␤------> 3my7⏏5 m: my Numeric $x = 0.5; say ++$x;␤␤»
mspo m: my Numeric $x = 0.5; say ++$x;
camelia rakudo-moar 589061: OUTPUT«1.5␤»
BenGoldberg If I've got a Rat which supposedly approximates pi to 37 decimal digits, and rakudo's builtin pi (converted to a Rat) differs by 2e-7, then does that mean our conversion from Num to Rat is deficient, or does it mean our builtin pi is deficient? 02:55
TimToady in that range, Rat has more precision than Num 02:56
assuming 64-bit Num 02:57
02:57 araujo__ joined
BenGoldberg m: say log( 1e-323, 2 ); 02:58
camelia rakudo-moar 589061: OUTPUT«-1073␤»
BenGoldberg The wikipedia page on 64 bit doubles mentions that subnormals can be as small as 5 x 10 ** -324, so that's about right. 03:00
m: log( 2**52, 10 ); 03:02
camelia rakudo-moar 589061: OUTPUT«WARNINGS for <tmp>:␤Useless use of "log( 2**52, 10 )" in expression "log( 2**52, 10 )" in sink context (line 1)␤»
BenGoldberg m: log( 2**52, 10 ).say;
camelia rakudo-moar 589061: OUTPUT«15.653559774527␤»
BenGoldberg Would programmers be upset if perl6's builtin pi were a Rat instead of a Num? 03:04
m: pi.nude.perl.say
camelia rakudo-moar 589061: OUTPUT«Method 'nude' not found for invocant of class 'Num'␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: pi.Rat.nude.perl.say
camelia rakudo-moar 589061: OUTPUT«(355, 113)␤»
geekosaur practically, it's a rational anyway
TimToady there's not a lot of point, since almost any calculations involving pi will degrade to Num quickly 03:05
BenGoldberg m: say pi.Rat.Num - pi
camelia rakudo-moar 589061: OUTPUT«2.66764189404967e-07␤»
TimToady Rats are really only useful when doing addition/subtraction with limited denominators
which is a lot of calculation, but not typically when you're multiplying by pi
geekosaur also iirc at one point the Rat implementation of pi was a hairier Rat, but that just made all Rat computations using it painful 03:07
(hairier but more precise)
although the counterargument there is that if you're doing Rat math involving pi, you're already doing it wrong >.> 03:09
or else need something more specific to whatever non-floating approximation you are using anyway
BenGoldberg thinks he's got an idea...
Would a method pi(Rat:U, $precision) make sense? 03:10
03:20 khw left
TimToady I don't think we need to build a pi spigot into p6 03:20
03:20 freezerburnv_ left 03:24 kaare_ joined 03:38 BrassLantern joined, BrassLantern left 03:52 CIAvash joined 04:26 pierre_ joined 04:35 Cabanossi left 04:36 Cabanossi joined 04:48 skids left 04:56 holyghostoo joined, holyghostoo left, holyghostoo joined 05:16 obfusk_ joined, holyghostoo left, obfusk left 05:18 andrzejku joined 05:20 pierre_ left 05:30 pierre_ joined, k1lldash9 joined
k1lldash9 curious, are there advantages to say vs print "this\n" ? 05:33
does it implicitly set carriage return and that is essentially it? that's all
thanks! :)
ahh, nevermind, I found the answer, sorry! ha 05:35
05:35 pierre_ left
andrzejku hi 05:35
05:36 Tonik joined 05:37 k1lldash9 left 05:38 pierre_ joined 05:43 hwcomcn joined 05:47 hwcomcn left 05:50 pierre_ left 05:51 hwcomcn joined 05:52 hwcomcn left 05:53 hwcomcn joined, hwcomcn left 05:54 hwcomcn joined, hwcomcn left 05:55 hwcomcn joined 05:56 hwcomcn left, pierre_ joined 05:57 hwcomcn joined, hwcomcn left 05:58 hwcomcn joined 05:59 hwcomcn left 06:07 smls joined
smls m: say (1.1 .. 10.1).grep(3 < *.Int < 7) 06:08
camelia rakudo-moar 589061: OUTPUT«===SORRY!===␤QAST::Block with cuid 1 has not appeared␤»
smls ^^ ? 06:09
06:12 itaipu joined
TimToady m: say (1.1 ... 10.1).grep(3 < * < 7) 06:18
camelia rakudo-moar 589061: OUTPUT«(3.1 4.1 5.1 6.1)␤»
TimToady m: say (1.1 ... 10.1).grep(3 < * + 0 < 7) 06:19
camelia rakudo-moar 589061: OUTPUT«===SORRY!===␤QAST::Block with cuid 1 has not appeared␤»
TimToady doesn't like WhateverCode there, I guess
smls So, Whatever can curry with chaining comparison ops but WhateverCode can't?
TimToady would seem not
smls will RT 06:20
TimToady: Btw, the reason I was asking why we don't have a .product to go along with .sum, is that the { [*] |$_ } is the thing that stands out the most as line noise in rosettacode.org/wiki/Sum_and_Produc...zle#Perl_6 06:22
06:24 ufobat joined
ufobat good morning :) 06:27
06:27 andrzejku left 06:37 itaipu left 06:39 labster left 06:44 mohae joined 06:47 mohae_ left 06:57 labster joined 07:12 holyghostoo joined 07:15 darutoko joined 07:17 andrzejku joined 07:25 pierre_ left 07:26 setty2 joined 07:29 firstdayonthejob joined 07:42 pierre_ joined 07:43 andrzejku left 07:48 wamba joined
smls TimToady: Your grammar-based solution to rosettacode.org/wiki/Amb#Perl_6 doesn't work anymore in the latest Rakudo... :( 07:54
It simply *stops* after reaching the end of the first branch, and doesn't backtrack, so it prints no solution. 07:56
Strangely enough, it works if the <{...}> regex EVAL interpolations are replaced with the regex code they produce.
Did something change about the <{...}> feature that would prevent backtracking over it?
Here's the code with some cleanup and debug statements added, to show the problem: gist.github.com/smls/407f65d275810...2148f2312a 08:00
08:14 spider-mario joined 08:35 stmuk joined 08:38 stmuk_ left, stmuk_ joined 08:41 stmuk left 08:44 pecastro left 08:56 andrzejku joined 09:02 BenGoldberg left 09:06 RabidGravy joined 09:07 AlexDaniel left 09:16 obfusk joined, obfusk_ left 09:21 TEttinger left 09:33 pmurias joined 09:35 margeas joined
tbrowder ufobat: good morning! 09:35
09:36 sergot joined 09:37 pecastro joined 09:40 stmuk joined 09:43 stmuk_ left, margeas left, margeas joined 09:47 MorayJ joined 09:58 pdcawley joined, perl666 joined 09:59 pierre_ left 10:00 perl666 left 10:18 firstdayonthejob left 10:23 stmuk_ joined 10:25 pdcawley left 10:26 stmuk left
dogbert17 silence reigns 10:35
10:41 marcovorg joined, margeas left 10:42 labster left
dalek c: eb847e3 | (Jan-Olof Hendig)++ | doc/Type/List.pod6:
Added docs for List.antipairs
10:43
smls Why is .antipairs needed if it does the same thing as .pairs.invert ? 10:44
timotimo hoh, it is? 10:47
10:47 andrzejku left, wamba left
timotimo m: { :1a, :2b, :3c, :4d }.antipairs.perl.say 10:47
camelia rakudo-moar 589061: OUTPUT«(1 => "a", 4 => "d", 3 => "c", 2 => "b").Seq␤»
timotimo m: { :1a, :2b, :3c, :4d }.pairs.invert.perl.say
camelia rakudo-moar 589061: OUTPUT«(1 => "a", 4 => "d", 3 => "c", 2 => "b").Seq␤»
dogbert17 timotimo: there's something fishy here, there is an implementation of 'invert' in List.pm, but it soes not seem to work 10:49
m: say (1,2,3).invert # ?? 10:50
camelia rakudo-moar 589061: OUTPUT«Method 'value' not found for invocant of class 'Int'␤ in block <unit> at <tmp> line 1␤␤»
timotimo um, that's quite weird
to have .invert on list do what antipairs does on a hash, but only if the list is a list of pairs
10:50 wamba joined
dogbert17 the code is a one-liner: self.map({ nqp::decont(.value) »=>» .key }).flat 10:50
timotimo right 10:51
i find that ... weird
also, why would it have »=>» there? unless there's more than one key per thing? 10:52
dogbert17 timotimo: it could be I guess, in other places invert drills down into lists
docs.perl6.org/type/Map#method_invert 10:53
I wonder if there is a :kv missing from List.invert 10:54
smls ah.
timotimo could be, yeah
dogbert17 where's lizmat when we need her :) 10:56
lizmat I'm here
.oO( you rang? )
I'm not sure why we have List.invert either.... I don't think I touched it in any opt work
dogbert17 can you backlog ~15 lines please :) 10:57
lizmat Hash.invert is *not* the same as Hash.antipairs
dalek osystem: 2373470 | RabidGravy++ | META.list:
Add Doublephone

See github.com/jonathanstowe/Doublephone
dogbert17 lizmat: agreed 10:58
RabidGravy I'm back!
dogbert17 m: say (1,2,3).invert # ??
camelia rakudo-moar 589061: OUTPUT«Method 'value' not found for invocant of class 'Int'␤ in block <unit> at <tmp> line 1␤␤»
lizmat RabidGravy++
dogbert17: lemme check
dogbert17 o/ RabidGravy
RabidGravy (but schwern made me do that one)
dogbert17 have you managed to stop Brexit ?
RabidGravy working on it 10:59
lizmat dogbert17: all I can say is that TimToady added/changed it early 2015
RabidGravy HACKERS FOR EUROPE!
timotimo HACK THE CONTINENT!!
dogbert17 lizmat: maybe we'll have to wait for his comments on the matter then 11:00
lizmat is checking further
11:01 rindolf joined
dogbert17 RabidGravy: have you tried your musicstreaming stuff lately. perhaps it works better/faster now thanks to all recent opts? 11:01
lizmat feels to me that .invert on a List *is* the same as antipairs
dogbert17 lizmat: in which case it would be redundant 11:02
11:02 pierre_ joined
lizmat well, I guess we want to keep supplying it so you can call .invert on anyhing 11:03
dogbert17 lizmat: in which case we have a bug :)
lizmat yeah
m: dd 42.antipairs
camelia rakudo-moar 589061: OUTPUT«(42 => 0,).Seq␤»
lizmat m: dd 42.invert
camelia rakudo-moar 589061: OUTPUT«Use of uninitialized value of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at <tmp> line 1␤Cannot resolve caller invert(Int); none of these signatures match:␤ in block <u…»
11:06 rpburkholder joined
lizmat tries some patches 11:06
dogbert17 * oO
lizmat hopes Apple will come out with a 32core MBP soon 11:08
11:09 itaipu joined
dogbert17 guess Apple will have something new besides iPhones in September 11:12
lizmat hmmmm I borked 2 spectests 11:14
dogbert17 uh oh 11:15
smls Having List.invert invert the pairs of a list of pairs, is not that different than other instances where Perl 6 treats lists of pairs specially... 11:16
lizmat apparently you can only List.invert if the List contains pairs
dogbert17: so In guess the right course of action would be to rakudobug it as a @LARRY bug 11:18
11:19 stmuk joined
dogbert17 lizmat: so the bug is that it only handles list of pairs? 11:20
lizmat well, I guess the bug is that the error is really LTA if the list does not consist of pairs *OR* it should call .pairs on itself first before inverting 11:21
(aka, be the same as .antipairs)
11:21 stmuk_ left
dogbert17 so a mail to [email@hidden.address] with [BUG] and @LARRY then? 11:22
in the subject that is 11:23
11:24 stmuk_ joined 11:26 stmuk left
lizmat dogbert17: yup 11:33
dogbert17: (sorry, was distracted)
dogbert17 lizmat: rt.perl.org/Public/Bug/Display.html?id=128860 11:36
lizmat dogbert17++ 11:37
dogbert17 hooray, thx for the help 11:38
btw, what's the fastest way in Perl 6 to split a string into a list of single characters, comb? 11:39
lizmat yup, .comb 11:40
dogbert17 lizmat: thx, I was working on a Project Euler problem and got the impression that comb is rather slow. Is it a target for opts in the future? 11:41
lizmat I was just looking at it again
dogbert17 I'm specifically referring to the default case. i.e. "string".comb 11:42
MasterDuke bench: releases .comb for ^100000 11:44
11:44 pierre_ left
benchable MasterDuke: gist.github.com/ee0173e2863fb8b944...332eaefd62 11:45
dogbert17 MasterDuke: cool 11:46
MasterDuke looks like it did get twice as fast between 2016.06 and 2016.07
dogbert17 MasterDuke: indeed
lizmat yeah, but that was not because of changes to .comb itself 11:47
dogbert17 I was working on projecteuler.net/problem=112 in case you're interested
MasterDuke github.com/rakudo/rakudo/commit/efbfdaa 11:48
that's where benchable found the difference
dogbert17 those bots are nifty 11:49
MasterDuke projecteuler.net/problem=60 is what got me started committing to Rakudo 11:51
been stuck/working on that one for a long time now
dogbert17 That one I haven't solved :( 11:52
MasterDuke it's why i wrote github.com/MasterDuke17/List-Combinations 11:53
because the core combinations() was too slow 11:54
dogbert17 nice, I actually managed to solve 112, and comb definitely played a part, but the code took like 6 minutes to run on my machine 11:56
replacing comb with some % and div trickery reduced the time to approx one minute 11:57
MasterDuke nice. my Perl 5 solution takes 6 seconds 11:58
using a 'split //' 11:59
dogbert17 yeah, there's still some work to be done although some other problems which I solved earlier in the year have become much faster thx mainly to lizmat++ and jnthn++
12:02 holyghostoo left
MasterDuke yep, no arguments there 12:05
moritz m: say 300 / 6
camelia rakudo-moar 589061: OUTPUT«50␤»
moritz that's decent. The factor used to be around 100 or 200 for common tasks 12:06
dogbert17 moritz: speed is definitely improving
12:06 itaipu left 12:09 kid51 joined 12:13 MorayJ left 12:18 smls_ joined, smls left, ufobat left 12:19 smls_ left 12:21 gnull left 12:25 canopus left 12:31 pierre_ joined 12:32 itaipu joined 12:33 aries_liuxueyang left, canopus joined 12:34 MorayJ joined 12:35 cyphase left 12:39 itaipu left, aries_liuxueyang joined 12:42 cyphase joined 12:45 MorayJ left, stmuk joined 12:48 stmuk_ left 12:51 freezerburnv_ joined 13:00 freezerburnv_ left, hcit joined 13:03 canopus left 13:07 kid51 left 13:10 canopus joined 13:11 kid51 joined 13:12 marcovorg is now known as marcorg 13:14 canopus left 13:21 canopus joined 13:31 freezerburnv_ joined 13:33 stmuk_ joined 13:35 canopus left, stmuk left
RabidGravy boom! 13:38
13:41 canopus joined
RabidGravy I was thinking about that metaphone thing and unicode, seeing as metaphone (and soundex) are pretty useless for anything other than ascii words 13:43
is there a reliable way of knowing for a given character whether it is based on a latin character (in the rakudo implementation)? 13:45
13:47 lucar joined
lucar Hi there 13:47
how does the perl6 repl compare with Common Lisp? 13:48
does it support interactive coding ?
DrForr As far as I know, yeah. It lets you type in code, read it, eval's it and prints it, just like CL. 13:49
lucar great
arnsholt The Perl 6 REPL isn't as functional as you'd get from something like SBCL
lucar ah 13:50
arnsholt You can write code and stuff, but the interactive debugging isn't there
lucar oh
is it planned?
arnsholt I'm pretty sure much of the interactive debugging you get in a CL could be implemented, but we haven't had quite the same amount of development time to implement it either
lucar so you cannot break in the middle of a stacktrace
do something similar to "recompile" a form 13:51
arnsholt Exceptions are resumable and such, but there's no infrastructure in the REPL to manipulate it
lucar and then continue debugging right?
arnsholt And remember that live programming in a REPL is less useful in Perl 6, since the distributable program is your source code, not a serialized image of the virtual machine state 13:52
So you can't really build up a whole app purely by REPL manipulations and then save that out
lucar interactivity is always useful arnsholt 13:53
arnsholt Sure, but it's a bit different from CL
13:53 skids joined
lucar you seem to be very knowledgeablel arnsholt 13:53
are you one of the perl6 core developers? 13:54
arnsholt I wouldn't call myself core, but I've certainly contributed to internals-stuff 13:55
(And I've used CL, which helps =)
lucar that I was able to bet on 13:56
I guess SBCL on Linux
:P
arnsholt Allegro Common Lisp, but Linux =)
lucar ah
ACL
ok
so you do that for a living
interesting
arnsholt Not for a living, as such
lucar and why a commercial distribution then? 13:57
arnsholt I was in academia, and my boss (and advisor) had a site licence for an app he made ages ago
It's still expensive in academia, but not quite as insane as commercially, I b elieve
lucar ok
so you did that in a research context 13:58
understood
as far as you know 13:59
is there anything that is on par with CL interactivity and has good support on windows?
DrForr A good Linux VM? :) 14:00
arnsholt SmallTalk is pretty neat
I've dabbled with it recently, and the fact that the code lives *in* the image is pretty cool
DrForr Any of the Scheme environments, what used to be called DrScheme comes to mind. 14:01
arnsholt Especially since it means that the state of your program in the image and the source code will never get desynched, which can happen if you're unlucky in CL
mst DrForr: yeah, I wish the lisp community would make more of a racket about it
DrForr Snerk :)
arnsholt *groan*
Phrao ST should have good Windows support I think 14:02
*Pharo ST
Xliff Hrm.
\o #perl6
arnsholt o/ 14:03
Xliff I'm trying to run a nativecall sub that's defined like "sub nca(int32) returns blah is native('bleah') { * }" and I want to pass it a null value.
arnsholt What do you mean NULL? It's a native =) 14:04
You can always pass 0 of course, but natives don't have nulls
Only pointer values have nulls
Xliff So I do "nca(int32)", which should work. However, I am getting the following error "Cannot unbox a type object
in method CALL-ME"
Oh, duh
arnsholt That's an LTA error message, but yeah 14:05
Xliff LTA?
This channel needs a glossary. =) 14:06
DrForr Less Than Awesome
mst Less Than Awesome
arnsholt Or sucks, if you're feeling impolitic =) 14:07
mst it's the Minnesota Nice way of saying "this error is crap and we hate crap errors and want to keep culturally reinforcing this so people remember to go and un-crap them"
14:07 sjoshi joined 14:09 sjoshi left
arnsholt "Minnesota nice" was a neat term 14:10
pmurias mst: isn't LTA more about error messages (and other things) actually being good rather than barely un-crappy? 14:11
arnsholt And feels quite familiar, to a Scandinavian =)
mst pmurias: that's hair splitting, really 14:12
14:12 smls joined
mst I mean, sure, if you don't want to be mean, then you can set the bar for 'crap' low enough that's true 14:12
but the whole point of LTA is *it* is the nice version 14:13
once you de-nice it, 'barely un-crappy' can be better written as 'crap', and what a nice person would call 'crap' can be written as '-ing terrible'
which is basically the entire point I was making :)
14:23 lucar left
smls How can I make an IO::Socket::Async server not die with "Unhandled exception: Malformed UTF-8" when a client sends it an invalid byte? 14:23
14:23 lucar2 joined
smls I tried adding a CATCH to every block, but the exception eludes them... :P 14:24
14:30 lucar2 left
smls see gist.github.com/smls/ebd59307cb913...08e4358625 14:30
14:31 andrzejku joined
moritz smls: use it binary mode? 14:38
smls Too cumbersome
pmurias mst: what I meant is that LTA is often used when a error message that would be acceptable in some other communities can be turned into something awesome
smls moritz: I don't actually want to do anything with binary data, I just don't want any client to be able to crash the server at will 14:39
mst pmurias: yes, and once you de-nice it, that means "raising the level below which it's considered crap"
moritz smls: have you tried a try?
14:39 andrzejku left
mst pmurias: again, the different conceptualisations are -exactly- that I'm looking at here # trout.me.uk/you.jpg 14:40
moritz or isn't there a way to give a supply an error callback?
smls moritz: 'try' doesn't seem to help 14:41
and no error handling mechanism seems to be documented in docs.perl6.org/type/IO::Socket::Async 14:43
Tried replacing «whenever $conn.Supply» with «$conn.Supply.tap: ..., quit => { .say }» but that doesn't change anything. 14:49
14:49 harmil joined
RabidGravy can't you set an unhandled exception handler on the scheduler? 14:55
smls Where do I get IO::Socket::Async's scheduler from? 14:56
RabidGravy by default it's $*SCHEDULER I think ? 14:57
harmil Man, some days you just can't win. Tried to post a little tutorial on defining operators on reddit... end up with someone flaming me over module naming :-( I still think it's important to keep the /r/perl6 active, but man it's draining! 14:58
On another topic, I was playing with introspection and automatic signature documentation yesterday, and I found something odd that I don't understand... 14:59
RabidGravy flamers gonna flame
DrForr Open source: biting the hand that feeds it for 20 years. 15:01
smls RabidGravy: «$*SCHEDULER.uncaught_handler = { .say }» at the beginning of the program, doesn't help. 15:02
harmil m: class Foo { method bar() {} }; say Foo.^methods.map: {"{.name}={.WHAT.perl}"}
camelia rakudo-moar 146e18: OUTPUT«(bar=Method)␤»
harmil That makes sense to me...
m: class Foo { method bar() {} }; say Foo.^methods>>.WHAT
camelia rakudo-moar 146e18: OUTPUT«(List)␤»
harmil That doesn't. Am I missing something? 15:03
smls harmil: .WHAT doesn't work with hyper operators
harmil AH
smls: thanks
smls because .WHAT is not actually a method, it's special syntax that pretends to be one... :P
Maybe it could be made to work with hypers, but so far that hasn't been done 15:04
I suppose it should at least be made an error, though... 15:05
harmil In this case, I'm getting sensible info: 15:07
m: class Foo { method bar() returns Str:D {} }; say Foo.^methods.map: {"{.name}={.WHAT.perl}, returns {.returns.perl}
camelia rakudo-moar 146e18: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unable to parse expression in double quotes; couldn't find final '"' ␤at <tmp>:1␤------> 3e}={.WHAT.perl}, returns {.returns.perl}7⏏5<EOL>␤»
harmil Opps...
m: class Foo { method bar() returns Str:D {} }; say Foo.^methods.map: {"{.name}={.WHAT.perl}, returns {.returns.perl}"}
camelia rakudo-moar 146e18: OUTPUT«(bar=Method+{Callable[Str:D]}, returns Str:D)␤»
harmil Okay, so that Method+... is there a way to programatically ask for just the non-addition part. In other words, I want something that will Str as "Method". 15:08
smls .^name
I guess
harmil Also on the Str:D... that type has a "definedness" requirement. Is there a way I can ask for the type and the requirement as separate, testable attributes?
m: class Foo { method bar() returns Str:D {} }; say Foo.^methods.map: {"{.name}={.WHAT.name}, returns {.returns.perl}"} 15:09
camelia rakudo-moar 146e18: OUTPUT«Cannot look up attributes in a type object␤ in block at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
smls hm no, I guess .^name also includes the stuff after the +
harmil If I have to go scrounging in its inheritance, I can... was just hoping there was a way to ask the simple question directly. 15:10
15:11 marcorg is now known as mavorg
ugexe i dont even understand your question 15:11
harmil ugexe: I'm asking, given a type that's "Method+{Callable[Str:D]}" I want to know what expression I can apply to that type which will tell me that in essence, it's "Method". 15:12
smls m: my method bar() returns Str {}; say &bar.^name;
camelia rakudo-moar 146e18: OUTPUT«Method+{Callable[Str]}␤»
smls m: my method bar(--> Str) {}; say &bar.^name;
camelia rakudo-moar 146e18: OUTPUT«Method␤»
15:13 telex left
harmil Uh... am I misunderstanding what "returns" is for or does that not make any sense? 15:13
smls harmil: Seems weird to me too
A leaking implementation detail maybe?
harmil methinks
ugexe there are odd differences between (--> RetType) and returns RetType that shouldnt exist 15:14
github.com/rakudo/rakudo/pull/798 15:15
smls harmil: As a work-around, you can use .^name.split("+")[0] I suppose...
ugexe see the last comment
smls or .^name.match(/<-[+]>+/).Str
harmil Should I rakudobug that? 15:16
15:16 sena_kun joined
harmil smls: Yeah, text manipulation is definitely doable. I was just seeing if there was a more type-friendly way. 15:18
Looks like no
smls Yeah, probably good to rakudobug it 15:19
ugexe is .^methods ever *not* going to return something that is /^Method+/ ? Seems implied otherwise
smls ugexe: Look at the Grammar class, you'll get some NQPRoutine's instead of Method's... :) 15:20
ugexe NQPRoutine is always ruining my fun 15:21
smls see RT #125518
synopsebot6 Link: rt.perl.org/rt3//Public/Bug/Displa...?id=125518
15:21 FROGGS left
dalek c: 631c34f | Altai-man++ | htmlify.p6:
Fix for the fall-out of github.com/perl6/doc/pull/632
15:25
15:26 nowan left
sena_kun .tell AlexDaniel you can re-run checklink because of github.com/perl6/doc/commit/631c34...39aff62f0f - the output should be much better. 15:26
harmil The other item is this one:
yoleaux sena_kun: I'll pass your message to AlexDaniel.
harmil m: sub foo() returns Str:D {}; say &foo.signature.returns.^name
camelia rakudo-moar 146e18: OUTPUT«Str:D␤»
harmil This is another case where I could regex match the :D, but I'd like to just ask the type if it's definite. Can I do that? 15:27
geekosaur m: my $s; say so $s.DEFINITE 15:28
camelia rakudo-moar 146e18: OUTPUT«False␤»
15:28 telex joined
harmil geekosaur: ah, I had not tried all caps, thanks 15:28
geekosaur or maybe you want .defined, there are slight differences
15:28 nowan joined
harmil Hmm... nope, DEFINITE and defined are both false 15:29
m: sub foo() returns Str:D {}; say &foo.signature.returns.DEFINITE
camelia rakudo-moar 146e18: OUTPUT«False␤»
harmil m: sub foo() returns Str:D {}; say &foo.signature.returns.defined
camelia rakudo-moar 146e18: OUTPUT«False␤»
geekosaur oh, the type not a value
harmil Right
15:29 pmurias left
arnsholt unmatched}: What do you mean "watch our editor grind to a stuttering halt"? Vim handles it fine =p 15:32
llfourn m: sub foo() returns Str:D {}; say &foo.signature.returns.HOW.^name
camelia rakudo-moar 146e18: OUTPUT«Perl6::Metamodel::DefiniteHOW␤»
llfourn m: sub foo() returns Str:D {}; say &foo.signature.returns ~~ Metamodel::DefiniteHOW 15:33
camelia rakudo-moar 146e18: OUTPUT«False␤»
llfourn m: sub foo() returns Str:D {}; say &foo.signature.returns.HOW ~~ Metamodel::DefiniteHOW
camelia rakudo-moar 146e18: OUTPUT«True␤»
geekosaur you can also smartmatch it against a type object
15:40 mcmillhj joined 15:41 brrt joined
harmil geekosaur: thanks for the tip. Seems shocking that there's no convenient way to do that (e.g. a method) 15:42
15:44 pierre_ left 15:45 mcmillhj left 15:46 heatsink joined
moritz m: sub foo() returns Str:D {}; say &foo.signature.returns.^name 15:52
camelia rakudo-moar 146e18: OUTPUT«Str:D␤»
moritz m: sub foo() returns Str:D {}; say &foo.signature.returns.HOW.^name 15:53
camelia rakudo-moar 146e18: OUTPUT«Perl6::Metamodel::DefiniteHOW␤»
15:54 mcmillhj joined 15:59 mcmillhj left 16:00 BenGoldberg joined, Some-body_ joined 16:01 Some-body_ is now known as DarthGandalf 16:05 brrt left 16:13 mcmillhj joined
Xliff So LTA == Less Than Awesome 16:17
Wow! Learn something new every day.
timotimo check out the whole os S99
i.e. read S99:everything 16:18
synopsebot6 Link: design.perl6.org/S99.html#everything
Xliff Soooo....
16:18 mcmillhj left
Xliff If I have a C routine that takes a pointer to an int32, but also allows null.... how would I define that? 16:18
sub thisTakesIntPtr(int32) returns int32 is native('bleah') 16:19
That won't work.
16:19 andrzejku joined
timotimo yeah, you'd define it as taking Pointer[int32] 16:19
Xliff Ahh...
And then passing NULL would be "thistakesIntPtr(Pointer)"? 16:20
Or
And then passing NULL would be "thistakesIntPtr(Pointer[int32])"?
timotimo probably the latter
Xliff kk
timotimo++
timotimo BBL
Xliff (timo++) x 2? 16:21
But that would be (timo++)(timo++) which isn't arithmatically correct...
BUT would it be equivalent to (timotimo++)++ ???
=)
Xliff goes and sits in a corner. 16:22
16:29 mcmillhj joined 16:31 freezerburnv_ left 16:33 sena_kun left 16:34 mcmillhj left 16:41 khw joined 16:45 mcmillhj joined 16:50 stmuk joined, mcmillhj left 16:51 stmuk_ left 16:55 autarch left, sena_kun joined
andrzejku hello 16:57
smls Hi
timotimo greetings 16:59
17:01 brrt joined
andrzejku I am looking for Perl friend 17:01
17:04 mcmillhj joined
smls just added rosettacode.org/wiki/Chat_server#Perl_6 - please review! 17:08
17:09 mcmillhj left
timotimo i think you should be able to specify an encoding for the connection; utf8-c8 will get you exception-free 17:11
smls Specify how? 17:12
$conn.Supply(:enc<utf8-c8>).lines doesn't help
timotimo is that the right place? 17:13
smls no idea
timotimo right, the docs don't say anything about support for that
smls yeah 17:14
timotimo nqp::asyncreadchars would have to learn about an encoding flag you could pass to it 17:15
smls timotimo: Maybe utf8-c8 should even be the default? 17:16
timotimo don't know
sena_kun smls, you need to just catch an exception, isn't you? try/catch, you know. Did't read your example properly, though.
timotimo it isn't that easy, sena_kun 17:17
smls doesn't control the dynamic environment where the code runs
hm, actually
sena_kun timotimo, ah, then sorry.
smls sena_kun: Tried that, but is seems uncatchable: irclog.perlgeek.de/perl6/2016-08-06#i_12977698
timotimo it's an async thing, so what is the dynamic environment? i suppose it's on the event-loop thread
what you can do, however, is give the Supply a custom $*SCHEDULER that has a different unhandled-exception-callable 17:18
but that seems pretty terrible :)
17:18 mcmillhj joined
sena_kun Async exceptions are a land of pain. 17:18
timotimo i'd like someone to file a bug about encoding errors not being catchable from IO::Socket::Async's Supplies. supplies in general already have an error signalling mechanism, but i'm not sure about recovering from that 17:19
smls ok, I'll RT it 17:20
timotimo thank you
another ticket should be allowing an encoding to be set for the non-binary cases of that Supply method, too
smls yeah, if it accepts :bin it could also accept :enc, just like open() and friends. 17:21
timotimo yup 17:22
maybe someone wants to do a quick scan over the core setting for other cases where we've missed that
17:23 mcmillhj left
timotimo from what i understand, your code should be thread-safe 17:28
wow, cool, mozilla gave USD200,000 to the pypy project 17:30
17:31 mcmillhj joined
smls timotimo: Can any 'whenever' only be entered by one thread at the same time, or only of it is inside a 'react', ot only if it is *top-lvel* inside a 'react'? 17:32
timotimo whenever is - more or less - just sugar for a tap, really
smls but isn't .act the one that prevents multiple threads from entering at the same time? 17:33
timotimo hmm.
i'm not clear on the details, sorry. i haven't really used react/whenever yet
a shame, really
smls I'm in the same boat
17:36 mcmillhj left 17:40 lichtkind joined 17:49 mcmillhj joined 17:50 darutoko left 17:53 mavorg left, mcmillhj left 17:56 lambd0x joined 17:58 kaid joined, kaid left
lambd0x Hi everyone! Can someone help me? I'm having a problem understanding why my code is failing to result true (I'm working with an array of hashes), please see my code: bpaste.net/show/43cd922906ef 17:59
geekosaur unless $word eq any(@hash) # this assumes your array elements are only the words, not Pairs 18:01
and that's not an array of hashes, it's an array of Pairs, meaning what you're trying to write is just a slower reimplementation of a hash using an array 18:02
18:04 andrzejku left, mcmillhj joined
jnthn smls, timotimo: The concurrency control is associated with the supply/react block (more precisely, with each tapping of it). So if you have multiple whenevers inside of a suppy/react, you can be confident that any lexicals declared inside of the supply/react block will be safe (because you get a fresh set of variables per tapping). 18:05
18:06 movl left
jnthn And yes, this includes whenevers nested within whenevers. 18:06
18:06 movl joined
smls Neat, so I guess my code may actually be thread-safe :) 18:06
timotimo cool 18:08
jnthn supply/react blocks really give you 3 things: concurrency control, subscription management, and sugar. 18:09
timotimo right, supplies most importantly don't introduce more concurrenly, unless you specifically ask for it 18:10
18:12 movl left
jnthn On encodings with async stuff: yeah, it needs sorting out. :( Been pondering exactly how to deal with that for a while. I think we should probably have the async at the VM level work in bytes only, and provide a nice streaming decode API (VM-backed - actually using the DecodeStream stuff) so have a thingy you can just shove bytes into and grab chars out of 18:12
(The Perl 6 user-level API would stay just the same, this is just about how we'd implement it) 18:13
18:13 mcmillhj left, movl joined
lambd0x geekosaur: Ok, I wanted in the if statement just to compare keys really and how is the right way of creation an array of hashes? 18:13
*creating
timotimo yes, i've considered making the streaming decoding available via nqp::, too 18:14
jnthn Guess I might take it on while I'm doing other concurrency improvements. :) 18:15
At the moment mostly been bug-squishing though
timotimo that is also much appreciated :) 18:17
jdv79 timotimo: i think i caught enc exceptions with sock async. not sure where the code is... 18:18
18:19 abruanese left, movl left, movl joined
jdv79 looks like i threw the Supply into bin mode and just caught it 18:20
18:20 mcmillhj joined 18:21 kid51 left
jdv79 smls: gist.github.com/anonymous/fd052bd9...6826b90452 18:21
timotimo right, you'd have to do it yourself in that case 18:22
sadly it doesn't do "lines" for you in that case
because we don't offer a streaming encoder/decoder yet
jdv79 yeah. i got lazy cause that just works for now in that use cae 18:24
*case
18:24 mcmillhj left, abruanese joined
timotimo fair enough :) 18:25
18:26 kid51 joined, autarch joined 18:36 andrzejku joined 18:48 edehont joined 18:54 firstdayonthejob joined 18:57 labster joined 18:58 AlexDaniel joined
AlexDaniel . 19:02
yoleaux 15:26Z <sena_kun> AlexDaniel: you can re-run checklink because of github.com/perl6/doc/commit/631c34...39aff62f0f - the output should be much better.
AlexDaniel sena_kun++ # OK! 19:03
19:05 pierrot left
AlexDaniel “I am looking for Perl friend” and nobody answered! How … unfriendly ;) 19:08
19:09 edehont left 19:10 mcmillhj joined
sena_kun AlexDaniel, topic of "friends" is too hard, I suppose. The society situation is: you cannot just say "Okay, I'm your friend" and go with it. It takes years of everyday conversations. 19:11
AlexDaniel right
19:11 itaipu joined 19:12 itaipu left
timotimo i've been approached in the past by at least two people who were apparently used to becoming instant friends with internet strangers 19:12
it was a strange experience for me, i must admit
19:14 mcmillhj left 19:15 brrt left
TimToady AlexDaniel: we've already had this conversation, see irclog.perlgeek.de/perl6/2016-08-02#i_12956402 19:23
AlexDaniel ah ok :D 19:24
19:28 movl left, movl joined 19:30 rpburkholder left 19:37 domidumont joined 19:38 mcmillhj joined 19:42 mcmillhj left 19:43 AlexDaniel left, domidumont1 joined 19:44 AlexDaniel joined 19:45 Tonik left 19:46 domidumont left 19:47 kaare_ left 19:48 canopus left 19:52 canopus joined 19:55 zakharyas joined 19:59 domidumont1 left 20:03 TEttinger joined 20:07 rpburkholder joined
AlexDaniel sena_kun: github.com/perl6/doc/issues/561 20:11
\o/
20:11 mcmillhj joined
sena_kun AlexDaniel, 8.5~ thousand were fixed by one line change, it's good. 20:16
20:17 mcmillhj left
sena_kun AlexDaniel, it seems I have some bad news. The work-around we merged now pulls yet another change in the links generation scheme. It's not good. We need to investigate it further, I suppose. 20:21
AlexDaniel, do we have some policy/standart where linking scheme was discussed or it's the site-oriented problem? 20:23
20:26 Ben_Goldberg joined 20:27 heatsink left 20:29 BenGoldberg left 20:33 andrzejku left
AlexDaniel sena_kun: I don't know 20:39
sena_kun: I've never seen it
20:39 smls left
sena_kun AlexDaniel, the thing is, you know. 20:40
AlexDaniel do I? :) 20:41
sena_kun If it's "in-house" thing, then we can resolve it in two ways: we can change generation process of all the docs internal links so they'll become consistent. We can revert this work-around and change Pod::To::Html in a way that double-links will be separated with something like number(now they're differentiated by type, obviously). But if it's a "Pod thing", not just the site link scheme, we need to ask guys who are responsible for a pod 20:43
internal links about how we can solve this problem.
20:43 mcmillhj joined
moritz m: say [] ~~ Poitional:D 20:44
camelia rakudo-moar c1fdcb: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared name:␤ Poitional:D used at line 1. Did you mean 'Positional'?␤␤»
moritz m: say [] ~~ Positional:D
camelia rakudo-moar c1fdcb: OUTPUT«True␤»
moritz m: say [] ~~ Positional:U
camelia rakudo-moar c1fdcb: OUTPUT«False␤»
20:48 mcmillhj left, setty2 left
sena_kun AlexDaniel, personally, I'd want to ask an authors of the original htmlify.p6 and, probably, Pod::To::Html about their thoughts on this problem. TL;DR: this "duplicated id's" problem is not easy. It's more a design issue, than actual bug. 20:50
20:50 rba_ left
moritz as the original author of htmlify.p6, my thoughts were "this is a hard problem, let's defer this to get anything done" 20:50
AlexDaniel sena_kun: perhaps it is a good idea to create a new issue?
moritz with the slight hope that the Pod::To::Html maintainers would eventually come up with a good solution 20:51
20:51 andrzejku joined
sena_kun moritz, we need some differentiation. Type is a good one, but I'm not really sure should we change all our site scheme to this? It seems like a somewhat dirty practice. Or it's just me. Thanks for your reply, though. 20:53
moritz sena_kun: my idea was more to simply add a counter
so if there are two headings Foo, the first one gets id="Foo", the second one gets id="Foo__2" 20:54
lambd0x Folks, I'm starting to learn how to deal with hash and don't know if I'm doing something wrong or else, but both conditions which are opposites returns True in my code: bpaste.net/show/b43be562969b
moritz that's something that would work in Pod::To::Html independentl of htmlify
sena_kun AlexDaniel, we already have an old one, I don't think we need one another. And lately we have a bit too much issues opened. It's my weekend today and I want to just sit and relax, but tomorrow I'll look into this, of course.
AlexDaniel sena_kun: sure 20:55
moritz lambd0x: if you want to check if a key is already in a hash, use %hash{$key}:exists
$word eq any(%hash.keys); is linear runtime, whereas %hash{$word}:exists is constant 20:56
sena_kun moritz, it's a good idea(with counters), I mentioned it previously. I can look into it, does this counter fix go to htmlify or pod::to::html?
moritz sena_kun: Pod::To::Html 20:57
sena_kun moritz, thanks.
lambd0x moritz: thank you
moritz lambd0x, sena_kun: you're welcome 20:58
20:59 mcmillhj joined 21:00 CIAvash left
timotimo sena_kun: thank you for your efforts btw :) 21:01
sena_kun Our next goal with the checklink output is to solve github.com/perl6/Pod-To-HTML/issues/14 with, most likely, counters. Probably, I'm done for today. I'm still here and can reply, but will be somewhat busy and not so quick.
timotimo, perl6 users are welcome. (: 21:02
timotimo \o/
moritz wow, my first rakudo patch in a long time, and the setting still compiles 21:03
sadly, "use Test" blows up :/
timotimo oh!
what are you working on, moritz? :)
moritz timotimo: I want to make sigil-implied types definite 21:04
timotimo: so @ -> Positional:D instead of Positional
(would need to be guarded by language version)
dalek c: fbe8525 | Altai-man++ | / (18 files):
This commit adds new pod config option: 'signature', and adapts current type documentation to it's usage instead of brackets addition.
c: ab1f2b0 | (Wenzel P. P. Peppmeyer)++ | / (18 files):
Merge pull request #814 from perl6/signature-test-option

New pod config option: 'signature'
moritz but first i just want to experiment with how easy it is to do, and hwo much damage, if any, it causes
timotimo i've tried that in the past, too! :) 21:05
moritz Type check failed in binding to &by; expected type Callable:D cannot be itself
21:05 mcmillhj left
timotimo did you make sure to not put a :D on nameds? 21:05
because those are actually optional :)
21:06 harmil left
gfldex . 21:07
yoleaux 02:36Z <AlexDaniel> gfldex: see irclog.perlgeek.de/perl6/2016-08-06#i_12976146 and the discussion that follows. Perhaps you'll have an idea on how we can improve the docs to make it less WATy
moritz I didn't :/
timotimo: seems you got further than me so far. What were your experiences?
beside the named thingy :-)
m: say Positional:D[Int] 21:10
camelia rakudo-moar c1fdcb: OUTPUT«(Positional:D)␤»
moritz m: say Array[Int].new(1) ~~ Positional:D[Int]
camelia rakudo-moar c1fdcb: OUTPUT«True␤»
moritz wow, I didn't quite realize how generic that mechanism was :-)
21:10 sufrostico joined
timotimo i tried it, the spec tests blew up, i stopped trying it 21:12
moritz oh, I also shouldn't apply it to optional stuff :-)
21:14 BananaMagician joined
timotimo oh, yes :D 21:15
21:18 BananaMagician left
gfldex sena_kun: the problem with addint a counter to disambiguate headings is that reordering sections in a .pod6 may break links or even mix links up. So we end up with a link that works (as seen by automatic tools) but points to the wrong thing. 21:19
moritz timotimo: do you still have your patch somewhere? 21:20
gfldex: I don't think it's a big problem. Duplicate IDs usually come from "=head2 method foo" that's both in a class in a class it inherits from 21:21
gfldex sena_kun: the inherent problem is that a anchor is derived from the heading automatically without giving the pod-author a chance to intervene. A better solution would be an option on the heading or to check if a X<> is embeded in the heading.
moritz gfldex: and those methods from inherited classes are listed in most-specific-first order
timotimo moritz: let me look
i've called it definedness_for_hash_and_arr_sigil 21:22
moritz gfldex: so you tend to automatically link to the most specific one, which is usually what you want
timotimo: ah, thanks
timotimo: any specific reason you didn't include & in the mix?
timotimo gist.github.com/timo/306af382ad5a1...e47abf12d9 21:23
21:23 sufrostico left
timotimo no clue 21:23
moritz timotimo: ok, thanks 21:25
my approach was to call create_definite_type in method typename in Actions
but that's too early, because the ? modifier that makes params optional comes after that 21:26
21:27 BananaMagician joined
moritz timotimo: so far, I get remarkably few spectest failures with your patch 21:32
(now at S15, and only one test file failed so far) 21:33
anyway, will look at it more tomorrow 21:34
timotimo++
will have to quizz jnthn++ on how to do language-version specific behavior
21:36 kerframil joined
timotimo push your stuff already, maybe? :) 21:36
sena_kun gfldex, I didn't get it a bit. We have duplicate ids only on `routine/foo`-like pages and they are generated automatically every time. How reordering of sections can broke them? On normal pages we don't have duplicate ids afaik. Am I wrong? 21:42
gfldex sena_kun: they are automatically generated and that means when we try to change stuff we may break links that are used by hand. It may be better to use the source .pod6 as an extension to the anchor instead of a number. The .pod6 file names are unique. 21:48
sena_kun gfldex, it's almost the same as the type name, isn't it? The only thing to do is to move type/name adding from htmlify to pod;;to;;html and make it "official". 21:51
21:52 zacts joined
sena_kun gfldex, yes, you're totally right about hand-written links, I've forgotten about them already. Types/names are surely better for this purpose. 21:52
21:53 zakharyas left
gfldex sena_kun: Pod::To::BigPage used counters a lot and I painted myself into a corner with them. Had to change some of them and using using the source filename worked well. 21:53
sena_kun gfldex, looks like a great solution then. 21:54
gfldex, thanks for your advice.
21:56 mavorg joined, andrzejku left 21:58 rindolf left 22:05 wamba left 22:07 cog_ joined 22:08 cognominal left 22:12 Ben_Goldberg left, mcmillhj joined 22:17 mcmillhj left 22:18 canopus left 22:23 canopus joined 22:35 BananaMagician left, pierrot joined 22:42 BananaMagician joined 22:50 RabidGravy left 22:53 rpburkholder left
lambd0x Ohhh I was having an odd error in my code that was kicking me for about an hour or so... in repr discovered shape is not implemented... :( 23:07
timotimo it's partially implemented
what exactly are you missing?
lambd0x m: for 1,3...20 -> $value { $value++; say $value; } 23:08
camelia rakudo-moar 0de139: OUTPUT«Cannot resolve caller postfix:<++>(Int); none of these signatures match:␤ (Mu:D $a is rw)␤ (Mu:U $a is rw)␤ (Int:D $a is rw)␤ (int $a is rw)␤ (Bool:U $a is rw)␤ (Bool:D $a is rw)␤ (Num:D $a is rw)␤ (Num:U $a is rw)…»
timotimo ah
lambd0x timotimo: like this ahahha
timotimo well, you can't do that, because the $value isn't writable
m: for 1, 3 ... 20 -> $value is copy { $value++; say $value }
camelia rakudo-moar 0de139: OUTPUT«2␤4␤6␤8␤10␤12␤14␤16␤18␤20␤»
lambd0x hum... but shouldn't the compiler tell it then?
timotimo when you ask for a copy, you'll get something writable 23:09
yeah, the compiler should see that there's only candidates with "is rw" and complain about that in more detail ... perhaps
lambd0x because in the middle of the code it nor said it was readonly nor said something related to shape not implemented
timotimo that has nothing to do with shape
lambd0x timotimo: hm... 23:10
timotimo: you see my confusion for this exatcly error was hapenning and repr told me about shape in my compiler...
but anyway 23:11
I can therefore solve this marking "$value is copy" right?
23:11 firstdayonthejob left
lambd0x m: for 1,3...20 -> $value is copy { $value++; say $value; } 23:12
camelia rakudo-moar 0de139: OUTPUT«2␤4␤6␤8␤10␤12␤14␤16␤18␤20␤»
timotimo that's a way to make it work, yes
lambd0x yeah \o/
timotimo please paste the exact code and error output that mentions something with shape
i am now interested. you cannot get away from me >:)
lambd0x timotimo: timotimo just a minute please :P 23:14
timotimo but don't just paste it into the irc :) 23:15
gist or something please :)
lambd0x timotimo: was trying... but how to pastebin from repr? 23:16
haha
23:17 sno left
lambd0x another thing if I put that same code in a script it gives another error, nothing related to shape, but in repr it does... 23:17
23:17 margeas joined
timotimo what are you on, windows? 23:18
lambd0x look:bpaste.net/show/c7f1db406810
Linux
timotimo just select all of it, right-click "copy", go to pastebin, paste
i don't understand why it'd be different for the repl compared to any other console thing 23:19
23:19 mavorg left
lambd0x timotimo: ah, usually I do everything from bash itself.. 23:19
timotimo ah, well, copying/pasting is a function of the terminal emulator, not the programs in it 23:20
because you want both the input and the output
lambd0x pastebin.com/i8eB8nEU 23:22
timotimo you forgot a space there
m: -> $foo{1,2,3} { say "test" } 23:23
camelia rakudo-moar 0de139: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Shape declaration is not yet implemented; please use whitespace if you meant something else␤at <tmp>:1␤------> 3-> $foo7⏏5{1,2,3} { say "test" }␤ expecting any of:␤ shape declaration␤»
lambd0x timotimo: hm.. ahaha
timotimo m: -> $foo {1,2,3} { say "test" }
camelia rakudo-moar 0de139: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unexpected block in infix position (missing statement control word before the expression?)␤at <tmp>:1␤------> 3-> $foo {1,2,3}7⏏5 { say "test" }␤ expecting any of:␤ infix␤ in…»
timotimo did you see the "please use whitespace if you meant something else"
and the eject sign is exactly between $foo and {1, 2, 3}
lambd0x forget about then, sorry for worrying you 23:24
:P
timotimo i can't imagine how the error message could be made better here :)
lambd0x maybe, "put a space there man!"
ahahah
timotimo: I'm just starting to code more in perl6 so I think it's just a common mistake new learners will do when using loops and for statements with {..} 23:26
timotimo we've wondered about making a module that makes error messages ... let's say "less polite" :)
lambd0x timotimo: but I seriously think the messages are ok really.
timotimo: that would be fun 23:27
timotimo OK :)
23:28 rall joined
lambd0x timotimo: you see, I've starting to just try coding in perl6 about three days ago and I consider that I've learned a lot thus far. 23:28
timotimo oh, ok!
that's cool :)
lambd0x yeah ;) 23:29
here we can count on people really and the language itself if simple (so far for what I've tried)
timotimo hm 23:30
simple? maybe ... it's definitely well put-together to make learning it easier
23:30 aries_liuxueyang left
timotimo so many places where there's no "special case" you have to learn 23:30
because everything is re-used all over the place :)
lambd0x I came from C programming...might be because of this I think perl6 sintax is simpler hahaha
timotimo signatures, for example. they really appear everywhere
lambd0x timotimo: I see. 23:31
timotimo and Smart Matching 23:32
lambd0x timotimo: why is that is better "if @var2[$var1]:exists" instead of "if $var1 eq any(@var2)" ? 23:34
timotimo it's two entirely different things
lambd0x timotimo: ok
AlexDaniel lambd0x: wow, well… because it is much faster
timotimo @var2[$var1]:exists tells you if at position $var1 there's something in @var2 23:35
AlexDaniel ah no, that's not a hash
ignore my message
timotimo and the eq any(@var2) is "is any value inside @var2 string-equal to $var1?"
lambd0x what?
ahah
timotimo like "is slot 10 occupied in this array?" vs "is there a '10' in this array?"
lambd0x AlexDaniel: ok :)
23:35 margeas is now known as mavorg
lambd0x timotimo: I see 23:36
timotimo: that's so nice we have this operator \o/
23:36 mcmillhj joined
lambd0x timotimo: simplified my code a bit (probably speeding it up a bit too) 23:37
timotimo in general, we differentiate between positional access, i.e. @blah[$foo], and associative access, i.e. %blah{$foo}
better have tests to make sure it's not only faster, but also "not less correct" ;)
AlexDaniel lambd0x: I was thinking about one of your first pastes :) and now I looked at it again and saw this: “my @hash;” – heh…
lambd0x AlexDaniel: learned my lession there, friend. ahaha
AlexDaniel: I thought that was how an array of hashes where declared 23:38
ahah
*were
*was... and also read perl.org for some literature 23:39
it helped me out a lot 23:40
23:40 aries_liuxueyang joined, rall left
timotimo huh, perl.org? 23:40
AlexDaniel interestingly, you can use $ sometimes and it works just fine 23:41
m: my $arr = [1, 2, 3, 4]; say $arr.grep(* %% 2)
camelia rakudo-moar 0de139: OUTPUT«(2 4)␤»
lambd0x timotimo: perl6.org (think about the hidden 6 there haahha)
AlexDaniel m: my @arr = [1, 2, 3, 4]; say @arr.grep(* %% 2)
camelia rakudo-moar 0de139: OUTPUT«(2 4)␤»
23:41 mcmillhj left
AlexDaniel it is not as convenient, but still worth mentioning :) 23:41
timotimo ah 23:42
lambd0x AlexDaniel: think perl5 users will like knowing that ;)
timotimo yeah, when perl6 thinks you have a @-sigiled thing on the LHS of a =, it'll become a list-assignment
something that i'm not 100% happy about 23:43
lambd0x timotimo: do you think there is a better way to handle it all?
AlexDaniel m: my @arr = [1, 2, 3, 4],; say @arr.grep(* %% 2) # is that what you want instead? 23:44
camelia rakudo-moar 0de139: OUTPUT«([1 2 3 4])␤»
lambd0x timotimo: or for now it's ok...
well, thank you all for solving my doubts :) 23:45
timotimo i think it's all right, the list-assignment thing 23:46
as always, it's a trade-off. but i think this one was well-chosen. it's just an icky situation in general
lambd0x timotimo: sweet. 23:47
23:49 mcmillhj joined
lambd0x man I had so much trouble undestanding hash uses.. but finally managed to create an interesting code \o/ : bpaste.net/show/35b17143f4e8 23:50
receives integers and count the amount of each typed by the user :) 23:51
timotimo yeah, you're not used to having hashes when you come from C :P
that's ... weird code 23:52
lambd0x timotimo: indeed.
timotimo: why...is it bad coded?
timotimo i don't get why you have the if %hash{$word}:exists twice?
lambd0x ah I wanted to get conditions separated... 23:53
unless if like !if
timotimo no, i mean in the first line
23:54 mcmillhj left
timotimo another few things 23:54
lambd0x timotimo: ah, I was trying to get the result of that very expression from a for statement that would iterate that very case, but couldn't get right how to get $keys and $values too. 23:55
timotimo you don't get a lot of mileage out of the :kv, because the key is always going to be the value you put in via $word
i also don't understand why you iterate there at all
like, how would you expect the hash to store more than one thing under one key? :)
sena_kun lambd0x, hashes are just maps. Or dictionaries. I'm not sure about C, but C++ has template-based map type included.
lambd0x timotimo: hm, I though each position stored a pair (key, value) and had to iterate until I find the one I wished to... 23:56
that's why I did it...
*thought. 23:57
sena_kun Perl6intro and article on learnxinyminutes are good to read first.
timotimo nope :)
gfldex m: my %seen; for $*IN.words { %seen{.Str}++ }; %seen.sort({$^a.value < $^b.value}).say
camelia rakudo-moar 0de139: OUTPUT«(mo => 9 a => 8 le => 5 is => 5 ag => 4 an => 4 Ghaoth => 4 ghlas’ => 3 go => 3 gach => 3 Dobhair. => 3 na => 3 Dhún => 3 i => 3 slán => 3 gan => 3 ar => 2 bhí => 2 gleanntáin => 2 beag => 2 dom => 2 nGall => 2 mise => 2 nár => 2 ’s => 2 ina => 2 …»
lambd0x sena_kun: ok
timotimo that's what "associative" access is all about
gfldex: why do you use a binary sort closure? why not just *.value? 23:58
gfldex m: my %seen; for $*IN.words { %seen{.Str}++ }; %seen.sort(*.value).say
camelia rakudo-moar 0de139: OUTPUT«(arís, => 1 caor => 1 Agus => 1 Domhain => 1 trom => 1 cluain => 1 rún => 1 Tá => 1 bhuairt => 1 mór => 1 agus => 1 imeacht => 1 ghaoil, => 1 luí => 1 rá => 1 stua => 1 maorga => 1 gur => 1 thar => 1 mnaoi => 1 Ghall; => 1 Lúich’ => 1 siar => 1 ch…»
gfldex m: my %seen; for $*IN.words { %seen{.Str}++ }; %seen.sort(-*.value).say
camelia rakudo-moar 0de139: OUTPUT«(mo => 9 a => 8 le => 5 is => 5 ag => 4 an => 4 Ghaoth => 4 ghlas’ => 3 go => 3 gach => 3 Dobhair. => 3 na => 3 Dhún => 3 i => 3 slán => 3 gan => 3 ar => 2 bhí => 2 gleanntáin => 2 beag => 2 dom => 2 nGall => 2 mise => 2 nár => 2 ’s => 2 ina => 2 …»
sena_kun timotimo, to sort by values, not by keys?
gfldex because I fatsingered .values for .value :->
*fatsingered 23:59
timotimo sena_kun: i just mean it doesn't have to be a closure that takes two arguments
:D
gfldex *fatfingered
timotimo you sang?
ah, ok :)
lambd0x ahahha
sena_kun timotimo, ah, some smart stuff, I'd better run away!