Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2007-12-11

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 justatheory joined #perl6
00:05 theorbtwo joined #perl6
02:10 ispy_ joined #perl6
02:49 dlocaus left #perl6
02:53 thoughtpolice joined #perl6
03:12 xinming joined #perl6
03:52 Schwern joined #perl6
04:07 BinGOs joined #perl6
04:32 penk joined #perl6
04:38 BinGOs joined #perl6
05:07 drbean joined #perl6
05:37 DarkWolf84 joined #perl6
05:45 alc joined #perl6
05:48 thestarslookdown joined #perl6
06:24 Ashizawa joined #perl6
06:26 jisom joined #perl6
06:28 dlocaus joined #perl6
06:40 devogon joined #perl6
06:46 iblechbot joined #perl6
06:54 IllvilJa joined #perl6
07:01 pugs_svn r19161 | dlo++ | [kp6] added newlines to the subroutine, minor cosmetic change
07:20 BinGOs joined #perl6
07:25 dlocaus [particle]: are you there?
07:34 pugs_svn r19162 | dlo++ | [kp6] I made subroutines work, by commenting out the (dollar).block.pad in Lit::Code, I think this is a mistake at this time, but the code works... dlocaus @ #perl6 irc.freenode.net
07:35 pugs_svn r19163 | dlo++ | [kp6] You can now combine -Bperl together
07:41 pugs_svn r19164 | dlo++ | [kp6] Oppps, I was right.  I cannot block out the binding just to make subs work
07:43 pugs_svn r19165 | dlo++ | [kp6] undid changes to make subs work, broke other code
07:50 elmex joined #perl6
07:52 dlocaus moritz_ / pmurais: http://dev.pugscode.org/browser/v6/v6-Kin​daPerl6/src/KindaPerl6/Grammar/Sub.pm#L39
07:52 dlocaus on line 39 should "<.opt_ws>" be there?  I thought that a space wasn't allowed between a subroutine name and the opening ( or {
07:52 lambdabot http://tinyurl.com/38hf2w
07:56 moritz_ where is opt_ws defined?
08:01 agentzh joined #perl6
08:05 dlocaus good morngin
08:05 dlocaus checking
08:05 dlocaus I didn't wake you up did I moritz_?
08:05 moritz_ IRC can't wake me up ;)
08:05 moritz_ it's 9AM here, btw ;)
08:05 dlocaus line 82 of Grammar.pm
08:06 dlocaus I need to write to my congressman to move GMT to PDT.
08:06 moritz_ I see
08:06 dlocaus I'm trying to figure out how to get subs to work in perl6
08:06 dlocaus The problem is that the current code converts
08:06 dlocaus sub a{ ... } into
08:06 dlocaus a = sub { ... }
08:07 moritz_ dlocaus: I think that whitespaces are allowed in sub declarations, but not in sub calls
08:07 Aankhen`` joined #perl6
08:07 dlocaus moritz_: that is a bit of a weird rule
08:07 moritz_ if it were &a := sub { ... } then you'd be fine
08:08 moritz_ dlocaus: why? the 'sub' keyword disambugates parsing
08:08 dlocaus its just that "normally" white space is harmless.
08:09 dlocaus but there is an actual problem w/ whitespace here.
08:09 dlocaus mySub() is legal, but mySub () is not legal, but sub mySum () is also legal
08:10 dlocaus mySub(); is legal... but mySub (); is not legal, but sub mySub () is legal.
08:10 moritz_ yes, declarations are more permissive than calls
08:11 dlocaus moritz_: do you know what pad is for?
08:12 moritz_ dlocaus: to hold the lexical pad, I think
08:12 dlocaus I thought it was for "keeping" the namespace for the runtime enviroment, but it also appears to be doing something for emiting the code.
08:12 moritz_ that is for scoping
08:12 dlocaus http://dev.pugscode.org/browser/v6/v6-Kin​daPerl6/src/KindaPerl6/Grammar/Sub.pm#L44
08:12 lambdabot http://tinyurl.com/38hf2w
08:12 dlocaus scoping what?
08:12 moritz_ variable scoping
08:14 dlocaus by variables you mean the parameters?
08:14 moritz_ no, normal variables
08:16 dlocaus where are these normal variables coming from?
08:17 moritz_ what do you mean by "coming from"?
08:17 moritz_ they are stored in a pad, I think
08:18 moritz_ and declared by "my"
08:18 dlocaus if you look at line 44, you'll see there is no "place" to declare variables.
08:18 dlocaus or rather, there is no place to "get" the variables.
08:18 dlocaus sub .. name .. and { COMPILER::add_pad() } statements...
08:19 moritz_ the block of the sub is parsed by <exp_stmts>
08:19 dlocaus yes, but there is no place to get the variables
08:19 dlocaus by get I mean "parse"
08:20 moritz_ you mean
08:20 moritz_ sub foo { my $a };
08:20 moritz_ couldn't be parsed?
08:21 dlocaus wouldn't "my $a" be parsed by <exp_stmts>
08:21 dlocaus ?
08:21 moritz_ yes
08:21 moritz_ that's why I don't understand your confusion
08:21 dlocaus then what goes in in the pad?
08:21 moritz_ think of it as an item of a linked list that is a container for local variables
08:22 dlocaus perl5 meaning of "local"?
08:22 moritz_ no, lexical variables in general
08:22 dlocaus hurm.
08:23 dlocaus but why is COMPILER::add_pad in the "grammar"/regex
08:24 moritz_ because there is compile time scoping
08:24 moritz_ you can tell at compile time if a variable is in scope or not
08:24 drrho joined #perl6
08:25 dlocaus oh argh...
08:25 moritz_ s/compile time/parse time/
08:25 dlocaus global variables, local variables, our variables, lexical variables, and the symbol table.
08:25 dlocaus and now static variables.
08:25 moritz_ take my comments with a grain of salt, though, I'm not a pad expert ;)
08:26 dlocaus how did perl5 ever come up with such a collection of variables ;)
08:26 njbartlett joined #perl6
08:26 moritz_ all of perl5 scopes allow variable checking at compile time
08:27 dlocaus I know but I remember some oddities that came up like
08:27 dlocaus my %hash;
08:27 dlocaus local $hash{a}=123;
08:28 dlocaus I rarely use local now, but I remember that was a potential oddity
08:29 dlocaus its a bit past my bed time now.  My dog is looking at me funny.  So, I have to go to bed. ;)
08:29 dlocaus I'll hibernate on this problem for a while.
08:29 moritz_ sleep well
08:29 moritz_ I'm off to university &
08:30 dlocaus The problem, for those reading the IRC log later, is that the ::BIND and ::PAD are screwing up the Emit::Perl6 display.
08:30 dlocaus moritz_: have fun :)
08:31 dlocaus To reproduce the "sub ok($num) { say $num };" for example, I don't need the pad, nor the bind.  The bind does this to the sub
08:31 dlocaus ok = sub ($num) { say $num };
08:31 dlocaus or at least it wants to
08:31 dlocaus the pad does
08:31 dlocaus ok = sub ($num) {
08:31 dlocaus my $num;
08:31 dlocaus }
08:31 dlocaus well, I'm off to bed... the dog is keeping my spot warm. Now, I just need to bully her off of that spot.
08:31 dlocaus nice doggy...
08:31 dlocaus left #perl6
08:34 franck___ joined #perl6
08:51 bloonix_ joined #perl6
08:52 renormalist joined #perl6
08:53 hareldvd joined #perl6
08:53 pugs_svn joined #perl6
09:02 agentzh left #perl6
09:27 AzureBOT joined #perl6
09:50 [particle] joined #perl6
09:56 hanekomu joined #perl6
09:58 ruoso joined #perl6
10:01 pbuetow joined #perl6
10:07 njbartlett_ joined #perl6
10:14 tuxdna joined #perl6
10:41 hanekomu joined #perl6
10:55 kane_ joined #perl6
10:56 chris2_ joined #perl6
11:09 penk joined #perl6
11:11 diotalevi joined #perl6
11:17 ebassi joined #perl6
11:26 iblechbot joined #perl6
11:36 Harleaquin joined #perl6
11:37 fglock_ joined #perl6
11:49 jferrero joined #perl6
11:52 Schwern joined #perl6
12:01 Lorn joined #perl6
12:08 IllvilJa joined #perl6
12:31 HiTech69 joined #perl6
12:36 hanekomu joined #perl6
13:06 pen1 joined #perl6
13:16 mj41_ joined #perl6
13:20 [particle1 joined #perl6
13:21 pmurias joined #perl6
13:27 macae joined #perl6
13:30 wolverian oh wow a huge thread on p6l
13:30 wolverian brings back memories :)
13:30 * wolverian didn't at first believe buffy's "128 new messages" was correct and blamed offlineimap
13:44 mj41______ joined #perl6
13:45 macae joined #perl6
13:51 jhorwitz joined #perl6
13:54 mj41_______ joined #perl6
13:58 penk joined #perl6
14:05 gbacon joined #perl6
14:13 zakame joined #perl6
14:14 kanru joined #perl6
14:22 kanru joined #perl6
14:24 qmole joined #perl6
14:33 kanru joined #perl6
14:36 hanekomu joined #perl6
14:43 macae left #perl6
14:45 pbuetow joined #perl6
14:45 fglock wolverian: which thread you refer to?
14:45 lambdabot fglock: You have 1 new message. '/msg lambdabot @messages' to read it.
14:45 wolverian fglock, the xml one
14:45 fglock ah
14:46 * moritz_ shudders at the thought of making XML "core"
14:47 moritz_ nobody would make Text::Soundex core these days too
14:47 macae joined #perl6
15:01 Psyche^ joined #perl6
15:06 pugs_svn r19166 | fglock++ | [kp6] rm Runtime::Perl5::Code
15:07 fglock i'm getting this error on make: Invalid option linkage for "include|I=s@"
15:08 Lorn joined #perl6
15:08 TJCRI joined #perl6
15:09 * moritz_ tries it
15:09 moritz_ you're builiding kp6, right?
15:10 moritz_ ah, that's a script/run_tests.pl error
15:13 moritz_ the problem is the \$opt{include}
15:13 moritz_ $opt{include} is a reference already, so push @{\$opt{include}}, $item will fail
15:14 moritz_ probably broken in r19160 by dlo
15:17 `nipra joined #perl6
15:18 moritz_ but simply removing the backslash causes parse failures of subsequent options
15:19 moritz_ the simplest workaround might be to revert parts of that commit
15:19 moritz_ dlo-- # he's got enough karma ;)
15:36 hanekomu joined #perl6
15:47 gbacon joined #perl6
15:48 ferreira joined #perl6
16:04 kanru joined #perl6
16:15 pugs_svn r19167 | ruoso++ | [yap6] YAP6__CORE__bytes, a lowlevel non-encoded string to be used in WHICH
16:21 moritz_ exp_evalbot and pugs_svnbot are currently down because their server is beeing moved
16:22 moritz_ I hope to restore them ASAP
16:24 dlocaus joined #perl6
16:24 dlocaus ahhh, not my karma!
16:24 dlocaus fglock: can you send me a bit more about the bug?
16:24 Psyche^ joined #perl6
16:24 pugs_svn joined #perl6
16:25 exp_evalbot joined #perl6
16:25 fglock dlocaus: make test gives:
16:26 fglock /opt/local/bin/perl script/run_tests.pl --backend=perl5
16:26 fglock Invalid option linkage for "include|I=s@"
16:27 fglock make: *** [test] Error 255
16:27 moritz_ dlocaus: the line include|I=s@" => \$opt{include}, is wrong
16:27 pasteling "dlocaus" at 63.192.210.11 pasted "it runs for me..." (9 lines, 495B) at http://sial.org/pbot/29170
16:27 moritz_ $opt{include} is a reference alread
16:27 moritz_ y
16:28 dlocaus this is odd, it runs for me.
16:28 dlocaus let me look at that...
16:28 moritz_ and if I remove the backslash I get "t/kp6/16-what..............​......................Can't open -backend=perl5: No such file or directory at script/kp6 line 509.
16:29 dlocaus it works without the backslash too.
16:29 dlocaus what version of Getopt are you using?
16:30 moritz_ 2.35
16:30 dlocaus kitty:~/perl6> perl -MGetopt::Long\ 999
16:30 dlocaus Getopt::Long version 999 required--this is only version 2.37 at /usr/local/share/perl/5.8.8/Getopt/Long.pm line 1468.
16:30 dlocaus BEGIN failed--compilation aborted.
16:30 moritz_ perl -MGetopt::Long -wle 'print $Getopt::Long::VERSION'
16:30 dlocaus moritz_: do you mind upgrading and see if you get the error?
16:31 moritz_ dlocaus: I won't upgrade because it's the Getopt::Long that's shipped with Debian, and I won't fiddle with their packages
16:31 dlocaus ok
16:31 dlocaus I'll download it locally...
16:32 moritz_ however I have a perl 5.10.0 with Getopt::Long 2.37, and I get the same errors
16:32 dlocaus argh... why am I special?
16:33 moritz_ dlocaus: you have a dog ;)
16:33 pugs_svn r19168 | ruoso++ | [yap6] WHICH implemented to the int type... YAP6_WHICH(value) macro defined...
16:34 pmurias moritz_: i have got a cat ;)
16:34 moritz_ pmurias: does "make test" work for you?
16:35 pmurias no
16:35 moritz_ so it's the dog
16:35 pugs_svn r19169 | dlo++ | [kp6] \(dollar)opt{include} appears to be breaking for some people.  This is a commit that just comments it out, it should still work fine, as perl5rx will still include the backend
16:37 pugs_svn r19170 | ruoso++ | [yap6] WHICH implemented to the bytes type...
16:38 pugs_svn r19171 | moritz++ | [yap6] small INSTALL nit
16:45 barney joined #perl6
16:50 pugs_svn r19172 | dlo++ | [kp6] I am not able to reproduce the error, I have documented it further, and will leave it for someone else
16:55 justatheory joined #perl6
16:57 duncanh left #perl6
17:06 Lorn does anybody know, where i can download audrey config file for svk?
17:06 Lorn http://feather.perl6.nl/svk.html <-- here, have    cp ~audreyt/config ~/.svk/
17:06 lambdabot Title: SVK on Feather
17:08 pmurias Lorn: if you have a shell account on feather use cp
17:08 Lorn pmurias: i dont have
17:08 fglock Lorn: i think the file is only valid inside the feather environment
17:09 Lorn fglock: ah ok, thanks
17:20 mj41 joined #perl6
17:23 amnesiac joined #perl6
17:24 dlocaus pmurias: for class Lit::Code (Visitor/Emit/Perl6.pm)
17:24 dlocaus for @($.pad.variable_names) -> $name {
17:24 dlocaus Does "variable_names" come from Runtime/Perl5/Pad.pm?
17:25 fglock dlocaus: yes
17:26 dlocaus cool
17:26 fglock variable declarations are collected during the parse
17:26 dlocaus ok
17:27 fglock there is a possible problem,
17:27 fglock parameters and variables get declared together
17:28 dlocaus :)
17:28 dlocaus I'm trying to sort that problem out :)
17:29 dlocaus well, I'm trying to get subroutines to work atm.
17:29 dlocaus fglock: =head2 variable_names
17:29 dlocaus XXX -  this needs to be removed.
17:29 dlocaus variable_names is the same as lexicals (below)
17:29 dlocaus =cut
17:30 dlocaus do you want me to remove variable_names and replace it with lexicals?
17:30 dlocaus http://dev.pugscode.org/browser/v6/v6-KindaPe​rl6/src/KindaPerl6/Runtime/Perl5/Pad.pm#L146
17:30 lambdabot http://tinyurl.com/39j8mg
17:31 fglock sure
17:31 dlocaus ok
17:32 pugs_svn r19173 | ruoso++ | [yap6] capture object no longer exists in the low level runtime... YAP6_APPLY should be called with a list instead.
17:34 pugs_svn r19174 | ruoso++ | [yap6] YAP6__CORE__List forward declaration.
17:40 fglock pugs: sub f ( $x ) { my $x; say $x+1 } f(3)
17:40 exp_evalbot OUTPUT[4␤]
17:41 fglock dlocaus: redeclaring params as my doesn't seem to be a problem
17:42 [particle] shouldn't be, should it?
17:42 [particle] pugs: { my $x = 2; my $x; say $x + 1; }
17:42 exp_evalbot OUTPUT[3␤]
17:43 pmurias fglock: declarators are parsed wrongly in kp6-kp6
17:45 fglock [particle]: just checking :)
17:46 mncharity joined #perl6
17:51 pugs_svn r19175 | dlo++ | [kp6] Removed sub variable_names from Runtime/Perl5/Pad.pm and replaced all variable_names calls with lexicals
17:54 pmurias pugs: my $x;$x=1;my $x;say $x
17:54 exp_evalbot OUTPUT[1␤]
18:00 pugs_svn r19176 | ruoso++ | [yap6] implemented WHICH in all dispatchers.
18:04 bbkr joined #perl6
18:07 pugs_svn r19177 | fglock++ | [kp6-perl6] some fixes in Perl 6 emitter
18:07 fglock make test doesn't work here: ......Can't open -backend=perl5: No such file or directory at script/kp6 line 509
18:07 moritz_ fglock: same here
18:08 pugs_svn r19178 | ruoso++ | [yap6] updating roadmap after removing capture from the low-level
18:08 dlocaus fglock: in regard to redeclaring params as my; it wasn't the "sub ok($num) { my $num;"
18:08 dlocaus that was causing the problem.  It is the "our $ok" that is causing the problem.
18:08 dlocaus (later on, ok := sub ($num){ .. };
18:09 fglock oops - my last commit broke &f := sub ...
18:09 fglock dlocaus: i was meaning to fix that, but i broke it - looking
18:10 dlocaus It is the ::Pad that is doing it
18:10 dlocaus it drops all variable_names regardless of type.
18:11 moritz_ ruoso: yap6 doesn't compile for me
18:11 moritz_ pair_dispatcher.c:56: error: expected expression before ‘)’ token
18:12 ruoso moritz_, hmm..
18:12 ruoso wait
18:12 fglock dlocaus: Pad is ok; the problem is Var.emit
18:12 ruoso i've changed something right there now
18:13 fglock dlocaus: I'll revert as soon as i find out how :P
18:13 dlocaus :)
18:14 pugs_svn r19179 | ruoso++ | [yap6] Woops... fixing an dumb error... thanks moritz++ for reporting...
18:14 ruoso moritz_, try it now
18:14 moritz_ works like a charm
18:15 ruoso :)
18:15 ruoso do the tests pass?
18:15 moritz_ ruoso: Aye
18:16 ruoso the big thing now is to implement the YAP6__CORE__Hash
18:16 ruoso and the last simple types
18:16 ruoso like double and string
18:16 ruoso I was thinking about writing string suppor using iconv
18:17 ruoso yap6 looks a lot like perl 5
18:17 ruoso but instead of SV*, i have YAP6__CORE__Value*
18:18 ruoso and it's late dispatch all the way...
18:20 pmurias ruoso: is yap6 intended to be a seperate p6 implementation or a kp6 backend?
18:21 jisom joined #perl6
18:21 pugs_svn r19180 | ruoso++ | [yap6] 09_int_which.t was missing a refcnt_dec.
18:21 ruoso pmurias, a kp6 backend
18:22 pmurias the ROADMAP in the readme is a bit misleading
18:23 pugs_svn r19181 | fglock++ | [kp6-perl6] fixed Perl 6 emitter (broken in last commit)
18:23 pmurias 0.4.0-1.0.0
18:23 ruoso yeah... I thought about it already..
18:24 pugs_svn r19182 | ruoso++ | [yap6] as the readme is a roadmap, renaming README to ROADMAP
18:25 moritz_ d'oh, languages/PIR/ fails all test in current parrot
18:27 pugs_svn r19183 | fglock++ | [kp6-perl6] works with pugs:
18:27 pugs_svn r19183 | fglock++ |   perl script/kp6 -Cperl6 -e ' sub f ( $x ) { my $x; say $x+1 }; f(3) ' | pugs
18:33 pugs_svn r19184 | fglock++ | [kp6-perl5] revert unneeded change
18:39 fglock taking a look at rubinius
18:44 fglock it looks a bit unstable
18:44 [particle] what isn't, these days ;)
18:46 avar fglock: pypy looks awesome, check out the lecture on google video
18:47 cmarcelo joined #perl6
18:49 ferreira hi, guys, I am back to writing the micro-articles on Perl 6 operators - if anyone has some idle time, please take a look at http://feather.perl6.nl/~ferrei​ra/perl6-operators/boolean.html and give me suggestions/corrections
18:49 lambdabot Title: boolean.pod6
18:50 [particle] 'make' would be a good op to write on
18:51 ferreira hey, I didn't know that one ;-)
18:52 moritz_ ferreira: looks good, at first glance
18:52 ferreira [particle]: what 'make' are you talking about?
18:53 ispy_ joined #perl6
18:53 [particle] see S05
18:53 * moritz_ wonders why his crack-attack score stopped at 1337 ;-)
18:54 fglock avar: looking
18:55 avar fglock: essentially we'd get free optimizations and all the yummy stuff we'd get if we emitted lisp, but on a different vm
18:56 ferreira [particle]: but it is a function. I will read a bit more about it. Thanks
18:57 ferreira moritz_: thanks for reading
18:58 fglock avar: i wonder if i'd better learn more lisp instead
18:59 avar I say lisp:)
18:59 fglock [particle]: kp6 can emit simplified Perl 6 already; not sure if it makes sense to feed this to nqp
19:00 [particle] fglock: nice!
19:00 [particle] i just got punie (perl1) converted to nqp, and am now getting some TODO tests passing
19:02 fglock [particle]: kp6 needs an efficient backend
19:03 [particle] reports are just in that punie is ~20% faster on nqp than tge
19:04 fglock is there a plan to develop Perl 6 on nqp?
19:04 fglock you could start with a bootstrapped version
19:05 dlocaus fglock: I found the problem with the Getopt::Long. ( moritz_++ )
19:06 dlocaus Getopt::Long (older version) is lacking in some code that is present in the latest version.
19:06 [particle] perl6 is already being developed on nqp
19:06 fglock dlocaus++  # have your karma back
19:06 dlocaus quite possibly an undocumented bugfix.
19:06 [particle] it's not passing all the tests yet, but we've made solid progress
19:06 moritz_ [particle]: and what does it emit? PIR?
19:06 dlocaus fglock: what is policy to do, when people are not running "latest greatest" of verything?
19:07 dlocaus verything, every-thing
19:07 [particle] we expect to have perl6 passing sanity tests before release day (18dec)
19:07 [particle] moritz_: yes, it emits pir
19:07 fglock dlocaus: kp6 doesn't require latest perl, plain 5.8.x should work
19:07 dlocaus fglock: this is perl, its Getopt::Long.
19:08 dlocaus this is not perl, it is Getopt::Long
19:08 fglock dlocaus: just work around it
19:10 avar the nqp thing is just replacing the TGE part of the parser (last I looked at the code)
19:11 avar ops were still being implemented in PIR
19:15 pugs_svn r19185 | ruoso++ | [yap6] created the Hash test
19:15 [particle] avar: yep
19:15 [particle] well, we can implement builtins in nqp
19:16 [particle] but pct emits pir, which parrot runs
19:17 [particle] fglock: what do you need to start an nqp emitter for kp6?
19:17 fglock [particle]: documentation :P
19:17 fglock some examples, maybe
19:17 [particle] well, then, compilers/nqp and languages/abc are good places to start
19:18 fglock can it build classes using the Parrot MOP?
19:18 [particle] oo support isn't all it will be yet
19:18 fglock that's the slow side of kp6 - i hoped nqp would have that
19:18 [particle] care to join irc.perl.org#parrot to discuss with pmichaud?
19:19 fglock i'm heading home, how about in an hour or so?
19:19 moritz_ ah, one of the channels I forgot to join after my last reboot
19:19 [particle] sure
19:20 fglock ok :)
19:20 fglock home &
19:20 [particle] where's TimToady when you need him?
19:20 [particle] prepping for his daughter's wedding, or something else equally unimportant?
19:20 moritz_ I guess his position is mostly uncorrelated to your needs ;)
19:21 [particle] yeah, and he may even be just a few miles away from my position
19:21 pugs_svn r19186 | dlo++ | [kp6] Patched, NOT FIXED, the problem with Getopt::Long not support include=s@, which is due to a bug in older versions of Getopt::Long.
19:29 dlocaus brb.
19:29 dlocaus b
19:32 dlocaus kp6: say(&infix:<~>('ok ',1));
19:32 exp_evalbot r19186: OUTPUT[syntax error at position 3, line 1 column 3:␤say(&infix:<~>('ok ',1))␤   ^ HERE␤]
19:32 dlocaus is "&infix:" legal perl6?
19:34 [particle] no &, so far as i know
19:34 dlocaus ok
19:36 avar & means the same thing as \& in p5
19:38 adrferreira joined #perl6
19:49 pugs_svn r19187 | ruoso++ | [yap6] created the scheleton for the hash dispatcher...
19:49 dlocaus can I do a partial match in kp6? ie
19:49 dlocaus if ( $.name =~/^(infix|prefix|postfix)) ) { ...
19:49 dlocaus or rather kp6's perl6.
19:52 Juerd I don't know about kp specifically, but in Perl 6 it'd be ~~ instead of =~
19:52 dlocaus hurm...
20:19 dlocaus ferreira: hi!
20:23 avar $.name ~~ /^^ ( infix | prefix | postfix ) /
20:25 Juerd ^^ is begin of line, right?
20:26 moritz_ yes
20:26 moritz_ like ^ in p5 with /m in effect
20:49 pmurias joined #perl6
20:53 jhorwitz joined #perl6
20:55 shlomif joined #perl6
21:07 mncharity /me forgets that in python, lexically nested functions don't have normal lexically nested binding.  /me cries.  pines for p6.
21:09 chris2 joined #perl6
21:10 pmurias mncharity: what do you mean exactly?
21:11 pmurias i.e. an example please?
21:31 thoughtpolice joined #perl6
21:32 pmurias mncharity: tried what i thought you mean but it worked right
21:32 mncharity def f()\n  s = ""\n  def g()\n    s += "a"\n  g()\n  return s\n
21:33 mncharity assignment implicitly introduces a function level scope for a variable.  outer scopes are read-only (prior to python 3.0)
21:38 pmurias mncharity: i must have a pythonic mind, tested something like that and assumed such behavior was right/normal
21:56 mncharity pmurias: perhaps the issue is, while there is agreement on "can see a variable in outer scope unless its masked in inner", and agreement that "declaration (should) mask", therein likes complication.
21:57 mncharity lambda calc had only decl by being a function argument.  simula that plus explicit decl.  languages wanting implicit decl for convenience are groping for conventions
21:58 mncharity python is decl on assignment.  which prevents some nice idioms.  and is introducing new decl keyword to get them back(?).
21:59 mncharity ruby had "even use in function arg doesnt mask", now realized to be a mistake, and is getting normal lambdas in ruby 2.0.
21:59 jjore-w joined #perl6
22:01 mncharity I like the "implicit decl *unless already declared in scope*" myself, but admittedly that introduces non-locality in understanding
22:05 mncharity the p6 "my" declares, with scope from beginning of block rather than declaration point, with repetitions redundant, seems a nice compromise (+short, +no need to predeclare to create scope, ~making sure only one use is a decl is non-critical (though nice), -requires OUTER, ?we'll see how it works in practice)
22:07 pmurias pugs: $x=1;my $x;say $x;
22:07 exp_evalbot OUTPUT[*** ␤    Unexpected "="␤    expecting "::"␤    Variable "$x" requires predeclaration or explicit package name␤    at /tmp/5MKvWSzKKD line 1, column 3␤]
22:08 pmurias mncharity: are you sure you can use a variable which is declared later on in the block?
22:08 moritz_ I think you can't
22:10 pmurias provisional calls are handled specialy so you likly can't
22:11 mncharity ^.^
22:11 * mncharity out of date or simply confused
22:12 * pmurias is tired
22:12 pmurias so can be wrong
22:13 pmurias pugs: if (0) {nonexistant()}
22:13 exp_evalbot RESULT[undef]
22:13 pmurias pugs: if (0) {nonexistant}
22:13 exp_evalbot RESULT[undef]
22:13 * mncharity forgot to use sigils the other day in p6 test code.  confusion strong candidate.
22:13 pmurias i think pugs is out of date regarding barewords
22:56 Khisanth joined #perl6
22:57 ispy_ joined #perl6
23:08 aindilis joined #perl6
23:17 ispy_ joined #perl6
23:19 dlocaus left #perl6
23:23 polettix joined #perl6
23:24 amnesiac joined #perl6
23:34 BinGOs_ joined #perl6
23:49 Limbic_Region joined #perl6
23:54 jonathanturner joined #perl6

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

Perl 6 | Reference Documentation | Rakudo