»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:06 itaipu left
dalek osystem: b427f5f | (Zoffix Znet)++ | META.list:
Add CoreHackers::Sourcery

Show source locations of core methods and subs: github.com/zoffixznet/perl6-CoreHa...s-Sourcery
00:07
Zoffix New blog post "Perl 6 Core Hacking: Where's Da Sauce, Boss?": perl6.party/post/Perl-6-Core-Hackin...Sauce-Boss 00:08
harmil_wk, ^ the module and post might be of interest to you.
00:11 kurahaupo left 00:12 margeas left 00:20 canopus left
awwaiid The ICFP Contest has begun! icfpc2016.blogspot.jp/ 00:22
00:24 sufrostico left 00:27 canopus joined 00:33 Actualeyes joined 00:34 freezerburnv_ joined 00:38 freezerburnv left 00:47 Rawriful left 00:59 sena_kun left 01:05 itaipu joined 01:07 BenGoldberg left 01:10 BenGoldberg joined 01:16 labster left 01:26 AlexDaniel joined 01:33 bjz left
MasterDuke AlexDaniel: i just tried to install Inline::Perl5, but got '/usr/bin/ld: cannot find -lperl' 01:35
01:42 labster joined 01:43 kalkin- left, kalkin-_ joined
AlexDaniel ↑ fixed ;) 01:44
01:48 BenGoldberg left, BenGoldberg joined 01:50 cibs left 01:52 cibs joined 01:57 ShimmerFairy joined 02:06 pierre_ left
Xliff m: $a = 'aaa'; $a ~~ s:g/a/b/; say $a; 02:22
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s:g/a/b/; say $a;␤»
Xliff m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a;
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:27 cdg joined 02:30 noganex_ joined
Xliff m: $a = 'aaa'; $a ~~ s/a/b/h; say $a; 02:30
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s/a/b/h; say $a;␤»
Xliff m: $a = 'aaa'; $a ~~ s/a/b/g; say $a;
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$a' is not declared␤at <tmp>:1␤------> 3<BOL>7⏏5$a = 'aaa'; $a ~~ s/a/b/g; say $a;␤»
Xliff m: my $a = 'aaa'; $a ~~ s/a/b/g; say $a;
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Unsupported use of /g; in Perl 6 please use :g␤at <tmp>:1␤------> 3my $a = 'aaa'; $a ~~ s/a/b/g7⏏5; say $a;␤»
Xliff Hrm.
m: my $a = 'aaa'; $a = $a.subst(/a/, 'b'); say $a; 02:31
camelia rakudo-moar 552d9c: OUTPUT«baa␤»
Zoffix m: my $a = 'aaa'; $a = $a.subst(/a/, 'b', :g); say $a;
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
Zoffix m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a;
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
Xliff m: my $a = 'aaa'; $a.=subst(/a/, 'b', :g); say $a; 02:32
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:32 noganex left
Zoffix m: my $a = 'aaa'; $a = $a.trans('a' => 'b'); say $a; 02:33
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
Zoffix m: my $a = 'aaa'; $a ~~ tr/a/b/; say $a;
camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:33 wamba joined
skids m: my $b = 'aaa'; my $a = $b ~~ S:g/a/b; say $b; say $a; 02:34
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable $a in declaration to initialize itself␤at <tmp>:1␤------> 3a'; my $a = $b ~~ S:g/a/b; say $b; say $7⏏5a;␤ expecting any of:␤ postfix␤ term␤»
skids m: my $b = 'aaa'; my $a = ($b ~~ S:g/a/b); say $b; say $a;
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Cannot use variable $a in declaration to initialize itself␤at <tmp>:1␤------> 3; my $a = ($b ~~ S:g/a/b); say $b; say $7⏏5a;␤ expecting any of:␤ postfix␤ term␤»
skids :/ 02:35
m: my $b = 'aaa'; my $a; $a = ($b ~~ S:g/a/b); say $b; say $a;
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Malformed replacement part; couldn't find final /␤at <tmp>:1␤------> 3a; $a = ($b ~~ S:g/a/b); say $b; say $a;7⏏5<EOL>␤ expecting any of:␤ postfix␤»
skids oh.
m: my $b = 'aaa'; my $a = $b ~~ S:g/a/b/; say $b; say $a;
camelia rakudo-moar 552d9c: OUTPUT«Potential difficulties:␤ Smartmatch with S/// is not useful. You can use given instead: S/// given $foo␤ at <tmp>:1␤ ------> 3my $b = 'aaa'; my $a = $b ~~ 7⏏5S:g/a/b/; say $b; say $a;␤aaa␤False␤»
skids m: my $b = "aaa"; my $a = S:g/a/b/ given $b; say $b; say $a; 02:37
camelia rakudo-moar 552d9c: OUTPUT«aaa␤bbb␤»
skids there we go.
02:38 freezerburnv joined 02:39 kid51 left 02:41 freezerburnv_ left
MasterDuke m: my $b = "aaa"; (my $a = $b) ~~ s:g/a/b/; say $b; say $a; 02:41
camelia rakudo-moar 552d9c: OUTPUT«aaa␤bbb␤»
MasterDuke skids: ^^^ is that the same thing you were trying to do? 02:42
skids I was just riffing off the previous stuff to demonstrate S///. 02:43
konobi ullo 02:45
MasterDuke anybody here used Inline::Perl5 much? 02:48
i have 'use Chart::Gnuplot:from<Perl5>;'
'my $chart = Chart::Gnuplot.new(<...>)' works 02:49
but then 'my $dataSet = Chart::Gnuplot::DataSet.new(<...>)
gives "Could not find symbol '&DataSet'"
and i tried, 'use Chart::Gnuplot::DataSet:from<Perl5>;', but that just gave "Can't locate Chart/Gnuplot/DataSet.pm in @INC" 02:54
skids Hrm. I wonder if that's a generic problem with p5 files that contain multiple packages. 03:04
Unfortunately using "import" doesn't help.
03:06 pierre_ joined
skids Weird. If you ".say for ::Chart::Gnuplot::" DataSet is not there, but there's a class "Grepper" and that string does not appear inside rgrep Grepper /usr/share/perl5/Chart/. Or even all of /usr/share/perl5 03:09
03:12 cdg left, cdg joined
skids Something in Inline::Perl5 or rakudo is going off the rails wth that file. Grepper is an Any-iterable role that is somhow getting punned in there. 03:12
Unfortinately I really can't stay up to hunt that down. 03:13
03:13 khw left 03:17 cdg left
skids MasterDuke: maybe as a temporary workaround see if you can split DataSet code out to its own Gnuplot/DataSet.pm file. 03:19
MasterDuke skids: yeah, thought about that, will give it a try
weird about that Grepper thing though 03:20
skids my bet is a leftover GLR-induced buglet. 03:22
03:27 freezerburnv left 03:33 wamba left 03:39 kurahaupo joined 03:55 bob777 left 04:04 bob777 joined 04:05 skids left 04:06 BenGoldberg left 04:13 Actualeyes left 04:16 Actualeyes joined, golee joined
awwaiid ok, I apparently don't know how to do simple things 04:22
m: module Foo { sub hi { say "hi" } } ; Foo::hi
camelia rakudo-moar 552d9c: OUTPUT«Could not find symbol '&hi'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
04:28 pierre_ left 04:29 avenj left 04:37 Cabanossi left 04:38 Cabanossi joined, mcmillhj joined 04:42 golee left 04:44 mcmillhj left, avenj joined, avenj left, avenj joined 04:46 kurahaupo left
llfourn awwaiid: you want "our sub hi" 04:48
awwaiid our! 04:49
by default they are 'my' ?
llfourn yes :)
04:52 pierre_ joined
awwaiid I'm trying to write a grammar where the first line has an integer count and then I read that number of lines for another rule 05:03
fancy wya to do that?
like rule { <count> <data>{$count} } 05:06
05:06 PapaChub left
llfourn m: say "aaa" ~~ /a ** {1 + 2}/ # seems to work 05:11
camelia rakudo-moar 552d9c: OUTPUT«「aaa」␤»
llfourn awwaiid: ^^
awwaiid m: "3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$count} / 05:12
camelia rakudo-moar 552d9c: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable '$count' is not declared␤at <tmp>:1␤------> 3" ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {7⏏5$count} /␤»
awwaiid m: "3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$/<count>} /
camelia ( no output )
awwaiid m: ("3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$/<count>} /).say 05:13
camelia rakudo-moar 552d9c: OUTPUT«「3 a b c 」␤ count => 「3」␤ ws => 「 」␤ ws => 「 」␤ ws => 「 」␤ ws => 「 」␤»
awwaiid hm!
llfourn looks good :)
awwaiid wonders if rules can take a parameter 05:14
llfourn they can :)
05:14 M-Illandan left, tadzik left, Matthew[m] left
AlexDaniel m: ("3 a b c " ~~ / $<count>=\d+ <.ws> [\w+ <.ws>] ** {$/<count>} /).say 05:16
camelia rakudo-moar 552d9c: OUTPUT«「3 a b c 」␤ count => 「3」␤»
05:22 pierre_ left 05:36 _28_ria left 05:53 golee joined 05:55 golee left 05:57 tadzik joined 05:59 MilkmanDan left
llfourn m: my $a = "bar"; (with $a { $_ }) = "foo"; say $a # works 06:00
camelia rakudo-moar 552d9c: OUTPUT«foo␤»
llfourn m: my $a = "bar"; ($_ with $a) = "foo"; say $a # doesn't
camelia rakudo-moar 552d9c: OUTPUT«Cannot modify an immutable Str␤ in block <unit> at <tmp> line 1␤␤»
llfourn anyone know if this is itended?
intended* 06:01
06:04 golee joined
llfourn goes to RT 06:06
06:08 mohae_ joined 06:10 mohae left 06:20 firstdayonthejob joined 06:23 M-Illandan joined 06:24 Matthew[m] joined 06:38 NEveD left 06:43 firstdayonthejob left 06:51 darutoko joined 07:10 sno left 07:24 ufobat joined 07:26 bjz joined
ufobat good morning :) 07:31
07:47 zakharyas joined 07:58 sno joined, RabidGravy joined 08:05 ribasushi left 08:07 pierre_ joined 08:13 ribasushi joined 08:26 pierre_ left 08:31 telex left 08:32 telex joined 08:35 espadrine joined
ufobat what is this: Unhandled exception in code scheduled on thread 7 08:36
getexpayload needs a VMException
in any at /home/martin/.rakudobrew/moar-2016.07.1/install/share/perl6/runtime/CORE.setting.moarvm line 1
08:37 pierre_ joined
timotimo is your everything up to date? 08:39
ufobat This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
i think so
timotimo OK, could have been your moar and rakudo weren't compiled for the same version of things 08:40
well, can you golf it? :)
ufobat i tried to golf my segfault from yesterday 08:41
so far its not a tiny piece of code :/ gist.github.com/ufobat/fedd964bb83...0bd9296e20
timotimo ah, i seem to recall you said something about supplies and such 08:42
ufobat i am starting 8 times per sec: nc -w 1 localhost 3000 &
timotimo there's been stability fixes for async stuff recently 08:43
ufobat if i start 30 netcats per sec it seems that my code deadlocks. at least nothing is happening anymore
timotimo you should perhaps grab latest versions out of git for moar, nqp, and rakudo
ufobat hm okay :)
i will do so after my vacation in sweden :-) 08:44
timotimo oh
OK!
aha, it stopped for me 08:45
ufobat for more then 8 connections in parallel?
timotimo for some reason it went up to Thread<19>
if you could give me a command that'll do the 8 connections in parallel, that'd be nice %) 08:46
because how do i even loops in fish
08:46 Actualeyes left
timotimo i ran them pretty much serially 08:46
ufobat while true; do; sleep 1, nc -w 1 localhost 3000 &; nc -w 1 localhost 3000 &; nc -w 1 localhost 3000 &; ......; done
-w 1 is a timeout of 1 sec, so the number of nc == number of parallel connections 08:47
timotimo it's like the threads don't get unblocked 08:48
08:48 Actualeyes joined
timotimo there's a terrible mistake in your code! 08:48
ufobat whats wrong?
timotimo it should read "$*THREAD closing client connection ", not "$*THREAD closing cient connection " 08:49
i never get any of those outputs, btw
i think LAST may not be the right phaser there?
ufobat hmm 08:50
when i connect with a broser to localhost 3000 and push relaod quite a while i get a
timotimo hm, doc says LAST is right, and QUIT is also a thing you should have
ufobat i get a closing client connection, and somethings i get a idk "can't close a closed connection" 08:51
sometimes
timotimo well, browsers will also do keepalive unless you tell them not to
that complicates things, definitely
ufobat Thread<19>(<anon>) closing cient connection IO::Socket::Async.new 08:52
Unhandled exception: cannot close a closed socket
and thry catch dosnt catch it :(
timotimo could be you aren't (or can't be) in the right dynamic scope to catch that exception 08:53
i.e. could be rakudo core code tries to do that and doesn't handle "cannot close closed code"
can you use --ll-exception to get more details?
08:55 trnh joined, trnh left, trnh joined
ufobat doesn't work 08:55
i dont get any details
timotimo hm, OK
oh, that close thing is inside your try/catch 08:56
weird.
so what if you don't $conn.close?
AlexDaniel Comments needed: github.com/perl6/doc/pull/632 09:00
ufobat if i dont close it, echo on the cli works fine with nc localhost 3000 09:02
but i dont see the http get request as a reply in my browser..
then the only thing thats happening is the "deadlock" when i use 20 or more connections in parallel 09:03
timotimo on my end, the event loop for responses never terminates
hm, or ... maybe it does?
time to move the stuff onto its own workspace, so i have more than just half a single monitor for all of it 09:06
ah, i was misreading the handle_conn the entire time 09:07
oh my, all the nc processes are still running 09:09
09:10 kid51 joined
timotimo well, all i can say is your code looks, at first glance, as if it shouldn't be blocking threads 09:11
however, it seems like there's an await inside of REACT 09:13
and that's where all those threads are blocked
ufobat how come your netcats didnt terminate?
timotimo dunno
but also killall isn't enough, i have to killall -KILL 09:14
ufobat hmm
timotimo oh
ufobat thanks for your help timotimo :) but now its time for vacation :)
timotimo duh
react does block the thread for you
because of course it does 09:15
that's what you use react for
instead of supply
so instead of that i suppose you'd want to keep supplies you've created around in some list and make sure they get handled properly when they terminate, and such
REACT is quite literally SUPPLY + await 09:16
and await doesn't free up the thread for the threadpool yet; that's a 6.d feature
ufobat AH !
i see
timotimo if i liked coffee, now would be the right time to start drinking it 09:17
09:17 rindolf joined
ufobat so then i assume everything would work fine, which means that golfing the segfault didnt work :/ 09:17
timotimo ah, probably. i'll try the supply-instead-of-react-thing and see if i can get it to segv 09:18
09:18 xinming_ joined
ufobat but i think i am understanding async programming a bit better now :-) thanks timotimo :) 09:18
timotimo yay
i haven't done much with supply or react at all, so it was a good exercise for me
ufobat if you're interested how my segfault is reproduced: rt.perl.org/Public/Bug/Display.html?id=128839 09:19
timotimo well, now i have only 3 threads active
09:20 e163 joined
timotimo but as i said, it could just be that recent stability fixes by jnthn would prevent this segfault entirely 09:21
09:21 xinming left, e163 left
ufobat would you how me how you handle the supplies now? 09:23
timotimo i just replaced react with supply inside the $p_reply.then, and added a .then({ $_.tap({ say "dummy" }); @supplies.push($_) }) 09:25
i'm not sure if that's thread-safe, actually
just pushing it
would be better to feed it into a channel
09:27 kid511 joined 09:28 kid51 left 09:30 jkramer left
ufobat mhmm 09:31
timotimo i'm only keeping them around in a variable so it isn't considered garbage, but i think that's unnecessary anyway
09:38 triholyghost joined 09:46 margeas joined 09:53 thomas left, trnh left
Ulti you get LAST and QUIT on a whenever block is there any reason for no FIRST? 09:56
09:59 TEttinger left
literal isn't there? 10:01
docs.perl6.org/language/phasers#Loop_Phasers
Ulti nope 10:02
10:02 Actualeyes left
Ulti or at least it doesn't appear to actually execute 10:02
no error at all it just doesn't work
literal m: for 1..3 { FIRST { print "bar" }; print "foo" } 10:03
camelia rakudo-moar 552d9c: OUTPUT«barfoofoofoo»
timotimo that's not a whenever block :)
literal yeah, FIRST is a loop phaser 10:04
you might want ENTER
timotimo but ENTER fires on every enter
whenevers are loop-like
dalek ateverable: 998ae02 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
Perl 6 rewrite of bisectable

Everything looks fine. It does segfault sometimes, but it is most likely not our fault.
10:05 triholyghost left 10:15 NEveD joined 10:16 danaj left 10:17 pierre_ left 10:18 lambd0x joined
lambd0x Hi everyone! 10:18
RabidGravy erp 10:19
lambd0x How can I search for a key in an array of hashes?
first time working with them...sorry it's a dumb question :P 10:20
nine Something like @hashes.grep: { $_<yourkey>:exists }? 10:22
10:24 Actualeyes joined
Ulti literal yeah as timotimo says ENTER is every time something is called not the first time 10:26
10:27 movl left
AlexDaniel lambd0x: if you are going to do lots of such lookups, perhaps consider creating one big hash for that 10:28
m: my %a = <a 1 b 2 c 3>; my %b = <x 7 y 8 z 9>; %a.append(%b); say %a<y> # or something
camelia rakudo-moar 552d9c: OUTPUT«8␤»
Zoffix m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes.map({.<y>:v}).grep: *.elems 10:34
camelia rakudo-moar 552d9c: OUTPUT«(8)␤»
lambd0x nine: I'll try that... was unsure this would work with hashes since they do with arrays 10:35
Zoffix Kinda dissapointing this ain't working:
m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes».<y>:v
camelia rakudo-moar 552d9c: OUTPUT«Unexpected named parameter 'v' passed␤ in block <unit> at <tmp> line 1␤␤»
lambd0x AlexDaniel: What is the best way of creating a list of hashes that might get big? 10:36
my @hash? my %hash? just their syntax differs or something else does too? 10:37
gregf_ i guess it should be O(1) - best case , or O(n) worst case?
10:38 AlexDaniel left
lambd0x I know their proper parameters in the @array case to use it as a @hash already...just am unsure how to use hash type :D 10:38
nine lambd0x: seems to me like you would benefit from describing your problem instead of asking about a tiny part of the solution?
lambd0x gregf_: better yes.
gregf_ my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); @hashes.first: ->$h { $h<$key>:exists } 10:39
prolly ;) # not sure its valid :|
Zoffix gregf_, but this and nine's solutions just find the first hash with the key, not the actual value of the key. 10:40
lambd0x nine: My problem is that I come from C programming and I never worked before with hash type. Wanted to know how to proper work with them... :P
moritz m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes.first: ->$h { $h<x>:exists } 10:41
camelia rakudo-moar 552d9c: OUTPUT«{x => 7, y => 8, z => 9}␤»
gregf_ Zoffix: yeah, your .elems sounds perfect
moritz gregf_: the only problem is $h<$key>, which needs to be $h{$key} or $h<literal_key>
gregf_ moritz: yep, you got it :) 10:42
nine lambd0x: ok....so something in between would be good :) What is your array of hashes supposed to solve? What do you use it for? What do you want to store in it?
lambd0x nine: ahahah 10:43
Ok I'm trying to understand how to store a indefinite series of integers in some way and report by the end of it what was the number of ocurrences of the last int...suposed a hash would be good key as a number and value as the amount of times each key appeared during exec. 10:45
But I was asking bits of questions for I wanted to figure out it on my own :). But didn't know really how to use hash type yet. :) 10:46
Zoffix labster, a Bag or BagHash would be a better choice
m: say bag "A quick brown fox jumped over a lazy dog".comb
camelia rakudo-moar 552d9c: OUTPUT«bag(a(2), p, n, k, (8), l, r(2), c, g, q, b, j, x, e(2), m, i, y, v, w, u(2), A, z, d(2), f, o(4))␤»
lambd0x Zoffix: ahah, Bag stands for that exactly? 10:47
Zoffix docs.perl6.org/language/setbagmix
Don't think it stands for anything... well... other than real life bags maybe? :)
lambd0x I know, was refering to the argument type after the bag call... 10:49
Oh, well I have a lot to learn yet hahaah 10:50
10:50 labster left
lambd0x Thanks guys, will read about what you all just said and try again :) 10:51
10:52 kaare_ joined 10:56 rindolf left 11:01 kurahaupo joined
dalek line-Perl5: 62d7a43 | niner++ | / (3 files):
Try to make installation on Windows possible
11:02
line-Perl5: d65d956 | niner++ | META.info:
Version 0.8
11:07 noreem joined 11:13 holyghostoo joined 11:14 dalek left 11:18 NEveD left 11:33 sena_kun joined 11:35 holyghostoo left 11:54 tbrowder joined
tbrowder another possible p6 marketing project: API support for backendless.com 11:56
12:00 pmurias joined
pmurias hi 12:00
tbrowder hi, pmurias 12:05
Woodi o/ 12:06
vcv \o
12:09 xfix left
unmatched} "Backendless Platform: The Platform is a productivity machine, a fine-tuned engine with well-integrated components designed to make you feel in empowered"... ahh, bless you marketing boardroom meetings that always produce non-descriptive nonsense. 12:12
tbrowder: so what is it? 12:15
DrForr Buzzword buzzkill?
unmatched} Seems to be. I've been on that website for 7 minutes already and still don't know wtf this is... well, other than a "fine-tuned engine" that they mention several times :) 12:16
DrForr Something to do with the new "serverless" stuff, I'm guessing? 12:17
12:17 rindolf joined
unmatched} Seems something to do with mobile apps. 12:18
unmatched} hits the "close" button on the browser window
12:19 xfix joined, wamba joined
llfourn m: say Array[Int] ~~ Array[Int]; say Array[Int] ~~ Positional[Numeric]; say Array[Int] ~~ Array[Numeric]; 12:22
camelia rakudo-moar 552d9c: OUTPUT«True␤True␤False␤»
llfourn ^bug?
12:23 canopus left
llfourn m: say Positional[Int] ~~ Positional[Numeric] 12:23
camelia rakudo-moar 552d9c: OUTPUT«True␤»
tbrowder I first heard about it this morning in a DZONE article about RESTful interfaces, etc. I looked briefly at the site and saw interesting things like free storage up to 20 Gb, free tier of restful dervices, etc. for developing mobile apps. They have several languages supported, no Perl of any kind, and no hint of the possibility of adding it. Just saying it's
worth investigating...
unmatched} m: say Positional[Numeric] ~~ Positional[Int] 12:24
camelia rakudo-moar 552d9c: OUTPUT«False␤»
mst kinda firebase like
12:24 atta left
nine tbrowder: do you have any idea what the website is acutally offering? I'm in unmatched}'s camp with having no clue after reading the website. 12:25
tbrowder If we want to get p6 being used by the world, someone has to start providing hooks that will interest devs that want to make money.
nine: Not exactly, but there are people here who I am sure can see its promise. 12:26
mst oh gods please let's not go that route
llfourn isn't the point of restful interfaces that they are language agnostic?
mst tbrowder: you want to build stuff? build stuff 12:27
tbrowder: talk about it. show people shiny things.
tbrowder: unmatched} is doing more marketing for perl6 than any amount of your navel gazing "we should support X" discussion will achieve
if you think backendless is a good target, go build support for it
then write some nice blog posts
maybe explain it to unmatched} so he writes some nice blog posts too
unmatched} meh :) 12:28
12:28 pierre_ joined
mst but "someone has to start" just smacks of "I want somebody else to volunteer to do this thing" 12:28
and that ain't how -Ofun works
tbrowder mst: my only audience is here and just hope to spark some interest
mst tbrowder: so spark interest by writing something 12:29
not by telling other people how to spend their spare time
this sort of "somebody else should volunteer to do X because marketing" thing never goes anywhere useful;
12:29 canopus joined
tbrowder don't shoot the messenger, please 12:29
mst also, "because marketing" is a shitty motivation
what
I'm sorry, you said "someone has to start" on behalf of somebody else? 12:30
DrForr Shrug, you've mentioned it. It's not going to go very far until there's a decent ... RPC? web server is up and running, I'm guessing? 12:34
Woodi would realy like to see W3 forum done in Perl6... 12:37
about serverless: they are interesting ay of selling computation power :) probably that's why they do not sell C functions calls... 12:39
El_Che DrForr: I saw you on television today and you were wearing your best suit! 12:41
DrForr Uh? :)
El_Che DrForr: the oscon video's are on o'reilly's safari
DrForr Oh, I thought it was only for OSCON attendees. 12:42
El_Che DrForr: no, you can wait for your big royalty check once it hits the videostores :)
DrForr: it's available for safari subscribers 12:43
DrForr Neato.
El_Che DrForr: www.safaribooksonline.com/library/...491968321/ 12:44
Release Date: July 2016
brandnew
DrForr Hrm, I have a free Safari account...
12:47 lichtkind_ joined, edwinsage joined
El_Che DrForr: is that an oscon perk? 12:47
DrForr Yep.
El_Che nice
12:48 lichtkind__ left
perlpilot Zoffix++ nice post 12:55
moritz can anybody still log in on hack.p6c.org? 12:59
unmatched} moritz: nope. ssh hack.p6c.org just sits there 13:00
13:01 sergot left, dalek joined, ChanServ sets mode: +v dalek, Begi left
moritz ok, rebooted 13:01
13:01 synopsebot6 left, synopsebot6 joined
RabidGravy I don't suppose any one knows Maurice Aubrey (CPAN author)? I want to blag the C part of his DoubleMetaphone module ;-) 13:02
13:05 gnull joined 13:06 parabolize left 13:10 mcmillhj joined 13:14 Sgeo__ left
pmurias tbrowder: isn't backendless intended to replace the backend? 13:15
tbrowder: an as such Perl 6 API to it wouldn't be that usefull 13:16
tbrowder maybe, but I haven't looked into it deeper yet; I will sign up for a free account and see if a p6 interface is possible according to their policies 13:17
unmatched} tbrowder++ 13:19
tbrowder and I can't answer about the value, I just want p6 available wherever I see collections of language-specific APIs
13:21 parabolize joined
pmurias tbrowder: there is a REST API 13:23
having APIs to stuff is good. You never know where someone else will decide to store the data you need ;) 13:24
tbrowder BTW, on my TODO list is working on a p6 interface to the Lego robot (EV3). See the empty repo at github.com/tbrowder/ev3dev-lang-perl6. I'll be happy to give commit priv to anyone who wants to help. It will be some time before I can start on it. 13:25
pmurias: I saw that but I couldn't see low-level access to files and such which I think one needs for complete use of their system. The other langs seem to have that. 13:27
13:28 noreem_ joined 13:30 noreem left
literal m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.map({.key if .value == 2}); say $foo.grep({.value == 2}, :k); 13:30
camelia rakudo-moar 552d9c: OUTPUT«(0 7 2)␤(1 2 3)␤»
literal so, how am I misunderstanding grep() here? :P
13:31 espadrine left
unmatched} literal: you're making the assumption that :k gives you the .key 13:32
literal oh, so it's just an index 13:33
unmatched} ":k Only return the index values of the matching elements in order." (from docs.perl6.org/routine/grep )
literal maybe it should have been called :i and :iv :P
unmatched} It comes from .kv 13:34
13:34 perlawhirl joined 13:35 skids joined
perlawhirl hi perlers... it's been a while 13:36
13:36 holyghost left
unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2} 13:36
camelia rakudo-moar 552d9c: OUTPUT«[0 => 2 7 => 2 2 => 2]␤»
unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}.keys
camelia rakudo-moar 552d9c: OUTPUT«0..2␤»
unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say eager $foo.categorize(*.value){2}.keys 13:37
camelia rakudo-moar 552d9c: OUTPUT«(0 1 2)␤»
unmatched} oh
m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}».key
camelia rakudo-moar 552d9c: OUTPUT«[0 7 2]␤»
unmatched} there we go
13:38 FROGGS joined
pmurias tbrowder: what do you mean by low level access to files? 13:38
tbrowder I meant access to files--I shouldn't have said "low level." 13:39
unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.map({.key if .value == 2}); say $foo.grep(*.value == 2)».key; 13:40
camelia rakudo-moar 552d9c: OUTPUT«(0 7 2)␤(0 7 2)␤»
unmatched} literal: ^ another way
literal unmatched}: ah, indeed
pmurias tbrowder: backendless.com/documentation/file...erview.htm
perlawhirl I was using Net::Telnet:from<Perl5> the other day. A Net::Telnet object has a .print method, but Perl 6's .print takes precedence. How can I call my object's .print method?
13:40 Rawriful joined 13:41 Rawriful left
unmatched} perlawhirl: I'd say that's a bug/limitation in Net::Telnet 13:41
El_Che moritz: I logging in
unmatched} perlawhirl: errr... in Inline::Perl5
m: class Foo{ method print { say "works fine" } }; Foo.new.print
camelia rakudo-moar 552d9c: OUTPUT«works fine␤»
vcv m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.grep(*.value == 2).Hash.keys
camelia rakudo-moar 552d9c: OUTPUT«(0 7 2)␤»
El_Che moritz: do you want me to check something?
13:42 Rawriful joined
jdv79 unmatched}: entertaining post. thanks! 13:42
perlawhirl hrm... yeah, maybe. luckily i could work around by using the .cmd method. the only difference is .cmd returns the output, .print does not... but was bringing it up partly so people are aware of that particlar limitation
13:43 ptolemarch joined
unmatched} perlawhirl: it's worth reporting it on the Inline::Perl5's repo 13:43
perlawhirl i wonder if Inline::Perl5 can check the local object's method first before falling back to perl 6 core methods
unmatched} buggable: Inline::Perl5
perlawhirl yeah will do
unmatched} buggable: module Inline::Perl5
tbrowder pmurias: good for you! Now a p6 module can be written to handle that. I'll still ask about a more formal interface.
unmatched} Stupid robot
huggable: module Inline::Perl5
jdv79 maybe they're sleeping 13:44
perlawhirl probably dreaming of electric sheep 13:46
edwinsage So, double angle brackets are a thing in perl6... how do I type them? 13:47
DrForr << >> :)
edwinsage DrForr: Ok, so I can use two characters, and don't need the unicode single character? 13:48
perlawhirl in vim, if you have digraphs enabled: Ctrl-k>>
DrForr Yep.
perlawhirl but i use them so often i've remapped Shift-Alt-> to »
unmatched} edwinsage: you don't need if you don't want to. All fancy unicode operators have an ASCII (what we call Texas) variant: docs.perl6.org/language/unicode_texas.html
edwinsage: and on my box I type it with Compose key, by pressing RWin,>>. On my home box, I have it bound to one of the extra keys on my keyboard :) Lots of ways 13:49
mspo «» are easy to type on osx
option + \ and option + | (same key) 13:50
it helps if you open keyboard preferences and click "Show Keyboard, Emoji, & Symbol Viewers in menu bar" 13:51
then you can get a visual keyboard with a lot of important symbols for reference
m: say π * 10 13:52
camelia rakudo-moar 552d9c: OUTPUT«31.4159265358979␤»
mspo although why $, £, and € are all on different keys, I'll not understand 13:53
edwinsage Ok, thanks. I don't know if I'll bother with setting up the compose key and learning the commands, but it's good to know I can just use >>.\
mspo chorded marks are difficult to get used to: è ü 13:55
14:00 wamba left 14:02 sufrostico joined 14:15 yuyy joined, yuyy left 14:16 danaj joined 14:19 movl joined 14:21 navy joined
tbrowder ref backendless: got account, tried to ask question, but site wouldn't accept it--I'm kissing them off for now 14:21
14:22 navy left
dalek line-Perl5: e7b7332 | niner++ | Makefile.in:
Don't hard code the compiler executable's name into the Makefile
14:23
14:24 FROGGS left 14:31 khw joined
rjbs In deference to American English writing, I propose that a semicolon in the terminal position of a string be allowed to terminate a statement. 14:38
my $x = "This is a statement;"
I look forward to this being applied.
14:38 acrussell joined
mst additionally, in webster-mode, variable names containing the letter u will be banned 14:40
DrForr Custom slang(s), anyone?
14:42 mcmillhj left
timotimo thank you for your input, rjbs 14:43
moritz we will take it under considering
... when deciding who gets to face the wall first when the revolution comes :-) 14:44
unmatched} :D
14:45 mcmillhj joined
dalek line-Perl5: 3acaa28 | niner++ | / (5 files):
Fix Perl5 classes unable to override Mu's methods

Even Mu's methods trump fallbacks, so we have to explicitly pass them through to the marshalled Perl 5 object or package, same as we do with Any's methods. As Mu's methods are integral to Perl 6's workings, we cannot just wrapp all of them.
Instead, only pass through <note print put say split> as those should be safe.
14:45
nine perlawhirl: ^^^ 14:46
14:47 perlawhirl left, itaipu left 14:48 zacts joined 14:51 jkramer joined
jkramer Ahoy! 14:51
unmatched} \o
jkramer Does anything speak against having a 'unit module Foo' that has some exported sub inside but also a 'class Foo'? 14:52
14:52 xiaomiao joined
moritz if you want to create a class Foo::Foo, why not? 14:53
or you might want to write a 'unit class Foo;' and export subs from it
dalek line-Perl6: 7d667b8 | niner++ | Perl6.xs:
Fix compile error caused by MoarVM change

This tracks the changes to src/moar.c in MoarVM commit 824748db35636f2bd989f201705569f57f6cfc60
line-Perl6: 83c9298 | niner++ | / (2 files):
Version 0.06
jkramer I just wondered if there's a conflict of the module and class name or something or if there other design choices against it
moritz jkramer: no, it's just is if you wrote module Foo { class Foo { } } 14:54
so from the outside, the class is available as Foo::Foo
I don't know if that is what you want
jkramer Ah, no that's not what I want. I'll just put the subs inside the class and export them. It just seems weird since they're not exactly related to that particular class. 14:55
Just some helpers with shortcuts for the user
moritz then what do they do in that namespace? :-)
jkramer Well they're related in some way. :) I have a Shell::Application class which the user would usually define Shell::Application::Option objects for, I just want to offer some subs to make creation of those objects shorter 14:56
So instead of Shell::Application::Option.new(:long('debug'), :short('d'), :type(Shell::Application::Option.Flag)) you'd write option-flag('d', 'debug') 14:57
That kind of stuff. And since Shell::Application is the main class you'd be using in your scripts I want to export the subs from there 14:58
unmatched} jkramer: I'd create a multi new method that can take that shorter way 14:59
14:59 noreem_ left
jkramer unmatched}: Yeah maybe, but even Shell::Application::Option.new seems unconvenient for me :) 14:59
Well I'll think of something
unmatched} Then rename it to Shell::App::Opt :)
jkramer :D 15:00
nine jkramer: I see nothing wrong from having those constructor subs in your class 15:01
jkramer Yeah, I'll try that see how it "feels" ;)
15:01 acrussell left 15:02 mcmillhj left
jkramer What's the name for the catch-all argument has? %*something? 15:03
15:03 itaipu joined
jkramer Or do I just name it myself? sub foo(*%everything) ? 15:04
15:05 wamba joined
unmatched} jkramer: there's @_ and %_ 15:05
[Coke] why do we have a bunch of docu tickets for things that don't exist?
unmatched} m: sub foo { dd @_; dd %_}; foo |<foo bar ber>, :42meow
camelia rakudo-moar 552d9c: OUTPUT«["foo", "bar", "ber"]␤{:meow(42)}␤»
[Coke] e.g. github.com/perl6/doc/issues/811
seems like we shouldn't bother tracking something in docs that isn't part of the spec. 15:06
unmatched} m: sub foo (*@pos, *%named) { dd @pos; dd %named}; foo |<foo bar ber>, :42meow
camelia rakudo-moar 552d9c: OUTPUT«["foo", "bar", "ber"]␤{:meow(42)}␤»
unmatched} And you can do that too. Those are called slurpies and the * itself is called a splat
jkramer Hmm, I've seen *%_ too - what's the difference between that and %_? 15:07
Ah nevermind :D
*%_ is the signature, %_ the name
unmatched} m: sub foo (|c) { dd c}; foo |<foo bar ber>, :42meow
camelia rakudo-moar 552d9c: OUTPUT«\("foo", "bar", "ber", :meow(42))␤»
unmatched} And that's another way. A Capture. Handy when you want to pass [a portion of] the args to another routine 15:08
[Coke] tags them all NOTSPECCED
15:08 webstrand left
unmatched} m: sub foo ($meow, |c) { dd [$meow, c]}; foo |<foo bar ber>, :42meow 15:08
camelia rakudo-moar 552d9c: OUTPUT«["foo", \("bar", "ber", :meow(42))]␤»
unmatched} And a bunch of those MONKEY pragmas are just reserved for future use. 15:09
[Coke] if it's in roast and just is reserved, that's fine, we shoudl doc that. 15:10
if it's not in roast, shouldn't be in docs.
15:11 webstrand joined 15:13 mcmillhj joined
[Coke] (if it's in the compiler, but not in roast, then adding it to the docs is ok, but it should come with a caveat.) 15:15
jkramer How do I pass on %_ to a sub that takes only named parameters? Something like foo(|%_)? 15:16
unmatched} yeah' 15:17
jkramer \o/ 15:18
15:18 mcmillhj left 15:24 gblade joined
gblade p6: my $p = '.B'; my @a = <A AB B>; say @a.grep: /$p/ 15:25
camelia rakudo-moar 552d9c: OUTPUT«()␤»
unmatched} p6: my $p = '.B'; my @a = <A AB B>; say @a.grep: /<$p>/ 15:26
camelia rakudo-moar 552d9c: OUTPUT«(AB)␤»
gblade Thank you, what are the <>?
gregf_ m: my $p = '.B'; say /<$p>/ 15:28
camelia rakudo-moar 552d9c: OUTPUT«/<$p>/␤»
unmatched} No idea. It's just something you use for, say, character classes <[abc]> or tokens <foo> or noncapturing tokens <.foo> or literal regexes in variables <$foo>
15:28 mcmillhj joined
gblade Thanks again, It was confusing because $p = AB was working as I'd expect 15:29
unmatched} yeah, 'cause then it was matching $p literally, as a string, not as a regex expression 15:30
15:35 harmil_wk left
sena_kun Is there a way to pretty print perl 6 value natively(without any libraries)? Or what is the simpliest library to do so? 15:35
timotimo Data::Dump::Tree is pretty amazing 15:36
15:36 splatt9990 joined
unmatched} sena_kun: there's dd from which you can get some milage 15:36
m: dd [<foo bar>, :42meow] 15:37
camelia rakudo-moar 552d9c: OUTPUT«[("foo", "bar"), :meow(42)]␤»
sena_kun timotimo, thanks.
unmatched}, I'm not sure it helps, but I'll try, thanks.
timotimo dd doesn't give you pretty whitespace, though 15:38
unmatched} Was there a decision reached on how to provide program's output in the docs? What is it? 15:39
15:39 pierre_ left
sena_kun unmatched}, afaik - no. Currently two styles are supported: # some and # OUTPUT: «some␤», if I'm correct. 15:42
15:48 NEveD joined
unmatched} sena_kun: I have 5-line output with about 50 chars per line.... 15:51
15:53 zacts left
sena_kun unmatched}, you can use any style with continuation after newline. Something like # line\n # line2\n # line3\n, etc. Or # OUTPUT: «line1␤\n #line2, etc». Though second option is a bit worse. 15:53
unmatched} m: gist.github.com/zoffixznet/a1a8a50...13a0bcc6a6 15:56
camelia rakudo-moar 715b82: OUTPUT«1 from thread 3 received after 1.00412928 seconds␤2 from thread 4 received after 2.01012857 seconds␤3 from thread 5 received after 3.0120140 seconds␤4 from thread 6 received after 4.0123437 seconds␤5 from thread 7 received after 5.0125078 seconds␤»
unmatched} m: gist.github.com/zoffixznet/f2cf979...25939ee12d 15:57
camelia rakudo-moar 715b82: OUTPUT«5 from thread 7 received after 0.00461471 seconds␤»
15:57 wamba left
unmatched} Dafuq? The only difference is line 7, where I changed sleep $v to sleep 5 - $v 15:57
Oh my close condition is messed up... tsk tsk
15:58 TimToady left
timotimo close conditions of the third kind? 15:58
gblade @unmatched: So back to the /<$p>/ if the $p has sigspaces how do I enable them? rx:s/<$p>/ seems to only enable them for the 'outer' regex 15:59
p6: my $p = 'A B'; my @a = 'A','A B','AB','B'; say @a.grep: rx:s/<$p>/
camelia rakudo-moar 715b82: OUTPUT«Potential difficulties:␤ Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing)␤ at /home/camelia/EVAL_0:1␤ ------> 3anon regex { A7⏏5 …»
unmatched} dunno 16:00
gblade okay, thanks 16:01
16:01 TimToady joined 16:02 Tonik joined
unmatched} m: my $p = 'A B'; $p = rx:s/<$p>/; my @a = 'A','A B','AB','B'; say @a.grep: rx:s/<$p>/ 16:03
nice, eh?
camelia rakudo-moar 715b82: OUTPUT«Memory allocation failed; could not allocate 6100072 bytes␤» 16:04
unmatched} m: my $p = 'A B'; $p = rx:s/$p/; my @a = 'A','A B','AB','B'; say @a.grep: rx:s/<$p>/
camelia rakudo-moar 715b82: OUTPUT«Memory allocation failed; could not allocate 6262960 bytes␤» 16:05
unmatched} m: my $p = 'A B'; my $p1 = rx:s/$p/; my @a = 'A','A B','AB','B'; say @a.grep: rx:s/<$p1>/
camelia rakudo-moar 715b82: OUTPUT«(A B)␤»
16:05 Actualeyes left
lizmat 40MB/sec on my machine :-) 16:05
16:06 Actualeyes joined
b2gills m: my $p = 'A B'; $p ~~ s:g/»\s+«/<.ws>/; my @a = 'A','A B','AB','B','A B'; say @a.grep(rx:s/<$p>/).perl # you could do the sigspace modifications yourself 16:08
camelia rakudo-moar 715b82: OUTPUT«("A B", "A B").Seq␤»
unmatched} What are » and « there for? 16:09
b2gills so it doesn't match at the beginning or end, but aren't necessary for this example 16:10
unmatched} Ah, it's this docs.perl6.org/language/regexes#in...d_boundary
b2gills I might be wrong about how it works, never used them before 16:11
I should point out that you should **never do this for untrusted inputs** 16:12
dalek line-Perl5: de59782 | niner++ | lib/Inline/Perl5.pm6:
Fix bogus error in Inline::Perl6 on perl without MULTIPLICITY

Regression by commit 81243ea6518267be718bf5e092e9c09b9a36f281
Thanks to Ævar for the report! Fixes Inline::Perl6 GH #2
16:13
16:14 zakharyas left
dalek line-Perl5: e9a5e78 | niner++ | META.info:
Version 0.9
16:15
c: c06c27a | (Zoffix Znet)++ | doc/Language/concurrency.pod6:
Better example for Channel.poll

Closes #751
16:25
awwaiid is there a way to make the output of dd prettier -- whitespace and indented and such? 16:31
sena_kun awwaiid, Data::Dump::Tree. 16:32
dalek c: 3566442 | (Zoffix Znet)++ | doc/Language/regexes.pod6:
Document that « and » can be used instead of << and >>

  b2gills++
16:34
16:37 andreoss joined
awwaiid sena_kun: that is a bit too pretty (but nice) -- I'm looking for something that is still more like .perl 16:38
andreoss can i format a hash like this?
my %h = foo => 'hi' , bar => 8; %h.fmt("%30s<foo> %10d<bar>")
sena_kun awwaiid, sorry, then I'm useless.
awwaiid awww 16:39
not useless! just not what I'm looking for atm :)
andreoss m: my %h = a => 1, b => 3; %h.fmt("%d => %s").say; 16:40
camelia rakudo-moar 715b82: OUTPUT«Directive d not applicable for type Str␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in any panic at /home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm line 1␤␤»
andreoss m: my %h = a => 1, b => 3; %h.fmt('%d => %s').say;
camelia rakudo-moar 715b82: OUTPUT«Directive d not applicable for type Str␤ in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.setting.moarvm line 1␤ in any panic at /home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm line 1␤␤»
perlpilot m: my %h = a => 1, b => 3; %h.fmt('%s => %s').say; 16:41
camelia rakudo-moar 715b82: OUTPUT«a => 1␤b => 3␤»
sena_kun awwaiid, surely. (:
perlpilot not quite what you wanted
16:41 mcmillhj left
perlpilot m: my %h = a => 1, b => 3; %h.fmt('%s => %05d').say; 16:42
camelia rakudo-moar 715b82: OUTPUT«a => 00001␤b => 00003␤»
16:43 mcmillhj joined 16:44 sno left
dalek c: 22d46af | (Zoffix Znet)++ | doc/Language/concurrency.pod6:
Fix incorrect comment

  MasterDuke++
16:44
andreoss perlpilot: what if i want refer to value directry? 16:45
by key
awwaiid sena_kun: the more I look at this the more I'm finding it useful :) 16:46
16:48 acrussell joined
perlpilot andreoss: um .... 16:48
m: my %h = a => 1, b => 3; sprintf("%d => %s", %h<b a>); 16:49
camelia ( no output )
perlpilot m: my %h = a => 1, b => 3; say sprintf("%d => %s", %h<b a>);
camelia rakudo-moar 715b82: OUTPUT«3 => 1␤»
16:49 FROGGS joined
perlpilot er, that muddled, but you can mix it up how you want it. 16:49
perlpilot lunch &
sena_kun awwaiid, currently I'm trying to find needed value in the pod value output, it produces for me about 7400+ lines of text. And it's still pretty easy to navigate. The only bad side of Data::Dump::Tree I've find is that you cannot send the output to some log file.
m: my @a = <1>; say @a[0]; say @a[0][0]; 16:50
camelia rakudo-moar 715b82: OUTPUT«1␤1␤»
sena_kun m: my @a = <1>; say @a[0]; say @a[0][0]; say @a[0][0][0];
camelia rakudo-moar 715b82: OUTPUT«1␤1␤1␤»
sena_kun This feature is weird.
lizmat m: my $a = 42; say $a[0][0][0] 16:51
camelia rakudo-moar 715b82: OUTPUT«42␤»
lizmat sena_kun: every scalar value can be considered a 1 element array
sena_kun lizmat, aaaaaah. Okay. Thanks!
16:52 splatt9990 left
lizmat m: my $a = 42; say $a.elems 16:52
camelia rakudo-moar 715b82: OUTPUT«1␤»
lizmat afk& 16:54
16:55 zacts joined
dalek c: aacd49d | (Zoffix Znet)++ | doc/Type/Routine.pod6:
Document Routine.cando

Fixes #749
16:56
16:56 edehont joined 17:05 araujo joined, araujo left, araujo joined 17:06 araujo left, araujo joined, araujo left, araujo joined 17:08 cdg joined 17:14 golee left
avar nine: Thanks for those bugfixes, trying to rebuild with those patches 17:14
17:15 firstdayonthejob joined 17:19 mcmillhj left 17:23 mcmillhj joined 17:27 mcmillhj left
nine avar: Thanks for playing guinea pig :) 17:30
17:34 edehont left, splatt9990 joined 17:35 mcmillhj joined, cdg left 17:36 cdg joined 17:37 gblade left 17:40 mcmillhj left 17:43 pierrot left 17:47 itaipu left 17:48 shlomif joined, acrussell left 17:49 rindolf left 17:52 mcmillhj joined 17:53 Rawriful left 17:57 mcmillhj left 17:58 margeas left, shlomif is now known as rindolf
avar nine: Does this work for you without a segfault: 18:04
perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q[use Inline::Perl5; my $p5 = Inline::Per
uh
vcv m: say <0 0 1 2 2 5 6 7 7>.Bag.grep(*.value==2).Hash.keys
camelia rakudo-moar 715b82: OUTPUT«(0 7 2)␤»
avar perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q[use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q[print "hi"])])'
m: use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q[print "hi"]); 18:05
camelia rakudo-moar 715b82: OUTPUT«===SORRY!===␤Could not find Inline::Perl5 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:…»
avar Segfaults in p5_call_p6_method (cv=0x618be0) at p5helper.c:642
But this works! 18:06
perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q["hi".say])'
hoelzro unmatched}++ # that sourcery module looks really handy 18:11
18:12 edehont joined, wamba joined 18:13 zacts left
geekosaur avar, I'd imagine having multiple copies of perl loaded into the executable would cause plenty of confusion, especially if somehow the outer and inner ones are not identical 18:17
18:17 Actualeyes left 18:18 sno joined
geekosaur also I suspect there are questions of when (not if!) Inline::Perl5 needs to create its own ithread. probably not on every use, since you likely want uses to interoperate... but making that inner perl5 share an interpreter with the outer one WILL fail 18:18
18:19 edehont left 18:21 adu joined
dalek c: 5c1a6f0 | Altai-man++ | htmlify.p6:
This change completely solves the problem of dead links in a 'From ' field on generated routine/ pages.
18:22
sena_kun Ah. Double-checking of the grammar before pushing is good. 18:28
avar geekosaur: Yeah, makes sense, but I can't see why that case wouldn't work, see github.com/niner/Inline-Perl6/issues/2 18:32
18:32 AlexDaniel joined
avar geekosaur: I don't get why having the inner and outer interpreters share the same instance would fail, for the reasons outlined in that issue 18:33
geekosaur after I said that I was trying to figure out if current perl5 is actually smart enough to have the interpreter in a safe state at that point... 18:34
(while remembering that MULTIPLICITY/ithreads exists because there are so many cases where it is *not* safe) 18:35
avar Like I commented on in the issue, the exact thing the perl6 embedding would have to do is done by a lot of XS modules, so I don't see why not 18:36
i.e. doing perl5 -> xs -> call_pv(<sub that evals some p5 code) works
so why not perl5 -> xs -> perl6 -> p5::call_pv(<...>)
nine geekosaur: there are no threads involved whatsoever 18:38
geekosaur ithreads is not necessarily about threads. it's about separate interpreters 18:39
never mind, today is not the day for comprehension I guess
nine avar: without multiplicity, I'd use Inline::Perl5.default_perl5 instead of .new on the Perl 6 side 18:40
ufobat timotimo, remember the piece of code from tomorrow, you dont need to do anything special, its sufficient to remove the "inner" react block
nine avar: otherwise it will try to create a new Perl 5 interpreter
geekosaur (ithreads is about "perl 5's guts are not reentrant", far more than it is about threads)
avar $ perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q[use Inline::Perl5; my $p5 = Inline::Perl5.default_perl5; $p5.run(q[print "hi\n"])]
hi 18:41
sweet, that works!
ufobat timotimo, i changed whenever $response -> $buf { ... } to $respons.tap(-> $buf {...}); i am acually wondering what's the difference
nine geekosaur: but callbacks into Perl 5 are no issue at all. Otherwise Perl 5's Inline::Python had a massive problem
18:47 labster joined
nine avar: I assumed that one would want to use a Perl 6 model that may depend on a Perl 5 module via Inline::Perl5 18:47
avar the actual use-case for this is using perl5 to bootstrap perl6 modules, because perl5 is already embedded 18:50
E.g. running perl6 under the uwsgi webserver, or writing perl6 irssi plugins 18:51
So right now I have this working: gist.github.com/avar/1e4fdb8cead66...21abfe21fe
So a setup like this is p5->p6 by default, so p5->p6->p5 has to work if you want to use any p5 modules 18:53
But anyway, this seems to work for now with .default_perl5
nine Yes, that's what I had in mind
avar: note that usually, you'll not even use .default_perl5 in Perl 6 code but just use Foo:from<Perl5>; 18:54
Inline::Perl5 tries to stay politely in the background 18:55
19:00 edehont joined
nine avar: and use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q[print "hi"]) can be written shorter: EVAL q[print "hi"], :lang<Perl5>; 19:05
19:06 edehont left
AlexDaniel . 19:07
unmatched} : 19:08
19:09 brrt joined
AlexDaniel 19:13
hoelzro 19:14
unmatched} 19:15
19:15 darutoko left
unmatched} 19:15
geekosaur
AlexDaniel 19:16
19:17 splatt9990 left
AlexDaniel not sure if braille should be allowed in this game :) 19:17
hoelzro then I was first to cheat =/ 19:18
19:18 labster left 19:26 Nope_ joined
unmatched} Is there a way to specify prereqs based on compiler version? For example, I need HTTP::UserAgent, but only if the user is running Rakudo version before v2016.07.1.128.g.715.b.822 19:28
19:28 Ybgh joined 19:30 Nope_ left
kalkin-_ m: say $*PERL; 19:32
camelia rakudo-moar 715b82: OUTPUT«Perl 6 (6.c)␤»
19:32 spider-mario joined, labster joined
kalkin-_ m: say $*VM; 19:32
camelia rakudo-moar 715b82: OUTPUT«moar (2016.07.16.g.85.b.6537)␤»
kalkin-_ unmatched}: I don't know about the proper way to do it, but you could just use $*VM ... 19:33
unmatched} kalkin-_: the proper way is $*PERL.compiler.version... but what do I put in the META file? 19:34
I guess I could error out and tell the user to install the extra modules, but I'm wondering if there's some automagical way to do so
kalkin-_ unmatched}: hmm i see
19:35 Ybgh left, cdg left, cdg joined, edehont joined 19:37 kalkin-_ is now known as kalkin- 19:38 Ybgh joined, Tonik left, Ybgh left 19:40 cdg left
nine unmatched}: I wonder why you need HTTP::UserAgent only on old rakudos? 19:42
unmatched} nine: haha, yeah, it's a weird case. It's for CoreHackers::Sourcery where on older Rakudo I have to connect to GitHub to fetch full source and adjust line number, but on newer Rakudo the original line number is correct from the start, so I don't need to connect anywhere 19:43
Due to this: github.com/rakudo/rakudo/commit/715b822bfd
19:44 brrt left 19:48 edehont left 19:50 TEttinger joined
kalkin- It would be nice if the perl6.org would redirect always to http 19:51
AlexDaniel why?
sena_kun kalkin-, arguments? 19:53
kalkin- just asec telephone
19:54 edehont joined
moritz fwiw one of the reasons perl6.org doesn't redirect to HTTPS is that the test cases for LWP::Simple use it, and they don't work with HTTPS redirects :-) 19:54
so, anybody who wants a HTTPS redirect please first change those tests
19:56 andreoss left 19:58 edehont left 19:59 rindolf left 20:04 brrt joined
pmurias .tell konobi do you have any ideas what (program):1755 might refer to in a profile I'm getting from v8? 20:04
yoleaux pmurias: I'll pass your message to konobi.
20:05 rindolf joined
sena_kun Folks, who are interested in the docs, please, look at github.com/perl6/doc/issues/794(who still didn't) - I need a bit more confidence that my (future) changes are safe and approved. 20:06
20:09 harmil_wk joined 20:11 zacts joined 20:12 adu left 20:16 firstdayonthejob left
harmil_wk On the docs issue, I do think that we should have a transformation on signatures to some much more readable form. The major thing that I'd want is for "multi method fmt(Pair:D:) returns Str:D {}" to turn into "Pair instance method fmt()\n\tReturns Str:D 20:16
That is, it makes much more sense to tell the user things like "this is an instance method" than to say "Pair:D:" 20:17
mspo useful examples are hugely benefitial in docs
20:18 cdg joined
harmil_wk USEFUL examples, yes. But just dumping raw signatures into docs isn't an example, and neither is foo(STRING, NUMBER, THINGY) 20:18
mspo right
harmil_wk I absolutely agree that there are many cases where a real example is going to be needed. 20:19
20:19 zacts left
pmurias examples are usefull, duplicating stuff in some weird syntax not so much 20:19
sena_kun harmil_wk, the main thing is not the signatures itself, but the "usage" sections with a fake ones. A proposal is to replace them with actual examples. Nobody wants to remove/change real signatures, I suppose.
20:20 harrison_ joined
DrForr WEll, the "foo(STRING, NUMBER,...)" is also Perl 5 'perldoc -f foo' convention. Not that you can't have both, but it's useful to have a quick summary at the start of the doc. 20:20
mspo I think C in a Nutshell from oreilly was a great book for usage example examples
20:20 mst is now known as slapdrone 20:21 slapdrone is now known as mst
DrForr . o ( Olfres? Is that you? ) 20:22
pmurias DrForr: the current foo(STRING, NUMBER, THINGY) ones offer no reall advantages offer the Perl 6 syntax signatures
mspo books.google.com/books/about/C_in_...shell.html check out chapter 17
20:23 cdg left
pmurias they look simpler yes, but for some of them I don't have a clue wtf THINGY is 20:23
20:23 harrison_ left
pmurias hyperlinks on weird looking stuff like :D would help beginers 20:23
perlpilot re docs ... I think right now I fall in the camp of people who would prefer real, working examples instead.
(FWIW)
20:24 MorayJ joined
DrForr I was more stating that they fit on one line, whereas "working examples" are great especially for the copy-n-past crowd, but they're not always as legible. 20:24
harmil_wk sena_kun: the usages are only necessary because the signatures are hard to read. I think if you fix that, you fix the whole thing. Updated the thread there with some details. 20:26
20:26 firstdayonthejob joined
pmurias what's Bar:D: ? 20:26
DrForr A defined Bar type. 20:27
harmil_wk Instance of type Bar must be defined, no?
as in method foo(Bar:D:)
DrForr m: my Bar:D $d;
camelia rakudo-moar 715b82: OUTPUT«5===SORRY!5===␤Type 'Bar' is not declared. Did you mean 'Bag'?␤at <tmp>:1␤------> 3my Bar:D7⏏5 $d;␤Malformed my␤at <tmp>:1␤------> 3my Bar:D7⏏5 $d;␤ expecting any of:␤ pair value␤␤»
DrForr m: my Int:D $d;
camelia rakudo-moar 715b82: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤Variable definition of type Int:D requires an initializer␤at <tmp>:1␤------> 3my Int:D $d7⏏5;␤ expecting any of:␤ constraint␤»
ugexe different from Bar:D: (trailing :) 20:28
DrForr Oh, missed the trailing : there. /me looks for his bifocals.
harmil_wk m: class Bar { method foo(Bar:D:) {} }
camelia ( no output )
20:29 edehont joined
perlpilot note you can also have class Foo { method foo(Bar:D:) { } } # :) 20:29
ugexe m: class Bar { method foo(Bar:_:) {} } # >:)
camelia ( no output )
harmil_wk I think the english for that is definitely "Bar instance method foo"
geekosaur with the trailing : it means it's an explicit invocant
pmurias m: class Bar { method foo(Bar:D $self:) {...} } 20:30
camelia ( no output )
harmil_wk geekosaur: Yes, that's my point. Rather than just barfing the signature into the docs, I think we want some English there. That obviates most examples and makes it very clear where we actually need a good example. 20:32
sena_kun Firstly, not everywhere we have a raw signature. Pretty much of them have named variables, so it's a bit better - such as "method does(Mu $type)", etc. You can immideately say it's a type. Secondly, it's not the signatures fault to be strange in some places. It's programming, not some English lesson. People should be used to symbols, not words. Clear and short signature is much more readable then three sentences of text. 20:34
moritz the problem with English is that it tends to be less precise and expressive than the signature DSL
ugexe eh, im not a fan of seeing "instance method of blargh" everywhere
20:35 labster left
perlpilot moritz: And we already have lots of English just below to explain things. 20:35
ugexe: me either
jnthn I think the sooner people learn to read signatures, the easier a time they'll have with Perl 6. Maybe one way to do it would be to have something where you hover over things in a signature and it has a short plain-text explanation?
ugexe its like s/$/SCALAR VARIABLE/ 20:36
20:36 edehont left
pmurias +1 hovering explanations 20:37
jnthn Then it's not in the way of people who can already read them - who can then enjoy the precision - but still easily accessible.
20:37 labster joined
perlpilot Maybe we need Signature::Explain (in the style of YAPE::Regex::Explain, only better :) 20:38
sena_kun jnthn, it can be a new, quite a big issue, but I'm agree with you in this point. What's your opinion about "Usage" blocks?
brrt i wonder if there is a metamodel way to create wraparound methods? 20:39
pmurias +1 real examples
-1 "Usage" blocks with the signature reworded in unclear pseudocode
jnthn sena_kun: One of the thing I like most about CPAN is the "Synopsis" section that quickly shows you a couple of key, concrete, usage examples. I think that's the ideal kind of thing for a "usage" example. 20:40
brrt preferably with nice syntax (hey masak, how far along are those macros? :-P)
masak what I love about CPAN's USAGE blocks is that they are real code, often runnable directly after a copy-paste
hoelzro +1 SYNOPSIS
masak oh, right. SYNOPSIS, not USAGE
jnthn brrt: method foo() { ...before...; callsame(); ...after... } ?
brrt: I did once write a MOP module that iirc gave you "is before" or "is after" traits too 20:41
brrt hmmm... does that work in the context of autogenerated BUILD methods?
that would work
how'd you implement that?
jnthn Couple of traits and subclassing ClassHOW, iirc :) 20:42
It's probably in a talk slide somewhere. :)
20:44 pierrot joined
jnthn brrt: Aspects example at the end of jnthn.net/papers/2012-gpw-meta-programming.pdf is at least related :) 20:44
geekosaur spots "hovering explanations" in scrollback and flashes to what-if.xkcd.com :) 20:47
harmil_wk Actually, I'd argue that one of the real problems is that "method foo(Bar:D:) returns Str:D" is probably more common usage than "method foo() returns Str" at this point and this violates the huffmanization principle. 20:48
20:51 pierrot left, skids left
brrt cool, thanks 20:52
moritz harmil_wk: then that's something you should fix at the language level 20:53
(and the hard part is to not make it too verbose or obscure to create constructors or potentially static methods) 20:54
note that the specs also contain the foo(:D:) shortcut for a defined invocant, but rakudo doesn't implement it yet 20:55
and I don't want to use that shortcut in the docs before it works in rakudo
sena_kun I always thought that ":D" and ":U" are a cool and great features of Perl 6. We can't actually throw it away(lol), because someone may think it's too hard to read. 20:57
20:59 edwinsage left, MorayJ left
moritz I don't think it's about throwing them away; it's more about having defaults that are less verbose 20:59
and have less clutter, more importantly
I agree that the clutter in the docs (and in tightly written code) is a problem 21:00
21:00 brrt left 21:02 trnh joined, bronco_creek joined
bronco_creek o/ p6ers 21:03
hoelzro o/ bronco_creek 21:04
bronco_creek I' m having trouble installing/using a module. Panda says that it is already installed, but when I run my program, it is not found in \rakudo\share\perl6\site etc. Any suggestions? 21:06
21:07 pierrot joined
Zoffix bronco_creek, try to install it with panda --force install Your::Module 21:08
bronco_creek, how did you get that panda? 21:09
nine bronco_creek: do you use rakudobrew? 21:12
bronco_creek Zoffix - force worked. Thanks! 21:13
Use, the force...
sena_kun AlexDaniel, about your last post. I think, for the people who are already good with a code signatures, they are good. For the people who are still not, there are English descriptions and examples(hopefully). Also, original perldoc doesn't have a function signatures, that's why it uses such syntax to explain things(as far as I see it). For example, look at perldoc.perl.org/functions/getc.html - without a first string you won't be able 21:14
to predict how many arguments can/should be passed.
21:14 Zoffix left
bronco_creek BTW - I saw another issue recently. I had just installed the latest rakukdo star. My IT support guy was troubleshooting another issue, and noticed that the path for rakudo had the slashes going the wrong way (for Windows). Could be a problem with the .msi for rakukdo* ? 21:16
21:17 margeas joined
kalkin- back to the HTTPS topic. Sorry for being afk. 21:19
moritz: thank you for the hint
AlexDaniel, sena_kun: so that other people don't see by accident what I'm doing at perl6.org, which modules I'm interested in. I.e I might be looking at some module via tor on PC and later on my mobile I want to check something, there is a possibility deanonymizing me 21:21
AlexDaniel kalkin-: oh, so you meant “https” 21:22
kalkin- yeah https, sorry
AlexDaniel kalkin-: then there are probably no problems with that other than one mentioned by moritz. At least, that's what I hope 21:23
I mean, we already redirect on docs
so far nobody complained, and after all I can't see why wikipedia can do that but we can't :) 21:24
well, the only issue is that letsencrypt certs don't work that well on windows XP or something… 21:25
kalkin- AlexDaniel: Wikipedia does it? May be I'm not noticing this, because I use https everywhere.
AlexDaniel but I doubt somebody would notice that if I didn't mention it 21:26
kalkin- actually as far as I see LWP::Simple only uses www.perl6.org. So modules can be also auto redirected
sena_kun AlexDaniel, did you notice my message? # Just a bit worried. 21:29
nine AlexDaniel: I somehow cannot imagine Windows XP users being on the bleeding edge of programming languages and interested in Perl 6 ;)
kalkin- lol :) 21:30
AlexDaniel sena_kun: the one on 14:39 ?
sena_kun: the one on *:14:39 ? :)
sena_kun AlexDaniel, 12:32? 21:31
jnthn nine: Being bleeding edge and intersted in Perl 6 never saved me from being dumped into a stupid corporate environment with old everything :P
sena_kun Ah.
AlexDaniel sena_kun: oh wow, either I didn't or we should synchronize our clocks
sena_kun AlexDaniel, it may be. Anyway, the long message about the 'Usage' pseudo-signatures. 21:32
masak nine: at least Windows XP users show remarkable consistency and patience. :D
kalkin- Does Rakudo even officially support Windows XP?
masak especially considering things like starecat.com/content/wp-content/upl...s-3-11.jpg 21:33
sena_kun AlexDaniel, should I repost it in private messages? 21:35
jnthn kalkin-: It's more a VM-level issue, really. The only dependency I know of that'd block MoarVM building there is libuv, and libuv supports back to WinXP with SP2, iirc. 21:36
kalkin-: That said, I'm not aware of anyone doing testing/development there, so "officially no" I guess :)
AlexDaniel sena_kun: Well, I was just not sure what to answer. I just nodded a couple of times and didn't really find anything useful to add
sena_kun AlexDaniel, ah, good then. (:
kalkin- jnthn: ahh i see. thanks 21:38
sena_kun Okay, a bit of summarizing: "Usage" sections were useful with perldoc, but now we have an actual signatures and (hopefully) examples, so they can be replaced without any harm. Hence, I'll continue to work on this and making our docs compile-able. Thanks to all who commented. 21:41
AlexDaniel sena_kun: I do think that signatures are *still* hard to read (no matter how trained you are, they're still noisy), but we should provide them anyway. As for the “usage” thing on p5 docs – well, I usually ignore them and search for some examples… especially when I'm reading about something new. If I want more info, I'd probably be much happier with the signatures (if they were provided).
well yeah, just what you said
sena_kun: by the way, ++ for trying to get people to comment. 21:43
sena_kun AlexDaniel, I just imagined how I'd rewrite about 300+ such blocks with an examples and then someone will point out "Oh, this guy ruins our docs!". (: 21:44
hoelzro (all the people contributing to docs)++ for 1..* 21:45
AlexDaniel we kinda have this ongoing problem on perl6/doc when things are getting stalled just because people don't find it necessary to write a comment or +1 something
hoelzro it's so amazing to see how much work people are putting into the docs!
AlexDaniel … for that reason you might see a lot of my stupid comments on older issues. I'm trying to spark some discussion, sometimes it works 21:46
21:46 ptolemarch left
sena_kun Also, I think, github.com/perl6/doc/pull/632 can be merged to try how actual output of checklink changes. Today I've elimitated pretty much of dead links from routines page, the output should be quite smaller. 21:46
s/to try/to see/
s/page/pages/ 21:47
AlexDaniel sena_kun: yeah, was going to merge a couple of hours ago but thought that I would give it just a couple of hours more, just in case
nine If XP is a real concern, just serve http to XP users and redirect everyone else to https 21:50
AlexDaniel …oO( is there any way we can ignore XP issues and just move on? Who said that there was some issue with XP anyway? ) 21:53
21:53 Sgeo__ joined 21:55 MilkmanDan joined
dalek c: c434b74 | (Josh Soref)++ | htmlify.p6:
work around duplicate id= anchors #631
21:56
c: bf349d8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | htmlify.p6:
Merge pull request #632 from jsoref/dup-id

work around duplicate id= anchors
21:56 kaare_ left
dalek c: c4f58b9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | htmlify.p6:
Add ( ) around type name for more clarity
21:57
21:58 bronco_creek left, setty1 left
AlexDaniel sena_kun: will rerun checklink as soon as it goes live 21:58
sena_kun AlexDaniel, thanks for your efforts.
AlexDaniel sena_kun: thank you too 22:00
22:01 edehont joined
AlexDaniel m: use MONKEY-BUSINESS 22:01
camelia ( no output )
AlexDaniel does anybody know the purpose of these?
I mean, OK, these are reserved. But why?
sena_kun AlexDaniel, you need to ask TimToady, I suppose. 22:02
AlexDaniel why MONKEY-WRENCH and not MONKEY-SCREWDRIVER? What's the joke?
geekosaur English idiom 22:05
oh, apparently it's specifically American idiom
idioms.thefreedictionary.com/throw+...rench+into
parabolize en.wikipedia.org/wiki/Monkey_wrench
AlexDaniel OK, but why reserve it?
geekosaur ask timtoady 22:09
(he made the reserved list)
jnthn Obviously, we're reserving it because we "don't want to be *your* monkey wrench" :P
harmil_wk Well, just from context, i'm guessing that since MONKEY-TYPING is the pragma for augmenting existing classes, maybe MONKEY-* are meant to be pragmas for augmenting all the things...
jnthn (Song reference fwiw :))
TimToady they're reserved in the source mostly as a place that some module can modify and say " # we claimed this for our nefarious purposes"
but also so that you can say "use MONKEY;" and get all of them at once
as sort of a future guarantee of idiocy 22:10
22:10 ufobat left
TimToady m: use MONKEY; my $_ = "something dangerous"; EVAL "say '$_'" 22:11
camelia rakudo-moar 715b82: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $_␤ at <tmp>:1␤ ------> 3use MONKEY; my $_7⏏5 = "something dangerous"; EVAL "say '$_'␤something dangerous␤»
TimToady m: use MONKEY; $_ = "something dangerous"; EVAL "say '$_'"
camelia rakudo-moar 715b82: OUTPUT«something dangerous␤»
TimToady not to encourage that in production code, but it's handier than having to say MONKEY-SEE-NO-EVAL every time
hoelzro jnthn++ # reference 22:12
TimToady and the boss can still scan for MONKEY in your code 22:13
22:14 aries_liuxueyang left 22:15 aries_liuxueyang joined
TimToady m: use MONKEY; say npq::isnull(42) 22:16
camelia rakudo-moar 715b82: OUTPUT«Could not find symbol '&isnull'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
22:16 freezerburnv_ joined
TimToady m: use MONKEY; say npq::die('oof') 22:17
camelia rakudo-moar 715b82: OUTPUT«Could not find symbol '&die'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
TimToady hmm
m: use MONKEY-GUTS; say npq::die('oof')
camelia rakudo-moar 715b82: OUTPUT«Could not find symbol '&die'␤ in block <unit> at <tmp> line 1␤␤Actually thrown at:␤ in block <unit> at <tmp> line 1␤␤»
geekosaur typo 22:18
npq?
TimToady ah
m: use MONKEY; say nqp::die('oof')
camelia rakudo-moar 715b82: OUTPUT«oof␤ in block <unit> at <tmp> line 1␤␤»
TimToady there we go
so basically, just an extensible mechanism for "I know I'm being an idiot here, and doing it publicly such that people will notice if they look." 22:19
so I imagine a corporate policy of "No MONKEY declarations in production without code review by someone smarter and/or more powerful than you." 22:22
and MONKEY-SEE-NO-EVAL is much more amenable to scanning-for than some of the stealthier ways to do eval in a regex 22:23
masak m: EVAL q[say "hi"] 22:26
camelia rakudo-moar 715b82: OUTPUT«hi␤»
masak huh.
...wait, so now `EVAL` is fine without any pragma again?
I thought we hated it? :P 22:27
timotimo if you don't interpolate the string, it's fine
22:28 skids joined
masak m: my $name = "Bob"; EVAL q[say "hi, um, $name"] 22:28
camelia rakudo-moar 715b82: OUTPUT«hi, um, Bob␤»
masak timotimo: there is no such restriction 22:29
22:29 trnh left
masak my next question then becomes: what does `MONKEY-SEE-NO-EVAL` actually *do*? 22:29
22:30 firstdayonthejob left, adu joined
masak 'night, #perl6 22:32
TimToady m: my $name = "Bob"; EVAL qq[say 'hi, um, $name'] 22:33
camelia rakudo-moar 715b82: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error,␤but only if you're VERY sure your data contains no injection attacks)␤at <tmp>:1␤------> 3me = "Bob"; EV…»
TimToady m: my $name = "Bobby Tables'; die 'oops"; EVAL qq[say 'hi, um, $name'] 22:35
camelia rakudo-moar 715b82: OUTPUT«5===SORRY!5=== Error while compiling <tmp>␤EVAL is a very dangerous function!!! (use the MONKEY-SEE-NO-EVAL pragma to override this error,␤but only if you're VERY sure your data contains no injection attacks)␤at <tmp>:1␤------> 3die 'oops"; EV…»
timotimo it's amusing that the $name ended up interpolating anyway :)
TimToady m: use MONKEY; my $name = "Bobby Tables'; die 'oops"; EVAL qq[say 'hi, um, $name']
camelia rakudo-moar 715b82: OUTPUT«hi, um, Bobby Tables␤oops␤ in block <unit> at EVAL_0 line 1␤ in block <unit> at <tmp> line 1␤␤»
TimToady timotimo: but in a single quoted string, you still control the code 22:36
it's only when you interpolate at the EVAL level that you get injection
timotimo that's right
22:40 espadrine joined 22:48 espadrine left
AlexDaniel
.oO( now let's do the same thing with “run” )
22:51
I mean, “shell”. Run is fine
22:51 adu left 22:53 pierrot left 22:55 tbrowder_ joined, Spot___ joined 22:57 Spot__ left, Spot___ is now known as Spot__, tbrowder left, tbrowder_ is now known as tbrowder 23:03 pierrot joined 23:07 araujo_ joined 23:09 pierre_ joined 23:10 labster left, pierre_ left 23:11 araujo left 23:15 pierre_ joined
sena_kun Can someone more native than me check a little paragraph of text? pastie.org/private/wqfldwljszvwullnbfo2q - it's for an important page(CONTRIBUTING.md) and I'm a bit too sleepy now. 23:15
23:22 spider-mario left 23:25 labster joined 23:27 pierre_ left, BrassLantern joined
avar sena_kun: That has no meaning to me without some context 23:27
23:27 Xliff left 23:28 Xliff joined 23:30 infina left
sena_kun avar, eh. It's no good. Okay, it's too late for this day, probably. I'll prepare a more decent thing later. 23:31
AlexDaniel sena_kun: I have some bad news :)
sena_kun AlexDaniel, GOD, NOT AGAIN. 23:32
AlexDaniel sena_kun: the output of checklink is longer than it was yesterday
sena_kun: not published yet, because it is not finished
23:32 infina joined
sena_kun AlexDaniel, what part is the worst this time? 23:33
And how much longer?
Just a bit? Or we ruined something?
AlexDaniel sena_kun: it seems like the issue with duplicate anchors is fixed, but checklink complains anyway because of <a><a></a></a> 23:34
it is 19k lines already 23:35
but I'm hoping that it will stop soon :)
sena_kun AlexDaniel, do we have #fragments(i.e. broken anchors) issue there? # If yes, it's my time to pray.
AlexDaniel OK finished 23:36
19838 I'll gist it now
sena_kun: gist.github.com/AlexDaniel/fc6cb8d...43ecc47c33 23:38
23:38 infina left, infina joined
sena_kun Aaaaaaah. 23:39
AlexDaniel, I understood.
AlexDaniel I'd be happy to rerun it after a fix so that we have a pretty graph without that spike… 23:40
sena_kun AlexDaniel, this PR somewhat changed the pod. And I used Pod this evening in the code to check a type of every "From" link. And we have now: empty links + all "From" links - they're all dead. 23:41
Since we have `(Str) sub val`, not just `sub val`. 23:42
(Real)_ceiling instead of routine_ceiling. 23:43
I can adapt my solution to this, but I'm not sure what to do about <a><a></a></a> problem. 23:44
AlexDaniel, do we need a magically looking fix for the most of the output now?
AlexDaniel sena_kun: why not? 23:45
23:45 margeas left 23:46 margeas joined
AlexDaniel you can leave it for tomorrow if you want 23:46
sena_kun AlexDaniel, after I finish a test for the signatures and maybe sleep a bit, yes. To be honest, this links were 404 all the time and nobody even opened an issue about them, afaik. So it can wait a bit, perhaps. 23:47
23:52 lichtkind_ left 23:55 pmurias left
dalek c: e999d86 | (Tom Browder)++ | doc/Language/experimental.pod6:
add new page for experimental features
23:56
c: bf92543 | (Tom Browder)++ | doc/Language/experimental.pod6:
Merge pull request #813 from tbrowder/experimental

add new page for experimental features
23:58 BrassLantern left