Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-07-26

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 BenGoldberg r: say nqp::rand_I(2, Int) xx 40
00:02 camelia rakudo-jvm a6b2af: OUTPUT«(timeout)»
00:02 camelia ..rakudo-parrot a6b2af: OUTPUT«0 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 0 0 1 0 1 0 1 1␤»
00:02 camelia ..rakudo-moar a6b2af: OUTPUT«0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 1 0 0 0 0 0␤»
00:02 timotimo yeah, that seems more healthy
00:03 carlin linux has a sane rand() it seems
00:04 carlin so the fix for this would be for moar to use something like arc4random on openbsd instead of rand ?
00:07 BenGoldberg Personally, I think it would be good if the random sequence were entirely pluggable.  Let the user set $*RANDOM or whatever to some object which supplies random numbers, and have rand() and srand() call methods on that object.
00:08 noganex joined #perl6
00:08 timotimo that would be nice, but it's not that easy to plug into the tommath pieces
00:09 ssutch joined #perl6
00:09 timotimo though we could certainly have something on moarvm that registers two callables that would just "do it for you"; but that would make those big int ops invokey ... hmm.
00:11 chenryn joined #perl6
00:13 rurban1 joined #perl6
00:18 Psyche^ joined #perl6
00:19 carlin > say nqp::rand_I(2, Int) xx 40
00:19 carlin 0 0 0 1 0 1 1 0 0 1 0 0 1 1 1 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0
00:19 carlin ^ using random() instead of rand()
00:20 carlin I'm glad for the spetest that caught this, digging through moar's source to see what was going on has been an interesting adventure
00:28 itz_ oh anyone who hasn't seen tig(1) - ncurses based git log viewer its quite nice
00:31 ssutch joined #perl6
00:51 thou joined #perl6
01:05 nbrown joined #perl6
01:08 FROGGS_ joined #perl6
01:29 timotimo yup, it's pretty neat
01:31 * grondilu noticed a clear decrease in performance after update today
01:31 grondilu This is perl6 version 2014.07-44-ga6b2af7 built on MoarVM version 2014.07-15-gb6a4250
01:32 timotimo oh?
01:33 timotimo give us more details?
01:42 timotimo can you also look at the git reflog and see what revisions you had built before that?
01:44 jack_rabbit joined #perl6
01:44 colomon itz_: agreed, I've been using tig for about a month now, and I love it.
01:44 grondilu timotimo: I often try something like say [+] rand xx 100_000 and today it took twice as long
01:44 grondilu though to be honest I should check that there is not something wrong on my PC.  I suspect there is.
01:44 timotimo part of me hopes there is, part of me hopes there isn't ;)
01:44 grondilu so if the decrease in perf is not confirmed by something else, I'll blame my computer.
01:47 grondilu s/something/someone/
01:49 rjbs- TimToady: http://www.nntp.perl.org/group/perl.perl5.porters/2014/07/msg218145.html ;)
01:50 klapperl_ joined #perl6
02:05 Util joined #perl6
02:08 Util Just released: http://hpmor.com/chapter/102
02:12 noganex joined #perl6
02:13 ssutch joined #perl6
02:17 ventica joined #perl6
02:20 rurban1 joined #perl6
02:27 gtodd say nqp::rand_I(2, Int) xx 40
02:27 gtodd oopsi
02:27 gtodd e
02:39 thou joined #perl6
03:06 jack_rabbit I've been looking, but I can't seem to find documentation on what exactly '>>' means in this context. I think I understand what it does, but can't find any docs: ["hello", "world"]>>.substr(1);
03:11 BenGoldberg m: ["hello", "world"]>>.substr(1);
03:11 camelia rakudo-moar 506aae: ( no output )
03:11 BenGoldberg m: ["hello", "world"]>>.substr(1).say;
03:11 camelia rakudo-moar 506aae: OUTPUT«ello orld␤»
03:12 chenryn joined #perl6
03:15 jack_rabbit m: my @arr = ["hello", "world"]>>.substr(1); say @arr;
03:15 camelia rakudo-moar 506aae: OUTPUT«ello orld␤»
03:16 gtodd oh my problem is the ChoHag problem described here: http://irclog.perlgeek.de/perl6/2014-06-10 ... parrot  dynacall -fPIC etc etc
03:19 gtodd ermm dyncall that is ...
03:19 Util jack_rabbit: see http://perlcabal.org/syn/S03.html#Unary_hyper_operators , but the better examples are further down, after:
03:19 Util "When using a unary operator" ...
03:19 gtodd ChoHag: from the look of that log it was a frustrating morning ;-\    how did you fix it ?  get dyncall to build with -fPIC? or ....
03:21 rurban1 joined #perl6
03:22 Util jack_rabbit: LIST>>.method  is the same as map { .method }, LIST , but without the surety of execution order. (Result order *is* assured, though).
03:22 jack_rabbit Util, thanks!
03:22 jack_rabbit I'll read that.
03:24 Util jack_rabbit: yw
03:27 gtodd ChoHag: only asking asking since my rakudo won't build issue seems similar to yours   http://paste.scsys.co.uk/409550?tx=on&submit=Format+it%21   down to the  FreeBSD/clang and dyncall ... parrot builds on its own but perl6-p won't
03:31 gtodd seems the conclusion back then (June) was that "the version of dyncall bundled with nqp for the parrot backend is out of date"
03:35 hoverboard joined #perl6
04:00 Akagi201 joined #perl6
04:01 ventica_desktop joined #perl6
04:07 Akagi201 joined #perl6
04:11 Akagi201 joined #perl6
04:11 ssutch joined #perl6
04:14 ssutch joined #perl6
04:18 ventica_desktop m: my @a = 'a' .. *; say @a[290];
04:18 camelia rakudo-moar 506aae: OUTPUT«ke␤»
04:19 ventica_desktop hrm ... i see what u did there...
04:19 ventica_desktop m: my @a = 'A' .. *; say @a[290];
04:19 camelia rakudo-moar 506aae: OUTPUT«KE␤»
04:19 ventica_desktop mhmm
04:19 ventica_desktop m: my @a = '1' .. *; say @a[290];
04:19 camelia rakudo-moar 506aae: OUTPUT«291␤»
04:19 ventica_desktop m: my @a = '!' .. *; say @a[290];
04:19 camelia rakudo-moar 506aae: OUTPUT«!␤»
04:19 ventica_desktop hmmm
04:19 ventica_desktop interesting
04:20 ventica_desktop very DWIMmy
04:20 ventica_desktop right on the border of too DWIMmy :P
04:25 xiaomiao joined #perl6
04:27 rindolf joined #perl6
04:28 thou joined #perl6
04:37 robinsmidsrod joined #perl6
04:41 gamo joined #perl6
04:41 gamo Hi. Is rakudo star usable?
04:42 ventica_desktop m: my $usable=1; say "Rakudo Star is usable" if ($usable);
04:42 camelia rakudo-moar 506aae: OUTPUT«Rakudo Star is usable␤»
04:43 gamo tahnks. About how is the speed of the compiled programs?
04:45 rindolf Hi all.
04:45 ventica_desktop Depends on the backend and depends on what you're trying to run. I think all the basic operators and "normal" code (Perl5-like or C-like code) are respectably fast
04:45 ventica_desktop o/
04:46 gamo But perl5 and C are much different
04:46 * ventica_desktop mumbles something about a Perl 6 web toy in light of the latest inquiries...
04:47 ventica_desktop gamo: Indeed. I just mean all the straightforward operators, function calls, basic I/O, etc.
04:47 ventica_desktop It's mostly done and perf is respectable
04:48 ventica_desktop m: my @array = 1..10; say @array; #basic stuff works and is not slow at all
04:48 camelia rakudo-moar 506aae: OUTPUT«1 2 3 4 5 6 7 8 9 10␤»
04:50 gamo ok
04:52 gamo I will ask about a package for ubuntu, for not screwing up perl5
04:52 ventica_desktop u mean u think perl 6 will screw up perl 5?
04:52 gamo yes
04:53 ventica_desktop i don't see why it would affect perl 5 at all...
04:53 grondilu the executable is different, for a start.
04:53 ventica_desktop perl 6 is not literally perl 6.0, as in, an upgrade of the latest perl 5.whatever
04:54 gamo I don't know how is ubuntuish thing in either case
04:54 grondilu there already is a rakudo package on debian sid
04:54 grondilu so it's probably not too hard to use it on ubuntu
04:54 gamo it's older than april version
04:55 grondilu well, yeah, if you want the lastest (and you do), it's not perfect.
04:55 grondilu s/lastest/latest/
04:55 ventica_desktop .oO(What is perfect?)
04:56 ChoHag gtodd: dyncall needs -fPIC
04:56 ChoHag ISTR compiling it by hand.
04:57 Akagi201 joined #perl6
05:00 rurban1 joined #perl6
05:06 xinming gamo: perl6 and perl5 are both great, They both worth learning, and I belive even perl 6 is out, perl 5 and perl 6 will coexist for a long time.
05:06 ventica_desktop m: my @arr=1..10; say [+] @arr;
05:06 camelia rakudo-moar 506aae: OUTPUT«55␤»
05:07 xinming perl 6 won't affect perl 5 much, perl 5 is still adopting new features from perl 6 with minimal change on the language itself.
05:08 ventica_desktop my @arr=1..10; say [<] @arr;
05:08 ventica_desktop m: my @arr=1..10; say [<] @arr; #derp
05:08 camelia rakudo-moar 506aae: OUTPUT«True␤»
05:08 ventica_desktop m: my @arr=1..10,9; say [<] @arr;
05:08 camelia rakudo-moar 506aae: OUTPUT«False␤»
05:11 * ventica_desktop thinks the meta-cross should die...
05:11 ventica_desktop my @arr='a'xx5; say @arr;
05:12 ventica_desktop m: my @arr='a'xx5; say @arr; #sigh
05:12 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/A8mf1vxzGQâ�¤Two terms in a rowâ�¤at /tmp/A8mf1vxzGQ:1â�¤------> [32mmy @arr='a'[33mâ��[31mxx5; say @arr; #sigh[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤        inf…»
05:12 ventica_desktop m: my @arr='a' xx 5; say @arr; #sigh
05:12 camelia rakudo-moar 506aae: OUTPUT«a a a a a␤»
05:12 ventica_desktop i see why... but... :\
05:13 ventica_desktop m: my @arr='a' xx 5; say [eq] @arr;
05:13 camelia rakudo-moar 506aae: OUTPUT«True␤»
05:13 ventica_desktop m: my @arr='a' xx 5,'b'; say [eq] @arr;
05:13 camelia rakudo-moar 506aae: OUTPUT«False␤»
05:14 ventica_desktop m: my @arr='a' xx 5,'b'; say [.] @arr;
05:14 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/C1KttihNzd�Unsupported use of . to concatenate strings; in Perl 6 please use ~�at /tmp/C1KttihNzd:1�------> [32mmy @arr='a' xx 5,'b'; say [.][33m�[31m @arr;[0m�»
05:14 ventica_desktop oops
05:14 ventica_desktop m: my @arr='a' xx 5,'b'; say [~] @arr;
05:14 camelia rakudo-moar 506aae: OUTPUT«aaaaab␤»
05:14 ventica_desktop yummy
05:19 gamo thanks, xinming
05:20 kaare__ joined #perl6
05:22 ventica_desktop m: say ([X] (1,2),(3,4),(5,6)).tree # help!
05:22 camelia rakudo-moar 506aae: OUTPUT«1 3 5 1 3 6 1 4 5 1 4 6 2 3 5 2 3 6 2 4 5 2 4 6␤»
05:23 ventica_desktop i assume it got flattened before the outer parens got ahold of it..
05:26 Timbus m: say ([X] (1,2),(3,4),(5,6)).tree.perl
05:26 camelia rakudo-moar 506aae: OUTPUT«([1, 3, 5], [1, 3, 6], [1, 4, 5], [1, 4, 6], [2, 3, 5], [2, 3, 6], [2, 4, 5], [2, 4, 6]).list␤»
05:26 ventica_desktop hrmmm O.o
05:27 ventica_desktop ok, i get it
05:27 ventica_desktop m: my @a = ([X] (1,2),(3,4),(5,6)).tree; say @a[0];
05:27 camelia rakudo-moar 506aae: OUTPUT«1 3 5␤»
05:27 ventica_desktop there we go
05:28 ventica_desktop m: my @a = ([X] (1,2),(3,4),(5,6)); say @a[0];
05:28 camelia rakudo-moar 506aae: OUTPUT«1␤»
05:28 ventica_desktop correcto
05:28 ventica_desktop in other words [X] is transpose
05:28 ventica_desktop as long as you put .tree suffix
05:29 Timbus or.. hm
05:29 Timbus m: say ([X] (1,2),(3,4),(5,6)).lol.perl
05:29 camelia rakudo-moar 506aae: OUTPUT«LoL.new(ListIter.new())␤»
05:29 Timbus nevermind
05:29 ventica_desktop no, ur right its not
05:32 Timbus use it to generate.. probability trees or something..
05:32 ventica_desktop yeah, it's a cross-product with shape preserved
05:32 Timbus m: say ([\X] (1,2),(3,4),(5,6)).tree.perl
05:32 camelia rakudo-moar 506aae: OUTPUT«((1,), [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5], [1, 2, 3, 4, 5, 6]).list␤»
05:33 Timbus woa
05:33 ventica_desktop haha
05:34 cognome joined #perl6
05:36 ventica_desktop m: my @m = (1,2,3), (4,5,6); my @t; for ^@m X ^@m[0] -> $x, $y { @t[$y][$x] = @m[$x][$y] }; say @t.tree;
05:36 camelia rakudo-moar 506aae: OUTPUT«1 2 3 4 5 6␤»
05:36 ventica_desktop RosettaCode lied! >:-(
05:37 rurban1 joined #perl6
05:37 ventica_desktop m: my @m = (1,2,3), (4,5,6); my @t; for ^@m X ^@m[0] -> $x, $y { @t[$y][$x] = @m[$x][$y] }; say @t.tree.perl;
05:37 camelia rakudo-moar 506aae: OUTPUT«([1, 2, 3, 4, 5, 6],).list␤»
05:52 xinming joined #perl6
06:01 cognome joined #perl6
06:16 thou joined #perl6
06:20 rindolf joined #perl6
06:20 fling joined #perl6
06:20 fling Hello.
06:29 woolfy joined #perl6
06:33 ssutch joined #perl6
06:35 figoe joined #perl6
06:38 rurban1 joined #perl6
06:38 hoverboard joined #perl6
06:51 gfldex joined #perl6
07:02 ssutch joined #perl6
07:15 ssutch joined #perl6
07:22 lizmat joined #perl6
07:22 cognominal joined #perl6
07:25 darutoko joined #perl6
07:31 Alula_ joined #perl6
07:33 timotimo hi
07:33 Woodi o/
07:34 timotimo i wonder what ventica's problem with meta-cross is
07:34 rindolf joined #perl6
07:37 woolfy left #perl6
07:38 rurban1 joined #perl6
07:39 FROGGS[mobile] joined #perl6
07:39 Woodi um, could it be used to simulate SQL joins ? free CPU cycles on backends :)
07:41 FROGGS[mobile] m: say "ba,a,a,aabbb" ~~ / a ** { 2..5 } % "," /
07:41 camelia rakudo-moar 506aae: OUTPUT«「a,a,a,a」␤␤»
07:41 FROGGS[mobile] \o/
07:41 timotimo yays again
07:42 FROGGS[mobile] well, last time I broke the build
07:45 FROGGS[mobile] ahh, I need to push the unfudged spectests
08:04 thou joined #perl6
08:09 SamuraiJack__ joined #perl6
08:12 dalek roast: d90cfb6 | (Tobias Leich)++ | S05-m (2 files):
08:12 dalek roast: RT #121306 unfudge tests about /a**{}/
08:12 dalek roast: review: https://github.com/perl6/roast/commit/d90cfb61f0
08:12 synopsebot Link: https://rt.perl.org/rt3//Public/Bug/Display.html?id=121306
08:15 ssutch joined #perl6
08:20 vendethiel o/
08:25 xinming_ joined #perl6
08:29 SamuraiJack__ joined #perl6
08:30 TimToady [Coke], masak: re http://irclog.perlgeek.de/perl6/2014-07-20#i_9053071 the 0 behavior is defined in S03:562
08:30 synopsebot Link: http://perlcabal.org/syn/S03.html#line_562
08:37 masak good antenoon, #perl6
08:38 sergot hi o/
08:38 jack_rabbit joined #perl6
08:39 rurban1 joined #perl6
08:42 noganex joined #perl6
08:43 itz_ why does $*DISTRO exist? seems a little linux specific?
08:45 SamuraiJack joined #perl6
08:46 itz_ I suppose pragmatically it probably does make things easier since they are so different
08:48 kivutar joined #perl6
08:48 masak TimToady: ah, then that spectest was actually correct.
08:49 masak [Coke]: ^
08:52 Ven joined #perl6
09:08 avuserow hi all. I've taken a stab at summarizing (what I believe to be) the important rakudo changes since the previous star release, so please check out the release notes and offer feedback
09:08 avuserow https://github.com/avuserow/star/blob/78b93e443f7a39e1ce17d204519caaa1effa8b9c/docs/announce/2014.07.md
09:08 mr-foobar joined #perl6
09:09 avuserow also I've decided to upload a RC1 for testing. there is one module failing for parrot (and many for JVM). You can get this at https://www.dropbox.com/s/qrx89mnavx7euee/rakudo-star-2014.07-RC1.tar.gz
09:10 itz_ avuserow: I was experimenting with * builds last night and will take a look
09:10 avuserow when I get back online today, I'll have the core dump for the parrot failure in jsonrpc, and I'll see about filing the bug. I'm not sure whether that is a blocker or not but we do have time in which to look at it
09:12 avuserow also let me know if there is a better place for uploading stuff than dropbox. I don't have webspace handy at the moment, and wasn't sure if I could make github serve it without putting it in the git repo
09:16 ssutch joined #perl6
09:19 FROGGS_ itz_: well, we need to provide a superset of needed information, not a subset
09:20 FROGGS_ avuserow: I know more about the jsonrpc failure...
09:20 itz_ avuserow: there are minor issues with p6doc .. for a start it doesn't work :) eval -> EVAL needed (I opened an issue about it)
09:22 itz_ neither does the example in the help work .. it's now "Type/Str"
09:27 FROGGS_ itz: can you file a PR?
09:28 itz I filed a PR for the first issue not the second
09:28 itz Actually I'll just do a pull request
09:29 FROGGS_ itz++
09:29 FROGGS_ then we just need to bug the commit bit holder(s)
09:37 dmol joined #perl6
09:39 tgt joined #perl6
09:40 rurban1 joined #perl6
09:41 itz the Str thing is odd . may be a * path build issue
09:43 spider-mario joined #perl6
09:45 itz https://github.com/perl6/doc/pull/24
09:47 itz hmm no not * specific
09:53 thou joined #perl6
09:53 rindolf joined #perl6
09:55 tgt Hi. Is there a nice way to write a grammar that will match a set of tokens once each, but not care about the order?
09:55 tgt A very simplified example could be checking that a string only contains one occurance of each of a, b and c, whilst not caring about the order.
09:58 itz d'uh Type::Str would be better
09:58 itz need coffee
10:00 tgt [<a> | <b> | <c>]*, but with the added constraint that once a token has been matched it can't be matched again.
10:12 FROGGS_ m: say "acbdefaefbc".match(/ ( a | b | c ) /, :g).list>>[0]>>.Str.uniq # tgt: is that an option?
10:12 camelia rakudo-moar 506aae: OUTPUT«a c b␤»
10:17 ssutch joined #perl6
10:20 tgt The important thing is that it fails to match if the token is found multiple times. My current grammar is https://gist.github.com/tgt/f8b6c57675938b702f2c
10:20 FROGGS_ yeah, I thaught so ...
10:20 hoverboard joined #perl6
10:21 FROGGS_ m: my @a = <a b c>; say "abc" ~~ / | @a / # that might be interesting for you
10:21 camelia rakudo-moar 506aae: OUTPUT«「a」␤␤»
10:22 FROGGS_ with the | bar before the array it will also do LTM
10:22 FROGGS_ without the | bar or with || it will match sequentially
10:23 psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; # been fiddling with something like this, but it doesn't quite work
10:23 camelia rakudo-moar 506aae: OUTPUT«「aabc」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
10:23 psch because im treating $/ wrong in the regex, clearly
10:23 psch but .Bag doesn't do what it'd need there either
10:24 psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $x
10:24 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/w2KmCMV0Wwâ�¤Variable '$x' is not declaredâ�¤at /tmp/w2KmCMV0Ww:1â�¤------> [32m $ /; say "aabc" ~~ $rx; say "abc" ~~ $x[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
10:24 psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $rx
10:24 camelia rakudo-moar 506aae: OUTPUT«「aabc」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
10:24 psch :/
10:25 FROGGS_ m: my %found; my @a = <a b c>; say "acbdefaefcb".match(/ <found={ (@a (-) %found.keys).list }> { %found{$<found>} = 1 } /, :g).list
10:25 camelia rakudo-moar 506aae: OUTPUT«「a」␤ found => 「a」␤ 「c」␤ found => 「c」␤ 「b」␤ found => 「b」␤ 「a」␤ found => 「a」␤ 「c」␤ found => 「c」␤ 「b」␤ found => 「b」␤␤»
10:25 FROGGS_ hmmm
10:25 psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.values.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $rx
10:25 camelia rakudo-moar 506aae: OUTPUT«「aabc」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
10:30 * psch just noticed he left that array declared
10:36 FROGGS_ m: my %found; my @a = <a b c>; "aa" ~~ m:g/ (<{ say %found.keys; say(set(<a b c>) (-) set(%found.keys)); (@a (-) %found.keys).list }>) { %found{~$0}++ } /; say %found
10:36 camelia rakudo-moar 506aae: OUTPUT«Nil␤set(a, b, c)␤a␤set(a, b, c)␤a␤set(a, b, c)␤("a" => 2).hash␤»
10:36 FROGGS_ I don't get it
10:36 psch m: my $rx = / (.)+! <!{ $0.values>>.Str.Bag.grep: { $^a.values > 1 } }> /; say "aabc" ~~ $rx; say "abc" ~~ $rx
10:36 camelia rakudo-moar 506aae: OUTPUT«「c」␤ 0 => 「c」␤␤「c」␤ 0 => 「c」␤␤»
10:36 psch i think i want that to work :P
10:36 psch haha
10:37 FROGGS_ after the first match there is an "a" in %found, but the set operation returns still a b c
10:37 moritz oh hai
10:37 FROGGS_ hi moritz
10:37 psch hi moritz
10:37 moritz I've now implemented the changes to the "owners" team on github
10:38 moritz which means that masak++, FROGGS_++ and timotimo++ are now in there, and sorear++ is gone
10:38 psch m: my $rx = / ^ (.)+! <!{ $0.values>>.Str.Bag.pairs.grep: { $^a.value > 1 } }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $rx  # !!
10:38 camelia rakudo-moar 506aae: OUTPUT«Nil␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
10:38 psch tgt: that does it, apparently
10:38 FROGGS_ thanks moritz
10:38 psch first match gives Nil, second gives the Match
10:42 rurban1 joined #perl6
10:43 Ven joined #perl6
10:43 tgt Interesting, thanks. I'll see what I can do with that.
10:44 psch of note might be that dropping the anchors only gives you a connected substring that has no duplicates
10:46 tgt Is there a way to disable parts of a grammar? (e.g. in the gist I posted above I'd like to be able to disable the unknown-tag rule if I passed :strict to the grammar.)
10:50 psch you could make the rule never match if some $strict is set, similarly to what i did above
10:51 psch but i don't think you can actually remove the rule from the grammar
10:51 FROGGS_ tgt: put these tokens in a role, and mix it in conditionally
10:52 tgt Aha, good idea. Thanks for your help psch and FROGGS_ :)
11:01 Ven joined #perl6
11:18 ssutch joined #perl6
11:18 itz linus doesn't seem to like gcc 4.9 (new in debian sid)!
11:20 Woodi yea, just learned that too... https://lkml.org/lkml/2014/7/24/584
11:20 Woodi also spotted libressl today :)
11:24 Woodi btw. Marcus Ranum years ago was making jokes about ppls going mad when OpenSSH patch was released, eg. ppls leaving conference rooms in hurry :)
11:29 * grondilu is confused as it so happens he's currently upgrading his debian sid system and there is gcc 4.9 :/
11:30 itz I'm just trying gcc 4.9 with rakudobrew and it looks OK to me so far
11:30 BinGOs apt-get install clang-3.4 # problem solved
11:32 Woodi Linus was talking about in-kernel special code or something. and probablly 4.9 is passing their test :)
11:32 Woodi *tests
11:33 BinGOs you could go the whole hog and install FreeBSD 10, then not worry about a shitty compiler or shitty kernel :)
11:34 Woodi BinGOs: but dpkg/apt/aptitude is perfect !
11:35 BinGOs except on debian kfreebsd port it isn't
11:35 Woodi when you have problem then scratch thing you changed lastly ;)
11:36 BinGOs I have to alias apt-get to apt-get -o Dpkg::Use-Pty=False
11:36 itz why not just use aptitude?
11:36 ssutch joined #perl6
11:36 BinGOs otherwise Bad Things™ happen
11:37 itz specifically on kfreebsd?
11:37 BinGOs aptitude will use dpkg still no?
11:37 Woodi BinGOs: what is correct, native equivalent of ap* on FreeBSD ?
11:37 BinGOs yes, it is kfreebsd specific
11:37 BinGOs Woodi: pkg
11:37 Woodi everything is use dpkg ?
11:38 itz I use pkgsrc on linux which is sort of kfreebsd in reverse :)
11:38 BinGOs well it is known as pkgng
11:38 Woodi *using
11:38 BinGOs I tend to use ports versus binary packages
11:38 ssutch_ joined #perl6
11:39 BinGOs gcc version 4.9.1 (Debian 4.9.1-2) Target: x86_64-kfreebsd-gnu :(
11:40 itz is dtrace in the nonfree repos?
11:40 BinGOs for which platform are we talking now?
11:41 itz kfreebsd
11:41 thou joined #perl6
11:42 BinGOs I haven't got nonfree in my sources.list
11:42 BinGOs and apt-cache search dtrace doesn't find it.
11:42 BinGOs it's /usr/sbin/dtrace on my FreeBSD 10 box.
11:42 Woodi found in systemtap-sdt-dev
11:42 rurban1 joined #perl6
11:43 itz via apt-cache find strace?
11:43 itz errr
11:43 itz via apt-file find strace? even
11:46 Woodi "apt s dtrace" :)
11:46 mr-foobar joined #perl6
11:47 Woodi sid main probably
11:47 BinGOs no strace.
11:47 BinGOs You can install ktrace though
11:50 itz oh I have a JSON::Tiny test failure with moar and gcc 4.9
11:50 itz wonder if that's related
11:51 BinGOs right, set off the update of 44 CPAN tester perls, going to hang the laundry out.
11:55 Ven joined #perl6
12:43 rurban1 joined #perl6
12:50 denis_boyun joined #perl6
12:52 nbrown joined #perl6
12:56 kivutar joined #perl6
13:21 FROGGS_ avuserow: your RC builds parrot 6.5.0 when it should build 6.6.0
13:29 thou joined #perl6
13:43 dalek doc: a6270f3 | (Steve Mynott)++ | bin/p6doc:
13:43 dalek doc: eval to EVAL to fix p6doc
13:43 dalek doc: review: https://github.com/perl6/doc/commit/a6270f3da2
13:43 dalek doc: de171af | (Steve Mynott)++ | / (2 files):
13:43 dalek doc: Str has moved under Type - fix docs and example
13:43 dalek doc: review: https://github.com/perl6/doc/commit/de171afb1b
13:43 dalek doc: a869400 | (Steve Mynott)++ | / (2 files):
13:43 dalek doc: Str has moved under Type - fix docs and example better
13:43 dalek doc: review: https://github.com/perl6/doc/commit/a869400e95
13:43 dalek doc: b9e3791 | (Tobias Leich)++ | / (2 files):
13:43 dalek doc: Merge pull request #24 from stmuk/master
13:43 dalek doc:
13:43 dalek doc: fix 1 reported issue with p6doc eval breakage and fix p6doc under star
13:43 dalek doc: review: https://github.com/perl6/doc/commit/b9e3791444
13:44 rurban1 joined #perl6
13:44 kivutar joined #perl6
13:47 * moritz gives stmuk aka Steve Mynott push acccess
13:51 FROGGS_ (aka itz)
13:52 moritz itz++
13:54 kurahaupo joined #perl6
13:58 moritz Juerd: feather is Xen, right?
14:14 beastd joined #perl6
14:14 pmurias_ joined #perl6
14:15 pmurias hi
14:15 pmurias why does nqp-moar use a incorrect sub MAIN signature?
14:17 FROGGS_ pmurias: what do you mean?
14:17 FROGGS_ # XXX FIX ME
14:17 FROGGS_ sub MAIN(@ARGS) {
14:17 FROGGS_ ?
14:18 moritz should be *@ARGS I guess
14:18 moritz but I guess that nqp is less fancy than real Perl 6, and simply passes the arguments in as a single array
14:21 pmurias FROGGS_: yes
14:21 pmurias it's inconsitent across backends
14:22 moritz j: say 42
14:22 camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
14:22 Ven joined #perl6
14:23 moritz j: say 23
14:23 camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
14:24 FROGGS_ pmurias: you can try to change it... I'm not sure if it still needs to be that way
14:25 moritz j: say 1
14:25 camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
14:26 moritz j is now officially borked. I've restarted the evalserver twice, and it still spooks around.
14:26 Ven 2spooky
14:29 moritz I've started to create https://github.com/perl6/infrastructure-doc . Patches and feedback welcome!
14:29 moritz tadzik: ^^ it would be nice if you could document the panda meta data server there
14:31 moritz colomon: ^^ it would be nice if you could document the emmentaler setup there
14:31 dalek nqp-js: 4c31fee | (Pawel Murias)++ | / (5 files):
14:31 dalek nqp-js: Cross compile more of the compiler.
14:31 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/4c31feedc9
14:32 FROGGS_ ohh!
14:32 FROGGS_ pmurias++
14:43 pmurias it's not yet the whole thing ;)
14:44 zakharyas joined #perl6
14:45 rurban1 joined #perl6
14:45 tadzik moritz: will do
14:46 tadzik moritz++
14:49 denis_boyun joined #perl6
15:09 [Coke] pmurias++ !!
15:11 dalek rakudo-star-daily: 6204311 | coke++ | log/ (14 files):
15:11 dalek rakudo-star-daily: today (automated commit)
15:11 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/6204311240
15:11 dalek perl6-roast-data: e1735ca | coke++ | / (5 files):
15:11 dalek perl6-roast-data: today (automated commit)
15:11 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/e1735cac9e
15:17 thou joined #perl6
15:22 xenoterracide_ joined #perl6
15:25 xfix joined #perl6
15:25 xfix joined #perl6
15:25 ab5tract joined #perl6
15:27 ab5tract hey folks. i was wondering whether there is an idiomatic way to get the current index value while iterating over an array using a for loop
15:27 Ven ab5tract: for @a.kv -> $k, $v { say $k, $v }
15:28 ab5tract thanks Ven. in retrospect that is pretty obvious :)
15:28 psch an alternative would be using loop instead of for, if the index matters to you anyway
15:28 psch although i'd probably go with Ven's solution as well
15:30 rurban1 joined #perl6
15:30 * Ven doesn't want to hear of c-like for loops ever again :)
15:30 Ven we're in 2014, it's pretty terrible we're still teaching them
15:30 psch hey, i'm not advocating it, i'm just saying it exists :P
15:31 slavik joined #perl6
15:31 ab5tract my specific use case is the (probably relatively common one) of keeping track of the line number while for'ing over it
15:31 ab5tract it being the list in $fh.IO.lines
15:32 ab5tract so using .kv is <3
15:33 BenGoldberg joined #perl6
15:35 psch there is $fh.ins, which replaces $.
15:35 psch m: for lines() { .say; last if $*IN.ins() > 2 }
15:35 camelia rakudo-moar 506aae: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤I mo dhiaidh bhí gleanntáin ghlas’ G…»
15:35 * psch wonders how long lines are in camelias STDIN
15:37 psch ab5tract: that's S28:187, fyi
15:37 synopsebot Link: http://perlcabal.org/syn/S28.html#line_187
15:37 timotimo m: lines>>.chars.Bag.say
15:37 camelia rakudo-moar 506aae: OUTPUT«bag(50, 70, 74, 78(2), 0(3), 72, 65(3), 84, 62, 64(2), 46, 37, 67, 73)␤»
15:37 timotimo psch: -^
15:37 psch timotimo: neat, so the s/\n/{ whatever that unicode symbol is}/ screwed me over there?
15:38 timotimo er, i don't know?
15:38 timotimo i don't know what ins() does
15:38 BenGoldberg m: for lines() { $*.ins().say }
15:38 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/i7sEpaMB86â�¤Unsupported use of $* variable; in Perl 6 please use ^^ and $$â�¤at /tmp/i7sEpaMB86:1â�¤------> [32mfor lines() { [33mâ��[31m$*.ins().say }[0mâ�¤    expecting any of:â�¤        stat…»
15:38 timotimo heh.
15:39 BenGoldberg m: for lines() { $*IN.ins().say }
15:39 camelia rakudo-moar 506aae: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
15:39 psch well, it works locally :)
15:39 psch timotimo: $fh.ins() does what $. did in perl5, which is "current line number for the last file handle accessed"
15:40 psch apparently not quite in some cases :)
15:40 timotimo i've never done any perl5 :)
15:40 BenGoldberg Well, if lines() reads the whole file (due to something being too eager), we reach the EOF and then (perhaps) the line number gets reset.
15:41 xfix r: https://gist.github.com/xfix/eac92872f14546c90996
15:41 camelia rakudo-{parrot,jvm,moar} 506aae: OUTPUT«gist not found»
15:41 xfix orly?
15:41 xfix Hm, so it fails because KeySet was removed.
15:42 psch BenGoldberg: locally, even closing the handle doesn't reset .ins()
15:42 xfix What is KeySet these days?
15:42 BenGoldberg Ehh, beats me, then :)
15:43 xfix SetHash.
15:43 timotimo could be SetHash or MixHash
15:43 xfix Thanks.
15:43 timotimo hi xfix :)
15:43 xfix timotimo:++
15:43 xfix I mean, timotimo++
15:44 silug joined #perl6
15:44 xfix What was the difference between SetHash and MixHash?
15:45 xfix Both work, so I assume I should use SetHash.
15:45 Ven yeah, camelia gisting is borked
15:46 timotimo i think one has Num values, the other Int?
15:46 xfix SetHash has booleans.
15:46 xfix Which is what I want.
15:47 ab5tract honestly, the .kv approach feels more idiomatic
15:47 colomon moritz: did you have a notion where the smoke test docs could go in the layout there?  I can't get at it now, but maybe this evening....
15:47 ab5tract as the pattern holds regardless of whether its a file handle
15:47 colomon KeySet is now SetHash
15:48 psch ahh
15:48 psch nvm the "it works locally", i didn't test with $*IN but with an explicit filehandle
15:48 psch so camelia does what it does locally, which is not getting the line number from $*IN.ins()
15:49 psch where "it" is "perl6", not camelia
15:50 timotimo colomon: it would be cool if the smoker overview website would let us look at the build log to figure out what's going wrong without having to reproduce locally
15:52 colomon timotimo: it's more about what emmentaler does; my code just automates running it every and then.
15:53 timotimo OK
15:53 colomon timotimo: though hmmm, I do appear to have commit privledge to it…  ;)
15:54 xenoterracide_ joined #perl6
15:54 colomon * automates running it every day and then provides a web interface to see the results
15:55 * colomon is being distracted around here at the moment -- prepping to take to little guy to visit his cousin for a couple of days.
15:57 nbrown joined #perl6
15:57 * psch duhs
15:57 psch m: for lines() { .say; last if $*ARGFILES.ins() > 2 }
15:57 camelia rakudo-moar 506aae: OUTPUT«Céad slán ag sléibhte maorga Chontae Dhún na nGall␤Agus dhá chéad slán ag an Eireagal ard ina stua os cionn caor is coll;␤Nuair a ghluais mise thart le Loch Dhún Lúich’ go ciúin sa ghleann ina luí␤»
15:57 * psch huhs
15:57 FROGGS[mobile] joined #perl6
16:01 psch nevermind the huhing, that actually works
16:01 FROGGS_ jnthn: the JSON::RPC fail on parrot is due to a PMC with data being NULL, so an STABLE access explodes...
16:01 FROGGS_ jnthn: not sure yet how that happens, I guess the next thing I wanna try is to locate the Perl 6 code and object that does that
16:02 xenoterracide joined #perl6
16:09 ab5tract what is the significance of 'ARGFILES' here?
16:09 psch ab5tract: $*ARGFILES is commandline argument files
16:10 psch e.g. 'perl6 -e"say for $*ARGFILES.lines" onefile.txt secondfile.txt"
16:11 psch a bare "lines()" reads from $*ARGFILES
16:13 PerlJam perl6
16:13 ab5tract gotcha
16:21 xenoterracide joined #perl6
16:24 kivutar joined #perl6
16:25 akaseki joined #perl6
16:33 rurban1 joined #perl6
16:36 Ven joined #perl6
16:42 xenoterracide joined #perl6
16:51 Juerd moritz: No, kvm
16:52 moritz Juerd: ok, thanks
16:58 xenoterracide_ joined #perl6
17:06 itz_ joined #perl6
17:06 ab5tract joined #perl6
17:06 thou joined #perl6
17:07 ab5tract psch: what is the way of using lines(), or something similar, with stdin (for piping a list to `perl6 -e`)?
17:08 ab5tract i tried $*STDIN, because it seemed perlyish
17:11 psch ab5tract: STDIN from perl5 has been replaced with the dynamic variable $*IN
17:11 psch cf my previous blunder with calling .ins() on $*IN instead of $*ARGFILES
17:13 ab5tract thanks
17:17 ab5tract perl6++
17:19 rurban1 joined #perl6
17:23 dmol joined #perl6
17:30 TimToady We don't have a C-like for loop; we only have a C-like loop.  :)
17:31 dalek nqp: e885561 | jnthn++ | tools/build/MOAR_REVISION:
17:31 dalek nqp: Bump to latest MoarVM.
17:31 dalek nqp: review: https://github.com/perl6/nqp/commit/e885561a7b
17:33 dalek rakudo/nom: 765f321 | jnthn++ | / (2 files):
17:33 dalek rakudo/nom: Update ext ops to use new improved extop API.
17:33 dalek rakudo/nom:
17:33 dalek rakudo/nom: Specify that many are pure, so spesh's dead code elimination can take
17:33 dalek rakudo/nom: care of them. Also, allow a spesh function to be supplied. Implement
17:33 dalek rakudo/nom: a basic one to toss redundant p6decontrv operations. Bump NQP_REVISION
17:33 dalek rakudo/nom: to get a MoarVM supporting this stuff.
17:33 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/765f321218
17:42 timotimo that sounds lovely
17:48 rindolf joined #perl6
17:58 SunilJoshi joined #perl6
18:01 atroxaper joined #perl6
18:05 atroxaper Hello, #perl6 !
18:06 timotimo hey you :)
18:07 atroxaper timotimo: o/
18:08 atroxaper I finished some repairing of my house and I'm going to continue Pod::SAX :)
18:08 psch atroxaper o/
18:08 atroxaper psch: hi!
18:13 hoverboard joined #perl6
18:15 dalek nqp: a0b93ce | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
18:15 dalek nqp: bump nqp's moar for new extop interface
18:15 dalek nqp: review: https://github.com/perl6/nqp/commit/a0b93ce123
18:15 dalek Heuristic branch merge: pushed 178 commits to nqp/jvm_interop_dispatchers2 by timo
18:15 timotimo oops, i accidentally pushed that branch, too
18:16 timotimo i don't even know if i did anything with it in between
18:16 dalek rakudo/nom: 0d19543 | (Timo Paulssen)++ | / (2 files):
18:16 dalek rakudo/nom: new extop registration interface + nqp/moar version bump
18:16 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0d1954395b
18:17 dalek Heuristic branch merge: pushed 626 commits to rakudo/jvm_interop_dispatchers by timo
18:17 timotimo ... ... ...
18:17 timotimo i should be using git push more carefully after this update.
18:17 atroxaper Is there better pattern for case: "my $var = @array[5] || 'value'; @array[5] = $var; $var = 'new value';"??
18:18 timotimo there is //= and ||=
18:18 atroxaper I mean I want to get some object from array of create it in case the object isn't exists. And after that i want to get the object in the next time.
18:19 atroxaper timotimo: do you mean?: "@array[5] ||= "value"; my $var = @array[5];"? :)
18:20 timotimo maybe
18:20 timotimo i'm not 100% sure what you're looking for :)
18:20 timotimo that sounds like what you want; probably want //= instead
18:20 psch atroxaper: what i understand is that you want to check if @array[5] is defined, if not assign a new value, and afterwards assign a different new value to $var
18:20 timotimo (|| is truthy-or and // is definedness-or)
18:21 psch that'd be somewhat like: @array[5] //= 'value'; $var = 'new value'
18:21 psch the reuse of $var confuses me :)
18:22 atroxaper psch: in first time i want to initialize value and store it in array. And in second time i want to work with value
18:22 psch why do you need value in the first part?
18:22 psch or rather: do you have encompassing code that might make your intention clearer?
18:23 atroxaper It's for example. Some initial value.
18:24 psch m: my @arr = [1, 2, Nil, 4]; my $var = (@array[2] //= 10); say $var; my $var = 5; say $var; $var = (@array[3] //= 3; say @array[3]; say $var;
18:24 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/Aln3NfO2cVâ�¤Variable '@array' is not declaredâ�¤at /tmp/Aln3NfO2cV:1â�¤------> [32mr = [1, 2, Nil, 4]; my $var = (@array[2][33mâ��[31m //= 10); say $var; my $var = 5; say $va[0mâ�¤    expecting…»
18:25 psch m: my @arr = [1, 2, Nil, 4]; my $var = (@arr[2] //= 10); say $var; my $var = 5; say $var; $var = (@arr[3] //= 3; say @arr[3]; say $var;
18:25 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in parenthesized expression; couldn't find final ')' â�¤at /tmp/IunuOigJpg:1â�¤------> [32m= (@arr[3] //= 3; say @arr[3]; say $var;[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfix…»
18:25 psch m: my @arr = [1, 2, Nil, 4]; my $var = (@arr[2] //= 10); say $var; my $var = 5; say $var; $var = (@arr[3] //= 3); say @arr[3]; say $var;
18:25 camelia rakudo-moar 506aae: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol $varâ�¤    at /tmp/HG7ltdsJUa:1â�¤    ------> [32mr = (@arr[2] //= 10); say $var; my $var [33mâ��[31m= 5; say $var; $var = (@arr[3] //= 3); s[0mâ�¤10â�¤5â�¤3â�¤3â�¤Â»
18:25 psch atroxaper: i still don't really understand what exactly you're trying to achieve; i have a feeling of XY-yness
18:25 dalek nqp: ddebfec | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
18:25 dalek nqp: bump nqp's moar for new extop interface
18:25 dalek nqp: review: https://github.com/perl6/nqp/commit/ddebfec8bf
18:26 dalek rakudo/nom: 3ae17e5 | (Timo Paulssen)++ | / (2 files):
18:26 dalek rakudo/nom: new extop registration interface + nqp/moar version bump
18:26 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/3ae17e5cc0
18:26 * timotimo is very naughty and force-pushes
18:26 atroxaper psch: :) Maybe. I think i just need to use //=
18:26 atroxaper psch: i was looking for shorter expression of my initial code :)
18:28 psch well, assuming you mean // instead of || (as timotimo said, truthiness vs definedness) the shorter code is: my $var = (@array[5] //= 'value'); $var = 'new value';
18:28 psch my main hang-up is with the first assignment to $var
18:29 sjn_roadie joined #perl6
18:29 psch if you're after truthiness you can of course just replace the // with ||
18:30 atroxaper psch: thank you. :) really
18:30 psch atroxaper: i just elaborated on timotimo++s response, really ;)
18:31 atroxaper Sure. timotimo++ was right!
18:34 ab5tract m: my @a; my $var = @a[5] = "some value?";
18:34 camelia rakudo-moar 506aae: ( no output )
18:34 ab5tract m: my @a; my $var = @a[5] = "some value?"; $var.say;
18:34 camelia rakudo-moar 506aae: OUTPUT«some value?␤»
18:35 ab5tract something like that atroxaper?
18:35 ab5tract m: my @a; my $var = @a[5] = "some value?"; $var.say; @a[5].say;
18:35 camelia rakudo-moar 506aae: OUTPUT«some value?␤some value?␤»
18:35 atroxaper Oh...
18:36 ab5tract m: my @a; my $var = @a[5] //= "some value?"; $var.say; @a[5].say; # forgot defined-or
18:36 camelia rakudo-moar 506aae: OUTPUT«some value?␤some value?␤»
18:36 zakharyas joined #perl6
18:36 atroxaper I've tried //= in REPL and found....
18:37 atroxaper m: my @array = ("v1', "v2"); my $var = (@array[5] //= 'value'); $var = 'new value'; say @array;
18:37 camelia rakudo-moar 506aae: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7ST_Ozhmsxâ�¤Two terms in a rowâ�¤at /tmp/7ST_Ozhmsx:1â�¤------> [32mmy @array = ("v1', "[33mâ��[31mv2"); my $var = (@array[5] //= 'value');[0mâ�¤    expecting any of:â�¤        postfixâ�¤      â€¦Â»
18:37 sjn_ joined #perl6
18:37 FROGGS[mobile] you mixed up the quotes
18:38 TimToady when in down, read the error message :)
18:38 TimToady *doubt
18:38 atroxaper m: my @array = ("v1", "v2"); my $var = (@array[5] //= 'value'); $var = 'new value'; say @array;
18:38 camelia rakudo-moar 506aae: OUTPUT«v1 v2 (Any) (Any) (Any) value␤»
18:38 FROGGS[mobile] don't read error messages when you are down :o)
18:39 atroxaper I wanted to change value of $var and corresponding @array element in the same time :)
18:39 atroxaper I thought that is obvious :)
18:39 TimToady m: my @array = <v1 v2>; my $var := (@array[5] //= 'value'); $var = 'new value'; say @array;
18:39 camelia rakudo-moar 506aae: OUTPUT«v1 v2 (Any) (Any) (Any) new value␤»
18:39 FROGGS[mobile] well, it did that
18:40 atroxaper :=    ?!
18:40 TimToady you have to use := to make an alias
18:40 FROGGS[mobile] binding
18:40 atroxaper TimToady: Oh... I didn't know that at all :)
18:40 timotimo hello TimToady!
18:41 atroxaper Many thanks all of you!
18:41 TimToady hel timo  <-- only seeing out of my left eye :)
18:41 FROGGS[mobile] right Lynn, the other one is left unused
18:42 FROGGS[mobile] err
18:42 FROGGS[mobile] rightly*
18:42 TimToady no, it's my right that's unused :P
18:42 FROGGS[mobile] *g*
18:43 TimToady the cool thing is that as the eye approaches half full, I can shine a flashlight into my eye and see the water level :)
18:43 FROGGS[mobile] ohh wow
18:48 TimToady if I look down at my laptop, I can't see it yet, but there's a band above horizontal that's starting to come into focus, superimposed on a strong internal reflection of the screen from the underside of the liquid
18:49 masak reminds me of a scene in "Quicksilver" where Isaac Newton sticks a needle under his eyeball in order to understand optics better.
18:50 FROGGS[mobile] ewww
18:50 TimToady so a few more days and I should be able to see pretty well looking horizontally, as the liquid covers the backside of the lens
18:50 masak FROGGS[mobile]: you say that now, but reading the chapter itself is... visceral.
18:51 FROGGS[mobile] I'll have no time to read it then
18:54 thou joined #perl6
18:54 TimToady Economics may be "the dismal science", but it makes for a pretty entertaining Baroque Cycle.
18:55 timotimo masak: "under" his eyeball?
18:56 TimToady sure, why not?  I was making observations on the order in which my eye muscles became paralyzed before surgery, by noting which eye motions didn't actually change the image in both eyes :)
18:57 TimToady the left and right motion went first...
18:58 TimToady shortly followed by the rotational motion ('roll', to an airplane pilot)
18:58 TimToady up and down was the last to go :)
18:59 nbrown joined #perl6
18:59 TimToady it is a peculiar feeling, however, to look somewhere else on the ceiling, and realize the one image didn't track the other
18:59 Mouq joined #perl6
18:59 timotimo wait ... you can actually roll your eyeballs?
19:00 TimToady yes, look in a mirror and tilt your head to the left or right
19:00 TimToady you'll see your eyes rotating to keep level
19:00 TimToady assuming they work right
19:01 TimToady 'course that doesn't mean what people usually mean by that phrase
19:01 TimToady I mean it as in "roll, pitch, and yaw"
19:02 timotimo yes, i understood you the first time, but looked up "Flight dynamics" on wikipedia just to make sure
19:02 timotimo but ... wow, i didn't know eyes did that
19:02 timotimo though it seems like the effect isn't very strong
19:02 TimToady yes, it's really just fine tuning, and gives up on large changes
19:03 TimToady I suspect the main purpose is to make sure your two images line up, not to keep your eyes level
19:03 raiph joined #perl6
19:07 timotimo fair enough
19:07 TimToady but having a cornea translant, cataract surgery, a retinal cryosurgery, and four laser procedures not including the latest retinal reattachement stuff...I know far too much about eyes
19:08 TimToady the opthamologist in the emergency room at UCLA kept exclaiming, "You talk just like an opthamologist!"  :)
19:09 TimToady my paper file is about two inches thick now...
19:09 TimToady *opthalmologist
19:10 timotimo :)
19:10 * TimToady was forgetting his greek...
19:10 timotimo eyes are really pretty fascinating
19:21 xenoterracide_ joined #perl6
19:28 asterite joined #perl6
19:28 xenoterracide_ joined #perl6
19:34 dalek rakudo/nom: eeb7c32 | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
19:34 dalek rakudo/nom: discover a bunch of facts about p6 extops for moarvm
19:34 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/eeb7c32641
19:35 dalek nqp-js: 9228766 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
19:35 dalek nqp-js: Fix bug when emitting js for cclass.
19:35 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/92287668c4
19:35 dalek nqp-js: cd2f066 | (Pawel Murias)++ | src/vm/js/nqp-runtime-core/runtime.js:
19:35 dalek nqp-js: Pass ctx to to_s in nqp::lc and nqp::uc.
19:35 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/cd2f066c45
19:35 dalek nqp-js: 44f8c73 | (Pawel Murias)++ | TODO:
19:35 dalek nqp-js: Start a TODO file.
19:35 dalek nqp-js: review: https://github.com/pmurias/nqp-js/commit/44f8c73131
19:35 pmurias joined #perl6
19:36 vendethiel pmurias++
19:36 masak oooooh
19:36 masak pmurias++
19:36 dalek rakudo/nom: 7e6dd3f | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
19:36 dalek rakudo/nom: remove debug output, discover known type of p6bool.
19:36 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/7e6dd3fa81
19:36 masak I think a JS Rakudo would be non-trivially awesome.
19:37 timotimo aye.
19:37 vendethiel it'd be far more than non-trivially so :)
19:39 xenoterracide_ joined #perl6
19:46 MilkmanDan joined #perl6
19:49 colomon joined #perl6
19:52 dalek rakudo/nom: 1d2bb62 | Mouq++ | src/Perl6/Actions.nqp:
19:52 dalek rakudo/nom: Hack in @a[1;2] / %h{"a";"b"} support
19:52 dalek rakudo/nom:
19:52 dalek rakudo/nom: Attempts to change semilist directly or use a different rule were
19:52 dalek rakudo/nom: breaking the build -- special-casing the behaviour in .[] and .{} is
19:52 dalek rakudo/nom: much simpler than tracking down all the faulty uses of <semilist> and
19:52 dalek rakudo/nom: making them all work with the change.
19:52 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/1d2bb6206a
20:00 dalek roast: d2d8343 | Mouq++ | S02-types/multi_dimensional_array.t:
20:00 dalek roast: Unfudge multidim sugar tests
20:00 dalek roast: review: https://github.com/perl6/roast/commit/d2d8343ad1
20:01 jnthn Mouq++
20:01 jnthn Mouq: Is the aim to converge on STDs handling in the end?
20:02 Mouq jnthn: Do you mean wrt semilist?
20:02 jnthn Yes
20:03 atroxaper Mouq++
20:03 masak \o/
20:03 jnthn (I didn't look closely at how we're differing on semilist atm, just got the impression we are from the commit message)
20:03 Mouq jnthn: Because it appears that STD is incorrect there itself; it uses semilist where semilists don't make sense
20:03 jnthn Oh.
20:03 jnthn OK, Rakudo pushing STD changes is also fine :)
20:05 Mouq Yeah :/ I don't actually know what the problem was. I tried changing the semilist rule to statementlist where it made sense and having semilist make an LoL but it would cause impossible to debug compiler fails during setting. I tried adding a new rule <actually-semilist> and it made the build hang... so, maybe another day with that fix
20:07 Mouq But after a few days of tweaking and compiling Rakudo trying to figure out what's wrong, it started to make more sense to me just to special case the semantically correct behaviour ;P
20:07 asterite left #perl6
20:07 Mouq FROGGS++ btw \o/
20:10 vendethiel .u Trademark
20:10 yoleaux U+2122 TRADE MARK SIGN [So] (™)
20:10 vendethiel yoleaux++ # <3
20:11 Mouq .u copy
20:11 yoleaux U+00A9 COPYRIGHT SIGN [So] (©)
20:11 yoleaux U+2117 SOUND RECORDING COPYRIGHT [So] (℗)
20:11 yoleaux U+32A2 CIRCLED IDEOGRAPH COPY [So] (㊢)
20:12 Ven joined #perl6
20:15 molaf joined #perl6
20:15 haroldwu joined #perl6
20:16 clkao joined #perl6
20:36 masak m: sub foo { my $a will leave { say $a.abs } = 4; say "hi" }; foo
20:36 camelia rakudo-moar 3ae17e: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/siuETQ0_Kyâ�¤Variable '$a' is not declaredâ�¤at /tmp/siuETQ0_Ky:1â�¤------> [32msub foo { my $a will leave { say $a.abs[33mâ��[31m } = 4; say "hi" }; foo[0mâ�¤    expecting any of:â�¤        met…»
20:36 masak m: sub foo { my $a will leave { say "bye" } = 4; say "hi" }; foo
20:36 camelia rakudo-moar 3ae17e: OUTPUT«hi␤bye␤»
20:37 masak why doesn't that first one work?
20:37 masak no, more specifically: why isn't $a declared inside that block?
20:37 jnthn Because the "will" is part of the declaration
20:38 jnthn And so we didn't update the symbol table yet
20:38 FROGGS_ that is like using a routine wihtin the routine... which works
20:38 jnthn But worse than that, I'm not sure the leave block there is working like a closure yet
20:39 masak using the variable itself from within the leave block feels like a very common use case.
20:39 jnthn You may have access to it with $_
20:39 masak m: sub foo { my $a will leave { say $_.abs } = 4; say "hi" }; foo
20:39 camelia rakudo-moar 3ae17e: OUTPUT«hi␤use of uninitialized value of type Nil in numeric context  in sub foo at /tmp/DUnLOXZc70:1␤␤0␤»
20:39 jnthn bah, no
20:40 jnthn I'm not sure how var traits like that are done tbh
20:40 jnthn lizmat++ put them in, but I think ran into the fact that it's rather tricky to deal with the closure-ish semantics we want of them.
20:40 jnthn And I don't immediately have a good answer
20:40 masak ok.
20:40 jnthn Because traits are declarative things.
20:41 jnthn But here we want something to be per-variable at runtime, not per declaration.
20:42 thou joined #perl6
20:45 FROGGS_ I have no clue how to proceed with that jsonrpc@parrot problem :/
20:48 jnthn FROGGS_: Is it a regression in Parrot (e.g. does it go away with an earlier Parrot version)?
20:48 FROGGS_ jnthn: I dunno, all three have changed (module+rakudo+parrot)
20:48 FROGGS_ but it was good at some point
20:49 FROGGS_ like, two months ago or perhaps three
20:49 FROGGS_ but yeah, I could build an older parrot
21:01 nbrown joined #perl6
21:04 telex joined #perl6
21:05 Sqirrel joined #perl6
21:08 kurahaupo joined #perl6
21:13 aoseki joined #perl6
21:15 Alula_ joined #perl6
21:21 Ven joined #perl6
21:28 * Mouq wonders why "compiling src/core/interp.o" always takes so long
21:29 jnthn Many lines. Epic switch statement.
21:29 timotimo it takes long?
21:30 Mouq I'm in "safe mode" with my comp, so everything takes really long '<
21:33 akaseki joined #perl6
21:44 Ven Mouq: it's giving you more time to consider how you want to shoot yourself in the foot :P
21:46 erdic joined #perl6
21:46 dalek rakudo/nom: 9a56a2c | jnthn++ | src/Perl6/Optimizer.nqp:
21:46 dalek rakudo/nom: Disable an optimization on Moar that pessimizes.
21:46 dalek rakudo/nom:
21:46 dalek rakudo/nom: What is on most backends a help gets in the way of spesh doing its
21:46 dalek rakudo/nom: thing with multi-dispatches and inlining. For now, just don't do it
21:46 dalek rakudo/nom: on Moar.
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9a56a2c9cf
21:53 masak a first for me: using `given $obj -> (:$x, :$y, :$z) { ... }` to unpack an object's properties into a scope.
21:54 timotimo :3
21:54 masak idea stolen from some jnthn++ code, though he did `if SomeGrammar.parse($stuff) -> (:$x, :$y, :$z) { ... }`, which I also had not considered.
21:56 cognominal nice idioms.
21:57 timotimo aye
21:57 * Ven takes note
21:57 * jnthn tries to remember what code he did that in :)
21:57 * timotimo is running a few monthly rakudo version benchmarks
21:58 masak jnthn: hint: I'm improving it because I said I would.
21:58 jnthn oh, cool :)
22:03 rurban1 joined #perl6
22:18 dalek nqp: 68ebbd3 | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
22:18 dalek nqp: bump moarvm for proper extop discovery and inlinable lexotics
22:18 dalek nqp: review: https://github.com/perl6/nqp/commit/68ebbd361a
22:20 dalek rakudo/nom: 8db87b5 | (Timo Paulssen)++ | tools/build/NQP_REVISION:
22:20 dalek rakudo/nom: bump for MoarVM with inlinable lexotics
22:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8db87b557d
22:31 thou joined #perl6
22:31 Psyche^_ joined #perl6
22:31 raiph joined #perl6
22:41 firnsy joined #perl6
22:41 firnsy joined #perl6
22:49 dalek tablets: 8e84439 | (Herbert Breunung)++ | docs/tablet- (3 files):
22:49 dalek tablets: linking some related chapters
22:49 dalek tablets: review: https://github.com/perl6/tablets/commit/8e844398db
23:04 rurban1 joined #perl6
23:10 dalek tablets: e3b2a65 | (Herbert Breunung)++ | docs/tablet- (2 files):
23:10 dalek tablets: fixes by decasm++
23:10 dalek tablets: review: https://github.com/perl6/tablets/commit/e3b2a657c3
23:19 hoverboard joined #perl6
23:20 MilkmanDan joined #perl6
23:21 apejens joined #perl6
23:36 BenGoldberg joined #perl6
23:38 figoe joined #perl6
23:40 dalek tablets: f0e7205 | (Herbert Breunung)++ | docs/ (6 files):
23:40 dalek tablets: the other fixes by decasm++
23:40 dalek tablets: review: https://github.com/perl6/tablets/commit/f0e7205bae
23:42 xenoterracide_ joined #perl6
23:52 xragnar_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo