»ö« 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.
brokenchicken What it means is a LTA error for whatever problem your code has :) 00:00
(or a bug)
jdv79 its happening on a p5 sub call in my app but i can't golf it yet 00:02
in isolation is works fine
*it
brokenchicken *shrug* I only see it mentioned in World in symbol lookup: github.com/rakudo/rakudo/blob/nom/....nqp#L3927 in Actions on EXPORT sub: github.com/rakudo/rakudo/blob/nom/....nqp#L5719 and as a method defined on stash 00:04
Run with --ll-exception it should give better stacktrace
Is it called a stacktrace or a backtrace?
brokenchicken goes to play Witcher 2 for a bit :)
jdv79 ah ha 00:12
something to do with having use XML; and use XML::Entites:from<Perl5> in the same scope 00:13
shouldn't that work?
brokenchicken Yeah, but there are a couple of bugs that involve stuff like that doing wrong things 00:15
jdv79 nine: ^^^
i guess i'll bug it
well, i unfortunately need to do that:(
brokenchicken Like rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history and rt.perl.org/Ticket/Display.html?id...et-history 00:16
XML is just a type object right, you don't need any subs or anything? Don't know if it'll help, but maybe try `use XML` in a separate file and then do constant XXML is export = XML; 00:17
And then in the file with XML::Entities, you won't have XML:: namespace
(I'm just making shit up as I go along, I've no idea if this would work :P) 00:18
jdv79 well, XML does export sbus 00:21
subs
from-xml() for instance
brokenchicken ok, same stuff 00:22
constant &something-or-other = &from-xml; but that's buggy too, so do something like our $whatever is export = &from-xml; or sub whatever(|c) is export { from-xml |c } 00:23
or sub EXPORT { { '&from-xml' => &from-xml } } 00:24
jdv79 can i just use XML somewhere else and just call XML::from-xml()? 00:25
that seems to not work either
brokenchicken You'd be able to call that only from where you used it... and only if those subs are `our` subs 00:26
jdv79 oh right 00:27
brokenchicken: your 2nd to last suggestion seems to wokr! 00:30
work even
thanks
brokenchicken w00t! 00:31
00:33 pyrimidine joined 00:38 pyrimidine left 00:39 BenGoldberg joined
BenGoldberg m: use XML; 00:44
camelia rakudo-moar e5ca5c: OUTPUT«===SORRY!===␤Could not find XML at line 1 in:␤ /home/camelia/.perl6␤ /home/camelia/rakudo-m-inst-1/share/perl6/site␤ /home/camelia/rakudo-m-inst-1/share/perl6/vendor␤ /home/camelia/rakudo-m-inst-1/share/perl6␤ CompUnit::Repositor…»
BenGoldberg m: say $*CWD
camelia rakudo-moar e5ca5c: OUTPUT«"/home/camelia".IO␤» 00:45
BenGoldberg m: say "/home/camelia/rakudo-m-inst-1/share/perl6/site".IO.dir 00:46
camelia rakudo-moar e5ca5c: OUTPUT«("/home/camelia/rakudo-m-inst-1/share/perl6/site/short".IO "/home/camelia/rakudo-m-inst-1/share/perl6/site/precomp".IO "/home/camelia/rakudo-m-inst-1/share/perl6/site/sources".IO "/home/camelia/rakudo-m-inst-1/share/perl6/site/resources".IO "/home/camelia/…»
BenGoldberg m: say "/home/camelia/rakudo-m-inst-1/share/perl6".IO.dir
camelia rakudo-moar e5ca5c: OUTPUT«("/home/camelia/rakudo-m-inst-1/share/perl6/lib".IO "/home/camelia/rakudo-m-inst-1/share/perl6/runtime".IO "/home/camelia/rakudo-m-inst-1/share/perl6/short".IO "/home/camelia/rakudo-m-inst-1/share/perl6/precomp".IO "/home/camelia/rakudo-m-inst-1/share/perl…»
BenGoldberg m: say +"/home/camelia/rakudo-m-inst-1/share/perl6".IO.dir
camelia rakudo-moar e5ca5c: OUTPUT«12␤»
jdv79 tony-o: HTML::Parser::XML fails its tests for me 00:48
00:50 Actualeyes joined
tony-o jdv79: taking a look at it right now. 00:54
00:54 lep-delete left
tony-o jdv79: what version of XML and perl6 are you using? 00:55
jdv79 how do i get the version of XML? 00:56
tony-o sorry - i didn't see the p6 at the bottom of the gist
00:57 lep-delete joined
tony-o jdv79: zef info XML 00:57
jdv79 0.0.2 00:58
00:58 agentzh joined
BenGoldberg m: say 'ab' ~~ rx!abc! 00:59
camelia rakudo-moar e5ca5c: OUTPUT«Nil␤»
BenGoldberg m: say 'ab' ~~ rx!ab!
camelia rakudo-moar e5ca5c: OUTPUT«「ab」␤»
BenGoldberg m: say 'ab' ~~ rx!{rx/a/}{rx/b/}!
camelia rakudo-moar e5ca5c: OUTPUT«「」␤»
jdv79 the errors seem like more of the same sort of lexical ns stuff
that's going around lately:(
BenGoldberg m: my $a = rx/a/; my $b = rx/b/; say 'ab' ~~ rx!$a$b! 01:00
camelia rakudo-moar e5ca5c: OUTPUT«「ab」␤»
tony-o yea i'm having a problem reproducing the issue
Geth oc: 0d88b21100 | (Samantha McVey)++ | doc/Type/IO/Path.pod6
Better examples for .basename and .dirname

Old examples were not as clear as they could have been, and did not show examples for all the cases the user may want to know the result of.
tony-o i'm rebuilding moar/p6 right now
BenGoldberg m: my $a = rx/a/; my $b = rx/b/; say 'ab' ~~ rx!{$a}$b!
camelia rakudo-moar e5ca5c: OUTPUT«「b」␤»
BenGoldberg m: my $a = rx/a/; my $b = rx/b/; say 'ab' ~~ rx!${$a}$b! 01:01
camelia rakudo-moar e5ca5c: OUTPUT«Nil␤»
BenGoldberg is confused
tony-o jdv79: is that moar-blead or just moar?
BenGoldberg: what output are you expecing? 01:02
BenGoldberg I am expecting rx/{...}/ to act much like qq/{...}/. 01:03
BenGoldberg should probably go reread the docs. It probably is supposed to do something more interesting. 01:04
m: "{1+2}".say
camelia rakudo-moar e5ca5c: OUTPUT«3␤»
BenGoldberg m: rx"{1+2}".say; 01:05
camelia rakudo-moar e5ca5c: OUTPUT«rx"{1+2}"␤»
tony-o m: rx"${1+3}".say
camelia rakudo-moar e5ca5c: OUTPUT«rx"${1+3}"␤»
tony-o jdv79: please do a pull on that repo and give it another shot at testing. 01:06
jdv79 oh look it works! 01:07
well, installed
brokenchicken BenGoldberg: IMO worth rakudobugging. There may well be a good explanation for what it's doing, but it could also be a bug :) 01:08
m: my $a = rx/a/; my $b = rx/b/; say 'ab' ~~ rx!{dd $a; }$b! 01:09
camelia rakudo-moar e5ca5c: OUTPUT«Regex $a = rx/a/␤Regex $a = rx/a/␤「b」␤»
brokenchicken hmm
m: my $a = 'a'; my $b = 'b'; say 'ab' ~~ rx!{$a}$b!
camelia rakudo-moar e5ca5c: OUTPUT«「b」␤»
brokenchicken m: my $a = 'a'; my $b = 'b'; say 'ab' ~~ rx!<({$a}$b)>! 01:10
camelia rakudo-moar e5ca5c: OUTPUT«「b」␤»
brokenchicken m: my $a = 'a'; my $b = 'b'; say 'ab' ~~ rx!<({$a}{$b})>!
camelia rakudo-moar e5ca5c: OUTPUT«「」␤»
tony-o jdv79: i haven't looked at that module in ages, it was originally for web::scraper
brokenchicken has no idea wtf it's doing
tony-o which is probably broken, now that i think of it
jdv79 well, it seems to be working now in real code
thanks!
tony-o no problem
01:10 kurahaupo__ joined 01:12 cibs left 01:13 cibs joined 01:14 cdg left
BenGoldberg m: dd "aaa" =~ /a{3}/; 01:15
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~␤at <tmp>:1␤------> 3dd "aaa" =~7⏏5 /a{3}/;␤»
BenGoldberg m: dd "aaa" ~~ /a{3}/; 01:16
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*)␤at <tmp>:1␤------> 3dd "aaa" ~~ /a{3}7⏏5/;␤»
brokenchicken m: dd "aaa" ~~ /a {3}/;
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of {N,M} as general quantifier; in Perl 6 please use ** N..M (or ** N..*)␤at <tmp>:1␤------> 3dd "aaa" ~~ /a {3}7⏏5/;␤»
BenGoldberg That rules out that explanation.
brokenchicken m: dd "aaa" ~~ /a {'3'}/;
camelia rakudo-moar e5ca5c: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa", to => 1, from => 0)␤»
BenGoldberg m: dd "aaa" ~~ /a ** 3/;
camelia rakudo-moar e5ca5c: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "aaa", to => 3, from => 0)␤»
samcv how do i do: `"/".IO.dir.grep(.basename ~~ /etc/)
brokenchicken samcv: "/".IO.child("etc")
samcv that's not what i want 01:17
there's multiple files with similar names i need to return only those
by matching against regex. but i only want to match against the base names
BenGoldberg m: dd "/".IO.dir.grep: { $_.basename ~~ /etc/ }
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO(:SPEC(IO::Spec::Unix)),).Seq␤»
BenGoldberg m: say "/".IO.dir.grep: { $_.basename ~~ /etc/ } 01:18
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO)␤»
samcv ok so i want grep with { } then
BenGoldberg m: say "/".IO.dir.grep: *.basename ~~ /etc/
camelia rakudo-moar e5ca5c: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤()␤»
samcv also what doc page lists the syntax for method: stuff here
with the colon. i know some of them but i'd like to see the exact working of it
brokenchicken same as ()
BenGoldberg m: say "/".IO.dir.grep( { $_.basename ~~ /etc/ } ) 01:19
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO)␤»
01:19 cdg joined
brokenchicken m: say "/".IO.dir.grep: *.contains: 'etc' 01:20
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO)␤»
BenGoldberg The colon lets you leave off the (), which is useful if you don't have any additional methods to call on the results of the method call. :)
m: "/".IO.dir.grep( { $_.basename ~~ /etc/ } ).say; # this would be annoying if you used : instead of ()
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO)␤»
samcv m: "abc".match: /a/, :g ~ 'thing'
camelia rakudo-moar e5ca5c: OUTPUT«Cannot resolve caller match(Str: Regex, Str); none of these signatures match:␤ (Any:U $: | is raw)␤ (Cool:D $: $target, *%adverbs)␤ (Str $: Cool:D $pattern, |c is raw)␤ (Str $: Regex:D $pattern, :continue(:$c)!, *%_)␤ (Str $: Regex…»
raiph Anyone know what I have to put in the email subject line or body to close an rt bug? 01:21
01:22 rindolf left
brokenchicken raiph: you could try this, but I don't know if the extension is enabled on our RT instance: search.cpan.org/~jesse/RT-Extension...dByMail.pm 01:23
01:23 cdg left
brokenchicken m: say "/".IO.dir.grep: /etc/.ACCEPTS: *.basename 01:23
camelia rakudo-moar e5ca5c: OUTPUT«WhateverCode object coerced to string (please use .gist or .perl to do that)␤ in block <unit> at <tmp> line 1␤()␤»
brokenchicken mhm 01:24
m: say "/".IO.dir.grep: *.basename.match: /etc/
camelia rakudo-moar e5ca5c: OUTPUT«("/etc".IO)␤»
01:26 pyrimidine joined 01:30 pyrimidine left 01:37 ggoebel left
jdv79 hmm. i wonder if i'm running into Inline::Perl5 bugs or rakudo bugs or p5 bugs or what when p5 libs throw odd errors 01:38
for instance: gist.github.com/anonymous/ff92f6fb...e010759983 01:39
and who printed this?: Scalars leaked: 1 01:40
01:40 Guest54596 left
BenGoldberg m: sub defer_incr($foo is rw) { sub { $foo++ } }; my $x = 1; my $incr = defer_incr($x); dd $incr($x) for ^3; 01:43
camelia rakudo-moar e5ca5c: OUTPUT«Too many positionals passed; expected 0 arguments but got 1␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: sub defer_incr($foo is rw) { sub { $foo++ } }; my $x = 1; my $incr = defer_incr($x); dd $incr() for ^3;
camelia rakudo-moar e5ca5c: OUTPUT«1␤2␤3␤»
BenGoldberg m: sub defer_incr($foo is rw) { sub { $foo++ } }; my $x = 1; my $incr = defer_incr($x); dd $incr() for ^3; dd $x;
camelia rakudo-moar e5ca5c: OUTPUT«1␤2␤3␤Int $x = 4␤»
hartenfels jdv79: I encountered that when embedding Perl 5 into another program, the Perl 5 interpreted printed it when shutting down and a scalar still had a reference count at the end. 01:44
raiph brokenchicken: thanks (but didn't work out: rt.perl.org/Public/Bug/Display.html?id=130636) 01:45
brokenchicken raiph: how come it's rejected? 01:46
Ah. I see
It worked now :) 01:47
BenGoldberg m: subset Natural of Int where * > 0; postfix:<!> (Natural $n) { [*] 2..$n }; say 5!;
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3of Int where * > 0; postfix:<!> (Natural7⏏5 $n) { [*] 2..$n }; say 5!;␤ expecting any of:␤ infix␤ infix stopper␤ statement end…»
BenGoldberg m: subset Natural of Int where * > 0; sub postfix:<!> (Natural $n) { [*] 2..$n }; say 5!;
camelia rakudo-moar e5ca5c: OUTPUT«120␤» 01:48
BenGoldberg m: subset Natural of Int where * > 0; sub postfix:<!> (Natural $n) { [*] 2..$n }; say 0!;
camelia rakudo-moar e5ca5c: OUTPUT«Constraint type check failed for parameter '$n'␤ in sub postfix:<!> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
BenGoldberg m: subset Natural of Int where * >= 0; sub postfix:<!> (Natural $n) { [*] 2..$n }; say 0!;
camelia rakudo-moar e5ca5c: OUTPUT«1␤»
01:48 pyrimidine joined
BenGoldberg m: subset Natural of Int where * >= 0; sub postfix:<!> (Natural $n) { [*] 2..$n }; say (-1)!; 01:48
camelia rakudo-moar e5ca5c: OUTPUT«Constraint type check failed for parameter '$n'␤ in sub postfix:<!> at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
jdv79 hartenfels: ok
01:48 giraffe joined
brokenchicken m: sub postfix:<!> (UInt $n) { [*] 2..$n }; say 0!; 01:48
camelia rakudo-moar e5ca5c: OUTPUT«1␤»
01:49 giraffe is now known as Guest52692
BenGoldberg m: UInt $n = -1; 01:49
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Two terms in a row␤at <tmp>:1␤------> 3UInt7⏏5 $n = -1;␤ expecting any of:␤ infix␤ infix stopper␤ statement end␤ statement modifier␤ statement modi…»
brokenchicken m: say -1 ~~ UInt
camelia rakudo-moar e5ca5c: OUTPUT«False␤»
BenGoldberg m: my UInt $n = -1;
camelia rakudo-moar e5ca5c: OUTPUT«Type check failed in assignment to $n; expected UInt but got Int (-1)␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken (it's not a true type BTW but just one of core subsets)
01:50 ggoebel joined
raiph brokenchicken: what did you do that i didn't (to reject ticket)? 01:53
01:53 pyrimidine left
brokenchicken raiph: clicked the web interface button. 01:53
raiph huh? i tried the web interface. hang on... 01:54
OK. I got myself confused (because commenting doesn't work and then I got logged out and I'm thinking RT is even more broken than usual but in fact it's me that's an idiot, again) 01:57
brokenchicken: thanks :)
TimToady BenGoldberg: {} doesn't interpolate into regexes; <{}> does. {} is just for actions 02:02
brokenchicken Ah
TimToady++ tahnks
BenGoldberg m: rx"<{1+2}>".say;
camelia rakudo-moar e5ca5c: OUTPUT«rx"<{1+2}>"␤»
02:03 dataf3l left
BenGoldberg m: rx/<{1+2}>/.say; 02:03
camelia rakudo-moar e5ca5c: OUTPUT«rx/<{1+2}>/␤»
BenGoldberg I'm feeling a little dumb here.
brokenchicken BenGoldberg: with what?
m: rx/<{meow meow meow meow}>/.say; 02:04
camelia rakudo-moar e5ca5c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Undeclared routine:␤ meow used at line 1␤␤»
brokenchicken m: rx/<{say say say .say}>/.say;
camelia rakudo-moar e5ca5c: OUTPUT«rx/<{say say say .say}>/␤»
diakopter oh lol, yoleaux2 isn't in here
BenGoldberg m: '1' ~~ rx/<{say 'I know whats happening here'}>/; 02:05
camelia rakudo-moar e5ca5c: OUTPUT«I know whats happening here␤I know whats happening here␤»
BenGoldberg Thanks TimToady++
m: 'abc' ~~ rx/<{ <a b c> .pick }>/; 02:07
camelia ( no output )
jdv79 it seems a bunch of errors tent to pour forth when exiting
BenGoldberg m: dd 'abc' ~~ rx/<{ <a b c> .pick }>/;
camelia rakudo-moar e5ca5c: OUTPUT«Nil␤»
BenGoldberg m: dd 'abc' ~~ rx/<{ <a b c> .pick(1) }>/;
camelia rakudo-moar e5ca5c: OUTPUT«Match.new(ast => Any, list => (), hash => Map.new(()), orig => "abc", to => 1, from => 0)␤»
jdv79 odd. wonder what that is all about. Failure objs getting touched or threads being shutdown or what 02:08
BenGoldberg m: dd 'abc' ~~ rx/<{ <a b c> .pick(1) }> ** 2/;
camelia rakudo-moar e5ca5c: OUTPUT«Nil␤»
BenGoldberg m: dd 'abc' ~~ rx/<{ <a b c> .pick(1) }> ** 2/;
camelia rakudo-moar e5ca5c: OUTPUT«Nil␤»
jdv79 *tend
brokenchicken jdv79: you're using Perl 5? Maybe some DESTROY stuff ain't getting called like it meant to?
or on the contrary... is?
jdv79 i already ran into a handful of p5 threading bugs i think
but this is p6 code throwing errors
all from the p6 XML dist 02:09
02:11 pyrimidine joined 02:16 pyrimidine left, kalkin- left
jdv79 no! an attempt to free unref'd scalar in a p5 lib and segfault:( 02:17
this is not working out very well
02:17 kalkin- joined
jdv79 on the positive side there is real motivation to not use p5 as a crutch;) 02:17
unless you need to like i do atm:(
brokenchicken :) 02:20
02:26 lichtkind_ left
BenGoldberg Inline::Perl5 is purportedly designed to work in a thread safe manner. 02:31
If you are getting segfaults, then either something is wrong with Inline::Perl5, or something is wrong with the specific perl5 module you are using. 02:32
jdv79 or something is wrong with rakudo, no? 02:37
mspo impossible!
02:45 ilbot3 left 02:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 02:48 Cabanossi left 02:50 dataf3l joined, Cabanossi joined 02:55 kyan left 03:02 Guest52692 left 03:09 cdg joined, xtreak joined 03:11 YEM2040 joined
YEM2040 Random noob question if anyone wants to field it. I'm trying to find a editor that I can use on Ubuntu 16.04. I was using padre on 14.04 but seem to be having install issues with padre now. 03:12
03:13 kurahaupo__ left 03:14 cdg left
samcv YEM2040, check out Atom, with github.com/perl6/atom-language-perl6 package 03:14
for perl 6 highlighting
BenGoldberg huggable, editor 03:16
huggable BenGoldberg, nothing found
BenGoldberg huggable, editors
huggable BenGoldberg, nothing found
BenGoldberg huggable, editors is There is a list of editors and IDEs usable with perl6 here: perl6.org/whatever/ 03:17
huggable BenGoldberg, nothing found
BenGoldberg huggable, editors :is: There is a list of editors and IDEs usable with perl6 here: perl6.org/whatever/
huggable BenGoldberg, Added editors as There is a list of editors and IDEs usable with perl6 here: perl6.org/whatever/
BenGoldberg huggable, editor :is: see editors 03:18
huggable BenGoldberg, Added editor as see editors
YEM2040 Alll right,t hanks Samcv
03:18 Cabanossi left
BenGoldberg YEM2040, You can also use vim and emacs. 03:18
03:20 Cabanossi joined
samcv emacs is not one of my favorite operating systems 03:21
03:29 giraffe joined, giraffe is now known as Guest5935 03:33 telex left 03:35 Actualeyes left, telex joined
BenGoldberg Right, I should have said, if you already know how to use either vim or emacs, you can use them with perl6. 03:44
03:44 pyrimidine joined 03:47 flexibea` left, noganex_ joined 03:50 noganex left 03:51 pyrimidine left 03:54 curt__ left 04:10 cdg joined 04:14 cdg left 04:15 dugword joined 04:16 pyrimidine joined 04:20 dugword left 04:21 pyrimidine left 04:28 Cabanossi left 04:30 Cabanossi joined 04:34 xtreak left 04:35 xtreak joined 04:38 _scott joined 04:39 _scott left 04:42 pyrimidine joined 04:46 khw left 04:49 pyrimidine left 04:52 Actualeyes joined 04:56 PerlJam joined 05:00 g__k__ joined 05:11 cdg joined, araujo left 05:12 araujo joined, araujo left, araujo joined, g__k__ left 05:14 Cabanossi left 05:15 Cabanossi joined, cdg left 05:21 dataf3l left 05:33 agentzh left 05:46 pyrimidine joined 05:47 BenGoldberg left 05:51 xtreak left 05:52 hchienjo joined 05:53 dugword joined
hchienjo m: my $j = True|False; say $j.WHAT; 05:53
camelia rakudo-moar e5ca5c: OUTPUT«(Junction)␤»
05:54 xtreak joined 05:58 pyrimidi_ joined, pyrimidine left 06:09 kenietz joined
kenietz hi there, have a question about 'shell' 06:09
06:12 cdg joined
kenietz when i run an external process with shell it runs ok and the program waits until the external process finishes. but if i capture stderr and stdout with :err and :out the program does not wait the external process 06:12
is there a way to run external process, capture STDERR and STOUT and yet the main program waits till the process finishes? 06:14
so far i could not find any info about it. not in documenation not on the net 06:15
06:16 cdg left
TimToady well, someone has to put the output somewhere 06:19
geekosaur kenietz, that situation is typically called a deadlock
TimToady the program could produce gigabytes of output, and you can't the system to buffer it all up for you
*can't expect
kenietz i see. 06:20
so i should read it and put it somewhere but not the screen :) 06:21
geekosaur to one or more files, usually 06:22
TimToady that's the usual practice, if you want to wait till it's done 06:25
the disk is likelier to have room than storing it up in memory anyway 06:26
kenietz thanks a bunch for the info. every day learning something new. so far i never tried to do such thing so...the "problem" :) 06:27
06:27 Cabanossi left
TimToady we're all somewhere on the same road :) 06:27
kenietz but i suppose i can redirect the outputs to /dev/null if i dont wanna save it. or save and delete after all done 06:28
06:30 Cabanossi joined 06:34 curt__ joined
samcv need some help. for some reason some elements in state @slurp-dir get removed... 06:37
github.com/samcv/UCD/commit/48588c...e7efebcR36
err wait, so it's cause i'm calling it asking for different folders. maybe could just leave it my, not much performance change 06:38
or just make the state variable a hash or something indexed with the folders i want to store the files 06:39
06:39 kenietz left 06:40 CIAvash joined
samcv question though. so some sequences can get consumed. this applys to things in @ sigil variables too y/n? 06:40
or is there any difference. I know @ sigil things have some differences 06:41
06:44 hchienjo left 06:46 hchienjo joined
samcv oh it looks like they are being consumed :P in addition to the other problem I mentioned 06:49
06:50 kurahaupo__ joined 06:51 hartenfels1 joined 06:52 hartenfels left, hartenfels1 is now known as hartenfels 06:53 hchienjo left 06:54 domidumont joined 06:57 hchienjo joined 06:59 domidumont left, girafe left 07:00 domidumont joined 07:02 kurahaupo__ is now known as kurahaupo 07:08 ChoHag left 07:09 wamba joined 07:10 jmb2041 joined
jmb2041 hello 07:10
is anyone in here also in #perl? It says I am banned but I have no idea why
how do I get it fixed?
samcv m: my Seq $thing = (1,3,4).Seq; say $thing.iterator 07:12
camelia rakudo-moar e5ca5c: OUTPUT«<anon|177770608>.new␤»
07:12 cdg joined
samcv m: my Seq $thing = (1,3,4).Seq; say $thing.iterator.gist 07:15
camelia rakudo-moar e5ca5c: OUTPUT«<anon|177770608>.new␤»
samcv jmb2041, i could ask why you are banned but idk if they will tell me 07:16
jmb2041 I'm guessing it is an old IP address
since FIOS recycles them
samcv yeah you're not blocked by username 07:17
07:17 cdg left
jmb2041 thanks 07:17
07:18 CIAvash left 07:19 AlexDaniel joined
nine jdv79: quite ironically Inline::Perl5 didn't survive merging of lexical_module_load quite as well as I thought it would. I'm in the process of rewriting the part that creates wrapper classes but $dayjob leaves me quite drained lately :/ 07:19
samcv <Grinnz> there is a ban for *!*jason@*.bltmmd.fios.verizon.net
<samcv> hmm
<Grinnz> and his ident is jason, so it looks intended
<Grinnz> but i don't know who placed it
jmb2041 In any event, someone may know the simple answer to this -- I am archiving all news stories associated with Trump and I use LWP::UserAgent to get those stories. nytimes ends in an endless redirect (example: www.nytimes.com/2017/01/24/us/poli...rump.html) but works when using wget -qO- ... could this be related to the user agent string?
samcv yes that likely could. can you see the headers and compare them between wget 07:20
and LWP::UserAgent
what useragent are you using?
jmb2041 $ua->agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36"); 07:21
I went and got the user agent of my version of chrome and just used that
nine jmb2041: try using wget's user agent
samcv yeah maybe it thinks you're trying to be sneaky
nine jmb2041: looks like they permit access to robots so they show up in search engines but require normal users to log in
samcv i like how NYT has free access to historical news articles. that is super awesome 07:22
jmb2041 is there another header besides user agent that specifies something as a robot?
nine jmb2041: no
samcv well. there are clever methods of detection 07:23
but mostly the answer is no
jmb2041 I sort of cheated in my script and said if LWP fails to end up with 200, to just do "my $output = `wget -qO- $url`;" ... but that's not ideal. So I'll try finding the user agent of wget
samcv cloudflare is sometimes annoying as hell. i have an IRC bot that grabs url titles. and cloudflare wouldn't let me first grab the header, and then if the bot deemed the page text to grab the rest of the page 07:24
ended up having to parse the headers and the page content together to work around that and make my own url title grabber
also it bails as soon as it gets the title
so doesn't have to grab the whole page
nine User-Agent: Wget/1.18 (linux-gnu) 07:25
jmb2041 In a perfect universe, there would be an API for all of this from all the major news providers -- it still doesn't solve actually extracting the article out of the HTML, which one has to write a different parser for each one until it breaks from an update on their end
samcv buggable, stats
buggable, help
buggable samcv, tags | tag SOMETAG | eco | eco Some search term | speed
samcv buggable, speed
buggable samcv, ▇▄▄▅▅▄▅▅▅▆▅▆▆▇▅▅█▅▅▇▄▂▁▂▄▂▂▅▄▃█▂▂▃▁▂▂▃▁▂▂▃▇▂▅▄▂▂▂▂ data for 2017-01-03–2017-01-24; range: 4.873s–5.758s
samcv heh jmb2041
NYT coincidentally uses perl to collate all of their different news sources into one central thing 07:26
and created NYTProf module to profile that code.
Failing new york times! :P
moritz TimBunce++ 07:27
jmb2041 oh heh ... that's right. That's where that profiler came from
honestly, I didn't even know there was a 303 until I looked at the response dump 07:29
301, 302 are normally ones I see 07:30
samcv i love how staged this photo looks pbs.twimg.com/media/C29C0NUUQAANKyq.jpg:large like he told everybody ok i'm gonna sign this paper
everybody get in the shot so we make make this seem really official and important
don't think they'd be standing on the side of the desk and not on the other side 07:31
07:31 kurahaupo left
jast complete coincidence 07:31
samcv this is the most candid one i've seen him post pbs.twimg.com/media/C284hSBVIAAblKz.jpg
07:31 aindilis left
samcv i'm thinking they had a meeting like that and then trump said, ok we need to go to the oval office to take a picture 07:33
anyway I digress. this is not #perl6 related :P 07:34
jmb2041 I am also keeping all submissions made to Reddit within elasticsearch -> example: elasticsearch.pushshift.io/?q=perl...p;size=125
(all comments as well)
the elasticsearch cluster is open to use
samcv i have not heard of elasticsearch. can you tell me something about it?
07:34 geekosaur left
jmb2041 Are you familiar with sphinxsearch? 07:34
07:35 geekosaur joined
samcv no 07:35
jmb2041 MySQL fulltext search or PostgreSQL's text search?
It's basically like those but on steroids
You give it JSON documents and it indexes everything for you
samcv ah
and where is this stored 07:36
jmb2041 I purchased 256GB of ram to hold all the documents (3 billion+)
It's on my server
samcv ah ok 07:37
nice!
jmb2041 For instance, if you wanted to see all the comments made recently about Perl 6, this would be the endpoint: apiv2.pushshift.io/reddit/comment/...erl%206%22
it gives a JSON response, so you will probably want a JSON prettifier (but I should probably eventually just prettify it from the server at the expense of a few extra bytes)
07:38 xtreak left, CIAvash joined 07:40 xtreak joined 07:41 aindilis joined 08:01 labster joined, dugword left 08:09 ChoHag joined 08:13 cdg joined 08:15 xtreak left 08:16 cibs left 08:17 xtreak joined 08:18 cdg left, cibs joined 08:24 ChoHag left 08:26 ChoHag joined 08:28 Cabanossi left 08:30 Cabanossi joined 08:31 ufobat joined
samcv jmb2041, ok so your ban was supposed to be 24 hours 08:34
working on getting it removed now
08:36 zakharyas joined, hartenfels left 08:41 as___ joined
as___ Hi guys. Is there a way to get the output similar to what -MO=Deparse does but with Rakudo? 08:42
moritz as___: you can use --target=ast to get rakudo's AST representation 08:45
as___ it's too different :) 08:46
moritz as___: what problem are you trying to solve? 08:47
08:58 parv joined, AlexDaniel left 09:02 [ptc] joined, Actualeyes left 09:07 jonas1 joined 09:08 bjz joined 09:14 cdg joined 09:18 dakkar joined, cdg left 09:37 abraxxa joined, bjz left 09:41 pyrimidi_ left 09:43 Cabanossi left 09:45 Cabanossi joined, rindolf joined 09:47 zakharyas left 09:49 labster left 09:56 wamba left
timotimo the profiler perl6 gets should pun off of NYTProf ... like maybe TNRProf? (Times New Roman) 10:00
jast NQPProf... no wait, that's different 10:07
timotimo New Quark Primes? 10:10
DrForr DayProf? 10:11
jast ooh, that's evil, I like it 10:14
timotimo wow, that's amazing
it'll be quite different, though. clearly.
jast yeah, have it generate HTML with a dark colour scheme
timotimo 'cause Day 'n' NYT, the lonely coder seems to write his code at nite 10:15
jast code by night, profile ny day
*by
10:20 bjz joined
parv or nigh 10:21
10:28 Cabanossi left 10:30 Cabanossi joined 10:39 espadrine_ joined
gregf_ sudo su - 10:48
:/ sorry
jnthn Enter password: 10:49
;)
gregf_ M0r3c0ff33
;)
timotimo hunter2 10:50
10:58 perlawhirl joined, raschipi joined 10:59 Cabanossi left 11:00 Cabanossi joined 11:03 espadrine_ left 11:08 zakharyas joined 11:09 xtreak left 11:13 pyrimidine joined 11:15 cdg joined 11:17 pyrimidine left 11:20 cdg left 11:25 pyrimidine joined 11:26 parv left 11:29 Cabanossi left 11:30 pyrimidine left, Cabanossi joined 11:58 Cabanossi left 11:59 xtreak joined, xtreak left 12:00 Cabanossi joined
samcv hunter3 12:07
had to change my passwonrd last time cause idiot on irc
tricked me into tnyping my password!
timotimo i know that feel
jeek puts on his robe and wizard hat.
timotimo i'm already at 123478 :(
samcv changes pw to hunter4 12:08
DrForr 00000000 - if it's good enough for nuclear weapons it's good enough for me.
shit.
TEttinger that's a surprisingly bad password 12:09
raschipi changes password to ******** 12:10
TEttinger that's terrible and I love it
raschipi I like this password because I can see what I'm typing in some prompts.
TEttinger password: /me enters invalid UTF-8 sequence 12:11
raschipi Start with a BOM and go from there. 12:12
timotimo windows lets you enter a chatacter by pressing ctrl-backspace
i never actually looked at what you get when you do that
12:12 bjz left
TEttinger there's a NUL in there, some skin color emoji applied to CJK chars 12:12
12:16 cdg joined
raschipi I have read some papers about changing the way Linux treats filenames from "some bytes" to "valid utf-8", but it's not going forward because Unicode isn't used everywhere yet. 12:17
12:21 cdg left 12:25 TEttinger left 12:28 astj left, Cabanossi left 12:30 Cabanossi joined 12:38 z8 joined 12:39 pyrimidine joined 12:42 brillenfux joined 12:44 z8 left 12:46 cdg joined 12:47 pyrimidine left 12:50 cdg left 12:57 Actualeyes joined 12:59 Cabanossi left 13:00 Cabanossi joined 13:16 aborazmeh joined, aborazmeh left, aborazmeh joined 13:21 aborazmeh left 13:24 pyrimidine joined
samcv as of latest commit, unicode name/sequence name lookup is now insensitive \o/ 13:30
and added the rest of the sequences, so now we have full coverage
13:30 pyrimidine left
samcv github.com/MoarVM/MoarVM/commit/25...1c67366da4 13:31
brokenchicken samcv: are \c[family] and several other ZWSs not part of standard yet? 13:33
samcv those are 13:34
and have been fixed
brokenchicken m: "\c[kiss]"
camelia rakudo-moar 483e4f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [kiss]␤at <tmp>:1␤------> 3"\c[kiss7⏏5]"␤»
brokenchicken ah, ok
samcv see the commit i explain
why the families get fixed now
in the last sententce
those family ones used commas in them to seperate boy,girl etc 13:35
brokenchicken Ahh
samcv which are not needed at all, and conflict with the standard commas seperated codeponit names that are part of ISO or uh. some other standard system. not sure if that's why they were in perl 6
but there's some thing i forget which that standardized that
(not part of unicode)
well not the UCD.
ISO or someody 13:36
13:37 yqt joined 13:43 Cabanossi left, teatime joined 13:44 cibs left 13:45 Cabanossi joined, cibs joined 13:47 holyghost joined
samcv time for bed. night all o/ 13:48
dudz night
good work today 13:49
brokenchicken m: "\c[kiss]".say 13:50
camelia rakudo-moar 483e4f: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [kiss]␤at <tmp>:1␤------> 3"\c[kiss7⏏5]".say␤»
brokenchicken m: "\c[kiss]".say 13:53
camelia rakudo-moar cca24d: OUTPUT«💏␤»
brokenchicken w00t
m: "\c[family: man, man, girl]".say 13:54
camelia rakudo-moar cca24d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [family: man]␤at <tmp>:1␤------> 3"\c[family: man7⏏5, man, girl]".say␤»
brokenchicken m: "\c[family: man man girl]".say
camelia rakudo-moar cca24d: OUTPUT«👨‍👨‍👧␤»
brokenchicken m: "\c[family: woman woman girl girl]".say
camelia rakudo-moar cca24d: OUTPUT«👩‍👩‍👧‍👧␤»
brokenchicken So the rule is we need to toss a comma from names because we have special meaning for it? 13:55
m: "\c[family: woman woman girl girl, woman playing handball: medium skin tone]".say
camelia rakudo-moar cca24d: OUTPUT«👩‍👩‍👧‍👧🤾🏽‍♀️␤»
13:55 cschwenz joined
brokenchicken neat 13:55
cschwenz p6: class Foo { has Promise $!x; method aaa() { $!x = Promise.start({ loop { sleep 1; }; }); return; }; method bbb() { $!x.break( 'ccc...' ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb();
camelia rakudo-moar cca24d: OUTPUT«Access denied to keep/break this Promise; already vowed␤ in method bbb at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken Don't render right on my screen, but neat! :)
cschwenz what am i doing wrong in the above code?
13:56 dataf3l joined
brokenchicken cschwenz: Trying to break an already vowed promise 13:56
cschwenz brokenchicken: where is the .vow?
brokenchicken cschwenz: I think it'd just be Promise.new; instead of an idle loop
cschwenz: start vows it 13:57
cschwenz that does it as well
jnthn It doesn't make any sense to call .break on a Promise you get back from start
It's kept/broken as a result of the scheduled code
cschwenz okay my use case is HTTP::Server::Tiny which has a "control-promise => …" 13:58
how do i use said control-promise?
brokenchicken p6: class Foo { has Promise $!x; method aaa() { $!x = Promise.new; }); return; }; method bbb() { $!x.vow.break( 'ccc...' ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb();
camelia rakudo-moar cca24d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Missing block␤at <tmp>:1␤------> 3$!x; method aaa() { $!x = Promise.new; }7⏏5); return; }; method bbb() { $!x.vow.bre␤ expecting any of:␤ postfix␤ statement end␤ sta…»
brokenchicken p6: class Foo { has Promise $!x; method aaa() { $!x = Promise.new; }; return; }; method bbb() { $!x.vow.break( 'ccc...' ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb();
camelia rakudo-moar cca24d: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot understand $!x in this context␤at <tmp>:1␤------> 3se.new; }; return; }; method bbb() { $!x7⏏5.vow.break( 'ccc...' ); return; }; }; my␤»
brokenchicken bah. can't read on this termiana l;:D 13:59
jnthn Or write :P
cschwenz :-P
brokenchicken p6: class Foo { has Promise $!x; method aaa() { $!x = Promise.new; return; }; method bbb() { $!x.vow.break( "ccc..." ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb();
camelia ( no output )
brokenchicken p6: class Foo { has Promise $.x; method aaa() { $!x = Promise.new; return; }; method bbb() { $!x.vow.break( "ccc..." ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb(); say $asdf.x.status 14:00
camelia rakudo-moar cca24d: OUTPUT«Broken␤»
14:00 kalkin- left
brokenchicken like that 14:00
14:00 perlpilot joined
brokenchicken p6: class Foo { has Promise $.x; method aaa() { $!x = Promise.new; return; }; method bbb() { $!x.vow.break( "ccc..." ); return; }; }; my $asdf = Foo.new(); $asdf.aaa(); $asdf.bbb(); say $asdf.x.result 14:00
camelia rakudo-moar cca24d: OUTPUT«Tried to get the result of a broken Promise␤ in block <unit> at <tmp> line 1␤␤Original exception:␤ Died with X::AdHoc+{X::Promise::Broken}␤ in block <unit> at <tmp> line 1␤␤»
jnthn cschwenz: I'd gues that you do something like my $p = Promise.new; and then pass $p, and later keep/break it
14:00 sena_kun joined
cschwenz jnthn: okay, will try that 14:00
jnthn The vow is something that a bit of code can obtain to ensure that nobody but it can keep/break the Promise, fwiw
cschwenz \o/ thanks all, it's working now! :-) 14:02
brokenchicken \o/
Geth oc: 84c32739fd | (Zoffix Znet)++ | doc/Type/Promise.pod6
s/result/cause/ for Promise.break

To avoid suggesting the cause of breakage is obtainable from .result method
14:04
14:09 abraxxa left
cschwenz as %INC no longer exists in Perl6, is it even possible to unload a loaded module? (my use case is i need to force a recompile of a module) 14:10
moritz I don't think there are provisions yet for unloading modules 14:14
cschwenz :-(
dang
mst jnthn: did nine's work on lexical 'use' land yet?
14:14 sammers left
jnthn mst: Yes 14:14
mst cschwenz: so, 'use' is now (correctly) lexical, so you can basically load the modules within a scope, and 'reload' by loading it again within a new scope, I think 14:15
cschwenz mst: okay, will try that… :-)
mst whether this 100% works yet I've no idea though, since I've not previously encountered anybody except me who was crazy enough to want to do this and I haven't got round to trying yet 14:16
cschwenz :-D
jnthn Would have to check with nine but my first guess is that's not sufficient, since use = need + import, need being the level you're trying to invalidate for a "reload" mechanism, but all of the lexicality falls under the import part.
brokenchicken don't work for me 14:17
jnthn Somehow you'd also need to trick it into thinking it was loading a new version of the module
perlpilot Isn't there a "manual" way to compile a module?
jnthn There's probably some neat way to make that happen with a CompUnitRepo implementation.
mst well, I'm assuming if it needs recompiling it's now a different CU so far as the CUR is concerned 14:18
jnthn Yeah
mst so in *theory* this should be doable
cschwenz would something as simple as changing ":ver<0.1.1>" to ":ver<0.1.2>" trigger a recompile? 14:19
jnthn I don't know how much of my original design for this stuff survives; I kinda handed it off. But originally there was a delegation model, which I believe is retained, so if you stuck something at the head of the chain with an "invalidate now" switch it may be able to stick a fresh downstream chain in place that thinks nothing was loaded yet.
jnthn waves hands :)
cschwenz: Yes, provided the `use` was also trying to use the new version 14:20
14:20 cale2 joined, lukaramu joined
cschwenz hmm, then the code i'm writing might be wtf-y enough to work. :-P 14:21
brokenchicken m: -> $a, $b { ($a, $b).join.say }("a"|"b", "z"|"y") 14:22
camelia rakudo-moar cca24d: OUTPUT«any("a", "b")any("z", "y")␤»
brokenchicken how come it's not autothreading?
jnthn What are you expecting to auto-thread?
brokenchicken m: sub ($a, $b) { ($a, $b).join.say }("a"|"b", "z"|"y")
camelia rakudo-moar cca24d: OUTPUT«az␤ay␤bz␤by␤»
brokenchicken like that 14:23
jnthn Oh
Because the default type for params of a block is Mu, not Any
brokenchicken Ah. Thanks
TIL
jnthn Years and years ago, we had it as Any on pointy blocks too, which cause a number of surprises :)
*caused 14:24
lizmat stackoverflow.com/questions/4185385...omatically
jnthn `for @array-of-junctions -> $junc { }` got fun :)
14:24 dataf3l left
jnthn lizmat: constants are our-scoped by default so end up as global symbols in the module 14:25
lizmat: Since nine's lexical import changes, those too are brought in as lexicals 14:26
So the conflict is legit.
lizmat so anything our scoped is exported ?
jnthn It's just the same as if you have a class Foo { } in the module and do a my class Foo { } when importing
Sure
brokenchicken So you don't even need an is export on subs just make them `our`?
jnthn If they're in the mainline, then yes 14:27
That's one of the...uh...interesting...consequences of the lexical module loading changes :)
brokenchicken wow
lizmat hmmm TIL
jnthn figured folks realized this and were OK with it :)
perlpilot didn't realize it either
brokenchicken neither 14:28
jnthn hehe :)
I guess (hope :)) nine did :)
cale2 m: -> $a, $b { -> $x, $y { $a + $b + $x + $y } }(1, 2)(3, 4)
camelia ( no output )
cale2 m: -> $a, $b { -> $x, $y { say $a + $b + $x + $y } }(1, 2)(3, 4)
camelia rakudo-moar cca24d: OUTPUT«10␤»
cale2 So functions are sort of curried inward like haskell
14:29 astj joined, astj left
brokenchicken hm, that constant export doesn't seem to work if you put `unit module ...` in the file? 14:32
jnthn brokenchicken: Right, because then it's not being declared in GLOBAL
brokenchicken Oh, OK. This makes it all less scary :) And also shows I'm missing something important. 14:33
All separate files got a "main line" which is GLOBAL and all stuff gets shoved into it?
We probably have docs for that donwe... 14:34
:)
jnthn Yes, you always start out in GLOBAL
14:40 khw joined 14:41 CIAvash left, kurahaupo__ joined 14:43 Cabanossi left 14:45 Cabanossi joined 14:46 pyrimidine joined, kurahaupo__ left, kurahaupo__ joined 14:50 pyrimidine left 14:54 brillenfux left 14:57 araujo left 15:00 abraxxa joined, lizmat left 15:03 pyrimidine joined 15:07 astj joined 15:08 skids joined, pyrimidine left 15:12 lizmat joined, astj left
brokenchicken Adding to yesterday's discussion of regex block interpolation, you can do it like this: 15:12
m: say "foo" ~~ /:my $v; {$v = "foo"} $v/
camelia rakudo-moar 3a77cb: OUTPUT«「foo」␤»
brokenchicken (assuming you don't want to treat it as regex and just want it as a string)
oh 15:13
Even better!
m: say "foo" ~~ /"{"foo"}"/
camelia rakudo-moar 3a77cb: OUTPUT«「foo」␤»
brokenchicken m: say "fo.+meows" ~~ /"{"fo.+"}"/
camelia rakudo-moar 3a77cb: OUTPUT«「fo.+」␤»
brokenchicken awesome
m: say "fo.+meows" ~~ /{"fo.+"}/
camelia rakudo-moar 3a77cb: OUTPUT«「」␤»
brokenchicken m: say "fo.+meows" ~~ /<{"fo.+"}>/
camelia rakudo-moar 3a77cb: OUTPUT«「fo.+meows」␤»
Geth oc: 8c2dd6f77b | (Christopher Bottoms)++ | doc/Language/terms.pod6
Indicate scope of "constant" term and give example

Just learned that "constant" is our-scoped (see stackoverflow.com/a/41854296/215487), so I figured this fact should be documented.
15:16
15:20 dataf3l joined 15:22 CIAvash joined, pyrimidine joined
cschwenz if i have "use Foo::Bar:ver<0.1.2>;" and Foo::Bar:ver<0.1.1> has previously been used (i can see both via "say flat $*REPO.repo-chain.map(*.loaded);"), how can i specify which one to use? i want to say "Foo::Bar:ver<0.1.2>.new().baz()" but that gives "Invalid type smiley 'ver' used in type name" and if i simply say "Foo::Bar.new().baz()" perl6 complains about not finding ".baz()" — because it's looking for it in the 15:27
brokenchicken I don't think they both can be loaded into the same namespace (and so doing the :ver<> on anything but load isn't needed) 15:28
m: use Test; say flat $*REPO.repo-chain.map(*.loaded); 15:29
camelia rakudo-moar 3a77cb: OUTPUT«(Test)␤»
brokenchicken cool
m: use Test:ver<6.c>; say flat $*REPO.repo-chain.map(*.loaded);
camelia rakudo-moar 3a77cb: OUTPUT«(Test)␤»
15:29 abraxxa left 15:30 zdenek_ joined
cschwenz p6: class Foo::Bar:ver<0.1.1> { method asdf() { say "zxcv"; }; }; class Foo::Bar:ver<0.1.2> { method baz() { say "BAZ"; }; }; use Foo::Bar:ver<0.1.1>; Foo::Bar.asdf(); say flat $*REPO.repo-chain.map(*.loaded); use Foo::Bar:ver<0.1.2>; say flat $*REPO.repo-chain.map(*.loaded); 15:31
camelia rakudo-moar 3a77cb: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Redeclaration of symbol 'Foo::Bar'␤at <tmp>:1␤------> 3 "zxcv"; }; }; class Foo::Bar:ver<0.1.2>7⏏5 { method baz() { say "BAZ"; }; }; use F␤ expecting any of:␤ generic role␤»
15:32 abraxxa joined
brokenchicken m: use TAP:ver<6.c>; say from-json((flat $*REPO.repo-chain.map(*.loaded))[0].distribution.meta); 15:35
camelia rakudo-moar 3a77cb: OUTPUT«Invalid JSON: auth perl␤files ␤name CORE␤provides CompUnit::Repository::Staging lib/CompUnit/Repository/Staging.pm cver 2017.01-49-g3a77cb5␤file C57EBB9F7A3922A4DA48EE8FCF34A4DC55942942␤time 1467658119.76737␤NativeCall lib/NativeCall.pm6
.. cver 2…»
brokenchicken Invalid JSON? heh
Oh, it's a proper Hash already. Ooops :)
m: use TAP:ver<6.c>; (flat $*REPO.repo-chain.map(*.loaded))[0].distribution.meta.<provides>.keys.sort.say; 15:36
camelia rakudo-moar 3a77cb: OUTPUT«(CompUnit::Repository::Staging NativeCall NativeCall::Compiler::GNU NativeCall::Compiler::MSVC NativeCall::Types Pod::To::Text TAP Test experimental newline)␤»
brokenchicken That's pretty cool.
15:37 abraxxa left
brokenchicken And what's cooler is I've done that with zero docs or source digging :) MOP++ 15:37
CIAvash m: say ((* + 5) R∘ (* × 2))(20) # Shouldn't this work? 15:39
camelia rakudo-moar 3a77cb: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤ in block <unit> at <tmp> line 1␤␤»
CIAvash m: my (&a, &b) = (* + 5), (* × 2); say (&a R∘ &b)(20) 15:40
camelia rakudo-moar 3a77cb: OUTPUT«50␤»
brokenchicken w00t. I successfully achieved hot reloading.... 15:44
more or less... like V2 compared to spaceflight :)
With EVALFILE that just hands me the type object when it's done: gist.github.com/zoffixznet/4ea1ae8...e78526d41b 15:45
CIAvash: I'd guess it's making a single closure that takes two args rather than two separate closures 15:47
m: say ((* + 5) R/ (* × 2))(20, 42)
camelia rakudo-moar 3a77cb: OUTPUT«3.36␤»
brokenchicken m: say ((* + 5) R/ (* × 2))(100, 20) 15:48
camelia rakudo-moar 3a77cb: OUTPUT«0.380952␤»
brokenchicken m: say ((* + 5) R/ (* × 2))(20, 100)
camelia rakudo-moar 3a77cb: OUTPUT«8␤»
brokenchicken yup
hm 15:50
"The function combinator infix:<∘> or infix:<o> combines two functions, so that the left function is called with the return value of the right function. The number of return values of the right function has to match the arity of the left function."
Can't the function always return just one value?
I mean, doesn't the function always return just one value? 15:51
raschipi It can return a list. 15:52
15:52 dataf3l left
brokenchicken raschipi: which is still one value? 15:54
raschipi A slip, then.
brokenchicken raschipi: which is still one value 15:55
raschipi Which will slip into a capture.
brokenchicken m: sub foo ($x, $y, $z) {dd $x}( sub bar {slip <a b c>}() ) 15:57
camelia rakudo-moar e7ea4c: OUTPUT«Too few positionals passed; expected 3 arguments but got 1␤ in sub foo at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken Nope
cschwenz is design.perl6.org/S11.html out-of-date/invalid?
15:58 Cabanossi left
brokenchicken cschwenz: all documents on that site are historical and aren't being kep up to date. Though AFAIK there only marginal differences between S11 and current Rakudo impl 15:58
like resources stuff
I'm not sure what else.
15:59 domidumont left 16:00 Cabanossi joined
cschwenz asking because, quoting from design.perl6.org/S11.html#Versioning : "[…] the module is required to declare its full name so that installations can know its unique, immutable identity, such that multiple versions by different authors can coexist, all of them available to any installed version of Perl." and "However use searches for modules matching a version prefix […]" 16:00
brokenchicken: :-( 16:01
16:01 AlexDaniel joined 16:02 perlawhirl left
brokenchicken Well yeah, version is mandatory in META file. I think one difference between that text is what a "module" is. IIRC the version is taken from META file and used for all the modules in the distribution. And the :ver stuff in individual files is ignored. 16:02
AlexDaniel o/ 16:03
cschwenz then why does perl6 go through the trouble of supporting ":ver<>" and ":auth<>" if it is only going to ignore it? :-( 16:04
16:04 pyrimidine left
cschwenz o/ AlexDaniel 16:04
AlexDaniel and this concludes my finals… phew
16:04 pyrimidine joined
brokenchicken cschwenz: it's not ignored on loading 16:04
m: use Test:<6.c> 16:05
camelia rakudo-moar e7ea4c: OUTPUT«===SORRY!===␤Could not find Test:<6.c> 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…»
brokenchicken m: use Test:ver<6.c>
camelia ( no output )
brokenchicken m: use Test:ver<6.d>
camelia rakudo-moar e7ea4c: OUTPUT«===SORRY!===␤Could not find Test:ver<6.d> 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:…»
brokenchicken And :auth is also supported for loading.
AlexDaniel: your finals? You're in school?
16:06 cschwenz left
brokenchicken heh 16:06
cschwenz got too dissapointed with P6? :)
AlexDaniel brokenchicken: hmmm, aren't these called finals in university as well?
CIAvash brokenchicken: thanks
brokenchicken AlexDaniel: yeah, and univsity is called a "school" too
AlexDaniel oh… didn't know about that 16:07
brokenchicken Yeah, "highschool / middleschool / preschool" is the specific versions of schools pre-college/university
"secondary school / primary school" too
So... any word on the function composition op and that you can't return more than one value? 16:08
16:09 telex left
AlexDaniel the last one can return more than one, no? 16:09
moritz brokenchicken: it's a known limitation
[Coke] is so happy to see doc updates after discussions in here!
16:10 telex joined
Geth oc: 80298e56cf | (Zoffix Znet)++ | doc/Type/Callable.pod6
Change wording for ∘ to not suggest that it's possible

to return more than one value from a function
16:12
brokenchicken m: sub (|){}.arity.say
camelia rakudo-moar 42a1ef: OUTPUT«0␤»
CIAvash m: say ((* + *) ∘ {$^a, 2})(20)
camelia rakudo-moar 42a1ef: OUTPUT«22␤»
brokenchicken hmmm
16:12 abraxxa joined
brokenchicken CIAvash: I don't get why that works... 16:13
m: say ((* + * + *) ∘ {1, 2, 3})() 16:14
camelia rakudo-moar 42a1ef: OUTPUT«6␤»
CIAvash brokenchicken: github.com/rakudo/rakudo/blob/nom/...rs.pm#L718
brokenchicken m: say ((* + * + *) ∘ sub () {1, 2, 3})()
camelia rakudo-moar 42a1ef: OUTPUT«6␤»
brokenchicken Oh, so there ain't no limitation at all. 16:15
'cause args get slipped
This is interesting: 16:16
m: say ({dd [$^a]} ∘ {[1, 2, 3]})() 16:17
camelia rakudo-moar 42a1ef: OUTPUT«[[1, 2, 3],]␤Nil␤»
brokenchicken m: say ({dd [$^a, $^a, $^b]} ∘ {[1, 2, 3]})()
camelia rakudo-moar 42a1ef: OUTPUT«Too many positionals passed; expected 2 arguments but got 3␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken oops
m: say ({dd [$^a, $^, $^c]} ∘ {[1, 2, 3]})()
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Preceding context expects a term, but found infix , instead␤at <tmp>:1␤------> 3say ({dd [$^a, $^,7⏏5 $^c]} ∘ {[1, 2, 3]})()␤»
brokenchicken m: say ({dd [$^a, $^b, $^c]} ∘ {[1, 2, 3]})()
camelia rakudo-moar 42a1ef: OUTPUT«[1, 2, 3]␤Nil␤»
brokenchicken So it works with 3 args or with 1 arg
kinda weird
m: sub { dd [$^x] }(|[1, 2, 3]) 16:19
camelia rakudo-moar 42a1ef: OUTPUT«Too many positionals passed; expected 1 argument but got 3␤ in sub at <tmp> line 1␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken Oh... pffft... " (&f).count > 1 ??"
Right. No limitation. If .count is > 1, the return of first function is slipped in 16:20
brokenchicken will fix the docs after lunch
CIAvash m: say ([R∘] (* + 5), (* × 2))(20) 16:21
camelia rakudo-moar 42a1ef: OUTPUT«50␤»
gregf_ whats ∘?
CIAvash function composition operator
gregf_ i see. im afraid that hasnt made much sense to me :/ #guess its time to google 16:23
cheers anyway
CIAvash docs.perl6.org/type/Callable#infix...2%88%98%3E
gregf_ hmm, borrowed from FP, haskell.. presumably :) 16:24
CIAvash f ∘ g is f(g(x))
gregf_ nice 16:25
16:26 pyrimidine left 16:27 pyrimidine joined, as___ left, zdenek_ left 16:28 CQ joined
brokenchicken gregf_: it's also present in math 16:28
16:31 gregf__ joined, pyrimidine left
gregf__ brokenchick: sorry missed that :/ 16:32
*chicken
16:32 gregf_ left
gregf__ :/ shouldve used the tab *sigh* 16:32
brokenchicken :) 16:34
16:34 pyrimidine joined
jdv79 nine: i get it. thanks. but for now ill just remove i::p5 so i can continue:( 16:36
likely just proc out to p5... 16:37
cale2 Currently watching this video on types by the Racket guy: youtu.be/XTl7Jn_kmio 16:38
Pretty relevant to p6's system of subtypes and gradual typing I think
16:42 cibs left 16:44 cibs joined 16:45 andrzejku_ joined
andrzejku_ hello 16:45
is perl6 ready for commercial application? 16:46
brokenchicken andrzejku_: depends on the application. 16:47
andrzejku_: and on your risk tolerance
16:47 cschwenz joined
andrzejku_ ok so what a tolerance risk? 16:47
16:48 st_elmo joined, cschwenz left
brokenchicken andrzejku_: if a disaster strikes and Perl 6 stops being developed. Can you afford to rewrite that application in another language or will your business go bankrupt 16:49
Geth oc: 503fb20b19 | (Zoffix Znet)++ | doc/Type/Callable.pod6
Improve docs for infix:<∘>

  - In math this is called function *composition*, so use more familiar terms
  - Use `composed` as composed function name instead of `f-g`, which looks like a minus between two subs
  - Fix the arity stuff: document that .count>1 routines get args slipped into them
  - Include example for .count>1 version. Note that this version is NOT equivalent to 2.&g.&f
   as original example shows
16:50
andrzejku_ fuck
brokenchicken, :( that's sad 16:51
brokenchicken You have to put a dollar in the swear jar.
andrzejku_: why is it sad? The case applies to any freshly-released piece of tech.
Some people invested in MySpace. Others invested in Facebook. Some people lost. Some made bunch of money. Tis life. 16:52
gregf__ andrzejku_: more risk .. more money *ducks* 16:53
cale2 andrezejku_: Most open source projects eventually get "commercial support" later on. Think of FP Complete for Haskell, for example.
16:53 kalkin- joined
andrzejku_ tadzik, hey 16:57
16:57 andrzejku_ left 17:12 pyrimidine left 17:13 pyrimidine joined 17:17 jonas1 left, pyrimidine left 17:18 wamba joined
brokenchicken m: sub comment:sym<♥> {} 17:22
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot add tokens of category 'comment'␤at <tmp>:1␤------> 3sub comment:sym<♥>7⏏5 {}␤»
brokenchicken hmm... tokens and categories...
17:23 cibs left, CQ left
brokenchicken What kind of tokens can be added that way? 17:23
m: sub term:sym<♥> {} 17:24
camelia ( no output )
17:24 cibs joined
brokenchicken ahh 17:24
perigrin ornithopters mostly.
brokenchicken m: sub term:sym<♥> {42}; say ♥ 17:25
camelia rakudo-moar 42a1ef: OUTPUT«42␤»
brokenchicken cool. Didn't know you could use `:sym` there
TimToady if so, it's an accident of implementation, and possibly not supported in the future 17:26
brokenchicken Ah
m: sub infix:sym<♥> {$^a + $^b}; say 42 ♥ 100 17:27
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '&infix:<♥>' is not declared␤at <tmp>:1␤------> 3sub infix:sym<♥> {$^a + $^b}; say 42 7⏏5♥ 100␤»
TimToady :sym is reserved for naming methods, not operators
we want to keep those sets of names unique
s/unique/disjoint/
brokenchicken m: sub term:boogavooga<♥> {42}; say ♥ 17:29
camelia rakudo-moar 42a1ef: OUTPUT«42␤»
TimToady or we won't be able to distinguish token foo:sym<bar> from operator &foo:<bar>
brokenchicken heh, seems it takes any old trash up in there
TimToady (within the grammar where the token is has-ed
)
TimToady should get coffee into his typing figners
perlpilot Is there a test in roast for this? (possibly with the above explanation as a comment nearby) 17:32
TimToady so yeah, we should reserve :boogavooga for future extensions :) 17:33
perlpilot: I presume that's a rhetorical question :)
perlpilot :-)
17:34 pyrimidine joined 17:39 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Change wording for ∘ to not suggest that it's possible 17:39
travis-ci.org/perl6/doc/builds/195230161 github.com/perl6/doc/compare/8c2dd...298e56cf07
17:39 travis-ci left
brokenchicken "The job exceeded the maximum time limit for jobs, and has been terminated." 17:43
noice
.oO( You had one job! )
17:44
17:44 dakkar left
brokenchicken m: sub infix_prefix_meta_operator:sym<P> {} 17:47
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot add tokens of category 'infix_prefix_meta_operator'␤at <tmp>:1␤------> 3sub infix_prefix_meta_operator:sym<P>7⏏5 {}␤»
brokenchicken Ok... but:
m: sub infix_prefix_meta_operator:sym<R> {}
camelia ( no output )
brokenchicken :)
(same for Z X and S)
17:49 andrzejku_ joined
brokenchicken m: sub infix_postfix_meta_operator:sym<$@> {} 17:50
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot add tokens of category 'infix_postfix_meta_operator'␤at <tmp>:1␤------> 3sub infix_postfix_meta_operator:sym<$@>7⏏5 {}␤»
brokenchicken m: sub infix_postfix_meta_operator:sym<=> {}
camelia ( no output )
brokenchicken heh
It's as if it accepts anything that is a token in Perl6/Grammar
well, of main language braid 17:52
m: sub comment:sym<#> {} 17:53
camelia ( no output )
brokenchicken m: sub pod_content:sym<block> {}
camelia ( no output )
brokenchicken .tell samcv too lazy to make an Issue, but noticed this chunk has messed up highlighting: github.com/rakudo/rakudo/blob/nom/...#L839-L857 17:55
yoleaux brokenchicken: I'll pass your message to samcv.
17:55 pmurias joined, astj joined
brokenchicken m: sub terminator:sym<;> {}; sub statement_control:sym<if> {}; sub statement_prefix:sym<BEGIN> {}; sub statement_mod_loop:sym<given> {} 17:57
camelia ( no output )
brokenchicken Oh, lol. And this is why: github.com/rakudo/rakudo/blob/nom/...4628-L4630 17:59
18:01 astj left
brokenchicken m: sub comment:sym<#> { say "w00t"}; comment:sym<#> 18:02
camelia rakudo-moar 42a1ef: OUTPUT«w00t␤»
brokenchicken heh, and it actually works as a normal sub ^_^ 18:03
18:07 z8 joined
TimToady m: sub foo:bar:baz<!@#$> { say "t00w" }; foo:bar:baz<!@#$> 18:08
camelia rakudo-moar 42a1ef: OUTPUT«t00w␤»
TimToady it's just an extended name, nothing special
brokenchicken You cheated! :) 18:09
m: sub foo:baz<!@#$> { say "t00w" }; foo:baz<!@#$>
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot add tokens of category 'foo'␤at <tmp>:1␤------> 3sub foo:baz<!@#$>7⏏5 { say "t00w" }; foo:baz<!@#$>␤»
brokenchicken Should this then not die and let the user use extended name?
It throws here when failing to find infix/prefix/whatever: github.com/rakudo/rakudo/blob/nom/....nqp#L4663 18:10
TimToady I would restrict only the foo:<!@#$> form there
where key is ''
brokenchicken OK 18:11
TimToady we might possibly reserve :sym at that point as well
and the whole mechanism is not something we want to encourage abuse of, until we know what other keys we might want to reserve in the future 18:12
brokenchicken
.oO( :monkey-guts<..> )
TimToady the mechanism is just a generalization of a way to sneak non-ident chars into a name, and we don't really know where we might want to use that someday
18:13 zakharyas left 18:14 lukiramu joined
TimToady here:be<dragons!> 18:14
brokenchicken m: dd [:<foo>]
camelia rakudo-moar 42a1ef: OUTPUT«["foo"]␤»
brokenchicken no '' => 'foo' ?
TimToady m: say (:<foo>)
camelia rakudo-moar 42a1ef: OUTPUT«foo␤»
TimToady hmm 18:15
m: say (:<foo>).WHAT
camelia rakudo-moar 42a1ef: OUTPUT«(Str)␤»
TimToady oopsie
brokenchicken heh
TimToady m: say (:('foo')).WHAT
camelia rakudo-moar 42a1ef: OUTPUT«(Signature)␤»
TimToady heh
18:15 domidumont joined
TimToady m: say (:['foo']).WHAT 18:16
camelia rakudo-moar 42a1ef: OUTPUT«(Array)␤»
TimToady I guess the bare one are somewhat reserved too
:{} is for object arrays, for instance
m: say (:{'foo'}) # should fail
camelia rakudo-moar 42a1ef: OUTPUT«-> ;; $_? is raw { #`(Block|43378048) ... }␤» 18:17
TimToady or that :)
m: say (:{:hi}) # should fail
camelia rakudo-moar 42a1ef: OUTPUT«{hi => True}␤»
TimToady *n't
m: say (:{ 1 => 2})
camelia rakudo-moar 42a1ef: OUTPUT«{1 => 2}␤»
TimToady m: say (:{ 1 => 2}).keys[0].WHAT 18:18
camelia rakudo-moar 42a1ef: OUTPUT«(Int)␤»
18:18 lukaramu left, z8 left
TimToady m: say :[42] eqv [42] 18:19
camelia rakudo-moar 42a1ef: OUTPUT«True␤»
TimToady not so sure we shouldn't reserve the colon there...
and on :<> 18:20
18:20 espadrine_ joined
brokenchicken Like make it die saying it's reserved? 18:20
TimToady probably, unless there's some wrinkle I don't remember that we rely on 18:21
we're definitely putting :() and :{} to special use right now
so maybe :[1,2,3] would figure out it's Array[Int] or something someday 18:22
18:23 leah2 left 18:27 Cabanossi left 18:28 knut_ joined, knut_ left 18:30 Cabanossi joined 18:34 pyrimidine left, pyrimidine joined 18:36 labster joined, CIAvash left 18:37 agentzh joined 18:42 labster left, labster joined 18:43 labster left
brokenchicken ugh.. PaleMoon-- Worked OK -> New version -> Got a few bugs -> New version -> Doesn't even start now :( 18:52
Need a better browser :(
oh, it needs a newer glibc 18:53
Need a better OS :}
18:57 domidumont left
TimToady just needs a better 18:59
18:59 leah2 joined
TimToady actually already has lots of betters, except when he doesn't 19:01
19:01 nicq20 joined
brokenchicken :) 19:03
19:05 rmusial left 19:07 hchienjo left 19:11 rmusial joined
nicq20 In the Actions.nqp file of Rakudo, what is '$*W'? 19:13
github.com/rakudo/rakudo/blob/nom/....nqp#L7258
19:14 pyrimidine left, teatime left
brokenchicken nicq20: Perl6/World.nqp 19:14
19:14 pyrimidine joined
brokenchicken github.com/rakudo/rakudo/blob/nom/.../World.nqp 19:14
jnthn In summary: grammar = syntax, actions = semantics, world = declarations 19:15
nicq20 So, World is the environment that the code runs in? 19:17
moritz yes
lexpads, variables, all that good stuff
nicq20 Only available at compile? 19:18
19:18 pyrimidine left
moritz correct 19:20
there are other ways to introspect lexpads etc. at run time
19:23 zdenek left
nicq20 Funny the kind of stuff you find out when fiddling with slangs. 19:23
19:24 domidumont joined
nicq20 *grumble* still can't get to work though *grumble* 19:24
19:28 Cabanossi left 19:30 Cabanossi joined 19:32 Cabanossi left, z8 joined 19:33 kyan joined, Cabanossi joined, bjz joined 19:34 AlexDaniel left, pyrimidine joined, Cabanossi left 19:35 Cabanossi joined 19:38 girafe joined
samcv m: say "\c[space]" 19:38
camelia rakudo-moar 42a1ef: OUTPUT« ␤»
yoleaux 17:55Z <brokenchicken> samcv: too lazy to make an Issue, but noticed this chunk has messed up highlighting: github.com/rakudo/rakudo/blob/nom/...#L839-L857
samcv yay case insensitivity!!
nicq20 When making actions for a slang, what would be the best way to return a number? I'm just trying to get the bare word `two` to be seen as Int.new(2). 19:40
samcv m: "\c[united states, couple with heart: woman man]".say
camelia rakudo-moar 42a1ef: OUTPUT«🇺🇸👩‍❤️‍👨␤»
diakopter bahahaha
brokenchicken nicq20: you don't need a slang for that tho, do you?
nicq20 Probably not. But where's the fun in that? :) 19:41
brokenchicken heh
buggable: eco roman
buggable brokenchicken, Slang::Roman 'A slang to allow Roman numerals': github.com/drforr/perl6-slang-roman
brokenchicken nicq20: maybe there's a hint in htat module ^
19:43 z8 left
brokenchicken m: "\c[family: man man girl girl, woman shrugging: medium-light skin tone]".say 19:43
camelia rakudo-moar 42a1ef: OUTPUT«👨‍👨‍👧‍👧🤷🏼‍♀️␤»
brokenchicken wonder when they'll add skin tones to family emojis :)
19:43 z8 joined
moritz let's rename Unicode to EmjoiFactory 19:44
brokenchicken I think we need a family extension: mix sexes, skin tones, number of parents, and number of kids. 19:45
moritz or we could start to use alphabets again to express words and feelings :-) 19:46
19:46 bwisti joined
brokenchicken hahaha :D 19:46
nicq20 brokenchicken: Been looking at that for a bit now. Not quite the same as it binds a function to it (I just want a number). Seems to keep giving a X::Multi::NoMatch exception. :/
I replaced the QAST::Op with a QAST::IVal with no luck. 19:47
brokenchicken NoMath doing what? 19:48
andrzejku_ hey guys
x)
19:48 z8 left
brokenchicken Chezch! 19:49
19:49 domidumont left
brokenchicken Cześć even 19:49
andrzejku_ I got a dream to create Perl6 game engine :D 19:51
19:52 agentzh left
nicq20 andrzejku_: Sounds fun! :) 19:53
brokenchicken You should make dice poker in Perl 6.
andrzejku_ :D
it is
19:59 rmusial left
[Coke] m: "\c[united states, couple with heart: woman man]".chars.say 19:59
camelia rakudo-moar 42a1ef: OUTPUT«2␤»
19:59 raschipi left 20:00 andrzejku_ left 20:05 rmusial joined
Geth oc: b806f3ede8 | (Samantha McVey)++ | doc/Language/unicode.pod6
Add initial Unicode page
20:06
20:07 agentzh joined, KotH left
samcv what do people think of this so far. can i say which compiliers have different levels of support? 20:07
brokenchicken "Additionally, in Rakudo blead and in the next monthly release of Perl 6 these names are all now case-insensitive:" <--- this is not exactly accurate. Perl 6 releases are 6.c, 6.d, 6.etc language release. There aren't any monthly Perl 6 releases. It's Rakudo compiler that gets released (and for regular users they aren't even monthly, as they get them from Rakudo Star). But IMO we shouldn't mention such minute 20:11
implementation details in the docs, as they are for Perl 6 language and not for just a particular implementation. Once we have infrastructure, we'll be marking stuff that got support in 6.d, 6.e, etc, but for now we kinda just document what is the latest and greatest.
"can i say which compiliers have". Well, we have only one right now that's still actively developed, isn't it? 20:12
20:12 st_elmo left 20:13 st_elmo joined
brokenchicken And would be nice for docs to mention the comma business in char names. If I go to ZWS catalogue and copy-paste a name with a comma in it, it ain't gonna work 20:14
m: "\c[family: woman, woman, boy, boy]".say
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [family: woman]␤at <tmp>:1␤------> 3"\c[family: woman7⏏5, woman, boy, boy]".say␤»
20:14 FROGGS joined
TimToady samcv: I don't understand the phrase "for breaking up words" 20:14
20:14 pyrimidine left
brokenchicken kinda weird to have such a special case, TBH 20:14
c: "\c[BELL,PENGUIN]".say 20:15
samcv that is a typo
brokenchicken mc: "\c[BELL,PENGUIN]".say
committable6 brokenchicken, ¦«2015.12»: ␇🐧
TimToady we should perhaps move our delimiter to something other than comma, if the uc is going to claim comma
20:15 pyrimidine joined
samcv my computer is lagging to hell. gonna reboot 20:15
they don't
comma delimiter is good
brb
perlpilot
.oO( Everyone wants the colon )
20:16 andrzejku_ joined
perlpilot (well, semi-colon would be a better delimiter IMHO) 20:16
TimToady mine too, if we want to allow commas within a character name
and it's non-Englishy to make : bind tigher than , 20:17
*tighter
brokenchicken right, 'cause all of the bazillion *emoji* website list them with commas, like "Family: Man, Man, Boy, Boy" 20:18
TimToady goodness, how'd lunch time sneak up so fast?
moritz jnthn++ PR#1004 20:19
brokenchicken waits for samcv to come back and say why comma's good
20:20 Tonik joined
samcv commas are fine for delimiting the names i think 20:21
and there's other standards i can't remember that use commas 20:22
idk tho do people really think semi colon would be good there?
brokenchicken samcv: what about names that have commas in them? Won't that confuse users when they try to use the name with commas and perl tells them it's an invalid char?
Like a bunch of ZWS stuff. Are there any standard names for them? 20:23
samcv yeah the ones in those unicode files
but I think it's fine just to leave out the commas
they don't have any syntactic meaning
20:23 pmurias left, newnew joined
samcv i mean the emoji sequence names don't fit the super tight conforming ascii uppercase only of the UCD type names and sequences 20:24
20:24 pmurias joined
brokenchicken m: (^0x110000).grep(*.uniname.contains(",")).elems.say 20:25
camelia rakudo-moar 42a1ef: OUTPUT«0␤»
samcv there are none
brokenchicken fair nuf
samcv only A-Z, '-' and ' '
20:27 pecastro joined
TimToady but if people *want* to write Family: Man, Man, Boy, Boy maybe we should let 'em 20:27
Geth oc: 9578de5e0a | (Samantha McVey)++ | doc/Language/unicode.pod6
Unicode file, add some links, fit into less columns
brokenchicken +1 20:28
samcv i mean but the spec already uses commas though? idk how we can get around that
what if they add a name that has a semocolon in it
lol.
brokenchicken :)
I dunno... make it a 6.d material?
samcv i need to fix 20:29
m: "\c[keycap: #]"
camelia rakudo-moar 42a1ef: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [keycap:]␤at <tmp>:1␤------> 3"\c[keycap:7⏏5 #]"␤»
TimToady well, in the short term, could split on semi if there, otherwise on comma
samcv since for some reason we allow comments in there
brokenchicken I never suspected \c[] can take multiple chars at the same time
m: "\x[FF62,FF63]".say6
camelia rakudo-moar 42a1ef: OUTPUT«No such method 'say6' for invocant of type 'Str'␤ in block <unit> at <tmp> line 1␤␤»
brokenchicken m: "\x[FF62,FF63]".say
camelia rakudo-moar 42a1ef: OUTPUT«「」␤»
brokenchicken wow 20:30
OK :)
TimToady m: say "\c[CR,LF]".ords
camelia rakudo-moar 42a1ef: OUTPUT«(13 10)␤»
20:30 newnew left
samcv the emoji names are not intended to be compatible across platforms that may restrict the symbols on it 20:30
but i mean we should allow escaping if we don't already 20:31
brokenchicken If it's just ZWS that got commas in 'em, I think as a short-term it'd be OK to just add a commas check into unknown char exception and say "did you mean a char with commas, toss 'em" or something like that
samcv yeah
brokenchicken m: try "\c[Family: Man, Man, Boy, Boy]".say; say $!.^name 20:32
camelia rakudo-moar aecbb3: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unrecognized character name [Family: Man]␤at <tmp>:1␤------> 3try "\c[Family: Man7⏏5, Man, Boy, Boy]".say; say $!.^name␤»
20:32 cschwenz joined
brokenchicken m: try q|"\c[Family: Man, Man, Boy, Boy]".say|.EVAL; say $!.^name 20:32
camelia rakudo-moar aecbb3: OUTPUT«X::Comp::AdHoc␤»
brokenchicken mkay
samcv i gotta take a nap. i'll bbl :D 20:33
cschwenz so github.com/search?p=1&q=org%3A...amp;utf8=✓ isn't finding the source code for IO::Socket::Async. where will i find said source? 20:36
20:36 pmurias left
brokenchicken s: IO::Socket::Async, 'new', \() 20:37
cschwenz the backstory on this is i'm using HTTP::Server::Tiny and i'm getting an "address already in use" error. i _think_ i've tracked this down to IO::Socket::Async, but i could be wrong on that.
SourceBaby brokenchicken, Sauce is at github.com/rakudo/rakudo/blob/aecb...sync.pm#L8
brokenchicken cschwenz: ^
cschwenz thanks! :-)
brokenchicken cschwenz: and all core types are in that repo in src/core/ directory and most have separate files named after the type name
cschwenz cool :-) i was looking in the wrong repo, d'oh! 20:38
brokenchicken m: IO::Socket::Async.^lookup('new').file.say
camelia rakudo-moar aecbb3: OUTPUT«SETTING::src/core/IO/Socket/Async.pm␤»
brokenchicken and that too. Hooray introspection \o/
20:39 bjz_ joined, bjz left 20:40 pmurias joined
cschwenz s: nqp, 'asynclisten', \() 20:41
SourceBaby cschwenz, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Undeclared routine:␤ nqp used at line 6␤␤
cschwenz s: nqp::asynclisten
SourceBaby cschwenz, Something's wrong: ␤ERR: ===SORRY!=== Error while compiling -e␤Could not find nqp::asynclisten, did you forget 'use nqp;' ?␤at -e:6␤------> put sourcery( nqp::asynclisten ⏏)[1];␤ expecting any of:␤ argument list␤
brokenchicken heh 20:42
No one can master that bot :)
cschwenz: the nqp:: stuff is in repo github.com/perl6/nqp/
cschwenz thanks :-) 20:43
brokenchicken cschwenz: some (but not all) ops are documented in github.com/perl6/nqp/blob/master/d...s.markdown nqp::p6* ops are documented in github.com/rakudo/rakudo/blob/nom/...s.markdown
cschwenz: and the final piece of the puzzle—the MoarVM—lives in github.com/MoarVM/MoarVM/ 20:44
20:44 agentzh left, agentzh joined
cschwenz awesome, thanks for the pointers :-) 20:45
pmurias brokenchicken: re rewrite, I'm sure there are plenty of businesses using no longer maintained technology 20:49
20:51 pyrimidine left 20:52 pyrimidine joined 20:57 pyrimidine left 21:02 cschwenz left, st_elmo left
agentzh Ran into a very strange rakudo variable declaration error: gist.github.com/agentzh/1e272ca141...c7d76be9bf 21:06
cannot reproduce this error when put the offending p6 code in isolation.
any hints or pointers in debugging this? 21:07
it's strange that rakudo complaints that @param-names is not declared while it was just declared with "my" only 2 lines above.
21:07 andrzejku_ left
agentzh could anyone knowledgeable help me out here? 21:08
moritz agentzh: this typically happens if something confuses the parser, so that the "my" doesn't look like a declaration
agentzh: like a missing closing quote
agentzh moritz: thanks for the hint!
looks like some interpolation pitfalls. 21:09
moritz agentzh: or anything that could gobbles up the my
brokenchicken agentzh, try backslashing that ( in the string
agentzh moritz: just found it! thanks!
brokenchicken What was it?
agentzh brokenchicken: yeah, i just figured it out myself too.
the ( needs to be escaped. 21:10
just you said.
*just like what you said
brokenchicken weird, I thought those only worked for &-sigiled vars
moritz nope
agentzh brokenchicken: yeah, that's a surprise.
moritz anything that starts with a sigil and ends with a postcircumfix
agentzh moritz: i hope the interpolation rule is more strict :) 21:11
21:11 Tonik left
brokenchicken agentzh, another tip for debugging very strange bugs: run with --optimize=off flag to turn off optimer 21:11
moritz m: my $x = 42; say qq[<a href="foo">$x</a>];
camelia rakudo-moar 49e2d4: OUTPUT«Type Int does not support associative indexing.␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
agentzh brokenchicken: awesome! i'll put it on my note.
thanks!
21:17 nicq20 left, FROGGS left 21:21 KotH joined 21:23 agentzh left 21:27 sena_kun left 21:28 Cabanossi left 21:30 cschwenz joined, kyan left, Cabanossi joined 21:31 cschwenz left 21:40 jast left, jast joined 21:43 agentzh joined, kyan joined
[Coke] wonders if any of the #perl 6 regulars work in the financial IT sector. 21:44
(accounting, taxes, that sort of thing)
21:48 agentzh left 21:54 pyrimidine joined 21:57 astj joined, Cabanossi left 22:00 Cabanossi joined 22:02 astj left 22:03 TEttinger joined 22:07 rindolf left
timotimo there has been a rakudo build half-finished for one and a quarter hours already 22:08
22:08 sivoais joined 22:09 lukiramu left 22:12 RabidGravy left
Geth oc: 02c5fe89f2 | (Timo Paulssen)++ | doc/Language/unicode.pod6
make unicode.pod6 parse by adding =end pod
22:13
22:14 skids left
brokenchicken rakudo build where? 22:16
22:16 ufobat left
timotimo travis ci 22:17
travis-ci.org/rakudo/rakudo/builds/195227069
buggable [travis build above] ✓ All failures are due to timeout (0), missing build log (3), or GitHub connectivity (0).
timotimo it's just sitting there, not starting any of the sub-jobs that remain to be done
22:17 agentzh joined 22:18 cdg joined
agentzh brokenchicken: with --optimize=off, rakudo first-time compilation time for one of my 160 LOC .pm6 file drops from 12+ sec to 6 sec. 22:18
that's a big improvement to my dev time :) 22:19
brokenchicken heh
22:19 abraxxa left
agentzh brokenchicken: i hope the compilation time can be reduced further :) 22:19
brokenchicken agentzh: what Rakudo version are you on? 22:20
agentzh 2017.01
brokenchicken okay. Then you have all the recent compilation speed improvements :)
agentzh This is Rakudo version 2017.01 built on MoarVM version 2017.01
okay 22:21
thanks for the info.
brokenchicken timotimo: weird. Maybe just new travi's "trusty beta"? The other day I pushed a commit in the evening and travis bot said it passed THE NEXT DAY when I was at work
timotimo yeah, very trusty indeed. 22:22
agentzh: wow. the optimizer isn't supposed to be that slow
well, if it constant-folds something for you that is cpu-intensive to calculate, that'll take a bunch of time, of course 22:23
but that same time isn't spent during runtime
agentzh with optimization turned off, my whole 4.3K LOC p6 project compiles in 24.687s with .precomp/ removed.
this is a pretty fast machine (macbook pro 15 inch mid-2015 with the configs maxed out). 22:24
brokenchicken And with it turned on what's the time?
agentzh brokenchicken: running now :) 22:25
brokenchicken m: multi sub infix:<==> (Int $a, Str $b) { $a == $b } # weeeee, infinite compilation time \o/ 22:26
agentzh brokenchicken: 0m25.040s w/o --optimize=off
so it seems my pervious timing might be something else.
camelia rakudo-moar 0ad05c: OUTPUT«(timeout)»
agentzh seems like compilation time is a major issue when developing relatively large p6 projects. 22:27
brokenchicken Yeah, if a lot of modules need to be recompiled after a change. 22:28
agentzh my p6 project will eventually be more than 10K LOC i think.
22:28 cdg left, cdg joined 22:29 pecastro left
agentzh anyway, i'll keep --optimize=off to avoid any potential surprises during my own development. 22:29
is there a way to utilize multiple cores for rakduo to compile multiple modules? 22:30
i've got 8 logical cores here.
22:31 pecastro joined
brokenchicken Don't think so 22:32
agentzh ok
22:32 sena_kun joined
gfldex technically yes, but it's still very unstable 22:33
brokenchicken agentzh: it's worth noting that a few months back, I was running coverage reported on Rakudo compiled without the optimizer and spectests would occasionally flap, even though on optimized version they didn't. So, if you start getting weird errors, try with optimizer turned on :)
Oh right, cause you can manually tell it what to compile right?
And you could have some sort of build script launcher running in multiple threads precompiling what it can in parallel, and then shooting off the main script that would find everything precompiled already 22:34
gfldex you create a .p6 file per module and a Makefile with the rules
then you run make -j6
brokenchicken intersting
Wonder if there's anything that can be cooked up with the CUR api
agentzh brokenchicken: that makes sense, the default settings should be mostly exercised one. 22:35
gfldex: i still need to figure out the topological order right?
gfldex yes
agentzh gfldex: any tool that i can use directly for that?
gfldex but a Makefile can do that for you
and it wouldn't be hard to find the use statements in modules and generate the Makefile 22:36
agentzh gfldex: *nod*
will try.
gfldex agentzh: there will be
agentzh will write a simple p5 script to generate the makefile snippet. 22:37
since i have so many .pm6 files
brokenchicken there's RAKUDO_MODULE_DEBUG env var you can turn on and it'll probably give you enough sequential info to figure out some sort of topoligical info?
agentzh manual writing the makefile would be too tedious and error prone :)
gfldex that's one of the things I want to do with meta6-bin
agentzh brokenchicken: interesting. will check it out. 22:38
gfldex: nice
brokenchicken: that's very useful :) 22:39
thanks!
gfldex: thanks for the makefile tip!
sena_kun there are quite a lot of dd usage occurences in docs now, about 150 sentences(+/-20). I assume that almost all of them(except for debugging-related page) should be replaced with something else? 22:40
brokenchicken shrugs 22:41
gfldex rechnically yes but in some cases that would be quite tricky 22:42
and it would reduce readability in many cases
brokenchicken If it's so persistent at staying, perhaps it's worth keeping it and just go with the flow, until we actually encounter problems due to its presence. It *is* documented as rakudo only debug thing. 22:43
gfldex i would also expect quite a few modules in the ecosystem to sport dd
brokenchicken wonders what pmichaud would think of it
sena_kun yes, it can be. just as a thought for yet another "in this century"-issue.
gfldex the only issue I have with dd is that I use vim :-> 22:44
brokenchicken
.oO( spec `dd` as a generic debuging tool, with no promises on actual content it outputs... )
22:45
sena_kun I don't use vim nor dd, just noticed. anyway, it's better to keep working on pod files instead... 22:46
22:49 zakharyas joined
gfldex we should either spec it or introduce use Rakudo::dd 22:49
22:57 Cabanossi left
gfldex m: sub f($a,$b,$c){ say $a,$b,$c }; sub debug(|c){ say 'debug'; |c }; f |debug 1,2,3; 22:58
camelia rakudo-moar 0ad05c: OUTPUT«debug␤123␤»
gfldex m: say dd 1,2,3; 22:59
camelia rakudo-moar 0ad05c: OUTPUT«1␤2␤3␤Nil␤»
gfldex if dd would return the capture it takes, one could "inline" dd
23:00 Cabanossi joined, pmurias left
agentzh gfldex: sorry, one quick question: for my makefile pre-comp purposes, perl6 -c should be sufficient, right? 23:01
the -c option
gfldex i don't know
agentzh gfldex: okay, i'll try it out.
gfldex find lib/.precomp -ls should tell you 23:02
23:04 Khisanth left, matiaslina joined 23:06 telex left 23:07 eyck left 23:08 geekosaur left, telex joined 23:09 eyck joined, geekosaur joined 23:10 rmusial left 23:11 pmurias joined 23:12 cdg_ joined 23:14 cdg left, pierrot left 23:16 rmusial joined 23:18 Khisanth joined, cdg joined
agentzh it's a bit tricky to map the .pm6 file to the precomp files. 23:18
seems like rakudo still tries to re-compile the dep modules even though they were just run by `perl -c`. 23:19
*perl6 -c
[Coke] (dd) in -general-, don't use it. in practice, doesn't matter until we have a competitor to rakudo that doesn't support it
(given that it's documented as rakudo only right now) 23:20
23:21 cdg_ left
sena_kun [Coke], I didn't plan to use it, just was a bit concerned about existing usage examples. Anyway, thanks for clarification. 23:21
23:28 cdg_ joined 23:29 pmurias left
agentzh is there a way to force rakduo to avoid recompiling a comp unit's deps? 23:30
seems like the cached entries are based on random-like keys or somethign? 23:31
23:31 cdg left
agentzh are the cache keys are solely based on file contents' checksum? 23:31
23:32 espadrine_ left
agentzh if rakudo always tries to recompile its dep modules then the make -jN parallelism will not work. 23:32
and that's also my current benchmark result.
make -j8 makes no difference in compilation time. 23:33
23:33 cdg joined
agentzh using either perl6 -c /path/to/file.pm6 or just perl6 /path/to/file.pm6 23:33
any hint here?
gfldex agentzh: you may have stepped on a bug 23:35
23:35 perlawhirl joined
gfldex we use caching when building the docs 23:36
and that works quite nicely
23:36 cdg_ left
gfldex agentzh: see github.com/perl6/perl6-pod-to-bigp...nepage#L64 23:37
agentzh gfldex: i see the "Outdated precompiled" thing in the RAKUDO_MODULE_DEBUG=1 output.
is that the culprit?
gfldex i don't know, you may want to ask nine about precomp 23:38
agentzh gfldex: okay, thanks. 23:39
here's the output: gist.github.com/agentzh/cfc8223752...da9288fbed
23:39 zakharyas left
agentzh oh, seems like RAKUDO_MODULE_DEBUG=1 makes rakudo/moarvm enter an infinite loop. 23:40
23:41 kyan left 23:42 perlawhi1l joined
agentzh strace shows that moarvm loops at the syscall write(2, " 1 5611 RMD: Performing impor"..., 60) = -1 EAGAIN (Resource temporarily unavailable) 23:42
gfldex: thanks for the pointer, seems like i'll have to use the CompUnit::PrecompilationRepository API. 23:45
alas.
how to enable moarvm's debuginfo? 23:50
23:50 skids joined
agentzh while building rakduo with perl Configure.pl --gen-moar --gen-nqp --backends=moar ? 23:51
the default build does not enable debug symbols in the resulting moarvm it seems.
brokenchicken Right, it doesn't 23:52
agentzh is there an option? 23:53
brokenchicken $(cd nqp/MoarVM; perl Configure.pl --debug=3 --prefix=../../install; make -j8; make install;)
And that should do it (no need to recompile rakudo)
23:54 kyan joined
agentzh brokenchicken: great. thanks! i'll try it out 23:54
brokenchicken Also, I forget why I think --debug=3 and not some other value, it may be just a flag
cd nqp/MoarVM; perl Configure.pl --help # lists a bunch of stuff