Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2016-04-04

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:00 johndau joined #perl6
00:01 autarch joined #perl6
00:08 autarch joined #perl6
00:12 AlexDaniel joined #perl6
00:13 Herby_ joined #perl6
00:13 Herby_ Evening, everyone!
00:13 Herby_ \o
00:13 timotimo just as i was about to hop into be d:|
00:14 Herby_ timotimo: where you hopping to?
00:33 Vlavv_ joined #perl6
00:38 vendethiel joined #perl6
00:43 pierrot_ joined #perl6
00:48 Actualeyes joined #perl6
00:53 johndau` joined #perl6
00:57 cognominal_ method from-list(Supply:U: +@values, :$scheduler = CurrentThreadScheduler) {   # what the + is meaning here ?
00:58 Sgeo joined #perl6
00:58 raiph cognominal: http://doc.perl6.org/language​/functions#Slurpy_Conventions
01:01 raiph cognominal_: ^^
01:03 cognominal_ thx ralph++
01:07 vendethiel joined #perl6
01:10 johndau joined #perl6
01:24 BenGoldberg joined #perl6
01:35 vendethiel joined #perl6
01:46 snarkyboojum joined #perl6
01:46 snarkyboojum left #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | https://perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:,  or /msg camelia p6: ... | irclog: http://irc.perl6.org or http://colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
01:49 molaf joined #perl6
01:52 AlexDaniel ZoffixWin: “Kinda sucks that the "actually thrown at" line number is still the one where I attempted to use $x, not where the division is in the code.”
01:52 AlexDaniel ZoffixWin: right, because there is no problem with the division
01:52 AlexDaniel ZoffixWin: 0/0 is a great looking Rat
01:52 AlexDaniel m: say (0/0).WHAT
01:52 camelia rakudo-moar 868d8b: OUTPUT«(Rat)␤»
01:52 AlexDaniel m: say (0/0).nude
01:52 camelia rakudo-moar 868d8b: OUTPUT«(0 0)␤»
01:54 AlexDaniel ah, it was pointed out a bit later, ok
01:55 Xliff Can someone tell me what this error means when coming from NativeCall?
01:55 Xliff Cannot locate symbol '' in native library ''
01:55 Xliff That's when I try and execute a function through a function pointer reset with nativecast()
01:56 Xliff The functions are set in a CStruct via the only call exposed.
02:10 kid511 joined #perl6
02:38 kentnl joined #perl6
02:41 noganex joined #perl6
02:49 AlexDaniel ZoffixWin: hmm… however, in maths, rational numbers must have non-zero denominator
02:50 gfldex it's a lazy division by zero :->
02:53 labster joined #perl6
02:54 Herby_ out of curiosity, what text editor do yall use for perl 6?
02:54 gfldex "yall" is using an array of editors. Popular seam to be vim and atom.
03:01 snarkyboojum joined #perl6
03:01 Xliff Hrm.
03:02 Xliff My perl script is not showing the output of "say" from sub main {}. Am I missing something?
03:02 Xliff Lemme pastebin.
03:02 pierrot joined #perl6
03:10 Xliff http://pastebin.com/0f4fwVRV
03:10 Xliff I get no out from that script. Any ideas?
03:10 Xliff TIA!
03:11 gfldex "AD-BLOCK DETECTED - Please Support Pastebin By Buying A PRO Account" ... "This page has been removed!"
03:11 gfldex and at least 4 tracking scripts
03:12 Xliff :(
03:12 Xliff I broke down and got a PRO account.
03:12 Xliff Or at least a free one and whitelisted the domain. Not sure.
03:12 Xliff Pastebin is too useful. :/
03:12 teatime lol wat
03:13 teatime there are a zillion paste services
03:13 gfldex https://gist.github.com/ <-- free pro account :->
03:13 Xliff *snark*
03:13 Xliff I want my gists to be a little more mature than 'OHAI! HALP!'
03:14 skids Um... repr CPointer with attributes?
03:14 teatime you can make the transitory ones anonymous or secre
03:14 teatime but there are a zillion paste services
03:14 gfldex i like gists because it's easy to work with from the CLI
03:15 gfldex and i can fork and update them, what is nice if the script is a little longer
03:16 AlexDaniel Xliff: you can use gists instead
03:16 Xliff OK! OK!
03:16 AlexDaniel Xliff: or bitbucket snippets, or gitlab snippets
03:16 Xliff First everyone was like USE PASTEBIN MOAR!
03:16 Xliff Now I have to adjust.
03:16 AlexDaniel Xliff: in fact, camelia accepts everything that I've mentioned
03:16 teatime people say pastebin the same way google=search
03:16 Xliff =P
03:16 teatime or xerox=photocopy
03:17 skids or grep==filter :-)
03:17 AlexDaniel we should probably star saying “gist it” for a while until github gists are still OK
03:17 AlexDaniel start*
03:17 AlexDaniel I mean, while github gists are ok…
03:17 AlexDaniel until they follow the path of pastebin
03:18 AlexDaniel it*…
03:18 teatime I guess this is why every project channel seems to have its own custom pastebin
03:18 teatime I have never used this one, but ran across it earlier today and it looks cool:  http://ix.io/
03:18 teatime I put it on my list to look at later.
03:19 teatime night-night #perl6
03:19 Xliff https://gist.github.com/Xliff/b​3e0dfd7ab712aee7ef59975decd42d8
03:19 AlexDaniel teatime: I don't think that there is any need for that. I'd much rather add more support for different pastebins than create our own
03:19 gfldex m: https://gist.github.com/Xliff/b​3e0dfd7ab712aee7ef59975decd42d8
03:19 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/_Xh7Ts7fIj␤Bogus statement␤at /tmp/_Xh7Ts7fIj:3␤------> 3<BOL>7⏏5```perl␤    expecting any of:␤        prefix␤        term␤»
03:19 teatime AlexDaniel: I wasn't telling you what to do, just making an observation.
03:19 Xliff I use Markdown markups for this.
03:19 Xliff Let me edit those out.
03:19 AlexDaniel teatime: sure :)
03:20 gfldex i found that making it easy to be helped a winning strategy
03:20 Xliff m: https://gist.github.com/Xliff/b​3e0dfd7ab712aee7ef59975decd42d8
03:20 camelia rakudo-moar 868d8b: ( no output )
03:20 * skids wonders if there's a freenode-ish paste service.
03:21 Xliff Which isn't shocking coz of missing lib.... but still strange that there is no error.
03:21 AlexDaniel teatime: I'm just saying that it was very easy for me to add support for gitlab and bitbucket, and I will happily add more if you manage to find some gisty thing that happens to be popular
03:21 gfldex try MAIN instead if main
03:21 gfldex given you dont got a arguments list to MAIN you may want to drop it altogether
03:22 Xliff Cannot locate native library 'liblibtest.so': liblibtest.so
03:22 Xliff HAHAHAHAHA!
03:22 gfldex unless you seek aproval of the randudancy ministry of radundancy approval
03:22 Xliff Cannot locate native library 'libtest.so'
03:23 Xliff Hunh? libtest.so is in the current dir!
03:23 gfldex i'm not sure if . is in the default lib path
03:24 Xliff What's the best way to force it to look in cwd?
03:24 AlexDaniel LD_LIBRARY_PATH=.
03:24 Xliff Heh. 'k
03:24 AlexDaniel actually, I'm not sure if that works. Try it
03:26 Xliff Did
03:26 Xliff This representation (CPointer) does not support attribute storage
03:26 Xliff Not attributes! Struct members. But maybe done coz I used methods in the class.
03:27 skids Xliff: like I said above, you can't do that.
03:27 gfldex try `dd $ts` instead of .WHAT.
03:28 skids maybe you want repr CStruct?
03:28 gfldex the introspection part of Perl 6 objects comes from a wee bit of magic and a role. The CStruct got neither.
03:29 gfldex even if it would work, it would be a little wrong. It's a foreign object after all.
03:29 gfldex These are hard times for foreigners it seams. :(
03:29 perlawhirl joined #perl6
03:32 djbkd joined #perl6
03:32 Xliff Oh yah! DUh!
03:38 Xliff Native call expected return type with CPointer representation, but got a CStruct
03:38 Xliff Progress!
03:41 Xliff OK. Now I am returning pointer.
03:41 Xliff How do I cast Pointer back to a defined type? nativecast() again?
03:42 * Xliff is beginning to think that CPP name mangling might be easier... *sigh*
03:42 Xliff Thanks for all of the help, guys.
03:45 Herby_ poking around in the perl6intro
03:45 Herby_ why is the ':' necessary here:   %capitals.push: (France => 'Paris');
03:47 Herby_ compared to pushing something into an array
03:48 AlexDaniel m: my %capitals; %capitals.push((France => ‘Paris’)); say %capitals
03:48 camelia rakudo-moar 868d8b: OUTPUT«France => Paris␤»
03:48 Herby_ or is the answer "just cause"
03:48 AlexDaniel Herby_: ↑ not that you actually need : there
03:48 AlexDaniel Herby_: you can use regular parens
03:48 AlexDaniel m: my %capitals; %capitals.push(France => ‘Paris’); say %capitals
03:48 camelia rakudo-moar 868d8b: OUTPUT«␤»
03:48 Herby_ ahh. the ':' takes place of the parens?
03:48 AlexDaniel ouch
03:48 Herby_ yeah, thats what threw me off
03:49 AlexDaniel Herby_: yeah. Basically, yes
03:49 AlexDaniel m: say(‘hello world’)
03:49 camelia rakudo-moar 868d8b: OUTPUT«hello world␤»
03:49 AlexDaniel m: say ‘hello world’
03:49 camelia rakudo-moar 868d8b: OUTPUT«hello world␤»
03:50 Herby_ my @a = [1,2,3]; @a.push: (4); say @a;
03:50 Herby_ m: my @a = [1,2,3]; @a.push: (4); say @a;
03:50 camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
03:50 Herby_ m: my @a = [1,2,3]; @a.push: 4; say @a;
03:50 camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
03:50 gfldex m: my @capitals; @capitals.push: 'abc'; say @capitals
03:50 camelia rakudo-moar 868d8b: OUTPUT«[abc]␤»
03:50 gfldex m: my %capitals; %capitals.push: France => ‘Paris’; say %capitals
03:50 AlexDaniel well, if you want to blow your mind, then
03:50 camelia rakudo-moar 868d8b: OUTPUT«␤»
03:50 gfldex bad example if you ask me
03:50 AlexDaniel m: my @a = [1,2,3]; push @a: 4; say @a;
03:50 camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
03:51 gfldex i don't think that's the same colon.
03:51 Herby_ m: my @a = [1,2,3]; my $b = 'blah'; push @a: $b; say @a;
03:51 camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 blah]␤»
03:51 AlexDaniel gfldex: it kinda is
03:53 gfldex m: my method foo(Int $i: Str $b){};
03:53 camelia rakudo-moar 868d8b: ( no output )
03:53 gfldex i think your example is this kind of colon
03:55 AlexDaniel gfldex: actually I have no idea how that ↑ works. But push @a: $b just calls a method push on @a
03:55 gfldex the invocant form works both for defining methods and calling them
03:57 BenGoldberg m: my %c; %c.push: a:('b'); say %c;
03:57 camelia rakudo-moar 868d8b: OUTPUT«===SORRY!===␤This type does not support positional operations␤»
03:57 AlexDaniel but the point is that's still a method call, so I'd say that it is the same kind of a colon. Or it looks so… whatever :/
03:57 AlexDaniel lta :(
03:57 BenGoldberg m: my %c; %c.push: a => 'b'; say %c;
03:57 camelia rakudo-moar 868d8b: OUTPUT«␤»
03:57 BenGoldberg m: my %c; %c.push: (a => 'b'); say %c;
03:57 camelia rakudo-moar 868d8b: OUTPUT«a => b␤»
03:59 gfldex m: my @a = [1,2,3]; Array.push(@a: 4); say @a;
03:59 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/HKLmsKl8wH␤Unable to parse expression in argument list; couldn't find final ')' ␤at /tmp/HKLmsKl8wH:1␤------> 3my @a = [1,2,3]; Array.push(@a:7⏏5 4); say @a;␤    expecting any of:␤        colon …»
03:59 BenGoldberg m: my @a; say @a.WHAT;
03:59 camelia rakudo-moar 868d8b: OUTPUT«(Array)␤»
03:59 AlexDaniel m: my @a; push @a: @a.push: push @a: ‘x’
03:59 camelia rakudo-moar 868d8b: ( no output )
04:00 BenGoldberg ^ You forgot to say the result ;)
04:00 AlexDaniel needs more colons
04:00 AlexDaniel m: my @a; push @a: @a.push: push @a: :25x
04:00 camelia rakudo-moar 868d8b: ( no output )
04:00 BenGoldberg m: my @a; push @a: @a.push: push @a: ‘x’; say @a;
04:00 camelia rakudo-moar 868d8b: OUTPUT«(\Array_74311936 = [x Array_74311936 Array_74311936])␤»
04:00 AlexDaniel BenGoldberg: I didn't really want to show that… :)
04:00 gfldex m: my @a; push @a: @a.push: push @a: :25x; dd @a;
04:00 camelia rakudo-moar 868d8b: OUTPUT«Array @a = (my \Array_78530768 = [Array_78530768, Array_78530768])␤»
04:00 AlexDaniel because… look… :)
04:01 gfldex if somebody boldly declaired to be a Perl 6 expert, I would let him braincompile that. :)
04:02 BenGoldberg It looks like a perfectly ordinary circular data structure, to me ;)
04:03 AlexDaniel BenGoldberg: oh well! Maybe you will like this one
04:03 AlexDaniel m: my $x := (my $y := $x);
04:03 camelia rakudo-moar 868d8b: ( no output )
04:03 AlexDaniel and if you're wondering WHAT is that
04:04 AlexDaniel then the right answer is
04:04 BenGoldberg m: say my $x := (my $y := $x);
04:04 camelia rakudo-moar 868d8b: OUTPUT«(Mu)␤»
04:04 AlexDaniel m: my $x := (my $y := $x); say $x.WHAT
04:04 camelia rakudo-moar 868d8b: OUTPUT«(signal SEGV)»
04:04 gfldex m: my $x := (my $y := $x); .say for $x;
04:04 camelia rakudo-moar 868d8b: OUTPUT«Cannot call method 'map' on a null object␤  in block <unit> at /tmp/h1BT_dK_g7 line 1␤␤»
04:04 AlexDaniel SEGV!
04:04 gfldex please rakudobug
04:04 AlexDaniel hold on a second…
04:04 gfldex m: my $x := (my $y := $x); dd $x;
04:04 camelia rakudo-moar 868d8b: OUTPUT«Mu␤»
04:04 AlexDaniel gfldex: done! https://rt.perl.org/Ticket/Display.html?id=127254
04:05 skids m: m: say my $x := (my $y := $x); $x = 42;
04:05 camelia rakudo-moar 868d8b: OUTPUT«(signal SEGV)(Mu)␤»
04:05 BenGoldberg Alas, it is now past my bedtime.
04:06 gfldex you traveled back in time yust to rakudobug? Colour me impressed!
04:09 perlawhirl hi perlers
04:13 perlawhirl wow, i'm was surprised to see lizmat implement my '.where' idea and then roll back. reading thorugh the irc logs, i feel like i created a monster
04:14 Herby_ hello perlawhirl!
04:14 Herby_ o/
04:14 perlawhirl hi
04:32 vendethiel joined #perl6
04:33 Herby_ m: my @a = <1 2 3 4 5 6>; say map(-> $x { $x ** 2 if $x > 3 }, @a);
04:33 camelia rakudo-moar 868d8b: OUTPUT«(16 25 36)␤»
04:35 Herby_ m: my @a = <1 2 3 4 5 6>; say $y = 10; say map(-> $x { $y + $x ** 2 if $x > 3 }, @a);
04:35 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FRjPA07TDx␤Variable '$y' is not declared␤at /tmp/FRjPA07TDx:1␤------> 3my @a = <1 2 3 4 5 6>; say 7⏏5$y = 10; say map(-> $x { $y + $x ** 2 if␤»
04:35 Herby_ m: my @a = <1 2 3 4 5 6>; say $y = 10; say map(-> $x $y { $y + $x ** 2 if $x > 3 }, @a);
04:35 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/z1VAKrJz0V␤Variable '$y' is not declared␤at /tmp/z1VAKrJz0V:1␤------> 3my @a = <1 2 3 4 5 6>; say 7⏏5$y = 10; say map(-> $x $y { $y + $x ** 2␤»
04:35 Herby_ m: my @a = <1 2 3 4 5 6>; say $y = 10; say map(-> ($x,$y) { $y + $x ** 2 if $x > 3 }, @a);
04:35 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/xwD4GLffDt␤Variable '$y' is not declared␤at /tmp/xwD4GLffDt:1␤------> 3my @a = <1 2 3 4 5 6>; say 7⏏5$y = 10; say map(-> ($x,$y) { $y + $x **␤»
04:35 Herby_ hmmm
04:35 Herby_ m: my @a = <1 2 3 4 5 6>; say my $y = 10; say map(-> ($x,$y) { $y + $x ** 2 if $x > 3 }, @a);
04:35 camelia rakudo-moar 868d8b: OUTPUT«10␤Too few positionals passed; expected 2 arguments but got 0 in sub-signature␤  in block <unit> at /tmp/FnCJO1AAGn line 1␤␤»
04:35 Herby_ m: my @a = <1 2 3 4 5 6>; say my $y = 10; say map(-> $x { $y + $x ** 2 if $x > 3 }, @a);
04:36 camelia rakudo-moar 868d8b: OUTPUT«10␤(26 35 46)␤»
04:37 gfldex m: my @a = <1 2 3 4 5 6>; INIT my $y = 10; say map(-> $x { $y + $x ** 2 if $x > 3 }, @a);
04:37 camelia rakudo-moar 868d8b: OUTPUT«(26 35 46)␤»
04:38 Herby_ m: my @a = <1 2 3 4 5 6>; say my @y = <13 14 15 16 17>; say map(-> $x $y { $y + $x ** 2 if $x > 3 }, (@a, @y));
04:38 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QHfRq595VT␤Malformed parameter␤at /tmp/QHfRq595VT:1␤------> 3 my @y = <13 14 15 16 17>; say map(-> $x7⏏5 $y { $y + $x ** 2 if $x > 3 }, (@a, @y)␤    expecting any of:␤        constraint␤»
04:39 Herby_ bedtime, night everyone
04:42 Cabanossi joined #perl6
04:51 geekosaur joined #perl6
05:23 CIAvash joined #perl6
05:30 nakiro joined #perl6
05:34 _nadim joined #perl6
05:52 Relsak joined #perl6
06:08 djbkd joined #perl6
06:19 Xliff OK, here is something that I am not getting with NativeCall.
06:20 Xliff If I have a C function that returns Pointer to a Struct, and I have that Struct represented with a P6 Class. How can I convert that pointer back into the usable Class reference?
06:21 firstdayonthejob joined #perl6
06:24 domidumont joined #perl6
06:24 Xliff Updated gist: https://gist.github.com/Xliff/b​3e0dfd7ab712aee7ef59975decd42d8
06:34 DrForr Xliff: I've only ever done callbacks to regular subroutines, I'd suggest that method signatures don't necessarily match the function signatures.
06:36 DrForr Also, just for my own curiosity - You're using 'int' for the Perl type corresponding to C's native int, I thought we were suppsoed to use 'int32' (not portable, I know...)
06:36 Timbus Xliff, at a guess, you want $!s to be Pointer[Str] ?
06:37 Timbus and you need to use, uh, .deref?
06:37 Timbus lemme see if i can compile yer example
06:38 Timbus ↳⃣ LD_LIBRARY_PATH='.' perl6 thing.pl
06:38 Timbus Hello perl6!
06:38 Timbus True
06:38 Timbus DONE!
06:38 Timbus there we  go
06:39 Timbus you seem to be doing some fancy stuff up in here, so I'm not sure why you missed that smallish detail..
06:42 DrForr Aaah, deref. Knew it was too early for this sh*t :)
06:42 Timbus changing the Pointer[Str] to just a Str also does what you want, and you don't have to deref.. is that what you wanted?
06:45 perlawhirl DrForr: hi. I'm having problems install Readline on centos 6. I logged an issue
06:45 domidumont joined #perl6
06:45 perlawhirl initially i thought it was a prob with libreadline6, but someone pointed out to me in the readline source that it also refers to version 6
06:45 perlawhirl so... *shrug*
06:46 DrForr Let me see if it's a quick fix. (I'm at work)
06:46 perlawhirl ta
06:48 fireartist joined #perl6
06:49 DrForr (need to rebuild rakudo here, this laptop hasn't been cleaned up for a while.
06:49 DrForr s/$/)
06:49 domidumont joined #perl6
06:54 perlawhirl .tell dogbert1 my 'first :kv' patch has been merged
06:54 yoleaux perlawhirl: I'll pass your message to dogbert1.
06:57 ufobat morning perl6
06:58 _nadim joined #perl6
07:03 _nadim joined #perl6
07:04 pierrot joined #perl6
07:06 wamba joined #perl6
07:08 _nadim joined #perl6
07:09 zakharyas joined #perl6
07:14 zhi joined #perl6
07:15 DrForr Building Panda locally so I can check over a few things.
07:16 perlawhirl thanks
07:21 Relsak joined #perl6
07:25 ely-se joined #perl6
07:29 DrForr https://github.com/drforr/perl6-readline/issues/10 - This is it?
07:35 perlawhirl yes
07:37 pdcawley joined #perl6
07:37 edjsu joined #perl6
07:38 orbus joined #perl6
07:39 Some-body_ joined #perl6
07:39 labster joined #perl6
07:39 ggoebel16 joined #perl6
07:40 petercommand joined #perl6
07:41 DrForr Maybe free_keymap is actually superseded by discard_keymap.
07:43 grassass joined #perl6
07:44 huf joined #perl6
07:44 emdashcomma joined #perl6
07:45 Xliff DrForr, holy crap! Thanks a lot!
07:45 Xliff Let me make updates and see if I can get it to work.
07:46 Xliff Timus, Thank you too!
07:46 Xliff s/Timus/Timbus/
07:47 DrForr https://github.com/drforr/perl6-readline/com​mit/427c2193609c1012294bcfc059f863cfa83c5ec9
07:48 abraxxa joined #perl6
07:48 Xliff Hrm. I'm getting a SegFault... :/
07:48 DrForr I think (as I mentioned in the comment) TRT is to just flesh out the Keymap class so that I can amange memory there automatically, but I wrote this thing back when NativeCall was still in its teething stages so it's dobutless got some issues.
07:49 Xliff Timbus: Can you post your thing.pl on my gist?
07:49 Xliff https://gist.github.com/Xliff/b​3e0dfd7ab712aee7ef59975decd42d8
07:49 Xliff Thanks.
07:50 hankache joined #perl6
07:50 hankache morning
07:50 DrForr Back in a few minutes, need to take care of some accounting business.
07:52 Xliff hankache, \o
07:52 hankache hiya Xliff
07:53 Timbus Xliff, uh, in the end I only changed one line I think..
07:54 Khisanth joined #perl6
07:54 Xliff Timbus, I think I changed the same one and I'm getting the same SegFault I was getting before.
07:54 Xliff :/
07:54 Timbus oh..
07:54 Timbus well, I pasted the change there
07:54 Xliff So I'm rebuilding rakudo.
07:55 Xliff And trying again.
07:55 Timbus both of the structs i pasted work, for me
07:55 Xliff kk! Thanks for the help!
07:56 Xliff Still wondering why the extra "True" is emitted.
07:56 perlawhirl joined #perl6
07:56 Xliff it's something in print_S()
07:56 Xliff \o perlawhirl
07:56 RabidGravy joined #perl6
07:57 perlawhirl hi
07:57 hankache hola
07:57 Timbus Xliff, because print_S returns True
07:57 RabidGravy erp
07:57 perlawhirl DrForr: Thanks, worked a treat
07:58 Xliff Timbus, o
07:58 perlawhirl ah, he's afk
07:58 DrForr Oh, no, just got back.
07:58 perlawhirl .tell DrForr thanks it worked!
07:58 yoleaux perlawhirl: I'll pass your message to DrForr.
07:58 perlawhirl oh darnin
07:59 DrForr No worries.
07:59 yoleaux 07:58Z <perlawhirl> DrForr: thanks it worked!
07:59 perlawhirl darnit
07:59 perlawhirl hah
08:01 perlawhirl joined #perl6
08:01 Xliff *grr* -- Still getting a SegFault. WTF?
08:01 Xliff Timbus: What gcc version are you using?
08:01 hankache anyone knows how start and await function?
08:01 hankache https://gist.github.com/hankache/​bbbe41812a1dceb6f6e478ff5228e383
08:02 hankache i can't figure out why it's not running in parallel
08:02 hankache am i missing something?
08:03 Timbus gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4
08:04 Timbus huh.. thought i was using 4.9. but okay
08:05 CIAvash joined #perl6
08:07 dakkar joined #perl6
08:08 snarkyboojum joined #perl6
08:10 g4 joined #perl6
08:12 Xliff BOO YAH!
08:12 Xliff Timbus: I forgot to change the [int]s to [int32]s
08:12 Xliff Now it works.
08:13 Timbus ah, yeah I should have included that
08:13 Xliff =)
08:14 Timbus glad it worked
08:14 Xliff No worries. You got me there. I am forever greatful.
08:14 Xliff Unfortunately this is a stripped down version of what I'm *really* trying to do.
08:14 gfldex hankache: start will start a thread for the given code object. You provided an expression that is evaluated and it's return value is seen as a value that is not a code object and thus returned by start (and stored in $promise\d)
08:15 Xliff Timbus: I'm trying to get a working NativeCall implementation of this...
08:15 Xliff http://xqilla.sourceforge.net/docs/xqc​-api/structXQC__Implementation__s.html
08:15 Xliff Will apply lessons learned, tomorrow.
08:15 Xliff It's 4am here. :/
08:15 Xliff (It's not tomorrow until I wake up, dammit!)
08:16 gfldex hankache: see method race and method hyper
08:16 hankache gfldex thanks
08:17 hankache i think the key is to put promises in an array
08:17 darutoko joined #perl6
08:17 hankache and await @promises
08:18 hankache gfldex see my comment on the gist
08:19 hankache gfldex oh no! i made a mistake. still not working
08:20 gfldex hankache: try `start { @array1.map( {is-prime($_ + 1)} ) };`
08:20 gfldex may need a `do` too
08:23 hankache no luck!
08:25 RabidGravy what makes you think it isn't being run concurrently>
08:25 hankache its taking more time!
08:26 hankache and only one core is being used
08:28 rindolf joined #perl6
08:28 gfldex m: say (0..49999).race.map({is-prime($^a+1)}) == (2..50001).race.map({is-prime($^a-1)})
08:28 camelia rakudo-moar 868d8b: OUTPUT«Cannot call Numeric(HyperSeq: ); none of these signatures match:␤    (Mu:U \v: *%_)␤  in block <unit> at /tmp/P5L4ynMQxm line 1␤␤»
08:29 gfldex are HyperSeqs meant to be comparable?
08:30 moritz m: say (0..49999).race.map({is-prime($^a+1)}).elems == (2..50001).race.map({is-prime($^a-1)}).elems
08:30 RabidGravy hankache, just left a comment on your gist showing it *is* being run in parallel
08:30 camelia rakudo-moar 868d8b: OUTPUT«(signal XCPU)»
08:31 moritz m: say (0..4999).race.map({is-prime($^a+1)}).elems == (2..5001).race.map({is-prime($^a-1)}).elems
08:31 camelia rakudo-moar 868d8b: OUTPUT«True␤»
08:33 gfldex m: say (0..49999).race.map({is-prime($^a+1)}) (cont) (2..50001).race.map({is-prime($^a-1)})
08:33 camelia rakudo-moar 868d8b: OUTPUT«(signal XCPU)»
08:33 gfldex m: say (0..4999).race.map({is-prime($^a+1)}) (cont) (2..5001).race.map({is-prime($^a-1)})
08:33 camelia rakudo-moar 868d8b: OUTPUT«False␤»
08:33 gfldex they are comparable
08:33 hankache thanks RabidGravy
08:36 vendethiel joined #perl6
08:40 ZoffixWin AlexDaniel, as a programmer trying to locate a problem in my code, I don't care how great looking that Rat is.
08:40 ZoffixWin m: sub foo { say $^a }; ␤␤sub bar { 0 }; ␤␤␤; sub meow { my $x = bar() / bar }; ␤␤␤␤␤␤␤;say foo meow
08:40 camelia rakudo-moar 868d8b: OUTPUT«Attempt to divide by zero using div␤  in sub foo at /tmp/cdkQIeZsS5 line 1␤  in block <unit> at /tmp/cdkQIeZsS5 line 13␤␤Actually thrown at:␤  in sub foo at /tmp/cdkQIeZsS5 line 1␤  in block <unit> at /tmp/cdkQIeZsS5 line 13␤␤»
08:40 ZoffixWin Not that there's much that can be done about this, probably.
08:41 ZoffixWin Trippy error:
08:41 ZoffixWin m: sub bar { 0 }; my $x = bar / bar;
08:41 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5===␤Unrecognized regex metacharacter ; (must be quoted to match literally)␤at /tmp/_DbK06HCYd:1␤------> 3sub bar { 0 }; my $x = bar / bar7⏏5;␤Unable to parse regex; couldn't find final '/'␤at /tmp/_DbK06HCYd:1␤------> 3sub…»
08:44 ZoffixWin Frankly, I don't understand why creating a Rat with zero denominator isn't a fatal error.
08:47 hankache RabidGravy looking at your comment i can see that this works: my $promise1 = start { my @a = @array1.map( {is-prime($_ + 1)} ); @a; };
08:47 hankache but this doesn;t: my $promise1 = start { @array1.map( {is-prime($_ + 1)} );};
08:48 hankache what is the catch here? do we have to explicitly return something?
08:48 ZoffixWin m: my @array1 = ^10; say await start { @array1.map( {is-prime($_ + 1)} );}
08:48 camelia rakudo-moar 868d8b: OUTPUT«(False True True False True False True False False False)␤»
08:48 abraxxa can someone recommend a dump utility to find out what char something that looks like a space really is?
08:48 abraxxa hexdump shows it's different
08:49 DrForr hexdump -C :)
08:49 ZoffixWin m: ' '.uniname.say
08:49 camelia rakudo-moar 868d8b: OUTPUT«SPACE␤»
08:49 ZoffixWin :(
08:49 RabidGravy no, it's just the *what* is getting returned
08:49 abraxxa DrForr: that prints .. for the first space and . after the last char
08:50 DrForr abraxxa: It should also show the hex values on the left-hand side.
08:50 abraxxa DrForr: I was more looking for a tool that doesn't require me to interpret hexdump ;)
08:52 hankache RabidGravy the what?
08:54 ZoffixWin m: 'This string has a space in it'.comb.map({$_.uniname ~~ /SPACE/ ?? "<{$_.uniname}>" !! $_}).join.say
08:54 camelia rakudo-moar 868d8b: OUTPUT«This<SPACE>string<SPACE>has<SP​ACE>a<SPACE>space<SPACE>in<SPACE>it␤»
08:54 ZoffixWin abraxxa, maybe just a short one liner like this ran on the file? ^
08:54 RabidGravy m: say (( 0 .. 100).map( {is-prime($_ + 1)} )).WHAT; say (my @a = ( 0 .. 100).map( {is-prime($_ + 1)} )).WHAT
08:54 camelia rakudo-moar 868d8b: OUTPUT«(Seq)␤(Array)␤»
08:54 jantore joined #perl6
08:56 hankache aha map returns a Seq
08:56 hankache thanks matey!
08:57 abraxxa ZoffixWin: great, that shows <NO-BREAK SPACE>
08:57 ZoffixWin \o/
08:57 abraxxa whatever that is
08:57 hankache it's a myth abraxxa
08:57 ZoffixWin Non-breaking space. The line won't be broken on it.
08:57 TEttinger u: NO-BREAK SPACE
08:57 DrForr &nbsp; in HTML entities.
08:58 hankache i never understood what is the difference between a space and a non breaking space
08:59 DrForr Ordinarily lines can be broken between 'foo' and 'bar' in 'foo bar'. &nbsp; prevents that.
08:59 abraxxa that comes out of M$ Active Directory via an LDAPS query
08:59 DrForr It's needed for French orthography among a bunch of other things - 'Quoi ?' needs the space, but the '?' can't appear on a different line than 'Quoi'.
08:59 RabidGravy This is a no break dancing space
09:00 DrForr Unicode II: Electric Boogaloo.
09:00 hankache :D
09:01 * RabidGravy spins on his shiny head in defiance of the rules
09:01 TEttinger don't forget zero-width no-break space
09:02 * DrForr throws a buffing pad under RabidGravy for that shine.
09:02 TEttinger m: 0xfeff.char
09:02 camelia rakudo-moar 868d8b: OUTPUT«Method 'char' not found for invocant of class 'Int'␤  in block <unit> at /tmp/FGWlAOt0G3 line 1␤␤»
09:02 TEttinger how do you get the char for a codepoint?
09:02 hankache the only time i heard about a non breaking space was the rules of how you write Perl 6 "There is a non breaking space between Perl and 6"
09:02 TEttinger might be ffef
09:03 ZoffixWin m: 0xfeff.chr.say
09:03 camelia rakudo-moar 868d8b: OUTPUT«␤»
09:03 TEttinger m: 0xffef.chr.say
09:03 camelia rakudo-moar 868d8b: OUTPUT«￯␤»
09:03 TEttinger first one yeah
09:03 ZoffixWin m: 0xfeff.uniname.say
09:03 camelia rakudo-moar 868d8b: OUTPUT«ZERO WIDTH NO-BREAK SPACE␤»
09:05 rindolf joined #perl6
09:05 TEttinger m: my @ = ^10; say await start { @.map( {is-prime($_ + 1)} );}
09:05 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/zWP30Dgqkk␤Name must begin with alphabetic character␤at /tmp/zWP30Dgqkk:1␤------> 3my @7⏏5 = ^10; say await start { @.map( {is-p␤    expecting any of:␤        constraint␤        infix␤…»
09:06 vendethiel joined #perl6
09:08 TEttinger m: my @ﷺ = ^10; say await start { @ﷺ.map( {is-prime($_ + 1)} );}
09:08 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/ed0iaiF2Ps␤Name must begin with alphabetic character␤at /tmp/ed0iaiF2Ps:1␤------> 3my @7⏏5ﷺ = ^10; say await start { @ﷺ.map( {is␤    expecting any of:␤        constraint␤        infi…»
09:08 TEttinger oh come on, ﷺ is totally a whole alphabet
09:08 TEttinger Letter, Other [Lo]
09:08 TEttinger http://www.fileformat.info/inf​o/unicode/char/fdfa/index.htm
09:08 labster joined #perl6
09:09 DrForr I'm *still* interested in trying to get P6 more compatible with Arabic/other r2l languages, but the usual time concerns.
09:10 psch .u ﷺ
09:10 yoleaux U+FDFA ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM [Lo] (ﷺ)
09:11 ZoffixWin m: my @ﷺ = 42; say @ﷺ
09:11 camelia rakudo-moar 868d8b: OUTPUT«[42]␤»
09:11 ZoffixWin Works fine...
09:11 TEttinger oh right
09:11 TEttinger mine went after
09:12 TEttinger m: my @ﷺ = ^10; say await start { @ﷺ.map( {is-prime($_ + 1)} );}
09:12 camelia rakudo-moar 868d8b: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Kz9kFb_Ugf␤Bogus postfix␤at /tmp/Kz9kFb_Ugf:1␤------> 3my @ﷺ7⏏5 = ^10; say await start { @ﷺ.map( {is-␤    expecting any of:␤        constraint␤        infix␤        infix stopper…»
09:12 ZoffixWin It looks weird on my screen tho. I see it as "my @42 = [FDFA]; say @[FDFA]" where [FDFA] is the undisplayable character box with the code in it
09:12 TEttinger yep
09:12 TEttinger same here
09:12 TEttinger RTL
09:13 rvchangue joined #perl6
09:20 RabidGravy Oooh, oooh, oooh! my websockety, log viewing thing actually sorta kinda works
09:20 RabidGravy perl6++
09:22 RabidGravy that is Lumberjack proxy dispatcher -> json -> web server -> Lumberjack -> supply dispatcher -> websocket -> browser
09:24 pecastro joined #perl6
09:26 RabidGravy now to do the "Boring" part, (that is making the javascript on the browser make nice output)
09:26 wamba joined #perl6
09:29 RabidGravy what do the cool kids using for something like prepending a row to an HTML table "live"?
09:30 yazid joined #perl6
09:33 ZoffixWin jQuery
09:33 ZoffixWin $('table body').prepend('<tr><td>Foo</td></tr>')
09:34 perlawhirl joined #perl6
09:40 RabidGravy sounds perfect
09:42 stmuk_ surely the cool kids would use CSS rather than tables?
09:43 ZoffixWin stmuk_, not for tabular data :)
09:45 pmurias_ joined #perl6
09:45 pmurias_ is it allowed to have 2 forks on github?
09:46 espadrine joined #perl6
09:46 ZoffixWin No. You could use multiple branches though
09:46 pmurias joined #perl6
09:47 ZoffixWin No. You could use multiple branches though
09:47 espadrine joined #perl6
09:47 pmurias ZoffixWin: I worked around that by forking rakudo to an organization
09:51 RabidGravy :)
09:51 espadrine_ joined #perl6
09:51 RabidGravy yeah it's tabular data
10:19 perlawhirl joined #perl6
10:24 ufobat what is the idea behind this line? https://github.com/tadzik/Bailador​/blob/master/lib/Bailador.pm#L144
10:24 ocbtec joined #perl6
10:24 ufobat it's nonsense?
10:25 lizmat feels like a typo to me
10:26 lizmat perhaps the !! case should be %*ENV<p6sgi.errors> ?
10:26 lizmat and a new Perl 6 Weekly hits the net: https://p6weekly.wordpress.com/​2016/04/04/2016-14-wow-zoffix/
10:29 tadzik ufobat: looks like a typo, I'd look into git blame/git log and try to deduce what was the actual meaning
10:29 tadzik but looks like an attept to maintain backwards compat with some old version of HTTP::Easy, possibly uneeded now
10:34 timotimo Xliff: you do realize that nativecall implements name mangling for you?
10:36 ZoffixWin :o I made it into the title of the Weekly! lizmat++
10:36 _nadim joined #perl6
10:37 vendethiel joined #perl6
10:42 araujo joined #perl6
10:48 wamba joined #perl6
10:51 Xliff timotimo, Yes. I vaguely remember reading something to that effect. I think that might help with C++ classes.
10:51 Xliff I'm still hoping I don't have to go as far as that, yet.
10:52 timotimo that sounds like you're hamstringing yourself
10:52 timotimo "i know there's such a thing as functions to structure my code, but i'm hoping i can get by with just gotos" ;)
10:52 Xliff 8-P
10:53 Xliff No. It's more like. "I've invested too much time into this, already. It doesn't make sense to start from sc
10:53 Xliff Grrr...
10:53 timotimo mhm
10:53 Xliff No. It's more like. "I've invested too much time into this, already. It doesn't make sense to start from scratch with something that might (not will) work."
10:53 El_Che a no one has made a perl5-perl6 joke like this: https://twitter.com/JZdziars​ki/status/716756367919476736 ? Troll are getting lazy? :)
10:54 DrForr The group is too small to be trolled usefully :)
10:57 leont joined #perl6
10:59 kaare_ joined #perl6
11:01 cyberviking joined #perl6
11:06 perlawhirl has anyone seen https://glot.io/
11:07 DrForr I have, just now :)
11:07 perlawhirl would be good if someone who is a little familiar with docker would submit a PR to get perl6 on the page, or maybe fork it and host it somewhere while we're waiting on a fullblown web interpreter from pmurius
11:07 tadzik El_Che: :D:D:D
11:08 DrForr There's already an official Docker build, I believe.
11:08 perlawhirl ahh. well, additionally, the glot.io repo has 5 other related repo's. it's all a little over my head
11:08 perlawhirl i'm looking at the www-containers repo
11:08 perlawhirl i think that's the main "build the language environment" repo
11:09 perlawhirl i have not played with Docker... i'm stuck in 32-bit land
11:15 kid51 joined #perl6
11:17 cyberviking_ joined #perl6
11:25 araujo joined #perl6
11:28 nine Woah! Just yesterday I speculated that Unix file systems do not actually support Unicode and that they are merely Unicode agnostic. Today I got the very first real world example that this is actually true.
11:30 vendethiel joined #perl6
11:32 leont That is true on most unices, but OS X is special AFAIK
11:36 brrt joined #perl6
11:37 leont It normalizes to something close to but not identical to NFD (because they used a draft spec, and in the final stage there were a few changes)
11:37 leont Apparently it doesn't decompose U+2000-U+2FFF, U+F900-U+FAFF or U+2F800-U+2FAFF
11:44 ribasushi joined #perl6
11:50 pmurias nine: you mean they don't do any normalization?
11:52 teatime *nix filenames and files are just bytes, heh.
11:53 timotimo in that case it depends on what the program that created the file chooses to use for normalization
11:53 teatime I suppose it would depend on the individual filesystem driver, but that's generally the case anyway.
11:54 teatime (for names.  doing normalization on files would be kindof evil)
11:54 dvinciguerra_ joined #perl6
11:54 timotimo when we write out stuff, we normalize, because our strings are NFG
11:54 timotimo of course you can write binary data and decide on the normalization to use yourself
11:55 teatime "A name consisting of 1 to {NAME_MAX} bytes used to name a file. The characters composing the name may be selected from the set of all character values excluding the slash character and the null byte. The filenames dot and dot-dot have special meaning."  — POSIX
11:57 nine pmurias: exactly. File names are just bytes and the file system does only treat names as equivalent if their encoded representations match exactly.
11:58 Xliff joined #perl6
11:58 teatime in this case I beleive "character" is supposed to mean "C unsigned char".  it does say you "should" stick to the portable filename character set of A-Z a-z 0-9 . _ -
11:58 Xliff <- In linux mode.
11:58 Xliff For the first time in months.
11:59 vendethiel joined #perl6
12:03 ufobat TADZIIIIIIK!
12:04 ufobat :D
12:07 Xliff Hmmm.... Ubuntu's console-setup doesn't ask me about the compose key.
12:10 ribasushi joined #perl6
12:13 * Xliff forgot how long it takes to upgrade a full Desktop Linux installation.
12:13 Xliff *sigh*
12:14 timotimo takes longer if you have texlife installed
12:14 Xliff LOL
12:14 Xliff dpkg-query: no packages found matching texlife
12:14 Xliff \o/
12:15 M-tadzik joined #perl6
12:15 M-tadzik slightly off-topic: has anyone here worked with RT, like, at the code-level?
12:15 timotimo i remember on gentoo it was the longest process ever to compile that
12:16 moritz M-tadzik: my employer used to use RT until 2008 or so, and had lots of custom patches; then they switched to OTRS
12:17 M-tadzik oh, my nickname's broken again
12:17 Xliff Oh god....
12:17 * Xliff flashes back to OTRS nightmares.
12:18 Xliff It could be worse.... It could be Remedy.
12:20 pmurias when hooking up the dalek git integration what events do I select?
12:20 dalek rakudo/nom: ca6306d | (Pawel Murias)++ | / (3 files):
12:20 dalek rakudo/nom: [js] Start working on compiling rakudo to js.
12:20 dalek rakudo/nom: review: https://github.com/rakudoj​s/rakudo/commit/ca6306dba8
12:25 [Coke] ~
12:26 [Coke] Should the JS integration work happen in nom? I don't want to ship a half-done js interface in 2 weeks.
12:27 moritz why not? as long as it's not advertised in the documentation, it does no harm
12:27 M-matthew joined #perl6
12:27 M-Illandan joined #perl6
12:27 moritz and I don't like the idea of long-lived branches if we can avoid them
12:28 timotimo agreed on the long-lived branches
12:28 lizmat amen
12:28 [Coke] A very strong -1 from me on doing bleeding edge stuff in nom. branches are cheap and easy to review, and this isn't pre-christmas.
12:28 lizmat two questions:
12:28 lizmat why did dalek report this here
12:29 timotimo good question
12:29 [Coke] ... and this should be in p6dev... I only reacted here because of the commit message.
12:29 lizmat and thus, why are we having this discussion here?
12:29 timotimo i think it could be related to pmurias asking about dalek integration?
12:29 timotimo just before dalek said something? :)
12:29 timotimo pmurias probably missed the existence of #p6dev?
12:30 timotimo and perhaps thought dalek was b0rked?
12:31 moritz github still says: payload URL: http://hack.p6c.org:8088/dalek?t=freenode,p6dev
12:32 moritz oh
12:32 moritz it's the rakudojs fork
12:32 pmurias joined #perl6
12:32 timotimo oh!
12:32 timotimo well, that makes the whole discussion moot :)
12:32 timotimo about not wanting to have that in nom, as it's not the same nom
12:32 moritz right
12:33 [Coke] AHAHAAH! :)
12:34 [Coke] difference in URL was too subtle. if it had "pmurias" in it, I would have seen it. :)
12:34 moritz ah well, no harm done
12:34 AlexDaniel joined #perl6
12:36 brrt \o #perl6
12:36 moritz trrb o/
12:36 pmurias [Coke]: I'll move it to p6dev
12:36 brrt :-)
12:36 brrt anyone here was at nlpw?
12:37 DrForr Yo.
12:37 pmurias [Coke]: and I'll move it to a branch so people don't get confused
12:37 DrForr Been there got the T-shirt.
12:37 brrt videos / presentations available perchance?
12:37 moritz pmurias: it'd be fine to develop in the main repo, if you want
12:37 moritz pmurias: if permissions are an issue, we can find solutions for that as well
12:38 DrForr Wendy and Liz have the files.
12:40 pmurias working on a branch in the main repo seems better then on a fork
12:40 pmurias finding forks on github sucks
12:41 moritz pmurias: do you have write access to the main rakudo repo?
12:42 pmurias no
12:42 moritz pmurias: have you submitted a CLA to The Perl Foundation?
12:43 pmurias no
12:43 pmurias how do I do that?
12:43 moritz pmurias: it's a document that you send by snail mail, or scan and fax or email...
12:43 Xliff joined #perl6
12:44 moritz pmurias: http://www.perlfoundation.org/​contributor_license_agreement
12:44 [Coke] a fork is fine.
12:44 moritz pmurias: I've invited you to the rakudo/ organization, and expect that you submit the CLA soon
12:47 acc joined #perl6
12:48 pmurias [Coke]: any advantages of a fork over a branch? obviously I won't be working directly on nom as that would be just asking for trouble ;)
12:49 pmurias moritz: I should print that out, sign it, scan it and then email it?
12:51 vendethiel joined #perl6
12:54 [Coke] pmurias: (advantage) eh. either is fine from my pov.
12:54 [Coke] forks tend to be better if you're working on your own, I imagine.
12:57 timotimo you get your own wiki and issue tracker, for example
12:57 timotimo but we don't use rakudo/rakudo's issue tracker anyway
12:58 moritz pmurias: the document itself says you're supposed to send a pysical letter
12:58 moritz pmurias: dunno if scan + email is acceptable too; in case of doubt, you'd have to ask TPF (Karen maybe)
12:58 timotimo i scanned and emailed it
12:58 timotimo mine*
12:59 moritz ah, good
13:37 ocbtec joined #perl6
13:37 skids joined #perl6
13:38 ocbtec joined #perl6
13:40 Begi joined #perl6
13:43 dalek joined #perl6
13:51 chrisdotcode joined #perl6
13:57 chrisdotcode hey guys
13:57 chrisdotcode I'm a haskeller
13:57 chrisdotcode but perl6 is awesome
13:58 perlpilot we know  ;)
13:58 chrisdotcode built in grammar types?! yes, please.
13:58 perlpilot haskell is awesome too
13:59 timotimo yeah, perl6 got a lot of inspiration from the haskell comunity in the early days
13:59 chrisdotcode sir perlpilot, what is the perl name for a refinement type, a la, `sub very_odd(Int $odd where {$odd % 2}){}`?
13:59 timotimo "subset" types
13:59 chrisdotcode (or sir timotimo )
13:59 chrisdotcode ah
13:59 chrisdotcode thanks
14:00 perlpilot .oO( When did we get knighted?!? )
14:00 timotimo nii.
14:00 jnthn Mostly 'cus of the subset keyword used to introduce them... I still sometimes end up calling them refinement types.
14:00 chrisdotcode any good "I need to switch all of my python code to perl6 immediately" tutorial for someone who's never used perl?
14:00 jnthn In fact, I think the MOP objects implementing them talk about refinements on the inside.
14:01 moritz chrisdotcode: I don't think we have *that* specific tutorials :-)
14:02 moritz chrisdotcode: though I don't think http://perl6intro.com/ requires previous perl knowledge
14:04 timotimo i came from python to perl6, too
14:04 KatsWhoSayNi joined #perl6
14:05 chrisdotcode moritz, thanks!
14:06 chrisdotcode is perl6 production ready?>
14:06 tadzik depends; what's your production like?
14:06 DrForr Yes, it's already being used in production code.
14:06 chrisdotcode was just curious if it was out of alpha/beta/whatever testing stages.
14:06 perlawhirl joined #perl6
14:07 timotimo yeah, it is
14:07 DrForr It was released at Christmas.
14:07 chrisdotcode sweet
14:07 moritz chrisdotcode: it's out of beta, and in productin testing :-)
14:07 timotimo we have the 6.c release now that is like a stability promise
14:07 timotimo as in, you write "use v6.c" at the top of your script and that code will continue working unmodified with future versions
14:08 perlawhirl chris: another decent resource if you aready know python is http://learnxinyminutes.com/docs/perl6/
14:08 chrisdotcode perlawhirl, yeah, I have that open in another tab, thanks
14:08 timotimo (unless you rely on bugs to be present or the behavior of features that have no tests in Roast)
14:08 El_Che joined #perl6
14:08 chrisdotcode two final questions: are subset types checked at "compile type", or at run time? and does perl6 has interfaces?
14:09 jast if you mean interfaces as in java, Perl6 has something better, called roles :}
14:09 timotimo only the base type of a refinement can be checked at compile time. not sure if we do it at all yet, though
14:09 chrisdotcode jast, more haskelly (even go)-style interfaces
14:09 timotimo "it at all", means for refinement types
14:09 timotimo we do some compile time type checking in general
14:10 rindolf joined #perl6
14:10 chrisdotcode timotimo, is there a separate compile-step, or is it done at code-interpret time, before it runs?
14:10 perlawhirl subroutine calls are mostly checked at compile time, but this is for base types, not subsets
14:11 timotimo there is a separate compile-time, but you don't invoke it manually like you would with gcc or so
14:11 jast there is a separate compile step but as a "user" you don't really notice it, just like in most other "scripting" languages
14:11 jnthn chrisdotcode: The general principle is "compile time where possible, runtime at latest", though there "where possible" factors in "stuff we've actually had time to do". :) One thing we will be careful about, though, is not making new compile-time error detection break code that declared a dependency on an earlier version of the language.
14:12 cdg joined #perl6
14:12 chrisdotcode okay, that makes sense. so as you run your code, it compile checks before it actually runs it. instead of a separate step.
14:12 chrisdotcode that's neat
14:12 timotimo also, only modules will have the result of their compilation written away to disk
14:12 _nadim joined #perl6
14:12 jnthn Yeah, Perl blurs compile-time/runtime somewhat, but there is a point where one ends and the other begins.
14:12 chrisdotcode thanks guys :)
14:13 vendethiel joined #perl6
14:13 jnthn (Meta-programming stuff means you can end up with some runtime during your compile time, which is useful for extending or getting more domain-specific checks into compile time.)
14:19 * [Coke] is happy to see "is required" attributes show up in Zoffix++'s presentation, whee.
14:19 [Coke] (the proof that "perl 6 is written in perl 6 so you don't have to be a core dev to code it.")
14:21 dakkar_ joined #perl6
14:22 [Coke] s/the/a/
14:26 ufobat tadzik, session PR :-D
14:27 jnthn More like "you can be a core dev just by knowing Perl 6" ;)
14:27 dakkar__ joined #perl6
14:28 [Coke] jnthn: there you go
14:28 TimToady 'course, it also means you have to learn a complicated language like Perl 6 instead of a simple one like C :P
14:30 tadzik ufobat: that's quite a bit of code!
14:30 ufobat hope you're happy with that
14:30 tadzik I'm very impressed
14:30 tadzik I'll have a look through it :)
14:31 ufobat i've found where $current was used, actualyl
14:31 buharin joined #perl6
14:31 ufobat i hope its okay that i changed something in the mustache test. it breaks backwards compatibility :-(
14:32 MadcapJake is there a way to grep a lazy list while keeping it lazy
14:32 tadzik ar
14:32 tadzik can we have it in a separate PR?
14:32 tadzik or at least in a separate commit :)
14:32 tadzik keep separate things separately
14:32 jnthn TimToady: C's easy...just can be tad tricky to correctly use a few of the library functions, like malloc and free :P
14:33 ufobat absolutly :D my git foo is quite looooowwww...
14:33 ocbtec joined #perl6
14:33 jnthn MadcapJake: grep returns a Seq, which can act as lazy as you like :)
14:33 jnthn MadcapJake: Got an exmaple of what's not behaving as you expect?
14:33 MadcapJake sure, one sec
14:36 perlawhirl in general, assign the results of the grep to a scalar... it will be evaluated later
14:36 MadcapJake perlawhirl: ah, yeah I was assigning to an array, is that why?
14:37 perlawhirl well, that's how i do it... there might be a way to do it with an array, but i don't know it :D
14:37 MadcapJake m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; my @primes = @pos-primes.grep({ .is-prime }); say @primes[0..11]
14:37 camelia rakudo-moar 0e95cd: OUTPUT«(timeout)»
14:37 MadcapJake jnthn: ^^
14:38 skids Yeah, list-assignment is eager.
14:38 MadcapJake m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; my $primes = @pos-primes.grep({ .is-prime }); say $primes[0..11]
14:38 camelia rakudo-moar 0e95cd: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37)␤»
14:38 MadcapJake nice
14:39 jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf;
14:39 camelia rakudo-moar 0e95cd: ( no output )
14:39 jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; say @pos-primis.is-lazy
14:39 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/SeZADXhfl8␤Variable '@pos-primis' is not declared. Did you mean '@pos-primes'?␤at /tmp/SeZADXhfl8:1␤------> 3os-primes = 1, 2, 3, * + 2 ... Inf; say 7⏏5@pos-primis.is-lazy␤»
14:39 jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; say @pos-primes.is-lazy
14:39 camelia rakudo-moar 0e95cd: OUTPUT«True␤»
14:39 jnthn Hm
14:39 skids Weird
14:40 jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; say @pos-primes.grep(*.is-prime).is-lazy
14:40 camelia rakudo-moar 0e95cd: OUTPUT«False␤»
14:40 jnthn innerestin'
14:40 chrisdotcode does perl 6 have currying, guys?
14:40 skids chrisdotcode: see the .assuming method
14:40 jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; my @primes = lazy @pos-primes.grep(*.is-prime); say @primes[^10]
14:40 camelia rakudo-moar 0e95cd: OUTPUT«(2 3 5 7 11 13 17 19 23 29)␤»
14:40 jnthn MadcapJake: ^^ is how to make it work, anyway :)
14:40 jnthn Just demand laziness
14:40 perlawhirl jnthn++
14:40 MadcapJake neat, thanks!
14:44 MadcapJake jnthn: I had a moar fork bomb at some point trying to get that lazy list
14:48 jnthn Fork bomb? :)
14:49 MadcapJake hundreds of moar processes were being created, and my computer was slowing to a grind, I was lucky enough to quickly type «killall moar» before it completely ate my computer :P only other time that's happened was with circular dependencies
14:49 perlawhirl MadcapJake: do you have the exact expression that triggered this?
14:49 jnthn oh...you were creating processes in the grep? :)
14:50 MadcapJake that's what I'm not understanding, I wasn't doing anything weird, just running a simple script and executing a few things in a REPL
14:51 moritz REPL
14:51 moritz that's the problem :/
14:51 perlawhirl yeah, hah. REPL has some weird bugs
14:51 moritz (at least that what I'll believe until I see evidence to the contrary)
14:51 jnthn It doesn't seem to matter how much time we spend on the REPL, people still complain about it. :P
14:52 jnthn ...and probably always will :P
14:52 awwaiid I *heart* REPL
14:52 moritz jnthn: the time really doesn't matter; the associated features/bug will
14:52 perlawhirl can anyone think of a nice way I can split some text on whitespace to a given column width
14:52 MadcapJake I'm not having much luck retriggering it though :(
14:53 vendethiel joined #perl6
14:53 moritz perlawhirl: you need to specify that a  bit better
14:54 stmuk_ perlawhirl: it's probably not nice but   -o objects/if_xcmdsrv.o if_xcmdsrv.c
14:54 stmuk_ oops
14:54 perlawhirl so i have a bunch of text i want to print out at a specific column width
14:54 stmuk_ perlawhirl: https://github.com/rakudo/rakudo/​blob/nom/lib/Pod/To/Text.pm6#L143
14:54 gregf_ hi
14:54 perlawhirl so, 'the quick brown fox jumps over the lazy dog' to a colum width of 10 would be something like this : ['the quick ', 'brown fox ', 'jumps over', ' the lazy ', 'dog.']
14:55 gregf_ is multi method similar to method overloading?
14:55 skids perlawhirl: the word you're looking for is "justification"
14:56 teatime skids: no, that doesn't seem right.
14:56 perlawhirl stmuk_++ that will do for now
14:56 perlawhirl kind of like what your icr client is doing right now to the msg text :D
14:56 perlawhirl s/icr/irc/
14:56 skids Right, it justifies the text into a column.  In this case, right-justifies it.
14:57 skids Erm, left
14:57 arnsholt perlawhirl: I suspect you want something like https://www.youtube.com/watch?v=6Viwwetf0gU
14:57 sue joined #perl6
14:57 awwaiid perlawhirl: maybe like s/(<[a..zA..Z ]> ** 1..20 \b)/$1\n/g (sorry for bastardized p6 regex
14:58 awwaiid we use this as a group-programming exercise sometimes
14:58 gregf_ i just tried this: class Foo { multi method bar(Int $a){ say "int"; }; multi method bar(Str $b){ say "string"; } }; my $f = Foo.new; for [10, "foo"] -> $v { $f.bar($v) } # it works, but was wonderinf if this is similar to overloading
15:00 moritz gregf_: we call it "multi dispatch"
15:01 moritz gregf_: and with "overloading" we mean adding variants to an existing operator
15:02 gregf_ well, yeah, theres operator overloading and method overloading :)
15:02 gregf_ multi dispatch sounds more geeky ;)
15:03 perlpilot gregf_: I don't see the distinction  ;)
15:03 perlawhirl in general... overloading is resolved at compile time, whereas MD is resolved at compilet time
15:03 gregf_ moritz: cheers
15:03 jnthn perlawhirl: s/compilet/runtime/? :)
15:04 perlawhirl m: multi sub t(Str $a) { say 'str' }; multi sub t(Int $a, Int $b) { say 'int' }; t('s', 2); # COMPILE TIME FAIL
15:04 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/qdMwaWJG60␤Calling t(Str, Int) will never work with any of these multi signatures:␤    (Str $a) ␤    (Int $a, Int $b)␤at /tmp/qdMwaWJG60:1␤------> 3ti sub t(Int $a, Int $b) { say 'int' }; 7⏏5t('s…»
15:04 perlawhirl jnthn :D overloading at runtime, md at compile time
15:04 moritz perlawhirl: we can also resolve some multi *sub* dispatches at compile time (not method dispatches though)
15:04 jnthn Oh, I had it the other way around: overloading at compile time, MMD at runtime :)
15:05 jnthn (In that Java and co call it overloading, and resolve it at compile time)
15:05 MadcapJake how would you partition a list into pairs of values (not Pairs of values)
15:05 perlawhirl jnthn: i was talking generalities, but i did know that perl sub MD's were resolved compile time... but as to the specifics of how Perl 6 implements things... i'm not entirely clear
15:06 perlawhirl that's your domain :D
15:07 perlawhirl ahh, i think the terms get conflated... to the point where MD is considered a type of overloading. and of course, different languages probably resolve them at different times
15:08 jnthn m: say (1..10).rotor(2)
15:08 camelia rakudo-moar 0e95cd: OUTPUT«((1 2) (3 4) (5 6) (7 8) (9 10))␤»
15:08 jnthn MadcapJake: ^^
15:08 ufobat tadzik, i did a new PR for Sessions for Bailador
15:08 MadcapJake jnthn: thanks!
15:08 * jnthn goes to rest for a bit :) &
15:10 gregf_ m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2)
15:10 camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy))␤»
15:10 timotimo with :partial you can get a half-list at the end there
15:10 timotimo m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, :partial)
15:10 camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy) (dog))␤»
15:11 gregf_ timotimo++
15:11 gregf_ is :p for partial?
15:11 timotimo i'm not sure it would accept :p as a parameter
15:11 timotimo m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, :p)
15:11 camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy))␤»
15:11 timotimo it doesn't
15:12 gregf_ hmm.. i've seen something like :end, :p used somewhere
15:12 perlawhirl gregf_++ timotimo++
15:12 gregf_ anyways :)
15:12 perlawhirl this is the nice way i was imagining :D
15:12 timotimo :p usually gives you a Pair object
15:12 timotimo the :foo syntax is just named arguments
15:12 timotimo m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, partial => True)
15:12 camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy) (dog))␤»
15:12 timotimo ^- same thing, but much more to type
15:13 perlawhirl everytmie you say :p i think you are doing the 'silly tongue-out smiley'
15:13 gregf_ hmm, fair enough. perl5++ :)
15:13 perlawhirl i like the :adverbs in perl6
15:14 skids m: say $*IN.get ~~ /[$<foo>=(.+») <?{$<foo>.chars < 21 }>]+$/ # Hrm how to get the backtracking right here.
15:14 camelia rakudo-moar 0e95cd: OUTPUT«「hontae Dhún na nGall」␤ foo => 「hontae Dhún na nGall」␤»
15:16 skids Oh.
15:16 skids overthinking.
15:16 skids m: say $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]+$
15:16 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5===␤Regex not terminated.␤at /tmp/UWM5FE9Ygz:1␤------> 3y $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]+$7⏏5<EOL>␤Unable to parse regex; couldn't find final '/'␤at /tmp/UWM5FE9Ygz:1␤------> 3y $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]…»
15:16 skids m: say $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]+$/
15:16 camelia rakudo-moar 0e95cd: OUTPUT«「Céad slán ag sléibhte maorga Chontae Dhún na nGall」␤ foo => 「Céad slán ag」␤ foo => 「 sléibhte maorga」␤ foo => 「 Chontae Dhún na」␤ foo => 「 nGall」␤»
15:17 perlawhirl skids+++
15:17 perlawhirl you get three
15:18 telex joined #perl6
15:19 perlawhirl tho, you're not using foo anymore...
15:19 perlawhirl m: say $*IN.get ~~ /(. ** 1..20 »)+$/
15:19 camelia rakudo-moar 0e95cd: OUTPUT«「Céad slán ag sléibhte maorga Chontae Dhún na nGall」␤ 0 => 「Céad slán ag」␤ 0 => 「 sléibhte maorga」␤ 0 => 「 Chontae Dhún na」␤ 0 => 「 nGall」␤»
15:19 perlawhirl m: say $*IN.get ~~ /(. ** 1..10 »)+$/
15:19 camelia rakudo-moar 0e95cd: OUTPUT«「Céad slán ag sléibhte maorga Chontae Dhún na nGall」␤ 0 => 「Céad slán」␤ 0 => 「 ag」␤ 0 => 「 sléibhte」␤ 0 => 「 maorga」␤ 0 => 「 Chontae」␤ 0 => 「 Dhún na」␤ 0 => 「 nGall」␤»
15:20 skids m: $*IN.get ~~ /[(. ** 1..20 ») \s* ]+/; $/[0].say # deletes leading spaces
15:20 camelia rakudo-moar 0e95cd: OUTPUT«[「Céad slán ag」 「sléibhte maorga」 「Chontae Dhún na」 「nGall」]␤»
15:20 perlawhirl nicely done, sir
15:22 sue left #perl6
15:24 perlawhirl m: ($*IN.get ~~ /[( . ** 1..10 » ) \s* ]+/)[0]».Str.perl;
15:24 camelia rakudo-moar 0e95cd: ( no output )
15:24 perlawhirl m: say ($*IN.get ~~ /[( . ** 1..10 » ) \s* ]+/)[0]».Str.perl;
15:24 camelia rakudo-moar 0e95cd: OUTPUT«["Céad slán", "ag", "sléibhte", "maorga", "Chontae", "Dhún na", "nGall"]␤»
15:24 perlawhirl all wrapped up in a nice array
15:24 perlawhirl m: say ($*IN.get ~~ /[( . ** 1..20 » ) \s* ]+/)[0]».Str.perl;
15:24 camelia rakudo-moar 0e95cd: OUTPUT«["Céad slán ag", "sléibhte maorga", "Chontae Dhún na", "nGall"]␤»
15:26 ugexe i have a segfault i can produce more often than not. it goes away when i change `my @foo = unique(:as(*.xxx)), gather { ... }` to `my $foo := gather { ... }; $foo.unique(:as(*.xxx))`. Does this look like it might be the culprit? Or did i probably just change the memory profile enough to hide it?
15:26 nadim joined #perl6
15:26 mcsnolte joined #perl6
15:28 vendethiel joined #perl6
15:29 khw joined #perl6
15:33 _4d47 joined #perl6
15:39 dalek doc: 72f4ed9 | TimToady++ | doc/Language/unicode_texas.pod:
15:39 dalek doc: Lt and Lo are also valid alphabetics
15:39 dalek doc:
15:39 dalek doc: Also some grammar cleanups.
15:39 dalek doc: review: https://github.com/perl6/doc/commit/72f4ed9af2
15:45 MadcapJake you can only use `is rw` on a scalar parameter?
15:46 grondilu m: class { has @.a is rw }.new
15:46 camelia rakudo-moar 0e95cd: ( no output )
15:46 grondilu m: my $a = class { has @.a is rw }.new; $a.a = ^10; say $a
15:46 camelia rakudo-moar 0e95cd: OUTPUT«<anon|52857520>.new(a => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])␤»
15:47 MadcapJake in a sub
15:47 grondilu oh ok
15:47 MadcapJake sub foo(@a is rw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
15:47 MadcapJake m: sub foo(@a is rw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
15:47 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FKjWSAX0ia␤Can only use 'is rw' on a scalar ('$' sigil) parameter␤at /tmp/FKjWSAX0ia:1␤»
15:48 grondilu well at least you have a very explicit error message
15:49 MadcapJake can I convert an array to a scalar :P
15:50 sortiz joined #perl6
15:51 hankache m: sub foo($a is rw) { $a = $a.pick: * }; my $arr = [0..10]; foo($arr)
15:51 camelia rakudo-moar 0e95cd: ( no output )
15:51 sortiz \o #perl6
15:51 ugexe is raw?is raw
15:51 hankache MadcapJake ^^
15:52 hankache it works on my local rakudo
15:52 ugexe m: sub foo(@a is raw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
15:52 camelia rakudo-moar 0e95cd: ( no output )
15:52 MadcapJake m: sub foo(@a is raw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr); say @arr;
15:52 camelia rakudo-moar 0e95cd: OUTPUT«[8 0 1 3 7 9 4 2 10 5 6]␤»
15:53 MadcapJake ugexe: haha! why does that work though? xD
15:53 ugexe i dont really know how that stuff works, but maybe you can decipher https://doc.perl6.org/routine/raw
15:53 hankache hi sortiz
15:56 gregf_ MadcapJake: you can always monkeypatch *runs*
15:56 MadcapJake ugexe: I think it means \param := <ARG>. i.e., it is a "raw" binding to whatever you pass.  The rw trait otoh is only looking for a scalar container
16:01 nemo left #perl6
16:04 MadcapJake I keep getting «cannot stringify this» in a sub without any stringification xD
16:04 dalek DBIish: 833bd40 | (Salvador Ortiz)++ | lib/DBDish/Oracle (4 files):
16:04 dalek DBIish: Oracle: Typed handlers and native methods
16:04 dalek DBIish:
16:04 dalek DBIish: - Same OO style that other drivers.
16:04 dalek DBIish: - Proper error handling.
16:04 dalek DBIish: - Proper cleanup at statement dispose.
16:04 dalek DBIish: review: https://github.com/perl6/DBIish/commit/833bd40760
16:06 MadcapJake I even told the sub that everything coming in is an Int...
16:07 MadcapJake huh, looks like the / operator was the problem for some reason, using div now and it never prints that «cannot stringify this» error
16:10 MadcapJake m: https://gist.github.com/MadcapJake​/280cdf8e42ad8a650cbbe9e01f9fe86f
16:10 camelia rakudo-moar 0e95cd: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101)␤»
16:11 MadcapJake still misses a few at 1000 reactions but 10_000 takes forever!
16:11 MadcapJake m: (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101)».is-prime
16:11 camelia rakudo-moar 0e95cd: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Ug_44lsn8P␤Two terms in a row␤at /tmp/Ug_44lsn8P:1␤------> 3(27⏏5 3 5 7 11 13 17 19 23 29 31 37 41 43 47 ␤    expecting any of:␤        infix␤        infix stopper␤        statement end␤  …»
16:13 MadcapJake oops forgot about the lack of commas :P
16:16 MadcapJake m: so all <2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101>».is-prime
16:16 camelia rakudo-moar 0e95cd: OUTPUT«WARNINGS for /tmp/U9BJcZ_ILS:␤Useless use of "so " in expression "so all <2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101>».is-prime" in sink context (line 1)␤»
16:16 MadcapJake m: all <2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101>».is-prime
16:16 camelia rakudo-moar 0e95cd: OUTPUT«WARNINGS for /tmp/gTuE55gXUZ:␤Useless use of "all <2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101>».is-prime" in expression "all <2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101>».is-prime" in sink…»
16:16 MadcapJake huh, works in my repl
16:24 dalek doc: 57bc359 | (Tom Browder)++ | doc/Language/nativecall.pod:
16:24 dalek doc: fix typos, spellings, and grammar
16:24 dalek doc: review: https://github.com/perl6/doc/commit/57bc359761
16:24 dalek doc: 0663fbb | (Tom Browder)++ | doc/Language/ (2 files):
16:24 dalek doc: add Heredoc and constant to doc search
16:24 dalek doc: review: https://github.com/perl6/doc/commit/0663fbb640
16:24 dalek doc: 868612a | (Zoffix Znet)++ | doc/Language/ (3 files):
16:24 dalek doc: Merge pull request #440 from tbrowder/master
16:24 dalek doc:
16:24 dalek doc: fix typos, spellings, and grammar
16:24 dalek doc: review: https://github.com/perl6/doc/commit/868612a4bc
16:26 dalek DBIish: 7e3d7b7 | (Salvador Ortiz)++ | README.pod:
16:26 dalek DBIish: Fix typo
16:26 dalek DBIish: review: https://github.com/perl6/DBIish/commit/7e3d7b76d4
16:26 MadcapJake m-prof: https://gist.github.com/MadcapJake​/280cdf8e42ad8a650cbbe9e01f9fe86f
16:28 cpage_ joined #perl6
16:28 MadcapJake prof-m: https://gist.github.com/MadcapJake​/280cdf8e42ad8a650cbbe9e01f9fe86f
16:28 camelia prof-m 273e89: OUTPUT«(timeout)»
16:28 camelia .. Prof: http://p.p6c.org/25e1650
16:33 travis-ci joined #perl6
16:33 travis-ci Doc build failed. Zoffix Znet 'Merge pull request #440 from tbrowder/master
16:33 travis-ci https://travis-ci.org/perl6/doc/builds/120664551 https://github.com/perl6/doc/com​pare/72f4ed9af2d3...868612a4bcd2
16:33 travis-ci left #perl6
16:34 pdcawley_ joined #perl6
16:37 pdcawley joined #perl6
16:38 vendethiel joined #perl6
16:40 geekosaur joined #perl6
16:40 [Coke] MadcapJake: REPL prints the result if you didn't.
16:40 [Coke] camelia doesn't, you didn't do anything with the sunk value, you get a warning.
16:40 MadcapJake oh yeah, I literally forget that every single day :P
16:42 pmurias joined #perl6
16:44 perlpilot camelia should behave more like the REPL and then there'd be less confusion  :)
16:45 MadcapJake what's the reason for it not printing $_?
16:46 dalek doc: d299140 | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
16:46 dalek doc: Try to fix breakage from #440
16:46 dalek doc: review: https://github.com/perl6/doc/commit/d299140704
16:49 cyberviking joined #perl6
16:50 [Coke] MadcapJake: because then you cannot test sink
16:50 [Coke] you have the REPL if you want it. :)
16:56 travis-ci joined #perl6
16:56 travis-ci Doc build failed. Zoffix Znet 'Try to fix breakage from #440'
16:56 travis-ci https://travis-ci.org/perl6/doc/builds/120670186 https://github.com/perl6/doc/com​pare/868612a4bcd2...d2991407048a
16:56 travis-ci left #perl6
16:59 dalek doc: eab83e0 | (Zoffix Znet)++ | doc/Language/quoting.pod:
16:59 dalek doc: Try to fix breakage from #440
16:59 dalek doc: review: https://github.com/perl6/doc/commit/eab83e0ed4
17:02 dha joined #perl6
17:16 travis-ci joined #perl6
17:16 travis-ci Doc build passed. Zoffix Znet 'Try to fix breakage from #440'
17:16 travis-ci https://travis-ci.org/perl6/doc/builds/120673685 https://github.com/perl6/doc/com​pare/d2991407048a...eab83e0ed4e1
17:16 travis-ci left #perl6
17:19 ChristopherBotto joined #perl6
17:20 ChristopherBotto Hi everyone!
17:25 ChristopherBotto I created a module that simply reads a table of data into a nested hash (https://github.com/molecules/Table). Does this seem useful enough to be its own module?
17:26 dha Question: I'm a little behind in my keeping up with changes. What's the state of actually using p6doc if you have rakudo installed? I note that 'p6doc -l' listed 'X', but 'p6doc X' did not result in anything useful. like, you know, docs. :-)
17:26 sjn ChristopherBotto: why not use a grammar?
17:27 dha (Note: I am apparently giving a talk on resources for beginning-ish Perl programmers at YAPC::NA, and I will be including resources for P6 in that.)
17:28 teatime seems to work for me, did you try different X's ?
17:28 sjn ChristopherBotto: do any of the CSV modules on modules.perl6.org fit your bill?
17:29 ChristopherBotto sjn: Good question.
17:29 ChristopherBotto sjn: checking ...
17:29 dha Not yet. I noticed that things have changed since I last built rakudo, so I'm currently rebuilding.
17:30 dha teatime - In any case, there had been some discussion about how most people would probably go right to the web for docs, so I'm wondering where docs on one's own system stand, generally.
17:31 teatime I had assumed they are generated from the same sources.
17:33 dha I'm actually not sure where the online docs are generated from. My gut says they're generated from some version of the doc repository which may or may not be in line with whatever comes with a rakudo install.
17:34 vendethiel joined #perl6
17:35 MadcapJake dha: they're the same repo and available via panda install p6doc
17:36 sjn dha: online docs (doc.perl6.org) source is linked at the bottom of that page
17:36 dha Ah. So if you install rakudo, the docs are *not* installed until you install via panda?
17:36 MadcapJake dha: if you want to generate the website you do «make html»
17:36 stmuk_ dha: p6doc basically works from the command line
17:36 domidumont joined #perl6
17:36 MadcapJake dha: correct *unless* you installed via R*
17:37 dha stmuk_-  yep, I know that. :-) I'm just trying to nail down the details for the talk.
17:37 MadcapJake R* is really the preferred installation right now and it has p6doc included
17:37 MadcapJake dha: http://rakudo.org/how-to-get-rakudo/
17:37 stmuk_ most end users want R* not R
17:37 dha MadcapJake - ah, ok. Since I was doing work on the docs (I've sadly fallen behind on that... :-( ), I've been building from the repo.
17:38 MadcapJake . o O (That site should have a list of included modules, maybe?)
17:38 dha So that's an important point. Tanks.
17:40 stmuk_ oh wow someone added pretty pics :D
17:40 MadcapJake p6doc is kinda slow, so I would suggest using doc.perl6.org TBH
17:40 molaf joined #perl6
17:41 stmuk_ MadcapJake: p6doc isn't *that* slow unless you are searching the index
17:41 MadcapJake 16 seconds to look for split, that's really slow
17:42 stmuk_ that's using the index
17:42 MadcapJake stmuk_: right if you know the exact representation, it's fast... that's not really saying much though :P
17:43 MadcapJake new users will surely hit the slow part first (and often)
17:43 stmuk_ they will hit that using p6 anyway :)
17:44 dha ok, so what I need to do is find a way to say "ok, p6doc is possibly not your best option, so you'll probably want to use the web" without actually trashing p6doc... :-)
17:45 stmuk_ except the web search doesn't work that well anyway
17:45 MadcapJake stmuk_: seriously, negative nancy? :P
17:46 stmuk_ the most practical way of searching is probably "git grep" on a doc checkout
17:47 dha Ah. So "Perl 6 doesn't have a very solid documentation system." without trashing Perl 6's documentation system. That's a little harder to render...
17:47 timotimo ChristopherBotto: it'd be a great thing to copy the example table from the test into the readme, so you can more easily see what the module actually does
17:47 hankache joined #perl6
17:48 MadcapJake dha: "p6doc is written in Perl 6 and thus faces some of the performance implications of being a new language freshly specced. Because of this, I would suggest using the web version at doc.perl6.org as it's quite a bit faster and has autocomplete support.  Though you will run into a few difficulties when trying to search for operators"
17:48 stmuk_ dha: the docs are fine .. searching is the problem
17:49 dha stmuk_ - you'll note I said "documentation system" rather than just "documentation". I did that on purpose. :-)
17:49 dha MadcapJake - cool. thanks.
17:50 MadcapJake dha: "Though if you do decide to take the plunge and play with the command-line version, remember that searching blindly will take some time as it has to run your query against an index containing all the different type's variations on methods.  One way to speed it up is to include the type you are searching for e.g., Type::Str.split rather than just split"
17:50 stmuk_ dha: I would also warn people of using google to search for perl 6 docs since most google hits are outdated or at worst misleading
17:50 MadcapJake stmuk_++ # very good point
17:51 timotimo https://travis-ci.org/perl6/doc/builds/120673685 - anyone got a clue what these warnings are about/where they come from?
17:52 stmuk_ dha: also point ppl at the faq
17:52 dha stmuk_-  good points. thanks.
17:52 spider-mario joined #perl6
17:54 stmuk_ I should set up Max's perl5 based elasticsearch from GPW2016
17:54 Juerd stmuk_: I include "2016" in google queries for perl 6 stuff, "2015" if 2016 didn't work :)
17:54 stmuk_ Juerd: yes also I put a google custom search on pl6anet.org which should work better since it indexes a few sites only
17:55 MadcapJake Juerd: I do the same kind of thing via google's search tools
17:55 * geekosaur often uses the search tools to restrict to past year or etc., re web search for docs
17:55 MadcapJake geekosaur: :)
17:56 ChristopherBotto timtimo: Thanks. Will do.
17:57 MadcapJake stmuk_: thanks for reminding me to add the FAQ to the /r/perl6 sidebar :)
17:59 wamba joined #perl6
18:00 masak greetings #perl6.
18:01 masak back to golfing yesterday's weird Bailaderror.
18:02 sjn \o #masak :)
18:03 hankache \o/ masak
18:03 * sjn is considering treating masak as an irc-channel, stuffing him full with questions
18:03 sjn maybe I shouldn't :-P
18:04 masak sjn: I'm essentially fine with that
18:05 masak although, just as an IRC channel, I might occasionally warnock you (without meaning anything bad by it)
18:05 stmuk_ I thought masak was an interface to RT :)
18:05 timotimo masak implements the observer pattern for this channel
18:05 timotimo and spits out an event stream towards RT
18:06 * masak .oO( I am the gate -- whoever enters through me will be rakudobugged )
18:06 hankache isn't masak a bot?!
18:07 tony-o cyborg
18:07 leont masak is Yog-Sothoth, obviously
18:09 masak leont: oh, that was the quote I was going for! instead I just found a Jesus quote.
18:10 vendethiel masak: code golfing is fun, but I usually play another kind of code golfing :P
18:10 masak this is bug golfing
18:10 vendethiel hehe
18:10 masak the other kind is the original kind
18:11 masak I'm... a radical of sorts.
18:11 vendethiel oh?
18:14 masak I only golf code that has bugs in it :P
18:15 masak right now, at this stage, the code is actually growing quite a lot bigger, as I'm inlining dependencies in hopes of reproducing the bug in a standalone script
18:15 masak then the reduction begins
18:16 TreyHarris joined #perl6
18:17 timotimo you have to win some to lose some
18:18 * sjn is hearing rumours that masak is cooking up a bug reduction.
18:19 firstdayonthejob joined #perl6
18:25 Ven joined #perl6
18:26 labster joined #perl6
18:26 cpage_ joined #perl6
18:26 geekosaur bug consommé?
18:30 stmuk joined #perl6
18:35 masak actually, it's more of a reduction-oxidation...
18:36 * masak .oO( actually, it's more of a gastrique )
18:37 Possum joined #perl6
18:41 masak if I inline DBIish, the problem goes away.
18:41 * masak .oO( don't do that, then! )
18:42 geekosaur joined #perl6
18:51 masak reduction is a lovely activity. you get to take shortcuts in code that you never get to take normally.
18:54 Possum joined #perl6
18:54 ILikeBears joined #perl6
18:54 ILikeBears How do I prepare a perl6 script to run in the jVM
18:54 kjk_ joined #perl6
18:55 sortiz masak, You've captured my attention. Is you problem DBIish related?
18:55 cpage_ joined #perl6
18:59 masak in a way.
18:59 masak if I use Bailador and DBIish together on the command line, and make a simple request to my postgres database, everything works
19:00 masak when I do the same way from inside a Bailador GET handler, I get "Could not locate compile-time value for symbol DBError"
19:04 znpy joined #perl6
19:06 timotimo ILikeBears: just perl6-j yourscript.p6
19:07 ILikeBears timotimo, generates .class?
19:08 timotimo you can't run a script just on the JVM without having the perl6 runtime added in there; we don't have something that creates something that just runs on its own with just the jvm
19:08 ILikeBears english
19:13 [Coke] timotimo: --target==jar, mebbe.
19:13 [Coke] but rakudo-jvm isn't fully baked at the moment. And if it were solid, it doesn't have 100% feature parity with rakudo-moar
19:13 timotimo yeah, but you can't "java -jar MyGreatModule.jar"
19:17 sortiz masak, DBError is in fact X::DBIish::DBError, a package scoped class defined in DBDish::ErrorHandling. Is Bailador doing some trick with GLOBAL::?
19:24 [Coke] timotimo: no, but you can examine rakudo-j and see what it's doing. I imagine it's a SMOP.
19:25 dha Hm. Interesting. 'p6doc X' says "X is a builtin type. You can use it without loading a module." But there seems to be no documentation for X. This seems, at best, misleading.
19:25 [Coke] m: X;
19:25 camelia rakudo-moar 0e95cd: OUTPUT«WARNINGS for /tmp/9hl3GzorkX:␤Useless use of constant value X in sink context (line 1)␤»
19:26 [Coke] m: X.WHAT.say;
19:26 camelia rakudo-moar 0e95cd: OUTPUT«(X)␤»
19:27 dha Perhaps I'm wrong, but it seems to me that if it's a builtin type, there should be docs on how that type works. Unless you're never meant to use it, but only use subclasses of it, in which case, I'd think the response from p6doc should indicate that.
19:28 RabidGravy it's a package, not very typey
19:28 dha Then, perhaps p6doc should indicate that. :-)
19:28 [Coke] THere should be docs on everything,s ure.
19:28 [Coke] There are definitely gaps in the docs, sure.
19:29 dha it's listed in the output of p6doc -l, which supposedly lists "some top level documents", but there does not seem to be any document for X.
19:29 RabidGravy m: say X.HOW
19:29 camelia rakudo-moar 0e95cd: OUTPUT«Perl6::Metamodel::PackageHOW.new␤»
19:30 RabidGravy it doesn't have any methods and doesn't do anything
19:30 kaare_ joined #perl6
19:31 sortiz Yes, is only the base package of all public exception classes.
19:31 dha I mean, I have no problem with the documentation being fairly minimal if it doesn't do anything, but this still seems like a mismatch between the (nonexistent?) doc for it and what p6doc says about it.
19:31 [Coke] dha: yes. there are gaps.
19:31 [Coke] Are you asking if this particular gap is intentional?
19:32 RabidGravy no what p6doc is saying is
19:32 dha In fact, as I can't find an actual document about X, I'm not sure where p6doc is getting what it says.
19:32 RabidGravy m: require X;
19:32 camelia rakudo-moar 0e95cd: OUTPUT«X is a builtin type. You can use it without loading a module.␤  in block <unit> at /tmp/7_TT2BBWPe line 1␤␤»
19:33 dha [Coke] - I guess what I'm saying is, since this gap has been noticed, maybe it should be noted somewhere so that, as we try to close gaps (which I assume is an eventual goal), we know what the known gaps are.
19:34 RabidGravy it's possibly something that needs fixing in p6doc, but that's all that happens
19:34 [Coke] dha: sure. perhaps a ticket in perl6/docs/issues ?
19:34 [Coke] assuming that it's the same repo, and not somehow tied more directly to rakudo.
19:34 dha RabidGravy - That seems reasonable. "but that's all that happens" seems to make it sound like it's not worth doing, though. I, personally would not agree with that.
19:35 RabidGravy X only exists because e.g. X::AdHoc does
19:36 RabidGravy it's an implementation detail
19:36 dha It is quite possible that I'm worrying about what happens for people just coming to Perl 6, and that's not something the community at large sees as a high priority currently (not intended as a criticism, btw)
19:37 dha RabidGravy - Indeed, but potentially confusing for someone looking to learn P6 and poking around.
19:39 dha Myself, I might well be satisfied if p6doc -l wouldn't list it, as it seems to not agree with what the p6doc help page indicates -l does. Not sure if that would fully solve problems for newcomers, though. That particular point could easily be a lower priority discussion, though.
19:39 Guest16914 joined #perl6
19:40 RabidGravy then write the doc
19:40 Guest16914 What does 'KnowHOW methods must be called on object instance with REPR KnowHOWREPR' mean when using the --profile option
19:41 RabidGravy it will have less characters than have been typed on the matter already :)
19:41 dha If I can figure out what to write, I may well do that. :-)
19:42 sortiz "The package X is only the base package of all public exception classes"
19:42 dvinciguerra_ joined #perl6
19:43 RabidGravy yes, nothing more you can say about it
19:43 sortiz And the same can be said about the symbol "Pod"
19:43 Begi joined #perl6
19:44 sortiz And a few others. :-)
19:46 sortiz m: require Rakudo; # For example
19:46 camelia rakudo-moar 0e95cd: OUTPUT«Rakudo is a builtin type. You can use it without loading a module.␤  in block <unit> at /tmp/SLxT7buIYR line 1␤␤»
19:46 dha Based on looking at IO.pod, perhaps something like "The Package X provides no functionality itself; it is only the base package of all public exception classes."
19:47 dha Does that look unreasonable to anyone?
19:50 Guest16914 looks as if the profiler is borked in the latest build
19:51 Guest16914 Writing profiler output to profile-1459799269.04754.html
19:51 Guest16914 KnowHOW methods must be called on object instance with REPR KnowHOWREPR
19:51 Guest16914 Use of uninitialized value of type Block in string context
19:51 Guest16914 Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.
19:51 YP-QMUL-W joined #perl6
19:51 Guest16914 ===SORRY!===
19:51 Guest16914 Don't know how to dump a BOOTCode
19:53 kjk_ it doesn't seem possible to feed(==>) into an anonymous function? basically, I'd like to be able to run an external program then feed it's .out.lines to a block or function that I define on the fly to further process the data line by line as they become available, sort of like using shell pipeline with a bunch of commands
19:56 dvinciguerra_ joined #perl6
19:56 [Coke] Guest16914: latest release or git HEAD?
19:56 [Coke] and if the latter, how are you building rakudo?
19:57 Guest16914 This is Rakudo version 2016.03-86-g0e95cde built on MoarVM version 2016.03-84-g4afd7b6
19:57 Guest16914 rakudobrew build moar
19:57 [Coke] ok, so you're not deliberately picking moar HEAD, e.g. , one sec.
19:58 Guest16914 let me know if you need the script I'm trying to profile
19:59 perlpilot m: my $s = sub { say "Got: $_" for @_ };  "alpha", "beta" ==> $s();  # kjk_
19:59 camelia rakudo-moar 0e95cd: OUTPUT«Got: alpha␤Got: beta␤»
19:59 [Coke] prof-m: say "eek" for ^10
19:59 camelia prof-m 273e89: OUTPUT«eek␤eek␤eek␤eek␤eek␤​eek␤eek␤eek␤eek␤eek␤Writing profiler output to /tmp/mprof.html␤»
19:59 camelia .. Prof: http://p.p6c.org/25e47a4
20:00 [Coke] ... looks like prof-m is waaaay out of date.
20:00 perlpilot kjk_: See above
20:00 dha So, is this a sufficient addition to the docs to reflect that X does nothing itself: https://github.com/dha/doc/​blob/master/doc/Type/X.pod
20:01 dha And would p6doc pick up on that?
20:01 kjk_ perlpilot: thanks, but i have to define the sub in advance..., it would be awesome if i can just write a sub in-place after ==>
20:02 perlpilot m: "alpha", "beta" ==> sub {say "Got: $_" for @_}()
20:02 camelia rakudo-moar 0e95cd: OUTPUT«Got: alpha␤Got: beta␤»
20:05 kjk_ perlpilot: omg, thank you!! i coudn't get it work before because i was missing the () at the end. why it's necessary to call it? i don't really understand how it works...
20:05 YP-QMUL-W joined #perl6
20:05 [Coke] I was just able to run a random --profile with rakudo HEAD.
20:06 hankache dha i think it's fine.
20:07 perlpilot kjk_: If you don't call it, who do you think will?  :)
20:07 hankache but i don't know if p6doc will pick it up. Not an expert on the matter
20:08 Guest16914 [Coke], try this https://gist.github.com/anonymous​/59b2922840bbcbdef23206629d0a4cbd
20:08 dha hankache - me neither, hence my asking. :-)
20:08 dha Am currently looking at p6doc to see if I can find how this works.
20:09 sortiz dha, you need to create a PR.
20:09 perlpilot kjk_: See S06:1447  It outlines the things that can/must be on the sharp end of the feed op.
20:10 kjk_ oh~ ic..., i think i misunderstood how ==> works, thanks for the pointers, i'll read up on the docs
20:10 dha sortiz - well, yes. but I figured I'd get at least a general "yeah, that looks ok, I guess" from someone before actually trying to make it go in officially. :-)
20:11 jsimonet joined #perl6
20:11 sortiz dha, the interested people will look the PR, and comment there if needed. :-)
20:13 hoelzro .tell donaldh I tried your JVM REPL fix patch, and sadly it only kinda works =/
20:13 yoleaux hoelzro: I'll pass your message to donaldh.
20:13 hankache dha push the button :)
20:13 xinming joined #perl6
20:13 dha I suppose. But this helps my own peace of mind slightly. Especially, as I suspect that this will be something I may need to do a few times to remedy similar issues with things resulting from p6doc -l. :-)
20:14 * dha considers changing his nick to "max"...
20:14 cdg joined #perl6
20:15 cdg joined #perl6
20:16 [Coke] Guest16914: it's this line that causes the issue: my @mat[$size; $size];
20:17 dha hankache - it actually involved pressing *two* buttons, but it's done. :-)
20:17 Guest16914 my two dimensional array?
20:17 [Coke] Here's a golf: ./perl6 --profile -e 'my @m[5]'
20:17 hankache dha++
20:18 Guest16914 Yup, fails here as well
20:18 [Coke] Please open an RT (email to rakudobug@perl.org) with that info.
20:18 Guest16914 ok, will do
20:22 hankache is anyone reading the "panama papers" news?
20:26 Guest16914 Bug sent
20:27 Guest16914 [Coke]++, thx for helping out
20:28 skids dha: you might want to mention that if you are looking for the base class instead, it is called "Exception"
20:32 dha joined #perl6
20:32 stmuk dha: I suspect the correct fix for p6doc X is to modify the p6doc -l search to ignore directories
20:33 dha stmuk - That actually sounds correct.
20:34 dha That may also solve the issue that, for instance, Backtrace shows up twice.
20:36 espadrine_ joined #perl6
20:36 dha Huh. Also, p6doc seems to take arguments as case-insensitive. Is that by design?
20:36 dha (i.e. p6doc but gives the doc for Buf)
20:36 dha s/but/buf/; #damn you autocorrect
20:37 stmuk probably
20:38 dha Interesting... 'p6doc dudish' does *not* work.
20:39 dha So that's... inconsistent if case-insensitivity is intended.
20:39 stmuk I don't see case-insenitivity at a quick look
20:40 dha Frankly, I found 'p6doc buf' working to be a surprise.
20:40 stmuk are you on windows?
20:41 dha nope. os X 10.10.5
20:41 stmuk well that's case insensitive fs as well
20:42 dha Still, that wouldn't explain why buf would work, but dbdish wouldn't.
20:43 stmuk I think it's a partial explanation
20:43 dha could be. possibly hard to confirm, given the inconsistency, though.
20:44 [Coke] dha: dbdish or dudish?
20:44 dha gah. dbdish.
20:44 Ulti so sent some pull requests to the guy running glot.io
20:45 * dha turns off autocorrect
20:45 Ulti hopefully they are enough for it to either "just work" or for the main author to get going on adding Perl 6
20:45 stmuk 'p6doc buf' works on my mac and not on linux so I'd say that's fs related
20:45 Ulti also the project is a little zany in its written in Go Erlang and Haskell as well as a load of JavaScript
20:46 Ulti and has a different repository for each language that you have to edit
20:46 Ulti which makes creating a PR kind of impossible
20:46 dha Oh, and this is exciting. 'p6doc Debugger::UI::CommandLine' gives me a 'Dynamic variable $*DEBUG_HOOKS not found' error
20:46 stmuk dha: that's probably a "perl6 --doc" error
20:48 stmuk dha: I just get "No Pod found"
20:50 dha yeah, I just looked in the relevant directory and that type's not there. So I'm not sure why I'm getting that dynamic variable error.
20:50 stmuk dha: setting P6DOC_DEBUG=1 as an env var might help with some of this
20:51 stmuk dha: it does need quite a lot of work TBH
20:51 dha Yeah. I appear to just be uncovering weird edge cases today. :-)
20:54 dha And, FWIW, setting P6DOC_DEBUG does not seems to have made the error go away.
20:54 stmuk its more likely to give insight about the problem than fix it
20:58 ZoffixWin .lastlog Zof
20:59 dha ...and it turns out Digest::MD5 has no documentation...
21:00 ZoffixWin There's a README on GitHub: https://github.com/cosimo/perl6-digest-md5
21:00 stmuk there isn't much use of pod with perl6 modules apart from the core docs
21:00 hankache Ulti I emailed the guy and asked him if he could add support for Perl 6. He said he'll look into it during the week
21:01 stmuk ZoffixWin: sounds like a job for https://github.com/stmuk/p6-eco-readme
21:01 dha ZoffixWin - that doesn't help someone trying to use p6doc to read the docs. :-/
21:01 ZoffixWin stmuk++
21:01 dha stmuk++
21:03 dha And, FWIW, I find the fact that so many modules lack pod a problem. Having two different places to look for documentation feels wrong. YMMV, of course.
21:04 ZoffixWin I think that's largely due to GitHub not supporting P6 POD.
21:04 teatime dha: 3rd party modules not being documented w/ pod doesn't seem like a p6doc problem / a problem p6doc can fix.
21:04 ZoffixWin Personally, I hate reading from command line.
21:05 dha teatime - Obviously. Still, IMO, a problem. Contrary to what may be popular belief from my interaction today, p6doc is not my only concern. :-)
21:05 dha ZoffixWin - I forget, are/were you a Perl 5 programmer?
21:05 stmuk I don't exclusively use web docs and p6doc is useful to me
21:06 ZoffixWin dha, yeah. I always use metacpan. Other than perldoc -f funct for core subs
21:06 stmuk also I might be on a plane or out of network coverage
21:07 dha Ok. Just wondered, because a lot of p5 people are pretty used to using perldoc. But maybe that just isn't the right solution for you. I still suspect that many people coming from p5 to p6 would look to use a perldoc-ish solution.
21:08 dha Also, I always want to render metacpan as meatcpan. But that may not be relevant. :-)
21:08 Begi1 joined #perl6
21:09 stmuk dha: this is one reason I use p6doc because I'm used to man(1) and perldoc
21:09 * ZoffixWin owned meatcpan.org for a couple of years....
21:09 dha right. Same here.
21:11 stmuk but this is probably now a minority view
21:12 MadcapJake what do Sixians prefer: docs in top-level readme, docs in-line (#|,#=) in modules, or docs at beginning/end of module files?
21:12 perlpilot .oO( Docs I can get to with p6doc  :)
21:12 teatime MadcapJake: I am not going to complain if there are docs at all.
21:13 teatime and what perlpilot said
21:13 perlpilot MadcapJake: I personally find in-line docs distracting, so I tend to favor docs at the end of the module file.
21:14 stmuk MadcapJake: I imagine that (like perl 5) everyone does it different
21:15 MadcapJake TBH, I think I over-use (#|,#=) them for sure (I think they ought to be short one-line summaries), but I'm just not knowledgeable on the typical Perlish way to do it
21:16 stmuk or not at all :)
21:16 perlpilot MadcapJake: keep in mind that we're still inventing the sixian way.
21:16 dha Yes, standards are still a work in progress...
21:16 MadcapJake perlpilot: yeah, I really love this site though: http://6doc.rightfold.sexy/ and I've been trying to figure out how to properly get my modules to do that
21:18 MadcapJake (lots of modules on there don't really map up though but some it works really well for)
21:21 perlpilot Looks like they use the README on that site  (What pitiful docs I have for File::Temp are only in the README and it shows up on that site)
21:22 MadcapJake perlpilot: it also tries to pull docs from your module files too
21:22 perlpilot aye.
21:22 perlpilot I really don't favor using the README for docs like that though.  It seems .... poor
21:23 dha perlpilot - If it makes you feel any better, p6doc *does* give a result for File::Temp...
21:24 tony-o perlpilot++ on finding inline docs distracting
21:27 dha I conditionally disagree. I think it varies from module to module whether inline docs are useful or not.
21:28 hoelzro <2c> I like end-of-file docs for overview and examples, but inline for a brief description of how to use a given sub so I can have my editor navigate to those docs when I run a mapping when my cursor is on a symbol </2c>
21:28 AlexDaniel joined #perl6
21:29 MadcapJake looks like sixdoc uses «perl6 --doc=HTML» under the hood
21:29 dha this is an area where I find hard and fast rules to be potentially counter-productive.
21:30 AlexDaniel MadcapJake: yeah, #↓ and #← are nice…
21:30 MadcapJake if only that worked :)
21:30 AlexDaniel yeah…
21:33 Herby_ joined #perl6
21:33 Herby_ Afternoon, everyone!
21:33 Herby_ \o
21:33 MadcapJake can you access pod docs from within Perl 6?
21:35 RabidGravy yeah
21:35 RabidGravy $=pod or something
21:37 dha Do we have a useable debugger yet?
21:38 MadcapJake RabidGravy: I think the = twigil is NYI
21:38 RabidGravy no it definitely does something
21:39 RabidGravy not completely implemented probably
21:39 dalek DBIish: fe86f04 | (Salvador Ortiz)++ | / (3 files):
21:39 dalek DBIish: Oracle: Add Blob (RAW) support
21:39 dalek DBIish: review: https://github.com/perl6/DBIish/commit/fe86f04c76
21:39 dalek DBIish: 1671af3 | (Salvador Ortiz)++ | README.pod:
21:39 dalek DBIish: Merge branch 'master' of github.com:perl6/DBIish
21:39 dalek DBIish: review: https://github.com/perl6/DBIish/commit/1671af3b36
21:40 MadcapJake ok so after some more fiddling, $=pod explicitly is working, it is a collection of all pod blocks in a file, I think.
21:41 dha Good lord. Why does p6doc declare a $PROGRAM-NAME? And then only use it to assign it to a variable called $me? And then, in a function, use $*PROGRAM-NAME?
21:41 * dha is starting to consider p6doc one of the levels of hell
21:42 Herby_ 7th level?
21:43 kid51 joined #perl6
21:44 dha Hard to tell. I've lost all sense of depth and direction at this point
21:45 stmuk dha: because the $*PROGRAM-NAME which once was a program name became a SHA1 hash
21:45 dha It... did?
21:46 rjbs Weird.
21:46 dha Because a program with the single command 'say $*PROGRAM-NAME;' actually prints the program name.
21:47 stmuk because a shim named as the program calls a filename with a SHA1 hash after installation
21:48 tony-o dha: try precomping the script and then do $*PROGRAM-NAME
21:48 dha ah. ok. I have not been precompiling anything.
21:49 stmuk assuming you aren't using rakudobrew in which case there is another level of shims
21:49 stmuk :)
21:49 dha And, now that you're saying that, given the directories where modules seem to live, the SHA1 thing makes some sense in context.
21:49 stmuk yes
21:50 dha The assignment of $PROGRAM-NAME to $me still makes me stare in amazement.
21:53 * stmuk is surprised anyone would find programming brokeness unusual
21:53 MadcapJake Is there any up-to-date docs on $*REPO and CUR?
21:53 perlpilot stmuk: but Perl people are smarter than your average programmer!  ;)
21:53 stmuk hahahaha
21:55 Herby_ i most certainly am not :)
21:58 dha stmuk - this seems more "WHY??" than actual brokenness.
21:58 stmuk its historic
21:59 lizmat joined #perl6
21:59 Herby__ joined #perl6
22:00 Herby__ m: my @array = <1 2 3 4>; while @array { for @array.pop -> $number { say $number } }
22:00 camelia rakudo-moar 0e95cd: OUTPUT«4␤3␤2␤1␤»
22:01 dha Of course what I'm *actually* trying to figure out is how the -l option is processed. Currently, I'm thinking some kind of black magic.
22:02 stmuk https://github.com/perl6/doc​/blob/master/bin/p6doc#L107
22:03 ZoffixWin Curtis Ovid Poe's FOSDEM Perl 6 talk: https://www.youtube.com/watch?v=hR9UdvxMAbo
22:04 ZoffixWin (sound gets better 3 minutes in)
22:04 stmuk you probably need to drop in a .grep: *.IO.f
22:04 stmuk (look for similar usage elsewhere in that file)
22:05 TEttinger joined #perl6
22:06 dha yeah, that's used in search-paths(), which is used in the MAIN sub that deals with -l
22:09 dha Ok, I'm clearly out of the loop. What does 'X~' do in 'my @paths = search-paths() X~ <Type/ Language/> ;'
22:10 Juerd m: say <a b c d> X~ <1 2 3 4>
22:10 camelia rakudo-moar 0e95cd: OUTPUT«(a1 a2 a3 a4 b1 b2 b3 b4 c1 c2 c3 c4 d1 d2 d3 d4)␤»
22:11 Juerd X is a meta-operator on ~ in this case.
22:11 dha Great! Is that, heaven forbid, documented anywhere? Searching for X, ~, and X~ are all non-helpful.
22:12 Juerd It's documented, just hard to find: http://doc.perl6.org/languag​e/operators#Cross_Operators
22:12 timotimo hmm, perhaps "cross"?
22:12 timotimo oh well
22:12 MadcapJake tadzik: how does Panda figure out what modules are installed?
22:12 timotimo that is hard, in deed
22:12 timotimo MadcapJake: it has its own little "state" file
22:13 MadcapJake projects.json, right? How is it populated though?
22:13 dha Juerd - Hard to find, BAD. :-/
22:13 * sortiz now know why dna++ quest started! ;-)
22:13 dha Although, my mistake. there is an example at the bottom of the doc for infix X
22:14 MadcapJake timotimo: I think this is it: http://ecosystem-api.p6c.org/projects.json
22:14 tadzik MadcapJake: no, its own state file
22:15 Juerd I think that X is one of those things that many Perl 6 folks take for granted without still realizing how special it is.
22:15 dha yeah. it kinda makes my head hurt. especially when used as a metaoperator
22:16 timotimo MadcapJake: no, that's not what it is
22:16 Juerd My way of doing the same thing in Perl 5 would make your head hurt even more ;)
22:16 timotimo the thing we really need is a text field you can paste some code into that'll tell you what things are and refer to.
22:17 Juerd my @paths = glob "{" . join(",", search_paths()) . "}{Type/,Language/}";  # ;)
22:18 Sgeo joined #perl6
22:18 AlexDaniel m: WHAT ∞:;
22:18 camelia rakudo-moar 0e95cd: ( no output )
22:19 MadcapJake timotimo, tadzik: is it «statefile => $*CWD.child('REMOVEME')»?
22:19 lizmat m: say WHAT ∞
22:19 camelia rakudo-moar 0e95cd: OUTPUT«(Num)␤»
22:19 ugexe `zef --installed list` will show you whats installed without a possibly out-of-date state file
22:20 timotimo i hadn't realized we have WHAT as a sub
22:20 timotimo heyo Herby__
22:22 Herby__ timotimo: o/
22:23 ZoffixWin Hm, watching Ovid's talk, I just now learnt there's a UInt type :o Not documented, it seems
22:23 ZoffixWin m: sub foo (UInt $x) { say $x }; foo -42
22:23 camelia rakudo-moar 0e95cd: OUTPUT«Constraint type check failed for parameter '$x'␤  in sub foo at /tmp/H_kAO3F53x line 1␤  in block <unit> at /tmp/H_kAO3F53x line 1␤␤»
22:24 lizmat ZoffixWin: yeah, it's a generic subtype, so no smartness in the error message
22:25 MadcapJake ugexe: thanks, list-installed is very clearly written! This is exactly what I need.
22:25 ZoffixWin lizmat, I'm OK with that. I'm just surprised it exists :D
22:25 ZoffixWin s/it/UInt type/;
22:25 stmuk panda uses "mumble/panda/state"
22:26 lizmat ZoffixWin: it looks like I added it about a year ago
22:26 stmuk my $state = Panda::Installer.new.default-prefix() ~ '/panda/state';
22:26 stmuk and its actually json
22:28 tadzik MadcapJake: em, no
22:28 tadzik what stmuk says
22:34 frobisher joined #perl6
22:34 vendethiel joined #perl6
22:37 dha so... did my question about docs on smart matching get through before I got disconnected?
22:38 Herby__ [16:15] <dha> yeah. it kinda makes my head hurt. especially when used as a metaoperator
22:39 Herby__ thats the last thing i see from you
22:39 dha ah.
22:39 dha so...
22:39 dha Speaking of smartness, is there anything in the docs about how smart matching works? The only actual description I'm seeing is in the design documents.
22:42 stmuk dha: no
22:43 dha Ah. Again, that seems... not good. particularly if you're trying to figure out how grep is supposed to work.
22:44 skids joined #perl6
22:44 dha Because the result of C<<perl6 -e 'say ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d'>> is confusing me, given the result of C<<perl6 -e 'say $*REPO.repo-chain()>>.Str X~ </doc/>'>>
22:51 Juerd If that's like Perl 5 POD (I really haven't looked at Perl 6 POD yet), whitespace is mandatory within C<< ... >>
22:51 Juerd ;)
22:52 Juerd There doesn't seem to be a smart match in your code.
22:57 stmuk m: ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d
22:57 camelia rakudo-moar 0e95cd: ( no output )
22:57 stmuk m: say ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d
22:57 camelia rakudo-moar 0e95cd: OUTPUT«()␤»
22:57 stmuk m: say $*REPO.repo-chain()
22:57 camelia rakudo-moar 0e95cd: OUTPUT«(inst#/home/camelia/.perl6 inst#/home/camelia/rakudo-​m-inst-1/share/perl6/site inst#/home/camelia/rakudo-m​-inst-1/share/perl6/vendor inst#/home/camelia/rakudo-m-inst-1/share/perl6 CompUnit::Repository::AbsolutePath.new(next-repo => CompUnit::Repository::NQ…»
22:58 stmuk m: say $*REPO.repo-chain() X~ </doc/>
22:58 camelia rakudo-moar 0e95cd: OUTPUT«(/home/camelia/.perl6/doc/ /home/camelia/rakudo-m-ins​t-1/share/perl6/site/doc/ /home/camelia/rakudo-m-inst​-1/share/perl6/vendor/doc/ /home/camelia/rakudo-m-inst-1/share/perl6/doc/ CompUnit::Repository::Absolu​tePath<140487847473400>/doc/ CompUnit::Repositor…»
22:59 dha FWIW, without the grep, I get "(/Users/dha/.perl6/doc/ /Users/dha/rakudo/install/share/perl6/site/doc/ /Users/dha/rakudo/install/share/perl6/vendor/doc/ /Users/dha/rakudo/install/share/perl6/doc/ CompUnit::Repository::Abso​lutePath<4433253456>/doc/ CompUnit::Repository::NQP<4433250704>/doc/ CompUnit::Repository::Perl5<4433248112>/doc/)"
23:00 dha *with* the grep, I get "(/Users/dha/rakudo/install/share/perl6/doc/)"
23:00 stmuk I think that's intended behaviour
23:00 Juerd Do any of the others exist as a directory then?
23:00 stmuk probably not
23:00 Juerd At least Perl 6 thinks they don't
23:00 lizmat wrt to smart match: A ~~ B is basically B.ACCEPTS(A)
23:01 stmuk the Build.pm for doc creates a doc directory
23:01 lizmat m: class A { has $.a; method ACCEPTS(\other) { dd self, other } }; A.new(a => 42) ~~ A.new(a => 666)
23:01 camelia rakudo-moar 0e95cd: OUTPUT«A.new(a => 666)␤A.new(a => 42)␤»
23:01 Juerd dha: Note that .IO.d is like -d in Perl 5. It only returns true if the given path exists *and* is a directory.
23:02 stmuk the X~ is probably not needed in that case anymore
23:02 stmuk the core docs used to be under lib but were moved under a doc directory
23:02 dha Ah. I knew that .d was a dir test, the *.IO confused me.
23:03 stmuk m: say "/tmp".IO.^name
23:03 camelia rakudo-moar 0e95cd: OUTPUT«IO::Path␤»
23:03 dha In any case, it looks to me like that problem I was looking at hours ago can be solved by putting a .d test in the routine that handles p6doc -l
23:06 dha ok, I see that you need the IO because .d comes from an IO class, but what is the * doing there?
23:06 * dha wonders if this would make more sense if he ate something
23:07 * lizmat wonders whether terms like "eager" and "slurpy" help with this feeling
23:07 dha On the other hand it may just be the senility
23:08 vendethiel joined #perl6
23:08 lizmat or sleepiness...
23:08 lizmat good night, #perl6!
23:09 Juerd dha: An expression with * is turned into a closure where * is the parameter/argument. In other words, * + 2 is just another way to write  -> $x { $x + 2 }  and  *.IO.d  is just another way to write  -> $f { $f.IO.d }
23:09 Juerd Or even sub ($x) { $x + 2 } and sub ($f) { $f.IO.d }
23:10 dha Ah. so it's not precisely, but vaguely $_-ish?
23:10 Juerd Or, because timttwtdi, { $^x + 2 } and { $^f.IO.d }
23:10 Juerd It's used in places where you might have used $_ in Perl 5.
23:11 dha *nod* Ok, I think I get it sufficiently for my current purposes.
23:11 Juerd Or actually, grep does alias $_ so if you like you can use that too
23:11 * dha makes mental note to start poking people likely to write perl 6 books to start doing so. :-)
23:11 Juerd foo.grep: { $_.IO.d } or foo.grep: { .IO.d }
23:12 ZoffixWin or foo.grep: *.IO.D
23:12 ZoffixWin s/D/d/;
23:12 Juerd ZoffixWin: That's what we started with :)
23:12 ZoffixWin Oh, sorry :)
23:12 * ZoffixWin goes back to drinking and writing code :)
23:13 dha huh. the .IO.d version requires the braces...
23:13 Juerd dha: Yes. grep requires a closure
23:13 Juerd dha: Only expressions with * are braceless closures. Other closures require {}.
23:13 Juerd $_ doesn't do that.
23:14 spintronic joined #perl6
23:14 Juerd $_ is just a variable, nothing special about it.
23:14 dha Ah. ok, got it.
23:15 Juerd Except perhaps that it's declared by default and at one point you'll run into that you're actually using $_ instead of what you wanted to use.
23:15 ZoffixWin dha, in essence the * gets changed into an $_ and the thing gets wrapped in curlies: *.foo -> { $_.foo }; * < 100 -> { $_ < 100 }; etc
23:15 Juerd Specifically, in a method, $_ is *not* self, and .foo still is short for $_.foo, so don't use that to mean self.foo.
23:15 ZoffixWin More or less... I guess it's more it gets changed into $^a
23:16 ZoffixWin As * + * is { $^a + $^b }
23:16 Juerd ZoffixWin: -> $_ { $_.foo }
23:16 Juerd Or any other _
23:16 dha Ok, that makes sense.
23:16 Juerd IIRC, * has nothing to do with $_
23:16 dha It's amazing how far down the rabbit hole you can go when just trying to fix a minor oddity in p6doc...
23:17 Juerd dha: Sure, but without books we'll have to make do with trying to fix bugs as a means to learn the language ;)
23:17 Juerd I see it's working for you :D
23:17 dha Apparently, that's what I'm doing. :-)
23:18 Juerd I think I learned most of the modern Perl 6 that I know from its own source
23:18 Juerd (I say modern Perl 6 because I can't seem to unlearn the never-implemented design-phase Perl 6 thingies.)
23:20 TimToady joined #perl6
23:22 BenGoldberg joined #perl6
23:23 dha Oh joy! The p6doc in the doc repo bears little or no relation to the one that gets installed in the rakudo directory! so I get to start looking for -l from scratch!
23:23 cognominal joined #perl6
23:25 Juerd Ouch
23:25 spintronic joined #perl6
23:28 arc__ joined #perl6
23:28 arcetera joined #perl6
23:30 spintronic joined #perl6
23:34 cdg joined #perl6
23:50 dvinciguerra_ joined #perl6
23:52 vendethiel joined #perl6
23:55 kid511 joined #perl6
23:56 spintronic joined #perl6
23:59 dha Good lord. when you use p6doc, it uses the p6doc under your rakudo installation's /install/share/perl6/site/bin directory, which is a program that looks for *other* p6doc programs, and then runs one of *those*

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

Perl 6 | Reference Documentation | Rakudo