Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2008-10-03

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:18 wayland76 joined #perl6
00:19 alester_ joined #perl6
00:26 Khisanth joined #perl6
00:26 wayland76 Hi all.  I saw a commit that says "coro is gone, macro rules!"
00:27 wayland76 Does coro refer to coroutines?
00:32 wknight8111 I always have my author hat on
00:32 wknight8111 I write when I need to take a break from code
00:34 ab5tract1 wknight8111: nice to hear.
00:34 wknight8111 You ever hear of Wikibooks?
00:34 ab5tract1 did you write the first p6ppe?
00:34 ab5tract1 nope
00:34 eternaleye joined #perl6
00:34 wknight8111 no, I've never written anything of note. I hope to change that eventually
00:35 ab5tract1 i mean, ive heard of a wiki based book. git has a community book, for instance.
00:35 ab5tract1 but it seems to me you meant a community of some sort
00:40 ab5tract1 is wikibooks a place i can check out what you're writing?
00:47 ab5tract1 nm found it
00:56 renormalist joined #perl6
01:03 drbean_ joined #perl6
01:04 kst``` joined #perl6
01:04 Alias_ joined #perl6
01:15 hercynium joined #perl6
01:29 alanhaggai joined #Perl6
01:31 alester_ joined #perl6
01:53 Khisanth joined #perl6
02:00 JesseL627 joined #perl6
02:03 JesseL627 left #perl6
02:08 kanru joined #perl6
02:13 eternaleye joined #perl6
02:22 s1n @seen pmichaud
02:22 lambdabot pmichaud is in #perl6. I last heard pmichaud speak 3h 15m 58s ago.
02:34 kst``` joined #perl6
02:56 ab5tract joined #perl6
03:06 sri_work_ joined #perl6
03:19 simcop2387 joined #perl6
03:20 eternaleye joined #perl6
03:24 ab5tract joined #perl6
03:51 kst```` joined #perl6
03:59 yahooooo joined #perl6
04:44 Khisanth joined #perl6
04:56 Bzek joined #perl6
05:07 Khisanth joined #perl6
05:14 Psyche^ joined #perl6
05:21 scrottie joined #perl6
05:26 kst```` joined #perl6
05:26 [particle]1 joined #perl6
05:44 [particle] joined #perl6
06:35 penk joined #perl6
06:50 wayland76 joined #perl6
07:02 moritz_ wayland76: yes, coroutines are gone, you can use gather/take to the same effect but more flexible
07:03 kst```` joined #perl6
07:25 wayland76 moritz_: Thanks!  That answers my next question too :)
07:25 moritz_ heh, my magic crystal ball is working again!
07:27 wayland76 Good to hear.  Does it have the power to say when Perl 6.0.0 will be released?  :-p
07:27 moritz_ yes, christmas!
07:28 moritz_ it doesn't display numbers :(
07:28 wayland76 :) Which one?  (ok, teasing)
07:28 wayland76 Hmm
07:29 wayland76 What would happen if you attached it to an ant farm?  (Have you read any Terry Pratchett books involving Hex?)
07:29 moritz_ just "the color of magic" and 1 or 2 others
07:29 wayland76 I personally doubt the Christmas deadline that people have been talking about, but I think it'll be close
07:30 * moritz_ appreciates the humor of calling that perl 6 wiki "November" ;)
07:31 wayland76 Ok.  In the later Pratchett books, there's a semi-sentient ant farm named Hex that does the automatic spellcasting, etc (basically, it's a parody of a computer :) )
07:31 wayland76 Oh, just got the November one :)
07:33 * moritz_ ponders setting  up a blog on rakudo.de
07:38 wayland76 l
07:39 moritz_ no such file or directory
07:42 wayland76 (yeah, sorry, had the mouse over the wrong window -- I'm still not quite used to multi-monitor :) )
07:42 moritz_ ;)
07:43 wayland76 Speaking of which, though, I'm hoping that XWindows multi-keyboard ( http://wearables.unisa.edu.au/mpx/?q=node/65 ) will eventuate :)
07:43 lambdabot Title: Multiple keyboard goodness! - MPX: The Multi-Pointer X Server
07:43 wayland76 ...so I could have a second "Programming" keyboard with all the Perl Unicode ops :)
07:44 wayland76 But I doubt it'll happen :)
07:44 literal oh cool, you can do "@array ,= 1, 2, 3" instead of "push @array, 1, 2, 3" ?
07:45 wayland76 wow :)
07:45 literal I'm asking
07:45 literal saw it mentioned somewhere, though I don't know from the context if it was an actual feature
07:46 moritz_ literal: seems logical to allow it
07:47 literal it does seem to follow from the whole "the comma constructs lists now, not parens" idea
07:47 moritz_ aye
07:47 moritz_ you can also write @array <<== 1, 2, 3;
07:48 moritz_ that's the feed stuff that nobody has implemented yet
07:48 literal is there a short hand to unshift?
07:49 moritz_ @array.=[1..*]
07:49 lambdabot Unknown command, try @list
07:49 moritz_ but with a different return value
07:49 wayland76 Btw, I tested what literal was talking about, and it said: get_iter() not implemented in class 'Integer'
07:50 moritz_ ow wait, that'd be shift
07:50 moritz_ S03:3068
07:51 moritz_ @foo ,= 1,2,3       # same as push(@foo,1,2,3)
07:51 lambdabot Maybe you meant: faq ft todo yow
07:51 moritz_ maybe I meant @foo, lambdabot ;)
07:57 kanru joined #perl6
08:01 iblechbot joined #perl6
08:02 pugs_svn r22496 | moritz++ | [t/spec] basic tests for infix:<,=>, literal++ for bringing it up
08:03 literal ooh
08:04 pmurias joined #perl6
08:04 moritz_ it's *so* easy to gain karma here ;)
08:07 literal so there's no similar way of unshifting items to an array (other than using unshift()) ?
08:08 pugs_svn r22497 | moritz++ | [t/spec] smartlink for new assign.t test
08:08 * moritz_ can't thinkk of any right now
08:10 literal what what the url to up-to-date synopses? perl cabal something (Google isn't being helpful)
08:10 literal what was+
08:11 [particle] joined #perl6
08:11 moritz_ perlcabal.org/syn/
08:11 moritz_ or spec.pugscode.org # redircts there
08:12 literal is there something being done to prevent this site from showing up in Google searches?
08:13 literal it seems really hard to find even if I search "official perl 6 documentation cabal"
08:13 literal doesn't show up at all, in fact
08:13 moritz_ uhm, it's not indexed
08:13 literal yes, is there a reason for that?
08:13 aindilis` joined #perl6
08:14 * moritz_ tries to find out
08:14 moritz_ robots.txt doesn't forbid /syn/
08:15 literal I suspect it's also why the "Google search the synopses" at the top doesn't work at all
08:15 literal a search for "array" yields no results, for example
08:19 moritz_ apache2.conf
08:19 moritz_ 673:SetEnvIf User-Agent "Googlebot" bots
08:19 moritz_ 678:Deny from env=bots
08:23 masak joined #perl6
08:24 moritz_ Juerd: I allowed Googlebot in apache2.conf and instead disallowed everything but /syn/ in robots.txt. Hope this doesn't do any harm, if yes I'll revert that change
08:26 literal an Array is a List but a List is not an Array, correct?
08:29 moritz_ rakudo: Array ~~ List
08:29 p6eval rakudo 31581: RESULT[1]
08:29 moritz_ aye
08:30 literal nice
08:30 literal rakudo: List ~~ Array
08:30 p6eval rakudo 31581: RESULT[0]
08:30 literal indeed
08:31 * moritz_ wonders how the python folks do multi-statement programs with their evalbots
08:32 pmurias moritz_: they use the ;
08:33 moritz_ pmurias: does that work with 'if' and the like?
08:33 pmurias hm
08:34 pmurias yes
08:35 moritz_ so that means you can write python without the indenting restriction?
08:35 pmurias to a limited extent i think
08:37 tcliou joined #perl6
08:41 pmurias moritz_: you can't have to if's on the same line it seems
08:42 moritz_ (OT) yesterday I held a small presentation about perl security, and among other things I mentioned DBI, placeholders and prepared statements. There were a few PHP programmers in the audience who very thoroughly impressed ;)
08:43 pmurias yesterday when i showed m0ld to a friend he commented "oh, it looks like PHP"
08:43 moritz_ is that a bad sign? ;)
08:44 pmurias dunno
08:50 tomyan joined #perl6
08:51 azawawi ping
08:51 moritz_ Do you want to ping broadcast? Then -b
08:52 azawawi oh well; it is better than the simple 'hi' ;-)
08:52 moritz_ ;)
08:54 pmurias hi
08:54 azawawi hi -b ;-)
08:54 drbean joined #perl6
08:56 Kitchy joined #perl6
08:57 Kitchy Too bad that "It is erroneous to change a key object's value within the hash except by deleting it and reinserting it." I wanted to append a value recently.
08:59 moritz_ basically it could be allowed if you implement some method of telling the hash that its key object has changed
09:00 moritz_ but that's a bit evil, not superior to deleting + re-adding in any way
09:04 Kitchy From the point of view of someone who doesn't know about the internals or even much about OO, it seems the same as push or .=
09:04 * moritz_ can't follow that
09:04 moritz_ Kitchy: care to give me a small piece of code?
09:05 Kitchy ...trying to remember...
09:07 moritz_ in perl 5 you usually say $hash{$new_key} = delete $hash{$old_key}
09:07 Kitchy I think I just wanted to add a new key/value pair, which destroied the existing keys. (I'm not much of a hash user)
09:08 literal then it's just a straight forward $hash{$key} = $value
09:08 literal it will overwrite the old
09:09 Kitchy Well, the thing I tried didn't work, whatever it was. Fix it.
09:10 literal show the code which doesn't work...
09:10 Kitchy I don't remember.
09:11 moritz_ we'll put all the magic into it that we can come up with ;)
09:11 azawawi moritz_: interesting config_lib.pasm -> 'cfg  = _config()' in perl6.pir
09:12 azawawi moritz_: so $?OS could be one of them...
09:14 azawawi moritz_: and $*PID can be obtained through NCI
09:14 cotto joined #perl6
09:14 Kitchy Okay, it's what I was saying originally...I wanted to append to a value. I think of the key as a variable and I'd like to do a concatenation or something...
09:14 Kitchy I don't really get why it can't be done.
09:15 jan_ joined #perl6
09:15 Kitchy Or why it would be evil.
09:16 moritz_ Kitchy: appendiing to a value is neither a problem in perl 5 nor in perl 6
09:17 literal changing the name of a hash key is about as silly as changing the name of a variable, really
09:17 literal there's probably a better way to do what you're doing :)
09:19 Kitchy I had a hash with each key consisting of two letters. The values were words beginning with those two letters. As I found a new word, I wanted to push it onto the corresponding key...
09:19 Kitchy I think I had to define the entire key, not just add the new word. I don't like that.
09:20 moritz_ in perl 5: push @{$hash{we}}, 'weird';
09:20 literal the values were words? you mean the values were arrays of words?
09:20 moritz_ just store that as an hash of arrays
09:20 moritz_ in Perl 6 it's just %hash<we>.push('weird');
09:21 Kitchy I used space separated words as a single value. I wanted to keep lengthing the value by adding words.
09:21 moritz_ then $hash{we} .= ' weird' (perl 5) or %hash<we> ~= " weird" (perl 6)
09:23 Kitchy Yeah, that's what I wanted. Um...maybe I accidently used parentheses instead of curly brackets...
09:23 Kitchy So never mind.
09:24 * moritz_ never minds
09:25 Kitchy Curly brackets need larger nipples.
09:39 barney joined #perl6
09:49 moritz_ I'm gone for the weekend now, happy hacking ;)
09:50 azawawi have a nice weekend
09:50 moritz_ you too
10:03 elmex joined #perl6
10:26 penk left #perl6
10:44 iblechbot_ joined #perl6
10:50 meppl joined #perl6
10:52 [particle]1 joined #perl6
11:09 araujo joined #perl6
11:11 qwr left #perl6
11:22 alanhaggai joined #Perl6
11:40 alanhaggai_ joined #Perl6
12:27 pugs_svn r22498 | lwall++ | [STD] EXPR didn't _MATCHIFY
12:27 pugs_svn r22498 | lwall++ | [viv] starting on a gimme5 replacement using STD
12:49 PZt joined #perl6
12:50 alanhaggai_ joined #Perl6
13:12 alanhaggai joined #Perl6
13:17 alester_ joined #perl6
13:37 pmurias TimToady: will viv be in gimme5'ed Perl 6?
13:57 ludan joined #perl6
14:00 TimToady not at first
14:00 TimToady someday
14:01 TimToady probably more important to translate Cursor first
14:03 abra joined #perl6
14:03 PerlJam TimToady: If a programmer creates a .true method on their class it changes the meaning of prefix:<?> and .succ and .pred change the meaning of ++ and -- respectively.  Is there some way to protect the programmer from accidently changing the meaning of built-in operators?
14:04 TimToady don't define .succ and .pred on your int and str types?
14:05 TimToady shouldn't matter on other types
14:05 PerlJam Hmm.
14:06 pmichaud there's all sort of things like that where someone can get into trouble.  For example, defining a function called 'fail' might cause fail to fail.  :-)
14:06 PerlJam maybe the chance of collision between perl ops and the problem domain that the programmer is modelling and the likelihood of an errant $obj++  is small enough.
14:07 pmichaud the classic C case is where someone would define a function called 'write' and then wonder why 'printf' stops working.
14:07 TimToady well, there's this little difference between global functions and class methods...
14:08 pmichaud yes; my point is simply that this sort of thing exists -- not that we necessarily do anything about it.
14:08 PerlJam It still feels to me like methods/subs that override builtins should require some sort of sigily marker so that programmers don't accidently do so.
14:09 TimToady what is this "builtin" of which you speak?
14:09 PerlJam Things that seem like part of the language to everyday programmers. :)
14:11 TimToady I would say that if a programmer defines sub fail and then calls fail(), they expect it to call their function, not the one from the prelude
14:13 jan_ joined #perl6
14:13 PerlJam TimToady: perhaps I'm worrying over nothing, but it may be that programmer A defines fail() and programmer B doesn't realize it (because they're working in different sections of a large code base; because programmer A failed to document the fact that he was redefining fail;  etc. )
14:14 TimToady note that this is lexically determined, and if builtin function is defined in terms of another builtin function, that's a different scope.  but regarding large project, we can't prohibit all idiocy...
14:15 PerlJam I didn't think we prohibited anything :-)  I was just looking for a way to mitigate it.  But, again, maybe I'm trying to "design for the future" too much and it won't be a real problem in the real world.
14:16 TimToady though in this case, we'll hope the programmer at least gave their fail definition a more specific sig, so multiple dispatch has some chance at working
14:16 TimToady but people who override multi builtins with only subs are assumed to know what they're doing
14:17 PerlJam It's the people using those people's modules I worry about.
14:17 TimToady don't use bad modules :P
14:18 PerlJam yeah, I guess Darwin rules my worry-space.
14:18 TimToady it's possible we could outlaw bare 'sub fail' as too ambiguous to override, and require 'only' or 'multi' in that case
14:19 pmurias isn't it multi by default now?
14:19 TimToady no
14:21 abra joined #perl6
14:21 TimToady at the moment 'sub foo' is still by default package and only, mostly because that's what P5 programmers expect
14:22 TimToady we tried to make it easy to say "multi foo" instead
14:22 TimToady but it's possible the default is not the best design choice
14:26 TimToady j
14:28 frandars_ joined #perl6
14:47 agentzh joined #perl6
14:50 hercynium joined #perl6
14:50 pugs_svn r22499 | pmurias++ | [mildew] start of mildew, a p6 compiler using STD and targeting smop (m0ld)
14:51 pugs_svn r22499 | pmurias++ | $OUT.print("Hello World\n") works
14:51 [particle]1 mildew++ pmurias++
14:51 pmurias it's funny that $OUT.print("Hello World\n") works in perl5 too ;)
14:51 [particle] :)
14:51 [particle] so it's also a perl5 to smop compiler :)
14:55 Auzon joined #perl6
15:02 TimToady yeah, and $ERR.warn works too :)
15:03 Auzon Hey TimToady. I missed seeing you at ACM yesterday :-/
15:05 TimToady hiding out writing my talk--or *not* writing my talk, in some cases...
15:05 [particle] TimToady: can anonymous subroutines be exported?
15:06 TimToady yes, but then they're not longer anonymous, because export works by installing a name into a subpackage like DEFAULT
15:06 [particle] right, Foo::EXPORT::ALL::???
15:06 [particle] how do you specify the name of the export?
15:06 TimToady don't remmeber the details..
15:07 [particle] sub foo is export(:DEFAULT :others) {...}
15:07 [particle] that's basically what S11/Exportation has to say
15:07 [particle] shall export take an optional named param?
15:08 [particle] or, should :DEFAULT take a postcircumfix?
15:08 [particle] :DEFAULT<bar> :others<baz>
15:08 [particle] i like the latter, the more i think about it
15:09 TimToady I have no idea what you're trying to do
15:09 [particle] sub is export(:my_tag_list<sub_name_here) {...}
15:10 [particle] thi would result in &<current_namespace>::EXPORT​::my_tag_list::sub_name_here
15:10 [particle] as well as the anonymous namespace in <current_namespace>
15:10 [particle] *anonymous sub
15:10 TimToady if you want to get that fancy, just &EXPORT::new_name ::= sub {...}
15:11 [particle] that works, too.
15:12 [particle] ok, so then is export() trait on an anon sub is not allowed
15:12 [particle] you must manually export them
15:12 TimToady I guess
15:13 [particle] good enough for me
15:19 plash_ joined #perl6
15:22 justatheory joined #perl6
15:29 FubarBass joined #perl6
15:31 plash_ left #perl6
15:37 pyrimidine joined #perl6
15:42 sri_work joined #perl6
15:45 FubarBass left #perl6
16:03 TJCRI joined #perl6
16:08 jhorwitz joined #perl6
16:31 ab5tract joined #perl6
16:37 ruoso joined #perl6
16:41 justatheory joined #perl6
16:42 [particle] perl6: sub foo {1}; &y := &foo; y();
16:42 p6eval pugs: OUTPUT[*** ␤    Unexpected " :="␤    expecting "::" or signature value␤    Variable "&y" requires predeclaration or explicit package name␤    at /tmp/rsLHliz5pc line 1, column 16␤]
16:42 p6eval ..elf 22499: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
16:42 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
16:42 p6eval ..rakudo 31590: RESULT[1]
16:42 [particle] perl6: sub foo {1}; my &y := &foo; y();
16:42 p6eval elf 22499: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
16:42 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
16:42 p6eval ..pugs, rakudo 31590: RESULT[1]
16:43 [particle] interesting... rakudo treats vars with  '&' sigil as global, pugs doesn't
16:43 [particle] which is correct?
16:45 pmurias pugs
16:46 pmurias my sub foo {say "foo\n"}
16:47 [particle] perl6: sub foo { say 1 }; &Bar::y := &foo; Bar::y();
16:47 p6eval elf 22499: OUTPUT[/home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.rb:141:in `block in to_dump0': undefined method `to_dump0' for true:TrueClass (NoMethodError)␤     from /home/evalenv/pugs/misc/elf/elf​_f_src/STD_red/match.rb:140:in `each'␤       from
16:47 p6eval ../home/evalenv/pugs/misc/elf​/elf_f_src/STD_red/match.r...
16:47 p6eval ..pugs, rakudo 31590: OUTPUT[1␤]
16:47 [particle] here it seems to me rakudo is correct
16:48 pmurias ruoso: hi
16:48 ruoso hi pmurias
16:50 pmurias ruoso: you thought about a tree transformation language?
16:51 ruoso pmurias, actually that was a revival of the debate we had in YAPC::EU::2007
16:51 ruoso pmurias, I've just sketched some ideas to make that discussion more concrete
16:51 kanru joined #perl6
16:53 pmurias i seem to rember some parts of it but my attention was captured by something else then, what do we need it for?
16:53 [particle] for transforming trees? ;)
16:54 ruoso heh... specially transforming parse tree?
16:55 pmurias ruoso: btw have you seen mildew?
16:55 ruoso pmurias, the example I pasted yesterday was using the output of STD5_dump_match as an example input
16:55 ruoso mildew? I don't think so
16:55 pmurias v6/smop/mildew
16:55 ruoso hmm
16:55 pmurias v6/mildew actually
16:55 * ruoso haven't backlogged yet
16:56 * ruoso probably won't
16:56 * ruoso E_NO_TIME
16:56 * ruoso updating the repository
16:56 pmurias np
16:57 ruoso pmurias, is that related to using STD5 as a front-end for smop?
16:57 pmurias yes
16:57 ruoso coooool
16:57 [particle] obra: ping
16:57 pmurias ruoso: i didn't hack on it much so it now only does $OUT.print("Hello World\n")
16:58 ruoso That's awesome...
16:58 ruoso (you mean $*OUT.print, right?)
16:58 pmurias isn't $OUT.print("...") legal?
16:58 pmurias perl6: $OUT.print("...")
16:58 p6eval pugs: OUTPUT[...]
16:58 p6eval ..rakudo 31590: OUTPUT[Scope not found for PAST::Var '$OUT'␤current instr.: 'parrot;PCT::HLLCompiler;panic' pc 156 (src/PCT/HLLCompiler.pir:103)␤]
16:58 p6eval ..elf 22499: OUTPUT[Global symbol "$OUT" requires explicit package name at (eval 115) line 3.␤ at ./elf_f line 3861␤]
16:59 ruoso I think pugs is wrong here...
16:59 * ruoso brb
17:03 stevedo joined #perl6
17:08 beatnik left #perl6
17:10 pmurias it might as S02:1716 uses "use GLOBAL <$IN $OUT>" to import them into the lexicial scope as i think the specs wouldn't illustrate things with noops
17:15 eternaleye joined #perl6
17:26 alanhaggai joined #Perl6
17:31 alanhaggai_ joined #Perl6
17:56 cj joined #perl6
17:56 cj does it come with a pony yet?
17:59 pmurias it=?
17:59 cj pmurias: perl 6, of course.  duh :)
17:59 * cj hides
18:00 masak cj: you missed the addition of the pony?
18:00 cj masak: obviously!
18:00 masak it was there for a while, but then it was Huffman-coded, so now it's a small dog
18:01 cj ah.  do I blame Audrey?
18:01 masak then even that one went the way of the camel
18:02 cj audreyt: where's my pony!?
18:03 masak cj: watch it. it's not too improbable that she'll show up, say "cj: r22500", and you'll be standing there with a pony and no room for it
18:05 rdice joined #perl6
18:05 cj masak: actually, we have a yard that's just about pony-sized and with the recent financial issues, noone mowing it right now!
18:05 * cj will have to invest in a lawn mower.  *sigh*
18:08 obra [particle]: pong
18:11 pugs_svn r22500 | pmurias++ | [mildew] anonymous subroutines
18:20 ruoso pmurias, yes... use GLOBAL <$IN $OUT> explicitly imports that variables into the current lexical scope...
18:20 ruoso otherwise you need to access them as $*IN and $*OUT
18:21 ruoso (although it would probably be wise that we advocate it as $+IN and $+OUT instead...
18:23 pmurias why?
18:24 TimToady makes the code more generically reusable
18:24 TimToady you can do I/O redirection on sub calls
18:24 [particle] obra: still here?
18:26 pmurias do context variables fall back to GLOBAL?
18:26 ruoso so the interpreter has "my $IN is context; my $OUT is context;" defined before calling the actual code...
18:26 ruoso pmurias, no... they don't
18:27 zamolxes joined #perl6
18:27 TimToady my $IN is context = $*IN maybe
18:28 ruoso right.... that's more precise...
18:29 ruoso because the global in and out still need to be available anyway
18:30 ruoso but I do think it would be wise to replace all references to $*IN and $*OUT in the specs, except the one saying how $+IN and $+OUT are defined ;)
18:30 TimToady what about making all * vars available as +
18:31 TimToady so you can lie about any global :)
18:31 ruoso all globals defined by the prelude you mean
18:31 TimToady no, I mean fallback from + to *
18:32 ruoso which basically would mean that the ultimate caller is in the lexical scope of the * package declaration
18:32 [particle] export STD=foo; perl6 -e"$+STD.say('bar')"
18:33 [particle] s/STD/OUT/
18:33 [particle] silly brain
18:33 TimToady we undid the ENV failover a while back
18:33 [particle] ah
18:33 TimToady but failover to * makes much more sense to me
18:33 ruoso although %+ENV is still valid
18:34 TimToady yes, since %*ENV is a global :)
18:34 ruoso but I'm not sure that makes sense for variables not pre-defined by the interpreter
18:35 TimToady what is the sound of one brick falling?
18:36 ruoso vooooosh
18:36 ruoso :)
18:36 TimToady globals are inherently dangerous anyway, and I think a + to * policy would allow people to recover from bad choices by others
18:37 TimToady and maps nicely to the P5 concept of localizing globals too
18:37 ruoso we could hide globals, and leave it in the "small letters" part of the specs ;)
18:38 ruoso we could lie to people and say that globals in Perl 6 are $+FOO
18:38 TimToady let's rename all the twigils.
18:38 TimToady lessee, now we want ^ for global and * for context, so we need something for placeholders
18:39 [particle] -
18:39 pmurias ruoso: that would make contextual variables seem bad
18:40 ruoso we could say... "hey, Perl 6 has something that looks like globals but are better... ;)"
18:40 ruoso and we then forget to tell people about real globals ;)
18:40 [particle] they'll still hang themselves
18:41 TimToady maybe we could use a @#&$*@&! twigil for globals...
18:42 ruoso heahehaehaeheaaeh
18:42 TimToady well, it's no longer than GLOBAL::
18:42 ruoso but really... a unicode character that few people would know how to type...
18:43 TimToady or just retire * for that purpose and force people to say GLOBAL::
18:43 ruoso $×FOO
18:44 TimToady well, it's probably okay the way it is...
18:44 TimToady (plus proposed fallback)
18:44 ruoso well... I'd vote for dropping '*' as global identifier
18:44 TimToady we can let cultural pressure enforce $+OUT
18:44 ruoso (reversed-huffman)++
18:45 ruoso (we make things we want people not to type to be longer)
18:46 ruoso in fact... I always thought the '*' twigil to be confusing...
18:47 TimToady it really stands for "every package" there
18:47 PerlJam whatever  ;)
18:47 TimToady so $*OUT and $**OUT maybe
18:48 ruoso you mean $*OUT to be contextual?
18:48 ruoso and the other being the actual global?
18:48 TimToady that was the thought
18:48 ruoso $*OUT and $GLOBAL::OUT seems better...
18:49 PerlJam perl5 has CORE::GLOBAL::  if you want to make it longer   :)
18:49 PerlJam (I tend to agree with ruoso though)
18:49 TimToady I already pretty much outlawed "sub *foo"
18:50 TimToady lemme think about it some after I've given my talks here
18:51 donaldh joined #perl6
18:51 TimToady lunch first &
18:53 [particle1 joined #perl6
18:55 [particle] left #perl6
19:04 ruoso that makes me think... I suppose defining "my package GLOBAL" is forbidden, right?
19:08 PerlJam Is anything actually forbidden?  Or is it just highly discouraged?
19:18 pmurias 10/0
19:24 ab5tract is there a quote page?
19:24 ab5tract because that needs to go on it
19:26 [particle1 multi infix:</> (Int $x, Int $y) { say "this is highly discouraged" }
19:47 icwiener joined #perl6
19:50 rindolf joined #perl6
19:50 rindolf Hi all.
19:50 rindolf http://run.pugscode.org/ does not work.
19:50 pmurias rindolf: hi
19:50 rindolf Juerd: here?
19:50 rindolf Hi pmurias
19:50 Juerd I'm not fixing those things.
19:50 lambdabot Juerd: You have 1 new message. '/msg lambdabot @messages' to read it.
19:51 Juerd Find whoever maintains it.
19:51 * Juerd is severely out of tuits, and has no idea how those things are *built*, even.
19:51 Juerd Sorry
20:01 rindolf $ host run.pugscode.org
20:01 rindolf run.pugscode.org is an alias for feather3.perl6.nl.
20:01 rindolf Where does it point to on feather?
20:04 alester_ joined #perl6
20:05 rindolf p6eval: +(5,6,3)
20:07 rindolf ?eval +(5,6,7)
20:12 rindolf pugs: +(5,6,3)
20:12 p6eval pugs: RESULT[3]
20:12 rindolf pugs: +(5,6,3,100,7)
20:12 p6eval pugs: RESULT[5]
20:13 rindolf rakudo: +(5,6,3,100,7)
20:13 p6eval rakudo 31592: RESULT[5]
20:24 [particle1 pugs: [+] 1, 2, 3
20:24 p6eval pugs: RESULT[6]
20:28 [particle] joined #perl6
20:29 rindolf rakudo: [+] (5,6,100)
20:29 p6eval rakudo 31592: OUTPUT[Syntax error at line 1, near "[+] (5,6,1"␤␤current instr.: 'parrot;PGE::Util;die' pc 119 (runtime/parrot/library/PGE/Util.pir:82)␤]
20:45 pyrimidine joined #perl6
21:01 explorer joined #perl6
21:07 [particle] joined #perl6
21:11 kcwu joined #perl6
21:22 clkao_ joined #perl6
21:22 hcchien_ joined #perl6
21:24 Ehtyar joined #perl6
21:32 wknight8111 joined #perl6
21:38 iblechbot joined #perl6
22:00 rdice joined #perl6
22:59 literal ($a, $b, $c, *) = 1..42;    # throw away 4..42
22:59 literal can this not be written as; ($a, $b, $c) = 1..42;   ?
23:00 literal or will that throw awa 1..39?
23:00 literal away
23:02 literal ah, if I understand correctly it'll do the same as the first form, but warn about information loss
23:06 meppl good night
23:08 eternaleye joined #perl6
23:18 wayland76 TimToady: I'd be grateful if you could put in an example of what you were saying about signatures in a rule matching nodes in a tree
23:18 wayland76 (even if it's just in the IRC log :)
23:27 allbery_b I'd like to see that too
23:35 Limbic_Region joined #perl6
23:41 [particle] signatures have both an array and a hash component (for positional and named params)
23:42 [particle] that can be used for matching tree nodes
23:43 plash joined #perl6
23:45 [particle] but i'm too tired to reread the spec and provide an example, sorry
23:50 [particle]1 joined #perl6

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

Perl 6 | Reference Documentation | Rakudo