»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
ash_ jnthn in your last commit in the commit you spelled twigil as twivil 00:07
ash_ s/the commit/in a commit in Actions.pm/ 00:07
diakopter s/in a commit/a comment/ 00:08
jnthn what, you expect me to type CORRECLYT? :-O 00:08
ash_ well, this twivil concept could lead to something new, maybe we should discuss it 00:09
:P
jnthn ash_: It rhymes with "evil", so I'm sure we can make something out of it. :-) 00:10
OK, I need to get some rest now, but if somebody feels like some bug hunting... 00:11
jnthn S02-builtin_data_types/anon_block.rakudo doesn't look like it'll need too much more work to make it pass. If the bug that causes it to bomb can be quashed (not sure how hard it'll be - maybe not very, maybe it's nasty...but hopefully not) then it makes it through the tests that follow that point. 00:13
dalek kudo/ng: 397e5f5 | jonathan++ | src/Perl6/Actions.pm:
Typo spotted by ash++.
kudo/ng: f213627 | jonathan++ | src/core/operators.pm:
Liberalize sigs on infix:<~~> a bit.
colomon blast, map may still be dodgy.
ash_ github.com/perl6/nqp-rx/blob/master...igil.t#L15 uses @( ) in nqp like i was before in the for loops 00:14
jnthn -> rest, night o/ 00:24
colomon o/ 00:35
ng: say 1 00:36
p6eval ng f21362: 1␤ 00:36
colomon groovy, up to date
ng: say grep { ($^a % 2) }, (1...10);
p6eval ng f21362: 13579␤
colomon ng: say grep { ($_ % 2) }, (1...10); 00:37
p6eval ng f21362: ␤ 00:37
colomon seems like maybe we're getting the wrong $_? 00:38
ng: $_ = 'z'; ay grep { ($_ % 2) }, (1...10); 00:39
p6eval ng f21362: Could not find non-existent sub &ay␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
colomon ng: $_ = 'z'; say grep { ($_ % 2) }, (1...10); 00:40
p6eval ng f21362: ␤
colomon nope, that's not it...
ash_ ng: grep { say $_; ($_ % 2) }, (1...10); 00:41
p6eval ng f21362: Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤
ash_ ng: $_ = 1; grep { say $_; ($_ % 2) }, (1...10); 00:41
p6eval ng f21362: 1␤1␤1␤1␤1␤1␤1␤1␤1␤1␤ 00:42
lichtkind thanks guys good night
colomon ash_: oh, good call. 00:52
diakopter oh 02:14
vamped cat @a -> cat() and streams are not yet implemented in Rakudo, sorry 02:54
it's nice to have good error messages
ash_ ping Tene ? 03:19
msg Tene I know your probably don't remember, but a few months ago you put up a sample perl 6 function that used inline PIR to thread but at the time parrot gave an error, well I checked your example today and it functions for me, and threads (using master rakudo, so whatever version of parrot that is) 03:24
hmm i think i did that wrong
vamped it's ok ash_, nobody seems to be here to see your mistake. 03:26
ash_ hehe, i'll remember how the msg bot works one day 03:27
phenny, tell Tene I know your probably don't remember, but a few months ago you put up a sample perl 6 function that used inline PIR to thread but at the time parrot gave an error, well I checked your example today and it functions for me, and threads (using master rakudo, so whatever version of parrot that is) 03:28
hmm, guess there is no phenny
whelp that solves that problem then 03:29
ash_ rakudo: sub async(&bl) { my $block = bl; eval('Q:PIR { \n find_lex $P0, \'$block\' \n $P1 = root_new [\'parrot\';\'ParrotThread\'] \n $P1.\'run_clone\'($P0 )\n }');}; async({ say 'yo'; }); sleep 1; say 'hi'; 03:45
p6eval rakudo 726b83: yo␤ 03:46
Tene ashizawa: Interesting. Thanks. 04:44
vamped S32#line_201 I think {ucfirst $1} should be {ucfirst $0} 05:53
vamped I don't think this is being logged currently. I'll send in the bug. 05:57
saschi morning 06:58
Su-Shee good morning 07:13
moritz_ good morning 09:26
jonasbn moritz_: did ou submit a paper to the Open Source Days in Copenhagen? 09:28
moritz_ jonasbn: an abstract for a talk, yes 09:29
about parsing with Perl 6 grammars
jonasbn great, I will be in charge of the Perl track running in conjunction with the Perl6 hackathon 09:30
moritz_ hope it's OK that I didn't check with you first, I just didn't think about it 09:31
sjn hello guys
jonasbn moritz_: will you also be attending the Dutch Perl Workshop on the friday
the 5th. of March that is 09:32
sjn: hello
moritz_ jonasbn: my planning didn't get that far yet :/
sjn Any of you know if Mark Lentczner still hangs around here? (He's the guy that made the Perl6 periodic table of operators, www.ozonehouse.com/mark/periodic/)
jonasbn moritz_: okay 09:33
moritz_ sjn: haven't seen him lately
sjn moritz_: what's his nick?
moritz_ sjn: not sure, need to search a bit 09:34
maybe it was mtnviewmark? 09:35
sjn: if you need his email address, it's mark at glyphic dot com
sjn moritz_: thanks 09:37
meneldor hi all 09:57
moritz_ jonasbn: in case I haven't told you: THANK YOU SO MUCH for organizing the hackathon + perl track 11:03
jonasbn no problem 11:04
I am looking so much forward
excuse to drink beer and hack
jonasbn in reverse order of course 11:04
jonasbn hopes masak does not give him a lecture on reverse now 11:05
moritz_ :-)
hanekomu what's the Perl6 Discovery Workshop? perl6.org.uk/psdw2010/ 11:06
moritz_ never heard of it 11:10
jnthn drink beer and hack! \o/ 11:32
er, morning folks :-)
colomon morning! 11:35
are we allowed to drink cider and hack instead? 11:36
jonasbn perhaps we should order some Club Mate en.wikipedia.org/wiki/Club-Mate 11:37
jnthn colomon: I don't personally find cider so appling. ;-) 11:38
jnthn colomon: But feel free. :-) 11:39
colomon groan
colomon jnthn: so, picking up from last night: 11:45
the good news is that map now works with $_. 11:46
the bad news is that grep doesn't.
ng: (1...10).map({$_*$_}).perl.say
p6eval ng f21362: (1, 4, 9, 16, 25, 36, 49, 64, 81, 100)␤
colomon ng: (1...10).grep({ say $_; 1; }).perl.say 11:47
p6eval ng f21362: sh: ./perl6: No such file or directory␤
colomon arg
colomon ng: (1...10).grep({ say $_; 1; }).perl.say 11:50
p6eval ng f21362: Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤Mu()␤[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]␤
colomon huh. also interesting is that that's an array rather than a list? 11:51
jnthn Hmm...odd.
colomon the last detail probably comes from the current implementation of gather / take. 11:53
jnthn Yes, that's quite possible. 11:59
Would ahve to dive into the code to have a beter idea of the problem with grep here.
sjohnson hi guys 12:05
colomon jnthn: the good news is the grep code itself is dead simple. :) 12:05
colomon rakudo: class A { method B($inv: $fred) { say $inv.WHAT; say $fred.WHAT; }; }; A.new.B("hello"); 13:00
p6eval rakudo 726b83: ( no output )
takadonet morning all 13:02
meneldor guys when i invoke a method inside Role how to know which class is the invocant? 13:09
moritz_ with $?CLASS or so
not sure if it's implemented
or self.WHAT
meneldor self.self.WHAT is : Use of uninitialized value 13:10
self.WHAT i mean
Symbol '$?CLASS' not predeclared in create 13:11
jnthn self.WHAT I think should work. :-/ 13:13
moritz_ meneldor: did you compose the role into a class? 13:18
meneldor you mean: class Foo does Bar ? 13:19
moritz_ yes 13:23
meneldor yea
moritz_ ./perl6 -e 'role a { method b {say self} }; class b does a { }; b.new.b' 13:24
b()<0x7f86b0e36168>
moritz_ and when I use say self.WHAT I get b() 13:24
meneldor moritz_: i use it as module 13:26
my classes are in other file 13:27
then i compose an object in the first file
next im calling the role
when i do this inside the module everythink is fine 13:28
meneldor do i have to export the role? 13:28
moritz_ no
but you have to use the module the role is in
moritz_ just wrote $self->schema->resultset('Job')->search({ status => $status }) in Perl 5 13:43
and I would have loved to write it as @.schema.resultset('Job').search({ :$status}) instead :-) 13:44
PerlJam moritz_: Well ... port DBIx::Class to Perl 6 ;) 13:50
greetings btw 13:51
colomon moritz_: wait, is @. equivalent to @(self). or something? 13:57
moritz_ colomon: @.foo is equivalent to @(self.foo) 13:58
and I just reallized that it's wrong in this context
mathw DBIx::Class in Perl 6 would be awesome 14:00
takadonet really want to start using DBIx::Class (Perl 5) in my projects 14:03
PerlJam mathw: what would make it more awesome is if it were ready for Rakudo * 14:10
PerlJam is really wishing for lexically scoped macros in Perl 5 right now.
PerlJam greetings Alias 14:13
Alias \o 14:14
Su-Shee I wish for named parameters. 14:17
meneldor moritz_: it works 14:20
just silly mistake :) 14:21
if self.WHAT says MyModule(), how to compare it against class MyModule? 14:22
jnthn self.WHAT ~~ MyModule # permits subclasses too; that said, self ~~ MyModule will also do that.
But be careful... 14:23
You're making the role less useful to other classes.
meneldor i use the role with 4 classes and i wanna know which one invoke it 14:24
jnthn Why, out of interest?
moritz_ if your design is good, that should not be interest
(except for debugging, maybe)
meneldor for debugging 14:25
jnthn Ah, for debugging makes sense then. :-)
mathw PerlJam: First we need basic database drivers then 14:27
moritz_ first DBI, then DBIx::@things :-) 14:28
for testing and developing DBI, you can use file-based DBDs first
mathw this is true 14:29
meneldor DBIx::@things ? what it would be :) 14:31
of im out of space today, you mean DBIx::Class etc 14:33
moritz_ right 14:34
any classes in the DBIx:: namespace
meneldor a driver for SQLite will be good for begining 14:37
moritz_ masak++ has written some SQLite binding, iirc 14:38
colomon news.ycombinator.com/item?id=1064622 14:39
mberends heh 14:41
moritz_ wrote a reply 14:44
mberends the article preceding the comment is just as important use.perl.org/~masak/journal/40110 14:44
colomon sure, I figured people had read that already. :) 14:45
I forget everyone may not follow the blogs like I do.
moritz_ reads planetsix 14:46
takadonet colomon: you are not alone. I read every piece about Perl 6 or Parrot
jnthn -> vienna.pm 14:52
mberends good move
frettled Newsflash: security vulnerability in gzip, fixed in Debian etch, lenny and sid (unstable), unknown status for other systems. 15:01
PerlJam newsflashes are for twitter :)
mberends zippers are for flashers ;) 15:02
moritz_ now I've forgotten to add 1; to the end of a Perl 5 module. Againe. 15:04
s/e\././
pmichaud good morning, #perl6 15:04
moritz_ good morning pmichaud 15:05
takadonet morning pmichaud
frettled good morning :)
PerlJam greets pm
mberends hello pmichaud :)
colomon \o/ 15:06
pmichaud so, for the january release I'm currently leaning towards holding the release for a few days so that we can bring the ng branch a bit farther along (but no longer than a week -- i.e., next thursday we ship ng branch no matter what). opinions?
PerlJam Does "bring ng farther along" mean "make it master" or not? 15:07
pmichaud yes
frettled pmichaud: go for it
moritz_ pmichaud: +1
PerlJam Then holding for a week gets my vote for sure.
pmichaud other option is to ship one last release on the current master, and then immediately switch ng to be new master immediately after release
pmichaud but I don't see a whole lot of purpose in another release on the old master 15:08
PerlJam indeed
colomon seems like it would require a blitz of work to make ng ready to be master in a week, but it's certainly not a bad idea.
pmichaud well, several have said we should bite the bullet and make ng master even if it means a (significant) regression. I'm inclined to agree.
regardless, I plan to have list assignment done today. :)
moritz_ \o/
PerlJam \o/
pmichaud that should help a lot
pmichaud okay, I'll go with the "hold for up to a week" plan. 15:09
ash_ pmichaud does the list changes include @ context?
pmichaud ash_: we should be able to do that reasonably quickly, yes.
ash_ cool
colomon list assignment \o/
pmichaud S03:1996 looks wrongish. 15:16
pmichaud I thought that array assignment is "mostly eager" 15:17
colomon really? I would think laziness is pretty necessary -- otherwise you're forcing people to think about array versus list all the time. 15:18
colomon oooo, laziness and side effects really don't get along well, do they? 15:21
ash_ pmichaud in src/builtin/List.pir there is a list function, (that is supposed to be the long name for @()) it currently isn't working correctly, i think, if you pass a named parameter. I was letting you know since your doing some stuff with lists right now 15:25
here's an example
ng: say list(1, 2, :b<a>).perl;
p6eval ng f21362: (1, 2)␤
ash_ the 3rd parameter should be a pair, moritz_++ noticed this 15:26
pmichaud checking. I think the spec changed recently here. 15:33
if the spec didn't change, then ng has it correct. 15:34
and :b<a> would be a named argument to list()
moritz_ I think having list() specced as a function is wrong 15:35
and even if it where, it would have to die
bacause list has only *@_, not *%_
pmichaud there was a long discussion about this many moons ago 15:36
the problem is not only with list()
pmichaud i.e., it's not something we can fix by recognizing 'list' syntactically 15:36
e.g.: for 1,2,3,:a<b> { .say } 15:37
(although this one probably works, I guess. hrm.)
anyway, current spec says that :a<b> is always a named parameter when used as an argument
moritz_ rakudo: for 1, 2, :a<b> -> $x { say $x.WHAT }
p6eval rakudo 726b83: Int()␤Int()␤Pair()␤
pmichaud right, rakudo currently sees that okay because 'for' isn't a function call 15:38
okay, looks as though the spec (S06) did not change
so list(1, 2, :a<b>) should either throw an exception or it should contain two elements 15:39
and, of course, list(...) is *always* a function call, because of the parens.
moritz_ oh
pmichaud interestingly:
ash_ so, list 1, 2, :a<b> is different than list(1, 2, :a<b>) ?
pmichaud ash: yes. 15:40
ash_ k, i see
pmichaud interestingly:
ng: say (list (1, 2, :a<b>)).perl
p6eval ng f21362: (1, 2)␤
pmichaud I call bug.
pmichaud that should have three elements, not two. 15:40
ash_ how would you be able to tell the difference between list () and list() 15:41
pmichaud by the space
colomon woah.
pmichaud ng: say(3), 4, 5
p6eval ng f21362: 3␤
pmichaud ng: say (3),4,5
p6eval ng f21362: 345␤
ash_ okay, i thought you could have a space after the funciton name for some reason, but apparently not :P 15:42
mathw you can, but it means something else :)
pmichaud this is also what allows us to distinguish if 1 ... from if(1)
ash_ nods 15:43
pmichaud in detail...
say(3) is a postcircumfix on the 'say' function
say (3) is a circumfix (3) argument to the say listop 15:44
colomon nods
ash_ S03 under Comma operator precedence covers this apparently, i just missed some of the specifics, i'll re-read that section 15:46
well, some of this, not all of it 15:47
pmichaud it's mainly that postcircumfix operators don't have spaces
ash_ so, is S32-Containers list subroutine the correct definition then? 15:48
pmichaud looking 15:49
ash_: I think so, yes.
at least, it's correct as things stand today.
this is one of those areas that it wouldn't surprise me if we have a spec change at some point (thus my earlier comment thinking that perhaps the spec changed recently on this point) 15:50
ash_ well i added that since it wasn't in the spec that I could find, so i am just making sure I added the right thing 15:51
pmichaud phenny tell TimToady S03:1996 looks wrongish... any clarifications you can offer? I thought array assignment was now mostly eager (even for iterators). 15:52
...ENOPHENNY?
oh well, TimToady will see it in backscroll :)
colomon what would "mostly eager" mean? 15:53
pmichaud "mostly eager" (defined in S07) means that we iterate and fill in elements until we reach a point that we *know* will be infinite 15:53
moritz_ uhm. 15:54
pmichaud thus @a = 1..5; would not be a lazy assignment
moritz_ what about 1 ... $closure?
pmichaud afaik, that would tend to be eager also when assigned to an array
moritz_ even though we don't know if it might be infinite? 15:55
pmichaud correct 15:55
see S07, and S07:72
moritz_ that's... definitively not DWIM 15:56
pmichaud I think that depens on WYM :-)
*depends
colomon I'm with moritz_.
pmichaud the problem is with things like @a = (1, 2, foo(), @b) 15:57
moritz_ pmichaud: true :-). WIM is not an inifite loop, unless there's no other interpretation
pmichaud we wouldn't expect changes to @b to be reflected in @a
colomon but even if not... I don't want @a = 1...1000000 to create a giant array in memory unless it's actually needed. 15:58
KyleHa We had a metaoperator to making things synchronous or not recently, right? Can we have one to make things lazier or eagerer?
pmichaud colomon: then don't use assignment -- use a feed operator
moritz_ in my mental (which might be flawed and mental) model that works like this:
foo() is evaluated eagerly
pmichaud colomon: what you want is my @a = 1...1000000
er
colomon: what you want is my @a <== 1...1000000 15:59
pmichaud <== forces lazy evaluation 15:59
moritz_ and @b as the last item of the list is evaluated lazily...
and has a hook
which forces eager evaluation as soon as @b is modified
KyleHa: there are 'lazy', 'eager' and 'hyper' prefix operators
pmichaud moritz_: so, we have to keep track of all of the things that are referencing @b ? 16:00
colomon I would have that @b's iterator would be cloned for @a.
pmichaud colomon: you'd have to clone @b itself, not just its iterator 16:01
colomon sure.
moritz_ pmichaud: of all things that lazily reference @b, yes
something like @b[0] could be evaluated eagerly, and doesn't store a backreference 16:02
mind you, I have no idea if this is sane or not
pmichaud unless of course @b[0] is itself a lazy container :-)
moritz_ but that would be a different level
then @b[0] would have the possibilty for such hooks itself 16:03
pmichaud anyway, I'll simply say that this mental model doesn't match the spec. 16:03
moritz_ fair 'nough
pmichaud and if the spec is going to change again on this point, I hope it does so sooner and not later. It took a lot of work to even get to what we have now.
for the better part of a year, list assignment has been "mostly eager" 16:04
and the way to get lazy semantics is to use a feed
moritz_ and for the better part of a year, nearly nobody worked on laziness wrt list assignment
pmichaud false 16:05
pmichaud one of the reasons why it's taken so long is because the spec wasn't solidified until after rakudo had adopted a workaround 16:05
and patching the new spec into rakudo turned out to be a pain
more to the point, one of the reasons that list assignment is defined as "mostly eager" is precisely because of the work we did on trying to do laziness in list assignment 16:06
colomon I say implement it as S07 as it is, so moritz_ and I can see how it works in practice. :)
moritz_ stands corrected
pmichaud in particular, lazy list assignment definitely gives very surprising action-at-a-distance semantics
moritz_ aye, those should be avoided 16:07
pmichaud so, it was decided that list assignment should be eager (which matches what most people expect when they say @a = ...), and that if laziness is desired, it should be explicitly requested
a good example is that my @a = $file.lines(); # should not be lazy 16:08
moritz_ should my @a = lazy { $files.lines }; by lazy?
or does that only work in scalar context? 16:09
colomon I think this just emphasizes my functional instinct that I don't want to use = that often. ;)
pmichaud I dunno, I haven't folded the 'lazy' function into my mental model yet
moritz_ ok
pmichaud my guess is that 'lazy' would return something that says "treat this as an infinite assignment" 16:10
colomon ah, that would be sweet. 16:12
sjn wonders what the ö-operator does 16:13
moritz_ sjohnson: Whatever you define it to be
erm, I meant sjn 16:14
sjn moritz_: I'm sure he does :)
pugs_svn r29567 | pmichaud++ | [pm.txt]: Another question for TimToady++. 16:15
r29567 |
r29567 | Pm-16: S03:1996 looks like a fossil, or at least inconsistent
r29567 | with S07:72. Any clarifications?
colomon just discovered that both his code and his test for that code are broken.
pyrimidine moritz_: Around? 16:57
ash_ on a completely unrelated note, parrot doesn't die like it used to when you run a ParrotThread from a hll 17:00
Tene ash_: I saw you mention that. Interesting. 17:21
takadonet Wow 13 commits yesterday on NG branch 17:23
pugs_svn r29568 | lwall++ | [S03] tweak definition of when a series operator is considered infinite 17:37
TimToady pmichaud: see ^^ 17:38
I'll be on the road soon, and out of touch for most of the day (incl phone call)
PerlJam TimToady: I think pmichaud was having trouble reconciling "arbitrarily lazy" with "mostly eager" (at least that's how it seems to me) 17:45
[particle]1 TimToady: noted 17:46
clintongormley TimToady: when you get bored with redefining Perl6, please feel free to turn LaTeX into something more readable :) 17:47
TimToady PerlJam: I just defined certain 1...{something()} arbitrarily as lazy always even in mostly eager context
PerlJam clintongormley: don't distract him! ;) 17:48
clintongormley PerlJam: you guys have had him for years already! 17:49
PerlJam and we like it that way!
clintongormley :)
PerlJam clintongormley: however, I could argue that TimToady has *already* done what you've asked. (See Perl 6 :-) 17:50
clintongormley PerlJam: yeah, now he's just fiddling 17:51
TimToady afk & # soggy fiddling^Wdriving, at least till SLO
PerlJam TimToady: be safe! 17:52
Tene rakudo master was updated to parrot trunk, but not ng? 18:21
pmichaud yeah, TimToady's tweak doesn't really answer my question. :-| 18:26
oh well.
Tene tests cherry-picking from master 18:27
pmichaud: Good to see you around again.
pmichaud Tene: glad to be around again.
(finally)
although I did need the break.
Tene Yeah, it works with the patch from master 18:29
well, compiles, at least.
pmichaud has parrot 2.0 released?
Tene Yes.
pmichaud hmmm, I didn't see the email commit for it yet.
Tene I'll run a spectest first. 18:30
pmichaud anyway -- yes, ng should bump PARROT_REVISION to 2.0 when available 18:31
Tene pmichaud: If I push this to ng, it will fail on older parrot, so you'll have to update. s'okay?
ash_ 2.0 was put up earlier today/last night
pmichaud Tene: I don't quite understand ("fail on older parrot") 18:32
Tene Hmm. There are some spectest failures, but I'm not sure if they're from this patch or not. 18:33
pmichaud let's just say that until we cut the jan release of rakudo, our PARROT_REVISION should be Parrot 2.0.0
Tene I should push this, then. 18:36
pmichaud wfm
PerlJam pmichaud: wrt TimToady ... what I was going to say earlier was that I don't think S03 is inconsistent with S07 in intent, but maybe the prose could be made a little better. S03:2002 (was S03:1996) is clarified in the 3rd sentence IMHO and that seems to match what S07 says.
pmichaud PerlJam: except it doesn't (match) 18:37
"mostly eager" would seem to imply that it doesn't suspend upon just any ol iterator 18:39
e.g.
my @a = $file.lines(); # lazy or eager? 18:40
clearly $file.lines() returns an iterator, here.
PerlJam I would say lazy. 18:41
pmichaud you would? so then
my @a = $file.lines(); my $b = $file.get(); say @a[0]; # which line is it?
PerlJam the first line because the .get is lazy too :) 18:42
pmichaud no
Tene "mostly eager" obviously means that it eagerly reads half of the lines, and then reads the rest lazily.
pmichaud it's not :-)
and even ickier:
PerlJam heh, there's a reason I'm not the language designer here :)
pmichaud my @a = $file.lines(); say @a[4]; say $file.get(); say @a[5];
I think the whole idea of "mostly eager" was to avoid this sort of "action at a distance" 18:43
Tene pmichaud: get is a method call on the same object as you called lines on. It's feasible that $file keeps internal state to remember what's going on.
pmichaud Tene: the question is about the contents of @a 18:44
not about the filehandle.
PerlJam I wonder what would happen if you forced laziness: my @a = lazy $file.lines(); # assuming that's the proper syntax. 18:45
pmichaud that would be
dalek kudo/ng: a440e06 | (Solomon Foster)++ | (3 files):
Get master working with Parrot HEAD. Patch from Vasily Chekalkin.
pmichaud my @a <== $file.lines();
Tene I probably should have tweaked that commit message :) 18:46
pmichaud in that case I think it's explicit that we expect @a to be action-at-a-distance
PerlJam pmichaud: Is what I wrote the same as what you wrote?
(do they behave the same)
pmichaud PerlJam: I don't know, I haven't folded the 'lazy' syntax into my mental model yet. But I suspect that 'lazy' returns some sort of iterator that says "treat me lazily" 18:47
pmichaud in that case, 'lazy' is modifying the assignment (i.e., it's exercising the "not mostly eager" part of list assignment) 18:47
pmichaud however, I don't think that every iterator automatically implies lazy semantics 18:47
in particular
pmichaud nm 18:48
bad example
PerlJam notes that S04 is the only place that mentions the lazy keyword.
There are no code examples.
pmichaud anyway, handling 'lazy' doesn't seem problematic to me... it just means we return something that says "I should be lazily evaluated" 18:49
the question is more about list/array assignment itself; i.e., the default semantics
Tene *huh*. I guess maybe I didn't realclean after cherry-picking that commit. It worked before, but after a realclean and rebuild, ng now fails to build for me. 18:50
pmichaud looks like the 2.0.0 commit is r43487, yes? 18:52
PerlJam did anyone ever figure out what's going on with this?
rakudo: my @a = List.new(1,2,3); say @a.perl;
oops 18:53
p6eval rakudo 726b83: []␤
PerlJam ng: my @a = List.new(1,2,3); say @a.perl;
p6eval ng f21362: [(1, 2, 3)]␤
pmichaud looks like .new isn't marking the List as a flattening object
PerlJam has no idea what that means, but hopes that it helps whoever was working on this (ash?) 18:54
pmichaud we have to mark objects as "flatten in list context" 18:55
so, for example
my @a = 1,2,3;
my $b := @a;
my @c = (@a, 4, 5); @c.elems := 5
my @d = ($b, 4, 5); @d.elems == 3
@a is flattening. $b is non-flattening. 18:56
oops
I forgot my #'s
my @c = (@a, 4, 5); # @c.elems == 5
my @d = ($b, 4, 5); # @d.elems == 3
Tene Okay, I think that's all. Realcleaning to confirm. 18:57
PerlJam ng: my @a = List.new(1,2,3); say @a.WHAT; say @a.perl; my @b = 1,2,3: say @b.WHAT; say @b.perl; 19:00
p6eval ng a440e0: Confused at line 1, near "my @b = 1,"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (src/stage0/HLL-s0.pir:328)␤
PerlJam ng: my @a = List.new(1,2,3); say @a.WHAT; say @a.perl; my @b = 1,2,3; say @b.WHAT; say @b.perl;
p6eval ng a440e0: Array()␤[(1, 2, 3)]␤Array()␤[1, 2, 3]␤
PerlJam ng: my $a = List.new(1,2,3); say $a.WHAT; say $a.perl; my $b = 1,2,3; say $b.WHAT; say $b.perl; 19:01
p6eval ng a440e0: List()␤(1, 2, 3)␤List()␤(1, 2, 3)␤
PerlJam bah, I don't remember
pmichaud right, the difference is that List.new(1,2,3) isn't coming back flagged as a flattening object 19:02
whereas 1,2,3 is a Parcel, and Parcels always mark themselves as flattening
Tene So, is there any spec on exactly what 'fail' outside of a sub should do?
pmichaud Tene: yes. 19:03
it should be caught by an outermost handler of some sort
Tene What should be done with it at that point?
pmichaud I don't remember -- I just know that it's been discussed. I think it made it into the spec (but might be misremembering that part) 19:04
ash_ I am not sure how you'd fix @a = List.new(1, 2, 3); the correct thing should be that @a[0] == 1, @a[1] == 2 etc
right?
Tene I'll look again sometime.
pmichaud ash_: that's part of what I'm working out now
Tene Need to go do $realwork now.
dalek kudo/ng: d0de156 | tene++ | src/binder/bind.c:
Missed one include to update to callcontext
ash_ pmichaud: okay, cool
pmichaud TimToady++ suggested that we flag all objects that flatten in list context, but I'm wondering if it's better to flag the things that don't flatten. 19:05
Tene Okay, ng builds again for me, so I don't *think* those need to be reverted, but please feel free if I'm mistaken.
pmichaud tries out the updated ng
Tene You'll need to update parrot, too. 19:06
pmichaud shouldn't PARROT_REVISION be doing that for me?
Tene Could be. I don't use --gen-parrot
pmichaud looks like it didn't get bumped.
Tene i think it's set to the commit after the callcontext merge, not to 2.0.0 19:07
pmichaud setting
looks like whoever bumped it last time also incorrectly left the 1.9.0
ash_ pmichaud: should @a = list(1, 2), list(3, 4); == ((1, 2), (3, 4)) ? Just curious, I am not sure how you'd know the difference between when to flatten the argument into @ or when to make @ with an element in it 19:08
pmichaud ash_: no, that would end up being [1,2,3,4] 19:09
a List flattens in list context
PerlJam Is smash not doing the release? 19:11
pmichaud I think smash and I decided that we'll move him to a different month, since this release is "weird" 19:12
so I'll do the release myself
or I'll re-delegate to whoever happens to be around when we think it's ready to release :)
PerlJam march doesn't have a volunteer. 19:13
pmichaud ah, that sounds like a good time 19:13
PerlJam (and I find it curioius that the release guide stops at march :)
pmichaud we just haven't pushed it farther into the new year yet :)
pmichaud ick, ng branch gives me lots of failures now 19:15
it didn't do that yesterday 19:16
Tene I looked at a few of them. lexical_subs dies because it uses fail outside of a sub.
pmichaud I get lots of failures throughout the spectest base 19:16
lisppaste3 tene pasted "spectest failures in ng" at paste.lisp.org/display/93651 19:18
pmichaud yeah, that's roughly the set I'm seeing.
Those weren't failing yesterday.
Tene No? I remember seeing roughly that for a while now. 19:19
pmichaud were you always building against parrot trunk?
if so, that would be why.
they weren't failing against 1.9.0
Tene No. Without those patches I just pushed, it can't even compile against trunk
pmichaud I mean, have you been building against trunk when you saw those other failures? 19:20
Tene I was using parrot_revision, I thought. if that disagrees with your experience, I was probably doing something wrong or misremembering.
pmichaud checks.
Tene If so, feel free to revert it, and I'll re-apply and work on fixing the failures tonight. 19:24
pmichaud I probably won't revert. we know we need the ng branch to build against 2.0.0 19:26
it's just that those failures have to be classified as "new failures" due to 2.0.0, and not existing failures
dalek kudo/master: 1d49284 | duff++ | docs/release_guide.pod:
[docs] Add tentative release dates through the end of 2010
19:28
pmichaud ...right. ng branch as of f21362 (i.e., yesterday) passes all spectests. 19:30
(i.e., "make spectest" doesn't return any failures) 19:31
Tene pmichaud: even t/spec/S06-advanced_subroutine_features/lexical-subs.rakudo passed on ng as of yesterday? 19:34
pmichaud yes. 19:35
Tene that should die on line 45
The test is broken.
pmichaud nopaste.snit.ch/19310 # spectest results in ng branch as of yesterday 19:36
why is the test broken? 19:37
Tene it calls 'fail' outside of a sub
pmichaud that's not an error.
Tene It is in current ng. Even if we do have a global error handler, are you suggesting that it should resume from the exception? nothing after a 'fail' shohuld be run. 19:38
pmichaud are you saying that $! should be true there? 19:39
Tene ng: say 'a'; fail 'b'; say 'c';
p6eval ng d0de15: a␤No exception handler and no message␤current instr.: '&fail' pc 14523 (src/builtins/Junction.pir:202)␤
Tene pmichaud: Ah, right, lexical eval stuff worked, so it didn't call fail. 19:40
Got iy.
pmichaud right.
Tene ><
ash_ isn't the fail only called when its not 'ok'
Tene ash_: Yes, as I just said.
pmichaud anyway, after looking at things a bit further I'm about 50% certain that cherry picking the rakudo master patches for 2.0.0 into the ng branch isn't correct or sufficient 19:41
a lot of the binding code is substantially different between the two, iiuc
Tene nods 19:42
pmichaud otoh, rakudo does at least build when the patches are applied, so....
Tene I'll read through it tonight, if nobody gets to it before me.
pmichaud I'm not sure what to do here.
I'm checking to make sure that rakudo master runs with parrot 2.0.0, at any rate. 19:43
Tene Personally, I'd prefer to have visible signs that it's broken and needs to be fixed RSN.
pmichaud agreed
but since I was planning to spend the next couple of days working on list assignment and the like, I'd prefer not to be blocked 19:44
colomon Tene: imagine my surprise to discover I checked something into ng while I was out getting my hair cut.
Tene Is the lexical eval failure going to block you? Or just confidence from spectests?
pmichaud confidence from spectests. a lot of tests fail that I think shouldn't fail.
Tene I vote to revert, then.
I'll work on it in a local branch.
colomon pmichaud: I didn't bump the 1.9.0 when I bumped the Parrot revision because it wasn't actually 2.0.0 when I did it. Should I have deleted the 1.9.0 bit instead? 19:45
pmichaud colomon: yes.
colomon pmichaud: noted.
pmichaud we only put the 1.9.0 there when the revision number is the exact revision of the release 19:45
the 1.9.0 says "parrot 1.9.0 as released is okay also"
in case the parrot build doesn't contain the revision number
Tene pmichaud: I'll push a revert commit.
colomon I think moritz_ tried bumping parrot revision for ng over the weekend and ran into the same sort of problems you guys are seeing now.
colomon I don't know if he ever found a solution for them, I presume note. 19:46
pmichaud Tene: okay, wfm
colomon *not
dalek kudo/ng: 3881a5a | tene++ | (3 files):
Revert updates for Parrot 2.0.0 for now.
19:52
ash_ maybe mention it to #parrot to see if they can give some insight? if we can track down a specific issue that is
pmichaud specific issue is that ng branch doesn't build/run with parrot 2.0.0
ash_ oh, what was it building with for the stuff Tene did? a part of 1.9.0? 19:53
colomon I think over the weekend someone suggested it had something to do with the return value from eval?
but I was very busy with other stuff at the time, and may have misunderstood. 19:54
pmichaud ash_: parrot 2.0.0, but it gets a variety of spectest failures that aren't present when running against 1.9.0
ash_ i guess what i meant to say was can we track down a specific cause for the spectest failures in 2.0.0 with the cherry picked patches needed for ng to build against trunk parrot 19:57
colomon ash_: ? I believe the changes to make ng compile with parrot 2.0.0 are too simple to help, and there aren't any changes yet to make it work... 19:59
pmichaud actually, I just recalled that there may be other changes needed that didn't get cherry picked
specifically, the interface for accessing contexts changed also
i.e., some things that were using the keyed interface were switched to use getattribute (or vice-versa, can't remember which atm) 20:01
pmichaud if that's the issue, we can't directly cherry pick the patch from master (because the source files are substantially different), but it's not a hard change to locate and make 20:02
I might try that in a second (phone now)
colomon sorry, if I wasn't clear, the patch from master is trivial -- just PARROT_REVISION bumped, and signature changed to context in four places, two of them comments. 20:05
sjohnson netsplits verboten 21:20
cognominal rakudo: class A { has $.a = 10 } ; my $a .= new(); say $a.a
p6eval rakudo 1d4928: ( no output ) 21:21
cognominal ng: class A { has $.a = 10 } ; my $a .= new(); say $a.a
p6eval ng d0de15: sh: ./perl6: No such file or directory␤
ash_ cognominal: i think you forgot an A 21:24
ng: class A { has $.a = 10 } ; my A $a .= new(); say $a.a
p6eval ng d0de15: sh: ./perl6: No such file or directory␤
sjohnson hi ash 21:26
cognominal I thought that the point of the .= operator was to omit the type when instanciating 21:27
sjohnson which implementation is ng? 21:28
cognominal it is a new implementation branch forked from rakudo, once it will be mature enough it will land back to the main branch 21:29
Tene sjohnson: rakudo's development branch
sjohnson Tene: o
cognominal In the mean time neither branch is very satisfying :)
PerlJam conventional wisdom is that ng will become master within one week or so. 21:30
pmichaud $x .= y is just a shortcut for $x = $x.y
just like $x += 2 is a short cut for $x = $x + 2
ash_ cognominal: for .= new you'd need to have the variabled typed, like my A $a .= new() translated to my A $a = A.new(); 21:31
pmichaud the variable doesn't have to be typed, it just has to be initialized to the protoobject 21:32
i.e., my $a = A; $a .= new; also works
(typing a variable initializes it to the protoobject)
cognominal thx, I as confused
ash_ yeah, true, pmichard can explain it better than me, listen to him
PerlJam still, my A $a .= new; should work. 21:35
pmichaud I think there's a problem with .= in ng branch 21:35
PerlJam From the error, I'd guess that there's a problem initializing $a with A() in my A $a; 21:36
ash_ is there a reason eval bot dies when you define a class in the master branch? 21:36
pmichaud ng: my A $a; say $a.WHAT;
p6eval ng d0de15: sh: ./perl6: No such file or directory␤
cognominal ng: say "hi!" 21:37
p6eval ng d0de15: sh: ./perl6: No such file or directory␤
pmichaud > class A { has $.a; }; my A $a; say $a.WHAT;
Mu()
PerlJam++ ftw
bartolin hello all
ash_ waves 21:37
PerlJam something is brokenish with p6eval. It's taking a long time to regen the perl6 executable. 21:38
ng: say "oof"
p6eval ng d0de15: sh: ./perl6: No such file or directory␤
PerlJam It's been that way for more than 10 minutes
rakudo: say "oof"
p6eval rakudo 1d4928: oof␤
PerlJam oh, I guess the ng branch is broken due to the recent updates of PARROT_REVISION, etc. ? 21:39
ash_ how does p6eval make ng? shouldn't it be using --gen-parrot?
PerlJam ash_: wish I knew 21:40
pmichaud oh, I bet the revert caused problems.
when the 2.0 update was put in, it updated to Parrot 2.0.0, which fails
ash_ does anyone know how to access it? i don't have that kind of permission
pmichaud then when it was reverted, p6eval is still using 2.0.0, because it's >= the current PARROT_REVISION
ash_ those silly >= that might need to be = : P 21:41
pmichaud well, in general we want >=
p6eval is a bizarre case, as is the case of reverting a PARROT_REVISION change
ash_ yeah, sure, in general
pmichaud it might not matter soon -- I think I may have a patch to get ng working with 2.0.0
spectesting now. 21:43
PerlJam who runs p6eval?
pmichaud in general, I think moritz++ handles it
ash_ ah, well, if pmichaud++'s patch doesn't fix it, we can bug him when he's around next 21:45
cognominal what's new with Parrot 2.0.0? 21:51
pmichaud argggh, my patch didn't fix it.
looks like I'll have to track this one down a bit further. 21:52
PerlJam cognominal: www.parrot.org/news/2010/Parrot-2.0.0
pmichaud ugh, looks like a lexicals problem.
cognominal thx
pmichaud or an eval() problem 21:59
ash_ i think colomon said that when they tried to move ng to trunk parrot over the weekend they came to the conclusion the it was an eval issue 22:01
colomon That's what I thought they said. 22:04
For some mysterious definition of "they".
Maybe chromatic or somebody like that? Not one of our Rakudo "regulars". 22:05
PerlJam wonders what a "rakudo regular" is
colomon irclog.perlgeek.de/perl6/2010-01-17#i_1907489 22:06
PerlJam cognominal: note that chromatic did the Dec release for rakudo :)
pmichaud eval doesn't seem to be able to even parse.
PerlJam er, s/cognominal/colomon/ 22:07
colomon PerlJam: Someone whose name I see often enough that I think of them as a person instead of a random login.
(often enough on #perl6)
chromatic being the exception that proves the rule, or something.
pmichaud oh, maybe it can't parse phasers.
colomon anyway, that link is the snatch of conversation I was remembering.
and bacek was the mysterious person whose name I didn't remember. 22:08
ash_ okay, completely off topic but when i think if phasers i think of star trek
colomon possibly referring to conversation on #parrot. 22:09
ash_: that's completely intentional.
PerlJam doesn't recall a STUN block in the Synopses 22:10
;)
pmichaud eval() is failing to parse "my $x = 3;"
although it's able to do "my $x" 22:11
pmichaud sees how to track this down 22:12
pugs_svn r29569 | wayland++ | I suggest that these changes constitute an implementation (in POD) of Richard Hainsworth's 22:13
r29569 | suggestion
bartolin I'm totally new here, but I've got a question. 22:17
pmichaud ohhhh ick ick ick ick
bartolin I hope it's neither too silly nor does it disturb you.
The question is: Can I write something like
class Chessplayer { has Array of Int @.old_ratings; }
I want to make sure that "old_rating" are integers and nothing else. 22:18
pmichaud bartolin: it'd be { has Int @.old_ratings; }
the @ already means "Array"
Tene bartolin: array of array o fint?
Yeah.
bartolin Ahh!
Tene pmichaud: ick ick ick?
bartolin Thanks a lot!
pmichaud my @ns := $outer_ctx<current_namespace>.get_name;
contexts no longer support the hash interface 22:19
guess I'll pir:: this one
Tene That would do it.
sjohnson so tene... hows it going? 22:22
bartolin Hrm. I tried class Chessplayer { has Int @.old_ratings; } but this doesn't work: 22:22
my $player = Chessplayer.new( old_ratings => [2200,2150] );
if gives: Array assignment type check failed; expected Int, but got Array 22:23
pmichaud I'm not sure that will work.
[2200,2150] isn't declared as an Array of Int -- it's an Array of Object
(yes, this is a weird section of the spec at the moment) 22:24
bartolin Aha.
PerlJam seems to work fine in ng ;)
pmichaud PerlJam: maybe because it's not doing parameterized type checking
bartolin So there is (ATM) no easy way to declare an Array of Int (for "old_ratings")? 22:25
pmichaud declare, yes, assign, no.
bartolin Ahh, okay. Thanks a lot for the explanation! 22:26
pmichaud although you might try old_ratings => (2200,2150)
although I suspect that fails to bind for the same reason
bartolin Oops. I thought, I tried that before asking. But it gives no error. I have to test it in detail ... 22:28
bartolin pmichaud: Thanks a lot. old_ratings => (2200,2150) seems to work for me. 22:35
pmichaud yay, down to just two errors in ng (using Tene++'s patch)
oh wait, more than two 22:36
still, much closer than before
jnthn is back 23:05
frettled in black? 23:11
frettled I was thinking about trying to explain how the (slightly delayed) January release of Rakudo is important because it's going to be based on ng (it still is, right?), but I'm kindof stuck; it's easy to say that it's a rewrite to make it easier to actually implement the spec, but, uhm. Hm. 23:13
That's what I get for not being more involved in Rakudo myself. :)
frettled I guess what I'm struggling with is generating positive buzz. 23:16
pmichaud I'm planning to issue an announcement in a couple of hours 23:17
the main reason for the regression is that we've had to refactor a lot of rakudo's internals in order to properly implement the spec 23:18
sjohnson hi frettled
pmichaud yay, ng now passes on parrot 2.0.0
jnthn January release is haz a delay? 23:19
pmichaud++ # yak shaving so we can run on 2.0.0
pmichaud jnthn: yes, I've decided to push the release back up to a week to give a little bit more time to see what can be done with the ng branch
I was leaning that way already, concensus on #perl6 this morning was that this approach made more sense
also I don't see a strong reason for releasing another old-master Rakudo since not much has changed there 23:20
someone who really wants the more complete version can just get Rakudo #24
jnthn pmichaud: OK, but I highly doubt ng will be really ready *that* far ahead of the February release.
pmichaud oh, my plan is to make ng the new master within the week
jnthn That's too optimistic. 23:20
pmichaud even if it's a significant regression. 23:21
jnthn Then why do it?
pmichaud because otherwise I'm afraid we're stagnating a bit.
jnthn I agree it *has* to be before the Feb release.
pmichaud well, I had been thinking it *has* to be before Jan release
I'm not sure I want to push back to Feb.
frettled pmichaud++: oh, passing on parrot 2, that's nice!
jnthn: the catch-phrase «release early, release often» comes to mind ;) 23:22
colomon is thinking there will be much working like crazy to get ng ready in the next week.... 23:23
frettled sjohnson: oh, hai, forgot about you (sorry)
pmichaud several people have commented to me that we should go ahead and make the ng branch into master
jnthn pmichaud: On their own heads be it.
ash_ jnthn if you know of anymore bugs i can help with let me know
frettled I think it's good to do so now, because it gives us more time using it.
pmichaud I think I should have list assignment working tonight. 23:24
frettled My argument is a bit weird, but it's based on one kind of typical human behaviour: we use what's the "standard", follow the flock. 23:25
pmichaud frettled: right, I think we'll all have a bit of extra incentive on things if we go ahead and bite the bullet now
pmichaud if it doesn't work, I'm willing to take the blame. 23:25
frettled Bonus for you guys who work on ng: I believe that making the ng branch master a bit early will lead to more feedback. 23:26
pmichaud well, as long as we don't thrash around handling the "feature XYZ used to work but doesn't work" sorts of comments 23:26
frettled :D
pmichaud: I'm sure you'll get a bunch of nice masakbugs. 23:28
jnthn ash_: I noted a test yesterday...I think it was S02-builtin-data-types/anon_block.t
colomon I do wish we had proto fully working, or something like that, so we could smoke test the features people are actually using.... a lot of the spectests seem very obscure.
jnthn ash_: It may not be too much to make that one work.
frettled colomon: yeah, that would help a lot, too. 23:29
pmichaud one thing that would help is for people to find other files (e.g. release_guide, DOCS, etc) that have changed in the master branch and make sure they're up-to-date in the ng branch 23:30
ash_ jnthn: if your still doing role stuff, rt.perl.org/rt3/Public/Bug/Display.html?id=71554 has a patch i amde a while back that may or may not still be applicable
colomon do we have a list of what doesn't work in ng right now? I mean, the big things? 23:31
frettled pmichaud: so I should pull the current version now, and then I can compare with what I get afterwards. I'll do that, and if I can get my life sorted properly again, I'll chip in. :)
pmichaud colomon: I'll probably start making a list as soon as I have the already know big things out of the way 23:32
those being: list assignment, hashes, various grammar-related items
colomon is there still the mucked up dispatching of operators? (er multis in general?) 23:33
pmichaud I'm guessing yes, but what's mucked up?
jnthn ash_: Thanks.
pmichaud: Remember that Parrot issue that is a bug but isn't a bug?
colomon what jnthn says.
pmichaud chromatic has that fixed in parrot trunk, I think.
or is about to have that fixed. 23:34
doesn't help for the current ng, now.
*no.
jnthn OK.
colomon pmichaud: make the list somewhere we can all edit it? :)
pmichaud colomon: that's what git is for :-)
colomon Off to orchestra now, looking forward to finding out what happens while I am out. :)
pmichaud or if we need non-rakudo committers to be able to edit, then do it on the github wiki
let's just do it on the wiki for now, then 23:35
pmichaud creates a page
frettled \o/
pmichaud wiki.github.com/rakudo/rakudo/ng-ma...res-needed 23:36
feel free to add to the list
jnthn pmichaud: I'm happy to take on the last one of those, but not today. :-) 23:38
pmichaud jnthn: that's fine 23:39
just pushed updated ng to github
ENOPHENNY
pmichaud Tene: you don't need to work on the context conversion for 2.0.0 in ng branch -- already took care of it (was mostly dealing with lexical and outer context issues) 23:40
pmichaud okay, time for a short break, then list assignment. 23:40
ash_ ng: say 'test?' 23:43
p6eval ng d0de15: sh: ./perl6: No such file or directory␤