Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2009-10-27

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:03 jnthn pmichaud: oh hmm. I'm failing a bunch of tests with Could not find non-existent sub prefix:\\
00:03 jnthn pmichaud: I'm rather thinking this may be related to something other than the PCC changes...
00:04 nihiliad joined #perl6
00:04 jnthn Was there some Parrot change of late on that?
00:13 sjohnson hi all
00:14 jnthn hi sjohnson
00:17 colomon hello
00:17 astrojp left #perl6
00:18 sjohnson *group hug*
00:18 astrojp joined #perl6
00:18 frew joined #perl6
00:20 xinming joined #perl6
00:25 TimToady hugme: hug us
00:25 * hugme hugs us
00:25 sjohnson that hugme bot has definitely proved its worth
00:26 jnthn Apparently it does some github stuff too, as a bonus feature. ;-)
00:28 diakopter hugme: hug you
00:28 * hugme hugs you
00:28 diakopter hugme: hugme
00:28 hugme diakopter:
00:28 diakopter hugme: hugme:
00:28 hugme diakopter:
00:29 jnthn diakopter: hug hugme
00:29 sjohnson hugme: hug itself
00:29 * hugme hugs itself
00:30 sjohnson hugme is around for whenever i have a rough day at work
00:30 sjohnson i can always depend on it
00:30 sjohnson hugme: hug sjohnson's wife
00:30 * hugme hugs sjohnson's
00:30 sjohnson ... faithful too
00:36 jnthn OK, looks like I have two issues to deal with, and then we're going to be building on latest Parrot again.
00:36 jnthn So hopefully I merge that in tomorrow.
00:36 jnthn Provided I'm not actually about to have a nasty bout of flu.
00:36 jnthn Which would kinda suck.
00:36 * jnthn hopes he's just excessively tired
00:36 jnthn Talking of which...sleep time
00:36 jnthn o/
00:40 sjohnson cya!
00:40 Coleoid joined #perl6
00:40 sjohnson now we just need a "tuck in" bot
00:40 sjohnson and bedtime story :)
00:43 Coleoid Is there a Rakudo path to get the text of a block?  { $etc }.perl isn't working--I see in the tests it's stubbed out for Rakudo.
00:43 frew joined #perl6
00:48 Coleoid rakudo: say { my $x = 23 }.perl
00:48 p6eval rakudo 657d55: OUTPUT«{ ... }␤»
00:50 orafu joined #perl6
00:52 leedo joined #perl6
00:58 Coleoid std: regex embed < a #`[no] b >
00:59 p6eval std 28911: OUTPUT«[31m===[0mSORRY![31m===[0m␤Malformed regex at /tmp/Lki2zd0qId line 1:␤------> [32mregex embed [33m⏏[31m< a #`[no] b >[0m␤    expecting any of:␤        regex_def␤        trait␤FAILED 00:01 104m␤»
00:59 jsut joined #perl6
00:59 Raugturi joined #perl6
01:12 Coleoid std: my $r = regex { a #`[no] b }
01:12 p6eval std 28911: OUTPUT«ok 00:02 107m␤»
01:12 Coleoid rakudo: my $r = regex { a #`[no] b }
01:12 p6eval rakudo 657d55: OUTPUT«Malformed regex definition at line 2, near "{ a #`[no]"␤in Main (file <unknown>, line <unknown>)␤»
01:13 pmichaud pge doesn't understand embedded comments in regexes
01:18 Schwern joined #perl6
01:21 Raugturi joined #perl6
01:21 nihiliad joined #perl6
01:25 KyleHa joined #perl6
01:28 agentzh joined #perl6
01:32 snarkyboojum joined #perl6
01:40 Raugturi joined #perl6
01:43 Raugturi joined #perl6
01:51 snarkyboojum_ joined #perl6
01:51 KyleHa std: (my $x is readonly) = 3;
01:51 p6eval std 28911: OUTPUT«ok 00:01 112m␤»
01:52 KyleHa std my ($x is readonly) = 3;
01:52 KyleHa std: my ($x is readonly) = 3;
01:52 p6eval std 28911: OUTPUT«ok 00:01 109m␤»
01:52 ihrd1 joined #perl6
01:55 KyleHa rakudo: my $foo = 'hello world'; say «$foo».elems
01:55 p6eval rakudo 657d55: OUTPUT«1␤»
02:08 ihrd1 left #perl6
02:10 tak11 joined #perl6
02:14 dj_goku joined #perl6
02:18 pugs_svn r28912 | s1n++ | [s19] minor option case typo correction.
02:19 TimToady KyleHa: that behavior seems incorrect to me
02:20 TimToady «"$foo"» should make one element, but without quotes it should make two
02:20 TimToady that's how the shell does it, anyway
02:21 TimToady on the readonly, the syntax is fine; STD doesn't check semantics much
02:22 tak11 joined #perl6
02:34 KyleHa TimToady: Thanks for looking!  I think I have the test right; I was confirming that Rakudo still has the bug as reported.
02:35 pugs_svn r28913 | kyle++ | [t/spec] Test for RT #65900
02:35 pugs_svn r28914 | kyle++ | [t/spec] Test for RT 65654
02:35 pugs_svn r28915 | kyle++ | [t/spec] Test for RT 65988, recursion in .perl on List with Captures
02:35 KyleHa That second one is the quoting test.
02:40 dalek nqp-rx: d22d3e4 | pmichaud++ |  (5 files):
02:40 dalek nqp-rx: [nqp]:  Add ternary (infix:<?? !!>) operator.
02:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/d22d3e487a48adce117c7fdd838e9b4555dc7017
02:40 dalek nqp-rx: edd37ff | pmichaud++ | src/cheats/hll-grammar.pir:
02:40 dalek nqp-rx: Fix line number reported by <.panic>.
02:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/edd37ff828eeb09e1e9e20cf64a40bda7bc9b7bd
02:40 dalek nqp-rx: 6085a7a | pmichaud++ |  (2 files):
02:40 dalek nqp-rx: [nqp]: Add postcircumfix:<[ ]>.
02:40 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/6085a7a954422f40b93bca2389a8a9f6058699d3
02:50 KatrinaTheLamia joined #perl6
02:57 dalek nqp-rx: b8a2ea3 | pmichaud++ |  (3 files):
02:57 dalek nqp-rx: [nqp]:  Add postcircumfix:<{ }> and postcircumfix:�< >�.
02:57 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/b8a2ea3c15eb9394ade1c8a16974440b277e5f1e
03:00 snarkyboojum joined #perl6
03:01 JimmyZ joined #perl6
03:05 nihiliad joined #perl6
03:09 dalek nqp-rx: 533eee8 | pmichaud++ |  (3 files):
03:09 dalek nqp-rx: [nqp]:  Add Q:PIR for inline PIR.
03:09 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/533eee8ec34a77ffb6c6c6b1e03cdce1773b3889
03:19 jnthn joined #perl6
03:19 JimmyZ joined #perl6
03:19 dj_goku joined #perl6
03:19 Raugturi joined #perl6
03:19 Schwern joined #perl6
03:19 orafu joined #perl6
03:19 astrojp joined #perl6
03:19 nbrown joined #perl6
03:19 [particle] joined #perl6
03:19 hcchien joined #perl6
03:19 rgrau` joined #perl6
03:19 NorwayGeek joined #perl6
03:19 pnate joined #perl6
03:19 solarion joined #perl6
03:19 p6eval joined #perl6
03:19 synth joined #perl6
03:19 xenoterracide joined #perl6
03:19 rgrau joined #perl6
03:19 cotto joined #perl6
03:19 Helios- joined #perl6
03:19 huf joined #perl6
03:19 frew_ joined #perl6
03:19 cxreg joined #perl6
03:19 charsbar_ joined #perl6
03:19 kent\n joined #perl6
03:19 tkr joined #perl6
03:19 dalek joined #perl6
03:19 Eevee joined #perl6
03:19 mj41 joined #perl6
03:19 arnsholt joined #perl6
03:19 lisppaste3 joined #perl6
03:19 akl joined #perl6
03:19 blaze-x joined #perl6
03:19 carlin joined #perl6
03:19 PapaChub joined #perl6
03:19 REPLeffect joined #perl6
03:19 silug joined #perl6
03:19 Bucciarati joined #perl6
03:19 Trinity94 joined #perl6
03:19 avuserow joined #perl6
03:19 sparc joined #perl6
03:19 estrai joined #perl6
03:19 allbery_b joined #perl6
03:19 buubot joined #perl6
03:19 michaelr joined #perl6
03:19 andreasg_ joined #perl6
03:19 kolibrie joined #perl6
03:19 TimToady joined #perl6
03:19 diakopter joined #perl6
03:19 nothingmuch joined #perl6
03:19 wolverian joined #perl6
03:19 ezra joined #perl6
03:19 dmpk2k joined #perl6
03:19 Infinoid joined #perl6
03:19 buu joined #perl6
03:19 clkao joined #perl6
03:20 dalek nqp-rx: e8e8388 | pmichaud++ |  (3 files):
03:20 dalek nqp-rx: [nqp]:  Add return statement.
03:20 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/e8e8388b130a929df9f2f2528243f2b6013e59d3
03:31 cj joined #perl6
03:31 mtve joined #perl6
03:31 carlin make: *** Deleting file `t/spec/S32-io/IO-Socket-INET.t'
03:31 carlin Argh!
03:41 KatrinaTheLamia joined #perl6
03:43 envi^office joined #perl6
03:59 carlin http://gist.github.com/219284 # my IO::Socket.get() attempt. Would someone taking a look before I send it to RT?
04:00 pugs_svn r28916 | carlin++ | [t/spec/S32-io] Add (fudged) tests for IO::Socket.get()
04:26 bpetering joined #perl6
04:43 Raugturi joined #perl6
04:44 dduncan joined #perl6
04:46 justatheory joined #perl6
05:02 rfordinal joined #perl6
05:02 hercynium joined #perl6
05:02 simcop238 joined #perl6
05:02 broquaint joined #perl6
05:02 szabgab joined #perl6
05:02 Jedai joined #perl6
05:02 _jaldhar joined #perl6
05:02 c9s joined #perl6
05:02 arthur-_ joined #perl6
05:02 breinbaas joined #perl6
05:02 spinclad joined #perl6
05:02 pugs_svn joined #perl6
05:02 dukeleto joined #perl6
05:02 BinGOs joined #perl6
05:02 shachaf joined #perl6
05:02 sjohnson joined #perl6
05:02 Grrrr joined #perl6
05:02 nsh joined #perl6
05:02 cosimo joined #perl6
05:03 dduncan left #perl6
05:14 frew joined #perl6
05:25 Schwern joined #perl6
05:25 sparc joined #perl6
05:34 sparc left #perl6
05:46 Bzek joined #perl6
06:14 quux joined #perl6
06:17 nnunley joined #perl6
06:18 quux joined #perl6
06:18 xenoterracide_ joined #perl6
06:19 cotto joined #perl6
06:38 awwaiid joined #perl6
06:41 simcop2387 joined #perl6
06:44 cottoo joined #perl6
07:10 Su-Shee joined #perl6
07:10 Su-Shee good morning.
07:16 moritz_ good morning
07:26 rfordinal joined #perl6
07:42 envi^office joined #perl6
07:57 mberends joined #perl6
08:00 mberends goede morgen kameelvlinders
08:02 mberends ubuntu karmic koala 9.10 netbook remix works exceedingly well
08:22 mariuz joined #perl6
08:23 Psyche^ joined #perl6
08:32 sjohnson hi
08:33 hercynium joined #perl6
08:33 envi^home joined #perl6
08:35 mathw hi
08:38 clkao i/win 8
08:48 sjohnson hi matt
08:50 JimmyZ mberends: will give it a try.
08:52 carlin Hmm... Rakudo's IO::Socket.accept() method is less-than-awesome
09:01 payload joined #perl6
09:22 payload1 joined #perl6
09:23 payload1 joined #perl6
09:31 |Jedai| joined #perl6
09:47 brunov joined #perl6
09:52 Lasse joined #perl6
09:53 envi^office joined #perl6
10:00 Lasse Hey, I'm an absolute newbee to Perl, but I have become interested in Perl6, so I have downloaded Rakudo and want to play around with it. But I do not know where to begin. I need a reference manual and some good example. Anyone out there who can give me a helping hand?
10:00 NorwayGeek joined #perl6
10:01 moritz_ Lasse: that's a bit of a weak spot right now, most documentation assumes that you know Perl 5
10:02 JimmyZ joined #perl6
10:02 moritz_ Lasse: but http://szabgab.com/blog/tags/Perl%206.html could be a good start
10:04 moritz_ there's also http://www.programmersheaven.com/2/Perl6-FAQ
10:07 frederico joined #perl6
10:08 mathw Lasse: Please also feel free to ask questions here, it doesn't matter if they're very basic things, we're very friendly.
10:08 moritz_ (and we're also working on a book for Perl 6 beginners, but the introductory chapters are not written yet)
10:09 payload joined #perl6
10:11 Lasse joined #perl6
10:13 masak joined #perl6
10:19 JimmyZ If such ids are assigned consistently thoughout the process, comparison of two graphemes is no more difficult than the comparison of two integers, and comparison of base characters no more difficult than a direct lookup into the id-to-NFD table.
10:20 masak JimmyZ: o/
10:20 JimmyZ what does thoughout mean?
10:20 JimmyZ 麦高:中午好
10:20 moritz_ should probably be "throughout"
10:20 masak yes, it should.
10:20 masak that means the same as 'during'.
10:21 JimmyZ moritz_: It's from S02.
10:21 masak JimmyZ: feel free to patch it.
10:21 mathw it doesn't mean the same as 'during'
10:21 moritz_ JimmyZ: that doesn't mean it's perfect :-)
10:21 mathw it has an implication of completeness which 'during' doesn't
10:21 JimmyZ so is it a typo?
10:21 JimmyZ throughout?
10:22 JimmyZ I see. just like from cover to cover?
10:23 masak moritz_, Tene: when I sat down to write the tests for next/last/redo yesterday, I found that they were already written. someone++
10:23 mathw JimmyZ: something like that, yes.
10:24 JimmyZ thanks.
10:24 pugs_svn r28917 | jimmy++ | [Spec/S02-bits.pod] fixed a typo, which should be 'throughout'.
10:24 masak JimmyZ: 'throughout the process' means 'during the process'.
10:25 moritz_ jnthn, pmichaud: http://moritz.faui2k3.org/tmp/ltm.pod (comments from others are welcome too)
10:25 JimmyZ masak: I see. I just can't decide whether it is a typo or not.
10:25 * moritz_ heads off to lunch
10:25 masak JimmyZ: I have the same problem with hanzi :)
10:25 JimmyZ masak: :)
10:38 pugs_svn r28918 | jimmy++ | [zh-cn/syn/S02-bits.pod] add more translations. #perl6++ for the help.
10:43 pugs_svn r28919 | carlin++ | [t/spec/S32-io] A server cannot use a bare recv() because it would only return once the client disconnected (which is useless when you want to send data back). It is a combination of luck and magic that makes these tests pass, if we were using the real recv() method they would
10:43 pugs_svn ..hang and fail (after being eaten by the watchdog).
10:44 desertm4x joined #perl6
10:53 payload joined #perl6
11:00 masak someone tries, and fails, to install Rakudo: http://use.perl.org/~lilstevey/journal/39804
11:01 jnthn morning
11:03 masak jnthn: I know it's been a while since you came back from Asia, but every time you turn up on the channel, I think "jnthn! he's back!"
11:03 jnthn ;-)
11:05 ejs1 joined #perl6
11:06 rgrau joined #perl6
11:07 mathw masak: it seems we need better win32 instructions
11:08 masak mathw: aye.
11:08 jnthn "Don't use MinGW"? ;-)
11:10 masak lunch &
11:12 jnthn Aside from substituting make for nmake in http://www.rakudo.org/how-to-get-rakudo these are exactly what I do...
11:20 rgrau` joined #perl6
11:23 bpetering hai all :)
11:24 moritz_ \o/
11:31 bpetering moritz_: how goes the book?
11:32 moritz_ bpetering: quite nice, IMHO
11:32 payload joined #perl6
11:37 moritz_ bpetering: you could of course read what we have now, and form an opinion yourself :-)
11:37 bpetering moritz_: i've been looking at your travel photos of turkey. :)
11:37 bpetering that's what i'm doing :)
11:38 moritz_ he :-)
11:38 bpetering err, that last statement was a reply
11:42 bpetering i'm not stalking you, i like to remind myself that attached to each nick is a real person. that's all. :)
11:43 moritz_ well, if I felt that was stalking, I wouldn't have put up the pictures :-)
11:43 * jnthn edits all his sites to create the impression that actually he's an android, just to confuse bpetering
11:44 bpetering jnthn!
11:44 moritz_ that's why I also put up my picture on gravatar, to remind people that I'm not just a nick, but also a human
11:46 bpetering moritz_: sometimes i wonder ;-)
11:47 moritz_ I'd also love to attend more perl conferences, for that reason and others
11:47 bpetering given your activity level, that is.
11:51 bpetering but yes, i'm aware you're human. speaking of which, do you like beer? :)
11:51 moritz_ not me, but jnthn does :-)
11:52 bpetering i know :)
11:53 moritz_ but I'm available to socializing over other beverages :-)
11:54 takadonet joined #perl6
11:54 takadonet morning all
11:54 bpetering hi takadonet! :)
11:55 ejs2 joined #perl6
11:56 mathw moritz_: I also like socialising over other beverages
11:56 mathw Or sometimes over laptop screens
11:56 moritz_ just don't combine the two :-)
11:56 mathw talk by the glow of your favourite text editor :D
11:56 moritz_ beverage + laptop screen = black :-)
12:01 mathw only if you're careless enough to spill it
12:02 bpetering ... which is why beer and laptops don't mix :)
12:02 mathw yes
12:05 REPLeffect_ joined #perl6
12:08 * bpetering thinks the pugs VICTUALS file is in dire need of being brought back to life.
12:13 moritz_ jnthn: did you read my ltm.pod thing? any comments?
12:13 jnthn moritz_: Not yet - gotta deal with some piece of crap VBScript app, the author of which I hoped progressed to a non-programming career.
12:13 moritz_ jnthn: ok, no hurry
12:14 bpetering jnthn: I share your sorrows.
12:17 mathw jnthn: usually they get promoted into management of a dev team
12:19 jnthn Wonder if they turn into the kind of manager that thinks they know the tech, but actually don't and just annoy all the devs. :-/
12:21 * bpetering thinks of an office space reference...
12:22 bpetering fails
12:24 REPLeffect_ joined #perl6
12:25 meppl joined #perl6
12:33 iblechbot joined #perl6
12:34 [sbp] joined #perl6
12:34 nsh joined #perl6
12:40 bpetering moritz_: re a title for the book, how about a play on Rakudo *, since a) book uses Rakudo as the test impl, (more)
12:41 bpetering b) if release schedule followed, book will have six chapters by * release?
12:41 moritz_ more than six, hopefully
12:41 bpetering "Perl 6 Illuminated"?
12:41 bpetering .oO( how to bring in the "by example" aspect... )
12:41 moritz_ that's certainly worth considering
12:42 bpetering if thats politese for "that's a crap idea", say so :)
12:45 bpetering thinking out loud. if you'd prefer more refined thoughts, again - say so :)
12:48 SmokeMachine joined #perl6
12:49 rfordinal joined #perl6
12:50 moritz_ it's an interesting idea
12:50 moritz_ and I really mean that
12:51 moritz_ there's just one thing wrong with it: the time :-)
12:51 moritz_ I think we need to know more how our book will look to give it a really fitting title
12:52 bpetering good point.
12:52 mariuz joined #perl6
12:53 moritz_ still it's good to have some ideas
12:53 moritz_ I think I'll add a file with naming ideas to the repo
12:55 bpetering with chapter 1, my initial thought is that refining your target audience will help with making it non-boring
12:56 bpetering i.e. having a clearer idea of who the book's for will help with how to cover "the basics"
12:56 desertm4x joined #perl6
12:57 Su-Shee I don't care how boring the book is/will be as long as it is precise, clear and realistic in its examples instead of being annoyingly funny with metaphors.
12:57 bpetering Su-Shee: our potential contributors do ;)
12:59 bpetering but i'm all for real-world examples. if i have to read another computer book with mammals or useless examples, i'll scream. OR WORSE.
12:59 Su-Shee that's what I mean.
12:59 * moritz_ didn't use any mammals
13:00 moritz_ as examples, that is
13:00 Su-Shee bpetering: or worse - cultural specific "funny" examples noone outside country x really gets.
13:01 rfordinal left #perl6
13:01 bpetering Su-Shee: i know exactly what you mean, and the mere thought raised my blood pressure.
13:01 * Su-Shee is too stupid to understand technology through metaphors. I have to really see real code doing real tech stuff.
13:04 bpetering Su-Shee: i kinda suspect the stupidity lies elsewhere... people thinking "oh, lets make this interesting by making FUN", and failing utterly
13:04 bpetering *it FUN
13:05 bpetering but code is code. it does stuff. it's imperative. and it exists within a specific technological context.
13:06 bpetering ppl try to remove it from that context and write crap computer books.
13:06 arnsholt Well, it's a fine line to tread
13:06 bpetering </rant> :)
13:06 jsut joined #perl6
13:07 Su-Shee bpetering: in terms of clarity, one of my favorites is still the stuff of Stevens - apue and so on.
13:07 arnsholt Code that useful stuff tends to be too voluminous to put in a book
13:07 moritz_ arnsholt: that's why it's hard to find good examples
13:07 bpetering Su-Shee: \o/
13:07 arnsholt moritz_: Yup. Also why it's easy to go for the metaphor examples
13:08 TSa joined #perl6
13:08 bpetering I was actually thinking of him as a "good example" of no bad metaphors :)
13:08 moritz_ arnsholt: but so far I think our examples do well both in terms of usefulness and volume
13:08 TSa HaloO
13:09 arnsholt moritz_: BTW, I can't seem to access the stuff at your homepage. Expected or not?
13:10 moritz_ arnsholt: which stuff on which homepage?
13:10 moritz_ not expected
13:10 bpetering moritz is trying to masquerade as an android :)
13:10 arnsholt moritz.faui2k3.something (or something similar to that)
13:10 arnsholt It just sits there waiting for data it seems
13:10 moritz_ http://moritz.faui2k3.org/
13:11 moritz_ loads fine for me
13:11 moritz_ arnsholt: maybe a network problem... can you strace the server?
13:11 moritz_ erm, traceroute
13:11 moritz_ not strace :-)
13:11 arnsholt Yeah, I gifured =)
13:12 FCO joined #perl6
13:12 arnsholt Weeeeird. If I try it with Opera nothing happens
13:12 arnsholt With FF it works fine
13:13 moritz_ oh ouch
13:13 bpetering arnsholt: wfm
13:13 arnsholt bpetering: With Opera?
13:14 moritz_ last I looked it was valid xhtml + CSS
13:14 moritz_ so I'd blame opera in that context :-)
13:16 colomon moritz_: can you can http://perlgeek.de/blog-en/perl-6/where-rakudo-lives.writeback to point to somewhere with more current instructions?
13:16 bpetering opera 10, yep
13:17 moritz_ colomon: yes
13:17 colomon cool.
13:18 bpetering arnsholt: i'd guess network problems too
13:18 colomon It's a shame that you made this great blog post explaining how things worked, but people are still linking to it after it has bitrotted some...
13:22 moritz_ and it's a piece of irony that it now causes confusion, as it was originally meant to reduce confusion
13:24 moritz_ updated. colomon++ for nagging me
13:26 colomon moritz_++ for a great old post that I think most of us relied on back in the day.
13:28 PerlJam "back in the day" was earlier this year you realize?  :)
13:30 moritz_ PerlJam: Perl 6 development is fast paced
13:31 colomon PerlJam: I do indeed realize.
13:32 colomon Post was from Feb, it's been more-or-less obsolete since --gen-parrot, which was... umm... early summer?
13:32 colomon That's like two lifetimes ago Rakudo-wise.
13:33 bpetering c'est la tech
13:33 moritz_ it was basically obsoleted ~2 months after posting
13:33 jnthn moritz_: ltm.pod looks good to me.
13:34 jnthn moritz_: Can't comment so much on its correctness. ;-)
13:34 colomon but during those two months it was essential.  :)
13:34 jnthn moritz_: But it makes sense.
13:34 moritz_ jnthn: great. I hope pmichaud can say more about that :-)
13:35 moritz_ and maybe TimToady if he's got a bored hour :-)
13:42 bpetering moritz_: some more thoughts about the book, will -> #perl6book if you like but here is more likely to alert ppl to the book's existence :)
13:42 bpetering your call
13:45 moritz_ I don't mind either way
13:45 bpetering here
13:46 bpetering so, the basics again - there's this list of things that "should be covered" and reading through it i get a sense of "oh, well we *have* to cover these things *groan*"
13:46 bpetering don't think it has to be like that
13:46 pnate2 joined #perl6
13:47 bpetering i think non-boring is entirely possible, in other words :)
13:47 moritz_ it is, but not easy
13:47 bpetering one idea - go from most simple to most complex, but don't do it explicitly - do it in an example
13:48 bpetering so introduce the concepts in optimal learning order, within the context of useful code.
13:48 moritz_ now go and find an example that allows that :-)
13:48 bpetering a worthy challenge :)
13:48 arnsholt bpetering: Congratulations. You have just volunteered =)
13:49 moritz_ indeed finding  good examples is the hardest part of the whole book
13:49 moritz_ explaining the underlying concepts isn't too hard once you have the example
13:50 TSa which book?
13:50 PerlJam TSa: the perl6 book
13:50 TSa the new camel book?
13:50 moritz_ now
13:50 moritz_ the one we're writing
13:50 moritz_ (where we = pmichaud, jnthn, masak, PerlJam, me)
13:50 moritz_ s/now/no/
13:50 TSa cool
13:51 PerlJam TSa: See http://github.com/perl6/book
13:51 moritz_ http://perlgeek.de/blog-en/perl-6/we-write-a-perl-6-book-for-you.html for announcment
13:52 bpetering you give me the optimal learning order, i'll give you an example.
13:53 PerlJam bpetering: There's no such thing as a one-size-fits-all optimal learning order.  :)
13:53 alester joined #perl6
13:53 bpetering PerlJam: no, but some concepts depend on others
13:53 moritz_ that's why we write the later chapters first
13:53 PerlJam But introducing scalars, arrays, hashes and basic control flow should probably come before OOP and MMD and Regex  :)
13:53 moritz_ so that we know what we have to teach in the first chapters
13:54 moritz_ see the outline
13:54 KyleHa joined #perl6
13:55 bpetering good idea
13:56 moritz_ (note that we don't need an example for lexical conventions - they come out clean off the first example, and can be exlained in two paragraphs)
13:56 PerlJam yeah, chromatic++
13:56 bpetering moritz_: am i correct in thinking chapters 1 and 2 aren't written but 4+ are?
13:57 moritz_ bpetering: actually we decided to split off chapter 3 into two, subroutines and multis
13:57 moritz_ so 1, 2 and 3 are not yet written
13:57 moritz_ 5 is also split
13:57 moritz_ regexes are mostly done
13:57 moritz_ grammars need more work
13:58 moritz_ objects have an example yet, but miss some crucial feature descriptions yet (like inheritance)
14:01 bpetering umm, where's chromatic's example?
14:01 moritz_ bpetering: I'm going to update the outline
14:01 bpetering moritz_: thanks :)
14:02 Juerd I wonder how much of a headache Perl 6 is giving Jeffrey E.F. Friedl, author of MRE.
14:02 frew joined #perl6
14:02 Su-Shee *hihi* that's something I asked myself as well.. :)
14:03 Su-Shee "mastering regular expressions - now 2 volumes. volume II: perl 6" :)
14:03 bpetering Su-Shee: :-)
14:03 KyleHa As I recall, MRE gave me a headache.
14:04 arnsholt Well, with Perl 6 you really can argue that it's not regular expressions anymore
14:04 Su-Shee great book. I have all three editions.
14:04 arnsholt It's grammars. Which is a lot more fun =D
14:05 Patterner "Donald E. Knuth: The Art Of Computer Programming - Volume 6: Perl 6"
14:05 arnsholt And have lots more potential to fulfill Jamie Za$something's quote about regexes =)
14:05 Su-Shee well I will buy all of "Camel Perl 6", "OO Perl 6", "Higher Order Six" and so on.. ;)
14:05 * bpetering WANTS Higher Order Six
14:06 moritz_ much of HOP isn't really tied to Perl 5
14:06 Su-Shee and "make a parrot a camel - extending and emebedding with rakudo and parrot"
14:06 bpetering Su-Shee: thought you didn't like metaphors... ;)
14:06 moritz_ just the chapter on currying will become rather boring
14:07 moritz_ my $curried = &mysub.assuming(3)
14:07 Su-Shee bpetering: well this one is obvious. ;)
14:07 __ash__ joined #perl6
14:07 Su-Shee anyway. haven't had a perl book shot since HOP and I need NEW BOOKS.
14:07 [particle] joined #perl6
14:08 Su-Shee also, "contemporary web development with Perl 6" and "mashups and data mining for the rest of us with perl 6" will be great sellers. ;)
14:08 colomon I was thinking an HOP-inspired example would be great for the book, actually.
14:09 moritz_ colomon: aye
14:09 dalek book: c911fa5 | moritz++ | outline.pod:
14:09 dalek book: update and flesh out outline.pod
14:09 dalek book: review: http://github.com/perl6/book/commit/c911fa54cba0d57ddd2c290b71509076ab1e1c74
14:10 * colomon was just thinking that he is never going to read the copy of  Perl Best Practices sitting in his office.
14:10 moritz_ colomon: it's worth reading though
14:10 moritz_ colomon: because it makes you think about things you'd miss otherwise
14:11 KyleHa I really liked PBP.  It made me excited to go do some programming.
14:11 colomon moritz_: except at this point I don't anticipate creating any further substantial Perl 5 programs.
14:11 moritz_ he :-)
14:11 KyleHa There's advice that applies to languages other than Perl 5.
14:11 moritz_ well, Perl 6 BP is very thin for now
14:11 moritz_ it's only in my head
14:11 moritz_ and it contains the rule "use whitespaces around infix operators"
14:11 Su-Shee moritz_: think harder, maybe the printer gets off. :)
14:12 moritz_ and then "be consistent in your use of _ and - in identifier names"
14:12 moritz_ and that's about it
14:12 Juerd Perl 6 introduces some style choice points
14:12 Juerd Like :foo(5) versus foo => 5 where both work.
14:13 bpetering Juerd: true - i guess it'll take some time for the community to figure out what "works" (stylistically)
14:13 Juerd And how acceptable will it be to use <> for numbers? Some people cringe at seeing qw(5 6 7) in Perl 5 already.
14:14 moritz_ maybe <...> just needs to be smarter about numbers :-)
14:15 * Juerd mostly wonders about .= though
14:15 Juerd Especially regarding whitespace and its overall reception.
14:17 moritz_ I find the sue of :foo($thing) vs. foo => $thing mostly depends on how $thing looks
14:17 moritz_ if it's a larger expression, I prefer the colonpair form
14:17 moritz_ because it makes it easier to see where the expression (and thus the pair) ends
14:19 xinming_ joined #perl6
14:19 Juerd I tend to write a single key/value pair per line
14:20 Juerd that is, whenever one of the expressions becomes large.
14:21 moritz_ and if one of them spans multiple lines, you're probably better off with a temporary variable
14:22 Juerd Never!
14:22 Juerd Or maybe I will :)
14:23 * Juerd remembers writing a 200 line ? : tree during his first year of Perl.
14:23 Juerd This was before I found a good way to indent these things too.
14:24 Juerd (Which is "condition\n    ? expr\n    : expr\n")
14:24 Juerd Oh! Sorry!
14:24 Juerd (Which is "condition\n    ?? expr\n    !! expr\n")
14:26 nihiliad joined #perl6
14:31 bpetering moritz_: it'd help if the chapters in src/ were numbered
14:31 slavik do the docs in progress contain working code samples
14:33 moritz_ bpetering: yes, but I fear that right now it would also mean frequent renumbering :/
14:33 moritz_ slavik: yes (except where noted in the comments)
14:33 slavik ok, ty
14:34 bpetering moritz_: well, where's the lexical conventions example? (that chromatic wrote)
14:34 moritz_ bpetering: I don't know of such an example
14:35 bpetering moritz_: sorry, misunderstanding
14:35 bpetering (just reread earlier thing you said)
14:36 bpetering so one last bit before i'm off for the evening...
14:37 bpetering in about-examples.pod you say they should have nice features... would you say your trouble with the basics is they have no nice features to show off?
14:37 bpetering "use some nice features", rather
14:38 rfordinal3643 joined #perl6
14:38 moritz_ no, that's not the problem
14:38 moritz_ the problem is to come up with an example that is
14:38 moritz_ 1) useful
14:38 moritz_ 2) not contrived
14:38 moritz_ 3) demonstrate what we want to demonstrate
14:39 moritz_ 4) not using things we want to explain later, at least not in ways that are essential or hard to understand
14:40 bpetering ... and what exactly do we want to demonstrate? :)
14:40 moritz_ lexical conventions, basic control structures, literals, variables, basic operators
14:41 moritz_ arrays, hashes, function and method calls
14:41 bpetering does there need to be any element of "this is why Perl 6 is cool"?
14:41 moritz_ doesn't need to be one example
14:41 moritz_ bpetering: it would be preferrable, but IMHO it's not essential
14:41 bpetering (or can we just let the basics be the basics?)
14:42 moritz_ perl 5 programmers will notice that 'if' without parentesis is cool
14:42 moritz_ and that invariant sigiils for hash and array dereferencation are kinda more simple
14:42 bpetering so: what does Perl 6 give you in the basics that's cool? :)
14:42 moritz_ etc.
14:43 moritz_ compile time variable checking ("use strict"), mini-namespaces through sigils, predictive parsing
14:43 moritz_ poerful array and hash handling
14:43 bpetering so (TOL), perhaps some problem where Perl 6's cool basics are helpful... ?
14:44 bpetering (i.e. in some concrete way - save you time, money, hair...)
14:44 moritz_ yes
14:45 bpetering ok, i think i have a framework for thinking up (or about) examples. thanks :)
14:46 moritz_ \o/
14:46 bpetering moritz_: thank you, you've been very helpful. I'll sleep on all that and get back to you.
14:48 bpetering night all!
14:48 TSa I read the chapter on OO, unfortunately it does not really explain type narrowness abstractly
14:48 jnthn o/
14:49 bpetering see ya jnthn :)
14:49 jjore joined #perl6
14:49 jnthn TSa: Type narrowness in what sense?
14:49 jnthn TSa: The ideas of type narrowness as they apply to multiple dispatch are covered in the MMD chapter, where they're more important.
14:49 TSa well in the way it influences dispatch choice
14:50 jnthn Aye. That belongs in the MMD chapter more than the OO chapter though, I'd say.
14:51 moritz_ and it's described in the MMD chapter already
14:51 jnthn Aye.
14:51 TSa But I think type narrowness is still underspecced
14:51 jnthn TSa: I disagree. S12 is quite clear, and there's a solid implementation.
14:51 moritz_ and there are solid tests
14:51 jnthn Right.
14:52 moritz_ which also count as part of the official spec, to some degree
14:52 jnthn TSa: What aspect of it do you feel needs to be spec'd in more detail?
14:52 TSa the relation between roles and classes
14:53 moritz_ basically all of the narrowness is defined in terms of type conformance
14:53 moritz_ independently of whether it's achieved by classes or roles
14:53 moritz_ (afaict)
14:54 jnthn Basically, T1 is narrower than T2 if T1 !=== T2 and T1 ~~ T2.
14:55 jnthn What kind of types T1 and T2 are isn't really of interest to the candidate sorter.
14:55 jnthn Just one's acceptance of the other.
14:55 TSa OK, but this shifts the problem into ~~
14:56 jnthn Yes; those semantics are described in S03.
14:56 jnthn I agree it's a tad spread out. :-)
14:58 TSa basically Foo ~~ Bar means Foo.does(Bar) but this doesn't cover cases where two classes doing the same role are compared
14:59 jnthn I don't follow.
14:59 moritz_ what do you mean by "doesn't cover cases"?
14:59 jnthn If C1 and C2 both do R, then C1 ~~ R is true, C2 ~~ R is true, but it doesn't imply anything at all about C1 ~~ C2 or vice versa.
14:59 lachs joined #perl6
15:03 colomon moritz_: Maybe what the book needs for a first chapter is a classic sort of basic Perl 5 script, redone in Perl 6.  Reading a file, scanning through it to build up some data, and reporting that.
15:03 moritz_ colomon: for example, yes
15:05 lasse_ joined #perl6
15:08 jnthn moritz_: Were you one of the people getting segfaults in autothreding.t?
15:08 moritz_ jnthn: yes
15:09 jnthn moritz_: Any chance you could check out latest pccupdate branch?
15:09 jnthn moritz_: And try building it and running that test file under it?
15:09 moritz_ jnthn: sure, just as "sec" :-)
15:09 jnthn Yes, it'll take a little more than a "sec". ;-)
15:10 justatheory joined #perl6
15:11 Psyche^ joined #perl6
15:11 jnthn moritz_: I think this branch is almost there.
15:11 jnthn I thought it *was* there, then just discovered something failing...
15:11 pmichaud good morning, #perl6
15:11 jnthn oh hai pmichaud
15:11 moritz_ good morning pmichaud
15:15 moritz_ jnthn: that test is all good on amd64
15:15 TSa jnthn: if there are multis on C1 and C2 don't they produce ambiguities a lot?
15:16 moritz_ why should they?
15:16 TSa by both doing R that is
15:16 moritz_ no, they don't
15:17 moritz_ if you have a multi (R, R), then objects from C1 and C2 can dispatch to that
15:17 moritz_ if you have a multi with C1 in the signature, objects from C2 can't dispatch to that.
15:17 moritz_ no ambiguty whatsoever
15:17 jnthn moritz_: Excellent!
15:18 jnthn moritz_: Feel free if you want to heat your room to run a full spectest, btw, so we can see if we're getting matching fails.
15:18 moritz_ jnthn: doing that now
15:18 jnthn moritz_: Thanks :-)
15:18 moritz_ jnthn: I'm not in the same room as that computer anyway
15:18 moritz_ and a laptop doesn't produce that much heat :-)
15:19 jnthn TSa: What moritz said really. The test for "does this value satisfy this type" when considering a candidate is just $val ~~ T
15:20 jnthn TSa: Type comparrison and questions of whether a value does a type all just fall out of smart-matching definitions.
15:22 TSa what I think is: shouldn't be there two dispatch targets for C1 and C2 R doers?
15:22 TSa I mean with a generic (R,R) you can't do class specific stuff
15:22 jnthn Note that if C1 ~~ R and C2 ~~ R, then the ordering of signatures would be e.g. with :(C1 $x) and :(C2 $x) at the same level, and :(R $x) at a looser level.
15:23 jnthn Given that C1 and C2 are not in any kind of relationship.
15:23 moritz_ TSa: there's C1 as a dispatch target for C1, C2 for C2 and R for both
15:23 moritz_ TSa: what more could you want to have?
15:24 jnthn So if you pass an instance of C1 or C2 then those more specific candidates always win. The R one is only considered if we have e.g. some type C3 ~~ R and no explicit candidate wanting a C3, so it falls back to the R one.
15:28 jnthn moritz_: Seems calling_sets.t fails due to some issue relating to deferal and multis, may be some other fail in that area. Not sure yet.
15:28 jnthn (just on S12 now)
15:29 moritz_ jnthn: arith.t and dollar-bang.t fail due to things added in trunk and the tests
15:29 moritz_ unicode.t still fails as it did before
15:29 jnthn Yeah, unicode.t I'd not expect to be fixed.
15:29 * moritz_ still in S03
15:29 jnthn OK, so you think if I merge from trunk then dollar-bang.t and arith.t will be OK?
15:30 moritz_ yes
15:30 jnthn oh hmm. None of the deferal tests fail, just calling_sets.t
15:31 jnthn And t\spec\S12-methods\multi has 2 unexpected (to me too) wins.
15:32 jnthn oh wtf.
15:32 jnthn Those new passes related to .*
15:32 jnthn :-/
15:32 jnthn Which is what calling_sets.t complains about.
15:32 moritz_ uhm.
15:33 moritz_ maybe the tests are inconsitent?
15:33 moritz_ wouldn't be the first time... ;-)
15:33 jnthn Not sure, need to dig in and look more deeply.
15:33 * jnthn makes another cup of tea first.
15:37 jnthn moritz_: The tests in multi.t look sane.
15:37 jnthn Well, the expected output does.
15:37 jnthn I'm still a little curious about what the original ticket was about...
15:38 jnthn Oh
15:38 jnthn The passes are probably bogus.
15:39 jnthn (e.g. yes, there's a bug originally, but the reason we pass them now is because of a different bug introduced, not a fix to the original one)
15:41 pmichaud nqp comparison...
15:41 pmichaud http://nopaste.snit.ch/18477   # code generation under old nqp
15:41 pmichaud http://nopaste.snit.ch/18478   # code generation under new nqp
15:42 jnthn pmichaud: ooh :-)
15:42 moritz_ wow
15:42 colomon half the length is the key here?
15:42 jnthn pmichaud: How does it know it's safe to flatten the scopes?
15:42 * moritz_ wonders if there's a reasonbly simple way to optimize out these find_lex calls
15:42 pmichaud jnthn: no lexicals declared in the blocks
15:42 jnthn pmichaud: Ah, OK.
15:42 jnthn Simple heuristic.
15:43 pmichaud moritz_: optimizing out find_lex isn't so easy at the moment
15:43 jnthn No lexicals of the same name declared in the inner block may be also get-away-able with, but it'll get trickier.
15:43 jnthn Is this done at PAST level?
15:43 pmichaud no, NQP level
15:43 jnthn Ah.
15:43 pmichaud at PAST level is probably over-optimization
15:44 jnthn Yeah, maybe.
15:44 jnthn OTOH, Rakudo will probably end up re-inventing this wheel...
15:44 jnthn And a bunch of other langauges.
15:44 pmichaud it's a simple wheel, actually.
15:45 moritz_ rakudo needs to be more careful, because of implicit variable declarations like $_ and $/, no?
15:45 pmichaud correct.
15:45 jnthn I'm not sure "the wheel is simple" is an excuse for encouraging re-invention of it. ;-)
15:45 jnthn moritz_: Yes, unfortunately.
15:45 pmichaud jnthn: the rules for what's optimizable are likely to be slightly different from one language to the next
15:46 jnthn pmichaud: Yes, true.
15:46 pmichaud because this optimization also affects things like OUTER::, CALLER::, etc.
15:46 jnthn Yeah, we'd have to look for those too.
15:46 jnthn Anyway, it'll speed up compilation.
15:46 jnthn Even if not Rakudo's generated code yet.
15:46 jnthn Which is still a win.
15:47 moritz_ aye
15:47 pmichaud so since at present there's not a clear-cut line about when to optimize or when not to, I think it's better to leave it up to the HLLs
15:47 pmichaud if we fine a common baseline, we can put it into PAST
15:47 jnthn OK, makes sense.
15:48 jnthn pmichaud: I'm one test file with problems away from a merge.
15:58 rfordinal3643 left #perl6
16:06 dalek nqp-rx: 79ebf77 | pmichaud++ | src/NQP/ (2 files):
16:06 dalek nqp-rx: [nqp]:  Add named arguments to sub signatures.
16:06 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/79ebf77b58553694bc52fb30990b68aa1f54a021
16:06 dalek nqp-rx: 3fa19de | pmichaud++ | src/NQP/Actions.pm:
16:06 dalek nqp-rx: [nqp]:  Add an optimization to inline immediate blocks w/o lexical declarations.
16:06 dalek nqp-rx: review: http://github.com/perl6/nqp-rx/commit/3fa19def1406ad8169573385746fe4ac3b9c6471
16:07 __ash___ joined #perl6
16:07 fax joined #perl6
16:08 alester I would just like to state, entirely at random, that I don't find $foo[1] at all confusing, and I'm not sure I see the benefit of @foo[1] instead.
16:08 alester Other than for the newbeis.
16:09 moritz_ alester: but how long did it take you get to that point? what about references?
16:09 alester what about htem?
16:09 alester oh, where it made sense?
16:09 alester no time at all
16:09 alester I think I stumbled on it once, maybe, and then "OK, that makes sense"
16:09 moritz_ well, I find the syntax for slices on references and $#-ing references still a tad confusing
16:09 moritz_ and I still have to look them up when I need them
16:10 alester PERHAPS I HAVE A MORE POWERFUL MIND THAN ALL OF YOU
16:10 moritz_ that's probably it :-)
16:10 pmichaud in p6, we have both $foo[1] and @foo[1]  and they refer to two different vars
16:10 alester None of this is really relevant.  I just was running into it in some code I'm writing and thought about "Why IS @foo[1] better?"
16:10 moritz_ std: say $#a
16:11 p6eval std 28919: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of $#a variable; in Perl 6 please use @a.end instead at /tmp/PlfgJFekW7 line 1:␤------> [32msay $#a[33m⏏[31m<EOL>[0m␤FAILED 00:01 107m␤»
16:11 moritz_ because it's easier :-)
16:11 alester I will take your word for it.
16:12 TimToady it reduced mental backtracking in mere mortals whose minds are less powerful than yours
16:12 TimToady *reduces
16:12 alester TimToady: Is that the reason?  Just to make it easier for the new programmers to wrap their heads around?
16:12 alester Not that that's not a good reason in itself.
16:12 alester Maybe I'm just very used to it now. :-)
16:12 TimToady any time you say "the reason" about Perl 6, it's inaccurate; there are always many reasons
16:12 moritz_ it also makes it simpler for old programmers to wrap their heads around
16:13 KyleHa I lack confidence in this change and would appreciate a review from someone with a MORE POWERFUL MIND than mine:  http://dev.pugscode.org/changeset/28915
16:13 alester I guess my brane is just wired now to think $ = scalar = I only want one
16:13 alester and have forgotten what it was like a decade ago. :)
16:13 TimToady I have faith in your brane plasticizers
16:14 moritz_ KyleHa: that test needs to have $( .... ) around the second argument to is()
16:14 edenc isn't @foo[1] equivalent to "I want only one" in p5 too?
16:14 moritz_ (unless the binding to the signature of is() imples taht)
16:14 alester edenc: Yes, but in p5 @foo[1] is a one-element list
16:14 moritz_ edenc: @foo[1] = thing() imposes list context on thing()
16:15 KyleHa I think the $ = scalar, @ = array, and % = hash  really went out the window with references.  It all made sense in Perl 4, but after that I started to find it confusing.
16:15 TimToady the problem in Perl 5 is that it wants to know list vs scalar at compile time
16:15 TimToady Perl 6 doesn't need to know that anymore
16:15 alester KyleHa: Yeah, you're right, i DO get goofed up on references all the time.
16:15 edenc right, so the problem with the p5 approach isn't really the sigil, it's the context side-effect
16:16 KyleHa moritz_: Are we looking at the same test?  I see is_deeply, and the second argument is $rt65988  That alone needs a $() wrapper?
16:16 moritz_ KyleHa: no, I was just confused
16:16 TimToady any time you say "the problem" about Perl 5, you're also oversimplifying :)
16:16 edenc haha
16:16 alester You know what I love about LarrY?
16:16 alester He's just so Larry.
16:17 alester :-)
16:17 moritz_ KyleHa: looking again I think the test is fine
16:17 TimToady in spots
16:17 KyleHa moritz_: I'm pleasantly surprised.  Thank you for your eyes!
16:18 * moritz_ recovers his eyes. You're welcome
16:18 TimToady jnthn: on my ($a,$b,$c), it's a signature still; the remark was in the context of deciding whether a block already had a sig so we know whether placeholders are valid
16:19 TimToady if it's not a sig, you can't parse my (Int $x, Str $y) = 1,'foo';
16:20 jnthn TimToady: My problem with it being a sig is what things like my (Int :$x, Str $y?) = ... actually mean.
16:20 TimToady std: (Int $x, Str $y)
16:20 p6eval std 28919: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/iWU1A7ynPO line 1:␤------> [32m(Int [33m⏏[31m$x, Str $y)[0m␤    expecting any of:␤       bracketed infix␤  infix stopper␤    standard stopper␤ statement modifier loop␤  terminator␤Other potential difficulties:␤
16:20 p6eval ..Variable $x is not …
16:20 TimToady yes, well, we can certainly prohibit anything that doesn't make sense in the context of mere assignment
16:20 jnthn OK, so we parse a sig, then check and complain if it's too elaborate?
16:22 TimToady the only alternative is to prohibit individual types on list assignments, which also seems badish
16:22 TimToady but we don't know whethere we'll get = or := till after the sig is parsed
16:22 jnthn True.
16:22 jnthn And := means we then bind instead.
16:23 TimToady so when = is reduced or checked we need to see if the left side is suitable in any case
16:23 jnthn Which invokes the signature binder, and then those things all make sense...
16:23 jnthn TimToady: I did have a question on this area too though.
16:23 TimToady which is a semantic check, not syntactic
16:23 jnthn Imagine I do this:
16:23 TimToady std: my (1) = 2;
16:23 p6eval std 28919: OUTPUT«ok 00:02 113m␤»
16:24 jnthn my (Int $x, Int $y where { $x < $y }) := foo();
16:24 jnthn This will unpack the capture that foo() returns, yes?
16:24 TimToady yes, unless it's a parcel :)
16:25 jnthn Hmm
16:25 jnthn Explain?
16:25 * jnthn is lost on that point
16:25 TimToady doesn't matter, since binding would turn it into a capture in any case
16:25 jnthn Ah, OK.
16:25 jnthn If we already had variables $x and $y declared somewhere, could I also write:
16:25 TimToady just not sure that return values want to commit to the capture sheep/goats sort
16:25 jnthn :(Int $x, Int $y where { $x < $y }) := foo();
16:25 jnthn ?
16:26 * moritz_ still needs a Definifite Guide to Captures and Parcels :-)
16:26 TimToady bare sigs don't declare anything
16:26 jnthn And in this case, will it actually be updating the $x and $y?
16:26 TimToady and don't refer to external vars either
16:26 jnthn OK, so how does the actual binding of this signature work?
16:27 jnthn I mean, it needs to create some lexpad to operate on.
16:27 jnthn Otherwise, it's nowhere to stash $x and $y before it runs that "where" block.
16:27 TimToady yeah, it'd need a pseudo-lexpad of its own
16:27 TimToady it'd be like -> $x, $y without a block, if we allowed such a thing, which we don't
16:27 jnthn That's...ouch-ish. But I guess I can cope.
16:28 jnthn So basically the above example is only useful in terms of checking the returned values actually match the signature?
16:28 TimToady bare sigs aren't all that useful currently, but making them usefuller is problematics
16:28 colomon joined #perl6
16:28 TimToady *ic
16:28 jnthn OK, so it's basically useless. :-)
16:29 jnthn Is thare a way at all to take a signature and update existing variables?
16:29 jnthn Or not?
16:29 jnthn something (Int $x, Int $y where { $x < $y }) := foo();
16:29 TimToady only with $!foo and $.foo
16:31 jnthn OK
16:31 TimToady perhaps supersede could do it
16:31 jnthn Well, if you do decide to come up with a way, keep this above example in mind.
16:31 jnthn Because we have a problem if that where block fails, and we already updated $x and $y.
16:32 ejs1 joined #perl6
16:32 jnthn And we need to have put them in place for the where block to be able to find its variables.
16:32 TimToady a good argument for keeping it in its own pseudopad
16:32 jnthn Oh, and then migrating the results back if it works out?
16:32 jnthn Hmm
16:32 jnthn OK.
16:33 jnthn We're probably going to need a whole pseudo-callframe to do this properly, not just a pseudopad. :-/
16:34 jnthn Do we care about such things in the case of a "my"?
16:34 __ash__ joined #perl6
16:34 jnthn my (Int $x, Int $y where { $x < $y }) := foo();
16:34 jnthn Here, if the bind fails, we throw an exception anyway.
16:34 TimToady was trying to work out a lambda-ish desugar of that
16:34 jnthn I say we scrub bothering with a pseudopad.
16:34 jnthn In that case.
16:35 TimToady it could optimize away probably
16:35 jnthn If somebody is silly enough to catch the exception where a bind failed and resume it, it's their own stupid fault if they've got inconsistent stuff in the lexpad. :-)
16:35 jnthn Oh
16:35 jnthn Not to mention that bind exceptions probably ain't resumable anyway.
16:36 TimToady someone will get cute with the gramar and add multisigs to my...
16:36 jnthn Fine. They can deal with the guts nastiness too then. :-)
16:37 jnthn In the meantime, I don't really see an incentive to build a pseudo-pad there.
16:38 jnthn (Also, that's going to be...nasty...)
16:38 jnthn And nasty and mostly useless = low priority. ;-)
16:39 TimToady now thinking about 'where' as a general rvalue assertion that fails if it doesn't pass...
16:40 TimToady $odd = get_odd() where $odd % 2
16:40 jnthn Cute. :-)
16:40 jnthn Apart from you get exactly the same issue.
16:40 alester Now, how is it in Perl 5 I take a slice of a hashref? :-)
16:40 TimToady but that argues for a fail rather than a die, I think
16:41 jnthn Wait, is that a check before or after the call?
16:41 TimToady after
16:41 jnthn And did we update $odd yet or not?
16:41 TimToady yes
16:41 cdarroch joined #perl6
16:41 TimToady but I suspect it would confuse people
16:41 jnthn Yes, me too.
16:41 jnthn Given I had to ask two questions to get there. :-)
16:41 TimToady so nevermind
16:42 jnthn :-)
16:42 TimToady though we already have 'when' for a before check
16:43 alester so what is this in p6?
16:43 alester my %row = %{$row};
16:43 alester my $gridkey = join( "\t", @row{qw( ctr ctr2 agency fund loc ) } );
16:43 alester %row{ qw( ... ) }
16:43 TimToady std: my %row = %{$row};
16:43 ruoso joined #perl6
16:43 p6eval std 28919: OUTPUT«[31m===[0mSORRY![31m===[0m␤Obsolete use of %{$row}; in Perl 6 please use %($row) instead at /tmp/J4VmNXdauJ line 1:␤------> [32mmy %row = %{$row}[33m⏏[31m;[0m␤FAILED 00:02 105m␤»
16:43 alester and I don't have to worry about the sigil?
16:43 alester so how to do the deref?
16:44 alester %($row){ qw( foo bar bat ) }; ?
16:44 jnthn TimToady: I already forgot how that differs from "if"...
16:44 TimToady tests $_
16:44 alester std: %($row){ qw( foo bar bat ) }
16:44 p6eval std 28919: OUTPUT«Potential difficulties:␤  Variable $row is not predeclared at /tmp/dbILakcxUn line 1:␤------> [32m%($row[33m⏏[31m){ qw( foo bar bat ) }[0m␤Undeclared routines:␤   bar used at line 1␤       bat used at line 1␤       foo used at line 1␤       qw used at line 1␤ok 00:01 108m␤»
16:44 TimToady what is in $row?
16:44 alester oh wait, qw is dfferient
16:44 TimToady qw still works
16:44 jnthn $ro<foo bar bat>
16:45 alester std: my $row = { foo => 1, bar => 1 }; %($row){ ('foo','bar') };
16:45 p6eval std 28919: OUTPUT«ok 00:02 112m␤»
16:45 alester std: my $row = { foo => 1, bar => 1 }; say %($row){ ('foo','bar') };
16:45 p6eval std 28919: OUTPUT«ok 00:02 113m␤»
16:46 TimToady std: my $row = { foo => 1, bar => 1 }; say $row<foo bar>
16:46 p6eval std 28919: OUTPUT«ok 00:02 110m␤»
16:46 TimToady you don't have to tell it $row is a hash in P6, the <> subscript will assume it
16:46 alester Well, results aside, I like the syntax better.
16:46 TimToady std doesn't do results :)
16:46 alester you'd think it would give output, right?
16:46 alester from my "say"?
16:47 TimToady reakudo: my $row = { foo => 1, bar => 1 }; say $row<foo bar>
16:47 TimToady rakudo: my $row = { foo => 1, bar => 1 }; say $row<foo bar>
16:47 p6eval rakudo 657d55: TIMED_OUT
16:47 TimToady rakudo gives different results :)
16:47 TimToady but std is just a parser
16:47 alester well, anything has to be better than my saving the hashref to a hash and derreferencing the hash because I can't remmeber the hash slice syntax for references. :-)
16:48 TimToady you don't have to remember that anymore, which is another reason for the sigil change
16:48 [particle] anything you don't have to remember is better than anything you can't remember
16:48 alester So it all comes full circle. :-)
16:49 TimToady rakudo: my $row = { foo => 1, bar => 1 }; say $row<foo bar>
16:49 p6eval rakudo 657d55: TIMED_OUT
16:49 beggars joined #perl6
16:49 TimToady rakudo: say 42
16:49 p6eval rakudo 657d55: OUTPUT«42␤»
16:50 TimToady rakudo: my $row = { foo => 1, bar => 1 }; say $row<foo bar>
16:50 p6eval rakudo 657d55: TIMED_OUT
16:50 jnthn Locally, outputs 11
16:51 jnthn p6eval fail
16:52 TimToady I think 657d55 is an antifeature, and I don't want to pay for it :)
16:53 KyleHa rakudo: class A { multi method foo($f) { say $f} }; my A $aa .= new; $aa.foo()
16:54 p6eval rakudo 657d55: TIMED_OUT
16:54 payload joined #perl6
16:55 ejs joined #perl6
16:57 stephenlb joined #perl6
17:04 ejs joined #perl6
17:06 Util joined #perl6
17:08 abra joined #perl6
17:08 justatheory joined #perl6
17:14 arthur-_ joined #perl6
17:20 __ash__ joined #perl6
17:26 lisppaste3 moritz_ pasted "spectest summary for jnthn++ (nothing unexpected here)" at http://paste.lisp.org/display/89373
17:27 jnthn moritz_: Wonderful, thanks.
17:27 jnthn I may just about ahve a fix for calling_sets.t
17:28 moritz_ the socket failures should also go away when you merge into trunk
17:28 colomon that's with the new parrot? 72 minutes run time?
17:28 moritz_ 4332 wallclock secs (13.87 usr  1.89 sys + 8288.58 cusr 138.38 csys = 8442.72 CPU)
17:29 moritz_ rakudo: say 4332 / 60
17:29 p6eval rakudo 657d55: OUTPUT«72.2␤»
17:29 moritz_ (two cores)
17:30 jnthn colomon: It appears parsing got notably slower. :-(
17:31 colomon jnthn: which is bad, though not as bad as I got the impression from what you said this morning.
17:31 colomon I mean, we were running at what, about 45 minutes before?  72 minutes is just regressing back to the performance we had a few months ago.
17:32 colomon .oO(as long as we can win it back relatively quickly...)
17:33 jnthn colomon: I think it's fair to say that we've lost it now in a different place than we gained it before.
17:34 jnthn e.g. the dispatchy/binding benchmarks that I sped up have only slipped a little, not on the same level.
17:34 jnthn And startup time only slipped a tiny bit too.
17:35 colomon Do you understand why parsing has slowed down?
17:35 moritz_ maybe we can convince some #parrot folks to profile rakudo parsing and optimize
17:35 moritz_ it
17:35 jnthn No, but I haven't spent much time analysing it either.
17:35 PerlJam it's all pmichaud's fault!  :)
17:36 jnthn Yeah! ;-)
17:36 * jnthn hides
17:36 TimToady the basic problem will likely be the same as usual; Perl 6 defines some things declaratively that are being multiply interpreted at run time unnecessarily
17:36 jnthn moritz_: We could, but since pmichaud++ has re-done PGE differently, it may be better spending effort on making the new one perform better.
17:37 TimToady do stuff at INIT time rather than CHECK time falls into the same category as not doing DFA
17:37 moritz_ this time parrot is the problem ;-)
17:37 desertm4x joined #perl6
17:37 colomon would those new parrot profiling tools help?
17:37 TimToady "a poor workman blames his tools" :P
17:37 jnthn colomon: They do help, for sure.
17:38 jnthn colomon: I shaved a chunk off Rakudo's startup time in a single patch after profiling startup, for example.
17:38 colomon jnthn: I meant in this specific case.
17:38 jnthn oh
17:38 PerlJam There are new parrot profiling tools?
17:38 zloyrusskiy joined #perl6
17:38 jnthn They may. Would have to run a profile and see. ;-)
17:38 colomon I haven't looked at them enough to know if they profile real time or just number of parrot calls.
17:38 moritz_ PerlJam: there's a profiling runcore for parrot
17:38 justatheory joined #perl6
17:38 moritz_ real time
17:39 PerlJam hasn't there always been a profiling runcore?
17:39 zloyrusskiy joined #perl6
17:39 jnthn PerlJam: I think there historically was one.
17:40 jnthn PerlJam: But I don't think it did real time, or output something all that useful.
17:40 jnthn PerlJam: What's output now can be e.g. turned into something I can visualize and analyze with tools like KCacheGrind.
17:40 jnthn Having a huge bunch of numbers and times alone isn't so useful. :-)
17:41 PerlJam well ++ to whoever improved that!
17:41 PerlJam (probably chromatic, he's always doing stuff like that)
17:41 jnthn cotto++ and chromatic++
17:42 PerlJam now we just need to get them to exercise their profiling-fu on rakudo proper  :)
17:43 jnthn :-)
17:43 jnthn Well, anyone can do some analysis. :-)
17:43 jnthn The other nice thing is that you'll be able to use the same tool to profile your own apps too.
17:46 [particle]1 joined #perl6
17:46 quux jnthn blogged "Signature introspection": http://use.perl.org/~JonathanWorthington/journal/39810?from=rss
17:47 * PerlJam just tried the profiling runcore and realized they weren't kidding when they said it was slow
17:47 jnthn ;-)
17:48 jnthn No, but it produces good info.
17:48 jnthn Wow, is that quux but implemented in Perl 6?
17:48 jnthn *bot
17:48 * [particle]1 wonders if that runcore caches profile info in-memory or writes directly to disk
17:48 TimToady otoh, if you're not careful, profiling will lead you to doing micro-optimizations instead of refactoring
17:49 jnthn TimToady: Aye, though I think in the case of Rakudo, you'd be hard pushed to say we suck at choosing to refactor. ;-)
17:50 jnthn moritz_: pccupdate now should be ready - I'm doing a final pre-merge spectest run.
17:50 pmichaud yay
17:50 PerlJam jnthn++
17:50 jnthn moritz_: Should have calling_sets.t fixed.
17:50 jnthn moritz_: And we get to hang on to those two new passing spectests too. ;-)
17:50 TimToady I still get the sense that there's lots of stuff happening at run time that should be happening at compile time, simply because parrot doesn't provide decent freeze/thaw
17:50 jnthn So we can close an RT ticket after the merge.
17:51 jnthn TimToady: Yes, we should really be able to avoid re-doing a bunch of work.
17:51 pmichaud TimToady: your sense is correct
17:51 [particle] patches welcome :P
17:51 TimToady I'm just worried you'll work on making INIT faster and faster, when the fastest is to not do it at all
17:52 pmichaud TimToady: well, since we're (incorrectly) doing INIT at runtime, every optimization we add there tends to improve runtime also :)
17:54 rgrau joined #perl6
17:54 jnthn TimToady: I agree, but profiling/improving INIT time can be a couple of hours that get a notable win now, whereas re-doing Parrot's freeze/thaw is a rather bigger task. :-|
17:54 TimToady well, INIT at run time is correct, it's what you put into INIT that might not be; I'll assume you mean that :)
17:55 jnthn TimToady: Not saying it shouldn't happen, but I don't see improvements there landing all that soon.
17:55 TimToady as long as you're aware that it might be a false minimum :)
17:56 jnthn Oh, for sure.
17:56 TimToady and keep an eye peeled for when the quantum tunnel opens up
17:57 jnthn Heh. Quantum tunnels in Parrot don't tend to just open up, they take lots of prodding to get.
17:58 * PerlJam plays with kcachegrind for the first time
17:58 PerlJam cool
17:58 TimToady "This Parrot has decohered!  Nah, it's just pining for the fnords."
17:58 PerlJam we sure do spend a lot of  time generating those meta ops
17:59 * PerlJam wonders if NYTProf outputs in a valgrind-ish format
18:00 TimToady another thing you know at CHECK time is which ops have actually been called
18:00 jnthn PerlJam: Yes, I noticed that one.
18:00 tuxdna joined #perl6
18:00 TimToady so needed metaops can be generated at CHECK time
18:01 jnthn TimToady: Or lazily on first use, but certainly not the whole shebang at startup.
18:01 pmichaud can't be lazy on first use, unless you count namespace lookups as a use
18:02 jnthn meh
18:02 TimToady lazily still does something at run time that could be done at compile time, which okay for compile-and-go
18:02 jnthn True.
18:02 pmichaud I agree that CHECK is much better.
18:02 TimToady but less good for compile-once-run-many
18:02 jnthn TimToady: Well, in theory we could generate the whole lot while building the setting.
18:02 jnthn TimToady: The cost is a bigger PBC file.
18:02 TimToady no we couldn't
18:03 TimToady there are infinitely many
18:03 pmichaud there's an infinite number of me....
18:03 pmichaud right
18:03 jnthn ah
18:03 justatheory jnthn: I think that might hurt my gut.
18:03 jnthn OK, in terms of what we do *now*, we could...
18:03 TimToady $a XRXRXRXR* $b is valid
18:03 pmichaud what we do *now* has always been considered a cheat.  :)
18:03 jnthn pmichaud: True. I'm just now sure how long we expect to keep cheating. ;-)
18:04 TimToady yes, well, I'd considered cheating differently to still be cheating :)
18:04 PerlJam Will Rakudo* cheat?  :)
18:04 pmichaud jnthn: well, with the new parser in place we can do a lot less of it
18:04 pmichaud PerlJam: no idea yet, depends on priority
18:04 pmichaud currently having true metaops is lowish priority
18:05 jnthn Depends if we already did our high-pirority tasks and are bored. ;-)
18:05 jnthn Or somebody just sends in a patch. ;-)
18:05 pmichaud or if it's easily added
18:05 jnthn Or that.
18:06 jnthn We may not *need* to do massive amounts of generation of stuff though.
18:06 pmichaud TimToady: S06:402   uses    PKG::{'infix:<+>'}    .   Should there be an & there?  (Same for S06:407 and PKG::{'circumfix:<< >>'}.)
18:06 pmichaud only generating the metaops we need will save a huge amount of startup.
18:07 jnthn Aye.
18:07 jnthn It's one of our biggest startup time sinks right now.
18:07 TimToady you could just desugar them all to higher-order functions in the parse :)
18:07 pmichaud been thinking of that also
18:08 pmichaud but it does bring up a question -- when we generate a metaop, where does it live?
18:08 TimToady yes, symbol table functions should have &, though I'm not clear on why we have functions living in PKGs there, if those are global
18:08 pmichaud lexical?  package?  if package, which package?
18:08 TimToady since we don't look in packages anymore
18:09 * pmichaud adds his question as Pm-3 to misc/pm.txt .
18:09 TimToady I guess it's using PKG to mean namespace including the lexpad
18:09 pugs_svn r28920 | pmichaud++ | Add Pm-3 asking about location of metaops.
18:10 jnthn Yay, all of S12 is WIN.
18:11 * jnthn waits for rest of tests to pass
18:11 KyleHa It must need more testing.  8-)
18:11 jnthn ;-)
18:11 PerlJam jnthn: did you push this stuff in a branch already? (several of us could be testing if you did :)
18:13 jnthn Yes
18:13 jnthn pccupdate
18:14 jnthn moritz++ did some testing earlier.
18:14 jnthn But that was before I fixed a fail.
18:16 sbp joined #perl6
18:17 nsh joined #perl6
18:17 brunov joined #perl6
18:18 KyleHa pccupdate mostly passes for me.
18:19 jnthn KyleHa: nopaste ya fails
18:20 lisppaste3 KyleHa pasted "pccupdate spectest results" at http://paste.lisp.org/display/89376
18:22 colomon Any hints on how to turn on the parrot profiling?
18:22 pmichaud colomon: parrot -Rprofiling ...
18:22 PerlJam colomon: parrot -Rprofiling perl6.pbc ...
18:22 colomon oooo, so it comes built-in by default and you just need a command line flag to turn it on?
18:22 PerlJam colomon: also, see parot/tools/dev/pprof2cg.pl
18:23 PerlJam colomon: aye.
18:23 pmichaud all you need is a command line flag, and either a really fast computer with lots of memory or a fair bit of patience
18:23 colomon sweet!
18:23 PerlJam pmichaud: or to run a *really* small program through it  :)
18:24 pmichaud PerlJam: somehow I can't think of Rakudo as being a really small program.
18:24 colomon pmichaud: luckily I have a quad core 64-bit Linux setup in 8gigs of RAM for $work.  :)
18:24 colomon PerlJam++, pmichaud++
18:26 * colomon wonders if he can get a profile started on the big box at home before the MBP battery gives out...
18:27 colomon parrot -Rprofiling perl6.pbc is the equivalent of the perl6 "command"?
18:27 PerlJam colomon: right
18:28 * colomon is now running make test on home box, 8 mins battery left...
18:29 PerlJam I hope you aren't profiling make test  ;)
18:29 colomon nope.
18:30 colomon Just updated to latest Rakudo before starting my experiment.
18:34 colomon \o/   profiling run going in a "screen", 2 mins battery power left
18:34 colomon hey, that didn't take long at all.
18:38 pugs_svn r28921 | lwall++ | [S02] make <1 2 3> literals more allomorphic
18:40 KyleHa Google defines "allomorphic" as "pertaining to allomorphs".  Thanks Google!
18:40 TimToady it's like polymorphic, only more so
18:40 jnthn OK, I think pccupdate is ready to merge into trunk. :-)
18:40 jnthn erm
18:40 jnthn master
18:41 KyleHa jnthn: The test I did was actually pccupdate with master merged in.  I should have mentioned that.
18:42 jnthn KyleHa: I'd guessed from the lack of fail. :-)
18:42 jnthn KyleHa: It looks good, thanks.
18:42 KyleHa I agree, it looks good.
18:42 KyleHa jnthn++  # lack of fail
18:42 jaldhar_ joined #perl6
18:42 erkkk joined #perl6
18:43 PerlJam KyleHa: as long as we don't start making perl6 more anthropomorphic  :)
18:43 KyleHa Dromedamorphic, perhaps.
18:44 TimToady that's not allowed, since anthropoids are mammals
18:44 TimToady so are dromedoids
18:44 TimToady everything has to be boring now
18:45 jnthn 8 files changed, 164 insertions(+), 246 deletions(-) # whee, I think we can say the new Parrot PCC API is a bit cleaner.
18:48 jaldhar_ joined #perl6
18:50 jnthn Merged!
18:50 jnthn Please remember to realclean and have latest Parrot.
18:51 KyleHa Last one to spectest_smolder is a rotten egg.
18:51 rblasch joined #perl6
18:53 dalek joined #perl6
18:59 crythias joined #perl6
19:05 icwiener joined #perl6
19:05 crythias Just wanted to say I read http://perlgeek.de/en/article/mutable-grammar-for-perl-6 and was impressed :)
19:06 KyleHa I agree, that's a good one, crythias.
19:07 crythias Mind you, I'm afraid the level is above my head, but the ideas make sense and are appealing.
19:08 abra joined #perl6
19:08 crythias However, I'm wondering if by nature of the ideas presented, is perl6 necessary to be anything more than a base ... something ... akin to "DOS" and everything else is simply mutation addons?
19:09 justatheory joined #perl6
19:14 zloyrusskiy joined #perl6
19:15 christine joined #perl6
19:19 pugs_svn r28922 | kyle++ | [t/spec] unfudge tests that pass in e8cac161733e6ea189276e
19:22 Bzek joined #perl6
19:26 FCO joined #perl6
19:44 Schwern joined #perl6
19:57 [particle]1 joined #perl6
19:58 KatrinaTheLamia okay--working on reading up on Perl 6. `for 1..5 -> $x { }` works... how about: `for 1..5 -> &somefunction`. My thoughts on how `for 1..5 ->` type stuff should work as simple throw the resulting array as a series of arguments to the the following sub. Be it anonymous of not. It generally repeats this until the stack the for loop has gone through, has been exhausted.
20:00 PerlJam KatrinaTheLamia: you mean  "for 1..5 -> $x &somefunction"  ??
20:00 jnthn KatrinaTheLamia: map may be what you want
20:00 japhb KatrinaTheLamia, the -> is not part of the for, it's part of the closure.  It's declaring arguments to the block there.
20:00 KatrinaTheLamia japhb: ah okay--prolly the best explaination I have had yet.
20:01 [particle]1 the -> syntax requires {}
20:01 [particle]1 it's all schwern's fault.
20:03 japhb Isn't everything?
20:03 japhb Oh, I guess Ingy's too.
20:03 [particle]1 YES
20:06 colomon joined #perl6
20:07 hercynium joined #perl6
20:09 justatheory_ joined #perl6
20:10 rblasch_ joined #perl6
20:12 justatheory_ joined #perl6
20:19 lichtkind joined #perl6
20:19 payload joined #perl6
20:23 colomon Errr... the profiling run of parrot goes very fast, but pprof2cg.pl is very slow?
20:25 snarkyboojum joined #perl6
20:25 jnthn colomon: It takes a while, I found. OTOH, it took a 30MB+ file from me and did enough work to turn it into 400KB of output, so I figure it's doing something vaguely interesting.
20:26 colomon It's just backwards from what I was expecting.
20:27 PerlJam profiling going fast sounds like you did something wrong.
20:27 PerlJam I did parrot -Rprofiling perl6.pbc -e 'say "hello"' and it took nigh on a minute to execute.
20:30 colomon PerlJam: I somehow generated a 318 MB pprof file in under 3 minutes running time.
20:31 colomon The pprof2cg.pl run has now taken over five minutes, on the other hand.
20:35 colomon done!
20:36 colomon final file is 240851 bytes -- that's a lot of crunching!
20:36 colomon now I just need to get a working kcachegrind...
20:39 jnthn colomon: Heh, that was the bit that took me a while.
20:40 colomon in theory macports supports it...
20:44 * colomon is curious why macports is currently installing lua...
20:45 sgarthp joined #perl6
20:53 lmc joined #perl6
21:23 tak11 joined #perl6
21:26 am0c joined #perl6
21:30 Su-Shee left #perl6
21:33 snarkyboojum joined #perl6
21:34 masak joined #perl6
21:34 masak oh hai
21:34 Chillance joined #perl6
21:34 jnthn yayitsmasak \o/
21:35 masak I've spent most of the afternoon moving stuff to a new hard drive.
21:35 KyleHa Since we have a Destroyer, we ought to designate a Cruiser, Battleship, etc...
21:35 masak KyleHa: TimToady is the Cruiser, obviously. :P
21:37 masak I'm almost back to a functioning desktop. the most difficult thing so far was migrating 3k tabs to a newly-installed Firefox.
21:39 jnthn ....3k?
21:40 masak let's just say I take my packrat tendencies out on Firefox. :)
21:41 jnthn I'm really curious how you manage them.
21:41 masak I open tabs to the right, and consume them on the left.
21:41 masak essentially, I surf FIFO.
21:43 jnthn wow
21:44 masak I'm just glad the tabs made it onto the new hard drive.
21:45 TimToady obviously you need hypertabs
21:45 masak @tabs>>.read();
21:45 lambdabot Unknown command, try @list
21:45 TimToady or just a tab reduction operator
21:45 masak I have that. it's just slower than the tab expansion operator... :/
21:46 TimToady as long as it's lazy, you're okay :)
21:46 masak :)
21:46 TimToady though FF might not be...
21:47 masak nope.
21:55 sjohnson hi masak
21:55 masak sjohnson: hi sjohnson! good to IRC you. :)
21:55 Whiteknight joined #perl6
21:55 TimToady here's a fun one:
21:56 TimToady std: sub foo ($x = my $y) { $y = 42; say $y; }
21:56 p6eval std 28922: OUTPUT«ok 00:02 112m␤»
21:56 jnthn TimToady: Fail.
21:56 * masak wishes he'd thought of that one
21:56 jnthn TimToady: std bug.
21:56 jnthn rakudo: sub foo ($x = my $y) { $y = 42; say $y; }
21:56 p6eval rakudo e8cac1:  ( no output )
21:56 TimToady well, depends on whether you think a default is a closure or a thunk
21:57 * masak reads moritz_'s http://moritz.faui2k3.org/tmp/ltm.pod
21:57 jnthn erm
21:57 jnthn TimToady: I think there's no a difference between the two.
21:57 TimToady but there is
21:57 sjohnson rakudo: my %hash;
21:57 p6eval rakudo e8cac1:  ( no output )
21:57 TimToady std: 42 || my $x; $x
21:57 p6eval std 28922: OUTPUT«ok 00:02 108m␤»
21:58 TimToady std: 42 || { my $x }; $x
21:58 p6eval std 28922: OUTPUT«Potential difficulties:␤  Variable $x is not predeclared at /tmp/P0d6FsVfhm line 1:␤------> [32m42 || { my $x }; $x[33m⏏[31m<EOL>[0m␤ok 00:03 108m␤»
21:58 jnthn Well, std only does syntactic checks... :-)
21:58 masak TimToady: waitwait, are a closure and a thunk different things?
21:58 TimToady but the question is whether it has its own pad or not
21:59 TimToady thunks don't have a pad
21:59 jnthn TimToady: I really don't want to get in to unpicking things inside default values to find their declarations.
21:59 jnthn And hoisting those into the outer scope.
21:59 TimToady "unpicking" is the wrong mindset, like sig introspection when partial binding is wanted
21:59 sjohnson rakudo: my %hash; foreach (a..z) { $hash{$_} = 1; } my $buffer; foreach (keys(%hash)) { $buffer .= $_; } print $buffer."\n";
21:59 p6eval rakudo e8cac1: OUTPUT«Confused at line 2, near "{ $hash{$_"␤in Main (file <unknown>, line <unknown>)␤»
21:59 sjohnson rakudo: my %hash; foreach (a..z) { %hash{$_} = 1; } my $buffer; foreach (keys(%hash)) { $buffer .= $_; } print $buffer."\n";
22:00 p6eval rakudo e8cac1: OUTPUT«Confused at line 2, near "{ %hash{$_"␤in Main (file <unknown>, line <unknown>)␤»
22:00 sjohnson *sad face*
22:00 TimToady the point is that my $x automatically shows up in some scope or another, by default
22:00 TimToady std: my %hash; foreach (a..z) { %hash{$_} = 1; } my $buffer; foreach (keys(%hash)) { $buffer .= $_; } print $buffer."\n";
22:00 p6eval std 28922: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/5756vXcUIX line 1:␤------> [32mmy %hash; foreach (a..z) [33m⏏[31m{ %hash{$_} = 1; } my $buffer; foreach ([0m␤    expecting any of:␤
22:00 p6eval ..bracketed…
22:00 TimToady heh, I guess std doesn't catch "foreach"
22:01 masak moritz_: what about mutual recursion? does it also end LTM?
22:01 jnthn My point is that I'd considered the RHS of the = there to be something equivalent to has $.x = 42
22:01 sjohnson i think i broketed it :(
22:01 TimToady there is no "foreach" in Perl 6
22:01 jnthn Apart from transformed into a plain old closure, not an anonymous method.
22:01 jnthn I don't actually have any concept of a thunk without some kind of scope.
22:01 sjohnson rakudo: my %hash; for (a..z) { %hash{$_} = 1; } my $buffer; for (keys(%hash)) { $buffer .= $_; } print $buffer."\n";
22:01 p6eval rakudo e8cac1: OUTPUT«Confused at line 2, near "my $buffer"␤in Main (file <unknown>, line <unknown>)␤»
22:01 jnthn *associated scope
22:02 TimToady std: my %hash; for (a..z) { %hash{$_} = 1; } my $buffer; for (keys(%hash)) { $buffer .= $_; } print $buffer."\n";
22:02 p6eval std 28922: OUTPUT«[31m===[0mSORRY![31m===[0m␤Missing semicolon or comma after block at /tmp/uDmVbGONLy line 1:␤------> [32mmy %hash; for (a..z) { %hash{$_} = 1; } [33m⏏[31mmy $buffer; for (keys(%hash)) { $buffer [0m␤    expecting any of:␤   infix stopper␤    statement␤Undeclared routines:␤
22:02 p6eval ..   a used…
22:02 rgrau joined #perl6
22:02 diakopter o_O
22:03 am0c O_o
22:03 TimToady O_ö
22:04 sjohnson (´ー` )
22:04 TimToady std is giving you the correct error
22:04 * diakopter rigs p6eval to send it through std (as well) if rakudo's output is "confused at.."
22:04 TimToady diakopter++
22:05 sjohnson TimToady: is it because i crammed it all into one irc-friendly line, that the {} now needs ;'s like in javascript?
22:05 TimToady yes
22:06 sjohnson oopsies
22:06 TimToady if line-ending } consistently means end of statement, then non-line-ending } consistently doesn't
22:06 sjohnson rakudo: my %hash; for (a..z) { %hash{$_} = 1; }; my $buffer; for (keys(%hash)) { $buffer .= $_; }; print $buffer."\n";
22:07 p6eval rakudo e8cac1: OUTPUT«.= must have a call on the right hand side at line 2, near " .= $_; };"␤in Main (file src/gen_setting.pm, line 2729)␤»
22:07 TimToady std: my %hash; for (a..z) { %hash{$_} = 1; }; my $buffer; for (keys(%hash)) { $buffer .= $_; }; print $buffer."\n";
22:07 p6eval std 28922: OUTPUT«[31m===[0mSORRY![31m===[0m␤Quoted method name requires parenthesized arguments at /tmp/ObMVkObTqc line 1:␤------> [32m) { $buffer .= $_; }; print $buffer."\n"[33m⏏[31m;[0m␤    expecting methodop␤Other potential difficulties:␤  Possible obsolete use of .= as append
22:07 p6eval ..operator;…
22:07 masak sjohnson: did you mean ~= ?
22:07 sjohnson ~= is the concatenator of 2009?
22:07 TimToady since about 2003 or so
22:08 masak sjohnson: ~ is string concatenation in Perl 6.
22:08 masak sjohnson: prefix ~ is stringification.
22:08 sjohnson masak: i suppose an old dog can learn new tricks!
22:08 TimToady though for a brief while at the beginning it was _ instead
22:08 TimToady but ~ looks more like a piece of string than _ does
22:08 TimToady _ looks more like a small puddle
22:08 masak sjohnson: oh, I'm sure of it. if I can do it, you can. :)
22:09 sjohnson rakudo: my %hash; for (a..z) { %hash{$_} = 1; }; my $buffer; for (keys(%hash)) { $buffer ~= $_; }; print $buffer."\n";
22:09 TimToady interesting failure mode on ."\n"
22:09 p6eval rakudo e8cac1: OUTPUT«Could not find non-existent sub a␤in Main (file src/gen_setting.pm, line 295)␤»
22:09 sjohnson oh right
22:09 sjohnson rakudo: my %hash; for (a..z) { %hash{$_} = 1; }; my $buffer; for (keys(%hash)) { $buffer ~= $_; }; print $buffer~"\n";
22:09 p6eval rakudo e8cac1: OUTPUT«Could not find non-existent sub a␤in Main (file src/gen_setting.pm, line 295)␤»
22:09 masak sjohnson: try 'a' .. 'z'
22:09 masak sjohnson: no parent necessary.
22:09 masak s/t/s/
22:10 diakopter TimToady: I haven't yet wrapped my brain around how to get std to use locally cached asts when 'need'ing .pm's... let alone how to persist the .ast
22:10 sjohnson masak: ill try to piece it together
22:11 sjohnson rakudo: print "masak is "~"kind";
22:11 p6eval rakudo e8cac1: OUTPUT«masak is kind»
22:11 masak :)
22:11 TimToady why would you need to cache the ast?  you only need to run it once.  after that you just need the symbols
22:11 sjohnson well i'll be
22:11 Util left #perl6
22:11 sjohnson so far so good
22:11 TimToady so seems to me you only need a disk cache
22:11 TimToady that is, a .o equivalent
22:11 sjohnson rakudo: my %hash; for ('a' .. 'z') { %hash{$_} = 1; }; my $buffer; for (%hash.keys)) { $buffer ~= $_; }; print $buffer~"\n";
22:11 p6eval rakudo e8cac1: OUTPUT«Syntax error at line 2, near ") { $buffe"␤in Main (file <unknown>, line <unknown>)␤»
22:12 sjohnson looks like i've used up my "5 chances to get it right" quota for the hour :)
22:12 TimToady you removed a ( without removing a )
22:13 * sjohnson 's peanut sized brain doesn't understand :(
22:13 diakopter TimToady: so it doesn't have to reparse the .setting (and all its dependencies) in order to run the setting on each execution of perl sprixel.pl
22:14 TimToady rakudo: my %hash; for 'a'..'z' { %hash{$_} = 1; }; my $buffer; for %hash.keys { $buffer ~= $_; }; say $buffer
22:14 p6eval rakudo e8cac1: OUTPUT«abcdefghijklmnopqrstuvwxyz␤»
22:14 sjohnson interesting!  many thanks
22:14 sjohnson i like this perl6 automatic Tie::IxHash-like behaviour
22:15 TimToady yes, but that's just an on-disk cache, like I said
22:15 sjohnson ^^^ a big deal
22:15 TimToady a .o equiv
22:15 moritz_ masak: in my understanding mutual recursion ends LTM too
22:15 TimToady an extended .syml, as it were
22:16 TimToady sjohnson: the ordering is not guaranteed
22:16 sjohnson i don't know much about the disk caching thing, i just like being able to traverse the keys() for loop with the original order without having to bust out the Tie:: tools
22:16 sjohnson ... oh
22:16 diakopter rakudo: my %hash; for 'a'..'z' { %hash{$_} = 0; }; say %hash.keys
22:17 p6eval rakudo e8cac1: OUTPUT«fghijklmnopqrstuvwxyzabcde␤»
22:17 TimToady pugs: my %hash; for 'a'..'z' { %hash{$_} = 1; }; my $buffer; for %hash.keys { $buffer ~= $_; }; say $buffer
22:17 p6eval pugs: OUTPUT«umetldskczrjbyqiaxphwogvnf␤»
22:17 masak moritz_: that seems reasonable. I guess the declarative part ends at the point where a rule gets called for the second time.
22:17 diakopter fghijklmnopqrstuvwxyzabcde
22:17 sjohnson oh my
22:17 sjohnson thanks for the tip, i might have made a huge mistake later on down the road
22:18 masak what mistake?
22:18 diakopter rakudo: my %hash; for 'a'..'z' { %hash{$_} = 0; }; say %hash.keys # why offset by 5?
22:18 p6eval rakudo e8cac1: OUTPUT«cdefghijklmnopqrstuvwxyzab␤»
22:18 diakopter or 3.
22:18 moritz_ masak: did the LTM notes make sense to you?
22:18 diakopter or 2.
22:18 sjohnson masak: assuming that the hash keys are always "tied" in order of insertion
22:18 TimToady some hash storage methods would be greatly slowed by maintaining order where it's not needed
22:18 masak moritz_: oh, definitely.
22:18 TimToady randomized hash functions, I suspect
22:18 moritz_ masak: great ;-)
22:19 masak moritz_: still not sure I grok it all, though. I feel I'm missing the bigger picture.
22:19 TimToady so %hash.keys.sort guarantees order :)
22:19 TimToady order of insertion is not necessarily sorted order either
22:19 masak sjohnson: a hash gives no guarantees about insertion order. that's part of the good thing about them. they're fast.
22:20 TimToady to get insertion order, just push to an array
22:20 sjohnson perhaps i need to adjust my programming paradigmns
22:20 sjohnson and use arrays as you mentioned
22:21 TimToady a lot of languages do confuse arrays and hashes, so it's a portable notion in that sense, but it's not Perl
22:21 sjohnson this channel is more educational than a paid programming course at some college
22:21 TimToady doh, I thought it was an entertainment channel
22:22 masak sjohnson: that's why arrays and hashes complement each other so well. arrays are sequential and ordered, whereas hashes are fast but jumbled.
22:22 sjohnson TimToady: it is funny too
22:22 sjohnson wait till i get my perl 6 "tuck in and bedtime story" bot in here for when tired programmers need their rest
22:22 sjohnson who says computers can't feel emotions
22:22 masak sjohnson: Searle.
22:23 moritz_ Turing ;-)
22:23 masak moritz_: he said no such thing!
22:23 masak he was one of the proponents of strong AI.
22:23 sjohnson this might give Perl 6 some good publicity... the first computer that cried was programmed with Perl 6
22:24 masak did it cry because Perl 6 is so beautiful?
22:24 TimToady I was in a cognitive science seminar once with Searle.  Us linguists didn't get along very well with him.  :)
22:24 * moritz_ thinks of Marvin the manic-depressive roboter
22:24 sjohnson i believe so
22:24 sjohnson and cause everyone here is kind
22:24 sjohnson masak: it will cry when hugme gives it a valentine card on its own volition
22:25 masak TimToady: I find it hard to take seriously any denouncers of hard AI. human brains are a good example of what they're denouncing.
22:26 masak sjohnson: you sound like a good collaborator for my SHRDLU porting project.
22:26 TimToady sjohnson: You'll note, however, that Camelia does not actually require everyone to be nice to all kinds of people.
22:26 s1n_mini joined #perl6
22:27 TimToady masak: it kinda depends on whether the chinese room comes equipped with a limbic region  :)
22:27 sjohnson i was considering a 5 year perl project for fun, that would basically simulate a conversation over irc with me, and try to fool my friends with it
22:27 s1n_mini TimToady: i missed the discussion, but your recent change (r28921) seems a bit too specific for a spec (doesn't seem to give implementations freedom to the storage mechanism)
22:28 masak TimToady: I kept reading about the Chinese Room, thinking there was some deep truth to uncover in it all. but nowadays I don't think there is. it's just Searle getting confused about scale.
22:29 TimToady s1n_mini: the change has nothing to do with storage mechanisms, and everything to do with what types the user expects
22:29 sjohnson TimToady: may i have your opinion on ray kurzweil type theories?
22:30 * sjohnson doesn't really "know enough" to make a valid opinion
22:30 TimToady they're quite singular
22:30 s1n_mini i can't stand kurzweil, phony balgnia
22:30 s1n_mini and i can't type either
22:30 TimToady you need a better chinese room
22:31 s1n_mini there is no singularity, i wish he would stop writing
22:31 TimToady naked singularities do tend to clothe themselves in this universe...
22:32 TimToady the notion of a singularity implies the breakdown of quantum fluctuations, and I doubt kurzweil's idea can achieve that
22:33 TimToady the future will continue to be unevenly distributed
22:33 s1n_mini the singularity implies that man has perfectly understood their own conscienceness enough to emulate it or culture it from scratch
22:34 TimToady the Digital Millenium Singularity Act will slow it down, for one thing
22:34 s1n_mini heh
22:35 TimToady well, I don't doubt that someday they'll figure out how to make computers think as *badly* as people do
22:36 TimToady and I'll bet they won't read the error messages either...
22:36 s1n_mini i am "they" and i think it's just 1950's scifi
22:37 TimToady well, we did get to the moon
22:37 moritz_ so they say ;-)
22:37 TimToady but I'm still waiting for my torch ship
22:37 TimToady VASIMR looks like a step in the right direction :)
22:37 s1n_mini TimToady: getting back to my comment, i was suggesting it's a bad idea to enforce implementations store scalars as as their stringy version so the compiler may optimize
22:38 s1n_mini TimToady: not every compiler/interpreter will want to optimize
22:38 TimToady no, they were already storing the string version, we're adding in the numeric typology is all
22:38 TimToady <a b c> is split(' ','a b c')
22:38 s1n_mini why would they have to store both?
22:38 moritz_ TimToady: I hope it's not
22:38 s1n_mini doesn't that get back into the union crap from perl5?
22:38 TimToady to avoid surprises when people actually want the strings
22:39 moritz_ TimToady: remeber that split ' ' isn't magical ;-)
22:39 moritz_ *remember
22:39 TimToady but Perl 6 is magical
22:39 TimToady in spots
22:39 s1n_mini i don't think requiring a tagged union is a winning idea
22:39 s1n_mini implementations should be allowed to store/optimize as needed
22:39 TimToady it's not tagged
22:39 TimToady it's not a union
22:40 TimToady it's just a Num with a Str method mixed in
22:40 s1n_mini but not the actual stringy?
22:40 TimToady I don't care how it's actually stored, as long as we can use <1 2 3> to mean a list of Ints typologically
22:41 TimToady and I've been wondering a long time about other literal forms having ambiguous typology
22:41 s1n_mini you're saying a .Str method has to be mixed in?
22:41 TimToady "foo" could be either a Str or a Buf
22:41 jnthn TimToady: Are you thinking that's actually create a typed list?
22:41 * moritz_ cries in agony
22:42 jnthn hugme: hug moritz_
22:42 * hugme hugs moritz_
22:42 TimToady depends on what you mean by "typed"
22:42 TimToady it's not a "List of Int"
22:42 jnthn TimToady: That's what I was meaning.
22:43 jnthn OK.
22:43 jnthn Don't feel strongly either way on that one. :-)
22:43 TimToady I want it to be sane with <foo 1 2 3> as well
22:44 TimToady where sanity is not quite the same as consistency
22:45 TimToady for Int it doesn't really matter, since Str(1) is '1' in any case
22:45 TimToady but the mixin notion is to handle 1/2 returning the string '1/2' rather than '0.5'
22:46 TimToady from the user's standpoint it's more like deciding the type lazily
22:46 jnthn nod
22:46 moritz_ TimToady: if people change the number parsing in Perl 6 mainline code, does it also affect the number parsing in <...> quotes?
22:46 TimToady anyway, I'd like to play with it and see if we can make it dwtm most of the time
22:47 orafu joined #perl6
22:47 jnthn .oO( do what timtoady means )
22:47 TimToady yes, but that works with number conversions too
22:47 TimToady that's why we rearranged the number parsing rules a while ago
22:47 moritz_ ok
22:47 TimToady so in a sense this is just pulling the number conversion back into compile time where it makes sense
22:48 pugs_svn r28923 | moritz++ | [t/spec/TODO] more updating tasks
22:50 wknight8111 joined #perl6
22:50 jnthn I'm not wholly convinced making an Int and mixing a role into it which contains a Str method will be faster, but OTOH we don't have to do it for Ints I guess since they stringify back in a sane way.
22:51 icwiener joined #perl6
22:54 envi^home joined #perl6
22:54 TimToady that's just one way to work the typology, but I'm looking for a systematic way to treat all literals as slightly generic/lazy on their typology
22:54 TimToady it's not necessarily just for <...>
22:55 pugs_svn r28924 | moritz++ | [t/spec] interpolation of undef into regexes
22:56 TimToady the issue of literal typology shows up in many languages, and you get travesties like U"foo" or 123L
22:56 TimToady when the correct solution is to be slightly more context dependent
22:57 TimToady I'm just wondering how far we can use multi-dispatch to resolve such genericity without running into bad ambiguities
22:58 TimToady and Rat with fudged .Str seems like one way to do it, is all
22:58 TimToady or we could go with literal subtypes like IntLit, RatLit, etc, that are a bit more generic than Int, Rat, etc
22:59 TimToady so a StrLit could know that it could also be a Buf if there's only ASCII in it, for instance
22:59 jnthn Hmm.
22:59 s1n_mini ugh more types
23:00 TimToady yes, I'd rather have a few anonymous mixins instead, which is why it's the way it is currently :)
23:00 * jnthn had better re-read this tomorrow, he just read "travesties" as "transvestites" :-/
23:00 jnthn That's what a day of M
23:00 TimToady changing your clothes is related to allomorphism :)
23:00 jnthn ;-)
23:00 jnthn ooh, I failed
23:01 jnthn *day of MySQL and VBScript does
23:01 jnthn TimToady: What does "a little more generic" really mean in this context?
23:01 TimToady means, I can use A as if it were a B and get away with it
23:02 s1n_mini i'd prefer less types, i never liked how there are 30 different string objects in java
23:03 TimToady well, mixins get you *more* types, but they're anonymous.
23:03 TimToady though I think these should report their original type
23:03 TimToady if you ask them what they are
23:04 jnthn Which is Str, or Int, if they were in a <1 2 3>...
23:04 TimToady that would be three Ints currently
23:04 jnthn Currently in spec?
23:04 TimToady (current spec)
23:05 jnthn Right, not current Rakudo.
23:05 pugs_svn r28925 | moritz++ | [t/spec] tests for r28921, <...> with numbers are smarter than previously assumed
23:05 moritz_ and current tests too ;-)
23:05 jnthn Is the motivation here mostly just doing work at compile time, not runtime?
23:05 s1n_mini TimToady: and your change says that's 3 Ints that can be Strs?
23:05 jnthn Or more about having the right kinds of values for dispatching on?
23:05 TimToady it's partly moritz_++'s fault for mentioning it in the backlog :)
23:06 TimToady it says they are three Ints that are guaranteed to stringify to the same thing as if we'd returned three Strs
23:06 moritz_ TimToady: speaking of the backlog... I've seen some boilerplate code action methods, both in my own JSON parser and in pmichaud++'s nqp-rx...
23:06 wolv joined #perl6
23:07 moritz_ TimToady: much of that looks like method rulename:sym<foo>($/) { make $<somecapture>.ast }
23:07 moritz_ so a significant part of the rules just pass on ast
23:07 s1n_mini sounds like larry had fun at the llvm conf.
23:08 moritz_ TimToady: do you think it would be sane to have this is a default action method? if ther's just one capture, make() its ast?
23:08 TimToady well, viv does much the same thing with it's AUTOLOAD
23:09 TimToady except it wraps the node info so you don't lose info
23:09 moritz_ given $/.caps { make .value.ast if .elems == 1 }
23:09 TimToady what if it's important to know the current rule name?
23:10 TimToady not sure whether the default ast should be deep or shallow
23:10 moritz_ "know"? as in "being stored in $/ somewhere"?
23:11 TimToady the viv ast records all the rules it descended through
23:11 TimToady by default
23:11 rfordinal joined #perl6
23:12 TimToady simply hoisting ast nodes seems like it throws away information that could be valuable later
23:13 moritz_ unless that information is encoded in the type of the .ast
23:13 TimToady some kinds of ast transformations need to know the direct children, not just the leaves
23:14 TimToady that's the basic problem with the notion of AST, is that you don't know how A you want to be...
23:14 TimToady what works well for a basic tree-walking interpreter isn't what will work well for an optimizer
23:15 moritz_ ok, maybe that's just something that should go into the per-action-class autoloader
23:15 TimToady maybe there's some mechanism to default it either way
23:16 TimToady that's how viv handles it
23:16 TimToady so part of the boilerplate you see may be symptomatic of a lack of autoloading
23:17 TimToady so perhaps not quite so worrisome...
23:17 moritz_ yes, it might
23:17 moritz_ since rakudo doesn't do autoleading yet
23:17 TimToady it's similar to the metaop problem
23:18 TimToady though in this case I'm not sure we have quite the same declarative power to know what the AST wants to look like
23:19 TimToady autoloading is really only capable of operational definition
23:19 TimToady but make is also operational rather than declarative
23:20 justatheory joined #perl6
23:26 masak sleep time.
23:26 masak see y'all tomorrow. o/
23:26 moritz_ here too
23:26 moritz_ good night
23:26 TimToady ciao
23:33 jnthn TimToady: Just looking at STD, in the parameter rule.
23:33 jnthn | '|' <param_var>   { $quant = '|'; $kind = '*'; }
23:34 jnthn | '\\' <param_var>  { $quant = '\\'; $kind = '!'; }
23:34 jnthn What's the '\\' one for?
23:34 jnthn :(|$capt) is take a capture, iirc?
23:34 jnthn But I don't recall seeing :(\$capt), and the only reference I see is in S06, where we're using the prefix:<\>
23:37 frew joined #perl6
23:39 TimToady |$capt returns the rest of the outer capture bound to $capt.  \$capt is supposed to take the next argument as a capture and not denature its captureness like ordinary binding to $foo would
23:39 TimToady I seem to recall it was ruoso that wanted that
23:40 TimToady s/ruoso/ruoso++/
23:40 TimToady sorry I left off the honorific :)
23:41 TimToady I think the denaturing involved is the business of a capture containing one item returning the item instead of capture
23:41 jnthn Hmm.
23:41 jnthn I probably need to re-read the captures synopsis again to try and get my head around that.
23:42 jnthn Ah, is it that we would put the capture in scalar context normally?
23:42 TimToady item context, yes
23:42 jnthn But in this case we don't want to do that, just take the thing passed and not contextualize it at all?
23:42 TimToady that's what \ is for
23:42 jnthn Ah, OK.
23:43 jnthn Well, that's easy to implement. Just don't impose the context on the thingy. :-)
23:43 TimToady and that sounds like it doesn't care whether it's really a Capture or a Parcel
23:44 jnthn Hmm. Does it have to care what it is at all, so long as it passes any type constraints?
23:44 TimToady don't think so
23:44 jnthn That is, it's the "take whatever was passed and don't do anything to it" option?
23:44 jnthn Hmm. I think I've got a hack somewhere that is the result of not having such a thingy. Wow. :-)
23:45 TimToady when ruoso++ noticed he wanted such a hack, he carped++ about it :)
23:46 TimToady so we hacked++ the spec instead
23:46 jnthn Heh, I just figured I was doing something silly.
23:46 jnthn Oh!
23:46 jnthn My hack was to use "is rw"
23:46 jnthn Since if it's an rw parameter we can't impose any context on it.
23:46 jnthn Otherwise we'd modify it.
23:46 TimToady okay, rw implies \ but not vice versa
23:46 jnthn Or rather, we'd bind into the lexpad something other than the thingy we were passed.
23:46 jnthn Right.
23:47 Juerd rw-without-w
23:47 jnthn So I guess I figured, well, "is rw" is hacky, but hey, it'll work. :-)
23:47 TimToady more like 'is ref'
23:47 jnthn OK, so \ goes in, and then a couple of the signatures of our trait_mod's become more sane. :-)
23:48 TimToady maybe \ === 'is ref' but I think I like \ better
23:48 jnthn is ref can still impose context though, no?
23:48 TimToady almost makes me want a prefix for 'is copy'
23:49 jnthn Since it just checks what is passed is a reference?
23:49 TimToady well, everything is an object in that sense
23:49 TimToady (everything boxed)
23:49 jnthn *nod*
23:50 jnthn The other thing I want to tackle soon-ish (in the next month or so) is multiple return values.
23:50 TimToady other than that, I think 'is ref' really is just \
23:50 jnthn How do you feel the spec is on those at the moment?
23:51 TimToady it's all bound up with the mystery of Capture vs Parcel
23:51 jnthn I feared so. :-)
23:52 jnthn I guess this might make us demistify a little.
23:52 TimToady which might resolve down to @% vs @@ sigils  :)
23:53 jnthn If I understand right, in
23:53 jnthn foo(1,2,:a<3>)
23:53 jnthn Then the parcel there has three positionals (a parcel has no nameds)
23:54 jnthn And then when it becomes a capture it's a capture with two positionals and one named.
23:54 jnthn Amd I right so far, or horribly wrong?
23:54 TimToady which might be a coercion from @@ to @%
23:54 TimToady ruoso++ once proposed @% as the Texas capture sigil
23:54 wolverian joined #perl6
23:54 jnthn lol
23:55 jnthn So @@ would be the parcel sigil here, and @% the capture sigil?
23:55 TimToady and it is vaguely possible that slices and parcels turn out similar enough to unify
23:55 jnthn I never quite understood slices greatly either. :-/
23:56 jnthn I guess another question I have on return is, is it just a normal call?
23:56 TimToady well, it feels like there's a grand unification waiting to happen, but we'll hope it's not as long in coming as in quantum physics
23:57 TimToady well, if it's a normal call to something that binds the raw capture and pushes it onto the return stack, then yes :)
23:57 TimToady sub return (|$capt) { RAWRETURN($capt) }
23:58 jnthn return 1, 2, 3; and return(1, 2, 3); are just calls to some return built-in that maybe is like sub return(|$capt) { throw ReturnException.new(payload => $capt) } # pseudocode ;-)
23:58 TimToady nodnod
23:58 jnthn But possibly optimizable.
23:58 jnthn But I'm going for semantics first.
23:58 TimToady which, of course, can be aggressively inlined in many cases :)
23:58 TimToady oh, you said that already
23:59 jnthn Sure, but let's make it work at all in the first instance. ;-)
23:59 jnthn OK, so supposing this...
23:59 jnthn Imagine I do:
23:59 jnthn my $foo = bar(); # and bar is the thing that did return(1,2,3);
23:59 jnthn a) What am I expecting in $foo here? (I think 1). b) How do I get it?
23:59 TimToady you're really gonna make me think through all this before my brane is in synchrony with the universe, are you?  :)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo