»ö« | perl6-projects.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by moritz_ on 30 July 2009.
TimToady and probably currently for my @array is StrangeArray you end up creating a normal array container and then throwing it away when you see the "is" 00:00
pmichaud that's fine
we can certainly patch in that case as well without difficulty.
(same as how we currently do "is also" and other things)
anyway, if it's likely that contextual declarations will change, it would be extra-helpful to me to know a few more details before I do my next set of refactors :-) 00:01
since contextuals are one of the big pieces we're missing at the moment that we've decided we need
TimToady fershure
and I'm all in favor of radically simplifying things for the implementors to the extent that they don't complexify things for the users 00:02
(Lisp need not apply)
00:02 winthrowe joined
pmichaud I'm at least 1-2 weeks away from the point of needing the details, though 00:04
since most of this week will be taking up with family stuff, and there's about a week of prep-work for the other parts of the refactoring
*taken 00:05
(man I can no longer type anymore. Or my fingers type much faster than my brane)
TimToady I find my hemispheres desync more frequently as I get older. And I'm of two minds about that... 00:06
pmichaud heh
afk for a bit
Limbic_Region recently learned how dolphins sleep 00:07
00:07 SmokeMachine joined
Limbic_Region they have severed hemispheres - for 8 hrs a day both halves are awake, 8 hours 1/2 sleeps and the other for the remaining 8 00:07
00:09 frew__ left
ruoso TimToady, if we think on "is context" as marking the lexical scope instead of the container... shouldn't it be a different scope declarator instead of a trait? 00:17
00:19 cdarroch left 00:25 nihiliad joined
pmichaud "is context" marks a dynamic scope more than a lexical one. 00:26
ruoso pmichaud, but the point is that this mark is not in the container, as a trait sounds 00:27
pmichaud ruoso: that's reasonable, yes.
00:35 nihiliad left
TimToady that's what I was saying above, basically 00:41
using the * twigil is a mark in the symbol table
00:41 Whiteknight left
TimToady but we probably leave the rw/ro up to the container 00:41
ruoso TimToady, but how do you declare for the first time? 00:43
TimToady it's really important for threading to know whether a contextual value can be treated as immutable, so that should be the default, I think
at the moment thinking context $*x vs temp$*x
the difference being whether it defaults to empty or the outer value 00:44
and "context $*x is rw" would make it mutable, otherwise immutable after initialization, a dynamic constant 00:45
ruoso after initialization is an important point... 00:47
TimToady and maybe temp would only be allowed on rw, otherwise you have to redeclare an "outermost" with context
point is whether you can rely on just copying the values into the subthread 00:48
or whether you have to track an object outside your thread
in which case you copy in the ref rather than the value
ruoso can we consider only readonly for 6.0.0? 00:49
TimToady I use rw in STD, so no :P
context vars are essentially just implicit parameters that can be used to pass data either in or out 00:50
we optimizer for in, rather than out
s/r//
pmichaud are you thinking we'd lose the possibility of having something lexically rw but contextually ro ?
TimToady potentially 00:51
ruoso that seems what it looks like
pmichaud I don't see a bit issue with that.
*big
(arrrgh)
ruoso but I'm not quite sure how to make it "readonly after first initialized" 00:52
execpt for a big "if"
pmichaud we have to do something like that for "constant" anyway
ruoso trying to think in a more elegant approach
indeed
TimToady it's kind of a single assignment sort of notion, so I think it's already almost elegant :) 00:53
pmichaud single assignment as in... (more)
constant $x; $x = 5; # valid ?
TimToady no
basically only "my $x = 5" if you are strict about it 00:54
pmichaud you mean "constant $x = 5"?
TimToady no, that's constant at compile time 00:55
pmichaud okay.
TimToady you can do single assignment at run time
you just never modify a value once set
from, say, the previous loop iteration
and $i++ is right out :)
it's a style that some poeple will want to enforce on themselves 00:56
as a way of reducing side effects, which will never interact well with laziness
have to run off for a bit &
cognominal happy birthday pmichaud 00:57
pmichaud cognominal: thank you :-) 00:59
cognominal thx facebook.
wish my family was in facebook... 01:00
dalek kudo: 1e358a9 | pmichaud++ | docs/spectest-progress.csv:
"2009-08-12 00:00",a5dfe96,12303,0,535,2260,15098,17636,428
01:01
01:04 eternaleye left 01:05 sri_kraih left 01:06 rfordinal left 01:10 jdv79 joined
jdv79 how come the spectest target for rakudo tries to run invalid tests? 01:11
pmichaud which tests are "invalid"?
01:12 tak11 joined
jdv79 t/spec/S02-builtin_data_types/parsing-bool.t ................... No subtests run 01:13
there are lots like that
pmichaud that seems odd. They pass on my system. 01:14
jdv79 oh, maybe something is broke here. i'll poke around.
definitely hosed over here. thanks. 01:17
01:21 dukeleto left 01:22 duckyd left 01:26 KyleHa joined 01:28 SmokeMachine left 01:38 stimpi joined 01:40 eternaleye joined 01:44 stimpi left 01:50 meppl left, kane__ left 01:53 dukeleto joined 01:56 nihiliad joined 02:08 molaf joined 02:10 Limbic_Region left 02:17 nihiliad left 02:28 snarkyboojum left 02:45 nihiliad joined
dalek kudo: 2befdd3 | pmichaud++ | src/ (2 files):
Move infix:<x> to setting.
02:46
kudo: 4e906bc | pmichaud++ | :
Merge branch 'master' of [email@hidden.address]
ruoso daniel.ruoso.com/categoria/perl/smo...irst-steps 02:55
02:56 rdice left
KyleHa std: say "\x[ c4, 20, c4 ]"; 03:00
p6eval std 27972: ( no output )
KyleHa p6eval bein' a slow poke? 03:01
std: say "\x[ c4, 20, c4 ]";
p6eval std 27972: ( no output )
03:02 molaf left 03:06 Psyche^ joined
KyleHa std: say "\x[ c4, 20, c4 ]"; 03:07
p6eval std 27972: OUTPUT«ok 00:04 37m␤»
03:12 nihiliad left, nihiliad joined 03:16 makerboy joined, makerboy left 03:18 Patterner left, Psyche^ is now known as Patterner, dukeleto left
pugs_svn r27973 | kyle++ | [t/spec] Still more RT #64948 tests 03:19
r27974 | kyle++ | [t/spec] Test for RT #64990
r27975 | kyle++ | [t/spec] Test for RT #65004
03:19 molaf joined
KyleHa rakudo: given 'foo' { if /bar/ { 1 } } 03:27
p6eval rakudo 4e906b: ( no output )
03:30 nihiliad left 03:39 dukeleto joined
pugs_svn r27976 | kyle++ | [t/spec] A test for c[] also 03:45
03:46 nihiliad joined 03:48 KyleHa left, nihiliad left 03:54 jrtayloriv joined
jrtayloriv What is the rationale for why I have to say 'say $thing.WHAT' rather than 'say $thing.what' -- i.e. why the caps? Is this part of a naming convention or something 03:55
PerlJam uppercase methods are "reserved" by convention. 04:00
04:01 nihiliad joined, abbe joined 04:02 mkfort joined 04:04 simcop2387 joined 04:05 Psyche^ joined
PerlJam lot of #perl6 joiners suddenly 04:06
welcome all!
jrtayloriv PerlJam -- Where in the docs would I look for what the implications of a method being reserved? 04:09
Does it just mean that I can't override it with my own definition? 04:10
PerlJam Dunno. Probably S12. No, no, you probably *can* override it, but you do so at your own peril.
for instance, $obj.^methods is a shortcut for calling $obj.HOW. if you override the HOW method in your class, $obj.^methods may not do something sane. 04:11
jrtayloriv PerlJam: OK, thank you. 04:12
PerlJam But that's a general convention in Perl -- ppercase things belong to Perl. 04:13
04:14 zloyrusskiy joined
PerlJam See BEGIN, CATCH, NEXT, etc. 04:14
s1n pmichaud: what was up with the dallas.p6m wiki thing we were going to have setup? 04:19
04:20 dukeleto left 04:22 Patterner left, Psyche^ is now known as Patterner
PerlJam s1n: are people showing up for dallas.p6m ? 04:27
04:30 jrtayloriv left
s1n PerlJam: our largest meeting was 8 04:31
PerlJam: we regularly have 6-8 04:32
including pmichaud and gbarr
04:36 nihiliad left, abbe left 04:43 kane_ joined 04:45 tak11 left 04:49 alester__ joined 04:56 kane_ left
dalek kudo: 69eee0d | pmichaud++ | docs/release_guide.pod:
Add chromatic as December release manager.
05:01
05:07 dukeleto joined 05:15 hercynium left 05:38 tak11 joined 05:42 dukeleto_ joined 05:45 orafu left, orafu joined 05:47 rfordinal joined 05:48 dukeleto left 05:57 dukeleto_ left 06:00 guest_007 left 06:21 alester__ left 06:28 rfordinal left 06:42 mberends joined
moritz_ phenny: tell KyleHa in r27973 you test for %(...).exists. Note that Hash.exists is a Rakudo workaround for %hash{$item}:exists, not part of the spec 06:54
phenny moritz_: I'll pass that on when KyleHa is around.
07:05 rfordinal joined 07:09 Su-Shee joined
Su-Shee good morning. 07:09
moritz_ oh hai 07:11
07:18 tann joined
tann rakudo: my %h; push %h<k>, 1, 2, 3; say %h.perl; 07:19
p6eval rakudo 69eee0: OUTPUT«No applicable candidates found to dispatch to for 'push'␤in Main (/tmp/flI9YktQ8J:2)␤»
tann nyi
07:24 szabgab left 07:36 jd8hh57 joined 07:43 alanhaggai joined 07:46 KatrinaTheLamia joined 07:50 shachaf left
mikehh rakudo (69eee0d) builds on parrot r40515 - make test/make spectest (up to 27976) PASS - Ubuntu 9.04 amd64 07:50
07:53 dukeleto joined
eternaleye rakudo: my %h; push @( %h<k> ), 1, 2, 3; say %h.perl 07:54
p6eval rakudo 69eee0: OUTPUT«No applicable candidates found to dispatch to for 'push'␤in Main (/tmp/y9tge8pN3p:2)␤»
eternaleye rakudo: my %h; @( %h<k> ).push: 1, 2, 3; say %h.perl 07:55
p6eval rakudo 69eee0: OUTPUT«too many arguments passed (4) - 2 params expected␤in Main (/tmp/s3epu3zy3o:2)␤»
07:56 szabgab joined
tann rakudo: .say for qqx/ls -la/; 07:57
p6eval rakudo 69eee0: OUTPUT«operation not permitted in safe mode␤in Main (lib/Safe.pm:25)␤»
07:57 xinming left
lisppaste3 tann pasted "qqx test output" at paste.lisp.org/display/85304 07:58
tann ^^^ qqx doesn't behave right?
eternaleye tann: No, it's correct 07:59
qx and qqx produce a string, not an array 08:00
the string just happens to contain newlines
tann eternaleye: no longer multiple lines in list context?
eternaleye use qqx/foo/.split("\n")
tann so quite differently from p5's qx or `` ? 08:01
eternaleye tann: There really is no 'list context' or 'scalar context' any more, just type coercions
For instance, () creates a 'Nil' object, which can be both a null value 'undef' when treated as a scalar, or an empty list () when treated as a list 08:03
moritz_ but a particular function or method can't know if it's called in list context or in item context 08:04
eternaleye tann: The p5 model of 'context' flowing inward is fundamentally incompatible with multiple dispatch. 08:05
08:05 zloyrusskiy left
tann ok, thanks for the explanation 08:05
08:06 zloyrusskiy joined
damyan^ hi. guys. i got a dumb regex-question - hi would i match "anything not starting with '+' or '-'"? 08:06
^([^+]&[^-]) seems not to be what I'm looking for...
moritz_ damyan^: in Perl 6 with / ^ <-[+-]> / 08:07
08:07 rfordinal3643 joined
moritz_ damyan^: for Perl 5 you're in the wrong channel 08:07
damyan^ moritz_: thanks.
tann perl 5 is /^[^+-]/ :)
08:08 guest_007 joined
tann so <- replaces [^ now 08:08
me likes me likes 08:09
08:10 damyan^ left 08:14 rfordinal3643 left, szabgab left, rfordinal left, mikehh left, iblechbot left, payload left, synth left, s1n left, Lorn left, lisppaste3 left, elmex left, bionoid left, arthur-_ left, gabiruh left, nsh left, sbp left, cxreg left, mj41 left, omega left, mattp_ left 08:15 renormalist joined 08:16 rfordinal3643 joined, szabgab joined, rfordinal joined, mikehh joined, iblechbot joined, payload joined, synth joined, s1n joined, Lorn joined, lisppaste3 joined, elmex joined, bionoid joined, arthur-_ joined, gabiruh joined, nsh joined, sbp joined, cxreg joined, mj41 joined, omega joined, mattp_ joined 08:20 pmurias joined 08:24 tann left, rfordinal left
Matt-W Morning 08:32
08:41 xinming joined 08:43 jferrero joined 08:46 kane_ joined, masak joined
masak be greeted, #perl6. 08:48
phenny masak: 12 Aug 21:11Z <jnthn> tell masak submethod BUILD(Druid::Game :$game!, Int :$color! where { $_ == 1|2 }) { # can just write where 1|2
frettled good morning :D
masak jnthn: gracias.
mberends: ping.
frettled pmichaud++ (happy birthday)
08:48 xinming left
masak oh, it's pmichaud's birthday today? 08:48
08:49 xinming joined, synth left
frettled Yep, the other day, he told us he's born on Friday 13th. 08:49
This is what I've been saying for nearly thirty years: Friday 13th is a lucky day.
masak believes it's orthogonal to luck 08:50
that's the thing about stochastic variables, see: they're independent of most things. :)
phenny: tell KyleHa that I think the 'return fail()' in his recent RT #64990 test looks a bit redundant. shouldn't 'fail()' be sufficient? 08:51
phenny masak: I'll pass that on when KyleHa is around.
frettled masak: I like to think of luck as a stochastic constant
08:52 kane_ left
masak frettled: you may do that. in the end, it might all come down to definitions whether we agree or not. 08:52
Matt-W luck is an illusion
masak I'd buy that. 08:54
Matt-W on a t-shirt?
frettled masak: insert smiley at appropriate place in previous statement :) 08:55
08:57 eMaX joined, xinming left, xinming joined
frettled Matt-W: on a shoulder bag, while you wear a Google «I'm feeling lucky» t-shirt 08:58
masak frettled: oh, sure. I just have a tendency to answer seriously no matter what the jokinglyness of the thing I reply to.
frettled masak: ouch, you're too much like me in that regard.
BTW, wouldn't it be nicer if we had a sofa in here? 08:59
masak frettled: I've been wanting one for years!
Matt-W frettled: no, I'd prefer the primary message to be primary
masak standing up makes my legs sore.
09:02 xinming_ joined
frettled If I've read the synopsis right, $foo = <<EOF; (…stuff…) EOF has been replaced with $foo = q:to/EOF/; (…stuff…) EOF 09:05
masak frettled: indeed.
frettled or qq:/to/EOF/ if I want interpolation 09:06
cono q:to/.*EOF$/ ? 09:07
frettled But, AFAICT, this doesn't yet work in rakudo, or am I missing something? 09:09
masak it doesn't yet work in Rakudo. 09:12
it's pending grammar updates.
09:13 EDevil joined
frettled aha 09:19
09:21 sri_kraih joined
Matt-W is it one of the things we should get when Rakudo's using STD.pm? 09:21
moritz_ yes
I'm really looking forward to that day. 09:22
Matt-W me too
s/// as well :D
masak and macros! 09:24
I predict macros will be as much of a killer feature as grammars.
moritz_ how much macros does STD.pm do? 09:25
09:25 xinming left
masak good question! 09:26
std: macro foo { "I CAN HAZ MACROS!?" }; say foo 09:27
p6eval std 27976: OUTPUT«ok 00:04 37m␤»
masak I can't think of a way to test it in better detail. 09:28
moritz_ std: macro infix:<|||>($a, $b) { quasi {{{ $a + $b }}} }; 4 ||| 5
p6eval std 27976: OUTPUT«ok 00:03 41m␤»
Matt-W I'd need to learn exactly how it works first 09:29
masak ah, good idea.
Matt-W moritz_: what does 'quasi' mean?
masak Matt-W: think "subroutines called at compile time"
moritz_ Matt-W: it's a quoting construct that turn perl code into syntax trees
it means "don't run this thing, but return (and interpolate) the AST it generated"
masak tries not to drool 09:30
moritz_ (if I understood that correctly)
Matt-W ah 09:31
so that's how you replace a macro invocation with a different bit of code
moritz_ std: macro moose () { quasi { $COMPILING::x } }; moose() # should be an error because $x as not defined where moose() is called
p6eval std 27976: OUTPUT«ok 00:03 40m␤»
masak moritz_: but should STD.pm detect it? it only does syntax checks. 09:33
moritz_ masak: that's a tough question 09:34
it *is* a syntax check
but one that requires to run code at compile time
d'oh
masak tough indeed.
moritz_ notes that d'oh is a valid identifier in Perl 6 09:36
frettled hehe
09:38 xinming_ left 09:41 _timbunce joined
mberends masak: pong 09:44
masak mberends: oh hai. sorry I'm late. my body overslept today.
it's funny, I got up without a problem every day in Lisbon. at home it's harder.
mberends :) I'm expecting interruptions soon, so shall we discuss HTTP::Daemon? 09:46
cono masak: u need to have everyday conference at 9:00 :D
masak cono: yes, that'd really help.
frettled masak: it's the time differential and jet lag, combined with a low sunspot activity
cono and early breakfast at alif... 09:47
masak mberends: I'm currently 80% preoccupied at $WORK, but let's try.
frettled cono: and the Portuguese pastries, which helped me gain nearly 3 kg.
masak mberends: the objective is to abstract away H::D into a Web::Handler.
mberends: Rack contains all the prior art we need. seems to me Rack::Handler::Webrick is a good template to start from. 09:48
cono frettled: what about Radisio ? :D
09:48 wknight8111 joined, donaldh joined 09:49 alanhaggai left
jnthn oh hai 09:51
mberends masak: does Webrick also run as the application main process, calling back other handlers when browser requests arrive?
masak mberends: yes, I think so.
jnthn: o/
mberends jnthn: hi
cono jnthn: privet :D
mberends oh, visitors. afk & 09:52
frettled cono: what's Radisio? 09:53
cono frettled: oh, it will be hard w/ my english :D 09:54
frettled: you was at yapc party?
09:55 xinming joined
cono some restaurants purpose this stuff, when they bring meet meet meet :D 09:55
near hotel alif was restaraunt w/ radisio
so many restaraunts w/ radisio in Lisbon 09:56
10:01 xinming left
jnthn cono: привет :-) 10:03
masak: Sleep's a weird thing. I epicly failed to fall asleep last night and thus spent most of the morning sleeping. :-/ 10:04
cono :D 10:05
masak jnthn: I have this bug in my awakening program right now: I wake up, get up, detect how tired I am, and go back to bed. thus, I'm never tired enough in the evenings, and I fall asleep too late. 10:09
jnthn files masakbug 10:10
;-)
masak oh, if t'were that simple! :/ 10:11
Matt-W it's simple 10:13
it's just not easy to fix
10:13 payload left
Matt-W I'm sure your parents were advised about getting your system software written in INTERCAL 10:13
EDevil cono: It's called Rodisio. :) 10:14
jnthn So the fix is COMEFROM BED ?
masak likes how Threaded INTERCAL allows threads simply by allowing multiple COME FROMs from the same label 10:15
10:18 xinming joined 10:20 iblechbot left
cono EDevil: ah, my bad :D Thanks 10:22
Matt-W jnthn: yes but where?
masak: that's very much in keeping with the INTERCAL spirit 10:23
masak Matt-W: so is the later-added I/O. I'm still not sure I grok that part. 10:24
Matt-W I don't grok any of it to the point where I could write anything non-trivial in it 10:25
10:26 wknight8111 left
jnthn Matt-W: Probably somewhere near COFFEEMACHINE ;-) 10:26
Matt-W :) 10:27
or in the Perl 6 module
because then he arrives somewhere interesting
10:29 Patterner left
jnthn tweaks Parrot's config stuff for his compiler and sees if he can build Rakudo now. 10:30
Arrgh! 10:34
It doesn't even copy the .lib file we need into the build tree...
Matt-W Oh dear 10:35
Matt-W is reminded of building some stuff at work recently
including one third-party library that's old enough that the platform I was building it on didn't even exist then 10:36
and which apparently had a broken build system in that release anyway
10:36 rdice joined 10:38 xinming_ joined 10:42 Psyche^ joined 10:43 Psyche^ is now known as Patterner 10:52 xinming left 10:53 stepnem left 10:54 ihrd joined, ihrd left 10:55 xinming joined, ruoso left 10:58 mikehh_ joined 11:01 xinming_ left
frettled cono: Yes, I was at the YAPC parties, and EDevil++ for helping me find the Wikipedia article; yes, I really like Rodisio! That was also a probably cause for my weight increase. 11:01
jnthn Ahh...YAPC parties. :-) 11:04
Damm, *so* close but still not managed to fix the Rakudo build on MSVC++ :-(
frettled There was only one downside to the Rodisio dinner: noise. It was near impossible to hold a conversation there. 11:05
11:12 mikehh left 11:13 payload joined 11:15 meppl joined 11:20 donaldh left, xinming left 11:21 xinming joined 11:22 donaldh joined, stepnem joined 11:24 stepnem left 11:26 xinming_ joined
masak could someone explain the "hyperpun" (as implied by TheDamina) in raiph's message? 11:29
moritz_ TheDamina? :-)
jnthn masak: I didn't get it either, fwiw.
masak moritz_: s/ina/ian/ 11:30
("With this whiny man exchange ultimately having bourne supreme fruit, the apocalypse watch for the post damian weekend begins...")
jnthn Phew, I now have a working Rakudo build again.
moritz_ where was that? p6l?
jnthn Sorry in advance if my hackings have caused anyone else any breakage, but I'm hopeful not.
Though gah, the dependencies are kinda shafted somehow such that make test after make goes and rebuilds a bunch of stuff. HOw wonderful. 11:31
masak moritz_: aye.
ooh! a Perl quiz! it's been a while... 11:33
11:33 xinming__ joined
masak I have a good mind to solve it in Perl 6, of course. 11:33
11:34 xinming left
dalek kudo: 75293d3 | jnthn++ | build/PARROT_REVISION:
Bump us up to latest Parrot revision to get Win32/MSVC++ install related fixes.
11:34
kudo: 0d4fe08 | jnthn++ | (2 files):
A copule of tweaks to get Rakudo building on MS VC++ and Win32 again after the ins2 branch merge. I'm hopeful that this will not break things too much for @other.
11:36 ihrd joined
masak ihrd: o/ 11:36
ihrd masak: :)
your presintation is relay cool! 11:37
masak ihrd: thank you. :)
jnthn BTW, now Rakudo implements .^parents(:tree), it's just begging for somebody to use the SVG module to write a script to plot inheritance charts. ;-)
masak ihrd: I hope to release the presentation software as a CPAN module.
frettled masak: Perl quiz? Where?!
ihrd masak: are you use p6 in this software? 11:38
masak frettled: on a list called, I think, perl-qotw-discuss.
frettled masak: aha 11:39
masak ihrd: yes. it will be a p5/p6 twin module. equally runnable on perl and perl6.
moritz_ jnthn: btw build continues to work $here
frettled masak: where do I subscribe? :D
masak frettled: I don't have the faintest. google for it.
frettled masak: I'm feeling lucky. 11:40
masak here we go again. :)
moritz_ ah, the old MJD hat 11:41
with the links to the archives being 404s
jnthn moritz_: Great, thank you. 11:42
colomon_ rakudo: ((2,3,4) <<*>> (2,2,2,2,2)).perl.say 11:43
p6eval rakudo 69eee0: OUTPUT«[4, 6, 8, 8, 8]␤»
11:44 xinming_ left
moritz_ is <<*>> the "sunshine operator" 11:44
colomon_ looks like a flying saucer to me. :) 11:45
pugs_svn r27977 | pmurias++ | started Inline::Mildew
11:48 jd8hh57 left, xinming__ left
huf looks like the big spider: www.mobygames.com/game/dos/gobliiin...otId,5429/ 11:48
11:49 payload left
frettled masak: Apparently, it's not possible to subscribe anymore, hee-hee. 11:52
It's a very exclusive list! 11:53
masak slight spec wording suggestion: for the keys/values/pairs methods in Hash in S32/Containers, change "Iterates the elements of C<%hash> in no apparent order" to "Iterates the elements of C<%hash> in a non-determinable order". what do y'all think?
frettled: is that so! well, I had nothing to do with it. :)
11:54 xinming joined
frettled masak: perhaps you destroyed it, hmm? :D 11:56
masak: I'd prefer a choice of words similar to that I changed S09 to ;)
moritz_ masak: I'd rather write "in an arbitrary order"
frettled But I forgot to fiddle with S32/Containers while I was at it.
masak moritz_: I liked 'non-determinable', because to me it's more to the point than 'arbitrary'. 11:57
frettled masak: "arbitrary" is more frequently used. 12:00
masak agreed. 12:01
but to me, "arbitrary" might as well mean, "the order is fixed by an arbitrary decision of ours".
moritz_ "arbitrary and impleemntation dependent" 12:02
s/ee/e/
masak slightly better.
12:02 test_ joined, ruoso joined 12:03 test_ left
pmurias ruoso: hi 12:04
lambdabot pmurias: You have 3 new messages. '/msg lambdabot @messages' to read them.
ruoso hi pmurias
have you seen my blog post?
pmurias yes
ruoso do you think it's a good plan? 12:05
pmurias can't think of a different one
frettled masak: I think the words used in S09 now are "implementation dependent and arbitrary" :)
pmurias ruoso: we need to have a way of running perl6 code from perl5 to test the perl5 values RI's work correctly 12:06
ruoso pmurias, that is the part of "Implementing the SMOP interpreter and continuation class APIs in the perl5 interpreter"
masak frettled: that's fine, too; the order of the descriptions doesn't... oh wait. :) have we gotten stuck in a metacircular discussion? 12:07
12:07 xinming_ joined
frettled masak: or a circular metadiscussion? 12:07
masak halp! 12:08
ruoso or a meta-masak and meta-frettled circling discussion?
frettled Oh, freddled gruntlebuggit, thy micturations are to me ...
pmurias ruoso: we might want to do before filling in the RI's for SV* as we should be able to test things before we implement them
s/do/do that/ 12:09
12:13 xinming left
pmurias ruoso: you are aware how the current perl5 intergration works? 12:15
lisppaste3 frettled pasted "S32/Containers iterator rephrase" at paste.lisp.org/display/85318 12:16
masak frettled: I like. 12:17
moritz_ +1
frettled goodie.
12:19 KyleHa joined
moritz_ rakudo: say *.() 12:19
p6eval rakudo 0d4fe0: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (/tmp/Bb59HvSYH9:2)␤»
ruoso pmurias, adding the RI slot to SV* can be tested at first with the current p5 test suite
pugs_svn r27978 | jani++ | S32/Containers iterator rephrase (similar to S09 hash keys spec)
ruoso it shouldn't cause any trouble in p5 code
moritz_ tries to make that a closure that invokes its first argument, and fails
ruoso pmurias, I'm aware current integration works, and I'm counting on it for the item 3 12:20
pmurias, after having the perl5 interpreter as the smop interpreter
we're going to use the current scheme to allow p5 code to call smop code
12:21 jd8hh57 joined
KyleHa Good morning, #perl6! 12:21
phenny KyleHa: 06:54Z <moritz_> tell KyleHa in r27973 you test for %(...).exists. Note that Hash.exists is a Rakudo workaround for %hash{$item}:exists, not part of the spec
KyleHa: 08:51Z <masak> tell KyleHa that I think the 'return fail()' in his recent RT #64990 test looks a bit redundant. shouldn't 'fail()' be sufficient? 12:22
masak yo, KyleHa.
KyleHa Yes, 'return fail()' is a little redundant, but I don't think it's wrong.
Seems like { 1 } vs. { +1 } to me. 12:23
masak KyleHa: then I think it's more redundant than you think.
12:23 jferrero left
masak KyleHa: fail() already exits the sub. 12:23
moritz_ I agree it's not wrong, though
masak sure, but it looks slightly unprofessional.
moritz_ the arguments of return() are evaluated before the actual return
KyleHa I'm shocked to find that .exists is not part of the spec. I'll have to rework that stuff. 12:24
masak it's no better than 'return return 42'
pmurias ruoso: the right place to set the RI on SV* seems to be new_SV
moritz_ masak: this is the test suite. We test weird cases, and don't have to look professional at all
KyleHa Oh, I get it. I forgot that fail() exits. So it's like { exit die }
moritz_ IMHO we should have both
masak KyleHa: yes.
ruoso pmurias, we first need to initialize the RI
moritz_ one fail(), and one 'return fail()'
masak moritz_: I think I worded that wrong. it looks as if the test writer misunderstood the semantics of fail(). 12:25
ruoso pmurias, and we probably need to set the SV RI into some var of the perl interpreter, so it can know it
masak moritz_: which, without a comment, is confusing to the reader.
moritz_ masak: agreed
12:25 zamolxes joined
pmurias ruoso: so how is our initialisation sequence supposed to look like? 12:27
ruoso we need to inject the intialization of the p5 RIs in the PerlInterpreter initialization
and probably inject other initializations as well
pmurias and where is the polymorphic runloop initalised? 12:28
ruoso in the p5 interpreter itself
pmurias we need the p5 runloop to load Coro 12:29
jnthn loliblogged
use.perl.org/~JonathanWorthington/journal/39455
frettled jnthn++ - I think that's the first explanation .HOW I actually think I understood. 12:33
KyleHa moritz_: So anything that says .can( 'exists' ) or .exists( $x ) is bogus? Should the bug itself be rejected, or do I just change my syntax?
rakudo: say %( 'foo' ~~ /<alpha> oo/ ){ 'alpha' }:exists 12:34
p6eval rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ":exists"␤in Main (src/gen_setting.pm:3369)␤»
12:34 takadonet joined
moritz_ the adverb form is NYI 12:34
takadonet morning all
ruoso pmurias, maybe we can get the lowlevel Coro part before the high-level
moritz_ KyleHa: I don't remember the bug report. In some sense it's sensible to expect normal Hash behaviour from whatever %(...) returns... 12:35
but still we can't put a test for this in the spectests, because "normal hash behaviour" doesn't conform to current specs right now 12:36
masak rakudo: class A {}; class B is A {}; class C is A {}; class D is B is C {}; say D.^parents(:tree).perl
p6eval rakudo 0d4fe0: OUTPUT«[[B, [A, [Any, [Object]]]], [C, [A, [Any, [Object]]]]]␤»
masak ah. nice.
pugs_svn r27979 | kyle++ | [t/spec] Test fail() and return fail() both
moritz_ indeed. jnthn++ 12:37
masak strangely enough, I get a Null PMC access locally.
ruoso jnthn++
masak on a fairly new Parrot and Rakudo.
Matt-W jnthn++
ruoso jnthn, anyway... any idea of when lazyness gets to be implemented?
pmurias ruoso: so when do we initialise the RI's? 12:38
perl_construct?
ruoso I guess
jnthn ruoso: Before Rakudo * ;-) 12:39
ruoso: pmichaud++ will be taking on the initial refactor to get us in that direction.
ruoso: But some PGE refactors that are blocking other things are higher priority.
pugs_svn r27980 | kyle++ | [t/spec] Cut out the tests for RT #64948 12:40
r27980 | kyle++ |
r27980 | kyle++ | The tests as written don't conform to the spec. I'm cutting instead of
r27980 | kyle++ | fixing due to time constraints with intent to return to this later.
ruoso right
masak (PGE refactors)++
jnthn So I'm not completely sure where it is on pm's schedule.
moritz_ is it the dreaded isa-RPA vs. has-a-RPA refactor that's needed?
jnthn For one, I want to move our lexical and scope handling to be more what STD does, but that blocks on contextuals, which blocks on PGE progress. 12:41
moritz_: Yes, it is.
KyleHa Thanks for your supervision, moritz++ and masak++ I feel much more comfortable going forth with my best guesses knowing that they're likely to be reviewed by folks more knowledgeable than I.
masak KyleHa: thanks for enduring our reviews. :) and for lots of great tests. 12:42
jnthn moritz_: Though pm seems to dread it less than I. ;-) 12:43
12:43 KyleHa left
Matt-W jnthn: is LTM one of these PGE refactors required? 12:45
pmurias ruoso: i changed SV_HEAD to have SMOP__Object__BASE instead of just a pointer to RI 12:46
ruoso pmurias, ah... right...
jnthn Matt-W: Yes, that needs to happen, though not as urgently as some other things.
masak jnthn: why do I get a Null PMC access in isa() when doing the last 'rakudo:' one-liner on my computer, with new-built Parrot and Rakudo? 12:48
masak runs the spectests
Matt-W jnthn: I believe it's one of the requirements for STD.pm? 12:50
frettled D'oh! I forgot to check whether the spectests finished at my home Mac this morning.
moritz_ yes, but STD.pm also requires otehr stuff, like proto regexes 12:51
Matt-W oh yes those
I have no idea what they do :)
jnthn Matt-W: The .^parents(:tree) one? 12:53
moritz_ Matt-W: proto regexes are multiple regexes with the same name, and if you match against them, you match against all the alternatives separated by | 12:54
jnthn Matt-W: Yes, it is. However, afaiu the operator precedence parser in STD hangs off protoregxes, plus they should get us a big speed win, so afaik pm plans on doing those first.
masak jnthn++ # blog post
12:54 ihrd left
masak (big speed win)++ 12:55
pmurias lunch&
jnthn masak: oh, I meant you, not Matt-W above... 12:56
erm, 2 up 12:57
masak: I can't reproduce a null pmc access locally.
:-S
Matt-W moritz_: okay umm why? 12:58
12:59 molaf left
moritz_ Matt-W: it means that you can add alternatives by subclassing without having to list all existing alternatives 12:59
masak jnthn: right, and neither can p6eval.
jnthn: so I wonder what's going on...
moritz_ masak: try a clean checkout? 13:00
masak spectests look fine so far, but I'm only on S06.
moritz_: urgh. maybe later. :/
moritz_ Matt-W: I wrote a bit about the importance in this piece: perlgeek.de/en/article/mutable-gram...for-perl-6
Matt-W moritz_: that's handy
Matt-W looks 13:01
13:01 abra joined
Matt-W moritz_: ahah! Now I comprehend. Very cunning. 13:07
colomon_ Hi all. 13:13
Are where clauses implemented yet in Rakudo?
masak colomon_: aye.
colomon_ Yay! 13:14
13:17 polettix joined
polettix perl6: my %H=(whatever=>76); my $x=%H.delete('whatever'); say $x; say $x+0; 13:19
p6eval rakudo 0d4fe0: OUTPUT«76␤1␤»
..pugs: OUTPUT«76␤76␤»
..elf 27980: OUTPUT«76␤137732896␤»
polettix is this a known bug in rakudo? 13:20
masak polettix: what's the bug? 13:21
polettix: looks right (but weird) to me.
polettix say $x prints 76, but say $x+0 says 1
masak perl6: my %h = whatever => 76; my $x = %h.delete('whatever'); say $x.WHAT 13:22
p6eval elf 27980: OUTPUT«Can't locate object method "delete" via package "Pair" at (eval 125) line 4.␤ at ./elf_h line 5881␤»
..pugs: OUTPUT«Int␤»
..rakudo 0d4fe0: OUTPUT«Array()␤»
masak polettix: ah, so that's why.
polettix I see now
masak polettix: that might be a bug.
Matt-W hmm why would delete on a hash return an array 13:23
masak that's the question.
polettix I hope so, otherwise it would be - let's say - counterintuitive :)
13:23 synth joined
masak even .pick() doesn't return an array for single items nowadays. 13:23
polettix maybe because of slices?
masak in fact, .pick() and .delete() are quite similar in that respect.
they should return the same types as far as possible.
Matt-W oooh 13:24
delete on List is definitely meant to return a list
as it can take a list of subscripts
so I assume the same for Hash
polettix it was driving me nuts in a naive implementation of Eratosthenes' sieve
Matt-W S32/Containers doesn't mention .delete on Hash, only :delete. This seems a little odd.
masak grrr. 13:25
there's too little decision-making going on in that region of the spec.
and has been, for over a year.
Matt-W yeah it's all a bit nebulous
masak :exists and :delete have been on the way in for a long time now. 13:26
colomon_ I thought someone said upstream that %hash.exists is a Rakudo-ism, and :exists is proper.
Matt-W I was looking at it at one point, but it was just like 'eeerrrr where do I start'
masak and .exists and .delete have been on their way out, maybe, sometimes.
colomon_ Presume delete would be the same?
Matt-W I believe it's supposed to be :exists and :delete because they reuse the existing subscripting mechanism
colomon_ Personally, I prefer .exists and .delete.
masak I don't care which one it ends up being, but I don't like living in an in-between world. 13:27
Matt-W mmm
and we certainly shouldn't have both, IMO
masak having both's OK with me too.
Matt-W that would just be ridiculous
masak :)
Matt-W I know TMTOWTDI
but there are limits...
masak I simply don't care enough in this issue. it's the indeterminacy that miffs me. 13:28
Matt-W mmm I'd accept either right now
13:30 tak11 left
frettled What's the point of using colons for that? 13:31
frettled asks a stupid question. :)
Matt-W it's because it's a modification to the usual subscripting operation
they're adverbs, not methods
polettix crap, I recompiled rakudo and now it can be called only from its compilation directory... 13:32
frettled so are there other cases where we have things that aren't methods, but which are specified with the dotted syntax anyway?
polettix: make install
polettix has this changed since yesterday?
jnthn polettix: Yes. 13:33
polettix ahahah fantastic
frettled was useful! o/
13:35 payload joined, abra left
polettix thank you frettled 13:36
13:37 abra joined
Matt-W frettled: I wouldn't rule it out, but those are the ones I know about 13:38
frettled Matt-W: if they're the only cases, then I'd argue that they should go, and we should rather learn (and teach others) consistent use of adverbials. 13:39
13:39 JimmyZ joined
frettled In this case, understanding is probably aided by skipping the dotted form. 13:39
Matt-W having both is bound to lead to piles of unpleasant confusion 13:40
I do like the elegance of the adverbial form
it means there's one way to select members, and then you can either get them, delete them or see if they exist 13:41
I suppose they just end up as named optional parameters to postcircumfix:<{ }> 13:42
colomon_ Matt-W: I have to say that explanation (even if not technically true (yet?)) makes :exists make a lot more sense to me. 13:45
Matt-W well :exists does work :)
(I think)
colomon_ Ah, I thought .exists was only there because :exists doesn't work yet.
Matt-W rakudo: my %h = (foo => 'bar'); say "yes" if %h<foo> :exists; 13:46
p6eval rakudo 0d4fe0: OUTPUT«sh: ./perl6: No such file or directory␤»
Matt-W doh
PerlJam Matt-W: NYI I think 13:47
Matt-W I'm sure I used it the other day
masak I don't think you did. 13:49
PerlJam perl6: my %h = (foo => 'bar'); say "yes" if %h<foo> :exists; 13:53
p6eval pugs: OUTPUT«*** ␤ Unexpected ":exists"␤ expecting operator␤ at /tmp/4NlbdZbYwb line 1, column 46␤»
..rakudo 0d4fe0: OUTPUT«Statement not terminated properly at line 2, near ":exists;"␤in Main (src/gen_setting.pm:3369)␤»
..elf 27980: OUTPUT«Parse error in: /tmp/6SJj0UENLM␤panic at line 1 column 52 (pos 52): No previous operator visible to adverbial pair ([#<Match:0x817c214 @on_str="my %h = (foo => 'bar'); say \"yes\" if %h<foo> :exists;", @from=45, @to=52, @bool=true, @hash={:value=>#<Match:0x817c2c8 @on_str="my %h
..= …
masak ah!
jnthn: I've got it!
PerlJam (on the odd chance that one of the implementations groks it)
masak jnthn: it's when I run rakudo outside the rakudo directory!
jnthn masak: Had you make install'd? 13:54
masak jnthn: what, Rakudo? no...
13:54 KatrinaTheLamia left
masak tries that 13:54
jnthn masak: I think you need to make install Rakudo now, to run it outside the build directory. 13:55
PerlJam masak: what happens when you run rakudo outside of the rakudo tree?
masak jnthn: correct. now it works.
PerlJam: previously, I got a Null PMC access.
now it works again. jnthn++ 13:56
13:56 DakeDesu joined
Matt-W hmm 13:56
polettix should I report about the possible bug with .delete() somewhere?
Matt-W I may be hallucinating
PerlJam "Null PMC access" will be the bane of rakudo's existence.
masak polettix: yes, please do. [email@hidden.address] 13:57
polettix OK
jnthn PerlJam: It's like segfaulting without the segfault. :-) 13:58
13:58 synth left, synth joined
pmichaud good morning, #perl6 13:58
cono morning
moritz_ good morning pmichaud, and happy birthday to you 13:59
JimmyZ & good evening, #perl6 ;)
PerlJam jnthn: then perhaps a goal for Rakudo* should be to *never* *ever* output a "Null PMC access" :)
Matt-W pmichaud: I believe it's the day we give thanks for your birth
masak happy birthday, pmichaud!
cono pmichaud: happy birthday!
PerlJam pmichaud: happy birthday!
JimmyZ happy birthday pmichaud!
pmichaud thank you all :)
JimmyZ ;) 14:00
PerlJam pmichaud: check your facebook page for a message from Cyndi too :)
14:02 pyrimidine joined
JimmyZ I can't open facebook. because of Chinese Great FireWall :( 14:04
masak of course. Facebook is subversive, and not nearly Marxist-Leninist enough. 14:06
Matt-W fortunately you can talk about Perl 6
facebook's fairly missable really 14:07
14:07 azawawi joined
azawawi hi 14:07
masak and we have an eight-month plan! :)
JimmyZ and I can't open wikipedia.org before. :)
Matt-W although of course in principle it should be accessible
masak: it's almost like being pregnant
JimmyZ I think tor is my friend now 14:08
azawawi pmichaud: any idea how to debug a Perl 6 app using parrot_debugger?
masak Matt-W: "Perl 6: almost like being pregnant"
PerlJam masak: does that mean there's going to be a painful birthing? 14:09
jnthn rakudo: eval 'dmbtt!Cjsuiebz!|!nvmuj!nfuipe!qn)A*!|!#up!zpv#!~<!nvmuj!nfuipe!qn)&*!|!#qnjdibve#!~!~<!)#Ibqqz!cjsuiebz!#!==⌂==!)Cjsuiebz/qn)\^*!yy!3-!Cjsuiebz/qn)|~*-!Cjsuiebz/qn)\^***??/tbz'.reverse.subst(/(.)/, { chr(ord(~$0) - 1) }, :g)
14:09 __ash__ joined
Matt-W masak: no I think it's "Developing Rakudo Star: almost like being pregnant" 14:09
p6eval rakudo 0d4fe0: ( no output )
jnthn aww 14:10
rakudo: eval 'dmbtt!Cjsuiebz!|!nvmuj!nfuipe!qn)A*!|!#up!zpv#!~<!nvmuj!nfuipe!qn)&*!|!#qnjdibve#!~!~<!)#Ibqqz!cjsuiebz!#!==⌂==!)Cjsuiebz/qn)\^*!yy!3-!Cjsuiebz/qn)|~*-!Cjsuiebz/qn)\^***??/tbz'.reverse.subst(/(.)/, { chr(ord(~$0) - 1) }, :g)
p6eval rakudo 0d4fe0: ( no output )
jnthn rakudo: say "alive"
p6eval rakudo 0d4fe0: OUTPUT«alive␤»
Matt-W did you remember to stick a print statement in there anywhere?
jnthn rakudo: eval 'dmbtt!Cjsuiebz!|!nvmuj!nfuipe!qn)A*!|!#up!zpv#!~<!nvmuj!nfuipe!qn)&*!|!#qnjdibve#!~!~<!)#Ibqqz!cjsuiebz!#!==⌂==!)Cjsuiebz/qn)\^*!yy!3-!Cjsuiebz/qn)|~*-!Cjsuiebz/qn)\^***??/tbz'.reverse.subst(/(.)/, { chr(ord(~$0) - 1) }, :g)
p6eval rakudo 0d4fe0: ( no output )
jnthn rakudo: eval 'dmbtt!Cjsuiebz!|!nvmuj!nfuipe!qn)A*!|!#up!zpv#!~<!nvmuj!nfuipe!qn)&*!|!#qnjdibve#!~!~<!)#Ibqqz!cjsuiebz!#!==⌂==!)Cjsuiebz/qn)\^*!yy!3-!Cjsuiebz/qn)|~*-!Cjsuiebz/qn)\^***??/tbz'.reverse.subst(/(.)/, { chr(ord(~$0) - 1) }, :g); say "alive"
p6eval rakudo 0d4fe0: OUTPUT«alive␤»
jnthn huh
oooh...unprintable char 14:11
14:11 eternaleye left
PerlJam jnthn: you failed to check the return value of your eval :) 14:12
14:13 szabgab left
jnthn oh well, I'll just go for the less obfuscated... 14:13
rakudo: class Birthday { multi method pm(@) { "to you" }; multi method pm(%) { "pmichaud" } }; ("Happy birthday " <<~<< (Birthday.pm([]) xx 2, Birthday.pm({}), Birthday.pm([])))>>.say
p6eval rakudo 0d4fe0: OUTPUT«Happy birthday to you␤Happy birthday to you␤Happy birthday pmichaud␤Happy birthday to you␤»
azawawi jnthn: any idea how to debug a Perl 6 app using parrot_debugger? 14:16
jnthn azawawi: I'm not entirely sure how to debug a Parrot app using parrot_debugger ;-)
Maybe ask over at #parrot, I really don't know the status of the debugger
Matt-W jnthn: that is slightly less impressive that way
jnthn Matt-W: Indeed. It all worked great locally, but something got messed up in the paste. 14:17
Matt-W :(
jnthn rakudo: say 'dmbtt!Cjsuiebz!|!nvmuj!nfuipe!qn)A*!|!#up!zpv#!~<!nvmuj!nfuipe!qn)&*!|!#qnjdibve#!~!~<!)#Ibqqz!cjsuiebz!#!==⌂==!)Cjsuiebz/qn)\^*!yy!3-!Cjsuiebz/qn)|~*-!Cjsuiebz/qn)\^***??/tbz'.reverse.subst(/(.)/, { chr(ord(~$0) - 1) }, :g);
azawawi jnthn: it works nicely... but using trace it sometimes fails
p6eval rakudo 0d4fe0: OUTPUT«class Birthday { multi method pm(@) { "to you" }; multi method pm(%) { "pmichaud" } }; ("Happy birthday " <<⌁<< (Birthday.pm([]) xx 2, Birthday.pm({}), Birthday.pm([])))>>.say␤»
jnthn Oh, it was the ~ 14:18
oh, turns out ~ is char 126
And 127 is DEL
In ASCII at least.
PerlJam maybe you should've -1 instead. 14:19
azawawi jnthn: my idea was to automate parrot debugger process to get a visual Padre debugger... alas it still fails
14:19 arthur-_ left
PerlJam oh, -1 wouldn't have worked either. 14:19
jnthn PerlJam: Didn't work for spaces... 14:20
masak jnthn: (re p6eval script) scary :)
PerlJam wonders how big a base64 decoder would be ... 14:24
(and could it fit in the method call chain?) 14:25
pmichaud jnthn: any joy on getting a build to work for msvc++ yet?
(I'm distracted a bit this morning -- just discovered that marriott-- took it upon themselves to unilaterally change our hotel reservations for this weekend) 14:26
jnthn pmichaud: Yes. Already comitted fixes to Parrot and Rakudo this morning.
14:26 mkfort left
pmichaud jnthn: excellent. did you see my discussion with allison yesterday? 14:26
jnthn Yes
pmichaud great
jnthn Read that before doing the changes.
pmichaud goes to look at the changes
hmmm... we eliminated the _cg and _cgp stuff altogether? 14:27
does that.... wokr?
*work?
14:28 alester left
moritz_ it still builds for me on linux, but I only checked with the default run core 14:28
jnthn pmichaud: Well, yes and no
pmichaud: I don't think anyone defaults to using those run cores.
pmichaud: That is, they're not defaults on any platform. 14:29
pmichaud okay
if they aren't defaults, I can probably live with that
jnthn And given I don't think perl6 fakeexecutable offers up a way to change the runcore at the command line anyway...
pmichaud right.
14:29 Patterner left
pmichaud I was thinking they might not even link properly or something 14:29
jnthn IMO, we can add 'em back when there's a sensible way to know what to build.
14:29 Psyche^ joined, Psyche^ is now known as Patterner
jnthn Probably a question for #parrotsketch as to what's the standard way to do that going to be. 14:30
pmichaud I agree -- for some reason I figured they were necessary to even get a build to run (even if not using the runcore)
jnthn No, they ain't.
pmichaud then they can be ignored for now.
jnthn It builds a DLL per runcore and just loads the applicable one.
14:37 leedo_ joined 14:41 rfordinal3643 left, rfordinal joined 14:46 hercynium joined 14:49 szabgab joined 14:52 synth left, synth joined 14:54 Front_slash joined 14:56 azawawi left 15:00 rfordinal left 15:03 xxx_hi joined 15:04 xxx_hi left
masak rakudo: module A { class B { #`(how do I refer to C from here?) } }; class C {} 15:04
p6eval rakudo 0d4fe0: ( no output )
JimmyZ ugly comment :( 15:05
moritz_ masak: by pre-declaring C, of course 15:06
TimToady if it's ugly, then it's obvious to the eye that it isn't real Perl code :P
masak JimmyZ: I disliked them too in the beginning. it's abating.
moritz_: oh. sorry. assume C is before A, then.
moritz_ well, with 'C'
masak the problem was how to refer to things that aren't in the same module.
moritz_ or maybe ::C 15:07
JimmyZ rakudo: module A { class B { #(how do I refer to C from here?) } }; class C {}
p6eval rakudo 0d4fe0: OUTPUT«Embedded comments now require backticks at line 2, near "(how do I "␤in Main (src/gen_setting.pm:3369)␤»
moritz_ I think that Rakudo has a problem with seeing outer lexicals across class boundaries
masak moritz_: wouldn't ::C be a type parameter?
JimmyZ rakudo: module A { class B { #\(how do I refer to C from here?) } }; class C {}
p6eval rakudo 0d4fe0: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (src/gen_setting.pm:3369)␤»
moritz_ masak: isn't C a type?
masak moritz_: it is.
15:07 Psyche^ joined
JimmyZ rakudo: module A { class B { ##(how do I refer to C from here?) } }; class C {} 15:07
p6eval rakudo 0d4fe0: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (src/gen_setting.pm:3369)␤» 15:08
masak moritz_: that's a bit of a non-sequirur question, though.
moritz_ rakudo: class C { }; class A { class B { method foo { say C.perl } } }
15:08 Patterner left, Psyche^ is now known as Patterner
masak s/sequirur/sequitur/ 15:08
p6eval rakudo 0d4fe0: ( no output )
JimmyZ rakudo: module A { class B { #@(how do I refer to C from here?) } }; class C {}
p6eval rakudo 0d4fe0: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (src/gen_setting.pm:3369)␤»
moritz_ std: class C { }; class A { class B { method foo { say C.perl } } }
p6eval std 27980: OUTPUT«ok 00:02 37m␤»
JimmyZ rakudo: module A { class B { #$(how do I refer to C from here?) } }; class C {}
p6eval rakudo 0d4fe0: OUTPUT«Unable to parse block; couldn't find final '}' at line 2, near ""␤in Main (src/gen_setting.pm:3369)␤»
moritz_ rakudo: class C { }; class A { class B { method foo { say C.perl } } }; A::B.foo 15:09
p6eval rakudo 0d4fe0: OUTPUT«C␤»
moritz_ masak: see, it even works
TimToady std: class C {...}; class A { class B { method foo { say C.perl } } }; augment class C {}
p6eval std 27980: OUTPUT«ok 00:02 37m␤»
masak in short, type names are always absolute?
moritz_ TimToady: in a perfect Perl 6 you wouldn't need the 'augment' because C is only stubbed, right?
TimToady std: class A { class B { method foo { say ::C.perl } } }; class C {} 15:10
p6eval std 27980: OUTPUT«ok 00:02 37m␤»
TimToady correct
but std doesn't grok that yet
JimmyZ I'd say, so ugly comment!
TimToady std: class C {...}; class A { class B { method foo { say C.perl } } }; class C {}
p6eval std 27980: OUTPUT«===SORRY!===␤Illegal redeclaration of package symbol C at /tmp/t8zqEanRia line 1:␤------> { method foo { say C.perl } } }; class C⏏ {}␤FAILED 00:02 37m␤»
moritz_ ugliness is in he idea of the beholder
TimToady comments are supposed to be ugly so they stand out :) 15:11
JimmyZ It hurt my eyes.
TimToady I should make a syntax category for comment so it's easy to define your own
moritz_ JimmyZ: then don't use them :-) 15:12
mofino define your own comments?!? wow
15:12 nihiliad joined
JimmyZ why not #()? any problem? 15:12
15:12 nihiliad left
TimToady see the large thread in p6l about that 15:12
15:12 polettix left
PerlJam heh 15:12
JimmyZ ok
synth always liked //, dunno why 15:17
masak TimToady: if someone defines an operator containing '#', will it take precedence over the comment syntax? 15:18
TimToady it will follow LTM, like anything else
JimmyZ rakudo: sub #() {}
TimToady currently #` is a token
p6eval rakudo 0d4fe0: OUTPUT«Embedded comments now require backticks at line 2, near "() {}"␤in Main (src/gen_setting.pm:3369)␤»
JimmyZ rakudo: sub prefix:#() {} 15:19
p6eval rakudo 0d4fe0: OUTPUT«Malformed routine definition at line 2, near "prefix:#()"␤in Main (src/gen_setting.pm:3369)␤»
15:20 donaldh left
TimToady synth: you probably like // because it *doesn't* look like C/C++ code 15:20
JimmyZ rakudo: sub prefix:<#>() {} 15:21
TimToady (un)fortunately, it does look like Perl code
p6eval rakudo 0d4fe0: ( no output )
15:21 donaldh joined
JimmyZ rakudo: sub prefix:<#>() {}; #(); 15:21
p6eval rakudo 0d4fe0: OUTPUT«Embedded comments now require backticks at line 2, near "();"␤in Main (src/gen_setting.pm:3369)␤»
moritz_ LTM win, rakudo++ # or so
synth TimToady: Guess I didnt realize it also looks like an empty RE match 15:22
TimToady or a defined-or, where infix expected
15:23 zloyrusskiy left
moritz_ the empty regex is forbidden in Perl 6 anyway 15:23
TimToady std: //
p6eval std 27980: OUTPUT«===SORRY!===␤Null regex not allowed at /tmp/3dTpesexwy line 1:␤------> //⏏<EOL>␤FAILED 00:02 36m␤»
TimToady std: / a | b | /
p6eval std 27980: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/shZfKVgfnM line 1:␤------> / a | b | ⏏/␤ expecting any of:␤ termish␤ ws␤FAILED 00:02 37m␤»
synth are those ANSI escapes p6eval is spitting out? 15:24
PerlJam std: / | a | b /
TimToady color codes
p6eval std 27980: OUTPUT«ok 00:02 37m␤»
synth xchat does not parse
TimToady or look at irclog.perlgeek.de/perl6/today
synth i love my pretty printing
thanks
PerlJam TimToady: could not the trailing | be treated just as the empty | ? Or do you think the null pattern usage is yet too ingrained? 15:25
er, empty leading |
moritz_ though printing ANSI terminal escape sequences to IRC is a bit evil :-)
synth moritz_: I was gonna say :)
this aint ircII! :) 15:26
TimToady the leading null is allowed so that you can prefix all your alternatives with | or || as STD does in many places
but it doesn't mean to match a null string in that case
PerlJam sure, but a trailing | seems like it could be ignored just like trailing commas in a list (or the leading |). 15:27
TimToady it could, but I arbitrarily don't want to encorage postfix | over prefix | :)
s/cor/cour/
PerlJam fine by me, you're the language designer :) 15:28
15:29 pyrimidine left 15:33 arthur-_ joined
guest_007 rakudo: @5th=<earth water fire wind love>; say "Fifth element: "~@5th.elem; 15:34
synth really has to find the time to follow perl6 closer.. too busy working 15:35
p6eval rakudo 0d4fe0: OUTPUT«Syntax error at line 2, near "@5th=<eart"␤in Main (src/gen_setting.pm:3369)␤»
masak guest_007: an identifier can't start with a digit.
PerlJam and you need a my
moritz_ and you have to declare your variables 15:36
and I strongly recommend whitespaces around infix operators
guest_007 rakudo: my @5th=<earth water fire wind love>; say "Fifth element: " ~ @5th.elem;
p6eval rakudo 0d4fe0: OUTPUT«Malformed declaration at line 2, near "@5th=<eart"␤in Main (src/gen_setting.pm:3369)␤»
guest_007 ))) 15:37
PerlJam guest_007: you have to listen to *everything* people tell you
guest_007 okay
[particle] gets synth fired
we need more followers.
15:38 rfordinal joined
synth please do, I'll give you IBM's # and everything 15:38
synth hates his job ..
PerlJam [particle]: better would be to find a job that pays to work on perl6
synth spends all his free time writing perl and dayjob as an SA for a fortune 500 client for IBM
[particle] PerlJam: believe me, this i know.
synth the enterprise world sucks ;)
[particle] synth: oracle or db2?
synth I'm just a Linux jockey 15:39
got 300 ProLiants
[particle] oh, heh, i read SA as DBA
15:39 KyleHa joined
synth i love perl but I am trying to study 6 because I am very interested int he language becoming more... semantically clean? 15:40
I love perl with all my heart, it's such a fun language to 'think in' -- but the bar for entry being so high due to the assumptions one must know to work w/out strict and warn
scares most folk off
[particle] synth: start writing small programs with rakudo 15:41
solve some SA-type problems
moritz_ at least a 'use 5.11;' also enables strict
PerlJam synth: Good! We only want those that exhibit perseverance
synth PerlJam: this is true
[particle]: on my own sure, but I cant deploy that in this env even if its my own tool 15:42
I could deploy it on my test box...
PerlJam you know, the tenets of taekwondo would be good tenets for the perl community too.
synth PerlJam: "Take kids Money? "
PerlJam honesty, courtesy, integrity, perseverance, self control, courage, community 15:43
moritz_ PerlJam: is that ordered by importance? :-)
PerlJam (and they recently added: strenght, humility, knowledge for some reason.)
moritz_: I never thought about it, but I hope not! :) 15:44
synth PerlJam: I did tae kwon do for 5 years and I all I got was some supressive holds, countering throws and the forms
moritz_ doesn't that conflict with hubris? :-)
[particle] PerlJam: it seems, by recently adding some, that laziness is also implied :)
synth is a 1st dan black belt 15:45
JimmyZ I love perl6, because I'm lazy :(
[particle] rakudo: say "i love laziness, because i'm perl 6 :)"
p6eval rakudo 0d4fe0: OUTPUT«sh: ./perl6: No such file or directory␤»
synth 5 years of paying and 3 years of private study.. took forever..
PerlJam synth: which tkd faction were you in?
[particle] kicks p6eval
TimToady std: @5th=<earth water fire wind love>; say "Fifth element: "~@5th.elem; 15:46
p6eval std 27980: OUTPUT«===SORRY!===␤Whitespace is required between alphanumeric tokens at /tmp/YzIqtjLbiM line 1:␤------> @5⏏th=<earth water fire wind love>; say "Fi␤ expecting any of:␤ POST␤ postfix␤ postfix_prefix_meta_operator␤ standard stopper␤
..terminator␤ whit…
synth PerlJam: WTF
PerlJam synth: figured. I'm in ITA :) 15:47
synth PerlJam: at least you guys get to spar with helmets..
and pads :
:)
moritz_ hey, I could try to install rakudo into a sub dir to reduce the downtime when recompiling rakudo
synth still remembers all his Forms and everything, been at least 10 years... sorry to hijack the #perl6 topic
PerlJam (and as of yesterday I'm now a 1st degree level 2 black belt)
I don't know if WTF does the levels thing. 15:48
JimmyZ I want to get a perl job, but never had it.
15:48 jd8hh57 left
synth PerlJam: yeah each belt has levels 15:48
not just degrees
PerlJam synth: well, 1st degree ~ 1st dan
synth yeah 15:49
well congrats on the new belt even if you're not allowed to show pride
show some :)
synth once did 300 pushups for showing too much pride
15:51 mikehh_ is now known as mikehh
mikehh rakudo (0d4fe08) builds on parrot r40525 - make test/make spectest (up to 27980) PASS - Ubuntu 9.04 amd64 15:52
16:01 zamolxes left 16:07 JimmyZ left 16:09 cdarroch joined
__ash__ moritz_: i think i figured out a good place to add in calling a parent class explicitly, with the p6protoobject find_method function you can see if the function called contains a '::' and if it does, assume whatever is before the '::' is the parent class your going to look for, i haven't implemented it, but it sounds like it should work 16:09
KyleHa Would it make sense for there not to be a .defined method on @arrays and %hashes, or does that violate some rule such as "every Any must have a .defined method"? 16:11
TimToady @array := Array is undefined
lambdabot Smartly me lass
KyleHa I'd like @array.defined to throw an error. I'd like { ! @array.can( 'defined' ) } 16:12
TimToady why is everyone so throw-happy these days 16:13
pmichaud .defined is one of those methods that probably should not ever throw an error
TimToady throws are evil under multithreading
pmichaud the whole point of .defined is to be able to ask "am I likely to encounter an error?"
KyleHa Hmmm.
pmichaud in short, I disagree with uri's email comment that @a shouldn't have a .defined on it
jnthn __ash__: I suspect that's not really the way - better is to generate something a bit different at compile time. 16:14
KyleHa It sounded sensible at the time, 8-)
jnthn __ash__: That is, construct a P6Invocation that knows to start the search at a different place.
TimToady .defined is how we tell type objects form their instantiations
moritz_ I think either we spec defined/undef arrays/hashes properly, or require it to always return true
pmichaud it can't always return true 16:15
my @array := Array
say @array.defined # false
jnthn my @array; # equivalent to my @array := Array.new; ?
pmichaud jnthn: that does seem to be the question at present 16:16
jnthn Ah.
pmichaud I can see either side
we could do
my @array; # equivalent to my @array := Array
__ash__ jnthn: okay, i'll look into adding it there
pmichaud where manipulating @array causes it to autovivify
er, "to become defined"
or we could say
my @array; # equivalent to my @array := Array.new 16:17
TimToady much like my $x; $x[0] = 1; autovivs $x in Perl 5 maybe
$x->[0] rather
pmichaud where @array is then defined as soon as it's declared, as an empty array
TimToady (in p5)
jnthn __ash__: I'd been maybe pondering a dynop.
Though not quite convinced myself of that yet. 16:18
pmichaud __ash__: I'm not sure I follow what you're trying to accomplish
jnthn pmichaud: $foo.SomeParent::method(...) is meant to call the method from SomeParent, I think.
16:18 pyrimidine joined 16:19 pyrimidine_ joined
pmichaud hmmm 16:19
jnthn Ah, that said, what I just suggested wouldn't work out so well for $foo.SomeRole::method(...)
pmichaud and "method" isn't exported into the namespace? Seems like we need a better syntax there.
or I'm missing something
jnthn tbh I didn't really work out exactly what semantics that syntax should have
I'm not convinced it's menat to be a namespace lookup.
pmichaud right
jnthn But I'm not quite sure what it *should* be. 16:20
pmichaud if it's not a namespace lookup, we need a way to contextually flag it as being a method lookup on the SomeParent type
jnthn Yeah
The only issue then is, how do we resovle SomeParent.
pmichaud same as we always do
jnthn And relative to what.
pmichaud SomeParent would be the lexical name for a type object, yes? 16:21
jnthn I'd guess so.
pmichaud I don't see why it's any different than any other type object name
jnthn It probably need not be.
I'm just pondering how things get worked out if it's a role.
Also that 16:22
pmichaud we don't have a way to do a find_method on a role?
jnthn I think this syntax can be usable for calling methods the class didn't actually compose
TimToady anything starting Foo:: is always search for up the lexical scopes first
jnthn TimToady: Including for the part that follows Foo?
Or just for Foo itself?
TimToady so it suffices to have a lexical alias to anything that is outside the lexical scope that you want visible
jnthn OK 16:23
So $x.Foo::bar looks up Foo in the lexical scope
pmichaud right.
jnthn And then works out, which bar would Foo provide
pmichaud Correct.
TimToady even GLOBAL:: is found in the lexical scope (of CORE::)
jnthn My question is, is this syntactic sugar for:
TimToady or maybe UNIT::
probably changing to UNIT::GLOBAL, actually 16:24
jnthn my $temp := Foo.WALK(:name<bar>)[0]; $x.$temp(...)
(Or something similar to that)
That is, can we compose it of a lookup and an indirect method call? 16:25
TimToady outer lexical scopes aren't supertypes
at least, not yet :)
jnthn Erm.
Huh?
16:25 ujwalic joined
jnthn That's not even related to what I said. 16:25
TimToady Foo.WALK would only traverse supertypes
jnthn Right, is that the correct semantics? 16:26
TimToady that's not how it is currently
jnthn So how should it be?
TimToady you just follow $?OUTER links to find your outer lexical objecct
outer stash, in fact 16:27
pmichaud that's how we get to Foo, yes
jnthn That is, given $x.Foo::bar, we find Foo. How do we get from this to having the method.
?
pmichaud the question is -- once having obtained Foo, how do we get Foo::bar from it?
jnthn Correct.
pmichaud in the case of $x.Foo::bar()
jnthn Who do we ask to find bar? 16:28
Foo? Or $x?
That is, is this along the lines of
$x.Foo::bar(...) is like $x.bar(...) with a note to the dispatcher to walk the hierarchy until it finds a class with type object Foo?
Ir so, that will never work when Foo is a role name. 16:29
Or alternatively, do we find Foo, ask it to give us a bar somehow (maybe by looking at its metaclass), and then act as if it's an indirect method invocation.
TimToady no, we get to the Foo stash and there's a link in there to the type object 16:30
16:30 molaf joined
TimToady the latter 16:30
jnthn OK, so essentially the type object for Foo controls the dispatch?
pmichaud sure
that's what $x.Foo::bar() essentially means :-) 16:31
jnthn OK, that's fine.
cognominal @array := Array # I can't fathom what it is supposed to mean
lambdabot Aye
TimToady Foo:: tells the dispatch where to start
jnthn TimToady: That could mean two different things.
payload in a recent post on planetsix i read multi describe($c, $prefix) { take "$prefix " ~ $c.perl ~ "\n";
pmichaud .Foo::bar() is essentially saying "I want something other than the normal dispatch -- I want to dispatch based on Foo, not on $x"
payload is a take without gather allowed but not implemented in rakudo? 16:32
TimToady payload: there must be a gather in the outer dynamic scope
pmichaud payload: I think there needs to be a ... what TimToady said
TimToady biab & 16:33
jnthn That is, it could mean "find the type object for Foo and ask it to find bar" - which seems to be the answer - but it could also if you phrase it that way be taken as "do the dispatch from $x but note that it should start at Foo"
Thus my confusion.
Anyway, I'm happy with the answer (find type object for Foo and it controls the dispatch).
pmichaud that's the way I view it, yes. 16:34
cognominal: we're allowed to bind @var to any object that does the Positional role
cognominal: the Array type object does the Positional role
jnthn __ash__: So basically, that means that you look up Foo, do a find_method on that which should give back the P6Invocation, and then it's just an indirect method invocation. Deferal should Just Work from this if you're lucky.
cognominal ok, now I have to find what it does when I iterate on it. 16:35
pmichaud probably returns a Failure
16:35 masak left
pmichaud same as any other use of an undefined value 16:35
(or throws some sort of warning/exception, like other undefined values do) 16:36
cognominal so what it the purpose of making the class Array a Positional as opposed to its instances?
pmichaud Positional is a role
16:36 pyrimidine left
pmichaud Positional says "I know how to do index-based subscripting" or "I can handle .[ ]" 16:36
the type object is an (undefined) instance of the type 16:37
cognominal so instances gets the roles defined by their class?
pmichaud cognominal: yes, instances get the roles defined by the class. That's somewhat the purpose of roles :-)
cognominal oh, I forgot that point, a class is an undefined instance of its own type.
pmichaud we prefer "type object" around here (these days) 16:38
in code, the symbol "Array" would mean "the type object representing the Array class"
but yes, it's an instance of the type
cognominal Scala uses the keyword object for singletons and shove there everything C++ call static. So I suppose this is close to a class object in Perl 6 16:40
16:42 pyrimidine_ is now known as pyrimidine 16:52 abra left 16:54 shachaf joined 16:57 ujwalic left 17:05 KyleHa left
cdarroch moritz_ ... this is off-topic, most likely, but thank you for your blog comments re parrot trac #757 and concurrency; 17:10
I tried to take a look, put a couple of patches into trac, but wound up over my head :-/
but thanks nevertheless
__ash__ jnthn: The indirect method invocation works, i have tried it (very primitively) before, however, what in the case of roles? the indirection method won't work there
colomon_ rakudo: "[42] foo [69]".subst(/\[(\d+)\]/, "{$0 - 10}", :g).say; 17:12
p6eval rakudo 0d4fe0: OUTPUT«Use of uninitialized value␤-10 foo -10␤»
colomon_ Shouldn't $0 be set to the parenthetical match? 17:13
pmichaud not as a string, no. 17:14
17:15 Su-Shee left
pmichaud rakudo: "[42] foo [69]".subst(/\[(\d+)\]/, { "{$0 - 10}" }, :g).say 17:15
p6eval rakudo 0d4fe0: OUTPUT«32 foo 59␤»
pmichaud but shorter would then be 17:16
rakudo: "[42] foo [69]".subst(/\[(\d+)\]/, {$0 - 10}, :g).say
p6eval rakudo 0d4fe0: OUTPUT«32 foo 59␤»
colomon_ I thought "{$0 - 10}" was "evaluate $0 - 10 and then stringify it"?
pmichaud sure, but the $0 in that case is the current $/, not the one in the .subst match 17:17
i.e., the $0 gets evaluated before being passed to the .subst method
colomon_ Oh!
No, wait, I only thought I understood. 17:18
PerlJam colomon_: don't worry, it took me a while to get used to it too.
pmichaud if you want to refer to the captures in the .subst match, you have to pass a closure.
otherwise the $0, $1, etc. will be evaluated using the current value of $/ before the .subst method is called
colomon_ Oh!
So it evaluates the string using the pre-subst $0, and then pass it to subst. Right? 17:19
pmichaud right
colomon_ Okay, that's all I need to get back on track here. Thanks!
pmichaud++
pmichaud because double-quoted strings get evaluated before being passed to a method or function
colomon_ Yes, that makes perfect sense if I think of it as, say, a normal C++ function, rather than magic Perl stuff. :) 17:21
PerlJam ew
jnthn __ash__: find_method on a role may well just do the Right Thing anyway (pun). 17:22
Oh, though that probably ain't quite the Right Thing in this case. Hmm.
pugs_svn r27981 | lwall++ | [STD] make comment into a syntax category
__ash__ it currently doesn't though
17:22 kane_ joined
jnthn Punning does work. 17:23
rakudo: role Foo { method bar { say 42 } }; Foo.bar
p6eval rakudo 0d4fe0: OUTPUT«42␤»
17:24 payload left
__ash__ rakudo: role A { method bar { say 'test'; } }; class B does A { method foo { self.A.bar } }; my B $b .= new; $b.foo; 17:24
p6eval rakudo 0d4fe0: OUTPUT«Method 'A' not found for invocant of class 'B'␤»
__ash__ is what I am referring too
jnthn Rakudo is correct there. 17:25
You're calling a method A on self.
Did you mean self.A::bar?
__ash__ eh, well, i never saw in the spec the 'right way' to call that (that was my guess)
it still wouldn't work with self.A::bar
jnthn I think self.A::bar is the one that should work, I think. 17:26
As in, that Rakudo needs to support.
It doesn't right now.
__ash__ got ya
well, re-writing that into an indirect call wouldn't work either
rakudo: role A { method bar { say 'test'; } }; class B does A { method foo { A.bar } }; my B $b .= new; $b.foo;
p6eval rakudo 0d4fe0: OUTPUT«test␤»
__ash__ maybe it does... 17:27
jnthn That works but only because A.bar anywhere else would.
17:27 EDevil left
jnthn (which is fine, it should work that way, but it's different from self.A::bar 17:28
)
moritz_ cdarroch: I'm glad somebody found it useful :-) 17:29
__ash__ so the correct way should be self.Role::method (same as a class call) then? 17:31
cdarroch I'll try to take another look in a few weeks, but there's a lot to learn and paid work to be done in the meantime
jnthn __ash__: In that case, Role should be looked just as it would if it appeared alone. 17:33
__ash__: Then it would be asked to find the method named 'method'
We'd then have the method and could emit the same code as if it was an indirect invocation, probably. Though if you just use find_method I suspect it may still get it not quite right. 17:34
But as a first cut for the superclass case, that should work.
Needs a little bit of work in actions.pm 17:35
__ash__ but if find_method is the wrong way to do this, i'd rather do it the right way 17:36
if you have a method signature can you call it with respect to any object? or does it actually check if the object has the method?
jnthn Once you get the method object, you can call it with any object. 17:37
Well, I'm not completely sure what the right way is just yet.
pmichaud method(invocant, args...)
or in PIR, I suppose one could do invocant.$P0(args) # $P0 is the method 17:38
jnthn Aye 17:40
I forget exactly what PAST we generate for indirect method calls but it's quite possibly a call rather than a callmethod pasttype.
The thing is, while doing find_method is just the right thing if it's a superclass, I'm not so sure it'll quite do the Right Thing on a role. But I suspect we can tweak the punner so that it will work out. 17:42
pmichaud I would think just pun the role and then use find_method on that
(naively)
17:43 rfordinal left
jnthn pmichaud: Yeah, the thing is that then we need to know if we've got a role or not. 17:44
17:44 rfordinal joined
pmichaud ? 17:45
jnthn Which means we probably have to do more work at runtime than we might be able to get away with.
pmichaud at which step?
jnthn I guess it'd be nice if generating $x.Foo::bar didn't depend on having to know if Foo is a role or not.
In actions.pm that is. 17:46
That is, we'd be able to emit the same thing without caring.
pmichaud what currently happens with my Foo $a; ?
jnthn (I'm pondering if we can make find_method work for all cases)
17:46 aindilis left
jnthn my Foo $a will do a call trait_mod:<of>($a, Foo) 17:46
__ash__ do roles live in the all_parents part of the a pmc?
jnthn See traits.pm to see what happens next.
__ash__: No. 17:47
pmichaud jnthn: and trait_mod:<of> is then responsible for punning the role?
__ash__ where do roles live then?
pmichaud rakudo: role Foo { method bar() { say 'bar' } }; say Foo.WHAT 17:48
p6eval rakudo 0d4fe0: OUTPUT«sh: ./perl6: No such file or directory␤»
pmichaud bah
__ash__ or rather how does an object know what roles it has attached? 17:49
jnthn pmichaud: I don't understand why we would pun.
pmichaud because it gives us an easy handle to get the method
jnthn I meant in the case that you just mentioned. 17:50
When setting the type constraint we've no need to pun.
pmichaud oh
okay, I got confused. We need to pun when doing Foo.new
got it
jnthn __ash__: The roles that a class does hang off that class.
.^roles will get 'em.
pmichaud: Right. In my Foo $a .= new; then it's the call to new that puns. 17:51
pmichaud right
okay
anyway, punning seems like it'd be an easy way to get the method
jnthn In this case, yes, punning the role would indeed give us something from where find_method would Just Work.
pmichaud there might be a way to get the method from a role, but in Parrot that seems to not be part of the model
for example, in Parrot it's not currently possible to grab a method directly from a class object without going through the inspect interface somehow 17:52
jnthn pmichaud: Right.
pmichaud the tricky part about $x.Foo::bar() is being able to recognize that the 'bar' part is a different sort of lookup from what we normally do with Foo::bar 17:53
normally 'bar' would be a namespace lookup
jnthn Right. 17:54
pmichaud anyway, lunchtime here
jnthn It takes some munging.
pmichaud bbiaw
__ash__ why not find the last :: and check if whats before it is a class? so in $x.Bar::Foo::Baz::test(); it would check for Baz in the Bar::Foo namespace? or could that end up being wrong? 17:55
pmichaud __ash__: because a class also defines a namespace
__ash__ (this is why in php 5.3 with namespaces they separate namespaces with \ ) 17:56
pmichaud class Foo { sub bar() { ... }; method baz() { ... } }
Foo::bar() # works
jnthn Aye, we only need to transform this if it is in a dotty.
pmichaud afk lunch for real this time 17:58
18:08 hercynium left
__ash__ brb i need to restart 18:13
18:13 __ash__ left 18:16 alester joined 18:17 kane_ left
arthur-_ how do I add some code to an object that gets executed just after new ? 18:19
some cool way to do it or I must write new myself ?
moritz_ arthur-_: submethod BUILD is called automatically on new()
arthur-_ moritz_: thanks
moritz_ rakudo: class A { submethod BUILD { say "OH HAI" }}; A.new
p6eval rakudo 0d4fe0: OUTPUT«OH HAI␤» 18:20
18:25 Front_slash left 18:27 KyleHa joined
KyleHa std: say %( 'foo' ~~ /<alpha> oo/ ){ 'alpha' }:exists; 18:28
p6eval std 27981: OUTPUT«ok 00:03 38m␤»
KyleHa std: say %( 'foo' ~~ /<alpha> oo/ ).exists( 'alpha' ); 18:29
p6eval std 27981: OUTPUT«ok 00:02 37m␤»
KyleHa That's "I can parse that even though it doesn't do anything", right?
moritz_ right. 18:30
PerlJam arthur-_: what do you want to get executed after new? 18:33
arthur-_ a bit of code to split a proprety into a private property ...
KyleHa rakudo: say %("foo" ~~ /foo/).exists("foo")
p6eval rakudo 0d4fe0: OUTPUT«Method 'exists' not found for invocant of class 'Hash'␤»
KyleHa That's the original bug report (rt.perl.org/rt3/Ticket/Display.html?id=64948). 18:34
PerlJam arthur-_: you *might* be able to call wrap() on your class' new method
arthur-_ # Looks like you failed 5 tests of 14 ... submethod BUILD breaks my tests, is there any doc about it ? i don't find a lot 18:35
moritz_ KyleHa: I think you can't test that in a meaningful way that works both in Rakudo and in Perfect Perl 6
KyleHa I'll settle for testing it in Perl 6. 18:36
Seems like this ought to be true: %( 'foo' ~~ /<alpha> oo/ ){ 'alpha' }:exists; 18:37
moritz_ correct
KyleHa Moritz: I commented on this one of yours: rt.perl.org/rt3/Ticket/Display.html?id=65080 18:41
18:41 kane_ joined
moritz_ rakudo: given 'foo' { if /bar/ { 1 } } 18:42
p6eval rakudo 0d4fe0: ( no output )
18:43 __ash__ joined, hercynium joined
moritz_ KyleHa: we can close it if no testing is possible, at least with reasonable effort 18:44
18:44 KyleHa left, KyleHa joined
PerlJam If Rakudo* never outputs a "Null PMC access", it will be a tremendous success. :) 18:45
moritz_ PerlJam: I don't think it's too hard to warp a "Null PMC acccess" into a generic "internal error" 18:46
KyleHa Is it safe to say { ! %( ... ).can( 'exists' ) } ? 18:48
pmichaud I suspect that most of our null pmc accesses will disappear when we fix up lexicals 18:50
PerlJam KyleHa: what do you mean by "safe to say"? :) 18:51
pmichaud ('foo' ~~ /<alpha> oo/).hash.exists('alpha')
rakudo: ('foo' ~~ /<alpha> oo/).hash.exists('alpha')
p6eval rakudo 0d4fe0: OUTPUT«Method 'exists' not found for invocant of class 'Hash'␤»
pmichaud rakudo: my %x = 1..4; say %x.exists('1')
moritz_ KyleHa: I don't think it makes sense to test such a thing
KyleHa: we can't test for a huge list of method names
PerlJam moritz_: why not? 18:52
p6eval rakudo 0d4fe0: OUTPUT«1␤»
pmichaud if the question is writing a test for .exists, the tests hould simply be %a.exists
KyleHa We can test for one we know is/was wrong.
moritz_ PerlJam: we can, but we don't gain much
moritz_ not convinced
PerlJam moritz_: if the spec says class C must have method M, we gain the knowledge that it indeed does. :)
moritz_ anyway, proceed as you see fit
PerlJam btw, is there a way to execute something at composition time? 18:54
moritz_ composition time is compile time
PerlJam I was thinking a little finer grained than that. 18:55
pmichaud why does #65080 "defy testing"?
jnthn Well, specifically it's at the point that class is composed.
PerlJam: Would you want to run it before or after the class was composed though? 18:56
PerlJam jnthn: after, but why not both?
pugs_svn r27982 | kyle++ | [t/spec] feeble test for RT #64948
jnthn PerlJam: Well, I can imagine uses for both.
moritz_ pmichaud: well, it could be tested by launching a new perl process...
pmichaud why would we need a new perl process? 18:57
18:57 payload joined
pmichaud I don't understand what the problem is. 18:57
moritz_ pmichaud: how would you write a test for that?
pmichaud my $val = 0; given 'foo' { if /bar/ { $val = 1; } }; ok $val, 'passed' 18:58
PerlJam jnthn: the original reason that I was thinking about this has since excaped me, but it was something like having a role that dynamically creates methods based on what's already composed into the class.
pmichaud or switch up the values
PerlJam s/ex/es/
pmichaud my $val = 1; given 'foo' { if /bar/ { $val = 0; } }; ok $val, 'passed'
jnthn PerlJam: I think it's come up before at some point.
18:58 kent\n joined
jnthn PerlJam: My feeling is that we're going to want to have a .^compose or similar on a metaclass. 18:58
moritz_ pmichaud: iirc even 'use Test;' made the problem go away 18:59
jnthn PerlJam: You should write a trait that does something like
moritz_ pmichaud: but I don't remember specifics - I'd have to check out an old rakudo to try it
PerlJam jnthn: or perhaps PRECOMPOSE/POSTCOMPOSE blocks that you can put in roles and classes
pmichaud obviously whatever problem it had uncovered is no longer present, then.
we can either include the exact test given in the ticket, or we can decide it's untestable
I'm fine with either approach. 19:00
jnthn $metaclass does role { method compose($obj) { ...pre-things...; $proto = callsame; ...post-things...; return $proto; } } # note very hypothetical
19:00 M_o_C joined
jnthn PerlJam: Yes, or we could have some sugar like that. 19:00
PerlJam: Even if that doesn't make it into core though, it'd be something I expect you could easily build later on as a module.
pmichaud it does concern me that we're getting a lot of "lives_ok" sorts of tests in the suite. The whole point of fudging was so that we wouldn't have to be doing eval on a bunch of tests. 19:01
PerlJam your wrap-a-like version is neat enough that maybe we could just use wrap itself. role R { }; R.wrap(...) 19:02
jnthn .wrap is defined on routines.
PerlJam I know, I'm saying extend it.
jnthn Ah.
PerlJam MMD++ :)
19:04 eternaleye joined 19:05 KyleHa left 19:07 gigabo left 19:08 frederico left
__ash__ jnthn: so, um.... did you ever decided if it would be appropriate to modify find_method for explicit parent calls? 19:09
jnthn __ash__: I just pondered it a bit over dinner.
19:09 sri_kraih left, iblechbot joined
jnthn __ash__: I think we can make it by just looking up the thingy in the namespace (as in, the Foo in .Foo::bar(...)), a call to find_method supplying what we looked up for Foo and the 'bar' as the name to find, and then emitting a normal call on that, passing along the invocant. 19:11
That makes it work for parent classes. We'd need to detect and special-case SUPER, but we'll worry about that later.
And for roles, we can fix up the punning code to be smart enough to handle this, and still keep it reasonably cheap. 19:12
If you can get a patch to make it work for the parent classes, I'm happy to do the role punning tweak.
cxreg heh, rakudo's .gitignore is amusing 19:13
jnthn But I'm pretty sure we can make it all work this way.
cxreg some duplicates, and specific .o files named but others not
19:13 payload left
jnthn cxreg: Well, given I didn't know it existed... ;-) 19:13
cxreg :)
jnthn cxreg: Patches welcome. :-)
19:14 sri_kraih joined
__ash__ jnthn: i will work on that, I can see what I can get done (i am still not very familiar with all the inner workings perl6, this is how i was planning on getting to know it) 19:16
jnthn __ash__: Feel free to ask questions, I'll try and answer. 19:17
__ash__: My expectation is that you can get it working for the parent class case with only changes in actions.pm.
I'll also point you at the parse_name method, which will help you.
(look for other usages of it in actions.pm)
__ash__ alright, thanks, i'll go over the actions.pm file and try to get a better understanding, and i'll read up on parse_name first 19:18
19:18 payload joined
jnthn Basically it is a split on :: with some extra bits. :-) 19:19
19:20 donaldh left, SmokeMachine joined, donaldh joined
arthur-_ moritz_: your BUILD code kinda makes properties dissapear 19:21
rakudo: class A { has $.a; }; my $a = A.new( a => 2 ); say $a.a
moritz_ doesn't understand what arthur-_ means 19:22
p6eval rakudo 0d4fe0: OUTPUT«2␤»
frettled N00b question: I'm trying to some naïve CSV file parsing where I need to strip the final [\r\n]+ from each line, and strip beginning and ending spaces within each field. I've gotten this far, but don't seem able to easily get rid of the spaces in each element: gist.github.com/167399
arthur-_ rakudo: class A { has $.a; submethod BUILD { say "OH HAI" } }; my $a = A.new( a => 2 ); say $a.a
frettled (I know i can loop over the split again, but I thought there might be a more elegant way)
PerlJam frettled: you already use trim, use it again! 19:23
p6eval rakudo 0d4fe0: OUTPUT«OH HAI␤Use of uninitialized value␤␤»
frettled PerlJam: split().trim results in weirdness.
moritz_ split()>>.trim
frettled ahaaaa
moritz_ you need to apply it to each element returned by split 19:24
arthur-_ moritz_: pastebin.ca/1528437
jnthn arthur-_: Rakudo bug rather than moritzbug.
moritz_ rakudo: class A { has $.a; submethod BUILD { say "OH HAI" } }; my $a = A.new( a => 2 ); say $a.a
p6eval rakudo 0d4fe0: OUTPUT«OH HAI␤Use of uninitialized value␤␤»
moritz_ arthur-_: jnthn is right - could you please submit that to [email@hidden.address]
moritz_ wonders if masak++ has a workaround for that (and why he didn't submit that already) 19:25
frettled moritz_: Thanks, I knew I was forgetting something vital.
arthur-_ moritz_: i was not sure i was doing correct perl6 ...
i submit
moritz_ arthur-_: it should work
frettled: you can also split on / \s* ',' \s*/
PerlJam frettled: or $string.split(rule { ',' }) too I think 19:26
jnthn moritz_: It's been discussed here on #perl6 before, for sure.
frettled moritz_: ah, I should've seen that myself, thanks. 19:28
PerlJam: what would the use of rule do there?
PerlJam frettled: rules automatically have :sigspace on, so you get <.ws> where ever there is whitespace in your pattern 19:29
frettled aha! 19:30
PerlJam frettled: though splitting on comma like that won't handle triming leading spaces from the first element. It's best to call trim() if you really do mean to trim it.
ingyfoo hi. can I patch rakudo to have Configure.pl generate a 'make install' target that puts `perl6` next to the `perl` that was used to run Configure.pl? 19:31
s/can/may/
PerlJam ingyfoo: you want "make install" to create /usr/bin/perl6 if /usr/bin/perl was used ? 19:32
ingyfoo oui
PerlJam you can always fork or make a branch that does that. 19:33
ingyfoo is make install not wanted?
PerlJam There's already a make install. The question is "install where?" :) 19:34
frettled PerlJam: actually, that's probably better handled by doing a per-line trim(), things get funky if I try to use >>.trim() twice. I've updated the gist now with a version that very nearly pretty-prints like I want to (which would be one line per dimension, or something) 19:35
diakopter [OT] for those curious: www.ibm.com/developerworks/opensour...index.html
PerlJam looks like prototype-based OOP 19:38
and they've been around python of javascript too much 19:39
s/of/or/
ingyfoo PerlJam: I know how to fork and pull request. Just wondering if that fix is desired for rakudo. Why is there not a make install target? 19:42
PerlJam there *is* a make install.
ingyfoo oh
19:42 eternaleye_ joined
ingyfoo well someone should update rakudo.org/how-to-get-rakudo 19:43
:)
jnthn ingyfoo: To be fair, the make install branch was only merged yesterday or so. ;-)
PerlJam indeed.
jnthn But yes, that needs an update now. :-)
__ash__ you can make install perl6 ? 19:44
rakudo i guess i should be asaying 19:45
jnthn __ash__: Yes, as of yesterday.
Plus it was broken on Win32 / MSVC++ until today.
But latest should be installable.
PerlJam Sounds like there should have been an announcement or something :)
__ash__ cool, does it install parrot also?
frettled it does * 19:47
jnthn (* see terms and conditions)
(If you do --gen-parrot, it'll just make an installed Parrot under parrot_install in your build directory - if you want more control, then build/install Parrot, then build Rakudo using the installed Parrot.) 19:48
19:51 eternaleye left
cotto jnthn, I really liked the Perl 6 code in your latest use Perl post. 19:55
jnthn cotto: Nice. :-) 19:57
19:57 zamolxes joined 19:58 tak11 joined
cotto It's helpful to see those language features combined to do something (moderately) useful. 19:58
19:59 KyleHa joined
KyleHa This public wifi stinks. 19:59
takadonet cotto: url please :)
moritz_ takadonet: you should follow the planetsix.perl.org/ feed ;-)
jnthn Maybe I should try and do some more slightly larger examples in future posts, to show how things get used together. :-) 20:00
cotto takadonet, use.perl.org/~JonathanWorthington/journal/39455
KyleHa While I've been semi-online, I chased down RT 65080 some more.
takadonet moritz_: I do just lazy right now
cotto jnthn, I'd love that.
takadonet and just realized I seen it already hehe
KyleHa I went back to the Rakudo that had the problem and reproduced it. If it's in a file, it only bombs if it's at the end of the file. A comment after it makes it go away. 20:01
20:01 KyleHa left, eMaX left, KyleHa joined
KyleHa *sigh* 20:01
Anyway, an eval_lives_ok with it fails, but it's a different error than "Null PMC". 20:02
pmichaud I don't want there to be an eval_lives_ok there.
KyleHa Can you think of another way to test it, then? 20:03
pmichaud just put it there and skip it.
frettled PerlJam: I think I finally grokked how to use subst(), and managed to get a pretty nice result. Thanks for the help.
pmichaud (if it's not working in current rakudo)
we don't need to be putting eval around every test.
KyleHa It IS working in current Rakudo, and it'll work in the old Rakudo too if you just put it there and skip it.
pmichaud then we don't need eval_lives_ok 20:04
KyleHa Maybe my other message got lost...the thing only croaks if it's at the end of the file.
pmichaud eval_lives_ok should really be reserved for those things where we might reasonably expect an exception to be thrown by an almost-complete perl 6 implementation
eval_lives_ok should not be used just to wrap tests where rakudo is broken and currently throws exceptions that it's not supposed to be throwing 20:05
"rakudo broken" is what fudge is for.
moritz_ sent a mail to p6c with a nice (but non-working) patch some hours ago, but it seems from the wrong email address 20:06
KyleHa I don't see how this case can be tested using only fudges. If we'd like to leave it untested (since it's now fixed), that's fine. I'm just saying that fudge won't handle everything.
moritz_ so far it didn't percoluate through 20:07
pmichaud if you're saying that fudge won't handle the case of someone using a months-old version of rakudo, that's fine.
moritz_: unrecognized addresses on p6c are often moderated
takadonet cya tomorrow everyone
20:07 takadonet left
KyleHa It won't handle the case of a bug that bug that's triggered by code being at the end of input, unless we're willing to devote a file to the test. 20:08
pmichaud okay.
and using eval exposes that?
KyleHa Yes.
Well, sort of. That's what I was here to talk about.
The eval dies with a syntax error while the bug out in the wild dies with Null PMC access. 20:09
pmichaud does the bug shows up if parrot is run with -G ? 20:10
lisppaste3 moritz_ pasted "gives "Method 'postcircumfix:( )' not found for invocant of class 'WhateverCode'" when called as (*.()).(1+*) " at paste.lisp.org/display/85338
pmichaud moritz_: why are you overriding the existing invocation on Whatever ? 20:11
moritz_ rakudo: *()
p6eval rakudo 0d4fe0: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (/tmp/34mbaDUUIF:2)␤»
moritz_ pmichaud: there is no existing invokation
KyleHa I'm using the perl6 executable. How do I run via Parrot?
pmichaud Whatever is not Code, afaik
moritz_ pmichaud: only in WhateverCode, not in Whatever
pmichaud KyleHa: parrot_install/parrot -G perl6.pbc ...
moritz_ pmichaud: I want to be able to write @array_of_closures.sort: *.(5) 20:12
which would sort by the result of calling the closures with .(5)
KyleHa Yes, the bug's still triggered with parrot -G 20:13
pmichaud KyleHa: okay. I'm fine with eval_lives_ok then.
KyleHa: thanks for being patient with me :)
moritz_ if I call it as (*.()).(-> $x { say $x }) then I get "Method 'postcircumfix:( )' not found for invocant of class 'Block'"
KyleHa And it turns out I'm wrong about eval. It died for some other reason.
pmichaud rakudo: $_ = { say $^a }; $_.(5);
p6eval rakudo 0d4fe0: OUTPUT«5␤»
pmichaud rakudo: $_ = { say $^a }; .(5); 20:14
p6eval rakudo 0d4fe0: OUTPUT«5␤»
moritz_ but why does it try to call the postcircumfix, and not the invoke vtable?
pmichaud rakudo: $_ = { say $^a }; (*.(5))($_);
p6eval rakudo 0d4fe0: OUTPUT«invoke() not implemented in class 'Undef'␤in Main (/tmp/TOj5sEPvwf:2)␤»
KyleHa What does running with parrot -G do?
moritz_ KyleHa: doesn't run the GC
pmichaud moritz_: I suspect that *.(5) should return a WhateverCode
instead of overloading invoke on Whatever
KyleHa moritz: I see, so if it survives that, you know that it's the garbage collector causing the problem. 20:15
pmichaud but yes, I see the chicken-egg problem there.
moritz_ pmichaud: can I rebless the returned block to be of type WhateverCode?
pmichaud KyleHa: there are a number of "weird parrot bugs" where -G makes them disappear 20:16
KyleHa OK. That's good to know, thanks.
20:16 frew__ joined
pmichaud moritz_: I'm not quite sure how to do the that rebless at the moment. 20:17
s/the//
jnthn rakudo: say WhateverCode ~~ Whatever 20:18
p6eval rakudo 0d4fe0: OUTPUT«0␤»
pmichaud WhateverCode is a subclass of Code
not of Whatever
moritz_ anyway, it's not a high priority, it would just have made an obfu more gra^Wawesome
pmichaud currently build/gen_whatever manages it by explicitly calling !fixup_routine_type from PIR
note that I expect we will need to completely refactor all meta-operator handling in Rakudo if we want to get infix:<+> overloading to work 20:19
(based on working on it yesterday)
moritz_ so should I wait a bit longer before investing more time on it?
pmichaud I would wait, yes. 20:20
I'm currently looking at operator refactors.
because I really want overloading of builtin ops to work
frettled I have another coding question :) Let's say I have this awful autogenerated two-dimensional array of mine, generated from a CSV file with a header line, and want to convert that to a hash where the keys are the elements of the header line. Is there a shortcut trick for that? 20:21
jnthn pmichaud: (refactor all meta-operator handling) - how come?
pmichaud well, in the case of infix:<+>, we also have to make the whatever forms into multis 20:22
frettled I know I can do my %data = @data[0] Z @data[1] for the first line
moritz_ frettled: look at %hash.push
frettled feels there's something just out of grasp here, waiting to leave me gobsmacked.
pmichaud but more to the point, I'm dissatisfied with the current deconstruction of our metaop handling in Rakudo 20:23
moritz_ you can write %hash.push: %( @data[0] Z @data[$i] )
pmichaud it's very special-cased in places it shouldn't be.
20:23 _timbunce left
frettled moritz_: ooh 20:23
20:23 eternaleye_ is now known as eternaleye
pmichaud frettled: I wonder if %data = @data[0] Z @data[1..*-1] works 20:24
actually, I guess not. 20:25
moritz_ would be surprised if it would
frettled pmichaud: nopes, that assigns rows to columns
actually, I did that without the -1 until I realized that I was off my rocker.
20:28 KyleHa_ joined 20:29 KyleHa left
pmichaud rakudo: my $x = *.xyz(); say $x.WHAT; 20:29
p6eval rakudo 0d4fe0: OUTPUT«Block()␤» 20:30
pmichaud rakudo: my $x = *.xyz.abc; say $x.WHAT;
p6eval rakudo 0d4fe0: OUTPUT«Method 'abc' not found for invocant of class 'Block'␤»
20:30 KyleHa_ left
pmichaud I suspect that *.xyz should be returning a WhateverCode now 20:30
jnthn pmichaud: Weren't those going to be done syntactically? 20:31
Or did the spec move again? Or did I mis-remember?
pmichaud jnthn: that was before we had WhateverCode objects
I don't know if we still recognize it syntactically
20:32 japhb left
pmichaud but I'm pretty sure that *.xyz.abc is going to want to mean { $_.xyz.abc } and not { $_.xyz }.abc 20:32
jnthn Agree
pmichaud then I suspect a similar situation exists for *.() 20:33
if we're going to cover moritz's case
20:33 timbunce joined
pmichaud on the other hand, it's useful to note that *.() and (*+1).() would mean entirely different things 20:34
so perhaps .() doesn't "whateverize" its lhs
i.e., the way to do the equivalent of *.(5) is to actually do { $_.(5) }
[particle] then what is (*.xyz).abc ? 20:40
20:40 iblechbot left 20:41 timbunce left
[particle] or (*.xyz).() 20:41
moritz_ the latter is an error. 20:42
[particle] doesn't *.xyz execute before .() ? 20:44
moritz_ yes, it generates a closure of arity one
and .() calls it with 0 args => error
[particle] ah, ok. so .(...) then 20:45
i'm looking to avoid arity problems here, just figuring out how * behaves
better, how an expression involving * is interpreted
20:50 timbunce joined
pmichaud in general, expressions involving * tend to generate closures 20:51
it's interesting to speculate on whether * is in fact itself a WhateverCode object :-)
jnthn How would you then get a Whatever? ;-) 20:52
20:52 payload left
jnthn It may be possible to unify the two somehow though... 20:52
...maybe...
pmichaud it would be nice, because as things stand now we end up with four variants of each binary operator 20:53
20:53 leedo_ left, ujwalic joined 20:54 molaf left
pmichaud that number grows further when we start mixing with other metops 20:55
*metaops
20:56 timbunce left
ujwalic to know the OS from Perl6 what should be used $?KERNEL or $*KERNEL or $?VM or $?DISTRO 20:58
moritz_ rakudo: say %*VM.perl 20:59
p6eval rakudo 0d4fe0: OUTPUT«{"config" => {"libparrot_for_makefile_only" => "\$(LIBPARROT_SHARED)", "-Wstrict-prototypes" => "1", "-Wno-shadow" => "1", "rm_rf" => "\$(PERL) -MExtUtils::Command -e rm_rf", "ld_debug" => "", "int8_t" => "long long", "hugeintval" => "long long", "inc" => "include/parrot",
.."-Wneste…
mkelly32 where are all those neat things documented? 21:00
(both the magic variables, and things like .perl)
21:02 payload joined
moritz_ mkelly32: S32::* and S28 21:02
mkelly32 moritz_: thanks. 21:03
ujwalic moritz_: I am on windows t\spec\S02-literals\quoting.rakudo q:x fails due to \r\n
moritz_ ujwalic: thanks, I'll try to fix it 21:05
jnthn fwiw, I've been seeing that fail for a while too, but thought it was a Parrot issue for some reason. 21:08
21:09 Whiteknight joined
mkelly32 moritz_: so, is my best option to just read all the synopsis? 21:10
and, is perlcabal.org/syn/ the right place to get them from? 21:11
moritz_ it is
21:11 hercynium left
moritz_ mkelly32: well, there are other resources too, but not as comprehensive 21:11
mkelly32: for example I wrote perlgeek.de/blog-en/perl-5-to-6/
(read them in the order of the left column links) 21:12
mkelly32 oh, yeah. i think i remember seeing your thing a while ago. at least one or two of them. 21:13
21:14 japhb joined
ujwalic moritz_: what is the type of %*VM.perl 21:15
moritz_ ujwalic: .perl always returns strings 21:16
21:16 pyrimidine left
ujwalic moritz_: thaks .. I was trying to get %*VM.perl<win32> 21:17
21:18 Patterner left
szbalint I wonder if the recent YAPC::EU talk is up on slideshare or somewhere else about perl5->6 21:18
21:18 kent\n left
moritz_ szbalint: the one from mberends is in the pugs repo 21:18
docs/talks/ or so
21:19 tann joined
szbalint excellent, ty 21:19
21:21 frederico joined
cxreg so, hyperoperators should probably support GPGPU, eh? :) 21:23
moritz_ cxreg: patches welcome ;-)
there are a myriad of possibilities in Perl 6. They just need to be implemented 21:24
cxreg i wonder how much of the vm you'd have to mangle for that to work
maybe just simple SIMD is a better first step
perl --use-mmx2
moritz_ actually a usable sse2 implementation would help a lot in terms of speed 21:25
jnthn ooh, slides from yapc...I should upload those... 21:26
frettled moritz_: considering that they are all but ubiquitous right now, that's only going to improve 21:27
jnthn: yes, please :)
I wonder if Paul Fenwick has gotten around to uploading his yet ...
szbalint Heghlu'meH QaQ jajvam! 21:29
21:31 Psyche^ joined
mkelly32 hrm... 'but False' is an interesting concept. better than some of the voodoo DBI does to get a '0 but True' by returning '0E0' 21:31
21:31 Psyche^ is now known as Patterner
frettled szbalint: My Klingon is weak. 21:36
szbalint (today is a good day to die) 21:39
21:40 ujwalic left
frettled Aha! 21:45
jnthn frettled: Now linked from www.jnthn.net/articles.shtml 21:47
21:51 pmurias left 21:54 SmokeMachine left 21:55 M_o_C left
arthur-_ i'm pretty sure I saw a way to do something like this : for @a, @b -> $from_a, $from_b { ... } ... but I find nothing in the docs 21:59
PerlJam arthur-_: for @a Z @b -> $a, $b { ... } 22:01
arthur-_ PerlJam: thanks a lot
PerlJam idly wonders if Arrays will support a .transpose method 22:02
then that problem that frettled was struggling with earlier would be easy 22:03
arthur-_ wooo, worked ! 22:04
frettled jnthn++ - brilliant 22:06
22:08 timbunce joined, timbunce left 22:14 ujwalic joined
pugs_svn r27983 | moritz++ | [evalbot] use an installed parrot + rakudo to avoid downtime on rebuild 22:14
22:15 p6eval left, p6eval joined
moritz_ rakudo: say "test" 22:15
p6eval rakudo 0d4fe0: OUTPUT«test␤»
22:18 ruoso left 22:21 __ash__ left
frettled jnthn: BTW, if you think it's a good idea, Someone™ has added a group on slideshare.net (www.slideshare.net/event/yapceu2009) for this. 22:22
I've added a link to the PresentationSlides part of the YAPC2009 Wiki.
PerlJam: I was about to say something about that, but at that time, pmichaud et al were already involved in another discussion regarding complications ,) 22:23
moritz_ after rebuilding and installing parrot and rakudo about twenty times I now have a dual dir setup for p6eval 22:28
frettled PerlJam: I was also thinking about something using pairs() with the original wd array, but that may have been sleepiness talking.
moritz_ it first installs parrot and rakudo into ~/p1/
and then uses ~/p1/bin/perl6
frettled …to bootstrap the next one?
moritz_ the next rebuild installs into ~/p2/, and only switches usage after it has been completely installed 22:29
frettled: no, it's just to avoid the downtime which occured these days when rakudo was rebuild
frettled Aha.
Should I submit the test results for «make spectest» somewhere, BTW, since I compiled on a platform that's growing old and weird? :) 22:30
moritz_ we don't have a centralized smoke server :( 22:31
frettled Okay.
22:32 rfordinal left
frettled I see three cases of redeclared variables, and two cases of failed assertions (the same assertion, I think, but in two different tests). 22:32
moritz_ yes, that's known
frettled Nothing special about my platform for that, then. 22:33
Just that annoying thing with the failing version check in Parrot.
22:47 jferrero joined
pugs_svn r27984 | ujwal++ | refactored q:x for MSWIN32 22:49
23:18 mersel joined 23:20 donaldh left
pugs_svn r27985 | lwall++ | [STD] parse indented pod 23:20
23:21 donaldh joined
frettled Hmm, perhaps there could be a transpose operator and not just a .transpose. Muahaha. 23:30
TimToady Do mathmeticians define transpose on anything other than 2-D arrays? 23:35
23:35 explorer__ joined
TimToady *mathematicians, grr 23:36
frettled I can't say that I recall, but then I flunked elementary linear algebra.
23:36 explorer__ left
frettled I have this vague nightmarish memory that we were trying to transpose 2D matrices in 3D space, though. 23:36
I haven't looked at this since 1993, so please bear with me. :) 23:37
Ah, it appears that transposition is defined as a swap of rows for columns and vice versa. 23:38
I found this: en.wikipedia.org/wiki/In-place_matr...nsposition 23:39
TimToady maybe it's related to the autoindex section of S09
If it's in-place, it's a side effect, and therefore evil under FP :)
23:40 Limbic_Region joined
frettled Well, the memory handling is implementation dependent and arbitrary too, isn't it? :D 23:41
ujwalic I found this mathworld.wolfram.com/Transpose.html 23:42
frettled Yep, that's referenced in the WP article on Transpose.
ujwalic and this mathworld.wolfram.com/ConjugateTranspose.html 23:43
ok
23:44 ihrd joined 23:45 cdarroch left
frettled If we were to have a transpose operation, then the spec would only have to say that it should work as a regular n x m matrix transposition, wouldn't that be sufficient? Writing a simple spec test should also be feasible. (Though _I_ am not quite there yet.) 23:45
use Mathematica; 23:46
Hmm, perhaps better: 23:50
TimToady see S09:Parallelized parameters and autothreading
23:51 jferrero left
TimToady use autoindex; do { @out[$^k,$^j] = @in[$^j,$^k] } 23:52
frettled TimToady: you're thinking of do -> @wild { @b[[;] reverse @wild] = @a[[;] @wild] };
?
TimToady er, make those ; instead of , 23:53
23:53 mintsoup joined
frettled hmm! 23:53
mintsoup i heard this is an mmo, can i join a guild
frettled mintsoup: yes, but you have to finish a quest first. 23:54
TimToady you need a commit bit for that
which is kinda like a horse bit
frettled with you at the reins
mintsoup what sort of endgame pvp is there? cuz if it's just battlegrounds all the way down again im not interested
23:55 DakeDesu is now known as KatrinaTheLamia, KatrinaTheLamia left
TimToady the behind-the-scenes GM enforces convergence on a pleasing story line 23:55
mintsoup does that mean there's exciting world events? 23:56
frettled TimToady: anyway, yes, autoindex would solve the problem, it seems, and then I^Wsomeone could just create a macro or something for it ;)
I'll make a note of the syntax you mentioned above. 23:57
TimToady perhaps we could go as far as to invent statement_prefix:<authindex> or some such
mintsoup: we tend to optimize for fun rather than exciting 23:59