Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-08-05

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:07 dalek ecosystem: b427f5f | (Zoffix Znet)++ | META.list:
00:07 dalek ecosystem: Add CoreHackers::Sourcery
00:07 dalek ecosystem:
00:07 dalek ecosystem: Show source locations of core methods and subs: https://github.com/zoffixznet/perl6-CoreHackers-Sourcery
00:07 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/b427f5f78a
00:08 Zoffix New blog post "Perl 6 Core Hacking: Where's Da Sauce, Boss?": http://perl6.party/post/Perl-6-Core-Hacking-Wheres-Da-Sauce-Boss
00:08 Zoffix harmil_wk, ^ the module and post might be of interest to you.
00:22 awwaiid The ICFP Contest has begun! http://icfpc2016.blogspot.jp/
00:27 canopus joined #perl6
00:33 Actualeyes joined #perl6
00:34 freezerburnv_ joined #perl6
00:59 sena_kun left #perl6
01:05 itaipu joined #perl6
01:10 BenGoldberg joined #perl6
01:26 AlexDaniel joined #perl6
01:35 MasterDuke AlexDaniel: i just tried to install Inline::Perl5, but got '/usr/bin/ld: cannot find -lperl'
01:42 labster joined #perl6
01:46 kalkin-_ joined #perl6
01:46 AlexDaniel ↑ fixed ;)
01:48 BenGoldberg joined #perl6
01:52 cibs joined #perl6
01:56 ShimmerFairy joined #perl6
02:22 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;␤»
02:22 Xliff m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a;
02:22 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:27 cdg joined #perl6
02:30 noganex_ joined #perl6
02:30 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;␤»
02:30 Xliff m: $a = 'aaa'; $a ~~ s/a/b/g; 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/g; say $a;␤»
02:30 Xliff m: my $a = 'aaa'; $a ~~ s/a/b/g; say $a;
02:30 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;␤»
02:30 Xliff Hrm.
02:31 Xliff m: my $a = 'aaa'; $a = $a.subst(/a/, 'b'); say $a;
02:31 camelia rakudo-moar 552d9c: OUTPUT«baa␤»
02:31 Zoffix m: my $a = 'aaa'; $a = $a.subst(/a/, 'b', :g); say $a;
02:31 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:31 Zoffix m: my $a = 'aaa'; $a ~~ s:g/a/b/; say $a;
02:31 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:32 Xliff m: my $a = 'aaa'; $a.=subst(/a/, 'b', :g); say $a;
02:32 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:32 Zoffix m: my $a = 'aaa'; $a = $a.trans('a' => 'b'); say $a;
02:32 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:33 Zoffix m: my $a = 'aaa'; $a ~~ tr/a/b/; say $a;
02:33 camelia rakudo-moar 552d9c: OUTPUT«bbb␤»
02:33 wamba joined #perl6
02:34 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␤»
02:34 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␤------> 3; my $a = ($b ~~ S:g/a/b); say $b; say $7⏏5a;␤    expecting any of:␤        postfix␤        term␤»
02:34 skids :/
02:35 skids m: my $b = 'aaa'; my $a; $a = ($b ~~ S:g/a/b); say $b; say $a;
02:35 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␤»
02:35 skids oh.
02:35 skids m: my $b = 'aaa'; my $a = $b ~~ S:g/a/b/; say $b; say $a;
02:35 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␤»
02:37 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␤»
02:37 skids there we go.
02:38 freezerburnv joined #perl6
02:41 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␤»
02:42 MasterDuke skids: ^^^ is that the same thing you were trying to do?
02:43 skids I was just riffing off the previous stuff to demonstrate S///.
02:45 konobi ullo
02:48 MasterDuke anybody here used Inline::Perl5 much?
02:48 MasterDuke i have 'use Chart::Gnuplot:from<Perl5>;'
02:49 MasterDuke 'my $chart = Chart::Gnuplot.new(<...>)' works
02:49 MasterDuke but then 'my $dataSet = Chart::Gnuplot::DataSet.new(<...>)
02:49 MasterDuke gives "Could not find symbol '&DataSet'"
02:54 MasterDuke and i tried, 'use Chart::Gnuplot::DataSet:from<Perl5>;', but that just gave "Can't locate Chart/Gnuplot/DataSet.pm in @INC"
03:04 skids Hrm.  I wonder if that's a generic problem with p5 files that contain multiple packages.
03:04 skids Unfortunately using "import" doesn't help.
03:06 pierre_ joined #perl6
03:09 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:12 cdg joined #perl6
03:12 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:13 skids Unfortinately I really can't stay up to hunt that down.
03:19 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
03:20 MasterDuke weird about that Grepper thing though
03:22 skids my bet is a leftover GLR-induced buglet.
03:38 kurahaupo joined #perl6
04:04 bob777 joined #perl6
04:16 Actualeyes joined #perl6
04:16 golee joined #perl6
04:21 awwaiid ok, I apparently don't know how to do simple things
04:22 awwaiid m: module Foo { sub hi { say "hi" } } ; Foo::hi
04:22 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:38 Cabanossi joined #perl6
04:38 mcmillhj joined #perl6
04:44 avenj joined #perl6
04:44 avenj joined #perl6
04:48 llfourn awwaiid: you want "our sub hi"
04:49 awwaiid our!
04:49 awwaiid by default they are 'my' ?
04:49 llfourn yes :)
04:52 pierre_ joined #perl6
05:03 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 awwaiid fancy wya to do that?
05:06 awwaiid like rule { <count> <data>{$count} }
05:11 llfourn m: say "aaa" ~~ /a ** {1 + 2}/ # seems to work
05:11 camelia rakudo-moar 552d9c: OUTPUT«「aaa」␤»
05:11 llfourn awwaiid: ^^
05:12 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} /␤»
05:12 awwaiid m: "3 a b c " ~~ / $<count>=\d+ <ws> [\w+ <ws>] ** {$/<count>} /
05:12 camelia rakudo-moar 552d9c: ( no output )
05:13 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 => 「 」␤»
05:13 awwaiid hm!
05:13 llfourn looks good :)
05:14 * awwaiid wonders if rules can take a parameter
05:14 llfourn they can :)
05:16 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:52 golee joined #perl6
05:57 tadzik joined #perl6
06:00 llfourn m: my $a = "bar"; (with $a { $_ }) = "foo"; say $a # works
06:00 camelia rakudo-moar 552d9c: OUTPUT«foo␤»
06:00 llfourn m: my $a = "bar"; ($_ with $a) = "foo"; say $a # doesn't
06:00 camelia rakudo-moar 552d9c: OUTPUT«Cannot modify an immutable Str␤  in block <unit> at <tmp> line 1␤␤»
06:00 llfourn anyone know if this is itended?
06:00 llfourn intended*
06:04 golee joined #perl6
06:06 * llfourn goes to RT
06:08 mohae_ joined #perl6
06:20 firstdayonthejob joined #perl6
06:23 M-Illandan joined #perl6
06:23 Matthew[m] joined #perl6
06:51 darutoko joined #perl6
07:24 ufobat joined #perl6
07:26 bjz joined #perl6
07:31 ufobat good morning :)
07:47 zakharyas joined #perl6
07:58 sno joined #perl6
07:58 RabidGravy joined #perl6
08:07 pierre_ joined #perl6
08:13 ribasushi joined #perl6
08:32 telex joined #perl6
08:35 espadrine joined #perl6
08:36 ufobat what is this: Unhandled exception in code scheduled on thread 7
08:36 ufobat getexpayload needs a VMException
08:36 ufobat in any  at /home/martin/.rakudobrew/moar-2016.07.1/install/share/perl6/runtime/CORE.setting.moarvm line 1
08:37 pierre_ joined #perl6
08:39 timotimo is your everything up to date?
08:39 ufobat This is Rakudo version 2016.07.1 built on MoarVM version 2016.07
08:39 ufobat i think so
08:40 timotimo OK, could have been your moar and rakudo weren't compiled for the same version of things
08:40 timotimo well, can you golf it? :)
08:41 ufobat i tried to golf my segfault from yesterday
08:41 ufobat so far its not a tiny piece of code :/ https://gist.github.com/ufobat/fedd964bb837d1ee30f6b30bd9296e20
08:42 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 &
08:42 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
08:43 timotimo you should perhaps grab latest versions out of git for moar, nqp, and rakudo
08:43 ufobat hm okay :)
08:44 ufobat i will do so after my vacation in sweden :-)
08:44 timotimo oh
08:44 timotimo OK!
08:45 timotimo aha, it stopped for me
08:45 ufobat for more then 8 connections in parallel?
08:45 timotimo for some reason it went up to Thread<19>
08:45 timotimo if you could give me a command that'll do the 8 connections in parallel, that'd be nice %)
08:46 timotimo because how do i even loops in fish
08:46 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
08:47 ufobat -w 1 is a timeout of 1 sec, so the number of nc == number of parallel connections
08:48 timotimo it's like the threads don't get unblocked
08:48 Actualeyes joined #perl6
08:48 timotimo there's a terrible mistake in your code!
08:48 ufobat whats wrong?
08:48 timotimo it should read "$*THREAD closing client connection ", not "$*THREAD closing cient connection "
08:49 timotimo i never get any of those outputs, btw
08:49 timotimo i think LAST may not be the right phaser there?
08:50 ufobat hmm
08:50 ufobat when i connect with a broser to localhost 3000 and push relaod quite a while i get a
08:50 timotimo hm, doc says LAST is right, and QUIT is also a thing you should have
08:51 ufobat i get a closing client connection, and somethings i get a idk "can't close a closed connection"
08:51 ufobat sometimes
08:51 timotimo well, browsers will also do keepalive unless you tell them not to
08:51 timotimo that complicates things, definitely
08:52 ufobat Thread<19>(<anon>) closing cient connection IO::Socket::Async.new
08:52 ufobat Unhandled exception: cannot close a closed socket
08:52 ufobat and thry catch dosnt catch it :(
08:53 timotimo could be you aren't (or can't be) in the right dynamic scope to catch that exception
08:53 timotimo i.e. could be rakudo core code tries to do that and doesn't handle "cannot close closed code"
08:53 timotimo can you use --ll-exception to get more details?
08:55 trnh joined #perl6
08:55 trnh joined #perl6
08:55 ufobat doesn't work
08:55 ufobat i dont get any details
08:55 timotimo hm, OK
08:56 timotimo oh, that close thing is inside your try/catch
08:56 timotimo weird.
08:56 timotimo so what if you don't $conn.close?
09:00 AlexDaniel Comments needed: https://github.com/perl6/doc/pull/632
09:02 ufobat if i dont close it, echo on the cli works fine with nc localhost 3000
09:02 ufobat but i dont see the http get request as a reply in my browser..
09:03 ufobat 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
09:03 timotimo hm, or ... maybe it does?
09:06 timotimo time to move the stuff onto its own workspace, so i have more than just half a single monitor for all of it
09:07 timotimo ah, i was misreading the handle_conn the entire time
09:09 timotimo oh my, all the nc processes are still running
09:10 kid51 joined #perl6
09:11 timotimo well, all i can say is your code looks, at first glance, as if it shouldn't be blocking threads
09:13 timotimo however, it seems like there's an await inside of REACT
09:13 timotimo and that's where all those threads are blocked
09:13 ufobat how come your netcats didnt terminate?
09:13 timotimo dunno
09:13 timotimo but also killall isn't enough, i have to killall -KILL
09:14 ufobat hmm
09:14 timotimo oh
09:14 ufobat thanks for your help timotimo :) but now its time for vacation :)
09:14 timotimo duh
09:14 timotimo react does block the thread for you
09:14 timotimo because of course it does
09:15 timotimo that's what you use react for
09:15 timotimo instead of supply
09:15 timotimo 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
09:16 timotimo REACT is quite literally SUPPLY + await
09:16 timotimo and await doesn't free up the thread for the threadpool yet; that's a 6.d feature
09:16 ufobat AH !
09:16 ufobat i see
09:17 timotimo if i liked coffee, now would be the right time to start drinking it
09:17 rindolf joined #perl6
09:17 ufobat so then i assume everything would work fine, which means that golfing the segfault didnt work :/
09:18 timotimo ah, probably. i'll try the supply-instead-of-react-thing and see if i can get it to segv
09:18 xinming_ joined #perl6
09:18 ufobat but i think i am understanding async programming a bit better now :-) thanks timotimo :)
09:18 timotimo yay
09:18 timotimo i haven't done much with supply or react at all, so it was a good exercise for me
09:19 ufobat if you're interested how my segfault is reproduced: https://rt.perl.org/Public/Bug/Display.html?id=128839
09:19 timotimo well, now i have only 3 threads active
09:20 e163 joined #perl6
09:21 timotimo but as i said, it could just be that recent stability fixes by jnthn would prevent this segfault entirely
09:23 ufobat would you how me how you handle the supplies now?
09:25 timotimo i just replaced react with supply inside the $p_reply.then, and added a .then({ $_.tap({ say "dummy" }); @supplies.push($_) })
09:25 timotimo i'm not sure if that's thread-safe, actually
09:25 timotimo just pushing it
09:25 timotimo would be better to feed it into a channel
09:27 kid511 joined #perl6
09:30 jkramer left #perl6
09:31 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 #perl6
09:46 margeas joined #perl6
09:56 Ulti you get LAST and QUIT on a whenever block is there any reason for no FIRST?
10:01 literal isn't there?
10:01 literal https://docs.perl6.org/language/phasers#Loop_Phasers
10:02 Ulti nope
10:02 Ulti or at least it doesn't appear to actually execute
10:02 Ulti no error at all it just doesn't work
10:03 literal m: for 1..3 { FIRST { print "bar" }; print "foo" }
10:03 camelia rakudo-moar 552d9c: OUTPUT«barfoofoofoo»
10:03 timotimo that's not a whenever block :)
10:04 literal yeah, FIRST is a loop phaser
10:04 literal you might want ENTER
10:04 timotimo but ENTER fires on every enter
10:04 timotimo whenevers are loop-like
10:04 dalek whateverable: 998ae02 | (Aleks-Daniel Jakimenko-Aleksejev)++ | Bisectable.p6:
10:04 dalek whateverable: Perl 6 rewrite of bisectable
10:04 dalek whateverable:
10:04 dalek whateverable: Everything looks fine. It does segfault sometimes, but it
10:04 dalek whateverable: is most likely not our fault.
10:04 dalek whateverable: review: https://github.com/perl6/whateverable/commit/998ae02bf5
10:15 NEveD joined #perl6
10:18 lambd0x joined #perl6
10:18 lambd0x Hi everyone!
10:19 RabidGravy erp
10:19 lambd0x How can I search for a key in an array of hashes?
10:20 lambd0x first time working with them...sorry it's a dumb question :P
10:22 nine Something like @hashes.grep: { $_<yourkey>:exists }?
10:24 Actualeyes joined #perl6
10:25 Ulti literal yeah as timotimo says ENTER is every time something is called not the first time
10:27 AlexDaniel lambd0x: if you are going to do lots of such lookups, perhaps consider creating one big hash for that
10:28 AlexDaniel 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
10:28 camelia rakudo-moar 552d9c: OUTPUT«8␤»
10:34 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)␤»
10:35 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:
10:35 Zoffix m:  my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say @hashes».<y>:v
10:35 camelia rakudo-moar 552d9c: OUTPUT«Unexpected named parameter 'v' passed␤  in block <unit> at <tmp> line 1␤␤»
10:36 lambd0x AlexDaniel: What is the best way of creating a list of hashes that might get big?
10:37 lambd0x 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 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?
10:38 lambd0x gregf_: better yes.
10:39 gregf_ my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); @hashes.first: ->$h { $h<$key>:exists }
10:39 gregf_ prolly ;) # not sure its valid :|
10:39 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
10:40 moritz m: my @hashes = %(<a 1 b 2 c 3>), %(<x 7 y 8 z 9>); say  @hashes.first: ->$h { $h<x>:exists }
10:40 camelia rakudo-moar 552d9c: OUTPUT«{x => 7, y => 8, z => 9}␤»
10:41 gregf_ Zoffix: yeah, your .elems sounds perfect
10:41 moritz gregf_: the only problem is $h<$key>, which needs to be $h{$key} or $h<literal_key>
10:42 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?
10:43 lambd0x nine: ahahah
10:44 lambd0x 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:46 lambd0x 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
10:46 Zoffix m: say bag "A quick brown fox jumped over a lazy dog".comb
10:46 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))␤»
10:47 lambd0x Zoffix: ahah, Bag stands for that exactly?
10:47 Zoffix https://docs.perl6.org/language/setbagmix
10:47 Zoffix Don't think it stands for anything... well... other than real life bags maybe? :)
10:49 lambd0x I know, was refering to the argument type after the bag call...
10:49 lambd0x Oh, well I have a lot to learn yet hahaah
10:50 lambd0x Thanks guys, will read about what you all just said and try again :)
10:52 kaare_ joined #perl6
11:01 kurahaupo joined #perl6
11:02 dalek Inline-Perl5: 62d7a43 | niner++ | / (3 files):
11:02 dalek Inline-Perl5: Try to make installation on Windows possible
11:02 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/62d7a43269
11:02 dalek Inline-Perl5: d65d956 | niner++ | META.info:
11:02 dalek Inline-Perl5: Version 0.8
11:02 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/d65d9563d7
11:07 noreem joined #perl6
11:12 holyghostoo joined #perl6
11:33 sena_kun joined #perl6
11:54 tbrowder joined #perl6
11:56 tbrowder another possible p6 marketing project: API support for backendless.com
12:00 pmurias joined #perl6
12:00 pmurias hi
12:05 tbrowder hi, pmurias
12:06 Woodi o/
12:06 vcv \o
12:12 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:15 unmatched} tbrowder: so what is it?
12:15 DrForr Buzzword buzzkill?
12:16 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:17 DrForr Something to do with the new "serverless" stuff, I'm guessing?
12:17 rindolf joined #perl6
12:18 unmatched} Seems something to do with mobile apps.
12:18 * unmatched} hits the "close" button on the browser window
12:19 xfix joined #perl6
12:19 wamba joined #perl6
12:22 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␤»
12:22 llfourn ^bug?
12:23 llfourn m: say Positional[Int] ~~ Positional[Numeric]
12:23 camelia rakudo-moar 552d9c: OUTPUT«True␤»
12:23 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
12:23 tbrowder worth investigating...
12:24 unmatched} m: say Positional[Numeric] ~~ Positional[Int]
12:24 camelia rakudo-moar 552d9c: OUTPUT«False␤»
12:24 mst kinda firebase like
12:24 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.
12:26 tbrowder 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
12:26 llfourn isn't the point of restful interfaces that they are language agnostic?
12:26 mst tbrowder: you want to build stuff? build stuff
12:27 mst tbrowder: talk about it. show people shiny things.
12:27 mst tbrowder: unmatched} is doing more marketing for perl6 than any amount of your navel gazing "we should support X" discussion will achieve
12:27 mst if you think backendless is a good target, go build support for it
12:27 mst then write some nice blog posts
12:27 mst maybe explain it to unmatched} so he writes some nice blog posts too
12:28 unmatched} meh :)
12:28 pierre_ joined #perl6
12:28 mst but "someone has to start" just smacks of "I want somebody else to volunteer to do this thing"
12:28 mst and that ain't how -Ofun works
12:28 tbrowder mst: my only audience is here and just hope to spark some interest
12:29 mst tbrowder: so spark interest by writing something
12:29 mst not by telling other people how to spend their spare time
12:29 mst this sort of "somebody else should volunteer to do X because marketing" thing never goes anywhere useful;
12:29 canopus joined #perl6
12:29 tbrowder don't shoot the messenger, please
12:29 mst also, "because marketing" is a shitty motivation
12:29 mst what
12:30 mst I'm sorry, you said "someone has to start" on behalf of somebody else?
12:34 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:37 * Woodi would realy like to see W3 forum done in Perl6...
12:39 Woodi about serverless: they are interesting ay of selling computation power :)  probably that's why they do not sell C functions calls...
12:41 El_Che DrForr: I saw you on television today and you were wearing your best suit!
12:41 DrForr Uh? :)
12:41 El_Che DrForr: the oscon video's are on o'reilly's safari
12:42 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 :)
12:42 El_Che DrForr: it's available for safari subscribers
12:43 DrForr Neato.
12:44 El_Che DrForr: https://www.safaribooksonline.com/library/view/the-perl-6/9781491968321/
12:44 El_Che Release Date: July 2016
12:44 El_Che brandnew
12:44 DrForr Hrm, I have a free Safari account...
12:47 lichtkind_ joined #perl6
12:47 edwinsage joined #perl6
12:47 El_Che DrForr: is that an oscon perk?
12:47 DrForr Yep.
12:47 El_Che nice
12:55 perlpilot Zoffix++ nice post
12:59 moritz can anybody still log in on hack.p6c.org?
13:00 unmatched} moritz: nope. ssh hack.p6c.org just sits there
13:00 dalek joined #perl6
13:00 moritz ok, rebooted
13:01 synopsebot6 joined #perl6
13:02 RabidGravy I don't suppose any one knows Maurice Aubrey (CPAN author)? I want to blag the C part of his DoubleMetaphone module ;-)
13:05 gnull joined #perl6
13:10 mcmillhj joined #perl6
13:15 pmurias tbrowder: isn't backendless intended to replace the backend?
13:16 pmurias tbrowder: an as such Perl 6 API to it wouldn't be that usefull
13:17 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:19 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 #perl6
13:23 pmurias tbrowder: there is a REST API
13:24 pmurias having APIs to stuff is good. You never know where someone else will decide to store the data you need ;)
13:25 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:27 tbrowder 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 noreem_ joined #perl6
13:30 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)␤»
13:30 literal so, how am I misunderstanding grep() here? :P
13:32 unmatched} literal: you're making the assumption that :k gives you the .key
13:33 literal oh, so it's just an index
13:33 unmatched} ":k Only return the index values of the matching elements in order." (from https://docs.perl6.org/routine/grep )
13:33 literal maybe it should have been called :i and :iv :P
13:34 unmatched} It comes from .kv
13:34 perlawhirl joined #perl6
13:35 skids joined #perl6
13:36 perlawhirl hi perlers... it's been a while
13:36 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]␤»
13:36 unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}.keys
13:36 camelia rakudo-moar 552d9c: OUTPUT«0..2␤»
13:36 unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say eager $foo.categorize(*.value){2}.keys
13:36 camelia rakudo-moar 552d9c: OUTPUT«(0 1 2)␤»
13:37 unmatched} oh
13:37 unmatched} m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.categorize(*.value){2}».key
13:37 camelia rakudo-moar 552d9c: OUTPUT«[0 7 2]␤»
13:37 unmatched} there we go
13:37 FROGGS joined #perl6
13:38 pmurias tbrowder: what do you mean by low level access to files?
13:39 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:39 camelia rakudo-moar 552d9c: OUTPUT«(0 7 2)␤(0 7 2)␤»
13:40 unmatched} literal: ^ another way
13:40 literal unmatched}: ah, indeed
13:40 pmurias tbrowder: https://backendless.com/documentation/files/rest/files_overview.htm
13:40 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 #perl6
13:41 unmatched} perlawhirl: I'd say that's a bug/limitation in Net::Telnet
13:41 El_Che moritz: I logging in
13:41 unmatched} perlawhirl: errr... in Inline::Perl5
13:41 unmatched} m: class Foo{ method print { say "works fine" } }; Foo.new.print
13:41 camelia rakudo-moar 552d9c: OUTPUT«works fine␤»
13:41 vcv m: my $foo = bag <0 0 2 2 4 5 7 7>; say $foo.grep(*.value == 2).Hash.keys
13:41 camelia rakudo-moar 552d9c: OUTPUT«(0 7 2)␤»
13:41 El_Che moritz: do you want me to check something?
13:42 Rawriful joined #perl6
13:42 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 #perl6
13:43 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
13:43 unmatched} buggable: Inline::Perl5
13:43 perlawhirl yeah will do
13:43 unmatched} buggable: module Inline::Perl5
13:43 tbrowder pmurias: good for you!  Now a p6 module can be written to handle that.  I'll still ask about a more formal interface.
13:43 unmatched} Stupid robot
13:43 unmatched} huggable: module Inline::Perl5
13:44 jdv79 maybe they're sleeping
13:45 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 << >> :)
13:47 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>>
13:48 DrForr Yep.
13:48 perlawhirl but i use them so often i've remapped Shift-Alt-> to »
13:48 unmatched} edwinsage: you don't need if you don't want to. All fancy unicode operators have an ASCII (what we call Texas) variant: https://docs.perl6.org/language/unicode_texas.html
13:49 unmatched} 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
13:50 mspo option + \ and option + |  (same key)
13:51 mspo it helps if you open keyboard preferences and click "Show Keyboard, Emoji, & Symbol Viewers in menu bar"
13:51 mspo then you can get a visual keyboard with a lot of important symbols for reference
13:52 mspo m: say π * 10
13:52 camelia rakudo-moar 552d9c: OUTPUT«31.4159265358979␤»
13:53 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 >>.\
13:54 mspo chorded marks are difficult to get used to: è ü
14:02 sufrostico joined #perl6
14:15 yuyy joined #perl6
14:16 danaj joined #perl6
14:19 movl joined #perl6
14:21 navy joined #perl6
14:21 tbrowder ref backendless: got account, tried to ask question, but site wouldn't accept it--I'm kissing them off for now
14:23 dalek Inline-Perl5: e7b7332 | niner++ | Makefile.in:
14:23 dalek Inline-Perl5: Don't hard code the compiler executable's name into the Makefile
14:23 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/e7b7332515
14:30 khw joined #perl6
14:38 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 rjbs my $x = "This is a statement;"
14:38 rjbs I look forward to this being applied.
14:38 acrussell joined #perl6
14:39 mst additionally, in webster-mode, variable names containing the letter u will be banned
14:40 DrForr Custom slang(s), anyone?
14:43 timotimo thank you for your input, rjbs
14:43 moritz we will take it under considering
14:43 moritz ... when deciding who gets to face the wall first when the revolution comes :-)
14:44 unmatched} :D
14:44 mcmillhj joined #perl6
14:45 dalek Inline-Perl5: 3acaa28 | niner++ | / (5 files):
14:45 dalek Inline-Perl5: Fix Perl5 classes unable to override Mu's methods
14:45 dalek Inline-Perl5:
14:45 dalek Inline-Perl5: Even Mu's methods trump fallbacks, so we have to explicitly pass them through
14:45 dalek Inline-Perl5: to the marshalled Perl 5 object or package, same as we do with Any's methods.
14:45 dalek Inline-Perl5: As Mu's methods are integral to Perl 6's workings, we cannot just wrapp all
14:45 dalek Inline-Perl5: of them.
14:45 dalek Inline-Perl5:
14:45 dalek Inline-Perl5: Instead, only pass through <note print put say split> as those should be safe.
14:45 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/3acaa28bc7
14:46 nine perlawhirl: ^^^
14:48 zacts joined #perl6
14:51 jkramer joined #perl6
14:51 jkramer Ahoy!
14:51 unmatched} \o
14:52 jkramer Does anything speak against having a 'unit module Foo' that has some exported sub inside but also a 'class Foo'?
14:52 xiaomiao joined #perl6
14:53 moritz if you want to create a class Foo::Foo, why not?
14:53 moritz or you might want to write a 'unit class Foo;' and export subs from it
14:53 dalek Inline-Perl6: 7d667b8 | niner++ | Perl6.xs:
14:53 dalek Inline-Perl6: Fix compile error caused by MoarVM change
14:53 dalek Inline-Perl6:
14:53 dalek Inline-Perl6: This tracks the changes to src/moar.c in MoarVM commit
14:53 dalek Inline-Perl6: 824748db35636f2bd989f201705569f57f6cfc60
14:53 dalek Inline-Perl6: review: https://github.com/niner/Inline-Perl6/commit/7d667b887b
14:53 dalek Inline-Perl6: 83c9298 | niner++ | / (2 files):
14:53 dalek Inline-Perl6: Version 0.06
14:53 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
14:53 dalek Inline-Perl6: review: https://github.com/niner/Inline-Perl6/commit/83c929827f
14:54 moritz jkramer: no, it's just is if you wrote module Foo { class Foo { } }
14:54 moritz so from the outside, the class is available as Foo::Foo
14:54 moritz I don't know if that is what you want
14:55 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 jkramer Just some helpers with shortcuts for the user
14:55 moritz then what do they do in that namespace? :-)
14:56 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:57 jkramer So instead of Shell::Application::Option.new(:long('debug'), :short('d'), :type(Shell::Application::Option.Flag)) you'd write option-flag('d', 'debug')
14:58 jkramer 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 jkramer unmatched}: Yeah maybe, but even Shell::Application::Option.new seems unconvenient for me :)
14:59 jkramer Well I'll think of something
14:59 unmatched} Then rename it to Shell::App::Opt :)
14:59 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:03 jkramer What's the name for the catch-all argument has? %*something?
15:03 itaipu joined #perl6
15:04 jkramer Or do I just name it myself? sub foo(*%everything) ?
15:05 wamba joined #perl6
15:05 unmatched} jkramer: there's @_ and %_
15:05 [Coke] why do we have a bunch of docu tickets for things that don't exist?
15:05 unmatched} m: sub foo { dd @_; dd %_}; foo |<foo bar ber>, :42meow
15:05 camelia rakudo-moar 552d9c: OUTPUT«["foo", "bar", "ber"]␤{:meow(42)}␤»
15:05 [Coke] e.g. https://github.com/perl6/doc/issues/811
15:06 [Coke] 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
15:06 camelia rakudo-moar 552d9c: OUTPUT«["foo", "bar", "ber"]␤{:meow(42)}␤»
15:06 unmatched} And you can do that too. Those are called slurpies and the * itself is called a splat
15:07 jkramer Hmm, I've seen *%_ too - what's the difference between that and %_?
15:07 jkramer Ah nevermind :D
15:07 jkramer *%_ is the signature, %_ the name
15:07 unmatched} m: sub foo (|c) { dd c}; foo |<foo bar ber>, :42meow
15:07 camelia rakudo-moar 552d9c: OUTPUT«\("foo", "bar", "ber", :meow(42))␤»
15:07 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 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))]␤»
15:09 unmatched} And a bunch of those MONKEY pragmas are just reserved for future use.
15:10 [Coke] if it's in roast and just is reserved, that's fine, we shoudl doc that.
15:10 [Coke] if it's not in roast, shouldn't be in docs.
15:11 webstrand joined #perl6
15:13 mcmillhj joined #perl6
15:14 [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:16 jkramer How do I pass on %_ to a sub that takes only named parameters? Something like foo(|%_)?
15:17 unmatched} yeah'
15:18 jkramer \o/
15:24 gblade joined #perl6
15:25 gblade p6: my $p = '.B'; my @a = <A AB B>; say @a.grep: /$p/
15:25 camelia rakudo-moar 552d9c: OUTPUT«()␤»
15:26 unmatched} p6: my $p = '.B'; my @a = <A AB B>; say @a.grep: /<$p>/
15:26 camelia rakudo-moar 552d9c: OUTPUT«(AB)␤»
15:26 gblade Thank you, what are the <>?
15:27 gregf_ m: my $p = '.B'; say /<$p>/
15:27 camelia rakudo-moar 552d9c: OUTPUT«/<$p>/␤»
15:28 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 #perl6
15:29 gblade Thanks again, It was confusing because $p = AB was working as I'd expect
15:30 unmatched} yeah, 'cause then it was matching $p literally, as a string, not as a regex expression
15:35 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:36 timotimo Data::Dump::Tree is pretty amazing
15:36 splatt9990 joined #perl6
15:36 unmatched} sena_kun: there's dd from which you can get some milage
15:36 unmatched} m: dd [<foo bar>, :42meow]
15:36 camelia rakudo-moar 552d9c: OUTPUT«[("foo", "bar"), :meow(42)]␤»
15:37 sena_kun timotimo, thanks.
15:37 sena_kun unmatched}, I'm not sure it helps, but I'll try, thanks.
15:38 timotimo dd doesn't give you pretty whitespace, though
15:39 unmatched} Was there a decision reached on how to provide program's output in the docs? What is it?
15:42 sena_kun unmatched}, afaik - no. Currently two styles are supported: # some and # OUTPUT: «some␤», if I'm correct.
15:48 NEveD joined #perl6
15:51 unmatched} sena_kun: I have 5-line output with about 50 chars per line....
15:53 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:56 unmatched} m: https://gist.github.com/zoffixznet/a1a8a508659bd214b9868a13a0bcc6a6
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␤»
15:56 unmatched} m: https://gist.github.com/zoffixznet/f2cf979cef1f2fd0c4006b25939ee12d
15:56 camelia rakudo-moar 715b82: OUTPUT«5 from thread 7 received after 0.00461471 seconds␤»
15:57 unmatched} Dafuq? The only difference is line 7, where I changed sleep $v to sleep 5 - $v
15:57 unmatched} Oh my close condition is messed up... tsk tsk
15:58 timotimo close conditions of the third kind?
15:59 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 gblade p6: my $p = 'A B'; my @a = 'A','A B','AB','B'; say @a.grep: rx:s/<$p>/
15:59 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 …»
16:00 unmatched} dunno
16:00 gblade okay, thanks
16:01 TimToady joined #perl6
16:02 Tonik joined #perl6
16:03 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 unmatched} nice, eh?
16:04 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>/
16:05 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>/
16:05 camelia rakudo-moar 715b82: OUTPUT«(A B)␤»
16:05 lizmat 40MB/sec on my machine  :-)
16:06 Actualeyes joined #perl6
16:08 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␤»
16:09 unmatched} What are » and « there for?
16:10 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 https://docs.perl6.org/language/regexes#index-entry-regex_%3C%3C-regex_%3E%3E-regex_%C2%AB-regex_%C2%BB-%3C%3C__and_%3E%3E_%2C_left_and_right_word_boundary
16:10 b2gills I might be wrong about how it works, never used them before
16:12 b2gills I should point out that you should **never do this for untrusted inputs**
16:13 dalek Inline-Perl5: de59782 | niner++ | lib/Inline/Perl5.pm6:
16:13 dalek Inline-Perl5: Fix bogus error in Inline::Perl6 on perl without MULTIPLICITY
16:13 dalek Inline-Perl5:
16:13 dalek Inline-Perl5: Regression by commit 81243ea6518267be718bf5e092e9c09b9a36f281
16:13 dalek Inline-Perl5:
16:13 dalek Inline-Perl5: Thanks to Ævar for the report!
16:13 dalek Inline-Perl5: Fixes Inline::Perl6 GH #2
16:13 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/de59782e4b
16:15 dalek Inline-Perl5: e9a5e78 | niner++ | META.info:
16:15 dalek Inline-Perl5: Version 0.9
16:15 dalek Inline-Perl5: review: https://github.com/niner/Inline-Perl5/commit/e9a5e78841
16:25 dalek doc: c06c27a | (Zoffix Znet)++ | doc/Language/concurrency.pod6:
16:25 dalek doc: Better example for Channel.poll
16:25 dalek doc:
16:25 dalek doc: Closes #751
16:25 dalek doc: review: https://github.com/perl6/doc/commit/c06c27ac20
16:31 awwaiid is there a way to make the output of dd prettier -- whitespace and indented and such?
16:32 sena_kun awwaiid, Data::Dump::Tree.
16:34 dalek doc: 3566442 | (Zoffix Znet)++ | doc/Language/regexes.pod6:
16:34 dalek doc: Document that « and » can be used instead of << and >>
16:34 dalek doc:
16:34 dalek doc: b2gills++
16:34 dalek doc: review: https://github.com/perl6/doc/commit/3566442b09
16:37 andreoss joined #perl6
16:38 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?
16:38 andreoss my %h = foo => 'hi' ,  bar => 8; %h.fmt("%30s<foo> %10d<bar>")
16:38 sena_kun awwaiid, sorry, then I'm useless.
16:39 awwaiid awww
16:39 awwaiid not useless! just not what I'm looking for atm :)
16:40 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␤␤»
16:40 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␤␤»
16:41 perlpilot m:  my %h = a => 1, b => 3; %h.fmt('%s => %s').say;
16:41 camelia rakudo-moar 715b82: OUTPUT«a => 1␤b => 3␤»
16:41 sena_kun awwaiid, surely. (:
16:41 perlpilot not quite what you wanted
16:42 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 #perl6
16:44 dalek doc: 22d46af | (Zoffix Znet)++ | doc/Language/concurrency.pod6:
16:44 dalek doc: Fix incorrect comment
16:44 dalek doc:
16:44 dalek doc: MasterDuke++
16:44 dalek doc: review: https://github.com/perl6/doc/commit/22d46af8bb
16:45 andreoss perlpilot: what if i want refer to value directry?
16:45 andreoss by key
16:46 awwaiid sena_kun: the more I look at this the more I'm finding it useful :)
16:48 acrussell joined #perl6
16:48 perlpilot andreoss: um ....
16:48 perlpilot m: my %h = a => 1, b => 3;  sprintf("%d => %s", %h<b a>);
16:48 camelia rakudo-moar 715b82: ( no output )
16:49 perlpilot m: my %h = a => 1, b => 3;  say sprintf("%d => %s", %h<b a>);
16:49 camelia rakudo-moar 715b82: OUTPUT«3 => 1␤»
16:49 FROGGS joined #perl6
16:49 perlpilot er, that muddled, but you can mix it up how you want it.
16:49 * perlpilot lunch &
16:49 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.
16:50 sena_kun m: my @a = <1>; say @a[0]; say @a[0][0];
16:50 camelia rakudo-moar 715b82: OUTPUT«1␤1␤»
16:50 sena_kun m: my @a = <1>; say @a[0]; say @a[0][0]; say @a[0][0][0];
16:50 camelia rakudo-moar 715b82: OUTPUT«1␤1␤1␤»
16:50 sena_kun This feature is weird.
16:51 lizmat m: my $a = 42; say $a[0][0][0]
16:51 camelia rakudo-moar 715b82: OUTPUT«42␤»
16:51 lizmat sena_kun: every scalar value can be considered a 1 element array
16:51 sena_kun lizmat, aaaaaah. Okay. Thanks!
16:52 lizmat m: my $a = 42; say $a.elems
16:52 camelia rakudo-moar 715b82: OUTPUT«1␤»
16:54 lizmat afk&
16:55 zacts joined #perl6
16:56 dalek doc: aacd49d | (Zoffix Znet)++ | doc/Type/Routine.pod6:
16:56 dalek doc: Document Routine.cando
16:56 dalek doc:
16:56 dalek doc: Fixes #749
16:56 dalek doc: review: https://github.com/perl6/doc/commit/aacd49dae2
16:56 edehont joined #perl6
17:05 araujo joined #perl6
17:06 araujo joined #perl6
17:06 araujo joined #perl6
17:08 cdg joined #perl6
17:14 avar nine: Thanks for those bugfixes, trying to rebuild with those patches
17:15 firstdayonthejob joined #perl6
17:22 mcmillhj joined #perl6
17:30 nine avar: Thanks for playing guinea pig :)
17:34 splatt9990 joined #perl6
17:35 mcmillhj joined #perl6
17:36 cdg joined #perl6
17:48 shlomif joined #perl6
17:52 mcmillhj joined #perl6
18:04 avar nine: Does this work for you without a segfault:
18:04 avar perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q[use Inline::Perl5; my $p5 = Inline::Per
18:04 avar uh
18:04 vcv m: say <0 0 1 2 2 5 6 7 7>.Bag.grep(*.value==2).Hash.keys
18:04 camelia rakudo-moar 715b82: OUTPUT«(0 7 2)␤»
18:04 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"])])'
18:04 avar m: use Inline::Perl5; my $p5 = Inline::Perl5.new; $p5.run(q[print "hi"]);
18:04 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:…»
18:05 avar Segfaults in p5_call_p6_method (cv=0x618be0) at p5helper.c:642
18:06 avar But this works!
18:06 avar perl -MInline::Perl6 -wE 'my $p6 = Inline::Perl6->new; $p6->run(q["hi".say])'
18:11 hoelzro unmatched}++ # that sourcery module looks really handy
18:12 edehont joined #perl6
18:12 wamba joined #perl6
18:17 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:18 sno joined #perl6
18:18 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:21 adu joined #perl6
18:22 dalek doc: 5c1a6f0 | Altai-man++ | htmlify.p6:
18:22 dalek doc: This change completely solves the problem of dead links in a 'From ' field on generated routine/ pages.
18:22 dalek doc: It takes real a link kind from the actual pod and it works for a sub/method/term/routine/*fix link types.
18:22 dalek doc: review: https://github.com/perl6/doc/commit/5c1a6f0b05
18:28 sena_kun Ah. Double-checking of the grammar before pushing is good.
18:32 avar geekosaur: Yeah, makes sense, but I can't see why that case wouldn't work, see https://github.com/niner/Inline-Perl6/issues/2
18:32 AlexDaniel joined #perl6
18:33 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:34 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:35 geekosaur (while remembering that MULTIPLICITY/ithreads exists because there are so many cases where it is *not* safe)
18:36 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 avar i.e. doing perl5 -> xs -> call_pv(<sub that evals some p5 code) works
18:36 avar so why not perl5 -> xs -> perl6 -> p5::call_pv(<...>)
18:38 nine geekosaur: there are no threads involved whatsoever
18:39 geekosaur ithreads is not necessarily about threads. it's about separate interpreters
18:39 geekosaur never mind, today is not the day for comprehension I guess
18:40 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
18:40 nine avar: otherwise it will try to create a new Perl 5 interpreter
18:40 geekosaur (ithreads is about "perl 5's guts are not reentrant", far more than it is about threads)
18:40 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"])]
18:40 avar hi
18:40 avar sweet, that works!
18:41 ufobat timotimo, i changed whenever $response -> $buf { ... } to $respons.tap(-> $buf {...}); i am acually wondering what's the difference
18:41 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 #perl6
18:47 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:50 avar the actual use-case for this is using perl5 to bootstrap perl6 modules, because perl5 is already embedded
18:51 avar E.g. running perl6 under the uwsgi webserver, or writing perl6 irssi plugins
18:51 avar So right now I have this working: https://gist.github.com/avar/1e4fdb8cead66242a0b61921abfe21fe
18:53 avar 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 avar But anyway, this seems to work for now with .default_perl5
18:53 nine Yes, that's what I had in mind
18:54 nine avar: note that usually, you'll not even use .default_perl5 in Perl 6 code but just use Foo:from<Perl5>;
18:55 nine Inline::Perl5 tries to stay politely in the background
19:00 edehont joined #perl6
19:05 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:07 AlexDaniel .
19:08 unmatched} :
19:09 brrt joined #perl6
19:13 AlexDaniel
19:14 hoelzro
19:14 unmatched}
19:15 unmatched}
19:15 geekosaur
19:16 AlexDaniel
19:17 AlexDaniel not sure if braille should be allowed in this game :)
19:18 hoelzro then I was first to cheat =/
19:25 Nope_ joined #perl6
19:28 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 Ybgh joined #perl6
19:31 kalkin-_ m: say $*PERL;
19:31 camelia rakudo-moar 715b82: OUTPUT«Perl 6 (6.c)␤»
19:32 spider-mario joined #perl6
19:32 labster joined #perl6
19:32 kalkin-_ m: say $*VM;
19:32 camelia rakudo-moar 715b82: OUTPUT«moar (2016.07.16.g.85.b.6537)␤»
19:33 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 unmatched} 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
19:34 kalkin-_ unmatched}: hmm i see
19:35 cdg joined #perl6
19:35 edehont joined #perl6
19:38 Ybgh joined #perl6
19:42 nine unmatched}: I wonder why you need HTTP::UserAgent only on old rakudos?
19:43 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 unmatched} Due to this: https://github.com/rakudo/rakudo/commit/715b822bfd
19:50 TEttinger joined #perl6
19:51 kalkin- It would be nice if the perl6.org would redirect always to http
19:51 AlexDaniel why?
19:53 sena_kun kalkin-, arguments?
19:53 kalkin- just asec telephone
19:54 edehont joined #perl6
19:54 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 moritz so, anybody who wants a HTTPS redirect please first change those tests
20:04 brrt joined #perl6
20:04 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 #perl6
20:06 sena_kun Folks, who are interested in the docs, please, look at https://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:09 harmil_wk joined #perl6
20:11 zacts joined #perl6
20:16 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:17 harmil_wk 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 #perl6
20:18 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
20:18 harmil_wk I absolutely agree that there are many cases where a real example is going to be needed.
20:19 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 #perl6
20:20 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:22 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
20:22 mspo https://books.google.com/books/about/C_in_a_Nutshell.html  check out chapter 17
20:23 pmurias they look simpler yes, but for some of them I don't have a clue wtf THINGY is
20:23 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.
20:23 perlpilot (FWIW)
20:24 MorayJ joined #perl6
20:24 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:26 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 firstdayonthejob joined #perl6
20:26 pmurias what's Bar:D: ?
20:27 DrForr A defined Bar type.
20:27 harmil_wk Instance of type Bar must be defined, no?
20:27 harmil_wk as in method foo(Bar:D:)
20:27 DrForr m: my Bar:D $d;
20:27 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␤␤»
20:27 DrForr m: my Int:D $d;
20:27 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␤»
20:27 ugexe different from Bar:D: (trailing :)
20:28 DrForr Oh, missed the trailing : there. /me looks for his bifocals.
20:28 harmil_wk m: class Bar { method foo(Bar:D:) {} }
20:28 camelia rakudo-moar 715b82: ( no output )
20:29 edehont joined #perl6
20:29 perlpilot note you can also have  class Foo { method foo(Bar:D:) { } }  # :)
20:29 ugexe m: class Bar { method foo(Bar:_:) {} } # >:)
20:29 camelia rakudo-moar 715b82: ( no output )
20:29 harmil_wk I think the english for that is definitely "Bar instance method foo"
20:29 geekosaur with the trailing : it means it's an explicit invocant
20:30 pmurias m: class Bar { method foo(Bar:D $self:) {...} }
20:30 camelia rakudo-moar 715b82: ( no output )
20:32 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:34 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
20:34 ugexe eh, im not a fan of seeing "instance method of blargh" everywhere
20:35 perlpilot moritz: And we already have lots of English just below to explain things.
20:35 perlpilot ugexe: me either
20:35 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?
20:35 ugexe its like s/$/SCALAR VARIABLE/
20:37 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 #perl6
20:38 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?
20:39 brrt i wonder if there is a metamodel way to create wraparound methods?
20:39 pmurias +1 real examples
20:39 pmurias -1 "Usage" blocks with the signature reworded in unclear pseudocode
20:40 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)
20:40 masak what I love about CPAN's USAGE blocks is that they are real code, often runnable directly after a copy-paste
20:40 hoelzro +1 SYNOPSIS
20:40 masak oh, right. SYNOPSIS, not USAGE
20:40 jnthn brrt: method foo() { ...before...; callsame(); ...after... } ?
20:41 jnthn 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?
20:41 brrt that would work
20:41 brrt how'd you implement that?
20:42 jnthn Couple of traits and subclassing ClassHOW, iirc :)
20:42 jnthn It's probably in a talk slide somewhere. :)
20:43 pierrot joined #perl6
20:44 jnthn brrt: Aspects example at the end of http://jnthn.net/papers/2012-gpw-meta-programming.pdf is at least related :)
20:47 * geekosaur spots "hovering explanations" in scrollback and flashes to what-if.xkcd.com :)
20:48 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:52 brrt cool, thanks
20:53 moritz harmil_wk: then that's something you should fix at the language level
20:54 moritz (and the hard part is to not make it too verbose or obscure to create constructors or potentially static methods)
20:55 moritz note that the specs also contain the foo(:D:) shortcut for a defined invocant, but rakudo doesn't implement it yet
20:55 moritz and I don't want to use that shortcut in the docs before it works in rakudo
20:57 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:59 moritz I don't think it's about throwing them away; it's more about having defaults that are less verbose
20:59 moritz and have less clutter, more importantly
21:00 moritz I agree that the clutter in the docs (and in tightly written code) is a problem
21:02 trnh joined #perl6
21:02 bronco_creek joined #perl6
21:03 bronco_creek o/ p6ers
21:04 hoelzro o/ bronco_creek
21:06 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:07 pierrot joined #perl6
21:08 Zoffix bronco_creek, try to install it with panda --force install Your::Module
21:08 Zoffix bronco_creek, how did you get that panda?
21:09 nine bronco_creek: do you use rakudobrew?
21:13 bronco_creek Zoffix - force worked.  Thanks!
21:13 bronco_creek Use, the force...
21:14 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 http://perldoc.perl.org/functions/getc.html - without a first string you won't be able
21:14 sena_kun to predict how many arguments can/should be passed.
21:14 Zoffix left #perl6
21:16 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:17 margeas joined #perl6
21:19 kalkin- back to the HTTPS topic. Sorry for being afk.
21:19 kalkin- moritz: thank you for the hint
21:21 kalkin- 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:22 AlexDaniel kalkin-: oh, so you meant “https”
21:22 kalkin- yeah https, sorry
21:23 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 AlexDaniel I mean, we already redirect on docs
21:24 AlexDaniel so far nobody complained, and after all I can't see why wikipedia can do that but we can't :)
21:25 AlexDaniel 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.
21:25 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
21:29 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 ;)
21:29 kalkin- lol :)
21:30 AlexDaniel sena_kun: the one on 14:39 ?
21:30 AlexDaniel sena_kun: the one on *:14:39 ? :)
21:31 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
21:31 sena_kun Ah.
21:31 AlexDaniel sena_kun: oh wow, either I didn't or we should synchronize our clocks
21:32 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
21:32 kalkin- Does Rakudo even officially support Windows XP?
21:33 masak especially considering things like http://starecat.com/content/wp-content/uploads/your-free-windows-10-update-is-here-on-old-windows-3-11.jpg
21:35 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 jnthn kalkin-: That said, I'm not aware of anyone doing testing/development there, so "officially no" I guess :)
21:36 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
21:36 sena_kun AlexDaniel, ah, good then. (:
21:38 kalkin- jnthn: ahh i see. thanks
21:41 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).
21:41 AlexDaniel well yeah, just what you said
21:43 AlexDaniel sena_kun: by the way, ++ for trying to get people to comment.
21:44 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
21:45 hoelzro it's so amazing to see how much work people are putting into the docs!
21:45 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 sena_kun Also, I think, https://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 sena_kun s/to try/to see/
21:46 sena_kun 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
21:50 nine If XP is a real concern, just serve http to XP users and redirect everyone else to https
21:53 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 Sgeo__ joined #perl6
21:55 MilkmanDan joined #perl6
21:56 dalek doc: c434b74 | (Josh Soref)++ | htmlify.p6:
21:56 dalek doc: work around duplicate id= anchors #631
21:56 dalek doc: review: https://github.com/perl6/doc/commit/c434b7417d
21:56 dalek doc: bf349d8 | (Aleks-Daniel Jakimenko-Aleksejev)++ | htmlify.p6:
21:56 dalek doc: Merge pull request #632 from jsoref/dup-id
21:56 dalek doc:
21:56 dalek doc: work around duplicate id= anchors
21:56 dalek doc: review: https://github.com/perl6/doc/commit/bf349d8813
21:57 dalek doc: c4f58b9 | (Aleks-Daniel Jakimenko-Aleksejev)++ | htmlify.p6:
21:57 dalek doc: Add ( ) around type name for more clarity
21:57 dalek doc: review: https://github.com/perl6/doc/commit/c4f58b9987
21:58 AlexDaniel sena_kun: will rerun checklink as soon as it goes live
21:58 sena_kun AlexDaniel, thanks for your efforts.
22:00 AlexDaniel sena_kun: thank you too
22:01 edehont joined #perl6
22:01 AlexDaniel m: use MONKEY-BUSINESS
22:01 camelia rakudo-moar 715b82: ( no output )
22:01 AlexDaniel does anybody know the purpose of these?
22:01 AlexDaniel I mean, OK, these are reserved. But why?
22:02 sena_kun AlexDaniel, you need to ask TimToady, I suppose.
22:02 AlexDaniel why MONKEY-WRENCH and not MONKEY-SCREWDRIVER? What's the joke?
22:04 geekosaur English idiom
22:04 geekosaur oh, apparently it's specifically American idiom
22:04 geekosaur http://idioms.thefreedictionary.com/throw+a+monkey+wrench+into
22:05 parabolize https://en.wikipedia.org/wiki/Monkey_wrench
22:05 AlexDaniel OK, but why reserve it?
22:07 geekosaur ask timtoady
22:07 geekosaur (he made the reserved list)
22:08 jnthn Obviously, we're reserving it because we "don't want to be *your* monkey wrench" :P
22:09 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...
22:09 jnthn (Song reference fwiw :))
22:09 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"
22:09 TimToady but also so that you can say "use MONKEY;" and get all of them at once
22:10 TimToady as sort of a future guarantee of idiocy
22:10 TimToady m: use MONKEY; my $_ = "something dangerous"; EVAL "say '$_'"
22:10 camelia rakudo-moar 715b82: OUTPUT«Potential difficulties:␤    Redeclaration of symbol $_␤    at <tmp>:1␤    ------> 3use MONKEY; my $_7⏏5 = "something dangerous"; EVAL "say '$_'␤something dangerous␤»
22:11 TimToady m: use MONKEY; $_ = "something dangerous"; EVAL "say '$_'"
22:11 camelia rakudo-moar 715b82: OUTPUT«something dangerous␤»
22:11 TimToady not to encourage that in production code, but it's handier than having to say MONKEY-SEE-NO-EVAL every time
22:12 hoelzro jnthn++ # reference
22:13 TimToady and the boss can still scan for MONKEY in your code
22:15 aries_liuxueyang joined #perl6
22:16 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 #perl6
22:17 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␤␤»
22:17 TimToady hmm
22:17 TimToady m: use MONKEY-GUTS; 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␤␤»
22:18 geekosaur typo
22:18 geekosaur npq?
22:18 TimToady ah
22:18 TimToady m: use MONKEY; say nqp::die('oof')
22:18 camelia rakudo-moar 715b82: OUTPUT«oof␤  in block <unit> at <tmp> line 1␤␤»
22:18 TimToady there we go
22:19 TimToady 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:22 TimToady 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:23 TimToady 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:26 masak m: EVAL q[say "hi"]
22:26 camelia rakudo-moar 715b82: OUTPUT«hi␤»
22:26 masak huh.
22:26 masak ...wait, so now `EVAL` is fine without any pragma again?
22:27 masak I thought we hated it? :P
22:27 timotimo if you don't interpolate the string, it's fine
22:28 skids joined #perl6
22:28 masak m: my $name = "Bob"; EVAL q[say "hi, um, $name"]
22:28 camelia rakudo-moar 715b82: OUTPUT«hi, um, Bob␤»
22:28 masak timotimo: there is no such restriction
22:29 masak my next question then becomes: what does `MONKEY-SEE-NO-EVAL` actually *do*?
22:30 adu joined #perl6
22:31 masak 'night, #perl6
22:33 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…»
22:35 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…»
22:35 timotimo it's amusing that the $name ended up interpolating anyway :)
22:35 TimToady m: use MONKEY; my $name = "Bobby Tables'; die 'oops"; EVAL qq[say 'hi, um, $name']
22:35 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␤␤»
22:35 TimToady timotimo: but in a single quoted string, you still control the code
22:36 TimToady it's only when you interpolate at the EVAL level that you get injection
22:36 timotimo that's right
22:40 espadrine joined #perl6
22:51 AlexDaniel .oO( now let's do the same thing with “run” )
22:51 AlexDaniel I mean, “shell”. Run is fine
22:55 tbrowder_ joined #perl6
22:55 Spot___ joined #perl6
23:03 pierrot joined #perl6
23:07 araujo_ joined #perl6
23:09 pierre_ joined #perl6
23:15 pierre_ joined #perl6
23:15 sena_kun Can someone more native than me check a little paragraph of text? http://pastie.org/private/wqfldwljszvwullnbfo2q - it's for an important page(CONTRIBUTING.md) and I'm a bit too sleepy now.
23:25 labster joined #perl6
23:27 BrassLantern joined #perl6
23:27 avar sena_kun: That has no meaning to me without some context
23:28 Xliff joined #perl6
23:31 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 :)
23:32 sena_kun AlexDaniel, GOD, NOT AGAIN.
23:32 AlexDaniel sena_kun: the output of checklink is longer than it was yesterday
23:32 AlexDaniel sena_kun: not published yet, because it is not finished
23:32 infina joined #perl6
23:33 sena_kun AlexDaniel, what part is the worst this time?
23:33 sena_kun And how much longer?
23:33 sena_kun Just a bit? Or we ruined something?
23:34 AlexDaniel sena_kun: it seems like the issue with duplicate anchors is fixed, but checklink complains anyway because of <a><a></a></a>
23:35 AlexDaniel it is 19k lines already
23:35 AlexDaniel but I'm hoping that it will stop soon :)
23:35 sena_kun AlexDaniel, do we have #fragments(i.e. broken anchors) issue there? # If yes, it's my time to pray.
23:36 AlexDaniel OK finished
23:36 AlexDaniel 19838 I'll gist it now
23:37 AlexDaniel sena_kun: https://gist.github.com/AlexDaniel/fc6cb8d6f66516c837268d43ecc47c33
23:38 infina joined #perl6
23:39 sena_kun Aaaaaaah.
23:39 sena_kun AlexDaniel, I understood.
23:40 AlexDaniel I'd be happy to rerun it after a fix so that we have a pretty graph without that spike…
23:41 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:42 sena_kun Since we have `(Str) sub val`, not just `sub val`.
23:43 sena_kun (Real)_ceiling instead of routine_ceiling.
23:44 sena_kun I can adapt my solution to this, but I'm not sure what to do about <a><a></a></a> problem.
23:44 sena_kun AlexDaniel, do we need a magically looking fix for the most of the output now?
23:45 AlexDaniel sena_kun: why not?
23:45 margeas joined #perl6
23:46 AlexDaniel you can leave it for tomorrow if you want
23:47 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:55 dalek doc: e999d86 | (Tom Browder)++ | doc/Language/experimental.pod6:
23:55 dalek doc: add new page for experimental features
23:55 dalek doc: review: https://github.com/perl6/doc/commit/e999d86bf9
23:55 dalek doc: bf92543 | (Tom Browder)++ | doc/Language/experimental.pod6:
23:55 dalek doc: Merge pull request #813 from tbrowder/experimental
23:55 dalek doc:
23:55 dalek doc: add new page for experimental features
23:55 dalek doc: review: https://github.com/perl6/doc/commit/bf92543425

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo