Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-11-09

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:00 petercommand joined #perl6
00:02 telex joined #perl6
00:03 timotimo aha!
00:03 timotimo i found out what happens! it's because push_s returns the string. and that has to be boxed and returned! or something.
00:03 pnu joined #perl6
00:03 danaj joined #perl6
00:04 firefish5000 joined #perl6
00:05 dalek nqp: fe35f5f | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
00:05 dalek nqp: dba used to box a whole lot of strings for its return value.
00:05 dalek nqp: review: https://github.com/perl6/nqp/commit/fe35f5fb18
00:06 xenoterracide joined #perl6
00:08 BenGoldberg If a function is called in sink context, does it's return value still get boxed?
00:09 timotimo sink context is run-time
00:09 timotimo if it gets inlined, that can throw away the return value stuff
00:09 BenGoldberg So !dba is run too early for sink detection, and that sort of optimization.
00:10 timotimo m: say "there's now only { 18495 / 28298 } as many BOOTStr allocations when building NQPP5QRegex.nqp"
00:10 camelia rakudo-moar 356393: OUTPUT«there's now only 0.653580 as many BOOTStr allocations when building NQPP5QRegex.nqp␤»
00:12 timotimo hm, it may be interesting to put a section into the profiler that shows how big exactly each instance of "an allocated thing" is
00:17 timotimo .o( cannot open the gc page of this profile run )
00:18 vendethiel timotimo++ :)
00:19 timotimo sadly, BOOTStr used to be like 5th place or so
00:19 BenGoldberg Better still, since some types of things vary in size (strings), put the average and standard deviation of the size
00:20 timotimo strings don't vary in size
00:20 timotimo the malloc'd data doesn't count into the heap
00:20 timotimo at least not in the profiler
00:20 timotimo and multiple BOOTStr instances can refer to the same MVMString
00:20 BenGoldberg Hmm
00:21 timotimo i need to do the profile again
00:22 BenGoldberg Surely there must be *some* way of profiling malloced data?
00:22 timotimo sure, we already have a MVM_malloc that does stuff for us
00:22 timotimo also, maxrss can be measured
00:30 timotimo er
00:30 timotimo i was wrong
00:30 timotimo apparently there's only a tiny change with that patch up there
00:31 timotimo i must have accidentally compared two totally different things?!
00:37 thou joined #perl6
00:49 timotimo i can no longer look at the allocation data. the browser will not react any more :\
01:03 timotimo m: say "Test.pm now allocates { 20132 / 28298 } as much as it used to do"
01:03 camelia rakudo-moar 356393: OUTPUT«Test.pm now allocates 0.711428 as much as it used to do␤»
01:03 timotimo well, cut more than a quarter out
01:04 timotimo BOOTStr used to be the 5th place
01:05 timotimo 7th place now
01:08 timotimo have been testing 15/67 while_pushme for about a hundred hours now ...
01:09 timotimo moar is now at 16.9 terabyte virtual memory
01:09 timotimo i decided to just kill that ...
01:15 timotimo i cannot actually measure a difference between with and without that patch, because i can't sort the routines list and i can't get the detailed listing of allocations and stuff
01:16 timotimo and the time taken in total is too short for taking accurate time measurements
01:16 timotimo well, at least i can see that the bytecode looks better.
01:24 jfredett joined #perl6
01:31 BenGoldberg Is there any way you could create a record of which method/subroutines produce a non-mu return value, which then gets boxed and thrown away?
01:33 BenGoldberg In other words, assume that there are more methods that can be improved the way you improved !dba, and find all of them.
01:37 timotimo good question
01:38 timotimo the problem is always that you have late boundness in methods etc
01:39 timotimo i have a few patches that remove tiny amounts of bytecode and local variables from the raw bytecode dump
01:40 dalek nqp: 05ffda4 | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
01:40 dalek nqp: tiny microoptimizations by removing superfluous return statements
01:40 dalek nqp: review: https://github.com/perl6/nqp/commit/05ffda41a5
01:44 timotimo probably no measurable effect, but i'm just killing time right now :)
01:49 BenGoldberg m: sub owch (\n, \d, \f) { d > 0 ?? [+] await do for ^f { start { owch n/f, d-1, f } } !! n }; say owch 42, 2, 2;
01:49 camelia rakudo-moar 356393: OUTPUT«42␤»
01:49 BenGoldberg m: sub owch (\n, \d, \f) { d > 0 ?? [+] await do for ^f { start { owch n/f, d-1, f } } !! n }; say owch 42, 2, 3;
01:49 camelia rakudo-moar 356393: OUTPUT«Memory allocation failed; could not allocate 8864 bytesMemory allocation failed; could not allocate 8864 bytes␤␤»
01:49 BenGoldberg m: sub owch (\n, \d, \f) { d > 0 ?? [+] await do for ^f { start { owch n/f, d-1, f } } !! n }; say owch 42, 3, 2;
01:49 camelia rakudo-moar 356393: OUTPUT«Memory allocation failed; could not allocate 8864 bytes␤»
02:17 xenoterracide_ joined #perl6
02:22 xinming joined #perl6
02:27 KCL joined #perl6
02:29 dalek rakudo/nom: a1b1030 | (Timo Paulssen)++ | src/core/stubs.pm:
02:29 dalek rakudo/nom: fewer churn for finding DYNAMIC in GLOBAL
02:29 dalek rakudo/nom:
02:29 dalek rakudo/nom: used to generate multiple getcurhllsym + getwho
02:29 dalek rakudo/nom: can't seem to get this to not create a lexical, though.
02:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a1b1030712
02:29 timotimo i hope bindlex + getlex is quicker than getcurhllsym + getwho + decont
02:38 tinyblak joined #perl6
02:40 timotimo hrm. we need better sink removal ...
02:41 timotimo take-rw and take try to sink the return value of &THROW, which has a 0 at the end just so that it doesn't have to sink anything (OSLT?)
02:41 timotimo and even --> int doesn't help
02:41 JimmyZ joined #perl6
02:42 JimmyZ Good morning
02:45 timotimo hey JimmyZ
02:45 JimmyZ hello timotimo :)
02:45 timotimo i don't know why the lookup to THROW is done via a string
02:45 tinyblak joined #perl6
02:45 JimmyZ pmichaud++ and jnthn++ did manage to get a better sink implementation
02:45 JimmyZ I don't know whether it converts this or not
02:45 timotimo er ... "get"?
02:45 timotimo i know they discussed how it can be much better
02:45 timotimo but they didn't implement it yet, right?
02:45 JimmyZ aye :)
02:45 JimmyZ oh, you was there :P
02:48 timotimo yup
02:49 timotimo hum, samewith seems to call flattenable_list and flattenable_hash two times in a row each
02:51 timotimo could be because it has *@args, *%args and then puts that back into a call over again
02:51 timotimo JimmyZ: do you want to try making take and take-rw and friends better by making the call to THROW less overheady?
02:52 JimmyZ I know nothing about it :(
02:53 timotimo fair enough :)
02:54 regreg joined #perl6
02:56 tinyblak_ joined #perl6
02:58 leont Possibly relevant for NFG: http://ucsx.org/
03:01 FROGGS[mobile] joined #perl6
03:04 dalek rakudo/nom: 2254a80 | (Timo Paulssen)++ | src/core/Block.pm:
03:04 dalek rakudo/nom: syntactic junctions are cheaper (due to unfolding)
03:04 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2254a8016a
03:05 * timotimo is desperately grasping for tiny performance improvements
03:10 travis-ci joined #perl6
03:10 travis-ci Rakudo build failed. Timo Paulssen 'syntactic junctions are cheaper (due to unfolding)'
03:10 travis-ci http://travis-ci.org/rakudo/rakudo/builds/40437046 https://github.com/rakudo/rakudo/c​ompare/a1b1030712b4...2254a8016aa2
03:10 travis-ci left #perl6
03:12 timotimo oh no :(
03:12 timotimo of course.
03:13 dalek rakudo/nom: 5742a81 | (Timo Paulssen)++ | src/core/Block.pm:
03:13 dalek rakudo/nom: we don't have infix:<|> this early in the setting.
03:13 dalek rakudo/nom:
03:13 dalek rakudo/nom: This reverts commit 2254a8016aa23475924901c4d899a9a7ad22fdb5.
03:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/5742a81c21
03:19 timotimo AFK
03:19 timotimo make me proud, JimmyZ :)
03:20 travis-ci joined #perl6
03:20 travis-ci Rakudo build passed. Timo Paulssen 'we don't have infix:<|> this early in the setting.
03:20 travis-ci http://travis-ci.org/rakudo/rakudo/builds/40437332 https://github.com/rakudo/rakudo/c​ompare/2254a8016aa2...5742a81c218f
03:20 travis-ci left #perl6
03:27 hightower4 joined #perl6
03:33 tinyblak joined #perl6
03:34 tinyblak_ joined #perl6
04:01 rmgk_ joined #perl6
04:02 dsm joined #perl6
04:02 dsm what's the 'typeof' operator of Perl 6?
04:03 geekosaur m: 3.WHAT.say
04:03 camelia rakudo-moar 356393: OUTPUT«(Int)␤»
04:04 Mouq joined #perl6
04:04 timotimo dsm: if you want to compare types, your best choice would be to use "$my_mystery_thing ~~ TheType"
04:04 dsm Thanks!
04:06 Mouq m: say 1.isa(Int)
04:06 yoleaux 6 Nov 2014 10:09Z <lucas_> Mouq: Thank you for the note.
04:06 camelia rakudo-moar 356393: OUTPUT«True␤»
04:11 timotimo recently i found someone whose code used .isa("Int") or something like that
04:12 timotimo turned that into isa(Int)  ... well, ~~ Int really, but it doesn't matter much
04:12 timotimo ran about 4x faster
04:19 Mouq timotimo: :O
04:19 Mouq FROGGS: How do you feel about https://gist.github.com/Mouq/427aad1a5a3817b765ea
04:54 jack_rabbit joined #perl6
04:57 xenoterracide_ joined #perl6
05:53 chenryn joined #perl6
05:59 xenoterracide_ joined #perl6
06:06 xenoterracide_ joined #perl6
06:20 regreg joined #perl6
06:30 jakesyl joined #perl6
06:50 kaare_ joined #perl6
07:11 Tekk_` joined #perl6
07:31 jfredett joined #perl6
07:36 rindolf joined #perl6
07:57 jfredett1 joined #perl6
08:01 chenryn joined #perl6
08:03 azawawi joined #perl6
08:04 gfldex joined #perl6
08:18 FROGGS Mouq: what it 'becomes' is not quite correct
08:18 anaeem1_ joined #perl6
08:18 darutoko joined #perl6
08:18 FROGGS Mouq: I'll push what I have so far...
08:21 sqirrel_ joined #perl6
08:21 FROGGS Mouq: https://github.com/FROGGS/p6-Slangy
08:22 FROGGS Mouq: this is how you would create a slang: https://github.com/FROGGS/p6-S​langy/blob/master/lib/COBOL.pm
08:22 FROGGS Mouq: and the test file shows its usage
08:23 FROGGS Mouq: this ends up being Any right now, wich is my current problem: https://github.com/FROGGS/p6-Slan​gy/blob/master/lib/Slangy.pm#L47
08:35 tinyblak joined #perl6
08:38 chenryn joined #perl6
08:40 psch joined #perl6
08:43 tinyblak joined #perl6
08:47 molaf_ joined #perl6
08:52 mirjam joined #perl6
08:54 psch hi #perl6 o/
08:54 psch lines 389-393 in S06-operator-overloading/sub.t only fail with unitialized $x, i.e. the multi candidate for one value is apparently missing
08:55 psch m: multi infix:<plus> { +$^a }; multi infix:<plus> { $^a + $^b };  my $x plus= 2; say $x; $x plus= 4; say $x
08:55 camelia rakudo-moar 5742a8: OUTPUT«Cannot call 'infix:<plus>'; none of these signatures match:␤:(Any $a)␤:(Any $a, Any $b)␤  in sub infix:<plus> at /tmp/jtV2pmY4b7:1␤  in block  at src/gen/m-CORE.setting:19449␤  in block <unit> at /tmp/jtV2pmY4b7:1␤␤»
08:56 psch oh, it doesn't multi them correctly?
08:56 psch guess there's more behind it :)
08:56 psch m: multi infix:<plus> { +$^a }; multi infix:<plus> { $^a + $^b };  my $x = 2; say $x; $x plus= 4; say $x # this works locally
08:56 camelia rakudo-moar 5742a8: OUTPUT«2␤6␤»
08:56 tinyblak_ joined #perl6
08:56 psch and apparently i didn't mess with it
08:59 Mouq joined #perl6
09:00 Mouq m: multi infix:<plus> { 0 }; multi infix:<plus> { +$^a }; multi infix:<plus> { $^a + $^b };  my $x plus= 2; say $x; $x plus= 4; say $x # psch
09:00 camelia rakudo-moar 5742a8: OUTPUT«2␤6␤»
09:01 Mouq autoviv tries to call &[plus]()
09:01 Mouq FROGGS: Cool! I forgot about you posting that as a gist some time back
09:03 psch Mouq: any idea how the test should in sub.t should look then? add a () candidate?
09:03 psch unless it should work without the () candidate, in that case the test is probably correct
09:06 Mouq psch: Hmm, I'd guess that test is more about plus= working in general, and $x should just be defined before plus= is called on it
09:07 psch Mouq++: makes sense to me, thanks
09:08 ugator joined #perl6
09:14 Mouq FROGGS: Here is one thing, though: Slang in that module is a whole new language by default. To me, "slang" seems to imply basing off of Perl 6's (or Regex's or Q's or whatever's) grammar by default, and this seems like it would be the most common use case
09:15 [1]rurban joined #perl6
09:23 sqirrel_ joined #perl6
09:26 FROGGS Mouq: yes, I agree
09:26 FROGGS though, I'd like to see inheriting from Perl 6 as optional
09:26 FROGGS for one because it is not quite possible yet
09:29 lizmat joined #perl6
09:34 psch m: &::["infix:<+>"].perl.say # is lookup actually supposed to work with []?
09:34 camelia rakudo-moar 5742a8: OUTPUT«===SORRY!===␤MVMArray: Index out of bounds␤»
09:35 psch m: &::("infix:<+>").perl.say # ...'cause this works
09:35 camelia rakudo-moar 5742a8: OUTPUT«sub infix:<+> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|70382000) ... }␤»
09:35 Mouq FROGGS: The only problem I get is that because of the `BEGIN say 'after2'`, COBOL fails to parse and Perl 6 apparently decides to go back into normal parse mode without a warning
09:37 FROGGS Mouq: I don't know the state of Slangy atm, it might that I changed something during debugging so that it breaks now
09:38 Mouq psch: Rakudo doesn't appear to parse &::[""] like it does &::("")
09:38 Mouq And neither does STD
09:39 psch whoops
09:39 psch that was me
09:39 psch sorry
09:40 camelia joined #perl6
09:40 psch Mouq: i take that to mean that ::[""] doesn't mean what ::("") means, which means we have an LTA and not a NYI there?
09:41 Mouq FROGGS: "this ends up being Any right now, wich is my current problem:" I was just trying to figure out the problem
09:46 Mouq psch: I don't know :/ I'm *guessing* LTA
09:47 FROGGS Mouq: ahh yes, probably the commented out &EXPORT in COBOL.pm would make it work again, but that's not what we want :o)
09:47 Mouq FROGGS: But it does work?
09:48 Mouq -        rule statementlist(|) { ';'? bb } +        rule statementlist(|) { ';'? bb | { die "bad COBOL" } }
09:48 * Mouq needs to get back into the habit of using irssi instead of webchat
09:49 chenryn joined #perl6
09:50 FROGGS Mouq: all what Slangy does is to check that the package that uses the 'slangy' keyword has a grammar and actions acttribute
09:54 virtualsue joined #perl6
09:55 Mouq Well, it also does the dirty work of installing &EXPORT into the namespace, which abstracts the process some. I'd argue that depending on how the slang is written it could either install a new language or just mixin to MAIN
09:56 Mouq And then I wonder if those things are distint enough to fit under the same name
09:57 lizmat some more sightseeing and then home&
09:57 Mouq e.g. `language COBOL;` vs `slang Tuxic`
09:58 Mouq 'night #perl6
10:02 FROGGS Mouq: exactly what I am thinking...
10:03 dalek rakudo/nom: 929c7b8 | rurban++ | tools/ (2 files):
10:03 dalek rakudo/nom: prepare for new parrot-ops2c
10:03 dalek rakudo/nom:
10:03 dalek rakudo/nom: with fallback if config{parrot::ops2c} does not exist, < parrot-6.9.0
10:03 dalek rakudo/nom: analog to nqp
10:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/929c7b8ab0
10:03 dalek rakudo/nom: acea0c1 | (Tobias Leich)++ | tools/ (2 files):
10:03 dalek rakudo/nom: Merge pull request #320 from rurban/parrot-ops2c
10:03 dalek rakudo/nom:
10:03 dalek rakudo/nom: prepare for new parrot-ops2c
10:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/acea0c1678
10:12 xtreak joined #perl6
10:13 xtreak perl6: int (1.6180 ** 656) / (5 ** 0.5)
10:13 camelia rakudo-{parrot,moar} 5742a8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Two terms in a rowâ�¤at /tmp/tmpfile:1â�¤------> [32mint [33mâ��[31m(1.6180 ** 656) / (5 ** 0.5)[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix stopperâ�¤       …»
10:13 chenryn joined #perl6
10:13 dalek rakudo/nom: e340863 | (Tobias Leich)++ | / (3 files):
10:13 dalek rakudo/nom: warn about clashing enum aliases, and also poison these aliases
10:13 dalek rakudo/nom:
10:13 dalek rakudo/nom: This resolves RT #72696.
10:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e340863189
10:13 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=72696
10:14 xtreak perl6: (1.6180 ** 656) / (5 ** 0.5)
10:15 camelia rakudo-{parrot,moar} 5742a8: ( no output )
10:15 xtreak perl6: say (1.6180 ** 656) / (5 ** 0.5)
10:15 camelia rakudo-{parrot,moar} 5742a8: OUTPUT«5.50075536558482e+136␤»
10:15 xtreak perl6: say round (1.6180 ** 656) / (5 ** 0.5)
10:15 camelia rakudo-parrot 5742a8: OUTPUT«550075536558482313499634688084426682366089​3665879927924502862063974799528422219312543014381​1359723592923595674647451438443260531852705792␤»
10:15 camelia ..rakudo-moar 5742a8: OUTPUT«-9223372036854775808␤»
10:17 xtreak On MoarVM when I try to round a large number it shows up a negative number is it a bug?
10:17 moritz yes
10:19 rurban parrot spectests: https://gist.github.com/ru​rban/f1a28dd98241a294e47c
10:19 xtreak Its a way to find the fibonacci number using golden ratio. It gives correct output on perl5 with bignum.
10:20 rurban The parrot GC bug is now fixed. Cpouldn
10:20 rurban Couldn't find other GC bugs even with very low memory
10:24 xtreak Where can I find the implementation of round function?
10:25 psch xtreak: src/core/Numeric.pm although the bug is probably somewhere deeper, seeing as it's backend specific
10:27 FROGGS xtreak: you might have to follow the involved nqp:: op through nqp to the MoarVM repo
10:27 FROGGS rurban: I'll test that in a few minutes... because I was not able to use panda with latest parrot yesterday or the day before that
10:29 dalek rakudo/nom: c904d49 | (Tobias Leich)++ | src/Perl6/Actions.nqp:
10:29 dalek rakudo/nom: do only poison enum aliases for redecls in same block
10:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c904d49b3e
10:29 xtreak Thanks psch and froggs
10:30 FROGGS xtreak: the good thing is that you can apply changes to MoarVM, without the need to rebuild nqp or rakudo
10:30 FROGGS so just hack the C code and run your perl6 one-liner again
10:30 tinyblak joined #perl6
10:31 dalek roast: fc3dc99 | (Tobias Leich)++ | S12-enums/basic.t:
10:31 dalek roast: add tests for enum alias poisoning, RT #72696
10:31 dalek roast: review: https://github.com/perl6/roast/commit/fc3dc9958e
10:31 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=72696
10:31 FROGGS m: enum S1 <a b c>; enum S2 <b c d>;
10:31 camelia rakudo-moar 5742a8: ( no output )
10:32 FROGGS okay, let's build a fresh parrot
10:34 spider-mario joined #perl6
10:34 masak good antenoon, #perl6
10:34 FROGGS hi masak
10:35 psch hi masak
10:35 FROGGS masak: I hope you like my latest bugfix :o)
10:35 FROGGS you'll*
10:36 spider-mario joined #perl6
10:37 xtreak I changed core/Numeric.pm the implementation to multi sub round(Numeric $a)         { 5; } # $a.round } but still round 34 gives 34 . Is there anyway to debug the core module function calls?
10:39 moritz xtreak: did you recompile rakudo?
10:39 FROGGS xtreak: try 34.3.round
10:39 xtreak It was said by froggs I dont need to rebuild MoarVM or nqp. So do I need to rebuild?
10:39 FROGGS otherwise you'll hit rakudo/src/core/Int.pm:71:    multi method round(Int:D:) { self }
10:40 fhelmberger joined #perl6
10:40 psch xtreak: when you only change moar you don't need to rebuild
10:40 psch xtreak: that is, moarvm, which is in nqp/MoarVM/src
10:41 psch (to be precise, when changing moarvm you only need to rebuild moarvm.  when changing anything in rakudo/src you need to rebuild rakudo, when changing anything in rakudo/nqp/src you need to rebuild nqp and rakudo)
10:41 FROGGS correct
10:42 moritz xtreak: when you modify the setting, you need to run 'make' in rakudo
10:43 xtreak How to rebuild it? run configure, make and make install ?
10:43 FROGGS xtreak: in case you only change something in rakudo, just do: make install
10:43 FROGGS ... in rakudo
10:50 psch 'sub a { }' doesn't seem to get a lexical container type, could that be right?
10:51 psch i got sidetracked during the colonpair stuff and got 'my &a; &a := { $^a + $^b }' working, but 'sub a { 1 }; &a := { 2 }' e.g. still dies
10:51 FROGGS m: sub a { }; say &a
10:51 camelia rakudo-moar 5742a8: OUTPUT«sub a () { #`(Sub|84781144) ... }␤»
10:52 FROGGS hmmm, I guess we want to install that symbol in this case too
10:52 psch i was thinking maybe it's our vs my, sub defaults to our iirc
10:52 psch but it should still appear as a lexical
10:54 psch oh, sub defaults to my says Actions.nqp:2512-ish
10:55 FROGGS only packages are our scoped by default
10:59 FROGGS rurban: I think parrot/HEAD really looks better
10:59 FROGGS I still have a problem in panda, but that seems to be due to our implementation of openpipe...
11:01 masak FROGGS: I do! <3
11:01 FROGGS :D
11:01 sqirrel_ joined #perl6
11:01 masak walk &
11:03 FROGGS ohh damn, the problem is that nqp::open on parrot does not inherit the env et all >.<
11:04 ggoebel111111114 joined #perl6
11:04 FROGGS I guess I want to implement pipe() in terms of shell()
11:05 moritz uhm
11:05 moritz it would be nice to have a shell option for pipe
11:05 moritz but it shouldn't be mandatory
11:06 moritz otherwise passing arguments to a pipe process becomes a nightmare in quoting again
11:08 FROGGS yeah, I also just recognized that it won't be doable just like that, since I need to get back a filehandle
11:12 tinyblak joined #perl6
11:12 FROGGS nqp: nqp::openpipe
11:12 camelia nqp-parrot: OUTPUT«Error while compiling op openpipe (source text: "nqp::openpipe"): No registered operation handler for 'openpipe'␤current instr.: 'as_post' pc 60830 (gen/parrot/stage2/QAST.pir:21698) (gen/parrot/stage2/QAST.nqp:3888)␤»
11:12 camelia ..nqp-jvm: OUTPUT«(signal ABRT)»
11:12 camelia ..nqp-moarvm: OUTPUT«Arg count 0 doesn't equal required operand count 5 for op 'openpipe'␤   at gen/moar/stage2/QAST.nqp:1466  (/home/camelia/rakudo-inst-2/languages/n​qp/lib/QAST.moarvm:compile_mastop:209)␤ from gen/moar/stage2/QAST.nqp:1682  (/home/camelia/rakudo-inst-2/languages…»
11:16 kurahaupo joined #perl6
11:22 denis_boyun_ joined #perl6
11:35 darutoko joined #perl6
11:43 tinyblak joined #perl6
11:43 itz m: my $c = Date.new('2012-12-24'); say $c.truncated-to(:month);
11:43 camelia rakudo-moar 5742a8: OUTPUT«Too few positionals passed; expected 2 arguments but got 1␤  in method truncated-to at src/gen/m-CORE.setting:17726␤  in block <unit> at /tmp/N5Vi0Qs3Ij:1␤␤»
11:47 denis_boyun joined #perl6
11:52 itz m: my $c = Date.new('2012-12-24'); say $c.truncated-to("month");
11:52 camelia rakudo-moar 5742a8: OUTPUT«2012-12-01␤»
11:52 itz hmm looks like the docs are wrong
11:55 itz or the code
11:55 SteppenII joined #perl6
11:57 zakharyas joined #perl6
12:02 psch i'm not really seeing how installing a container for subs should work :/
12:02 hightower4 joined #perl6
12:04 psch the container installs its own symbol as well i think?  i.e. there'd be quite a bit of rewriting in routine_def to be done
12:08 telex joined #perl6
12:10 psch welp, maybe i can figure it out later o/
12:11 * psch afk &
12:12 tinyblak joined #perl6
12:16 pnu joined #perl6
12:25 FROGGS moritz: it seems like camelia does not rebuild atm
12:25 FROGGS moritz: perhaps it is because nqp got changed?
12:27 sqirrel_ joined #perl6
12:34 chenryn joined #perl6
12:38 moritz FROGGS: something broke the parrot build
12:38 moritz cd src/vm/parrot/ops && /home/camelia/rakudo-inst-1/bin/ C --dynamic perl6.ops
12:38 moritz sh: /home/camelia/rakudo-inst-1/bin/: Is a directory
12:38 moritz my guess would be rurban++'s ops2c patch
12:39 FROGGS hmmm, yeah, I think so too
12:39 moritz +OPS2C            = $(PARROT_BIN_DIR)/@ops2c@$(EXE)
12:39 FROGGS so, we're lacking the default for ops2c
12:39 moritz if @ops2c@ is empty, that's what'd happen
12:40 moritz the question is just, why is it empty?
12:42 * moritz builds a parrot to debug
12:43 tinyblak joined #perl6
12:43 isBEKaml joined #perl6
12:46 moritz huh, works locally for me
13:00 jnthn Good [whatever you call the bit of the day when it's been 35 hours since you last got out of a bed], #perl6
13:00 yoleaux 8 Nov 2014 17:13Z <japhb> jnthn: `bench stress` and `bench diagnose` work now; try both with --verbose; html_plot output is missing, but others work (though html can be improved); you'll need IPC::Run in your perl5; let me know if you have problems.  :-)
13:00 * jnthn is home after vacation
13:01 isBEKaml jnthn: So, you haven't sleeping on beds... welcome back :-)
13:03 chenryn joined #perl6
13:04 jnthn isBEKaml: I "slept"ish on a flight...
13:05 FROGGS ohh, a bedlack
13:05 FROGGS hi jnthn
13:06 jnthn o/ FROGGS
13:07 * jnthn has no idea what's been going on in Perl 6 land of late.
13:07 jnthn Is everything finished yet? :)
13:07 colomon \o
13:07 FROGGS jnthn: https://fosdem.org/2015/sched​ule/event/get_ready_to_party/
13:08 jnthn That one made my *work* mail that I glanced a few moments ago :)
13:08 FROGGS jnthn: so we have still time to finish it :o)
13:10 jnthn Darn, so I still have to, like, work on stuff? :)
13:10 haroldwu joined #perl6
13:10 * jnthn will dig back in over the next week
13:10 jnthn Given my current lack of sleep, I don't think I'll trust myself to do much of anything today. ;)
13:11 FROGGS hehe
13:12 tinyblak joined #perl6
13:13 nwc10 jnthn: and did pre-holiday jnthn leave the beer fridge in a good way?
13:14 jnthn um...good question :)
13:14 jnthn He didn't! The moron!
13:15 jnthn Though, I'm pretty sure drinking a beer = fall asleep by this point :)
13:15 jnthn And I'd like to do that at a time that complies slightly better with local timezone :)
13:15 nwc10 aha.
13:15 nwc10 I managed to make a cup of tea this morning and fail to drink it
13:15 nwc10 sun + sofa
13:15 timotimo greetings, jnthn!
13:16 nwc10 anyway, it is good that you are back safely
13:18 jnthn Yes.
13:19 jnthn And airline++ managed to not lose my bag at any point during the trip too :)
13:19 jnthn (Vacation involved 4 flights, each of them having 2 legs, so there were 8 opportunities to screw it up, and they didn't. Phew. :))
13:20 timotimo good track record :)
13:20 jnthn Aye.
13:21 lucas_ joined #perl6
13:21 timotimo how close does our time and now come to Time::Hires on perl5?
13:21 jnthn Emirates++ in general: power socket, USB socket to charge devices, better food than most airlines I've used...and the cabin staff wear weird white thingies on their heads that make me smile. :)
13:22 jnthn timotimo: I think exposing the same thing the profiler uses to measure may be closer to Time::Hires...
13:22 timotimo time::hires also offers usleep and ualarm
13:23 timotimo should ualarm be exposed as an async thing?
13:23 jnthn .oO( Does it have usmile too? )
13:24 jnthn Dunno without looking at what primitive it boils down to.
13:26 vendethiel jnthn: 35 hours in bed? now that's what I call being in the matrix :-)
13:27 jnthn vendethiel: 35 hours *not* in bed :P
13:27 vendethiel oh :)
13:27 jnthn I feel mildly tired... :)
13:27 vendethiel 'thought you were so sleepless you skip the clock 1.5 times
13:28 JimmyZ WB, jnthn!
13:28 lucas_ Good day to everyone.
13:28 lucas_ If no one objects, I would like to continue with some specs changes, ok?
13:29 lucas_ If you mind reading, I've written some ideas here:
13:29 lucas_ https://gist.github.com/ano​nymous/b18d6d46975dbd6c06ec
13:29 lucas_ Leave your opinion if you're not here at the moment, I'll read the logs later. Thanks!
13:29 psch joined #perl6
13:33 rurban I believe I provided a proper default for ops2c for older parrots
13:36 anaeem1 joined #perl6
13:41 moritz m: say 42
13:41 camelia rakudo-moar 5742a8: OUTPUT«42␤»
13:42 tinyblak joined #perl6
13:43 dalek rakudo/nom: a0ed738 | moritz++ | tools/lib/NQP/Configure.pm:
13:43 dalek rakudo/nom: [Configure] try to be a bit more forthcoming with the ops2c default
13:43 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/a0ed738ec1
13:44 moritz lucas_: on the one hand, I applaud your efforst to make the synopsis easier to read
13:45 moritz lucas_: on the other hand, I think that they are solving the wrong problem (which is the lack of user-oriented docs)
13:54 tinyblak joined #perl6
13:57 lucas_ moritz: ok, thanks for the attention and opinion.
13:57 lucas_ moritz: BTW, thank you for the github invitation, moritz++. (I forgot to thank you before)
14:02 leont joined #perl6
14:04 tinyblak joined #perl6
14:06 tinyblak_ joined #perl6
14:16 tinyblak joined #perl6
14:28 KCL_ joined #perl6
14:31 anaeem1_ joined #perl6
14:42 tinyblak joined #perl6
14:46 xenoterracide_ joined #perl6
14:57 tinyblak_ joined #perl6
15:05 sqirrel_ joined #perl6
15:07 guru joined #perl6
15:30 colomon_ joined #perl6
15:30 denis_boyun_ joined #perl6
15:34 denis_boyun joined #perl6
15:38 colomon_ joined #perl6
15:42 spider-mario joined #perl6
15:53 masak m: class F { method postcircumfix:<( )>($cap) { say "lol, so callable!" } }; my $f = F.new; $f(); say $f ~~ Callable
15:53 camelia rakudo-moar 5742a8: OUTPUT«lol, so callable!␤False␤»
16:15 thou joined #perl6
16:20 jfredett joined #perl6
16:20 zakharyas joined #perl6
16:49 tinyblak joined #perl6
16:50 dalek nqp/openpipe: dd7f5b1 | (Tobias Leich)++ | src/vm/parrot/ (2 files):
16:50 dalek nqp/openpipe: first (explosive) attempt to port openpipe to nqp@parrot
16:50 dalek nqp/openpipe:
16:50 dalek nqp/openpipe: We need this op to actually open a pipe with a given CWD and ENV,
16:50 dalek nqp/openpipe: the open("rp") whih parrot provides does not let us pass these.
16:50 dalek nqp/openpipe: review: https://github.com/perl6/nqp/commit/dd7f5b1728
16:51 FROGGS that's what happens: https://gist.github.com/FR​OGGS/8c860b26a30f0cbbfa0d
16:51 FROGGS I'd love to get some insights/pointers from rurban++
16:53 FROGGS now I am goind to spectest the master branches with latest parrot, and in case this also works with panda/HEAD, I'll bump the parrot revision
16:53 FROGGS going*
17:01 arnsholt FROGGS: That's a very large chunk of memory Parrot wants to allocate
17:01 arnsholt Have you tried to trace where that number originates?
17:01 FROGGS arnsholt: no
17:01 arnsholt Probably worth a shot
17:01 FROGGS it is somehow triggered by nqp::readallfh
17:02 FROGGS yeah, will do that
17:02 arnsholt If you rebuild Parrot and NQP, with -g3 in the CFLAGS it should be possible
17:03 arnsholt Run it under GDB and set a breakpoint at the line indicated by the error message
17:04 FROGGS k
17:05 arnsholt At that point, the backtrace is probably a good starting point
17:12 * psch back for a bit o/
17:12 psch apparently the 'todo "huh"' tests in S06-operator-overloading/sub.t assume that qq[] calls prefix:<~>
17:13 psch but qq[] calls Stringy, and adding a method Stringy() { ~self } makes at least two of them pass \o/
17:14 FROGGS I really do like that new parrot revision, since panda works again! rurban++
17:14 psch m: class A { has $.bar; method Stringy { ~self } }; sub prefix:<~>(A $a) { $a.bar }; my $a = A.new(:bar("foo")); say "$a" # like this
17:14 camelia rakudo-moar 5742a8: OUTPUT«foo␤»
17:17 psch i'm not sure about the array tests a bit further in the file.  the look rather dubious to me.
17:18 psch m: class A { has $.bar; method Stringy { ~self } }; sub prefix:<~>(A $a) { $a.bar }; my $a = A.new(:bar("foo")); my @ar = ($a, $a, $a); my $res = ~@ar; say $res
17:18 camelia rakudo-moar 5742a8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/yTGMHrX9tjâ�¤Calling 'prefix:<~>' will never work with argument types (Positional)â�¤    Expected: :(A $a)â�¤at /tmp/yTGMHrX9tj:1â�¤------> [32moo")); my @ar = ($a, $a, $a); my $res = [33mâ��[31m…»
17:18 MilkmanDan joined #perl6
17:19 denis_boyun_ joined #perl6
17:20 dalek nqp: d74d5c5 | (Tobias Leich)++ | tools/build/PARROT_REVISION:
17:20 dalek nqp: bump parrot rev for a GC fix, rurban++
17:20 dalek nqp: review: https://github.com/perl6/nqp/commit/d74d5c5d31
17:21 dalek rakudo/nom: b1abc87 | (Tobias Leich)++ | tools/build/NQP_REVISION:
17:21 dalek rakudo/nom: bump nqp/parrot rev for a GC fix, rurban++
17:21 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b1abc87e5f
17:22 FROGGS p-spectest PASS \o/
17:23 timotimo way cool!
17:23 bartolin rurban++ FROGGS++
17:23 psch rurban++ FROGGS++
17:24 FROGGS I did nothing :o)
17:24 moritz m: say 1
17:24 camelia rakudo-moar 5742a8: OUTPUT«1␤»
17:24 FROGGS m: say $*PERL.compiler.build-date
17:24 camelia rakudo-moar 5742a8: OUTPUT«2014-11-09T05:14:01Z␤»
17:24 timotimo rurban++ # holding the fort
17:25 [Tux] joined #perl6
17:26 moritz wow, I didn't know that feature
17:26 psch was there a time where ~@a meant @a.map(&[~])? i can't explain this test in S06-operator-overloading/sub.t any other way...
17:28 zakharyas1 joined #perl6
17:29 moritz psch: which test?
17:29 psch moritz: S06-operator-overloading/sub.t:365
17:29 moritz (some of those tests might be old)
17:30 psch moritz: i suspect they're old and have been neglected; many are 'todo "huh"'
17:30 psch fsvo 'many' around 5 or so
17:30 moritz psch: yes, that looks wrong
17:31 moritz psch: though ~<<@foo should work
17:31 moritz psch: which IMHO is the only thing worth testing in that block
17:33 psch moritz: right, many &is and &lives_ok look rather unrelated to operator overloading.  i might as well clean that up a bit
17:36 ClarusCogitatio joined #perl6
17:39 kurahaupo joined #perl6
17:40 moritz also lives_ok is nearly always a sign that the test writer didn't actually know the desired result
17:40 moritz just knew that dying was wrong
17:50 FROGGS_ joined #perl6
17:55 ClarusCogitatio joined #perl6
17:56 xenoterracide_ joined #perl6
17:59 beastd joined #perl6
18:00 xenoterracide__ joined #perl6
18:01 raiph joined #perl6
18:06 dalek Perlito: 623f546 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
18:06 dalek Perlito: misc - add a dumper script
18:06 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/623f546054
18:07 dalek perl6-roast-data: 57dae72 | coke++ | / (5 files):
18:07 dalek perl6-roast-data: today (automated commit)
18:07 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/57dae72bb8
18:09 dalek roast: e8aa744 | (David Warring david.warring@gmail.com)++ | S05-mass/charsets.t:
18:09 dalek roast: unfudge 'blank chars' test on parrot
18:09 dalek roast: review: https://github.com/perl6/roast/commit/e8aa744dfd
18:09 dalek Perlito: a1320b0 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
18:09 dalek Perlito: misc - add a dumper script
18:09 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/a1320b08ca
18:11 dalek roast: 662c6bd | (Pepe Schwarz)++ | S06-operator-overloading/sub.t:
18:11 dalek roast: Remove a few unneccessary tests and correct useful ones.
18:11 dalek roast: review: https://github.com/perl6/roast/commit/662c6bdc27
18:11 * psch got distracted inbetween
18:11 psch the 4 'prefix:[]' pass with what i have in a branch locally, but i'm not sure if it's robust enough
18:14 psch i don't have remotes set up properly atm, so i offer a gist for review https://gist.github.com/pe​schwa/4b001dec921220da0051
18:20 psch joined #perl6
18:23 mirjam joined #perl6
18:25 moritz psch: nqp::unbox_s($ast[0].compile_time_value); looks wrong; not every QAST::Want has a Str as a compile-time value
18:27 moritz psch: the more general approach would be to use self.compile_time_evaluate, and then coerce the result to Str if necessary
18:28 psch moritz: i should call &compile_time_evaluate with the coercion to Str around the existing compile_time_value?
18:29 psch moritz: 'cause there's already a compile_time_value there. i guess checking for Ss would be sensible though
18:30 psch although, maybe i'm misunderstanding compile_time_evaluate and has_compile_time_value
18:31 moritz psch: well, you also add a branch that deals when when there's no compile time value
18:31 jfredett joined #perl6
18:31 xenoterracide__ joined #perl6
18:31 moritz psch: s/when/with/
18:31 * timotimo doesn't really know what to do right now
18:31 moritz psch: that branch is probably best replaced by compile_time_evaluate
18:32 psch moritz: right.  that's the constant case which should probably go until i have an actually sensible solution.
18:32 moritz psch: and since compile_time_evaluate also checks .has_compile_time_value, you can do both branches with it right away
18:32 moritz so, you'll get some object back from compile_time_evaluate
18:32 psch moritz: that somehow doesn't work with a QAST::Stmts that holds a QAST::Var - compile_time_evaluate that is
18:33 moritz if it's not a Str, call .Str on it; then unbox
18:33 moritz psch: is that the declaration QAST:Stmts thingy?
18:33 psch there was some discussion with FROGGS_ yesterday about this.  'constant $foo = "foo"' has a compile_time_value in the corresponding declarator sub, but doesn't have one anymore when it arrives in that bit of nibble_to_str
18:34 moritz afk, child is hungry&
18:34 psch which is why i tried the find_symbol hack
18:34 psch which kinda-sorta works...
18:35 psch i guess the final insight here is probably that i should understand more before trying to implement things, but understanding works best by fiddling with it... :)
18:35 psch timotimo: if you want you can review my cliparser PR ;p
18:35 timotimo i don't think that falls into my area of expertise :\
18:36 psch timotimo: or you could improve my perl6 implementation of the H6809 which i'm learning asm on at uni
18:36 psch i don't really recommend the latter
18:37 timotimo i once built an implementation for a stupid imaginary processor in python
18:37 timotimo along with a little IDE
18:37 geekosaur 6809s are still around?
18:37 timotimo it was binary-compatible with the existing compiler
18:37 psch geekosaur: well, the one we use at uni is some subset
18:38 psch https://github.com/peschwa/H6809/bl​ob/master/lib/ASM/H6809/CPU.pm6#L36 to line 125 has the opcode declarations, which is noticeably smaller than the real datasheet
18:39 timotimo how well does it run?
18:39 timotimo does it jit well? :)
18:40 timotimo the use of dynamic variables all over must be kinda bad
18:40 japhb They're teaching on 6809s?!  That's the first CPU I really learned the assembly language for.  That it's still seeing some love in an academic environment is just wicked cool to me.
18:42 timotimo japhb: i've got results for the stress tests, but don't really know what to do with them. i guess . means pass, the little unicode clock means timeout and the third icon means crash?
18:42 psch timotimo: the grammar is horrible, imo.  performance seems meh, i don't want to profile on this machine
18:43 japhb timotimo: OK, so as I understand it, you've got two current actual bugs (as opposed to feature requests) in perl6-bench: an undef warning for $timeout, and the pushme test infinilooping ...?
18:43 psch it's still the mentioned laptop
18:43 japhb timotimo: Icons defined at the top of analyze
18:44 timotimo that's correct
18:44 psch moritz: afaiu the QAST::Stmts that arrives in nibble_to_str isn't the declaration of the constant, but the use of it
18:44 timotimo i can't run benchmarks any more, because the bench run always hangs when it encounters pushme
18:44 timotimo and i don't actually see a perl6 process in the process tree that i could kill
18:44 timotimo which confuses me greatly
18:46 * psch afk &
18:48 kernel joined #perl6
18:52 moritz m: say $*PERL.compiler.build-date
18:52 camelia rakudo-moar b1abc8: OUTPUT«2014-11-09T18:24:18Z␤»
18:52 moritz that looks like the newest rakudo. So automatic rebuild finally seems to work again \o/
18:53 FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; # \o/
18:53 camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol b and câ�¤    at /tmp/HdwgRogmbN:1â�¤    ------> [32menum S1 <a b c>; enum S2 <b c d>[33mâ��[31m; # \o/[0mâ�¤Â»
18:53 FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; say a# \o/
18:53 camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol b and câ�¤    at /tmp/CWrFedctb1:1â�¤    ------> [32menum S1 <a b c>; enum S2 <b c d>[33mâ��[31m; say a# \o/[0mâ�¤aâ�¤Â»
18:53 FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; say b # \o/
18:53 camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol b and câ�¤    at /tmp/gWBRLwW7D7:1â�¤    ------> [32menum S1 <a b c>; enum S2 <b c d>[33mâ��[31m; say b # \o/[0mâ�¤Cannot use poisoned alias b, because it was declared by several enums.â�¤Please acc…»
18:53 moritz FROGGS_++
18:53 FROGGS_ :D
18:54 FROGGS_ sometimes I really do like my patches
18:54 FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; say b ~~ Failure
18:54 camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:â�¤    Redeclaration of symbol b and câ�¤    at /tmp/NBo6AwA89H:1â�¤    ------> [32menum S1 <a b c>; enum S2 <b c d>[33mâ��[31m; say b ~~ Failure[0mâ�¤Trueâ�¤Â»
18:55 FROGGS_ I think that's the first poisoned thingy of its kind
18:56 FROGGS_ m: enum S1 <a b c>; { enum S2 <b c d>; say b ~~ Failure }
18:56 camelia rakudo-moar b1abc8: OUTPUT«False␤»
19:15 dalek Perlito: 74adb31 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
19:15 dalek Perlito: misc - add a dumper script
19:15 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/74adb31181
19:19 davido___ joined #perl6
19:19 dalek perl6-bench: 30f1006 | (Geoffrey Broadwell)++ | timeall:
19:19 dalek perl6-bench: Get rid of undef warning (a leftover from an earlier design)
19:19 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/30f10063e2
19:22 Pleiades` joined #perl6
19:23 Sqirrel joined #perl6
19:28 grondilu joined #perl6
19:37 Mouq joined #perl6
19:41 spider-mario joined #perl6
19:47 dalek Perlito: 164076c | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
19:47 dalek Perlito: misc - dumper script tweak
19:47 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/164076c007
19:48 Mouq m: sub g($l = "o") { my $gist = &g.can("gist")[0]; once $gist.wrap({ "g" }); $gist.wrap({ callsame() ~ $l }); &g }; say g()()("al")
19:48 camelia rakudo-moar b1abc8: OUTPUT«gooal␤»
19:48 Mouq m: sub g($a=0,$c=0){$a&&"g{"o"x$c}$a"||sub ($a=0,$ç=$c+1){g($a,$ç)}}; say g()()("al")
19:48 camelia rakudo-moar b1abc8: OUTPUT«gooal␤»
19:49 Mouq (second one from https://github.com/eatnumber1/goal/bl​ob/master/solved/python/jhgg/goal.py)
19:55 psch joined #perl6
20:01 ClarusCogitatio joined #perl6
20:10 ClarusCogitatio joined #perl6
20:13 xenoterracide__ joined #perl6
20:16 mirjam joined #perl6
20:17 ClarusCogitatio joined #perl6
20:18 arnsholt Oh, Python >.<
20:18 telex joined #perl6
20:18 psch Mouq++: the callsame one is similar but cleverer to/than my $?ROUTINE one on the repo
20:18 arnsholt Apparently the exponentiation operator has *different* precedence on the LHS and RHS >.<
20:21 arnsholt No, wait
20:21 arnsholt "The power operator binds more tightly than unary operators on its left; it binds less tightly than unary operators on its right." only means that unary operators are allowed directly after **
20:22 moritz wtbh.
20:22 arnsholt -x ** -y only has a single parse, because -(x**-)y makes no sense
20:22 arnsholt moritz: wtbh?
20:23 dalek Perlito: 0fe6c3a | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
20:23 dalek Perlito: misc - dumper script tweak
20:23 dalek Perlito: review: https://github.com/fglock/​Perlito/commit/0fe6c3a9c9
20:23 arnsholt And specifying the associativity is for wimps
20:23 moritz arnsholt: "what the bloody hell"
20:24 arnsholt My reaction exactly
20:24 arnsholt Thankfully it was just a weird phrasing
20:24 ClarusCogitatio joined #perl6
20:28 Mouq psch: Hah, thanks, but I'd maybe say *differently* clever :)
20:30 moritz arnsholt: so it's not so weird after all?
20:31 arnsholt Yeah
20:32 arnsholt The only unaries are prefix unaries, so the precedence of ** relative to those doesn't really matter
20:34 ClarusCogitatio joined #perl6
20:41 ClarusCogitatio joined #perl6
20:41 pecastro joined #perl6
20:43 masak TimToady: will there be a "Programming Perl 6" book in 2015?
20:43 psch joined #perl6
20:43 immortal joined #perl6
20:44 masak arnsholt, moritz: binary operators *do* bind less tightly than unary operators on their right...
20:44 masak ...but only obviously/trivially so, as you rightly point out.
20:45 masak that is, any other possibility is zany and trivially dismissed.
20:45 masak this is just the same as saying that unary operators have a natural affinity to what's to the right of them :)
20:45 masak unary prefix operators, I should say.
20:47 arnsholt Yah
20:47 masak I can see two non-zany options, though:
20:47 masak (a) unary operators bind quite tightly (as in Perl 6)
20:48 masak (b) unary operators are more like listops
20:48 arnsholt It was just the statement of "different precedence on left and right" which made me go "how am I ever going to make this work with HLL::Grammar's EXPR?"
20:48 masak I can't think of a language that has chosen the (b) approach.
20:49 leont masak: the real question is, what kind of butterfly would it have on it's front ;-)
20:49 dalek roast: 97b731e | usev6++ | S05-metasyntax/repeat.t:
20:49 dalek roast: Unfudge passing tests for RT #111956
20:49 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=111956
20:49 dalek roast: review: https://github.com/perl6/roast/commit/97b731e46e
20:50 moritz unary postfixes on the left, and unary prefixes on the right
20:51 masak moritz: sounds like the start of a cheerleading chant.
20:51 arnsholt Hmm. I'm noticing a couple of undocumented NQP ops
20:52 masak moritz: give me a P! give me an R! [ten minutes later] PRECEDENCE AND ASSOCIATIVITY!
20:53 masak arnsholt: the second rule of undocumented NQP ops is *we do not talk* about the undocumented NQP ops.
20:53 masak :P
20:54 moritz except when the talk is commits that document them
20:54 masak that's acceptable, yes.
20:55 arnsholt Yeah, I just need to figure out how they work before I document them =D
20:56 arnsholt Or I can actually doc one of them
21:00 arnsholt Hmm. I guess the control op is only sort of an NQP op
21:00 arnsholt Doesn't look like it can really be used from NQP directly, but it's quite important for a language implementer =)
21:03 anaeem1 joined #perl6
21:04 ClarusCogitatio joined #perl6
21:07 dalek nqp: 12f9f84 | (Arne Skjærholt)++ | docs/ops.markdown:
21:07 dalek nqp: Document control QAST op.
21:07 dalek nqp: review: https://github.com/perl6/nqp/commit/12f9f845ef
21:08 thou joined #perl6
21:12 ClarusCogitatio joined #perl6
21:12 dalek roast: d6e7e47 | usev6++ | S02-lexical-conventions/unicode.t:
21:12 dalek roast: Unfudge passing tests (RT #122341)
21:12 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=122341
21:12 dalek roast: review: https://github.com/perl6/roast/commit/d6e7e47647
21:14 guru joined #perl6
21:18 masak 'night, #perl6
21:25 ugator m: for @a{$_.say;}
21:25 camelia rakudo-moar b1abc8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/uh0ozjiGTVâ�¤Variable '@a' is not declaredâ�¤at /tmp/uh0ozjiGTV:1â�¤------> [32mfor @a{$_.say;}[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        statement endâ�¤  â€¦Â»
21:25 ugator does the whitespace before {} has to be obligatory?
21:27 denis_boyun_ joined #perl6
21:27 ugator m: @a=(1,2,3); for @a{$_.say;}
21:27 camelia rakudo-moar b1abc8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9eP1lpgDC4â�¤Variable '@a' is not declaredâ�¤at /tmp/9eP1lpgDC4:1â�¤------> [32m@a[33mâ��[31m=(1,2,3); for @a{$_.say;}[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:27 Mouq ugator: Note that %h{"foo"} is the way hashes are accessed
21:27 Mouq m: my @a = 1,2,3; for @a { .say }
21:27 camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
21:28 Mouq m: my @a = 1,2,3; my %h = foo => @a; for %h{"foo"} { .say }
21:28 camelia rakudo-moar b1abc8: OUTPUT«1 2 3␤»
21:28 Mouq m: my @a = 1,2,3; my %h = foo => @a; for @%h{"foo"} { .say }
21:28 camelia rakudo-moar b1abc8: OUTPUT«postcircumfix:<{ }> not defined for type List␤  in method gist at src/gen/m-CORE.setting:13716␤  in sub say at src/gen/m-CORE.setting:16392␤  in method say at src/gen/m-CORE.setting:1143␤  in block <unit> at /tmp/5TstbjXbOJ:1␤␤»
21:28 Mouq m: my @a = 1,2,3; my %h = foo => @a; for @(%h{"foo"}) { .say }
21:28 camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
21:29 timotimo yeah, that's postcircumfix operators
21:29 timotimo we enforce whitespace in more places than perl5 used to
21:29 ugator ok... but my example should be closer to the normal standard ?
21:29 timotimo which one where what?
21:30 ugator m: @a=(1,2,3); for @a {.say;}
21:30 camelia rakudo-moar b1abc8: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/dVUknuEpUpâ�¤Variable '@a' is not declaredâ�¤at /tmp/dVUknuEpUp:1â�¤------> [32m@a[33mâ��[31m=(1,2,3); for @a {.say;}[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:30 psch m: 6; @a=(1,2,3); for @a {.say}
21:30 camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
21:30 timotimo you can also .say for @a
21:30 psch ugator: a bare 6 as first statement gives you lax mode
21:31 psch ugator: otherwise perl6 is strict by default
21:31 timotimo is that implemented already?
21:31 dalek roast: 282b062 | usev6++ | S0 (3 files):
21:31 dalek roast: Unfudge some more passing tests for Parrot
21:31 dalek roast: review: https://github.com/perl6/roast/commit/282b062c1c
21:32 ugator so enforcing whitespaces is wanted in perl6?
21:32 psch timotimo: well, i think so, camelia does it :)
21:32 timotimo oh
21:32 timotimo interesting
21:32 Mouq ugator: It's about how Perl 6 is parsed
21:33 Mouq ugator: If Perl 6 had parenthesis between `for` and the block, it'd be different
21:33 psch timotimo: the REPL is lax by default as well, which i think was mentioned a few days back?
21:33 psch although that's not as-specced
21:33 Mouq like `for (@a){ .say }`
21:34 Mouq or even `for(@a){ .say }`
21:34 timotimo yes, the repl is
21:34 Mouq But these things don't work in Perl 6 because it was decided it would be better to enforce whitespace than to enforce parenthesis
21:34 psch FROGGS++ put it all in in more-or-less one go, iirc
21:35 ugator why not both?
21:35 ugator would be closer to perl5?
21:35 Mouq m: my @a = 1, 2, 3; sub for ($_) { .say }; for @a { for("$_!") }
21:35 camelia rakudo-moar b1abc8: OUTPUT«1!␤2!␤3!␤»
21:36 timotimo isn't that what tuxish p6 is?
21:36 japhb ugator: "closer to perl5" has not been a goal for as long as I can remember.  "Feels like Perl" is more the goal.
21:36 timotimo ugator: how do you iterate over a hash then?
21:36 timotimo for %hash{ .say }?
21:37 ugator for (%hash){}?
21:37 timotimo and if so, how do you get something out of a hash
21:37 timotimo eew
21:37 ugator ok :D seems you guys settled on that? ^^
21:38 kurahaupo1 joined #perl6
21:38 Mouq ugator: Well, because that would be a pain :P `for ^4 {.say}` would be ok, but `for (^4).map(*+1) { .say }` would fail
21:38 psch and iterating over the array in the hash in key $k is for ((%hash){$k}) { }
21:38 psch oh wait
21:38 psch and iterating over the array in the hash in key $k is for (@((%hash){$k})) { }
21:38 psch there
21:38 psch (could've maybe removed a bit of the line...)
21:39 Mouq ugator: I think removing the parens was one of the first decisions about P6
21:39 ugator when you iterate over the array in the hash in key $k, you might be doing smthing wrong
21:39 ugator oh ok^^
21:41 Mouq m: loop (my $i = 0; $i < 15; $i++) { say $i } # only one that needs parens, rarely used
21:41 camelia rakudo-moar b1abc8: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤»
21:42 Mouq m: for 0..^15 { .say }
21:42 camelia rakudo-moar b1abc8: OUTPUT«0␤1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤11␤12␤13␤14␤»
21:45 psch Mouq: you've thought about **, does [[1,2,3],[4,5,6]].map([+] **) seem reasonable to you?
21:45 psch m: [[1,2,3],[4,5,6]].map({ [+] @^a }) # similary to this
21:45 camelia rakudo-moar b1abc8: ( no output )
21:46 psch m: say [[1,2,3],[4,5,6]].map({ [+] @^a }) # similary to this
21:46 camelia rakudo-moar b1abc8: OUTPUT«6 15␤»
21:46 psch where ** is HyperWhatever, not infix:<**>
21:48 xenoterracide joined #perl6
21:48 Alina-malina joined #perl6
21:49 Mouq psch: Honestly, ** isn't very clearly thought out; I just tried to implement the little bit of spec on it. But it basically means .map(Whatever). So in this case that should really be [[1,2,3],[4,5,6]].map([+] *), except that * doesn't curry anything listop-y
21:50 cognominal joined #perl6
21:50 Mouq So [[1,2,3],[4,5,6]].map(*.&sum) or (**.&sum)([1,2,3],[4,5,6]) would work assuming &sum is defined
21:52 psch Mouq: so, assuming * would curry listops, [[1,2,3],[4,5,6]].map([+] *) would give (6, 15) and [[1,2,3],[4,5,6]].map([+] **) would give 21?
21:52 psch the merits of * currying listops aside
21:54 Mouq m: say [[1,2,3],[4,5,6]].map(->$l{[+] $l}) # [+] *
21:54 camelia rakudo-moar b1abc8: OUTPUT«3 3␤»
21:54 Mouq m: say [[1,2,3],[4,5,6]].map(->*@a{->$l{[+] $l}}) # [+] **
21:54 camelia rakudo-moar b1abc8: OUTPUT«-> ($l) { #`(Block|66444672) ... } -> ($l) { #`(Block|66444736) ... }␤»
21:54 Mouq m: say [[1,2,3],[4,5,6]].map(->*@a{map ->$l{[+] $l}, @a}) # [+] **
21:54 camelia rakudo-moar b1abc8: OUTPUT«3 3␤»
21:55 psch oh, right.  Whatever never does anything listy
21:57 psch *WhateverCode
21:57 psch hm, with @^a we probably don't need it either
22:00 Alina-malina joined #perl6
22:01 Mouq Honestly, I don't really see the use-case of HyperWhateverCode. If you come up with a different meaning, the spec is still pretty slushy there
22:07 jepeway-wm joined #perl6
22:08 jepeway-wm howdy, #p6
22:10 psch i don't really see use-cases either, but i feel similarly about *.  everything that's not e.g. subscript feels clearer with a closure with implicit parameters to me
22:10 * jepeway-wm wants to share short anecdote re learning p6
22:10 psch i.e. autopriming seems rather magic-y
22:11 * psch stops rambling
22:12 dalek roast: 22a9881 | usev6++ | S14-roles/mixin.t:
22:12 dalek roast: Add test for RT #119371
22:12 dalek roast: review: https://github.com/perl6/roast/commit/22a988135a
22:12 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=119371
22:14 jepeway-wm I was kinda sad about sigil invariance & thought that $a[0] was grand and sensible and, besides, I'd typed that for decades.
22:14 dalek perl6-bench: 77abc8b | (Geoffrey Broadwell)++ | timeall:
22:14 dalek perl6-bench: Add a has-expected tag to tests that have an 'expected' setting
22:14 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/77abc8bef4
22:14 dalek perl6-bench: 65539f1 | (Geoffrey Broadwell)++ | minibenchmarks.pl:
22:14 dalek perl6-bench: Add expected subs for rc-man-or-boy-test and rc-9-billion-names; minor line reordering to make configs more consistent
22:14 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/65539f1e8f
22:17 jepeway-wm this past week, I banged out some sysadmin-y p5, and, what with the wee bit o' p6 I've written, found I could not stop typing @a[0] & %h{'eek'}
22:19 jepeway-wm so, hindbrain digs sigil invariance, and I guess forebrain better get used to that
22:21 lizmat joined #perl6
22:37 mirjam why do we call splice splice, when it's really just a fill?
22:38 raydiak mirjam: what do you mean?
22:41 Possum joined #perl6
22:44 raydiak m: say my @a = "A".."D"; my @b = @a.splice(1,2); @a.say; @a.splice(1, 0, @b); @a.say;
22:44 camelia rakudo-moar b1abc8: OUTPUT«A B C D␤A D␤A B C D␤»
22:46 woolfy joined #perl6
22:50 hightower4 joined #perl6
22:55 kurahaupo_ joined #perl6
22:57 thou joined #perl6
23:00 Alina-malina joined #perl6
23:04 mirjam interesting. so it's just parrot's splice which is not splicing
23:05 raydiak p: say my @a = "A".."D"; my @b = @a.splice(1,2); @a.say; @a.splice(1, 0, @b); @a.say;
23:05 camelia rakudo-parrot b1abc8: OUTPUT«A B C D␤A D␤A B C D␤»
23:16 dalek nqp: ee2ca3a | (Tobias Leich)++ | src/vm/parrot/ (25 files):
23:16 dalek nqp: silence most warning when building on parrot, fixes #198
23:16 dalek nqp: review: https://github.com/perl6/nqp/commit/ee2ca3aac6
23:17 dalek rakudo/nom: 72703bf | (Tobias Leich)++ | / (5 files):
23:17 dalek rakudo/nom: bump nqp rev and fix more warnings
23:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/72703bf358
23:21 FROGGS_ yay, the nqp issue 198 "just" took about 4.5 hours :/
23:24 chenryn joined #perl6
23:30 FROGGS_ gnight
23:49 BenGoldberg joined #perl6
23:53 cooper_ joined #perl6

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

Perl 6 | Reference Documentation | Rakudo