»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
BenGoldberg r: say nqp::rand_I(2, Int) xx 40 00:01
camelia rakudo-jvm a6b2af: OUTPUT«(timeout)» 00:02
..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␤»
..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␤»
timotimo yeah, that seems more healthy 00:02
carlin linux has a sane rand() it seems 00:03
so the fix for this would be for moar to use something like arc4random on openbsd instead of rand ? 00:04
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:07
timotimo that would be nice, but it's not that easy to plug into the tommath pieces 00:08
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:09
carlin > say nqp::rand_I(2, Int) xx 40 00:19
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
^ using random() instead of rand()
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:20
itz_ oh anyone who hasn't seen tig(1) - ncurses based git log viewer its quite nice 00:28
timotimo yup, it's pretty neat 01:30
grondilu noticed a clear decrease in performance after update today 01:31
This is perl6 version 2014.07-44-ga6b2af7 built on MoarVM version 2014.07-15-gb6a4250
timotimo oh? 01:32
give us more details? 01:33
can you also look at the git reflog and see what revisions you had built before that? 01:42
colomon itz_: agreed, I've been using tig for about a month now, and I love it. 01:43
grondilu timotimo: I often try something like say [+] rand xx 100_000 and today it took twice as long
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 ;)
grondilu so if the decrease in perf is not confirmed by something else, I'll blame my computer.
s/something/someone/ 01:47
rjbs- TimToady: www.nntp.perl.org/group/perl.perl5....18145.html ;) 01:49
Util Just released: hpmor.com/chapter/102 02:08
gtodd say nqp::rand_I(2, Int) xx 40 02:27
oopsi
e
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:06
BenGoldberg m: ["hello", "world"]>>.substr(1); 03:11
camelia ( no output )
BenGoldberg m: ["hello", "world"]>>.substr(1).say;
camelia rakudo-moar 506aae: OUTPUT«ello orld␤»
jack_rabbit m: my @arr = ["hello", "world"]>>.substr(1); say @arr; 03:15
camelia rakudo-moar 506aae: OUTPUT«ello orld␤»
gtodd oh my problem is the ChoHag problem described here: irclog.perlgeek.de/perl6/2014-06-10 ... parrot dynacall -fPIC etc etc 03:16
ermm dyncall that is ... 03:19
Util jack_rabbit: see perlcabal.org/syn/S03.html#Unary_hyper_operators , but the better examples are further down, after:
"When using a unary operator" ...
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 ....
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!
I'll read that.
Util jack_rabbit: yw 03:24
gtodd ChoHag: only asking asking since my rakudo won't build issue seems similar to yours paste.scsys.co.uk/409550?tx=on&...rmat+it%21 down to the FreeBSD/clang and dyncall ... parrot builds on its own but perl6-p won't 03:27
seems the conclusion back then (June) was that "the version of dyncall bundled with nqp for the parrot backend is out of date" 03:31
ventica_desktop m: my @a = 'a' .. *; say @a[290]; 04:18
camelia rakudo-moar 506aae: OUTPUT«ke␤»
ventica_desktop hrm ... i see what u did there... 04:19
m: my @a = 'A' .. *; say @a[290];
camelia rakudo-moar 506aae: OUTPUT«KE␤»
ventica_desktop mhmm
m: my @a = '1' .. *; say @a[290];
camelia rakudo-moar 506aae: OUTPUT«291␤»
ventica_desktop m: my @a = '!' .. *; say @a[290];
camelia rakudo-moar 506aae: OUTPUT«!␤»
ventica_desktop hmmm
interesting
very DWIMmy 04:20
right on the border of too DWIMmy :P
gamo Hi. Is rakudo star usable? 04:41
ventica_desktop m: my $usable=1; say "Rakudo Star is usable" if ($usable); 04:42
camelia rakudo-moar 506aae: OUTPUT«Rakudo Star is usable␤»
gamo tahnks. About how is the speed of the compiled programs? 04:43
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
o/
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...
gamo: Indeed. I just mean all the straightforward operators, function calls, basic I/O, etc. 04:47
It's mostly done and perf is respectable
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␤»
gamo ok 04:50
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?
gamo yes
ventica_desktop i don't see why it would affect perl 5 at all... 04:53
grondilu the executable is different, for a start.
ventica_desktop perl 6 is not literally perl 6.0, as in, an upgrade of the latest perl 5.whatever
gamo I don't know how is ubuntuish thing in either case 04:54
grondilu there already is a rakudo package on debian sid
so it's probably not too hard to use it on ubuntu
gamo it's older than april version
grondilu well, yeah, if you want the lastest (and you do), it's not perfect. 04:55
s/lastest/latest/
ventica_desktop
.oO(What is perfect?)
ChoHag gtodd: dyncall needs -fPIC 04:56
ISTR compiling it by hand.
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;
camelia rakudo-moar 506aae: OUTPUT«55␤»
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:07
ventica_desktop my @arr=1..10; say [<] @arr; 05:08
m: my @arr=1..10; say [<] @arr; #derp
camelia rakudo-moar 506aae: OUTPUT«True␤»
ventica_desktop m: my @arr=1..10,9; say [<] @arr;
camelia rakudo-moar 506aae: OUTPUT«False␤»
ventica_desktop thinks the meta-cross should die... 05:11
my @arr='a'xx5; say @arr;
m: my @arr='a'xx5; say @arr; #sigh 05:12
camelia rakudo-moar 506aae: OUTPUT«===SORRY!=== Error while compiling /tmp/A8mf1vxzGQ␤Two terms in a row␤at /tmp/A8mf1vxzGQ:1␤------> my @arr='a'⏏xx5; say @arr; #sigh␤ expecting any of:␤ postfix␤ infix stopper␤ inf…»
ventica_desktop m: my @arr='a' xx 5; say @arr; #sigh
camelia rakudo-moar 506aae: OUTPUT«a a a a a␤»
ventica_desktop i see why... but... :\
m: my @arr='a' xx 5; say [eq] @arr; 05:13
camelia rakudo-moar 506aae: OUTPUT«True␤»
ventica_desktop m: my @arr='a' xx 5,'b'; say [eq] @arr;
camelia rakudo-moar 506aae: OUTPUT«False␤»
ventica_desktop m: my @arr='a' xx 5,'b'; say [.] @arr; 05:14
camelia rakudo-moar 506aae: OUTPUT«===SORRY!=== Error while compiling /tmp/C1KttihNzd␤Unsupported use of . to concatenate strings; in Perl 6 please use ~␤at /tmp/C1KttihNzd:1␤------> my @arr='a' xx 5,'b'; say [.]⏏ @arr;␤»
ventica_desktop oops
m: my @arr='a' xx 5,'b'; say [~] @arr;
camelia rakudo-moar 506aae: OUTPUT«aaaaab␤»
ventica_desktop yummy
gamo thanks, xinming 05:19
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␤»
ventica_desktop i assume it got flattened before the outer parens got ahold of it.. 05:23
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␤»
ventica_desktop hrmmm O.o
ok, i get it 05:27
m: my @a = ([X] (1,2),(3,4),(5,6)).tree; say @a[0];
camelia rakudo-moar 506aae: OUTPUT«1 3 5␤»
ventica_desktop there we go 05:28
m: my @a = ([X] (1,2),(3,4),(5,6)); say @a[0];
camelia rakudo-moar 506aae: OUTPUT«1␤»
ventica_desktop correcto
in other words [X] is transpose
as long as you put .tree suffix
Timbus or.. hm 05:29
m: say ([X] (1,2),(3,4),(5,6)).lol.perl
camelia rakudo-moar 506aae: OUTPUT«LoL.new(ListIter.new())␤»
Timbus nevermind
ventica_desktop no, ur right its not
Timbus use it to generate.. probability trees or something.. 05:32
ventica_desktop yeah, it's a cross-product with shape preserved
Timbus m: say ([\X] (1,2),(3,4),(5,6)).tree.perl
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␤»
Timbus woa 05:33
ventica_desktop haha
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␤»
ventica_desktop RosettaCode lied! >:-(
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␤»
fling Hello. 06:20
timotimo hi 07:33
Woodi o/ 07:34
timotimo i wonder what ventica's problem with meta-cross is
Woodi um, could it be used to simulate SQL joins ? free CPU cycles on backends :) 07:39
FROGGS[mobile] m: say "ba,a,a,aabbb" ~~ / a ** { 2..5 } % "," / 07:41
camelia rakudo-moar 506aae: OUTPUT«「a,a,a,a」␤␤»
FROGGS[mobile] \o/
timotimo yays again
FROGGS[mobile] well, last time I broke the build 07:42
FROGGS[mobile] ahh, I need to push the unfudged spectests 07:45
dalek ast: d90cfb6 | (Tobias Leich)++ | S05-m (2 files):
RT #121306 unfudge tests about /a**{}/
08:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=121306
vendethiel o/ 08:20
TimToady [Coke], masak: re irclog.perlgeek.de/perl6/2014-07-20#i_9053071 the 0 behavior is defined in S03:562 08:30
synopsebot Link: perlcabal.org/syn/S03.html#line_562
masak good antenoon, #perl6 08:37
sergot hi o/ 08:38
itz_ why does $*DISTRO exist? seems a little linux specific? 08:43
itz_ I suppose pragmatically it probably does make things easier since they are so different 08:46
masak TimToady: ah, then that spectest was actually correct. 08:48
[Coke]: ^ 08:49
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
github.com/avuserow/star/blob/78b9...2014.07.md
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 www.dropbox.com/s/qrx89mnavx7euee/...RC1.tar.gz 09:09
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
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:12
FROGGS_ itz_: well, we need to provide a superset of needed information, not a subset 09:19
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)
itz_ neither does the example in the help work .. it's now "Type/Str" 09:22
FROGGS_ itz: can you file a PR? 09:27
itz I filed a PR for the first issue not the second 09:28
Actually I'll just do a pull request
FROGGS_ itz++ 09:29
then we just need to bug the commit bit holder(s)
itz the Str thing is odd . may be a * path build issue 09:41
itz github.com/perl6/doc/pull/24 09:45
hmm no not * specific 09:48
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
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.
itz d'uh Type::Str would be better 09:58
need coffee
tgt [<a> | <b> | <c>]*, but with the added constraint that once a token has been matched it can't be matched again. 10:00
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␤»
tgt The important thing is that it fails to match if the token is found multiple times. My current grammar is gist.github.com/tgt/f8b6c57675938b702f2c 10:20
FROGGS_ yeah, I thaught so ...
FROGGS_ m: my @a = <a b c>; say "abc" ~~ / | @a / # that might be interesting for you 10:21
camelia rakudo-moar 506aae: OUTPUT«「a」␤␤»
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:22
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」␤␤»
psch because im treating $/ wrong in the regex, clearly
but .Bag doesn't do what it'd need there either
m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $x 10:24
camelia rakudo-moar 506aae: OUTPUT«===SORRY!=== Error while compiling /tmp/w2KmCMV0Ww␤Variable '$x' is not declared␤at /tmp/w2KmCMV0Ww:1␤------> $ /; say "aabc" ~~ $rx; say "abc" ~~ $x⏏<EOL>␤ expecting any of:␤ postfix␤»
psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $rx
camelia rakudo-moar 506aae: OUTPUT«「aabc」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
psch :/
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」␤␤»
FROGGS_ hmmm
psch m: my $rx = /:my @cache; (.)+! <!{ $/.values.Bag.values.grep($0) > 1 }> $ /; say "aabc" ~~ $rx; say "abc" ~~ $rx
camelia rakudo-moar 506aae: OUTPUT«「aabc」␤ 0 => 「a」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
psch just noticed he left that array declared 10:30
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␤»
FROGGS_ I don't get it
psch m: my $rx = / (.)+! <!{ $0.values>>.Str.Bag.grep: { $^a.values > 1 } }> /; say "aabc" ~~ $rx; say "abc" ~~ $rx
camelia rakudo-moar 506aae: OUTPUT«「c」␤ 0 => 「c」␤␤「c」␤ 0 => 「c」␤␤»
psch i think i want that to work :P
haha 10:37
FROGGS_ after the first match there is an "a" in %found, but the set operation returns still a b c
moritz oh hai
FROGGS_ hi moritz
psch hi moritz
moritz I've now implemented the changes to the "owners" team on github
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 # !!
camelia rakudo-moar 506aae: OUTPUT«Nil␤「abc」␤ 0 => 「a」␤ 0 => 「b」␤ 0 => 「c」␤␤»
psch tgt: that does it, apparently
FROGGS_ thanks moritz
psch first match gives Nil, second gives the Match
tgt Interesting, thanks. I'll see what I can do with that. 10:43
psch of note might be that dropping the anchors only gives you a connected substring that has no duplicates 10:44
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:46
psch you could make the rule never match if some $strict is set, similarly to what i did above 10:50
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
tgt Aha, good idea. Thanks for your help psch and FROGGS_ :) 10:52
itz linus doesn't seem to like gcc 4.9 (new in debian sid)! 11:18
Woodi yea, just learned that too... lkml.org/lkml/2014/7/24/584 11:20
also spotted libressl today :)
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:24
grondilu is confused as it so happens he's currently upgrading his debian sid system and there is gcc 4.9 :/ 11:29
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
Woodi Linus was talking about in-kernel special code or something. and probablly 4.9 is passing their test :) 11:32
*tests
BinGOs you could go the whole hog and install FreeBSD 10, then not worry about a shitty compiler or shitty kernel :) 11:33
Woodi BinGOs: but dpkg/apt/aptitude is perfect ! 11:34
BinGOs except on debian kfreebsd port it isn't 11:35
Woodi when you have problem then scratch thing you changed lastly ;)
BinGOs I have to alias apt-get to apt-get -o Dpkg::Use-Pty=False 11:36
itz why not just use aptitude?
BinGOs otherwise Bad Things™ happen 11:36
itz specifically on kfreebsd? 11:37
BinGOs aptitude will use dpkg still no?
Woodi BinGOs: what is correct, native equivalent of ap* on FreeBSD ?
BinGOs yes, it is kfreebsd specific
Woodi: pkg
Woodi everything is use dpkg ?
itz I use pkgsrc on linux which is sort of kfreebsd in reverse :) 11:38
BinGOs well it is known as pkgng
Woodi *using
BinGOs I tend to use ports versus binary packages
BinGOs gcc version 4.9.1 (Debian 4.9.1-2) Target: x86_64-kfreebsd-gnu :( 11:39
itz is dtrace in the nonfree repos? 11:40
BinGOs for which platform are we talking now?
itz kfreebsd 11:41
BinGOs I haven't got nonfree in my sources.list 11:42
and apt-cache search dtrace doesn't find it.
it's /usr/sbin/dtrace on my FreeBSD 10 box.
Woodi found in systemtap-sdt-dev
itz via apt-cache find strace? 11:43
errr
via apt-file find strace? even
Woodi "apt s dtrace" :) 11:46
Woodi sid main probably 11:47
BinGOs no strace.
You can install ktrace though
itz oh I have a JSON::Tiny test failure with moar and gcc 4.9 11:50
wonder if that's related
BinGOs right, set off the update of 44 CPAN tester perls, going to hang the laundry out. 11:51
FROGGS_ avuserow: your RC builds parrot 6.5.0 when it should build 6.6.0 13:21
dalek c: a6270f3 | (Steve Mynott)++ | bin/p6doc:
eval to EVAL to fix p6doc
13:43
c: de171af | (Steve Mynott)++ | / (2 files):
Str has moved under Type - fix docs and example
c: a869400 | (Steve Mynott)++ | / (2 files):
Str has moved under Type - fix docs and example better
c: b9e3791 | (Tobias Leich)++ | / (2 files):
Merge pull request #24 from stmuk/master

fix 1 reported issue with p6doc eval breakage and fix p6doc under star
moritz gives stmuk aka Steve Mynott push acccess 13:47
FROGGS_ (aka itz) 13:51
moritz itz++ 13:52
moritz Juerd: feather is Xen, right? 13:58
pmurias hi 14:15
why does nqp-moar use a incorrect sub MAIN signature?
FROGGS_ pmurias: what do you mean? 14:17
# XXX FIX ME
sub MAIN(@ARGS) {
?
moritz should be *@ARGS I guess 14:18
but I guess that nqp is less fancy than real Perl 6, and simply passes the arguments in as a single array
pmurias FROGGS_: yes 14:21
it's inconsitent across backends
moritz j: say 42 14:22
camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
moritz j: say 23 14:23
camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
FROGGS_ pmurias: you can try to change it... I'm not sure if it still needs to be that way 14:24
moritz j: say 1 14:25
camelia rakudo-jvm 506aae: OUTPUT«(timeout)»
moritz j is now officially borked. I've restarted the evalserver twice, and it still spooks around. 14:26
Ven 2spooky
moritz I've started to create github.com/perl6/infrastructure-doc . Patches and feedback welcome! 14:29
tadzik: ^^ it would be nice if you could document the panda meta data server there
colomon: ^^ it would be nice if you could document the emmentaler setup there 14:31
dalek p-js: 4c31fee | (Pawel Murias)++ | / (5 files):
Cross compile more of the compiler.
FROGGS_ ohh! 14:32
pmurias++
pmurias it's not yet the whole thing ;) 14:43
tadzik moritz: will do 14:45
moritz++ 14:46
[Coke] pmurias++ !! 15:09
dalek kudo-star-daily: 6204311 | coke++ | log/ (14 files):
today (automated commit)
15:11
rl6-roast-data: e1735ca | coke++ | / (5 files):
today (automated commit)
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 }
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
although i'd probably go with Ven's solution as well
Ven doesn't want to hear of c-like for loops ever again :) 15:30
we're in 2014, it's pretty terrible we're still teaching them
psch hey, i'm not advocating it, i'm just saying it exists :P
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
it being the list in $fh.IO.lines
ab5tract so using .kv is <3 15:32
psch there is $fh.ins, which replaces $. 15:35
m: for lines() { .say; last if $*IN.ins() > 2 }
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…»
psch wonders how long lines are in camelias STDIN
ab5tract: that's S28:187, fyi 15:37
synopsebot Link: perlcabal.org/syn/S28.html#line_187
timotimo m: lines>>.chars.Bag.say
camelia rakudo-moar 506aae: OUTPUT«bag(50, 70, 74, 78(2), 0(3), 72, 65(3), 84, 62, 64(2), 46, 37, 67, 73)␤»
timotimo psch: -^
psch timotimo: neat, so the s/\n/{ whatever that unicode symbol is}/ screwed me over there?
timotimo er, i don't know? 15:38
i don't know what ins() does
BenGoldberg m: for lines() { $*.ins().say }
camelia rakudo-moar 506aae: OUTPUT«===SORRY!=== Error while compiling /tmp/i7sEpaMB86␤Unsupported use of $* variable; in Perl 6 please use ^^ and $$␤at /tmp/i7sEpaMB86:1␤------> for lines() { ⏏$*.ins().say }␤ expecting any of:␤ stat…»
timotimo heh. 15:39
BenGoldberg m: for lines() { $*IN.ins().say }
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␤»
psch well, it works locally :)
timotimo: $fh.ins() does what $. did in perl5, which is "current line number for the last file handle accessed" 15:40
apparently not quite in some cases :)
timotimo i've never done any perl5 :)
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.
xfix r: gist.github.com/xfix/eac92872f14546c90996 15:41
camelia rakudo-{parrot,jvm,moar} 506aae: OUTPUT«gist not found»
xfix orly?
Hm, so it fails because KeySet was removed.
psch BenGoldberg: locally, even closing the handle doesn't reset .ins() 15:42
xfix What is KeySet these days?
BenGoldberg Ehh, beats me, then :)
xfix SetHash. 15:43
timotimo could be SetHash or MixHash
xfix Thanks.
timotimo hi xfix :)
xfix timotimo:++
I mean, timotimo++
xfix What was the difference between SetHash and MixHash? 15:44
Both work, so I assume I should use SetHash. 15:45
Ven yeah, camelia gisting is borked
timotimo i think one has Num values, the other Int? 15:46
xfix SetHash has booleans.
Which is what I want.
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....
ab5tract as the pattern holds regardless of whether its a file handle
colomon KeySet is now SetHash 15:47
psch ahh 15:48
nvm the "it works locally", i didn't test with $*IN but with an explicit filehandle
so camelia does what it does locally, which is not getting the line number from $*IN.ins()
where "it" is "perl6", not camelia 15:49
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:50
colomon timotimo: it's more about what emmentaler does; my code just automates running it every and then. 15:52
timotimo OK 15:53
colomon timotimo: though hmmm, I do appear to have commit privledge to it… ;)
colomon * automates running it every day and then provides a web interface to see the results 15:54
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:55
psch duhs 15:57
m: for lines() { .say; last if $*ARGFILES.ins() > 2 }
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í␤»
psch huhs
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...
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
ab5tract what is the significance of 'ARGFILES' here? 16:09
psch ab5tract: $*ARGFILES is commandline argument files
e.g. 'perl6 -e"say for $*ARGFILES.lines" onefile.txt secondfile.txt" 16:10
a bare "lines()" reads from $*ARGFILES 16:11
PerlJam perl6 16:13
ab5tract gotcha
Juerd moritz: No, kvm 16:51
moritz Juerd: ok, thanks 16:52
ab5tract psch: what is the way of using lines(), or something similar, with stdin (for piping a list to `perl6 -e`)? 17:07
i tried $*STDIN, because it seemed perlyish 17:08
psch ab5tract: STDIN from perl5 has been replaced with the dynamic variable $*IN 17:11
cf my previous blunder with calling .ins() on $*IN instead of $*ARGFILES
ab5tract thanks 17:13
perl6++ 17:17
TimToady We don't have a C-like for loop; we only have a C-like loop. :) 17:30
dalek p: e885561 | jnthn++ | tools/build/MOAR_REVISION:
Bump to latest MoarVM.
17:31
kudo/nom: 765f321 | jnthn++ | / (2 files):
Update ext ops to use new improved extop API.

Specify that many are pure, so spesh's dead code elimination can take care of them. Also, allow a spesh function to be supplied. Implement a basic one to toss redundant p6decontrv operations. Bump NQP_REVISION to get a MoarVM supporting this stuff.
17:33
timotimo that sounds lovely 17:42
atroxaper Hello, #perl6 ! 18:05
timotimo hey you :) 18:06
atroxaper timotimo: o/ 18:07
I finished some repairing of my house and I'm going to continue Pod::SAX :) 18:08
psch atroxaper o/
atroxaper psch: hi!
dalek p: a0b93ce | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
bump nqp's moar for new extop interface
18:15
Heuristic branch merge: pushed 178 commits to nqp/jvm_interop_dispatchers2 by timo
timotimo oops, i accidentally pushed that branch, too
i don't even know if i did anything with it in between 18:16
dalek kudo/nom: 0d19543 | (Timo Paulssen)++ | / (2 files):
new extop registration interface + nqp/moar version bump
Heuristic branch merge: pushed 626 commits to rakudo/jvm_interop_dispatchers by timo 18:17
timotimo ... ... ...
i should be using git push more carefully after this update.
atroxaper Is there better pattern for case: "my $var = @array[5] || 'value'; @array[5] = $var; $var = 'new value';"??
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.
timotimo: do you mean?: "@array[5] ||= "value"; my $var = @array[5];"? :) 18:19
timotimo maybe 18:20
i'm not 100% sure what you're looking for :)
that sounds like what you want; probably want //= instead
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
timotimo (|| is truthy-or and // is definedness-or) 18:21
psch that'd be somewhat like: @array[5] //= 'value'; $var = 'new value'
the reuse of $var confuses me :)
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?
or rather: do you have encompassing code that might make your intention clearer?
atroxaper It's for example. Some initial value. 18:23
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«===SORRY!=== Error while compiling /tmp/Aln3NfO2cV␤Variable '@array' is not declared␤at /tmp/Aln3NfO2cV:1␤------> r = [1, 2, Nil, 4]; my $var = (@array[2]⏏ //= 10); say $var; my $var = 5; say $va␤ expecting…»
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«===SORRY!===␤Unable to parse expression in parenthesized expression; couldn't find final ')' ␤at /tmp/IunuOigJpg:1␤------> = (@arr[3] //= 3; say @arr[3]; say $var;⏏<EOL>␤ expecting any of:␤ postfix…»
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;
camelia rakudo-moar 506aae: OUTPUT«Potential difficulties:␤ Redeclaration of symbol $var␤ at /tmp/HG7ltdsJUa:1␤ ------> r = (@arr[2] //= 10); say $var; my $var ⏏= 5; say $var; $var = (@arr[3] //= 3); s␤10␤5␤3␤3␤»
psch atroxaper: i still don't really understand what exactly you're trying to achieve; i have a feeling of XY-yness
dalek p: ddebfec | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
bump nqp's moar for new extop interface
timotimo is very naughty and force-pushes 18:26
dalek kudo/nom: 3ae17e5 | (Timo Paulssen)++ | / (2 files):
new extop registration interface + nqp/moar version bump
atroxaper psch: :) Maybe. I think i just need to use //=
psch: i was looking for shorter expression of my initial code :)
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
my main hang-up is with the first assignment to $var
psch if you're after truthiness you can of course just replace the // with || 18:29
atroxaper psch: thank you. :) really 18:30
psch atroxaper: i just elaborated on timotimo++s response, really ;)
atroxaper Sure. timotimo++ was right! 18:31
ab5tract m: my @a; my $var = @a[5] = "some value?"; 18:34
camelia ( no output )
ab5tract m: my @a; my $var = @a[5] = "some value?"; $var.say;
camelia rakudo-moar 506aae: OUTPUT«some value?␤»
ab5tract something like that atroxaper? 18:35
m: my @a; my $var = @a[5] = "some value?"; $var.say; @a[5].say;
camelia rakudo-moar 506aae: OUTPUT«some value?␤some value?␤»
atroxaper Oh...
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?␤»
atroxaper I've tried //= in REPL and found.... 18:36
m: my @array = ("v1', "v2"); my $var = (@array[5] //= 'value'); $var = 'new value'; say @array; 18:37
camelia rakudo-moar 506aae: OUTPUT«===SORRY!=== Error while compiling /tmp/7ST_Ozhmsx␤Two terms in a row␤at /tmp/7ST_Ozhmsx:1␤------> my @array = ("v1', "⏏v2"); my $var = (@array[5] //= 'value');␤ expecting any of:␤ postfix␤ …»
FROGGS[mobile] you mixed up the quotes 18:37
TimToady when in down, read the error message :) 18:38
*doubt
atroxaper m: my @array = ("v1", "v2"); my $var = (@array[5] //= 'value'); $var = 'new value'; say @array;
camelia rakudo-moar 506aae: OUTPUT«v1 v2 (Any) (Any) (Any) value␤»
FROGGS[mobile] don't read error messages when you are down :o)
atroxaper I wanted to change value of $var and corresponding @array element in the same time :) 18:39
I thought that is obvious :)
TimToady m: my @array = <v1 v2>; my $var := (@array[5] //= 'value'); $var = 'new value'; say @array;
camelia rakudo-moar 506aae: OUTPUT«v1 v2 (Any) (Any) (Any) new value␤»
FROGGS[mobile] well, it did that
atroxaper := ?! 18:40
TimToady you have to use := to make an alias
FROGGS[mobile] binding
atroxaper TimToady: Oh... I didn't know that at all :) 18:40
timotimo hello TimToady!
atroxaper Many thanks all of you! 18:41
TimToady hel timo <-- only seeing out of my left eye :)
FROGGS[mobile] right Lynn, the other one is left unused 18:42
err
rightly*
TimToady no, it's my right that's unused :P
FROGGS[mobile] *g*
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
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:48
masak reminds me of a scene in "Quicksilver" where Isaac Newton sticks a needle under his eyeball in order to understand optics better. 18:49
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
masak FROGGS[mobile]: you say that now, but reading the chapter itself is... visceral.
FROGGS[mobile] I'll have no time to read it then 18:51
TimToady Economics may be "the dismal science", but it makes for a pretty entertaining Baroque Cycle. 18:54
timotimo masak: "under" his eyeball? 18:55
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:56
the left and right motion went first... 18:57
shortly followed by the rotational motion ('roll', to an airplane pilot) 18:58
up and down was the last to go :)
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
timotimo wait ... you can actually roll your eyeballs? 18:59
TimToady yes, look in a mirror and tilt your head to the left or right 19:00
you'll see your eyes rotating to keep level
assuming they work right
'course that doesn't mean what people usually mean by that phrase 19:01
I mean it as in "roll, pitch, and yaw"
timotimo yes, i understood you the first time, but looked up "Flight dynamics" on wikipedia just to make sure 19:02
but ... wow, i didn't know eyes did that
though it seems like the effect isn't very strong
TimToady yes, it's really just fine tuning, and gives up on large changes
I suspect the main purpose is to make sure your two images line up, not to keep your eyes level 19:03
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
the opthamologist in the emergency room at UCLA kept exclaiming, "You talk just like an opthamologist!" :) 19:08
my paper file is about two inches thick now... 19:09
*opthalmologist
timotimo :) 19:10
TimToady was forgetting his greek...
timotimo eyes are really pretty fascinating
dalek kudo/nom: eeb7c32 | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
discover a bunch of facts about p6 extops for moarvm
19:34
p-js: 9228766 | (Pawel Murias)++ | src/vm/js/QAST/Compiler.nqp:
Fix bug when emitting js for cclass.
19:35
p-js: cd2f066 | (Pawel Murias)++ | src/vm/js/nqp-runtime-core/runtime.js:
Pass ctx to to_s in nqp::lc and nqp::uc.
p-js: 44f8c73 | (Pawel Murias)++ | TODO:
Start a TODO file.
vendethiel pmurias++ 19:36
masak oooooh
pmurias++
dalek kudo/nom: 7e6dd3f | (Timo Paulssen)++ | src/vm/moar/ops/perl6_ops.c:
remove debug output, discover known type of p6bool.
masak I think a JS Rakudo would be non-trivially awesome.
timotimo aye. 19:37
vendethiel it'd be far more than non-trivially so :)
dalek kudo/nom: 1d2bb62 | Mouq++ | src/Perl6/Actions.nqp:
Hack in @a[1;2] / %h{"a";"b"} support

Attempts to change semilist directly or use a different rule were breaking the build -- special-casing the behaviour in .[] and .{} is much simpler than tracking down all the faulty uses of <semilist> and making them all work with the change.
19:52
ast: d2d8343 | Mouq++ | S02-types/multi_dimensional_array.t:
Unfudge multidim sugar tests
20:00
jnthn Mouq++ 20:01
Mouq: Is the aim to converge on STDs handling in the end?
Mouq jnthn: Do you mean wrt semilist? 20:02
jnthn Yes
atroxaper Mouq++ 20:03
masak \o/
jnthn (I didn't look closely at how we're differing on semilist atm, just got the impression we are from the commit message)
Mouq jnthn: Because it appears that STD is incorrect there itself; it uses semilist where semilists don't make sense
jnthn Oh.
OK, Rakudo pushing STD changes is also fine :)
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:05
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
Mouq FROGGS++ btw \o/ 20:07
vendethiel .u Trademark 20:10
yoleaux U+2122 TRADE MARK SIGN [So] (™)
vendethiel yoleaux++ # <3
Mouq .u copy 20:11
yoleaux U+00A9 COPYRIGHT SIGN [So] (©)
U+2117 SOUND RECORDING COPYRIGHT [So] (℗)
U+32A2 CIRCLED IDEOGRAPH COPY [So] (㊢)
masak m: sub foo { my $a will leave { say $a.abs } = 4; say "hi" }; foo 20:36
camelia rakudo-moar 3ae17e: OUTPUT«===SORRY!=== Error while compiling /tmp/siuETQ0_Ky␤Variable '$a' is not declared␤at /tmp/siuETQ0_Ky:1␤------> sub foo { my $a will leave { say $a.abs⏏ } = 4; say "hi" }; foo␤ expecting any of:␤ met…»
masak m: sub foo { my $a will leave { say "bye" } = 4; say "hi" }; foo
camelia rakudo-moar 3ae17e: OUTPUT«hi␤bye␤»
masak why doesn't that first one work? 20:37
no, more specifically: why isn't $a declared inside that block?
jnthn Because the "will" is part of the declaration
And so we didn't update the symbol table yet 20:38
FROGGS_ that is like using a routine wihtin the routine... which works
jnthn But worse than that, I'm not sure the leave block there is working like a closure yet 20:38
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 $_
masak m: sub foo { my $a will leave { say $_.abs } = 4; say "hi" }; foo
camelia rakudo-moar 3ae17e: OUTPUT«hi␤use of uninitialized value of type Nil in numeric context in sub foo at /tmp/DUnLOXZc70:1␤␤0␤»
jnthn bah, no
I'm not sure how var traits like that are done tbh 20:40
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.
And I don't immediately have a good answer
masak ok.
jnthn Because traits are declarative things.
But here we want something to be per-variable at runtime, not per declaration. 20:41
FROGGS_ I have no clue how to proceed with that jsonrpc@parrot problem :/ 20:45
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)
but it was good at some point
like, two months ago or perhaps three 20:49
but yeah, I could build an older parrot
Mouq wonders why "compiling src/core/interp.o" always takes so long 21:28
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 '<
Ven Mouq: it's giving you more time to consider how you want to shoot yourself in the foot :P 21:44
dalek kudo/nom: 9a56a2c | jnthn++ | src/Perl6/Optimizer.nqp:
Disable an optimization on Moar that pessimizes.

What is on most backends a help gets in the way of spesh doing its thing with multi-dispatches and inlining. For now, just don't do it on Moar.
21:46
masak a first for me: using `given $obj -> (:$x, :$y, :$z) { ... }` to unpack an object's properties into a scope. 21:53
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.
cognominal nice idioms. 21:56
timotimo aye 21:57
Ven takes note
jnthn tries to remember what code he did that in :)
timotimo is running a few monthly rakudo version benchmarks
masak jnthn: hint: I'm improving it because I said I would. 21:58
jnthn oh, cool :)
dalek p: 68ebbd3 | (Timo Paulssen)++ | tools/build/MOAR_REVISION:
bump moarvm for proper extop discovery and inlinable lexotics
22:18
kudo/nom: 8db87b5 | (Timo Paulssen)++ | tools/build/NQP_REVISION:
bump for MoarVM with inlinable lexotics
22:20
dalek blets: 8e84439 | (Herbert Breunung)++ | docs/tablet- (3 files):
linking some related chapters
22:49
dalek blets: e3b2a65 | (Herbert Breunung)++ | docs/tablet- (2 files):
fixes by decasm++
23:10
dalek blets: f0e7205 | (Herbert Breunung)++ | docs/ (6 files):
the other fixes by decasm++
23:40