»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by Juerd on 28 August 2009.
s1n phenny: tell pmichaud i think parrot/compilers/nqp/src/Grammar.pg might be what i was looking for 01:21
phenny s1n: I'll pass that on when pmichaud is around.
diakopter phenny: tell lambdabot @msgs 01:34
phenny diakopter: I'll pass that on when lambdabot is around.
diakopter @tell phenny tell lambdabot @tell phenny tell lambdabot @msgs 01:35
lambdabot Consider it noted.
phenny lambdabot: 01:34Z <diakopter> tell lambdabot @msgs
diakopter hrm.
__ash__ are you trying to make an infinite loop?
diakopter I don't know; am I? 01:36
wait, are you?
__ash__ lol, /shrug 01:37
__ash__ have you ever done any meta programming diakopter? 01:38
diakopter __ash__: I seem to recall something of the sort 01:40
__ash__ there isn't a spec for the meta objects in perl6, have any thoughts on the topic?
diakopter I thought there was one 01:41
__ash__ not that i have seen, or moritz_
diakopter I wrote a parser-generator-generator (aka a parser generator with a configurable grammar-grammar) a couple of months ago
I thought ruoso wrote up how he implemented P6Object 01:42
diakopter searches the irclogs 01:43
__ash__ well, if that exists that would be lovely, moritz_ was saying someone should come up with a metaclass spec so i thought i'd get a ball rolling if i could and blog about some ideas and see what people have to say on the topic
diakopter odd; I coulda sweareth there were several writeups on it 01:44
__ash__ there may be, if so that would be great 01:45
__ash__ just because we don't know about it doesn't mean it doesn't exists :P 01:45
diakopter I'd look in the Synopses but when I go to read them online, my scroll bar becomes about 1 pixel tall, and it's a tad overwhelming. 01:49
scroll bar handle, I mean.
__ash__ the S12 Synopses touches on it but not in much detail, not what i would call 'fleshed out' 01:50
donri i saw a discussion about executable class bodies earlier, what was the conclusion? does/will perl6 have 'em, or why not (there usually is a good reason when the answer is no :))? 01:50
__ash__ they have them already
donri you can do meta stuff a la ruby? 01:51
__ash__ they do not have some meta operations though like ruby, yet.
you can do some of that, but not all of it will work because of meta-related magic not being implmented yet
diakopter someone define "executable class bodies" please?
__ash__ class A { if true { ... do something .. } else { .. do something else .. } } 01:52
donri I have suspicions that many rubyists secretly have a perl-mentality but just want a cleaner language/OOP-model than perl5. they will love perl6 if they get over their FUD from perl5. :)
donri is an ex-rubyist 01:52
diakopter ok... when does the stuff inside class A { } run? 01:53
donri __ash__: i'm mostly interested in what is *intended* though
__ash__ i am a rubyist at heart, but perl6's non OO stuff makes me want to do do more perl6, although i have high hopes for perl6's OO too
diakopter: during class construction
donri scope is also an important factor, where the scope of course is the class 01:55
diakopter when is class construction [triggered]?
donri in ruby, when the file is first loaded/required
i'm not very familiar with how packages/whatever work in perl 01:56
__ash__ it would be basically at compile time
donri not really 01:57
__ash__ why not? 02:00
donri maybe YARV does some tricks for toplevel requires at compile time, duno 02:01
but then it's a trick ;) require as such is a runtime operation
__ash__ the current perl6 spec doesn't talk about meta operations like a composition method for roles or an add_method function for classes for instance, both of which would be useful 02:02
i also thing some hook functions like one thats called when an object is inherited 02:03
i am reading up on some other metaobject systems (like the CLOS ansi one, the ruby one, python too) to make sure i am not missing something that would be useful that i have personally used before
__ash__ donri: gist.github.com/186441 works in rakudo right now 02:10
lambdabot Title: gist: 186441 - GitHub
__ash__ should print "a b"
diakopter rakudo: »ö«ö»ö« 02:11
donri but can you define method names dynamically?
p6eval rakudo 446d49: OUTPUT«Syntax error at line 2, near "\x{bb}\x{f6}\x{ab}\x{f6}\x{bb}\x{f6}\x{ab}"␤in Main (src/gen_setting.pm:3469)␤»
diakopter wants p6eval to translate the x{hh} to u
__ash__ rakudo: class A { }; my &b = method { say self.WHAT; }; my $a = A.new; $a.&b(); 02:13
p6eval rakudo 446d49: OUTPUT«A()␤»
__ash__ you can't bind a random method to a class currently, but there are plans for it, (an add_method function)
you can always do class Foo is also { } to extend the class defintion 02:14
although they are changing 'class XXX is also' to 'augment class XXX' 02:15
__ash__ so, does anyone have any comments on how the meta system needs to work? 02:25
carlin rakudo: grammar foo { rule TOP { 'lorem' | <.panic> }; method panic { die "The sky is falling!"; }; }; foo.parse('blah'); 03:18
p6eval rakudo 446d49: OUTPUT«Null PMC access in find_method()␤in method foo::panic (/tmp/jpiMsPIkac:2)␤called from regex foo::TOP (/tmp/jpiMsPIkac:2)␤called from Main (/tmp/jpiMsPIkac:2)␤»
donri i wonder, could design by contract be implemented by meta programming in a way that feels native?
__ash__ i am not very familiar with design by contract 03:25
flip913 Is it correct that "Rakudo*" translates in P6-speak to "Rakudo Whatever"? 05:57
obra_ what do you mean by that? 06:00
Rakudo* is to be the first 'stable' release of Rakudo coming in spring of 2010 06:01
flip913 Yes ... and "*" is the "Whatever" operator ... so I conclude that "Rakudo *" is a Perl6 with "Whatever" is finished at that time ;-) 06:07
obra_ not quite how I've heard pmichaud describe it. There's very much a list of "must haves" 06:08
devin pronounciation is "rakudo star" ... jnthn told me it means partly a "star" like in the sky, to fix your gaze upon as a goal 06:14
flip913 Well, I've been reading S02, and that's where the association comes from ... 06:15
moritz_ I think it's not totally wrong - the version number is "whatever" 06:18
donri "kinda 1.0, but whatever"? :) 06:19
moritz_ maybe we'll release the versions *, *+1, *+2 etc ;-) 06:20
rewt *.0, *.1, ..., **.0, ... ***.0, etc 06:21
moritz_ rakudo: say (* ** *).(3) 06:22
p6eval rakudo 446d49: OUTPUT«27␤»
flip913 rakudo: say(* * * ** *)(3); 06:51
p6eval rakudo 446d49: OUTPUT«!whatever_closure␤invoke() not implemented in class 'Boolean'␤in Main (/tmp/cNTDmoY4bw:2)␤»
flip913 rakudo: say(* * * ** *).(3); 06:52
p6eval rakudo 446d49: OUTPUT«!whatever_closure␤invoke() not implemented in class 'Boolean'␤in Main (/tmp/cRN3VxPJ8L:2)␤»
flip913 strange, that works for me ...
Ah, this rakudo is out-of-date by about a week ... that's why. 06:53
moritz_ ouch. 06:55
pugs_svn r28237 | moritz++ | [evalbot] don't quote things in system LIST 06:56
dalek kudo: e4c7a05 | moritz++ | build/PARROT_REVISION:
bump PARROT_REVISION to get fixes in Scalar.assign_pmc
07:04
Matt-W Good morning 07:12
carlin rakudo: my $regex = regex :g:s:i { my name is (.*) }; 07:25
p6eval rakudo 446d49: OUTPUT«Malformed regex definition at line 2, near ":g:s:i { m"␤in Main (src/gen_setting.pm:3469)␤»
carlin rakudo: my $regex = regex { :g:s:i my name is (.*) };
p6eval rakudo 446d49: ( no output )
carlin Is that first one NYI? 07:28
moritz_ yes 07:29
and I think :g is NYI in general
carlin Ah okay 07:30
The second isn't in the spec AFAICT, was it implented and then the spec was changed? Or are they both correct? 07:33
pugs_svn r28238 | carlin++ | [S05] Small grammatical fix 08:09
flip913 S03, hyperop, anyone? 08:36
If I've got a tree structure in a variable, and want to call some function on every entity, I read something along the lines of $tree.>>.foo in S03. 08:39
Now hyperoperators have no order defined.
Matt-W $tree>>.foo
flip913 Is it possible to declare that I want the parents done before the children?
Matt-W if ordering is important, use an explicit loop 08:40
flip913 The order of the children wouldn't be important, just that a parent is completely done before the children
If I write the Each() for the object myself?
Matt-W Well I don't know how your tree is structured 08:45
hyperoperators work on lists
presumably hooking into a role there, the name of which I can't remember
flip913 role Each according to S03 08:50
Each Node would have a list (or maybe hash) of children 08:51
Matt-W It would depend, then, how you do Each in your tree classes 08:52
But hyperoperators can parallelise, so you still shouldn't depend on ordering
although you could ensure parent->child ordering 08:53
just not parent->parent
flip913 That would be ok ... I just need to have a parent finished before going to the children
Matt-W You could arrange that
it may be that normal hyperoperator semantics don't fit that particularly well though - you might get a clearer interface by using a method taking a Callable 08:55
mikehh rakudo (e4c7a05) builds on parrot r41257 - make test / make spectest (up to 28238) PASS - Ubuntu 9.04 amd64 09:02
rakudo - t/spec/S03-operators/arith.rakudo - TODO passed: 120, 131-132
rakudo - no Segmentation faults reported in make spectest
kidd ls
ooops, sorry :( 09:03
carlin likes Irssi's oops.pl script (scripts.irssi.org/html/oops.pl.html) 09:05
mikehh time for some i386 tests - bbiab 09:06
kidd carlin: I didn't know about it. thanks :)
jnthn o/ 09:27
phenny jnthn: 12 Sep 13:49Z <masak> tell jnthn Please put your "Solved in Perl 6" talk slides online soon, so that those of us who weren't fortunate enough to be in Japan at the time can enjoy it, too!
jnthn Will try and get to that today. :-)
frettled cheers jnthn on 09:38
jnthn is in Kyoto now :-) 09:41
devin "Solved in Perl 6" was a very good talk 09:44
jnthn *bow* 09:46
Matt-W jnthn: It certainly looked like an excellent idea for a talk. I do want to see the slides :) 10:08
mikehh rakudo (e4c7a05) builds on parrot r41257 - make test / make spectest (up to 28238) PASS - Ubuntu 9.04 i386 10:47
rakudo - t/spec/S03-operators/arith.rakudo - TODO passed: 131
rakudo - make spectest reports 126 Non-zero wait status: 11 (Segfault after passing tests)
rakudo - Note t/spec/S03-operators/arith.rakudo TODO passes 120, 131-132 and NO Segmentation faults reported on amd64 at same revision
mikehh cant get cardinal to build at the moment on i386 - will check later 10:49
it builds on amd64
sorry wrong window - that should be in #parrot 10:50
moritz_ is surprised by the positive responses to his latest blog post 10:58
lambdabot moritz_: You have 2 new messages. '/msg lambdabot @messages' to read them.
moritz_ lambdabot: you delived those twice already - that's enough now. 10:59
moritz_ wayland76: sorry, I think I replied to a months-old message from lambdabot yesterday 10:59
and I'm equally surprised that this blog post is on number 10 of the reddit front page 11:01
rakudo: 3.foobar 11:11
p6eval rakudo 446d49: OUTPUT«Method 'foobar' not found for invocant of class 'Int'␤»
moritz_ rakudo: 1/0 11:20
p6eval rakudo 446d49: ( no output )
moritz_ rakudo: foo()
p6eval rakudo 446d49: OUTPUT«Could not find non-existent sub foo␤» 11:21
moritz_ wants an example of a backtrace
diakopter rakudo: * * * 11:23
p6eval rakudo 446d49: ( no output )
moritz_ parrot build fails on p6eval's server 11:27
which is why the rakudo is so old 11:28
(the server always tries tries to build the newest parrot, not the one from build/PARROT_REVISION
trying again after a realclean... 11:29
takadonet morning all 12:08
moritz_ morning takadonet... some I always read taka .NET when seeing your nick name :-)
takadonet hehe 12:09
TimToday told me that my name has some Japanese meaning but I forgot what it was. I made up this name a long time ago 12:10
carlin rakudo: my $socket = IO::Socket::INET.socket(2,1,6); $socket.bind('127.0.0.1', 4242); $socket.listen(); $socket.recv(); while $socket.accept() {}; 13:15
p6eval rakudo e4c7a0: OUTPUT«Null PMC access in get_bool()␤in Main (/tmp/eGCv3xSHeg:2)␤»
mikehh rakudo (e4c7a05) builds on parrot r41260 - make test / make spectest (up to 28238) PASS - Ubuntu 9.04 i386
rakudo - t/spec/S03-operators/arith.rakudo - TODO passed: 131
rakudo - make spectest reports 91 Non-zero wait status: 11 (Segfault after passing tests)
moritz_ mikehh: weren't those gone in the last two spectest runs? 13:16
mikehh moritz_ on amd64 I don't get any - this is on i386 13:17
the previous run I got 121, this one 91 13:18
am running again
mikehh re-ran make spectest and got 115 Non-zero wait status: 11 (Segfault after passing tests) 13:24
it seems pretty random
mikehh in the previous run (91 picked up) for example t/spec/S03-operators/arith.rakudo had a Non-zero wait status 11 but not in this run (115 picked up) 13:26
eiro cd 13:47
hello all
diakopter eiro: hello
moritz_ cd: No such file or directory
oh hai :-) 13:48
eiro :)
i was just wondering where my cd command is
i didn't expected it on my irc client
yath moritz_: cd defaults to ~, doesn't it? ;) 13:51
moritz_ yath: yes
Matt-W yes
in unixy shells, anyway 13:52
yath loves his "t" alias.
(cd /tmp)
makes my ~ much more clean =:-)
yath kitt.yath.de/~yath/t.png ;) 13:53
diakopter in cmd.exe `cd` does `pwd` 14:02
Matt-W yes that's the silly windows way 14:03
yath well, where would it change to? \? or %HOME%? ;) 14:04
or %HOMEDIR% or whatever it's called 14:05
huf it could halt the gamelauncher and reboot to a *nix... 14:06
diakopter sigh; the Perl JSON modules say that viv's AST has circularity, so they refuse to use it... but it doesn't have circularity; it has multiple references to the same object in the tree, but not as a parent of each other. 14:07
%USERPROFILE% actually
also %HOMEPATH% 14:08
moritz_ well, the Perl 6 JSON module wouldn't make that error, because it doesn't try to detect circularities at all :-)
diakopter: I don't think that JSON can meaningfull represent that either 14:09
it would have to copy the object each time it occurs
diakopter mine can
moritz_ what does the json to [$obj, $obj] look like? 14:10
s/to/for/
rakudo: my $x = 5;; for 1, 2, -> $x { $x.say }; say $x 14:11
p6eval rakudo e4c7a0: OUTPUT«Could not find non-existent sub for␤»
diakopter here's a node with multiple refs: perl6.pastebin.com/m3af02967
moritz_ rakudo: my $x = 5;; for 1, 2 -> $x { $x.say }; say $x
p6eval rakudo e4c7a0: OUTPUT«1␤2␤5␤»
diakopter uses the perl ref address as the key 14:12
moritz_ I don't see json.org mentioning that as legal JSON 14:13
diakopter :P
true; it's not JSON, but it's JS source that DWIW 14:14
moritz_ std: -> my $x, $y { } 14:15
p6eval std 28238: OUTPUT«===SORRY!===␤Invalid typename my at /tmp/KgpD4iPAKa line 1:␤------> -> my⏏ $x, $y { }␤FAILED 00:03 41m␤»
diakopter I'm just going to eval the JS string anyway (as opposed to letting json2.js parse/check it and then eval it)
I couldn't find a YAML parser in JS 14:16
someone else feel free...
moritz_ ask ingy :-)
diakopter ingy: consider yourself summoned
moritz_ yaml.org/ says JsYaml, but it's a dead link 14:17
diakopter right... and the SF project is a yaml emitter in JS, not parser. and ingy's JS code in the yaml source repo is empty; just a skeleton. 14:18
diakopter to handle objects containing self-references without requiring a traversal of the object (for markers) after construction in JS, a closure containing the lookup/assignment could be injected into an array whose closure items are called after the object is declared. 14:22
anyway, at that point I might as well be writing a yaml parser, though. ... so 14:23
moritz_: __ash__ was asking about metamodel writeups... I thought ruoso wrote that up in one of the Syn? 14:28
moritz_ diakopter: I think ruoso specced some ways how classes, metaclasses and representations interact, but I don't the he wrote a spec for the default metaclass 14:29
I'm happy to be proven wrong, though
__ash__ ping moritz_ 14:55
moritz_ you pang? ;-)
__ash__ yup, i wrote up some basic ideas of some useful stuff, i am still flushing it out but failureontheweb.com/blog/article-1252900685 will be a link to it 15:00
moritz_ great 15:02
I have to de- and re-commute, and should be back in ~4 hrs if everything works out
__ash__ alright, moritz_ i am going to keep writing up in more detail some of those examples, and maybe purpose some tests 15:07
jnthn For those wanting my YAPC::Asia slides - see www.jnthn.net/articles.shtml 15:30
jnthn -> sleep 15:33
__ash__ jnthn: do you know if there has been a spec for the meta functionality in perl6?
jnthn See introspection bits of S12 for some of it
As for some other bits, the HOW API proposed by smop is likely to become spec, or something close to it.
Note repr APIs are implementation specific, and thus won't be spec'd. 15:34
(in the Perl 6 spec, that is)
__ash__ repr?
__ash__ is that something specific to smop? 15:35
jnthn representation
No, :repr is spec.
See S12.
Exactly what the API looks like for implemetning one is specific to an implementation though.
Rakudo's API for this currently doesn't exist, for example. ;-)
__ash__ are there plans for an official set of functions like a role composition function and maybe a add_method to an object method? 15:36
jnthn Yes, that's what the HOW API defines.
At this stage, it's something of a discussion still though.
The smop proposal for it is the closest we have at the moment.
__ash__ okay, i'll read up more on smop's, moritz_ said there wasn't much of a spec for it yet so i have been trying to write up some ideas for it to make it into more of a spec than what we were aware of 15:37
jnthn I hope between Rakudo, smop and any other interested parties we can get something along these lines into S12.
__ash__ yeah, it would be really useful
jnthn Yeah, I agree, we're getting I think towards the time when we perhaps can think about doing that. 15:38
__ash__ greaterthaninfinity.com/blog/articl...rogramming is what i am working on, i am going to keep updating that for now, just curious about input but if you have to go thats fine, i'll keep writing stuff up
jnthn I expect to flesh a bunch of this out in Rakudo in the near-ish future. 15:39
Really though, it's muchly a consensus thing.
jnthn I mostly think what smop proposed for the HOW API looks about right, though. 15:40
__ash__ is that in pugs/v6/smop? 15:41
jnthn There's an article on the perl foundation perl 6 wiki that covers this well
__ash__ k, i'll find that
jnthn www.perlfoundation.org/perl6/index....mop_oo_api 15:42
See HOW API and Declaration API. 15:43
__ash__ kk, thanks
jnthn really sleeps now :-) 15:45
__ash__ cya 15:47
didn't mean to keep you
pugs_svn r28239 | fglock++ | [mp6] added Javascript build script 17:04
azawawi moritz_: ping 17:46
DCOLLINS Hi folks 17:51
Having an issue with my Rakude..."for (0..$max :by($div)) {" fails with "Statement not terminated properly" near ":by($div))". Varied parens, spacing, even taking something directly from the spec fails. What's wrong? 17:52
avar last I knew rakudo didn't implement :by at all 17:56
rakudo: 0..10:by(2) 17:57
p6eval rakudo e4c7a0: OUTPUT«Confused at line 2, near ":by(2)"␤in Main (src/gen_setting.pm:3469)␤»
avar rakudo: (0..10):by(2)
p6eval rakudo e4c7a0: OUTPUT«Confused at line 2, near ":by(2)"␤in Main (src/gen_setting.pm:3469)␤»
DCOLLINS "Confused"?
Mice error :)
nice even
avar You have upset its fragile little mind
DCOLLINS say [+] 1..2; 17:58
Wait
rakudo: say [+] 1..2;
p6eval rakudo e4c7a0: OUTPUT«3␤»
DCOLLINS rakudo: say (1..2).[+]
p6eval rakudo e4c7a0: OUTPUT«Confused at line 2, near ".[+]"␤in Main (src/gen_setting.pm:3469)␤»
rindolf Salaam! 18:51
diakopter heh; I got STD.pm into JSON (actual JSON, too) 18:57
11MB 18:58
[particle]1 brr 19:00
diakopter turns up the a/c 19:00
less/vim don't like an 11MB text file with no linebreaks 19:06
har; I need to quote the property keys that are also js keywords... heh 19:10
moritz_ re 19:29
pmichaud moritz++ # excellent article about 100% spectests 19:30
phenny pmichaud: 13 Sep 04:30Z <s1n> tell pmichaud i'm looking for specifics on nqp; hit me up if you have any info for me
pmichaud: 01:21Z <s1n> tell pmichaud i think parrot/compilers/nqp/src/Grammar.pg might be what i was looking for
moritz_ pmichaud: thanks
__ash__ moritz_: jnthn said he was going to base most of the OO meta stuff on the SMOP HOW api www.perlfoundation.org/perl6/index....mop_oo_api 19:48
moritz_ that's fine by as as long as it ends up being in the spec at some piont 19:50
dalek kudo: a9ff309 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 436 files, 15500 (71.5% of 21679) pass, 0 fail
21:29
pyrimidine wow, over 15k now. Nice! 21:34
pyrimidine (and agreed on blog post by moritz++) 21:35
carlin jnthn++ # Very nice YAPC::Asia slides :-) 23:21
carlin rakudo: say 12 ?? 14; 23:46
p6eval rakudo a9ff30: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤in Main (src/gen_setting.pm:3469)␤» 23:47