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