»ö« 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.
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
dalek p: fe35f5f | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
dba used to box a whole lot of strings for its return value.
00:05
BenGoldberg If a function is called in sink context, does it's return value still get boxed? 00:08
timotimo sink context is run-time 00:09
if it gets inlined, that can throw away the return value stuff
BenGoldberg So !dba is run too early for sink detection, and that sort of optimization.
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␤»
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:12
.o( cannot open the gc page of this profile run ) 00:17
vendethiel timotimo++ :) 00:18
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:19
timotimo strings don't vary in size 00:20
the malloc'd data doesn't count into the heap
at least not in the profiler
and multiple BOOTStr instances can refer to the same MVMString
BenGoldberg Hmm
timotimo i need to do the profile again 00:21
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
also, maxrss can be measured
er 00:30
i was wrong
apparently there's only a tiny change with that patch up there
i must have accidentally compared two totally different things?! 00:31
timotimo i can no longer look at the allocation data. the browser will not react any more :\ 00:49
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␤»
timotimo well, cut more than a quarter out
BOOTStr used to be the 5th place 01:04
7th place now 01:05
have been testing 15/67 while_pushme for about a hundred hours now ... 01:08
moar is now at 16.9 terabyte virtual memory 01:09
i decided to just kill that ...
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:15
and the time taken in total is too short for taking accurate time measurements 01:16
well, at least i can see that the bytecode looks better.
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:31
In other words, assume that there are more methods that can be improved the way you improved !dba, and find all of them. 01:33
timotimo good question 01:37
the problem is always that you have late boundness in methods etc 01:38
i have a few patches that remove tiny amounts of bytecode and local variables from the raw bytecode dump 01:39
dalek p: 05ffda4 | (Timo Paulssen)++ | src/QRegex/Cursor.nqp:
tiny microoptimizations by removing superfluous return statements
01:40
timotimo probably no measurable effect, but i'm just killing time right now :) 01:44
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␤»
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;
camelia rakudo-moar 356393: OUTPUT«Memory allocation failed; could not allocate 8864 bytesMemory allocation failed; could not allocate 8864 bytes␤␤»
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;
camelia rakudo-moar 356393: OUTPUT«Memory allocation failed; could not allocate 8864 bytes␤»
dalek kudo/nom: a1b1030 | (Timo Paulssen)++ | src/core/stubs.pm:
fewer churn for finding DYNAMIC in GLOBAL

used to generate multiple getcurhllsym + getwho can't seem to get this to not create a lexical, though.
02:29
timotimo i hope bindlex + getlex is quicker than getcurhllsym + getwho + decont
timotimo hrm. we need better sink removal ... 02:40
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
and even --> int doesn't help
JimmyZ Good morning 02:42
timotimo hey JimmyZ
JimmyZ hello timotimo :)
timotimo i don't know why the lookup to THROW is done via a string 02:43
JimmyZ pmichaud++ and jnthn++ did manage to get a better sink implementation 02:43
I don't know whether it converts this or not 02:44
timotimo er ... "get"?
i know they discussed how it can be much better
but they didn't implement it yet, right?
JimmyZ aye :) 02:45
oh, you was there :P
timotimo yup 02:48
hum, samewith seems to call flattenable_list and flattenable_hash two times in a row each 02:49
could be because it has *@args, *%args and then puts that back into a call over again 02:51
JimmyZ: do you want to try making take and take-rw and friends better by making the call to THROW less overheady?
JimmyZ I know nothing about it :( 02:52
timotimo fair enough :) 02:53
leont Possibly relevant for NFG: ucsx.org/ 02:58
dalek kudo/nom: 2254a80 | (Timo Paulssen)++ | src/core/Block.pm:
syntactic junctions are cheaper (due to unfolding)
03:04
timotimo is desperately grasping for tiny performance improvements 03:05
travis-ci Rakudo build failed. Timo Paulssen 'syntactic junctions are cheaper (due to unfolding)' 03:10
travis-ci.org/rakudo/rakudo/builds/40437046 github.com/rakudo/rakudo/compare/a...54a8016aa2
timotimo oh no :( 03:12
of course.
dalek kudo/nom: 5742a81 | (Timo Paulssen)++ | src/core/Block.pm:
we don't have infix:<|> this early in the setting.

This reverts commit 2254a8016aa23475924901c4d899a9a7ad22fdb5.
03:13
timotimo AFK 03:19
make me proud, JimmyZ :)
travis-ci Rakudo build passed. Timo Paulssen 'we don't have infix:<|> this early in the setting. 03:20
travis-ci.org/rakudo/rakudo/builds/40437332 github.com/rakudo/rakudo/compare/2...42a81c218f
dsm what's the 'typeof' operator of Perl 6? 04:02
geekosaur m: 3.WHAT.say 04:03
camelia rakudo-moar 356393: OUTPUT«(Int)␤»
timotimo dsm: if you want to compare types, your best choice would be to use "$my_mystery_thing ~~ TheType" 04:04
dsm Thanks!
Mouq m: say 1.isa(Int) 04:06
yoleaux 6 Nov 2014 10:09Z <lucas_> Mouq: Thank you for the note.
camelia rakudo-moar 356393: OUTPUT«True␤»
timotimo recently i found someone whose code used .isa("Int") or something like that 04:11
turned that into isa(Int) ... well, ~~ Int really, but it doesn't matter much 04:12
ran about 4x faster
Mouq timotimo: :O 04:19
FROGGS: How do you feel about gist.github.com/Mouq/427aad1a5a3817b765ea
FROGGS Mouq: what it 'becomes' is not quite correct 08:18
FROGGS Mouq: I'll push what I have so far... 08:18
FROGGS Mouq: github.com/FROGGS/p6-Slangy 08:21
Mouq: this is how you would create a slang: github.com/FROGGS/p6-Slangy/blob/m...b/COBOL.pm 08:22
Mouq: and the test file shows its usage
Mouq: this ends up being Any right now, wich is my current problem: github.com/FROGGS/p6-Slangy/blob/m...ngy.pm#L47 08:23
psch hi #perl6 o/ 08:54
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
m: multi infix:<plus> { +$^a }; multi infix:<plus> { $^a + $^b }; my $x plus= 2; say $x; $x plus= 4; say $x
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␤␤»
psch oh, it doesn't multi them correctly? 08:56
guess there's more behind it :)
m: multi infix:<plus> { +$^a }; multi infix:<plus> { $^a + $^b }; my $x = 2; say $x; $x plus= 4; say $x # this works locally
camelia rakudo-moar 5742a8: OUTPUT«2␤6␤»
psch and apparently i didn't mess with it 08:56
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␤»
Mouq autoviv tries to call &[plus]() 09:01
FROGGS: Cool! I forgot about you posting that as a gist some time back
psch Mouq: any idea how the test should in sub.t should look then? add a () candidate? 09:03
unless it should work without the () candidate, in that case the test is probably correct
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:06
psch Mouq++: makes sense to me, thanks 09:07
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:14
FROGGS Mouq: yes, I agree 09:26
though, I'd like to see inheriting from Perl 6 as optional
for one because it is not quite possible yet
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␤»
psch m: &::("infix:<+>").perl.say # ...'cause this works 09:35
camelia rakudo-moar 5742a8: OUTPUT«sub infix:<+> ($?, $?) { #`(Sub+{<anon>}+{Precedence}|70382000) ... }␤»
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
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:37
Mouq psch: Rakudo doesn't appear to parse &::[""] like it does &::("") 09:38
And neither does STD
psch whoops 09:39
that was me
sorry
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:40
Mouq FROGGS: "this ends up being Any right now, wich is my current problem:" I was just trying to figure out the problem 09:41
Mouq psch: I don't know :/ I'm *guessing* LTA 09:46
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?
- 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
FROGGS Mouq: all what Slangy does is to check that the package that uses the 'slangy' keyword has a grammar and actions acttribute 09:50
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:55
And then I wonder if those things are distint enough to fit under the same name 09:56
lizmat some more sightseeing and then home& 09:57
Mouq e.g. `language COBOL;` vs `slang Tuxic` 09:57
'night #perl6 09:58
FROGGS Mouq: exactly what I am thinking... 10:02
dalek kudo/nom: 929c7b8 | rurban++ | tools/ (2 files):
prepare for new parrot-ops2c

with fallback if config{parrot::ops2c} does not exist, < parrot-6.9.0 analog to nqp
10:03
kudo/nom: acea0c1 | (Tobias Leich)++ | tools/ (2 files):
Merge pull request #320 from rurban/parrot-ops2c

prepare for new parrot-ops2c
xtreak perl6: int (1.6180 ** 656) / (5 ** 0.5) 10:13
camelia rakudo-{parrot,moar} 5742a8: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Two terms in a row␤at /tmp/tmpfile:1␤------> int ⏏(1.6180 ** 656) / (5 ** 0.5)␤ expecting any of:␤ postfix␤ infix stopper␤ …»
dalek kudo/nom: e340863 | (Tobias Leich)++ | / (3 files):
warn about clashing enum aliases, and also poison these aliases

This resolves RT #72696.
10:13
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72696
xtreak perl6: (1.6180 ** 656) / (5 ** 0.5) 10:15
camelia ( no output )
xtreak perl6: say (1.6180 ** 656) / (5 ** 0.5)
camelia rakudo-{parrot,moar} 5742a8: OUTPUT«5.50075536558482e+136␤»
xtreak perl6: say round (1.6180 ** 656) / (5 ** 0.5)
camelia rakudo-parrot 5742a8: OUTPUT«55007553655848231349963468808442668236608936658799279245028620639747995284222193125430143811359723592923595674647451438443260531852705792␤»
..rakudo-moar 5742a8: OUTPUT«-9223372036854775808␤»
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:18
rurban parrot spectests: gist.github.com/rurban/f1a28dd98241a294e47c 10:19
xtreak Its a way to find the fibonacci number using golden ratio. It gives correct output on perl5 with bignum.
rurban The parrot GC bug is now fixed. Cpouldn 10:20
Couldn't find other GC bugs even with very low memory
xtreak Where can I find the implementation of round function? 10:24
psch xtreak: src/core/Numeric.pm although the bug is probably somewhere deeper, seeing as it's backend specific 10:25
FROGGS xtreak: you might have to follow the involved nqp:: op through nqp to the MoarVM repo 10:27
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
dalek kudo/nom: c904d49 | (Tobias Leich)++ | src/Perl6/Actions.nqp:
do only poison enum aliases for redecls in same block
10:29
xtreak Thanks psch and froggs
FROGGS xtreak: the good thing is that you can apply changes to MoarVM, without the need to rebuild nqp or rakudo 10:30
so just hack the C code and run your perl6 one-liner again
dalek ast: fc3dc99 | (Tobias Leich)++ | S12-enums/basic.t:
add tests for enum alias poisoning, RT #72696
10:31
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...l?id=72696
FROGGS m: enum S1 <a b c>; enum S2 <b c d>;
camelia ( no output )
FROGGS okay, let's build a fresh parrot 10:32
masak good antenoon, #perl6 10:34
FROGGS hi masak
psch hi masak 10:35
FROGGS masak: I hope you like my latest bugfix :o)
you'll*
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:37
moritz xtreak: did you recompile rakudo? 10:39
FROGGS xtreak: try 34.3.round
xtreak It was said by froggs I dont need to rebuild MoarVM or nqp. So do I need to rebuild?
FROGGS otherwise you'll hit rakudo/src/core/Int.pm:71: multi method round(Int:D:) { self } 10:40
psch xtreak: when you only change moar you don't need to rebuild 10:40
xtreak: that is, moarvm, which is in nqp/MoarVM/src
(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
moritz xtreak: when you modify the setting, you need to run 'make' in rakudo 10:42
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
... in rakudo
psch 'sub a { }' doesn't seem to get a lexical container type, could that be right? 10:50
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
camelia rakudo-moar 5742a8: OUTPUT«sub a () { #`(Sub|84781144) ... }␤»
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
but it should still appear as a lexical
oh, sub defaults to my says Actions.nqp:2512-ish 10:54
FROGGS only packages are our scoped by default 10:55
FROGGS rurban: I think parrot/HEAD really looks better 10:59
I still have a problem in panda, but that seems to be due to our implementation of openpipe...
masak FROGGS: I do! <3 11:01
FROGGS :D
masak walk & 11:01
FROGGS ohh damn, the problem is that nqp::open on parrot does not inherit the env et all >.< 11:03
FROGGS I guess I want to implement pipe() in terms of shell() 11:04
moritz uhm 11:05
it would be nice to have a shell option for pipe
but it shouldn't be mandatory
otherwise passing arguments to a pipe process becomes a nightmare in quoting again 11:06
FROGGS yeah, I also just recognized that it won't be doable just like that, since I need to get back a filehandle 11:08
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)␤»
..nqp-jvm: OUTPUT«(signal ABRT)»
..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/nqp/lib/QAST.moarvm:compile_mastop:209)␤ from gen/moar/stage2/QAST.nqp:1682 (/home/camelia/rakudo-inst-2/languages…»
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␤␤»
itz m: my $c = Date.new('2012-12-24'); say $c.truncated-to("month"); 11:52
camelia rakudo-moar 5742a8: OUTPUT«2012-12-01␤»
itz hmm looks like the docs are wrong 11:53
or the code 11:55
psch i'm not really seeing how installing a container for subs should work :/ 12:02
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:04
psch welp, maybe i can figure it out later o/ 12:10
psch afk & 12:11
FROGGS moritz: it seems like camelia does not rebuild atm 12:25
moritz: perhaps it is because nqp got changed?
moritz FROGGS: something broke the parrot build 12:38
cd src/vm/parrot/ops && /home/camelia/rakudo-inst-1/bin/ C --dynamic perl6.ops
sh: /home/camelia/rakudo-inst-1/bin/: Is a directory
my guess would be rurban++'s ops2c patch 12:39
FROGGS hmmm, yeah, I think so too
moritz +OPS2C = $(PARROT_BIN_DIR)/@ops2c@$(EXE)
FROGGS so, we're lacking the default for ops2c 12:39
moritz if @ops2c@ is empty, that's what'd happen
the question is just, why is it empty? 12:40
moritz builds a parrot to debug 12:42
moritz huh, works locally for me 12:46
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. :-)
jnthn is home after vacation
isBEKaml jnthn: So, you haven't sleeping on beds... welcome back :-) 13:01
jnthn isBEKaml: I "slept"ish on a flight... 13:04
FROGGS ohh, a bedlack 13:05
hi jnthn
jnthn o/ FROGGS 13:06
jnthn has no idea what's been going on in Perl 6 land of late. 13:07
Is everything finished yet? :)
colomon \o
FROGGS jnthn: fosdem.org/2015/schedule/event/get..._to_party/
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)
jnthn Darn, so I still have to, like, work on stuff? :) 13:10
jnthn will dig back in over the next week 13:10
Given my current lack of sleep, I don't think I'll trust myself to do much of anything today. ;)
FROGGS hehe 13:11
nwc10 jnthn: and did pre-holiday jnthn leave the beer fridge in a good way? 13:13
jnthn um...good question :) 13:14
He didn't! The moron!
Though, I'm pretty sure drinking a beer = fall asleep by this point :) 13:15
And I'd like to do that at a time that complies slightly better with local timezone :)
nwc10 aha.
I managed to make a cup of tea this morning and fail to drink it
sun + sofa
timotimo greetings, jnthn!
nwc10 anyway, it is good that you are back safely 13:16
jnthn Yes. 13:18
And airline++ managed to not lose my bag at any point during the trip too :) 13:19
(Vacation involved 4 flights, each of them having 2 legs, so there were 8 opportunities to screw it up, and they didn't. Phew. :))
timotimo good track record :) 13:20
jnthn Aye.
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. :)
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
should ualarm be exposed as an async thing? 13:23
jnthn
.oO( Does it have usmile too? )
Dunno without looking at what primitive it boils down to. 13:24
vendethiel jnthn: 35 hours in bed? now that's what I call being in the matrix :-) 13:26
jnthn vendethiel: 35 hours *not* in bed :P 13:27
vendethiel oh :)
jnthn I feel mildly tired... :)
vendethiel 'thought you were so sleepless you skip the clock 1.5 times
JimmyZ WB, jnthn! 13:28
lucas_ Good day to everyone. 13:28
If no one objects, I would like to continue with some specs changes, ok?
If you mind reading, I've written some ideas here: 13:29
gist.github.com/anonymous/b18d6d46975dbd6c06ec
Leave your opinion if you're not here at the moment, I'll read the logs later. Thanks!
rurban I believe I provided a proper default for ops2c for older parrots 13:33
moritz m: say 42 13:41
camelia rakudo-moar 5742a8: OUTPUT«42␤»
dalek kudo/nom: a0ed738 | moritz++ | tools/lib/NQP/Configure.pm:
[Configure] try to be a bit more forthcoming with the ops2c default
13:43
moritz lucas_: on the one hand, I applaud your efforst to make the synopsis easier to read 13:44
lucas_: on the other hand, I think that they are solving the wrong problem (which is the lack of user-oriented docs) 13:45
lucas_ moritz: ok, thanks for the attention and opinion. 13:57
moritz: BTW, thank you for the github invitation, moritz++. (I forgot to thank you before)
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␤»
dalek p/openpipe: dd7f5b1 | (Tobias Leich)++ | src/vm/parrot/ (2 files):
first (explosive) attempt to port openpipe to nqp@parrot

We need this op to actually open a pipe with a given CWD and ENV, the open("rp") whih parrot provides does not let us pass these.
16:50
FROGGS that's what happens: gist.github.com/FROGGS/8c860b26a30f0cbbfa0d 16:51
I'd love to get some insights/pointers from rurban++
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* 16:53
arnsholt FROGGS: That's a very large chunk of memory Parrot wants to allocate 17:01
Have you tried to trace where that number originates?
FROGGS arnsholt: no
arnsholt Probably worth a shot
FROGGS it is somehow triggered by nqp::readallfh
yeah, will do that 17:02
arnsholt If you rebuild Parrot and NQP, with -g3 in the CFLAGS it should be possible
Run it under GDB and set a breakpoint at the line indicated by the error message 17:03
FROGGS k 17:04
arnsholt At that point, the backtrace is probably a good starting point 17:05
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:12
but qq[] calls Stringy, and adding a method Stringy() { ~self } makes at least two of them pass \o/ 17:13
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
camelia rakudo-moar 5742a8: OUTPUT«foo␤»
psch i'm not sure about the array tests a bit further in the file. the look rather dubious to me. 17:17
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«===SORRY!=== Error while compiling /tmp/yTGMHrX9tj␤Calling 'prefix:<~>' will never work with argument types (Positional)␤ Expected: :(A $a)␤at /tmp/yTGMHrX9tj:1␤------> oo")); my @ar = ($a, $a, $a); my $res = ⏏…»
dalek p: d74d5c5 | (Tobias Leich)++ | tools/build/PARROT_REVISION:
bump parrot rev for a GC fix, rurban++
17:20
kudo/nom: b1abc87 | (Tobias Leich)++ | tools/build/NQP_REVISION:
bump nqp/parrot rev for a GC fix, rurban++
17:21
FROGGS p-spectest PASS \o/ 17:22
timotimo way cool! 17:23
bartolin rurban++ FROGGS++
psch rurban++ FROGGS++
FROGGS I did nothing :o) 17:24
moritz m: say 1
camelia rakudo-moar 5742a8: OUTPUT«1␤»
FROGGS m: say $*PERL.compiler.build-date
camelia rakudo-moar 5742a8: OUTPUT«2014-11-09T05:14:01Z␤»
timotimo rurban++ # holding the fort 17:25
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...
moritz psch: which test? 17:29
psch moritz: S06-operator-overloading/sub.t:365
moritz (some of those tests might be old)
psch moritz: i suspect they're old and have been neglected; many are 'todo "huh"' 17:30
fsvo 'many' around 5 or so
moritz psch: yes, that looks wrong
psch: though ~<<@foo should work 17:31
psch: which IMHO is the only thing worth testing in that block
psch moritz: right, many &is and &lives_ok look rather unrelated to operator overloading. i might as well clean that up a bit 17:33
moritz also lives_ok is nearly always a sign that the test writer didn't actually know the desired result 17:40
just knew that dying was wrong
dalek rlito: 623f546 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
misc - add a dumper script
18:06
rl6-roast-data: 57dae72 | coke++ | / (5 files):
today (automated commit)
18:07
ast: e8aa744 | (David Warring [email@hidden.address] | S05-mass/charsets.t:
unfudge 'blank chars' test on parrot
18:09
rlito: a1320b0 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
misc - add a dumper script
ast: 662c6bd | (Pepe Schwarz)++ | S06-operator-overloading/sub.t:
Remove a few unneccessary tests and correct useful ones.
18:11
psch got distracted inbetween
the 4 'prefix:[]' pass with what i have in a branch locally, but i'm not sure if it's robust enough
i don't have remotes set up properly atm, so i offer a gist for review gist.github.com/peschwa/4b001dec921220da0051 18:14
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:25
psch: the more general approach would be to use self.compile_time_evaluate, and then coerce the result to Str if necessary 18:27
psch moritz: i should call &compile_time_evaluate with the coercion to Str around the existing compile_time_value? 18:28
moritz: 'cause there's already a compile_time_value there. i guess checking for Ss would be sensible though 18:29
although, maybe i'm misunderstanding compile_time_evaluate and has_compile_time_value 18:30
moritz psch: well, you also add a branch that deals when when there's no compile time value 18:31
moritz psch: s/when/with/ 18:31
timotimo doesn't really know what to do right now
moritz psch: that branch is probably best replaced by compile_time_evaluate
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
so, you'll get some object back from compile_time_evaluate
psch moritz: that somehow doesn't work with a QAST::Stmts that holds a QAST::Var - compile_time_evaluate that is
moritz if it's not a Str, call .Str on it; then unbox 18:33
psch: is that the declaration QAST:Stmts thingy?
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
moritz afk, child is hungry& 18:34
psch which is why i tried the find_symbol hack
which kinda-sorta works...
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
timotimo: if you want you can review my cliparser PR ;p
timotimo i don't think that falls into my area of expertise :\
psch timotimo: or you could improve my perl6 implementation of the H6809 which i'm learning asm on at uni 18:36
i don't really recommend the latter
timotimo i once built an implementation for a stupid imaginary processor in python 18:37
along with a little IDE
geekosaur 6809s are still around?
timotimo it was binary-compatible with the existing compiler
psch geekosaur: well, the one we use at uni is some subset 18:37
github.com/peschwa/H6809/blob/mast...PU.pm6#L36 to line 125 has the opcode declarations, which is noticeably smaller than the real datasheet 18:38
timotimo how well does it run? 18:39
does it jit well? :)
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.
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
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
japhb timotimo: Icons defined at the top of analyze
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
timotimo i can't run benchmarks any more, because the bench run always hangs when it encounters pushme
and i don't actually see a perl6 process in the process tree that i could kill
which confuses me greatly 18:45
psch afk & 18:46
moritz m: say $*PERL.compiler.build-date 18:52
camelia rakudo-moar b1abc8: OUTPUT«2014-11-09T18:24:18Z␤»
moritz that looks like the newest rakudo. So automatic rebuild finally seems to work again \o/
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␤ ------> enum S1 <a b c>; enum S2 <b c d>⏏; # \o/␤»
FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; say a# \o/
camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:␤ Redeclaration of symbol b and c␤ at /tmp/CWrFedctb1:1␤ ------> enum S1 <a b c>; enum S2 <b c d>⏏; say a# \o/␤a␤»
FROGGS_ m: enum S1 <a b c>; enum S2 <b c d>; say b # \o/
camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:␤ Redeclaration of symbol b and c␤ at /tmp/gWBRLwW7D7:1␤ ------> enum S1 <a b c>; enum S2 <b c d>⏏; say b # \o/␤Cannot use poisoned alias b, because it was declared by several enums.␤Please acc…»
moritz FROGGS_++
FROGGS_ :D
sometimes I really do like my patches 18:54
m: enum S1 <a b c>; enum S2 <b c d>; say b ~~ Failure
camelia rakudo-moar b1abc8: OUTPUT«Potential difficulties:␤ Redeclaration of symbol b and c␤ at /tmp/NBo6AwA89H:1␤ ------> enum S1 <a b c>; enum S2 <b c d>⏏; say b ~~ Failure␤True␤»
FROGGS_ I think that's the first poisoned thingy of its kind 18:55
m: enum S1 <a b c>; { enum S2 <b c d>; say b ~~ Failure } 18:56
camelia rakudo-moar b1abc8: OUTPUT«False␤»
dalek rlito: 74adb31 | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
misc - add a dumper script
19:15
dalek rl6-bench: 30f1006 | (Geoffrey Broadwell)++ | timeall:
Get rid of undef warning (a leftover from an earlier design)
19:19
dalek rlito: 164076c | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
misc - dumper script tweak
19:47
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␤»
Mouq m: sub g($a=0,$c=0){$a&&"g{"o"x$c}$a"||sub ($a=0,$ç=$c+1){g($a,$ç)}}; say g()()("al")
camelia rakudo-moar b1abc8: OUTPUT«gooal␤»
Mouq (second one from github.com/eatnumber1/goal/blob/ma...g/goal.py) 19:49
arnsholt Oh, Python >.< 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 >.<
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:21
moritz wtbh. 20:22
arnsholt -x ** -y only has a single parse, because -(x**-)y makes no sense
moritz: wtbh?
dalek rlito: 0fe6c3a | (Flavio S. Glock)++ | misc/typeglob/dumper.pl:
misc - dumper script tweak
20:23
arnsholt And specifying the associativity is for wimps 20:23
moritz arnsholt: "what the bloody hell"
arnsholt My reaction exactly 20:24
Thankfully it was just a weird phrasing
Mouq psch: Hah, thanks, but I'd maybe say *differently* clever :) 20:28
moritz arnsholt: so it's not so weird after all? 20:30
arnsholt Yeah 20:31
The only unaries are prefix unaries, so the precedence of ** relative to those doesn't really matter 20:32
masak TimToady: will there be a "Programming Perl 6" book in 2015? 20:43
masak arnsholt, moritz: binary operators *do* bind less tightly than unary operators on their right... 20:44
...but only obviously/trivially so, as you rightly point out.
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
unary prefix operators, I should say. 20:46
arnsholt Yah 20:47
masak I can see two non-zany options, though:
(a) unary operators bind quite tightly (as in Perl 6)
(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?"
masak I can't think of a language that has chosen the (b) approach.
leont masak: the real question is, what kind of butterfly would it have on it's front ;-) 20:49
dalek ast: 97b731e | usev6++ | S05-metasyntax/repeat.t:
Unfudge passing tests for RT #111956
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=111956
moritz unary postfixes on the left, and unary prefixes on the right 20:50
masak moritz: sounds like the start of a cheerleading chant. 20:51
arnsholt Hmm. I'm noticing a couple of undocumented NQP ops
masak moritz: give me a P! give me an R! [ten minutes later] PRECEDENCE AND ASSOCIATIVITY! 20:52
arnsholt: the second rule of undocumented NQP ops is *we do not talk* about the undocumented NQP ops. 20:53
:P
moritz except when the talk is commits that document them 20:54
masak that's acceptable, yes.
arnsholt Yeah, I just need to figure out how they work before I document them =D 20:55
Or I can actually doc one of them 20:56
Hmm. I guess the control op is only sort of an NQP op 21:00
Doesn't look like it can really be used from NQP directly, but it's quite important for a language implementer =)
dalek p: 12f9f84 | (Arne Skjærholt)++ | docs/ops.markdown:
Document control QAST op.
21:07
dalek ast: d6e7e47 | usev6++ | S02-lexical-conventions/unicode.t:
Unfudge passing tests (RT #122341)
21:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=122341
masak 'night, #perl6 21:18
ugator m: for @a{$_.say;} 21:25
camelia rakudo-moar b1abc8: OUTPUT«===SORRY!=== Error while compiling /tmp/uh0ozjiGTV␤Variable '@a' is not declared␤at /tmp/uh0ozjiGTV:1␤------> for @a{$_.say;}⏏<EOL>␤ expecting any of:␤ method arguments␤ statement end␤ …»
ugator does the whitespace before {} has to be obligatory?
ugator m: @a=(1,2,3); for @a{$_.say;} 21:27
camelia rakudo-moar b1abc8: OUTPUT«===SORRY!=== Error while compiling /tmp/9eP1lpgDC4␤Variable '@a' is not declared␤at /tmp/9eP1lpgDC4:1␤------> @a⏏=(1,2,3); for @a{$_.say;}␤ expecting any of:␤ postfix␤»
Mouq ugator: Note that %h{"foo"} is the way hashes are accessed
m: my @a = 1,2,3; for @a { .say }
camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
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␤»
Mouq m: my @a = 1,2,3; my %h = foo => @a; for @%h{"foo"} { .say }
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␤␤»
Mouq m: my @a = 1,2,3; my %h = foo => @a; for @(%h{"foo"}) { .say }
camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
timotimo yeah, that's postcircumfix operators 21:29
we enforce whitespace in more places than perl5 used to
ugator ok... but my example should be closer to the normal standard ?
timotimo which one where what?
ugator m: @a=(1,2,3); for @a {.say;} 21:30
camelia rakudo-moar b1abc8: OUTPUT«===SORRY!=== Error while compiling /tmp/dVUknuEpUp␤Variable '@a' is not declared␤at /tmp/dVUknuEpUp:1␤------> @a⏏=(1,2,3); for @a {.say;}␤ expecting any of:␤ postfix␤»
psch m: 6; @a=(1,2,3); for @a {.say}
camelia rakudo-moar b1abc8: OUTPUT«1␤2␤3␤»
timotimo you can also .say for @a
psch ugator: a bare 6 as first statement gives you lax mode
ugator: otherwise perl6 is strict by default 21:31
timotimo is that implemented already?
dalek ast: 282b062 | usev6++ | S0 (3 files):
Unfudge some more passing tests for Parrot
ugator so enforcing whitespaces is wanted in perl6? 21:32
psch timotimo: well, i think so, camelia does it :)
timotimo oh
interesting
Mouq ugator: It's about how Perl 6 is parsed
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?
although that's not as-specced
Mouq like `for (@a){ .say }`
or even `for(@a){ .say }` 21:34
timotimo yes, the repl is
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
ugator why not both? 21:35
would be closer to perl5?
Mouq m: my @a = 1, 2, 3; sub for ($_) { .say }; for @a { for("$_!") }
camelia rakudo-moar b1abc8: OUTPUT«1!␤2!␤3!␤»
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.
timotimo ugator: how do you iterate over a hash then?
for %hash{ .say }?
ugator for (%hash){}? 21:37
timotimo and if so, how do you get something out of a hash
eew
ugator ok :D seems you guys settled on that? ^^
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}) { }
oh wait
and iterating over the array in the hash in key $k is for (@((%hash){$k})) { }
there
(could've maybe removed a bit of the line...)
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
oh ok^^
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␤»
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␤»
psch Mouq: you've thought about **, does [[1,2,3],[4,5,6]].map([+] **) seem reasonable to you? 21:45
m: [[1,2,3],[4,5,6]].map({ [+] @^a }) # similary to this
camelia ( no output )
psch m: say [[1,2,3],[4,5,6]].map({ [+] @^a }) # similary to this 21:46
camelia rakudo-moar b1abc8: OUTPUT«6 15␤»
psch where ** is HyperWhatever, not infix:<**>
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:49
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:50
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
the merits of * currying listops aside
Mouq m: say [[1,2,3],[4,5,6]].map(->$l{[+] $l}) # [+] * 21:54
camelia rakudo-moar b1abc8: OUTPUT«3 3␤»
Mouq m: say [[1,2,3],[4,5,6]].map(->*@a{->$l{[+] $l}}) # [+] **
camelia rakudo-moar b1abc8: OUTPUT«-> ($l) { #`(Block|66444672) ... } -> ($l) { #`(Block|66444736) ... }␤»
Mouq m: say [[1,2,3],[4,5,6]].map(->*@a{map ->$l{[+] $l}, @a}) # [+] **
camelia rakudo-moar b1abc8: OUTPUT«3 3␤»
psch oh, right. Whatever never does anything listy 21:55
psch *WhateverCode 21:57
hm, with @^a we probably don't need it either
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:01
jepeway-wm howdy, #p6 22:08
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
psch i.e. autopriming seems rather magic-y
psch stops rambling 22:11
dalek ast: 22a9881 | usev6++ | S14-roles/mixin.t:
Add test for RT #119371
22:12
synopsebot Link: rt.perl.org/rt3//Public/Bug/Displa...?id=119371
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 rl6-bench: 77abc8b | (Geoffrey Broadwell)++ | timeall:
Add a has-expected tag to tests that have an 'expected' setting
rl6-bench: 65539f1 | (Geoffrey Broadwell)++ | minibenchmarks.pl:
Add expected subs for rc-man-or-boy-test and rc-9-billion-names; minor line reordering to make configs more consistent
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:17
so, hindbrain digs sigil invariance, and I guess forebrain better get used to that 22:19
mirjam why do we call splice splice, when it's really just a fill? 22:37
raydiak mirjam: what do you mean? 22:38
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␤»
mirjam interesting. so it's just parrot's splice which is not splicing 23:04
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␤»
dalek p: ee2ca3a | (Tobias Leich)++ | src/vm/parrot/ (25 files):
silence most warning when building on parrot, fixes #198
23:16
kudo/nom: 72703bf | (Tobias Leich)++ | / (5 files):
bump nqp rev and fix more warnings
23:17
FROGGS_ yay, the nqp issue 198 "just" took about 4.5 hours :/ 23:21
FROGGS_ gnight 23:30