»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
00:00 leont left, johndau joined 00:01 autarch joined 00:05 vendethiel left 00:06 autarch left 00:08 autarch joined 00:12 AlexDaniel joined 00:13 Herby_ joined
Herby_ Evening, everyone! 00:13
\o
timotimo just as i was about to hop into be d:|
00:14 Skarsnik left
Herby_ timotimo: where you hopping to? 00:14
00:20 Vlavv_ left 00:33 Vlavv_ joined 00:38 vendethiel joined 00:43 pierrot left, pierrot_ joined 00:48 Actualeyes joined 00:50 Ben_Goldberg left 00:53 johndau` joined 00:56 johndau left
cognominal_ method from-list(Supply:U: +@values, :$scheduler = CurrentThreadScheduler) { # what the + is meaning here ? 00:57
00:58 Sgeo joined
raiph cognominal: doc.perl6.org/language/functions#Sl...onventions 00:58
01:00 vendethiel left
raiph cognominal_: ^^ 01:01
cognominal_ thx ralph++ 01:03
01:07 vendethiel joined 01:09 johndau` left 01:10 johndau joined 01:24 BenGoldberg joined 01:28 kurahaupo left 01:29 vendethiel left 01:36 vendethiel joined 01:37 molaf left 01:43 snarkyboojum joined, snarkyboojum left 01:45 ilbot3 left 01:47 ilbot3 joined 01:49 molaf joined
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
ZoffixWin: right, because there is no problem with the division
ZoffixWin: 0/0 is a great looking Rat
m: say (0/0).WHAT
camelia rakudo-moar 868d8b: OUTPUT«(Rat)␤»
AlexDaniel m: say (0/0).nude
camelia rakudo-moar 868d8b: OUTPUT«(0 0)␤»
AlexDaniel ah, it was pointed out a bit later, ok 01:54
Xliff Can someone tell me what this error means when coming from NativeCall? 01:55
Cannot locate symbol '' in native library ''
That's when I try and execute a function through a function pointer reset with nativecast()
The functions are set in a CStruct via the only call exposed. 01:56
01:59 vendethiel left 02:10 kid511 joined 02:12 kid51 left 02:20 kid511 left 02:24 yqt left 02:38 kentnl joined, kent\n left 02:41 noganex joined 02:43 noganex_ left 02:47 labster left
AlexDaniel ZoffixWin: hmm… however, in maths, rational numbers must have non-zero denominator 02:49
gfldex it's a lazy division by zero :-> 02:50
02:53 labster joined
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.
02:57 molaf left 03:01 snarkyboojum joined
Xliff Hrm. 03:01
My perl script is not showing the output of "say" from sub main {}. Am I missing something? 03:02
Lemme pastebin.
03:02 pierrot_ left, pierrot joined 03:06 snarkyboojum left
Xliff pastebin.com/0f4fwVRV 03:10
I get no out from that script. Any ideas?
TIA!
gfldex "AD-BLOCK DETECTED - Please Support Pastebin By Buying A PRO Account" ... "This page has been removed!" 03:11
and at least 4 tracking scripts
Xliff :( 03:12
I broke down and got a PRO account.
Or at least a free one and whitelisted the domain. Not sure.
Pastebin is too useful. :/
teatime lol wat
there are a zillion paste services 03:13
gfldex gist.github.com/ <-- free pro account :->
Xliff *snark*
I want my gists to be a little more mature than 'OHAI! HALP!'
skids Um... repr CPointer with attributes? 03:14
teatime you can make the transitory ones anonymous or secre
but there are a zillion paste services
gfldex i like gists because it's easy to work with from the CLI
and i can fork and update them, what is nice if the script is a little longer 03:15
AlexDaniel Xliff: you can use gists instead 03:16
Xliff OK! OK!
AlexDaniel Xliff: or bitbucket snippets, or gitlab snippets
Xliff First everyone was like USE PASTEBIN MOAR!
Now I have to adjust.
AlexDaniel Xliff: in fact, camelia accepts everything that I've mentioned
teatime people say pastebin the same way google=search
Xliff =P
teatime or xerox=photocopy
skids or grep==filter :-) 03:17
AlexDaniel we should probably star saying “gist it” for a while until github gists are still OK
start*
I mean, while github gists are ok…
until they follow the path of pastebin
it*… 03:18
teatime I guess this is why every project channel seems to have its own custom pastebin
I have never used this one, but ran across it earlier today and it looks cool: ix.io/
I put it on my list to look at later.
night-night #perl6 03:19
Xliff gist.github.com/Xliff/b3e0dfd7ab71...75decd42d8
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
gfldex m: gist.github.com/Xliff/b3e0dfd7ab71...75decd42d8
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␤»
teatime AlexDaniel: I wasn't telling you what to do, just making an observation.
Xliff I use Markdown markups for this.
Let me edit those out.
AlexDaniel teatime: sure :)
gfldex i found that making it easy to be helped a winning strategy 03:20
Xliff m: gist.github.com/Xliff/b3e0dfd7ab71...75decd42d8
camelia ( no output )
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.
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
gfldex try MAIN instead if main
given you dont got a arguments list to MAIN you may want to drop it altogether
Xliff Cannot locate native library 'liblibtest.so': liblibtest.so 03:22
HAHAHAHAHA!
gfldex unless you seek aproval of the randudancy ministry of radundancy approval
Xliff Cannot locate native library 'libtest.so'
Hunh? libtest.so is in the current dir! 03:23
gfldex i'm not sure if . is in the default lib path
Xliff What's the best way to force it to look in cwd? 03:24
AlexDaniel LD_LIBRARY_PATH=.
Xliff Heh. 'k
AlexDaniel actually, I'm not sure if that works. Try it
Xliff Did 03:26
This representation (CPointer) does not support attribute storage
Not attributes! Struct members. But maybe done coz I used methods in the class.
skids Xliff: like I said above, you can't do that. 03:27
gfldex try `dd $ts` instead of .WHAT.
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.
even if it would work, it would be a little wrong. It's a foreign object after all. 03:29
These are hard times for foreigners it seams. :(
03:29 perlawhirl joined 03:32 djbkd joined
Xliff Oh yah! DUh! 03:32
Native call expected return type with CPointer representation, but got a CStruct 03:38
Progress!
OK. Now I am returning pointer. 03:41
How do I cast Pointer back to a defined type? nativecast() again?
Xliff is beginning to think that CPP name mangling might be easier... *sigh* 03:42
Thanks for all of the help, guys.
Herby_ poking around in the perl6intro 03:45
why is the ':' necessary here: %capitals.push: (France => 'Paris');
compared to pushing something into an array 03:47
AlexDaniel m: my %capitals; %capitals.push((France => ‘Paris’)); say %capitals 03:48
camelia rakudo-moar 868d8b: OUTPUT«France => Paris␤»
Herby_ or is the answer "just cause"
AlexDaniel Herby_: ↑ not that you actually need : there
Herby_: you can use regular parens
m: my %capitals; %capitals.push(France => ‘Paris’); say %capitals
camelia rakudo-moar 868d8b: OUTPUT«␤»
Herby_ ahh. the ':' takes place of the parens?
AlexDaniel ouch
Herby_ yeah, thats what threw me off
AlexDaniel Herby_: yeah. Basically, yes 03:49
m: say(‘hello world’)
camelia rakudo-moar 868d8b: OUTPUT«hello world␤»
AlexDaniel m: say ‘hello world’
camelia rakudo-moar 868d8b: OUTPUT«hello world␤»
Herby_ my @a = [1,2,3]; @a.push: (4); say @a; 03:50
m: my @a = [1,2,3]; @a.push: (4); say @a;
camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
Herby_ m: my @a = [1,2,3]; @a.push: 4; say @a;
camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
gfldex m: my @capitals; @capitals.push: 'abc'; say @capitals
camelia rakudo-moar 868d8b: OUTPUT«[abc]␤»
gfldex m: my %capitals; %capitals.push: France => ‘Paris’; say %capitals
AlexDaniel well, if you want to blow your mind, then
camelia rakudo-moar 868d8b: OUTPUT«␤»
gfldex bad example if you ask me
AlexDaniel m: my @a = [1,2,3]; push @a: 4; say @a;
camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 4]␤»
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;
camelia rakudo-moar 868d8b: OUTPUT«[1 2 3 blah]␤»
AlexDaniel gfldex: it kinda is
gfldex m: my method foo(Int $i: Str $b){}; 03:53
camelia ( no output )
gfldex i think your example is this kind of colon
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
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␤»
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 :/
lta :(
BenGoldberg m: my %c; %c.push: a => 'b'; say %c;
camelia rakudo-moar 868d8b: OUTPUT«␤»
BenGoldberg m: my %c; %c.push: (a => 'b'); say %c;
camelia rakudo-moar 868d8b: OUTPUT«a => b␤»
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 …»
BenGoldberg m: my @a; say @a.WHAT;
camelia rakudo-moar 868d8b: OUTPUT«(Array)␤»
AlexDaniel m: my @a; push @a: @a.push: push @a: ‘x’
camelia ( no output )
BenGoldberg ^ You forgot to say the result ;) 04:00
AlexDaniel needs more colons
m: my @a; push @a: @a.push: push @a: :25x
camelia ( no output )
BenGoldberg m: my @a; push @a: @a.push: push @a: ‘x’; say @a;
camelia rakudo-moar 868d8b: OUTPUT«(\Array_74311936 = [x Array_74311936 Array_74311936])␤»
AlexDaniel BenGoldberg: I didn't really want to show that… :)
gfldex m: my @a; push @a: @a.push: push @a: :25x; dd @a;
camelia rakudo-moar 868d8b: OUTPUT«Array @a = (my \Array_78530768 = [Array_78530768, Array_78530768])␤»
AlexDaniel because… look… :)
04:01 kjk_ left
gfldex if somebody boldly declaired to be a Perl 6 expert, I would let him braincompile that. :) 04:01
BenGoldberg It looks like a perfectly ordinary circular data structure, to me ;) 04:02
AlexDaniel BenGoldberg: oh well! Maybe you will like this one 04:03
m: my $x := (my $y := $x);
camelia ( no output )
AlexDaniel and if you're wondering WHAT is that
then the right answer is 04:04
BenGoldberg m: say my $x := (my $y := $x);
camelia rakudo-moar 868d8b: OUTPUT«(Mu)␤»
AlexDaniel m: my $x := (my $y := $x); say $x.WHAT
camelia rakudo-moar 868d8b: OUTPUT«(signal SEGV)»
gfldex m: my $x := (my $y := $x); .say for $x;
camelia rakudo-moar 868d8b: OUTPUT«Cannot call method 'map' on a null object␤ in block <unit> at /tmp/h1BT_dK_g7 line 1␤␤»
AlexDaniel SEGV!
gfldex please rakudobug
AlexDaniel hold on a second…
gfldex m: my $x := (my $y := $x); dd $x;
camelia rakudo-moar 868d8b: OUTPUT«Mu␤»
AlexDaniel gfldex: done! rt.perl.org/Ticket/Display.html?id=127254
skids m: m: say my $x := (my $y := $x); $x = 42; 04:05
camelia rakudo-moar 868d8b: OUTPUT«(signal SEGV)(Mu)␤»
BenGoldberg Alas, it is now past my bedtime.
04:05 BenGoldberg left
gfldex you traveled back in time yust to rakudobug? Colour me impressed! 04:06
perlawhirl hi perlers 04:09
04:12 AlexDaniel left
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:13
Herby_ hello perlawhirl! 04:14
o/
perlawhirl hi
04:18 skids left 04:32 vendethiel joined
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)␤»
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␤»
Herby_ m: my @a = <1 2 3 4 5 6>; say $y = 10; say map(-> $x $y { $y + $x ** 2 if $x > 3 }, @a);
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␤»
Herby_ m: my @a = <1 2 3 4 5 6>; say $y = 10; say map(-> ($x,$y) { $y + $x ** 2 if $x > 3 }, @a);
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 **␤»
Herby_ hmmm
m: my @a = <1 2 3 4 5 6>; say my $y = 10; say map(-> ($x,$y) { $y + $x ** 2 if $x > 3 }, @a);
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␤␤»
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)␤»
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)␤»
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 Cabanossi left
Herby_ bedtime, night everyone 04:39
04:39 Herby_ left 04:42 Cabanossi joined 04:50 geekosaur left 04:51 geekosaur joined 05:03 khw left 05:23 CIAvash joined 05:30 nakiro joined 05:34 _nadim joined 05:37 nadim left 05:52 Relsak joined 05:57 Relsak left, djbkd left 06:08 djbkd joined
Xliff OK, here is something that I am not getting with NativeCall. 06:19
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:20
06:21 firstdayonthejob joined 06:24 domidumont joined
Xliff Updated gist: gist.github.com/Xliff/b3e0dfd7ab71...75decd42d8 06:24
06:28 domidumont left
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:34
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] ?
and you need to use, uh, .deref? 06:37
lemme see if i can compile yer example
↳⃣ LD_LIBRARY_PATH='.' perl6 thing.pl 06:38
Hello perl6!
True
DONE!
there we go
you seem to be doing some fancy stuff up in here, so I'm not sure why you missed that smallish detail.. 06:39
06:41 firstdayonthejob left
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?
perlawhirl DrForr: hi. I'm having problems install Readline on centos 6. I logged an issue 06:45
06:45 domidumont joined
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
so... *shrug*
DrForr Let me see if it's a quick fix. (I'm at work) 06:46
perlawhirl ta
06:48 fireartist joined, domidumont left
DrForr (need to rebuild rakudo here, this laptop hasn't been cleaned up for a while. 06:49
s/$/)
06:49 domidumont joined
perlawhirl .tell dogbert1 my 'first :kv' patch has been merged 06:54
yoleaux perlawhirl: I'll pass your message to dogbert1.
06:55 _nadim left
ufobat morning perl6 06:57
06:58 _nadim joined 07:02 _nadim left 07:03 _nadim joined 07:04 pierrot left, pierrot joined 07:06 wamba joined 07:08 _nadim left, _nadim joined 07:09 zakharyas joined 07:14 zhi joined 07:15 zhi left
DrForr Building Panda locally so I can check over a few things. 07:15
perlawhirl thanks 07:16
07:21 Relsak joined 07:25 ely-se joined
DrForr github.com/drforr/perl6-readline/issues/10 - This is it? 07:29
perlawhirl yes 07:35
07:37 pdcawley joined, edjsu left, edjsu joined, orbus left, emdashcomma left 07:38 orbus joined, petercommand left 07:39 ggoebel16 left, labster left, Some-body_ joined, labster joined, grassass left, ggoebel16 joined 07:40 perlawhirl left, petercommand joined, DarthGandalf left, Khisanth left, djbkd left 07:41 Some-body_ is now known as DarthGandalf
DrForr Maybe free_keymap is actually superseded by discard_keymap. 07:41
07:43 grassass joined 07:44 huf joined, emdashcomma joined
Xliff DrForr, holy crap! Thanks a lot! 07:45
Let me make updates and see if I can get it to work.
Timus, Thank you too! 07:46
s/Timus/Timbus/
DrForr github.com/drforr/perl6-readline/c...cfa83c5ec9 07:47
07:48 abraxxa joined
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.
Xliff Timbus: Can you post your thing.pl on my gist? 07:49
gist.github.com/Xliff/b3e0dfd7ab71...75decd42d8
Thanks.
07:50 hankache joined
hankache morning 07:50
DrForr Back in a few minutes, need to take care of some accounting business.
Xliff hankache, \o 07:52
hankache hiya Xliff
Timbus Xliff, uh, in the end I only changed one line I think.. 07:53
07:54 Khisanth joined
Xliff Timbus, I think I changed the same one and I'm getting the same SegFault I was getting before. 07:54
:/
Timbus oh..
well, I pasted the change there
Xliff So I'm rebuilding rakudo.
And trying again. 07:55
Timbus both of the structs i pasted work, for me
Xliff kk! Thanks for the help!
Still wondering why the extra "True" is emitted. 07:56
07:56 perlawhirl joined
Xliff it's something in print_S() 07:56
\o perlawhirl
07:56 RabidGravy joined
perlawhirl hi 07:57
hankache hola
Timbus Xliff, because print_S returns True
RabidGravy erp
perlawhirl DrForr: Thanks, worked a treat
07:58 CIAvash left
Xliff Timbus, o 07:58
perlawhirl ah, he's afk
DrForr Oh, no, just got back.
perlawhirl .tell DrForr thanks it worked!
yoleaux perlawhirl: I'll pass your message to DrForr.
perlawhirl oh darnin
DrForr No worries. 07:59
yoleaux 07:58Z <perlawhirl> DrForr: thanks it worked!
perlawhirl darnit
hah
08:00 perlawhirl left 08:01 perlawhirl joined
Xliff *grr* -- Still getting a SegFault. WTF? 08:01
Timbus: What gcc version are you using?
hankache anyone knows how start and await function?
gist.github.com/hankache/bbbe41812...ff5228e383
i can't figure out why it's not running in parallel 08:02
am i missing something?
Timbus gcc (Ubuntu 4.8.4-2ubuntu1~14.04.1) 4.8.4 08:03
huh.. thought i was using 4.9. but okay 08:04
08:05 CIAvash joined 08:07 dakkar joined 08:08 snarkyboojum joined 08:10 g4 joined
Xliff BOO YAH! 08:12
Timbus: I forgot to change the [int]s to [int32]s
Now it works.
Timbus ah, yeah I should have included that 08:13
Xliff =)
Timbus glad it worked 08:14
Xliff No worries. You got me there. I am forever greatful.
Unfortunately this is a stripped down version of what I'm *really* trying to do.
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)
Xliff Timbus: I'm trying to get a working NativeCall implementation of this... 08:15
xqilla.sourceforge.net/docs/xqc-api...on__s.html
Will apply lessons learned, tomorrow.
It's 4am here. :/
(It's not tomorrow until I wake up, dammit!)
gfldex hankache: see method race and method hyper 08:16
hankache gfldex thanks 08:17
i think the key is to put promises in an array
08:17 darutoko joined
hankache and await @promises 08:17
gfldex see my comment on the gist 08:18
gfldex oh no! i made a mistake. still not working 08:19
gfldex hankache: try `start { @array1.map( {is-prime($_ + 1)} ) };` 08:20
may need a `do` too
hankache no luck! 08:23
RabidGravy what makes you think it isn't being run concurrently> 08:25
hankache its taking more time!
and only one core is being used 08:26
08:28 rindolf joined
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␤␤»
gfldex are HyperSeqs meant to be comparable? 08:29
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
camelia rakudo-moar 868d8b: OUTPUT«(signal XCPU)»
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:32 _nadim left
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)»
gfldex m: say (0..4999).race.map({is-prime($^a+1)}) (cont) (2..5001).race.map({is-prime($^a-1)})
camelia rakudo-moar 868d8b: OUTPUT«False␤»
gfldex they are comparable
hankache thanks RabidGravy
08:34 vendethiel left 08:36 vendethiel joined
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
m: sub foo { say $^a }; ␤␤sub bar { 0 }; ␤␤␤; sub meow { my $x = bar() / bar }; ␤␤␤␤␤␤␤;say foo meow
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␤␤»
ZoffixWin Not that there's much that can be done about this, probably.
Trippy error: 08:41
m: sub bar { 0 }; my $x = bar / bar;
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…»
ZoffixWin Frankly, I don't understand why creating a Rat with zero denominator isn't a fatal error. 08:44
08:45 snarkyboojum left, labster left
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
but this doesn;t: my $promise1 = start { @array1.map( {is-prime($_ + 1)} );};
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)} );}
camelia rakudo-moar 868d8b: OUTPUT«(False True True False True False True False False False)␤»
abraxxa can someone recommend a dump utility to find out what char something that looks like a space really is?
hexdump shows it's different
DrForr hexdump -C :) 08:49
ZoffixWin m: ' '.uniname.say
camelia rakudo-moar 868d8b: OUTPUT«SPACE␤»
ZoffixWin :(
RabidGravy no, it's just the *what* is getting returned
abraxxa DrForr: that prints .. for the first space and . after the last char
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:51 ely-se left
hankache RabidGravy the what? 08:52
08:54 jantore left
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<SPACE>a<SPACE>space<SPACE>in<SPACE>it␤»
ZoffixWin abraxxa, maybe just a short one liner like this ran on the file? ^
RabidGravy m: say (( 0 .. 100).map( {is-prime($_ + 1)} )).WHAT; say (my @a = ( 0 .. 100).map( {is-prime($_ + 1)} )).WHAT
camelia rakudo-moar 868d8b: OUTPUT«(Seq)␤(Array)␤»
08:54 jantore joined
hankache aha map returns a Seq 08:56
thanks matey!
abraxxa ZoffixWin: great, that shows <NO-BREAK SPACE> 08:57
ZoffixWin \o/
abraxxa whatever that is
hankache it's a myth abraxxa
ZoffixWin Non-breaking space. The line won't be broken on it.
TEttinger u: NO-BREAK SPACE
DrForr &nbsp; in HTML entities.
hankache i never understood what is the difference between a space and a non breaking space 08:58
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 vendethiel left
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
DrForr Unicode II: Electric Boogaloo. 09:00
hankache :D
RabidGravy spins on his shiny head in defiance of the rules 09:01
TEttinger don't forget zero-width no-break space
DrForr throws a buffing pad under RabidGravy for that shine. 09:02
TEttinger m: 0xfeff.char
camelia rakudo-moar 868d8b: OUTPUT«Method 'char' not found for invocant of class 'Int'␤ in block <unit> at /tmp/FGWlAOt0G3 line 1␤␤»
TEttinger how do you get the char for a codepoint?
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"
TEttinger might be ffef
ZoffixWin m: 0xfeff.chr.say 09:03
camelia rakudo-moar 868d8b: OUTPUT«␤»
TEttinger m: 0xffef.chr.say
camelia rakudo-moar 868d8b: OUTPUT«￯␤»
TEttinger first one yeah
ZoffixWin m: 0xfeff.uniname.say
camelia rakudo-moar 868d8b: OUTPUT«ZERO WIDTH NO-BREAK SPACE␤»
09:05 rindolf left, rindolf joined
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 perlawhirl left, vendethiel joined
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…»
TEttinger oh come on, ﷺ is totally a whole alphabet
Letter, Other [Lo]
www.fileformat.info/info/unicode/ch.../index.htm
09:08 labster joined
DrForr I'm *still* interested in trying to get P6 more compatible with Arabic/other r2l languages, but the usual time concerns. 09:09
09:09 Relsak left
psch .u ﷺ 09:10
yoleaux U+FDFA ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM [Lo] (ﷺ)
ZoffixWin m: my @ﷺ = 42; say @ﷺ 09:11
camelia rakudo-moar 868d8b: OUTPUT«[42]␤»
ZoffixWin Works fine...
TEttinger oh right
mine went after
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…»
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
TEttinger yep
same here
RTL
09:13 rvchangue joined
RabidGravy Oooh, oooh, oooh! my websockety, log viewing thing actually sorta kinda works 09:20
perl6++
that is Lumberjack proxy dispatcher -> json -> web server -> Lumberjack -> supply dispatcher -> websocket -> browser 09:22
09:24 pecastro left, pecastro joined, wamba left
RabidGravy now to do the "Boring" part, (that is making the javascript on the browser make nice output) 09:26
09:26 wamba joined
RabidGravy what do the cool kids using for something like prepending a row to an HTML table "live"? 09:29
09:30 yazid joined, yazid left
ZoffixWin jQuery 09:33
$('table body').prepend('<tr><td>Foo</td></tr>')
09:34 perlawhirl joined
RabidGravy sounds perfect 09:40
stmuk_ surely the cool kids would use CSS rather than tables? 09:42
ZoffixWin stmuk_, not for tabular data :) 09:43
09:45 pmurias_ joined
pmurias_ is it allowed to have 2 forks on github? 09:45
09:46 espadrine joined
ZoffixWin No. You could use multiple branches though 09:46
09:46 pmurias joined 09:47 pmurias_ left
ZoffixWin No. You could use multiple branches though 09:47
09:47 espadrine left, espadrine joined
pmurias ZoffixWin: I worked around that by forking rakudo to an organization 09:47
RabidGravy :) 09:51
09:51 espadrine_ joined
RabidGravy yeah it's tabular data 09:51
09:55 espadrine left 09:58 labster left 10:02 johndau left 10:09 perlawhirl left 10:11 TEttinger left 10:19 perlawhirl joined
ufobat what is the idea behind this line? github.com/tadzik/Bailador/blob/ma...or.pm#L144 10:24
10:24 ocbtec joined
ufobat it's nonsense? 10:24
lizmat feels like a typo to me 10:25
perhaps the !! case should be %*ENV<p6sgi.errors> ? 10:26
and a new Perl 6 Weekly hits the net: p6weekly.wordpress.com/2016/04/04/...ow-zoffix/
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
but looks like an attept to maintain backwards compat with some old version of HTTP::Easy, possibly uneeded now
10:34 vendethiel left
timotimo Xliff: you do realize that nativecall implements name mangling for you? 10:34
ZoffixWin :o I made it into the title of the Weekly! lizmat++ 10:36
10:36 _nadim joined 10:37 vendethiel joined 10:38 wamba left 10:42 araujo joined, araujo left 10:48 wamba joined
Xliff timotimo, Yes. I vaguely remember reading something to that effect. I think that might help with C++ classes. 10:51
I'm still hoping I don't have to go as far as that, yet.
timotimo that sounds like you're hamstringing yourself 10:52
"i know there's such a thing as functions to structure my code, but i'm hoping i can get by with just gotos" ;)
Xliff 8-P
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
Grrr...
timotimo mhm
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."
El_Che a no one has made a perl5-perl6 joke like this: twitter.com/JZdziarski/status/7167...7919476736 ? Troll are getting lazy? :)
DrForr The group is too small to be trolled usefully :) 10:54
10:57 leont joined 10:59 kaare_ joined, vendethiel left 11:01 cyberviking joined
perlawhirl has anyone seen glot.io/ 11:06
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
tadzik El_Che: :D:D:D
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
i'm looking at the www-containers repo
i think that's the main "build the language environment" repo
i have not played with Docker... i'm stuck in 32-bit land 11:09
11:15 kid51 joined 11:17 cyberviking left, cyberviking_ joined 11:20 cyberviking_ left 11:22 Xliff left 11:25 araujo joined
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:28
11:30 vendethiel joined
leont That is true on most unices, but OS X is special AFAIK 11:32
11:36 brrt joined
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
Apparently it doesn't decompose U+2000-U+2FFF, U+F900-U+FAFF or U+2F800-U+2FAFF
11:44 ribasushi joined 11:46 kid51 left
pmurias nine: you mean they don't do any normalization? 11:50
teatime *nix filenames and files are just bytes, heh. 11:52
timotimo in that case it depends on what the program that created the file chooses to use for normalization 11:53
11:53 tadzik left, M-matthew left
teatime I suppose it would depend on the individual filesystem driver, but that's generally the case anyway. 11:53
(for names. doing normalization on files would be kindof evil) 11:54
11:54 dvinciguerra_ joined
timotimo when we write out stuff, we normalize, because our strings are NFG 11:54
11:54 vendethiel left
timotimo of course you can write binary data and decide on the normalization to use yourself 11:54
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:55
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:57
11:58 Xliff joined
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.
For the first time in months.
11:59 vendethiel joined 12:02 ribasushi left
ufobat TADZIIIIIIK! 12:03
:D 12:04
Xliff Hmmm.... Ubuntu's console-setup doesn't ask me about the compose key. 12:07
12:10 ribasushi joined
Xliff forgot how long it takes to upgrade a full Desktop Linux installation. 12:13
*sigh*
timotimo takes longer if you have texlife installed 12:14
Xliff LOL
dpkg-query: no packages found matching texlife
\o/
12:15 M-tadzik joined
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
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:16
M-tadzik oh, my nickname's broken again 12:17
12:17 M-tadzik is now known as tadzik
Xliff Oh god.... 12:17
Xliff flashes back to OTRS nightmares.
It could be worse.... It could be Remedy. 12:18
pmurias when hooking up the dalek git integration what events do I select? 12:20
dalek kudo/nom: ca6306d | (Pawel Murias)++ | / (3 files):
[js] Start working on compiling rakudo to js.
12:25 pmurias left
[Coke] ~ 12:25
Should the JS integration work happen in nom? I don't want to ship a half-done js interface in 2 weeks. 12:26
moritz why not? as long as it's not advertised in the documentation, it does no harm 12:27
12:27 M-matthew joined, M-Illandan joined
moritz and I don't like the idea of long-lived branches if we can avoid them 12:27
timotimo agreed on the long-lived branches 12:28
lizmat amen
[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.
lizmat two questions:
12:28 Xliff left
lizmat why did dalek report this here 12:28
timotimo good question 12:29
[Coke] ... and this should be in p6dev... I only reacted here because of the commit message.
lizmat and thus, why are we having this discussion here?
timotimo i think it could be related to pmurias asking about dalek integration?
just before dalek said something? :)
pmurias probably missed the existence of #p6dev?
and perhaps thought dalek was b0rked? 12:30
moritz github still says: payload URL: hack.p6c.org:8088/dalek?t=freenode,p6dev 12:32
oh
it's the rakudojs fork
12:32 pmurias joined
timotimo oh! 12:32
well, that makes the whole discussion moot :)
about not wanting to have that in nom, as it's not the same nom
moritz right
[Coke] AHAHAAH! :) 12:33
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
brrt \o #perl6 12:36
moritz trrb o/
pmurias [Coke]: I'll move it to p6dev
brrt :-)
anyone here was at nlpw?
DrForr Yo. 12:37
pmurias [Coke]: and I'll move it to a branch so people don't get confused
DrForr Been there got the T-shirt.
brrt videos / presentations available perchance?
moritz pmurias: it'd be fine to develop in the main repo, if you want
pmurias: if permissions are an issue, we can find solutions for that as well
DrForr Wendy and Liz have the files. 12:38
pmurias working on a branch in the main repo seems better then on a fork 12:40
finding forks on github sucks
moritz pmurias: do you have write access to the main rakudo repo? 12:41
pmurias no 12:42
moritz pmurias: have you submitted a CLA to The Perl Foundation?
pmurias no 12:43
how do I do that?
moritz pmurias: it's a document that you send by snail mail, or scan and fax or email...
12:43 Xliff joined
moritz pmurias: www.perlfoundation.org/contributor_..._agreement 12:44
12:44 vendethiel left
[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:46 Xliff left 12:47 Sgeo left, acc joined
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:48
moritz: I should print that out, sign it, scan it and then email it? 12:49
12:51 vendethiel joined
[Coke] pmurias: (advantage) eh. either is fine from my pov. 12:54
forks tend to be better if you're working on your own, I imagine.
12:56 acc left
timotimo you get your own wiki and issue tracker, for example 12:57
but we don't use rakudo/rakudo's issue tracker anyway
moritz pmurias: the document itself says you're supposed to send a pysical letter 12:58
pmurias: dunno if scan + email is acceptable too; in case of doubt, you'd have to ask TPF (Karen maybe)
timotimo i scanned and emailed it
mine*
moritz ah, good 12:59
13:01 AlexDaniel left 13:05 perlawhirl left 13:35 vendethiel left 13:36 ocbtec left 13:37 ocbtec joined, CIAvash left, ocbtec left, skids joined 13:38 ocbtec joined 13:40 Begi joined 13:42 dalek left 13:43 dalek joined, ChanServ sets mode: +v dalek 13:51 chrisdotcode joined 13:53 nakiro left 13:54 g4 left 13:55 ocbtec left
chrisdotcode hey guys 13:57
I'm a haskeller
but perl6 is awesome
perlpilot we know ;) 13:58
chrisdotcode built in grammar types?! yes, please.
perlpilot haskell is awesome too
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}){}`?
timotimo "subset" types
chrisdotcode (or sir timotimo )
ah
thanks
perlpilot
.oO( When did we get knighted?!? )
14:00
timotimo nii.
jnthn Mostly 'cus of the subset keyword used to introduce them... I still sometimes end up calling them refinement types.
chrisdotcode any good "I need to switch all of my python code to perl6 immediately" tutorial for someone who's never used perl?
jnthn In fact, I think the MOP objects implementing them talk about refinements on the inside.
moritz chrisdotcode: I don't think we have *that* specific tutorials :-) 14:01
chrisdotcode: though I don't think perl6intro.com/ requires previous perl knowledge 14:02
timotimo i came from python to perl6, too 14:04
14:04 KatsWhoSayNi joined 14:05 rindolf left
chrisdotcode moritz, thanks! 14:05
is perl6 production ready?> 14:06
tadzik depends; what's your production like?
DrForr Yes, it's already being used in production code.
chrisdotcode was just curious if it was out of alpha/beta/whatever testing stages.
14:06 perlawhirl joined
timotimo yeah, it is 14:07
DrForr It was released at Christmas.
chrisdotcode sweet
moritz chrisdotcode: it's out of beta, and in productin testing :-)
timotimo we have the 6.c release now that is like a stability promise
as in, you write "use v6.c" at the top of your script and that code will continue working unmodified with future versions
perlawhirl chris: another decent resource if you aready know python is learnxinyminutes.com/docs/perl6/ 14:08
chrisdotcode perlawhirl, yeah, I have that open in another tab, thanks
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
chrisdotcode two final questions: are subset types checked at "compile type", or at run time? and does perl6 has interfaces? 14:08
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
chrisdotcode jast, more haskelly (even go)-style interfaces
timotimo "it at all", means for refinement types
we do some compile time type checking in general
14:10 rindolf joined
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
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
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
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
that's neat
timotimo also, only modules will have the result of their compilation written away to disk
14:12 _nadim left, _nadim joined
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
14:13 vendethiel joined
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:13
[Coke] is happy to see "is required" attributes show up in Zoffix++'s presentation, whee. 14:19
(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
[Coke] s/the/a/ 14:22
14:22 dakkar left
ufobat tadzik, session PR :-D 14:26
14:26 prammer left
jnthn More like "you can be a core dev just by knowing Perl 6" ;) 14:27
14:27 dakkar__ joined
[Coke] jnthn: there you go 14:28
14:28 dakkar__ is now known as dakkar
TimToady 'course, it also means you have to learn a complicated language like Perl 6 instead of a simple one like C :P 14:28
tadzik ufobat: that's quite a bit of code! 14:30
ufobat hope you're happy with that
tadzik I'm very impressed
I'll have a look through it :)
ufobat i've found where $current was used, actualyl 14:31
14:31 dakkar_ left, buharin joined
ufobat i hope its okay that i changed something in the mustache test. it breaks backwards compatibility :-( 14:31
MadcapJake is there a way to grep a lazy list while keeping it lazy 14:32
14:32 kentnl is now known as kent\n
tadzik ar 14:32
can we have it in a separate PR?
or at least in a separate commit :)
keep separate things separately
jnthn TimToady: C's easy...just can be tad tricky to correctly use a few of the library functions, like malloc and free :P
ufobat absolutly :D my git foo is quite looooowwww... 14:33
14:33 ocbtec joined, brrt left
jnthn MadcapJake: grep returns a Seq, which can act as lazy as you like :) 14:33
MadcapJake: Got an exmaple of what's not behaving as you expect?
MadcapJake sure, one sec
perlawhirl in general, assign the results of the grep to a scalar... it will be evaluated later 14:36
14:36 vendethiel left
MadcapJake perlawhirl: ah, yeah I was assigning to an array, is that why? 14:36
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]
camelia rakudo-moar 0e95cd: OUTPUT«(timeout)»
MadcapJake jnthn: ^^
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]
camelia rakudo-moar 0e95cd: OUTPUT«(2 3 5 7 11 13 17 19 23 29 31 37)␤»
MadcapJake nice
jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; 14:39
camelia ( no output )
jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; say @pos-primis.is-lazy
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␤»
jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; say @pos-primes.is-lazy
camelia rakudo-moar 0e95cd: OUTPUT«True␤»
jnthn Hm
skids Weird
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␤»
jnthn innerestin'
chrisdotcode does perl 6 have currying, guys?
skids chrisdotcode: see the .assuming method
jnthn m: my @pos-primes = 1, 2, 3, * + 2 ... Inf; my @primes = lazy @pos-primes.grep(*.is-prime); say @primes[^10]
camelia rakudo-moar 0e95cd: OUTPUT«(2 3 5 7 11 13 17 19 23 29)␤»
14:40 fireartist left
jnthn MadcapJake: ^^ is how to make it work, anyway :) 14:40
Just demand laziness
perlawhirl jnthn++
MadcapJake neat, thanks!
jnthn: I had a moar fork bomb at some point trying to get that lazy list 14:44
jnthn Fork bomb? :) 14:48
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?
jnthn oh...you were creating processes in the grep? :)
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:50
14:50 jack_rabbit left
moritz REPL 14:51
that's the problem :/
perlawhirl yeah, hah. REPL has some weird bugs
moritz (at least that what I'll believe until I see evidence to the contrary)
jnthn It doesn't seem to matter how much time we spend on the REPL, people still complain about it. :P
...and probably always will :P 14:52
awwaiid I *heart* REPL
moritz jnthn: the time really doesn't matter; the associated features/bug will
perlawhirl can anyone think of a nice way I can split some text on whitespace to a given column width
MadcapJake I'm not having much luck retriggering it though :(
14:53 vendethiel joined
moritz perlawhirl: you need to specify that a bit better 14:53
stmuk_ perlawhirl: it's probably not nice but -o objects/if_xcmdsrv.o if_xcmdsrv.c 14:54
oops
perlawhirl so i have a bunch of text i want to print out at a specific column width
stmuk_ perlawhirl: github.com/rakudo/rakudo/blob/nom/...t.pm6#L143
gregf_ hi
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.']
gregf_ is multi method similar to method overloading? 14:55
skids perlawhirl: the word you're looking for is "justification"
teatime skids: no, that doesn't seem right. 14:56
perlawhirl stmuk_++ that will do for now
kind of like what your icr client is doing right now to the msg text :D
s/icr/irc/
skids Right, it justifies the text into a column. In this case, right-justifies it.
Erm, left 14:57
arnsholt perlawhirl: I suspect you want something like www.youtube.com/watch?v=6Viwwetf0gU
14:57 sue joined
awwaiid perlawhirl: maybe like s/(<[a..zA..Z ]> ** 1..20 \b)/$1\n/g (sorry for bastardized p6 regex 14:57
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
moritz gregf_: we call it "multi dispatch" 15:00
gregf_: and with "overloading" we mean adding variants to an existing operator 15:01
gregf_ well, yeah, theres operator overloading and method overloading :) 15:02
multi dispatch sounds more geeky ;)
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
gregf_ moritz: cheers
jnthn perlawhirl: s/compilet/runtime/? :)
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…»
perlawhirl jnthn :D overloading at runtime, md at compile time
moritz perlawhirl: we can also resolve some multi *sub* dispatches at compile time (not method dispatches though)
jnthn Oh, I had it the other way around: overloading at compile time, MMD at runtime :)
(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)
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
that's your domain :D 15:06
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:07
jnthn m: say (1..10).rotor(2) 15:08
camelia rakudo-moar 0e95cd: OUTPUT«((1 2) (3 4) (5 6) (7 8) (9 10))␤»
jnthn MadcapJake: ^^
ufobat tadzik, i did a new PR for Sessions for Bailador
MadcapJake jnthn: thanks!
jnthn goes to rest for a bit :) &
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))␤»
timotimo with :partial you can get a half-list at the end there
m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, :partial)
camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy) (dog))␤»
gregf_ timotimo++ 15:11
is :p for partial?
timotimo i'm not sure it would accept :p as a parameter
m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, :p)
camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy))␤»
timotimo it doesn't
gregf_ hmm.. i've seen something like :end, :p used somewhere 15:12
perlawhirl gregf_++ timotimo++
gregf_ anyways :)
perlawhirl this is the nice way i was imagining :D
timotimo :p usually gives you a Pair object
the :foo syntax is just named arguments
m: say "the quick brown fox jumps over the lazy dog".split(/\s+/).rotor(2, partial => True)
camelia rakudo-moar 0e95cd: OUTPUT«((the quick) (brown fox) (jumps over) (the lazy) (dog))␤»
timotimo ^- same thing, but much more to type
perlawhirl everytmie you say :p i think you are doing the 'silly tongue-out smiley' 15:13
gregf_ hmm, fair enough. perl5++ :)
perlawhirl i like the :adverbs in perl6
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 lizmat left, vendethiel left
skids Oh. 15:16
overthinking.
m: say $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]+$
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 »)]…»
skids m: say $*IN.get ~~ /[$<foo>=(. ** 1..20 »)]+$/
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」␤»
perlawhirl skids+++ 15:17
15:17 telex left
perlawhirl you get three 15:17
15:18 telex joined
perlawhirl tho, you're not using foo anymore... 15:19
m: say $*IN.get ~~ /(. ** 1..20 »)+$/
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」␤»
perlawhirl m: say $*IN.get ~~ /(. ** 1..10 »)+$/
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」␤»
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」]␤»
perlawhirl nicely done, sir
15:22 sue left
perlawhirl m: ($*IN.get ~~ /[( . ** 1..10 » ) \s* ]+/)[0]».Str.perl; 15:24
camelia ( no output )
perlawhirl m: say ($*IN.get ~~ /[( . ** 1..10 » ) \s* ]+/)[0]».Str.perl;
camelia rakudo-moar 0e95cd: OUTPUT«["Céad slán", "ag", "sléibhte", "maorga", "Chontae", "Dhún na", "nGall"]␤»
perlawhirl all wrapped up in a nice array
m: say ($*IN.get ~~ /[( . ** 1..20 » ) \s* ]+/)[0]».Str.perl;
camelia rakudo-moar 0e95cd: OUTPUT«["Céad slán ag", "sléibhte maorga", "Chontae Dhún na", "nGall"]␤»
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
15:26 nadim joined, mcsnolte joined 15:28 vendethiel joined, _nadim left 15:29 khw joined 15:33 _4d47 joined
dalek c: 72f4ed9 | TimToady++ | doc/Language/unicode_texas.pod:
Lt and Lo are also valid alphabetics

Also some grammar cleanups.
15:39
MadcapJake you can only use `is rw` on a scalar parameter? 15:45
15:45 perlawhirl left
grondilu m: class { has @.a is rw }.new 15:46
camelia ( no output )
grondilu m: my $a = class { has @.a is rw }.new; $a.a = ^10; say $a
camelia rakudo-moar 0e95cd: OUTPUT«<anon|52857520>.new(a => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])␤»
MadcapJake in a sub 15:47
grondilu oh ok
MadcapJake sub foo(@a is rw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
m: sub foo(@a is rw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
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␤»
grondilu well at least you have a very explicit error message 15:48
MadcapJake can I convert an array to a scalar :P 15:49
15:50 sortiz joined
hankache m: sub foo($a is rw) { $a = $a.pick: * }; my $arr = [0..10]; foo($arr) 15:51
camelia ( no output )
sortiz \o #perl6
ugexe is raw?is raw
hankache MadcapJake ^^
it works on my local rakudo 15:52
ugexe m: sub foo(@a is raw) { @a = @a.pick: * }; my @arr = [0..10]; foo(@arr);
camelia ( no output )
15:52 zakharyas left
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]␤»
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 doc.perl6.org/routine/raw
hankache hi sortiz
15:53 domidumont left
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
MadcapJake I keep getting «cannot stringify this» in a sub without any stringification xD 16:04
dalek Iish: 833bd40 | (Salvador Ortiz)++ | lib/DBDish/Oracle (4 files):
Oracle: Typed handlers and native methods

  - Same OO style that other drivers.
  - Proper error handling.
  - Proper cleanup at statement dispose.
MadcapJake I even told the sub that everything coming in is an Int... 16:06
huh, looks like the / operator was the problem for some reason, using div now and it never prints that «cannot stringify this» error 16:07
m: gist.github.com/MadcapJake/280cdf8...e01f9fe86f 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)␤»
MadcapJake still misses a few at 1000 reactions but 10_000 takes forever! 16:11
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
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␤ …»
MadcapJake oops forgot about the lack of commas :P 16:13
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)␤»
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
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…»
MadcapJake huh, works in my repl
dalek c: 57bc359 | (Tom Browder)++ | doc/Language/nativecall.pod:
fix typos, spellings, and grammar
16:24
c: 0663fbb | (Tom Browder)++ | doc/Language/ (2 files):
add Heredoc and constant to doc search
c: 868612a | (Zoffix Znet)++ | doc/Language/ (3 files):
Merge pull request #440 from tbrowder/master

fix typos, spellings, and grammar
Iish: 7e3d7b7 | (Salvador Ortiz)++ | README.pod:
Fix typo
16:26
MadcapJake m-prof: gist.github.com/MadcapJake/280cdf8...e01f9fe86f
16:27 cpage__ left 16:28 cpage_ joined
MadcapJake prof-m: gist.github.com/MadcapJake/280cdf8...e01f9fe86f 16:28
camelia prof-m 273e89: OUTPUT«(timeout)»
.. Prof: p.p6c.org/25e1650
16:29 pmurias left 16:33 travis-ci joined
travis-ci Doc build failed. Zoffix Znet 'Merge pull request #440 from tbrowder/master 16:33
travis-ci.org/perl6/doc/builds/120664551 github.com/perl6/doc/compare/72f4e...8612a4bcd2
16:33 travis-ci left, Possum left 16:34 pdcawley_ joined 16:36 pdcawley left, _4d47 left 16:37 vendethiel left, pdcawley joined 16:38 vendethiel joined 16:39 pdcawley_ left, geekosaur left 16:40 geekosaur joined
[Coke] MadcapJake: REPL prints the result if you didn't. 16:40
camelia doesn't, you didn't do anything with the sunk value, you get a warning.
MadcapJake oh yeah, I literally forget that every single day :P
16:42 pmurias joined
perlpilot camelia should behave more like the REPL and then there'd be less confusion :) 16:44
MadcapJake what's the reason for it not printing $_? 16:45
dalek c: d299140 | (Zoffix Znet)++ | doc/Language/5to6-nutshell.pod:
Try to fix breakage from #440
16:46
16:48 dakkar left 16:49 cyberviking joined
[Coke] MadcapJake: because then you cannot test sink 16:50
you have the REPL if you want it. :)
16:56 cyberviking left, travis-ci joined, abraxxa left
travis-ci Doc build failed. Zoffix Znet 'Try to fix breakage from #440' 16:56
travis-ci.org/perl6/doc/builds/120670186 github.com/perl6/doc/compare/86861...991407048a
16:56 travis-ci left 16:58 espadrine_ left
dalek c: eab83e0 | (Zoffix Znet)++ | doc/Language/quoting.pod:
Try to fix breakage from #440
16:59
17:02 dha joined 17:03 pmurias left 17:05 xinming left 17:16 travis-ci joined
travis-ci Doc build passed. Zoffix Znet 'Try to fix breakage from #440' 17:16
travis-ci.org/perl6/doc/builds/120673685 github.com/perl6/doc/compare/d2991...b83e0ed4e1
17:16 travis-ci left 17:19 ChristopherBotto joined
ChristopherBotto Hi everyone! 17:20
17:22 vendethiel left
ChristopherBotto I created a module that simply reads a table of data into a nested hash (github.com/molecules/Table). Does this seem useful enough to be its own module? 17:25
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?
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:27
17:28 hankache left
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?
ChristopherBotto sjn: Good question. 17:29
sjn: checking ...
dha Not yet. I noticed that things have changed since I last built rakudo, so I'm currently rebuilding.
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:30
teatime I had assumed they are generated from the same sources. 17:31
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:33
17:34 vendethiel joined
MadcapJake dha: they're the same repo and available via panda install p6doc 17:35
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?
MadcapJake dha: if you want to generate the website you do «make html»
stmuk_ dha: p6doc basically works from the command line
17:36 domidumont joined
MadcapJake dha: correct *unless* you installed via R* 17:36
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
dha: rakudo.org/how-to-get-rakudo/
stmuk_ most end users want R* not R
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.
MadcapJake . o O (That site should have a list of included modules, maybe?) 17:38
dha So that's an important point. Tanks.
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
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
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 Actualeyes left
MadcapJake new users will surely hit the slow part first (and often) 17:43
stmuk_ they will hit that using p6 anyway :)
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:44
stmuk_ except the web search doesn't work that well anyway 17:45
MadcapJake stmuk_: seriously, negative nancy? :P
stmuk_ the most practical way of searching is probably "git grep" on a doc checkout 17:46
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
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
dha stmuk_ - you'll note I said "documentation system" rather than just "documentation". I did that on purpose. :-) 17:49
MadcapJake - cool. thanks.
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
MadcapJake stmuk_++ # very good point
timotimo travis-ci.org/perl6/doc/builds/120673685 - anyone got a clue what these warnings are about/where they come from? 17:51
stmuk_ dha: also point ppl at the faq 17:52
dha stmuk_- good points. thanks.
17:52 spider-mario joined
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 cpage_ left
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:54
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
MadcapJake geekosaur: :)
ChristopherBotto timtimo: Thanks. Will do. 17:56
MadcapJake stmuk_: thanks for reminding me to add the FAQ to the /r/perl6 sidebar :) 17:57
17:59 wamba left, wamba joined
masak greetings #perl6. 18:00
back to golfing yesterday's weird Bailaderror. 18:01
sjn \o #masak :) 18:02
hankache \o/ masak 18:03
sjn is considering treating masak as an irc-channel, stuffing him full with questions
maybe I shouldn't :-P
masak sjn: I'm essentially fine with that 18:04
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 :)
timotimo masak implements the observer pattern for this channel
and spits out an event stream towards RT
masak .oO( I am the gate -- whoever enters through me will be rakudobugged ) 18:06
hankache isn't masak a bot?!
18:06 TreyHarris left
tony-o cyborg 18:07
leont masak is Yog-Sothoth, obviously
masak leont: oh, that was the quote I was going for! instead I just found a Jesus quote. 18:09
vendethiel masak: code golfing is fun, but I usually play another kind of code golfing :P 18:10
masak this is bug golfing
vendethiel hehe
masak the other kind is the original kind
I'm... a radical of sorts. 18:11
vendethiel oh?
masak I only golf code that has bugs in it :P 18:14
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
then the reduction begins
18:16 TreyHarris joined
timotimo you have to win some to lose some 18:17
sjn is hearing rumours that masak is cooking up a bug reduction. 18:18
18:19 firstdayonthejob joined 18:25 Ven joined 18:26 labster joined, cpage_ joined
geekosaur bug consommé? 18:26
18:28 Ven left 18:30 stmuk joined
masak actually, it's more of a reduction-oxidation... 18:35
masak .oO( actually, it's more of a gastrique ) 18:36
18:37 Possum joined
masak if I inline DBIish, the problem goes away. 18:41
masak .oO( don't do that, then! )
18:42 geekosaur left, geekosaur joined
masak reduction is a lovely activity. you get to take shortcuts in code that you never get to take normally. 18:51
18:52 cpage_ left 18:53 Possum left 18:54 Possum joined, ILikeBears joined
ILikeBears How do I prepare a perl6 script to run in the jVM 18:54
18:54 kjk_ joined
sortiz masak, You've captured my attention. Is you problem DBIish related? 18:55
18:55 cpage_ joined 18:57 cdg left
masak in a way. 18:59
if I use Bailador and DBIish together on the command line, and make a simple request to my postgres database, everything works
when I do the same way from inside a Bailador GET handler, I get "Could not locate compile-time value for symbol DBError" 19:00
19:04 znpy joined
timotimo ILikeBears: just perl6-j yourscript.p6 19:06
ILikeBears timotimo, generates .class? 19:07
19:08 Begi left
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
[Coke] timotimo: --target==jar, mebbe. 19:13
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
timotimo yeah, but you can't "java -jar MyGreatModule.jar"
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:17
19:18 ILikeBears left
[Coke] timotimo: no, but you can examine rakudo-j and see what it's doing. I imagine it's a SMOP. 19:24
19:24 kaare_ left
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;
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;
camelia rakudo-moar 0e95cd: OUTPUT«(X)␤»
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:27
RabidGravy it's a package, not very typey 19:28
dha Then, perhaps p6doc should indicate that. :-)
[Coke] THere should be docs on everything,s ure.
There are definitely gaps in the docs, sure.
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
camelia rakudo-moar 0e95cd: OUTPUT«Perl6::Metamodel::PackageHOW.new␤»
RabidGravy it doesn't have any methods and doesn't do anything 19:30
19:30 kaare_ joined
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.
[Coke] dha: yes. there are gaps.
Are you asking if this particular gap is intentional?
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.
RabidGravy m: require X;
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 YP-QMUL-W left
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:33
RabidGravy it's possibly something that needs fixing in p6doc, but that's all that happens 19:34
19:34 dvinciguerra_ left
[Coke] dha: sure. perhaps a ticket in perl6/docs/issues ? 19:34
assuming that it's the same repo, and not somehow tied more directly to rakudo.
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 domidumont left
RabidGravy X only exists because e.g. X::AdHoc does 19:35
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)
RabidGravy - Indeed, but potentially confusing for someone looking to learn P6 and poking around. 19:37
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
19:39 Guest16914 joined
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
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. :-)
sortiz "The package X is only the base package of all public exception classes" 19:42
19:42 dvinciguerra_ joined
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
sortiz And a few others. :-) 19:44
19:44 jsimonet left
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␤␤»
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."
Does that look unreasonable to anyone? 19:47
19:50 dvinciguerra_ left
Guest16914 looks as if the profiler is borked in the latest build 19:50
Writing profiler output to profile-1459799269.04754.html 19:51
KnowHOW methods must be called on object instance with REPR KnowHOWREPR
Use of uninitialized value of type Block in string context
Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed.
19:51 YP-QMUL-W joined
Guest16914 ===SORRY!=== 19:51
Don't know how to dump a BOOTCode
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:53
19:56 dvinciguerra_ joined
[Coke] Guest16914: latest release or git HEAD? 19:56
and if the latter, how are you building rakudo?
Guest16914 This is Rakudo version 2016.03-86-g0e95cde built on MoarVM version 2016.03-84-g4afd7b6 19:57
rakudobrew build moar
[Coke] ok, so you're not deliberately picking moar HEAD, e.g. , one sec.
Guest16914 let me know if you need the script I'm trying to profile 19:58
perlpilot m: my $s = sub { say "Got: $_" for @_ }; "alpha", "beta" ==> $s(); # kjk_ 19:59
camelia rakudo-moar 0e95cd: OUTPUT«Got: alpha␤Got: beta␤»
[Coke] prof-m: say "eek" for ^10
camelia prof-m 273e89: OUTPUT«eek␤eek␤eek␤eek␤eek␤eek␤eek␤eek␤eek␤eek␤Writing profiler output to /tmp/mprof.html␤»
.. Prof: p.p6c.org/25e47a4
[Coke] ... looks like prof-m is waaaay out of date. 20:00
perlpilot kjk_: See above
dha So, is this a sufficient addition to the docs to reflect that X does nothing itself: github.com/dha/doc/blob/master/doc/Type/X.pod
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 YP-QMUL-W left
perlpilot m: "alpha", "beta" ==> sub {say "Got: $_" for @_}() 20:02
camelia rakudo-moar 0e95cd: OUTPUT«Got: alpha␤Got: beta␤»
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
20:05 YP-QMUL-W joined
[Coke] I was just able to run a random --profile with rakudo HEAD. 20:05
hankache dha i think it's fine. 20:06
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
Guest16914 [Coke], try this gist.github.com/anonymous/59b29228...629d0a4cbd 20:08
dha hankache - me neither, hence my asking. :-)
Am currently looking at p6doc to see if I can find how this works.
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.
kjk_ oh~ ic..., i think i misunderstood how ==> works, thanks for the pointers, i'll read up on the docs 20:10
20:10 darutoko left
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:10
20:11 jsimonet joined
sortiz dha, the interested people will look the PR, and comment there if needed. :-) 20:11
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.
hankache dha push the button :)
20:13 xinming joined
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:13
dha considers changing his nick to "max"... 20:14
20:14 cdg joined, cdg left 20:15 ChristopherBotto left, cdg joined
[Coke] Guest16914: it's this line that causes the issue: my @mat[$size; $size]; 20:16
dha hankache - it actually involved pressing *two* buttons, but it's done. :-) 20:17
Guest16914 my two dimensional array?
[Coke] Here's a golf: ./perl6 --profile -e 'my @m[5]'
hankache dha++
Guest16914 Yup, fails here as well 20:18
[Coke] Please open an RT (email to [email@hidden.address] with that info.
Guest16914 ok, will do
hankache is anyone reading the "panama papers" news? 20:22
Guest16914 Bug sent 20:26
[Coke]++, thx for helping out 20:27
20:28 molaf left, dha left
skids dha: you might want to mention that if you are looking for the base class instead, it is called "Exception" 20:28
20:32 dha joined
stmuk dha: I suspect the correct fix for p6doc X is to modify the p6doc -l search to ignore directories 20:32
dha stmuk - That actually sounds correct. 20:33
That may also solve the issue that, for instance, Backtrace shows up twice. 20:34
20:36 espadrine_ joined
dha Huh. Also, p6doc seems to take arguments as case-insensitive. Is that by design? 20:36
(i.e. p6doc but gives the doc for Buf)
s/but/buf/; #damn you autocorrect
stmuk probably 20:37
dha Interesting... 'p6doc dudish' does *not* work. 20:38
So that's... inconsistent if case-insensitivity is intended. 20:39
stmuk I don't see case-insenitivity at a quick look
dha Frankly, I found 'p6doc buf' working to be a surprise. 20:40
stmuk are you on windows?
dha nope. os X 10.10.5 20:41
stmuk well that's case insensitive fs as well
dha Still, that wouldn't explain why buf would work, but dbdish wouldn't. 20:42
stmuk I think it's a partial explanation 20:43
dha could be. possibly hard to confirm, given the inconsistency, though.
[Coke] dha: dbdish or dudish? 20:44
dha gah. dbdish.
Ulti so sent some pull requests to the guy running glot.io
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
stmuk 'p6doc buf' works on my mac and not on linux so I'd say that's fs related
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 kaare_ left
Ulti and has a different repository for each language that you have to edit 20:46
which makes creating a PR kind of impossible
dha Oh, and this is exciting. 'p6doc Debugger::UI::CommandLine' gives me a 'Dynamic variable $*DEBUG_HOOKS not found' error
stmuk dha: that's probably a "perl6 --doc" error
dha: I just get "No Pod found" 20:48
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 skids left
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:52
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:55 kjk_ left
ZoffixWin .lastlog Zof 20:58
dha ...and it turns out Digest::MD5 has no documentation... 20:59
ZoffixWin There's a README on GitHub: github.com/cosimo/perl6-digest-md5 21:00
stmuk there isn't much use of pod with perl6 modules apart from the core docs
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
stmuk ZoffixWin: sounds like a job for github.com/stmuk/p6-eco-readme 21:01
dha ZoffixWin - that doesn't help someone trying to use p6doc to read the docs. :-/
ZoffixWin stmuk++
dha stmuk++
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:03
21:04 rindolf left
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.
ZoffixWin Personally, I hate reading from command line.
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
ZoffixWin - I forget, are/were you a Perl 5 programmer?
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
stmuk also I might be on a plane or out of network coverage
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:07
Also, I always want to render metacpan as meatcpan. But that may not be relevant. :-) 21:08
21:08 Begi1 joined 21:09 Begi left, Begi1 is now known as Begi
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....
dha right. Same here.
stmuk but this is probably now a minority view 21:11
21:12 hankache left
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 :)
teatime MadcapJake: I am not going to complain if there are docs at all.
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.
stmuk MadcapJake: I imagine that (like perl 5) everyone does it different 21:14
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:15
stmuk or not at all :) 21:16
perlpilot MadcapJake: keep in mind that we're still inventing the sixian way.
21:16 znpy left
dha Yes, standards are still a work in progress... 21:16
MadcapJake perlpilot: yeah, I really love this site though: 6doc.rightfold.sexy/ and I've been trying to figure out how to properly get my modules to do that
(lots of modules on there don't really map up though but some it works really well for) 21:18
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:21
MadcapJake perlpilot: it also tries to pull docs from your module files too 21:22
perlpilot aye.
I really don't favor using the README for docs like that though. It seems .... poor
dha perlpilot - If it makes you feel any better, p6doc *does* give a result for File::Temp... 21:23
tony-o perlpilot++ on finding inline docs distracting 21:24
dha I conditionally disagree. I think it varies from module to module whether inline docs are useful or not. 21:27
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
21:28 AlexDaniel joined
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.
AlexDaniel MadcapJake: yeah, #↓ and #← are nice… 21:30
MadcapJake if only that worked :)
AlexDaniel yeah…
21:33 YP-QMUL-W left, Herby_ joined
Herby_ Afternoon, everyone! 21:33
\o
MadcapJake can you access pod docs from within Perl 6?
RabidGravy yeah 21:35
$=pod or something
dha Do we have a useable debugger yet? 21:37
MadcapJake RabidGravy: I think the = twigil is NYI 21:38
RabidGravy no it definitely does something
not completely implemented probably 21:39
dalek Iish: fe86f04 | (Salvador Ortiz)++ | / (3 files):
Oracle: Add Blob (RAW) support
Iish: 1671af3 | (Salvador Ortiz)++ | README.pod:
Merge branch 'master' of github.com:perl6/DBIish
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:40
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
Herby_ 7th level? 21:42
21:43 kid51 joined
dha Hard to tell. I've lost all sense of depth and direction at this point 21:44
stmuk dha: because the $*PROGRAM-NAME which once was a program name became a SHA1 hash 21:45
dha It... did?
rjbs Weird. 21:46
dha Because a program with the single command 'say $*PROGRAM-NAME;' actually prints the program name.
21:47 buharin left
stmuk because a shim named as the program calls a filename with a SHA1 hash after installation 21:47
tony-o dha: try precomping the script and then do $*PROGRAM-NAME 21:48
dha ah. ok. I have not been precompiling anything.
stmuk assuming you aren't using rakudobrew in which case there is another level of shims 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.
stmuk yes
dha The assignment of $PROGRAM-NAME to $me still makes me stare in amazement. 21:50
stmuk is surprised anyone would find programming brokeness unusual 21:53
MadcapJake Is there any up-to-date docs on $*REPO and CUR?
perlpilot stmuk: but Perl people are smarter than your average programmer! ;)
stmuk hahahaha
Herby_ i most certainly am not :) 21:55
21:58 cuthere left
dha stmuk - this seems more "WHY??" than actual brokenness. 21:58
stmuk its historic
21:59 lizmat joined, Herby__ joined 22:00 Herby_ left
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.
stmuk github.com/perl6/doc/blob/master/bin/p6doc#L107 22:02
ZoffixWin Curtis Ovid Poe's FOSDEM Perl 6 talk: www.youtube.com/watch?v=hR9UdvxMAbo 22:03
(sound gets better 3 minutes in) 22:04
stmuk you probably need to drop in a .grep: *.IO.f
(look for similar usage elsewhere in that file)
22:05 TEttinger joined
dha yeah, that's used in search-paths(), which is used in the MAIN sub that deals with -l 22:06
Ok, I'm clearly out of the loop. What does 'X~' do in 'my @paths = search-paths() X~ <Type/ Language/> ;' 22:09
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)␤»
Juerd X is a meta-operator on ~ in this case. 22:11
22:11 cognominal_ left
dha Great! Is that, heaven forbid, documented anywhere? Searching for X, ~, and X~ are all non-helpful. 22:11
Juerd It's documented, just hard to find: doc.perl6.org/language/operators#Cross_Operators 22:12
timotimo hmm, perhaps "cross"?
oh well
MadcapJake tadzik: how does Panda figure out what modules are installed?
timotimo that is hard, in deed
MadcapJake: it has its own little "state" file
MadcapJake projects.json, right? How is it populated though? 22:13
dha Juerd - Hard to find, BAD. :-/
sortiz now know why dna++ quest started! ;-)
dha Although, my mistake. there is an example at the bottom of the doc for infix X
MadcapJake timotimo: I think this is it: ecosystem-api.p6c.org/projects.json 22:14
tadzik MadcapJake: no, its own state file
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
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 ;)
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.
Juerd my @paths = glob "{" . join(",", search_paths()) . "}{Type/,Language/}"; # ;) 22:17
22:18 Sgeo joined, vendethiel left
AlexDaniel m: WHAT ∞:; 22:18
camelia ( no output )
MadcapJake timotimo, tadzik: is it «statefile => $*CWD.child('REMOVEME')»? 22:19
lizmat m: say WHAT ∞
camelia rakudo-moar 0e95cd: OUTPUT«(Num)␤»
ugexe `zef --installed list` will show you whats installed without a possibly out-of-date state file
timotimo i hadn't realized we have WHAT as a sub 22:20
heyo Herby__
Herby__ timotimo: o/ 22:22
22:23 ocbtec left
ZoffixWin Hm, watching Ovid's talk, I just now learnt there's a UInt type :o Not documented, it seems 22:23
m: sub foo (UInt $x) { say $x }; foo -42
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␤␤»
lizmat ZoffixWin: yeah, it's a generic subtype, so no smartness in the error message 22:24
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
s/it/UInt type/;
stmuk panda uses "mumble/panda/state"
lizmat ZoffixWin: it looks like I added it about a year ago 22:26
stmuk my $state = Panda::Installer.new.default-prefix() ~ '/panda/state';
and its actually json
tadzik MadcapJake: em, no 22:28
what stmuk says
22:33 Begi left 22:34 frobisher joined, vendethiel joined 22:35 dha left 22:36 frobisher is now known as dha
dha so... did my question about docs on smart matching get through before I got disconnected? 22:37
Herby__ [16:15] <dha> yeah. it kinda makes my head hurt. especially when used as a metaoperator 22:38
thats the last thing i see from you 22:39
dha ah.
so...
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.
stmuk dha: no 22:42
dha Ah. Again, that seems... not good. particularly if you're trying to figure out how grep is supposed to work. 22:43
22:43 wamba left 22:44 skids joined
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:44
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
;)
There doesn't seem to be a smart match in your code. 22:52
22:56 vendethiel left
stmuk m: ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d 22:57
camelia ( no output )
stmuk m: say ($*REPO.repo-chain()>>.Str X~ </doc/>).grep: *.IO.d
camelia rakudo-moar 0e95cd: OUTPUT«()␤»
22:57 spider-mario left
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…»
stmuk m: say $*REPO.repo-chain() X~ </doc/> 22:58
camelia rakudo-moar 0e95cd: OUTPUT«(/home/camelia/.perl6/doc/ /home/camelia/rakudo-m-inst-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::AbsolutePath<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::AbsolutePath<4433253456>/doc/ CompUnit::Repository::NQP<4433250704>/doc/ CompUnit::Repository::Perl5<4433248112>/doc/)"
*with* the grep, I get "(/Users/dha/rakudo/install/share/perl6/doc/)" 23:00
stmuk I think that's intended behaviour
Juerd Do any of the others exist as a directory then?
stmuk probably not
Juerd At least Perl 6 thinks they don't
lizmat wrt to smart match: A ~~ B is basically B.ACCEPTS(A)
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)
camelia rakudo-moar 0e95cd: OUTPUT«A.new(a => 666)␤A.new(a => 42)␤»
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.
stmuk the X~ is probably not needed in that case anymore 23:02
the core docs used to be under lib but were moved under a doc directory
23:02 dvinciguerra_ left
dha Ah. I knew that .d was a dir test, the *.IO confused me. 23:02
stmuk m: say "/tmp".IO.^name 23:03
camelia rakudo-moar 0e95cd: OUTPUT«IO::Path␤»
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
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
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
lizmat or sleepiness... 23:08
good night, #perl6!
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
23:09 lizmat left
Juerd Or even sub ($x) { $x + 2 } and sub ($f) { $f.IO.d } 23:09
dha Ah. so it's not precisely, but vaguely $_-ish? 23:10
Juerd Or, because timttwtdi, { $^x + 2 } and { $^f.IO.d }
It's used in places where you might have used $_ in Perl 5.
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
dha makes mental note to start poking people likely to write perl 6 books to start doing so. :-)
Juerd foo.grep: { $_.IO.d } or foo.grep: { .IO.d }
ZoffixWin or foo.grep: *.IO.D 23:12
s/D/d/;
Juerd ZoffixWin: That's what we started with :)
ZoffixWin Oh, sorry :)
ZoffixWin goes back to drinking and writing code :)
dha huh. the .IO.d version requires the braces... 23:13
Juerd dha: Yes. grep requires a closure
dha: Only expressions with * are braceless closures. Other closures require {}.
$_ doesn't do that.
23:14 firstdayonthejob left, spintronic joined
Juerd $_ is just a variable, nothing special about it. 23:14
dha Ah. ok, got it.
23:14 chrisdotcode left
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
Juerd Specifically, in a method, $_ is *not* self, and .foo still is short for $_.foo, so don't use that to mean self.foo.
ZoffixWin More or less... I guess it's more it gets changed into $^a
As * + * is { $^a + $^b } 23:16
Juerd ZoffixWin: -> $_ { $_.foo }
Or any other _
dha Ok, that makes sense.
Juerd IIRC, * has nothing to do with $_
dha It's amazing how far down the rabbit hole you can go when just trying to fix a minor oddity in p6doc...
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
I see it's working for you :D
dha Apparently, that's what I'm doing. :-)
Juerd I think I learned most of the modern Perl 6 that I know from its own source 23:18
(I say modern Perl 6 because I can't seem to unlearn the never-implemented design-phase Perl 6 thingies.)
23:19 TimToady left 23:20 TimToady joined 23:22 BenGoldberg joined
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
23:23 cognominal joined, cognominal left 23:24 spintronic left
Juerd Ouch 23:25
23:25 spintronic joined 23:26 arcetera left 23:28 arc__ joined, arc__ is now known as arcetera, arcetera left, arcetera joined 23:29 spintronic left, vendethiel left 23:30 spintronic joined 23:33 cdg left 23:34 cdg joined 23:38 cdg left 23:40 mcsnolte left 23:50 dvinciguerra_ joined 23:51 RabidGravy left 23:52 vendethiel joined 23:54 spintronic left 23:55 kid511 joined, kid51 left 23:56 spintronic joined
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* 23:59