perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | ~280 days 'til Xmas
Set by mncharity on 18 March 2009.
moritz_ amoc: en.wikipedia.org/wiki/Sic 00:00
amoc oh-
moritz_ jnthn: if you want to make both masak and me happy, you could look into RT #63902 tomorrow ;-) 00:01
amoc moritz_: TimToady: thank you very much !
moritz_ you're welcome 00:03
bed time for me
amoc moritz_: *good night*
jnthn moritz_: Noted, thanks. 00:04
00:16 fridim_ left 00:20 pmurias joined 00:23 Kisu joined 00:24 nihiliad joined
cspencer rakudo: sub foo($x:) { say "x = $x" }; foo(2) 00:35
p6eval rakudo c26021: OUTPUT«error:imcc:syntax error, unexpected IDENTIFIER ('self')␤ in file 'EVAL_19' line 53␤»
jnthn fail 00:36
std: sub foo($x:) { say "x = $x" }; foo(2)
amoc it emits segmentation fault ;
p6eval std 25938: OUTPUT«ok 00:04 37m␤» 00:37
jnthn Damm, I can't steal an error from STD.pm. ;-)
cspencer heh :)
jnthn cspencer: File Rakudo bug, shouldn't be too hard to make that a better compile time error.
cspencer will do :) 00:38
jnthn finally finishes captioning his holiday photos 00:40
00:40 pmurias left 00:43 eternaleye joined
amoc std: my ::MySig ::= :(Int, Num) 00:51
p6eval std 25938: OUTPUT«##### PARSE FAILED #####␤Malformed my at /tmp/uc83UjfXWK line 1:␤------> my ::MySig ::= :(Int, Num)␤ expecting any of:␤ horizontal whitespace␤ morename␤ multi_declarator␤ typename␤ whitespace␤FAILED 00:02 34m␤»
amoc '~';...?
jnthn std: ::MySig ::= :(Int, Num) 00:52
p6eval std 25938: OUTPUT«ok 00:02 36m␤»
amoc ow?
jnthn That is syntactically OK
But dubious
Since :: implies does Abstraction and AFAIK Signature does not. 00:53
amoc search'ed' what afaiks stands for 00:54
i see
jnthn sorry 00:56
iutma
amoc '~' it seems really dubious 00:57
jnthn Did you see it in a synopsis somewhere? 00:58
::MyType ::= Int for example I would expect to work...
amoc perlcabal.org/syn/S02.html#Names_and_Variables 00:59
rakudo: ::MyType ::= Int 01:00
p6eval rakudo c26021: OUTPUT«Could not find non-existent sub infix:::=␤current instr.: '_block14' pc 61 (EVAL_17:40)␤»
amoc rakudo: ::MyType := Int
p6eval rakudo c26021: RESULT«Int»
cspencer if i were to write the 'lc' method as a P6 method, would the best way to do it be as an inline PIR? 01:01
01:01 orafu left
cspencer i don't see an easy way of figuring out the lowercase of all possible characters... 01:01
jnthn cspencer: Yes, as inline PIR 01:02
There will be a Parrot opcode to do it.
cspencer ok
yep
downcase, i belieive
jnthn rakudo: ::MyType := Int; my MyType $x = 42; say "ok"; $x = "OMG"; say $x;
p6eval rakudo c26021: OUTPUT«ok␤Type mismatch in assignment.␤current instr.: 'die' pc 15960 (src/builtins/control.pir:204)␤»
jnthn yay
cspencer: I think somebody even did a similar op recently. 01:04
cspencer oh, it's already implemented in rakudo? 01:05
jnthn erm, built-in doing a string op, that is.
cspencer: I don't know that lc is
cspencer ok
jnthn I meant somebody had done another Str method in the setting that used a PIR opcode.
cspencer i don't think that lc is done from the looks of it
ah ok
jnthn The implication being that you could glance at it if you need inspiration. :-) 01:06
cspencer i just did a couple Any-num ones
jnthn Nice.
cspencer heh, gotcha, ok :)
amoc thinks starting with synopsis are not so easy, i should go here and there to get terms meaning. 01:08
s/ i / he /;
01:10 orafu joined
jnthn amoc: The synopses are specifications more than tutorials and as such can be hard-going at times. 01:11
amoc yes, i know, heh >_< 01:12
cspencer jnthn: ah yes you're right, someone had done a P6 Any.uc method :)
jnthn Dares you to do ucfirst as well. ;-) 01:17
cspencer i believe i already did a week or so ago :)
jnthn cspencer: Oh, nice. Was it applied? 01:23
cspencer it was indeed
jnthn Great. 01:24
cspencer how do i squash the last two commits in my git tree down to one patch? 01:26
jnthn is a git n00b 01:28
git format-patch?
cspencer hah, i'm a noob myself 01:29
ah, got it 01:30
gravity git-rebase can do it as well 01:31
You can even search its manpage for "squash" :-)
avar thinks squash should be called "stomp"
jnthn I actually have come to admire git overall though, even though it still feels a bit magical at times. 01:32
cspencer gravity: i think the problem was that i was trying to squash the master branch back down into the master branch 01:33
so i just branched master, reset master and merged the branch back in
01:37 wknight8111 left 01:41 xinming_ left 01:43 xinming joined 01:45 gbacon joined
amoc noobs 01:49
01:49 alester joined
amoc std: my ::MyType ::= :(Num, Str) 01:51
p6eval std 25938: OUTPUT«##### PARSE FAILED #####␤Malformed my at /tmp/AiLUEhuRlW line 1:␤------> my ::MyType ::= :(Num, Str)␤ expecting any of:␤ horizontal whitespace␤ morename␤ multi_declarator␤ typename␤ whitespace␤FAILED 00:02 34m␤»
gravity nods 01:52
amoc rakudo: my ::MyType ::= :(Num, Str)
p6eval rakudo c26021: OUTPUT«ResizablePMCArray: Can't pop from an empty array!␤current instr.: 'parrot;Perl6;Grammar;Actions;typename' pc -3015048 ((unknown file):-1)␤»
jnthn ewwwww
amoc can't pop empty array (..@_@) 01:53
rakudo: ::MyType ::= :(Num, Str) 01:54
jnthn amoc: It's a fail in the guts.
p6eval rakudo c26021: OUTPUT«too few arguments passed (0) - 2 params expected␤current instr.: '_block14' pc 40 (EVAL_18:28)␤»
jnthn I know where.
amoc than, should it be to rakudobug? 01:57
jnthn Please. 01:59
I can't really guess why it's giving that error.
02:02 SamB joined
cspencer do rakudo regexes support the :g global matching adverb? 02:18
i can't quite figure out how to get the syntax right 02:19
jnthn rakudo: my $x = "xxx"; say $x.match(/x/, :g).perl; 02:21
p6eval rakudo c26021: OUTPUT«Match.new(␤ # WARNING: this is not working perl code␤ # and for debugging purposes only␤ text => "x",␤ from => 0,␤ to => 1,␤)␤»
jnthn Hmm.
cspencer ah, ok. i was trying various forms of the $str ~~ m:g/x/
jnthn cspencer: I suggest looking through the .match method for clues, I think I remember something in there... 02:22
I think we don't support adverbs out front like that yet.
cspencer will do, thanks :)
jnthn should sleep 02:24
02:24 disismt joined
jnthn I think I've been shifting a timezone a night for the last few days or something... 02:24
cspencer that'd take its toll eventually :)
jnthn It always hits me on a Sunday morning, when I'm meant to be at church for 9:30am...
cspencer heheh
jnthn And I seem to remember I volunteered myself for...something...this Sunday. 02:25
Anyway, night
02:26 Tene_ joined
cspencer good night :) 02:26
dukeleto rakudo: say 1i.roots(2) 02:28
p6eval rakudo c26021: OUTPUT«Statement not terminated properly at line 1, near ".roots(2)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
02:30 cspencer left
amoc jnthn: good night! 02:31
02:32 ced-2 joined 02:33 alc joined
pmichaud2 good morning, all. 02:35
er, good evening.
amoc pmichaud2: good morning/evening :) * 02:37
02:37 pmichaud2 is now known as pmichaud, Tene left 02:44 ced-2_ left 02:51 unobe joined 02:56 Porsbo left, Porsbo joined 03:05 alester left 03:09 cspencer joined 03:12 FurnaceBoy joined
pmichaud anyone know of any blockers for the rakudo release? 03:15
lambdabot pmichaud: You have 2 new messages. '/msg lambdabot @messages' to read them.
pmichaud @messages
lambdabot moritz_ said 11d 6h 35m ago: I hope I addressed all your concerns with the built-ins in Perl 6. If so, please close the tickets
moritz_ said 1d 10h 38m 37s ago: if you want to do some rakudo publicity, you could answer www.perlmonks.org/?node_id=751341
pugs_svn r25939 | lwall++ | [STD] improve error message on unsupported multiple type constraints 03:21
frooh pmichaud: hey, s1n and I were wondering if you could give us access to the hosting space of dallas.p6m.org? 03:24
pmichaud I don't have it hosted anywhere yet -- I just registered the domain. 03:27
I can host it somewhere, yes.
frooh if you don't mind it would be helpful
pmichaud or if you have somewhere you'd prefer to see it hosted, we can do that.
frooh I know you are on vacation at the moment
pmichaud it'll be a day or two before I can do that.
frooh either is cool with me
whichever is easier for you 03:28
pmichaud I'm off-vacation now; just got back about 6 hours ago.
frooh ah, well no rush either way
but just when you get a chance it would be nice if we had some for of site that multiple people could use
maybe a ....web .... sit
site*
:-)
also form* 03:29
also we should talk at some point about when you want to do your "hacking on rakudo" dry run
obviously the limiting reagent (afaik) is s1n as he has school stuff etc 03:30
03:40 bacek left 03:43 nihiliad left
meppl good night 03:54
03:55 meppl left
cspencer rakudo: my $s = "hello"; say $s ~~ "h" 03:56
p6eval rakudo c26021: OUTPUT«0␤»
cspencer hmmm...does the RHS have to be a regex? 03:57
pmichaud smart matching against a string asks for equivalency 04:07
rakudo: my $s = 'h' ~ 'ello'; say $s ~~ 'hello'; 04:09
p6eval rakudo c26021: OUTPUT«1␤»
dalek kudo: 80344fd | pmichaud++ | docs/ChangeLog:
More ChangeLog updates for release #15.
kudo: 44e1496 | pmichaud++ | build/PARROT_REVISION:
Bump PARROT_REVISION for release testing.
04:40 orafu left, OuLouFu joined 04:48 disismt left
Tene_ jnthn: ping 05:16
05:31 FurnaceBoy left 05:42 lucs_ left 05:50 justatheory left 06:09 ejs joined
amoc may i just test something - 06:09
std: IO.^modules.perl
p6eval std 25939: OUTPUT«ok 00:02 34m␤»
06:12 r0bby_ is now known as r0bby 06:37 ejs left 06:53 ejs joined 06:54 DemoFreak joined
amoc std: say $?PARSER 07:14
p6eval std 25939: OUTPUT«ok 00:02 35m␤»
amoc std: say $?PERL
p6eval std 25939: OUTPUT«ok 00:02 35m␤»
07:30 mberends joined 07:31 mberends left, mberends joined
moritz_ std: 1 ?? 2 << 3 :: 4 >> 5 !! 6 07:42
p6eval std 25939: OUTPUT«##### PARSE FAILED #####␤Obsolete use of << to do left shift; in Perl 6 please use +< or ~< instead at /tmp/UDssTgFOrQ line 1:␤------> 1 ?? 2 << 3 :: 4 >> 5 !! 6␤FAILED 00:02 34m␤»
07:45 bacek_ left
moritz_ perl6: say 1 ?? << 3 :: 4 >> !! 6 07:46
p6eval elf 25939: OUTPUT«Unknown rule: infix:conditional␤It needs to be added to ast_handlers.␤ at ./elf_h line 2841␤»
..pugs, rakudo 44e149: OUTPUT«3::4␤»
08:03 disismt joined
mberends moritz_: good morning! here is a new site for you to browse: autoexec.demon.nl:8080/home/rakudo/...Basics.pod except the port is actually 2080 to avoid being botted ;) 08:16
moritz_ mberends: will do in a few minutes, have to run now
mberends np 08:17
08:21 ejs left 08:35 drbean joined
moritz_ mberends++ 08:35
one minor nit: multiple code blocks separated by newlines should be joined to one block
mberends yes, agreed, it's a todo for me. 08:36
08:41 viklund joined
moritz_ oh, and it should ignore =for vim :-) 08:43
see for example S13
but it's way cool
08:43 amoc left
viklund *sigh* while cleaning up the perl5 part of proto I almost made it OO... 08:57
or rather, it is, but not explicitly
09:00 bacek joined
moritz_ what's *sigh* about it? do you dislike OO? 09:01
viklund I didn't plan on it... 09:02
I guess I don't think the current solution is elegant enough 09:03
well, well, at least it's now possible to use proto to install rakudo inside parrot...
09:08 ejs joined
bacek good evening 09:09
perl6: my $c = \( A => 'b', C => 'd'); my $C = |$c; say $C 09:10
p6eval pugs: OUTPUT«CaptSub {c_feeds = [:MkFeed {f_positionals = [::], f_nameds = [(C,[:"d":]),(A,[:"b":])]}:]}␤»
..elf 25939: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 125) line 4.␤ at ./elf_h line 5863␤»
..rakudo 44e149: OUTPUT«too many arguments passed (3) - 2 params expected␤current instr.: 'infix:=' pc 14184 (src/builtins/assign.pir:15)␤»
bacek perl6: my $c = \( A => 'b', C => 'd'); my $C = |$c; say ~$C 09:11
p6eval elf 25939: OUTPUT«Undefined subroutine &GLOBAL::prefix__124 called at (eval 126) line 4.␤ at ./elf_h line 5863␤»
..pugs: OUTPUT«CaptSub {c_feeds = [:MkFeed {f_positionals = [::], f_nameds = [(C,[:"d":]),(A,[:"b":])]}:]}␤»
..rakudo 44e149: OUTPUT«too many arguments passed (3) - 2 params expected␤current instr.: 'infix:=' pc 14184 (src/builtins/assign.pir:15)␤»
bacek It suppose to say "d", isn't it? 09:12
moritz_ is it? 09:14
09:16 jedai left 09:18 ejs1 joined 09:25 ejs left 09:35 meppl joined, Sepheebear joined 09:52 alc left 09:55 zamolxes joined 10:01 DemoFreak left 10:04 masak joined
mberends masak: HAI! you do not need to frig with netcat today. the pod server is online at autoexec.demon.nl:8080/home/rakudo/.../Server.pm except that the port is 2080 to throw google and yahoo bots off the scent. 10:05
masak tries
mberends the entire filesystem is browseable so please don't quote the exact url publicly. 10:06
The server is single threaded and response times are several minutes for some documents, so please don't open docs in multiple tabs at the same time.
you can see how the Synopses currently render in /home/rakudo/pugs/docs/Perl6/Spec but check the file sizes locally before fetching anything. S26 (72KB) took 1.3GB RAM died after 8 minutes. S01 S07 and S10 - S31 are reasonable. 10:07
masak pmichaud, jnthn: hate to do this on a release day, but November is blocking on [perl #63978]. I guess we could work around it if it's not fixed before the release, but I haven't looked into yet how difficult/hackish that would be. 10:08
mberends: kudos. 10:09
mberends: looking forward to playing around with Perl 6 SVG on the web in the same way.
mberends yes, I was hoping to incorporate SVG already but the tuits (round) are low. 10:11
masak mberends: how's the weekend look?
I think I can throw in a first implementation of Druid board rendering then. 10:12
10:12 ejs2 joined
mberends quite a lot offline, but I'll be able to pull Druid updates and hopefully put that online as well. 10:13
next week no $work, therefore @play !
masak YaY! 10:14
speaking of @play, here are the fruits of yesterday evening's hacking at home: github.com/masak/druid/blob/master/...me-rules.t 10:16
Test::Ix is a little bit cooler now, with optional "fixture" setup/teardown.
the syntax pleases me. there are still some restrictions with the test framework that I don't like, but overall it's very nice to work with. 10:17
Text::Ix uses introspection to figure out how many arguments to send to the test subs. 10:19
10:22 ejs1 left 10:23 ejs1 joined
mberends runs 'proto install druid' to see 10:25
masak the tests already made me brave in refactoring some stuff. 10:27
Druid is still suffering from behaving in a way appropriate to when it was a script, not a set of classes. 10:28
mberends that's good progress then
masak yes, and fun too. 10:29
I have a great new idea for a computer player that I want to try. but I'm making myself write these tests first. 10:30
mberends spoken like a true TDD convert 10:31
masak I guess... :)
though it also makes me slightly disappointed when tests pass right away.
10:32 ejs2 left 10:33 ruoso left
moritz_ do you think it's ok to apply pir-to-perl6 patches before the release, if they pass all tests? 10:34
cspencer++ submitted one that looks nice
masak moritz_: I think so. 10:35
mberends thinks so, if 'all tests' means spectests
masak they do, I'm sure.
moritz_ aye 10:36
masak: re release blocker, you should respond to pmichaud's p6c mail 10:38
masak moritz_: good idea. 10:39
pugs_svn r25940 | moritz++ | [t/spec] tests for RT #63978 10:44
masak moritz_: did you notice that [perl #64014] lacked the actual code that fails? on top of that, I suspect it is a dupe. 10:50
mikehh rakudo (44e1496) builds on parrot r37609 - make test/make spectest PASS 10:51
moritz_ masak: yes, I already replied... (I hope)
masak: and I'm vaguely remembering a similar ticket 10:52
masak ok, good. looking on RT instead, since the email route is so slow.
viklund masak: proto is now almost I 10:54
s/I/OO/
moritz_ masak: RT #61838 is similar, but not quite identical
viklund sighs
(again)
masak viklund: oh?
you've pushed something? 10:55
moritz_ no, it's identical
masak moritz_: ok :)
viklund yep, almost all subs take config_info as their only argument...
masak pulls
gotta go in, like, 5 minutes.
viklund doesn't like globals 10:56
since Alva is playing on the floor, I might have to go at any time
masak viklund: is File::Path included in standard Perl? 10:57
moritz_ rakudo: if 5 > my $a = 4 { say $a }
viklund it was referenced from 'perldoc -f mkdir' so I guess so
p6eval rakudo 44e149: OUTPUT«Unable to set lvalue on PAST::Val node␤current instr.: 'parrot;PAST;Val;lvalue' pc 566 (src/PAST/Node.pir:161)␤»
moritz_ corelist File::Path
File::Path was first released with perl 5.001
viklund ;)
masak viklund: anyway, looks good. thanks. 10:58
I'll look more closely at it in the weekend.
viklund it's a start at least
10:58 ruoso joined
masak o/ 10:58
10:58 masak left 10:59 ruoso left, ruoso joined 11:05 OuLouFu is now known as orafu 11:07 orafu left
Matt-W Morning 11:11
11:11 orafu joined
jnthn hi allo 11:12
.oO( where'd that o come from )
Matt-W who knows? 11:14
some future version of English?
jnthn So...we had release? 11:15
Matt-W not seen anything on any blogs... 11:16
jnthn oh, just saw p6l message
Regarding bug 63978 11:18
I will fix this now before the release.
Have a fix, spectest'ing. 11:39
Matt-W woot 11:54
pugs_svn r25941 | jnthn++ | [t/spec] Unfudge eval in class test. 11:56
11:58 disismt left, disismt joined
dalek kudo: 977b948 | jnthn++ | src/builtins/control.pir:
Fix eval crash when eval is used inside a class.
11:59
kudo: cba1557 | jnthn++ | docs/ChangeLog:
Add a few more bits to the ChangeLog.
12:12
kudo: 9a08c4f | (Cory Spencer)++ | (5 files):
Added inline PIR versions of Any.pm's lc, ceiling, floor and round to the P6 Any.pm class.

commit 59873f07aa08081cc2d5e915ce309d733935cb54 Author: Cory Spencer [email@hidden.address] Date: Thu Mar 19 18:19:21 2009 -0700
   Added an inline PIR P6 version of lc
commit 65b75d2b6266adaae8caac230cc55462467c8c0c Author: Cory Spencer [email@hidden.address] Date: Thu Mar 19 16:06:26 2009 -0700
   Add inline PIR versions of round, ceiling and floor
commit 9a873239e9a0fb86d4d11dc2f141d6081d2e1a23 Merge: 8592d17... f8b6aee... Author: Cory Spencer [email@hidden.address] Date: Thu Mar 19 14:28:57 2009 -0700
   Merge branch 'master' of git://github.com/rakudo/rakudo
Signed-off-by: Moritz Lenz [email@hidden.address]
12:29
12:30 pmurias joined
ruoso hi pmurias 12:31
jnthn moritz_: Oy! I was just smoking those. :-P
moritz_ jnthn: hah, I was faster ;-)
jnthn :-P
ruoso just hates how svn takes ownership on my machine when doing an update of a big repository that wasn't updated for a long time...
moritz_ git++ 12:32
pmurias ruoso: hi
ruoso pmurias, I finished nagc... I thought at first to put native capture inside the "native" module 12:33
but I changed my mind... we need capture earlier...
jnthn moritz_: Any thoughts on how best to test rt.perl.org/rt3/Ticket/Display.html?id=63958
moritz_ svn up also restores files that are deleted in the working copy... so it has to check the whole repo recursively, not just the updated parts
ruoso moritz_, and I can't even update it... 12:34
jnthn (just assign it to you is a valid answer ;-))
ruoso it complains about a lock of some sort... asks me to run cleanup
moritz_ jnthn: there you go ;-)
ruoso I run cleanup, nothing happens, try to update and it still shows me the same error... *sigh* svn--
moritz_ jnthn: but it wont be before monday
jnthn moritz_: OK, thanks.
That's fine...I just want to make sure we get something in so we don't regress on it. 12:35
Matt-W jnthn: I could only get it to work with actual individual files
ruoso pmurias, so we might have the native capture with the placeholder message at start
jnthn Matt-W: Yeah. I recreated your example here.
Matt-W jnthn: glad it's not just me :)
jnthn Matt-W: Thanks for the good bug report.
ruoso pmurias, then we replace the message later...
pmurias how will we extract data from it then
Matt-W jnthn: took a while to figure it out but it's usually worth the effort
jnthn Matt-W: I have a fix, I'm just running it through make spectest to ensure no collateral damage (low probability).
pmurias (if it has a placeholder message)
Matt-W jnthn++
jnthn Yeah, the example pinpointed the issue very well. Matt-W++ 12:36
Matt-W jnthn: that's going to make my life a lot easier
ruoso pmurias, it is still an object with an RI... so it needs to support MESSAGE somehow...
better have it as the placeholder than leaving null
jnthn Matt-W: Is this a duplicate: rt.perl.org/rt3/Ticket/Display.html?id=63866 ?
Matt-W jnthn: I have another bug which seems to be some sort of infinite loop trying to call a subroutine, but I haven't pinned that down yet
jnthn (Duplicate of rt.perl.org/rt3/Ticket/Display.html?id=63958, that is) 12:37
Matt-W jnthn: no, that's a different bug
oh no
it's not
damn
I didn't know masak had filed that 12:38
jnthn It's fine, your reproduction instructions were easier.
Matt-W yeah but I should have stuck them on that ticket
oh the bright side
you get to close two tickets!
moritz_ rakudo: class A { has $!a; submethod BUILD($obj) { $!a = 3 } }; A.new 12:39
p6eval rakudo 9a08c4: OUTPUT«Null PMC access in getprop()␤current instr.: 'infix:=' pc 14182 (src/builtins/assign.pir:21)␤»
Matt-W (Null PMC access)--
my least favourite error
ruoso 's machine still owned by svn-- 12:40
moritz_ most rakudo bugs manifest as Null PMC access
Matt-W moritz_: that's why I don't like it, because I see it so often
pmurias ruoso: do native types need to be implemented before p6gc? 12:41
ruoso not really
actually
it does
ruoso missing cofeee 12:42
pmurias, it only requires capture, actually...
pmurias, capture, interpreter and lost - that is
finally... svn released my machine... 12:43
pmurias, in fact, native could be implemented after mold... 12:46
and mold doesn't require p6gc as well
12:47 Patterner left
pugs_svn r25942 | ruoso++ | [re-smop] re-order list of modules 12:47
ruoso pmurias, see r25943 12:48
pugs_svn r25943 | ruoso++ | [re-smop] we actually dont need the LOwlevel STate machine... mold can be up soon enough...
12:48 Psyche^ joined 12:49 Psyche^ is now known as Patterner
pmurias ruoso: can't see any obvious errors in the list 13:03
13:03 skids left
pmurias lunch/breakfast 13:03
dalek kudo: 2352fd0 | jnthn++ | src/builtins/eval.pir:
When we do a use, we need to make sure the recursive invocation of the Perl 6 compiler gets a clean @?NS, otherwise thigns start getting nested in namespaces in the non-pre-compiled case.
kudo: 8207372 | jnthn++ | (5 files):
Merge branch 'master' of [email@hidden.address]
ruoso pmurias, cool... I didn't made a specific note about where we replace the placeholder MESSAGEs... but I think it is in native itself...
pmurias, we need to think on how we can improve the RI DSL to support signatures... this is a major limitation we have today 13:05
pugs_svn r25944 | ruoso++ | [re-smop] Actually, p6gc only need to be implemented for p6opaque, all other s1p types can use nagc 13:11
Matt-W jnthn++ 13:18
pugs_svn r25945 | ruoso++ | [re-smop] thikning again, the call of the DESTROYALL method can be made from the DESTROYALL member of p6opaque. That means we only need nagc for now..
Matt-W jnthn: I even understand the code you wrote to fix the bug! 13:20
pmichaud good morning #perl6
moritz_ hello 13:21
jnthn pmichaud: Good morning :-)
jnthn is being all good and just doing small changes pre-release. ;-)
Matt-W jnthn: small but crucial 13:22
also perfectly-formed
moritz_ jnthn: if you want to do larger things: branches are easy ;-)
jnthn moritz_: Yeah, I know. ;-)
moritz_ ... but I don't object to bug fixes ;-)
jnthn I'm currently pondering 63170
moritz_ rakudo: class A { ... }; class A { has $.b }; say "alive"; 13:24
p6eval rakudo 820737: OUTPUT«Re-declaration of type A at line 1, near "; say \"ali"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
pmichaud I'm stll wanting to find a way to eliminate a lot of the 'if null' checks. 13:25
unfortunately I don't have one at the moment.
jnthn pmichaud: Given so many things use null to signal "doesn't exist"... 13:26
13:26 pmurias left
pmichaud oooh! maybe a dynop? 13:26
set_if_null $P0, $P1 # sets $P0 to $P1 if isnull $P0
jnthn pmichaud: What exactly do you want to achieve?
Oh!
pmichaud: You want to avoid a branch essentially? 13:27
pmichaud perhaps
although I guess we'd have to lookup $P1 at any rate, so it's not so great.
13:27 zamolxes left
jnthn Where are your main use cases for this? 13:27
pmichaud all of the places that we're having to install ifnull checks :-) 13:28
13:28 kane_ joined
jnthn It's probably a five-minute job for me to write you a dynop to do that. 13:28
pmichaud right.... but let me think about it just a bit more.
jnthn Sure
And, release first. ;-)
pmichaud it doesn't quite have that "yes, this fixes the real problem" feel abot it.
*about
moritz_
.oO( release first, think later )
13:29
jnthn pmichaud: Do you want me to not distract you for a while to do the release? Got some questions... 13:30
pmichaud release is simple... but I'll be getting a phone call here shortly that will distract me.
jnthn OK. 13:31
pmichaud so, ask questions, but I'll disappear in a bit.
jnthn rt.perl.org/rt3/Ticket/Display.html?id=63170
In here, if you pre-compile A.pm then it blows up while compiling A.
Saying the type B doesn't exist.
Which is correct. 13:32
However, if you use A, like is done here, it doesn't fail while compiling A in the same way.
moritz_ is it even allowed to do what masak wants do to there? 13:33
jnthn The obvious thing that comes to mind is that we perhaps need, when doing use (and thus require), to give a clean @?BLOCK
moritz_: It should fail in the same way it does in pre-compilation.
13:33 FurnaceBoy joined
pmichaud I think it's more than just a clean @?BLOCK, though -- don't we need a clean symbol table? 13:33
jnthn Well, that's what I pondered next. And that one is a bit more...painful. 13:34
pmichaud agreed, it is.
13:34 Kisu left 13:35 Kisu joined
jnthn Thing is, my $x; use Foo; where Foo then uses $x in its body without declaring it is probably also working as an up-shot of @?BLOCK being carried over. 13:35
So while that's not all of the solution, I think it has to be part of it. 13:36
pmichaud agreed.
jnthn But earlier today I fixed another bug.
Where when we did use we needed a clean @?NS (nested namespace stack)
And I'm getting a bit...well...uncomfortable about piling this lot in use/require.
pmichaud I wonder if we need to make everything lexical. 13:37
I suspected we might have to do that at some point anyway.
jnthn I was thinking that @?BLOCK etc became attributes rather than lexicals, and we created a new instance of the actions? Or does it not work like that?
pmichaud but since we didn't have a good way of inspecting lexpads/lexinfo (until your recent change), I wasn't pushing for it.
moritz_ is off for the weekend, have the appropriate amount of fun!
jnthn moritz_: You too! 13:38
pmichaud oh, it can also happen as attributes, yes. I don't know if NQP supports that yet.
jnthn Probably not, but it might not be hard to add.
pmichaud it's not hard to add -- PCT supports it already.
er, PAST supports it already.
so it's just syntax.
jnthn Right. 13:39
pmichaud and we can certainly bind/inline PIR things to get what we want.
jnthn True, but I don't think adding has $!x; to NQP is so bad.
And $!x for lookups
szabgab on the main page of Rakudo.org there is a link to documentation that actually links to how-to-get-rakudo 13:40
jnthn Don't really want to go down the road of accessor generation and so forth.
pmichaud agreed, I don't want to do that either. In fact, I'm only primarily interested in the $!x for lookups at the moment.
jnthn Ah, that's quite easy. :-)
pmichaud since there's not really any good class-generating code in NQP at the moment. It does recognize 'class Foo' as needing to create a Foo class... but getting has $!x to dtrt might be a bit tricky. 13:41
jnthn I wondered about that...
pmichaud brb
jnthn ok 13:42
Matt-W I would have thought that if you have my $x; use Foo; then inside Foo if you just say '$x' it wouldn't see that first $x - you'd have to say $::x or something.
pmichaud Let me review STD.pm to see how it's handling symbol tables at the moment and I can answer from that. 13:43
(which I'll have to do a bit later, but can put it on my todo list)
Matt-W Where does STD.pm live? 13:46
szabgab after I ran make spectest how can I run an individual test script ?
I thought I saw something on the web site like make test path/to/test but I cannot find it any more
and that make test path will actually run the whole make test 13:47
pmichaud szabgab: make t/spec/something/test.t
szabgab thanks, 13:48
pmichaud STD.pm is in pugs repo: svn.pugscode.org/pugs/src/perl6/STD.pm
szabgab actually I just ran ./perl6 t/spec/something/test.t
and that was also ok
pmichaud RT #64026 looks like a duplicate bug
szabgab so how do you have you development directories setup? do you have pugs checked out in a separate directory ? 13:50
jnthn pmichaud: I fixed 64026.
szabgab where do you write your new tests?
jnthn pmichaud: There was a dupe but it got merged into the ticket before I got to doing the fix.
pmichaud jnthn: excellent -- I didn't see a reply to 64026 yet which is why I brought it up (knew it was fixed)
ah... didn't see the merge.
(I'm catching up on email)
jnthn ah, yes
moritz - Merged into ticket #63978
pmichaud szabgab: I just write my new tests and test edits in t/spec directly
(within the rakudo directory) 13:51
no need for a separate checkout
to review STD.pm I generally use the http-link I gave above
for other stuff that is in pugs, I have a separate checkout of the pugs directory.... but I don't often need to do other things inside of pugs.
szabgab at a quick glance it seems there still seem to be a bunch of tests in the pugs tree outside the spec subdir 13:52
can I try to move them over?
pmichaud yes, those still need to be reviewed/migrated.
please do move them over.
szabgab actually I have been afraid of adding spec tests as they seem to be too serious 13:53
jnthn pmichaud: OK. Are you saying I should hold off on giving a clean @?BLOCK while you review STD.pm some more, or is that OK?
pmichaud jnthn: I suggest holding off for a day or so.
jnthn: but feel free to keep bugging me about it.
I will go ahead and look at it a bit later today
(phone)
jnthn Am, damm, I'd already determined it fixed the issue in the ticket and mostly smoked it. :-|
pmichaud if you already have it, and it smokes, feel free to commit. 13:54
jnthn OK.
pmichaud (off phone) 13:56
13:56 Exodist joined
jnthn pmichaud: The other thing I wanted to mention was GSOC and Rakudo. We should perhaps try and think of more tasks we could add. 13:57
To the list of suggested projects.
pmichaud agreed
I find it hard to come up with 10-week tasks that will be ripe 12 weeks from now, though. :-| 14:02
I'm definitely in favor of more spectest coverage
I'm also in favor of improved toolsets
for example, it might _really_ be nice to have an equivalent of Test::Harness that is written in p6.
a perl6pod implementation would be excellent, too.
(yes, I know there is one already... I'm thinking something a bit more fleshed out)
jnthn I think mberends++ has made some progress on that front.
Another thing I pondered is that there's a few built-in types that we don't have any support for at all yet.
Rat, Set, Bag, Blob, KeyHash, KeySet, KeyBag, Buf.
14:02 skids joined
pmichaud yes, some of those are good candidates, as long as they're not on our critical path 14:02
I suspect Rat will be critical path-ish
Buf too.
jnthn What do you mean by critical path-ish?
pmichaud that we'll want an implementation before the end of GSOC
jnthn But certainly, some of those can be done in relative isolation. 14:03
(As in, without having to first get a really deep understanding of Rakudo guts.)
pmichaud i.e., anything we suggest for GSOC needs to be something that we don't expect or want to be otherwise solved before the end of summer.
jnthn Do we have a need for Buf or Rat before then? 14:04
pmichaud I think it's likely that someone might.
14:04 cspencer left
pmichaud I know that we're going to have to fix up our numification semantics soon anyway 14:04
to handle the STD.pm refactor of numbers
jnthn OK
Even discounting Rat and Buf, I still think we can point to enough of the standard library to make a decent GSOC project. 14:05
pmichaud because STD.pm now parses Rats directly
jnthn S16 is somewhat more stable now too, as is the datetime stuff.
pmichaud another place that is big but a worthy candidate is portions of S09
so, what I'm thinking we need now is 14:07
(1) a big list of "things left to implement from the known spec"
(2) a refinement of that list that estimates when/where we expect the feature to be done
then we can do (3) things that are good GSOC candidates
i.e., an updated roadmap. :-)
jnthn Producing (1) would be a worthy exercise in itself. 14:08
pmichaud yes.
should we build one in the repo, wiki, or elsewhere?
maybe a page on rakudo.org ?
jnthn I think that having it in a place where it is quite visible is a good thing.
pmichaud agreed
jnthn A lot of people like to know, what's left. 14:09
ruoso wonders if the smartlinks in the tests could help providing a semantic meaning on what's left
jnthn But yes, I'd really like to get a good sense of what is left.
Some synopses we're looking fairly good on.
S03 and S12, for example. 14:10
Others, like S09, I suspect are a very different story.
pmichaud I'll have a tests-by-synopsis summary here shortly.
(running my final make spectest prior to release now)
jnthn Aye, though I fear S09 is probably lacking tests too. 14:11
I was actually pondering making S09 the next thing I focus on. (Up to now it's mostly been S12.)
pugs_svn r25946 | szabgab++ | test for loop with two varibles
pmichaud S09 would have some good things to focus on, yes. 14:12
jnthn Some of it will be just plain evil to do, I've no doubt. 14:13
14:13 pmurias joined
jnthn pmichaud: Am I OK to commit stuff again now? 14:13
Or you want to make a tag first etc? 14:14
pmichaud not quite yet -- I still need to make a tag.
14:14 Porsbo left
jnthn OK, I won't push. 14:16
ruoso it would be nice to make a ratio of number of lines in the spec pod file vs number of tests related to it... 14:18
it should help seeing which specs are undertested.... 14:19
pmichaud I just need one last spectest run to finish, then I can commit+push.
pmurias ruoso:
pmichaud I'll then have to run an errand before making the tarball and announcement.
pmurias ruoso: re RI DSL the simplest thing which could work would be %method foo($invocant:$pos1,$pos2...) 14:20
jnthn pmichaud: OK, nice. :-)
ruoso pmurias, we can define a subset of the syntax to work... I think that's fine... 14:21
pmurias, but we should probably allow checking for native types
so %method foo(int $i) should do any .FETCH and .int it needs 14:22
actually, that'd be a good reason for having the LOwlevel STate machine
it woud
it would make such checkings easier than requiring a mold 14:23
because it could avoid most of the work if the capture is native and the argument is already native as well 14:24
pmurias do captures allow arbitary named keys 14:25
?
ruoso the current SMOP implementation only support idconst
pmurias and the spec? 14:26
ruoso but yes, capture supports arbitrary named keys
pmurias is it specced anywhere? 14:27
ruoso there's no spec on capture yet
ruoso should start it someday
szabgab rakudo: for 1..5 -> $x, $y { say "$x$y" } 14:28
p6eval rakudo 820737: OUTPUT«12␤34␤StopIteration␤current instr.: '_block14' pc 125 (EVAL_20:56)␤»
szabgab this prints the values before throwing exception
14:28 hercynium joined
szabgab my $str = ''; eval_dies_ok('for 1..5 -> $x, $y { $str ~= "$x$y" }', 'xx'); 14:28
pmurias ruoso: does the native capture type also need to suport arbitary named keys? 14:29
szabgab the above test does not seem to have 1234 in the $str at the end
ruoso pmurias, yes... as soon as we have them...
but we still don't have a Str type
so just saying "unsupported" if someone tries to use it with a non idconst seems fine 14:30
for now
pmurias what i'm most worried about are Array keys or user defined Foo keys 14:31
14:31 cspencer joined
pmichaud jnthn: Okay, release is now tagged -- feel free to commit away. 14:35
I have to run an errand -- I'll make the tarball and announce the release when I get back in about 50 mins. 14:36
(Have to go pick up my car from the shop)
ruoso pmurias, I think the standard hash assumes string for keys...
pmurias, I think the same can be said about capture 14:37
pmurias seems resonable
i think i'll write a utility set of hash routines so we can use them instead of a bsearch'ed sorted list 14:38
ruoso but that's a different beast, actually... because at this point we require idconst
dalek kudo: db1e872 | pmichaud++ | docs/ChangeLog:
Final ChangeLog for release #15.
kudo: f67507c | pmichaud++ | docs/release_guide.pod:
Release date and name updates.
kudo: e552334 | pmichaud++ | docs/announce/2009-03:
Text of 2009-03 release announcement.
pugs_svn r25947 | szabgab++ | for test 14:40
jnthn std: sub foo(:x($y)) { } 14:42
p6eval std 25946: OUTPUT«ok 00:02 36m␤»
14:43 justatheory joined 14:45 cspencer left 14:46 FurnaceBoy left
pugs_svn r25948 | szabgab++ | more for related test 14:56
14:59 [particle]1 left
pmurias ruoso: capture needs native integers to implement positional 15:00
ruoso pmurias, only inside MESSAGE 15:01
we can leave MESSAGE as a placeholder for now
and replace it in the "native" module
pmurias we would need to expose SMOP__NATIVE__capture_positinal(SMOP__Object* capture,int i) then 15:02
ruoso pmurias, yes... but that's ok 15:03
15:03 Tene joined
ruoso native types can have native interfaces 15:03
but we should probably just fix it to include interpreter as first arg
(doesn't it already?)
15:05 eternaleye left
pmurias yes it does 15:05
ruoso: we have to decide how will we keep the tests in module-name/t or module-name-tests 15:12
sorry
ruoso pmurias, I think we could have the sources as it is now...
pmurias got confused by scons copying files
ruoso but have a build/lib and build/t
then build/t/module/ 15:13
but just build/lib is ok
15:14 Tene_ left
pmurias build/lib is better as we would just have to set LD_PRELOAD_PATH to build/lib 15:14
ruoso LD_LIBRARY_PATH, you mean 15:15
pmurias yes 15:17
pugs_svn r25949 | pmurias++ | [re-smop] tests are build in build/t, libs in buil/lib 15:19
ruoso pmurias, what are the .os files created? 15:20
and why are them placed in the source dir instead of the build dir? 15:21
on a last point... the libraries should probable have a "smop-" prefix in their names
libsmop-nagc.so 15:22
libsmop-s0native.so
15:29 TimToady joined, diakopter joined 15:30 [particle] joined 15:32 nihiliad joined
pugs_svn r25950 | pmurias++ | [re-smop] .os files are no longer kept in the source dir, libraries are called smop-* 15:35
r25951 | pmurias++ | [re-smop] modules are build using a loop instead of a copy-and-pasted sequence 15:39
15:40 ejs1 left 15:43 ejs joined 15:45 jan_ left 15:48 [particle]1 joined, sri_kraih joined
pmurias ruoso: smop/nagc.h should automaticlly pull in smop/base.h? 15:53
TimToady pmichaud: STD doesn't have @?BLOCKS any more; it also doesn't implement 'use' yet, but when it does, the used code has its own scope lexically nested in CORE, and the only access it has to user scope is via COMPILING 15:56
well, I suppose CALLER also gets back to the user 15:57
15:57 sri_kraih_ left
TimToady but in any case, it can only get there via dynamic scoping, since files are like independent blocks 15:57
15:59 mberends left
TimToady in fact, we'd probably better be careful to warn if CALLER !=== COMPILING 15:59
which means that policy modules need to be careful not to violate that without explicitly delegating to their own COMPILING 16:04
alternately, we declare that when you call an import routine when you're not actively compiling, it will go and automatically delegate to the current COMPILING 16:06
maybe that's okay
16:06 [particle] left
szabgab std: for (1..5) -> $x, $y? { } 16:07
p6eval std 25951: OUTPUT«ok 00:02 36m␤»
szabgab std: for (1..5) -> $x, $y=7 { }
p6eval std 25951: OUTPUT«ok 00:02 36m␤»
szabgab rakudo: for (1..5) -> $x, $y=7 { }
p6eval rakudo e55233: OUTPUT«StopIteration␤current instr.: '_block14' pc 125 (EVAL_18:56)␤»
jnthn TimToady: Is [//] meant to short-circuit?
TimToady only to the extent that the list is lazily evaluated 16:08
szabgab so not only optional variables but also default values are ok in the for loop
TimToady szabgab: yes
jnthn szabgab: I woulda thought so.
TimToady btw, you don't need the parens
jnthn It's just a plain old signature...
szabgab std: for 1..5 -> $x, $y=7 { } 16:09
p6eval std 25951: OUTPUT«ok 00:02 36m␤»
szabgab ok, adding tests
pmichaud S03 says:
Similarly, list-associative operators that have the thunk-izing characteristics of
macros (such as short-circuit operators) lose those macro-like characteristics.
by the semantics of the list, not the semantics of C<||>.
You can say
[||] a(), b(), c(), d()
to return the first true result, but the evaluation of the list is controlled
(which agrees with what TimToady just said)
TimToady I do remember parts of the spec correctly, upon occasion :) 16:10
szabgab pmichaud, I think I did did not understood half of the words in that sentence :-)
jnthn So in that case we'd have called all of a(), b(), c(), and d() but if a()'s return value was true we'd not have evaluated the return values of b, c and d.
pmichaud jnthn: that makes sense to me, I think. :-) 16:11
szabgab but if that was the other discussion then I just crawl back to writing simple tests
TimToady it's possible the list may end up lazier than that, but it's same to assume they may all be evaluated
*sane
*safe rather 16:12
16:12 alester joined
pmichaud safe and sane? 16:12
jnthn tries to think if there's a sensible way to do factor out the short-circuit logic aside from writing an explicit prefix:[//] etc.
pmichaud well, note that infix:<//> needs to change to list precedence anyway
I don't know if rakudo has made that change yet.
s/list precedence/list associativity/ 16:13
jnthn pmichaud: Does that just affect the parsing?
pmichaud no
jnthn Or our ability to use def_or?
szabgab std: for 1..5 -> $x?, $y? { }
p6eval std 25951: OUTPUT«ok 00:02 36m␤»
pmichaud it affects more than the parsing, I think. 16:14
jnthn Hmmm...that (annoyingly) makes sense...
pmichaud at any rate, there needs to be an infix:<//> function that accepts a list.
and it would likely have the semantics you want for infix:<[//]>
pugs_svn r25952 | szabgab++ | test for loop with default value 16:15
jnthn erm, if infix:// takes a list now, is it then not equivalent to infix:[//]?
TimToady but you might have to call it with explicit {...} thunks
ruoso pmurias, hmm... maybe, as it uses things defined there... 16:16
jnthn erm
pmichaud afaict infix:<//> and infix:<[//]> are essentially identical
jnthn prefix:[//]
pmichaud er, yes, prefix:<[//]>
jnthn Ah.
That means...just install some extra tokens. :-)(
pmichaud with the possible exception of thunking semantics, as TT mentioned
TimToady rakudo: 1 / die "oops"
p6eval rakudo e55233: OUTPUT«oops␤current instr.: 'die' pc 15942 (src/builtins/control.pir:204)␤»
TimToady oops
pmichaud well, we also need to write those functions, as they don't exist yet.
TimToady rakudo 1 // die "oops" 16:17
jnthn oops ;-)
TimToady rakudo: 1 // die "oops"
p6eval rakudo e55233: RESULT«1»
pmichaud this also affects the infix:<//=> stuff you wrote... but I was going to clean that up later.
jnthn Yes, that's what I was just realizing. :-|
TimToady rakudo: prefix:<//>(1, die "oops")
p6eval rakudo e55233: OUTPUT«Statement not terminated properly at line 1, near ":<//>(1, d"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
pmichaud TimToady: yes, rakudo would presumably die on the prefix:<//> version (when we implement it) 16:18
TimToady rakudo: &prefix:<//>(1, die "oops")
p6eval rakudo e55233: OUTPUT«Statement not terminated properly at line 1, near ":<//>(1, d"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
pmichaud rakudo still doesn't understand the infix:<op> forms yet
TimToady so the right arg would presumably expect to be {...}
jnthn TimToady: We just don't parse thing:<...> yet
pmichaud TimToady: how would we distinguish {...} (a thunk) from some other sort of closure?
or do we assume that closures are intended to be evaluated? 16:19
and if someone wanted to return a closure they'd use { { ... } } ?
jnthn pmichaud: btw, can I commit again now?
pmichaud my $x = $y // { ... }; --> my $x = prefix:<//>($y, { { ... } } ); # is this right? 16:20
jnthn: yes, I thought I sent a note saying it was okay to commit
I had to rush out -- Paula was going to be late to work
jnthn: sorry about that if I missed it
TimToady I saw it
jnthn pmichaud: Ah, I missed it. 16:21
TimToady yes, it just runs one level of {...} if there
and people who accidentally feed closures to [//] can just lump it 16:22
pmichaud ..."lump it"?
TimToady hmm, maybe a west coastism
jnthn I think it's a postfix form of the prefix "screw" 16:23
TimToady might even be Valley Girl
pmichaud "take their lumps?"
TimToady don't know the derivation, offhand
pmichaud but the essential meaning is "too bad, so sad?"
TimToady *nod*
[particle]1 no, like it or lump it is old. like, wwii or earlier 16:24
pmichaud afaik, nobody said "lump it" to me while I was on the West Coast this past weekend. :-)
TimToady maybe I'm just too old :)
jnthn pmichaud: BTW, did you get chance to read in backscrooll my discussion with Tene about import?
Tene pmichaud: in #parrot
pmichaud jnthn: Not yet. I'm waaaaaay backlogged
szabgab std: for 1.. { } 16:25
jnthn It was recent backscroll, if that helps. ;-)
p6eval std 25952: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/2JwnyZ8Eg4 line 0:␤------> ␤ expecting parameterized block␤FAILED 00:02 35m␤»
szabgab std: for 1.. { }
TimToady see my remarks about that as well
p6eval std 25952: OUTPUT«##### PARSE FAILED #####␤Malformed block at /tmp/KD5yMtDdKJ line 0:␤------> ␤ expecting parameterized block␤FAILED 00:02 34m␤»
szabgab std: for 1..4 { }
p6eval std 25952: OUTPUT«ok 00:02 34m␤»
szabgab std: for 1..Inf { }
p6eval std 25952: OUTPUT«ok 00:02 34m␤»
dalek kudo: 4c90262 | jnthn++ | src/parser/ (2 files):
Support renaming of named parameters in the signature. This also takes us a couple of steps closer to STD.pm.
kudo: 703b36e | jnthn++ | docs/ (3 files):
Merge branch 'master' of [email@hidden.address]
pmichaud I'll check the backscroll in a bit. Have to get lunch for kids, finish publishing the rakudo release, and get some stuff back to rdice
Tene std: for 1..* { }
[particle]1 apparently dates back to 1833.
p6eval std 25952: OUTPUT«ok 00:02 34m␤»
TimToady my remarks about 1/2 hr ago
pmichaud TimToady: on #parrot or #perl6 ? 16:26
TimToady here
pmichaud okay.
Tene go to work.
szabgab Tene, so is 1.. invalied?
Tene szabgab: ENOCLUE
pmichaud TimToady: okay, read em. Your description matches what I was thinking might happen, so good. 16:27
jnthn szabgab: Yes. Maybe you meant 1...
szabgab I mean 1..Inf
TimToady std: (1..)
p6eval std 25952: OUTPUT«##### PARSE FAILED #####␤Please use ..* for indefinite range at /tmp/cdzMVl6A3Y line 1:␤------> (1..)␤FAILED 00:02 34m␤»
szabgab is that 1... ?
jnthn IIRC.
Or 1..*
TimToady see std's error message above
szabgab std: (1...)
pmichaud for 1.. { } is treating the block as the second argument to infix:<..>
p6eval std 25952: OUTPUT«##### PARSE FAILED #####␤Unable to parse parenthesized expression; couldn't find final ')' at /tmp/euiWWPVD0N line 1:␤------> (1...)␤ expecting any of:␤ prefix or noun␤ whitespace␤FAILED 00:02 35m␤» 16:28
TimToady I just said that!!!
szabgab you had only 2 dots :-)
TimToady oh, right
TimToady hangs head in shame, briefly
szabgab can I tell this in the club ? 16:29
TimToady they'll certainly buy the 'briefly' part...
jnthn Opinions: $*OUT.close; $*OUT.print("hello world"); # dies by default, of fails and only dies with use fatal in effect? 16:30
s/of/or/
pmichaud would it at least warn? 16:33
pmurias jnthn: what print return normally? 16:34
s/what/what does/
16:34 ejs left
szabgab std: for 1..* -> $x { say $x; last if $x == 6 } 16:34
p6eval std 25952: OUTPUT«ok 00:02 37m␤»
szabgab rakudo: for 1..* -> $x { say $x; last if $x == 6 }
p6eval rakudo 703b36: OUTPUT«Use of uninitialized value␤»
pmurias rakudo: say $*OUT.print("hi\n"); 16:35
p6eval rakudo 703b36: OUTPUT«Cannot write to a filehandle not opened for write␤current instr.: 'parrot;IO;print' pc -91335 ((unknown file):-1)␤»
[particle]1 tools/test_summary.pl needs a user story for when t/spec doesn't exist
szabgab rakudo: for 1..8 -> $x { say $x; last if $x == 6 }
p6eval rakudo 703b36: OUTPUT«1␤2␤3␤4␤5␤6␤»
jnthn =item multi print (*@LIST --> Bool) 16:36
Stringifies each element, concatenates those strings, and sends the
result to the output.
Returns C<Bool::True> if successful, C<Failure> otherwise.
Guess there's my answer.
[particle]1 perl 6: failure is always an option 16:37
TimToady What we've got here is...Failure to communicate... 16:38
pugs_svn r25953 | szabgab++ | testing infinite for loops 16:40
16:42 nihiliad left
TimToady ah, "lump" used to mean "sulk", and first use of "let 'em lump it if they don't like it" is in 1833 16:45
pmichaud lump: Linux, Ubuntu, MySQL, and Perl/PHP/Python? 16:46
TimToady and I'll bet "lump" is onematepoeic for the sound someone sulking makes when stomping around :)
16:46 jan_ joined
TimToady er, when did Ubuntu become a web server? 16:46
pmichaud :-)
it didn't, but it fit the backronym. :-) 16:47
16:48 birefringent left 16:54 Psyche^ joined
szabgab std: substr("abcd", 1|2, 2) 16:54
p6eval std 25953: OUTPUT«ok 00:04 36m␤» 16:55
szabgab rakudo: substr("abcd", 1|2, 2)
p6eval rakudo 703b36: OUTPUT«get_integer() not implemented in class 'Junction'␤current instr.: 'parrot;Any;substr' pc 12840 (src/builtins/any-str.pir:370)␤»
pmichaud I don't know if we have subroutine autothreading in place yet.
rakudo: 'abcd'.substr(1|2, 2).say
p6eval rakudo 703b36: OUTPUT«get_integer() not implemented in class 'Junction'␤current instr.: 'parrot;Any;substr' pc 12840 (src/builtins/any-str.pir:370)␤»
jnthn pmichaud: We do, but only for things written in Perl 6. 16:56
pmichaud okay, I guess that substr needs a signature to get it to autothread.
jnthn is moving various of IO.pir to IO.pm which will likely become class IO::File later. 16:57
szabgab I think the answer was no to the same question 3 days ago, I am just checking so I can add a test
pugs_svn r25954 | szabgab++ | test substr on junctions 17:01
17:06 maennj joined, maennj left
jnthn rakudo: $*OUT.print("hi") 17:07
p6eval rakudo 703b36: OUTPUT«Cannot write to a filehandle not opened for write␤current instr.: 'parrot;IO;print' pc -91335 ((unknown file):-1)␤»
jnthn wtf
szabgab rakudo: my $z = index(any("abcd", "qwebdd"), "b"); say $z.WHAT 17:08
p6eval rakudo 703b36: OUTPUT«Int␤»
szabgab rakudo: my $z = index("abcd", any("b", "c")); say $z.WHAT
p6eval rakudo 703b36: OUTPUT«Failure␤»
jnthn rakudo: $*ERR.print("hi") 17:09
p6eval rakudo 703b36: OUTPUT«Cannot write to a filehandle not opened for write␤current instr.: 'parrot;IO;print' pc -91335 ((unknown file):-1)␤»
jnthn rakudo: $*IN.print("hi")
p6eval rakudo 703b36: OUTPUT«Cannot write to a filehandle not opened for write␤current instr.: 'parrot;IO;print' pc -91335 ((unknown file):-1)␤»
Matt-W updates rakudo 17:10
17:10 Patterner left, Psyche^ is now known as Patterner, awarefish joined
Matt-W Looking forward to some bugfix goodness :) 17:10
17:11 kane__ joined 17:15 Southen joined
Matt-W Should pbc_to_exe really be using over 500MB of RAM? 17:18
jnthn :-O
Matt-W because it just did! 17:20
17:20 Southen_ left 17:24 schmalbe joined
Matt-W t/02-parseactions......1/9 invoke() not implemented in class 'Form::Field::TextField' 17:28
hmmm
17:28 justatheory left 17:29 kane_ left
jnthn Matt-W: New error or different one? 17:29
pmichaud it wouldn't surprise me if pbc_to_exe wanted 500MB of RAM. 17:30
it has to do a bunch of itty-bitty string concatenations.
Matt-W not sure
pmichaud like, around 5 million of them (at least) 17:31
Matt-W pmichaud: ow
the experience reminds me of using Epigram
only nowhere near as bad
maybe I should get some more ram for my laptop
jnthn pmichaud: I've worked out why $*ERR and $*OUT stopped working, at last...
pmichaud when Parrot has its buffered I/O fixed, we can eliminate a lot of the string concatenations.
Matt-W pmichaud: hurrah 17:32
pmichaud until then, the choice is 500MB of RAM or a 3-minute pbc_to_exe step.
so I vote for using the ram. :-)
jnthn pmichaud: Turns out for foreign objects in Perl6Scalar we really must !DEREF the invocant first.
pmichaud jnthn: yes. is method dispatch doing that already?
jnthn It is now. 17:33
pmichaud okay.
jnthn (Or will be after tests run and I commit...)
I've re-written some of IO into the setting.
pmichaud release tarball created, announcements posted.
jnthn And dealt with another ticket along the way.
Great!
pmichaud++
17:34 icwiener joined
pmichaud now we need a name for the April 2009 release :-) 17:34
jnthn Maybe it's time to go out of Europe?
17:36 [particle]1 left
pmichaud hmmm. I posted a story to rakudo.org but it doesn't appear anywhere. Same for the postings that jnthn++ has made. :-| 17:36
jnthn pmichaud: It is "there" 17:37
pmichaud yes, I see it in "recent posts" but it seems like it should be more visible.
jnthn See www.rakudo.org/tracker
But yes, I said to Andy a few days back that it'd be nice to have a "News" or "Blog" tab.
Which held the latest stories.
pmichaud it's okay with me if the news/blog stories appear on the front page -- beneath the initial text.
kinda like what parrot.org is doing.
jnthn That'd work for me too. 17:38
17:39 [particle] joined
jnthn hopes that starting to move IO into the setting will encourage others to join in with making it more S32-ish. 17:39
[particle] seems tools/test_summary.pl also fails ungracefully without ack installed 17:41
pmichaud that's possible/likely.
[particle] use App::Ack; # should fix that 17:42
and -e 't/spec' or die "run '$make testable' first!\n"; 17:43
pmichaud [particle]: patches welcome? ;-)
[particle] yeah, i've got a deadline, and it doesn't match with yours :) 17:44
pmichaud deadline? hmm?
jnthn What's one of those?
Gah. I broked a test. 17:45
17:48 nihiliad joined, mncharity joined, Kimtaro_ joined
mncharity moritz_: One thing it might be nice to have community action on would be creating a P6 version of JS.Class - Ruby OO in js. 17:49
jsclass.jcoglan.com/ github.com/jcoglan/js.class/tree/6c...ource/core 17:50
ruoso,pmurias,etal: What would be a good url(s) to point someone at to get someone started on "p6 oo, the implementation details". 17:51
?
ruoso mncharity, I guess it depends on the implementation
;)
17:51 M_o_C joined
dalek kudo: 83e060f | jnthn++ | src/builtins/guts.pir:
We need to !DEREF foreign invocants that might have got put in a Perl6Scalar.
17:51
mncharity feather.perl6.nl/syn/S10.html feather.perl6.nl/syn/S11.html feather.perl6.nl/syn/S12.html 17:52
ruoso: my fuzzy recollection is that there were nice smop pages, detailing p6 oo, in a way which was only implicit in the Snn...
pmichaud jnthn: we don't deref invocants that go through the .HOW interface? shouldn't we do that also? 17:53
ruoso mncharity, www.perlfoundation.org/perl6/index....mop_oo_api
jnthn pmichaud: I think if we're just using them inside Rakudo it's fine.
mncharity www.perlfoundation.org/perl6/index....mop_oo_api ?
ah, :) , thanks 17:54
ruoso www.perlfoundation.org/perl6/index....ementation
jnthn (fine not to deref, that is)
mncharity fyi, broken link on www.perlfoundation.org/perl6/index....mop_oo_api svn.pugscode.org/pugs/v6/smop/doc/I...quence.png
17:55 Kimtaro left
ruoso mncharity, interesting... I just clicked it and got the image 17:55
mncharity yeah, looks like a socialtext-ism 17:56
ruoso socialtext--
mncharity on ?smop_oo_api it shows up as a red unclickable link
ruoso that image is a bit inacurrate, actually.. 17:57
but the general idea is correct
mncharity re socialtext--, well, it's just not the ideal wiki for this particular job.
ruoso it tries to be too smart... 17:58
and fails badly
i.e.: why the hell does it map a double-click to edit the page?
doesn't it know that double-click is used to select a word, and after that, a line?
mncharity tries to find a www.perlfoundation.org/perl6/ password to add "image is a bit inacurrate, but the general idea is correct". no anon edits :( 17:59
17:59 awarefish left
szabgab given a junction $x, how can I find out what kind of a junction is that ? (any, all...) 18:00
[particle] szabgab: not yet specced or implemented, but discussed here yesterday 18:02
(unless i missed a spec commit message) 18:03
szabgab I could not find anything in the Spec
another question: given a junction can I check if it has the same type and values as another junction ?
ruoso mncharity, I've added the note about the image 18:05
mncharity ah, great. 18:06
18:08 Patterner left
jnthn szabgab: Maybe === will do it. 18:10
szabgab rakudo: say 1|2 === 1|2 ?? 1 !! 0
p6eval rakudo 83e060: OUTPUT«0␤»
ruoso szabgab, the bottom line is: you don't want to do that ;) 18:11
dalek kudo: 7b9f811 | jnthn++ | (3 files):
Start to move some methods in IO over to the Perl 6 setting, improving error handling to be more in line with S32 along the way.
ruoso szabgab, too many people was trying to using junctions as sets, so larry made it a bit less usefull for that purpose 18:12
skids szabgab: in the meantime a future-proof workaround is $junc.perl and pull the type out of the string.
ruoso and for the sake of testing, it should suffice
rakudo: (1|2).perl 18:13
szabgab for the type yes, but not for the values
p6eval rakudo 83e060: RESULT«"any(1, 2)"»
szabgab but it could come back as any(2, 1) too, right /
?
ruoso yes, but that's the nature of junctions
they are not sets
skids Right, the values you'd have to use .eigenstates
mncharity Ruby has a ruby oo on javascript implementation: jsclass.jcoglan.com/ github.com/jcoglan/js.class/tree/6c...ource/core . Shouldn't Perl6 have one too? www.perlfoundation.org/perl6/index....mop_oo_api It would be a great way for someone to learn P6 OO (and/or JS). 18:14
moritz_,etal: feel free to point at ^^^
:)
ruoso mncharity, It shouldn't be too hard to embed a js runtime in SMOP... 18:15
mncharity Thanks ruoso. :)
szabgab .eigenstates gives back the list of values in some random order
skids Yes but it's a list, and can be sorted.
ruoso szabgab, and it is a private method now
mncharity re embed, neat. what would be involved?
szabgab and it is not mentioned in the specs at all AFAIK
AFAICG 18:16
ruoso mncharity, reading up smop/base.h
and implementing a SMOP__ResponderInterface that would interact with js values
szabgab I was looking for that so thank
mncharity perlcabal.org/svn/pugs/view/v6/smop...mop_base.h ? 18:17
ruoso mncharity, pugsrepo/v6/re-smop/base/include/smop/base.h actually
mncharity, this one is prior to a refactoring we're doing...
look at the re-smop dir
szabgab but I cannot write a sub to compare two junctions passed as parameters as that sub will autothread . right? 18:18
mncharity perlcabal.org/svn/pugs/browse/v6/re-smop perlcabal.org/svn/pugs/view/v6/re-s...mop/base.h
ruoso szabgab, not if the signature contains Object
szabgab, it only autothreads if the signature contains Any or narrower
mncharity, that one... 18:19
szabgab sub xyz(Object $this, Object $that)
mncharity with js getting thread jit, performance might even be non-toy.
ruoso szabgab, yes
szabgab thanks, I'll try
ruoso mncharity, also... take a look at the lowdoc directory in re-smop
mncharity perlcabal.org/svn/pugs/browse/v6/re-smop/lowdoc
(we need a lambdabot hack for this...) 18:20
ruoso mncharity, there are a few other lowdocs in the original smop dir that weren't ported yet... but mostly are still up-to-date
18:21 Psyche^ joined, Psyche^ is now known as Patterner
ruoso mncharity, you'll need a few more tricks if you want to interoperate continuations... 18:23
I'm not sure if there is support for continuations in any of the js runtimes
18:25 maerzhase joined
ruoso mncharity, I seriously consider having modified versions of such runtime libraries to provide a smoother integration with SMOP... that's already planned for p5... 18:26
mncharity re continuations, there have been a couple of cps program transformers, and some patched implementations... I don't know what current state is. 18:28
skids ruoso: www.abrij.org/~bri/S17.tempurl.pod <-- my S17 scratchpad. Way in flux.
18:28 aalfred joined
skids Ignoring the rest of it, or not, I'd like your opinion on the Coroutine notes there. 18:28
pmurias mncharity: they don't have to be full continuations, smop uses "one-shot" ones
18:29 aalfred left
mncharity ah, ok 18:29
pugs_svn r25955 | pmurias++ | [re-smop] start of a rewrite of native capture 18:30
mncharity pumpkin. was fun. thnaks. &
18:31 mncharity left
ruoso skids, it's a big document... I'll need more time to read it... 18:35
18:35 |jedai| joined
skids I know just the Coroutines part was what I wanted input on (search for "=head2 Coroutines" ) 18:36
The rest of the stuff, well some of it is shall we say tenuous at best :-) 18:37
ruoso skids, Iterator is a more generic thing 18:38
it is not necessarly backed by code
it might be backed by a readonly lst 18:39
or by a data stream
a Coroutine is one of the possible backends for an Iterator
you can even think that Coroutine does Iterator
which makes much sense
skids OK, so terminology-wise, clean that up. 18:40
TimToady looks pretty crufty to me...
skids Do you think it fits in S07 though?
ruoso skids, I don't understand what $d = =$it:{("OH HAI")}; is 18:41
TimToady I do not yet believe in coroutines, so you're risking not being able to persuade me to believe in them
skids Iterate the iterator in $it, passing the "OH HAI" back to it.
If it is going to a yield statement, the yield returns "OH HAI" 18:42
ruoso TimToady, gather/take is kinda coroutines
skids If it is going to a take, then "OH HAI" ends up unshifted on the slurpy.
ruoso skids, hmm... that seems... weird
skids (or well, ("OH HAI") ends up unshifted on the @@slurpy)
ruoso skids, why don't you keep the reference to the lazy array you sent to the code that generated $i and push it there instead? 18:43
skids Basically makes coroutines and feeds interoperate.
I'll have to ponder that. 18:44
ruoso skids, take/yeld doesn't need to return any value 18:45
skids take doesn't. People that really like coroutines will want yield to do so.
TimToady when I say I don't believe in coroutines, I mean I don't believe in tying laziness to the sub call interface, since it's already a property of the incoming and outgoing types
pugs_svn r25956 | pmurias++ | [re-smop] added parts of capture i forgot to svn add 18:46
18:46 ced-2_ joined
TimToady and the low-level iterator interface is methods, not subs 18:46
skids I ditched the idea of having a sub that you could re-call for coroutine behavior pretty quickly. 18:48
TimToady or to put it another way, every sub is already potentially a coroutine if it returns a list
skids Just not compatible with MMD. This interface never has named coros.
TimToady more to the point, the way you pull values lazily in Perl 6 is with a lazy list, not with extra sub calls 18:49
skids That's nice, but it isn't the sum total of what coroutine folks expect. They don't just want to use these for lists.
ruoso skids, let's take each step on its own... 18:50
skids What I wrote there is a way to intergrate the list-focused perlish way, with a way touse them for procedural computing.
ruoso 1 - how to use coroutines with feeds
skids s/intergrate/integrate/ really, I can spell.
Oh that's a question? 18:51
ruoso A - gather/take solves that, you make a routine that has the gather in the body, receives a slurpy list as input
the feed will provide content for that list
gather will provide content for wherever the routine is being used
2 - how to inject new values in each iteration (besides the slurpy list) 18:52
A - I don't really see the point in it, but I suppose that could be implemented in a module later...
skids I understand that. The stripped-down coros constituted by a gather/take are just fine. It's a good api. 18:53
TimToady what we've got to teach people is that take is actually an event generator
skids That's kind of a reverse way of looking at what I wrote -- not the intent to "inject" values in a feed. 18:54
ruoso skids, the $i:{('OH HAI')} syntax seems to imply that
skids The intent is that if you are doing normal procedural coroutines, you can reuse your code as a feed in different circumstances.
ruoso skids, ah.. in that case, keeping a reference to the original lazy list really solves the problem 18:55
pmurias, I think the test for constant identifiers was supposed to be in s0native, wasn't it?
TimToady, we still need to figure out the main event loop api
skids ruoso: Like I said I'll have to play with that idea for a bit. 18:56
pugs_svn r25957 | pmurias++ | [re-smop] remove accidently duplicated test 18:57
18:59 ced-2 left
ruoso pmurias, I think the RIs that will need to have the MESSAGE replaced have to be exposed in the .h 19:01
and also, native types need the RI exposed so you can check if a value you received is of that type. 19:02
skids ruoso: by "solves the problem" which problem do you mean? 19:07
ruoso TimToady, I was thinking we could have a resumable control exception ControlExceptionWouldBlock that is then catched and install the event listeners for that continuation...
skids, you can already do that simply by pushing to the lazy array you sent to the routine in the first place
skids If you are using a coroutine procedurally, there is no such list. 19:08
ruoso er... why?
19:08 schmalbe left
skids It is being generated procedurally by the code calling the coroutine. 19:08
ruoso what is the problem in:
my @a <== some_lazy_thing; 19:09
my $iterator <== my_coro(@a)
my $item = =$iterator;
@a.push('value');
lambdabot Unknown command, try @list
ruoso my $otheritem = =$iterator;
skids Ah, OK, now I get your point. In other words, if you want a procedural coroutine, back it with an empty lazy list. 19:11
ruoso well... I didn't meant an empty list... 19:13
I meant something lazy
but an empty list might do the trick, depending on what you want
skids Sure some kind of lazy thing. 19:14
ruoso empty lists might want to be eager
but having sub my_coro(@a is ref) { gather { ...; take ...; ...; } } also solves it 19:15
skids But one with no actual value to/in it other than being used as the channel between the coro and the caller.
ruoso I think (@a is ref) also fits that purpose... 19:16
but you really seems to be wanting contextual variables
skids That may actually turn out OK. It will be a bit of an adjustment in that it is a bit even further away from the coro.resume(values back to coro yield) syntax than .<=>:some_adverb_with_values is. 19:17
Wel, the thing I suggested doesn't do compile-time type-checking either, just runtime. 19:18
ruoso skids, there's nothing fundamentally wrong with &coro.resume(1,2,3)
as long as &coro is not the actual sub you call the first time 19:19
you probably want to have something like...
my &coro = &actual_sub.new_invocation(); 19:20
my $a = &coro(1,2,3);
my $b = &coro(2,3,4);
the problem is not about coro per-se
the problem is about the idea of a symbol that changes its meaning in time... 19:21
skids I don't think we want to present coros as subs at all. It's a bad habit; I think Perl6 should break it.
ruoso even cleaner then...
but that doesn't need to be CORE
my $coro = Coro.new: sub { ... }; 19:22
my $a = $coro.resume(1,2,3);
my $b = $coro.resume(4,5,6);
a module can implement that later without any problems... 19:23
skids Sure. As long as we either have a "yield" statement or document the way to use take instead with the auxiliary lazy object. 19:24
ruoso skids, yield doesn't need to be a statement... 19:25
just as return isn't
it's just a sub
skids Is take a sub?
ruoso I think so...
pmurias, I think libsmop-capture needs to be linked against libsmop-nagc, doesn't it? 19:27
skids OK, then, should CORE have an empty lazy object that can .new(:{#anonymous_block}) so you can later call .Iterator on it? 19:30
And get an iterator that runs your anonymous block, perhaps loops it? 19:31
ruoso what's wrong with "for"?
for is lazy 19:32
skids Good.
ruoso for 1..* { } 19:33
skids If I were to write up "a how to use these things to write a traditional coro" section, would you like one for S07?
ruoso I'm not sure it would belong in S07
skids (oh but how do you push() to for?)
ruoso but maybe it is...
19:33 icwiener_ joined
skids S17 is going to be honing huge. It might be for the better. 19:34
s/honing/honking/
ruoso skids, you push to the input of for
skids isn't the input to for 1..*? 19:35
19:36 Kimtaro_ left, Kimtaro joined
ruoso skids, just use a lazy thingy instead 19:37
19:39 ced-2_ left, Kimtaro is now known as kimtaro, kimtaro is now known as kimtaro_ 19:40 kimtaro_ is now known as kimtaro
skids An array seems to make most sense. but like you said @a <== ($first, $call, $parameters) might decide to eager. IIRC there's no "lazy" keyword, just list context. 19:40
ruoso well... 19:41
actually...
that doesn't stop you from pushing to @a
and, nobody yet complained that S07 states that feed operators are strictly lazy 19:42
which means that @a <== (1,2,3) doesn't evaluate anything
but I'm pretty sure someone will tell me that feed should only be "mostly lazy" 19:44
skids So start circling the wagons :-)
Anyway, to another matter. @a <== ... generic lazy list iterator. unshift on that -- do you intend it just to cache, or is that going to do backfeeding to Iterator::Unshift stuff further up the line? 19:47
ruoso please ellaborate... my head hurts right now... it's kinda hard to think... 19:48
TimToady feeds are not required to backfeed 19:49
think Unix pipes
ruoso ah..
a feed only deals with the Iterator role
which means it only uses prefix:<=>
(as a method, that is) 19:50
skids Yes, but if the feed feeding @a does allow backfeed, will @a try to, or will it just store the values you put in there?
19:50 icwiener left
ruoso the feed operator will not pass the actual container from one side to another 19:50
it will consume from the right side, and send to the left side
it really works like unix pipes 19:51
TimToady arrays are capable of unshifting
skids speaking specifically of the "generic lazy list" iterator, not the feed operator. Basically the Iterator::Unshift stuff is confusing me because I do not know whether those are going to use it.
ruoso Iterator::Unshift is just a declaration of a subset of API 19:52
every Array does Iterator::UnShift
the feed operator doesn't use Iterator::UnShift
it only uses the plain Iterator
TimToady btw, feeds are just mostly lazy :)
skids That clears it up, thanks.
TimToady think Unix pipes
ruoso just had a vague hope that it would be strictly lazy... simply because it's easier to implement... 19:53
TimToady basically, you can throttle them, but you can't tell the other process how much to do when
skids I think eventually there will be demand for a strict lockstep feed, BTW. Though it could easily "not be CORE".
ruoso there's an eager modifier already 19:54
skids exact opposite of what I meant.
TimToady that's the opposite
ruoso maybe an explicit lazy modifier sets it to strictly lazy
@a <== lazy (1,2,3)
lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
TimToady the only reason you'd *want* strict laziness is to prevent out-of-order side effects among competing threads, which is a bad approach in the first place 19:55
ruoso TimToady, you may also avoid buffering
skids Well, if Perl6 only attracts good coders, it will have a small audience :-)
ruoso TimToady, if you apply the lazyness levels to IO.. it does make sense 19:56
TimToady well, the compiler can tell if either side of a feed accesses lexicals outside its scope
ruoso I don't think it's related to that 19:57
TimToady anyway, the default is that you shouldn't depend on how much buffering is going on
ruoso but the actual application might
let's suppose an application where you have an input IO... that once you have read, you should process immediatly
if you can't process right now, 19:58
you shouldn't read
if, in the other side of the stream, you have a load balancer, that's quite relevant
19:58 Kisu left
TimToady I understand that protocols don't like buffering, but lazy lists aren't the right approach there anyway 19:58
unless you do it all with event processing 19:59
19:59 Helios joined
ruoso TimToady, weren't we discussing a main event loop in the interpreter? 19:59
19:59 Kisu joined
TimToady sure, but that's low-level 19:59
and yes, we do want to layer transactions over events 20:00
but transactions and laziness don't mix real well
ruoso that's precisely why the "lazy" modifier would do the trick
skids TimToady: tell me about it :-) 20:01
ruoso to force the runtime to only consume the data that is actually needed...
TimToady we can certainly have specialized feeds, they're just not the default
ruoso TimToady, I was actually considering that every lazyness should be represented in terms of a continuation... when you want to consume from a lazy list, if the data is not available, a control exception is thrown.... 20:02
then that continuation is executed, until there is data
which then gets back to the other continuation
TimToady feeds are meant to run between threads
ruoso that doesn't break this model 20:03
on the contrary...
this model can try to use as many OS threads as it wants to run the continuations
(alright... one continuation per thread... yes...) 20:04
(at the same time, at least )
TimToady we have to be very careful not to make extra lockstep promises where they aren't necessary, or we'll never scale to multicore
ruoso TimToady, in my head... the iterator only thows ControlExceptionWouldBlock if there is no data available 20:05
if there's idle processing, the interpreter can decide to pre-evaluate "mostly-lazy" resources
TimToady if the interpreter has to decide it, then you won't scale to manycore 20:10
there are any number of subtle ways not to scale to manycore :)
skids The other reason for a feed thread to pause of course is hitting a memory use ceiling...
ruoso TimToady, by "interpreter decide" I mean... any event library available 20:12
the linux kernel provides some very nifty features in that field... 20:13
TimToady if anything other than the two ends of the feed decide it, you won't scale :)
ruoso TimToady, not even a kernel event?
oh
rihgt...
I see what you mean 20:14
yes...
only the two ends of the feed decide
but that's strictly laz
TimToady welcome to the world of massive parallelism
ruoso but in the end there's IO
TimToady yes, then they speak a protocol that goes lockstep
ruoso there's always IO ;)
TimToady and it's not the default feed
ruoso TimToady, but if only the two ends decide 20:15
ok... ok.. I see.
a feed may be generating data from a non-blocking source
TimToady that's why the default is mostly lazy
I'd like Perl to be the language of choice if you can't abide Erlang :) 20:16
and maybe even if you can :)
ruoso working too much with IO lately 20:17
TimToady but fundamentally we're trying to avoid the same mistake as C's for loops, where the programmer is tempted to be more specific about sequence than is warranted
overpromising sequence is what keeps parallel algorithms from scaling as well as they might 20:18
you can work around it with compilers that rewrite your code
but they can't always read minds
ruoso yes... I was agreeing with you all the time... I wasn't just talking about the case of non-blocking-infinite-source in a feed 20:20
but basically... that means we need a unix kernel implemented in our interpreter that implements pipes ;) 20:21
20:21 jcrigby joined
skids Do we have specific language about the consequences of directly touching the control list in a for loop from inside he list? 20:21
erm, inside the loop.
ruoso depends on what you mean by touching
skids shifting prematurely :-) 20:22
ruoso there has been some rumours about clonning the list when passing to "for"
TimToady, was anything decided about that? 20:23
TimToady I have no idea what it means
ruoso for @a { @a.shift }
TimToady should work exactly like map { @a.shift }, @a
ruoso which means?
TimToady the programmer will be taken out and shot at dawn 20:24
skids Just cause using for to create the iterator gives no way to get the pushed values unless the loop repeats.
ruoso is that one of those "erroneous" things?
do it and I can only guarantee that dwarves will come and kick your ass?
TimToady yes, side effects that cross lazy lists are typically errneous
skids I'll look around for some other lazy construct to abuse. 20:25
20:26 dolmen joined
ruoso later & 20:26
20:27 ruoso left
TimToady in fact, there's something to be said for putting some "jitter" into mostly lazy to prevent people from depending on such accidental determinacy 20:27
skids And also in the case of really lazy things that only get popped occasionally, to improve code locality so all those iterator loops aren't filling the icache (or in VMs case the dcache) at the same time when they don't really need to be. 20:28
erm, unshifted. 20:29
TimToady yes, that's the other motivation for mostly lazy
though the argument depends on current architectures
wouldn't have meant anything on a Cray-1 for instance :)
skids Sure, maybe we'll be bottleneck-free someday. Then maybe the bottleneck will come back 3 years after that. 20:30
TimToady all we can do is aim for the current sweet spot and hope we're flexible enough to change later 20:31
but I think a lot of language designers really have no clue when they're designing unnecessary bottlenecks into their language 20:32
me, I have a small clue :)
skids I just consolidate other people's clues. :-) 20:33
TimToady Your clue will be absorbed!!! 20:35
skids clues sustain me.
TimToady "Perl 6 is a clue language"
skids Inthat case we would need a "clue" keyword. Not sure for what, though :-) 20:36
TimToady I don't know that that follows, Perl 5 doesn't have a "glue" keyword...
skids OK, point taken. 20:37
20:37 tarbo2 joined
TimToady wanders & 20:37
skids wonders how far down the rakudo roadmap @@ stuff is. 20:38
TimToady jnthn was threatening to work on S09 next, which needs @@ context for subscripts 20:40
TimToady rewanders &
20:40 donaldh joined 20:44 pmurias left
jnthn Aye, @@ would come with S09 doings... 20:47
jnthn wishes he'd been able to concentrate more today and do stuff beyond minor bug fixes. 20:50
20:57 M_o_C left 21:00 ejs joined 21:02 Whiteknight joined 21:13 DemoFreak joined 21:17 ejs1 joined
jnthn std: sub bar is export(:DEFAULT :others) {...} 21:19
p6eval std 25957: OUTPUT«ok 00:02 34m␤»
jnthn rakudo: sub bar is export(:DEFAULT :others) {...}
p6eval rakudo 7b9f81: OUTPUT«Unable to parse multisig; couldn't find final ')' at line 1, near ":DEFAULT :"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
jnthn rakudo: sub bar is export(:DEFAULT, :others) {...}
p6eval rakudo 7b9f81: RESULT«{ ... }»
jnthn std: foo(:a :b)
p6eval std 25957: OUTPUT«Undeclared routine:␤ foo used at 1 ␤ok 00:02 34m␤» 21:20
jnthn rakudo: foo(:a :b)
p6eval rakudo 7b9f81: OUTPUT«Statement not terminated properly at line 1, near "(:a :b)"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
jnthn hadn't realized the , was optional there...or does it mean something else? :-S
21:21 Limbic_Region joined, Cybera joined
skids maybe we could get evalbot to post those neat HTML parse trees somehow... 21:23
Cybera ?eval say 10;
21:24 broquaint left
skids perl6: say 10; 21:24
p6eval elf 25957, pugs, rakudo 7b9f81: OUTPUT«10␤»
Cybera thx 21:25
skids (or choose particular implementation, or "std:" to just parse on STD.pm)
Cybera k
21:28 Woody4286 joined
skids rakudo: do { take 1; take 2; take 3;} 21:31
p6eval rakudo 7b9f81: OUTPUT«Warning␤Warning␤Warning␤»
[particle] danger, will robinson!
skids Just trying to figure out if only gather groks take.
[particle] no, gather and take can exist without eachother 21:32
sub foo { bar(); bar(); bar; gather }; sub bar { state $x = 1; take $x++; }
21:33 ejs left
skids rakudo: for 1..2 { take 1; take 2;} 21:33
p6eval rakudo 7b9f81: OUTPUT«Warning␤Warning␤Warning␤Warning␤»
skids rakudo: for 1..2 { ?&BLOCK.next(1); ?&BLOCK.next(2);} 21:34
p6eval rakudo 7b9f81: OUTPUT«Null PMC access in can()␤current instr.: '!dispatch_method' pc 16962 (src/builtins/guts.pir:104)␤»
21:44 donaldh left
frioux rakudo: frew => 2 21:58
p6eval rakudo 7b9f81: RESULT«{"frew" => 2}»
frioux rakudo: frew p5=> 2
p6eval rakudo 7b9f81: OUTPUT«Could not find non-existent sub frew␤current instr.: '_block14' pc 61 (EVAL_16:40)␤»
frioux rakudo: 'frew' p5=> 2
p6eval rakudo 7b9f81: RESULT«["frew", 2]» 21:59
21:59 wknight8111 joined
frioux wonders who will ever use p5=> 21:59
jnthn The p5 translator I guess...
frioux but you have to quote the first word 22:00
22:00 Whiteknight left
frioux or is that a bug? 22:00
jnthn No idea...
frioux k
jnthn I'd hope not though.
Otherwise that means we have to treat it specially in the compiler. 22:01
Ask std ;-)
frioux well, if it's not then you'd have to change frew => 4 to 'frew' p5 => 4
jnthn std: 'frew' p5=> 2
p6eval std 25957: OUTPUT«ok 00:02 36m␤»
frioux std: frew p5=> 2
jnthn std: frew p5=> 2
oh
:-)
p6eval std 25957: OUTPUT«Undeclared routine:␤ frew used at 1 ␤ok 00:02 34m␤»
jnthn No, std agrees with Rakudo.
frioux yeah, so that's just a drag to have to do is all
jnthn I think in the light of all the other fixups a p5->p6 translator will need to do, inserting some quotes is not much to worry about. ;-) 22:02
frioux yeah
22:03 NordQ joined
frioux so is that still planned? 22:04
and is supporting p5 in p6 still planned?
jnthn I think so, though it may not have anyone actively working on it.
frioux huh
jnthn The latter is in the same kinda boat. Very much planned.
frioux right 22:05
22:05 FurnaceBoy joined
jnthn Just nobody currently devoting tuits to it. 22:05
frioux I am sure one would benefit from the other
jnthn Yeah.
frioux any idea how XS will work?
jnthn tbh I think as a first approximation we'd just embed Perl 5, so pretty much the same in some senses... 22:06
frioux so you mean embed perl 5 the implementation? 22:07
[particle] yes
jnthn Yeah
frioux interesting
[particle] it's a Hard Problem. 22:08
with an Easy 80% solution.
frioux hm 22:09
but theoretically, as perl 6 will support 5, perl 6 programs could use perl 5 modules
right? 22:10
from CPAN
jnthn That's the main reason why we would want to embed Perl 5, yes.
frioux gnarly. 22:12
recently I was talking with people and they were disagreeing with having junctions in perl6 as part of the language itself.
what do you think jnthn?
jnthn Heh, it's hard to answer specifically without knowing what their objections were. 22:13
I think that used right (and steps have been taken to discourage bad use) they are a good langauge feature.
22:13 skids left
frioux they thought it was overkill 22:14
and too academic
I think it's cool, but I like anything that's shiny :-)
I don't care if IBM likes perl6
jnthn Too academic? 22:15
22:15 alester left
frioux I am not sure when I will every use all() but I will use any plenty of the time 22:15
their words
jnthn Curious. There's plenty of features in Perl 6 that I'd describe as further in the direction of academic than junctions. Junctions feel far more int he directions of practical to me. :-) 22:16
[particle] i'm not sure when i'll use and, but i'll use not and or plenty
frioux not and?
jnthn particle. :-)
frioux what is that? and what is plenty? 22:17
I don't get the joke...
jnthn frioux: particle was pointing out that any is to or what all is to and.
frioux oh, right
that's true
but I just can't see using and with junctions is all 22:18
but I am mostly thinking in the context of given/when
where (0|1) makes perfect sense to me, how can you have (1&2)? 22:19
22:19 rhr joined, aindilis left, aindilis joined
[particle] 0 but True 22:19
frioux is but long for & ? 22:20
jnthn if $value <= all(@limits) { say "all is well" }
[particle] poll all @sockets; 22:21
frioux rakudo: my $f = 0&True; if($f) {say "station"}
p6eval rakudo 7b9f81: OUTPUT«Statement not terminated properly at line 1, near "{say \"stat"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
frioux rakudo: my $f = 0&True; if($f) {say "station";}
p6eval rakudo 7b9f81: OUTPUT«Statement not terminated properly at line 1, near "{say \"stat"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
jnthn frioux: No, but is not short for &
erm, long for...
[particle] heh
jnthn all($a, $b) is equivalent for $a & $b 22:22
22:22 Kisu left
jnthn ponders the import stuff... 22:22
22:25 Exodist left 22:27 amoc joined 22:30 ejs1 left 22:31 maerzhase left
amoc std: (*).perl.say 22:34
p6eval std 25957: OUTPUT«ok 00:02 34m␤»
22:34 M_o_C joined
amoc perl6: (*).perl.say 22:34
p6eval elf 25957: OUTPUT«Undefined subroutine &GLOBAL::whatever called at (eval 124) line 3.␤ at ./elf_h line 5863␤»
..pugs: OUTPUT«Inf␤»
..rakudo 7b9f81: OUTPUT«*␤»
amoc i don't see what is right output. 22:35
jnthn Rakudo. 22:37
pugs used to be right, I think, but is out of date now.
22:38 lambdabot left
amoc i see. 22:40
22:41 lambdabot joined
amoc I sent rakudoperl yesterday, but rest of mine all have '[perl #nnnnn]' label in mailing-list. 22:41
what should i do? have to reply to myself with new subject? 22:42
jnthn amoc: You mean rakudobug?
amoc oops, yes.
jnthn amoc: For new bugs, send new mail to rakudobug email address. To follow up on an existing message, reply and keep the number in the subject line. 22:43
An existing bug,t hat is.
The number is what lets RT associate email follow-ups with the right ticket.
amoc then, i don't have to and it's just for future replies to keep follow-ups. is it right? 22:47
jnthn Right. 22:48
If you want to report a new, different problem, sent an email without that subject to rakudobug
amoc okay, Thank you 'really' much ! 22:49
jnthn :-) 22:52
22:54 ewilhelm_ joined 22:55 hercynium left 22:57 ewilhelm left 23:04 amoc left 23:15 bp0 joined
bp0 evalbot: 'perl6: say 3;' 23:15
evalbot?
frioux rakudo: say 3
jnthn perl6: say 3
p6eval rakudo 7b9f81: OUTPUT«3␤»
elf 25957, pugs, rakudo 7b9f81: OUTPUT«3␤»
jnthn bp0: Like that. :-)
bp0 heh
why "say 3"? 23:16
jnthn True. say 42 would clearly have been better. ;-) 23:17
You can just put whatever Perl 6 you like there to try and run it though.
rakudo: for 1..10 -> $num { say $num }
bp0 ic
p6eval rakudo 7b9f81: OUTPUT«1␤2␤3␤4␤5␤6␤7␤8␤9␤10␤»
23:20 jnthn sets mode: +o TimToady
dalek kudo: ec0db22 | jnthn++ | src/builtins/guts.pir:
Work around multiple Parrot bugs for calls to foreign objects, and document what we're working around. (TODO: see if they already have tickets and submit them if not.)
23:39
kudo: e38edf9 | jnthn++ | src/ (3 files):
First cut of importing from :DEFAULT one use. Wrong and incomplete, but a start at least. Also, per S11 (or as far as I understand it), multis want to get :DEFAULT automatically, so add that.