pugscode.org/ planetsix.perl.org/ feather.perl6.nl/syn/ perlcabal.org/svn/pugs/log github.com/rakudo/rakudo | nopaste: sial.org/pbot/perl6 | evalbot: "perl6: say 3;" | irclog: irc.pugscode.org/ | Rakudo.org www.perlfoundation.org/perl6/index.cgi?smop perl.net.au/wiki/Elf |~300 days 'til Xmas
Set by mncharity1 on 25 February 2009.
TimToady essentially, the BEGIN there is redundant, since 1+2 should do constant folding anyway 00:00
but at some point you have the AST for 1+2, and you do $ast.run or some such, and it returns 3
diakopter (but assuming optimizations entirely disabled)
TimToady with the BEGIN it doesn't matter if they're disabled 00:01
when BEGIN finishes parsing its block it automatically calls .run
or .eval, or whatever the method should be
in p5, BEGIN was only used for its side effects 00:02
you can do that in p6 too, but it also returns a value now
00:02 rkendall left
TimToady if I say BEGIN { COMPILING::<&foo> := {...} } 00:03
it's just like saying sub foo {...} 00:04
er, make that sub {...} inside the begin
or return won't work
anyway, most declarations are just syntactic sugar for some code running and poking bindings into the COMPILING:: symbol table 00:05
diakopter so the AST of { COMPILING::<&foo> := sub {...} } is sent to the interpreter, including symbol tables and such
and the modified symbol table is sent back to the parser? 00:06
TimToady in general the parser short-circuits that for known declarations and just does it itself
I'm speaking of declarations in the abstract
it's not "sent back"
00:07 Ariens_Hyperion left
TimToady COMPILING:: *is* the symbol table 00:07
diakopter ok... the interpreter reinvokes the parser from where it left off?
or you're viewing the parser as the runtime of sorts.
TimToady no, the parser calls the interpreter, and it just returns when done
the parser is always in the outer dynamic scope
00:08 japhb left
TimToady the parser is just a running program 00:09
diakopter ok, I'd call the parser the master runtime, then. what about if the interpreter needs to invoke the parser in the course of its execution?
TimToady it happens to be a program that parses
the parser sets up the current language and parse state such that the interpreter can call methods on the the current parse if it wants to 00:10
it's no different than, say passing the current Perl langauge down through regexes so that regexes know what langauge to run inside {...} 00:11
diakopter ok; interesting. perhaps injecting "callbacks" of sort to itself
00:11 japhb joined
TimToady gotta take kids to airport 00:12
bbl &
00:12 orafu joined 00:15 orafu left, orafu joined
pasteling "samlh" at 151.159.106.132 pasted "patch for perl6-projects.org for moritz" (30 lines, 531B) at sial.org/pbot/35347 00:21
00:22 kane_ joined 00:34 japhb left 00:37 japhb joined
pasteling "samlh" at 151.159.106.132 pasted "patch for perl6-projects.org for moritz - v2 (looks better on IE)" (30 lines, 530B) at sial.org/pbot/35348 00:37
00:40 armagad joined 00:41 japhb left
wayland76 pmichaud: If it helps, I'm keen to have library calls too, just like japhb :) 00:50
(I don't want to *bug* you about it, if you'll excuse the pun, :) ) 00:51
00:54 aindilis` joined 00:55 bacek_ joined 00:57 nihiliad joined 01:04 japhb joined 01:15 Sepheebear joined 01:23 FurnaceBoy joined 01:25 Patterner left 01:35 Kimtaro joined 01:37 Tene_ joined 01:46 alc joined 01:52 japhb left 01:53 wknight8111 left 02:18 hercynium joined 02:19 xuser left, xuser joined 02:21 r0bby_ joined, r0bby left 02:24 c9s joined 02:27 armagad left 02:32 nihiliad left 02:33 armagad joined 02:35 felipe left 02:55 c9s_ left 03:00 nihiliad joined 03:05 eternaleye_ joined 03:07 nihiliad left 03:13 tarbo2_ joined 03:14 felipe joined, Kimtaro left 03:16 Kimtaro joined, aindilis` left, Kimtaro left, tarbo2 left 03:17 eternaleye joined 03:23 eternaleye_ left, ashizawa joined, eternaleye left 03:36 nihiliad joined 03:45 hercynium left 03:46 Limbic_Region left 03:52 Kimtaro joined
pugs_svn r25697 | lwall++ | [viv] bring up to date with <?> changes 03:54
03:55 dduncan joined 04:01 PZt joined 04:07 orafu left, OuLouFu joined
jaldhar Correct me if I'm wrong but I can specify a unicode character like this \c[DEVANAGARI LETTER JA] yes? Does rakudo currently not support that? 04:13
literal rakudo: "\c[LATIN CAPITAL LETTER A]" 04:16
p6eval rakudo 412cbe: OUTPUT«Syntax error at line 1, near "\"\\c[LATIN "␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
literal oops
oohm
rakudo: say "\c97" 04:17
p6eval rakudo 412cbe: OUTPUT«a␤»
literal rakudo: say "\c[LATIN CAPITAL LETTER A]" 04:18
p6eval rakudo 412cbe: OUTPUT«say requires an argument at line 1, near " \"\\c[LATIN"␤␤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)␤»
04:18 ab5tract joined 04:21 meppuru joined
meppuru good night 04:24
04:25 alc left, meppuru left 04:29 frooh left
diakopter std: \c[LATIN CAPITAL LETTER A] 04:29
p6eval std 25697: OUTPUT«Undeclared names:␤ A used at 1 ␤ CAPITAL used at 1 ␤ LATIN used at 1 ␤ LETTER used at 1 ␤Undeclared routine:␤ c used at 1 ␤ok 00:02 34m␤»
04:29 frooh joined
diakopter std: "\c[LATIN CAPITAL LETTER A]" 04:29
p6eval std 25697: OUTPUT«ok 00:03 34m␤»
diakopter std: "\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]" 04:30
p6eval std 25697: OUTPUT«ok 00:04 34m␤»
diakopter std: "\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]\c[LATIN CAPITAL LETTER A]"
p6eval std 25697: OUTPUT«ok 00:04 34m␤»
diakopter it likes 34ms
bacek_ 34 megabytes 04:31
4 seconds
wayland76 jaldhar: To answer your question, it appears that rakudo doesn't do that at the moment, but that STD.pm does 04:44
04:44 japhb joined
wayland76 As the plan is that rakudo will eventually use STD.pm, it's certainly part of the whole plan. 04:44
jaldhar so for now it looks like I'll just have to use the literal characters. 04:47
Or I can use \x I suppose. That appears to work
04:50 r0bby_ is now known as r0bby
jaldhar spoke to soon 04:53
Could not find non-existent sub x0905
wayland76 rakudo: print "\x0905"; 05:00
p6eval rakudo 412cbe: OUTPUT«अ»
wayland76 Well, it works for me :)
Did you put it in quotes?
05:03 FurnaceBoy left 05:04 FurnaceBoy joined, FurnaceBoy left
TimToady looks like the right character to me, DEVANGARI LETTER A is U+0905 05:15
05:20 [particle]2 left 05:21 [particle] joined
jaldhar doh! sorry my fault. I had it single-quoted. 05:23
wayland76 That would do it :)
TimToady single quotes would not complain about a non-existent sub though 05:24
wayland76 I do that sometimes :)
TimToady had to have been outside of quotes
wayland76 rakudo: say '\x0905'
p6eval rakudo 412cbe: OUTPUT«\x0905␤»
wayland76 rakudo: say \x0905
p6eval rakudo 412cbe: OUTPUT«Could not find non-existent sub x0905␤current instr.: '_block14' pc 53 (EVAL_17:38)␤»
TimToady I wonder how many of those kinds of errors STD can give informative messages on...
wayland76 rakudo: say x0905
p6eval rakudo 412cbe: OUTPUT«Could not find non-existent sub x0905␤current instr.: '_block14' pc 53 (EVAL_16:38)␤»
TimToady std: \x0905 05:25
p6eval std 25697: OUTPUT«Undeclared routine:␤ x0905 used at 1 ␤ok 00:02 34m␤»
jaldhar more egg on my face. Yes there was an instance outside of quotes altogether as well as the one in single quotes 05:26
wayland76 Well, fry the egg and make an omlette :) 05:27
TimToady I'm trying to decide if \foo ever makes sense in p6, or if we can restrict to \(), \@, \% etc. 05:28
in scalar context foo() already returns a capture
wayland76 Probably sometime you'll want it to tokenise as \f oo or something :) 05:29
TimToady not outside quotes
wayland76 Yeah, you're probably right
TimToady but I'd like to recognize \x and such outside of quotes maybe and say something intelligent
wayland76 "To Unicode, or not to Unicode, that is the question" :) 05:30
Or did you want more intelligent than that? :)
Three \x's for Muster Mark? :)
TimToady more like: Found \x outside of quotes where it doesn't make much sense 05:31
wayland76 Bad \x corrupts good character? :)
Yeah, that would do it :)
TimToady except arguably it does make a kind of sense
it's just we don't support it by any current definition
wayland76 Oh, should we allow people to name their subroutines in unicode that way? :)
TimToady that's not the idea 05:32
but $x = \x263a; could be taught to put a smiley into $x
wayland76 I guess
TimToady the use case seems weak however
wayland76 But I think we support enough things already :) 05:33
TimToady no we don't--we support too many things already :)
ab5tract hehe
wayland76 Well, that may well be true
05:33 alc joined
TimToady much of my spec work over the last couple years has been simplification 05:33
wayland76 Actually, we probably support the right number, but the wrong ones :)
TimToady oh, undoubtedly 05:34
ab5tract TimToady: That's at the heart of the beauty that you create. It's so overpowered the syntax has to become mutable to support, but you narrow it down to the bare essentials on the way. 05:35
and with Perl 6 s/you/We/ in the Royal sense of Community 'We; 05:36
TimToady well, our nefarious plan is to make a perfectly extensible engine, and then give people so many options in CORE that they never feel the need to extend it.
wayland76 ...except in obfus :)
ab5tract Oh no worries I am well aware of the plan. 05:37
;)
TimToady std: &[-rated]::={...}; 42 R-rated 123; 05:38
p6eval std 25697: OUTPUT«############# PARSE FAILED #############␤Can't understand next input--giving up␤Unable to parse variable; couldn't find final ']'␤Unable to parse variable; couldn't find final ']'␤Unable to parse variable; couldn't find final ']'␤Unable to parse variable; couldn't find final ']'
.....
TimToady won't like it
wayland76 Question -- should output line/field separators be replaced with stringification separators?
ab5tract Just wanted to take this beautiful lurker moment up a notch and deliver my compliments to you and the whole Perl 6 community for what has for the last 8 years been a gleam in the eye
TimToady std: my &[-rated]::={...}; 42 R-rated 123; 05:39
p6eval std 25697: OUTPUT«Undeclared routine:␤ rated used at 1 1 ␤ok 00:03 48m␤»
ab5tract and is now Seriously Coalescing
TimToady std: my &infix:<-rated>::={...}; 42 R-rated 123;
p6eval std 25697: OUTPUT«ok 00:03 47m␤»
TimToady probably should allow &[] form on lhs
ab5tract: thanks! 05:40
wayland76: that would be called "join"
wayland76 It would, rather. That answers my question :) 05:41
ab5tract TimToady: Your welcome. And I mean it sincerely. I've been namedropping Perl 6 on Parrot since before it was known as Rakudo, so...
wayland76 ...maybe
ab5tract It's really satisfying to have been proven right.
BTW I have know idea what
std: my &infix:<-rated>::={...}; 42 R-rated 123;
p6eval std 25697: OUTPUT«ok 00:03 47m␤»
ab5tract is, but it's numerics are groovy. 05:42
wayland76 He declared a new infix operator called "-rated", and then used it :)
TimToady with the R metaoperator
which reverses the two args
wayland76 Ah, of course. I knew there was something funny going on :)
ab5tract Crap I haven't even heard of the metaoperators somehow
TimToady you get X-rated for free too :) 05:43
wayland76 Meta-operators change how operators work
TimToady: :)
ab5tract lol No worries not digging for an explanation
TimToady you're familiar with the notion from C, perhaps, where += is the = metaoperator applied to +
ab5tract can RAFM
yes yes. Hm, I never thought of it so meta 05:44
before
Had become intuitive.
TimToady that's because C just hardwired it for some operators instead of generalizing the idea
wayland76 Another example from the manual is this...
[+] 1, 2, 3; # 1 + 2 + 3 = 6
ab5tract Right. Like Perl 5 ;)
TimToady std: sub infix:<***> {...}; my $x ***= 42;
p6eval std 25697: OUTPUT«ok 00:03 35m␤» 05:45
ab5tract though it is too clever for limitations and will not be bound
TimToady std: sub infix:<***> {...}; my $xxx = [***] 1,2,3;
p6eval std 25697: OUTPUT«ok 00:03 38m␤»
wayland76 Whereas [*] 1, 2, 3; # 1 * 2 * 3 = 6
TimToady any user-defined infix works too, you see 05:46
wayland76 [] is a meta-operator, in this case :)
ab5tract TimToady: How do metaoperators relate to the concept of operator 'overloading' in something like Scala
TimToady I don't know how Scala does overloading
but all our operators are multi-dispatched on the types of both arguments 05:47
ab5tract wayland76: Ah yes in that instance I see it intuitively!
TimToady: Holy Shit.
TimToady when you say $a * $b, you're really calling infix:<*>($a,$b)
and all normal sub calls dispatch on their argument types
ab5tract Circle complete.
TimToady you want a DSL, it's about three or four declarations away 05:48
wayland76 ( I only discovered recently DSL = Domain Specific Language) 05:49
TimToady all these TLAs get heavily overloaded
I was in an RPG when I got hit by an RPG programmed in RPG
ab5tract std: sub infix: <x> {+}; print ([x] "I think I", "get it!"; 05:50
p6eval std 25697: OUTPUT«############# PARSE FAILED #############␤Malformed routine definition at /tmp/cMAvy83y15 line 1:␤------> sub infix: <x> {+}; print ([x] "I think I", "get i␤ expecting signature␤FAILED 00:02 34m␤»
wayland76 Well, Google wouldn't help me with DSL :)
ab5tract wayland76: hehe
TimToady we don't just drop args like Haskell does though
ab5tract It seems to have risen into popularity with direct proportion to Rails
TimToady that would foul up the parser's expectations of term vs infix
ab5tract and my money is on it dying at relatively the same rate.
Sort of like referring to MMD as a 'Functor' 05:51
s/MMD/an object with MMD/
TimToady std: sub infix:<x> ($a,$b) { $a + $b }; say [x] "I think I ", "get it!";
p6eval std 25697: OUTPUT«ok 00:04 40m␤»
ab5tract ahhh
dooooo
05:51 _jaldhar joined
ab5tract I see. And std is binary, then? 05:52
wayland76 "std" is our perl6 parser
TimToady std runs the STD parser, which is written in Perl 6
wayland76 It's the most complete Perl6 parser known to man
but it doesn't run the code afterwards 05:53
ab5tract Gotcha. So of course it is pass/fail
TimToady (though you're really running bits and pieces perl 5 underneath)
wayland76 The intent is that Rakudo will eventually adopt STD
TimToady you can get an AST out of it, but that's too big for IRC
wayland76 And someone used it for a syntax highlighter :)
ab5tract TimToady: You know I spent a significant amount of time trying to do longform transmissions in IRC (in Ruby) ... and I think the protocol is just too weak for it 05:54
TimToady longform as in 1080? :)
ab5tract It makes more sense in Jabber. 05:55
Yup, worrying over endianness and referring to RFCs stabilized ~ '96
getting a simple PRIVMSG ctcp request properly formatted 05:56
05:57 nihiliad left
ab5tract It required some digging :) 05:57
pugs_svn r25698 | wayland++ | - Moved "defined" and "undefined" from Scalar.pod to Any.pod, as per signature 05:58
r25698 | wayland++ | - Defined the Pattern role for Any
05:59 jaldhar_ joined
ab5tract TimToady: Actually I was trying to implement an IRC interface to the ruby util 'cheat'. Pretty cool little tool that serves as a surrogate '-h' by giving generic solutions to specific examples. Community generated, so kind of a CLI wiki. Recipes have been known to be shared. 06:00
At the same time as implementing an IRC interface to something like pastie.org/ 06:01
s/specific/specific usage/ 06:02
06:04 jaldhar left 06:12 _jaldhar left, masak joined
masak good morning. 06:13
ab5tract masak: I was just complimenting #perl6 and TimToady in particular 06:15
masak backlogs
pugs_svn r25699 | wayland++ | Changes to special variables as per "$?OS changes" discussion on mailing list. Haven't 06:16
r25699 | wayland++ | worried about compatibility for now, though.
wayland76 masak: 'morning :)
(when it says "haven't worried about compatibility", I mean the distro compatibility stuff on the mailing list) 06:17
ab5tract And complaining about IRC / the integration in Ruby 06:18
06:21 [particle] left, [particle] joined 06:23 railmeat joined 06:29 szabgab joined 06:36 mberends joined 06:43 justatheory left 06:49 justatheory joined 06:53 justatheory left
diakopter TimToady: wouldn't \identifier escape (reference) the symbol/identifier/bareword? as in... if the identifier "foo" is the name of a subroutine "foo", \foo might refer to the sub's declaration, or even continuation. or is there already something to get at a named sub as an object? 07:01
erm, dereference, I think I meant.
ruoso: hi
masak diakopter: no, 'dereference' is when you turn a reference into the thing it refers to. 07:02
diakopter right, I was viewing the name as the symbol that refers to the object. 07:07
so, in bare context, escaping the symbol might dereference the symbol.
well, I guess you could view that the other way, too. \foo as a `reference` to the sub foo. 07:09
\say($here) as a closure on $here in the declaring context of \say($here). I dunno. 07:10
there, it's a reference to the invocation.
in my imaginary interpretation.
pugs_svn r25700 | moritz++ | [docs] improve perl6-projects.org style, patch courtesy of samlh++
samlh moritz: thanks! 07:11
07:11 _jaldhar_ joined
diakopter or would that be \&foo() (and can one already do that) 07:12
masak diakopter: to me, a closure with an invocation in it is a reference to the invocation. I've never thought of \ as doing something similar.
moritz_ samlh: thank you
07:13 ejs joined 07:17 Psyche^ joined, Psyche^ is now known as Patterner
masak 'the enum symbol is "poisoned".' nice metaphor. 07:22
hm, is C<$<?>> proper POD? 07:25
literal yeah
masak ok, good. 07:26
literal same number of embedded angles are allowed as long as they nest properly
masak ah.
literal if they don't nest properly, you can use C<< >>, C<<< >>>, or C« » 07:27
masak oh, C« » in old POD even? I didn't know that. 07:28
literal oh, not old Pod
thought you meant Perl 6 Pod
masak which one is used for the synopses?
literal old, except for S26
07:29 jaldhar_ left
masak thought so 07:29
ab5tract: do you have an URL to this Ruby 'cheat' util? 07:30
07:36 railmeat left
ab5tract masak: cheat.errtheblog.com/s/git 07:38
masak ab5tract: thank you.
ab5tract Chris from github built cheat a while back. It runs on Sinatra, actually. 07:39
Tene_ that talks about git, not about any tool called 'cheat' 07:40
ab5tract Tene_: cheat.errtheblog.com is the cheat source
Tene_: rubyforge.org/projects/cheat/ 07:41
for the project description
masak ah, that's better.
moritz_ perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | ~300 days 'til Xmas 07:41
Tene_ so it's man pages fetched from a wiki 07:41
I don't understand the name.
masak 'cheat sheets', I guess. 07:42
ab5tract cheat as in a synonym for 'supply'
Tene_ reading the documentation is how you're supposed to do things... it's hardly cheating.
masak say what? :)
ab5tract hack is synonym for 'cheat'
Tene_ I've never seen either of those uses.
ab5tract Tene_: expanding the documentation is how people like me contribute to things 07:43
along with test cases for Cardinal, which I keep putting off but get pissed about not accomplishing.
Tene_ ab5tract: but what's cheating about that?
That's good. 07:44
ab5tract Tene_: 'cheat' doesn't mean cheat in an Existential sense 07:45
it means 'bypass'
'-h' == "switches"; #=> true 07:46
masak
.oO( note to self: never choose a project name with possibly negative connotations. )
ab5tract hehe
Tene_ heh 07:47
I'll just take your word for it
:)
masak general question: proto is already awesome at installing things, but I feel a final step is missing after the installation. what should it print to the user so that she can start using the just installed program? 07:48
ab5tract so, "cmd('wget -h');" is categorically different than "cmd('man wget');" or "cmd('cheat wget');"
moritz_ masak: "installed $project successfully"
masak moritz_: I can do that. 07:49
but that's not what I'm after.
ab5tract you use each to approach your subject with varying angles.
The kitchiness of 'cheat' as a CLI util is a bit laughable, I agree.
masak it already says "Downloading $project...downloaded", "Building $project...built"
ab5tract 'cht' would be much more appropriate ;) 07:50
07:51 DemoFreak joined
pugs_svn r25701 | moritz++ | [docs] a favicon for perl6-projects.org 07:52
ab5tract masak: What was added to what shell var? 07:55
masak ab5tract: I'm sorry, you've lost me completely. which shell var?
ab5tract masak: print $PATH as grok'd through a script that elaborates a list full of excutables in $PATH that were created today|whenever 07:57
masak ab5tract: please be patient with me, it's apparently very early here still. you're talking about a script somewhere which prints $PATH? 07:58
and this script was pasted recently, here at #perl6?
do you have a link to the script, or a link to the logs when this was mentioned?
ab5tract compare that to a list of bin/ scripts in the just-installed-archive, which you present to the user: "Do you see: cheat? [y/n]"
masak: I'm sorry this would have been better presented in privmsg, apologies 07:59
masak ab5tract: I simply have no idea what you're talking about, that's all.
ab5tract general question: proto is already awesome at installing things, but I feel a final step is missing after the installation. what should it print to the user so that she can start using the just installed program?
masak it seems to make sense, but not with the little context I have.
ah, yes.
that's better. 08:00
thank you.
ab5tract :)
masak now, how is what you've already said an answer to that?
we don't do global installs yet, just build things in their dirs.
ab5tract grok $PATH through my $comb # or some sh*t ;)
masak what I'd like is some small friendly instruction on how to get the Perl 6 program running. 08:01
but I'm not sure how to make that general, so that projects don't have to jump through hoops to have that instruction shown upon installation.
08:01 NoirSoldats joined
masak perhaps some secret handshake in the README of the project? 08:01
moritz_ or even a README.afterinstall if such a file exists 08:02
masak moritz_: good idea.
.afterbuild perhaps, though.
I think I'll do that and only that so far.
08:04 s1n left, bacek_ left 08:06 s1n joined
pugs_svn r25702 | moritz++ | [docs] section "Miscellanea" for irc logs and mailing lists 08:09
mberends likes to keep the filename count down, fwiw, masak
masak mberends: indeed. 08:10
mberends: so maybe detect a certain heading in the README instead?
moritz_ better add an option for a file name than imposing a README file format on the projects
mberends tail README
masak mberends: no, I don't like that.
people should have whatever they want at the end of a README. 08:11
it's too arbitrary.
it has to be something more subtle, something like looking for '=== Once you've built' 08:12
moritz_ that won't work if they have POD in their README
afk &
mberends inside the README ?
08:13 Maghnus_ joined
masak true, and README files can be in Markdown format too, IIRC. 08:13
mberends writes POD inside READMEs anyway. it just works.
masak mberends: I'm going to do the rw review of the 'proto' script now. 08:14
I'm working in a branch, as usual.
08:14 ejs left
masak (git rebase)++ 08:14
mberends that cheat concept is great. I'm thinking about re-doing it for POD and November, and choosing a more suitable name 08:17
masak that would be awesome. 08:18
mberends link in u4x maybe as well
masak u4x will likely not be user-driven, though. 08:19
mberends fair enough
masak its contents will be curated through a very strict process that only I know the extent of so far. :)
mberends don't start spouting like Ted Nelson 08:20
masak I think it'll have automatic tests checking that all words used in the explanations are in some English wordlist, for example.
mberends a masak-bot
masak mberends: I'll try to be down-to-earth, yes. 08:21
I'll be committing a P2T1A file to u4x/ soon, with very short-term plans for a prototype.
08:28 Maghnus left
masak the + twigil is buried, yes? 08:38
moritz_ yes, think so 08:39
Matt-W Morning 08:41
masak Matt-W: good morning, sir.
08:42 Maghnus_ left
Matt-W masak: my grammar actions didn't work last night :( 08:43
masak Matt-W: because of bugs in Rakudo, or in you? :) 08:44
Matt-W I don't know 08:45
the methods just didn't seem to trigger
and I was too tired to chase it
not sure if I even managed to associate the actions class properly 08:46
but I did find a bug :)
masak yah, saw that :) 08:47
Matt-W++
Matt-W not putting up with null PMC access anymore!
masak gotta catch'em all.
Matt-W blogs.gnome.org/jjongsma/2009/03/05/git-sucks/ hahahahahaha 08:48
masak the example is actually a subtle example of how git rocks. :) 08:49
Matt-W yes
it's clearly sarcastic
in context of all the git-bashing on planet gnome in the last few weeks, it's rather amusing to me :)
08:50 ab5tract left
masak mberends: by the way, have I or someone else told you about rebase, also known as "the best thing since Michael Dorn"? 08:51
mberends will find an excuse to give rebase a whirl 08:52
08:53 dduncan left, sri_kraih joined
masak mberends: the short story: I'm in a branch, developing, but someone committed to master. oh noes! but fear not: 'git rebase' rewrites the branch history to make my commits come after those in master. it "re-bases", i.e. makes it seem that the branch was branched after the new commits in master. this makes merging later much, much easier. 08:54
mberends that probably looks good on the tree at github as well 08:56
Matt-W wow
that is exactly what we need at my work
moritz_ if you want that tree locally, start gitk 08:58
masak mberends: but don't do it after you pushed to upstream.
mberends is the effect on the merge algorithms to give priority to recent master updates?
masak mberends: no. 08:59
if there's a collision, the merge fails.
moritz_ and you have to fix that interactively 09:01
luckily if the projects are a bit larger there aren't many conflicts, usually 09:02
Matt-W it's handy if you're branched off something where people are generally working in other areas
masak rebase does help alleviate the merge pains. they are like small merges, and in the branch instead of in master.
Matt-W masak: btw, my non-working code is in form/master if you're bored. t/02-parseactions.t tries to do the necessary stuff. 09:03
Matt-W sends virtual chocolate
09:03 [particle] left
masak I'm quite busy today, but I'm also curious. might look at it. 09:03
09:04 [particle] joined
Matt-W There's no rush :) 09:05
09:06 icwiener joined 09:07 NoirSoldats left 09:09 NoirSoldats joined
pugs_svn r25703 | masak++ | [u4x/TODO] corrected and updated stuff 09:09
r25703 | masak++ |
r25703 | masak++ | * Removed '+' twigil
r25703 | masak++ | * Typo: s/0c/0x/
r25703 | masak++ | * Removed some TimToady-deprecated grammar/regex builtin rules
r25703 | masak++ | * Added idea about a fantastic OO guide
r25704 | masak++ | [u4x/P2T1A] added short-term plan about prototype
09:19 rkendall joined 09:35 bacek joined 09:53 rkendall left 10:00 alc left 10:14 Ehtyar left
masak boasas.com/?c=1066 # sometimes Perl 6 feels like this 10:18
literal haha 10:19
moritz_ :-) 10:21
oskie haha.. those comics are great.. boasas.com/?c=1068 10:29
Matt-W masak: perfect!
10:30 ejs joined 10:32 NoirSoldats_ joined 10:34 ilogger2_ joined 10:36 TimToady_ joined, rhr left, rhr joined, cls_bsd joined 10:40 ejs1 joined 10:45 rhr left, cls_bsd left, cls_bsd joined 10:54 rhr joined 11:22 ejs2 joined 11:33 ejs1 left 11:37 baest joined 11:58 meppl joined 12:00 M_o_C joined
pugs_svn r25705 | masak++ | [perl6-projects.org] touched up the style a bit 12:06
masak hopefully for the better. 12:07
if nothing else, it aligns better with my taste. :)
moritz_ will take a look when the page refreshes in two minutes 12:08
masak there you go. 12:11
moritz_ IMHO that's not enough colour 12:14
pugs_svn r25706 | masak++ | [u4x/P2T1A] added missing words to rationale
moritz_ granted, before it was too much
what do you think of making the whole border a bit thicker, and in colour? 12:15
masak moritz_: I'll let you decide; but IMHO if the colour dosn't actually carry any information in itself, it doesn't need to be very much at all.
moritz_: I don't think that would add anything.
thin borders are nice.
moritz_ I'll experiment a bit with it tonight 12:17
pugs_svn r25707 | masak++ | [perl6-projects.org] de-capitalized a few nouns 12:19
moritz_ I see have gained a contributor :-)
masak: if you want, feel free to introduce a box with Projects that use Perl 6 12:20
like november, Web.pm, proto, druid ...
masak moritz_: I'll think about it. as you say, it's a bit of work to keep updated.
moritz_: right now, we have such a list already in proto.
moritz_ then maybe add proto to the misc section? 12:21
masak aye, I'll do that.
moritz_++
moritz_ btw I try to spell Perl 6 on that page with a non-breaking space, but it's no disaster if you write it with ordinary space
masak noted. 12:22
12:23 mberends joined
pugs_svn r25708 | masak++ | [perl6-projects.org] added 'proto' in misc 12:25
12:29 FurnaceBoy joined 12:37 ejs1 joined 12:38 oskie joined 12:41 oskie left, oskie joined 12:45 ejs2 left 12:52 ruoso joined
masak the 'installer' script in proto gets a bit of extra beauty because of all its imperfection comments. 7 TODO, 2 XXX, and 6 RAKUDO comments. it gives it an air of work-in-progress and we-left-a-comment-because-we-care. 13:02
github.com/masak/proto/blob/d0f2351.../installer
13:09 kane_ joined
masak might be the wrong forum for this question, but are global comments in a YAML file best put directly above or directly below the '---' line? 13:13
mberends masak: installer:55 s/sore some value/for some value/
masak mberends: okie. will fix. 13:14
mberends above, to be consistent with item comments
masak agree, but is it legal? 13:15
13:15 kane_ left
masak did the YAML parser grok it? 13:15
13:15 kane_ joined
mberends it probably drops the comment lines 13:15
masak tests
seems to work, yes. 13:17
13:17 kane_ left, kane_ joined
masak ok, I've done the review. 13:18
next up, I plan to add verbose comments.
13:19 kane_ left 13:20 kane_ joined 13:22 FurnaceBoy left 13:31 kane_ left
masak mberends: oh, and an interested question: you wrote in a comment that you thought there ought to be a law against hash-ending commas. why? 13:32
also, I'm half-thinking of making $commentinfo into a file-level variable. that would mean that comments that were changed during manual edit of config.proto will revert to their original state on the next re-save. this might be considered either an advantage or a disadvantage. 13:35
literal hash-ending commast as in { foo => bar, baz => quux, } ? 13:36
masak aye. 13:37
I don't see anything wrong with them.
especially not when each kv pair is on a line of its own.
literal yeah
masak and there's the change of reordering/addition.
that's why I was curious about the comment.
s/change/chance/ 13:38
mberends it goes against my intuitive feel for programming languages generally. it would probably fail in C, java etc and could become a bad habit. 13:39
13:39 kane_ joined
literal that's just a shortcoming of those languages :) 13:39
mberends perl6 rulez the world :) 13:40
literal and Perl 5 has always allowed this...
masak mberends: I think you'll find that those final commas are allowed in surprisingly many modern languages.
they're good for the case when a list/hash is computer-generated.
then you don't have to special-case the last item.
mberends understood, but this old dog won't learn, or, like, that trick,. 13:41
literal it would be equally silly to disallow a final semicolon in Perl 5 blocks, since it is a statement separator (not terminator), after all 13:42
masak mberends: I tend to have little sympathy for people who refuse to adapt. :P
Perl 6 is all about breaking old habits, and this feature isn't even new. 13:43
mberends tmtowtdi, thank goodness
masak ...says the person who wished for a law against it... 13:44
;)
mberends ok, i withdraw the legislation proposal
it was a bit tongue in cheek
masak of course. :)
mberends otherwise i would have yanked that poor comma with a pair of pliers :) 13:47
mberends will try to collect his repaired laptop, but has rather enjoyed the eee and solid state drives 13:50
13:52 Tene joined
masak mberends: so you would recommend an eee? 13:52
mberends only the one with the largest LCD. i chose the model 1000, Linux based. Xandros is a pain but the only one to do Skype properly. eeebuntu and even Debian Lenny manage almost all the peripherals. 13:54
masak likes the sound of that 13:55
mberends it's cool to have a 4GB or 8GB Micro CD card as a swappable system drive :)
masak I need to find my way back to the Linux world.
mberends *SD
masak aye, I can imagine. :)
mberends FreeBSD is almost running. (the computer's name is meee) 13:56
Matt-W :) 13:57
Matt-W names his computers names beginning with A
mberends used to name them after his friends, but ran out of names ;)
masak mberends: you have a computer named after me? :) 13:58
Matt-W I think my friends would leave if I named computers after them
mberends thanks, now I have one more name :) 13:59
masak nice save. :)
Matt-W applauds
14:02 zamolxes joined
mberends must leave to collect the repaired laptop, which is/was named dash 14:02
Matt-W hope it's good and healthy now 14:03
mberends yes, it will need a new hdd. maybe I'll get an OCZ SSD 14:04
pmichaud looooong scrollback this morning.
Matt-W wish I could afford one of those :(
mberends you can if you break your old drive. you then only have to justify the price difference 14:05
Matt-W which is substantial
and I'm broke
ah well
I had the winter gas and electricity bills
winter + expensive fuel == bad for the bank balance 14:06
mberends ouch, it's been cold this february
Matt-W yeah
wish my bills were monthly instead of quarterly 14:07
mberends bbl o/
Matt-W ah well
14:07 mberends left 14:14 ejs1 left
ruoso trying to grok last changes in Capture... 14:19
first of all, it will basically change a *lot* of code in SMOP 14:22
because Capture is perhaps the most important type....
so in one change, the "invocant" slot of the capture no longer exists... 14:23
at least we no longer turn any first positional argument into invocant... 14:24
only the opposite
any invocant is potentially a first positional argument
14:27 skids joined
ruoso so we need two different methods in capture... 14:28
one to "get positional arguments without the invocant"
14:28 Ariens_Hyperion joined
ruoso and other to "get positional arguments with the optional invocant" 14:28
basically capture would have a "talk to me as if I was a method" and "talk to me as if I was a sub" APIs 14:31
and in the end "foo($a: $b, $c)" is the same as "foo $a: $b, $c", which is the same as $a.foo($b,$c) 14:33
Matt-W That seems to be what the changes imply 14:34
if there is an invocant, it's the first positional argument with some sort of internal mark that it can be an invocant, but the first positional argument could just be an argument and not an invocant at all. 14:36
ruoso what I don't get is that it still requires the signature transformation, since an un-marked first positional argument never becomes the invocant (afaics) 14:37
so "method foo($a: $b, $c) is export" still needs the modified signature in its sub version 14:38
TimToady_, is that it?
14:52 abra joined
AndyAway Morning all! 15:02
15:02 AndyAway is now known as alester
moritz_ god dag 15:03
diakopter ruoso: well, at the implementation level, you needn't necessarily keep the first slot full for a non-method... just hide it if it's marked as such 15:05
masak guten tag.
ruoso diakopter, yeah... I think I'll keep the slot there 15:06
diakopter I was going to say... talk about major rework
ruoso but I'm still not very happy with the two different APIs 15:07
diakopter that's what CIL does, btw... keeps the first slot empty if it's a non-method and marks it as "static"
ruoso CIL?
diakopter common intermediate language?
MSIL.. .net
ruoso ah
ok
diakopter CLR/mono
ruoso my experience with mono/.net is simply as an application user 15:08
I just note when mono packages get installed ;)
but I still think I'm missing somethin
since all this discussion was about removing the need for the transformed signatures in "is export" 15:09
maybe TimToady_ just agreed with me
ruoso not very used to it ;)
diakopter on an email list?
ruoso diakopter, no, here on irc 15:10
diakopter he's idle...
Hi TimToady who might be watching the irclogs on http 15:11
ruoso also, if a capture in item context returns itself.... does that mean that "sub foo { return 1} my $a = foo()" will put a capture in $a? 15:12
diakopter goes back to optimizing his runtimes for inefficiency ;)
semicolon after } ? 15:13
std: sub foo { return 1} my $a = foo() 15:14
p6eval std 25708: OUTPUT«############# PARSE FAILED #############␤Syntax error (two terms in a row?) at /tmp/HYDnc8Wn5C line 1:␤------> sub foo { return 1} my $a = foo()␤ expecting any of:␤ infix or meta-infix␤ infix stopper␤ standard stopper␤ statement modifier loop␤
..terminator␤FAILED 0...
diakopter reads the diff
ruoso diakopter, yes... I forgot it...
diakopter for anyone who's listening... I solidified IronPerl's first milestone... to be able to treat the AST from viv/STD as an ultra-sugared C#3 AST. Completely disregarding Perl 6-specific types for now, as well as the language features that go along with those... the first things I want to get (rudimentarily) working are the features that can translate directly: the classes/types/object system, structs, methods (and other routines), the CIL primitives tempor 15:20
Captures and patterns after that... invocations and multis and signatures can wait; type-checking isn't absolutely necessary after all :P 15:21
moritz_ you need type checking for multi dispatch, to some degree 15:22
diakopter oh; yes, I was including type-checking there in with "invocations, multis, signatures". 15:23
Matt-W diakopter: great! Glad to hear there's progress 15:24
diakopter C#'s lazy or eager evaluation (libraries), iterators/closures, runtime type/method generation (libraries), and implicit casting (libraries) should be enough to last a while... at least once the various Contexts are more fully analyzed and classified, I'll be able to understand more fully how Perl 6's dynamism works 15:26
Matt-W: well, progress on a theoretical axis. I've collected an absolute glut of F/OSS C#/VB/F# libraries that would be quite helpful if arranged/glued in the proper ways 15:29
Matt-W diakopter: excellent. What looms in the back of my mind now are the words 'grammar engine'
diakopter is there a canonical list of the Contexts in the Synopses somewhere? 15:30
moritz_ there's an overview in S02, but it's not complete
diakopter the grammar engine actually can wait... STD can be used for that indirectly for a while.... don't you think?
... to an extent. 15:31
moritz_: here's a mean question: what's missing from the list in S02? :P
moritz_ There are also various container contexts that require particular kinds of containers (such as slice and hash context; see S03 for details). 15:33
there you go, diakopter :-)
diakopter I read that...
are the container contexts a subcategory of item (scalar) context? 15:34
(or list)?
15:34 nihiliad joined
moritz_ afaict there are container contexts for items and lists 15:35
for example 'is rw' provides an rw container context
or am I totally off here?
then there are contexts that allow autovivification 15:36
diakopter I'll have to study how much of the context information is provided by STD's AST, and how much will need to be further inferred/deduced. 15:38
15:38 Ariens_Hyperion left, eric257 joined
diakopter [some of?] the S03-operators tests are included in S02.html 15:40
(under Context)
oh.. I guess that's not a problem 15:41
lots of tests in S02.html are from other Sxx
15:42 zamolxes left, justatheory joined
moritz_ the synpsis have some measure of overlap... :-) 15:42
ruoso ok... just sent a reply to the changes in the capture, asking for more clarifications... 15:56
16:02 TimToady_ is now known as TimToady
pmichaud TimToady: (re <?>) -- after thinking about it a bit more last night, using the '?' key (or any key) for holding the result object doesn't feel quite right to me. (more) 16:05
eric257 curses as php
pmichaud TimToady: In general, all of the other keys tend to produce either a Match object or an Array of Match objects; so the '?' key ends up being an exception to that rule. In that sense, "result object" feels more like a Match object attribute. 16:06
TimToady: all that said, using a special key like '' or '?' sounds _exactly_ like something I would choose to do, so I'm fine with leaving it that way if you are. :-)
TimToady: Just wanted to note the "tinge" I had in thinking about it. 16:07
(end)
16:07 abra left
PerlJam What's a "result object"? 16:07
pmichaud every Match has a "result object" that can be set using make()
before yesterday's changes to the spec, the result object was what was used to evaluate the Match object in string and numeric contexts. 16:08
PCT (and all of the languages based on it) use the result object for building up the AST inside of the parse tree.
pugs_svn r25709 | masak++ | [u4x/TODO] added 'result object' 16:09
cognominal This may be of interest to TimToady : www.cse.chalmers.se/~bernardy/Funct...arsing.pdf 16:12
is there a way to leave a message to someone using purl? 16:13
moritz_ cognominal: here you use lambdabot
cognominal: with @tell nick message
cognominal @tell TimToady this may be of interest to you www.cse.chalmers.se/~bernardy/Funct...arsing.pdf 16:14
lambdabot Consider it noted.
cognominal I forgot that lambdabot was here
16:28 M_o_C left
[particle]1 and purl isn't here :) 16:31
masak thankfully. 16:32
16:32 Tene_ joined
masak Tene_: good day. 16:40
16:43 Tene left 17:05 Ariens_Hyperion joined
masak Matt-W: your t/02-parseactions.t passes here. 17:05
Matt-W: oh, and you're currently misspelling Damian's name in the project description of Form. 17:06
17:11 clintongormley joined 17:15 mikehh joined 17:19 gravity joined 17:27 mberends_ joined
Tene_ masak: yes, good day 17:28
dalek kudo: fe2bc86 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 317 files, 7121 passing, 0 failing
17:29
masak Tene_: hope you are feeling better.
Tene_ masak: mostly. still coughing very badly, though.
:(
masak sad to hear that.
Tene_: I haven't had much time to plan Web.pm today, but there's much to digest from the past few days. 17:30
I'm really happy about how welcoming different web frameworks teams are when you approach them with questions.
Tene_ Let me know when you have something for me to look at. Or just email me.
masak Tene_: well, there's already a PLAN file in the Web.pm repo.
I'm sort of thinking out lout in that one. 17:31
Tene_ Where is the web.pm repo?
masak :)
hold on.
github.com/masak/web/
Tene_ Thanks.
masak np.
I'm just trying to get everything into PLAN right now, from large-scale ideas down to client code examples. 17:32
hopefully, a plan of action will emerge from that. 17:33
I hope to build my work around fairly small milestones consisting of cool examples of web things you can do.
that might not always be possible, of course. but whenever it is, I hope to be able to do it like that. 17:34
and blog about it.
Tene_ nice
masak ihrd said he'll be considering next week his first in the time plan. I haven't decided if I should do the same, or if I should proceed to week #2. might depend on how ready I feel by the end of this week. 17:37
oh. seems we're leaving now. 17:38
gotta go. :)
Tene_ bye
masak Tene_: get well soon.
pugs_svn r25710 | moritz++ | [perl6-projects.org] color tweaks 18:03
18:04 clintongormley left, schmalbe joined 18:07 jeremiah_ joined
jeremiah_ Congrats masak and viklund 18:08
www.athenalab.com/Perl_6_Wiki_Award.htm
18:15 ilogger2 joined
ruoso :( yes... invocant was dropped from runtime 18:23
half of SMOP needs to be rewritten
[particle]1 welcome to the pain of writing implementations for an unfinished spec 18:24
18:24 Kimtaro_ joined, Kimtaro_ left
ruoso [particle]1, didn't rakudo implement anything on invocants? 18:24
18:24 smtms joined
diakopter ruoso: I still don't see why that can't be emulated 18:25
ruoso because a method looks at the first argument independent if it was marked as invocant or not
18:25 Kimtaro_ joined
ruoso the "invocant" concept now only exists in the compiler 18:25
[particle]1 rakudo needs to change for invocants, and both nqp and rakudo need to change for Match.result_object
...and all languages written using nqp. 18:26
diakopter so alias 'self' to the first argument when it's a sub
ruoso yes
well
diakopter er, 2nd
ruoso that isn't really necesary
but if you use a method as a sub
the first argument will be "self" 18:27
the "my $self = shift" is implicit
diakopter right, so always use the sub/method marker
to determine whether 'self' is 1st or 2nd arg
ruoso self is never the 2nd argumetn 18:28
diakopter but it is if you do the emulation we were talking about above (leaving the 1st slot there at some level for subs)
ruoso the thing is that SMOP did have runtime support for invocants
and invocants no longer exist at runtmie 18:29
only at compile time
the emulation is not really possible
because it's on the call side
moritz_ diakopter: no. self is *always* the first argument. It just might be implictly provided
unless I really misunderstood your emulation
ruoso it's always the first argument (in a method), even if no invocant was sent by the callee 18:30
*caller
so...
our foo($b,$c) { }; foo($a, $b, $c);
sorry
our method foo($b,$c) { }; foo($a, $b, $c);
$a will be treated as the invocant 18:31
18:31 Kimtaro_ left
diakopter alright, so foo's implied signature has an instance of the class(and on up) that defines foo() as its first param? 18:33
ruoso no
foo's signature implies "self", because it's a method
since $b and $c are actually the 2nd and 3rd parameters
s/since/so/ 18:34
methods always start counting the parameters in 1, not 0
because of the implied invocant
subs, otoh, start at 0
so 18:35
our sub foo ($b, $c) { }
really takes just two arguments
our method foo ($b, $c) { }
takes three
the invocant now only exists at compile time
at runtime, it's plain positional arguments
18:36 Psyche^ joined
ruoso I think it's quite sad that we loose that semantics 18:37
diakopter oh, but you would be able to distinguish them if the compiler supplied something to the runtime indicating whether it was called with .foo() or foo()
but I guess TimToady's email explicitly forbids that 18:38
18:38 Psyche^ is now known as Patterner
ruoso I think TimToady's purpose on that change is precisely to eliminate that difference 18:38
18:42 bacek_ joined
ruoso now I have to start cutting losses in SMOP 18:43
diakopter so what's the semantic difference between declaring a "method" and a "sub" with the same signatures
and same exportedness
for the dispatcher's purposes 18:44
18:45 Kimtaro joined 18:46 Tymir joined
ruoso none 18:46
what changes is the dispatcher itself
you have the sub dispatcher
and the object dispatcher
the object dispatcher is actually private to each object 18:47
the sub dispatch is private to each sub
in a way
basically
foo($a,$b,$c)
looks for &foo
and calls .postcircumfix:<( )>(\($a, $b, $c))
diakopter and the various foos' dispatchers make a consensus on which one to call?
ruoso there's only one &foo visible 18:48
that masks all the outer ones
but it should have copied all the variants from the outer scopes
moritz_ so does this mean that a sub can also be called as method again?
ruoso not really
it means that foo($a: $b, $c) is *not* a sub dispatch
which means it will *not* look for &foo 18:49
it will look for $a
and call foo there instead
diakopter oh, but if you import a sub as a method, you can invoke (even "built-ins"?!) subs like methods, so the "invocant" becomes the first arg. I like that a lot. Not sure whether it had that before, though. 18:50
ruoso yes, because the signature is the one doing the binding 18:51
and you still have the signature from the sub
even if it does get registered as a method 18:52
diakopter that gives lots of possibilities for .meth1(meth1_arg2).func1(func1_arg2)
ruoso it really looks like LISP
or not 18:53
maybe my brain is melted already
in the end, I think that also means we have a change in the meaning of "my" and "our" method 18:54
so 'my' and 'our' stay with the same meaning as for everything else
'my method foo' creates a public method that is lexically aliased as &foo
'our method foo' creates a public method that is both aliased as &foo and registered in $?PACKAGE
'method foo' creates a public method that is not aliased anywhere 18:55
and it seems from yesterday conversation, that you use 'method !foo' to declare it as private
while you still can use both 'my method !foo' and 'our method !foo' 18:56
but I think 'my method !foo' still aliases to &foo 18:57
diakopter thinks about ways to further swizzle argument processing order with R. Some variant of the , operator? R, R, ?
ruoso since &!foo looks like the private access to the attribute declared with 'has &!foo' 18:58
diakopter RR, maybe swaps, shifts, pushes?
pugs_svn r25711 | lwall++ | fix declaration syntax of private methods 19:00
19:02 mberends_ joined
ruoso TimToady, what happens if you have: method foo($b,$c) {}; and someone calls foo(((1,2),3),$b,$c)? 19:07
captures doesn't flatten lists until you require it
does that use the entire ((1,2),3) as invocant?
ruoso hopes so 19:08
pugs_svn r25712 | lwall++ | more method declaration clarification, ruoso++ 19:11
TimToady yes, it does 19:12
lambdabot TimToady: You have 1 new message. '/msg lambdabot @messages' to read it.
pugs_svn r25713 | putter++ | [elf_h] More correct ||,&&,or,and,not. 19:13
r25713 | putter++ | So more .Bool'ing. 5% speed hit on self-compilation (with cached parse).
ruoso TimToady, ok... now I just have to rewrite half of SMOP 19:14
;)
TimToady sorry, kind of :) 19:15
wish I was smarter sooner sometimes...
ruoso I think in mildew the effect can be a bit reduced 19:16
but in SMOP it basically changes everything
since Capture is *the* most important type
TimToady but in addition to unifying things internally, I also think this will enhance interoperability with both Perl 5 and Python
19:16 moritz_ sets mode: +o TimToady
ruoso indeed 19:16
although the dispatching itself was already private to each object or each sub 19:17
TimToady and, in fact, you could just link in a Perl 5 sub as the implementation of a method now
ruoso 'my $self = shift' is valid Perl 6 19:18
semantically-speaking
PerlJam greetings
What world-altering things have happened today? :)
TimToady but only if declared as a sub
ruoso yes...
pugs_svn r25714 | putter++ | [elf_h] PrimitivesP5.pm: More correct prefix:<!>(Any). 19:19
TimToady I've been increasing the stress levels of both rakudo and smop folks by simplifying Match and Capture 19:21
ruoso TimToady, are you planning to include the "capture in item context" dwimmery in the spec?
TimToady sure, unless you beat me to finding the right place to put it 19:22
ruoso hmm... I don't think so... ;)
TimToady probably somewhere near where it already talks about list context, though that's probably misplaced as well...
ruoso we do need S08, and you already asked me for it... ;) 19:23
diakopter there's some list context in S02 and in S03 19:24
19:31 riffraff joined
moritz_ std: class A { has method !foo { ... } }; 19:32
p6eval std 25714: OUTPUT«ok 00:02 34m␤»
moritz_ that'll need some updating in the test suite...
ruoso std: class A { our method !foo {...} } # that's a bit more surprising 19:34
p6eval std 25714: OUTPUT«ok 00:02 34m␤»
TimToady well, when you think about it, a private method is more or less just a subroutine, since it's non-virtual in any case 19:36
19:36 renormalist joined
diakopter how does one restrict a method's self to only its home [room]class 19:37
ruoso diakopter, what do you mean? 19:38
alester I've added some new fields to your user accounts on rakudo.org.
diakopter so even if it were exported as a sub, it would still be invoked (as a func call) only when the first arg was that class
alester Are there other items we ought to track on people? 19:39
pugs_svn r25715 | lwall++ | By principle of least damage, minimalize autopromotion of lists in item context
r25715 | lwall++ | to Capture rather than to Array. (Let binding handle any subsequent
r25715 | lwall++ | promotions lazily.)
ruoso diakopter, there isn't really "Class Methods" in Perl 6,
PerlJam alester: IRC nick :)
alester oooh, good
done 19:40
diakopter also, pugscode svn username, since those aren't always equivalent? dunno.
ruoso TimToady, Capture is immutable
alester Why is pugscode username userful?
diakopter ruoso: what do you mean? I wasn't referring to class methods, I didn't think... 19:41
ruoso diakopter, so I didn't get what you meant
TimToady diakopter: that's what submethods do, basically
moritz_ the svn username is what appears in the commit mesasges
don't think it's worth the trouble, though
ruoso TimToady, if "my $a = (1,2,3)" promotes the list to a capture, that means it will stay immutable
TimToady indeed, but they can always use [] if they mean it 19:42
alester So far, you can add: Nmae, PAUSE ID, Home page, Twitter page, AIM ID, Jabber ID, IRC nick
And that's just contacty-type stuff.
ruoso Ok, but beware that will surprise a lot of p5 people
TimToady and I'm trying to bias things a bit toward immutability by default like a good FP designer, so we can keep control of parallelism
a p5 person would expect that to assign the final element 19:43
aka C comma operator
we already broke that about 8 years ago :)
[particle]1 bleh. who designed that.
PerlJam and be pleasantly surprised when it does not.
diakopter xrl.us/beifzt 19:44
19:44 Tymir left
moritz_ notes that we just created the next Perl 6 FAQ 19:44
TimToady "different mistakes this time" :)
ruoso TimToady, I'm fine with that, but I think it's worth making a note to remind people that capture is immutable at that point
TimToady and that was already in the Perl 6 FAQ as different from P5
PerlJam moritz_: there will always be FAQ for newbies, and for people coming from perl 5 19:45
moritz_ it would have been nice to get rid of one item entirely...
[particle]1 people coming from ruby will be very confused about @@
moritz_ PerlJam: that's no reason not to try hard to avoid FAQs
ruoso everyone will be confused by @@
we really could use a different sigil instead of a two-char sigil
TimToady what the ruby folks need explained to them is that the ruby sigils have all turned into twigils 19:46
[particle]1 yep, but the spec isn't changing much anymore^W^W^W^W^W^W
moritz_ ah well ;-) 19:47
TimToady believe me, I know some unicode characters that would replace @@ nicely, cause I've looked at them with malice aforethought
[particle]1 designing in anger
TimToady just haven't seen any Latin-1 ones that I like, and trying to limit standard Perl 6 to Latin-1
ruoso meh.. Latin-1 is so 20th century ;) 19:48
TimToady but I think the @@ does convey that there are multiple lists
ruoso TimToady, actually, it might contain hashes as well 19:49
TimToady and it's kinda ugly on purpose
ruoso it's just unflattened
unflattened whatever
PerlJam TimToady: limiting to latin-1 is just a temporary compromise until the rest of the world catches up, right?
TimToady PerlJam: I would like to think so, but we're probably talking decades here...
ruoso in fact... one could really think that @@ is the "Capture" sigil
19:49 slango joined
PerlJam TimToady: sure. I'm just thinking about the perl I'll be coding when I'm 80 ;) 19:50
ruoso: I don't get that. 19:51
ruoso we've been calling that "slice" context
but it doesn't really mean that
in fact, naming it "slice" doesn't really make much sense 19:52
TimToady I try not to predict out that far. Though I do like the one prediction: "I don't know what weapons World War 3 will be fought with, but World War 4 will be fought with sticks and stones."
PerlJam ruoso: It made sense to me so far :)
[particle]1 thought $<191> (upside down ?) would look nice
PerlJam ruoso: calling @@ the Capture sigil makes me wonder what happened to the hashy component. 19:53
TimToady it's name that because it's what you want for @foo[ your slice here ]
*named
ruoso but that is just a very small use case for @@a 19:54
TimToady well, if we did call it the capture sigil, we could use ¢
ruoso @@a = map { map { map { ... }, * }, *} ,* }, *
^ that's a pretty more important use case
PerlJam ruoso: but that's still in the realm of "building a slice" 19:55
ruoso PerlJam, a "slice" of what?
it's the whole thing!
TimToady a slice of reality :)
a slice of life...
19:56 Ariens_Hyperion joined
PerlJam I'm okay with a slice of bread being the whole loaf. 19:56
diakopter taste
TimToady maybe we should go the other way and rename captures to slices
PerlJam (it's just a much bigger slice than what people are used to)
moritz_ rakudo: for <foo bar baz>.kv -> $index, $item { if $item ~~ /ar/ { say $index; last } };
p6eval rakudo fe2bc8: OUTPUT«1␤»
PerlJam TimToady: "slice" still connotes strongly with lists or arrays to me. 19:57
TimToady: so, again, I'd wonder what happened to the hashy part.
diakopter a slice can be the slicing or the sliced portion of the slicee 19:58
TimToady but the point is taken, we may well be able to unify the concepts at some level
[particle]1 wonders how many years ago we reached the "too many levels of abstraction" problem 19:59
TimToady so the texas sigil for ¢ would be @%
which is nice, since we just kicked out the $
PerlJam indeed
it looks odd, but somehow fitting :)
ruoso so we have the "capture sigil"? 20:00
my ¢foo = bar(); means not enforcing any context on the result of bar 20:01
which is equivalent to 20:02
my @%foo = bar();
is that it? 20:04
SamB why "texas"? 20:05
diakopter full-bore?
TimToady as in ten-gallon hat 20:06
and the state itself, leaving out Alaska
PerlJam SamB: « is french, but << is Texan ;)
TimToady and conveniently you can buy ¢ @ a % of $ 20:07
pmichaud I don't think the invocant change affects rakudo much, fwiw. 20:10
(after reading scrollback)
we were already headed down the line of "first argument is invocant"
because that's the way Parrot does it.
the only major thing that impacted rakudo and NQP is the change in meaning of $( ...matchobject... ) 20:11
TimToady what do you think about unifying slices and captures?
pmichaud I kinda thought they were somewhat unified already.
TimToady and that's mostly a mechanical change
moritz_ rakudo: class A { method !foo { say "in !foo" }; submethod BUILD(*@a) { self!foo } }; A.new() 20:12
p6eval rakudo fe2bc8: OUTPUT«in !foo␤»
moritz_ is duely impressed
pmichaud I'm duly shocked ---- why did that work?
moritz_ don't know, but the spec says it's right ;-) 20:13
pmichaud I didn't think we parsed "method !foo { ... }"
moritz_ at least as of today
TimToady well, it used to be that way once
pmichaud I do find $a = (1,2,3) a bit weird.
TimToady maybe we changed it for roles, or something
pmichaud (resulting in $a being immutable) 20:14
PerlJam pm: What's weird is that I don't find that weird :) 20:15
pmichaud but I also found it weird the way it promoted to Array, so perhaps it just takes getting used to.
with $a = (1, 2, 3) being immutable, just how immutable is it? For example... 20:16
my $b = 5; my $a = (1, $b, 3); $b = 2; say $a.perl; # ???
ruoso 2
ah
misread
well, you're actually asking how eager it is
pmichaud and
moritz_ pmichaud: $a.perl will likely be \(1, $b, 3) 20:17
pmichaud my $b = 5; my $a = (1, $b, 3); @a[1] = 2; say $b; # ???
moritz_ did you mean $a[1] = 2 ?
there's no @a
pmichaud yes, $a[1] = 2, thanks.
ruoso that's a failure, since it's immutable
moritz_ when captures are immutable... error 20:18
ruoso oh wair
I see what you mean\
pmichaud :-)
"how immutable is it?"
:-)
ruoso well...
it actually depends on how .[] works
in SMOP it would probably fail
because we do that kind of things with bvalue objects
so you're not accessing the actual value when you .[] 20:19
it just returns you a lazy lookup object
that will do the lookup when you actually ask
so if you try to store,
it will try to store in the list 20:20
and that will fail
Also
when you say 1, $b, 3
you're gettting the value inside VAR($b)
not the scalar itself
pmichaud really? is that always true? 20:21
ruoso actually, it is supposed to be that way
moritz_ ruoso: not in a capture. 'is rw' wouldn't work then
ruoso but I don't really know how
pmichaud for ($a, $b, $c) { $_ = 3 };
TimToady what about if it's subsequently b...what he said
moritz_ pmichaud: that could be the answer... my $a = (1, $b is rw, 3) would make $a[1] assignable, per default it would croak
pmichaud moritz_: that has the 'is rw' on the wrong side of the bind, I think. 20:22
moritz_ though I don't know if '$b is rw' will be parsed without an explicit \ in front of the capture
ruoso even then... "is rw" is in the Signature
not in the capture
pmichaud exactly. 20:23
moritz_ hm
you're right
ruoso in fact, that's a question I still didn't try to answer
moritz_ but I did ;-)
ruoso I don't really know how to make methods that are not rw
since return receives a captuer 20:24
pmichaud to me it seems clear that even if captures are immutable, the elements of the capture aren't.
otherwise 'is rw' doesn't really work.
TimToady what is immutable is the association with $b as a container
ruoso yes... in fact, I don't know how to make them also immutable
pmichaud what TimToady said. 20:25
TimToady or @foo==> as a flow
pmichaud i.e, we can't change the Capture to associate with something else, but we can change the thing it's associated with.
ruoso so... if I "return $a" from a method
how do I stop it from being rw
TimToady declare your return type 20:26
moritz_ that's not very intuitive
TimToady then it returns that instead of a capture
ruoso every routine is rw by default?
every block, actually?
moritz_ my @a = gather { my $a; take ++$a while 1 }; @a[5] = 8; # what will @a[6] be? 20:27
TimToady use single-assignment semantics so $a is immutable :)
20:27 rkendall joined
ruoso it looks like a joke, but I didn't get it 20:28
pmichaud are we still under the "any dependence on laziness is undefined" criteria?
ruoso anyway... the way to force it to be ro in SMOP today
TimToady that would be the FP answer, not really a joke
ruoso would be to do a "return $a.FETCH' 20:29
pmichaud (for moritz's example)
ruoso then it would return the value inside $a, not $a
20:29 mberends_ left
TimToady return |$a 20:29
moritz_ that's... not very intuitive.
TimToady hmm, maybe not
PerlJam I kind thought that was the difference between = and := in a way
ruoso I think that would fail, since the value of $a is not a capture
PerlJam, the problem is that you don't write "return = $a" 20:30
you write return($a)
moritz_ | interpolates also things that are not captures
ruoso but a single value doens't have a meaningful value to interpolate to
PerlJam ruoso: sure, but return always feels like = semantics (to me), so binding semantics need more syntax (I think) 20:31
ruoso PerlJam, but = requires a context
to which context are you assigning
?
moritz_ to the context your routine is called in?
TimToady perhaps return does extra work if there isn't an "is rw" on the routine 20:32
pmichaud looking at this from a different direction, perhaps there's an argument to be made that my $a = (1,2,3); assigns the value of 1 to $a
PerlJam or maybe we could have "return $cap" versus "bind $cap" (or something like that)
TimToady the "is rw" factors that out 20:33
PerlJam well, I was thinking that both sides would have to agree
pmichaud if "my $a = (1,2,3)" always assigns 1 to $a, then = is always list assignment? 20:34
I'm sure I'm overlooking something here.
TimToady well, = has copy semantics even for item assignment
ruoso so return would no longer be a regular function 20:35
pmichaud it wouldn't?
I don't see that.
ruoso and become a keyword that enforces the context of the sigil in each part of the arguments
20:35 rkendall left 20:36 rkendall joined
ruoso return $a, $b, $c; would be seen by the compiler in order to enforce the context of each sigil in the arguments to return 20:36
pmichaud it'd still be a list, yes?
ruoso yes
pmichaud why do we have to enforce the sigil context?
ruoso so all variable lookup would resolve to its value
in the context of the sigil 20:37
pmichaud uh, I'm lost. return($a,$b,$c) is just a normal function call. What piece am I forgetting?
ruoso ok, let me explain 20:38
sub foo ( $a is ref, $b is ref, $c is ref ) { $a++; $b++; $c++ }; my $a, $b, $c; sub bar { return($a, $b, $c) }; foo(bar()); say $a, $b, $c;
pmichaud foo(bar()) doesn't match there. 20:39
ruoso sorry
sub foo ( $a is ref, $b is ref, $c is ref ) { $a++; $b++; $c++ }; my $a, $b, $c; sub bar { return($a, $b, $c) }; foo(|bar()); say $a, $b, $c;
moritz_ rakudo on optimized parrot passes all tests here, on amd64 20:40
20:40 hercynium joined
pmichaud you're claiming that return($a, $b, $c) has to return references to $a, $b, and $c in that case, yes? 20:40
TimToady oh, if it passes all tests, you can call it "Perl 6" :D
ruoso it doesn't "have to"
but since it's a capture
it does
diakopter (quick, add some more tests)
moritz_ slaps TimToady a bit
TimToady I like have bits slapped on my behalf 20:41
PerlJam TimToady: great! now I can tell all of the naysayers that perl 6 is ready for use. :)
pmichaud I don't see where the context had to be enforced in that example, though.
ruoso pmichaud, otherwise "is ref" would never be able to work
if return is a keyword that expands by the context of the variable 20:42
it would be the same as
pmichaud the capture returned by bar() is bound to the arguments of foo(). It's foo that enforces the capture, not the return.
s/capture/context/
pugs_svn r25716 | moritz++ | [t/spec] private methods are declared with ! now
ruoso pmichaud, right... and that's the problem
because that sub is not marked as "is rw"
pmichaud but I'm not modifying the return value of bar.
at least, not directly.
ruoso you are
bar is returning values, it doesn't "is rw" 20:43
foo asks for "is ref"
that was supposed to break
but the capture itself doesn't have a way to do it
so return needs to do it
but return itself can't know which context the original arguments had 20:44
as a function, that is
pmichaud bar's CONTROL handler could do it, though.
TimToady or $a has to have some way of turning off its rw (bestowed by my) when it goes out of scope
ruoso my idea 20:45
is that "return" becomes a keyword
that syntatically looks around
and creates a new list with the proper values
instead of the references to the containers
pmichaud I don't want return to be a keyword, because then we have to consider the impact on fail, gather, warn, and the rest.
s/gather/take/
TimToady which is why I wanted $a itself to be smarter 20:46
pmichaud exactly.
idle thought: perhaps putting the 'is rw' on the sub is the wrong place -- perhaps it belongs on the return.
or perhaps return really does return values, and if you want to return a capture you do it explicitly. 20:47
ruoso pmichaud, but for it to return values
pmichaud I suspect you all have been down these paths before.
ruoso it needs to know how to traverse them
the function has no idea of the format of the capture in depth 20:48
it can only try to bind them
s/them/it
or assume one context
which would blow things up
pmichaud anyway, I'll just say that my $a = (1,2,3); assigning only the first element (or complaining about extra unassigned values) feels really good to me.
but I can also get comfortable with the idea that it's a reference to a List or Capture or whatever. 20:49
TimToady I think if we go ahead and let $a be accidentially bindable outside, it won't have much effect, since a typical my $a would be a different variable next time anyway 20:50
pmichaud intuitively, I'd think that it becoming a capture would involve \(...) somehow, though, and not be "automatic".
moritz_ TimToady: for return that's fine, but for take() that's weird 20:51
ruoso TimToady, that's not true for OO code most of the time
diakopter what if the binding/assignment context/destination/lvalue *implied* signature (if it existed) were available to return/fail/take/etc as a runtime binder? sorry if it's a naive question.
ruoso diakopter, the problem is precisely the fact that you don't have a signature 20:52
and you can't imply one
TimToady might take time travel
ruoso unless...
we make it sintatically
if the routine is not marked as "is rw"
we create a signature that matches that capture 20:53
and implicitly bind that before returning
diakopter well, the destination "cast" (yes, it can be a [list of] [tuple(s) of] types/contexts) travels backwards in .net
pugs_svn r25717 | putter++ | [STD] Removed unused "my @list;" declarations from EXPR. 20:54
ruoso diakopter, in Perl 6 you might not be able to tell that
because you can "defer" contextualization
20:54 rindolf joined
rindolf Hi all. 20:54
ruoso after all, that's what capture is about
rindolf Does Rakudo have line numbers for run-time errors yet?
pmichaud rindolf: not yet. Still needs some updates to PGE. 20:55
And every week that passes I'm glad that I haven't started updating PGE yet :-P
rindolf pmichaud: ah.
pmichaud: thanks.
ruoso maybe there's some method in the capture
to "auto-contextualize"
pmichaud I thought "auto-contextualize" was "bind".
ruoso using the syntatical information of how it was built
"auto-contextualize" is "bind to a signature auto-generated from the syntatical structure that generated this capture" 20:56
maybe every capture has a signature 20:57
syntatically generated
pmichaud I didn't realize that syntactical structure was part of the capture, to be honest.
ruoso it isn't
moritz_ is totally lost, but that's probably OK 20:58
diakopter (I pictured a capture as a type signature (however generic/nested), perhaps with symbols. Maybe that's entirely wrong. I should read the S again/more.)
pmichaud diakopter: "capture" corresponds to "arguments". "signature" corresponds to "parameters".
ruoso but the syntatical format of the capture composition 20:59
can be used to form a signature
in order to make all the values "copies" not "references"
diakopter I guess what you're discussing then is a return signature
ruoso return signature is (|$capture)
but return needs to copy the values if the routine is not "is rw" 21:00
and using an auto-generated signature from the capture syntatical structure to bind the capture into would solve it
pmichaud copy? not just mark 'readonly'?
ruoso or that 21:01
or whatever
diakopter cow?
ruoso whatever the routine defines, actually
diakopter "is cow"
ruoso need to go &
pmichaud I must go also -- busy kid evening here tonight (soccer, fencing, dinner, cub scouts, and homework). 21:02
yes, all in one night.
moritz_ but not all by one kid? 21:03
pmichaud not all by one kid. 21:04
two kids.
moritz_ parallelism++ 21:05
[particle]1 misses fencing 21:07
alester Could you put up a wall of some kind? 21:17
Matt-W wow that is a busy evening 21:18
even for two
21:22 mikehh joined
[particle]1 i'm building a fence, the next time i have a free weekend :) 21:23
rkendall Hi alester - just wanted to check to see if you have had any luck with the MT data for rakudo.org 21:24
alester oh crud, forgot. 21:25
um.
tonight.
rkendall no probs
also, noted you were using Markdown for formatting the pages 21:26
... if you were wondering why the headings weren't showing up it's because of the formating resrictions with "filtered html" 21:27
pugs_svn r25718 | putter++ | [elfparse] emit5.pm: Unbreak the build (vis r25690). 21:28
r25718 | putter++ | devEXPR.pm: Another porting/cleanup/make-it-less-likely-Ive-introduced-bugs edit.
21:30 Chillance joined
rkendall alester: You can allow extra html tags in the pages (like <h2>) here: rakudo.org/admin/settings/filters/1/configure 21:34
21:34 [particle]1 joined
alester rkendall: Yeah, prefer markdown. 21:34
Are you saying that they're not getting allowed?
and should be?
rkendall yes, some of the Markdown html is getting stripped out by a filter 21:35
alester ok, added h2, h3 and img
thanks
rkendall noted you had some <h1>s - but they are probably a bit big for inside content anyway
alester Your test page is fantastic! 21:36
I would never delete it! 21:37
rkendall ha ha
just changed headings to <h3> here: rakudo.org/how-to-help 21:38
alester well, I allowed h1 anyway
rkendall did you want to take of the "Submitted by" on the pages? 21:39
alester yes
I wouldn't mind if it was "last updated by" though.
diakopter what was the conclusion for "is rw" return? implicitly capture the returned object[s] with its own signature (provided by the parser)? 21:40
not is rw, I mean
isn't rw 21:41
rkendall Can choose which pages have it here: rakudo.org/admin/build/themes/settings
would need to edit the theme to put in a "last updated"
alester thanks 21:42
now shows it on Story but not Page
21:42 Chillance left
rkendall are you sure about those <h1>s? looks a bit messy on the front page 21:43
21:43 Chillance joined, ZuLuuuuuu joined
rkendall ...it's a <h2> for the main page heading 21:44
alester syeah, it's ok now
I downgraded to ##
rkendall Have to go already, but would be glad to help later with any website stuff. 21:53
alester You're doing wonderfully. I appreciate your in-depth knowledge here. 21:56
rkendall Thanks, your welcome. Have a good night/day 21:58
22:01 rkendall left 22:02 bacek_ left 22:18 kst joined
estrabd OT: is there a unix utility that, given a list, returns it sorted "randomly"? 22:22
like the opposite of sort
Tene_ you could do it in perl... 22:23
PerlJam estrabd: no, but you could make one quickly enough
estrabd no doubt - thanks :)
moritz_ rakudo: (1..10).pick(*).perl.say
p6eval rakudo fe2bc8: OUTPUT«[1, 3, 4, 9, 5, 10, 7, 2, 8, 6]␤»
rindolf estrabd: shuf 22:24
Tene_ nice
rindolf Though it may be a GNU extension.
22:34 ZuLuuuuuu left 22:42 hercynium left 22:44 rindolf left, bacek_ joined, slango left 23:04 bacek_ left 23:07 riffraff left 23:11 Chillance left
dalek kudo: e47c348 | pmichaud++ | src/parser/actions.pm:
Default lexicals as Perl6Scalar instead of Failure.
23:13
23:13 alester is now known as AndyAway 23:17 bacek_ joined 23:19 cognominal joined 23:25 Ariens_Hyperion left 23:31 armagad joined 23:32 armagad left, armagad joined 23:37 SamB left, depesz joined 23:39 SamB joined 23:45 M_o_C joined 23:54 wayland76 joined 23:55 bacek_ left