»ö« 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. |
|||
neewbie | hello | 00:02 | |
I have a question, can somebody explain this to me? I did not understand how this operation worked. I know that xx repeats the list. gist.github.com/anonymous/e4cbffe7...eac6693419 | 00:05 | ||
thanks in advance | |||
AlexDaniel | neewbie: well, it's basically <a b c> X <a b c> | 00:08 | |
the docs for X are here: docs.perl6.org/language/operators#...t_operator | 00:09 | ||
neewbie | [X] is the same as [+] in this case? | ||
AlexDaniel | yea | ||
neewbie | thank you =D | ||
AlexDaniel | you can put any infix op inside [] | ||
m: say [gcd] 20, 48, 90 | 00:10 | ||
camelia | rakudo-moar 1aeea1: OUTPUT«2» | ||
AlexDaniel | | is not needed there though | 00:11 | |
neewbie | what | do? | ||
[infix] is like a foldr, right? | |||
AlexDaniel | m: my $x = (2, 5, 8); .say for $x | 00:12 | |
camelia | rakudo-moar 1aeea1: OUTPUT«(2 5 8)» | ||
AlexDaniel | m: my $x = (2, 5, 8); .say for |$x | ||
camelia | rakudo-moar 1aeea1: OUTPUT«258» | ||
neewbie | | extract from the list? | 00:13 | |
and why can you use .say ? i don't understand why can you call a function from nothing is like the $_ inside the for loop? | 00:14 | ||
Geth | oc: bbae187a35 | (Aleks-Daniel Jakimenko-Aleksejev)++ | doc/Language/operators.pod6 Missing comma |
||
AlexDaniel | neewbie: yes, .say is basically $_.say | ||
gfldex | neewbie: see docs.perl6.org/type/Slip | 00:15 | |
neewbie | but is not inside a loop, | ||
>< | |||
AlexDaniel | why not? | 00:16 | |
m: my $x = (2, 5, 8); for |$x { .say } | |||
camelia | rakudo-moar 1aeea1: OUTPUT«258» | ||
AlexDaniel | m: my $x = (2, 5, 8); .say for |$x | ||
camelia | rakudo-moar 1aeea1: OUTPUT«258» | ||
AlexDaniel | same thing | ||
neewbie | .-. | ||
AlexDaniel | neewbie: statement modifiers are mentioned here I think: docs.perl6.org/language/control#if | 00:17 | |
neewbie | thanks gfldex and alexdaniel | 00:18 | |
I'll study more | |||
00:18
stmuk_ joined
00:21
stmuk left
|
|||
xyz_ | neewbie: I think [] is more like foldl. | 00:23 | |
rakudo: sub infix:<op>($a, $b) { "($a + $b)" }; [op] ^10 | 00:24 | ||
camelia | rakudo-moar 1aeea1: OUTPUT«Potential difficulties: Useless use of [op] in sink context at <tmp>:1 ------> 3sub infix:<op>($a, $b) { "($a + $b)" }; 7⏏5[op] ^10» | ||
00:24
AlexDaniel left
|
|||
xyz_ | sub infix:<op>($a, $b) { "($a + $b)" }; say [op] ^10 | 00:24 | |
rakudo: sub infix:<op>($a, $b) { "($a + $b)" }; say [op] ^10 | |||
camelia | rakudo-moar 1aeea1: OUTPUT«(((((((((0 + 1) + 2) + 3) + 4) + 5) + 6) + 7) + 8) + 9)» | ||
00:25
labster joined
|
|||
timotimo | it depends on what operator you use | 00:25 | |
we have left associative and right associative operators | |||
and [] uses that | |||
m: sub infix:<op>($a, $b) is assoc('right') { "($a + $b)" }; say [op] ^10 | |||
camelia | rakudo-moar 1aeea1: OUTPUT«(0 + (1 + (2 + (3 + (4 + (5 + (6 + (7 + (8 + 9)))))))))» | ||
timotimo | see? | ||
neewbie | so complex | 00:27 | |
hartenfels | m: sub infix:<op>(*@xs) is assoc<list> { "(@xs[])" }; say [op] ^10 | 00:29 | |
camelia | rakudo-moar 1aeea1: OUTPUT«(0 1 2 3 4 5 6 7 8 9)» | ||
hartenfels | Oh neat that DWIMs too. | ||
00:38
bwisti left
|
|||
timotimo | anvaka.github.io/common-words/#?lang=pl | 00:44 | |
00:51
bwisti joined
00:53
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
neewbie | cool | 01:00 | |
01:00
agentzh joined
01:01
cdg left
|
|||
sammers | hi #perl6 | 01:07 | |
m: (1..4) ==> grep({ $_ >=2 }) ==> sort; | 01:08 | ||
camelia | ( no output ) | ||
sammers | m: (1..4) ==> grep({ $_ >=2 }) ==> sort ==> say(); | ||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Preceding context expects a term, but found infix ==> insteadat <tmp>:1------> 3(1..4) ==> grep({ $_ >=2 }) ==> sort ==>7⏏5 say();» | ||
sammers | m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say(); | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(2 3 4)» | ||
xyz_ | timotimo: Why is "Xi" an often-used word? | ||
sammers | m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say; | ||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a nounat <tmp>:1------> 3 ==> grep({ $_ >=2 }…» | ||
sammers | why can't I end that feed with say without ()? | 01:09 | |
m: (1..4) ==> grep({ $_ >=2 }) ==> sort; | |||
camelia | ( no output ) | ||
sammers | m: my @a = ((1..4) ==> grep({ $_ >=2 }) ==> sort); say @a; | ||
camelia | rakudo-moar 1aeea1: OUTPUT«[2 3 4]» | ||
sammers | m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> say; | ||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a nounat <tmp>:1------> 3 ==> grep({ $_ >=2 }…» | ||
sammers | m: (1..4) ==> grep({ $_ >=2 }) ==> sort() ==> &say; | ||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Sorry, do not know how to handle this case of a feed operator yet.at <tmp>:1------> 3==> grep({ $_ >=2 }) ==> sort() ==> &say7⏏5;» | ||
01:16
yqt left
|
|||
sammers | xyz_, click on Xi and you can see some of the stats | 01:21 | |
01:24
neewbie left
|
|||
xyz_ | sammers: OK, "$Xi" is used in a Perl file distributed with OpenSSL. That makes sense. :-) | 01:25 | |
01:30
xyz_ left
01:31
cpage_ left
01:32
labster left
|
|||
sammers | timotimo, thanks for sharing that link. | 01:40 | |
xyz_, the most commonly used term for .go files is err | 01:42 | ||
01:54
kupopo joined
|
|||
kupopo | I'm having the darnedest time finding documentation on regex/grammar character classes - docs.perl6.org/language/regexes doesn't really clarify the grammar for character classes at all. How can I express (from P5) [^] ]? | 01:58 | |
(i.e. anything other than whitespace or a close bracket) | |||
brokenchicken | kupopo: <-[\]]> | 01:59 | |
kupopo: oh, wait that also excludes space right? | 02:00 | ||
m: say 'foo] bar' ~~ m:g/<-[\]\ ]>+/ | |||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)» | ||
brokenchicken | m: say 'foo] bar' ~~ m:g/<-[\] ]>+/ | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)» | ||
brokenchicken expected for that to either work or warn :( | 02:01 | ||
m: say 'foo] bar' ~~ m:g/<-[] ]>+/ | |||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in metachar:sym<assert>; couldn't find final '>' at <tmp>:1------> 3say 'foo] bar' ~~ m:g/<-[] 7⏏5]>+/» | ||
brokenchicken | right, so <-[\]\ ]> | ||
<-[]> is the [^] and stuff inside is the stuff you're excluding | |||
kupopo: also, I can recommend filing an github.com/perl6/doc Issue saying you couldn' | 02:02 | ||
t find this info or whatever | |||
kupopo | Thanks - for whatever reason I was under the impression that escaping didn't work in that context. Will do. | 02:03 | |
brokenchicken | kupopo: I see it mentioned here: docs.perl6.org/language/regexes.ht...and_ranges | 02:04 | |
though it took me a minute to find that myself.... and I knew what to look for :( | |||
m: say 'foo] bar' ~~ m:g/<-[\c[RIGHT SQUARE BRACKET]\c[SPACE]]>+/ | 02:07 | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)» | ||
brokenchicken | neat | ||
m: say 'foo] bar' ~~ m:g/<-[ \c[RIGHT SQUARE BRACKET] \c[SPACE] ]>+/ | |||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「bar」)» | ||
brokenchicken | ah, k, I see why it's good that space doesn't work | ||
*doesn't warn | |||
02:08
cale2 joined
|
|||
kupopo | All I see is "You are also allowed to write the backslashed forms for character classes between the [ ] ." | 02:09 | |
And \] is not what I could call a "backslashed form for a character class", so it was a little misleading. Filed github.com/perl6/doc/issues/1146 | |||
m: say 'foo] bar' ~~ m:gs/<-[] ]>+/ | 02:10 | ||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in metachar:sym<assert>; couldn't find final '>' at <tmp>:1------> 3say 'foo] bar' ~~ m:gs/<-[] 7⏏5]>+/» | ||
kupopo | m: say 'foo] bar' ~~ m:g:s/<-[] ]>+/ | 02:11 | |
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in metachar:sym<assert>; couldn't find final '>' at <tmp>:1------> 3say 'foo] bar' ~~ m:g:s/<-[] 7⏏5]>+/» | ||
kupopo | m: say 'foo] bar' ~~ m:g:s/<-[\] ]>+/ | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)» | ||
brokenchicken | need to escape space too | ||
or use \s if you want any whitespace | |||
kupopo | Odd, I had assumed the space was just eaten, so adding :s adverb would solve it | ||
er, : s | |||
brokenchicken | It is just eaten | ||
Oh | 02:12 | ||
hm | |||
kupopo | So :sigspace only applies to outside character classes? | ||
m: say 'foo] bar' ~~ m:g:s/ <-[\] ]>+/ | |||
camelia | rakudo-moar 1aeea1: OUTPUT«(「foo」 「 bar」)» | ||
brokenchicken | I'll file a bug report for that one and have someone take a look if it's supposed to be that way | ||
kupopo | I must be using :sigspace wrong... | 02:13 | |
brokenchicken | kupopo: or it's a bug :P | ||
m: say " " ~~ m:s/<-[ ]>/ | |||
camelia | rakudo-moar 1aeea1: OUTPUT«===SORRY!===Iteration past end of iterator» | ||
brokenchicken | fun :) | ||
Ticket rt.perl.org/Ticket/Display.html?id=130586 | 02:16 | ||
kupopo | gotcha | 02:17 | |
02:19
agentzh left
02:26
kupopo left
02:29
cdg joined
02:50
ilogger2 joined,
ChanServ sets mode: +v ilogger2,
khw joined,
bwisti joined
02:54
TeamBlast joined
03:01
llfourn joined
03:08
cpage_ joined
03:10
leego joined
03:12
llfourn left
03:16
xtreak joined
03:39
Celelibi joined
03:47
cpage joined
03:53
noganex_ joined
04:01
haxmeister joined
|
|||
haxmeister | is padre still maintained? | 04:04 | |
agentzh | can i open a file handle on a Perl 6 string? Like in Perl 5: open my $in, "<", \$str ? | 04:05 | |
dj_goku | agentzh: docs.perl6.org/language/io and | 04:22 | |
agentzh | dj_goku: i read through that file but see no reference on opening a pseudo file from a perl 6 string buffer instead of from the file system. | 04:26 | |
dj_goku: am i missing something obvious here? thanks | |||
dj_goku | I am confused on why you want to open a file handle on a string? | 04:30 | |
sammers | agentzh, I don't think this is possible in p6 | 04:31 | |
BenGoldberg | In perl6, file handles are just objects. So if it doesn't yet exist, you can simply write a class which does what you want. | 04:34 | |
[Coke] | haxmeister: I don't think so; last release was 2013 or so | ||
haxmeister | ok thank you [Coke] .. | ||
[Coke] | agentzh: pretty sure that's already in the ecosystem. | ||
agentzh | thanks for your answers! | 04:35 | |
[Coke] | see IO::String and IO::Blob | ||
agentzh | ah, interesting. thanks | ||
BenGoldberg | m: my $foo = 'abc'; (my $fh = IO::String.new).open( $foo, :bind ); $fh.print: "def"; $foo.say; | 04:40 | |
camelia | rakudo-moar 1aeea1: OUTPUT«Could not find symbol '&String' in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
BenGoldberg | m: use IO::String; my $foo = 'abc'; (my $fh = IO::String.new).open( $foo, :bind ); $fh.print: "def"; $foo.say; | ||
camelia | rakudo-moar 1aeea1: OUTPUT«===SORRY!===Could not find IO::String at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUnit::Re…» | ||
BenGoldberg wonders why .open in IO::String doesn't return self | 04:42 | ||
04:50
khw left
05:17
AlexDaniel joined
05:36
Cabanossi joined
05:58
haxmeister left
06:00
rurban joined,
rurban left,
bwisti left
06:05
labster joined
06:13
bwisti joined
06:34
rurban joined
|
|||
sammers | m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), all(3, 4, 5), "test all"; | 06:34 | |
camelia | rakudo-moar 1aeea1: OUTPUT«not ok 1 - test all# Failed test 'test all'# at <tmp> line 1# expected: all(3, 4, 5)# got: all(3, 4, 5)» | ||
sammers | hmm | ||
m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), (3|4|5), "test all"; | 06:36 | ||
camelia | rakudo-moar 1aeea1: OUTPUT«ok 1 - test all» | ||
AlexDaniel | sammers: well, it should be (3&4&5) | 06:40 | |
and that will give the same output… | |||
expected: all(3, 4, 5) got: all(3, 4, 5) | |||
:| | |||
06:41
agentzh joined
|
|||
sammers | what is the difference between (3|4|5) and (3&4&5)? | 06:43 | |
m: (3&4&5).WHAT | |||
camelia | ( no output ) | ||
timotimo | m: say 4 == (3&4&5) | ||
camelia | rakudo-moar 1aeea1: OUTPUT«all(False, True, False)» | ||
sammers | m: say (3&4&5).WHAT | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(Junction)» | ||
timotimo | m: say so 4 == (3&4&5) | ||
camelia | rakudo-moar 1aeea1: OUTPUT«False» | ||
timotimo | m: say 4 == (3|4|5) | ||
camelia | rakudo-moar 1aeea1: OUTPUT«any(False, True, False)» | ||
timotimo | m: say so 4 == (3|4|5) | ||
camelia | rakudo-moar 1aeea1: OUTPUT«True» | ||
06:45
agentzh left
|
|||
sammers | ok, on this example, is test evaluating expected as a string? | 06:45 | |
m: use Test; is ((1..5) ==> grep({$_ > 2}) ==> all()), all(3, 4, 5), "test all"; | |||
camelia | rakudo-moar 1aeea1: OUTPUT«not ok 1 - test all# Failed test 'test all'# at <tmp> line 1# expected: all(3, 4, 5)# got: all(3, 4, 5)» | ||
sammers | what does that mean? | ||
timotimo | m: use Test; is all(1, 2, 3), all(1, 2, 3), "junk" | 06:46 | |
camelia | rakudo-moar 1aeea1: OUTPUT«not ok 1 - junk# Failed test 'junk'# at <tmp> line 1# expected: all(1, 2, 3)# got: all(1, 2, 3)» | ||
timotimo | m: use Test; ok all(1, 2, 3) eqv all(1, 2, 3), "junk" | 06:47 | |
camelia | rakudo-moar 1aeea1: OUTPUT«not ok 1 - junk# Failed test 'junk'# at <tmp> line 1» | ||
timotimo | it's applying the comparison operation to the junction and it autothreads | ||
the problem is: not all of 1, 2, and 3 equals all of 1, 2, and 3 | |||
because each of 1, 2, and 3 has 2 in the other junction that it doesn't equal | |||
sammers | ah, ok | 06:49 | |
timotimo | by 2 i mean "two of the other values" | ||
have you had a look at the roast tests for junctions to see how they deal with that? | 06:50 | ||
06:50
wamba joined
06:51
RabidGravy joined
|
|||
sammers | on that feed operator, the docs say " it is often required that you call with parentheses (though this is not required for the very last routine/method)." but if you remove the last () from all() like this, 'use Test; is ((1..5) ==> grep({$_ > 2}) ==> all), (3|4|5), "test all";' there is a compile error. | 06:51 | |
06:51
mr_ron joined
|
|||
timotimo | that's an example from the docs? that's bad :) | 06:51 | |
sammers | the example ends on sort | 06:52 | |
but it fails with say | |||
print, printf, one, etc. | 06:53 | ||
docs.perl6.org/language/operators#...entry-feed | |||
this works: | 06:54 | ||
m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> sort | |||
camelia | ( no output ) | ||
sammers | this fails: | ||
m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say | |||
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5===Argument to "say" seems to be malformedat <tmp>:1------> 3> map({ .tc }) ==> grep /<[PE]>/ ==> say7⏏5<EOL>Other potential difficulties: Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or u…» | ||
sammers | timtomo, I should note, the any() test is nothing of signifigance, just testing out odd cases | 06:58 | |
moritz | m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say() | ||
camelia | rakudo-moar 1aeea1: OUTPUT«(People Earth)» | ||
sammers | right | 06:59 | |
moritz, that works fine, but the docs say the final sub/method can ommit the () | |||
it fails on any, all, one, say, print, printf, etc. so I think the docs are wrong or ()-less support hasn't been added to those methods yet? | 07:00 | ||
07:02
domidumont joined
|
|||
moritz | m: <people of earth> ==> map({ .tc }) ==> grep /<[PE]>/ ==> say; | 07:02 | |
camelia | rakudo-moar 1aeea1: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unsupported use of bare "say"; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument, or use &say to refer to the function as a nounat <tmp>:1------> 3> map({ .tc }) ==> g…» | ||
moritz | sammers: not sure which one; in doubt I'd change the docs, because it's easier than changing the parser :-) | 07:03 | |
sammers | timotimo, I will take a look through github.com/perl6/roast/tree/master...-junctions | ||
thanks | |||
ha | |||
moritz, ok, is there somewhere I can find out the intended use? I would like to contribute if possible here. | 07:04 | ||
I can update the docs, but if this is "supposed" to work then maybe I can add a note about how this isn't implemented for all subs / methods yet. | 07:05 | ||
07:05
CIAvash joined
07:10
aborazmeh joined,
aborazmeh left,
aborazmeh joined
07:16
agentzh joined
07:21
agentzh left
07:23
xtreak left
07:26
xtreak joined
07:33
effbiai joined,
effbiai left,
effbiai joined
07:35
bwisti left
07:42
CIAvash left
07:45
Ven joined
07:56
Ven left
07:59
Ven joined
08:02
domidumont left
08:07
domidumont joined
|
|||
moritz | sammers: I guess this is a corner case nobody thought of before, so you'll most likely find nothing in the design docs | 08:08 | |
sammers | moritz: should I add this to RT just to capture it somewhere? | 08:11 | |
moritz | sammers: your choice | 08:12 | |
sammers | ok, I will put something together | 08:13 | |
is it possible to test for the SORRY compile errors? | |||
08:15
Vynce joined
|
|||
sammers | nevermind | 08:16 | |
moritz | X::Comp | ||
sammers | thanks | 08:22 | |
08:26
zakharyas joined
08:27
Ven left
08:30
Ven joined
08:32
aborazmeh left
08:35
wamba left
08:38
agentzh joined
08:43
Ven left,
agentzh left
08:44
melezhik joined
08:45
Ven joined
08:49
dakkar joined
08:55
g4 joined
08:58
mr_ron left,
bhm joined
09:01
rindolf joined
09:02
obfusk joined
09:03
jonas1 joined
09:08
perlpilot joined
09:12
Ven left
09:15
Ven joined,
agentzh joined
09:19
agentzh left
09:23
wamba joined
09:28
Ven left
09:30
Ven joined
09:31
bjz joined
09:41
domidumont1 joined
09:42
Ven left,
domidumont left
09:45
Ven joined
09:50
bjz left
09:57
Ven left
10:00
Ven joined
10:04
bjz joined
10:13
astj joined
10:14
ocbtec joined
10:27
Ven left
10:28
labster left
10:31
Ven joined
10:40
astj left
10:41
kalkin- joined,
astj joined,
astj left,
astj joined
10:45
Gasher joined,
agentzh joined
10:49
agentzh left
10:53
araraloren joined
10:54
Gasher left,
gregf_ joined
10:55
Gasher joined
10:58
Ven left
11:01
Ven joined
|
|||
kalkin- | hi #perl6 | 11:03 | |
DrForr | Afternoon. | 11:04 | |
11:08
Vynce left
11:11
sftp joined
|
|||
araraloren | Good evening~~ | 11:11 | |
11:12
Ven left
|
|||
kalkin- | m: use IO::Socket::SSL; IO::Socket::SSL.new(:host(<jabber.org>), :5222port); | 11:13 | |
camelia | rakudo-moar c9a9bc: OUTPUT«===SORRY!===Could not find IO::Socket::SSL at line 1 in: /home/camelia/.perl6 /home/camelia/rakudo-m-inst-2/share/perl6/site /home/camelia/rakudo-m-inst-2/share/perl6/vendor /home/camelia/rakudo-m-inst-2/share/perl6 CompUni…» | ||
kalkin- | couldn't camelia use some outside modules? Or am i calling the wrong bot? | ||
11:14
darutoko joined
|
|||
kalkin- | I want to do this: perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)" | 11:14 | |
11:14
raschipi joined
|
|||
AlexDaniel | star: use IO::Socket::SSL; IO::Socket::SSL.new(:host(<jabber.org>), :5222port); | 11:18 | |
camelia | star-m 2016.10: OUTPUT«===SORRY!===Could not find IO::Socket::SSL at line 1 in: /home/camelia/.perl6 /home/camelia/star-2016.10/share/perl6/site /home/camelia/star-2016.10/share/perl6/vendor /home/camelia/star-2016.10/share/perl6 CompUnit::Repository…» | ||
kalkin- | basically IO::Socket::SSL && OpenSSL module try to connect to servers via obsolete and insecure SSLv3. Which of course doesn't work with modern servers supporting only ≥ TLSv1 like XMPP servers | 11:19 | |
I tried hardcoding in IO::Socket::SSL code the version via OpenSSL.new: :version(1.2), but still the same error | |||
this is the error: err code: 336130315 | 11:20 | ||
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number | |||
11:20
Ven joined
11:21
parv joined
|
|||
parv | thanks to the ones responsible for adding & publicizing the irc log. | 11:23 | |
timotimo | that's moritz | ||
parv | ok | ||
thank you moritz (for the irc logs) | 11:24 | ||
11:25
agentzh joined
|
|||
raschipi | parv: say it like this: moritz++ | 11:25 | |
parv | ok then. | 11:26 | |
raschipi | One day we will get around summing up people's karma in the channel. | ||
sammers | m: dd [ $*VM.version, $*PERL.compiler.version ] | ||
camelia | rakudo-moar c9a9bc: OUTPUT«[v2016.12.113.gd.1.da.1.ba, v2016.12.389.gc.9.a.9.bc.8]» | ||
11:26
user9 joined
11:27
Ven left
11:28
ufobat joined
|
|||
kalkin- | .ask sergot can you please glance at io-socket-ssl/#17? any hints how I can fix this issue and submit a PR back would be great! | 11:29 | |
yoleaux | kalkin-: I'll pass your message to sergot. | ||
11:30
agentzh left,
Ven joined
|
|||
AlexDaniel | that's not the only irc log of this channel though | 11:31 | |
here's anothre one: colabti.org/irclogger/irclogger_log...2017-01-19 | |||
11:34
Geth joined,
ChanServ sets mode: +v Geth
11:35
buggable joined,
ChanServ sets mode: +v buggable,
huggable joined,
ChanServ sets mode: +v huggable
|
|||
kalkin- | Hmm I think the SSLv3 issue is coming from the OpenSSL module | 11:36 | |
11:36
NeuralAnomaly joined,
ChanServ sets mode: +v NeuralAnomaly,
NeuralAnomaly_ joined,
ChanServ sets mode: +v NeuralAnomaly_
|
|||
kalkin- | Even when there is a commit saying Don't use SSLv3 for tests, you may be want to test it with a server don't supporting SSLv3 as fall back. (github.com/sergot/openssl/commit/4...4899bc2e0) | 11:38 | |
I don't want to panic, but this is a pretty heavy security issue | |||
parv | AlexDaniel, what do you mean (as colbati.org link is also listed in the topic)? | 11:39 | |
*colabti.org | |||
AlexDaniel | which topic? | 11:40 | |
parv | AlexDaniel, this irc channel topic. | ||
AlexDaniel | parv: ah, yea | ||
though I'm not sure who is running it | 11:41 | ||
feb ? | |||
AlexDaniel has no idea who that is | |||
parv | later people; see you soon ... | 11:42 | |
11:42
parv left
|
|||
moritz | I can't remember either; they asked once if it was OK to use the CSS from "my" logger, which is why they look a bit similar | 11:43 | |
11:43
rurban left
|
|||
timotimo | engineering.instagram.com/dismissi...ca40b29172 - near the end they talk about how they had to patch python so that it doesn't clean up all gc-managed memory at process termination. moar is already doing it like that by default :) | 11:45 | |
jnthn | I'm guessing Python probably can't be patched like that in general. | 11:48 | |
Since folks will have code relying on it | |||
timotimo | potentially, yeah | ||
jnthn | One of the reasons that we are so unwilling to promise anything along these lines in Moar | ||
timotimo | it's good that we don't guarantee DESTROY to be run at process termination | ||
yep | |||
jnthn | Yes, I didn't want to tie our hands on GC algorithm choices for decades to come :) | ||
11:53
xtreak left
|
|||
brokenchicken | kalkin-: what's the security issue? | 11:53 | |
11:56
lukaramu joined
11:57
xtreak joined,
xtreak left
|
|||
kalkin- | brokenchicken: using SSLv3 | 11:58 | |
11:59
Ven left
|
|||
kalkin- | brokenchicken: If you do OpenSSL.new(:client) and try to connect to something it will use SSLv3 instead of the more modern ones. If you try to enforce the version if will fail with the above mentioned error | 11:59 | |
raschipi | yuck. | 12:00 | |
12:00
AlexDaniel left,
Ven joined,
raschipi left
|
|||
kalkin- | github.com/sergot/openssl/commit/4...c4899bc2e0 ← this commit says Don't use SSLv3 for tests, but it still does, but now silently | 12:01 | |
12:01
raschipi joined
|
|||
kalkin- | If I havent started reworking Net::XMPP no one would have noticed for some time. (XMPP Servers enforce use of TLS) | 12:01 | |
star: try use OpenSSL; | 12:02 | ||
camelia | star-m 2016.10: OUTPUT«===SORRY!===Could not find OpenSSL at line 1 in: /home/camelia/.perl6 /home/camelia/star-2016.10/share/perl6/site /home/camelia/star-2016.10/share/perl6/vendor /home/camelia/star-2016.10/share/perl6 CompUnit::Repository::Absolu…» | ||
brokenchicken | I see by default it's using: $method = try {$client ?? OpenSSL::Method::TLSv1_2_client_method() !! OpenSSL::Method::TLSv1_2_server_method()} || try {$client ?? OpenSSL::Method::TLSv1_client_method() !! OpenSSL::Method::TLSv1_server_method()} ; | ||
12:02
bjz left
|
|||
kalkin- | brokenchicken: try that: perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)" | 12:03 | |
IO::Socket::SSL uses in background OpenSSL.new(:client) which should use the mentioned default method, but the error says other wise | |||
raschipi | If that's the version it uses be default, it also won't work be default, since clients don't accept SSl anymore, it's all TLS. | 12:04 | |
12:04
bjz joined
|
|||
kalkin- | raschipi: ? as far as i understand the code by default it should use TLS? | 12:05 | |
12:06
wamba left,
mniip_ joined
|
|||
kalkin- | or am I misunderstanding something? | 12:07 | |
brokenchicken | kalkin-: well, I copy-pasted the code it uses by default. | ||
Maybe before you start claiming security issues you should double check the problem is where you think it is :) | |||
kalkin- | brokenchicken: yes and it should use TLS, right? there is no mentioning of SSLv3_client_method? | 12:08 | |
brokenchicken: or am I blind? | |||
kalkin- is completely confused | 12:09 | ||
brokenchicken | I'm saying find out if it's actually using SSLv# | 12:10 | |
The error suggests to me it's jabber that's using it and the module craps out saying wrong version | |||
kalkin- | brokenchicken: ohh I did my homework xmpp.net/result.php?domain=jabber....client#tls look at the table | 12:11 | |
12:11
ufobat left
|
|||
kalkin- | SSLv2 No, SSLv3 No | 12:11 | |
:) | |||
moritz | kalkin-: ok, start from the beginning. What have you found that makes you think there's a security problem, and how would an attacker exploit it? | 12:12 | |
12:13
Ven left
|
|||
kalkin- | moritz: SSLv3 is considered to be vulnerable and shouldn't be used. There're multiple different attacks on it i.e. POODLE. This is the reason the XMPP community started to migrate to TLS only connections | 12:15 | |
an attacker can read your encrypted connection when using SSLv3(?) | |||
12:16
mniip_ is now known as mniip,
mr_ron joined
|
|||
kalkin- | may be some one more knowledgeable than me can expand on it, but there are reasons that you should use ≥ TLSv1 | 12:17 | |
Also the applied crypto hardening guide recommends disabling SSLv3 bettercrypto.org/static/applied-cr...dening.pdf | 12:18 | ||
12:18
Ven joined
|
|||
moritz | kalkin-: so have you observed an SSLv3 connection being issued by the OpenSSL module? | 12:18 | |
12:19
cognominal joined
|
|||
kalkin- | moritz: that's my interpretation of the error following this code perl6 -MIO::Socket::SSL -e "IO::Socket::SSL.new(:host(<jabber.org>), :5222port)" | 12:20 | |
Hmm may be I was too tired yesterday evening and misunderstood the error? let me research it again | |||
brokenchicken | karlkin- your gomework url reports for hermes2.jabber.org but in your code yoy're connecting to just jabber.org... are they the same? | 12:21 | |
moritz | kalkin-: if you got an error, it seems that no connection was opened, right? | ||
12:21
mniip left,
mniip joined
|
|||
timotimo | ideally you'd follow the appropriate SRV record | 12:21 | |
which i'm not sure how you'd do currently in rakudo/moar | 12:22 | ||
kalkin- | timotimo: not at all, besides using Net::DNS | ||
brokenchicken: yes., try hermes2.jabber.org same issue | |||
brokenchicken | I'm not at a computer right now. | 12:23 | |
kalkin- | Ohh I'm stupid | ||
brokenchicken | Try some other server? | ||
kalkin- | It's XMPP if you don't use legacy SSL/TLS only 5223 port, you need to signal that you want to use TLS on 5222 because of legacy reasons | 12:24 | |
raschipi | brokenchicken: How do you use IRC without a computer? Do you have a telepathy bridge? | ||
kalkin- | of course it works if you try to connect to 5223 | ||
*facepalm* | 12:25 | ||
brokenchicken | raschipi, or a phone? | ||
kalkin- | sorry for annoying you guys | ||
raschipi | brokenchicken: That's a computer. | ||
moritz | phones these days really are computers. | ||
brokenchicken | kalkin-, it's fine. Glad there aren't any issues. | ||
lizmat | m: say "\c[man facepalming]" # :-) | 12:26 | |
camelia | rakudo-moar c9a9bc: OUTPUT«🤦♂️» | ||
moritz | m: say "\c[woman facepalming]" | ||
camelia | rakudo-moar c9a9bc: OUTPUT«🤦♀️» | ||
moritz | just to be on the safe side :-) | ||
kalkin- | hmm, linux libertine doesn't support it. I see a square + gender symbol :) | ||
lizmat | moritz++ :-) | ||
moritz | m: say "\c[genderless person facepalming]" | ||
camelia | rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name genderless person facepalmingat <tmp>:1------> 3say "\c[genderless person facepalming7⏏5]"» | ||
kalkin- | moritz: who are to assume my gender is binary! :D | 12:27 | |
moritz | a stastically well-versed person, of course :-) | ||
12:27
Ven left
|
|||
ilmari | m: say "\c[face palm]" | 12:27 | |
camelia | rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name face palmat <tmp>:1------> 3say "\c[face palm7⏏5]"» | ||
ilmari | huh, that is the unicode character name | 12:28 | |
m: say "\c[FACE PALM]" | |||
camelia | rakudo-moar c9a9bc: OUTPUT«🤦» | ||
ilmari | ah | ||
case matters | |||
moritz | ilmari: you need to SCREAM to be heard :-) | ||
brokenchicken | weird that it does there | ||
kalkin- | hmm github facepalm man and women both look the same. but i guess there're man with long hair to. | ||
brokenchicken | m: "\c[MAN FACEPALMING]" | 12:29 | |
camelia | rakudo-moar c9a9bc: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name MAN FACEPALMINGat <tmp>:1------> 3"\c[MAN FACEPALMING7⏏5]"» | ||
brokenchicken | so zws are lowercase but normal stuff is uppercase? | 12:30 | |
moritz | that's weird | ||
should be both case insensitive, if you ask me | |||
or both uppercase | |||
brokenchicken | +1 | ||
moritz | samcv: ^^ | ||
12:31
cognominal left
|
|||
ilmari | unicode probably has an opinion on that | 12:32 | |
12:33
cognominal joined
|
|||
kalkin- | .tell sergot never mind my previous message. my bad | 12:33 | |
yoleaux | kalkin-: I'll pass your message to sergot. | ||
12:34
Ven joined
12:39
ChoHag joined
12:41
rurban joined
12:42
Ven left
12:44
ChoHag left
12:46
cognominal left
12:48
cognominal joined
12:52
Ven joined
12:53
agentzh joined
|
|||
jnthn | moritz: I believe that codepoint names being uppercase and sequence names being lowercase is part of the mechanism for avoiding conflicts between the two :) | 12:58 | |
12:58
agentzh left,
Ven left
|
|||
jnthn | Also, iirc, the Unicode data files have them that way (uppercsae for codepoint names, lowercase for sequence names) | 12:59 | |
13:01
cognominal left
13:03
bjz_ joined
13:04
bjz left
13:11
Ven joined
13:13
azawawi joined
|
|||
azawawi | hi #perl6 | 13:13 | |
13:14
cognominal joined,
sammers joined
|
|||
moritz | \o azawawi | 13:15 | |
13:15
geekosaur joined
13:21
lmmx joined
13:23
user9 left
|
|||
lizmat | azawawi o/ | 13:28 | |
13:28
Ven left,
user9 joined
|
|||
azawawi | :) | 13:29 | |
araraloren | :) | ||
azawawi starts working on GTK::Simple | 13:30 | ||
raschipi | azawawi: What else is there in the GTK:: namespace? | ||
13:31
Ven joined
|
|||
raschipi | Oh, there's GTK::Simpler | 13:32 | |
tadzik | :o | ||
araraloren | Is GTK::Simpler replaced GTK::Simple ? | ||
jnthn | Doubt it | ||
iirc it's built upon it | 13:33 | ||
timotimo | i haven't heard of GTK::Simpler yet | ||
tadzik | I like the idea | ||
from the synopsis example | |||
jnthn | GTK::Simple maybe shoulda just been called GTK:: :) | ||
brokenchicken starts working on GTK::Simplest | |||
tadzik | GTK::ColonColon | ||
jnthn | oops | ||
azawawi | GTK::Simplest next :) | ||
raschipi | I think it's because it doesn't expose full functionality. | ||
araraloren | Oh, It said `This module provides a simpler API for GTK::Simple` | ||
jnthn | GTK :) | ||
tadzik | GTK::Harder, GTK::Better, GTK::Faster, GTK::Stronger | 13:34 | |
brokenchicken | .oO( GTK::Scooter ) |
||
raschipi | GTK::Stronk | ||
araraloren | GTK::Best | ||
timotimo | so GTK:: is kind of like GTK-- | ||
jnthn | The history was approximately: jnthn takes long train trip to give a talk, wants to show off how supplies are great for dealing with UI events, writes a tiny bit of GTK support, and picks GTK::Simple as a name. | 13:35 | |
azawawi | timotimo: a quick question, why did we need to do this github.com/perl6/gtk-simple/commit...528904976? | ||
timotimo | azawawi: panda throws a hissy fit when the files that are referenced in resources in the meta6 file aren't there | 13:36 | |
jnthn | I then handed it off for others to care for, because building/maintaining a UI binding library is the last thing I had time for, but the name GTK::Simple lived on :-) | ||
azawawi | There is also GTK::Scintilla github.com/azawawi/perl6-gtk-scintilla :) | ||
jnthn | By now it covers a lot of GTK, iirc :) | ||
azawawi | timotimo: we're deprecating panda right? | ||
tadzik | there are 16 modules with ::Simple in the ecosystem | ||
raschipi | GTK::baroque GTK::byzantine GTK::convoluted GTK::daedal GTK::elaborate GTK::intricate GTK::involute GTK::involved GTK::knotty GTK::labyrinthian GTK::sophisticated GTK::tangled | 13:37 | |
araraloren | They are GTK family | 13:38 | |
jnthn | Next time I'll call my same code GTK::ForHell'sSakeChangeThis :) | ||
*sample | |||
Anyway, (everyone who carried it forward)++ :) | |||
brokenchicken | azawawi: from Rakudo Star yes. But as a piece of software... it's just a third-party distro like any other | ||
timotimo | GTK::SoonToBeDeprecated | 13:39 | |
brokenchicken | buggable: eco ::Simple | ||
buggable | brokenchicken, Found 5 results: HTTP::Server::Simple, IO::Capture::Simple, LWP::Simple, Grammar::Profiler::Simple, Email::Simple. See modules.perl6.org/#q=%3A%3ASimple | ||
brokenchicken | .oO( bug... ) |
||
azawawi | brokenchicken: thx | ||
tadzik | jnthn: GTK::Sample is not bad either :) | ||
jnthn | Ecosystem::Query::Bots::Are::Simple :) | ||
tadzik: Hah, didn't think of that :) | |||
azawawi | timotimo: writing a comment there :) | ||
13:40
buggable left
13:41
buggable joined,
ChanServ sets mode: +v buggable
|
|||
brokenchicken | buggable: eco ::Simple | 13:41 | |
buggable | brokenchicken, Found 16 results: HTTP::Server::Simple, IO::Capture::Simple, LWP::Simple, Grammar::Profiler::Simple, Email::Simple. See modules.perl6.org/#q=%3A%3ASimple | ||
raschipi | Yay! | ||
13:42
agentzh joined
|
|||
raschipi | buggable: eco dialog | 13:43 | |
buggable | raschipi, Inform 'Easy to use GUI Dialog box using GTK3 label, button, entry widgets': github.com/finanalyst/p6-inform | ||
13:43
Ven left
13:45
bjz_ left
|
|||
raschipi | A dialog-like module should be included in *. | 13:46 | |
13:46
agentzh left
13:47
kalkin- left
13:48
iH2O joined
|
|||
brokenchicken | Yes! Finally! Improve git blame on gitHub! | 13:49 | |
13:49
holli_ joined
|
|||
brokenchicken | github.com/blog/2304-navigate-file...blame-view | 13:50 | |
13:52
Ven joined
|
|||
brokenchicken | heh, though using that feature leaves github in wide-view mode even if you switch to other pages :} | 13:52 | |
13:59
Ven left
14:12
Ven joined
|
|||
azawawi | re github.com/perl6/gtk-simple/pull/74 . Please review. | 14:12 | |
brokenchicken | Geth: help | 14:14 | |
Geth | brokenchicken, Source at github.com/perl6/geth To add repo, add an 'application/json' webhook on GitHub pointing it to geth.perl6.party/?chan=#perl6 and choose 'Send me everything' for events to send | use `ver URL to commit` to fetch version bump changes | ||
brokenchicken | azawawi: I would recommend using AUTHOR_TESTING var | 14:16 | |
14:16
agentzh joined
|
|||
brokenchicken | azawawi: it's the one used by Test::When, which in turn follows Lancaster Consensus followed by Perl 5 | 14:17 | |
github.com/zoffixznet/perl6-Test-When#author | |||
github.com/Perl-Toolchain-Gang/too...g-contexts | |||
azawawi reads | 14:19 | ||
brokenchicken: i used to use "AUTHOR_TESTING" until Test::META suggested otherwise | |||
14:19
iH2O left
|
|||
brokenchicken | :S | 14:19 | |
I'll open an issue on it | 14:20 | ||
azawawi | brokenchicken++ | ||
14:21
agentzh left
|
|||
azawawi | brokenchicken: Guideliness vs rules (Pirates of the Caribbean) www.imdb.com/title/tt0325980/quotes...=qt0416731 :) | 14:24 | |
timotimo | heh heh. | 14:26 | |
parlay! | |||
azawawi | lol | ||
travis ci: Investigating - We’re currently investigating an issue affecting `sudo: required` builds for both public and private repositories ... Oh well | 14:27 | ||
14:27
cdg joined,
cdg left,
cdg joined,
Ven left
|
|||
brokenchicken | They have code on Pirates of Caribbean? | 14:28 | |
Wonder if it's perl.... | |||
azawawi Packing & going home. Have a nice weekend everyone :) | |||
timotimo | they run the Black Perl distribution | ||
azawawi | Black Perl :) | ||
DrForr | timotimo++ # beat me to it. | ||
azawawi | you know it is a good name for rakudo star (for marketing that is) :) | 14:29 | |
timotimo | we can call it that when it's really, really, really god damn fast | 14:30 | |
brokenchicken | guessing black perl is the ship? | ||
DrForr | No, it's Perl Poetry. | ||
14:31
Ven joined
|
|||
timotimo | Perl Pottery? | 14:32 | |
14:33
finanalyst joined,
AlexDaniel joined
|
|||
AlexDaniel | “should be both case insensitive, if you ask me” | 14:33 | |
if I recall correctly, samcv is aware of that | |||
finanalyst | @search senlin ascends | ||
brokenchicken | finanalyst: this is a warez-free network | 14:34 | |
14:35
azawawi left,
skids joined
|
|||
finanalyst | brokenchicken: I know. sigh! this happens because of lags. i thought i had solved it. hand head in shame | 14:36 | |
brokenchicken | that book is like $5, bruh | 14:37 | |
finanalyst | just found it on smashwords. thinking about it. | ||
not the price, the review | |||
actually, 2.99 | 14:38 | ||
14:39
kyan joined
|
|||
AlexDaniel | hmm, looking at stackoverflow.com/questions/41689023 | 14:43 | |
14:43
Ven left
|
|||
AlexDaniel | why don't we provide some sort of unicode brackets for substr | 14:44 | |
$foo「5..8」 hmm | |||
brokenchicken hopes this won't segue into "let's add some weird brackets into core for string indexing" :P | 14:45 | ||
AlexDaniel | .oO( why not? ) |
14:46 | |
brokenchicken | Stop adding stuff! | ||
14:46
lizmat joined
|
|||
brokenchicken | :) | 14:46 | |
AlexDaniel | why | ||
brokenchicken | Make a module | ||
AlexDaniel | meh | ||
same thing could've been said about most of the features | 14:47 | ||
brokenchicken | Yup. | 14:48 | |
AlexDaniel | but really, typing out .substr(…, 1) is really annoying when all you need is just one char | ||
araraloren | You can made one for yourself ~~ | 14:49 | |
jnthn | If you're doing it that often in a given bit of code, just define a sub/operator for it | ||
brokenchicken | Like defaults based on :U the decision was for that to be a module first before it being included in core. | ||
So it could be tried out in the wild before being commited to whatever impl was cooked up first. | |||
arnsholt | jnthn: Semi-random question: Can we specify a special-cased implementation for a particular signature of a metaop? | 14:50 | |
araraloren | Make a module is a good idea. Perl6 already has a lot of feature, so many feature .. | ||
brokenchicken | Or the superscript powers. That too was a module first, before we added it to core. | ||
arnsholt | Like special-casing [+] when applied to a List[Num]? | ||
brokenchicken | [+] is already special cased to .sum | 14:51 | |
AlexDaniel | brokenchicken: hmm what was the module, by the way? | ||
brokenchicken | AlexDaniel: for powers? | ||
AlexDaniel | yes | ||
14:51
Ven joined
|
|||
brokenchicken | AlexDaniel: Operators::Math::Superscripts | 14:52 | |
jnthn | arnsholt: Umm...don't think we can at the moment. | ||
brokenchicken | AlexDaniel: github.com/zoffixznet/perl6-Operat...perscripts | ||
14:53
bwisti joined
|
|||
jnthn | arnsholt: Though lizmat++ just refactored that bunch so probably knows best by this point :) | 14:53 | |
AlexDaniel | brokenchicken: and how many people used this module? | ||
jnthn | arnsholt: The answer before the refactor woulda been "only if you're lucky and the accientally-exposed META_FOO function was a multi"... | ||
brokenchicken | AlexDaniel: I don't have any statistics | ||
AlexDaniel | personally I don't buy it in this case. I'd much rather not introduce a dependency in my code just for more convenient char indexing. | ||
so creating a module for something that basic is… meh | 14:54 | ||
but whatever | |||
brokenchicken | AlexDaniel: but you rather make extra maintenance for core devs and buy Perl6 into supporting a possibly poorly-designed feature essentially forever? | ||
jnthn | m: sub c($s, $i) { $s.substr($i, 1) }; say c("foo", 1) | ||
camelia | rakudo-moar 7ef368: OUTPUT«o» | ||
jnthn | AlexDaniel: Don't take a dependency on it, just write the one line sub in your code | 14:55 | |
AlexDaniel | yeah, and make anybody reading this code wonder wtf c is | ||
brokenchicken | AlexDaniel: what I'm not buying is "extra dependency" nonsense. | ||
We support modules exactly for this reason. | |||
jnthn | AlexDaniel: Umm...that degenerates to "never define a subroutine, people won't know what the name is" :P | ||
AlexDaniel | jnthn: nope, it's just not worth it in this case | 14:56 | |
brokenchicken | heh | ||
jnthn | Then it's not worth making it shorter than .sbustr($i, 1) either :P | ||
brokenchicken | Meaning .substr() isn't a pain to type after all | ||
AlexDaniel | we don't want to introduce another feature – fine, whatever. But don't say that a module will help, it won't | ||
14:56
lizmat left
|
|||
brokenchicken | AlexDaniel: sure it will. It can provide a trial implementation to find any flaws with it without any commitments for support. And if enough people think the module's a good idea it's a good argument for inclusion into core. | 14:57 | |
14:58
Ven left,
lmmx left
|
|||
brokenchicken | For example, you showed 「5..8」 but we use 「...」 for "no interpretation there whatever" quoters... so now it's confusing for beginners to have same quoters used for ranges | 14:59 | |
etc | |||
14:59
lizmat joined
15:01
g4 left
|
|||
brokenchicken | m: sub postcircumfix:<♥ ♥> (Str $x, Range $y) { $x.substr($y) }; say "meows"♥3..5♥ | 15:01 | |
camelia | rakudo-moar 7ef368: OUTPUT«ws» | ||
15:02
agentzh joined
|
|||
brokenchicken | m: my $mp = "\c[man facepalming]"; my $wp = "\c[woman facepalming]"; (「sub postcircumfix:<」 ~ $mp ~ ' ' ~ $wp ~ 「> (Str $x, Range $y) { $x.substr($y) }; say "meows"」 ~ $mp ~ '3..5' ~ $wp).EVAL | 15:04 | |
camelia | rakudo-moar 7ef368: OUTPUT«ws» | ||
brokenchicken | haha | ||
m: my $mp = "\c[man facepalming]"; my $wp = "\c[woman facepalming]"; (「sub postcircumfix:<」 ~ $mp ~ ' ' ~ $wp ~ 「> (Str $x, Range $y) { $x.substr($y) }; say "meows"」 ~ $mp ~ '3..5' ~ $wp).say | |||
camelia | rakudo-moar 7ef368: OUTPUT«sub postcircumfix:<🤦♂️ 🤦♀️> (Str $x, Range $y) { $x.substr($y) }; say "meows"🤦♂️3..5🤦♀️» | ||
brokenchicken | m: sub postcircumfix:<🤦♂️ 🤦♀️> (Str $x, Range $y) { $x.substr($y) }; say "meows"🤦♂️3..5🤦♀️ | 15:05 | |
camelia | rakudo-moar 7ef368: OUTPUT«ws» | ||
brokenchicken | Doesn't render right of any of my devices, but it works! :) | ||
arnsholt | jnthn: Cool! So no need to suggest we do Kahan summation for nums, unless I want to be volunteered into getting that to work first O:) | 15:06 | |
15:06
agentzh left
15:09
Ven joined
15:11
Ven left
|
|||
Geth | tk-simple/master: 4 commits pushed by jonathanstowe++
|
15:11 | |
15:11
kyan left
|
|||
brokenchicken | m: constant &term:("\c[BLACK HEART SUIT]") = ¨ ♥ | 15:12 | |
camelia | rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Missing initializer on constant declarationat <tmp>:1------> 3constant &term7⏏5:("\c[BLACK HEART SUIT]") = ¨ ♥» | ||
brokenchicken | Is there a way to use the char name like that in term definition? | ||
instead of the actual one | |||
m: sub term:«\c[BLACK HEART SUIT]» { die }; ♥ | 15:13 | ||
camelia | rakudo-moar 7ef368: OUTPUT«Died in sub term:<♥> at <tmp> line 1 in block <unit> at <tmp> line 1» | ||
brokenchicken | Oh, seems to be something to do with constants | ||
m: constant &term:«\c[BLACK HEART SUIT]» = &die ; ♥ | |||
camelia | rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Bogus statementat <tmp>:1------> 3nt &term:«\c[BLACK HEART SUIT]» = &die ;7⏏5 ♥ expecting any of: prefix term» | ||
Geth | tk-simple: aaf2b11c5c | (Zoffix Znet)++ | 4 files s:g/TEST_AUTHOR/AUTHOR_TESTING/ |
15:17 | |
15:18
lmmx joined
15:19
hchienjo joined
|
|||
brokenchicken | m: sub term:«\c[man facepalming]» { die |@_ }; "\c[man facepalming] 'w00t awesome!'".EVAL | 15:21 | |
camelia | rakudo-moar 7ef368: OUTPUT«5===SORRY!5=== Error while compiling /home/camelia/EVAL_0Two terms in a rowat /home/camelia/EVAL_0:1------> 3🤦♂️7⏏5 'w00t awesome!' expecting any of: infix infix stopper statement end …» | ||
brokenchicken | hm how come? | 15:22 | |
ah | |||
m: sub prefix:«\c[man facepalming]» { die |@_ }; "\c[man facepalming] 'w00t awesome!'".EVAL | |||
camelia | rakudo-moar 7ef368: OUTPUT«w00t awesome! in sub prefix:<🤦♂️> at <tmp> line 1 in block <unit> at EVAL_0 line 1 in block <unit> at <tmp> line 1» | ||
brokenchicken | \o/ | ||
.oO( make a language entirely out of ZWS Emoji... ) |
15:28 | ||
15:28
agentzh joined
15:30
Ven joined
|
|||
brokenchicken | heh, it's weird they got all kinds of these sports emojis, but none for "playing videogames" or "reading a book" or anything that doesn't involve sweat and balls.... | 15:31 | |
15:32
khw joined
|
|||
brokenchicken | m: " 👯♀️".uninames.say | 15:32 | |
camelia | rakudo-moar ed482e: OUTPUT«(SPACE WOMAN WITH BUNNY EARS ZERO WIDTH JOINER FEMALE SIGN VARIATION SELECTOR-16)» | ||
15:32
agentzh left
|
|||
brokenchicken | don't even know what that one is heh | 15:33 | |
"women with bunny ears partying"... ... Who makes these :} | 15:34 | ||
m: "\c[men with bunny ears partying]" | |||
camelia | rakudo-moar ed482e: OUTPUT«WARNINGS for <tmp>:Useless use of constant string "👯♂️" in sink context (line 1)» | ||
brokenchicken | m: say "\c[men with bunny ears partying]" | ||
camelia | rakudo-moar ed482e: OUTPUT«👯♂️» | ||
15:38
lmmx left
15:44
lmmx joined
15:47
hchienjo left
|
|||
araraloren | AlexDaniel, a sample for slice `$f[2 : 4]` gist.github.com/araraloren/19bc439...418766204e | 15:47 | |
AlexDaniel | :S | 15:48 | |
using other brackets is probably a good idea | 15:49 | ||
15:50
jonas1 left
|
|||
brokenchicken | m: say join (1, 2, 3): | 15:50 | |
camelia | rakudo-moar ed482e: OUTPUT«» | ||
perlpilot | PDL uses $piddle(2:4) and I'm not so sure "other brackets" is actually better there. | ||
araraloren | Here square bracket is suitable . | 15:54 | |
15:55
agentzh joined
15:58
Ven left
15:59
agentzh left
16:01
Ven joined
16:03
lizmat left
16:05
kyan joined
|
|||
AlexDaniel | not at all | 16:06 | |
otherwise you'd argue that string concatenation with + should work. Not in perl 6, no, and that's great | 16:07 | ||
raschipi | AlexDaniel: C uses [] to do it. | ||
16:07
kyan left
|
|||
AlexDaniel | :| | 16:07 | |
16:07
kyan joined
|
|||
perlpilot | raschipi: saying "C does it" is not really an argument for anything. :) | 16:07 | |
raschipi | It will be [$:$], not [$,$] | 16:08 | |
I'm just mindstorming. | |||
brokenchicken | We should totally add + for concatenation :P | ||
AlexDaniel | just pick any other brackets you like | ||
as simple as that | |||
perlpilot | why not $string.slice($range)? Why do we need array-ish brackets? | 16:09 | |
brokenchicken | perlpilot: we already have .substr($range) :( | ||
AlexDaniel | substr already works like this, no? | ||
moritz | because having a method for it isn't enough line noise | ||
perlpilot | oh ... then same question but with substr instead of slice | ||
(though moritz already answer :) | |||
brokenchicken | it should really be :) 4:$str:7 | 16:10 | |
ssh does it! | |||
16:11
user9 left,
user9 joined
|
|||
brokenchicken | m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $s.substr: $s..$e }; say 2:"foobar":5 | 16:13 | |
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Confusedat <tmp>:1------> 3oc("list") { $s.substr: $s..$e }; say 2:7⏏5"foobar":5 expecting any of: colon pair» | ||
brokenchicken | m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $s.substr: $s..$e }; say 2:"foobar":5 | ||
camelia | rakudo-moar ed482e: OUTPUT«Start argument to substr out of range. Is: 2, should be in 0..1; use *-2 if you want to index relative to the end in sub infix:<:> at <tmp> line 1 in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | wat | ||
m: sub infix:<:> (Int $s, Str $v, Int $e) is assoc("list") { $v.substr: $s..$e }; say 2:"foobar":5 | 16:14 | ||
camelia | rakudo-moar ed482e: OUTPUT«obar» | ||
brokenchicken | SHIP IT! :) | ||
16:14
alimon joined
|
|||
brokenchicken | m: sub infix:<🔪> (Int $s, Str $v, Int $e) is assoc("list") { $v.substr: $s..$e }; say 2🔪"foobar"🔪5 | 16:15 | |
camelia | rakudo-moar ed482e: OUTPUT«obar» | ||
16:15
Ven left
|
|||
brokenchicken | hehe | 16:15 | |
raschipi | u: 🔪 | 16:16 | |
unicodable6 | raschipi, U+1F52A HOCHO [So] (🔪) | ||
brokenchicken | better yet: | 16:19 | |
m: sub infix:<↦> {$^b.substr: $^a}; sub infix:<↤> {$^a.substr: 0, $^a.chars-$^b}; say 3↦"foobar"; say "foobar"↤4 ~ "x"; say 3↦"foobar"↤1 | |||
camelia | rakudo-moar ed482e: OUTPUT«barfoxba» | 16:20 | |
16:20
cale2 joined
|
|||
brokenchicken | \o/ | 16:20 | |
cale2 | is there a perl6 playground? Like a console in the browser? | ||
raschipi | cale2: "/msg camelia" | 16:21 | |
16:21
agentzh joined,
Ven joined
|
|||
perlpilot | There's also tryperl6.org, but I don't know if that's been kept up to date. | 16:21 | |
16:23
araraloren left
|
|||
brokenchicken | also glot.io | 16:25 | |
tryperl6 gives "Process not found" | |||
raschipi | It seems tryperl6.org is already under too much load. | ||
16:26
agentzh left
|
|||
brokenchicken | oh booted now... | 16:26 | |
runs v2016.05.103.g.7.fabb.57 | |||
16:26
agentzh joined
|
|||
cale2 | tryperl6 works. It's just a bit slow | 16:28 | |
brokenchicken | /msg camelia is best | 16:29 | |
16:29
Ven left
|
|||
raschipi | camelia: You're the best. | 16:30 | |
cale2 | I'm thinking that I could almost emulate Elixir entirely using perl6 pipes | ||
===> that type of thing | 16:31 | ||
"feed operator" | |||
brokenchicken | cool | ||
16:31
Ven joined
|
|||
perlpilot | cale2: I think you're a tad optimistic :) | 16:31 | |
(only because I think feeds haven't gotten all the love they might need) | 16:32 | ||
brokenchicken | and they're not yet autothreade AFAIK | ||
jnthn woulda thought supply blocks were a more natural way to do actors in Perl 6 | 16:34 | ||
cale2 | dang | 16:42 | |
I mean, I guess method chaining is similar | |||
but when writing methods that are chainable, you always have to return self, right? | 16:43 | ||
16:43
hchienjo joined
|
|||
perlpilot | yep | 16:43 | |
16:43
Ven left
|
|||
cale2 | Are feed operators low key methods? | 16:43 | |
perlpilot | (well ... or some object that will respond to the next method in the chain) | ||
16:46
agentzh left
16:49
st_elmo joined
16:50
Ven joined
16:51
gregf_ left
16:52
domidumont1 left
16:53
CQ joined
16:58
Ven left
|
|||
cale2 | Yeah, actually, the feed operator becomes a bit complex with OOP | 16:59 | |
17:02
rurban left
17:04
wamba joined,
tester3 joined
17:05
tester3 left
17:09
finanalyst left
17:10
Ven joined
17:11
Ven left
|
|||
jdv79 | wasn't someone working on a p6 version of plack? | 17:12 | |
i don't see it in the eco | |||
brokenchicken | nope | 17:13 | |
You're prolly thinking of github.com/supernovus/perl6-psgi | 17:14 | ||
hmmm | |||
jnthn | Wasn't Crust in this space too? | ||
perlpilot | There's also github.com/lopnor/p6-plackdo | ||
brokenchicken | Ah, this one github.com/zostay/P6W | 17:15 | |
17:15
hartenfels joined
|
|||
brokenchicken | Maybe I'm misremembering. | 17:15 | |
17:15
girafe joined
|
|||
jdv79 | oh my there are many. just hope i don't pick a loser when the shakeout happens | 17:19 | |
perlpilot | jdv79: Crust would be a good choice IMHO | ||
jdv79 | i guess i'm remembering the P6W one since he was talking about remaking psgi/plack to leverage p6's strengths | 17:20 | |
yeah, ok | |||
17:22
AlexDaniel left
|
|||
raschipi | .ask TimToady Why did you call patch, patch? | 17:23 | |
yoleaux | raschipi: I'll pass your message to TimToady. | ||
raschipi | www.reddit.com/r/pcmasterrace/comm...d_a_patch/ | ||
.tell TimToady www.reddit.com/r/pcmasterrace/comm...d_a_patch/ | 17:24 | ||
yoleaux | raschipi: I'll pass your message to TimToady. | ||
17:24
agentzh joined
17:29
lizmat joined
17:30
Ven joined
17:33
agentzh left
17:35
dakkar left
|
|||
gfldex | cale2: glot.io/new/perl6 | 17:37 | |
17:37
kyan left
|
|||
TimToady | I called it patch because that was already the common term for it in computing, even if patches were generally applied by hand before that. | 17:41 | |
yoleaux | 17:23Z <raschipi> TimToady: Why did you call patch, patch? | ||
17:24Z <raschipi> TimToady: www.reddit.com/r/pcmasterrace/comm...d_a_patch/ | |||
17:42
hchienjo left
17:43
Ven left
|
|||
raschipi | Do you know how much older diff is than patch? | 17:43 | |
brokenchicken | Some of the accepted answers on Perl 6 SO questions really scare me :| stackoverflow.com/questions/4164811...s-of-lists | 17:44 | |
and it was smls that wrote it :S | 17:45 | ||
17:46
wamba left
17:48
lostinfog joined
|
|||
raschipi | brokenchicken: how weould you do it? | 17:48 | |
would* | |||
17:50
Ven joined
|
|||
TimToady | raschipi: no, I only know when patch was written :) | 17:50 | |
raschipi | Thanks. | ||
ilmari | diff was written in the early 1970s, according to wikipedia | 17:52 | |
«first shipped with the 5th Edition of Unix in 1974» | |||
17:52
mr_ron left
|
|||
ilmari | so people were applying patches manually for over ten years?! | 17:52 | |
raschipi | ilmari: See the link above: they were applyint them even more manually before that. | 17:53 | |
ilmari | ah, diff could output ed scripts too | ||
raschipi: yeah, i saw that | |||
17:54
kyan joined
|
|||
raschipi | I would say applying a patch manually was done way before there were any computers, even: en.wikipedia.org/wiki/Jacquard_loom | 17:55 | |
TimToady | it's an ancient word, and well suited for metaphorical borrowing into tech | ||
17:58
mr_ron joined
|
|||
TimToady | The word "patch" implies that everything around it was okay, which, when you think about it, reflects the basic optimism that every programmer must feel. :) | 18:00 | |
cale2 | How does the list.flatten built in not already completely flatten a list? | ||
18:00
Ven left
|
|||
TimToady | doesn't descend into Scalar objects, which means it doesn't flatten Array | 18:01 | |
afk & | |||
18:02
labster joined
|
|||
raschipi | TimToady: as someone who uses patched clothes, it doesn't imply that, no. | 18:04 | |
18:06
agentzh joined
18:08
CQ left
|
|||
cale2 | So you can write your own version of flatten with multi dispatch | 18:09 | |
18:10
Ven joined
18:11
Ven left
18:12
labster left
|
|||
brokenchicken | raschipi: as an entirely generic answer, I'd go with "I wouldn't". If you got structure, there's a reason for it; and if there's no reason, why is it structured? But the scary part about those answers is all the various sideeffects those solutions have, yet the answerers provide them as equals. the map+slip solution doesn't flatten hashes at all, the $<> thing flattens them into pairs, gather+deepmap+take | 18:14 | |
loses the keys entirely and takes only the values, and gather @a».take does same, but will also lose order when we make » actually autothreaded. | |||
Yet the answers all present them as equal solution. And bdfoy who's currently writing a Perl 6 book is even praising the deepmap solution as universal | |||
raschipi | Well, it's their data, let them throw it away. | 18:15 | |
18:16
Actualeyes joined
|
|||
brokenchicken | What? | 18:16 | |
raschipi | If I need to perform that transformation, I would use the solution he recommends. | ||
brokenchicken | ... and have a bug in your code... | ||
raschipi | Why is it a bug? | 18:17 | |
brokenchicken | Why is it not a bug? | 18:18 | |
I just told you the solutions each have different side effects that answers don't bother mentioning and you tell me why is it a bug. | |||
starting with (<a b c>, {x => "y", "z" => 42}) and ending up with (42, "y", "c", "a", "b") looks like a bug to me | 18:19 | ||
cale2 | brokenchicken: for flattening lists, I'm trying to do something like the commented out code here: glot.io/snippets/emc2qo9cqx | 18:23 | |
Not sure what kind of guards you can use in perl6 functions though | 18:25 | ||
brokenchicken | cale2: if you mean Lists lists, just use flat | 18:26 | |
m: say flat ((4,5,6),("f","z",(1, 3),"n")) | |||
camelia | rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 3 n)» | ||
brokenchicken | m: say flat ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"])».List | 18:29 | |
camelia | rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 {x => y} (...) 3 n)» | ||
cale2 | brokenchicken: So it doesn't do a deep flatten. I thought the point of Stack Overflow question was that it didn't | ||
18:30
FROGGS joined
|
|||
cale2 | * does | 18:30 | |
18:30
Ven joined
|
|||
brokenchicken | cale2: it does. It just doesn't descend into itemized iterables (or whatever the right term is) | 18:30 | |
m: say flat ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"])».list | 18:31 | ||
camelia | rakudo-moar ed482e: OUTPUT«(4 5 6 f z [1 {x => y} (...) 3] n)» | ||
brokenchicken | m: say gather ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"]).deepmap: *.take | ||
camelia | rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 y 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 8…» | ||
brokenchicken | ^ another problemw ith .deepmap take | 18:32 | |
m: say ((4,5,6), $["f","z",[1, {x => "y"}, (1...*), 3],"n"]).flatmap: *.List | 18:34 | ||
camelia | rakudo-moar ed482e: OUTPUT«(4 5 6 f z 1 {x => y} (...) 3 n)» | ||
brokenchicken | wrong to: flattens bags into pairs | 18:36 | |
There ain't a good generic solution. So best way is to not have the problem :) | |||
m: (1...*).perl | 18:37 | ||
camelia | rakudo-moar ed482e: OUTPUT«Cannot .elems a lazy list in block <unit> at <tmp> line 1Actually thrown at: in block <unit> at <tmp> line 1» | ||
brokenchicken | hm... | ||
raschipi | brokenchicken: people will program their programs in the way they want, you can't control it. | 18:39 | |
stop complaining about baby perl6. | |||
If people have to use "correct solutions", it isn't perl. | 18:40 | ||
brokenchicken | raschipi: it's interesting that your suggestions seem to involve letting evil propagate: sexists remarks -> let the guy clear his head; people giving wrong answers on a popular QA site -> it's their data, let them throw away. | 18:41 | |
cale2 | raschipi: the result of having "incorrect solutions" on stack overflow is that "babies" will get discouraged and confused, and stop using perl6 | ||
raschipi | I don't let evil propagate, like I'm doing right now. I'm discussing with you, ain't I? | 18:42 | |
brokenchicken | You told me to stop complaining | ||
raschipi | No, I'm told you it's againt the spirit od the language to complain. | 18:43 | |
brokenchicken rolls eyes | |||
m: " | |||
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unable to parse expression in double quotes; couldn't find final '"' at <tmp>:1------> 3"7⏏5<EOL> expecting any of: double quotes term» | ||
brokenchicken | m: "\c[man rolling eyes]" | ||
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Unrecognized character name man rolling eyesat <tmp>:1------> 3"\c[man rolling eyes7⏏5]"» | ||
18:43
lmmx left
|
|||
raschipi | I was told by TimToady in his book this is how things are, therefore you're also breaking rule 1. | 18:44 | |
brokenchicken doesn't mind | |||
cale2 | I like the idea perl having baby speak and also eloquent poetry | 18:45 | |
18:45
Ven left
|
|||
cale2 | but a baby doesn't often understand poetry | 18:45 | |
perlpilot | cale2: I like the reality of it more than the idea ;) | ||
cale2 | and a an adult poet doesn't like baby speak | 18:46 | |
So keep that in mind when answering stack overflow i guess | |||
18:47
labster joined
|
|||
diakopter | Perl 6 has been on modulecounts.com for more than a year; it's grown from 460 to 771 modules | 18:47 | |
18:47
wamba joined
|
|||
brokenchicken | ...which is still the bottom of the barrel as far as that site's concerned :P | 18:48 | |
diakopter | during the same timeframe, node/js grew from 220,000 modules to 380,000 | 18:49 | |
brokenchicken | m: say 771/460; say 380000/220000 | ||
camelia | rakudo-moar ed482e: OUTPUT«1.6760871.727273» | ||
brokenchicken | that's cause they make a new release for each version or something innit? | ||
+ massive wheel reinvention | |||
18:49
Ven joined
|
|||
diakopter | no, that's not counting versions/releases; that's unique modules | 18:50 | |
brokenchicken | 459/day... insane | 18:51 | |
brokenchicken releases leftpad.pm6 to try to catch up... | 18:52 | ||
diakopter | heheh | ||
mr_ron | Noticed the ad for Full Stuck Developer and couldn't resist googling for other work with that specialty www.google.com/#q=%22full+stuck+developer%22 | 18:54 | |
diakopter | they have 300 million package downloads daily | ||
but yes there are plenty of acme-ish things such as www.npmjs.com/package/ifyouwanttog...thatforyou | 18:55 | ||
mspo | I got an email for "full stack" recently | 18:58 | |
18:59
dogbert17 joined
19:00
Ven left
19:03
Tonik joined
19:04
st_elmo left
|
|||
raschipi | "full stack" means "we don't have a proper I.T. department" | 19:05 | |
19:05
st_elmo joined
|
|||
agentzh | m: my $a = 32; say $a.isa(NumStr); | 19:05 | |
camelia | rakudo-moar ed482e: OUTPUT«False» | ||
agentzh | is this a bug? | ||
brokenchicken | nope | 19:06 | |
agentzh | m: my $a = 32; say $a.does(NumStr); | ||
camelia | rakudo-moar ed482e: OUTPUT«False» | ||
brokenchicken | agentzh: NumStr is a subclass of both Num and Str. 32 on the other hand is an Int | ||
agentzh | brokenchicken: how can i test if an object is a primitive value? | ||
brokenchicken | agentzh: unsure what you mean by primitive value | ||
agentzh | like Int, Num, Str | ||
unblessed values | |||
and non-container values | 19:07 | ||
brokenchicken | agentzh: hm, they are tho | ||
oh value types I think's the word | |||
agentzh: what are you trying to do tho? | |||
agentzh | like in Perl 5: !ref $_ | ||
brokenchicken | agentzh: yeah, we don't have anything like that | ||
agentzh | i'm just writing a generic traversal function. | ||
hartenfels | agentzh: How about $thing ~~ Numeric|Stringy? | 19:08 | |
agentzh | traversing a generic data structure | ||
hartenfels: oh that looks nice if it works :) | |||
thanks, i'll try | |||
seems like i should include Bool here too. | |||
hartenfels | True | ||
brokenchicken | agentzh: that'll do the trick for numerics and strings, but we also have Cool that can act as either, so... keep that in mind | 19:09 | |
agentzh: Bool is Int and so does Numeric | |||
agentzh | brokenchicken: oh, good to know! | ||
19:09
Ven joined
|
|||
agentzh | thanks! | 19:09 | |
19:09
st_elmo left
|
|||
brokenchicken | agentzh: you've heard of .duckmap, right? A generic traversal function. | 19:10 | |
hartenfels | m: say * ~~ Numeric|Stringy for 12, 12.0, True, 'hello', [], '/'.IO, {} | ||
camelia | rakudo-moar ed482e: OUTPUT«{ ... }{ ... }{ ... }{ ... }{ ... }{ ... }{ ... }» | ||
hartenfels | Oops | ||
m: say $_ ~~ Numeric|Stringy for 12, 12.0, True, 'hello', [], '/'.IO, {} | |||
camelia | rakudo-moar ed482e: OUTPUT«TrueTrueTrueTrueFalseFalseFalse» | ||
gfldex | m: subset Value where Int|Str|Num|Bool; say (1,"1",1/2,True,Hash,Array) »~~» Value; | ||
camelia | rakudo-moar ed482e: OUTPUT«(True True False True False False)» | ||
gfldex | agentzh: ^^^ | ||
brokenchicken | missing Rat and Complex | ||
and FatRat | 19:11 | ||
gfldex | m: subset Value where Int|Str|Num|Rat|Complex|FatRat|Bool; say (1,"1",1/2,True,Hash,Array) »~~» Value; | ||
camelia | rakudo-moar ed482e: OUTPUT«(True True True True False False)» | ||
gfldex | how about int ? | ||
brokenchicken | I think that'll fall under Int | ||
gfldex | my int $i = 1; say $i ~~ Int; | ||
m: my int $i = 1; say $i ~~ Int; | 19:12 | ||
camelia | rakudo-moar ed482e: OUTPUT«True» | ||
brokenchicken | m: subset Value where Int|Str|Num|Rat|Complex|FatRat|Bool; say (1,"1",1/2,True,Hash,Array, my int $ = 42) »~~» Value; | ||
camelia | rakudo-moar ed482e: OUTPUT«(True True True True False False True)» | ||
brokenchicken | yeah | ||
m: subset Value where Numeric|Stringy; say (1,"1",1/2,True,Hash,Array, my int $ = 42) »~~» Value; | |||
camelia | rakudo-moar ed482e: OUTPUT«(True True True True False False True)» | ||
19:12
st_elmo joined
|
|||
brokenchicken | m: subset Value where Numeric|Stringy; (1,"1",1/2,True, [<1>, <42e0>, ("moar stuff",)]).duckmap(-> Value $_ {"some sort of {.^name} value" }).say | 19:13 | |
camelia | rakudo-moar ed482e: OUTPUT«(some sort of Int value some sort of Str value some sort of Rat value some sort of Bool value [some sort of IntStr value some sort of NumStr value (some sort of Str value)])» | ||
brokenchicken | agentzh: ^ like that one. We also got a .deepmap | 19:14 | |
19:15
Ven left
|
|||
brokenchicken | Stuff's like IO::Path ain't included in that tho | 19:16 | |
and Dateish | |||
19:18
Ven joined
|
|||
brokenchicken | BUT will include enums | 19:19 | |
m: enum Meows <a b c>; subset Value where Numeric|Stringy; (1,.5,True, a, Broken, DateTime.now, [42e0, ("moar stuff",)]).duckmap(-> Value $_ {"some sort of {.^name} value" }).say | |||
camelia | rakudo-moar ed482e: OUTPUT«(some sort of Int value some sort of Rat value some sort of Bool value some sort of Meows value some sort of PromiseStatus value 2017-01-19T20:19:59.443604+01:00 [some sort of Num value (some sort of Str value)])» | ||
agentzh | brokenchicken: that's interesting. | 19:20 | |
19:20
darutoko left
|
|||
raschipi | What would be the difference between Cool and you subset Value above? | 19:23 | |
hartenfels | Cool also has Array and Hash. | 19:24 | |
brokenchicken | m: subset Value where Numeric|Stringy; say [] but Numeric ~~ Value | ||
camelia | rakudo-moar ed482e: OUTPUT«True» | ||
brokenchicken | You can also cheat like that | ||
19:24
girafe left
|
|||
raschipi | Cool | 19:25 | |
brokenchicken | And IO::Path and List and Map and Seq | ||
raschipi | m: subset Value where Numeric|Stringy; say NumStr ~~ Value | 19:26 | |
camelia | rakudo-moar ed482e: OUTPUT«True» | ||
brokenchicken | Not sure what's weirder... that Hash is Cool or that Setties and Baggies ain't :/ | ||
NumStr is just a subclass of Num and Str | |||
Just like StrNum is a subclass of Str and Num | 19:27 | ||
raschipi | m: subset Value where Numeric|Stringy; say HashBag ~~ Value | ||
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Expected a term, but found either infix ~~ or redundant prefix ~ (to suppress this message, please use a space like ~ ~)at <tmp>:1------> 3ue where Numeric|Stringy; say HashBag ~~7⏏5 Value» | ||
brokenchicken | it's BagHash | 19:28 | |
it's ain;'t any of 'em, just Any and Mu | |||
raschipi | m: subset Value where Numeric|Stringy; say BagHash ~~ Value | ||
camelia | rakudo-moar ed482e: OUTPUT«False» | ||
brokenchicken | and does Baggy, and QuantHash | ||
and Associative | |||
raschipi | m: say BagHash ~~ Cool | ||
camelia | rakudo-moar ed482e: OUTPUT«False» | ||
brokenchicken | m: say QuantHash.^roles | ||
camelia | rakudo-moar ed482e: OUTPUT«((Associative))» | ||
19:28
Ven left
|
|||
brokenchicken | ^ that shows what roles a thing does | 19:29 | |
m: say BagHash.^mro | |||
camelia | rakudo-moar ed482e: OUTPUT«((BagHash) (Any) (Mu))» | ||
brokenchicken | and this shows the classes | ||
m: dd [.^mro, .^roles] without NumStr | |||
camelia | rakudo-moar ed482e: OUTPUT«[(NumStr, Num, Str, Cool, Any, Mu), (Real, Numeric, Stringy)]» | ||
agentzh | hah, there is a .^roles method. handy. | 19:34 | |
brokenchicken: where can i get a list of those meta methods? | |||
agentzh already knows .^name, .^methods, and .^attributes. | 19:35 | ||
brokenchicken | m: say BagHash.HOW.^methods».name.sort.say | ||
camelia | rakudo-moar ed482e: OUTPUT«(ACCEPTS ACCEPTS ASSIGN-KEY ASSIGN-POS AT-KEY AT-POS Array BIND-KEY BIND-POS BUILDALL BUILDALLPLAN BUILDPLAN BUILD_LEAST_DERIVED Bag BagHash Bool CREATE Capture DELETE-KEY DELETE-POS DUMP DUMP-OBJECT-ATTRS DUMP-PIECES EXISTS-KEY EXISTS-POS FLATTENABLE_HASH…» | ||
agentzh | hah, didn't realize .HOW supports those meta methods too. *grin* | ||
thanks | |||
seems like the docs are lagging behind. | 19:36 | ||
19:36
zakharyas left
|
|||
brokenchicken | agentzh: the $x.^blah is a shorthand for $x.HOW.blah($x) | 19:36 | |
agentzh | brokenchicken: yeah, i was aware of that. just didn't know HOW.HOW is possible :) | ||
brokenchicken | m: say BagHash.HOW.^mrow | ||
camelia | rakudo-moar ed482e: OUTPUT«No such method 'mrow' for invocant of type 'NQPClassHOW' in block <unit> at <tmp> line 1» | ||
brokenchicken | m: say BagHash.HOW.^mro.say | 19:37 | |
camelia | rakudo-moar ed482e: OUTPUT«((ClassHOW) (Any) (Mu))True» | ||
brokenchicken | m: say 42.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW | ||
camelia | rakudo-moar ed482e: OUTPUT«No such method 'gist' for invocant of type 'KnowHOW' in block <unit> at <tmp> line 1» | ||
brokenchicken | m: say 42.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.HOW.^name | ||
camelia | rakudo-moar ed482e: OUTPUT«KnowHOW» | ||
agentzh | oy | ||
brokenchicken | :) | ||
agentzh | maybe going too meta? *grin* | ||
brokenchicken | :) | ||
19:39
Ven joined
|
|||
agentzh | Numberic|Stringy serves me very well. thanks for the help! | 19:39 | |
is there a shorthand for .can("dump-me").Bool ? | 19:40 | ||
19:40
girafe joined
|
|||
agentzh | it's kinda annoying that .can() does not return a boolean directly. | 19:40 | |
raschipi | cast it to bool with ? | ||
cast it to bool with "?" | |||
agentzh | i'm just using it in when. | 19:41 | |
19:41
cdg left
|
|||
agentzh | so the retval of .can() makes when fails. | 19:41 | |
s/fails/fail/ | |||
raschipi: ? is a prefix operator? | |||
timotimo | yup | 19:42 | |
agentzh | thanks! i just found it in the long p6 operator list :D | ||
much better than .Bool. | |||
raschipi | There's also the lower precedence "so" that does the same thing. | 19:43 | |
agentzh is having a lot of fun coding in p6. | |||
brokenchicken | m: dd "foo".^lookup('dump-me') | ||
camelia | rakudo-moar ed482e: OUTPUT«Mu» | ||
brokenchicken | m: dd so "foo".^lookup('dump-me') | 19:44 | |
camelia | rakudo-moar ed482e: OUTPUT«Bool::False» | ||
agentzh | raschipi: thanks for the tip! | ||
brokenchicken | There's also .so | ||
agentzh | ah, .^lookup(). | ||
is it expected to be faster or slower than .can()? | |||
raschipi | Like when children fight: "So!" "Not so!" "So!" "Not so!". | ||
brokenchicken | agentzh: you can just write it as *.can("blahg") if you're using it in when | ||
agentzh | what's the * magic? | 19:45 | |
raschipi | Yo're supposed to fill it in, not P6 in this case. | ||
agentzh | i used to see that in @a[*-3] | ||
brokenchicken | agentzh: makes a lambda for roughly -> $x { $x.can("blah") } | ||
raschipi | Oh, neat. | 19:46 | |
brokenchicken | agentzh: and `when` smartmatches and smartmatch against a Callable uses the truthiness of the return value as result, hence you avoid the ? or .so or .Bool | ||
hm | |||
agentzh | got it. | ||
i guess creating a closure here is a bit slower? | |||
brokenchicken | m: when .can('blah') { say "whatever" }; say "meow" | ||
camelia | rakudo-moar ed482e: OUTPUT«meow» | ||
brokenchicken | m: when .can('rotor') { say "whatever" }; say "meow" | ||
camelia | rakudo-moar ed482e: OUTPUT«meow» | ||
brokenchicken | m: when .can('List') { say "whatever" }; say "meow" | 19:47 | |
camelia | rakudo-moar ed482e: OUTPUT«meow» | ||
brokenchicken | .oO( dafuq ) |
||
m: dd .can('List') | |||
camelia | rakudo-moar ed482e: OUTPUT«(Method+{<anon|55315056>}.new,)» | ||
brokenchicken | Ah right smartmatch | ||
raschipi | agentzh: Don't worry about performance until you can profile it. | 19:48 | |
brokenchicken | m: sub x { say "running $^x" }; $_ = True; when x 42 {}; when x 45 {} | 19:49 | |
camelia | rakudo-moar ed482e: OUTPUT«running 42» | ||
19:50
Tonik left
|
|||
brokenchicken | agentzh: I'd say the *.can... is more correct. When smartmatches. The *.can basically calls .can() on whatever's in $_ and the return value's truthiness is used for whether or not `when` is run. Whereas with just .can() you're using return value to smartmatch against original value | 19:50 | |
Which is why you're needing the .Bool on it | |||
And that'd prolly give you wrong results when you least expect it | 19:51 | ||
m: given False { when ?.can('List') { say "lulz fail" }; } | |||
camelia | rakudo-moar ed482e: OUTPUT«lulz fail» | ||
brokenchicken | m: given False { when ?.can('dasdasdasdsad') { say "lulz fail" }; } | ||
camelia | ( no output ) | ||
brokenchicken | or not | ||
mhm, smartmatch with false's alwayus false | 19:52 | ||
Never mind then :) | |||
agentzh: as for slowness, I'd think it'd be just an irrelevant compile time hit | 19:54 | ||
m: for ^100_000 { when *.can("foo") {} }; say now - INIT now | 19:55 | ||
camelia | rakudo-moar ed482e: OUTPUT«0.5298808» | ||
brokenchicken | m: for ^100_000 { when .can("foo") {} }; say now - INIT now | ||
camelia | rakudo-moar ed482e: OUTPUT«0.5724014» | ||
brokenchicken | even "faster" | ||
19:56
lizmat left
|
|||
agentzh | hah | 19:56 | |
brokenchicken: where can i find the docs for "*"? | 19:58 | ||
it looks very interesting | |||
brokenchicken | agentzh: it's Whatever (and when it makes lambdas, it's WhateverCode) | ||
There's also a HyperWhatever that's two stars | |||
agentzh | Okay, i see. | 19:59 | |
19:59
Ven left
|
|||
agentzh | thanks | 19:59 | |
raschipi | docs.perl6.org/type/Whatever | ||
docs.perl6.org/type/WhateverCode | |||
brokenchicken | huggable: Whatever | ||
huggable | brokenchicken, Placeholder for an unspecified value/argument: docs.perl6.org/type/Whatever | ||
agentzh | raschipi: thanks! | ||
brokenchicken | Yeah, first section in Whatever seems to talk about the good stuff | ||
agentzh | raschipi: what do you usually use for profiling p6 code? | ||
brokenchicken | perl6 has --profile option | 20:00 | |
agentzh | yeah, the doc is very clear. | ||
brokenchicken: nice! i'll try it out :) | |||
agentzh is writing a DSL compiler in p6. | |||
raschipi | huggable: performance | ||
huggable | raschipi, nothing found | ||
brokenchicken | m: (* * * * * * * * * * * * * * * * * * * * * * *)[^12+1].say | ||
camelia | ( no output ) | ||
brokenchicken | no output? You're tricking me, robot | ||
m: (* * * * * * * * * * * * * * * * * * * * * * *)[^12+1].say | 20:01 | ||
camelia | ( no output ) | ||
brokenchicken | weird | ||
oh right | |||
m: (* * * * * * * * * * * * * * * * * * * * * * *)(^12+1).say | |||
camelia | rakudo-moar ed482e: OUTPUT«Too few positionals passed; expected 12 arguments but got 1 in block <unit> at <tmp> line 1» | ||
raschipi | docs.perl6.org/language/performance | ||
brokenchicken | m: (* * * * * * * * * * * * * * * * * * * * * * *)(|(^12+1)).say | ||
camelia | rakudo-moar ed482e: OUTPUT«479001600» | ||
geekosaur | huggable, performance :is: docs.perl6.org/language/performance | 20:02 | |
huggable | geekosaur, Added performance as docs.perl6.org/language/performance | ||
brokenchicken | agentzh: it's kinda slow for large programs (the browser crawls to halt loading so much JSON). There's --profile-filename=whatever.sql option that outputs SQL format but there ain't yet a viewer for that format | 20:03 | |
other than...raw SQL queries I mean :P | |||
20:04
Ven joined
|
|||
moritz | do we have an implementation of en.wikipedia.org/wiki/Error_function somewhere in Perl 6? | 20:05 | |
brokenchicken | not in core | 20:06 | |
uuu pretty graphs | |||
perlpilot | maybe on rosettacode | ||
agentzh | brokenchicken: oh yeah, the .html takes forever to load in my chrome it seems. | ||
moritz | github.com/colomon/Math-Odd-Functions exposes erf through NativeCall | 20:08 | |
agentzh | okay, finally rendered. | 20:09 | |
brokenchicken | prof-m: say 'hello world' | ||
camelia | prof-m : OUTPUT«No such file or directory» | ||
.. Prof: p.p6c.org/3dc9d17 | |||
agentzh | chrome has asked me a few times whether to kill that page. | ||
brokenchicken | hehe | ||
agentzh | the report is very nice. | ||
camelia | prof-m : OUTPUT«(timeout)Can't exec "./rakudo-inst/bin/perl6-m": No such file or directory at lib/EvalbotExecuter.pm line 206.cat: /home/camelia/rakudo-inst/revision: No such file or directorynow running scp.../tmp/mprof.html: No such file or directory» | 20:10 | |
.. Prof: p.p6c.org/3dc9d2d | |||
agentzh | tho painful to render | ||
brokenchicken | hm, that url is a 404 | ||
Ah, and that is why... | |||
agentzh | okay, the grammar takes most of the CPU time. | ||
the parser. | |||
i have a p5 implementation for the same parser and the p5 version is 100% faster. | 20:11 | ||
raschipi | But is it as nice? | ||
agentzh | p6 version is nicer, of course. | 20:12 | |
brokenchicken | agentzh: only 100%? That's actually quite nice | ||
agentzh | though i'm not very happy with p6's actions class. | ||
the Capture objects can be tedious to deal with when constructing my own AST. | |||
brokenchicken: yeah, i benchmarked several real-world input, most of them are quite large. | 20:13 | ||
brokenchicken | agentzh: got code to look at? | ||
raschipi | We're within an order of magnitude of Perl5, very nice. | ||
brokenchicken | of the Actions class | ||
agentzh | brokenchicken: the p5 version has been massively profiled and optimized in the last month. | ||
using 5.24.0 | |||
20:14
lmmx joined
|
|||
brokenchicken | m: say sum (1..100000000000000000000000000000000) | 20:14 | |
camelia | rakudo-moar ed482e: OUTPUT«5000000000000000000000000000000050000000000000000000000000000000» | ||
agentzh | brokenchicken: sorry, it is company code atm, so i cannot show it to you. | ||
brokenchicken | But we can do THAT instantly! :) | ||
agentzh: alright :) | |||
20:15
raschipi left,
Ven left
|
|||
agentzh | the p6 grammar is relatively large. | 20:15 | |
411 LOC. | |||
for a production DSL used in CDN and ISP networks. | |||
brokenchicken | neat | ||
mspo | 50% slower is pretty good for p6 | 20:16 | |
actually really good | |||
brokenchicken | the upcoming release will have quite a few of nice optimizations too | ||
agentzh | mspo: yeah, i was actually surposed when i first saw the results. | ||
*surprised | |||
brokenchicken | github.com/rakudo/rakudo/blob/nom/...g#L94-L147 | 20:17 | |
buggable: speed | |||
buggable | brokenchicken, ▆▃▄▅▃▅▄▄▃█▆▃▃▄▄▄▄▅▄▅▄▅▅▆▄▄▆▄▄▆▄▂▁▂▃▂▂▄▃▂▇▂▂▃▁▁▁▃▁▂ data for 2016-12-30–2017-01-19; range: 4.873s–5.958s | ||
agentzh | mspo: i had been expecting a 10x slow down or something. | ||
*grin* | |||
mspo | agentzh: yeah | ||
agentzh: does that include moar startup time and stuff? | |||
agentzh | mspo: nope. | ||
mspo | okay so a good measurement | ||
agentzh: nice that you're using p6 at work | 20:18 | ||
agentzh | mspo: i used now() in p6 to benchmark the real thing. | ||
*to time | |||
mspo: sure, that's been my dream since 2007 :) | |||
brokenchicken | :) | ||
agentzh | mspo: we're also implementing a subset of Perl 6 targeting LuaJIT so that we can also run Perl 6 online. | 20:19 | |
mspo | agentzh: crazy | ||
brokenchicken | :o | ||
agentzh | mspo: a lot of tests have already passed :) | ||
a recursive fib(35) p6 program is 10x faster in our p6 compiler than rakudo+moarvm. | 20:20 | ||
20:20
dwarring joined
|
|||
agentzh | the goal is to make our compiler bootstrapped. | 20:20 | |
and i'm currently borrowing rakduo to bootstrap my own compiler and other DSL compilers :) | |||
*my own p6 compiler | |||
so i really appreciate all you guys' help here. | 20:21 | ||
i'm still learning p6 myself. | |||
discovering new cool features everyday. | |||
perlpilot | agentzh: constant cool features is part of the Perl Way ;) | 20:22 | |
agentzh | perlpilot: indeed! | ||
glad to see my p6 code is so much nicer than p5. | |||
getting rid of a lot of parens, for example *grin* | 20:23 | ||
and my $self = shift | |||
"my self = shit" *grin* | |||
20:23
Ven joined
|
|||
agentzh | using at least a subset of Perl 6 in very busy network gateways and web applications is definitely a goal of our team :) | 20:24 | |
brokenchicken | cool | ||
agentzh | it has to be significantly faster than perl 5 too. | 20:25 | |
mspo | where is this? :) | ||
luajit is probably faster than p5 for some stuff | |||
agentzh | mspo: not open sourced yet :) | ||
mspo | but p5 is pretty fast | ||
agentzh | mspo: still busy hacking on it. | ||
mspo | agentzh: I mean where do you work? | ||
brokenchicken | " recursive fib(35) p6 program is 10x faster in our p6 compiler than rakudo+moarvm" .... I hope to eventually see some PRs to rakudo/moarvm with ideas :) | ||
agentzh | mspo: yeah, p5 is pretty fast as compared to rakduo, but still not fast enough for CDN and ISP gateways. | ||
perlpilot | agentzh: I had a minor dream at last year's TPC::NA (neé YAPC::NA) of giving a talk at this year's TPC::NA called "Perl 6 in Production" Alas, I've yet to use it that way. | 20:26 | |
mspo | agentzh: yeah I'm sure | ||
brokenchicken | m: my $fib = (1, 1, *+*...*); for ^000 { $ = $fib[^100] }; say now - INIT now | ||
camelia | rakudo-moar ed482e: OUTPUT«Potential difficulties: Leading 0 does not indicate octal in Perl 6. Please use 0o00 if you mean that. at <tmp>:1 ------> 3my $fib = (1, 1, *+*...*); for ^0007⏏5 { $ = $fib[^100] }; say now - INIT now0.0018209» | ||
mspo | study luajit tricks and see how you can't use them because the language is too flexible | ||
brokenchicken | m: my $fib = (1, 1, *+*...*); for ^1000 { $ = $fib[^100] }; say now - INIT now | ||
camelia | rakudo-moar ed482e: OUTPUT«0.31964028» | ||
brokenchicken | m: my $fib = (1, 1, *+*...*); for ^10_000 { $ = $fib[^100] }; say now - INIT now | ||
camelia | rakudo-moar ed482e: OUTPUT«2.8997799» | ||
20:27
bwisti left
20:28
kyan left
20:29
kyan joined
20:30
Ven left
|
|||
brokenchicken | m: my $fib = (1, 1, *+*...*); $ = $fib[^10000]; say now - INIT now; given now { $ = $fib[^10000]; say now - $_ } | 20:32 | |
camelia | rakudo-moar ed482e: OUTPUT«0.30545401520.020881» | ||
agentzh | mspo: i work in the SF bay area. | ||
brokenchicken | neat | ||
agentzh | mspo: for the OpenResty Inc company. | 20:33 | |
20:33
kyan left
|
|||
agentzh | mspo: i used to work for CloudFlare. | 20:33 | |
mspo | agentzh: okay | ||
agentzh: I was thinking openrest (luajit) but didn't realize they were a company | 20:34 | ||
agentzh: and knew it wasn't fastly since you weren't parsing VCL | |||
agentzh | mspo: well, we are just setting up the company. | ||
mspo | okay | ||
agentzh | mspo: and OpenResty is being supported by the OpenResty Software Foundation as well, which is nonprofit org in Hongkong. | 20:35 | |
agentzh hates VCL. | |||
mspo | VCL isn't fun I agree | ||
but fastly is nice | 20:36 | ||
agentzh | We invented an Edge DSL for that purpose. | ||
a pure rule-based language. | |||
can be compiled down to optimized Lua code. | |||
mspo | can you do restarts and rewrites? | ||
agentzh | targeting OpenResty/LuaJIT. and i'm currently working on the p6 version of the Edge DSL compiler. | ||
we already have a p5 version. | 20:37 | ||
20:37
wamba left
|
|||
agentzh | and the benchmark i talked about earlier is for this edge compiler. | 20:37 | |
brokenchicken | \o/ | ||
mspo | cotendo used to have an xml config language | ||
agentzh hates xml too *grin* | 20:38 | ||
brokenchicken | :) | ||
agentzh | well, CDN vendors will be part of our customers, though not exclusively. | ||
mspo | I mostly use the gui for fastly stuff but it's nice to have the vcl escape hatch | ||
20:39
wamba joined
|
|||
agentzh | OpenResty Inc is not a CDN vendor. | 20:39 | |
we sell licenses of software. | |||
mspo | trying to use cloudflare or anyone else is like wearing handcuffs | ||
agentzh | including p6 compilers *grin* | ||
dalek | pan style="color: #395be5">perl6-examples: 4fc79e3 | (David Warring)++ | t/categories/cookbook/17sockets.t: fix spurious socket test failure |
||
pan style="color: #395be5">perl6-examples: 67713c4 | (David Warring)++ | M (2 files): add a META6.json. Simplify install-deps rule in the Makefile |
|||
mspo | so you're going to sell the DSL? | ||
to like.. a distil | |||
whitelabel cdn? | 20:40 | ||
agentzh | mspo: we sell solutions, apps, and tools. | ||
mspo | agentzh: okay | ||
agentzh: when distil, f5, and cdnetworks starts calling with their new "DSL config language to show me" I'll think about you | 20:41 | ||
agentzh | mspo: cool, thanks. | 20:42 | |
mspo | limelight | ||
agentzh | mspo: we have multiple DSLs, for different domains. | 20:43 | |
20:43
Ven joined
|
|||
agentzh | mspo: Perl 6, Ruby, Python, and JS will also be our "DSLs" *grin* | 20:43 | |
at least a core subset of them. | |||
and LuaJIT is our "common language runtime" | |||
mspo | tricky | ||
agentzh | mspo: yeah, tricky, and that's why we can sell them *grin* | 20:44 | |
we may open source the unoptimized versions of these compilers to the community. | |||
mspo | agentzh: going to also do HCL? | ||
agentzh | and just sell the optimized versions. | ||
20:44
espadrine_ joined
|
|||
mspo | that could be interesting | 20:44 | |
(hashicorp config langauge) so you were a first class target of terraform | 20:45 | ||
agentzh | mspo: what is HCL? | ||
okay, just saw your message. | |||
Geth | span style="color: #395be5">perl6-examples: 504ddbf2f3 | (David Warring)++ | META6.json typo |
20:47 | |
agentzh | yeah, we may consider that. | ||
inventing new compilers in perl 6 is just too much fun. | |||
20:51
zakharyas joined
20:52
nicq20 joined
20:57
cale2 left
21:00
Ven left
21:02
Gasher left
21:03
Ven joined
21:08
FROGGS left
21:09
TEttinger joined
21:10
lizmat joined
21:12
rindolf left,
cdg joined
21:15
Ven left
21:17
ggoebel joined
|
|||
gfldex | ugexe: could you have a look at the following build log that I don't understand please? gist.github.com/gfldex/666e16b708f...de99928128 | 21:19 | |
21:23
Ven joined
|
|||
Geth | span style="color: #395be5">perl6-examples: 3c5645b210 | (David Warring)++ | README.md [README.md] update dependency installation notes. |
21:24 | |
21:26
st_elmo left
21:32
Ven left,
nicq20 left
21:42
lizmat_ joined,
Ven joined
21:43
lizmat left
21:44
ocbtec left
21:51
lizmat_ left
|
|||
ugexe | gfldex: heh, the only thing I could guess is maybe a zef bug with how it filters on a distribution's license | 21:53 | |
Operator::defined-alternation fetches fetched once, extracted once, but then during the filter stage it gets duplicated somehow | 21:54 | ||
RabidGravy | well you've all gone another month without breaking any of my modules | ||
of course something that has an external dependency fails because the world changes | 21:56 | ||
brokenchicken | RabidGravy, sorry, we'll try hardner next month :p | 21:58 | |
You checked againt HEAD, right? | |||
RabidGravy | yrah | ||
brokenchicken | cool | ||
moritz | organizations can now apply at Google Summer of Code | ||
anybody want to do a Perl 6 application? | 21:59 | ||
RabidGravy | and 18 minutes vs more than double that 6 months ago | 22:00 | |
[Coke] | moritz: there isn't a Perl 6 organization. | ||
Haven't heard anything about TPF applying, but I think the last time we did, we were not chosen, maybe in favor of new blood. | 22:01 | ||
22:01
Ven left
|
|||
[Coke] | I'm sure we could find some p6 projects if we did it via the TPF. | 22:01 | |
22:02
Ven joined
22:05
zakharyas left
|
|||
MasterDuke | agentzh: if you do --profile-filename=something.json you can use github.com/tadzik/p6profiler-qt, which can handle much larger profiles than the browser can | 22:05 | |
22:08
cognominal left,
skids left
22:12
RabidGravy left
22:13
lizmat joined
22:14
raiph joined
22:16
Ven left
|
|||
jdv79 | is there a way in a signature to transform using a method call? like run from-json? | 22:18 | |
22:22
Ven joined
|
|||
moritz | [Coke]: there doesn't have to be legal Perl 6 organization to apply as a Perl 6 project, as far as I understand | 22:25 | |
gfldex | m: role Transform { method Transform { 't' ~ self } }; my $i = 42 but Transform; sub f( Transform(Int) $i){ say $i }; f $i; | 22:26 | |
camelia | rakudo-moar ed482e: OUTPUT«42» | ||
moritz | [Coke]: they even have provisions for projects that can't accept payments (let SPI handle it, for example) | ||
gfldex | i did expect it to call Transform | ||
ugexe | gfldex: that doesn't seem to be it either. I'll have to add some extra debugging stuff to figure this out because its looking like it might be a rakudo bug | ||
moritz | [Coke]: and TPF didn't get in the last two (?) times, so maybe a separate attempt would be more helpful | ||
ugexe | i'll figure it out tonight though | ||
gfldex | brilliant, I should be able to write the blog post tomorrow that I wanted to write 2 days ago :) | 22:27 | |
moritz | time for sleep here, g'night | 22:28 | |
gfldex | i do not expect it to call Transform anymore | ||
ugexe: removing license from META.info didnt work for me either | 22:29 | ||
jdv79 | Variable definition of type Str:D requires an initializer | 22:30 | |
that seems a bit misleading | |||
as a "is required" will suffice | |||
22:31
Ven left
|
|||
jdv79 | as a "is required" will suffice | 22:31 | |
oops | |||
22:32
lmmx left
|
|||
brokenchicken | m: class { has Str:D $x } | 22:34 | |
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable definition of type Str:D requires an initializerat <tmp>:1------> 3class { has Str:D $x 7⏏5}» | ||
brokenchicken | m: class { has Str:D $.x } | ||
camelia | rakudo-moar ed482e: OUTPUT«5===SORRY!5=== Error while compiling <tmp>Variable definition of type Str:D requires an initializerat <tmp>:1------> 3class { has Str:D $.x 7⏏5}» | ||
brokenchicken | prolly could say "attribute" instead of variable too | ||
jdv79: file it. [email@hidden.address] | 22:35 | ||
22:40
cpage_ left
|
|||
agentzh | MasterDuke: thanks for the tip! | 22:42 | |
is there a shorthand for "!(a === b)" ? | 22:43 | ||
brokenchicken | a !=== b | ||
agentzh | it works?! | 22:44 | |
brokenchicken | yup, ! is a meta operator | ||
agentzh | m: "hello" !=== "hello" | ||
camelia | rakudo-moar ed482e: OUTPUT«Potential difficulties: Useless use of !=== in sink context at <tmp>:1 ------> 3"hello" 7⏏5!=== "hello"» | ||
agentzh | m: say "hello" !=== "hello" | ||
camelia | rakudo-moar ed482e: OUTPUT«False» | ||
agentzh | wow | ||
thanks! | |||
brokenchicken | m: say "hello" !=== "ballo" | ||
camelia | rakudo-moar ed482e: OUTPUT«True» | ||
MasterDuke | agentzh: np. there's a QT imposed limit on the size profile it can handle (~130Mb IIRC), so if the profile ends up larger than that you'll have to use SQL | ||
agentzh | MasterDuke: gotcha. thanks | 22:45 | |
22:45
alimon left
|
|||
agentzh | speaking of p6 profiling, i'm thinking about porting my sampling-based systemtap flame graph tools over to the perl 6 world. | 22:45 | |
they work great for perl 5 and luajit, for example. | |||
usable for online sampling. | 22:46 | ||
brokenchicken | sweet | ||
agentzh | github.com/agentzh/perl-systemtap-toolkit | ||
i used to give a talk on perl 6 flame graphs on YAPC::NA: www.google.com/url?sa=t&rct=j&...MeF4PFmgtA | |||
sorry for the google search link. it should be agentzh.org/misc/slides/yapc-na-201...graphs.pdf | 22:47 | ||
we successfully used this flame graph tool to make perl 5's pegex parsing framework times faster IIRC. | 22:48 | ||
and the data output is minimal. thanks to the sampling approach. | |||
we also have tools for LuaJIT VM profiling: github.com/openresty/stapxx#lj-vm-states | 22:49 | ||
similar to what the current perl 6 profiler report offers. | |||
like GC overhead shreshold, and etc. | |||
how much time spent on JITted code and how much on interpreted code, and how much on external C calls. | 22:50 | ||
but they are very light weight. | |||
and can be enabled and disabled dynamically when the process is running. | |||
and no change is needed in the target application. | |||
and even getting a full report of all the GC object stats, live and dead, all those not yet collected: github.com/openresty/stapxx#lj-gc-objs | 22:51 | ||
22:52
haxmeister joined
|
|||
haxmeister | www.perlfoundation.org/perl6/index....ial_part_1 | 22:52 | |
^switches languages in middle of tut | |||
ugexe | gfldex: heh github.com/gfldex/perl6-rakudo-sli...6.info#L15 | 22:53 | |
22:54
haxmeister left
|
|||
Geth | span style="color: #395be5">perl6-examples: ba0795cec5 | (David Warring)++ | 4 files switch from panda to zef |
22:54 | |
span style="color: #395be5">perl6-examples: 33124d6c5a | (David Warring)++ | META6.json add missing File::Find dependency |
|||
span style="color: #395be5">perl6-examples: a1dabfb813 | (David Warring)++ | categories/euler/prob288-shlomif.p6 optimize euler prob 288 Lower to native ints. 4x speed improvement. |
|||
ugexe | gfldex: btw its META6.json, not META6.info (and preferably not META.info) | 22:57 | |
brokenchicken | haxmeister, that's hilarious :) | 22:59 | |
22:59
cognominal joined
|
|||
brokenchicken | it's also very dated.... "The language changes a bit every week and Rakudo doesn't support every command" | 23:00 | |
23:02
Ven joined
23:08
cyphase joined
23:10
agentzh left
23:14
trnh joined
23:16
Ven left
23:19
lukaramu left
|
|||
[Coke] | moritz: (tpf, p6) sure, we could put together a go ourselves. | 23:21 | |
(but we should make the TPF take any money if we get it and put it in the p6 fund.) | |||
23:22
espadrine_ left,
Ven joined
23:30
Ven left
23:32
lostinfog left,
mr-foobar joined
23:39
Praise joined
23:40
wamba left
23:42
Ven joined
23:43
Ven left
23:54
lmmx joined
|