»ö« 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 Cabanossi joined 00:04 travis-ci joined
travis-ci Doc build errored. Greg Donald 'Fix grammer around IO::Handle.getc.' 00:04
travis-ci.org/perl6/doc/builds/250158390 github.com/perl6/doc/compare/c7c1b...d00a202626
00:04 travis-ci left 00:05 Actualeyes left 00:06 mr-foobar left 00:07 mr-foobar joined 00:09 lizmat joined
Lambd0x_ would it be possible that in Linux a module compiles and in Windows not? 00:17
If yes, it would explain why GTK::Simple fails to get installed. :(
geekosaur is gtk installed? 00:18
(no, it is unlikely that GTK::Simple downloads Gtk DLLs for you) 00:19
ugexe heh, but it does 00:22
github.com/perl6/gtk-simple/blob/m...r/Build.pm
i just tried to install on windows and it failed to download the dlls during Build.pm because IO::Socket::SSL is not installed 00:24
Lambd0x_ ugexe, I got IO::Socket::SSL installed just to check and still it fails. But debug doesn't say anything meaningful to me regarding what caused it. 00:28
ugexe, I suppose the gtk3 dlls got installed.
00:32 lookatme joined 00:38 travis-ci joined
travis-ci Doc build errored. Will "Coke" Coleda 'Sort exact matches first in category 00:38
travis-ci.org/perl6/doc/builds/250164474 github.com/perl6/doc/compare/25d00...82ed00036b
00:38 travis-ci left
lookatme morning 00:38
00:44 Cabanossi left 00:45 Cabanossi joined
Geth doc: b7d08b58cd | (Will "Coke" Coleda)++ | template/search_template.js
Highlight the matched porton of the search

Fixed #1409
00:45
00:53 mr-foobar left 00:54 mr-foobar joined 00:58 eliasr left 01:03 ggoebel joined, Actualeyes joined
Lambd0x_ ugexe, what does it mean when zeg debug line says # SKIP: No build.pm for .... 01:05
ugexe, *zef
01:13 ggoebel left
lookatme Lambd0x_, when you need additional c code or something else, you need a build.pm build your helper library 01:19
looks like this: github.com/araraloren/Net-FTPlib/b...r/Build.pm
01:29 ggoebel joined 01:31 parv joined 01:36 travis-ci joined
travis-ci Doc build errored. Will "Coke" Coleda 'Highlight the matched porton of the search 01:36
travis-ci.org/perl6/doc/builds/250173336 github.com/perl6/doc/compare/6582e...d08b58cde7
01:36 travis-ci left 01:45 ilbot3 left 01:46 ufobat left 01:47 Khisanth left 01:48 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:52 Khisanth joined 01:53 uberbaud joined 02:03 astj joined 02:14 Sgeo_ joined 02:17 Sgeo left, noganex joined 02:18 BenGoldberg joined, Sgeo__ joined 02:21 noganex_ left 02:22 Sgeo_ left 02:23 uberbaud^ joined 02:25 Sgeo_ joined 02:28 Sgeo__ left 02:30 Cabanossi left 02:31 Cabanossi joined 02:48 Lambd0x_ left 02:50 uberbaud^ left, uberbaud left 02:53 uberbaud joined 02:59 Cabanossi left 03:01 Cabanossi joined 03:02 parv left 03:19 uberbaud left 03:26 pilne left 03:32 Actualeyes left 03:37 raschipi left 03:44 Cabanossi left 03:45 cyphase left 03:46 Cabanossi joined 03:59 Cabanossi left 04:00 Cabanossi joined 04:11 Matthew[m] left 04:14 Matthew[m] joined 04:16 khw left 04:21 konsolebox left 04:22 mr-fooba_ joined 04:23 konsolebox joined 04:24 mr-foobar left 04:26 TeamBlast joined 04:28 Cabanossi left 04:30 Cabanossi joined 04:42 uberbaud joined
samcv what's zoffix's current username? 04:47
04:49 Actualeyes joined 04:52 brrt joined 04:53 brrt left 04:57 wamba joined
TEttinger I think it's samcv 04:57
04:58 mr-fooba_ left
llfourn ZofBot: what's zoffix's current username? 04:58
TEttinger ZofBot: ? 04:59
it doesn't know does it
llfourn doesn't look like it :\
05:00 |oLa| joined 05:04 mr-foobar joined 05:11 raiph joined
samcv ZofBot, help! 05:19
05:21 TeamBlast left
samcv well i made an RT for an IO regression introduced to command line arguments rt.perl.org/Public/Bug/Display.html?id=131703 05:23
MAIN has a command line argument, and at the end of execution it tries to open that as a file 05:24
which it should not do
05:26 raiph left 05:27 TeamBlast joined, mr-foobar left 05:31 mr-foobar joined 05:33 wiz joined, wiz is now known as Guest48269 05:34 xtreak joined 05:42 Guest48269 left, Cabanossi left
ugexe `perl6 -e 'sub MAIN($mode = "easy") { get; }' easy` exits immediately, while `perl6 -e 'sub MAIN($mode = "easy") { get; }'` waits for enter to be pressed 05:44
05:45 Cabanossi joined 05:48 cyphase joined 05:49 cyphase left, cyphase joined, cyphase left 05:50 cyphase joined, cyphase left 05:52 cyphase joined, cyphase left, xtreak left 05:54 cyphase joined
ugexe samcv: it can be fixed in the script by s/get;/prompt;/ at least 05:54
05:54 cyphase left
samcv yeah i know 05:55
ugexe which is what it probably should be anyway even if this is a bug
samcv but regardless shouldn't be using the arg as a file since it should be taken by MAIN
my friend discovered it when they updated
05:56 cyphase joined 05:57 cyphase left 05:58 mr-foobar left 06:03 mr-foobar joined 06:07 lowbro joined, lowbro left, lowbro joined 06:08 lookatme left, lookatme joined 06:15 ufobat joined 06:17 Grauwolf joined 06:18 TimToady left 06:20 TimToady joined
timotimo i wonder how it used to know before that the last arg isn't a file 06:34
i don't think there's a signalling mechanism for "these args have been used up"
06:40 andrzejku joined 06:49 BenGoldberg left 06:50 abraxxa joined 07:04 leont joined 07:19 TEttinger left 07:20 leont left 07:23 domidumont joined 07:25 zakharyas joined, darutoko joined 07:28 uberbaud left, Actualeyes left 07:31 nattefrost joined 07:32 uberbaud joined, espadrine joined 07:33 |oLa| left 07:43 Cabanossi left 07:44 andrzejku left 07:45 Cabanossi joined
timotimo maybe ArgFiles has always opened every argument on the commandline but it just wasn't fatal if one (or all) of them were missing 07:49
and stdin was always the last entry in argfiles? 07:50
07:58 rindolf joined 08:02 dakkar joined 08:03 dakkar_ joined 08:06 dakkar left 08:14 cschwenz joined 08:15 wamba left 08:19 lookatme left, lookatme joined 08:24 dakkar_ is now known as dakkar, zacts joined 08:28 cosimo left 08:30 wamba joined
llfourn is there anyway to get the Proc::Async finish promise without saving the result of .start? 08:39
08:42 Cabanossi left
llfourn hmm it looks like not 08:44
08:44 Cabanossi joined 08:54 zakharyas left 08:55 nadim_ joined 08:58 zakharyas joined 09:03 ab6tract joined, cfa joined
ab6tract o/ 09:03
samcv grant status update 2 up cry.nu/perl6/grant-status-update-2/
cfa not sure if this was picked up when i mentioned it a few days back:
~; perl6 --profile
Segmentation fault: 11 09:04
ab6tract lizmat: can you run me through the reasoning for reverting the Baggy semantics of (<) and (<=) ?
the perl 6 weekly note just says that it was done because of documentation?
considering that we no longer keep baggy versions of any of the other set operators around, it seems like a strange choice to me 09:07
09:09 espadrine left
jnthn llfourn: No 09:09
nadim_ Hi, I have: class A {method get_B{ B.new(:a(self)) } } class B{ has A $a} # that is a A object returns itself wrapped in as a B object. Class B has to be declared for A to use it, how do I get this working? 09:10
m: class A {method get_B{ B.new(:a(self)) } } class B{ has A $a} A.new.get_B() ;
camelia 5===SORRY!5=== Error while compiling <tmp>
Strange text after block (missing semicolon or comma?)
at <tmp>:1
------> 3ass A {method get_B{ B.new(:a(self)) } }7⏏5 class B{ has A $a} A.new.get_B() ;
expecting any of:
infix…
jnthn nadim_: Need to stub B before. class B { ... } 09:12
(Literally with the ... )
09:13 pecastro left, pecastro joined
nadim_ thank you , I google "predeclare class" but was unsuccessful 09:17
I could also pass an A to B, and it may even be better, but I wanted to know how to wrap objects 09:18
jnthn: when passing self to the B constructor above, does self get copied in B.a? shallow copied? referenced? 09:22
jnthn Referenced 09:23
nadim_ good! 09:24
09:28 xtreak joined, Foss joined, Cabanossi left
Foss what's zoffix's current username? 09:28
09:28 Foss is now known as Guest94316 09:29 Guest94316 left, xtreak left, Cabanossi joined 09:47 cosimo joined 09:51 bjz joined 09:58 Cabanossi left
Geth specs: 658d1e5c35 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Propose change to $*ARGFILES inside MAIN

Make $*ARGFILES := $*IN or IO::ArgFiles.new($*IN) inside sub MAIN
09:59
10:00 Cabanossi joined
Geth specs: 030df46f12 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Fix POD error
10:00
10:02 cyphase joined, ChoHag left 10:05 cyphase left 10:06 cyphase joined 10:07 cyphase left 10:08 cyphase joined 10:09 skids joined 10:10 astj left, astj joined, cyphase left
ab6tract .ask lizmat can you run me through the reasoning for reverting the Baggy semantics of (<) and (<=) ? the perl 6 weekly note just says that it was done because of documentation. considering that we no longer keep baggy versions of any of the other set operators around, it seems like a strange choice to me. 10:11
yoleaux ab6tract: I'll pass your message to lizmat.
Geth specs: 0aa72aa1d9 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Clarify a bit the $*ARGFILES in MAIN
10:12 cyphase joined, cyphase left 10:14 cyphase joined, cyphase left 10:16 cyphase joined
lizmat ab6tract 10:17
yoleaux 10:11Z <ab6tract> lizmat: can you run me through the reasoning for reverting the Baggy semantics of (<) and (<=) ? the perl 6 weekly note just says that it was done because of documentation. considering that we no longer keep baggy versions of any of the other set operators around, it seems like a strange choice to me.
lizmat ab6tract: I'm still in 2 minds about it myself, and wonder what masak and labster would want to say about it
currently I'm leaning towards deprecating (<+) in favour of baggy semantics of (<) and (<=) 10:18
ab6tract i like the way you are leaning :) 10:19
10:19 cyphase left
ab6tract it also fits the way TimToady describes "sets as a degraded case of bags" 10:19
lizmat: regarding the documentation, it's been on my TODO list for quite some time. hopefully i can take some time this weekend to finally get it updated. 10:20
lizmat ab6tract: meanwhile, there are currently 4 mix tests in roast that fail, of which I think the first 3 are faulty 10:21
could you have a look?
git blame sorta points your way
10:22 AlexDaniel left 10:24 ChoHag joined 10:27 seatek left
nadim_ m: class A { has $!p ; method new { my $o = self.bless ; $o.p = 1 } } ; A.new ; 10:28
camelia No such method 'p' for invocant of type 'A'
in method new at <tmp> line 1
in block <unit> at <tmp> line 1
nadim_ how do I set a private member in the new method? 10:29
jnthn You don't, you do it in a BUILD or TWEAK method
*submethod, even 10:30
nadim_ looks at the doc
10:32 ChoHag left
nadim_ it would have been nice if it was possible to pass the private member initial values to bless. 10:38
it there an example somewhere of a new method that calls BUILD or TWEAK? if that is the way to initialize from a new method. 10:39
jnthn You don't need to write new at all
m: class A { has $!p; submethod TWEAK(:$!p) { }; method pp() { say $!p } }; A.new(p => 42).pp 10:40
camelia 42
nadim_ I need to do some computations in new to set other members 10:41
$!p itself is the result of such a computation
do I do that in BULD instead? 10:42
10:42 Cabanossi left
jnthn m: class A { has $!p; submethod TWEAK(:$a, :$b) { $!p = $a + $b }; method pp() { say $!p } }; A.new(a => 4, b => 38).pp 10:42
camelia 42
jnthn Or BUILD 10:43
BUIL
oops
BUILD = I want complete control over construction, don't set any attributes automatically for me
TWEAK = do the normal thing for public attributes and then let me do some extra work
And they both just get passed the named parameters passed to bless 10:44
And the default new just calls bless with whatever it gets
10:45 Cabanossi joined, robertle joined
nadim_ I kinda get it. I think a few examples in the doc would be good. I think the example in the docs: class Area ... has a typo, it says "has $.size" but BUILD has "$!size = ...." 10:47
jnthn Where's the typo?
If you mean . vs ! then no, it's correct 10:48
has $.size; is short for has $!size; method size() { $!size }
nadim_ yeah right is readonly, is ro traits are used 10:49
timotimo "is ro" is the default unless you make your class "is rw"
nadim_ the problem, for me, is that BUILD only takes named args when I need something like: submethod BUILD($s, *%attributes) 10:54
10:54 bjz left
nadim_ I had new($s, *%attributes) but I want to set a $!p inside the new method, can I can BUILD/TWEAK? 10:56
or do I need to add a method to set $!p?
timotimo in that case you need a custom new method
the regular new will never accept positional arguments 10:57
nadim_ I had a custom new
10:57 bjz joined
timotimo in that case it can just pass the $s to be put into $!p via a named parameter that is otherwise not used 10:57
nadim_ I want it positional
timotimo yes, the "new" method will get it positional 10:58
TWEAK and BUILD both get all named args passed to bless
jnthn Just have new turn the positional into a named that is passed to bless, and receive that named in BUILD/TWEAK
nadim_ ok 10:59
gh hoops). 11:01
I wonder why bless does not set private members. I understand that new does not do it but if bless is lower lever it seems that it would have been a good idea (raher than jump through hoops)
there must be a reason of course, I am just curious which one.
timotimo yeah, it's because bless is API, and private attributes are not
you can't refactor private attributes freely if someone could be relying on their names
11:02 dubi0us joined
jnthn Perl 6 tries very hard to make sure you can confidently refactor $!thingy inside of your class without having to ever care about code outside of your class. 11:02
So long as you preseve behavior, that is
11:02 dubi0us left
nadim_ silly question, is there a run time system to make attributes private, or readonly? 11:02
11:03 jonas1 joined
jnthn I'm not sure I even understand the question :) 11:03
nadim_ Not saying it's a good idea, just wondering
then it must be a bad idea ;)
jnthn I mean, if you are using the MOP to define a new class at runtime then you can choose then whether the attribute is public or private
But the accessor generation for . happens at compose time
nadim_ that answers the question 11:04
jnthn For a normal class decl in a program that menas the method is added when the closing } of the class is reached
Alright
Lunch time here :)
nadim_ Bon appetit 11:05
11:05 bjz left 11:14 zakharyas left
ab6tract lizmat: yup, i will check it out after work 11:20
nadim_ m: [^10] 11:29
camelia ( no output )
nadim_ m: dd [^10]
camelia [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
nadim_ how do I get a list with ten elements? I want the list object not its elements
timotimo huh? 11:30
11:30 bjz joined
timotimo m: [^10].^name.say 11:30
camelia Array
timotimo m: [^10].List.^name.say
camelia List
ab6tract m: (^10).^name.say 11:31
camelia Range
nadim_ .List meh I have tried a lot of combinations for nothing. I though $(^10) would make the trick
ab6tract m: (| ^10).^name.say
camelia Slip
nadim_ is there a way to get a list without passing by an array? 11:32
tbrowder hi, #perl6 11:33
nadim_ ji 11:35
hi
ab6tract m: (^10).List.^name.say
camelia List
tbrowder i continue to have a small problem with installing rakudo from the rakudo star download: the instruction don't work for installing with the --prefix option 11:36
ab6tract m: sub f(List() $l) { dd $l }; f(^10)
camelia List $l = $(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
tbrowder hi, nadim!
timotimo tbrowder: can you elaborate?
nadim_: why don't you just (^10).List?
m: say (^10).List.^name 11:37
camelia List
tbrowder yes, i use: perl Configure.pl --backend=moar --gen-moar --prefix=/opt/rakudo 11:38
timotimo you can only use --gen-moar if you have write access to the prefix
because in that case the configure step calls "make install" on moar, and then on nqp
before it can build rakudo
tbrowder make then proceeds until it quits when it can't find moar in /opt/rakudo...let me check the error msg again... 11:39
nadim_ timotimo: lol! yes why not. 11:40
timotimo [ ] is syntax for "gimme an Array" 11:41
ab6tract nadim_: did you see my coercive subroutine example?
timotimo tbrowder: it might have failed to "make install" in moar but for some reason continued on
ab6tract m: sub l( List() $l ) { dd $l; return $l }; l(^10).^name.say
camelia List $l = $(0, 1, 2, 3, 4, 5, 6, 7, 8, 9)
List
tbrowder no, the per Conf* step stops when it can't find a necessary executable in /opt/rakudo: a chicken and egg situation 11:42
timotimo it should try to build a moar in that case 11:43
11:43 Cabanossi left, nadim_ left 11:44 nadim_ joined
timotimo only if --gen-moar is passed, of course 11:44
tbrowder but it doesn't for me: debian 8, 64-bit
11:45 Cabanossi joined
nadim_ ab6tract: yes but I wanted to send something as a list not receive it as a list. 11:45
tbrowder well --gen-moar was passed
timotimo can has a full log? 11:46
ab6tract nadim_: but if you are "sending it", then it is being received by something, correct? 11:53
:) 11:54
12:00 W4RL0RD joined
nadim_ the receiving end is generic (a dumper) can't coerce there ;) 12:00
tbrowder i can provide it, ref to gist ok?
nadim_ of course I could call the corercing sub as an argument to the dumper but is just too much :) 12:01
timotimo yeah 12:02
12:03 wamba left, bjz_ joined 12:04 wamba joined 12:05 bjz left 12:13 mr-fooba_ joined
tbrowder timotimo: here's the problem: the prefix dir has to either already exist or be able to be created in the config step by the user--not a clean separation between make and make install. 12:15
12:16 mr-foobar left
tbrowder i think the config, make, and make test step should be completely done ss an ordinary user. then sudo make install. even if that can't be done right away, the instructions need to say that. 12:17
12:19 xtreak joined
tbrowder i remember now the problem and looked into a PR on the process but found it all too complex for me to understand. ther are really two build steps, but the first one almost requires root, and that pollutes the rest of the build directory with root ownership. 12:19
timotimo tbrowder: well volunteered! 12:22
oh
the solution if you want to put stuff into a privileged place is to run configure and make in all three projects manually, and make install in each as root
DrForr_ If anyone is interested in the compilation speed difference between '|' and '||' separated terms, look at github.com/drforr/perl6-Format-Lisp - tag 828e0b766ba8ba579584c08da4857dd177e05d24 12:23
5 seconds or so as it is, but change '|' to '||' in tilde-Atom and it jumps to 51 seconds. 12:24
12:24 xtreak left
tbrowder well i can definitely PR instructions, but the clean separation is beyond me. 12:24
although i can look at it again (yuk!)
DrForr_ It still needs more refactoring, and cleaning up would probaby solve the speed difference but it serves to demonstrate the delta. 12:25
12:25 zakharyas joined
tbrowder .tell DrForr_ my Perl6::Parser PR is passing travis testing 12:25
yoleaux tbrowder: I'll pass your message to DrForr_.
DrForr_ Thanks, will look at it in a few minutes. 12:26
yoleaux 12:25Z <tbrowder> DrForr_: my Perl6::Parser PR is passing travis testing
nadim_ Can we return named values? without using a hash. 12:27
moritz no 12:28
well, using a capture maybe
timotimo yeah, a capture, or a pair or list of pairs
moritz m: sub f() { return a => 42 }; say f().perl
camelia :a(42)
nadim_ the interesting part would be the receiving end
can we put a capture there to match the pairs? 12:29
12:30 lowbro left
nadim_ timotimo: how would a capture look like? 12:30
12:32 ggoebel left
timotimo m: say \(1, 2, :foo(bar)).perl 12:32
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared routine:
bar used at line 1. Did you mean 'VAR', 'bag'?
timotimo m: say \(1, 2, :foo("bar")).perl
camelia \(1, 2, :foo("bar"))
timotimo m: say \(1, 2, :foo("bar")).^name
camelia Capture
nadim_ and on the receiving end? 12:33
timotimo m: my $cap = \(1, 2, :foo("bar")); say $cap.list.perl; say $cap.hash.perl; 12:36
camelia (1, 2)
Map.new((:foo("bar")))
12:37 uberbaud left, paulmr_ joined 12:38 lucasb joined, paulmr_ left 12:54 aborazmeh joined, aborazmeh left, aborazmeh joined 12:58 astj_ joined, astj left 13:01 wamba left 13:02 wamba joined 13:22 MilkmanDan left 13:24 MilkmanDan joined 13:28 lowbro joined, lowbro left, lowbro joined, W4RL0RD left 13:29 Cabanossi left 13:30 Cabanossi joined, ChoHag joined
nadim_ Do untyped arguments default to Any? I just got surprised when I got message "Type check failed in binding to parameter '$s'; expected Any but got Mu (Mu)" but the parameters had no type. 13:34
jnthn On routines, yes.
13:34 buggable left, buggable joined, ChanServ sets mode: +v buggable 13:35 mr-fooba_ left 13:36 buggable left, buggable joined, ChanServ sets mode: +v buggable 13:41 linuksz joined
nadim_ OK, what's the thought behind that? 13:41
and it was on a routine not a method. 13:42
jnthn Methods are routines
Reasoning is so junctions auto-thread there
On blocks the default is Mu
nadim_ ok then it was on sub but I have to expect that with methods too then 13:43
jnthn Yes
You can expicitly type it as Mu if need be
nadim_ I did and it worked fine
13:44 Juerd is now known as Whreq 13:46 nicq20 left 13:48 aborazmeh left 13:49 nicq20 joined 13:52 mr-foobar joined 13:57 alimon joined 13:58 Cabanossi left 13:59 Cabanossi joined 14:05 buggable left 14:06 buggable joined, ChanServ sets mode: +v buggable, buggable left 14:08 cog_ joined, buggable joined, ChanServ sets mode: +v buggable 14:09 nattefrost left 14:10 buggable_ joined, ChanServ sets mode: +v buggable_ 14:11 buggable_ left, cognominal left 14:18 Whreq is now known as Juerd 14:20 cyphase joined, cyphase left 14:25 cyphase joined 14:26 cyphase left, cyphase joined 14:27 cyphase left 14:28 cyphase joined, cyphase left 14:29 cyphase joined, cyphase left 14:30 cyphase joined, cyphase left
ufobat is still hoping for some help at the perl6 ml: www.nntp.perl.org/group/perl.perl6....g3967.html maybe someone has something to add there :-) 14:41
14:47 khw joined 14:50 wamba left 14:53 ab6tract left 14:57 buggable_ joined, ChanServ sets mode: +v buggable_ 14:58 buggable_ left, buggable left, Cabanossi left, buggable joined, ChanServ sets mode: +v buggable 15:00 Cabanossi joined
nadim_ So I got a pull request or two, from someone you are going to guess the name of, for some syntax: the patch is for changing "$object.method $arg" to "$object.method: $arg". where are we abou the usage of a semicolumn? should we try to use that, and why, or it just confuses everyone? 15:04
moritz $object.method $arg is a syntax error 15:13
I personally like $obj.method: $args, but I know for example that masak++ is not a big fan 15:14
15:22 lowbro left
linuksz is there any limit to the number of promises? 15:22
15:22 cfa left
linuksz i am writing a script, and i want to run a lot of external commands in parallel 15:23
my @result = await @array.map({start run_test $_})
i wrote it, but it don't work if @array has more elements than 16 15:24
i want to start about 350-400 processes
15:24 mr-fooba_ joined, Ven`` joined
Ven`` o/ 15:25
15:25 mr-foobar left
nadim_ do they all have to run in parallel or are you just trying to parallelize as much as you can? in later, this sounds like a bad idea; even if the language supports it you're going to have a lot of scheduling for nothing 15:25
15:26 alimon left
linuksz how should i do it? 15:26
nadim_ start a pool and as soon as a process ends add a process to your pool
jnthn linuksz: The reason you hit problems at 16 is that a start { ...await ... } will block a thread from the pool 15:27
nadim_ it probably will end faster and you will also get intermediate results faster, rather than having to wait for most to finish. that is of course dependent on how you system schedules
jnthn You can probably write it without a start block though.
linuksz i didn't learned programming in school ( only doing for hobby ) 15:28
nadim_ masak: why you no like ':' on calls?
linuksz: doesn't matter, we all have learned more practicing than at school
jnthn Though as nadim_ said, 350 procs spawned at once is still likely going to cause some pain :) 15:29
I think there's a module for this use case though
nadim_ specially if they are not io bound
15:29 Cabanossi left
timotimo yeah, Proc::Q 15:29
jnthn github.com/zoffixznet/perl6-Proc-Q 15:30
15:30 Element80 joined
Element80 oh, beat me to it :) 15:30
linuksz i searched for 'pool' in wikipedia, but what article should i choose?
15:30 Cabanossi joined
linuksz i don't know what is a pool 15:30
timotimo it's just the concept of something that has a number of other things in it that are ready to be used and put back 15:31
nadim_ Hehe! what is this? "Invocant of method 'Bridge' must be an object instance of type 'Int', not a type object of type 'Int'. Did you forget a '.new'?" I probably wrote crappy code but I am curious about what Bridge is.
Ven`` nadim_: you passed a type object (like Int) instead an Int (like 5) 15:32
Element80 nadim_: the idea behind it is it returns a "bridge" type so you can, say, add two different numerics together, but it's really just a .Num call
15:33 zakharyas1 joined 15:34 zakharyas left
linuksz how can i start a pool? 15:34
Element80 linuksz: basically there are 16 (by default) threads to do things at once. And in 6.d await needs a thread too. So you're using up all 16 and not leaving enough for the await.
linuksz: don't worry about the pool. You could `use v6.d.PREVIEW` to make `await` non-blocking 15:35
linuksz: That'll probably fix your initial problem but for 350 procs... you'll need about 80GB of RAM. Hence why Proc::Q module was suggested. It was designed precicely to run a ton of procs.
nadim_ 80 GB! no problems. ;) 15:36
15:36 Actualeyes joined
linuksz ok, not 350 procs, but at least 60-80 would be good at one time 15:36
Element80 linuksz: what perl6 version are you on? perl6 -v 15:37
linuksz This is Rakudo version 2017.06-116-g385092270 built on MoarVM version 2017.06-35-g3d3d0d05
implementing Perl 6.c.
Element80 good
linuksz: so zef install Proc::Q
linuksz: do you want to just run them or do you need their STDOUT/STDERR? Do you need them any STDIN? 15:38
linuksz capturing STDOUT
timotimo mhhh, stout 15:39
linuksz here's my script: sprunge.us/CCXU 15:40
15:40 alimon joined
linuksz it's an ugly code, i know, but it should be work firstly 15:41
timotimo interesting, you have your own getopt 15:42
Element80 linuksz: ok, so you can do: react whenever proc-q(^2000 .map({«cal $_ »}), :80batch) { say "Got {.stdout} for command {.tag}" }
linuksz: and it'll run 2000 cal procs for each year and grab stdout
timotimo but it doesn't have any positional options there? only nameds? i don't see why MAIN wouldn't be able to do it for you completely 15:43
nadim_ linuksz: maybe a look at sub MAIN and how argument parsing for the command line is a good read
Element80 m: say ^1 .map: {«cal $_»}
camelia Potential difficulties:
Ambiguous use of »; use >> instead to mean hyper, or insert whitespace before » to mean a quote terminator (or use different delimiters?)
at <tmp>:1
------> 3say ^1 .map: {«cal $_7⏏5»}
((cal 0))
Element80 What's the ambiguity here, exactly?
timotimo Element80: you could be trying to have a hyper work on the $_ 15:44
Element80 Man, it worked fine before.
timotimo m: my @foo = <foo bar baz>; say <<$_>>.uc>>
camelia 5===SORRY!5===
Malformed postfix
at <tmp>:1
------> 3my @foo = <foo bar baz>; say <<$_>>.uc>>7⏏5<EOL>
expecting any of:
method arguments
postfix
Other potential difficulties:
Ambiguous use of >>; use » i…
linuksz the reason is why i wrote an own getopt is that if the user gives wrong values for arguments, it responds to him with more details than MAIN
timotimo m: my @foo = <foo bar baz>; say <<$_≫.uc>>
camelia Use of uninitialized value $_ of type Any in string context.
Methods .^name, .perl, .gist, or .say can be used to stringify it to something meaningful.
in block <unit> at <tmp> line 1
(≫.uc)
timotimo m: my @foo = <foo bar baz>; say <<@foo≫.uc>>
camelia @foo≫.uc
timotimo um, that's not the ≫ i wanted
m: my @foo = <foo bar baz>; say <<@foo».uc>> 15:45
camelia @foo».uc
timotimo *fumble*
linuksz: you can get better errors from sub main, i'll find that one blog post for you
actually, i was wrong about the blog post 15:46
Element80 I really want the $*STFU-I-KNOW-WHAT-I'M-DOING option that silences all the "Potential difficulties: " warnings.
nadim_ linuksz: also, IMO, listing all the sub function before main, is so 1970
linuksz where should i list them? after main? 15:47
timotimo docs.perl6.org/language/functions#...entry-MAIN - this has an example for an error message
Element80 linuksz: anyway, where in that script are you running your 300 procs? Is it the test_mirror one?
Ven`` did we get rid of the old /features page?
my bad, found it 15:48
linuksz Element80: my @mirrors = await read_mirrorlist.map({start test_url $_}); 15:49
there are about 350 lines in the mirrorlist file
each one with an url
Element80 linuksz: ok, then forget about Proc::Q 15:50
linuksz it cannot be done without proc::q?
you said something about pools
Ven`` er, in youtu.be/EwQoSZdEl2s?t=342 – does someone know which file TimToady++ is reading from? It rings some kind of bell but I can't seem to find it
Element80 linuksz: It can be done without Proc::Q. The module is for running multiple procs, but you're not doing that directly. Forget about pools, it's not important :) 15:51
linuksz: 1 sec
linuksz i don't like using modules, because i prefer my distro's packaging system, and not all modules are packaged (proc::q aren't) 15:53
Element80 rolls eyes 15:54
is that why you're using a dev commit of perl6 compiler? :)
linuksz no, almost all packages in AUR are packaged with alacryd, and the stable release of rakudo couldn't run it 15:55
Element80 linuksz: my @mirrors = await Supply.from-list(read_mirrorlist).throttle: 80, *.&test_url 15:56
give that a spin
15:56 lichtkind left
Element80 80 is the number of procs you wanna run at one time 15:56
linuksz i have to read about Supply 15:57
Element80 huggable: Supply
huggable Element80, Asynchronous data stream with multiple subscribers: docs.perl6.org/type/Supply
15:58 Cabanossi left, abraxxa left 15:59 Cabanossi joined
Element80 huggable: total commits 16:00
huggable Element80, cd $(mktemp -d); perl6 -MJSON::Fast -MLWP::Simple -e 'run |<git clone --bare>, $_ for from-json(LWP::Simple.get("api.github.com/orgs/perl6/repos"))..._url>); my $total; for dir(".") { my $n = run(:out, |<git --git-dir>, $_, |<rev-list HEAD --count --author=zoffix>).out.slurp-rest.trim.Int; say "$n commits in $_"; $total += $n;}; say "Total: $total"'
16:00 robertle left, nadim_ left
timotimo Ven``: it's a file TimToady means to post soon 16:00
Element80 Ven``: maybe repurposing that ^ to grep all perl6 repos for the words in that doc could yield something? :)
Oh. ok
linuksz i want to do it with some of Perl6's native tools. it is not clear to me that what's what (yet), but i will read about Supply. 16:01
timotimo linuksz: jnthn just held a presentation the other day that also had supplies in it
Element80 linuksz: Supply *is* Perl 6's native tool 16:02
linuksz i know it :)
Element80 Aforementioned presentation: www.youtube.com/watch?v=VqhLWgvIbz0
16:02 pmurias joined
linuksz but it's not clear for me what is the difference between the native tools (proc::async, promises, and supply) 16:02
Element80 linuksz: all are asynchronous tools. Proc::Async runs external programs. Promise is a way to get one value. Supply is a way to get a bunch of values. 16:03
In the snippet I gave you, the bunch of values are the URLs to test and we use a supply there to asyncronously test them, testing at most 80 at a time, using .throttle 16:04
linuksz but what is the difference between proc::async and running 'run' with 'start' and 'await'?
16:05 domidumont left
Element80 linuksz: in the grand scheme of things, no difference. 16:05
`run` uses Proq, which is implemented in terms of Proc::Async
But using Proc::Async you can, for example, tap stdout and read it asynchronously too, while `run` gives you a synchronous interface, where you'd just read it as from the pipe 16:06
linuksz but 'run' uses proc::async? 16:07
jnthn One benefit of working directly with Proc::Async, however, is that it works entirely in terms of Promise
Element80 linuksz: on latest Rakudo, yeah
Under the hood.
jnthn linuksz: Under the hood yes, but it layers a blocking synchronous interface atop of it, which won't help your goal to scale up to running a lot of processes at all
Element80 & 16:08
16:08 Element80 left
linuksz ok, and what are the difference between supply and promise? 16:09
16:09 lichtkind joined
jnthn linuksz: The presentation that was just linked has examples of Promise and Supply in the context of Proc::Async. If you don't want to watch a video, the slides are at t.co/TpljDe3uVO 16:09
One value and many values
A Proc::Async has one exit code (Promise) but may write to stdout/stderr many times (Supply) 16:10
16:16 Ven`` left 16:18 nadim_ joined 16:20 dmaestro joined 16:27 Cabanossi left
dmaestro hoping someone will review nqp pull request #364 - simple change (with tests) to better align sprintf() with POSIX. 16:27
16:28 cschwenz left 16:29 Cabanossi joined 16:36 setty1 joined
pmurias is anyone working on a docs.perl6.org replacement? 16:36
16:37 ChoHag left 16:40 skids left
pmurias (replacement of the docs viewer) 16:46
16:47 dakkar left 16:50 TEttinger joined 16:51 jonas1 left
tbrowder timotimo: i don't think many would think that is a good solution given the seemingly tight coupling between rakudo, nqp, and moar with stable releases. 16:51
16:51 nadim_ left 16:56 domidumont joined
timotimo it's not a good situation, yeah 17:00
Geth specs: 4ea8b15425 | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Split features into sections

  - Already implemented
  - Yet to be implemented
17:02
17:02 mr_ron joined
mr_ron m: grammar G { token digitz { <[0..9]> }; our token DIGIT is export(:UC) { <G::digitz> } }; import G :UC; say so "1" ~~ /<DIGIT>/ # any way to define DIGIT without hard coding grammar G:: in G::digitz (maybe $?PACKAGE) 17:04
camelia True
17:04 zakharyas1 left 17:08 Ven`` joined 17:09 ChoHag joined 17:10 dmaestro left
Geth specs: 6eff18021f | (Zoffix Znet)++ (committed using GitHub Web editor) | v6d.pod
Add reasoning for IO::*.chdir/.slurp-rest deprecations
17:11
17:16 setty1 left 17:17 setty1 joined
Ven`` TimToady: in your QA session, you have your "principled" file listing the perl5 improvements and what role they performed in 6, do you have it uploaded somewhere? 17:20
17:22 Actualeyes left 17:29 davidnek joined 17:34 davidnek left
TimToady Ven``: not yet 17:39
been a bit busy with busted drains
Ven`` oh okay. thanks!
good luck with those :/ 17:40
perigrin Busted drains suck ...
17:40 mr-fooba_ left
TimToady in this case they blow, but yeah... 17:44
17:45 mr-foobar joined 17:59 lichtkind left 18:00 setty1 left 18:01 setty1 joined 18:02 troys joined 18:08 pilne joined 18:13 espadrine joined 18:17 dct joined
Geth doc: 83f2ff5fe2 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Add section on parsing and whitespace issues

And rename regex section to whitespace and just stuff the single regex whitespace trap up in there.
18:21
18:23 Xliff__ left
Geth doc: 7a05709537 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
reword
18:23
doc: 3835783997 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Fix minor factual error
18:25
18:29 Ven`` left 18:40 uberbaud joined 18:42 mr-foobar left 18:43 Cabanossi left 18:45 skids joined, Cabanossi joined, mr-foobar joined 18:46 domidumont left 18:58 nadim_ joined 19:01 pmurias left 19:11 ChoHag left, travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Add section on parsing and whitespace issues 19:11
travis-ci.org/perl6/doc/builds/250463942 github.com/perl6/doc/compare/b7d08...f2ff5fe2b3
19:11 travis-ci left, setty1 left 19:13 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'reword' 19:13
travis-ci.org/perl6/doc/builds/250464736 github.com/perl6/doc/compare/83f2f...0570953781
19:13 travis-ci left 19:14 wamba joined, darutoko left 19:16 travis-ci joined
travis-ci Doc build errored. Zoffix Znet 'Fix minor factual error' 19:16
travis-ci.org/perl6/doc/builds/250465661 github.com/perl6/doc/compare/7a057...3578399729
19:16 travis-ci left 19:17 andrzejku joined 19:21 troys is now known as troys_
Geth doc: db26e3b3ad | (Jan-Olof Hendig)++ | 2 files
Change result of some code examples

In order to take the new baggy semantics into account
19:21
doc: 93499fa061 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/traps.pod6
Remove hyper vs. «» trap

The ambiguity warning for the more common case was made[^1] not to warn for cases shown in the examples and the much less common cases don't warrant a Trap entry (a warning is generated by the compiler in those cases anyway).
  [1] github.com/rakudo/rakudo/commit/d39f7b9aff
19:26
19:32 Element80 joined, buggable left 19:33 buggable joined, ChanServ sets mode: +v buggable
Element80 travis-ci.org/perl6/doc/builds/250465661 19:33
buggable [travis build above] ☠ Did not recognize some failures. Check results manually.
zengargoyle huggable: eco strptime 19:34
huggable zengargoyle, nothing found
19:36 epony left
zengargoyle wonders if someone has done a NativeCall strptime in lieu of DateTime::Format's strptime being NYI as a stopgap measure.... 19:36
or is this along the lines of not being too POSIXy? 19:37
19:40 buggable left, buggable joined, ChanServ sets mode: +v buggable
Element80 travis-ci.org/perl6/doc/builds/250465661 19:40
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0).
Element80 buggable++ 19:41
19:41 Element80 left 19:42 seatek joined 19:44 rindolf left 19:45 grumble left, grumble joined 19:47 troys_ is now known as troys
nadim_ hi, what the reverse of //= ? IE assign to the lhs only if it is defined. 19:47
moritz andthen= 19:49
19:49 setty1 joined
nadim_ seriously? 19:51
well, it makes sense at least
moritz m: for 42, 0, Any -> $x is copy { $x andthen= 23; say $x }
camelia 23
23
(Any)
moritz srsly 19:52
nadim_ wow!
19:53 ChoHag joined
lucasb m: (my $x = 10) andthen .say 19:54
camelia 10
lucasb m: (my $x = 10) andthen= .say
camelia (Any)
lucasb should andthen= also topicalize?
19:55 kyclark joined 19:56 kyclark left 19:57 TreyHarris left 19:58 TreyHarris joined
tbrowder timotimo: actually i think you're onto something. it may be easier to untangle the pieces in the star package and build each in place, then install them individually into the correct positions in $INSTDIR. or assemble the pieces differently in the first place. 19:58
has anyone considered using cmake for all the builds? 20:00
nadim_ There must be a much better way towrite this nopaste.linux-dev.org/?1159371 what it does is set class variables only if the corresponding argument is defined in the mothod call. Don't know why but I find this a tad ugly. 20:01
timotimo tbrowder: running nqp from outside the install directory is probably troublesome, though
tbrowder ok 20:02
zengargoyle tbrowder: probably not helpful, but last time i did manual install thing... i sudo mkdir /install; sudo chown -R me:me /install; install rakudo; sudo chown bin:bin /install :) 20:03
moritz nadim_: you use the conditional if $selected_line.defined twice
if that's intentional, a single "if" is enough
20:03 AlexDaniel joined
moritz nadim_: and you can get rid of all the $x < 0 ?? 0 !! ... by sticking a 'max 0' to it 20:03
m: say $_ max 0 for -4, 0, 4; 20:04
camelia 0
0
4
nadim_ copy paste and not thinking. I'll try the max thingy 20:06
tbrowder zengaroyle: basically same here, but the docs don't tell people new to rakudo to do that (but my PR awaits approval). but i would really like to see configure separate from any building. i did notice moritz has a rakudo bug filed for that in 2013.
20:08 Element80 joined
Element80 nadim_: use `with` instead of if defined 20:09
20:09 mr_ron left
nadim_ example please 20:09
Element80 lucasb: definitely. I'm surprised it doesn't =(
m .say with 42 20:10
m: .say with 42
camelia 42
Element80 m: .say with Int
camelia ( no output )
lucasb Element80: thanks for confirming
20:10 itaylor57 left, itaylor57 joined 20:12 travis-ci joined
travis-ci Doc build errored. Jan-Olof Hendig 'Change result of some code examples 20:12
travis-ci.org/perl6/doc/builds/250485525 github.com/perl6/doc/compare/38357...26e3b3ad67
20:12 travis-ci left
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 20:12
20:12 mr-foobar left
AlexDaniel dogbert17++ 20:12
nadim_ m: with Int {.say}
camelia ( no output )
nadim_ m: with 7 {.say} 20:13
camelia 7
20:13 mr-foobar joined
Element80 nadim_: postfix `with` is same as `andthen` btw 20:14
20:14 Cabanossi left
zengargoyle m: given Int { .say } 20:14
camelia (Int)
zengargoyle ah
20:15 Cabanossi joined
Element80 m: .say without Int 20:16
camelia (Int)
Element80 m: Int notandthen .say
camelia (Int)
zengargoyle m: b => 42 andthen -> (:$key, *%) { $key.say } 20:18
camelia b
20:20 raschipi joined
nadim_ getting better nopaste.linux-dev.org/?1159372 20:20
Element80 tbrowder: for your star PR, it's confusing that it says $INSTDIR directories instead on $INSTDIR/install/bin 20:21
tbrowder: also, is that the only one that needs to be added? I thought there was a second 'site' one where binaries installed from modules are kept
lucasb m: -> (:$re, :$im) { say "($re, $im)" }.(2+3i) 20:22
camelia (2, 3)
Element80 nadim_: you got it wrong with the max op
nadim_ ha!
lucasb I didn't know I could unpack things like that. nice, zengargoyle.
Element80 nadim_: moritz meant replace your ternary with max
nadim_ I removed a ternary and replaced it with a max 20:23
Element80 lucasb: works in `if` and `else` and `for` and all the rest of blocks too; not just in standalone ones
tbrowder Element80: i'll look at a reword. from my installations with rakudo star all seems to install in $INSTDIR or underneath it. 20:24
20:24 FROGGS joined
Element80 nadim_: I still see two terbaries and seemingly pointless max call 20:24
three seemingly pointless max calla
nadim_: you missed the '0' portion of '$_ max 0' 20:26
20:26 lucasb left
Element80 (or '0 max $_') 20:26
nadim_: right you had a pair of nested ternaries, replace each pair with a single max call with the two of the args and the zero 20:28
$!topline = max 0, $topline, +$foldable.lines 20:29
20:30 AlexDaniel left, linuksz left
Element80 m: say max 0, (1, 2, 0).Seq 20:30
camelia (1 2 0)
20:30 AlexDaniel joined
zengargoyle Element80: share/perl6/{,site/,vendor/}bin 20:30
nadim_ I understoo that "max $a" did not need zero, I thought it curious though, but I guess it is needed, max -4 must be -4 20:31
20:31 andrzejku left
zengargoyle i only see files in the .../share/perl6/site/bin and not in the .../share/perl6/bin or .../share/perl6/vendor/bin 20:32
it's really easy to have 5 bin directories where things might end up.... ~/.perl6, INSTALL/bin, INSTALL/share/perl6/bin, INSTALL/share/perl6/{site,vendor}/bin 20:34
Element80 nadim_: where is max $a ? It should be fixed if the docs say that's zero
m: say max -4
camelia -4
Element80 Ah, k, I see why andthen= doesn't topicalize
nadim_ Element80: no, I misunderstood it when looking at the examples here 20:35
Element80 Ah ok
nadim_ Element80: I think it can be reduced to: $!selected_line = max(min($selected_line, $!foldable.lines.elems), 0) with $selected_line
Element80 zengargoyle: where are all of those coming from?
nadim_: ah right. I misread original ternary 20:36
tbrowder: merged thanks 20:38
Element80 &
20:38 Element80 left
nadim_ without ternary at all nopaste.linux-dev.org/?1159376 3 lines instead for 18 lines 20:40
zengargoyle p6 gets installed to INSTALL/bin, modules can be installed to locations: home, site, vendor, (not sure what the bare .../perl6/bin maps to)
rakudobrew wraps those scripts and places the wrappers in a common bin directory for convienence 20:41
maybe zef does as well. but the actual scripts installed by the modules go into the home/site/vendor bin directories. 20:42
distro packagers usually do some wrapping or moving them to a common bin directory. 20:43
20:43 dct left, pmurias joined
zengargoyle basically each CUR in the REPO chain can have it's own bin directory. 20:44
pmurias tbrowder: re tight coupling, having a simple script that checks out and build or installs a proper version of moar/nqp for the given rakudo could help making as user and installing as root
tbrowder: even one to checkout should be enough 20:45
tbrowder: something like: perl tools/checkout-nqp; cd nqp; make; sudo make install 20:46
tbrowder pmurias: thnx 20:48
20:48 Ven joined, iH2O joined
pmurias note 'the tools/checkout-nqp' doesn't exit yet :) 20:48
20:48 Ven is now known as Guest87924
tbrowder roger! 20:49
20:50 epony joined
iH2O is this automatically initialized to 0 (False): my Bool @v[25]; 20:51
zengargoyle m: my Bool @v[25] is default(False); say @v[0].perl; 20:56
camelia 5===SORRY!5=== Error while compiling <tmp>
is default on shaped Array[Bool] not yet implemented. Sorry.
at <tmp>:1
------> 3my Bool @v[25] is default(False)7⏏5; say @v[0].perl;
expecting any of:
constraint
zengargoyle m: my Bool @v is default(False); say @v[0].perl;
camelia Bool::False
zengargoyle :/
iH2O great 20:57
zengargoyle m: my Bool @v is default(False); say @v[0].perl; say @v.default;
camelia Bool::False
False
zengargoyle m: my Bool @v[25] = False xx 25; say @v[0].perl; 20:59
camelia Bool::False
20:59 Element80 joined
Element80 zengargoyle: we were talking about default install instruction for Rakudo Star tho. There's no rakudobrew involved and, I'm guessing, no weird CUR setups. 20:59
zengargoyle TIMTOWTDI
Element80 m: my Bool @v[25] = False xx *; say @v[0].perl; 21:00
camelia Bool::False
zengargoyle Element80: there will still be site and vendor and home and INSTALL/bin to be in the PATH
Element80 OK 21:01
zengargoyle unless nobody ever installs modules to the system.... then i guess it's only INSTALL/bin and ~/.perl6/bin
my by-the-books install just has moar,nqp,perl6 in INSTALL/bin, zef,mi6,panda,p6doc,lwp-get etc are in INSTALL/share/perl6/site/bin 21:04
Element80 That sounds like what I usually have 21:07
zengargoyle (because i gave myself write permissions to INSTALL/**, otherwise they'd be in ~/.perl6/bin)
i do a group write+sticky to INSTALL so i can put things in one tree and rsync it between machines.... :P 21:08
panda failed at this, but zef does it just fine.
iH2O Given two variables "my Int $i=20; my Int $j=40;" I'd like to construct a pattern that will match strings in their range $i..$j, like '35' ~~ /pattern/
Element80 iH2O: why does it have to be a pattern? 21:09
iH2O ?
it's part of a larger pattern
zengargoyle m: my Int $i=20; my Int $j=40; say so 30 ~~ Range.new($i, $j);
camelia True
iH2O which i simplify here
Element80 Ah
zengargoyle m: my Int $i=20; my Int $j=40; say so 90 ~~ Range.new($i, $j); 21:10
camelia False
Element80 iH2O: /$<range>=\d+ <{ $i ≤ $<range> ≤ $j }>/
zengargoyle m: my Int $i=20; my Int $j=40; say so 90 ~~ /\d+ <?{ +$/ ~~ $i .. $j }/ 21:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Unable to parse expression in metachar:sym<assert>; couldn't find final '>'
at <tmp>:1
------> 3 say so 90 ~~ /\d+ <?{ +$/ ~~ $i .. $j }7⏏5/
expecting any of:
horizontal whitespa…
Element80 iH2O: /$<range>=[<[+-]>?\d+ [\.\d+]?] <{ $i ≤ $<range> ≤ $j }>/
zengargoyle m: my Int $i=20; my Int $j=40; say so 90 ~~ /\d+ <?{ +$/ ~~ $i .. $j }>/
camelia False
Element80 iH2O: not sure how many digital formats you wanna handle
zengargoyle m: my Int $i=20; my Int $j=40; say so 30 ~~ /\d+ <?{ +$/ ~~ $i .. $j }>/
camelia True
iH2O ideally, I'd like a pattern that matches directly the range, rather than throwing away results that don't match 21:12
aybe that requires an extra level of eval
maybe
zengargoyle -ish. :)
21:12 mr-foobar left
zengargoyle you could turn the range into a list and interpolate that, but it might get hairy for large ranges. 21:14
21:14 mr-foobar joined
zengargoyle m: my Int $i=20; my Int $j=40; my @r = ($i..$j).Array; say @r; say so "30" ~~ /@r/; 21:15
camelia [20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40]
True
zengargoyle m: my Int $i=20; my Int $j=40; my @r = ($i..$j).Array; say @r; say so "90" ~~ /@r/;
camelia [20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40]
False
Element80 :| 21:16
zengargoyle not really a good idea i think...
Element80 No, it isn't :)
21:16 Guest87924 left
zengargoyle m: my Int $i=20; my Int $j=40; my token range { \d+ <?{ +$/ ~~ $i..$j }>/; say so "30" ~~ /<range>/; 21:18
camelia 5===SORRY!5===
Unrecognized regex metacharacter / (must be quoted to match literally)
at <tmp>:1
------> 3y token range { \d+ <?{ +$/ ~~ $i..$j }>7⏏5/; say so "30" ~~ /<range>/;
Malformed regex
at <tmp>:1
------> 3 token range { \d…
Element80 still has no idea what iH2O actually wants
21:18 troys is now known as troys_
Element80 No idea what "directly the range" means 21:18
zengargoyle m: my Int $i=20; my Int $j=40; my token range { \d+ <?{ +$/ ~~ $i..$j }> }; say so "30" ~~ /<range>/; 21:19
camelia True
iH2O I have a larger pattern that include numbers from variable ($i and $j) as well as alphabetic characters together
zengargoyle i think maybe a regex like /2[0..9]|30/ 21:20
iH2O I do something like that at this moment
but I think it's patching
:)
zengargoyle i'd totally go for the range things...
21:21 pmurias left, Ven_ joined
Element80 iH2O: yeah, but what's "directly the range"? If my Int $i=20; and my Int $j=40; is "20.5" supposed to match? What about "20e0" or "+20.0e-0"? That's all "in range" as far as Perl 6 Range object is concerned. 21:22
zengargoyle or Element80's $i <= +$/ <= $j sort of thing. 21:23
Int's because $i and $j are Int. :P
iH2O I'm talking of integers only. I guess that perl6 cannot match the Integer type directly in a pattern unless a new pattern is created and recompiled with eval
Element80 huh?
I've no idea where evals come into play 21:24
Element80 gives up and goes to try to fix andthen=
iH2O :)
Element80 But so far sounds like you're premature optimizing
zengargoyle thinks the token and range and <?{ ... } things are much better than any sort of crafting a regex ala p5 21:25
a regex to match IP in p5 is hairy without the eval-ish stuff. you'll get it wrong. 21:26
iH2O yes, I think I'll stick to the simpler solution 21:27
zengargoyle remembers to wonder if Regexp::Common type stuff has a p6 module yet. ecosystem of grammars wise.
21:27 Cabanossi left 21:30 Cabanossi joined 21:31 troys_ is now known as troys 21:33 iH2O left, Ven_ left 21:35 Ven_ joined 21:36 setty1 left 21:37 uberbaud left 21:43 mr-foobar left 21:44 alimon left 21:47 mr-foobar joined 21:51 FROGGS left
Element80 m: (my $x = 42) andthen -> $a is rw { $a = $a.say }; dd $x 21:52
camelia 42
Bool $x = Bool::True
Element80 m: (my $x = 42) andthen= -> $a is rw { $a = $a.say }; dd $x
camelia Block $x = -> $a is rw { #`(Block|36689304) ... }
Element80 gives up on andthen= for now
It gets a wrong thunk so fixing it ain't a couple keypresses 21:53
/part 22:01
22:01 Element80 left
[Coke] what about doc site changes? 22:07
22:09 mr-foobar left 22:12 mr-foobar joined
AlexDaniel what changes? 22:14
[Coke]: hey, by the way 22:15
[Coke]: I think there is an easy fix for exact matches
[Coke]: right now the first entry in the search list is highlighted whenever you type something
[Coke]: just highlight the exact match and this will make things much better 22:16
e.g. you will be able to type “ord”, hit enter and it will get you to the useful link
Geth doc: ffca24bd12 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
use nbsp
22:22
doc: 8f852456f6 | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
remove trailing whitespace
doc: 9c77d5affd | (Will "Coke" Coleda)++ | doc/Language/traps.pod6
only skip-test the parts marked WRONG
22:24 bjz_ left 22:33 BenGoldberg joined
Geth doc: 0b3a800580 | (Will "Coke" Coleda)++ | doc/Language/unicode_texas.pod6
remove superfluous commas (which also cause xt/ failure)
22:34
22:35 uberbaud joined
Geth doc: 6beae1e8d6 | (Will "Coke" Coleda)++ | template/search_template.js
Allow search for '.foo', which searches for foo but only in Methods

Part of #1086
22:47
[Coke] ^^ with that, a search for '.sin' will find the sink method, but not the sin sub. 22:48
seatek resolves that despite emotional trauma, "_" should remain "_" and not converted to "-" when refactoring from p5 22:51
AlexDaniel seatek: why? 22:53
seatek because there are just too many all over the place, and you can never get them all 22:54
my hands have memory muscle now even
Juerd So we build entire worlds but we can't rename variables? :)
seatek let them eat cake ;) 22:55
22:58 cpage__ left, cpage__ joined
Juerd I want to have a vim extension to rename variables. Damian Conway wrote a script, but it doesn't do lexical scoping 22:58
So the script isn't really useful for what I'm running into: inherited projects, where the same variable names are used for different concepts. 22:59
But I don't want it badly enough to build it myself :)
It'd take a year...
seatek it can get so tangled. and then it's that question... a year sounds to me like you should jsut do it by hand ;) 23:01
and then there's updating the DOCS. no more conversions of _ to - for me.
i'll just have pretty new code, or hideous dilapedated code - and i won't have to wonder any more 23:02
23:02 b2gills joined 23:05 Ven_ left
raschipi Yeah, if it's not possible to just do a s/ol_d/ne-w/g I wouldn't bother renaming either. 23:07
seatek one of the nice things about refactoring is that you can discover bugs you never knew you had. for years. 23:08
i don't know how i've survived
23:13 travis-ci joined
travis-ci Doc build errored. Will "Coke" Coleda 'only skip-test the parts marked WRONG' 23:13
travis-ci.org/perl6/doc/builds/250549650 github.com/perl6/doc/compare/93499...77d5affd8c
23:13 travis-ci left
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 23:13
zengargoyle Juerd: i wonder if DC's rename thing could be hacked to work on a visual (or otherwise specified) range of lines? 23:15
23:15 uberbaud left
seatek maybe he could add in converting attributes from moose to p6, ->attr($thing) to attr = $thing with some smart way to differentiate between method calls 23:18
zengargoyle Juerd: it already does just work on a Visual!
Juerd zengargoyle: So it says in the source but I can't gather *how*. Do you know? 23:19
23:20 ufobat left
seatek see it would be easier to take the year and write your own ;) 23:20
23:24 travis-ci joined
travis-ci Doc build errored. Will "Coke" Coleda 'remove superfluous commas (which also cause xt/ failure)' 23:24
travis-ci.org/perl6/doc/builds/250553530 github.com/perl6/doc/compare/9c77d...3a80058092
23:24 travis-ci left
buggable [travis build above] ✓ All failures are due to timeout (1), missing build log (0), GitHub connectivity (0), or failed make test (0). 23:24
23:24 travis-ci joined
travis-ci Doc build passed. Will "Coke" Coleda 'Allow search for '.foo', which searches for foo but only in Methods 23:24
travis-ci.org/perl6/doc/builds/250557301 github.com/perl6/doc/compare/0b3a8...eae1e8d60a
23:24 travis-ci left 23:25 epony left
zengargoyle Juerd: it seems you have to arrange that your cursor is on the variable withing the visual range. so select a first line, Shift-V down to the last line with the var in it and h/j so cursor is in variable, then 'cv' prompts to change in Visual Block. 23:26
Juerd: acutally, that's from the year old DC vim talk, so maybe older version of the plugin... i haven't re-upped this years vim+perl talk/tarball yet. 23:28
23:30 mr-foobar left
zengargoyle Juerd: you can also have cursor in variable and do like :.,+12 call TPV_rename_perl_var('visual') 23:30
there's basically a 'normal' mode that does the whole file and a 'visual' mode that does a range. an extra function with a shorter name would be nice for the range case.... 23:32
23:33 mr-foobar joined 23:36 epony joined 23:38 espadrine left
raschipi One could take the time to fix the problem of reusing variable names in different scopes. 23:41
23:43 Cabanossi left
zengargoyle heh. :cmap cv :call TPV_rename_perl_var ('visual') -- :.,+10 cv<RET> 23:44
23:45 Cabanossi joined 23:55 nadim_ left
zengargoyle Juerd: aha, you can also do somethingn like: goto first line, 'ma' to set mark-a, goto last line, 'mb' to set mark-b, move cursor to variable, :'a,'b cv<RET> (assuming earlier cmap is in place) 23:56
23:59 mr-foobar left