pugscode.org/ | nopaste: sial.org/pbot/perl6 | pugs: [~] <m oo se> (or rakudo:, kp6:, elf: etc.) (or perl6: for all) | irclog: irc.pugscode.org/
Set by Tene on 29 July 2008.
Auzon std: qw(a b c d) 00:44
p6eval std 21641: OUTPUT[############# PARSE FAILED #############]
Auzon std: 1+1 00:45
p6eval std 21641: OUTPUT[parse ok]
Auzon hm, the line counting is off somewhere
vixey woah
how is std run?
Auzon tryfile in pugs/src/perl6
vixey it's pugs and not the std.pm? 00:46
Auzon No, it's STD.pm.
It's stored in src/perl6 in the pugs repo
It parses pretty much all of t/spec 00:48
pugs_svn r21642 | Auzon++ | [evalbot] another attempt at improving STD.pm support in evalbot 00:54
Auzon bah, it's not working now. 00:59
Auzon (sorry for the p6eval noise) 01:38
pugs_svn r21643 | Auzon++ | [evalbot] STD works in evalbot again now 01:51
Auzon ok. Now at least it works. It spews all over the console though :-/ (sorry moritz) 01:52
Tene STD: 1+1 01:53
Auzon std: 1+1
p6eval std 21642: OUTPUT[parse ok]
Auzon std: /<[]]>/ 01:54
p6eval std 21642: OUTPUT[parse ok]
Auzon erm. I thought it worked...
Tene rakudo: [~] <m oo se>
p6eval rakudo 29834: OUTPUT[Syntax error at line 1, near "[~] <m oo "␤current instr.: 'parrot;PGE::Util;die' pc 120 (runtime/parrot/library/PGE/Util.pir:82)␤]
Auzon std: +++++++++
p6eval std 21642: OUTPUT[parse ok]
Auzon :-/
Tene std: {{{{{{{{{{{{{ 01:55
Auzon I'm going to bang my head into a wall, and then start my own copy elsewhere to figure it out
p6eval std 21642: OUTPUT[parse ok]
s1n is the readme correct in stating that rakudo specific (languages/perl6) patches go to rakudobug at perl dot org? 02:33
ampersand i believe so, yes 02:42
s1n pmichaud: i saw on rt# 44211 you mentioned 'e' was no longer in the spec, is that true? 02:52
meppl good night 06:14
pugs_svn r21646 | lwall++ | [STD] renamed main package to STD 08:06
r21646 | lwall++ | fixed package name conflicts
r21646 | lwall++ | fixed tests that used function call syntax for quotes
r21646 | lwall++ | various other bugs
r21646 | lwall++ | now parses all but one of the t/spec tests (needs macros)
pmurias TimToady: how should grammar modification which should be propagated be marked? and how should their lexicality be handled? 08:28
masak is it allowed to have an enum with only one value? 08:36
pmurias why not?
masak rakudo: enum Weekday<Monday>
p6eval rakudo 29834: OUTPUT[get_pmc_keyed() not implemented in class 'Perl6Str'␤current instr.: 'parrot;Perl6;Grammar;Actions;enum_declarator' pc 132437 (src/gen_actions.pir:12724)␤]
masak pmurias: because rakudo fails on it 08:37
rakudo: enum <Monday>
p6eval rakudo 29834: OUTPUT[get_pmc_keyed() not implemented in class 'Perl6Str'␤current instr.: '!anon_enum' pc 12173 (src/gen_builtins.pir:7750)␤]
moritz_ masak: that's because <Monday> is a Str, not a List, and rakudo tries to handle it as a List
masak moritz_: feels like a common problem
moritz_ rakudo: say <Monday>.WHAT
p6eval rakudo 29834: OUTPUT[Str␤]
moritz_ masak: it's one of the reasons so many list builtins are moved to Any 08:38
masak yes.
it still feels like one of those slightly askew things to which a Grand Solution would be welcome
pmurias rakudo_svn: enum Weekday <a b> 08:39
rakudo: enum letter <a b> 08:40
p6eval rakudo 29834: RESULT[Null PMC access in find_method()␤current instr.: '_block16' pc 25 (EVAL_16:12)␤]
pmurias rakudo: enum letter<a b>
p6eval rakudo 29834: RESULT[Null PMC access in find_method()␤current instr.: '_block16' pc 25 (EVAL_16:12)␤]
pmurias rakudo: enum <a b>
moritz_ rakudo: enum letter<a b>; say 1
p6eval rakudo 29834: RESULT[{"a" => 0, "b" => 1}]
rakudo 29834: OUTPUT[1␤]
pmurias rakudo: enum<a b>
p6eval rakudo 29834: RESULT[{"a" => 0, "b" => 1}]
pmurias TimToady: _STARr keeps an useless @all, should i remove it? 08:41
pugs_svn r21647 | fglock++ | [v6.pm] fixed array emitter 09:16
pmurias std: 1 =~ 2 10:06
p6eval std 21647: OUTPUT[cp: cannot create regular file `lex/STD/EXPR': Permission deniedObsolete use of =~ to do pattern matching; in Perl 6 please use ~~ instead at line 1:]
pmurias std: {{{{{ 10:07
p6eval std 21647: OUTPUT[parse ok]
moritz_ "here be dragons"
pugs_svn r21648 | fglock++ | [v6.pm] complex 11:11
s1n moritz_: thanks for applying that patch so soon, i'll mark the tests with some todo's and come back to it when we have use working 11:15
moritz_ s1n: I think we should even test that there is no 'e' exported by default 11:16
eval_dies_ok 'e', 'no "e" exported by default';
sadly rakudo is currently rather broken, as documented in RT #57452 11:17
s1n moritz_: okay, i'll add a todo and check for the bareword in that test too, i'll also look at that RT, all tonight 11:38
moritz_ s1n: great 11:39
pugs_svn r21649 | pmurias++ | [smop] subs work when called for the first time 11:43
moritz_ use.perl.org/~audreyt/journal/37062 11:48
lambdabot Title: Journal of audreyt (6654) 11:49
moritz_ pugs: say $?PUGS_VERSION 12:04
p6eval pugs: OUTPUT[Perl6 User's Golfing System, version 6.2.13.11, July 31, 2008␤]
moritz_ audreyt++
masak audreyt has trouble finding a job? I thought by now she'd be getting several job offers per week 12:10
Alias_ She needs quite a bit of cash
Becoming audrey hasn't been cheap 12:11
moritz_ has a freaky idea regarding Perl 6 donations and audreyt...
masak I can understand that
I'd donate.
Alias_ I doubt you can donate enough to matter
:)
masak might be a start 12:12
moritz_ Alias_: the TPF has received 100k USD for Perl 6 development 12:13
Alias_ true
moritz_ don't know if they want to spend anything on pugs
pugs_svn r21650 | fglock++ | [v6.pm] more tests 12:18
masak I still think it should be exceedingly easy for potential employers to see the worth of having audreyt on board. she's one of those "Done, and Gets Things Smart" people that Steve Yegge talks about. 12:28
moritz_ indeed 12:29
masak hear that, all you lurking headhunters on #perl6? 12:31
moritz_ I guess asking for jobs in a perl related journal increases her chances of getting a perl related job, though
masak anything haskell related should be easy, too 12:32
moritz_ for me that would be s/anything/nothing/ ;-) 12:33
masak moritz_: I'm not a virtuoso either, but I can wield the Maybe monad now
I feel it makes me a better programmer just to know about it 12:34
("better" meaning "slightly better close to the very bottom of the scale", by the way)
moritz_ in perl, every variable has the implicit Maybe monad ;)
masak sort of 12:35
but in haskell, you can "bless" every calculation with "maybeness"
that's extremely powerful
moritz_ every variable as Just value | undef
s/as/is/
masak having it on by default as in Perl, and many other languages, creates the risk of uncaught undefs 12:36
that hardly happens in Haskell
moritz_ yes, right
masak monads++
moritz_ low level types in perl 6 aren't Maybe, but I think that's the only exception 12:37
masak and even that is with a nod to the metal, not to type theory 12:38
Limbic_Region salutations all 13:28
moritz_ has a deja-vu ;-)
Limbic_Region: have you seen that blog post by audreyt? 13:29
Limbic_Region I have already emailed her
moritz_ ok ;)
zamanfou is now away: In the rain my tears are forever lost. 13:30
pmurias ruoso: is there anything we need implemented before lexicals? 13:43
jdv79 cool, she's still alive. 14:35
moritz_ masak: in #57448 you're missing the actual revision number 14:44
masak moritz_: I just saw that too 14:45
sloppy-and-paste
I'll reply and supply it
moritz_ observes with delight that Rakudo can't complain about lack of tests 14:48
s/tests/testers/
[particle] masak: do you create spec tests for these errors you find in rakudo?
masak [particle]: not always, no.
[particle] you should consider it. it would help all perl 6 implementations 14:49
moritz_ I usally try to add some when I see tickets
[particle] the bug reports are quite helpful
masak [particle]: actually, you could help me clear up what goes in the spec test and what doesn't
I thought the spec tests were _spec_ tests because they reflect the spec 14:50
moritz_ well, they say for example that every object has a .WHAT method
masak using that logic, they shouldn't be contaminated with regression tests from diverse bugs in implementations
moritz_: yes, that could be a spec test
moritz_ masak: they are only bugs because they violate the specs 14:51
masak hm.
[particle] you're testing that Enum has a .perl method... that's a spec test
moritz_ thus all regressioin tests are spec tests
masak ok
[particle] where it belongs, that's the hard bit
masak now that I know, I will be more active in providing tests
moritz_ the only thing that does not go into the spec tests are things that are implementation specific
masak oki 14:52
pugs_svn r21651 | moritz++ | [spec] testing .WHAT and .perl on enum mixins 14:53
r21652 | moritz++ | [spec] test .WHAT and .perl on actual enums, masak++ 14:55
moritz_ sad thing is that the tests I've added are not in spectest_regression 14:55
can somebody please take a look at S12-enums/thorough.t, line 28? 14:56
it uses |~~ - am I right in assuming that it should actually be !~~ ?
[particle] what the heck is |~~ ? that's funky 14:57
masak moritz_: I think you're correct
moritz_ STD.pm parses it 14:58
[particle] blame says: 21146 moritz ok $x |~~ Wed, "smartmatch worked correctly ($x-4)";
sure, it's valid perl, but looks funky 14:59
prefix:|
moritz_ [particle]: I think I moved that file in r21146 15:00
can you have a prefix operator on another operator?
[particle] sure
you can stack prefix:! for example
moritz_ or does it parse as $something infix:<|> prefix:<~>prefix:<~> $other?
[particle] longest token 15:01
moritz_ right
[particle] so, !! may be problematic
pugs_svn r21653 | moritz++ | [spec] fixed negated smart match in enum test
moritz_ [particle]: we've got preifx:<?> for perl 5 stlye !! usage 15:02
[particle] right, but it's a perl5ism that may want a warning
moritz_ we could use a no-op prefix:<!!> to mark important lines in our code... ;-) 15:04
pugs_svn r21654 | fglock++ | [v6.pm] IO fixes
masak moritz_: !! is not no-op :) 15:07
moritz_ ;)
TimToady moritz_: subsets are "Just" types 15:21
moritz_ rakudo: say Int.What 15:22
p6eval rakudo 29834: OUTPUT[Method 'What' not found for invocant of class ''␤current instr.: '_block11' pc 24 (EVAL_13:15)␤]
moritz_ pugs: say Int.WHAT
p6eval pugs: OUTPUT[Int␤]
moritz_ pugs: say Int.perl 15:23
p6eval pugs: OUTPUT[::Int␤]
moritz_ TimToady: how absolute is the "everything must implement .perl" rule?
or is there no such rule? 15:24
for example, does `eval $closure.perl' has to work? 15:26
TimToady well, it might just give you a bunch of JITted code... :) 15:27
moritz_ is that a "perlish representation", to quote S02? 15:28
TimToady companies want their security-through-licensed-obscurity...
but I think reasonable efforts should be made to provide .perl where possible
and that includes closures generally
moritz_ which leads us to the question: how can we reference an anonymous lexical scope? 15:30
my $x; { # variable definitions here; $x = sub { ... }; # other stuff here }; say $x.perl 15:31
TimToady how does pugs do it? 15:31
moritz_ TimToady: it emits a bunch of YAML AST, iirc 15:32
pugs: my $x = sub { 1; } say $x.perl
p6eval pugs: OUTPUT[*** ␤ Unexpected "say"␤ expecting operator␤ at /tmp/LjY0C9q9jb line 1, column 20␤]
moritz_ pugs: my $x = sub { 1; }; say $x.perl
p6eval pugs: OUTPUT[\sub :(@_) "$_" := "Scalar" #<Scalar:0xb7b6897d>␤ "@_" := "Array" #<Array:0xb7b68975>␤ "&?ROUTINE" := "Sub" #<Sub:0xb7a8a539>␤ "&?BLOCK" := "Sub" #<Sub:0xb7a8a539> {"$_" := "Scalar" #<Scalar:0xb7aed15d>␤ "@...
TimToady that's Perl, not YAML 15:33
this is, I suspect, a good place to follow the lead of pugs 15:34
moritz_ pugs: my $x = sub { 1; }; eval $x.perl; say "still here"
p6eval pugs: OUTPUT[still here␤]
moritz_ so you can actually write code like that in Perl 6?
moritz_ shudders
TimToady well, applying := to a "" is probably illegal really... 15:35
moritz_ I mean I'm quite sure that whatever $closure.perl emits, it won't be all that pretty... 15:36
TimToady actually, I think that's spittout out Haskell there maybe
*spitting out
not awake enough yet to see straight 15:37
TimToady but anyway, the pugs notion was that everything just desugars down to primitives, so .perl might give you the primitives, but it still has the same meaning 15:38
we probably have to keep some kind of representation like that around internally anyway if we want auto-optimizing/pessimizing jit alternatives 15:40
TimToady or at least you have to keep a fully pessimized version around to fall back on if the optimized version's preconditions are violated 15:41
moritz_ that's the classical optimization for dynamic languages, yes 15:42
TimToady but that sort of all-or-nothing view reminds me of source filters somehow
so it's probably better to keep the semantic representation and re-emit
moritz_ otoh, do we want to eval($stuff.perl) a clone of $stuff? if so, it would just have to emit something like do { # variables here; sub { ... } } to create a new closure that's tied to a differenc lexical pad 15:43
just like eval $ordinary_object.perl will not return the same object, but a clone 15:44
s/a clone of $stuff/to be a clone of $stuff/
TimToady well, maybe it depends on whether you're asking for .perl of the continuation or not... :/ 15:45
[particle] VAR($x).perl 15:47
TimToady but certainly something that references lvalues can't work outside the referential scope of them
not without ipc that communicates back to the original machine :)
so basically we're talking about a universal naming scheme for anonymous values at that point... 15:49
moritz_ and if we want and need something like that 15:50
TimToady which is not terribly practical unless you really need relocatable code
moritz_ it feels a bit stupid to invent a naming scheme for something that might be intentionally anonymous
[particle] sounds like perl 6.1 or perl 7 15:51
TimToady I don't know Perl 6 will end up with, but Perl 7 will be fought with sticks and stones...
moritz_ luckly we mostly agreed on not writing perl 7 ;-) 15:52
TimToady it's probably just something to bear in mind for now, but in generally wrapping up code has to wrap up its entire visible state, and that's not terribly practical 15:53
*general
TimToady so I don't know if we can mandate .perl on everything easily; what we *could* say is that the AST for a comp_unit must be kept around by default unless explicitly discarded 15:57
TimToady and then a closure's .perl can be emitted assuming that information, maybe 15:59
not sure how cloning fits into all that though
the continuations tend to sneak back in
moritz_ so basically eval($stuff.perl) would deep clone $stuff for normal objects, and only half-deep for closures?
(or even shallow)
[particle] *hip-deep
moritz_ ;)
TimToady I'm not an expert on these things, and it feels PhDish 16:00
I've already earned enough of those with Perl 6... :)
[particle] in sigils, bolt-ons, and other topics 16:01
oh, wait, those are perl 5 :) 16:02
[particle] misparsed
zamanfou is now away: In the rain my tears are forever lost. 16:03
mofino zamanfou, that's a pretty emo away message 16:19
geez, now I'm depressed. 16:20
;)
moritz_ independently of *how* it is, we don't want to know anyway
TimToady it seems a bit antisocial to put away messages on a channel you're just lurking on... 16:22
moritz_ but now (s)he is away anyway, and won't read what we say
TimToady well, I was just wondering if a mild kick was in order
mofino mild? 16:23
moritz_ maybe
mofino: no /kickban
TimToady well, our ban table is full, so not on the table :) 16:24
mofino wow 50 bans
TimToady but I wasn't suggesting that
moritz_ maybe you could also lift some old bans, in the hope that they aren't necessary anymore, and to be able to intervene when it's really needed 16:25
mofino aye
i never understood old bans
araujo greets TimToady 17:23
mofino haha @one.hand.on.mouse... 17:55
ahh, people troll right down to their domain, excellent. 17:56
hercynium wonders how he can set his hostname to @one.hand.on.mouse.com... 18:01
hercynium used to have the email address... [email@hidden.address] 18:02
pmurias TimToady: how is the autolexer implemented? (i have to make it preserve grammar modifications and don't really understand it) 18:56
ruoso Good Afternoon! 19:08
pmurias, we need to start supporting the language constructs 19:09
if, while, for, gather, take etc 19:10
moritz_ you want to implement them in smop?why? 19:11
I mean if and while can perfectly done in C
and if smop is a runtime library, not a VM..
ruoso moritz_, if we do it in C we're going to recurse in the C stack 19:12
moritz_ if and while don't need a stack, do they? 19:13
ruoso they do...
they even need a lexical pad
and you also need to be able yeld the continuation in a gather/take construct 19:14
speaking of which... 19:15
one thing that isn't clear to me is how ==> is going to affect the invocation...
pmurias ruoso: good evening 19:16
ruoso pmurias, :P 19:17
pmurias moritz_: smop is sort of a vm
ruoso: if and while don't need a c stack 19:18
ruoso pmurias, they need a Perl stack
pmurias we could to an if as &if(cond,&iftrue,&else) 19:21
s/to/do/
ruoso that's how I planed to do... 19:22
implement each of this constructs as standard objects
pmurias is Frame.back tested anywhere? 19:23
ruoso pmurias, not really... 19:27
in fact... Frame.back is implementation specific 19:28
the public interpreter API is just has_next, next, eval
pugs_svn r21655 | pmurias++ | [smop]
r21655 | pmurias++ | expanded 21_code.p6
r21655 | pmurias++ | the RI is set in Frame.clone
pmurias SLIME Frames are mostly implementation specific 19:29
ruoso: how should the method to get the SLIME Frame from a Code be called? 19:32
ruoso: is sub {...}.SLIME_FRAME ok? 19:39
pmurias btw have you thought of testing smop's test suit coverage? 19:42
ruoso pmurias, .continuation()? 19:53
pmurias ruoso: it's meant to be used only for testing SLIME 19:55
ruoso ah... in this case .SLIME_FRAME si ok...
pugs_svn r21656 | pmurias++ | [smop] assingment via = works 20:01
pmurias ruoso: and what do you thing about testing test coverage? 20:02
ruoso pmurias, that's something that should be done at some time... 20:03
ruoso having a weird week... almost no work done... (probably related to the fact that he started building his house) 20:04
ruoso home &
dolmen rakudo: class Foo; class Foo; class Foo; 20:34
p6eval rakudo 29834: OUTPUT[Class 'Foo' already registered!␤current instr.: '!keyword_class' pc 11881 (src/gen_builtins.pir:7565)␤]
pugs_svn r21657 | Auzon++ | [gsoc_spectest] finished up angle bracket syntax tests (added 21 tests) 20:58
Auzon TimToady: STD.pm has trouble with /<*foo+>/ and similar patterns (S05:1459). t/spec/S05-metasyntax/angle-brackets.t demonstrates several issues. 21:05
pugs_svn r21658 | moritz++ | [spec] fixed file propos of range.t 22:45
r21659 | moritz++ | [spec] more svn props fixes 22:47
ruoso Good Evening! 22:49
ruoso pmurias, how hard would it be to add support for named arguments in sm0p? 23:14
s/sm0p/use v6 blocks/
pugs_svn r21660 | ruoso++ | [smop] Created the attribute test, now we need named arguments in use v6 blocks 23:26
ruoso pmurias, could you please take a look at test/22... we would need the commented part to be compiled as named arguments to that call... 23:27
pugs_svn r21661 | lwall++ | [STD] now parses enum declarators 23:40
r21661 | lwall++ | [STD] now parses <*...> as containing regex (Auzon++)
r21661 | lwall++ | [STD] now parses <~~0> in addition to <~~foo>
pmurias ruoso: it shouldn't be very hard, elf ast is broken in this regard, but it can be worked around 23:51